@superlc/md-core 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_baseUniq-BfzcfZ4T.cjs +1 -0
- package/dist/_baseUniq-Y3ulau-C.js +477 -0
- package/dist/arc-Be_AVKBg.cjs +1 -0
- package/dist/arc-Ca7Zrknn.js +83 -0
- package/dist/architectureDiagram-VXUJARFQ-4Jx44yBn.cjs +36 -0
- package/dist/architectureDiagram-VXUJARFQ-DJeUU_qv.js +4665 -0
- package/dist/blockDiagram-VD42YOAC-BimcGKKd.cjs +122 -0
- package/dist/blockDiagram-VD42YOAC-D-giXjw6.js +2265 -0
- package/dist/c4Diagram-YG6GDRKO-Bl9iUUVb.cjs +10 -0
- package/dist/c4Diagram-YG6GDRKO-YxTtvGWw.js +1581 -0
- package/dist/channel-DOU_t-A5.js +5 -0
- package/dist/channel-DzR_mTuG.cjs +1 -0
- package/dist/chunk-4BX2VUAB-BT8x_a4k.cjs +1 -0
- package/dist/chunk-4BX2VUAB-qWjx6fvp.js +9 -0
- package/dist/chunk-55IACEB6-DRmMNyi7.js +8 -0
- package/dist/chunk-55IACEB6-DfzR1I2i.cjs +1 -0
- package/dist/chunk-B4BG7PRW-B4vBwkd7.js +1376 -0
- package/dist/chunk-B4BG7PRW-k_Ki7ZYa.cjs +165 -0
- package/dist/chunk-DI55MBZ5-67zt7BEa.cjs +220 -0
- package/dist/chunk-DI55MBZ5-B-Akunv8.js +1382 -0
- package/dist/chunk-FMBD7UC4-D-gJ-PKq.cjs +15 -0
- package/dist/chunk-FMBD7UC4-D1foMA2H.js +19 -0
- package/dist/chunk-QN33PNHL-DBsOH5IO.cjs +1 -0
- package/dist/chunk-QN33PNHL-DpeYRHMx.js +20 -0
- package/dist/chunk-QZHKN3VN-CWmChvMD.cjs +1 -0
- package/dist/chunk-QZHKN3VN-CoINyXCe.js +15 -0
- package/dist/chunk-TZMSLE5B-CMo-Qyqp.js +64 -0
- package/dist/chunk-TZMSLE5B-Psc_3Gkx.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-BrNHAA-E.js +16 -0
- package/dist/classDiagram-2ON5EDUG-CA1gbIW7.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-BrNHAA-E.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-CA1gbIW7.cjs +1 -0
- package/dist/clone-BOyua0mT.js +8 -0
- package/dist/clone-D7Rx0g6P.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-BBcnamAX.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-xbHM31av.js +2605 -0
- package/dist/cytoscape.esm-DkGgpG6d.cjs +331 -0
- package/dist/cytoscape.esm-ZmItrg9y.js +18731 -0
- package/dist/dagre-6UL2VRFP-B5ZJ9Mmw.cjs +4 -0
- package/dist/dagre-6UL2VRFP-lY6fElcy.js +446 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
- package/dist/diagram-PSM6KHXK-DOgpThfE.js +534 -0
- package/dist/diagram-PSM6KHXK-NUCrGNCX.cjs +24 -0
- package/dist/diagram-QEK2KX5R-CKpcqpBk.js +221 -0
- package/dist/diagram-QEK2KX5R-P-pWAYvp.cjs +43 -0
- package/dist/diagram-S2PKOQOG-B4PYQerv.cjs +24 -0
- package/dist/diagram-S2PKOQOG-CZn9lft8.js +143 -0
- package/dist/erDiagram-Q2GNP2WA-D6UL-dgf.js +842 -0
- package/dist/erDiagram-Q2GNP2WA-DwYOfnOX.cjs +60 -0
- package/dist/flowDiagram-NV44I4VS-BvuqC7lR.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-YPdRK_ji.js +1627 -0
- package/dist/ganttDiagram-JELNMOA3-CGnvf7yj.js +2662 -0
- package/dist/ganttDiagram-JELNMOA3-wbYrtCNf.cjs +267 -0
- package/dist/gitGraphDiagram-NY62KEGX-BnpFLmUy.js +712 -0
- package/dist/gitGraphDiagram-NY62KEGX-BzlCJL63.cjs +65 -0
- package/dist/graph-Bv0JC_B1.cjs +1 -0
- package/dist/graph-DwDboYRQ.js +381 -0
- package/dist/index-A-U0gtM4.js +15167 -0
- package/dist/index-BC30feOR.cjs +300 -0
- package/dist/index.cjs +1 -300
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -14816
- package/dist/infoDiagram-WHAUD3N6-CPFFyZEz.cjs +2 -0
- package/dist/infoDiagram-WHAUD3N6-DF-Kn4KW.js +24 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-Bc3YJVQN.cjs +139 -0
- package/dist/journeyDiagram-XKPGCS4Q-CqUVbDan.js +836 -0
- package/dist/kanban-definition-3W4ZIXB7-BKxpdlfe.cjs +89 -0
- package/dist/kanban-definition-3W4ZIXB7-Zx7cVnZF.js +720 -0
- package/dist/layout-CrdknE74.js +1441 -0
- package/dist/layout-y4Mby5BC.cjs +1 -0
- package/dist/linear-D_NLLphh.cjs +1 -0
- package/dist/linear-Fqu_aevY.js +259 -0
- package/dist/mermaid/darkMode.d.ts +54 -0
- package/dist/mermaid/darkMode.d.ts.map +1 -0
- package/dist/mermaid/download.d.ts +27 -0
- package/dist/mermaid/download.d.ts.map +1 -0
- package/dist/mermaid/index.d.ts +9 -0
- package/dist/mermaid/index.d.ts.map +1 -0
- package/dist/mermaid/renderer.d.ts +36 -0
- package/dist/mermaid/renderer.d.ts.map +1 -0
- package/dist/mermaid/themes.d.ts +17 -0
- package/dist/mermaid/themes.d.ts.map +1 -0
- package/dist/mermaid/types.d.ts +117 -0
- package/dist/mermaid/types.d.ts.map +1 -0
- package/dist/mermaid.core-Buzus1hw.js +15321 -0
- package/dist/mermaid.core-CCMj67LO.cjs +255 -0
- package/dist/min-BNEwgiip.js +38 -0
- package/dist/min-CxfddLJo.cjs +1 -0
- package/dist/mindmap-definition-VGOIOE7T-C3sZAv1n.js +786 -0
- package/dist/mindmap-definition-VGOIOE7T-Cq9KhFIU.cjs +68 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/pieDiagram-ADFJNKIX-Bib4GVaz.js +161 -0
- package/dist/pieDiagram-ADFJNKIX-CPJ4LdHJ.cjs +30 -0
- package/dist/quadrantDiagram-AYHSOK5B-Bw4qbzaI.js +1024 -0
- package/dist/quadrantDiagram-AYHSOK5B-Dldq3aFV.cjs +7 -0
- package/dist/requirementDiagram-UZGBJVZJ-BiMT5LBm.cjs +64 -0
- package/dist/requirementDiagram-UZGBJVZJ-DKt5E9D5.js +852 -0
- package/dist/sankeyDiagram-TZEHDZUN-BvqABFTj.cjs +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-DPexJVr0.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-JcPuIgsZ.cjs +145 -0
- package/dist/sequenceDiagram-WL72ISMW-rx65Aq7k.js +2518 -0
- package/dist/stateDiagram-FKZM4ZOC-5jwz-EhH.cjs +1 -0
- package/dist/stateDiagram-FKZM4ZOC-D95elPzf.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-DKxcP1od.cjs +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-U8OyZJcH.js +16 -0
- package/dist/styles.css +292 -0
- package/dist/timeline-definition-IT6M3QCI-C_aFXPzu.cjs +61 -0
- package/dist/timeline-definition-IT6M3QCI-DzBIcxIH.js +801 -0
- package/dist/treemap-KMMF4GRG-CqQBq3TE.js +14157 -0
- package/dist/treemap-KMMF4GRG-DJHv4WOZ.cjs +128 -0
- package/dist/xychartDiagram-PRI3JC2R-M2dUh85s.cjs +7 -0
- package/dist/xychartDiagram-PRI3JC2R-ZNBNeiJf.js +1340 -0
- package/package.json +6 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./mermaid.core-CCMj67LO.cjs"),tt=require("./arc-Be_AVKBg.cjs");var K=function(){var r=n.__name(function(_,s,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=s);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],y=[1,16],f=[1,17],p={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:n.__name(function(s,a,h,u,g,o,S){var x=o.length-1;switch(g){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:u.addTask(o[x],0,""),this.$=o[x];break;case 16:u.addEvent(o[x].substr(2)),this.$=o[x];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},r(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,7],{1:[2,1]}),r(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,5]),r(t,[2,6]),r(t,[2,8]),{13:[1,19]},{15:[1,20]},r(t,[2,11]),r(t,[2,12]),r(t,[2,13]),r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,4]),r(t,[2,9]),r(t,[2,10])],defaultActions:{},parseError:n.__name(function(s,a){if(a.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=a,h}},"parseError"),parse:n.__name(function(s){var a=this,h=[0],u=[],g=[null],o=[],S=this.table,x="",$=0,A=0,W=2,U=1,B=o.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(I.yy[N]=this.yy[N]);k.setInput(s,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var b=k.yylloc;o.push(b);var L=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function C(E){h.length=h.length-2*E,g.length=g.length-E,o.length=o.length-E}n.__name(C,"popStack");function H(){var E;return E=u.pop()||k.lex()||U,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=a.symbols_[E]||E),E}n.__name(H,"lex");for(var w,M,T,Z,F={},O,P,D,j;;){if(M=h[h.length-1],this.defaultActions[M]?T=this.defaultActions[M]:((w===null||typeof w>"u")&&(w=H()),T=S[M]&&S[M][w]),typeof T>"u"||!T.length||!T[0]){var J="";j=[];for(O in S[M])this.terminals_[O]&&O>W&&j.push("'"+this.terminals_[O]+"'");k.showPosition?J="Parse error on line "+($+1)+`:
|
|
2
|
+
`+k.showPosition()+`
|
|
3
|
+
Expecting `+j.join(", ")+", got '"+(this.terminals_[w]||w)+"'":J="Parse error on line "+($+1)+": Unexpected "+(w==U?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(J,{text:k.match,token:this.terminals_[w]||w,line:k.yylineno,loc:b,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+w);switch(T[0]){case 1:h.push(w),g.push(k.yytext),o.push(k.yylloc),h.push(T[1]),w=null,A=k.yyleng,x=k.yytext,$=k.yylineno,b=k.yylloc;break;case 2:if(P=this.productions_[T[1]][1],F.$=g[g.length-P],F._$={first_line:o[o.length-(P||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(P||1)].first_column,last_column:o[o.length-1].last_column},L&&(F._$.range=[o[o.length-(P||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(F,[x,A,$,I.yy,T[1],g,o].concat(B)),typeof Z<"u")return Z;P&&(h=h.slice(0,-1*P*2),g=g.slice(0,-1*P),o=o.slice(0,-1*P)),h.push(this.productions_[T[1]][0]),g.push(F.$),o.push(F._$),D=S[h[h.length-2]][h[h.length-1]],h.push(D);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:n.__name(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:n.__name(function(s,a){return this.yy=a||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:n.__name(function(s){var a=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=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),h.length-1&&(this.yylineno-=h.length-1);var g=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:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:n.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+a+"^"},"showPosition"),test_match:n.__name(function(s,a){var h,u,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var o in g)this[o]=g[o];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,h,u;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),o=0;o<g.length;o++)if(h=this._input.match(this.rules[g[o]]),h&&(!a||h[0].length>a[0].length)){if(a=h,u=o,this.options.backtrack_lexer){if(s=this.test_match(h,g[o]),s!==!1)return s;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(s=this.test_match(a,g[u]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n.__name(function(){var a=this.next();return a||this.lex()},"lex"),begin:n.__name(function(a){this.conditionStack.push(a)},"begin"),popState:n.__name(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__name(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:n.__name(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:n.__name(function(a){this.begin(a)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(a,h,u,g){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;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 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/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],inclusive:!0}}};return _}();p.lexer=m;function v(){this.yy={}}return n.__name(v,"Parser"),v.prototype=p,p.Parser=v,new v}();K.parser=K;var _t=K,it={};n.__export(it,{addEvent:()=>ut,addSection:()=>ot,addTask:()=>dt,addTaskOrg:()=>pt,clear:()=>lt,default:()=>ft,getCommonDb:()=>at,getSections:()=>ct,getTasks:()=>ht});var z="",st=0,Q=[],G=[],V=[],at=n.__name(()=>n.commonDb_exports,"getCommonDb"),lt=n.__name(function(){Q.length=0,G.length=0,z="",V.length=0,n.clear()},"clear"),ot=n.__name(function(r){z=r,Q.push(r)},"addSection"),ct=n.__name(function(){return Q},"getSections"),ht=n.__name(function(){let r=et();const t=100;let e=0;for(;!r&&e<t;)r=et(),e++;return G.push(...V),G},"getTasks"),dt=n.__name(function(r,t,e){const l={id:st++,section:z,type:z,task:r,score:t||0,events:e?[e]:[]};V.push(l)},"addTask"),ut=n.__name(function(r){V.find(e=>e.id===st-1).events.push(r)},"addEvent"),pt=n.__name(function(r){const t={section:z,type:z,description:r,task:r,classes:[]};G.push(t)},"addTaskOrg"),et=n.__name(function(){const r=n.__name(function(e){return V[e].processed},"compileTask");let t=!0;for(const[e,l]of V.entries())r(e),t=t&&l.processed;return t},"compileTasks"),ft={clear:lt,getCommonDb:at,addSection:ot,getSections:ct,getTasks:ht,addTask:dt,addTaskOrg:pt,addEvent:ut},mt=12,q=n.__name(function(r,t){const e=r.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),xt=n.__name(function(r,t){const l=r.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=r.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(f){const p=tt.d3arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}n.__name(d,"smile");function c(f){const p=tt.d3arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}n.__name(c,"sad");function y(f){f.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return n.__name(y,"ambivalent"),t.score>3?d(i):t.score<3?c(i):y(i),l},"drawFace"),kt=n.__name(function(r,t){const e=r.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),gt=n.__name(function(r,t){const e=t.text.replace(/<br\s*\/?>/gi," "),l=r.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const i=l.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),l},"drawText"),vt=n.__name(function(r,t){function e(i,d,c,y,f){return i+","+d+" "+(i+c)+","+d+" "+(i+c)+","+(d+y-f)+" "+(i+c-f*1.2)+","+(d+y)+" "+i+","+(d+y)}n.__name(e,"genPoints");const l=r.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,gt(r,t)},"drawLabel"),bt=n.__name(function(r,t,e){const l=r.append("g"),i=X();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,q(l,i),yt(e)(t.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),nt=-1,wt=n.__name(function(r,t,e){const l=t.x+e.width/2,i=r.append("g");nt++;const d=300+5*30;i.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",d).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(i,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=X();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,q(i,c),yt(e)(t.task,i,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),St=n.__name(function(r,t){q(r,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Et=n.__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),X=n.__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),yt=function(){function r(i,d,c,y,f,p,m,v){const _=d.append("text").attr("x",c+f/2).attr("y",y+p/2+5).style("font-color",v).style("text-anchor","middle").text(i);l(_,m)}n.__name(r,"byText");function t(i,d,c,y,f,p,m,v,_){const{taskFontSize:s,taskFontFamily:a}=v,h=i.split(/<br\s*\/?>/gi);for(let u=0;u<h.length;u++){const g=u*s-s*(h.length-1)/2,o=d.append("text").attr("x",c+f/2).attr("y",y).attr("fill",_).style("text-anchor","middle").style("font-size",s).style("font-family",a);o.append("tspan").attr("x",c+f/2).attr("dy",g).text(h[u]),o.attr("y",y+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(o,m)}}n.__name(t,"byTspan");function e(i,d,c,y,f,p,m,v){const _=d.append("switch"),a=_.append("foreignObject").attr("x",c).attr("y",y).attr("width",f).attr("height",p).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,c,y,f,p,m,v),l(a,m)}n.__name(e,"byFo");function l(i,d){for(const c in d)c in d&&i.attr(c,d[c])}return n.__name(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?r:t}}(),Tt=n.__name(function(r){r.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");function Y(r,t){r.each(function(){var e=n.select(this),l=e.text().split(/(\s+|<br>)/).reverse(),i,d=[],c=1.1,y=e.attr("y"),f=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",f+"em");for(let m=0;m<l.length;m++)i=l[l.length-1-m],d.push(i),p.text(d.join(" ").trim()),(p.node().getComputedTextLength()>t||i==="<br>")&&(d.pop(),p.text(d.join(" ").trim()),i==="<br>"?d=[""]:d=[i],p=e.append("tspan").attr("x",0).attr("y",y).attr("dy",c+"em").text(i))})}n.__name(Y,"wrap");var It=n.__name(function(r,t,e,l){var v;const i=e%mt-1,d=r.append("g");t.section=i,d.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const c=d.append("g"),y=d.append("g"),p=y.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),m=(v=l.fontSize)!=null&&v.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+m*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,y.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),$t(c,t,i,l),t},"drawNode"),Nt=n.__name(function(r,t,e){var y;const l=r.append("g"),d=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),c=(y=e.fontSize)!=null&&y.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),$t=n.__name(function(r,t,e){r.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),r.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),R={drawRect:q,drawCircle:kt,drawSection:bt,drawText:gt,drawLabel:vt,drawTask:wt,drawBackgroundRect:St,getTextObj:Et,getNoteRect:X,initGraphics:Tt,drawNode:It,getVirtualNodeHeight:Nt},Lt=n.__name(function(r,t,e,l){var B,k,I;const i=n.getConfig2(),d=((B=i.timeline)==null?void 0:B.leftMargin)??50;n.log.debug("timeline",l.db);const c=i.securityLevel;let y;c==="sandbox"&&(y=n.select("#i"+t));const p=(c==="sandbox"?n.select(y.nodes()[0].contentDocument.body):n.select("body")).select("#"+t);p.append("g");const m=l.db.getTasks(),v=l.db.getCommonDb().getDiagramTitle();n.log.debug("task",m),R.initGraphics(p);const _=l.db.getSections();n.log.debug("sections",_);let s=0,a=0,h=0,u=0,g=50+d,o=50;u=50;let S=0,x=!0;_.forEach(function(N){const b={number:S,descr:N,section:S,width:150,padding:20,maxHeight:s},L=R.getVirtualNodeHeight(p,b,i);n.log.debug("sectionHeight before draw",L),s=Math.max(s,L+20)});let $=0,A=0;n.log.debug("tasks.length",m.length);for(const[N,b]of m.entries()){const L={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:a},C=R.getVirtualNodeHeight(p,L,i);n.log.debug("taskHeight before draw",C),a=Math.max(a,C+20),$=Math.max($,b.events.length);let H=0;for(const w of b.events){const M={descr:w,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};H+=R.getVirtualNodeHeight(p,M,i)}b.events.length>0&&(H+=(b.events.length-1)*10),A=Math.max(A,H)}n.log.debug("maxSectionHeight before draw",s),n.log.debug("maxTaskHeight before draw",a),_&&_.length>0?_.forEach(N=>{const b=m.filter(w=>w.section===N),L={number:S,descr:N,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:s};n.log.debug("sectionNode",L);const C=p.append("g"),H=R.drawNode(C,L,S,i);n.log.debug("sectionNode output",H),C.attr("transform",`translate(${g}, ${u})`),o+=s+50,b.length>0&&rt(p,b,S,g,o,a,i,$,A,s,!1),g+=200*Math.max(b.length,1),o=u,S++}):(x=!1,rt(p,m,S,g,o,a,i,$,A,s,!0));const W=p.node().getBBox();n.log.debug("bounds",W),v&&p.append("text").text(v).attr("x",W.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),h=x?s+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",h).attr("x2",W.width+3*d).attr("y2",h).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n.setupGraphViewbox(void 0,p,((k=i.timeline)==null?void 0:k.padding)??50,((I=i.timeline)==null?void 0:I.useMaxWidth)??!1)},"draw"),rt=n.__name(function(r,t,e,l,i,d,c,y,f,p,m){var v;for(const _ of t){const s={descr:_.task,section:e,number:e,width:150,padding:20,maxHeight:d};n.log.debug("taskNode",s);const a=r.append("g").attr("class","taskWrapper"),u=R.drawNode(a,s,e,c).height;if(n.log.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${i})`),d=Math.max(d,u),_.events){const g=r.append("g").attr("class","lineWrapper");let o=d;i+=100,o=o+Mt(r,_.events,e,l,i,c),i-=100,g.append("line").attr("x1",l+190/2).attr("y1",i+d).attr("x2",l+190/2).attr("y2",i+d+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,m&&!((v=c.timeline)!=null&&v.disableMulticolor)&&e++}i=i-10},"drawTasks"),Mt=n.__name(function(r,t,e,l,i,d){let c=0;const y=i;i=i+100;for(const f of t){const p={descr:f,section:e,number:e,width:150,padding:20,maxHeight:50};n.log.debug("eventNode",p);const m=r.append("g").attr("class","eventWrapper"),_=R.drawNode(m,p,e,d).height;c=c+_,m.attr("transform",`translate(${l}, ${i})`),i=i+10+_}return i=y,c},"drawEvents"),Pt={setConf:n.__name(()=>{},"setConf"),draw:Lt},Ht=n.__name(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],n.isDark(r["lineColor"+e])?r["lineColor"+e]=n.lighten(r["lineColor"+e],20):r["lineColor"+e]=n.darken(r["lineColor"+e],20);for(let e=0;e<r.THEME_COLOR_LIMIT;e++){const l=""+(17-3*e);t+=`
|
|
7
|
+
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
|
|
8
|
+
fill: ${r["cScale"+e]};
|
|
9
|
+
}
|
|
10
|
+
.section-${e-1} text {
|
|
11
|
+
fill: ${r["cScaleLabel"+e]};
|
|
12
|
+
}
|
|
13
|
+
.node-icon-${e-1} {
|
|
14
|
+
font-size: 40px;
|
|
15
|
+
color: ${r["cScaleLabel"+e]};
|
|
16
|
+
}
|
|
17
|
+
.section-edge-${e-1}{
|
|
18
|
+
stroke: ${r["cScale"+e]};
|
|
19
|
+
}
|
|
20
|
+
.edge-depth-${e-1}{
|
|
21
|
+
stroke-width: ${l};
|
|
22
|
+
}
|
|
23
|
+
.section-${e-1} line {
|
|
24
|
+
stroke: ${r["cScaleInv"+e]} ;
|
|
25
|
+
stroke-width: 3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lineWrapper line{
|
|
29
|
+
stroke: ${r["cScaleLabel"+e]} ;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
`}return t},"genSections"),At=n.__name(r=>`
|
|
39
|
+
.edge {
|
|
40
|
+
stroke-width: 3;
|
|
41
|
+
}
|
|
42
|
+
${Ht(r)}
|
|
43
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
44
|
+
fill: ${r.git0};
|
|
45
|
+
}
|
|
46
|
+
.section-root text {
|
|
47
|
+
fill: ${r.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.icon-container {
|
|
50
|
+
height:100%;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
.edge {
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
.eventWrapper {
|
|
59
|
+
filter: brightness(120%);
|
|
60
|
+
}
|
|
61
|
+
`,"getStyles"),Ct=At,Rt={db:it,renderer:Pt,parser:_t,styles:Ct};exports.diagram=Rt;
|