auto-coder-web 0.1.99__py3-none-any.whl → 0.1.101__py3-none-any.whl

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.
Files changed (71) hide show
  1. auto_coder_web/version.py +1 -1
  2. auto_coder_web/web/assets/HistoryPanel-gJupyfFp.js +2 -0
  3. auto_coder_web/web/assets/_basePickBy-CCSZj2pA.js +1 -0
  4. auto_coder_web/web/assets/_baseUniq-BTllNErT.js +1 -0
  5. auto_coder_web/web/assets/arc-BXjHXofo.js +1 -0
  6. auto_coder_web/web/assets/architectureDiagram-IEHRJDOE-DmIqWpdi.js +36 -0
  7. auto_coder_web/web/assets/blockDiagram-JOT3LUYC-DtACHz1R.js +121 -0
  8. auto_coder_web/web/assets/c4Diagram-VJAJSXHY-D3eQI0f_.js +10 -0
  9. auto_coder_web/web/assets/channel-C4EINljX.js +1 -0
  10. auto_coder_web/web/assets/chunk-4BMEZGHF-Ckc43zxH.js +1 -0
  11. auto_coder_web/web/assets/chunk-A2AXSNBT-CJ57iCVC.js +164 -0
  12. auto_coder_web/web/assets/chunk-AEK57VVT-o_ViTLZT.js +220 -0
  13. auto_coder_web/web/assets/chunk-D6G4REZN-2ayrGi-2.js +1 -0
  14. auto_coder_web/web/assets/chunk-RZ5BOZE2-csKhWZPs.js +1 -0
  15. auto_coder_web/web/assets/chunk-XZIHB7SX-G4BVkcV4.js +1 -0
  16. auto_coder_web/web/assets/classDiagram-GIVACNV2-DP0khH1f.js +1 -0
  17. auto_coder_web/web/assets/classDiagram-v2-COTLJTTW-DP0khH1f.js +1 -0
  18. auto_coder_web/web/assets/clone-Bg4iLekk.js +1 -0
  19. auto_coder_web/web/assets/{cssMode-dfzmIRw_.js → cssMode-BPyr8lmu.js} +1 -1
  20. auto_coder_web/web/assets/cytoscape.esm-BY7v1xhs.js +331 -0
  21. auto_coder_web/web/assets/dagre-OKDRZEBW-CCuMXe_S.js +4 -0
  22. auto_coder_web/web/assets/diagram-SSKATNLV-Bp-uorEf.js +43 -0
  23. auto_coder_web/web/assets/diagram-VNBRO52H-CKQFD3a_.js +24 -0
  24. auto_coder_web/web/assets/erDiagram-Q7BY3M3F-9eI0zHpI.js +60 -0
  25. auto_coder_web/web/assets/flowDiagram-4HSFHLVR-3RcC2Ccp.js +161 -0
  26. auto_coder_web/web/assets/{freemarker2-CD79_SV-.js → freemarker2-BU5Z-fJI.js} +1 -1
  27. auto_coder_web/web/assets/ganttDiagram-APWFNJXF-D2cSA1Cd.js +257 -0
  28. auto_coder_web/web/assets/gitGraphDiagram-7IBYFJ6S-D_9htwjS.js +65 -0
  29. auto_coder_web/web/assets/graph-cCt1e4eU.js +1 -0
  30. auto_coder_web/web/assets/{handlebars-B_inQ7Ga.js → handlebars-mkin9J8g.js} +2 -2
  31. auto_coder_web/web/assets/{html-s8IXsV2v.js → html-DtBbZIcO.js} +1 -1
  32. auto_coder_web/web/assets/{htmlMode-BNdCO4Um.js → htmlMode-RbI6rOrZ.js} +1 -1
  33. auto_coder_web/web/assets/infoDiagram-PH2N3AL5-BYP4b-4i.js +2 -0
  34. auto_coder_web/web/assets/init-Gi6I4Gst.js +1 -0
  35. auto_coder_web/web/assets/{javascript-D_ZBRKl9.js → javascript-f2lALfl-.js} +1 -1
  36. auto_coder_web/web/assets/journeyDiagram-U35MCT3I-B89eezTp.js +138 -0
  37. auto_coder_web/web/assets/{jsonMode-lWocgRYn.js → jsonMode-D_iny90a.js} +1 -1
  38. auto_coder_web/web/assets/kanban-definition-NDS4AKOZ-DXZ3QE3M.js +88 -0
  39. auto_coder_web/web/assets/katex-ChWnQ-fc.js +261 -0
  40. auto_coder_web/web/assets/layout-DEspB-Nn.js +1 -0
  41. auto_coder_web/web/assets/linear-DvyAnBDb.js +1 -0
  42. auto_coder_web/web/assets/{liquid-CPaH0eVF.js → liquid-BLUt9KkL.js} +1 -1
  43. auto_coder_web/web/assets/main-DgQa03WG.css +32 -0
  44. auto_coder_web/web/assets/main.js +637 -426
  45. auto_coder_web/web/assets/{mdx-DRx1b0qs.js → mdx-CiikeQLk.js} +1 -1
  46. auto_coder_web/web/assets/mindmap-definition-ALO5MXBD-BK4Kd7cQ.js +95 -0
  47. auto_coder_web/web/assets/ordinal-Cboi1Yqb.js +1 -0
  48. auto_coder_web/web/assets/pieDiagram-IB7DONF6-UuIn9g8t.js +30 -0
  49. auto_coder_web/web/assets/{python-5rTPwuda.js → python-BQGAmGD2.js} +1 -1
  50. auto_coder_web/web/assets/quadrantDiagram-7GDLP6J5-DdkeEcG5.js +7 -0
  51. auto_coder_web/web/assets/radar-MK3ICKWK-Bzl6RmHe.js +128 -0
  52. auto_coder_web/web/assets/{razor-zn6WfQ9V.js → razor-CMmYJAVf.js} +1 -1
  53. auto_coder_web/web/assets/requirementDiagram-KVF5MWMF-DYvXHPCT.js +64 -0
  54. auto_coder_web/web/assets/sankeyDiagram-QLVOVGJD-C3fiDKw0.js +10 -0
  55. auto_coder_web/web/assets/sequenceDiagram-X6HHIX6F-CifpUH-p.js +122 -0
  56. auto_coder_web/web/assets/stateDiagram-DGXRK772-x-pqGGcU.js +1 -0
  57. auto_coder_web/web/assets/stateDiagram-v2-YXO3MK2T-BhO6ozG8.js +1 -0
  58. auto_coder_web/web/assets/timeline-definition-BDJGKUSR-BmbgmEKE.js +61 -0
  59. auto_coder_web/web/assets/{tsMode-CkhihvQ0.js → tsMode-LqKHR7gR.js} +4 -4
  60. auto_coder_web/web/assets/{typescript-DH2E4fY1.js → typescript-KnQ9Sglt.js} +2 -2
  61. auto_coder_web/web/assets/{xml-kipCCfsB.js → xml-G2dyiWZM.js} +2 -2
  62. auto_coder_web/web/assets/xychartDiagram-VJFVF3MP-DnV9OlaB.js +7 -0
  63. auto_coder_web/web/assets/{yaml-BI9EB_1X.js → yaml-D_70BM1U.js} +1 -1
  64. auto_coder_web/web/index.html +1 -1
  65. {auto_coder_web-0.1.99.dist-info → auto_coder_web-0.1.101.dist-info}/METADATA +2 -2
  66. {auto_coder_web-0.1.99.dist-info → auto_coder_web-0.1.101.dist-info}/RECORD +69 -25
  67. auto_coder_web/web/assets/HistoryPanel-DAeswjWO.js +0 -2
  68. auto_coder_web/web/assets/main-D2S0ggFA.css +0 -32
  69. {auto_coder_web-0.1.99.dist-info → auto_coder_web-0.1.101.dist-info}/WHEEL +0 -0
  70. {auto_coder_web-0.1.99.dist-info → auto_coder_web-0.1.101.dist-info}/entry_points.txt +0 -0
  71. {auto_coder_web-0.1.99.dist-info → auto_coder_web-0.1.101.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,138 @@
1
+ import{a as ft,g as at,f as gt,d as mt}from"./chunk-D6G4REZN-2ayrGi-2.js";import{_ as i,g as xt,s as kt,a as _t,b as vt,q as bt,p as wt,c as A,d as W,e as Tt,y as St}from"./main.js";import{d as tt}from"./arc-BXjHXofo.js";var H=function(){var t=i(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],s=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:i(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:i(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"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:c,14:s,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:s,16:u,17:h,18:p},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:i(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:i(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}i(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}i(Q,"lex");for(var v,P,w,q,C={},N,$,D,j;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";j=[];for(N in S[P])this.terminals_[N]&&N>ut&&j.push("'"+this.terminals_[N]+"'");k.showPosition?G="Parse error on line "+(B+1)+`:
2
+ `+k.showPosition()+`
3
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(v==K?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:Y,expected:j})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+v);switch(w[0]){case 1:l.push(v),f.push(k.yytext),o.push(k.yylloc),l.push(w[1]),v=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if($=this.productions_[w[1]][1],C.$=f[f.length-$],C._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},dt&&(C._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],f,o].concat(yt)),typeof q<"u")return q;$&&(l=l.slice(0,-1*$*2),f=f.slice(0,-1*$),o=o.slice(0,-1*$)),l.push(this.productions_[w[1]][0]),f.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:i(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:i(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.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),r},"input"),unput:i(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(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:i(function(r){this.unput(this.match.slice(r))},"less"),pastInput:i(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:i(function(r,a){var l,y,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),y=r[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var o in f)this[o]=f[o];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,l,y;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),o=0;o<f.length;o++)if(l=this._input.match(this.rules[f[o]]),l&&(!a||l[0].length>a[0].length)){if(a=l,y=o,this.options.backtrack_lexer){if(r=this.test_match(l,f[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,f[y]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var a=this.next();return a||this.lex()},"lex"),begin:i(function(a){this.conditionStack.push(a)},"begin"),popState:i(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(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:i(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:i(function(a){this.begin(a)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(a,l,y,f){switch(y){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 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}}};return g}();d.lexer=x;function m(){this.yy={}}return i(m,"Parser"),m.prototype=d,d.Parser=m,new m}();H.parser=H;var $t=H,V="",U=[],F=[],R=[],Mt=i(function(){U.length=0,F.length=0,V="",R.length=0,St()},"clear"),Et=i(function(t){V=t,U.push(t)},"addSection"),Pt=i(function(){return U},"getSections"),It=i(function(){let t=et();const e=100;let n=0;for(;!t&&n<e;)t=et(),n++;return F.push(...R),F},"getTasks"),At=i(function(){const t=[];return F.forEach(n=>{n.people&&t.push(...n.people)}),[...new Set(t)].sort()},"updateActors"),Ct=i(function(t,e){const n=e.substr(1).split(":");let c=0,s=[];n.length===1?(c=Number(n[0]),s=[]):(c=Number(n[0]),s=n[1].split(","));const u=s.map(p=>p.trim()),h={section:V,type:V,people:u,task:t,score:c};R.push(h)},"addTask"),Vt=i(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};F.push(e)},"addTaskOrg"),et=i(function(){const t=i(function(n){return R[n].processed},"compileTask");let e=!0;for(const[n,c]of R.entries())t(n),e=e&&c.processed;return e},"compileTasks"),Ft=i(function(){return At()},"getActors"),rt={getConfig:i(()=>A().journey,"getConfig"),clear:Mt,setDiagramTitle:wt,getDiagramTitle:bt,setAccTitle:vt,getAccTitle:_t,setAccDescription:kt,getAccDescription:xt,addSection:Et,getSections:Pt,getTasks:It,addTask:Ct,addTaskOrg:Vt,getActors:Ft},Rt=i(t=>`.label {
7
+ font-family: ${t.fontFamily};
8
+ color: ${t.textColor};
9
+ }
10
+ .mouth {
11
+ stroke: #666;
12
+ }
13
+
14
+ line {
15
+ stroke: ${t.textColor}
16
+ }
17
+
18
+ .legend {
19
+ fill: ${t.textColor};
20
+ font-family: ${t.fontFamily};
21
+ }
22
+
23
+ .label text {
24
+ fill: #333;
25
+ }
26
+ .label {
27
+ color: ${t.textColor}
28
+ }
29
+
30
+ .face {
31
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
32
+ stroke: #999;
33
+ }
34
+
35
+ .node rect,
36
+ .node circle,
37
+ .node ellipse,
38
+ .node polygon,
39
+ .node path {
40
+ fill: ${t.mainBkg};
41
+ stroke: ${t.nodeBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .node .label {
46
+ text-align: center;
47
+ }
48
+ .node.clickable {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .arrowheadPath {
53
+ fill: ${t.arrowheadColor};
54
+ }
55
+
56
+ .edgePath .path {
57
+ stroke: ${t.lineColor};
58
+ stroke-width: 1.5px;
59
+ }
60
+
61
+ .flowchart-link {
62
+ stroke: ${t.lineColor};
63
+ fill: none;
64
+ }
65
+
66
+ .edgeLabel {
67
+ background-color: ${t.edgeLabelBackground};
68
+ rect {
69
+ opacity: 0.5;
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ .cluster rect {
75
+ }
76
+
77
+ .cluster text {
78
+ fill: ${t.titleColor};
79
+ }
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${t.fontFamily};
87
+ font-size: 12px;
88
+ background: ${t.tertiaryColor};
89
+ border: 1px solid ${t.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .task-type-0, .section-type-0 {
96
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
97
+ }
98
+ .task-type-1, .section-type-1 {
99
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
100
+ }
101
+ .task-type-2, .section-type-2 {
102
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
103
+ }
104
+ .task-type-3, .section-type-3 {
105
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
106
+ }
107
+ .task-type-4, .section-type-4 {
108
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
109
+ }
110
+ .task-type-5, .section-type-5 {
111
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
112
+ }
113
+ .task-type-6, .section-type-6 {
114
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
115
+ }
116
+ .task-type-7, .section-type-7 {
117
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
118
+ }
119
+
120
+ .actor-0 {
121
+ ${t.actor0?`fill: ${t.actor0}`:""};
122
+ }
123
+ .actor-1 {
124
+ ${t.actor1?`fill: ${t.actor1}`:""};
125
+ }
126
+ .actor-2 {
127
+ ${t.actor2?`fill: ${t.actor2}`:""};
128
+ }
129
+ .actor-3 {
130
+ ${t.actor3?`fill: ${t.actor3}`:""};
131
+ }
132
+ .actor-4 {
133
+ ${t.actor4?`fill: ${t.actor4}`:""};
134
+ }
135
+ .actor-5 {
136
+ ${t.actor5?`fill: ${t.actor5}`:""};
137
+ }
138
+ `,"getStyles"),Lt=Rt,Z=i(function(t,e){return mt(t,e)},"drawRect"),Bt=i(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(d){const x=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}i(u,"smile");function h(d){const x=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}i(h,"sad");function p(d){d.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 i(p,"ambivalent"),e.score>3?u(s):e.score<3?h(s):p(s),c},"drawFace"),lt=i(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),n.class!==void 0&&n.attr("class",n.class),e.title!==void 0&&n.append("title").text(e.title),n},"drawCircle"),ot=i(function(t,e){return gt(t,e)},"drawText"),Nt=i(function(t,e){function n(s,u,h,p,d){return s+","+u+" "+(s+h)+","+u+" "+(s+h)+","+(u+p-d)+" "+(s+h-d*1.2)+","+(u+p)+" "+s+","+(u+p)}i(n,"genPoints");const c=t.append("polygon");c.attr("points",n(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ot(t,e)},"drawLabel"),jt=i(function(t,e,n){const c=t.append("g"),s=at();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,Z(c,s),ct(n)(e.text,c,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),st=-1,zt=i(function(t,e,n){const c=e.x+n.width/2,s=t.append("g");st++;const u=300+5*30;s.append("line").attr("id","task"+st).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",u).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(s,{cx:c,cy:300+(5-e.score)*30,score:e.score});const h=at();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=n.width,h.height=n.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,Z(s,h);let p=e.x+14;e.people.forEach(d=>{const x=e.actors[d].color,m={cx:p,cy:e.y,r:7,fill:x,stroke:"#000",title:d,pos:e.actors[d].position};lt(s,m),p+=10}),ct(n)(e.task,s,h.x,h.y,h.width,h.height,{class:"task"},n,e.colour)},"drawTask"),Ot=i(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(s,u,h,p,d,x,m,g){const r=u.append("text").attr("x",h+d/2).attr("y",p+x/2+5).style("font-color",g).style("text-anchor","middle").text(s);c(r,m)}i(t,"byText");function e(s,u,h,p,d,x,m,g,r){const{taskFontSize:a,taskFontFamily:l}=g,y=s.split(/<br\s*\/?>/gi);for(let f=0;f<y.length;f++){const o=f*a-a*(y.length-1)/2,S=u.append("text").attr("x",h+d/2).attr("y",p).attr("fill",r).style("text-anchor","middle").style("font-size",a).style("font-family",l);S.append("tspan").attr("x",h+d/2).attr("dy",o).text(y[f]),S.attr("y",p+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),c(S,m)}}i(e,"byTspan");function n(s,u,h,p,d,x,m,g){const r=u.append("switch"),l=r.append("foreignObject").attr("x",h).attr("y",p).attr("width",d).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,r,h,p,d,x,m,g),c(l,m)}i(n,"byFo");function c(s,u){for(const h in u)h in u&&s.attr(h,u[h])}return i(c,"_setTextAttrs"),function(s){return s.textPlacement==="fo"?n:s.textPlacement==="old"?t:e}}(),Yt=i(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"),L={drawRect:Z,drawCircle:lt,drawSection:jt,drawText:ot,drawLabel:Nt,drawTask:zt,drawBackgroundRect:Ot,initGraphics:Yt},qt=i(function(t){Object.keys(t).forEach(function(n){z[n]=t[n]})},"setConf"),M={};function ht(t){const e=A().journey;let n=60;Object.keys(M).forEach(c=>{const s=M[c].color,u={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:M[c].position};L.drawCircle(t,u);const h={x:40,y:n+7,fill:"#666",text:c,textMargin:e.boxTextMargin|5};L.drawText(t,h),n+=20})}i(ht,"drawActorLegend");var z=A().journey,I=z.leftMargin,Gt=i(function(t,e,n,c){const s=A().journey,u=A().securityLevel;let h;u==="sandbox"&&(h=W("#i"+e));const p=u==="sandbox"?W(h.nodes()[0].contentDocument.body):W("body");T.init();const d=p.select("#"+e);L.initGraphics(d);const x=c.db.getTasks(),m=c.db.getDiagramTitle(),g=c.db.getActors();for(const o in M)delete M[o];let r=0;g.forEach(o=>{M[o]={color:s.actorColours[r%s.actorColours.length],position:r},r++}),ht(d),T.insert(0,0,I,Object.keys(M).length*50),Wt(d,x,0);const a=T.getBounds();m&&d.append("text").text(m).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const l=a.stopy-a.starty+2*s.diagramMarginY,y=I+a.stopx+2*s.diagramMarginX;Tt(d,l,y,s.useMaxWidth),d.append("line").attr("x1",I).attr("y1",s.height*4).attr("x2",y-I-4).attr("y2",s.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const f=m?70:0;d.attr("viewBox",`${a.startx} -25 ${y} ${l+f}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",l+f+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:i(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:i(function(t,e,n,c){t[e]===void 0?t[e]=n:t[e]=c(n,t[e])},"updateVal"),updateBounds:i(function(t,e,n,c){const s=A().journey,u=this;let h=0;function p(d){return i(function(m){h++;const g=u.sequenceItems.length-h+1;u.updateVal(m,"starty",e-g*s.boxMargin,Math.min),u.updateVal(m,"stopy",c+g*s.boxMargin,Math.max),u.updateVal(T.data,"startx",t-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopx",n+g*s.boxMargin,Math.max),d!=="activation"&&(u.updateVal(m,"startx",t-g*s.boxMargin,Math.min),u.updateVal(m,"stopx",n+g*s.boxMargin,Math.max),u.updateVal(T.data,"starty",e-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopy",c+g*s.boxMargin,Math.max))},"updateItemBounds")}i(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:i(function(t,e,n,c){const s=Math.min(t,n),u=Math.max(t,n),h=Math.min(e,c),p=Math.max(e,c);this.updateVal(T.data,"startx",s,Math.min),this.updateVal(T.data,"starty",h,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",p,Math.max),this.updateBounds(s,h,u,p)},"insert"),bumpVerticalPos:i(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:i(function(){return this.verticalPos},"getVerticalPos"),getBounds:i(function(){return this.data},"getBounds")},X=z.sectionFills,it=z.sectionColours,Wt=i(function(t,e,n){const c=A().journey;let s="";const u=c.height*2+c.diagramMarginY,h=n+u;let p=0,d="#CCC",x="black",m=0;for(const[g,r]of e.entries()){if(s!==r.section){d=X[p%X.length],m=p%X.length,x=it[p%it.length];let l=0;const y=r.section;for(let o=g;o<e.length&&e[o].section==y;o++)l=l+1;const f={x:g*c.taskMargin+g*c.width+I,y:50,text:r.section,fill:d,num:m,colour:x,taskCount:l};L.drawSection(t,f,c),s=r.section,p++}const a=r.people.reduce((l,y)=>(M[y]&&(l[y]=M[y]),l),{});r.x=g*c.taskMargin+g*c.width+I,r.y=h,r.width=c.diagramMarginX,r.height=c.diagramMarginY,r.colour=x,r.fill=d,r.num=m,r.actors=a,L.drawTask(t,r,c),T.insert(r.x,r.y,r.x+r.width+c.taskMargin,300+5*30)}},"drawTasks"),nt={setConf:qt,draw:Gt},Zt={parser:$t,db:rt,renderer:nt,styles:Lt,init:i(t=>{nt.setConf(t.journey),rt.clear()},"init")};export{Zt as diagram};
@@ -1,4 +1,4 @@
1
- import{o as Et}from"./main.js";/*!-----------------------------------------------------------------------------
1
+ import{aq as Et}from"./main.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -0,0 +1,88 @@
1
+ import{_ as c,l as te,c as W,H as fe,ae as ye,af as be,ag as me,U as _e,F as Y,i as G,t as Ee,J as ke,V as Se,W as le,X as ce}from"./main.js";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],U=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],H=[1,35],M=[1,36],A=[1,6,7,11,13,16,17,20,23],j=[1,38],V={trace:c(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:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:U}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:H,11:M}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:U}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:j}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:H,11:M}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:j}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,F={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`:
2
+ `+b.showPosition()+`
3
+ Expecting `+K.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),k=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||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:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(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:c(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:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:c(function(s,n){var a,o,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),o=s[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in u)this[e]=u[e];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,a,o;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),e=0;e<u.length;e++)if(a=this._input.match(this.rules[u[e]]),a&&(!n||a[0].length>n[0].length)){if(n=a,o=e,this.options.backtrack_lexer){if(s=this.test_match(a,u[e]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[o]),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:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;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 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.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}}};return _}();V.lexer=m;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var Ne=$,D=[],ne=[],ee=0,se={},xe=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),ve=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].level<g)throw new Error('Items without section detected, found section ("'+D[r].label+'")');return t===(d==null?void 0:d.level)?null:d},"getSection"),he=c(function(){return ne},"getSections"),De=c(function(){const t=[],g=[],d=he(),r=W();for(const p of d){const E={id:p.id,label:G(p.label??"",r),isGroup:!0,ticket:p.ticket,shape:"kanbanSection",level:p.level,look:r.look};g.push(E);const f=D.filter(h=>h.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:G(h.label??"",r),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Le=c((t,g,d,r,p)=>{var C,w;const E=W();let f=((C=E.mindmap)==null?void 0:C.padding)??Y.mindmap.padding;switch(r){case y.ROUNDED_RECT:case y.RECT:case y.HEXAGON:f*=2}const h={id:G(g,E)||"kbn"+ee++,level:t,label:G(d,E),width:((w=E.mindmap)==null?void 0:w.maxNodeWidth)??Y.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(`
7
+ `)?N=p+`
8
+ `:N=`{
9
+ `+p+`
10
+ }`;const i=Ee(N,{schema:ke});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(h.shape=i==null?void 0:i.shape),i!=null&&i.label&&(h.label=i==null?void 0:i.label),i!=null&&i.icon&&(h.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(h.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(h.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(h.priority=i==null?void 0:i.priority)}const L=ve(t);L?h.parentId=L.id||"kbn"+ee++:ne.push(h),D.push(h)},"addNode"),y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Oe=c((t,g)=>{switch(te.debug("In get type",t,g),t){case"[":return y.RECT;case"(":return g===")"?y.ROUNDED_RECT:y.CLOUD;case"((":return y.CIRCLE;case")":return y.CLOUD;case"))":return y.BANG;case"{{":return y.HEXAGON;default:return y.DEFAULT}},"getType"),Ie=c((t,g)=>{se[t]=g},"setElementForId"),Ce=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=G(t.icon,g)),t.class&&(d.cssClasses=G(t.class,g))},"decorateNode"),we=c(t=>{switch(t){case y.DEFAULT:return"no-border";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded-rect";case y.CIRCLE:return"circle";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ae=c(()=>te,"getLogger"),Te=c(t=>se[t],"getElementById"),Re={clear:xe,addNode:Le,getSections:he,getData:De,nodeType:y,getType:Oe,setElementForId:Ie,decorateNode:Ce,type2Str:we,getLogger:Ae,getElementById:Te},Pe=Re,Ve=c(async(t,g,d,r)=>{var H,M,A,j,V;te.debug(`Rendering kanban diagram
11
+ `+t);const E=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g),L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=E.nodes.filter(m=>m.isGroup);let N=0;const i=10,U=[];let x=25;for(const m of w){const O=((H=f==null?void 0:f.kanban)==null?void 0:H.sectionWidth)||200;N=N+1,m.x=O*N+(N-1)*i/2,m.width=O,m.y=0,m.height=O*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+N;const _=await ye(L,m);x=Math.max(x,(M=_==null?void 0:_.labelBBox)==null?void 0:M.height),U.push(_)}let P=0;for(const m of w){const O=U[P];P=P+1;const _=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-_*3/2+x;let n=s;const a=E.nodes.filter(e=>e.parentId===m.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=m.x,e.width=_-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}_e(void 0,h,((j=f.mindmap)==null?void 0:j.padding)??Y.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??Y.kanban.useMaxWidth)},"draw"),Be={draw:Ve},Fe=c(t=>{let g="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Se(t["lineColor"+r])?t["lineColor"+r]=le(t["lineColor"+r],20):t["lineColor"+r]=ce(t["lineColor"+r],20);const d=c((r,p)=>t.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const p=""+(17-3*r);g+=`
12
+ .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
13
+ fill: ${d(t["cScale"+r],10)};
14
+ stroke: ${d(t["cScale"+r],10)};
15
+
16
+ }
17
+ .section-${r-1} text {
18
+ fill: ${t["cScaleLabel"+r]};
19
+ }
20
+ .node-icon-${r-1} {
21
+ font-size: 40px;
22
+ color: ${t["cScaleLabel"+r]};
23
+ }
24
+ .section-edge-${r-1}{
25
+ stroke: ${t["cScale"+r]};
26
+ }
27
+ .edge-depth-${r-1}{
28
+ stroke-width: ${p};
29
+ }
30
+ .section-${r-1} line {
31
+ stroke: ${t["cScaleInv"+r]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${t.background};
48
+ stroke: ${t.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${t.background};
54
+ stroke: ${t.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return g},"genSections"),Ge=c(t=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${Fe(t)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${t.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${t.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${t.textColor};
79
+ fill: ${t.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ `,"getStyles"),Ue=Ge,Me={db:Pe,renderer:Be,parser:Ne,styles:Ue};export{Me as diagram};