@donartcha/openlag 0.1.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/LICENSE +373 -0
- package/README.md +82 -0
- package/bin/openlag.js +2 -0
- package/dist/assets/arc-4YUHkXo3.js +1 -0
- package/dist/assets/architectureDiagram-3BPJPVTR-WeGmL7HM.js +36 -0
- package/dist/assets/blockDiagram-GPEHLZMM-CtV7ubAx.js +132 -0
- package/dist/assets/c4Diagram-AAUBKEIU-DqYDW5c3.js +10 -0
- package/dist/assets/channel-Tsel3-MK.js +1 -0
- package/dist/assets/chunk-2J33WTMH-BE8P9tjh.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-Bi7oLGF5.js +1 -0
- package/dist/assets/chunk-55IACEB6-D9Xhxp_r.js +1 -0
- package/dist/assets/chunk-727SXJPM-Dz8jKE60.js +206 -0
- package/dist/assets/chunk-AQP2D5EJ-BzmM0IeH.js +231 -0
- package/dist/assets/chunk-FMBD7UC4-Cvl5dpcx.js +15 -0
- package/dist/assets/chunk-ND2GUHAM-Dz2efqnq.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-CwblgSnQ.js +1 -0
- package/dist/assets/classDiagram-4FO5ZUOK-Bgm-_cW8.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-Bgm-_cW8.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-h_A3nZUx.js +1 -0
- package/dist/assets/cytoscape.esm-D_LviqZs.js +331 -0
- package/dist/assets/dagre-BM42HDAG-CN_B2Doz.js +4 -0
- package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/assets/diagram-2AECGRRQ-C9TAFwjG.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-BThljQLo.js +10 -0
- package/dist/assets/diagram-KO2AKTUF-bRPq25Se.js +3 -0
- package/dist/assets/diagram-LMA3HP47-BubLCIus.js +24 -0
- package/dist/assets/diagram-OG6HWLK6-CJpfhIsS.js +24 -0
- package/dist/assets/erDiagram-TEJ5UH35-6Xkza9wL.js +85 -0
- package/dist/assets/flowDiagram-I6XJVG4X-Bq_to3hX.js +162 -0
- package/dist/assets/ganttDiagram-6RSMTGT7-C3CmvYl7.js +292 -0
- package/dist/assets/gitGraphDiagram-PVQCEYII-C93LTfrl.js +106 -0
- package/dist/assets/graph-CAnANduQ.js +1 -0
- package/dist/assets/index-0RMQQ34p.css +1 -0
- package/dist/assets/index-ByxguSZe.js +729 -0
- package/dist/assets/infoDiagram-5YYISTIA-CMfuwygl.js +2 -0
- package/dist/assets/init-Gi6I4Gst.js +1 -0
- package/dist/assets/ishikawaDiagram-YF4QCWOH-CbJ5ojDF.js +70 -0
- package/dist/assets/journeyDiagram-JHISSGLW-C_Xz8YyT.js +139 -0
- package/dist/assets/kanban-definition-UN3LZRKU-GVv_iRMq.js +89 -0
- package/dist/assets/katex-DkKDou_j.js +257 -0
- package/dist/assets/layout-DGIYPm2g.js +1 -0
- package/dist/assets/linear-BNEtUH2J.js +1 -0
- package/dist/assets/mindmap-definition-RKZ34NQL-DIsL0XSF.js +96 -0
- package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/assets/pieDiagram-4H26LBE5-CSCTSOjk.js +30 -0
- package/dist/assets/quadrantDiagram-W4KKPZXB-CQQ9OaFY.js +7 -0
- package/dist/assets/requirementDiagram-4Y6WPE33-Cjn3la_S.js +84 -0
- package/dist/assets/sankeyDiagram-5OEKKPKP-DoVspvVc.js +40 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-UsoGmL4w.js +162 -0
- package/dist/assets/stateDiagram-AJRCARHV-DLmf7Dc8.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-jkiDZ_3u.js +1 -0
- package/dist/assets/timeline-definition-PNZ67QCA-HfyRxZ8p.js +120 -0
- package/dist/assets/vennDiagram-CIIHVFJN-B6pM3L33.js +34 -0
- package/dist/assets/wardley-L42UT6IY-B-LdKtrI.js +173 -0
- package/dist/assets/wardleyDiagram-YWT4CUSO-BD45zhOu.js +78 -0
- package/dist/assets/xychartDiagram-2RQKCTM6-zsDMbUiS.js +7 -0
- package/dist/cli/openlag.js +1793 -0
- package/dist/index.html +14 -0
- package/index.html +13 -0
- package/package.json +84 -0
- package/scripts/cli/build.ts +34 -0
- package/scripts/cli/dev.ts +35 -0
- package/scripts/cli/generate.ts +92 -0
- package/scripts/cli/init.ts +427 -0
- package/scripts/cli/lint.ts +29 -0
- package/scripts/cli/openlag.ts +110 -0
- package/scripts/cli/vite-bin.ts +8 -0
- package/scripts/core/parser/diagnostic.ts +34 -0
- package/scripts/core/parser/normalizer.ts +27 -0
- package/scripts/core/parser/scanner.ts +30 -0
- package/scripts/core/parser/schemas.ts +23 -0
- package/scripts/core/parser/types.ts +30 -0
- package/scripts/core/parser.ts +127 -0
- package/scripts/generate-relations.ts +53 -0
- package/scripts/lint/lint-engine.ts +85 -0
- package/scripts/lint/lint-profiles.ts +49 -0
- package/scripts/lint/lint-rules.ts +174 -0
- package/scripts/lint/lint-types.ts +43 -0
- package/src/App.tsx +164 -0
- package/src/components/DocumentationView.tsx +905 -0
- package/src/components/GraphView.tsx +529 -0
- package/src/components/GuideView.tsx +535 -0
- package/src/components/ImpactView.tsx +365 -0
- package/src/components/MarkdownRenderer.tsx +120 -0
- package/src/components/OrphansView.tsx +360 -0
- package/src/components/SettingsView.tsx +146 -0
- package/src/core/generated/relation-definitions.ts +622 -0
- package/src/core/graph/GraphQueryLayer.ts +194 -0
- package/src/core/registry/ArtifactRegistry.ts +19 -0
- package/src/core/registry/RelationRegistry.ts +27 -0
- package/src/core/semantic/artifact-layers.ts +43 -0
- package/src/core/semantic/ownership-rules.ts +13 -0
- package/src/core/semantic/types.ts +11 -0
- package/src/index.css +121 -0
- package/src/lib/reportUtils.ts +59 -0
- package/src/main.tsx +10 -0
- package/src/store.ts +146 -0
- package/src/types.ts +77 -0
- package/vite.config.ts +31 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Y,b as O,d as Ee,e as q,c as K,f as Ke,g as fe,h as Xe,j as jn,k as He,s as Mn,o as Rn,l as $n,m as de,n as Fn,p as se,r as Bn,q as ze,t as Gn,u as Dn,v as Yn,U as Te,S as Pe,w as ce,x as le,y as U,z as Je,A as Ze,B as Un,C as N,D as Vn,E as Wn,F as qn,H as Le,I as Kn,J as Qe,K as C,L as Xn,M as Hn,N as B,O as en,P as nn,Q as zn,R as he,T as rn,V as Jn,W as tn,X as Zn,Y as Qn,G as E,Z as c,_ as er,i as x,$ as R,a0 as I,a1 as X}from"./graph-CAnANduQ.js";var nr=/\s/;function rr(e){for(var n=e.length;n--&&nr.test(e.charAt(n)););return n}var tr=/^\s+/;function ir(e){return e&&e.slice(0,rr(e)+1).replace(tr,"")}var Ne=NaN,ar=/^[-+]0x[0-9a-f]+$/i,or=/^0b[01]+$/i,ur=/^0o[0-7]+$/i,fr=parseInt;function dr(e){if(typeof e=="number")return e;if(Y(e))return Ne;if(O(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=O(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ir(e);var r=or.test(e);return r||ur.test(e)?fr(e.slice(2),r?2:8):ar.test(e)?Ne:+e}var Ie=1/0,sr=17976931348623157e292;function G(e){if(!e)return e===0?e:0;if(e=dr(e),e===Ie||e===-Ie){var n=e<0?-1:1;return n*sr}return e===e?e:0}function cr(e){var n=G(e),r=n%1;return n===n?r?n-r:n:0}var _e=Object.create,lr=(function(){function e(){}return function(n){if(!O(n))return{};if(_e)return _e(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function an(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function H(e,n,r){n=="__proto__"&&Ee?Ee(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}var hr=Object.prototype,vr=hr.hasOwnProperty;function z(e,n,r){var t=e[n];(!(vr.call(e,n)&&q(t,r))||r===void 0&&!(n in e))&&H(e,n,r)}function $(e,n,r,t){var i=!r;r||(r={});for(var o=-1,a=n.length;++o<a;){var u=n[o],f=void 0;f===void 0&&(f=e[u]),i?H(r,u,f):z(r,u,f)}return r}function S(e,n,r){if(!O(r))return!1;var t=typeof n;return(t=="number"?K(r)&&Ke(n,r.length):t=="string"&&n in r)?q(r[n],e):!1}function pr(e){return fe(function(n,r){var t=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&S(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t<i;){var u=r[t];u&&e(n,u,t,o)}return n})}function br(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var wr=Object.prototype,gr=wr.hasOwnProperty;function mr(e){if(!O(e))return br(e);var n=Xe(e),r=[];for(var t in e)t=="constructor"&&(n||!gr.call(e,t))||r.push(t);return r}function P(e){return K(e)?jn(e,!0):mr(e)}function A(e){var n=e==null?0:e.length;return n?He(e):[]}function yr(e){return Mn(Rn(e,void 0,A),e+"")}var ve=$n(Object.getPrototypeOf,Object),xr="[object Object]",Or=Function.prototype,Er=Object.prototype,on=Or.toString,Tr=Er.hasOwnProperty,Pr=on.call(Object);function Lr(e){if(!de(e)||Fn(e)!=xr)return!1;var n=ve(e);if(n===null)return!0;var r=Tr.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&on.call(r)==Pr}function Nr(e,n){return e&&$(n,se(n),e)}function Ir(e,n){return e&&$(n,P(n),e)}var un=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ce=un&&typeof module=="object"&&module&&!module.nodeType&&module,_r=Ce&&Ce.exports===un,Ae=_r?Bn.Buffer:void 0,ke=Ae?Ae.allocUnsafe:void 0;function fn(e,n){if(n)return e.slice();var r=e.length,t=ke?ke(r):new e.constructor(r);return e.copy(t),t}function Cr(e,n){return $(e,ze(e),n)}var Ar=Object.getOwnPropertySymbols,dn=Ar?function(e){for(var n=[];e;)Dn(n,ze(e)),e=ve(e);return n}:Gn;function kr(e,n){return $(e,dn(e),n)}function Sr(e){return Yn(e,P,dn)}var jr=Object.prototype,Mr=jr.hasOwnProperty;function Rr(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Mr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function pe(e){var n=new e.constructor(e.byteLength);return new Te(n).set(new Te(e)),n}function $r(e,n){var r=n?pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Fr=/\w*$/;function Br(e){var n=new e.constructor(e.source,Fr.exec(e));return n.lastIndex=e.lastIndex,n}var Se=Pe?Pe.prototype:void 0,je=Se?Se.valueOf:void 0;function Gr(e){return je?Object(je.call(e)):{}}function sn(e,n){var r=n?pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Dr="[object Boolean]",Yr="[object Date]",Ur="[object Map]",Vr="[object Number]",Wr="[object RegExp]",qr="[object Set]",Kr="[object String]",Xr="[object Symbol]",Hr="[object ArrayBuffer]",zr="[object DataView]",Jr="[object Float32Array]",Zr="[object Float64Array]",Qr="[object Int8Array]",et="[object Int16Array]",nt="[object Int32Array]",rt="[object Uint8Array]",tt="[object Uint8ClampedArray]",it="[object Uint16Array]",at="[object Uint32Array]";function ot(e,n,r){var t=e.constructor;switch(n){case Hr:return pe(e);case Dr:case Yr:return new t(+e);case zr:return $r(e,r);case Jr:case Zr:case Qr:case et:case nt:case rt:case tt:case it:case at:return sn(e,r);case Ur:return new t;case Vr:case Kr:return new t(e);case Wr:return Br(e);case qr:return new t;case Xr:return Gr(e)}}function cn(e){return typeof e.constructor=="function"&&!Xe(e)?lr(ve(e)):{}}var ut="[object Map]";function ft(e){return de(e)&&ce(e)==ut}var Me=U&&U.isMap,dt=Me?le(Me):ft,st="[object Set]";function ct(e){return de(e)&&ce(e)==st}var Re=U&&U.isSet,lt=Re?le(Re):ct,ht=1,vt=2,pt=4,ln="[object Arguments]",bt="[object Array]",wt="[object Boolean]",gt="[object Date]",mt="[object Error]",hn="[object Function]",yt="[object GeneratorFunction]",xt="[object Map]",Ot="[object Number]",vn="[object Object]",Et="[object RegExp]",Tt="[object Set]",Pt="[object String]",Lt="[object Symbol]",Nt="[object WeakMap]",It="[object ArrayBuffer]",_t="[object DataView]",Ct="[object Float32Array]",At="[object Float64Array]",kt="[object Int8Array]",St="[object Int16Array]",jt="[object Int32Array]",Mt="[object Uint8Array]",Rt="[object Uint8ClampedArray]",$t="[object Uint16Array]",Ft="[object Uint32Array]",b={};b[ln]=b[bt]=b[It]=b[_t]=b[wt]=b[gt]=b[Ct]=b[At]=b[kt]=b[St]=b[jt]=b[xt]=b[Ot]=b[vn]=b[Et]=b[Tt]=b[Pt]=b[Lt]=b[Mt]=b[Rt]=b[$t]=b[Ft]=!0;b[mt]=b[hn]=b[Nt]=!1;function D(e,n,r,t,i,o){var a,u=n&ht,f=n&vt,d=n&pt;if(a!==void 0)return a;if(!O(e))return e;var s=N(e);if(s){if(a=Rr(e),!u)return an(e,a)}else{var l=ce(e),h=l==hn||l==yt;if(Je(e))return fn(e,u);if(l==vn||l==ln||h&&!i){if(a=f||h?{}:cn(e),!u)return f?kr(e,Ir(a,e)):Cr(e,Nr(a,e))}else{if(!b[l])return i?e:{};a=ot(e,l,u)}}o||(o=new Ze);var v=o.get(e);if(v)return v;o.set(e,a),lt(e)?e.forEach(function(m){a.add(D(m,n,r,m,e,o))}):dt(e)&&e.forEach(function(m,y){a.set(y,D(m,n,r,y,e,o))});var p=d?f?Sr:Vn:f?P:se,w=s?void 0:p(e);return Un(w||e,function(m,y){w&&(y=m,m=e[y]),z(a,y,D(m,n,r,y,e,o))}),a}var Bt=1,Gt=4;function Dt(e){return D(e,Bt|Gt)}var pn=Object.prototype,Yt=pn.hasOwnProperty,Ut=fe(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=P(o),u=-1,f=a.length;++u<f;){var d=a[u],s=e[d];(s===void 0||q(s,pn[d])&&!Yt.call(e,d))&&(e[d]=o[d])}return e});function ie(e,n,r){(r!==void 0&&!q(e[n],r)||r===void 0&&!(n in e))&&H(e,n,r)}function ae(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}function Vt(e){return $(e,P(e))}function Wt(e,n,r,t,i,o,a){var u=ae(e,r),f=ae(n,r),d=a.get(f);if(d){ie(e,r,d);return}var s=o?o(u,f,r+"",e,n,a):void 0,l=s===void 0;if(l){var h=N(f),v=!h&&Je(f),p=!h&&!v&&Wn(f);s=f,h||v||p?N(u)?s=u:qn(u)?s=an(u):v?(l=!1,s=fn(f,!0)):p?(l=!1,s=sn(f,!0)):s=[]:Lr(f)||Le(f)?(s=u,Le(u)?s=Vt(u):(!O(u)||Kn(u))&&(s=cn(f))):l=!1}l&&(a.set(f,s),i(s,f,t,o,a),a.delete(f)),ie(e,r,s)}function bn(e,n,r,t,i){e!==n&&Qe(n,function(o,a){if(i||(i=new Ze),O(o))Wt(e,n,a,r,bn,t,i);else{var u=t?t(ae(e,a),o,a+"",e,n,i):void 0;u===void 0&&(u=o),ie(e,a,u)}},P)}function V(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function qt(e){return function(n,r,t){var i=Object(n);if(!K(n)){var o=C(r);n=se(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var Kt=Math.max;function Xt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:cr(r);return i<0&&(i=Kt(t+i,0)),Xn(e,C(n),i)}var be=qt(Xt);function wn(e,n){var r=-1,t=K(e)?Array(e.length):[];return Hn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=N(e)?B:wn;return r(e,C(n))}function Ht(e,n){return e==null?e:Qe(e,en(n),P)}function zt(e,n){return e&&nn(e,en(n))}function Jt(e,n){return e>n}var Zt=Object.prototype,Qt=Zt.hasOwnProperty;function ei(e,n){return e!=null&&Qt.call(e,n)}function gn(e,n){return e!=null&&zn(e,n,ei)}function mn(e,n){return e<n}function J(e,n){var r={};return n=C(n),nn(e,function(t,i,o){H(r,i,n(t,i,o))}),r}function we(e,n,r){for(var t=-1,i=e.length;++t<i;){var o=e[t],a=n(o);if(a!=null&&(u===void 0?a===a&&!Y(a):r(a,u)))var u=a,f=o}return f}function T(e){return e&&e.length?we(e,he,Jt):void 0}var oe=pr(function(e,n,r){bn(e,n,r)});function j(e){return e&&e.length?we(e,he,mn):void 0}function ge(e,n){return e&&e.length?we(e,C(n),mn):void 0}function ni(e,n,r,t){if(!O(e))return e;n=rn(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var f=Jn(n[i]),d=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=a){var s=u[f];d=void 0,d===void 0&&(d=O(s)?s:Ke(n[i+1])?[]:{})}z(u,f,d),u=u[f]}return e}function ri(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=tn(e,a);r(u,a)&&ni(o,rn(a,e),u)}return o}function ti(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function ii(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=Y(e),a=n!==void 0,u=n===null,f=n===n,d=Y(n);if(!u&&!d&&!o&&e>n||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e<n||d&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!f)return-1}return 0}function ai(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var f=ii(i[t],o[t]);if(f){if(t>=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function oi(e,n,r){n.length?n=B(n,function(o){return N(o)?function(a){return tn(a,o.length===1?o[0]:o)}:o}):n=[he];var t=-1;n=B(n,le(C));var i=wn(e,function(o,a,u){var f=B(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return ti(i,function(o,a){return ai(o,a,r)})}function ui(e,n){return ri(e,n,function(r,t){return Zn(e,t)})}var W=yr(function(e,n){return e==null?{}:ui(e,n)}),fi=Math.ceil,di=Math.max;function si(e,n,r,t){for(var i=-1,o=di(fi((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function ci(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=G(n),r===void 0?(r=n,n=0):r=G(r),t=t===void 0?n<r?1:-1:G(t),si(n,r,t)}}var _=ci(),F=fe(function(e,n){if(e==null)return[];var r=n.length;return r>1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),oi(e,He(n),[])}),li=0;function me(e){var n=++li;return Qn(e)+n}function hi(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function vi(e,n){return hi(e||[],n||[],z)}class pi{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return $e(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&$e(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,bi)),t=t._prev;return"["+n.join(", ")+"]"}}function $e(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function bi(e,n){if(e!=="_next"&&e!=="_prev")return n}var wi=er(1);function gi(e,n){if(e.nodeCount()<=1)return[];var r=yi(e,n||wi),t=mi(r.graph,r.buckets,r.zeroIdx);return A(g(t,function(i){return e.outEdges(i.v,i.w)}))}function mi(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)Q(e,n,r,a);for(;a=i.dequeue();)Q(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(Q(e,n,r,a,!0));break}}}return t}function Q(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ue(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ue(n,r,d)}),e.removeNode(t.v),o}function yi(e,n){var r=new E,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=_(i+t+3).map(function(){return new pi}),a=t+1;return c(r.nodes(),function(u){ue(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ue(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function xi(e){var n=e.graph().acyclicer==="greedy"?gi(e,r(e)):Oi(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,me("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Oi(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function Ei(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function k(e,n,r,t){var i;do i=me(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Ti(e){var n=new E().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function yn(e){var n=new E({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Fe(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function Z(e){var n=g(_(xn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;x(i)||(n[i][t.order]=r)}),n}function Pi(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);gn(t,"rank")&&(t.rank-=n)})}function Li(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){x(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Be(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),k(e,"border",i,n)}function xn(e){return T(g(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ni(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ii(e,n){return n()}function _i(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)Ge(e,"borderLeft","_bl",r,i,o),Ge(e,"borderRight","_br",r,i,o)}}c(e.children(),n)}function Ge(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],f=k(e,"border",a,r);i[n][o]=f,e.setParent(f,t),u&&e.setEdge(u,f,{weight:1})}function Ci(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&On(e)}function Ai(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&ki(e),(n==="lr"||n==="rl")&&(Si(e),On(e))}function On(e){c(e.nodes(),function(n){De(e.node(n))}),c(e.edges(),function(n){De(e.edge(n))})}function De(e){var n=e.width;e.width=e.height,e.height=n}function ki(e){c(e.nodes(),function(n){ee(e.node(n))}),c(e.edges(),function(n){var r=e.edge(n);c(r.points,ee),Object.prototype.hasOwnProperty.call(r,"y")&&ee(r)})}function ee(e){e.y=-e.y}function Si(e){c(e.nodes(),function(n){ne(e.node(n))}),c(e.edges(),function(n){var r=e.edge(n);c(r.points,ne),Object.prototype.hasOwnProperty.call(r,"x")&&ne(r)})}function ne(e){var n=e.x;e.x=e.y,e.y=n}function ji(e){e.graph().dummyChains=[],c(e.edges(),function(n){Mi(e,n)})}function Mi(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),f=u.labelRank;if(o!==t+1){e.removeEdge(n);var d=void 0,s,l;for(l=0,++t;t<o;++l,++t)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},s=k(e,"edge",d,"_d"),t===f&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(r,s,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(s),r=s;e.setEdge(r,i,{weight:u.weight},a)}}function Ri(e){c(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function ye(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=j(g(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}c(e.sources(),r)}function M(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function En(e){var n=new E({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;$i(n,e)<t;)i=Fi(n,e),o=n.hasNode(i.v)?M(e,i):-M(e,i),Bi(n,e,o);return n}function $i(e,n){function r(t){c(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!M(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return c(e.nodes(),r),e.nodeCount()}function Fi(e,n){return ge(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return M(n,r)})}function Bi(e,n,r){c(e.nodes(),function(t){n.node(t).rank+=r})}function Gi(){}Gi.prototype=new Error;function Tn(e,n,r){N(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return c(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Pn(e,a,r==="post",o,t,i)}),i}function Pn(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),c(i(n),function(a){Pn(e,a,r,t,i,o)}),r&&o.push(n))}function Di(e,n){return Tn(e,n,"post")}function Yi(e,n){return Tn(e,n,"pre")}L.initLowLimValues=Oe;L.initCutValues=xe;L.calcCutValue=Ln;L.leaveEdge=In;L.enterEdge=_n;L.exchangeEdges=Cn;function L(e){e=Ti(e),ye(e);var n=En(e);Oe(n),xe(n,e);for(var r,t;r=In(n);)t=_n(n,e,r),Cn(n,e,r,t)}function xe(e,n){var r=Di(e,e.nodes());r=r.slice(0,r.length-1),c(r,function(t){Ui(e,n,t)})}function Ui(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Ln(e,n,r)}function Ln(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,c(n.nodeEdges(r),function(f){var d=f.v===r,s=d?f.w:f.v;if(s!==i){var l=d===o,h=n.edge(f).weight;if(u+=l?h:-h,Wi(e,r,s)){var v=e.edge(r,s).cutvalue;u+=l?-v:v}}}),u}function Oe(e,n){arguments.length<2&&(n=e.nodes()[0]),Nn(e,{},1,n)}function Nn(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,c(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=Nn(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function In(e){return be(e.edges(),function(n){return e.edge(n).cutvalue<0})}function _n(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,f=!1;o.lim>a.lim&&(u=a,f=!0);var d=R(n.edges(),function(s){return f===Ye(e,e.node(s.v),u)&&f!==Ye(e,e.node(s.w),u)});return ge(d,function(s){return M(n,s)})}function Cn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),Oe(e),xe(e,n),Vi(e,n)}function Vi(e,n){var r=be(e.nodes(),function(i){return!n.node(i).parent}),t=Yi(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Wi(e,n,r){return e.hasEdge(n,r)}function Ye(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function qi(e){switch(e.graph().ranker){case"network-simplex":Ue(e);break;case"tight-tree":Xi(e);break;case"longest-path":Ki(e);break;default:Ue(e)}}var Ki=ye;function Xi(e){ye(e),En(e)}function Ue(e){L(e)}function Hi(e){var n=k(e,"root",{},"_root"),r=zi(e),t=T(I(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Ji(e)+1;c(e.children(),function(a){An(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function An(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Be(e,"_bt"),d=Be(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){An(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,m=v!==p?1:i-o[a]+1;e.setEdge(f,v,{weight:w,minlen:m,nestingEdge:!0}),e.setEdge(p,d,{weight:w,minlen:m,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function zi(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Ji(e){return X(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Zi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Qi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function ea(e,n,r){var t=na(e),i=new E({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=x(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function na(e){for(var n;e.hasNode(n=me("_root")););return n}function ra(e,n){for(var r=0,t=1;t<n.length;++t)r+=ta(e,n[t-1],n[t]);return r}function ta(e,n,r){for(var t=vi(r,g(r,function(d,s){return s})),i=A(g(n,function(d){return F(g(e.outEdges(d),function(s){return{pos:t[s.w],weight:e.edge(s).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=g(new Array(a),function(){return 0}),f=0;return c(i.forEach(function(d){var s=d.pos+o;u[s]+=d.weight;for(var l=0;s>0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function ia(e){var n={},r=R(e.nodes(),function(u){return!e.children(u).length}),t=T(g(r,function(u){return e.node(u).rank})),i=g(_(t+1),function(){return[]});function o(u){if(!gn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=F(r,function(u){return e.node(u).rank});return c(a,o),i}function aa(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=X(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function oa(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};x(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!x(o)&&!x(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=R(r,function(i){return!i.indegree});return ua(t)}function ua(e){var n=[];function r(o){return function(a){a.merged||(x(a.barycenter)||x(o.barycenter)||a.barycenter>=o.barycenter)&&fa(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(R(n,function(o){return!o.merged}),function(o){return W(o,["vs","i","barycenter","weight"])})}function fa(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function da(e,n){var r=Ni(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=F(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(sa(!!n)),f=Ve(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=Ve(o,i,f)});var d={vs:A(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function Ve(e,n,r){for(var t;n.length&&(t=V(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function sa(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function kn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=R(i,function(p){return p!==a&&p!==u}));var d=aa(e,i);c(d,function(p){if(e.children(p.v).length){var w=kn(e,p.v,r,t);f[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&la(p,w)}});var s=oa(d,r);ca(s,f);var l=da(s,t);if(a&&(l.vs=A([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function ca(e,n){c(e,function(r){r.vs=A(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function la(e,n){x(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ha(e){var n=xn(e),r=We(e,_(1,n+1),"inEdges"),t=We(e,_(n-1,-1,-1),"outEdges"),i=ia(e);qe(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){va(u%2?r:t,u%4>=2),i=Z(e);var d=ra(e,i);d<o&&(f=0,a=Dt(i),o=d)}qe(e,a)}function We(e,n,r){return g(n,function(t){return ea(e,t,r)})}function va(e,n){var r=new E;c(e,function(t){var i=t.graph().root,o=kn(t,i,r,n);c(o.vs,function(a,u){t.node(a).order=u}),Qi(t,r,o.vs)})}function qe(e,n){c(n,function(r){c(r,function(t,i){e.node(t).order=i})})}function pa(e){var n=wa(e);c(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=ba(e,n,i.v,i.w),a=o.path,u=o.lca,f=0,d=a[f],s=!0;r!==i.w;){if(t=e.node(r),s){for(;(d=a[f])!==u&&e.node(d).maxRank<t.rank;)f++;d===u&&(s=!1)}if(!s){for(;f<a.length-1&&e.node(d=a[f+1]).minRank<=t.rank;)f++;d=a[f]}e.setParent(r,d),r=e.successors(r)[0]}})}function ba(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),f,d;f=r;do f=e.parent(f),i.push(f);while(f&&(n[f].low>a||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function wa(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function ga(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=V(o);return c(o,function(s,l){var h=ya(e,s),v=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(p){c(e.predecessors(p),function(w){var m=e.node(w),y=m.order;(y<a||v<y)&&!(m.dummy&&e.node(p).dummy)&&Sn(r,w,p)})}),u=l+1,a=v)}),o}return X(n,t),r}function ma(e,n){var r={};function t(o,a,u,f,d){var s;c(_(a,u),function(l){s=o[l],e.node(s).dummy&&c(e.predecessors(s),function(h){var v=e.node(h);v.dummy&&(v.order<f||v.order>d)&&Sn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return X(n,i),r}function ya(e,n){if(e.node(n).dummy)return be(e.predecessors(n),function(r){return e.node(r).dummy})}function Sn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function xa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Oa(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=F(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=s[h];o[d]===d&&f<a[p]&&!xa(r,d,p)&&(o[p]=d,o[d]=i[d]=i[p],f=a[p])}}})}),{root:i,align:o}}function Ea(e,n,r,t,i){var o={},a=Ta(e,n,r,i),u=i?"borderLeft":"borderRight";function f(l,h){for(var v=a.nodes(),p=v.pop(),w={};p;)w[p]?l(p):(w[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function d(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function s(l){var h=a.outEdges(l).reduce(function(p,w){return Math.min(p,o[w.w]-a.edge(w))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return f(d,a.predecessors.bind(a)),f(s,a.successors.bind(a)),c(t,function(l){o[l]=o[r[l]]}),o}function Ta(e,n,r,t){var i=new E,o=e.graph(),a=_a(o.nodesep,o.edgesep,t);return c(n,function(u){var f;c(u,function(d){var s=r[d];if(i.setNode(s),f){var l=r[f],h=i.edge(l,s);i.setEdge(l,s,Math.max(a(e,d,f),h||0))}f=d})}),i}function Pa(e,n){return ge(I(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ht(r,function(o,a){var u=Ca(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function La(e,n){var r=I(n),t=j(r),i=T(r);c(["u","d"],function(o){c(["l","r"],function(a){var u=o+a,f=e[u],d;if(f!==n){var s=I(f);d=a==="l"?t-j(s):i-T(s),d&&(e[u]=J(f,function(l){return l+d}))}})})}function Na(e,n){return J(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=F(g(e,t));return(i[1]+i[2])/2})}function Ia(e){var n=Z(e),r=oe(ga(e,n),ma(e,n)),t={},i;c(["u","d"],function(a){i=a==="u"?n:I(n).reverse(),c(["l","r"],function(u){u==="r"&&(i=g(i,function(l){return I(l).reverse()}));var f=(a==="u"?e.predecessors:e.successors).bind(e),d=Oa(e,i,r,f),s=Ea(e,i,d.root,d.align,u==="r");u==="r"&&(s=J(s,function(l){return-l})),t[a+u]=s})});var o=Pa(e,t);return La(t,o),Na(t,e.graph().align)}function _a(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),f=0,d;if(f+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":d=-a.width/2;break;case"r":d=a.width/2;break}if(d&&(f+=r?d:-d),d=0,f+=(a.dummy?n:e)/2,f+=(u.dummy?n:e)/2,f+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":d=u.width/2;break;case"r":d=-u.width/2;break}return d&&(f+=r?d:-d),d=0,f}}function Ca(e,n){return e.node(n).width}function Aa(e){e=yn(e),ka(e),zt(Ia(e),function(n,r){e.node(r).x=n})}function ka(e){var n=Z(e),r=e.graph().ranksep,t=0;c(n,function(i){var o=T(g(i,function(a){return e.node(a).height}));c(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function to(e,n){var r=Ii;r("layout",()=>{var t=r(" buildLayoutGraph",()=>Ua(e));r(" runLayout",()=>Sa(t,r)),r(" updateInputGraph",()=>ja(e,t))})}function Sa(e,n){n(" makeSpaceForEdgeLabels",()=>Va(e)),n(" removeSelfEdges",()=>Qa(e)),n(" acyclic",()=>xi(e)),n(" nestingGraph.run",()=>Hi(e)),n(" rank",()=>qi(yn(e))),n(" injectEdgeLabelProxies",()=>Wa(e)),n(" removeEmptyRanks",()=>Li(e)),n(" nestingGraph.cleanup",()=>Zi(e)),n(" normalizeRanks",()=>Pi(e)),n(" assignRankMinMax",()=>qa(e)),n(" removeEdgeLabelProxies",()=>Ka(e)),n(" normalize.run",()=>ji(e)),n(" parentDummyChains",()=>pa(e)),n(" addBorderSegments",()=>_i(e)),n(" order",()=>ha(e)),n(" insertSelfEdges",()=>eo(e)),n(" adjustCoordinateSystem",()=>Ci(e)),n(" position",()=>Aa(e)),n(" positionSelfEdges",()=>no(e)),n(" removeBorderNodes",()=>Za(e)),n(" normalize.undo",()=>Ri(e)),n(" fixupEdgeLabelCoords",()=>za(e)),n(" undoCoordinateSystem",()=>Ai(e)),n(" translateGraph",()=>Xa(e)),n(" assignNodeIntersects",()=>Ha(e)),n(" reversePoints",()=>Ja(e)),n(" acyclic.undo",()=>Ei(e))}function ja(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ma=["nodesep","edgesep","ranksep","marginx","marginy"],Ra={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$a=["acyclicer","ranker","rankdir","align"],Fa=["width","height"],Ba={width:0,height:0},Ga=["minlen","weight","width","height","labeloffset"],Da={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ya=["labelpos"];function Ua(e){var n=new E({multigraph:!0,compound:!0}),r=te(e.graph());return n.setGraph(oe({},Ra,re(r,Ma),W(r,$a))),c(e.nodes(),function(t){var i=te(e.node(t));n.setNode(t,Ut(re(i,Fa),Ba)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=te(e.edge(t));n.setEdge(t,oe({},Da,re(i,Ga),W(i,Ya)))}),n}function Va(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Wa(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};k(e,"edge-proxy",o,"_ep")}})}function qa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=T(n,t.maxRank))}),e.graph().maxRank=n}function Ka(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Xa(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,v=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Ha(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Fe(t,o)),r.points.push(Fe(i,a))})}function za(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ja(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Za(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(V(r.borderLeft)),a=e.node(V(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Qa(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function eo(e){var n=Z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){k(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function no(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function re(e,n){return J(W(e,n),Number)}function te(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{D as b,to as l,g as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b8 as y,b9 as b}from"./index-ByxguSZe.js";import{i as A}from"./init-Gi6I4Gst.js";import{e as M,f as R,a as q,b as F}from"./defaultLocale-DX6XiGOO.js";function S(n,r){return n=+n,r=+r,function(i){return Math.round(n*(1-i)+r*i)}}function g(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function z(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function w(n){let r,i,t;n.length!==2?(r=g,i=(u,o)=>g(n(u),o),t=(u,o)=>n(u)-o):(r=n===g||n===z?n:I,i=n,t=n);function f(u,o,e=0,m=u.length){if(e<m){if(r(o,o)!==0)return m;do{const l=e+m>>>1;i(u[l],o)<0?e=l+1:m=l}while(e<m)}return e}function c(u,o,e=0,m=u.length){if(e<m){if(r(o,o)!==0)return m;do{const l=e+m>>>1;i(u[l],o)<=0?e=l+1:m=l}while(e<m)}return e}function a(u,o,e=0,m=u.length){const l=f(u,o,e,m-1);return l>e&&t(u[l-1],o)>-t(u[l],o)?l-1:l}return{left:f,center:a,right:c}}function I(){return 0}function P(n){return n===null?NaN:+n}const $=w(g),j=$.right;w(P).center;const x=Math.sqrt(50),B=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,i){const t=(r-n)/Math.max(0,i),f=Math.floor(Math.log10(t)),c=t/Math.pow(10,f),a=c>=x?10:c>=B?5:c>=C?2:1;let u,o,e;return f<0?(e=Math.pow(10,-f)/a,u=Math.round(n*e),o=Math.round(r*e),u/e<n&&++u,o/e>r&&--o,e=-e):(e=Math.pow(10,f)*a,u=Math.round(n/e),o=Math.round(r/e),u*e<n&&++u,o*e>r&&--o),o<u&&.5<=i&&i<2?v(n,r,i*2):[u,o,e]}function D(n,r,i){if(r=+r,n=+n,i=+i,!(i>0))return[];if(n===r)return[n];const t=r<n,[f,c,a]=t?v(r,n,i):v(n,r,i);if(!(c>=f))return[];const u=c-f+1,o=new Array(u);if(t)if(a<0)for(let e=0;e<u;++e)o[e]=(c-e)/-a;else for(let e=0;e<u;++e)o[e]=(c-e)*a;else if(a<0)for(let e=0;e<u;++e)o[e]=(f+e)/-a;else for(let e=0;e<u;++e)o[e]=(f+e)*a;return o}function d(n,r,i){return r=+r,n=+n,i=+i,v(n,r,i)[2]}function E(n,r,i){r=+r,n=+n,i=+i;const t=r<n,f=t?d(r,n,i):d(n,r,i);return(t?-1:1)*(f<0?1/-f:f)}function G(n){return Math.max(0,-M(Math.abs(n)))}function H(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(r)/3)))*3-M(Math.abs(n)))}function J(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,M(r)-M(n))+1}function K(n){return function(){return n}}function L(n){return+n}var N=[0,1];function s(n){return n}function p(n,r){return(r-=n=+n)?function(i){return(i-n)/r}:K(isNaN(r)?NaN:.5)}function O(n,r){var i;return n>r&&(i=n,n=r,r=i),function(t){return Math.max(n,Math.min(r,t))}}function Q(n,r,i){var t=n[0],f=n[1],c=r[0],a=r[1];return f<t?(t=p(f,t),c=i(a,c)):(t=p(t,f),c=i(c,a)),function(u){return c(t(u))}}function T(n,r,i){var t=Math.min(n.length,r.length)-1,f=new Array(t),c=new Array(t),a=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<t;)f[a]=p(n[a],n[a+1]),c[a]=i(r[a],r[a+1]);return function(u){var o=j(n,u,1,t)-1;return c[o](f[o](u))}}function U(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function V(){var n=N,r=N,i=b,t,f,c,a=s,u,o,e;function m(){var h=Math.min(n.length,r.length);return a!==s&&(a=O(n[0],n[h-1])),u=h>2?T:Q,o=e=null,l}function l(h){return h==null||isNaN(h=+h)?c:(o||(o=u(n.map(t),r,i)))(t(a(h)))}return l.invert=function(h){return a(f((e||(e=u(r,n.map(t),y)))(h)))},l.domain=function(h){return arguments.length?(n=Array.from(h,L),m()):n.slice()},l.range=function(h){return arguments.length?(r=Array.from(h),m()):r.slice()},l.rangeRound=function(h){return r=Array.from(h),i=S,m()},l.clamp=function(h){return arguments.length?(a=h?!0:s,m()):a!==s},l.interpolate=function(h){return arguments.length?(i=h,m()):i},l.unknown=function(h){return arguments.length?(c=h,l):c},function(h,k){return t=h,f=k,m()}}function W(){return V()(s,s)}function X(n,r,i,t){var f=E(n,r,i),c;switch(t=R(t??",f"),t.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return t.precision==null&&!isNaN(c=H(f,a))&&(t.precision=c),q(t,a)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(c=J(f,Math.max(Math.abs(n),Math.abs(r))))&&(t.precision=c-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(c=G(f))&&(t.precision=c-(t.type==="%")*2);break}}return F(t)}function Y(n){var r=n.domain;return n.ticks=function(i){var t=r();return D(t[0],t[t.length-1],i??10)},n.tickFormat=function(i,t){var f=r();return X(f[0],f[f.length-1],i??10,t)},n.nice=function(i){i==null&&(i=10);var t=r(),f=0,c=t.length-1,a=t[f],u=t[c],o,e,m=10;for(u<a&&(e=a,a=u,u=e,e=f,f=c,c=e);m-- >0;){if(e=d(a,u,i),e===o)return t[f]=a,t[c]=u,r(t);if(e>0)a=Math.floor(a/e)*e,u=Math.ceil(u/e)*e;else if(e<0)a=Math.ceil(a*e)/e,u=Math.floor(u*e)/e;else break;o=e}return n},n}function Z(){var n=W();return n.copy=function(){return U(n,Z())},A.apply(n,arguments),Y(n)}export{U as a,w as b,W as c,Z as l,E as t};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import{g as oe}from"./chunk-55IACEB6-D9Xhxp_r.js";import{s as ce}from"./chunk-2J33WTMH-BE8P9tjh.js";import{_ as h,l as R,o as le,r as he,D as de,G as W,c as U,i as H,b3 as ge,V as ue,W as pe,X as fe}from"./index-ByxguSZe.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function me(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const ye=new Uint8Array(16);function Ee(){return crypto.getRandomValues(ye)}function _e(t,e,o){return crypto.randomUUID?crypto.randomUUID():be(t)}function be(t,e,o){var n;t=t||{};const l=t.random??((n=t.rng)==null?void 0:n.call(t))??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,me(l)}var K=(function(){var t=h(function(O,s,i,a){for(i=i||{},a=O.length;a--;i[O[a]]=s);return i},"o"),e=[1,4],o=[1,13],l=[1,12],n=[1,15],d=[1,16],p=[1,20],y=[1,19],E=[6,7,8],k=[1,26],L=[1,24],D=[1,25],b=[6,7,11],$=[1,6,13,15,16,19,22],f=[1,33],B=[1,34],P=[1,6,7,11,13,15,16,19,22],X={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,i,a,c,u,r,M){var g=r.length-1;switch(u){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[g].id),c.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:c.getLogger().trace("Icon: ",r[g]),c.decorateNode({icon:r[g]});break;case 17:case 21:c.decorateNode({class:r[g]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[g].id),c.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:c.decorateNode({icon:r[g]});break;case 25:c.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:c.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:c.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:o,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:o,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:k,7:L,10:23,11:D},t(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),t(b,[2,18]),t(b,[2,19]),t(b,[2,20]),t(b,[2,21]),t(b,[2,23]),t(b,[2,24]),t(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:L,10:32,11:D},{1:[2,7],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t($,[2,14],{7:f,11:B}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(b,[2,15]),t(b,[2,16]),t(b,[2,17]),{20:[1,35]},{21:[1,36]},t($,[2,13],{7:f,11:B}),t(P,[2,11]),t(P,[2,12]),{21:[1,37]},t(b,[2,25]),t(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=i,a}},"parseError"),parse:h(function(s){var i=this,a=[0],c=[],u=[null],r=[],M=this.table,g="",F=0,Q=0,ie=2,Z=1,se=r.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(C.yy[z]=this.yy[z]);m.setInput(s,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Y=m.yylloc;r.push(Y);var re=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(x){a.length=a.length-2*x,u.length=u.length-x,r.length=r.length-x}h(ae,"popStack");function ee(){var x;return x=c.pop()||m.lex()||Z,typeof x!="number"&&(x instanceof Array&&(c=x,x=c.pop()),x=i.symbols_[x]||x),x}h(ee,"lex");for(var S,I,N,q,w={},G,v,te,j;;){if(I=a[a.length-1],this.defaultActions[I]?N=this.defaultActions[I]:((S===null||typeof S>"u")&&(S=ee()),N=M[I]&&M[I][S]),typeof N>"u"||!N.length||!N[0]){var J="";j=[];for(G in M[I])this.terminals_[G]&&G>ie&&j.push("'"+this.terminals_[G]+"'");m.showPosition?J="Parse error on line "+(F+1)+`:
|
|
2
|
+
`+m.showPosition()+`
|
|
3
|
+
Expecting `+j.join(", ")+", got '"+(this.terminals_[S]||S)+"'":J="Parse error on line "+(F+1)+": Unexpected "+(S==Z?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(J,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:Y,expected:j})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+S);switch(N[0]){case 1:a.push(S),u.push(m.yytext),r.push(m.yylloc),a.push(N[1]),S=null,Q=m.yyleng,g=m.yytext,F=m.yylineno,Y=m.yylloc;break;case 2:if(v=this.productions_[N[1]][1],w.$=u[u.length-v],w._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},re&&(w._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),q=this.performAction.apply(w,[g,Q,F,C.yy,N[1],u,r].concat(se)),typeof q<"u")return q;v&&(a=a.slice(0,-1*v*2),u=u.slice(0,-1*v),r=r.slice(0,-1*v)),a.push(this.productions_[N[1]][0]),u.push(w.$),r.push(w._$),te=M[a[a.length-2]][a[a.length-1]],a.push(te);break;case 3:return!0}}return!0},"parse")},ne=(function(){var O={EOF:1,parseError:h(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,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:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:h(function(s){var i=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+i+"^"},"showPosition"),test_match:h(function(s,i){var a,c,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in u)this[r]=u[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,a,c;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),r=0;r<u.length;r++)if(a=this._input.match(this.rules[u[r]]),a&&(!i||a[0].length>i[0].length)){if(i=a,c=r,this.options.backtrack_lexer){if(s=this.test_match(a,u[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,u[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,a,c,u){switch(c){case 0:return i.getLogger().trace("Found comment",a.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",a.yytext),20;case 36:return i.getLogger().trace("Long description:",a.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return O})();X.lexer=ne;function V(){this.yy={}}return h(V,"Parser"),V.prototype=X,X.Parser=V,new V})();K.parser=K;var ke=K,Se=12,T={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},A,xe=(A=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=T,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let o=this.nodes.length-1;o>=0;o--)if(this.nodes[o].level<e)return this.nodes[o];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,o,l,n){var L,D;R.info("addNode",e,o,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const p=U();let y=((L=p.mindmap)==null?void 0:L.padding)??W.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:H(o,p),level:e,descr:H(l,p),type:n,children:[],width:((D=p.mindmap)==null?void 0:D.maxNodeWidth)??W.mindmap.maxNodeWidth,padding:y,isRoot:d},k=this.getParent(e);if(k)k.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,o){switch(R.debug("In get type",e,o),e){case"[":return this.nodeType.RECT;case"(":return o===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,o){this.elements[e]=o}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const o=U(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=H(e.icon,o)),e.class&&(l.class=H(e.class,o))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,o){if(e.level===0?e.section=void 0:e.section=o,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Se-1):o;this.assignSections(n,d)}}flattenNodes(e,o){const l=U(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),p=h(E=>{var D;const L=(((D=l.theme)==null?void 0:D.toLowerCase())??"").includes("redux");switch(E){case T.CIRCLE:return"mindmapCircle";case T.RECT:return"rect";case T.ROUNDED_RECT:return"rounded";case T.CLOUD:return"cloud";case T.BANG:return"bang";case T.HEXAGON:return"hexagon";case T.DEFAULT:return L?"rounded":"defaultMindmapNode";case T.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:p(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(o.push(y),e.children)for(const E of e.children)this.flattenNodes(E,o)}generateEdges(e,o){if(!e.children)return;const l=U();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const p=e.level+1;d+=` edge-depth-${p}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};o.push(y),this.generateEdges(n,o)}}getData(){const e=this.getMindmap(),o=U(),n=ge().layout!==void 0,d=o;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};R.debug("getData: mindmapRoot",e,o),this.assignSections(e);const p=[],y=[];this.flattenNodes(e,p),this.generateEdges(e,y),R.debug(`getData: processed ${p.length} nodes and ${y.length} edges`);const E=new Map;for(const k of p)E.set(k.id,{shape:k.shape,width:k.width,height:k.height,padding:k.padding});return{nodes:p,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+_e()}}getLogger(){return R}},h(A,"MindmapDB"),A),Ne=h(async(t,e,o,l)=>{var b,$;R.debug(`Rendering mindmap diagram
|
|
7
|
+
`+t);const n=l.db,d=n.getData(),p=oe(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=le(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(f=>{f.shape==="rounded"?(f.radius=15,f.taper=15,f.stroke="none",f.width=0,f.padding=15):f.shape==="circle"?f.padding=10:f.shape==="rect"?(f.width=0,f.padding=10):f.shape==="hexagon"&&(f.width=0,f.height=0)}),await he(d,p);const{themeVariables:E}=de(),{useGradient:k,gradientStart:L,gradientStop:D}=E;if(k&&L&&D){const f=p.attr("id"),B=p.append("defs").append("linearGradient").attr("id",`${f}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",L).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",D).attr("stop-opacity",1)}ce(p,((b=d.config.mindmap)==null?void 0:b.padding)??W.mindmap.padding,"mindmapDiagram",(($=d.config.mindmap)==null?void 0:$.useMaxWidth)??W.mindmap.useMaxWidth)},"draw"),De={draw:Ne},Le=h(t=>{const{theme:e,look:o}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],ue(t["lineColor"+n])?t["lineColor"+n]=pe(t["lineColor"+n],20):t["lineColor"+n]=fe(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(o==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
|
|
8
|
+
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
|
|
9
|
+
fill: ${t["cScale"+n]};
|
|
10
|
+
}
|
|
11
|
+
.section-${n-1} text {
|
|
12
|
+
fill: ${t["cScaleLabel"+n]};
|
|
13
|
+
}
|
|
14
|
+
.section-${n-1} span {
|
|
15
|
+
color: ${t["cScaleLabel"+n]};
|
|
16
|
+
}
|
|
17
|
+
.node-icon-${n-1} {
|
|
18
|
+
font-size: 40px;
|
|
19
|
+
color: ${t["cScaleLabel"+n]};
|
|
20
|
+
}
|
|
21
|
+
.section-edge-${n-1}{
|
|
22
|
+
stroke: ${t["cScale"+n]};
|
|
23
|
+
}
|
|
24
|
+
.edge-depth-${n-1}{
|
|
25
|
+
stroke-width: ${d};
|
|
26
|
+
}
|
|
27
|
+
.section-${n-1} line {
|
|
28
|
+
stroke: ${t["cScaleInv"+n]} ;
|
|
29
|
+
stroke-width: 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
[data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
|
|
39
|
+
fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+n]};
|
|
40
|
+
stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+n]};
|
|
41
|
+
stroke-width: ${t.strokeWidth??2}px;
|
|
42
|
+
}
|
|
43
|
+
[data-look="neo"].section-edge-${n-1}{
|
|
44
|
+
stroke: ${e!=null&&e.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
|
|
45
|
+
}
|
|
46
|
+
[data-look="neo"].mindmap-node.section-${n-1} text {
|
|
47
|
+
fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
|
|
48
|
+
}
|
|
49
|
+
`}return l},"genSections"),ve=h((t,e,o)=>{let l="";for(let n=0;n<t;n++)l+=`
|
|
50
|
+
[data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
|
|
51
|
+
stroke: url(${e}-gradient);
|
|
52
|
+
fill: ${o};
|
|
53
|
+
}
|
|
54
|
+
.section-${n-1} line {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
}`;return l},"genGradient"),Te=h(t=>{const{theme:e}=t,o=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none";return`
|
|
57
|
+
.edge {
|
|
58
|
+
stroke-width: 3;
|
|
59
|
+
}
|
|
60
|
+
${Le(t)}
|
|
61
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
62
|
+
fill: ${t.git0};
|
|
63
|
+
}
|
|
64
|
+
.section-root text {
|
|
65
|
+
fill: ${t.gitBranchLabel0};
|
|
66
|
+
}
|
|
67
|
+
.section-root span {
|
|
68
|
+
color: ${e!=null&&e.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
|
|
69
|
+
}
|
|
70
|
+
.icon-container {
|
|
71
|
+
height:100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
.edge {
|
|
77
|
+
fill: none;
|
|
78
|
+
}
|
|
79
|
+
.mindmap-node-label {
|
|
80
|
+
dy: 1em;
|
|
81
|
+
alignment-baseline: middle;
|
|
82
|
+
text-anchor: middle;
|
|
83
|
+
dominant-baseline: middle;
|
|
84
|
+
text-align: center;
|
|
85
|
+
}
|
|
86
|
+
[data-look="neo"].mindmap-node {
|
|
87
|
+
filter: ${l};
|
|
88
|
+
}
|
|
89
|
+
[data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
|
|
90
|
+
fill: ${e!=null&&e.includes("redux")?t.mainBkg:t.git0};
|
|
91
|
+
}
|
|
92
|
+
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
|
93
|
+
fill: ${e!=null&&e.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
|
|
94
|
+
}
|
|
95
|
+
${t.useGradient&&o&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,o,t.mainBkg):""}
|
|
96
|
+
`},"getStyles"),Oe=Te,Re={get db(){return new xe},renderer:De,parser:ke,styles:Oe};export{Re as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a}from"./init-Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{ab as S,a3 as R,b2 as Q,g as Y,s as tt,a as et,b as at,q as rt,p as nt,_ as p,l as z,c as it,F as st,I as lt,N as ot,e as ct,z as ut,G as pt}from"./index-ByxguSZe.js";import{p as gt}from"./chunk-4BX2VUAB-Bi7oLGF5.js";import{p as dt}from"./wardley-L42UT6IY-B-LdKtrI.js";import{d as _}from"./arc-4YUHkXo3.js";import{o as ft}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function ht(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function mt(t){return t}function vt(){var t=mt,a=ht,f=null,y=S(0),s=S(R),g=S(0);function l(e){var n,o=(e=Q(e)).length,d,h,v=0,c=new Array(o),i=new Array(o),x=+y.apply(this,arguments),w=Math.min(R,Math.max(-R,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/o,g.apply(this,arguments)),$=D*(w<0?-1:1),u;for(n=0;n<o;++n)(u=i[c[n]=n]=+t(e[n],n,e))>0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),n=0,h=v?(w-o*$)/v:0;n<o;++n,x=m)d=c[n],u=i[d],m=x+(u>0?u*h:0)+$,i[d]={data:e[d],index:n,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return l.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),l):t},l.sortValues=function(e){return arguments.length?(a=e,f=null,l):a},l.sort=function(e){return arguments.length?(f=e,a=null,l):f},l.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),l):y},l.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),l):s},l.padAngle=function(e){return arguments.length?(g=typeof e=="function"?e:S(+e),l):g},l}var xt=pt.pie,F={sections:new Map,showData:!1},T=F.sections,W=F.showData,St=structuredClone(xt),yt=p(()=>structuredClone(St),"getConfig"),wt=p(()=>{T=new Map,W=F.showData,ut()},"clear"),At=p(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=p(()=>T,"getSections"),Dt=p(t=>{W=t},"setShowData"),$t=p(()=>W,"getShowData"),V={getConfig:yt,clear:wt,setDiagramTitle:nt,getDiagramTitle:rt,setAccTitle:at,getAccTitle:et,setAccDescription:tt,getAccDescription:Y,addSection:At,getSections:Ct,setShowData:Dt,getShowData:$t},Tt=p((t,a)=>{gt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),bt={parse:p(async t=>{const a=await dt("pie",t);z.debug(a),Tt(a,V)},"parse")},kt=p(t=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${t.pieStrokeColor};
|
|
4
|
+
stroke-width : ${t.pieStrokeWidth};
|
|
5
|
+
opacity : ${t.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${t.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${t.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${t.pieTitleTextSize};
|
|
15
|
+
fill: ${t.pieTitleTextColor};
|
|
16
|
+
font-family: ${t.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${t.fontFamily};
|
|
20
|
+
fill: ${t.pieSectionTextColor};
|
|
21
|
+
font-size:${t.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${t.pieLegendTextColor};
|
|
26
|
+
font-family: ${t.fontFamily};
|
|
27
|
+
font-size: ${t.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),Et=kt,Mt=p(t=>{const a=[...t.values()].reduce((s,g)=>s+g,0),f=[...t.entries()].map(([s,g])=>({label:s,value:g})).filter(s=>s.value/a*100>=1);return vt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Rt=p((t,a,f,y)=>{var O;z.debug(`rendering pie chart
|
|
30
|
+
`+t);const s=y.db,g=it(),l=st(s.getConfig(),g.pie),e=40,n=18,o=4,d=450,h=d,v=lt(a),c=v.append("g");c.attr("transform","translate("+h/2+","+d/2+")");const{themeVariables:i}=g;let[x]=ot(i.pieOuterStrokeWidth);x??(x=2);const w=l.textPosition,m=Math.min(h,d)/2-e,D=_().innerRadius(0).outerRadius(m),$=_().innerRadius(m*w).outerRadius(m*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=Mt(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;u.forEach(r=>{b+=r});const G=A.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),k=ft(C).domain([...u.keys()]);c.selectAll("mySlices").data(G).enter().append("path").attr("d",D).attr("fill",r=>k(r.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(G).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice");const U=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),N=[...u.entries()].map(([r,M])=>({label:r,value:M})),E=c.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const P=n+o,H=P*N.length/2,J=12*n,K=M*P-H;return"translate("+J+","+K+")"});E.append("rect").attr("width",n).attr("height",n).style("fill",r=>k(r.label)).style("stroke",r=>k(r.label)),E.append("text").attr("x",n+o).attr("y",n-o).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const j=Math.max(...E.selectAll("text").nodes().map(r=>(r==null?void 0:r.getBoundingClientRect().width)??0)),q=h+e+n+o+j,L=((O=U.node())==null?void 0:O.getBoundingClientRect().width)??0,X=h/2-L/2,Z=h/2+L/2,B=Math.min(0,X),I=Math.max(q,Z)-B;v.attr("viewBox",`${B} 0 ${I} ${d}`),ct(v,d,I,l.useMaxWidth)},"draw"),zt={draw:Rt},Ot={parser:bt,db:V,renderer:zt,styles:Et};export{Ot as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as wt,l as At,d as zt,e as Ce,z as Le,G as z,i as Ee,K as De}from"./index-ByxguSZe.js";import{l as ie}from"./linear-BNEtUH2J.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Vt=(function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:H,10:q,12:m,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",mt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>me&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(mt+1)+`:
|
|
2
|
+
`+D.showPosition()+`
|
|
3
|
+
Expecting `+St.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Dt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Lt,expected:St})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+B);switch(W[0]){case 1:g.push(B),A.push(D.yytext),e.push(D.yylloc),g.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,mt=D.yylineno,Lt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],lt.$=A[A.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Jt,mt,K.yy,W[1],A,e].concat(be)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[W[1]][0]),A.push(lt.$),e.push(lt._$),ee=pt[g[g.length-2]][g[g.length-1]],g.push(ee);break;case 3:return!0}}return!0},"parse")},qe=(function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,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:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=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 A=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===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:o(function(r,l){var g,f,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),f=r[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in A)this[e]=A[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,g,f;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),e=0;e<A.length;e++)if(g=this._input.match(this.rules[A[e]]),g&&(!l||g[0].length>l[0].length)){if(l=g,f=e,this.options.backtrack_lexer){if(r=this.test_match(g,A[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,A[f]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,g,f,A){switch(f){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return j})();vt.lexer=qe;function qt(){this.yy={}}return o(qt,"Parser"),qt.prototype=vt,vt.Parser=qt,new qt})();Vt.parser=Vt;var ze=Vt,I=De(),ht,Ve=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,u,c,h,p,y,S,a,k,d,T,q,m,b,x,_,Y,G;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=z.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((u=z.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=z.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((h=z.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((p=z.quadrantChart)==null?void 0:p.quadrantPadding)||5,xAxisLabelPadding:((y=z.quadrantChart)==null?void 0:y.xAxisLabelPadding)||5,yAxisLabelPadding:((S=z.quadrantChart)==null?void 0:S.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=z.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((k=z.quadrantChart)==null?void 0:k.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=z.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((T=z.quadrantChart)==null?void 0:T.quadrantTextTopPadding)||5,pointTextPadding:((q=z.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((m=z.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((b=z.quadrantChart)==null?void 0:b.pointRadius)||5,xAxisPosition:((x=z.quadrantChart)==null?void 0:x.xAxisPosition)||"top",yAxisPosition:((_=z.quadrantChart)==null?void 0:_.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=z.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((G=z.quadrantChart)==null?void 0:G.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,u){this.classes.set(n,u)}setConfig(n){At.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){At.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,u,c,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&u?p:0,bottom:n==="bottom"&&u?p:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?S:0,right:this.config.yAxisPosition==="right"&&c?S:0},k=this.config.titleFontSize+this.config.titlePadding*2,d={top:h?k:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-d.top,x=m/2,_=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:d,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:x,quadrantHeight:b,quadrantHalfHeight:_}}}getAxisLabels(n,u,c,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:S,quadrantHeight:a,quadrantLeft:k,quadrantHalfWidth:d,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,x=[];return this.data.xAxisLeftText&&u&&x.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&x.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+d+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&x.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+a-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&x.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+S-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),x}getQuadrants(n){const{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=u,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant4Fill}];for(const a of S)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return S}getQuadrantPoints(n){const{quadrantSpace:u}=n,{quadrantHeight:c,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=u,S=ie().domain([0,1]).range([h,y+h]),a=ie().domain([0,1]).range([c+p,p]);return this.data.points.map(d=>{const T=this.classes.get(d.className);return T&&(d={...T,...d}),{x:S(d.x),y:a(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:S(d.x),y:a(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(n){const u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:a,quadrantWidth:k}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a,x2:y+k+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+k,y1:a+u,x2:y+k,y2:a+p-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a+p,x2:y+k+u,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+u,x2:y,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:a+u,x2:y+S,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+u,y1:a+h,x2:y+k-u,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,u,c);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,u,p),borderLines:this.getBorders(p),title:this.getTitle(c)}}},o(ht,"QuadrantBuilder"),ht),ct,_t=(ct=class extends Error{constructor(n,u,c){super(`value for ${n} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},o(ct,"InvalidStyleError"),ct);function It(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(It,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}o(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}o(se,"validateSizeInPixels");var Ie=wt();function O(t){return Ee(t.trim(),Ie)}o(O,"textSanitizer");var V=new Ve;function re(t){V.setData({quadrant1Text:O(t.text)})}o(re,"setQuadrant1Text");function oe(t){V.setData({quadrant2Text:O(t.text)})}o(oe,"setQuadrant2Text");function le(t){V.setData({quadrant3Text:O(t.text)})}o(le,"setQuadrant3Text");function he(t){V.setData({quadrant4Text:O(t.text)})}o(he,"setQuadrant4Text");function ce(t){V.setData({xAxisLeftText:O(t.text)})}o(ce,"setXAxisLeftText");function de(t){V.setData({xAxisRightText:O(t.text)})}o(de,"setXAxisRightText");function ue(t){V.setData({yAxisTopText:O(t.text)})}o(ue,"setYAxisTopText");function xe(t){V.setData({yAxisBottomText:O(t.text)})}o(xe,"setYAxisBottomText");function kt(t){const n={};for(const u of t){const[c,h]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ne(h))throw new _t(c,h,"number");n.radius=parseInt(h)}else if(c==="color"){if(It(h))throw new _t(c,h,"hex code");n.color=h}else if(c==="stroke-color"){if(It(h))throw new _t(c,h,"hex code");n.strokeColor=h}else if(c==="stroke-width"){if(se(h))throw new _t(c,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${c} is not supported.`)}return n}o(kt,"parseStyles");function fe(t,n,u,c,h){const p=kt(h);V.addPoints([{x:u,y:c,text:O(t.text),className:n,...p}])}o(fe,"addPoint");function ge(t,n){V.addClass(t,kt(n))}o(ge,"addClass");function pe(t){V.setConfig({chartWidth:t})}o(pe,"setWidth");function ye(t){V.setConfig({chartHeight:t})}o(ye,"setHeight");function Te(){const t=wt(),{themeVariables:n,quadrantChart:u}=t;return u&&V.setConfig(u),V.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),V.setData({titleText:ae()}),V.build()}o(Te,"getQuadrantData");var we=o(function(){V.clear(),Le()},"clear"),Be={setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:oe,setQuadrant3Text:le,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:de,setYAxisTopText:ue,setYAxisBottomText:xe,parseStyles:kt,addPoint:fe,addClass:ge,getQuadrantData:Te,clear:we,setAccTitle:ve,getAccTitle:Pe,setDiagramTitle:Fe,getDiagramTitle:ae,getAccDescription:ke,setAccDescription:Ae},Re=o((t,n,u,c)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const S=wt();At.debug(`Rendering quadrant chart
|
|
7
|
+
`+t);const a=S.securityLevel;let k;a==="sandbox"&&(k=zt("#i"+n));const T=(a==="sandbox"?zt(k.nodes()[0].contentDocument.body):zt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=((xt=S.quadrantChart)==null?void 0:xt.chartWidth)??500,b=((ft=S.quadrantChart)==null?void 0:ft.chartHeight)??500;Ce(T,b,m,((gt=S.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),T.attr("viewBox","0 0 "+m+" "+b),c.db.setHeight(b),c.db.setWidth(m);const x=c.db.getQuadrantData(),_=q.append("g").attr("class","quadrants"),Y=q.append("g").attr("class","border"),G=q.append("g").attr("class","data-points"),yt=q.append("g").attr("class","labels"),Tt=q.append("g").attr("class","title");x.title&&Tt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",p(x.title.verticalPos)).attr("transform",y(x.title)).text(x.title.text),x.borderLines&&Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const dt=_.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");dt.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),dt.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const ut=G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");ut.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),ut.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Ne={draw:Re},He={parser:ze,db:Be,renderer:Ne,styles:o(()=>"","styles")};export{He as diagram};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{g as Ge}from"./chunk-55IACEB6-D9Xhxp_r.js";import{s as Xe}from"./chunk-2J33WTMH-BE8P9tjh.js";import{_ as d,D as Be,b as Je,a as Ze,s as et,g as tt,p as st,q as it,c as Ne,l as qe,z as rt,C as nt,o as at,r as lt,u as ct}from"./index-ByxguSZe.js";var Ce=(function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],f=[1,26],m=[1,27],b=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],y=[1,39],_=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:y,90:_},{30:63,33:62,75:P,89:y,90:_},{30:64,33:62,75:P,89:y,90:_},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:y,90:_},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:y,90:_},{5:[1,95]},{30:96,33:62,75:P,89:y,90:_},{5:[1,97]},{30:98,33:62,75:P,89:y,90:_},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:y,90:_},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:y,90:_},{33:120,89:y,90:_},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:y,90:_},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),S=Object.create(this.lexer),z={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(z.yy[be]=this.yy[be]);S.setInput(i,z.yy),z.yy.lexer=S,z.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var Ie=S.yylloc;t.push(Ie);var je=S.options&&S.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(ze,"popStack");function Ue(){var T;return T=s.pop()||S.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,G,q,Te,J={},ye,F,Ye,_e;;){if(G=l[l.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Ue()),q=de[G]&&de[G][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[G])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");S.showPosition?ke="Parse error on line "+(ge+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ke="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ke,{text:S.match,token:this.terminals_[I]||I,line:S.yylineno,loc:Ie,expected:_e})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(q[0]){case 1:l.push(I),R.push(S.yytext),t.push(S.yylloc),l.push(q[1]),I=null,$e=S.yyleng,a=S.yytext,ge=S.yylineno,Ie=S.yylloc;break;case 2:if(F=this.productions_[q[1]][1],J.$=R[R.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[a,$e,ge,z.yy,q[1],R,t].concat(We)),typeof Te<"u")return Te;F&&(l=l.slice(0,-1*F*2),R=R.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[q[1]][0]),R.push(J.$),t.push(J._$),Ye=de[l[l.length-2]][l[l.length-1]],l.push(Ye);break;case 3:return!0}}return!0},"parse")},He=(function(){var $={EOF:1,parseError:d(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:d(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:d(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=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),l.length-1&&(this.yylineno-=l.length-1);var R=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:l?(l.length===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},"showPosition"),test_match:d(function(i,n){var l,s,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),s=i[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var t in R)this[t]=R[t];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,s;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),t=0;t<R.length;t++)if(l=this._input.match(this.rules[R[t]]),l&&(!n||l[0].length>n[0].length)){if(n=l,s=t,this.options.backtrack_lexer){if(i=this.test_match(l,R[t]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,R[s]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var n=this.next();return n||this.lex()},"lex"),begin:d(function(n){this.conditionStack.push(n)},"begin"),popState:d(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:d(function(n){this.begin(n)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(n,l,s,R){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return l.yytext=l.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return $})();Se.lexer=He;function Re(){this.yy={}}return d(Re,"Parser"),Re.prototype=Se,Se.Parser=Re,new Re})();Ce.parser=Ce;var ot=Ce,Z,ht=(Z=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Je,this.getAccTitle=Ze,this.setAccDescription=et,this.getAccDescription=tt,this.setDiagramTitle=st,this.getDiagramTitle=it,this.getConfig=d(()=>Ne().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(r){this.direction=r}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(r,u){return this.requirements.has(r)||this.requirements.set(r,{name:r,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(r)}getRequirements(){return this.requirements}setNewReqId(r){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=r)}setNewReqText(r){this.latestRequirement!==void 0&&(this.latestRequirement.text=r)}setNewReqRisk(r){this.latestRequirement!==void 0&&(this.latestRequirement.risk=r)}setNewReqVerifyMethod(r){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=r)}addElement(r){return this.elements.has(r)||(this.elements.set(r,{name:r,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),qe.info("Added new element: ",r)),this.resetLatestElement(),this.elements.get(r)}getElements(){return this.elements}setNewElementType(r){this.latestElement!==void 0&&(this.latestElement.type=r)}setNewElementDocRef(r){this.latestElement!==void 0&&(this.latestElement.docRef=r)}addRelationship(r,u,h){this.relations.push({type:r,src:u,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,rt()}setCssStyle(r,u){for(const h of r){const o=this.requirements.get(h)??this.elements.get(h);if(!u||!o)return;for(const c of u)c.includes(",")?o.cssStyles.push(...c.split(",")):o.cssStyles.push(c)}}setClass(r,u){var h;for(const o of r){const c=this.requirements.get(o)??this.elements.get(o);if(c)for(const E of u){c.classes.push(E);const p=(h=this.classes.get(E))==null?void 0:h.styles;p&&c.cssStyles.push(...p)}}}defineClass(r,u){for(const h of r){let o=this.classes.get(h);o===void 0&&(o={id:h,styles:[],textStyles:[]},this.classes.set(h,o)),u&&u.forEach(function(c){if(/color/.exec(c)){const E=c.replace("fill","bgFill");o.textStyles.push(E)}o.styles.push(c)}),this.requirements.forEach(c=>{c.classes.includes(h)&&c.cssStyles.push(...u.flatMap(E=>E.split(",")))}),this.elements.forEach(c=>{c.classes.includes(h)&&c.cssStyles.push(...u.flatMap(E=>E.split(",")))})}}getClasses(){return this.classes}getData(){var o,c,E,p;const r=Ne(),u=[],h=[];for(const f of this.requirements.values()){const m=f;m.id=f.name,m.cssStyles=f.cssStyles,m.cssClasses=f.classes.join(" "),m.shape="requirementBox",m.look=r.look,m.colorIndex=u.length,u.push(m)}for(const f of this.elements.values()){const m=f;m.shape="requirementBox",m.look=r.look,m.id=f.name,m.cssStyles=f.cssStyles,m.cssClasses=f.classes.join(" "),m.colorIndex=u.length,u.push(m)}for(const f of this.relations){let m=0;const b=f.type===this.Relationships.CONTAINS,k={id:`${f.src}-${f.dst}-${m}`,start:((o=this.requirements.get(f.src))==null?void 0:o.name)??((c=this.elements.get(f.src))==null?void 0:c.name),end:((E=this.requirements.get(f.dst))==null?void 0:E.name)??((p=this.elements.get(f.dst))==null?void 0:p.name),label:`<<${f.type}>>`,classes:"relationshipLine",style:["fill:none",b?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:b?"normal":"dashed",arrowTypeStart:b?"requirement_contains":"",arrowTypeEnd:b?"":"requirement_arrow",look:r.look,labelType:"markdown"};h.push(k),m++}return{nodes:u,edges:h,other:{},config:r,direction:this.getDirection()}}},d(Z,"RequirementDB"),Z),ut=d(e=>{const r=Be(),{themeVariables:u,look:h}=r,{bkgColorArray:o,borderColorArray:c}=u;if(!(c!=null&&c.length))return"";let E="";for(let p=0;p<e.THEME_COLOR_LIMIT;p++)E+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${h}"][data-color-id="color-${p}"].node path {
|
|
9
|
+
stroke: ${c[p]};
|
|
10
|
+
fill: ${o!=null&&o.length?o[p]:""};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${h}"][data-color-id="color-${p}"].node rect {
|
|
14
|
+
stroke: ${c[p]};
|
|
15
|
+
fill: ${o!=null&&o.length?o[p]:""};
|
|
16
|
+
}
|
|
17
|
+
`;return E},"genColor"),ft=d(e=>{const r=Be(),{look:u,themeVariables:h}=r,{requirementEdgeLabelBackground:o}=h;return`
|
|
18
|
+
${ut(e)}
|
|
19
|
+
marker {
|
|
20
|
+
fill: ${e.relationColor};
|
|
21
|
+
stroke: ${e.relationColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
marker.cross {
|
|
25
|
+
stroke: ${e.lineColor};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
svg {
|
|
29
|
+
font-family: ${e.fontFamily};
|
|
30
|
+
font-size: ${e.fontSize};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.reqBox {
|
|
34
|
+
fill: ${e.requirementBackground};
|
|
35
|
+
fill-opacity: 1.0;
|
|
36
|
+
stroke: ${e.requirementBorderColor};
|
|
37
|
+
stroke-width: ${e.requirementBorderSize};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.reqTitle, .reqLabel{
|
|
41
|
+
fill: ${e.requirementTextColor};
|
|
42
|
+
}
|
|
43
|
+
.reqLabelBox {
|
|
44
|
+
fill: ${e.relationLabelBackground};
|
|
45
|
+
fill-opacity: 1.0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.req-title-line {
|
|
49
|
+
stroke: ${e.requirementBorderColor};
|
|
50
|
+
stroke-width: ${e.requirementBorderSize};
|
|
51
|
+
}
|
|
52
|
+
.relationshipLine {
|
|
53
|
+
stroke: ${e.relationColor};
|
|
54
|
+
stroke-width: ${u==="neo"?e.strokeWidth:"1px"};
|
|
55
|
+
}
|
|
56
|
+
.relationshipLabel {
|
|
57
|
+
fill: ${e.relationLabelColor};
|
|
58
|
+
}
|
|
59
|
+
.edgeLabel {
|
|
60
|
+
background-color: ${e.edgeLabelBackground};
|
|
61
|
+
}
|
|
62
|
+
.edgeLabel .label rect {
|
|
63
|
+
fill: ${e.edgeLabelBackground};
|
|
64
|
+
}
|
|
65
|
+
.edgeLabel .label text {
|
|
66
|
+
fill: ${e.relationLabelColor};
|
|
67
|
+
}
|
|
68
|
+
.divider {
|
|
69
|
+
stroke: ${e.nodeBorder};
|
|
70
|
+
stroke-width: 1;
|
|
71
|
+
}
|
|
72
|
+
.label {
|
|
73
|
+
font-family: ${e.fontFamily};
|
|
74
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
75
|
+
}
|
|
76
|
+
.label text,span {
|
|
77
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
78
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
79
|
+
}
|
|
80
|
+
.labelBkg {
|
|
81
|
+
background-color: ${o??e.edgeLabelBackground};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`},"getStyles"),mt=ft,Qe={};nt(Qe,{draw:()=>dt});var dt=d(async function(e,r,u,h){qe.info("REF0:"),qe.info("Drawing requirement diagram (unified)",r);const{securityLevel:o,state:c,layout:E,look:p}=Ne(),f=h.db.getData(),m=Ge(r,o);f.type=h.type,f.layoutAlgorithm=at(E),f.nodeSpacing=(c==null?void 0:c.nodeSpacing)??50,f.rankSpacing=(c==null?void 0:c.rankSpacing)??50,f.markers=p==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],f.diagramId=r,await lt(f,m);const b=8;ct.insertTitle(m,"requirementDiagramTitleText",(c==null?void 0:c.titleTopMargin)??25,h.db.getDiagramTitle()),Xe(m,b,"requirementDiagram",(c==null?void 0:c.useMaxWidth)??!0)},"draw"),gt={parser:ot,get db(){return new ht},renderer:Qe,styles:mt};export{gt as diagram};
|