@marimo-team/frontend 0.11.7-dev18 → 0.11.7-dev19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ConnectedDataExplorerComponent-DHGnPUfo.js +22 -0
- package/dist/assets/VegaLite-9MvuRa8Q.js +11 -0
- package/dist/assets/{_baseEach-DRLOG7FR.js → _baseEach-CP_Ww34_.js} +1 -1
- package/dist/assets/_baseMap-BnON-FRK.js +1 -0
- package/dist/assets/{_baseUniq-Z6tslDId.js → _baseUniq-C-EGQjpX.js} +1 -1
- package/dist/assets/{any-language-editor-CN-68zq0.js → any-language-editor-CP4oFHIR.js} +1 -1
- package/dist/assets/arc-B5qYPUYs.js +1 -0
- package/dist/assets/architectureDiagram-UYN6MBPD-Cu50mFFz.js +1 -0
- package/dist/assets/asn1-DWPaVWf6.js +1 -0
- package/dist/assets/blockDiagram-ZHA2E4KO-DNNEKfN4.js +1 -0
- package/dist/assets/{c4Diagram-6F5ED5ID-CSsWcf65.js → c4Diagram-6F5ED5ID-c9noPme3.js} +1 -1
- package/dist/assets/channel-BXyGiLdr.js +1 -0
- package/dist/assets/{chunk-5HRBRIJM-i5Phh7bi.js → chunk-5HRBRIJM-DzGH0Hvq.js} +1 -1
- package/dist/assets/chunk-7U56Z5CX-EweKemHX.js +1 -0
- package/dist/assets/{chunk-ASOPGD6M-Bsu_b9jH.js → chunk-ASOPGD6M-BTwtja0i.js} +1 -1
- package/dist/assets/{chunk-KFBOBJHC-C9sMPfZc.js → chunk-KFBOBJHC-DL7YWARa.js} +1 -1
- package/dist/assets/chunk-T2TOU4HS-DDKsr-VU.js +1 -0
- package/dist/assets/{chunk-TMUBEWPD-yD_WnSdD.js → chunk-TMUBEWPD-UMniDy8G.js} +1 -1
- package/dist/assets/classDiagram-LNE6IOMH-8C6P3kKW.js +1 -0
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-8C6P3kKW.js +1 -0
- package/dist/assets/{clike-BPCXT8V3.js → clike-D5G9EsPi.js} +1 -1
- package/dist/assets/clone-DLiFcnom.js +1 -0
- package/dist/assets/{cobol-DbZRNMTs.js → cobol-stawOqaz.js} +1 -1
- package/dist/assets/{compile-BgV4bhlK.js → compile-WON9YlSC.js} +1 -1
- package/dist/assets/createWsUrl-DpYz33SB.js +1 -0
- package/dist/assets/{cytoscape.esm-BOa7ANXG.js → cytoscape.esm-bH-fs5wT.js} +1 -1
- package/dist/assets/{dagre-4EVJKHTY-qlyr5wai.js → dagre-4EVJKHTY-NhWp9Nao.js} +1 -1
- package/dist/assets/data-editor-yv5TDKOw.js +1 -0
- package/dist/assets/diagram-QW4FP2JN-D_oa4mh4.js +1 -0
- package/dist/assets/edit-page-CqihBjpH.js +8 -0
- package/dist/assets/{erDiagram-6RL3IURR-V5QiSeMD.js → erDiagram-6RL3IURR-D_8-UBLx.js} +1 -1
- package/dist/assets/flowDiagram-7ASYPVHJ-BEVjc2mo.js +1 -0
- package/dist/assets/ganttDiagram-NTVNEXSI-CzQ74vaE.js +1 -0
- package/dist/assets/{gitGraph-YCYPL57B-CrdOXnVg.js → gitGraph-YCYPL57B-Lp7lW1s2.js} +1 -1
- package/dist/assets/gitGraphDiagram-NRZ2UAAF-TX6Un6At.js +1 -0
- package/dist/assets/{graph-CuAM9DuN.js → graph-B1pkpu6x.js} +1 -1
- package/dist/assets/haxe-D25e-2l-.js +1 -0
- package/dist/assets/home-page-CV5sDnDF.js +7 -0
- package/dist/assets/index-3eYrmqP_.js +1 -0
- package/dist/assets/{index-nafBc7vH.js → index-AMoZNuPL.js} +1 -1
- package/dist/assets/{index-BxXkbUY_.js → index-B4F8KUlt.js} +1 -1
- package/dist/assets/{index-C4vyzbl_.js → index-B9bfcu4O.js} +1 -1
- package/dist/assets/{index-CBffH0xV.js → index-BNr5kBo9.js} +1 -1
- package/dist/assets/index-Bs-_nZ1-.js +80 -0
- package/dist/assets/{index-eUGIYQ9e.js → index-Bt6bNupF.js} +1 -1
- package/dist/assets/{index-dBf568lL.js → index-BwBapPRy.js} +1 -1
- package/dist/assets/index-C7epkusi.js +1 -0
- package/dist/assets/index-CB88A1LO.js +1 -0
- package/dist/assets/{index-RZIsHI4j.js → index-CHg0nyhI.js} +1 -1
- package/dist/assets/index-CMaPLRBL.js +1 -0
- package/dist/assets/{index-DWSqZU7l.js → index-Cjb1B7t-.js} +1 -1
- package/dist/assets/index-CuuzUidG.js +1 -0
- package/dist/assets/index-CxBH94hW.js +1 -0
- package/dist/assets/{index-BXs5VcPX.js → index-elWyDTjj.js} +1 -1
- package/dist/assets/{index-D_b38AF4.js → index-jk1Bdqx5.js} +1 -1
- package/dist/assets/{infoDiagram-A4XQUW5V-BQi5KH8U.js → infoDiagram-A4XQUW5V-CiitD6h4.js} +1 -1
- package/dist/assets/javascript-D48wDJXV.js +1 -0
- package/dist/assets/{journeyDiagram-G5WM74LC-CYv86MSD.js → journeyDiagram-G5WM74LC-CziVlbVw.js} +1 -1
- package/dist/assets/{kanban-definition-QRCXZQQD-LxchZzZC.js → kanban-definition-QRCXZQQD-Dy8pGchJ.js} +1 -1
- package/dist/assets/layout-DMjoL85l.js +1 -0
- package/dist/assets/{linear-DnzJFOVg.js → linear-CEAhgcN8.js} +1 -1
- package/dist/assets/main-CEaoNRsh.js +1 -0
- package/dist/assets/mermaid-D_CQoy18.js +13 -0
- package/dist/assets/min-uVplt8ii.js +1 -0
- package/dist/assets/mindmap-definition-GWI6TPTV-DNmAJl6_.js +1 -0
- package/dist/assets/{mirc-1Vs7mkDM.js → mirc-DkvFAiy5.js} +1 -1
- package/dist/assets/mllike-3c2dg9RT.js +1 -0
- package/dist/assets/pieDiagram-YF2LJOPJ-CXt6RGdy.js +1 -0
- package/dist/assets/{pig-C9krdGUD.js → pig-CwGJVRC4.js} +1 -1
- package/dist/assets/{pug-JtgdeyKq.js → pug-_kJOm_E2.js} +1 -1
- package/dist/assets/quadrantDiagram-OS5C2QUG-CYntzanF.js +1 -0
- package/dist/assets/react-plotly-B0mh7GBE.js +71 -0
- package/dist/assets/requirementDiagram-MIRIMTAZ-WlsjKncV.js +1 -0
- package/dist/assets/{run-page-BpxdWHNP.js → run-page-lUv0rYeD.js} +1 -1
- package/dist/assets/{sankeyDiagram-Y46BX6SQ-2stxT0h5.js → sankeyDiagram-Y46BX6SQ-D4SMsIpb.js} +1 -1
- package/dist/assets/{scheme-DlxeS-fJ.js → scheme-qjP0V5Ag.js} +1 -1
- package/dist/assets/sequenceDiagram-G6AWOVSC-gAbHsH1a.js +1 -0
- package/dist/assets/{slides-component-CpzjtzJd.js → slides-component-CsUAjaQw.js} +1 -1
- package/dist/assets/{sortBy-D5PrM5k_.js → sortBy-DK-gqwbw.js} +1 -1
- package/dist/assets/sql-B3SPsWL6.js +1 -0
- package/dist/assets/stateDiagram-MAYHULR4-JiLpirwC.js +1 -0
- package/dist/assets/stateDiagram-v2-4JROLMXI-B508hUDz.js +1 -0
- package/dist/assets/{step-CaHXtLdi.js → step-xJWGRC3d.js} +1 -1
- package/dist/assets/{tcl-BWtglvHf.js → tcl-B2fODqDH.js} +1 -1
- package/dist/assets/terminal-CjN7T7y7.js +1 -0
- package/dist/assets/{time-B-QFhLuD.js → time-ewwCRcyA.js} +1 -1
- package/dist/assets/{timeline-definition-U7ZMHBDA-Cu5fPfiD.js → timeline-definition-U7ZMHBDA-BMgEPvyF.js} +1 -1
- package/dist/assets/{transform-D6ULhE8R.js → transform-CdY8z5kT.js} +1 -1
- package/dist/assets/tree-IclkTnsu.js +8 -0
- package/dist/assets/ttcn-BxnYHtq8.js +1 -0
- package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -0
- package/dist/assets/useMarimoWebSocket-CTias04q.js +15 -0
- package/dist/assets/{vega-component-530U8AUz.js → vega-component-qgeC1kGc.js} +1 -1
- package/dist/assets/velocity-BdD_26Jv.js +1 -0
- package/dist/assets/{xychartDiagram-6QU3TZC5-C7CZWV9M.js → xychartDiagram-6QU3TZC5-DqpYB1GZ.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/ConnectedDataExplorerComponent-Dw0lgEx7.js +0 -22
- package/dist/assets/VegaLite-i28zbrOg.js +0 -11
- package/dist/assets/_baseMap-Csmk0lES.js +0 -1
- package/dist/assets/arc-BTlVLyGF.js +0 -1
- package/dist/assets/architectureDiagram-UYN6MBPD-CLCthGnb.js +0 -1
- package/dist/assets/asn1-BhA3SgW2.js +0 -1
- package/dist/assets/blockDiagram-ZHA2E4KO-D8VEqjcW.js +0 -1
- package/dist/assets/channel-DHzdgD-d.js +0 -1
- package/dist/assets/chunk-7U56Z5CX-D088hXP5.js +0 -1
- package/dist/assets/chunk-T2TOU4HS-Depm1_8y.js +0 -1
- package/dist/assets/classDiagram-LNE6IOMH-K-Wjg4zZ.js +0 -1
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-K-Wjg4zZ.js +0 -1
- package/dist/assets/clone-C6gbuftv.js +0 -1
- package/dist/assets/createWsUrl-BclB4Lh8.js +0 -1
- package/dist/assets/data-editor-O7GB1dOJ.js +0 -1
- package/dist/assets/diagram-QW4FP2JN-CeEn361s.js +0 -1
- package/dist/assets/edit-page-D09PcIbh.js +0 -8
- package/dist/assets/flowDiagram-7ASYPVHJ-DswX-o5B.js +0 -1
- package/dist/assets/ganttDiagram-NTVNEXSI-O1FeJt3C.js +0 -1
- package/dist/assets/gitGraphDiagram-NRZ2UAAF-DqXKCt3x.js +0 -1
- package/dist/assets/haxe-75PMBtaN.js +0 -1
- package/dist/assets/home-page-D_b-tjJr.js +0 -7
- package/dist/assets/index-6w92-PnA.js +0 -1
- package/dist/assets/index-BZUrKLLV.js +0 -1
- package/dist/assets/index-BhVxrMm_.js +0 -92
- package/dist/assets/index-Cex802kZ.js +0 -1
- package/dist/assets/index-DhKR_xS-.js +0 -1
- package/dist/assets/index-YvMhMx5m.js +0 -1
- package/dist/assets/index-ooJzGCEl.js +0 -1
- package/dist/assets/javascript-CLZUXWcY.js +0 -1
- package/dist/assets/layout-BVzdLZD3.js +0 -1
- package/dist/assets/main-DPWVgc5Y.js +0 -1
- package/dist/assets/mermaid-Bic4bmVF.js +0 -13
- package/dist/assets/min-Dw7ZDVyc.js +0 -1
- package/dist/assets/mindmap-definition-GWI6TPTV-Dgrbeals.js +0 -1
- package/dist/assets/mllike-B8DYu8SS.js +0 -1
- package/dist/assets/pieDiagram-YF2LJOPJ-DH_aAvgk.js +0 -1
- package/dist/assets/quadrantDiagram-OS5C2QUG-Cdx6px7r.js +0 -1
- package/dist/assets/react-plotly-ABMk2537.js +0 -71
- package/dist/assets/requirementDiagram-MIRIMTAZ-foNUTolX.js +0 -1
- package/dist/assets/sequenceDiagram-G6AWOVSC-DsLWeuD6.js +0 -1
- package/dist/assets/sql-BP5jFf-w.js +0 -1
- package/dist/assets/stateDiagram-MAYHULR4-DTsueJwY.js +0 -1
- package/dist/assets/stateDiagram-v2-4JROLMXI-Co4r5BV4.js +0 -1
- package/dist/assets/terminal-DCpCpEop.js +0 -1
- package/dist/assets/tree-CYy93deY.js +0 -8
- package/dist/assets/ttcn-BXRxJEWs.js +0 -1
- package/dist/assets/ttcn-cfg-Ce4xWtqN.js +0 -1
- package/dist/assets/useMarimoWebSocket-m-9tpiCT.js +0 -15
- package/dist/assets/velocity-Bo4HNIcG.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){var t,r,n=e.statementIndent,a=e.jsonld,i=e.json||a,o=e.typescript,u=e.wordCharacters||/[\w$\xa1-\uffff]/,c=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),s=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function l(e,n,a){return t=e,r=a,n}function d(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,i=!1;if(a&&"@"==e.peek()&&e.match(f))return t.tokenize=d,l("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||i);)i=!i&&"\\"==n;return i||(t.tokenize=d),l("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return l("number","number");if("."==n&&e.match(".."))return l("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return l(n);if("="==n&&e.eat(">"))return l("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return l("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),l("number","number");if("/"==n)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),l("comment","comment")):function(e,t,r){return t.tokenize==d&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-r))}(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),l("regexp","string.special")):(e.eat("="),l("operator","operator",e.current()));if("`"==n)return t.tokenize=p,p(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),l("meta","meta");if("#"==n&&e.eatWhile(u))return l("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),l("comment","comment");if(s.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?l("."):l("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(c.propertyIsEnumerable(i)){var o=c[i];return l(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return l("async","keyword",i)}return l("variable","variable",i)}}function m(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=d;break}n="*"==r}return l("comment","comment")}function p(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=d;break}n=!n&&"\\"==r}return l("quasi","string.special",e.current())}function k(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(o){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,c=r-1;c>=0;--c){var s=e.string.charAt(c),f="([{}])".indexOf(s);if(f>=0&&f<3){if(!a){++c;break}if(0==--a){"("==s&&(i=!0);break}}else if(f>=3&&f<6)++a;else if(u.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--c){if(0==c)return;if(e.string.charAt(c-1)==s&&"\\"!=e.string.charAt(c-2)){c--;break}}else if(i&&!a){++c;break}}i&&!a&&(t.fatArrowAt=c)}}var v={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function y(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var b={state:null,marked:null,cc:null};function h(){for(var e=arguments.length-1;e>=0;e--)b.cc.push(arguments[e])}function x(){return h.apply(null,arguments),!0}function g(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function V(t){var r=b.state;if(b.marked="def",r.context)if("var"==r.lexical.info&&r.context&&r.context.block){var n=A(t,r.context);if(null!=n)return void(r.context=n)}else if(!g(t,r.localVars))return void(r.localVars=new j(t,r.localVars));e.globalVars&&!g(t,r.globalVars)&&(r.globalVars=new j(t,r.globalVars))}function A(e,t){if(t){if(t.block){var r=A(e,t.prev);return r?r==t.prev?t:new T(r,t.vars,!0):null}return g(e,t.vars)?t:new T(t.prev,new j(e,t.vars),!1)}return null}function z(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function T(e,t,r){this.prev=e,this.vars=t,this.block=r}function j(e,t){this.name=e,this.next=t}var $=new j("this",new j("arguments",null));function O(){b.state.context=new T(b.state.context,b.state.localVars,!1),b.state.localVars=$}function _(){b.state.context=new T(b.state.context,b.state.localVars,!0),b.state.localVars=null}function q(){b.state.localVars=b.state.context.vars,b.state.context=b.state.context.prev}function E(e,t){var r=function(){var r=b.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new y(n,b.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function I(){var e=b.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function S(e){return function t(r){return r==e?x():";"==e||"}"==r||")"==r||"]"==r?h():x(t)}}function N(e,t){return"var"==e?x(E("vardef",t),be,S(";"),I):"keyword a"==e?x(E("form"),B,N,I):"keyword b"==e?x(E("form"),N,I):"keyword d"==e?b.stream.match(/^\s*$/,!1)?x():x(E("stat"),F,S(";"),I):"debugger"==e?x(S(";")):"{"==e?x(E("}"),_,ne,I,q):";"==e?x():"if"==e?("else"==b.state.lexical.info&&b.state.cc[b.state.cc.length-1]==I&&b.state.cc.pop()(),x(E("form"),B,N,I,ze)):"function"==e?x(Oe):"for"==e?x(E("form"),_,Te,N,q,I):"class"==e||o&&"interface"==t?(b.marked="keyword",x(E("form","class"==e?e:t),Se,I)):"variable"==e?o&&"declare"==t?(b.marked="keyword",x(N)):o&&("module"==t||"enum"==t||"type"==t)&&b.stream.match(/^\s*\w/,!1)?(b.marked="keyword","enum"==t?x(Ke):"type"==t?x(qe,S("operator"),ce,S(";")):x(E("form"),he,S("{"),E("}"),ne,I,I)):o&&"namespace"==t?(b.marked="keyword",x(E("form"),C,N,I)):o&&"abstract"==t?(b.marked="keyword",x(N)):x(E("stat"),R):"switch"==e?x(E("form"),B,S("{"),E("}","switch"),_,ne,I,I,q):"case"==e?x(C,S(":")):"default"==e?x(S(":")):"catch"==e?x(E("form"),O,P,N,I,q):"export"==e?x(E("stat"),We,I):"import"==e?x(E("stat"),De,I):"async"==e?x(N):"@"==t?x(C,N):h(E("stat"),C,S(";"),I)}function P(e){if("("==e)return x(Ee,S(")"))}function C(e,t){return D(e,t,!1)}function W(e,t){return D(e,t,!0)}function B(e){return"("!=e?h():x(E(")"),F,S(")"),I)}function D(e,t,r){if(b.state.fatArrowAt==b.stream.start){var n=r?L:K;if("("==e)return x(O,E(")"),te(Ee,")"),I,S("=>"),n,q);if("variable"==e)return h(O,he,S("=>"),n,q)}var a=r?G:U;return v.hasOwnProperty(e)?x(a):"function"==e?x(Oe,a):"class"==e||o&&"interface"==t?(b.marked="keyword",x(E("form"),Ie,I)):"keyword c"==e||"async"==e?x(r?W:C):"("==e?x(E(")"),F,S(")"),I,a):"operator"==e||"spread"==e?x(r?W:C):"["==e?x(E("]"),Je,I,a):"{"==e?re(Y,"}",null,a):"quasi"==e?h(H,a):"new"==e?x(function(e){return function(t){return"."==t?x(e?Q:M):"variable"==t&&o?x(ve,e?G:U):h(e?W:C)}}(r)):x()}function F(e){return e.match(/[;\}\)\],]/)?h():h(C)}function U(e,t){return","==e?x(F):G(e,t,!1)}function G(e,t,r){var n=0==r?U:G,a=0==r?C:W;return"=>"==e?x(O,r?L:K,q):"operator"==e?/\+\+|--/.test(t)||o&&"!"==t?x(n):o&&"<"==t&&b.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?x(E(">"),te(ce,">"),I,n):"?"==t?x(C,S(":"),a):x(a):"quasi"==e?h(H,n):";"!=e?"("==e?re(W,")","call",n):"."==e?x(X,n):"["==e?x(E("]"),F,S("]"),I,n):o&&"as"==t?(b.marked="keyword",x(ce,n)):"regexp"==e?(b.state.lastType=b.marked="operator",b.stream.backUp(b.stream.pos-b.stream.start-1),x(a)):void 0:void 0}function H(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?x(H):x(F,J)}function J(e){if("}"==e)return b.marked="string.special",b.state.tokenize=p,x(H)}function K(e){return k(b.stream,b.state),h("{"==e?N:C)}function L(e){return k(b.stream,b.state),h("{"==e?N:W)}function M(e,t){if("target"==t)return b.marked="keyword",x(U)}function Q(e,t){if("target"==t)return b.marked="keyword",x(G)}function R(e){return":"==e?x(I,N):h(U,S(";"),I)}function X(e){if("variable"==e)return b.marked="property",x()}function Y(e,t){return"async"==e?(b.marked="property",x(Y)):"variable"==e||"keyword"==b.style?(b.marked="property","get"==t||"set"==t?x(Z):(o&&b.state.fatArrowAt==b.stream.start&&(r=b.stream.match(/^\s*:\s*/,!1))&&(b.state.fatArrowAt=b.stream.pos+r[0].length),x(ee))):"number"==e||"string"==e?(b.marked=a?"property":b.style+" property",x(ee)):"jsonld-keyword"==e?x(ee):o&&z(t)?(b.marked="keyword",x(Y)):"["==e?x(C,ae,S("]"),ee):"spread"==e?x(W,ee):"*"==t?(b.marked="keyword",x(Y)):":"==e?h(ee):void 0;var r}function Z(e){return"variable"!=e?h(ee):(b.marked="property",x(Oe))}function ee(e){return":"==e?x(W):"("==e?h(Oe):void 0}function te(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=b.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),x((function(r,n){return r==t||n==t?h():h(e)}),n)}return a==t||i==t?x():r&&r.indexOf(";")>-1?h(e):x(S(t))}return function(r,a){return r==t||a==t?x():h(e,n)}}function re(e,t,r){for(var n=3;n<arguments.length;n++)b.cc.push(arguments[n]);return x(E(t,r),te(e,t),I)}function ne(e){return"}"==e?x():h(N,ne)}function ae(e,t){if(o){if(":"==e)return x(ce);if("?"==t)return x(ae)}}function ie(e,t){if(o&&(":"==e||"in"==t))return x(ce)}function oe(e){if(o&&":"==e)return b.stream.match(/^\s*\w+\s+is\b/,!1)?x(C,ue,ce):x(ce)}function ue(e,t){if("is"==t)return b.marked="keyword",x()}function ce(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(b.marked="keyword",x("typeof"==t?W:ce)):"variable"==e||"void"==t?(b.marked="type",x(ke)):"|"==t||"&"==t?x(ce):"string"==e||"number"==e||"atom"==e?x(ke):"["==e?x(E("]"),te(ce,"]",","),I,ke):"{"==e?x(E("}"),fe,I,ke):"("==e?x(te(pe,")"),se,ke):"<"==e?x(te(ce,">"),ce):"quasi"==e?h(de,ke):void 0}function se(e){if("=>"==e)return x(ce)}function fe(e){return e.match(/[\}\)\]]/)?x():","==e||";"==e?x(fe):h(le,fe)}function le(e,t){return"variable"==e||"keyword"==b.style?(b.marked="property",x(le)):"?"==t||"number"==e||"string"==e?x(le):":"==e?x(ce):"["==e?x(S("variable"),ie,S("]"),le):"("==e?h(_e,le):e.match(/[;\}\)\],]/)?void 0:x()}function de(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?x(de):x(ce,me)}function me(e){if("}"==e)return b.marked="string.special",b.state.tokenize=p,x(de)}function pe(e,t){return"variable"==e&&b.stream.match(/^\s*[?:]/,!1)||"?"==t?x(pe):":"==e?x(ce):"spread"==e?x(pe):h(ce)}function ke(e,t){return"<"==t?x(E(">"),te(ce,">"),I,ke):"|"==t||"."==e||"&"==t?x(ce):"["==e?x(ce,S("]"),ke):"extends"==t||"implements"==t?(b.marked="keyword",x(ce)):"?"==t?x(ce,S(":"),ce):void 0}function ve(e,t){if("<"==t)return x(E(">"),te(ce,">"),I,ke)}function ye(){return h(ce,we)}function we(e,t){if("="==t)return x(ce)}function be(e,t){return"enum"==t?(b.marked="keyword",x(Ke)):h(he,ae,Ve,Ae)}function he(e,t){return o&&z(t)?(b.marked="keyword",x(he)):"variable"==e?(V(t),x()):"spread"==e?x(he):"["==e?re(ge,"]"):"{"==e?re(xe,"}"):void 0}function xe(e,t){return"variable"!=e||b.stream.match(/^\s*:/,!1)?("variable"==e&&(b.marked="property"),"spread"==e?x(he):"}"==e?h():"["==e?x(C,S("]"),S(":"),xe):x(S(":"),he,Ve)):(V(t),x(Ve))}function ge(){return h(he,Ve)}function Ve(e,t){if("="==t)return x(W)}function Ae(e){if(","==e)return x(be)}function ze(e,t){if("keyword b"==e&&"else"==t)return x(E("form","else"),N,I)}function Te(e,t){return"await"==t?x(Te):"("==e?x(E(")"),je,I):void 0}function je(e){return"var"==e?x(be,$e):"variable"==e?x($e):h($e)}function $e(e,t){return")"==e?x():";"==e?x($e):"in"==t||"of"==t?(b.marked="keyword",x(C,$e)):h(C,$e)}function Oe(e,t){return"*"==t?(b.marked="keyword",x(Oe)):"variable"==e?(V(t),x(Oe)):"("==e?x(O,E(")"),te(Ee,")"),I,oe,N,q):o&&"<"==t?x(E(">"),te(ye,">"),I,Oe):void 0}function _e(e,t){return"*"==t?(b.marked="keyword",x(_e)):"variable"==e?(V(t),x(_e)):"("==e?x(O,E(")"),te(Ee,")"),I,oe,q):o&&"<"==t?x(E(">"),te(ye,">"),I,_e):void 0}function qe(e,t){return"keyword"==e||"variable"==e?(b.marked="type",x(qe)):"<"==t?x(E(">"),te(ye,">"),I):void 0}function Ee(e,t){return"@"==t&&x(C,Ee),"spread"==e?x(Ee):o&&z(t)?(b.marked="keyword",x(Ee)):o&&"this"==e?x(ae,Ve):h(he,ae,Ve)}function Ie(e,t){return"variable"==e?Se(e,t):Ne(e,t)}function Se(e,t){if("variable"==e)return V(t),x(Ne)}function Ne(e,t){return"<"==t?x(E(">"),te(ye,">"),I,Ne):"extends"==t||"implements"==t||o&&","==e?("implements"==t&&(b.marked="keyword"),x(o?ce:C,Ne)):"{"==e?x(E("}"),Pe,I):void 0}function Pe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||o&&z(t))&&b.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(b.marked="keyword",x(Pe)):"variable"==e||"keyword"==b.style?(b.marked="property",x(Ce,Pe)):"number"==e||"string"==e?x(Ce,Pe):"["==e?x(C,ae,S("]"),Ce,Pe):"*"==t?(b.marked="keyword",x(Pe)):o&&"("==e?h(_e,Pe):";"==e||","==e?x(Pe):"}"==e?x():"@"==t?x(C,Pe):void 0}function Ce(e,t){if("!"==t||"?"==t)return x(Ce);if(":"==e)return x(ce,Ve);if("="==t)return x(W);var r=b.state.lexical.prev;return h(r&&"interface"==r.info?_e:Oe)}function We(e,t){return"*"==t?(b.marked="keyword",x(He,S(";"))):"default"==t?(b.marked="keyword",x(C,S(";"))):"{"==e?x(te(Be,"}"),He,S(";")):h(N)}function Be(e,t){return"as"==t?(b.marked="keyword",x(S("variable"))):"variable"==e?h(W,Be):void 0}function De(e){return"string"==e?x():"("==e?h(C):"."==e?h(U):h(Fe,Ue,He)}function Fe(e,t){return"{"==e?re(Fe,"}"):("variable"==e&&V(t),"*"==t&&(b.marked="keyword"),x(Ge))}function Ue(e){if(","==e)return x(Fe,Ue)}function Ge(e,t){if("as"==t)return b.marked="keyword",x(Fe)}function He(e,t){if("from"==t)return b.marked="keyword",x(C)}function Je(e){return"]"==e?x():h(te(W,"]"))}function Ke(){return h(E("form"),he,S("{"),E("}"),te(Le,"}"),I,I)}function Le(){return h(he,Ve)}return O.lex=_.lex=!0,q.lex=!0,I.lex=!0,{name:e.name,startState:function(t){var r={tokenize:d,lastType:"sof",cc:[],lexical:new y(-t,0,"block",!1),localVars:e.localVars,context:e.localVars&&new T(null,null,!1),indented:0};return e.globalVars&&"object"==typeof e.globalVars&&(r.globalVars=e.globalVars),r},token:function(e,n){if(e.sol()&&(n.lexical.hasOwnProperty("align")||(n.lexical.align=!1),n.indented=e.indentation(),k(e,n)),n.tokenize!=m&&e.eatSpace())return null;var a=n.tokenize(e,n);return"comment"==t?a:(n.lastType="operator"!=t||"++"!=r&&"--"!=r?t:"incdec",function(e,t,r,n,a){var o=e.cc;for(b.state=e,b.stream=a,b.marked=null,b.cc=o,b.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():i?C:N)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return b.marked?b.marked:"variable"==r&&w(e,n)?"variableName.local":t}}(n,a,t,r,e))},indent:function(t,r,a){if(t.tokenize==m||t.tokenize==p)return null;if(t.tokenize!=d)return 0;var i,o=r&&r.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var f=t.cc[c];if(f==I)u=u.prev;else if(f!=ze&&f!=q)break}for(;("stat"==u.type||"form"==u.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==U||i==G)&&!/^[,\.=+\-*:?[\(]/.test(r));)u=u.prev;n&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var l=u.type,k=o==l;return"vardef"==l?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==l&&"{"==o?u.indented:"form"==l?u.indented+a.unit:"stat"==l?u.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||s.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?n||a.unit:0):"switch"!=u.info||k||0==e.doubleIndentSwitch?u.align?u.column+(k?0:1):u.indented+(k?0:a.unit):u.indented+(/^(?:case|default)\b/.test(r)?a.unit:2*a.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:i?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}const t=e({name:"javascript"}),r=e({name:"json",json:!0}),n=e({name:"json",jsonld:!0}),a=e({name:"typescript",typescript:!0});export{t as javascript,r as json,n as jsonld,a as typescript};
|
package/dist/assets/{journeyDiagram-G5WM74LC-CYv86MSD.js → journeyDiagram-G5WM74LC-CziVlbVw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,f as e,g as n,b as i}from"./chunk-ASOPGD6M-Bsu_b9jH.js";import{_ as s,d as r,p as a,q as o,s as c,g as l,c as h,b as u,v as p,j as y}from"./mermaid-Bic4bmVF.js";import{s as d}from"./transform-D6ULhE8R.js";import{d as f}from"./arc-BTlVLyGF.js";import"./index-BhVxrMm_.js";import"./step-CaHXtLdi.js";var g=function(){var t=s((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:s((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:s((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),s(m,"lex");for(var x,k,_,b,v,w,$,T,M={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=o[k]&&o[k][x]),void 0===_||!_.length||!_[0]){var S="";for(v in T=[],o[k])this.terminals_[v]&&v>2&&T.push("'"+this.terminals_[v]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:T})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),x=null,h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(w=this.productions_[_[1]][1],M.$=r[r.length-w],M._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},g&&(M._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(M,[c,h,l,y.yy,_[1],r,a].concat(u))))return b;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[_[1]][0]),r.push(M.$),a.push(M._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:s((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:s((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:s((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:s((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:s((function(){return this._more=!0,this}),"more"),reject:s((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:s((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:s((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:s((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:s((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:s((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:s((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:s((function(){var t=this.next();return t||this.lex()}),"lex"),begin:s((function(t){this.conditionStack.push(t)}),"begin"),popState:s((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:s((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:s((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:s((function(t){this.begin(t)}),"pushState"),stateStackSize:s((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:s((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,s(u,"Parser"),u.prototype=l,l.Parser=u,new u}();g.parser=g;var m=g,x="",k=[],_=[],b=[],v=s((function(){k.length=0,_.length=0,x="",b.length=0,p()}),"clear"),w=s((function(t){x=t,k.push(t)}),"addSection"),$=s((function(){return k}),"getSections"),T=s((function(){let t=E();let e=0;for(;!t&&e<100;)t=E(),e++;return _.push(...b),_}),"getTasks"),M=s((function(){const t=[];_.forEach((e=>{e.people&&t.push(...e.people)}));return[...new Set(t)].sort()}),"updateActors"),S=s((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:x,type:x,people:r,task:t,score:i};b.push(a)}),"addTask"),A=s((function(t){const e={section:x,type:x,description:t,task:t,classes:[]};_.push(e)}),"addTaskOrg"),E=s((function(){const t=s((function(t){return b[t].processed}),"compileTask");let e=!0;for(const[n,i]of b.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),P=s((function(){return M()}),"getActors"),I={getConfig:s((()=>r().journey),"getConfig"),clear:v,setDiagramTitle:a,getDiagramTitle:o,setAccTitle:c,getAccTitle:l,setAccDescription:h,getAccDescription:u,addSection:w,getSections:$,getTasks:T,addTask:S,addTaskOrg:A,getActors:P},j=s((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),C=s((function(e,n){return t(e,n)}),"drawRect"),V=s((function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=f().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const i=f().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s(a,"smile"),s(o,"sad"),s(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),i}),"drawFace"),O=s((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),L=s((function(t,n){return e(t,n)}),"drawText"),D=s((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}s(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)}),"drawLabel"),F=s((function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,C(s,r),z(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)}),"drawSection"),B=-1,N=s((function(t,e,i){const s=e.x+i.width/2,r=t.append("g");B++;r.append("line").attr("id","task"+B).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),V(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=n();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,C(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};O(r,i),o+=10})),z(i)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)}),"drawTask"),R=s((function(t,e){i(t,e)}),"drawBackgroundRect"),z=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,c=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",u);c.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),c.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,s,r,a,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,c,l),i(u,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return s(t,"byText"),s(e,"byTspan"),s(n,"byFo"),s(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Y={drawRect:C,drawCircle:O,drawSection:F,drawText:L,drawLabel:D,drawTask:N,drawBackgroundRect:R,initGraphics:s((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}),"initGraphics")},q=s((function(t){Object.keys(t).forEach((function(e){G[e]=t[e]}))}),"setConf"),W={};function X(t){const e=r().journey;let n=60;Object.keys(W).forEach((i=>{const s=W[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:W[i].position};Y.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Y.drawText(t,a),n+=20}))}s(X,"drawActorLegend");var G=r().journey,U=G.leftMargin,H=s((function(t,e,n,i){const s=r().journey,a=r().securityLevel;let o;"sandbox"===a&&(o=d("#i"+e));const c=d("sandbox"===a?o.nodes()[0].contentDocument.body:"body");Z.init();const l=c.select("#"+e);Y.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),p=i.db.getActors();for(const r in W)delete W[r];let f=0;p.forEach((t=>{W[t]={color:s.actorColours[f%s.actorColours.length],position:f},f++})),X(l),Z.insert(0,0,U,50*Object.keys(W).length),Q(l,h,0);const g=Z.getBounds();u&&l.append("text").text(u).attr("x",U).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=g.stopy-g.starty+2*s.diagramMarginY,x=U+g.stopx+2*s.diagramMarginX;y(l,m,x,s.useMaxWidth),l.append("line").attr("x1",U).attr("y1",4*s.height).attr("x2",x-U-4).attr("y2",4*s.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=u?70:0;l.attr("viewBox",`${g.startx} -25 ${x} ${m+k}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+k+25)}),"draw"),Z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:s((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:s((function(t,e,n,i){const a=r().journey,o=this;let c=0;function l(r){return s((function(s){c++;const l=o.sequenceItems.length-c+1;o.updateVal(s,"starty",e-l*a.boxMargin,Math.min),o.updateVal(s,"stopy",i+l*a.boxMargin,Math.max),o.updateVal(Z.data,"startx",t-l*a.boxMargin,Math.min),o.updateVal(Z.data,"stopx",n+l*a.boxMargin,Math.max),"activation"!==r&&(o.updateVal(s,"startx",t-l*a.boxMargin,Math.min),o.updateVal(s,"stopx",n+l*a.boxMargin,Math.max),o.updateVal(Z.data,"starty",e-l*a.boxMargin,Math.min),o.updateVal(Z.data,"stopy",i+l*a.boxMargin,Math.max))}),"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())}),"updateBounds"),insert:s((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Z.data,"startx",s,Math.min),this.updateVal(Z.data,"starty",a,Math.min),this.updateVal(Z.data,"stopx",r,Math.max),this.updateVal(Z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:s((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:s((function(){return this.verticalPos}),"getVerticalPos"),getBounds:s((function(){return this.data}),"getBounds")},J=G.sectionFills,K=G.sectionColours,Q=s((function(t,e,n){const i=r().journey;let s="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[r,u]of e.entries()){if(s!==u.section){c=J[o%J.length],h=o%J.length,l=K[o%K.length];let n=0;const a=u.section;for(let t=r;t<e.length&&e[t].section==a;t++)n+=1;const p={x:r*i.taskMargin+r*i.width+U,y:50,text:u.section,fill:c,num:h,colour:l,taskCount:n};Y.drawSection(t,p,i),s=u.section,o++}const n=u.people.reduce(((t,e)=>(W[e]&&(t[e]=W[e]),t)),{});u.x=r*i.taskMargin+r*i.width+U,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=l,u.fill=c,u.num=h,u.actors=n,Y.drawTask(t,u,i),Z.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}}),"drawTasks"),tt={setConf:q,draw:H},et={parser:m,db:I,renderer:tt,styles:j,init:s((t=>{tt.setConf(t.journey),I.clear()}),"init")};export{et as diagram};
|
|
1
|
+
import{a as t,g as e,f as n,d as i}from"./chunk-ASOPGD6M-BTwtja0i.js";import{_ as s,g as r,s as a,a as o,b as c,n as l,o as h,c as u,d as p,v as y}from"./mermaid-D_CQoy18.js";import{s as d}from"./transform-CdY8z5kT.js";import{d as f}from"./arc-B5qYPUYs.js";import"./index-Bs-_nZ1-.js";import"./step-xJWGRC3d.js";var g=function(){var t=s((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:s((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:s((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),s(m,"lex");for(var x,k,_,b,v,w,$,T,M={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=o[k]&&o[k][x]),void 0===_||!_.length||!_[0]){var S="";for(v in T=[],o[k])this.terminals_[v]&&v>2&&T.push("'"+this.terminals_[v]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:T})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),x=null,h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(w=this.productions_[_[1]][1],M.$=r[r.length-w],M._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},g&&(M._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(M,[c,h,l,y.yy,_[1],r,a].concat(u))))return b;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[_[1]][0]),r.push(M.$),a.push(M._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:s((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:s((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:s((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:s((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:s((function(){return this._more=!0,this}),"more"),reject:s((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:s((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:s((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:s((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:s((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:s((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:s((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:s((function(){var t=this.next();return t||this.lex()}),"lex"),begin:s((function(t){this.conditionStack.push(t)}),"begin"),popState:s((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:s((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:s((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:s((function(t){this.begin(t)}),"pushState"),stateStackSize:s((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:s((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,s(u,"Parser"),u.prototype=l,l.Parser=u,new u}();g.parser=g;var m=g,x="",k=[],_=[],b=[],v=s((function(){k.length=0,_.length=0,x="",b.length=0,y()}),"clear"),w=s((function(t){x=t,k.push(t)}),"addSection"),$=s((function(){return k}),"getSections"),T=s((function(){let t=E();let e=0;for(;!t&&e<100;)t=E(),e++;return _.push(...b),_}),"getTasks"),M=s((function(){const t=[];_.forEach((e=>{e.people&&t.push(...e.people)}));return[...new Set(t)].sort()}),"updateActors"),S=s((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:x,type:x,people:r,task:t,score:i};b.push(a)}),"addTask"),A=s((function(t){const e={section:x,type:x,description:t,task:t,classes:[]};_.push(e)}),"addTaskOrg"),E=s((function(){const t=s((function(t){return b[t].processed}),"compileTask");let e=!0;for(const[n,i]of b.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),P=s((function(){return M()}),"getActors"),I={getConfig:s((()=>u().journey),"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:l,setAccTitle:c,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:w,getSections:$,getTasks:T,addTask:S,addTaskOrg:A,getActors:P},C=s((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),j=s((function(t,e){return i(t,e)}),"drawRect"),V=s((function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=f().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const i=f().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s(a,"smile"),s(o,"sad"),s(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),i}),"drawFace"),O=s((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),L=s((function(t,e){return n(t,e)}),"drawText"),D=s((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}s(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)}),"drawLabel"),F=s((function(t,n,i){const s=t.append("g"),r=e();r.x=n.x,r.y=n.y,r.fill=n.fill,r.width=i.width*n.taskCount+i.diagramMarginX*(n.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+n.num,r.rx=3,r.ry=3,j(s,r),z(i)(n.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+n.num},i,n.colour)}),"drawSection"),B=-1,N=s((function(t,n,i){const s=n.x+i.width/2,r=t.append("g");B++;r.append("line").attr("id","task"+B).attr("x1",s).attr("y1",n.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),V(r,{cx:s,cy:300+30*(5-n.score),score:n.score});const a=e();a.x=n.x,a.y=n.y,a.fill=n.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+n.num,a.rx=3,a.ry=3,j(r,a);let o=n.x+14;n.people.forEach((t=>{const e=n.actors[t].color,i={cx:o,cy:n.y,r:7,fill:e,stroke:"#000",title:t,pos:n.actors[t].position};O(r,i),o+=10})),z(i)(n.task,r,a.x,a.y,a.width,a.height,{class:"task"},i,n.colour)}),"drawTask"),R=s((function(e,n){t(e,n)}),"drawBackgroundRect"),z=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,c=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",u);c.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),c.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,s,r,a,o,c,l){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,c,l),i(u,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return s(t,"byText"),s(e,"byTspan"),s(n,"byFo"),s(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Y={drawRect:j,drawCircle:O,drawSection:F,drawText:L,drawLabel:D,drawTask:N,drawBackgroundRect:R,initGraphics:s((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}),"initGraphics")},W=s((function(t){Object.keys(t).forEach((function(e){G[e]=t[e]}))}),"setConf"),X={};function q(t){const e=u().journey;let n=60;Object.keys(X).forEach((i=>{const s=X[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:X[i].position};Y.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Y.drawText(t,a),n+=20}))}s(q,"drawActorLegend");var G=u().journey,U=G.leftMargin,H=s((function(t,e,n,i){const s=u().journey,r=u().securityLevel;let a;"sandbox"===r&&(a=d("#i"+e));const o=d("sandbox"===r?a.nodes()[0].contentDocument.body:"body");Z.init();const c=o.select("#"+e);Y.initGraphics(c);const l=i.db.getTasks(),h=i.db.getDiagramTitle(),y=i.db.getActors();for(const u in X)delete X[u];let f=0;y.forEach((t=>{X[t]={color:s.actorColours[f%s.actorColours.length],position:f},f++})),q(c),Z.insert(0,0,U,50*Object.keys(X).length),Q(c,l,0);const g=Z.getBounds();h&&c.append("text").text(h).attr("x",U).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=g.stopy-g.starty+2*s.diagramMarginY,x=U+g.stopx+2*s.diagramMarginX;p(c,m,x,s.useMaxWidth),c.append("line").attr("x1",U).attr("y1",4*s.height).attr("x2",x-U-4).attr("y2",4*s.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=h?70:0;c.attr("viewBox",`${g.startx} -25 ${x} ${m+k}`),c.attr("preserveAspectRatio","xMinYMin meet"),c.attr("height",m+k+25)}),"draw"),Z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:s((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:s((function(t,e,n,i){const r=u().journey,a=this;let o=0;function c(c){return s((function(s){o++;const l=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-l*r.boxMargin,Math.min),a.updateVal(s,"stopy",i+l*r.boxMargin,Math.max),a.updateVal(Z.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(Z.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==c&&(a.updateVal(s,"startx",t-l*r.boxMargin,Math.min),a.updateVal(s,"stopx",n+l*r.boxMargin,Math.max),a.updateVal(Z.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(Z.data,"stopy",i+l*r.boxMargin,Math.max))}),"updateItemBounds")}s(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:s((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Z.data,"startx",s,Math.min),this.updateVal(Z.data,"starty",a,Math.min),this.updateVal(Z.data,"stopx",r,Math.max),this.updateVal(Z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:s((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:s((function(){return this.verticalPos}),"getVerticalPos"),getBounds:s((function(){return this.data}),"getBounds")},J=G.sectionFills,K=G.sectionColours,Q=s((function(t,e,n){const i=u().journey;let s="";const r=n+(2*i.height+i.diagramMarginY);let a=0,o="#CCC",c="black",l=0;for(const[h,u]of e.entries()){if(s!==u.section){o=J[a%J.length],l=a%J.length,c=K[a%K.length];let n=0;const r=u.section;for(let t=h;t<e.length&&e[t].section==r;t++)n+=1;const p={x:h*i.taskMargin+h*i.width+U,y:50,text:u.section,fill:o,num:l,colour:c,taskCount:n};Y.drawSection(t,p,i),s=u.section,a++}const n=u.people.reduce(((t,e)=>(X[e]&&(t[e]=X[e]),t)),{});u.x=h*i.taskMargin+h*i.width+U,u.y=r,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=c,u.fill=o,u.num=l,u.actors=n,Y.drawTask(t,u,i),Z.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}}),"drawTasks"),tt={setConf:W,draw:H},et={parser:m,db:I,renderer:tt,styles:C,init:s((t=>{tt.setConf(t.journey),I.clear()}),"init")};export{et as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,l as e,d as n,H as i,Y as s,$ as r,a0 as o,T as a,B as l,i as c,r as h,J as u,V as d,W as g,X as p}from"./mermaid-Bic4bmVF.js";import"./index-BhVxrMm_.js";import"./transform-D6ULhE8R.js";import"./step-CaHXtLdi.js";var y=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],g=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],_=[1,36],b=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},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,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t((function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:h,7:u,10:23,11:d},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:l}),e(g,[2,19]),e(g,[2,21],{15:30,24:p}),e(g,[2,22]),e(g,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(f,[2,14],{7:m,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(g,[2,16],{15:37,24:p}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:_}),e(b,[2,11]),e(b,[2,12]),e(g,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:t((function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(e,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),t(m,"lex");for(var _,b,k,E,S,N,v,x,L={};;){if(b=i[i.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==_&&(_=m()),k=a[b]&&a[b][_]),void 0===k||!k.length||!k[0]){var D="";for(S in x=[],a[b])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");D=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:x})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(k[0]){case 1:i.push(_),r.push(d.yytext),o.push(d.yylloc),i.push(k[1]),_=null,h=d.yyleng,l=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(N=this.productions_[k[1]][1],L.$=r[r.length-N],L._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(L._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(L,[l,h,c,g.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(L.$),o.push(L._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}),"parse")},S=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:t((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((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:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}}),"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();y.parser=y;var f=y,m=[],_=[],b=0,k={},E=t((()=>{m=[],_=[],b=0,k={}}),"clear"),S=t((t=>{if(0===m.length)return null;const e=m[0].level;let n=null;for(let i=m.length-1;i>=0;i--)if(m[i].level!==e||n||(n=m[i]),m[i].level<e)throw new Error('Items without section detected, found section ("'+m[i].label+'")');return t===(null==n?void 0:n.level)?null:n}),"getSection"),N=t((function(){return _}),"getSections"),v=t((function(){const t=[],e=N(),i=n();for(const n of e){const e={id:n.id,label:c(n.label??"",i),isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=m.filter((t=>t.parentId===n.id));for(const r of s){const e={id:r.id,parentId:n.id,label:c(r.label??"",i),isGroup:!1,ticket:null==r?void 0:r.ticket,priority:null==r?void 0:r.priority,assigned:null==r?void 0:r.assigned,icon:null==r?void 0:r.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}}),"getData"),x=t(((t,e,i,s,r)=>{var o,a;const d=n();let g=(null==(o=d.mindmap)?void 0:o.padding)??l.mindmap.padding;switch(s){case L.ROUNDED_RECT:case L.RECT:case L.HEXAGON:g*=2}const p={id:c(e,d)||"kbn"+b++,level:t,label:c(i,d),width:(null==(a=d.mindmap)?void 0:a.maxNodeWidth)??l.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);(null==e?void 0:e.shape)&&"kanbanItem"===e.shape&&(p.shape=null==e?void 0:e.shape),(null==e?void 0:e.label)&&(p.label=null==e?void 0:e.label),(null==e?void 0:e.icon)&&(p.icon=null==e?void 0:e.icon.toString()),(null==e?void 0:e.assigned)&&(p.assigned=null==e?void 0:e.assigned.toString()),(null==e?void 0:e.ticket)&&(p.ticket=null==e?void 0:e.ticket.toString()),(null==e?void 0:e.priority)&&(p.priority=null==e?void 0:e.priority)}const y=S(t);y?p.parentId=y.id||"kbn"+b++:_.push(p),m.push(p)}),"addNode"),L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},D={clear:E,addNode:x,getSections:N,getData:v,nodeType:L,getType:t(((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return L.RECT;case"(":return")"===n?L.ROUNDED_RECT:L.CLOUD;case"((":return L.CIRCLE;case")":return L.CLOUD;case"))":return L.BANG;case"{{":return L.HEXAGON;default:return L.DEFAULT}}),"getType"),setElementForId:t(((t,e)=>{k[t]=e}),"setElementForId"),decorateNode:t((t=>{if(!t)return;const e=n(),i=m[m.length-1];t.icon&&(i.icon=c(t.icon,e)),t.class&&(i.cssClasses=c(t.class,e))}),"decorateNode"),type2Str:t((t=>{switch(t){case L.DEFAULT:return"no-border";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded-rect";case L.CIRCLE:return"circle";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:t((()=>e),"getLogger"),getElementById:t((t=>k[t]),"getElementById")},I={draw:t((async(t,c,h,u)=>{var d,g,p,y,f;e.debug("Rendering kanban diagram\n"+t);const m=u.db.getData(),_=n();_.htmlLabels=!1;const b=i(c),k=b.append("g");k.attr("class","sections");const E=b.append("g");E.attr("class","items");const S=m.nodes.filter((t=>t.isGroup));let N=0;const v=[];let x=25;for(const e of S){const t=(null==(d=null==_?void 0:_.kanban)?void 0:d.sectionWidth)||200;N+=1,e.x=t*N+10*(N-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+N;const n=await s(k,e);x=Math.max(x,null==(g=null==n?void 0:n.labelBBox)?void 0:g.height),v.push(n)}let L=0;for(const e of S){const t=v[L];L+=1;const n=(null==(p=null==_?void 0:_.kanban)?void 0:p.sectionWidth)||200,i=3*-n/2+x;let s=i;const a=m.nodes.filter((t=>t.parentId===e.id));for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(E,h,{config:_})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const l=t.cluster.select("rect"),c=Math.max(s-i+30,50)+(x-25);l.attr("height",c)}a(void 0,b,(null==(y=_.mindmap)?void 0:y.padding)??l.kanban.padding,(null==(f=_.mindmap)?void 0:f.useMaxWidth)??l.kanban.useMaxWidth)}),"draw")},O=t((e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],d(e["lineColor"+t])?e["lineColor"+t]=g(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t(((t,n)=>e.darkMode?p(t,n):g(t,n)),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n}),"genSections"),C={db:D,renderer:I,parser:f,styles:t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${O(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")};export{C as diagram};
|
|
1
|
+
import{_ as t,l as e,c as n,H as i,Y as s,$ as r,a0 as o,R as a,F as l,h as c,x as h,J as u,S as d,T as g,V as p}from"./mermaid-D_CQoy18.js";import"./index-Bs-_nZ1-.js";import"./transform-CdY8z5kT.js";import"./step-xJWGRC3d.js";var y=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],g=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],_=[1,36],b=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},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,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t((function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:h,7:u,10:23,11:d},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:l}),e(g,[2,19]),e(g,[2,21],{15:30,24:p}),e(g,[2,22]),e(g,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(f,[2,14],{7:m,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(g,[2,16],{15:37,24:p}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:_}),e(b,[2,11]),e(b,[2,12]),e(g,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:t((function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(e,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),t(m,"lex");for(var _,b,k,E,S,N,v,x,L={};;){if(b=i[i.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==_&&(_=m()),k=a[b]&&a[b][_]),void 0===k||!k.length||!k[0]){var D="";for(S in x=[],a[b])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");D=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:x})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(k[0]){case 1:i.push(_),r.push(d.yytext),o.push(d.yylloc),i.push(k[1]),_=null,h=d.yyleng,l=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(N=this.productions_[k[1]][1],L.$=r[r.length-N],L._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(L._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(L,[l,h,c,g.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(L.$),o.push(L._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}),"parse")},S=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:t((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((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:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}}),"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();y.parser=y;var f=y,m=[],_=[],b=0,k={},E=t((()=>{m=[],_=[],b=0,k={}}),"clear"),S=t((t=>{if(0===m.length)return null;const e=m[0].level;let n=null;for(let i=m.length-1;i>=0;i--)if(m[i].level!==e||n||(n=m[i]),m[i].level<e)throw new Error('Items without section detected, found section ("'+m[i].label+'")');return t===(null==n?void 0:n.level)?null:n}),"getSection"),N=t((function(){return _}),"getSections"),v=t((function(){const t=[],e=N(),i=n();for(const n of e){const e={id:n.id,label:c(n.label??"",i),isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=m.filter((t=>t.parentId===n.id));for(const r of s){const e={id:r.id,parentId:n.id,label:c(r.label??"",i),isGroup:!1,ticket:null==r?void 0:r.ticket,priority:null==r?void 0:r.priority,assigned:null==r?void 0:r.assigned,icon:null==r?void 0:r.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}}),"getData"),x=t(((t,e,i,s,r)=>{var o,a;const d=n();let g=(null==(o=d.mindmap)?void 0:o.padding)??l.mindmap.padding;switch(s){case L.ROUNDED_RECT:case L.RECT:case L.HEXAGON:g*=2}const p={id:c(e,d)||"kbn"+b++,level:t,label:c(i,d),width:(null==(a=d.mindmap)?void 0:a.maxNodeWidth)??l.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);(null==e?void 0:e.shape)&&"kanbanItem"===e.shape&&(p.shape=null==e?void 0:e.shape),(null==e?void 0:e.label)&&(p.label=null==e?void 0:e.label),(null==e?void 0:e.icon)&&(p.icon=null==e?void 0:e.icon.toString()),(null==e?void 0:e.assigned)&&(p.assigned=null==e?void 0:e.assigned.toString()),(null==e?void 0:e.ticket)&&(p.ticket=null==e?void 0:e.ticket.toString()),(null==e?void 0:e.priority)&&(p.priority=null==e?void 0:e.priority)}const y=S(t);y?p.parentId=y.id||"kbn"+b++:_.push(p),m.push(p)}),"addNode"),L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},D={clear:E,addNode:x,getSections:N,getData:v,nodeType:L,getType:t(((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return L.RECT;case"(":return")"===n?L.ROUNDED_RECT:L.CLOUD;case"((":return L.CIRCLE;case")":return L.CLOUD;case"))":return L.BANG;case"{{":return L.HEXAGON;default:return L.DEFAULT}}),"getType"),setElementForId:t(((t,e)=>{k[t]=e}),"setElementForId"),decorateNode:t((t=>{if(!t)return;const e=n(),i=m[m.length-1];t.icon&&(i.icon=c(t.icon,e)),t.class&&(i.cssClasses=c(t.class,e))}),"decorateNode"),type2Str:t((t=>{switch(t){case L.DEFAULT:return"no-border";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded-rect";case L.CIRCLE:return"circle";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:t((()=>e),"getLogger"),getElementById:t((t=>k[t]),"getElementById")},I={draw:t((async(t,c,h,u)=>{var d,g,p,y,f;e.debug("Rendering kanban diagram\n"+t);const m=u.db.getData(),_=n();_.htmlLabels=!1;const b=i(c),k=b.append("g");k.attr("class","sections");const E=b.append("g");E.attr("class","items");const S=m.nodes.filter((t=>t.isGroup));let N=0;const v=[];let x=25;for(const e of S){const t=(null==(d=null==_?void 0:_.kanban)?void 0:d.sectionWidth)||200;N+=1,e.x=t*N+10*(N-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+N;const n=await s(k,e);x=Math.max(x,null==(g=null==n?void 0:n.labelBBox)?void 0:g.height),v.push(n)}let L=0;for(const e of S){const t=v[L];L+=1;const n=(null==(p=null==_?void 0:_.kanban)?void 0:p.sectionWidth)||200,i=3*-n/2+x;let s=i;const a=m.nodes.filter((t=>t.parentId===e.id));for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(E,h,{config:_})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const l=t.cluster.select("rect"),c=Math.max(s-i+30,50)+(x-25);l.attr("height",c)}a(void 0,b,(null==(y=_.mindmap)?void 0:y.padding)??l.kanban.padding,(null==(f=_.mindmap)?void 0:f.useMaxWidth)??l.kanban.useMaxWidth)}),"draw")},O=t((e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],d(e["lineColor"+t])?e["lineColor"+t]=g(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t(((t,n)=>e.darkMode?p(t,n):g(t,n)),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n}),"genSections"),C={db:D,renderer:I,parser:f,styles:t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${O(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")};export{C as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e}from"./graph-B1pkpu6x.js";import{b as n,e as r,c as t,i as o,f as i,v as a,r as u}from"./_baseUniq-C-EGQjpX.js";import{b as d,a as c,m as s,c as f,h,f as g,l as v,d as l}from"./min-uVplt8ii.js";import{cd as p,bG as w,cT as m,aj as b,cU as y,cM as x,cV as k,cW as E,B as N,ah as O,cX as _,cY as I}from"./index-Bs-_nZ1-.js";import{c as P,a as j}from"./_baseEach-CP_Ww34_.js";import{s as R}from"./sortBy-DK-gqwbw.js";function T(e,n){return e>n}function M(e,n){var r={};return n=j(n),P(e,(function(e,t,o){m(r,t,n(e,t,o))})),r}function L(e){return e&&e.length?d(e,b,T):void 0}function C(e,n){return e&&e.length?d(e,j(n),c):void 0}var S=0;function G(e){var n=++S;return y(e)+n}class V{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return B(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&B(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,F)),r=r._prev;return"["+e.join(", ")+"]"}}function B(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function F(e,n){if("_next"!==e&&"_prev"!==e)return n}var q=N(1);function Y(n,r){if(n.nodeCount()<=1)return[];var o=function(n,r){var o=new e,i=0,a=0;t(n.nodes(),(function(e){o.setNode(e,{v:e,in:0,out:0})})),t(n.edges(),(function(e){var n=o.edge(e.v,e.w)||0,t=r(e),u=n+t;o.setEdge(e.v,e.w,u),a=Math.max(a,o.node(e.v).out+=t),i=Math.max(i,o.node(e.w).in+=t)}));var u=E(a+i+3).map((function(){return new V})),d=i+1;return t(o.nodes(),(function(e){D(u,d,o.node(e))})),{graph:o,buckets:u,zeroIdx:d}}(n,r||q),i=function(e,n,r){var t,o=[],i=n[n.length-1],a=n[0];for(;e.nodeCount();){for(;t=a.dequeue();)z(e,n,r,t);for(;t=i.dequeue();)z(e,n,r,t);if(e.nodeCount())for(var u=n.length-2;u>0;--u)if(t=n[u].dequeue()){o=o.concat(z(e,n,r,t,!0));break}}return o}(o.graph,o.buckets,o.zeroIdx);return k(s(i,(function(e){return n.outEdges(e.v,e.w)})))}function z(e,n,r,o,i){var a=i?[]:void 0;return t(e.inEdges(o.v),(function(t){var o=e.edge(t),u=e.node(t.v);i&&a.push({v:t.v,w:t.w}),u.out-=o,D(n,r,u)})),t(e.outEdges(o.v),(function(t){var o=e.edge(t),i=t.w,a=e.node(i);a.in-=o,D(n,r,a)})),e.removeNode(o.v),a}function D(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 A(e){var n,r="greedy"===e.graph().acyclicer?Y(e,(n=e,function(e){return n.edge(e).weight})):function(e){var n=[],r={},o={};function i(a){Object.prototype.hasOwnProperty.call(o,a)||(o[a]=!0,r[a]=!0,t(e.outEdges(a),(function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)})),delete r[a])}return t(e.nodes(),i),n}(e);t(r,(function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,G("rev"))}))}function U(e,n,r,t){var o;do{o=G(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function J(n){var r=new e({multigraph:n.isMultigraph()}).setGraph(n.graph());return t(n.nodes(),(function(e){n.children(e).length||r.setNode(e,n.node(e))})),t(n.edges(),(function(e){r.setEdge(e,n.edge(e))})),r}function W(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,u=n.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,t=c):(a<0&&(d=-d),r=d,t=d*u/a),{x:o+r,y:i+t}}function X(e){var n=s(E(K(e)+1),(function(){return[]}));return t(e.nodes(),(function(r){var t=e.node(r),i=t.rank;o(i)||(n[i][t.order]=r)})),n}function H(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),U(e,"border",o,n)}function K(e){return L(s(e.nodes(),(function(n){var r=e.node(n).rank;if(!o(r))return r})))}function Q(e,n){return n()}function Z(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},u=o[n][i-1],d=U(e,"border",a,r);o[n][i]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function $(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t(e.nodes(),(function(n){re(e.node(n))})),t(e.edges(),(function(n){var r=e.edge(n);t(r.points,re),Object.prototype.hasOwnProperty.call(r,"y")&&re(r)}))}(e),"lr"!==n&&"rl"!==n||(!function(e){t(e.nodes(),(function(n){te(e.node(n))})),t(e.edges(),(function(n){var r=e.edge(n);t(r.points,te),Object.prototype.hasOwnProperty.call(r,"x")&&te(r)}))}(e),ee(e))}function ee(e){t(e.nodes(),(function(n){ne(e.node(n))})),t(e.edges(),(function(n){ne(e.edge(n))}))}function ne(e){var n=e.width;e.width=e.height,e.height=n}function re(e){e.y=-e.y}function te(e){var n=e.x;e.x=e.y,e.y=n}function oe(e){e.graph().dummyChains=[],t(e.edges(),(function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(i===t+1)return;e.removeEdge(n);var c,s,f=void 0;for(s=0,++t;t<i;++s,++t)u.points=[],c=U(e,"edge",f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),0===s&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,o,{weight:u.weight},a)}(e,n)}))}function ie(e){var n={};t(e.sources(),(function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=f(s(e.outEdges(t),(function(n){return r(n.w)-e.edge(n).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))}function ae(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function ue(n){var r,t,o=new e({directed:!1}),i=n.nodes()[0],a=n.nodeCount();for(o.setNode(i,{});de(o,n)<a;)r=ce(o,n),t=o.hasNode(r.v)?ae(n,r):-ae(n,r),se(o,n,t);return o}function de(e,n){return t(e.nodes(),(function r(o){t(n.nodeEdges(o),(function(t){var i=t.v,a=o===i?t.w:i;e.hasNode(a)||ae(n,t)||(e.setNode(a,{}),e.setEdge(o,a,{}),r(a))}))})),e.nodeCount()}function ce(e,n){return C(n.edges(),(function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ae(n,r)}))}function se(e,n,r){t(e.nodes(),(function(e){n.node(e).rank+=r}))}function fe(e,n,r){O(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return t(n,(function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);he(e,n,"post"===r,a,o,i)})),i}function he(e,n,r,o,i,a){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||a.push(n),t(i(n),(function(n){he(e,n,r,o,i,a)})),r&&a.push(n))}function ge(n){n=function(n){var r=(new e).setGraph(n.graph());return t(n.nodes(),(function(e){r.setNode(e,n.node(e))})),t(n.edges(),(function(e){var t=r.edge(e.v,e.w)||{weight:0,minlen:1},o=n.edge(e);r.setEdge(e.v,e.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})})),r}(n),ie(n);var r,o=ue(n);for(pe(o),ve(o,n);r=me(o);)ye(o,n,r,be(o,n,r))}function ve(e,n){var r=function(e,n){return fe(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t(r,(function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=le(e,n,r)}(e,n,r)}))}function le(e,n,r){var o=e.node(r).parent,i=!0,a=n.edge(r,o),u=0;return a||(i=!1,a=n.edge(o,r)),u=a.weight,t(n.nodeEdges(r),(function(t){var a,d,c=t.v===r,s=c?t.w:t.v;if(s!==o){var f=c===i,h=n.edge(t).weight;if(u+=f?h:-h,a=r,d=s,e.hasEdge(a,d)){var g=e.edge(r,s).cutvalue;u+=f?-g:g}}})),u}function pe(e,n){arguments.length<2&&(n=e.nodes()[0]),we(e,{},1,n)}function we(e,n,r,o,i){var a=r,u=e.node(o);return n[o]=!0,t(e.neighbors(o),(function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=we(e,n,r,t,o))})),u.low=a,u.lim=r++,i?u.parent=i:delete u.parent,r}function me(e){return g(e.edges(),(function(n){return e.edge(n).cutvalue<0}))}function be(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var a=e.node(t),u=e.node(o),d=a,c=!1;return a.lim>u.lim&&(d=u,c=!0),C(i(n.edges(),(function(n){return c===xe(e,e.node(n.v),d)&&c!==xe(e,e.node(n.w),d)})),(function(e){return ae(n,e)}))}function ye(e,n,r,o){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),pe(e),ve(e,n),function(e,n){var r=g(e.nodes(),(function(e){return!n.node(e).parent})),o=function(e,n){return fe(e,n,"pre")}(e,r);o=o.slice(1),t(o,(function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function xe(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function ke(e){switch(e.graph().ranker){case"network-simplex":default:Ne(e);break;case"tight-tree":!function(e){ie(e),ue(e)}(e);break;case"longest-path":Ee(e)}}new Error,ge.initLowLimValues=pe,ge.initCutValues=ve,ge.calcCutValue=le,ge.leaveEdge=me,ge.enterEdge=be,ge.exchangeEdges=ye;var Ee=ie;function Ne(e){ge(e)}function Oe(e){var n=U(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var a=e.children(o);a&&a.length&&t(a,(function(e){r(e,i+1)})),n[o]=i}return t(e.children(),(function(e){r(e,1)})),n}(e),o=L(a(r))-1,i=2*o+1;e.graph().nestingRoot=n,t(e.edges(),(function(n){e.edge(n).minlen*=i}));var d=function(e){return u(e.edges(),(function(n,r){return n+e.edge(r).weight}),0)}(e)+1;t(e.children(),(function(t){_e(e,n,i,d,o,r,t)})),e.graph().nodeRankFactor=i}function _e(e,n,r,o,i,a,u){var d=e.children(u);if(d.length){var c=H(e,"_bt"),s=H(e,"_bb"),f=e.node(u);e.setParent(c,u),f.borderTop=c,e.setParent(s,u),f.borderBottom=s,t(d,(function(t){_e(e,n,r,o,i,a,t);var d=e.node(t),f=d.borderTop?d.borderTop:t,h=d.borderBottom?d.borderBottom:t,g=d.borderTop?o:2*o,v=f!==h?1:i-a[u]+1;e.setEdge(c,f,{weight:g,minlen:v,nestingEdge:!0}),e.setEdge(h,s,{weight:g,minlen:v,nestingEdge:!0})})),e.parent(u)||e.setEdge(n,c,{weight:0,minlen:i+a[u]})}else u!==n&&e.setEdge(n,u,{weight:0,minlen:r})}function Ie(n,r,i){var a=function(e){var n;for(;e.hasNode(n=G("_root")););return n}(n),u=new e({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return n.node(e)}));return t(n.nodes(),(function(e){var d=n.node(e),c=n.parent(e);(d.rank===r||d.minRank<=r&&r<=d.maxRank)&&(u.setNode(e),u.setParent(e,c||a),t(n[i](e),(function(r){var t=r.v===e?r.w:r.v,i=u.edge(t,e),a=o(i)?0:i.weight;u.setEdge(t,e,{weight:n.edge(r).weight+a})})),Object.prototype.hasOwnProperty.call(d,"minRank")&&u.setNode(e,{borderLeft:d.borderLeft[r],borderRight:d.borderRight[r]}))})),u}function Pe(e,n){for(var r=0,t=1;t<n.length;++t)r+=je(e,n[t-1],n[t]);return r}function je(e,n,r){for(var o,i,a=(o=r,i=s(r,(function(e,n){return n})),function(e,n,r){for(var t=-1,o=e.length,i=n.length,a={};++t<o;){var u=t<i?n[t]:void 0;r(a,e[t],u)}return a}(o||[],i||[],x)),u=k(s(n,(function(n){return R(s(e.outEdges(n),(function(n){return{pos:a[n.w],weight:e.edge(n).weight}})),"pos")}))),d=1;d<r.length;)d<<=1;var c=2*d-1;d-=1;var f=s(new Array(c),(function(){return 0})),h=0;return t(u.forEach((function(e){var n=e.pos+d;f[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=f[n+1]),f[n=n-1>>1]+=e.weight;h+=e.weight*r}))),h}function Re(e,n){var r={};return t(e,(function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};o(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)})),t(n.edges(),(function(e){var n=r[e.v],t=r[e.w];o(n)||o(t)||(t.indegree++,n.out.push(r[e.w]))})),function(e){var n=[];function r(e){return function(n){n.merged||(o(n.barycenter)||o(e.barycenter)||n.barycenter>=e.barycenter)&&function(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}(e,n)}}function a(n){return function(r){r.in.push(n),0==--r.indegree&&e.push(r)}}for(;e.length;){var u=e.pop();n.push(u),t(u.in.reverse(),r(u)),t(u.out,a(u))}return s(i(n,(function(e){return!e.merged})),(function(e){return _(e,["vs","i","barycenter","weight"])}))}(i(r,(function(e){return!e.indegree})))}function Te(e,n){var r,o=function(e,n){var r={lhs:[],rhs:[]};return t(e,(function(e){n(e)?r.lhs.push(e):r.rhs.push(e)})),r}(e,(function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})),i=o.lhs,a=R(o.rhs,(function(e){return-e.i})),u=[],d=0,c=0,s=0;i.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),s=Me(u,a,s),t(i,(function(e){s+=e.vs.length,u.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,s=Me(u,a,s)}));var f={vs:k(u)};return c&&(f.barycenter=d/c,f.weight=c),f}function Me(e,n,r){for(var t;n.length&&(t=v(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Le(e,n,r,a){var d=e.children(n),c=e.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,g={};f&&(d=i(d,(function(e){return e!==f&&e!==h})));var v=function(e,n){return s(n,(function(n){var r=e.inEdges(n);if(r.length){var t=u(r,(function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}}),{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}}))}(e,d);t(v,(function(n){if(e.children(n.v).length){var t=Le(e,n.v,r,a);g[n.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter")&&(u=t,o((i=n).barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u}));var l=Re(v,r);!function(e,n){t(e,(function(e){e.vs=k(e.vs.map((function(e){return n[e]?n[e].vs:e})))}))}(l,g);var p=Te(l,a);if(f&&(p.vs=k([f,p.vs,h]),e.predecessors(f).length)){var w=e.node(e.predecessors(f)[0]),m=e.node(e.predecessors(h)[0]);Object.prototype.hasOwnProperty.call(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+w.order+m.order)/(p.weight+2),p.weight+=2}return p}function Ce(e){var r=K(e),o=Se(e,E(1,r+1),"inEdges"),a=Se(e,E(r-1,-1,-1),"outEdges"),u=function(e){var n={},r=i(e.nodes(),(function(n){return!e.children(n).length})),o=L(s(r,(function(n){return e.node(n).rank}))),a=s(E(o+1),(function(){return[]})),u=R(r,(function(n){return e.node(n).rank}));return t(u,(function r(o){if(!h(n,o)){n[o]=!0;var i=e.node(o);a[i.rank].push(o),t(e.successors(o),r)}})),a}(e);Ve(e,u);for(var d,c=Number.POSITIVE_INFINITY,f=0,g=0;g<4;++f,++g){Ge(f%2?o:a,f%4>=2);var v=Pe(e,u=X(e));v<c&&(g=0,d=n(u,5),c=v)}Ve(e,d)}function Se(e,n,r){return s(n,(function(n){return Ie(e,n,r)}))}function Ge(n,r){var o=new e;t(n,(function(e){var n=e.graph().root,i=Le(e,n,o,r);t(i.vs,(function(n,r){e.node(n).order=r})),function(e,n,r){var o,i={};t(r,(function(r){for(var t,a,u=e.parent(r);u;){if((t=e.parent(u))?(a=i[t],i[t]=u):(a=o,o=u),a&&a!==u)return void n.setEdge(a,u);u=t}}))}(e,o,i.vs)}))}function Ve(e,n){t(n,(function(n){t(n,(function(n,r){e.node(n).order=r}))}))}function Be(e){var n=function(e){var n={},r=0;function o(i){var a=r;t(e.children(i),o),n[i]={low:a,lim:r++}}return t(e.children(),o),n}(e);t(e.graph().dummyChains,(function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,a=[],u=[],d=Math.min(n[r].low,n[t].low),c=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>d||c>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[d],s=!0;r!==o.w;){if(t=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<t.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=t.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}}))}function Fe(e,n){var r={};return u(n,(function(n,o){var i=0,a=0,u=n.length,d=v(o);return t(o,(function(n,c){var s=function(e,n){if(e.node(n).dummy)return g(e.predecessors(n),(function(n){return e.node(n).dummy}))}(e,n),f=s?e.node(s).order:u;(s||n===d)&&(t(o.slice(a,c+1),(function(n){t(e.predecessors(n),(function(t){var o=e.node(t),a=o.order;!(a<i||f<a)||o.dummy&&e.node(n).dummy||qe(r,t,n)}))})),a=c+1,i=f)})),o})),r}function qe(e,n,r){if(n>r){var t=n;n=r,r=t}var o=e[n];o||(e[n]=o={}),o[r]=!0}function Ye(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function ze(n,r,o,i,a){var u={},d=function(n,r,o,i){var a=new e,u=n.graph(),d=function(e,n,r){return function(t,o,i){var a,u=t.node(o),d=t.node(i),c=0;if(c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=-u.width/2;break;case"r":a=u.width/2}if(a&&(c+=r?a:-a),a=0,c+=(u.dummy?n:e)/2,c+=(d.dummy?n:e)/2,c+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=d.width/2;break;case"r":a=-d.width/2}return a&&(c+=r?a:-a),a=0,c}}(u.nodesep,u.edgesep,i);return t(r,(function(e){var r;t(e,(function(e){var t=o[e];if(a.setNode(t),r){var i=o[r],u=a.edge(i,t);a.setEdge(i,t,Math.max(d(n,e,r),u||0))}r=e}))})),a}(n,r,o,a),c=a?"borderLeft":"borderRight";function s(e,n){for(var r=d.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return s((function(e){u[e]=d.inEdges(e).reduce((function(e,n){return Math.max(e,u[n.v]+d.edge(n))}),0)}),d.predecessors.bind(d)),s((function(e){var r=d.outEdges(e).reduce((function(e,n){return Math.min(e,u[n.w]-d.edge(n))}),Number.POSITIVE_INFINITY),t=n.node(e);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(u[e]=Math.max(u[e],r))}),d.successors.bind(d)),t(i,(function(e){u[e]=u[o[e]]})),u}function De(e,n){return C(a(n),(function(n){var t,o,i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return o=function(n,r){var t=function(e,n){return e.node(n).width}(e,r)/2;i=Math.max(n+t,i),a=Math.min(n-t,a)},null==(t=n)||p(t,r(o),w),i-a}))}function Ae(e){var n,r=X(e),o=I(Fe(e,r),function(e,n){var r={};function o(n,o,i,a,u){var d;t(E(o,i),(function(o){d=n[o],e.node(d).dummy&&t(e.predecessors(d),(function(n){var t=e.node(n);t.dummy&&(t.order<a||t.order>u)&&qe(r,n,d)}))}))}return u(n,(function(n,r){var i,a=-1,u=0;return t(r,(function(t,d){if("border"===e.node(t).dummy){var c=e.predecessors(t);c.length&&(i=e.node(c[0]).order,o(r,u,d,a,i),u=d,a=i)}o(r,u,r.length,i,n.length)})),r})),r}(e,r)),i={};t(["u","d"],(function(u){n="u"===u?r:a(r).reverse(),t(["l","r"],(function(r){"r"===r&&(n=s(n,(function(e){return a(e).reverse()})));var d=("u"===u?e.predecessors:e.successors).bind(e),c=function(e,n,r,o){var i={},a={},u={};return t(n,(function(e){t(e,(function(e,n){i[e]=e,a[e]=e,u[e]=n}))})),t(n,(function(e){var n=-1;t(e,(function(e){var t=o(e);if(t.length)for(var d=((t=R(t,(function(e){return u[e]}))).length-1)/2,c=Math.floor(d),s=Math.ceil(d);c<=s;++c){var f=t[c];a[e]===e&&n<u[f]&&!Ye(r,e,f)&&(a[f]=e,a[e]=i[e]=i[f],n=u[f])}}))})),{root:i,align:a}}(0,n,o,d),f=ze(e,n,c.root,c.align,"r"===r);"r"===r&&(f=M(f,(function(e){return-e}))),i[u+r]=f}))}));var d=De(e,i);return function(e,n){var r=a(n),o=f(r),i=L(r);t(["u","d"],(function(r){t(["l","r"],(function(t){var u,d=r+t,c=e[d];if(c!==n){var s=a(c);(u="l"===t?o-f(s):i-L(s))&&(e[d]=M(c,(function(e){return e+u})))}}))}))}(i,d),function(e,n){return M(e.ul,(function(r,t){if(n)return e[n.toLowerCase()][t];var o=R(s(e,t));return(o[1]+o[2])/2}))}(i,e.graph().align)}function Ue(e){var n,o;(function(e){var n=X(e),r=e.graph().ranksep,o=0;t(n,(function(n){var i=L(s(n,(function(n){return e.node(n).height})));t(n,(function(n){e.node(n).y=o+i/2})),o+=i+r}))})(e=J(e)),n=Ae(e),o=function(n,r){e.node(r).x=n},n&&P(n,r(o))}function Je(n,r){var i=Q;i("layout",(()=>{var r=i(" buildLayoutGraph",(()=>function(n){var r=new e({multigraph:!0,compound:!0}),o=rn(n.graph());return r.setGraph(I({},Xe,nn(o,We),_(o,He))),t(n.nodes(),(function(e){var t=rn(n.node(e));r.setNode(e,l(nn(t,Ke),Qe)),r.setParent(e,n.parent(e))})),t(n.edges(),(function(e){var t=rn(n.edge(e));r.setEdge(e,I({},$e,nn(t,Ze),_(t,en)))})),r}(n)));i(" runLayout",(()=>function(e,n){n(" makeSpaceForEdgeLabels",(()=>function(e){var n=e.graph();n.ranksep/=2,t(e.edges(),(function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)}))}(e))),n(" removeSelfEdges",(()=>function(e){t(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)}}))}(e))),n(" acyclic",(()=>A(e))),n(" nestingGraph.run",(()=>Oe(e))),n(" rank",(()=>ke(J(e)))),n(" injectEdgeLabelProxies",(()=>function(e){t(e.edges(),(function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};U(e,"edge-proxy",o,"_ep")}}))}(e))),n(" removeEmptyRanks",(()=>function(e){var n=f(s(e.nodes(),(function(n){return e.node(n).rank}))),r=[];t(e.nodes(),(function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)}));var i=0,a=e.graph().nodeRankFactor;t(r,(function(n,r){o(n)&&r%a!=0?--i:i&&t(n,(function(n){e.node(n).rank+=i}))}))}(e))),n(" nestingGraph.cleanup",(()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t(e.edges(),(function(n){e.edge(n).nestingEdge&&e.removeEdge(n)}))}(e))),n(" normalizeRanks",(()=>function(e){var n=f(s(e.nodes(),(function(n){return e.node(n).rank})));t(e.nodes(),(function(r){var t=e.node(r);h(t,"rank")&&(t.rank-=n)}))}(e))),n(" assignRankMinMax",(()=>function(e){var n=0;t(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=L(n,t.maxRank))})),e.graph().maxRank=n}(e))),n(" removeEdgeLabelProxies",(()=>function(e){t(e.nodes(),(function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))}))}(e))),n(" normalize.run",(()=>oe(e))),n(" parentDummyChains",(()=>Be(e))),n(" addBorderSegments",(()=>function(e){t(e.children(),(function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,u=i.maxRank+1;a<u;++a)Z(e,"borderLeft","_bl",r,i,a),Z(e,"borderRight","_br",r,i,a)}}))}(e))),n(" order",(()=>Ce(e))),n(" insertSelfEdges",(()=>function(e){var n=X(e);t(n,(function(n){var r=0;t(n,(function(n,o){var i=e.node(n);i.order=o+r,t(i.selfEdges,(function(n){U(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")})),delete i.selfEdges}))}))}(e))),n(" adjustCoordinateSystem",(()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||ee(e)}(e))),n(" position",(()=>Ue(e))),n(" positionSelfEdges",(()=>function(e){t(e.nodes(),(function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,a=r.x-o,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}}))}(e))),n(" removeBorderNodes",(()=>function(e){t(e.nodes(),(function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(v(r.borderLeft)),a=e.node(v(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}})),t(e.nodes(),(function(n){"border"===e.node(n).dummy&&e.removeNode(n)}))}(e))),n(" normalize.undo",(()=>function(e){t(e.graph().dummyChains,(function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)}))}(e))),n(" fixupEdgeLabelCoords",(()=>function(e){t(e.edges(),(function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(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}}))}(e))),n(" undoCoordinateSystem",(()=>$(e))),n(" translateGraph",(()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),u=a.marginx||0,d=a.marginy||0;function c(e){var t=e.x,a=e.y,u=e.width,d=e.height;n=Math.min(n,t-u/2),r=Math.max(r,t+u/2),o=Math.min(o,a-d/2),i=Math.max(i,a+d/2)}t(e.nodes(),(function(n){c(e.node(n))})),t(e.edges(),(function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&c(r)})),n-=u,o-=d,t(e.nodes(),(function(r){var t=e.node(r);t.x-=n,t.y-=o})),t(e.edges(),(function(r){var i=e.edge(r);t(i.points,(function(e){e.x-=n,e.y-=o})),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)})),a.width=r-n+u,a.height=i-o+d}(e))),n(" assignNodeIntersects",(()=>function(e){t(e.edges(),(function(n){var r,t,o=e.edge(n),i=e.node(n.v),a=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=a,t=i),o.points.unshift(W(i,r)),o.points.push(W(a,t))}))}(e))),n(" reversePoints",(()=>function(e){t(e.edges(),(function(n){var r=e.edge(n);r.reversed&&r.points.reverse()}))}(e))),n(" acyclic.undo",(()=>function(e){t(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)}}))}(e)))}(r,i))),i(" updateInputGraph",(()=>function(e,n){t(e.nodes(),(function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))})),t(e.edges(),(function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)})),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(n,r)))}))}var We=["nodesep","edgesep","ranksep","marginx","marginy"],Xe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},He=["acyclicer","ranker","rankdir","align"],Ke=["width","height"],Qe={width:0,height:0},Ze=["minlen","weight","width","height","labeloffset"],$e={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},en=["labelpos"];function nn(e,n){return M(_(e,n),Number)}function rn(e){var n={};return t(e,(function(e,r){n[r.toLowerCase()]=e})),n}export{Je as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as n,y as r,z as t,A as e,B as a}from"./step-
|
|
1
|
+
import{x as n,y as r,z as t,A as e,B as a}from"./step-xJWGRC3d.js";import{bi as i,ce as u,br as o,cf as c,cg as f,ch as s,ci as l,cj as h,ck as p,cl as m,cm as g}from"./index-Bs-_nZ1-.js";import{i as v}from"./init-DLRA0X12.js";function y(n){return null===n?NaN:+n}function*M(n,r){if(void 0===r)for(let t of n)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(let e of n)null!=(e=r(e,++t,n))&&(e=+e)>=e&&(yield e)}}const N=i(u),b=N.right,d=N.left;function w(n,r){r||(r=[]);var t,e=n?Math.min(r.length,n.length):0,a=r.slice();return function(i){for(t=0;t<e;++t)a[t]=n[t]*(1-i)+r[t]*i;return a}}function A(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function k(n,r){return(A(r)?w:j)(n,r)}function j(n,r){var t,e=r?r.length:0,a=n?Math.min(e,n.length):0,i=new Array(a),u=new Array(e);for(t=0;t<a;++t)i[t]=B(n[t],r[t]);for(;t<e;++t)u[t]=r[t];return function(n){for(t=0;t<a;++t)u[t]=i[t](n);return u}}function x(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function D(n,r){var t,e={},a={};for(t in null!==n&&"object"==typeof n||(n={}),null!==r&&"object"==typeof r||(r={}),r)t in n?e[t]=B(n[t],r[t]):a[t]=r[t];return function(n){for(t in e)a[t]=e[t](n);return a}}function B(i,u){var o,c=typeof u;return null==u||"boolean"===c?n(u):("number"===c?r:"string"===c?(o=a(u))?(u=o,t):e:u instanceof a?t:u instanceof Date?x:A(u)?w:Array.isArray(u)?j:"function"!=typeof u.valueOf&&"function"!=typeof u.toString||isNaN(u)?D:r)(i,u)}function V(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function q(n){return+n}i(y).center;var z=[0,1];function F(n){return n}function O(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:(t=isNaN(r)?NaN:.5,function(){return t});var t}function R(n,r,t){var e=n[0],a=n[1],i=r[0],u=r[1];return a<e?(e=O(a,e),i=t(u,i)):(e=O(e,a),i=t(i,u)),function(n){return i(e(n))}}function S(n,r,t){var e=Math.min(n.length,r.length)-1,a=new Array(e),i=new Array(e),u=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++u<e;)a[u]=O(n[u],n[u+1]),i[u]=t(r[u],r[u+1]);return function(r){var t=b(n,r,1,e)-1;return i[t](a[t](r))}}function T(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function C(){var n,t,e,a,i,u,o=z,c=z,f=B,s=F;function l(){var n,r,t,e=Math.min(o.length,c.length);return s!==F&&(n=o[0],r=o[e-1],n>r&&(t=n,n=r,r=t),s=function(t){return Math.max(n,Math.min(r,t))}),a=e>2?S:R,i=u=null,h}function h(r){return null==r||isNaN(r=+r)?e:(i||(i=a(o.map(n),c,f)))(n(s(r)))}return h.invert=function(e){return s(t((u||(u=a(c,o.map(n),r)))(e)))},h.domain=function(n){return arguments.length?(o=Array.from(n,q),l()):o.slice()},h.range=function(n){return arguments.length?(c=Array.from(n),l()):c.slice()},h.rangeRound=function(n){return c=Array.from(n),f=V,l()},h.clamp=function(n){return arguments.length?(s=!!n||F,l()):s!==F},h.interpolate=function(n){return arguments.length?(f=n,l()):f},h.unknown=function(n){return arguments.length?(e=n,h):e},function(r,e){return n=r,t=e,l()}}function E(){return C()(F,F)}function G(n,r,t,e){var a,i=o(n,r,t);switch((e=c(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(n),Math.abs(r));return null!=e.precision||isNaN(a=l(i,u))||(e.precision=a),h(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(a=s(i,Math.max(Math.abs(n),Math.abs(r))))||(e.precision=a-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(a=f(i))||(e.precision=a-2*("%"===e.type))}return p(e)}function H(n){var r=n.domain;return n.ticks=function(n){var t=r();return m(t[0],t[t.length-1],null==n?10:n)},n.tickFormat=function(n,t){var e=r();return G(e[0],e[e.length-1],null==n?10:n,t)},n.nice=function(t){null==t&&(t=10);var e,a,i=r(),u=0,o=i.length-1,c=i[u],f=i[o],s=10;for(f<c&&(a=c,c=f,f=a,a=u,u=o,o=a);s-- >0;){if((a=g(c,f,t))===e)return i[u]=c,i[o]=f,r(i);if(a>0)c=Math.floor(c/a)*a,f=Math.ceil(f/a)*a;else{if(!(a<0))break;c=Math.ceil(c*a)/a,f=Math.floor(f*a)/a}e=a}return n},n}function I(){var n=E();return n.copy=function(){return T(n,I())},v.apply(n,arguments),H(n)}export{T as a,y as b,E as c,k as d,x as e,w as f,V as g,q as h,B as i,H as j,F as k,I as l,b as m,M as n,D as o,G as p,d as q,C as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,t={};function n(){if(e)return t;function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}return e=1,Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t}var i,r,o={},s={};function a(){if(i)return s;let e;function t(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}return i=1,Object.defineProperty(s,"__esModule",{value:!0}),(t||(t={})).install=function(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t},s.default=t,s}function c(){if(r)return o;r=1,Object.defineProperty(o,"__esModule",{value:!0}),o.Emitter=o.Event=void 0;const e=a();var t;!function(e){const t={dispose(){}};e.None=function(){return t}}(t||(o.Event=t={}));class n{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,r=this._callbacks.length;i<r;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];const n=[],i=this._callbacks.slice(0),r=this._contexts.slice(0);for(let s=0,a=i.length;s<a;s++)try{n.push(i[s].apply(r[s],t))}catch(o){(0,e.default)().console.error(o)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class i{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const o={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),o.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return o.Emitter=i,i._noop=function(){},o}var u,d,l,g,f,h,m,p,v,_,b,k,y,C,E,A,x,I,w,L,T,R,j,S,M,D,O,N,P,F,V,U,K,z,W,q,X,H,$,B,Q,G,J,Y,Z,ee,te,ne,ie,re,oe,se,ae,ce,ue,de,le,ge,fe,he,me,pe,ve,_e,be,ke,ye,Ce,Ee,Ae,xe,Ie,we,Le,Te,Re,je,Se,Me,De,Oe,Ne,Pe,Fe,Ve,Ue,Ke,ze,We,qe,Xe,He,$e,Be,Qe,Ge,Je,Ye,Ze,et,tt,nt,it,rt,ot,st,at,ct,ut,dt,lt,gt,ft,ht,mt,pt,vt,_t,bt,kt,yt,Ct,Et,At,xt,It,wt,Lt,Tt,Rt,jt,St,Mt,Dt={};function Ot(){if(u)return Dt;u=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.CancellationTokenSource=Dt.CancellationToken=void 0;const e=a(),t=n(),i=c();var r,o;(o=r||(Dt.CancellationToken=r={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),o.is=function(e){const n=e;return n&&(n===o.None||n===o.Cancelled||t.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)};const s=Object.freeze((function(t,n){const i=(0,e.default)().timer.setTimeout(t.bind(n),0);return{dispose(){i.dispose()}}}));class d{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}return Dt.CancellationTokenSource=class{get token(){return this._token||(this._token=new d),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof d&&this._token.dispose():this._token=r.None}},Dt}(d||(d={})).is=function(e){return"string"==typeof e},(l||(l={})).is=function(e){return"string"==typeof e},(f=g||(g={})).MIN_VALUE=-2147483648,f.MAX_VALUE=2147483647,f.is=function(e){return"number"==typeof e&&f.MIN_VALUE<=e&&e<=f.MAX_VALUE},(m=h||(h={})).MIN_VALUE=0,m.MAX_VALUE=2147483647,m.is=function(e){return"number"==typeof e&&m.MIN_VALUE<=e&&e<=m.MAX_VALUE},(v=p||(p={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=h.MAX_VALUE),t===Number.MAX_VALUE&&(t=h.MAX_VALUE),{line:e,character:t}},v.is=function(e){let t=e;return Vt.objectLiteral(t)&&Vt.uinteger(t.line)&&Vt.uinteger(t.character)},(b=_||(_={})).create=function(e,t,n,i){if(Vt.uinteger(e)&&Vt.uinteger(t)&&Vt.uinteger(n)&&Vt.uinteger(i))return{start:p.create(e,t),end:p.create(n,i)};if(p.is(e)&&p.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},b.is=function(e){let t=e;return Vt.objectLiteral(t)&&p.is(t.start)&&p.is(t.end)},(y=k||(k={})).create=function(e,t){return{uri:e,range:t}},y.is=function(e){let t=e;return Vt.objectLiteral(t)&&_.is(t.range)&&(Vt.string(t.uri)||Vt.undefined(t.uri))},(E=C||(C={})).create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},E.is=function(e){let t=e;return Vt.objectLiteral(t)&&_.is(t.targetRange)&&Vt.string(t.targetUri)&&_.is(t.targetSelectionRange)&&(_.is(t.originSelectionRange)||Vt.undefined(t.originSelectionRange))},(x=A||(A={})).create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},x.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.numberRange(t.red,0,1)&&Vt.numberRange(t.green,0,1)&&Vt.numberRange(t.blue,0,1)&&Vt.numberRange(t.alpha,0,1)},(w=I||(I={})).create=function(e,t){return{range:e,color:t}},w.is=function(e){const t=e;return Vt.objectLiteral(t)&&_.is(t.range)&&A.is(t.color)},(T=L||(L={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},T.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.label)&&(Vt.undefined(t.textEdit)||X.is(t))&&(Vt.undefined(t.additionalTextEdits)||Vt.typedArray(t.additionalTextEdits,X.is))},(j=R||(R={})).Comment="comment",j.Imports="imports",j.Region="region",(M=S||(S={})).create=function(e,t,n,i,r,o){const s={startLine:e,endLine:t};return Vt.defined(n)&&(s.startCharacter=n),Vt.defined(i)&&(s.endCharacter=i),Vt.defined(r)&&(s.kind=r),Vt.defined(o)&&(s.collapsedText=o),s},M.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.uinteger(t.startLine)&&Vt.uinteger(t.startLine)&&(Vt.undefined(t.startCharacter)||Vt.uinteger(t.startCharacter))&&(Vt.undefined(t.endCharacter)||Vt.uinteger(t.endCharacter))&&(Vt.undefined(t.kind)||Vt.string(t.kind))},(O=D||(D={})).create=function(e,t){return{location:e,message:t}},O.is=function(e){let t=e;return Vt.defined(t)&&k.is(t.location)&&Vt.string(t.message)},(P=N||(N={})).Error=1,P.Warning=2,P.Information=3,P.Hint=4,(V=F||(F={})).Unnecessary=1,V.Deprecated=2,(U||(U={})).is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.href)},(z=K||(K={})).create=function(e,t,n,i,r,o){let s={range:e,message:t};return Vt.defined(n)&&(s.severity=n),Vt.defined(i)&&(s.code=i),Vt.defined(r)&&(s.source=r),Vt.defined(o)&&(s.relatedInformation=o),s},z.is=function(e){var t;let n=e;return Vt.defined(n)&&_.is(n.range)&&Vt.string(n.message)&&(Vt.number(n.severity)||Vt.undefined(n.severity))&&(Vt.integer(n.code)||Vt.string(n.code)||Vt.undefined(n.code))&&(Vt.undefined(n.codeDescription)||Vt.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Vt.string(n.source)||Vt.undefined(n.source))&&(Vt.undefined(n.relatedInformation)||Vt.typedArray(n.relatedInformation,D.is))},(q=W||(W={})).create=function(e,t,...n){let i={title:e,command:t};return Vt.defined(n)&&n.length>0&&(i.arguments=n),i},q.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.title)&&Vt.string(t.command)},(H=X||(X={})).replace=function(e,t){return{range:e,newText:t}},H.insert=function(e,t){return{range:{start:e,end:e},newText:t}},H.del=function(e){return{range:e,newText:""}},H.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.newText)&&_.is(t.range)},(B=$||($={})).create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},B.is=function(e){const t=e;return Vt.objectLiteral(t)&&Vt.string(t.label)&&(Vt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Vt.string(t.description)||void 0===t.description)},(Q||(Q={})).is=function(e){const t=e;return Vt.string(t)},(J=G||(G={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},J.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},J.del=function(e,t){return{range:e,newText:"",annotationId:t}},J.is=function(e){const t=e;return X.is(t)&&($.is(t.annotationId)||Q.is(t.annotationId))},(Z=Y||(Y={})).create=function(e,t){return{textDocument:e,edits:t}},Z.is=function(e){let t=e;return Vt.defined(t)&&le.is(t.textDocument)&&Array.isArray(t.edits)},(te=ee||(ee={})).create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},te.is=function(e){let t=e;return t&&"create"===t.kind&&Vt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Vt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Vt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))},(ie=ne||(ne={})).create=function(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},ie.is=function(e){let t=e;return t&&"rename"===t.kind&&Vt.string(t.oldUri)&&Vt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Vt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Vt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))},(oe=re||(re={})).create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},oe.is=function(e){let t=e;return t&&"delete"===t.kind&&Vt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Vt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Vt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))},(se||(se={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Vt.string(e.kind)?ee.is(e)||ne.is(e)||re.is(e):Y.is(e))))};class Nt{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,r;if(void 0===n?i=X.insert(e,t):Q.is(n)?(r=n,i=G.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=G.insert(e,t,r)),this.edits.push(i),void 0!==r)return r}replace(e,t,n){let i,r;if(void 0===n?i=X.replace(e,t):Q.is(n)?(r=n,i=G.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=G.replace(e,t,r)),this.edits.push(i),void 0!==r)return r}delete(e,t){let n,i;if(void 0===t?n=X.del(e):Q.is(t)?(i=t,n=G.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=G.del(e,i)),this.edits.push(n),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class Pt{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(Q.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}(ce=ae||(ae={})).create=function(e){return{uri:e}},ce.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)},(de=ue||(ue={})).create=function(e,t){return{uri:e,version:t}},de.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)&&Vt.integer(t.version)},(ge=le||(le={})).create=function(e,t){return{uri:e,version:t}},ge.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)&&(null===t.version||Vt.integer(t.version))},(he=fe||(fe={})).create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},he.is=function(e){let t=e;return Vt.defined(t)&&Vt.string(t.uri)&&Vt.string(t.languageId)&&Vt.integer(t.version)&&Vt.string(t.text)},(pe=me||(me={})).PlainText="plaintext",pe.Markdown="markdown",pe.is=function(e){const t=e;return t===pe.PlainText||t===pe.Markdown},(ve||(ve={})).is=function(e){const t=e;return Vt.objectLiteral(e)&&me.is(t.kind)&&Vt.string(t.value)},(be=_e||(_e={})).Text=1,be.Method=2,be.Function=3,be.Constructor=4,be.Field=5,be.Variable=6,be.Class=7,be.Interface=8,be.Module=9,be.Property=10,be.Unit=11,be.Value=12,be.Enum=13,be.Keyword=14,be.Snippet=15,be.Color=16,be.File=17,be.Reference=18,be.Folder=19,be.EnumMember=20,be.Constant=21,be.Struct=22,be.Event=23,be.Operator=24,be.TypeParameter=25,(ye=ke||(ke={})).PlainText=1,ye.Snippet=2,(Ce||(Ce={})).Deprecated=1,(Ae=Ee||(Ee={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},Ae.is=function(e){const t=e;return t&&Vt.string(t.newText)&&_.is(t.insert)&&_.is(t.replace)},(Ie=xe||(xe={})).asIs=1,Ie.adjustIndentation=2,(we||(we={})).is=function(e){const t=e;return t&&(Vt.string(t.detail)||void 0===t.detail)&&(Vt.string(t.description)||void 0===t.description)},(Le||(Le={})).create=function(e){return{label:e}},(Te||(Te={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(je=Re||(Re={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},je.is=function(e){const t=e;return Vt.string(t)||Vt.objectLiteral(t)&&Vt.string(t.language)&&Vt.string(t.value)},(Se||(Se={})).is=function(e){let t=e;return!!t&&Vt.objectLiteral(t)&&(ve.is(t.contents)||Re.is(t.contents)||Vt.typedArray(t.contents,Re.is))&&(void 0===e.range||_.is(e.range))},(Me||(Me={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(De||(De={})).create=function(e,t,...n){let i={label:e};return Vt.defined(t)&&(i.documentation=t),Vt.defined(n)?i.parameters=n:i.parameters=[],i},(Ne=Oe||(Oe={})).Text=1,Ne.Read=2,Ne.Write=3,(Pe||(Pe={})).create=function(e,t){let n={range:e};return Vt.number(t)&&(n.kind=t),n},(Ve=Fe||(Fe={})).File=1,Ve.Module=2,Ve.Namespace=3,Ve.Package=4,Ve.Class=5,Ve.Method=6,Ve.Property=7,Ve.Field=8,Ve.Constructor=9,Ve.Enum=10,Ve.Interface=11,Ve.Function=12,Ve.Variable=13,Ve.Constant=14,Ve.String=15,Ve.Number=16,Ve.Boolean=17,Ve.Array=18,Ve.Object=19,Ve.Key=20,Ve.Null=21,Ve.EnumMember=22,Ve.Struct=23,Ve.Event=24,Ve.Operator=25,Ve.TypeParameter=26,(Ue||(Ue={})).Deprecated=1,(Ke||(Ke={})).create=function(e,t,n,i,r){let o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o},(ze||(ze={})).create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}},(qe=We||(We={})).create=function(e,t,n,i,r,o){let s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},qe.is=function(e){let t=e;return t&&Vt.string(t.name)&&Vt.number(t.kind)&&_.is(t.range)&&_.is(t.selectionRange)&&(void 0===t.detail||Vt.string(t.detail))&&(void 0===t.deprecated||Vt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(He=Xe||(Xe={})).Empty="",He.QuickFix="quickfix",He.Refactor="refactor",He.RefactorExtract="refactor.extract",He.RefactorInline="refactor.inline",He.RefactorRewrite="refactor.rewrite",He.Source="source",He.SourceOrganizeImports="source.organizeImports",He.SourceFixAll="source.fixAll",(Be=$e||($e={})).Invoked=1,Be.Automatic=2,(Ge=Qe||(Qe={})).create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},Ge.is=function(e){let t=e;return Vt.defined(t)&&Vt.typedArray(t.diagnostics,K.is)&&(void 0===t.only||Vt.typedArray(t.only,Vt.string))&&(void 0===t.triggerKind||t.triggerKind===$e.Invoked||t.triggerKind===$e.Automatic)},(Ye=Je||(Je={})).create=function(e,t,n){let i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):W.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},Ye.is=function(e){let t=e;return t&&Vt.string(t.title)&&(void 0===t.diagnostics||Vt.typedArray(t.diagnostics,K.is))&&(void 0===t.kind||Vt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||W.is(t.command))&&(void 0===t.isPreferred||Vt.boolean(t.isPreferred))&&(void 0===t.edit||se.is(t.edit))},(et=Ze||(Ze={})).create=function(e,t){let n={range:e};return Vt.defined(t)&&(n.data=t),n},et.is=function(e){let t=e;return Vt.defined(t)&&_.is(t.range)&&(Vt.undefined(t.command)||W.is(t.command))},(nt=tt||(tt={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},nt.is=function(e){let t=e;return Vt.defined(t)&&Vt.uinteger(t.tabSize)&&Vt.boolean(t.insertSpaces)},(rt=it||(it={})).create=function(e,t,n){return{range:e,target:t,data:n}},rt.is=function(e){let t=e;return Vt.defined(t)&&_.is(t.range)&&(Vt.undefined(t.target)||Vt.string(t.target))},(st=ot||(ot={})).create=function(e,t){return{range:e,parent:t}},st.is=function(e){let t=e;return Vt.objectLiteral(t)&&_.is(t.range)&&(void 0===t.parent||st.is(t.parent))},(ct=at||(at={})).namespace="namespace",ct.type="type",ct.class="class",ct.enum="enum",ct.interface="interface",ct.struct="struct",ct.typeParameter="typeParameter",ct.parameter="parameter",ct.variable="variable",ct.property="property",ct.enumMember="enumMember",ct.event="event",ct.function="function",ct.method="method",ct.macro="macro",ct.keyword="keyword",ct.modifier="modifier",ct.comment="comment",ct.string="string",ct.number="number",ct.regexp="regexp",ct.operator="operator",ct.decorator="decorator",(dt=ut||(ut={})).declaration="declaration",dt.definition="definition",dt.readonly="readonly",dt.static="static",dt.deprecated="deprecated",dt.abstract="abstract",dt.async="async",dt.modification="modification",dt.documentation="documentation",dt.defaultLibrary="defaultLibrary",(lt||(lt={})).is=function(e){const t=e;return Vt.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(ft=gt||(gt={})).create=function(e,t){return{range:e,text:t}},ft.is=function(e){const t=e;return null!=t&&_.is(t.range)&&Vt.string(t.text)},(mt=ht||(ht={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},mt.is=function(e){const t=e;return null!=t&&_.is(t.range)&&Vt.boolean(t.caseSensitiveLookup)&&(Vt.string(t.variableName)||void 0===t.variableName)},(vt=pt||(pt={})).create=function(e,t){return{range:e,expression:t}},vt.is=function(e){const t=e;return null!=t&&_.is(t.range)&&(Vt.string(t.expression)||void 0===t.expression)},(bt=_t||(_t={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},bt.is=function(e){const t=e;return Vt.defined(t)&&_.is(e.stoppedLocation)},(yt=kt||(kt={})).Type=1,yt.Parameter=2,yt.is=function(e){return 1===e||2===e},(Et=Ct||(Ct={})).create=function(e){return{value:e}},Et.is=function(e){const t=e;return Vt.objectLiteral(t)&&(void 0===t.tooltip||Vt.string(t.tooltip)||ve.is(t.tooltip))&&(void 0===t.location||k.is(t.location))&&(void 0===t.command||W.is(t.command))},(xt=At||(At={})).create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},xt.is=function(e){const t=e;return Vt.objectLiteral(t)&&p.is(t.position)&&(Vt.string(t.label)||Vt.typedArray(t.label,Ct.is))&&(void 0===t.kind||kt.is(t.kind))&&void 0===t.textEdits||Vt.typedArray(t.textEdits,X.is)&&(void 0===t.tooltip||Vt.string(t.tooltip)||ve.is(t.tooltip))&&(void 0===t.paddingLeft||Vt.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Vt.boolean(t.paddingRight))},(It||(It={})).createSnippet=function(e){return{kind:"snippet",value:e}},(wt||(wt={})).create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}},(Lt||(Lt={})).create=function(e){return{items:e}},(Rt=Tt||(Tt={})).Invoked=0,Rt.Automatic=1,(jt||(jt={})).create=function(e,t){return{range:e,text:t}},(St||(St={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(Mt||(Mt={})).is=function(e){const t=e;return Vt.objectLiteral(t)&&l.is(t.uri)&&Vt.string(t.name)};var Ft,Vt;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,r=e.slice(0,i),o=e.slice(i);t(r,n),t(o,n);let s=0,a=0,c=0;for(;s<r.length&&a<o.length;){let t=n(r[s],o[a]);e[c++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,i){return new Ut(e,t,n,i)},e.is=function(e){let t=e;return!!(Vt.defined(t)&&Vt.string(t.uri)&&(Vt.undefined(t.languageId)||Vt.string(t.languageId))&&Vt.uinteger(t.lineCount)&&Vt.func(t.getText)&&Vt.func(t.positionAt)&&Vt.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),r=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=i.length;for(let t=r.length-1;t>=0;t--){let n=r[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=o))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),o=s}return i}}(Ft||(Ft={}));class Ut{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return p.create(0,e);for(;n<i;){let r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}let r=n-1;return p.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Vt||(Vt={}));const Kt=Object.freeze(Object.defineProperty({__proto__:null,get AnnotatedTextEdit(){return G},get ChangeAnnotation(){return $},get ChangeAnnotationIdentifier(){return Q},get CodeAction(){return Je},get CodeActionContext(){return Qe},get CodeActionKind(){return Xe},get CodeActionTriggerKind(){return $e},get CodeDescription(){return U},get CodeLens(){return Ze},get Color(){return A},get ColorInformation(){return I},get ColorPresentation(){return L},get Command(){return W},get CompletionItem(){return Le},get CompletionItemKind(){return _e},get CompletionItemLabelDetails(){return we},get CompletionItemTag(){return Ce},get CompletionList(){return Te},get CreateFile(){return ee},get DeleteFile(){return re},get Diagnostic(){return K},get DiagnosticRelatedInformation(){return D},get DiagnosticSeverity(){return N},get DiagnosticTag(){return F},get DocumentHighlight(){return Pe},get DocumentHighlightKind(){return Oe},get DocumentLink(){return it},get DocumentSymbol(){return We},get DocumentUri(){return d},EOL:["\n","\r\n","\r"],get FoldingRange(){return S},get FoldingRangeKind(){return R},get FormattingOptions(){return tt},get Hover(){return Se},get InlayHint(){return At},get InlayHintKind(){return kt},get InlayHintLabelPart(){return Ct},get InlineCompletionContext(){return St},get InlineCompletionItem(){return wt},get InlineCompletionList(){return Lt},get InlineCompletionTriggerKind(){return Tt},get InlineValueContext(){return _t},get InlineValueEvaluatableExpression(){return pt},get InlineValueText(){return gt},get InlineValueVariableLookup(){return ht},get InsertReplaceEdit(){return Ee},get InsertTextFormat(){return ke},get InsertTextMode(){return xe},get Location(){return k},get LocationLink(){return C},get MarkedString(){return Re},get MarkupContent(){return ve},get MarkupKind(){return me},get OptionalVersionedTextDocumentIdentifier(){return le},get ParameterInformation(){return Me},get Position(){return p},get Range(){return _},get RenameFile(){return ne},get SelectedCompletionInfo(){return jt},get SelectionRange(){return ot},get SemanticTokenModifiers(){return ut},get SemanticTokenTypes(){return at},get SemanticTokens(){return lt},get SignatureInformation(){return De},get StringValue(){return It},get SymbolInformation(){return Ke},get SymbolKind(){return Fe},get SymbolTag(){return Ue},get TextDocument(){return Ft},get TextDocumentEdit(){return Y},get TextDocumentIdentifier(){return ae},get TextDocumentItem(){return fe},get TextEdit(){return X},get URI(){return l},get VersionedTextDocumentIdentifier(){return ue},WorkspaceChange:class{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pt(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(Y.is(e)){const t=new Nt(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new Nt(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(le.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],i={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(i),n=new Nt(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new Nt(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,r,o;if($.is(t)||Q.is(t)?i=t:n=t,void 0===i?r=ee.create(e,n):(o=Q.is(i)?i:this._changeAnnotations.manage(i),r=ee.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}renameFile(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,s;if($.is(n)||Q.is(n)?r=n:i=n,void 0===r?o=ne.create(e,t,i):(s=Q.is(r)?r:this._changeAnnotations.manage(r),o=ne.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,r,o;if($.is(t)||Q.is(t)?i=t:n=t,void 0===i?r=re.create(e,n):(o=Q.is(i)?i:this._changeAnnotations.manage(i),r=re.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}},get WorkspaceEdit(){return se},get WorkspaceFolder(){return Mt},get WorkspaceSymbol(){return ze},get integer(){return g},get uinteger(){return h}},Symbol.toStringTag,{value:"Module"}));export{p as P,_ as R,Ot as a,a as b,c,Kt as m,n as r};
|