filecat 6.45.3 → 6.47.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/build/dist/124.23fa0d2699d9618dda9b.js +1 -0
- package/build/dist/{9725.c0f5fe759b3f29ad5989.js → 1240.8141c3584667c9b102c5.js} +1 -1
- package/build/dist/125.46b0b0838cec5442fdf6.js +1 -0
- package/build/dist/{1472.f10cd19f1ebc66d06ca5.js → 1472.822ac655d838f1a02b9a.js} +1 -1
- package/build/dist/{6202.f1c6599d8628dfe0f47d.js → 1715.b6871d580981169bbdc4.js} +1 -1
- package/build/dist/{8888.c714553db9ff11c9da25.js → 1730.f999109734b2ec283532.js} +1 -1
- package/build/dist/{4892.2bcb6c2d911a8d6049e6.js → 1750.36c146cd44049aaf79bc.js} +1 -1
- package/build/dist/{1218.bb8814412156c1a05a8c.js → 1772.7868dde9477de83bca1b.js} +1 -1
- package/build/dist/2449.0a762cd0483921adb91b.js +1 -0
- package/build/dist/2535.15ea6ba73588f47dc278.js +1 -0
- package/build/dist/{3813.6430f39e6bcabeb141ba.js → 2549.d0b9ca007ebae4995c22.js} +1 -1
- package/build/dist/2862.b1506f9eda52fa4f64cd.js +1 -0
- package/build/dist/2979.a1aa1f822cfc6c15f4a7.js +1 -0
- package/build/dist/{9499.bd13c877be5faa569e76.js → 3386.cc4b0d13967d3d1ac1ac.js} +1 -1
- package/build/dist/{6317.0929fcd5463e5e8e67d1.js → 3743.847ccbdcf5b607eec417.js} +1 -1
- package/build/dist/{8814.5157a8490dc97bab58c8.js → 3822.7e8ba22abbc6a60e6e20.js} +1 -1
- package/build/dist/{9786.cd9c2e2e7602e4310054.js → 3975.fde79b562d1f76f82274.js} +1 -1
- package/build/dist/{2018.8ee7ad4c73b038c713c5.js → 4619.1f7d8bf06c69e2ce9de7.js} +1 -1
- package/build/dist/{2640.6877d2665aa4ee6a1a85.js → 4625.a6a593542f4f2ebdae0f.js} +1 -1
- package/build/dist/{1082.e5badad25358d9fb3079.js → 4877.c31b8c8ee069225abc0d.js} +1 -1
- package/build/dist/5014.ff2b55369c42ab3cdda2.js +1 -0
- package/build/dist/{2726.52ceb81411f86822798f.js → 5135.9c0adbfd935bc46dd00d.js} +1 -1
- package/build/dist/5222.540853902e9c52d28220.js +1 -0
- package/build/dist/{7551.fd0ef76160cc344a6cfc.js → 5708.d62ffec88d557ee68f7b.js} +1 -1
- package/build/dist/5877.4e8f34819a3ae8da88b7.js +1 -0
- package/build/dist/5919.8a2c39a0e1623d795ee5.js +1 -0
- package/build/dist/5976.67aa23f2625209b8003b.js +1 -0
- package/build/dist/6002.1c2ff6a9c94ee343dded.js +1 -0
- package/build/dist/6110.a21be9c843a97bad11d5.js +1 -0
- package/build/dist/6402.dc70cc4e1530b8f1519d.js +1 -0
- package/build/dist/648.ca43171884d81b27c3a3.js +1 -0
- package/build/dist/{5061.5a9a6052bb6d3c895bc0.js → 6794.2fe35b73c565a07ec864.js} +1 -1
- package/build/dist/7017.274f83a8995232a6a9a0.js +1 -0
- package/build/dist/736.086cd9a8f1598c9f0ac7.js +1 -0
- package/build/dist/764.7c29eaf9d7edbee8467e.js +1 -0
- package/build/dist/{5181.1493235f192ed0e34fa8.js → 7887.2edcfdeb215d33478936.js} +1 -1
- package/build/dist/{4775.2e9cd58436b05580eb1c.js → 8018.02ea29dc6f59bbfaaee0.js} +1 -1
- package/build/dist/{5460.d692ffc021e7b872705d.js → 8136.dc1403b91767ca089293.js} +1 -1
- package/build/dist/{8256.0e3d9a5222004414b053.js → 8220.3ddda498d174349e189c.js} +1 -1
- package/build/dist/8233.6f5cd229953db8462d7d.js +1 -0
- package/build/dist/8535.9d68b1a6589a813c5bf1.js +1 -0
- package/build/dist/8947.55d1c2f1238de7f51549.js +2 -0
- package/build/dist/{4371.773ef273063e38ac1fd1.js → 9256.5d9a03011b69d1504ae4.js} +1 -1
- package/build/dist/9307.2c9d7f6089fef297b1c1.js +1 -0
- package/build/dist/{2703.e711df3217f7b4dfc978.js → 9352.6ebe66d0487686642ec9.js} +1 -1
- package/build/dist/index.html +1 -1
- package/build/dist/main.5bc1e6b78e3174e3fe27.js +2 -0
- package/build/main.js +1 -1
- package/package.json +2 -2
- package/build/dist/1012.1ffc2b5f439b4dbd31ab.js +0 -1
- package/build/dist/135.f248a925d34a798480d7.js +0 -1
- package/build/dist/1727.69b721002e5c4cee43f5.js +0 -1
- package/build/dist/2227.630510781f59cc4c4fb2.js +0 -1
- package/build/dist/2579.7a313dc04e7bd13abef5.js +0 -1
- package/build/dist/3084.52a9fb540f9a2f20e2a4.js +0 -1
- package/build/dist/3106.7d69822609a6d0ddd7af.js +0 -1
- package/build/dist/4204.e82ad99dea01b22eb25d.js +0 -1
- package/build/dist/4754.cd598f047ff6236c61c9.js +0 -1
- package/build/dist/5088.0caefbc5a430ba64afa1.js +0 -1
- package/build/dist/5945.244b607c26ac99161fe1.js +0 -1
- package/build/dist/6084.2417b84c3833e9b05951.js +0 -1
- package/build/dist/6085.1dc5c0e79932b5f9e52c.js +0 -1
- package/build/dist/636.d61ff5465a8d2326514b.js +0 -1
- package/build/dist/6383.b333496d85f9b04daf1f.js +0 -1
- package/build/dist/7111.b2007509a9bf0683c90a.js +0 -1
- package/build/dist/7209.3b487c37072aadaed4ca.js +0 -1
- package/build/dist/7632.43249289310a589f1b1e.js +0 -1
- package/build/dist/7911.89b6408e7daaccc1d8af.js +0 -1
- package/build/dist/893.0160359067e299f9a4f2.js +0 -1
- package/build/dist/8947.f1f29db3485b2287da46.js +0 -2
- package/build/dist/9756.eb8e5cd0c35395fdf573.js +0 -1
- package/build/dist/main.360cfb58341f1f91aefe.js +0 -2
- /package/build/dist/{8947.f1f29db3485b2287da46.js.LICENSE.txt → 8947.55d1c2f1238de7f51549.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.360cfb58341f1f91aefe.js.LICENSE.txt → main.5bc1e6b78e3174e3fe27.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5222],{91730(t,e,s){s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>a});var i=s(32178),n=s(86827),r=s(62559),o=s(51444),a=(0,n.K)((t,e)=>{const s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,n.K)((t,e)=>{const s={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};a(t,s).lower()},"drawBackgroundRect"),c=(0,n.K)((t,e)=>{const s=e.text.replace(i.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const r=n.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(s),n},"drawText"),h=(0,n.K)((t,e,s,i)=>{const n=t.append("image");n.attr("x",e),n.attr("y",s);const o=(0,r.J)(i);n.attr("xlink:href",o)},"drawImage"),d=(0,n.K)((t,e,s,i)=>{const n=t.append("use");n.attr("x",e),n.attr("y",s);const o=(0,r.J)(i);n.attr("xlink:href",`#${o}`)},"drawEmbeddedImage"),u=(0,n.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,n.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,n.K)(()=>{let t=(0,o.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,o.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},45222(t,e,s){s.d(e,{Zk:()=>y,q7:()=>G,tM:()=>ht,u4:()=>ct});var i=s(96755),n=s(78257),r=s(21570),o=s(91730),a=s(99087),l=s(32178),c=s(31293),h=s(86827),d=s(51444),u=s(99418),p=function(){var t=(0,h.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,16],l=[1,17],c=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],x=[1,31],E=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],w=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],A=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],L=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,h.K)(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:a,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:w},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(A,[2,44],{58:[1,56]}),t(A,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:w},t(I,[2,17]),t(L,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:c,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(A,[2,46]),t(A,[2,47]),t(I,[2,15]),t(I,[2,19]),t(L,n,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:c,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:w},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,h.K)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,h.K)(function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",l=0,c=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var m=p.options&&p.options.ranges;function S(){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,(0,h.K)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,h.K)(S,"lex");for(var k,b,T,_,x,E,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=o[T]&&o[T][k]),void 0===_||!_.length||!_[0]){var w="";for(E in C=[],o[T])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),n.push(p.yytext),r.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,a=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[_[1]][1],v.$=n[n.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(x=this.performAction.apply(v,[a,c,l,y.yy,_[1],n,r].concat(u))))return x;D&&(s=s.slice(0,-1*D*2),n=n.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),n.push(v.$),r.push(v._$),$=o[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")},N=function(){return{EOF:1,parseError:(0,h.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K)(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:(0,h.K)(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:(0,h.K)(function(t){var e=t.length,s=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),s.length-1&&(this.yylineno-=s.length-1);var n=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(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:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(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:(0,h.K)(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:(0,h.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.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],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[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:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(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:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K)(function(t,e,s,i){function n(){const s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){const i=e.yytext.slice(0,s),n=e.yytext.slice(s);n&&t.lexer.unput(n),e.yytext=i}return!0}(0,h.K)(n,"processId");switch(s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!n())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!n())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!n())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}}();function K(){this.yy={}}return R.lexer=N,(0,h.K)(K,"Parser"),K.prototype=R,R.Parser=K,new K}();p.parser=p;var y=p,g="state",f="root",m="relation",S="default",k="divider",b="fill:none",T="fill: #333",_="markdown",x="normal",E="rect",D="rectWithTitle",$="divider",C="roundedWithTitle",v="statediagram",w=`${v}-state`,I="transition",A=`${I} note-edge`,L=`${v}-note`,R=`${v}-cluster`,N=`${v}-cluster-alt`,K="parent",O="note",B="----",F=`${B}${O}`,P=`${B}${K}`,Y=(0,h.K)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),G={getClasses:(0,h.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K)(async function(t,e,s,o){c.R.info("REF0:"),c.R.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:d,layout:u}=(0,l.D7)();o.db.extract(o.db.getRootDocV2());const p=o.db.getData(),y=(0,i.A)(e,h);p.type=o.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50;"neo"===(0,l.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await(0,r.XX)(p,y);try{("function"==typeof o.db.getLinks?o.db.getLinks():new Map).forEach((t,e)=>{const s="string"==typeof e?e:"string"==typeof e?.id?e.id:"",i=p.nodes.find(t=>t.id===s);if(!s)return void c.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const n=y.node()?.querySelectorAll("g.node, g.rough-node");let r;if(n?.forEach(t=>{const e=t.textContent?.trim();t.id!==i?.domId&&e!==s||(r=t)}),!r)return void c.R.warn("⚠️ Could not find node matching text:",s);const o=r.parentNode;if(!o)return void c.R.warn("⚠️ Node has no parent, cannot wrap:",s);const a=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),a.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");a.setAttribute("title",e),r.setAttribute("title",e)}o.replaceChild(a,r),a.appendChild(r),c.R.info("🔗 Wrapped node in <a> tag for:",s,t.url)})}catch(t){c.R.error("❌ Error injecting clickable links:",t)}a._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,o.db.getDiagramTitle()),(0,n.P)(y,8,v,d?.useMaxWidth??!0)},"draw"),getDir:Y},j=new Map,z=0;function M(t="",e=0,s="",i=B){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,h.K)(M,"stateDomId");var W=(0,h.K)((t,e,s,i,n,r,o,a)=>{c.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case g:case S:J(t,e,s,i,n,r,o,a);break;case m:{J(t,e.state1,s,i,n,r,o,a),J(t,e.state2,s,i,n,r,o,a);const c="neo"===o,h={id:"edge"+z,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:c?"arrow_barb_neo":"arrow_barb",style:b,labelStyle:"",label:l.Y2.sanitizeText(e.description??"",(0,l.D7)()),arrowheadStyle:T,labelpos:"c",labelType:_,thickness:x,classes:I,look:o};n.push(h),z++}}})},"setupDoc"),U=(0,h.K)((t,e="TB")=>{let s=e;if(t.doc)for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function X(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function H(t){return t?.classes?.join(" ")??""}function V(t){return t?.styles??[]}(0,h.K)(X,"insertOrUpdateNode"),(0,h.K)(H,"getClassesFromDbInfo"),(0,h.K)(V,"getStylesFromDbInfo");var J=(0,h.K)((t,e,s,i,n,r,o,a)=>{const h=e.id,d=s.get(h),u=H(d),p=V(d),y=(0,l.D7)();if(c.R.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=E;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==S&&(s=e.type),j.get(h)||j.set(h,{id:h,shape:s,description:l.Y2.sanitizeText(h,y),cssClasses:`${u} ${w}`,cssStyles:p});const d=j.get(h);e.description&&(Array.isArray(d.description)?(d.shape=D,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=D,d.description===h?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=E,d.description=e.description),d.description=l.Y2.sanitizeTextOrArray(d.description,y)),1===d.description?.length&&d.shape===D&&("group"===d.type?d.shape=C:d.shape=E),!d.type&&e.doc&&(c.R.info("Setting cluster for XCX",h,U(e)),d.type="group",d.isGroup=!0,d.dir=U(e),d.explicitDir=e.doc.some(t=>"dir"===t.stmt),d.shape=e.type===k?$:C,d.cssClasses=`${d.cssClasses} ${R} ${r?N:""}`);const g={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:h,dir:d.dir,domId:M(h,z),type:d.type,isGroup:"group"===d.type,padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(g.shape===$&&(g.label=""),t&&"root"!==t.id&&(c.R.trace("Setting node ",h," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:L,cssStyles:[],cssCompiledStyles:[],id:h+F+"-"+z,domId:M(h,z,O),type:d.type,isGroup:"group"===d.type,padding:y.flowchart?.padding,look:o,position:e.note.position},s=h+P,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:h+P,domId:M(h,z,K),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};z++,r.id=s,t.parentId=s,X(i,r,a),X(i,t,a),X(i,g,a);let l=h,c=t.id;"left of"===e.note.position&&(l=t.id,c=h),n.push({id:l+"-"+c,start:l,end:c,arrowhead:"none",arrowTypeEnd:"",style:b,labelStyle:"",classes:A,arrowheadStyle:T,labelpos:"c",labelType:_,thickness:x,look:o})}else X(i,g,a)}e.doc&&(c.R.trace("Adding nodes children "),W(e,e.doc,s,i,n,!r,o,a))},"dataFetcher"),q=(0,h.K)(()=>{j.clear(),z=0},"reset"),Z="[*]",Q="start",tt="[*]",et="end",st="color",it="fill",nt="bgFill",rt=",",ot=(0,h.K)(()=>new Map,"newClassesList"),at=(0,h.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),lt=(0,h.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),ct=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ot(),this.documents={root:at()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=l.iN,this.setAccTitle=l.SV,this.getAccDescription=l.m7,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,h.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const e of Array.isArray(t)?t:t.doc)switch(e.stmt){case g:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case m:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}const e=this.getStates(),s=(0,l.D7)();q(),J(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const t of this.nodes)if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const t of e){let e=this.getState(t);if(!e){const s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){c.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===m)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===g&&(e.id===Z?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==f&&e.stmt!==g||!e.doc)return;const i=[];let n=[];for(const t of e.doc)if(t.type===k){const e=lt(t);e.doc=lt(n),i.push(e),n=[]}else n.push(t);if(i.length>0&&n.length>0){const t={stmt:g,id:(0,a.$C)(),type:"divider",doc:lt(n)};i.push(lt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:f,stmt:f},{id:f,stmt:f,doc:this.rootDoc},!0),{id:f,doc:this.rootDoc}}addState(t,e=S,s=void 0,i=void 0,n=void 0,r=void 0,o=void 0,a=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else c.R.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:g,id:h,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]});if(i){c.R.info("Setting state description",h,i);(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))}if(n){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=n,t.note.text=l.Y2.sanitizeText(t.note.text,(0,l.D7)())}if(r){c.R.info("Setting state classes",h,r);(Array.isArray(r)?r:[r]).forEach(t=>this.setCssClass(h,t.trim()))}if(o){c.R.info("Setting state styles",h,o);(Array.isArray(o)?o:[o]).forEach(t=>this.setStyle(h,t.trim()))}if(a){c.R.info("Setting state styles",h,o);(Array.isArray(a)?a:[a]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:at()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ot(),t||(this.links=new Map,(0,l.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){c.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),c.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Z?(this.startEndCount++,`${Q}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=S){return t===Z?Q:e}endIdIfNeeded(t=""){return t===tt?(this.startEndCount++,`${et}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=S){return t===tt?et:e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),r=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(r,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:l.Y2.sanitizeText(s,(0,l.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),r=this.endIdIfNeeded(e.trim()),o=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(r,o),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:s?l.Y2.sanitizeText(s,(0,l.D7)()):void 0})}}addDescription(t,e){const s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(l.Y2.sanitizeText(i,(0,l.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(rt).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(st).exec(t)){const t=e.replace(it,nt).replace(st,it);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){const e=(0,o.Ck)();(0,d.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{const s=(0,d.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(u.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,d.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){const e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,l.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Y(this.getRootDocV2())}}getConfig(){return(0,l.D7)().state}},ht=(0,h.K)(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles")},78257(t,e,s){s.d(e,{P:()=>o});var i=s(32178),n=s(31293),r=s(86827),o=(0,r.K)((t,e,s,r)=>{t.attr("class",s);const{width:o,height:c,x:h,y:d}=a(t,e);(0,i.a$)(t,c,o,r);const u=l(h,d,o,c,e);t.attr("viewBox",u),n.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,r.K)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,r.K)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},96755(t,e,s){s.d(e,{A:()=>r});var i=s(86827),n=s(51444),r=(0,i.K)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[7551],{75937(t,e,r){var a=r(86309),i=r(51931);const s=(t,e)=>a.A.lang.round(i.A.parse(t)[e]);r.d(e,["A",0,s])},37551(t,e,r){r.d(e,{diagram:()=>Re});var a=r(64918),i=r(91865),s=r(3868),n=r(8969),o=(r(24731),r(28342)),l=r(68861),c=r(31293),d=r(86827),h=r(37110),g=r(99125),u=r(89826);var y=r(19663);function p(t){if((0,h.s)(t))return t;const e=(0,g.b)(t);if(!function(t){switch((0,g.b)(t)){case u.R_:case u.Uw:case u.cT:case u.iq:case u.$V:case u.vC:case u.ri:case u.ML:case u.XZ:case u.i1:case u._u:case u.pj:case u.kj:case u.GX:case u.Av:case u.NA:case u.OG:case u.VP:case u.Qb:case u.q:case u.x6:case u.ZR:return!0;default:return!1}}(t))return{};if(r=t,Array.isArray(r)){const e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}var r;if((0,y.i)(t)){const e=t;return new(0,e.constructor)(e.buffer,e.byteOffset,e.length)}if("[object ArrayBuffer]"===e)return new ArrayBuffer(t.byteLength);if("[object DataView]"===e){const e=t,r=e.buffer,a=e.byteOffset,i=e.byteLength,s=new ArrayBuffer(i),n=new Uint8Array(r,a,i);return new Uint8Array(s).set(n),new DataView(s)}if("[object Boolean]"===e||"[object Number]"===e||"[object String]"===e){const r=new(0,t.constructor)(t.valueOf());return"[object String]"===e?function(t,e){const r=e.valueOf().length;for(const a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}(r,t):x(r,t),r}if("[object Date]"===e)return new Date(Number(t));if("[object RegExp]"===e){const e=t,r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,r}if("[object Symbol]"===e)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===e){const e=t,r=new Map;return e.forEach((t,e)=>{r.set(e,t)}),r}if("[object Set]"===e){const e=t,r=new Set;return e.forEach(t=>{r.add(t)}),r}if("[object Arguments]"===e){const e=t,r={};return x(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}const a={};return function(t,e){const r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}(a,t),x(a,t),function(t,e){const r=Object.getOwnPropertySymbols(e);for(let a=0;a<r.length;a++){const i=r[a];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(a,t),a}function x(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var b=r(75937),f=r(25582),m=r(51444),w=r(697),k=function(){var t=(0,d.K)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],o=[1,17],l=[1,18],c=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49],b={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,d.K)(function(t,e,r,a,i,s,n){var o=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[o-1]),a.setHierarchy(s[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:const e=parseInt(s[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);const i=a.edgeStrToEdgeData(s[o-1].edgeTypeStr),n=a.edgeStrToEdgeStartData(s[o-1].edgeTypeStr),l=a.edgeStrToThickness(s[o-1].edgeTypeStr),c=a.edgeStrToPattern(s[o-1].edgeTypeStr);this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",thickness:l,pattern:c,directions:s[o].directions,arrowTypeEnd:i,arrowTypeStart:n},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]);a.generateId();this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]);const d=a.generateId();this.$={id:d,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{8:[1,20]},t(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:o,46:l}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(c,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,d.K)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,d.K)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,o="",l=0,c=0,h=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;s.push(x);var b=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,d.K)(f,"lex");for(var m,w,k,S,L,_,E,v,D,R={};;){if(k=r[r.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==m&&(m=f()),S=n[k]&&n[k][m]),void 0===S||!S.length||!S[0]){var T="";for(_ in D=[],n[k])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:x,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(S[0]){case 1:r.push(m),i.push(u.yytext),s.push(u.yylloc),r.push(S[1]),m=null,w?(m=w,w=null):(c=u.yyleng,o=u.yytext,l=u.yylineno,x=u.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[S[1]][1],R.$=i[i.length-E],R._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(R._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(L=this.performAction.apply(R,[o,c,l,y.yy,S[1],i,s].concat(g))))return L;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[S[1]][0]),i.push(R.$),s.push(R._$),v=n[r[r.length-2]][r[r.length-1]],r.push(v);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,d.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K)(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:(0,d.K)(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:(0,d.K)(function(t){var e=t.length,r=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 a=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(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:(0,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(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:(0,d.K)(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:(0,d.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&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:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(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:(0,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,d.K)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function m(){this.yy={}}return b.lexer=f,(0,d.K)(m,"Parser"),m.prototype=b,b.Parser=m,new m}();k.parser=k;var S=k,L=new Map,_=[],E=new Map,v="color",D="fill",R=new Map,T="",K=(0,d.K)(t=>l.Y2.sanitizeText(t,(0,l.D7)()),"sanitizeText"),$=(0,d.K)(function(t,e=""){let r=R.get(t);r||(r={id:t,styles:[],textStyles:[]},R.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(v).exec(t)){const t=e.replace(D,"bgFill").replace(v,D);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),I=(0,d.K)(function(t,e=""){const r=L.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),N=(0,d.K)(function(t,e){t.split(",").forEach(function(t){let r=L.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},L.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),C=(0,d.K)((t,e)=>{const r=t.flat(),a=[],i=r.find(t=>"column-setting"===t?.type),s=i?.columns??-1;for(const t of r)if("number"==typeof s&&s>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>s&&c.R.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${s}`),t.label&&(t.label=K(t.label)),"classDef"!==t.type)if("applyClass"!==t.type)if("applyStyles"!==t.type)if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){const e=(E.get(t.id)??0)+1;E.set(t.id,e),t.id=e+"-"+t.id,_.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);const e=L.get(t.id);if(void 0===e?L.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&C(t.children,t),"space"===t.type){const e=t.width??1;for(let r=0;r<e;r++){const e=p(t);e.id=e.id+"-"+r,L.set(e.id,e),a.push(e)}}else void 0===e&&a.push(t)}else t?.stylesStr&&I(t.id,t?.stylesStr);else N(t.id,t?.styleClass??"");else $(t.id,t.css);e.children=a},"populateBlockDatabase"),B=[],O={id:"root",type:"composite",children:[],columns:-1},z=(0,d.K)(()=>{c.R.debug("Clear called"),(0,l.IU)(),O={id:"root",type:"composite",children:[],columns:-1},L=new Map([["root",O]]),B=[],R=new Map,_=[],E=new Map,T=""},"clear");function A(t){switch(c.R.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function M(t){return c.R.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function P(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function Y(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function j(t){return t.includes("==")?"thick":"normal"}function W(t){return t.includes(".-")?"dotted":"solid"}(0,d.K)(A,"typeStr2Type"),(0,d.K)(M,"edgeTypeStr2Type"),(0,d.K)(P,"edgeStrToEdgeData"),(0,d.K)(Y,"edgeStrToEdgeStartData"),(0,d.K)(j,"edgeStrToThickness"),(0,d.K)(W,"edgeStrToPattern");var X=0,F=(0,d.K)(()=>(X++,"id-"+Math.random().toString(36).substr(2,12)+"-"+X),"generateId"),U=(0,d.K)(t=>{O.children=t,C(t,O),B=O.children},"setHierarchy"),H=(0,d.K)(t=>{const e=L.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),Z=(0,d.K)(()=>[...L.values()],"getBlocksFlat"),q=(0,d.K)(()=>B||[],"getBlocks"),G=(0,d.K)(()=>_,"getEdges"),V=(0,d.K)(t=>L.get(t),"getBlock"),J=(0,d.K)(t=>{L.set(t.id,t)},"setBlock"),Q=(0,d.K)(t=>{T=t},"setDiagramId"),tt=(0,d.K)(()=>T,"getDiagramId"),et=(0,d.K)(()=>c.R,"getLogger"),rt=(0,d.K)(function(){return R},"getClasses"),at={getConfig:(0,d.K)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:A,edgeTypeStr2Type:M,edgeStrToEdgeData:P,edgeStrToEdgeStartData:Y,edgeStrToThickness:j,edgeStrToPattern:W,getLogger:et,getBlocksFlat:Z,getBlocks:q,getEdges:G,setHierarchy:U,getBlock:V,setBlock:J,getColumns:H,getClasses:rt,clear:z,generateId:F,setDiagramId:Q,getDiagramId:tt},it=(0,d.K)((t,e)=>{const r=b.A,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return f.A(a,i,s,e)},"fade"),st=(0,d.K)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\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 .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\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: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${it(t.mainBkg,.5)};\n fill: ${it(t.clusterBkg,.5)};\n stroke: ${it(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\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 .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,a.o)()}\n`,"getStyles"),nt=(0,d.K)((t,e,r,a)=>{e.forEach(e=>{ot[e](t,r,a)})},"insertMarkers"),ot={extension:(0,d.K)((t,e,r)=>{c.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},lt=nt;function ct(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,d.K)(ct,"calculateBlockPosition");var dt=(0,d.K)(t=>{let e=0,r=0;for(const a of t.children){const{width:t,height:i,x:s,y:n}=a.size??{width:0,height:0,x:0,y:0};if(c.R.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",s,"y:",n,a.type),"space"===a.type)continue;const o=t/(a.widthInColumns??1);o>e&&(e=o),i>r&&(r=i)}return{width:e,height:r}},"getMaxChildSize");function ht(t,e,r=0,a=0,i=8){c.R.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let s=0,n=0;if(t.children?.length>0){for(const r of t.children)ht(r,e,0,0,i);const o=dt(t);s=o.width,n=o.height,c.R.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",s,n);for(const e of t.children)e.size&&(c.R.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${s} ${n} ${JSON.stringify(e.size)}`),e.size.width=s*(e.widthInColumns??1)+i*((e.widthInColumns??1)-1),e.size.height=n,e.size.x=0,e.size.y=0,c.R.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${s} maxHeight:${n}`));for(const r of t.children)ht(r,e,s,n,i);const l=t.columns??-1;let d=0;for(const e of t.children)d+=e.widthInColumns??1;let h=t.children.length;l>0&&l<d&&(h=l);const g=Math.ceil(d/h);let u=h*(s+i)+i,y=g*(n+i)+i;if(u<r){c.R.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${u}`),u=r,y=a;const e=(r-h*i-i)/h,o=(a-g*i-i)/g;c.R.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",s),c.R.debug("Size indata abc88",t.id,"childHeight",o,"maxHeight",n),c.R.debug("Size indata abc88 xSize",h,"padding",i);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=o,r.size.x=0,r.size.y=0)}if(c.R.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${g} columns ${l}${t.children.length} width=${Math.max(u,t.size?.width||0)}`),u<(t?.size?.width||0)){u=t?.size?.width||0;const e=l>0?Math.min(t.children.length,l):t.children.length;if(e>0){const r=(u-e*i-i)/e;c.R.debug("abc95 (growing to fit) width",t.id,u,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:u,height:y,x:0,y:0}}c.R.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function gt(t,e,r=8){c.R.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const a=t.columns??-1;if(c.R.debug("layoutBlocks columns abc95",t.id,"=>",a,t),t.children&&t.children.length>0){const i=t?.children[0]?.size?.width??0,s=t.children.length*i+(t.children.length-1)*r;c.R.debug("widthOfChildren 88",s,"posX");const n=new Map;{let e=0;for(const r of t.children){if(!r.size)continue;const{py:t}=ct(a,e),i=n.get(t)??0;r.size.height>i&&n.set(t,r.size.height);let s=r?.widthInColumns??1;a>0&&(s=Math.min(s,a-e%a)),e+=s}}const o=new Map;{let t=0;const e=[...n.keys()].sort((t,e)=>t-e);for(const a of e)o.set(a,t),t+=(n.get(a)??0)+r}let l=0;c.R.debug("abc91 block?.size?.x",t.id,t?.size?.x);let d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,h=0;for(const i of t.children){const s=t;if(!i.size)continue;const{width:g,height:u}=i.size,{px:y,py:p}=ct(a,l);if(p!=h&&(h=p,d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,c.R.debug("New row in layout for block",t.id," and child ",i.id,h)),c.R.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${y},${p} (${s?.size?.x},${s?.size?.y}) parent: ${s.id} width: ${g}${r}`),s.size){const t=g/2;i.size.x=d+r+t,c.R.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${d} new startingPosX${i.size.x} ${t} padding=${r} width=${g} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${g*(i?.widthInColumns??1)/2}`),d=i.size.x+t;const e=o.get(p)??0,a=n.get(p)??u;i.size.y=s.size.y-s.size.height/2+e+a/2+r,c.R.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${d}${r}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${g*(i?.widthInColumns??1)/2}`)}i.children&>(i,e,r);let x=i?.widthInColumns??1;a>0&&(x=Math.min(x,a-l%a)),l+=x,c.R.debug("abc88 columnsPos",i,l)}}c.R.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function ut(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:s,y:n,width:o,height:l}=t.size;s-o/2<e&&(e=s-o/2),n-l/2<r&&(r=n-l/2),s+o/2>a&&(a=s+o/2),n+l/2>i&&(i=n+l/2)}if(t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=ut(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function yt(t){const e=t.getBlock("root");if(!e)return;const r=(0,l.D7)()?.block?.padding??8;ht(e,t,0,0,r),gt(e,t,r),c.R.debug("getBlocks",JSON.stringify(e,null,2));const{minX:a,minY:i,maxX:s,maxY:n}=ut(e);return{x:a,y:i,width:s-a,height:n-i}}(0,d.K)(ht,"setBlockSizes"),(0,d.K)(gt,"layoutBlocks"),(0,d.K)(ut,"findBounds"),(0,d.K)(yt,"layout");var pt=(0,d.K)(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const o=(0,l.D7)(),c=(0,l.E)(o);return await(0,n.G)(t,s,{style:r,isTitle:a,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),xt=(0,d.K)((t,e,r,a,i)=>{e.arrowTypeStart&&ft(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&ft(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),bt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ft=(0,d.K)((t,e,r,a,i,s)=>{const n=bt[r];if(!n)return void c.R.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${s}-${n}${o})`)},"addEdgeMarker"),mt={},wt={},kt=(0,d.K)(async(t,e)=>{const r=(0,l.D7)(),a=(0,l.E)(r),s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label"),c="markdown"===e.labelType,d=await(0,n.G)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:Number.POSITIVE_INFINITY},r);o.node().appendChild(d);let h,g=d.getBBox(),u=g;if(a){const t=d.children[0],e=(0,m.Ltv)(d);g=t.getBoundingClientRect(),u=g,e.attr("width",g.width),e.attr("height",g.height)}else{const t=(0,m.Ltv)(d).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(o.attr("transform",(0,i.Wg)(u,a)),mt[e.id]=s,e.width=g.width,e.height=g.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(s,e.startLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].startLeft=r,St(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(s,e.startLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].startRight=r,St(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(r,e.endLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].endLeft=r,St(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(r,e.endLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].endRight=r,St(h,e.endLabelRight)}return d},"insertEdgeLabel");function St(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,d.K)(St,"setTerminalWidth");var Lt=(0,d.K)((t,e)=>{c.R.debug("Moving label abc88 ",t.id,t.label,mt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,s.O)(a);if(t.label){const a=mt[t.id];let s=t.x,n=t.y;if(r){const a=o._K.calcLabelPosition(r);c.R.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(s=a.x,n=a.y)}a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){const e=wt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=wt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=wt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=wt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),_t=(0,d.K)((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,o=t.height/2;return i>=n||s>=o},"outsideNode"),Et=(0,d.K)((t,e,r)=>{c.R.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2;let o=r.x<e.x?n-s:n+s;const l=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*l){let t=r.y<e.y?e.y-l-i:i-l-e.y;o=h*t/d;const a={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===o&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),c.R.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${o}`,a),a}{o=r.x<e.x?e.x-n-a:a-n-e.x;let t=d*o/h,i=r.x<e.x?r.x+h-o:r.x-h+o,s=r.y<e.y?r.y+t:r.y-t;return c.R.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${o}`,{_x:i,_y:s}),0===o&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),vt=(0,d.K)((t,e)=>{c.R.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(_t(e,t)||i)a=t,i||r.push(t);else{const s=Et(e,a,t);let n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),Dt=(0,d.K)(function(t,e,r,a,s,n,o){let d=r.points;c.R.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=n.node(e.v);var u=n.node(e.w);u?.intersect&&g?.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(u.intersect(d[d.length-1]))),r.toCluster&&(c.R.debug("to cluster abc88",a[r.toCluster]),d=vt(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(c.R.debug("from cluster abc88",a[r.fromCluster]),d=vt(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const y=d.filter(t=>!Number.isNaN(t.y));let p=m.qrM;!r.curve||"graph"!==s&&"flowchart"!==s||(p=r.curve);const{x,y:b}=(0,i.RI)(r),f=(0,m.n8j)().x(x).y(b).curve(p);let w;switch(r.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(r.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const k=t.append("path").attr("d",f(y)).attr("id",r.id).attr("class"," "+w+(r.classes?" "+r.classes:"")).attr("style",r.style);let S="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(S=(0,l.ID)(!0)),xt(k,r,S,o,s);let L={};return h&&(L.updatedPath=d),L.originalPath=r.points,L},"insertEdge"),Rt=(0,d.K)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Tt=(0,d.K)((t,e,r,a)=>{const i=Rt(t),s=e.height+2*r.padding,n=s/2,o=a??e.width+2*n+r.padding,l=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:o/2,y:2*l},{x:o-n,y:0},{x:o,y:0},{x:o,y:-s/3},{x:o+2*l,y:-s/2},{x:o,y:-2*s/3},{x:o,y:-s},{x:o-n,y:-s},{x:o/2,y:-s-2*l},{x:n,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*l,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:o-n,y:-s},{x:o,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:o,y:-n},{x:o,y:-s+n},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:o,y:0},{x:0,y:-n},{x:0,y:-s+n},{x:o,y:-s}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-s+l},{x:0,y:-s+l},{x:o/2,y:-s},{x:o,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l},{x:o,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:o,y:-n},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:o,y:0},{x:0,y:-n},{x:o,y:-s}]:i.has("left")&&i.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-s}]:i.has("right")?[{x:n,y:-l},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s+l}]:i.has("left")?[{x:n,y:0},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:n,y:-l},{x:n,y:-s+l},{x:0,y:-s+l},{x:o/2,y:-s},{x:o,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l}]:i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function Kt(t,e){return t.intersect(e)}(0,d.K)(Kt,"intersectNode");var $t=Kt;function It(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,o=s-a.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);a.x<i&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<s&&(d=-d),{x:i+c,y:s+d}}(0,d.K)(It,"intersectEllipse");var Nt=It;function Ct(t,e,r){return Nt(t,e,e,r)}(0,d.K)(Ct,"intersectCircle");var Bt=Ct;function Ot(t,e,r,a){var i,s,n,o,l,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,l=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+l,u=i*a.x+n*a.y+l,!(0!==g&&0!==u&&zt(g,u)||(s=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+o*t.y+c,h=s*e.x+o*e.y+c,0!==d&&0!==h&&zt(d,h)||0===(y=i*o-s*n))))return p=Math.abs(y/2),{x:(x=n*c-o*l)<0?(x-p)/y:(x+p)/y,y:(x=s*l-i*c)<0?(x-p)/y:(x+p)/y}}function zt(t,e){return t*e>0}(0,d.K)(Ot,"intersectLine"),(0,d.K)(zt,"sameSign");var At=Ot,Mt=Pt;function Pt(t,e,r){var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)}):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-n,c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=At(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return s<l?-1:s===l?0:1}),s[0]):t}(0,d.K)(Pt,"intersectPolygon");var Yt={node:$t,circle:Bt,ellipse:Nt,polygon:Mt,rect:(0,d.K)((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,o=e.y-s,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,a=c):(n<0&&(l=-l),r=l,a=0===n?0:l*o/n),{x:i+r,y:s+a}},"intersectRect")},jt=(0,d.K)(async(t,e,r,a)=>{const i=(0,l.D7)();let c;const d=e.useHtmlLabels||(0,l.E)(i);c=r||"node default";const h=t.insert("g").attr("class",c).attr("id",e.domId||e.id),g=h.insert("g").attr("class","label").attr("style",e.labelStyle);let u,y;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],y="markdown"===e.labelType?(0,n.G)(g,(0,l.jZ)((0,o.Sm)(u),i),{useHtmlLabels:d,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await pt(g,(0,l.jZ)((0,o.Sm)(u),i),e.labelStyle,!1,a);let p=y.getBBox();const x=e.padding/2;if((0,l.E)(i)){const t=y.children[0],e=(0,m.Ltv)(y);await(0,s.X)(t,u),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return d?g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):g.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:x,label:g}},"labelHelper"),Wt=(0,d.K)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Xt(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,d.K)(Xt,"insertPolygonShape");var Ft=(0,d.K)(async(t,e)=>{e.useHtmlLabels||(0,l.E)((0,l.D7)())||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes,!0);c.R.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"note"),Ut=(0,d.K)(t=>t?" "+t:"","formatClass"),Ht=(0,d.K)((t,e)=>`${e||"node default"}${Ut(t.classes)} ${Ut(t.class)}`,"getClassesFromNode"),Zt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.R.info("Question main (Circle)");const n=Xt(r,i,i,s);return n.attr("style",e.style),Wt(e,n),e.intersect=function(t){return c.R.warn("Intersect called"),Yt.polygon(e,s,t)},r},"question"),qt=(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Yt.circle(e,14,t)},r},"choice"),Gt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=e.positioned?e.height:a.height+e.padding,s=i/4,n=e.positioned?e.width:a.width+2*s+e.padding,o=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],l=Xt(r,n,i,o);return l.attr("style",e.style),Wt(e,l),e.intersect=function(t){return Yt.polygon(e,o,t)},r},"hexagon"),Vt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,o=e.positioned&&(e.widthInColumns??1)>1&&e.width>n?e.width:n,l=Tt(e.directions,a,e,o),c=Xt(r,o,i,l);return c.attr("style",e.style),Wt(e,c),e.intersect=function(t){return Yt.polygon(e,l,t)},r},"block_arrow"),Jt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Xt(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return Yt.polygon(e,n,t)},r},"rect_left_inv_arrow"),Qt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"lean_right"),te=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"lean_left"),ee=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"trapezoid"),re=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"inv_trapezoid"),ae=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"rect_right_inv_arrow"),ie=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),o=a.height+n+e.padding,l="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+n)+")");return Wt(e,c),e.intersect=function(t){const r=Yt.rect(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),se=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"rect"),ne=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"composite"),oe=(0,d.K)(async(t,e)=>{const{shapeSvg:r}=await jt(t,e,"label",!0);c.R.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Wt(e,a),e.intersect=function(t){return Yt.rect(e,t)},r},"labelRect");function le(t,e,r,a){const i=[],s=(0,d.K)(t=>{i.push(t,0)},"addBorder"),n=(0,d.K)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.R.debug("add top border"),s(r)):n(r),e.includes("r")?(c.R.debug("add right border"),s(a)):n(a),e.includes("b")?(c.R.debug("add bottom border"),s(r)):n(r),e.includes("l")?(c.R.debug("add left border"),s(a)):n(a),t.attr("stroke-dasharray",i.join(" "))}(0,d.K)(le,"applyNodePropertyBorders");var ce=(0,d.K)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),s=a.insert("line"),n=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof o?o[0]:o,c.R.info("Label text abc79",d,o,"object"==typeof o);const h=await pt(n,d,e.labelStyle,!0,!0);let g={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=h.children[0],e=(0,m.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.R.info("Text 2",o);const u=o.slice(1,o.length);let y=h.getBBox();const p=await pt(n,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,l.E)((0,l.D7)())){const t=p.children[0],e=(0,m.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const x=e.padding/2;return(0,m.Ltv)(p).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+x+5)+")"),(0,m.Ltv)(h).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=n.node().getBBox(),n.attr("transform","translate("+-g.width/2+", "+(-g.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-g.width/2-x).attr("y",-g.height/2-x).attr("width",g.width+e.padding).attr("height",g.height+e.padding),s.attr("class","divider").attr("x1",-g.width/2-x).attr("x2",g.width/2+x).attr("y1",-g.height/2-x+y.height+x).attr("y2",-g.height/2-x+y.height+x),Wt(e,i),e.intersect=function(t){return Yt.rect(e,t)},a},"rectWithTitle"),de=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return Wt(e,n),e.intersect=function(t){return Yt.rect(e,t)},r},"stadium"),he=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,Ht(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.R.info("Circle main"),Wt(e,s),e.intersect=function(t){return c.R.info("Circle intersect",e,a.width/2+i,t),Yt.circle(e,a.width/2+i,t)},r},"circle"),ge=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,Ht(e,void 0),!0),s=r.insert("g",":first-child"),n=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.R.info("DoubleCircle main"),Wt(e,n),e.intersect=function(t){return c.R.info("DoubleCircle intersect",e,a.width/2+i+5,t),Yt.circle(e,a.width/2+i+5,t)},r},"doublecircle"),ue=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"subroutine"),ye=(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Wt(e,a),e.intersect=function(t){return Yt.circle(e,7,t)},r},"start"),pe=(0,d.K)((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,s=10;"LR"===r&&(i=10,s=70);const n=a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return Wt(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Yt.rect(e,t)},a},"forkJoin"),xe={rhombus:Zt,composite:ne,question:Zt,rect:se,labelRect:oe,rectWithTitle:ce,choice:qt,circle:he,doublecircle:ge,stadium:de,hexagon:Gt,block_arrow:Vt,rect_left_inv_arrow:Jt,lean_right:Qt,lean_left:te,trapezoid:ee,inv_trapezoid:re,rect_right_inv_arrow:ae,cylinder:ie,start:ye,end:(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Wt(e,i),e.intersect=function(t){return Yt.circle(e,7,t)},r},"end"),note:Ft,subroutine:ue,fork:pe,join:pe,class_box:(0,d.K)(async(t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),n=i.insert("line"),o=i.insert("line");let c=0,d=4;const h=i.insert("g").attr("class","label");let g=0;const u=e.classData.annotations?.[0],y=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=await pt(h,y,e.labelStyle,!0,!0);let x=p.getBBox();if((0,l.E)((0,l.D7)())){const t=p.children[0],e=(0,m.Ltv)(p);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let b=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.E)((0,l.D7)())?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");const f=await pt(h,b,e.labelStyle,!0,!0);(0,m.Ltv)(f).attr("class","classTitle");let w=f.getBBox();if((0,l.E)((0,l.D7)())){const t=f.children[0],e=(0,m.Ltv)(f);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const k=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(/</g,"<").replace(/>/g,">"));const i=await pt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,m.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8;const S=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(/</g,"<").replace(/>/g,">"));const i=await pt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,m.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,S.push(i)}),d+=8,u){let t=(c-x.width)/2;(0,m.Ltv)(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let L=(c-w.width)/2;return(0,m.Ltv)(f).attr("transform","translate( "+(-1*c/2+L)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,k.forEach(t=>{(0,m.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,S.forEach(t=>{(0,m.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},i},"class_box")},be={},fe=(0,d.K)(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===(0,l.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await xe[e.shape](a,e,r)}else i=await xe[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),be[e.id]=a,e.haveCallback&&be[e.id].attr("class",be[e.id].attr("class")+" clickable"),a},"insertNode"),me=(0,d.K)(t=>{const e=be[t.id];c.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function we(t,e,r=!1){const a=t;let i="default";(a?.classes?.length||0)>0&&(i=(a?.classes??[]).join(" ")),i+=" flowchart-label";let s,n=0,c="";switch(a.type){case"round":n=5,c="rect";break;case"composite":n=0,c="composite",s=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const d=(0,o.sM)(a?.styles??[]),h=a.label,g=a.size??{width:0,height:0,x:0,y:0},u=e.getDiagramId();return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:n,ry:n,class:i,style:d.style,id:a.id,domId:u?`${u}-${a.id}`:a.id,directions:a.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:a.type,padding:s??(0,l.zj)()?.block?.padding??0,widthInColumns:a.widthInColumns??1}}async function ke(t,e,r){const a=we(e,r,!1);if("group"===a.type)return;const i=(0,l.zj)(),s=await fe(t,a,{config:i}),n=s.node().getBBox(),o=r.getBlock(a.id);o.size={width:n.width,height:n.height,x:0,y:0,node:s},r.setBlock(o),s.remove()}async function Se(t,e,r){const a=we(e,r,!0);if("space"!==r.getBlock(a.id).type){const r=(0,l.zj)();await fe(t,a,{config:r}),e.intersect=a?.intersect,me(a)}}async function Le(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await Le(t,i.children,r,a)}async function _e(t,e,r){await Le(t,e,r,ke)}async function Ee(t,e,r){await Le(t,e,r,Se)}async function ve(t,e,r,a,i){const s=new w.T({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const t of r)t.size&&s.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(const r of e)if(r.start&&r.end){const e=a.getBlock(r.start),n=a.getBlock(r.end);if(e?.size&&n?.size){const a=e.size,o=n.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}],c=i?`${i}-${r.id}`:r.id,d=`${"thick"===r.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===r.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;Dt(t,{v:r.start,w:r.end,name:c},{...r,id:c,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:l,classes:d},void 0,"block",s,i),r.label&&(await kt(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:l,classes:d}),Lt({...r,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,d.K)(we,"getNodeFromBlock"),(0,d.K)(ke,"calculateBlockSize"),(0,d.K)(Se,"insertBlockPositioned"),(0,d.K)(Le,"performOperations"),(0,d.K)(_e,"calculateBlockSizes"),(0,d.K)(Ee,"insertBlocks"),(0,d.K)(ve,"insertEdges");var De=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),Re={parser:S,db:at,renderer:{draw:(0,d.K)(async function(t,e,r,a){const{securityLevel:i,block:s}=(0,l.zj)(),n=a.db;let o;n.setDiagramId(e),"sandbox"===i&&(o=(0,m.Ltv)("#i"+e));const d="sandbox"===i?(0,m.Ltv)(o.nodes()[0].contentDocument.body):(0,m.Ltv)("body"),h="sandbox"===i?d.select(`[id="${e}"]`):(0,m.Ltv)(`[id="${e}"]`);lt(h,["point","circle","cross"],a.type,e);const g=n.getBlocks(),u=n.getBlocksFlat(),y=n.getEdges(),p=h.insert("g").attr("class","block");await _e(p,g,n);const x=yt(n);if(await Ee(p,g,n),await ve(p,y,u,n,e),x){const t=x,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:i}=s;(0,l.a$)(h,r,a,!!i),c.R.debug("Here Bounds",x,t),h.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:De},styles:st}},64918(t,e,r){r.d(e,{o:()=>a});var a=(0,r(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5708],{75937(t,e,r){var a=r(86309),i=r(51931);const s=(t,e)=>a.A.lang.round(i.A.parse(t)[e]);r.d(e,["A",0,s])},15708(t,e,r){r.d(e,{diagram:()=>Re});var a=r(64918),i=r(91865),s=r(6129),n=r(62979),o=(r(5494),r(99087)),l=r(32178),c=r(31293),d=r(86827),h=r(37110),g=r(99125),u=r(89826);var y=r(19663);function p(t){if((0,h.s)(t))return t;const e=(0,g.b)(t);if(!function(t){switch((0,g.b)(t)){case u.R_:case u.Uw:case u.cT:case u.iq:case u.$V:case u.vC:case u.ri:case u.ML:case u.XZ:case u.i1:case u._u:case u.pj:case u.kj:case u.GX:case u.Av:case u.NA:case u.OG:case u.VP:case u.Qb:case u.q:case u.x6:case u.ZR:return!0;default:return!1}}(t))return{};if(r=t,Array.isArray(r)){const e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}var r;if((0,y.i)(t)){const e=t;return new(0,e.constructor)(e.buffer,e.byteOffset,e.length)}if("[object ArrayBuffer]"===e)return new ArrayBuffer(t.byteLength);if("[object DataView]"===e){const e=t,r=e.buffer,a=e.byteOffset,i=e.byteLength,s=new ArrayBuffer(i),n=new Uint8Array(r,a,i);return new Uint8Array(s).set(n),new DataView(s)}if("[object Boolean]"===e||"[object Number]"===e||"[object String]"===e){const r=new(0,t.constructor)(t.valueOf());return"[object String]"===e?function(t,e){const r=e.valueOf().length;for(const a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}(r,t):x(r,t),r}if("[object Date]"===e)return new Date(Number(t));if("[object RegExp]"===e){const e=t,r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,r}if("[object Symbol]"===e)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===e){const e=t,r=new Map;return e.forEach((t,e)=>{r.set(e,t)}),r}if("[object Set]"===e){const e=t,r=new Set;return e.forEach(t=>{r.add(t)}),r}if("[object Arguments]"===e){const e=t,r={};return x(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}const a={};return function(t,e){const r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}(a,t),x(a,t),function(t,e){const r=Object.getOwnPropertySymbols(e);for(let a=0;a<r.length;a++){const i=r[a];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(a,t),a}function x(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var b=r(75937),f=r(25582),m=r(51444),w=r(697),k=function(){var t=(0,d.K)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],o=[1,17],l=[1,18],c=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49],b={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,d.K)(function(t,e,r,a,i,s,n){var o=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[o-1]),a.setHierarchy(s[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:const e=parseInt(s[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);const i=a.edgeStrToEdgeData(s[o-1].edgeTypeStr),n=a.edgeStrToEdgeStartData(s[o-1].edgeTypeStr),l=a.edgeStrToThickness(s[o-1].edgeTypeStr),c=a.edgeStrToPattern(s[o-1].edgeTypeStr);this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",thickness:l,pattern:c,directions:s[o].directions,arrowTypeEnd:i,arrowTypeStart:n},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]);a.generateId();this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]);const d=a.generateId();this.$={id:d,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{8:[1,20]},t(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:o,46:l}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(c,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,d.K)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,d.K)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,o="",l=0,c=0,h=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;s.push(x);var b=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,d.K)(f,"lex");for(var m,w,k,S,L,_,E,v,D,R={};;){if(k=r[r.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==m&&(m=f()),S=n[k]&&n[k][m]),void 0===S||!S.length||!S[0]){var T="";for(_ in D=[],n[k])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:x,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(S[0]){case 1:r.push(m),i.push(u.yytext),s.push(u.yylloc),r.push(S[1]),m=null,w?(m=w,w=null):(c=u.yyleng,o=u.yytext,l=u.yylineno,x=u.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[S[1]][1],R.$=i[i.length-E],R._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(R._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(L=this.performAction.apply(R,[o,c,l,y.yy,S[1],i,s].concat(g))))return L;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[S[1]][0]),i.push(R.$),s.push(R._$),v=n[r[r.length-2]][r[r.length-1]],r.push(v);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,d.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K)(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:(0,d.K)(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:(0,d.K)(function(t){var e=t.length,r=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 a=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(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:(0,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(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:(0,d.K)(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:(0,d.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&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:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(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:(0,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,d.K)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function m(){this.yy={}}return b.lexer=f,(0,d.K)(m,"Parser"),m.prototype=b,b.Parser=m,new m}();k.parser=k;var S=k,L=new Map,_=[],E=new Map,v="color",D="fill",R=new Map,T="",K=(0,d.K)(t=>l.Y2.sanitizeText(t,(0,l.D7)()),"sanitizeText"),$=(0,d.K)(function(t,e=""){let r=R.get(t);r||(r={id:t,styles:[],textStyles:[]},R.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(v).exec(t)){const t=e.replace(D,"bgFill").replace(v,D);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),I=(0,d.K)(function(t,e=""){const r=L.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),N=(0,d.K)(function(t,e){t.split(",").forEach(function(t){let r=L.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},L.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),C=(0,d.K)((t,e)=>{const r=t.flat(),a=[],i=r.find(t=>"column-setting"===t?.type),s=i?.columns??-1;for(const t of r)if("number"==typeof s&&s>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>s&&c.R.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${s}`),t.label&&(t.label=K(t.label)),"classDef"!==t.type)if("applyClass"!==t.type)if("applyStyles"!==t.type)if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){const e=(E.get(t.id)??0)+1;E.set(t.id,e),t.id=e+"-"+t.id,_.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);const e=L.get(t.id);if(void 0===e?L.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&C(t.children,t),"space"===t.type){const e=t.width??1;for(let r=0;r<e;r++){const e=p(t);e.id=e.id+"-"+r,L.set(e.id,e),a.push(e)}}else void 0===e&&a.push(t)}else t?.stylesStr&&I(t.id,t?.stylesStr);else N(t.id,t?.styleClass??"");else $(t.id,t.css);e.children=a},"populateBlockDatabase"),B=[],O={id:"root",type:"composite",children:[],columns:-1},z=(0,d.K)(()=>{c.R.debug("Clear called"),(0,l.IU)(),O={id:"root",type:"composite",children:[],columns:-1},L=new Map([["root",O]]),B=[],R=new Map,_=[],E=new Map,T=""},"clear");function A(t){switch(c.R.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function M(t){return c.R.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function P(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function Y(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function j(t){return t.includes("==")?"thick":"normal"}function W(t){return t.includes(".-")?"dotted":"solid"}(0,d.K)(A,"typeStr2Type"),(0,d.K)(M,"edgeTypeStr2Type"),(0,d.K)(P,"edgeStrToEdgeData"),(0,d.K)(Y,"edgeStrToEdgeStartData"),(0,d.K)(j,"edgeStrToThickness"),(0,d.K)(W,"edgeStrToPattern");var X=0,F=(0,d.K)(()=>(X++,"id-"+Math.random().toString(36).substr(2,12)+"-"+X),"generateId"),U=(0,d.K)(t=>{O.children=t,C(t,O),B=O.children},"setHierarchy"),H=(0,d.K)(t=>{const e=L.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),Z=(0,d.K)(()=>[...L.values()],"getBlocksFlat"),q=(0,d.K)(()=>B||[],"getBlocks"),G=(0,d.K)(()=>_,"getEdges"),V=(0,d.K)(t=>L.get(t),"getBlock"),J=(0,d.K)(t=>{L.set(t.id,t)},"setBlock"),Q=(0,d.K)(t=>{T=t},"setDiagramId"),tt=(0,d.K)(()=>T,"getDiagramId"),et=(0,d.K)(()=>c.R,"getLogger"),rt=(0,d.K)(function(){return R},"getClasses"),at={getConfig:(0,d.K)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:A,edgeTypeStr2Type:M,edgeStrToEdgeData:P,edgeStrToEdgeStartData:Y,edgeStrToThickness:j,edgeStrToPattern:W,getLogger:et,getBlocksFlat:Z,getBlocks:q,getEdges:G,setHierarchy:U,getBlock:V,setBlock:J,getColumns:H,getClasses:rt,clear:z,generateId:F,setDiagramId:Q,getDiagramId:tt},it=(0,d.K)((t,e)=>{const r=b.A,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return f.A(a,i,s,e)},"fade"),st=(0,d.K)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\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 .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\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: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${it(t.mainBkg,.5)};\n fill: ${it(t.clusterBkg,.5)};\n stroke: ${it(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\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 .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,a.o)()}\n`,"getStyles"),nt=(0,d.K)((t,e,r,a)=>{e.forEach(e=>{ot[e](t,r,a)})},"insertMarkers"),ot={extension:(0,d.K)((t,e,r)=>{c.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,d.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,d.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},lt=nt;function ct(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,d.K)(ct,"calculateBlockPosition");var dt=(0,d.K)(t=>{let e=0,r=0;for(const a of t.children){const{width:t,height:i,x:s,y:n}=a.size??{width:0,height:0,x:0,y:0};if(c.R.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",s,"y:",n,a.type),"space"===a.type)continue;const o=t/(a.widthInColumns??1);o>e&&(e=o),i>r&&(r=i)}return{width:e,height:r}},"getMaxChildSize");function ht(t,e,r=0,a=0,i=8){c.R.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let s=0,n=0;if(t.children?.length>0){for(const r of t.children)ht(r,e,0,0,i);const o=dt(t);s=o.width,n=o.height,c.R.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",s,n);for(const e of t.children)e.size&&(c.R.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${s} ${n} ${JSON.stringify(e.size)}`),e.size.width=s*(e.widthInColumns??1)+i*((e.widthInColumns??1)-1),e.size.height=n,e.size.x=0,e.size.y=0,c.R.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${s} maxHeight:${n}`));for(const r of t.children)ht(r,e,s,n,i);const l=t.columns??-1;let d=0;for(const e of t.children)d+=e.widthInColumns??1;let h=t.children.length;l>0&&l<d&&(h=l);const g=Math.ceil(d/h);let u=h*(s+i)+i,y=g*(n+i)+i;if(u<r){c.R.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${u}`),u=r,y=a;const e=(r-h*i-i)/h,o=(a-g*i-i)/g;c.R.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",s),c.R.debug("Size indata abc88",t.id,"childHeight",o,"maxHeight",n),c.R.debug("Size indata abc88 xSize",h,"padding",i);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=o,r.size.x=0,r.size.y=0)}if(c.R.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${g} columns ${l}${t.children.length} width=${Math.max(u,t.size?.width||0)}`),u<(t?.size?.width||0)){u=t?.size?.width||0;const e=l>0?Math.min(t.children.length,l):t.children.length;if(e>0){const r=(u-e*i-i)/e;c.R.debug("abc95 (growing to fit) width",t.id,u,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:u,height:y,x:0,y:0}}c.R.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function gt(t,e,r=8){c.R.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const a=t.columns??-1;if(c.R.debug("layoutBlocks columns abc95",t.id,"=>",a,t),t.children&&t.children.length>0){const i=t?.children[0]?.size?.width??0,s=t.children.length*i+(t.children.length-1)*r;c.R.debug("widthOfChildren 88",s,"posX");const n=new Map;{let e=0;for(const r of t.children){if(!r.size)continue;const{py:t}=ct(a,e),i=n.get(t)??0;r.size.height>i&&n.set(t,r.size.height);let s=r?.widthInColumns??1;a>0&&(s=Math.min(s,a-e%a)),e+=s}}const o=new Map;{let t=0;const e=[...n.keys()].sort((t,e)=>t-e);for(const a of e)o.set(a,t),t+=(n.get(a)??0)+r}let l=0;c.R.debug("abc91 block?.size?.x",t.id,t?.size?.x);let d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,h=0;for(const i of t.children){const s=t;if(!i.size)continue;const{width:g,height:u}=i.size,{px:y,py:p}=ct(a,l);if(p!=h&&(h=p,d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,c.R.debug("New row in layout for block",t.id," and child ",i.id,h)),c.R.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${y},${p} (${s?.size?.x},${s?.size?.y}) parent: ${s.id} width: ${g}${r}`),s.size){const t=g/2;i.size.x=d+r+t,c.R.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${d} new startingPosX${i.size.x} ${t} padding=${r} width=${g} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${g*(i?.widthInColumns??1)/2}`),d=i.size.x+t;const e=o.get(p)??0,a=n.get(p)??u;i.size.y=s.size.y-s.size.height/2+e+a/2+r,c.R.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${d}${r}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${g*(i?.widthInColumns??1)/2}`)}i.children&>(i,e,r);let x=i?.widthInColumns??1;a>0&&(x=Math.min(x,a-l%a)),l+=x,c.R.debug("abc88 columnsPos",i,l)}}c.R.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function ut(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:s,y:n,width:o,height:l}=t.size;s-o/2<e&&(e=s-o/2),n-l/2<r&&(r=n-l/2),s+o/2>a&&(a=s+o/2),n+l/2>i&&(i=n+l/2)}if(t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=ut(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function yt(t){const e=t.getBlock("root");if(!e)return;const r=(0,l.D7)()?.block?.padding??8;ht(e,t,0,0,r),gt(e,t,r),c.R.debug("getBlocks",JSON.stringify(e,null,2));const{minX:a,minY:i,maxX:s,maxY:n}=ut(e);return{x:a,y:i,width:s-a,height:n-i}}(0,d.K)(ht,"setBlockSizes"),(0,d.K)(gt,"layoutBlocks"),(0,d.K)(ut,"findBounds"),(0,d.K)(yt,"layout");var pt=(0,d.K)(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const o=(0,l.D7)(),c=(0,l.E)(o);return await(0,n.G)(t,s,{style:r,isTitle:a,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),xt=(0,d.K)((t,e,r,a,i)=>{e.arrowTypeStart&&ft(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&ft(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),bt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ft=(0,d.K)((t,e,r,a,i,s)=>{const n=bt[r];if(!n)return void c.R.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${s}-${n}${o})`)},"addEdgeMarker"),mt={},wt={},kt=(0,d.K)(async(t,e)=>{const r=(0,l.D7)(),a=(0,l.E)(r),s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label"),c="markdown"===e.labelType,d=await(0,n.G)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:Number.POSITIVE_INFINITY},r);o.node().appendChild(d);let h,g=d.getBBox(),u=g;if(a){const t=d.children[0],e=(0,m.Ltv)(d);g=t.getBoundingClientRect(),u=g,e.attr("width",g.width),e.attr("height",g.height)}else{const t=(0,m.Ltv)(d).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(o.attr("transform",(0,i.Wg)(u,a)),mt[e.id]=s,e.width=g.width,e.height=g.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(s,e.startLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].startLeft=r,St(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(s,e.startLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].startRight=r,St(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(r,e.endLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].endLeft=r,St(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(r,e.endLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].endRight=r,St(h,e.endLabelRight)}return d},"insertEdgeLabel");function St(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,d.K)(St,"setTerminalWidth");var Lt=(0,d.K)((t,e)=>{c.R.debug("Moving label abc88 ",t.id,t.label,mt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,s.O)(a);if(t.label){const a=mt[t.id];let s=t.x,n=t.y;if(r){const a=o._K.calcLabelPosition(r);c.R.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(s=a.x,n=a.y)}a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){const e=wt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=wt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=wt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=wt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),_t=(0,d.K)((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,o=t.height/2;return i>=n||s>=o},"outsideNode"),Et=(0,d.K)((t,e,r)=>{c.R.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2;let o=r.x<e.x?n-s:n+s;const l=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*l){let t=r.y<e.y?e.y-l-i:i-l-e.y;o=h*t/d;const a={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===o&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),c.R.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${o}`,a),a}{o=r.x<e.x?e.x-n-a:a-n-e.x;let t=d*o/h,i=r.x<e.x?r.x+h-o:r.x-h+o,s=r.y<e.y?r.y+t:r.y-t;return c.R.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${o}`,{_x:i,_y:s}),0===o&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),vt=(0,d.K)((t,e)=>{c.R.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(_t(e,t)||i)a=t,i||r.push(t);else{const s=Et(e,a,t);let n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),Dt=(0,d.K)(function(t,e,r,a,s,n,o){let d=r.points;c.R.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=n.node(e.v);var u=n.node(e.w);u?.intersect&&g?.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(u.intersect(d[d.length-1]))),r.toCluster&&(c.R.debug("to cluster abc88",a[r.toCluster]),d=vt(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(c.R.debug("from cluster abc88",a[r.fromCluster]),d=vt(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const y=d.filter(t=>!Number.isNaN(t.y));let p=m.qrM;!r.curve||"graph"!==s&&"flowchart"!==s||(p=r.curve);const{x,y:b}=(0,i.RI)(r),f=(0,m.n8j)().x(x).y(b).curve(p);let w;switch(r.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(r.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const k=t.append("path").attr("d",f(y)).attr("id",r.id).attr("class"," "+w+(r.classes?" "+r.classes:"")).attr("style",r.style);let S="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(S=(0,l.ID)(!0)),xt(k,r,S,o,s);let L={};return h&&(L.updatedPath=d),L.originalPath=r.points,L},"insertEdge"),Rt=(0,d.K)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Tt=(0,d.K)((t,e,r,a)=>{const i=Rt(t),s=e.height+2*r.padding,n=s/2,o=a??e.width+2*n+r.padding,l=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:o/2,y:2*l},{x:o-n,y:0},{x:o,y:0},{x:o,y:-s/3},{x:o+2*l,y:-s/2},{x:o,y:-2*s/3},{x:o,y:-s},{x:o-n,y:-s},{x:o/2,y:-s-2*l},{x:n,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*l,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:o-n,y:-s},{x:o,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:o,y:-n},{x:o,y:-s+n},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:o,y:0},{x:0,y:-n},{x:0,y:-s+n},{x:o,y:-s}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-s+l},{x:0,y:-s+l},{x:o/2,y:-s},{x:o,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l},{x:o,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:o,y:-n},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:o,y:0},{x:0,y:-n},{x:o,y:-s}]:i.has("left")&&i.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-s}]:i.has("right")?[{x:n,y:-l},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s+l}]:i.has("left")?[{x:n,y:0},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:n,y:-l},{x:n,y:-s+l},{x:0,y:-s+l},{x:o/2,y:-s},{x:o,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l}]:i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function Kt(t,e){return t.intersect(e)}(0,d.K)(Kt,"intersectNode");var $t=Kt;function It(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,o=s-a.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);a.x<i&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<s&&(d=-d),{x:i+c,y:s+d}}(0,d.K)(It,"intersectEllipse");var Nt=It;function Ct(t,e,r){return Nt(t,e,e,r)}(0,d.K)(Ct,"intersectCircle");var Bt=Ct;function Ot(t,e,r,a){var i,s,n,o,l,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,l=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+l,u=i*a.x+n*a.y+l,!(0!==g&&0!==u&&zt(g,u)||(s=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+o*t.y+c,h=s*e.x+o*e.y+c,0!==d&&0!==h&&zt(d,h)||0===(y=i*o-s*n))))return p=Math.abs(y/2),{x:(x=n*c-o*l)<0?(x-p)/y:(x+p)/y,y:(x=s*l-i*c)<0?(x-p)/y:(x+p)/y}}function zt(t,e){return t*e>0}(0,d.K)(Ot,"intersectLine"),(0,d.K)(zt,"sameSign");var At=Ot,Mt=Pt;function Pt(t,e,r){var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)}):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-n,c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=At(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return s<l?-1:s===l?0:1}),s[0]):t}(0,d.K)(Pt,"intersectPolygon");var Yt={node:$t,circle:Bt,ellipse:Nt,polygon:Mt,rect:(0,d.K)((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,o=e.y-s,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,a=c):(n<0&&(l=-l),r=l,a=0===n?0:l*o/n),{x:i+r,y:s+a}},"intersectRect")},jt=(0,d.K)(async(t,e,r,a)=>{const i=(0,l.D7)();let c;const d=e.useHtmlLabels||(0,l.E)(i);c=r||"node default";const h=t.insert("g").attr("class",c).attr("id",e.domId||e.id),g=h.insert("g").attr("class","label").attr("style",e.labelStyle);let u,y;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],y="markdown"===e.labelType?(0,n.G)(g,(0,l.jZ)((0,o.Sm)(u),i),{useHtmlLabels:d,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await pt(g,(0,l.jZ)((0,o.Sm)(u),i),e.labelStyle,!1,a);let p=y.getBBox();const x=e.padding/2;if((0,l.E)(i)){const t=y.children[0],e=(0,m.Ltv)(y);await(0,s.X)(t,u),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return d?g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):g.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:x,label:g}},"labelHelper"),Wt=(0,d.K)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Xt(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,d.K)(Xt,"insertPolygonShape");var Ft=(0,d.K)(async(t,e)=>{e.useHtmlLabels||(0,l.E)((0,l.D7)())||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes,!0);c.R.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"note"),Ut=(0,d.K)(t=>t?" "+t:"","formatClass"),Ht=(0,d.K)((t,e)=>`${e||"node default"}${Ut(t.classes)} ${Ut(t.class)}`,"getClassesFromNode"),Zt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.R.info("Question main (Circle)");const n=Xt(r,i,i,s);return n.attr("style",e.style),Wt(e,n),e.intersect=function(t){return c.R.warn("Intersect called"),Yt.polygon(e,s,t)},r},"question"),qt=(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Yt.circle(e,14,t)},r},"choice"),Gt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=e.positioned?e.height:a.height+e.padding,s=i/4,n=e.positioned?e.width:a.width+2*s+e.padding,o=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],l=Xt(r,n,i,o);return l.attr("style",e.style),Wt(e,l),e.intersect=function(t){return Yt.polygon(e,o,t)},r},"hexagon"),Vt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,o=e.positioned&&(e.widthInColumns??1)>1&&e.width>n?e.width:n,l=Tt(e.directions,a,e,o),c=Xt(r,o,i,l);return c.attr("style",e.style),Wt(e,c),e.intersect=function(t){return Yt.polygon(e,l,t)},r},"block_arrow"),Jt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Xt(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return Yt.polygon(e,n,t)},r},"rect_left_inv_arrow"),Qt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"lean_right"),te=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"lean_left"),ee=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"trapezoid"),re=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"inv_trapezoid"),ae=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"rect_right_inv_arrow"),ie=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),o=a.height+n+e.padding,l="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+n)+")");return Wt(e,c),e.intersect=function(t){const r=Yt.rect(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),se=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"rect"),ne=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"composite"),oe=(0,d.K)(async(t,e)=>{const{shapeSvg:r}=await jt(t,e,"label",!0);c.R.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Wt(e,a),e.intersect=function(t){return Yt.rect(e,t)},r},"labelRect");function le(t,e,r,a){const i=[],s=(0,d.K)(t=>{i.push(t,0)},"addBorder"),n=(0,d.K)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.R.debug("add top border"),s(r)):n(r),e.includes("r")?(c.R.debug("add right border"),s(a)):n(a),e.includes("b")?(c.R.debug("add bottom border"),s(r)):n(r),e.includes("l")?(c.R.debug("add left border"),s(a)):n(a),t.attr("stroke-dasharray",i.join(" "))}(0,d.K)(le,"applyNodePropertyBorders");var ce=(0,d.K)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),s=a.insert("line"),n=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof o?o[0]:o,c.R.info("Label text abc79",d,o,"object"==typeof o);const h=await pt(n,d,e.labelStyle,!0,!0);let g={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=h.children[0],e=(0,m.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.R.info("Text 2",o);const u=o.slice(1,o.length);let y=h.getBBox();const p=await pt(n,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,l.E)((0,l.D7)())){const t=p.children[0],e=(0,m.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const x=e.padding/2;return(0,m.Ltv)(p).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+x+5)+")"),(0,m.Ltv)(h).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=n.node().getBBox(),n.attr("transform","translate("+-g.width/2+", "+(-g.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-g.width/2-x).attr("y",-g.height/2-x).attr("width",g.width+e.padding).attr("height",g.height+e.padding),s.attr("class","divider").attr("x1",-g.width/2-x).attr("x2",g.width/2+x).attr("y1",-g.height/2-x+y.height+x).attr("y2",-g.height/2-x+y.height+x),Wt(e,i),e.intersect=function(t){return Yt.rect(e,t)},a},"rectWithTitle"),de=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return Wt(e,n),e.intersect=function(t){return Yt.rect(e,t)},r},"stadium"),he=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,Ht(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.R.info("Circle main"),Wt(e,s),e.intersect=function(t){return c.R.info("Circle intersect",e,a.width/2+i,t),Yt.circle(e,a.width/2+i,t)},r},"circle"),ge=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await jt(t,e,Ht(e,void 0),!0),s=r.insert("g",":first-child"),n=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.R.info("DoubleCircle main"),Wt(e,n),e.intersect=function(t){return c.R.info("DoubleCircle intersect",e,a.width/2+i+5,t),Yt.circle(e,a.width/2+i+5,t)},r},"doublecircle"),ue=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await jt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Xt(r,i,s,n);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"subroutine"),ye=(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Wt(e,a),e.intersect=function(t){return Yt.circle(e,7,t)},r},"start"),pe=(0,d.K)((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,s=10;"LR"===r&&(i=10,s=70);const n=a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return Wt(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Yt.rect(e,t)},a},"forkJoin"),xe={rhombus:Zt,composite:ne,question:Zt,rect:se,labelRect:oe,rectWithTitle:ce,choice:qt,circle:he,doublecircle:ge,stadium:de,hexagon:Gt,block_arrow:Vt,rect_left_inv_arrow:Jt,lean_right:Qt,lean_left:te,trapezoid:ee,inv_trapezoid:re,rect_right_inv_arrow:ae,cylinder:ie,start:ye,end:(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Wt(e,i),e.intersect=function(t){return Yt.circle(e,7,t)},r},"end"),note:Ft,subroutine:ue,fork:pe,join:pe,class_box:(0,d.K)(async(t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),n=i.insert("line"),o=i.insert("line");let c=0,d=4;const h=i.insert("g").attr("class","label");let g=0;const u=e.classData.annotations?.[0],y=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=await pt(h,y,e.labelStyle,!0,!0);let x=p.getBBox();if((0,l.E)((0,l.D7)())){const t=p.children[0],e=(0,m.Ltv)(p);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let b=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.E)((0,l.D7)())?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");const f=await pt(h,b,e.labelStyle,!0,!0);(0,m.Ltv)(f).attr("class","classTitle");let w=f.getBBox();if((0,l.E)((0,l.D7)())){const t=f.children[0],e=(0,m.Ltv)(f);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const k=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(/</g,"<").replace(/>/g,">"));const i=await pt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,m.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8;const S=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(/</g,"<").replace(/>/g,">"));const i=await pt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,m.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,S.push(i)}),d+=8,u){let t=(c-x.width)/2;(0,m.Ltv)(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let L=(c-w.width)/2;return(0,m.Ltv)(f).attr("transform","translate( "+(-1*c/2+L)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,k.forEach(t=>{(0,m.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,S.forEach(t=>{(0,m.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),Wt(e,s),e.intersect=function(t){return Yt.rect(e,t)},i},"class_box")},be={},fe=(0,d.K)(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===(0,l.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await xe[e.shape](a,e,r)}else i=await xe[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),be[e.id]=a,e.haveCallback&&be[e.id].attr("class",be[e.id].attr("class")+" clickable"),a},"insertNode"),me=(0,d.K)(t=>{const e=be[t.id];c.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function we(t,e,r=!1){const a=t;let i="default";(a?.classes?.length||0)>0&&(i=(a?.classes??[]).join(" ")),i+=" flowchart-label";let s,n=0,c="";switch(a.type){case"round":n=5,c="rect";break;case"composite":n=0,c="composite",s=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const d=(0,o.sM)(a?.styles??[]),h=a.label,g=a.size??{width:0,height:0,x:0,y:0},u=e.getDiagramId();return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:n,ry:n,class:i,style:d.style,id:a.id,domId:u?`${u}-${a.id}`:a.id,directions:a.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:a.type,padding:s??(0,l.zj)()?.block?.padding??0,widthInColumns:a.widthInColumns??1}}async function ke(t,e,r){const a=we(e,r,!1);if("group"===a.type)return;const i=(0,l.zj)(),s=await fe(t,a,{config:i}),n=s.node().getBBox(),o=r.getBlock(a.id);o.size={width:n.width,height:n.height,x:0,y:0,node:s},r.setBlock(o),s.remove()}async function Se(t,e,r){const a=we(e,r,!0);if("space"!==r.getBlock(a.id).type){const r=(0,l.zj)();await fe(t,a,{config:r}),e.intersect=a?.intersect,me(a)}}async function Le(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await Le(t,i.children,r,a)}async function _e(t,e,r){await Le(t,e,r,ke)}async function Ee(t,e,r){await Le(t,e,r,Se)}async function ve(t,e,r,a,i){const s=new w.T({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const t of r)t.size&&s.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(const r of e)if(r.start&&r.end){const e=a.getBlock(r.start),n=a.getBlock(r.end);if(e?.size&&n?.size){const a=e.size,o=n.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}],c=i?`${i}-${r.id}`:r.id,d=`${"thick"===r.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===r.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;Dt(t,{v:r.start,w:r.end,name:c},{...r,id:c,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:l,classes:d},void 0,"block",s,i),r.label&&(await kt(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:l,classes:d}),Lt({...r,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,d.K)(we,"getNodeFromBlock"),(0,d.K)(ke,"calculateBlockSize"),(0,d.K)(Se,"insertBlockPositioned"),(0,d.K)(Le,"performOperations"),(0,d.K)(_e,"calculateBlockSizes"),(0,d.K)(Ee,"insertBlocks"),(0,d.K)(ve,"insertEdges");var De=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),Re={parser:S,db:at,renderer:{draw:(0,d.K)(async function(t,e,r,a){const{securityLevel:i,block:s}=(0,l.zj)(),n=a.db;let o;n.setDiagramId(e),"sandbox"===i&&(o=(0,m.Ltv)("#i"+e));const d="sandbox"===i?(0,m.Ltv)(o.nodes()[0].contentDocument.body):(0,m.Ltv)("body"),h="sandbox"===i?d.select(`[id="${e}"]`):(0,m.Ltv)(`[id="${e}"]`);lt(h,["point","circle","cross"],a.type,e);const g=n.getBlocks(),u=n.getBlocksFlat(),y=n.getEdges(),p=h.insert("g").attr("class","block");await _e(p,g,n);const x=yt(n);if(await Ee(p,g,n),await ve(p,y,u,n,e),x){const t=x,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:i}=s;(0,l.a$)(h,r,a,!!i),c.R.debug("Here Bounds",x,t),h.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:De},styles:st}},64918(t,e,r){r.d(e,{o:()=>a});var a=(0,r(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5877],{77481(e,t,n){n.d(t,{S:()=>l,X:()=>r});var s=n(96540),a=n(74848);function r(e){const[t,n]=s.useState([]);return(0,s.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]),(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:e.headers?.map((e,t)=>(0,a.jsx)("th",{children:e},t))})}),(0,a.jsx)("tbody",{children:t.map((t,n)=>(0,a.jsx)("tr",{onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},children:t.map((n,s)=>(0,a.jsx)("td",{style:{width:e.width??"auto"},className:s===t.length-1?"small":"",children:n},s))},n))})]})}function l(e){return(0,a.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,a.jsx)("div",{children:e},t))})}},83029(e,t,n){n.d(t,{N:()=>v});var s=n(96540),a=n(34843),r=n(82893),l=n(74848);function c(e){const[t,n]=(0,a.fp)(r.AG.user_base_info);return(0,l.jsx)("div",{children:e.div?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},children:e.name}):e.clickItem||"dir"===e._type?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},onClick:()=>{"dir"!==e._type?e.clickItem&&e.clickItem(e):e.click_dir(e.item)},children:e.name}):(0,l.jsx)("a",{href:e.url,target:e.target,className:"nav_list_a",style:{background:e.color},children:e.name})})}var i=n(64694),o=n(61443),d=n(85997),u=n(76213),h=n(34899);const p=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let x,m,j=[];const _=[];function v(e){const[t,n]=(0,s.useState)([]),[v,f]=(0,s.useState)(-1),g=(0,u.zy)(),[y,S]=(0,s.useState)(!1),[C,k]=(0,s.useState)(!1),{t:w}=(0,h.Bd)(),[b,I]=(0,s.useState)([]),[N,A]=(0,a.fp)(r.AG.nav_index_add_item_by_now_list),D=e=>{-1!==v?_[v]._children=e:j=e};(0,s.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();j=t,n(j)})()},[g]);(0,s.useEffect)(()=>{if(N){const e=[...t,{name:"",color:(0,i.Lr)(p),...N}];D(e),n(e),S(!0),A(void 0)}},[N]);const z=e=>{f(v+1),n(e._children),_.push(e)};return(0,l.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==v&&(0,l.jsx)(d.rA,{title:"返回",icon:"arrow_back",onClick:()=>{n(0===v?j:_[v-1]._children),f(v-1),_.pop()}}),t.map((a,r)=>(0,l.jsxs)("div",{draggable:!0,onDragOver:e=>{e.preventDefault()},onDragStart:e=>((e,t)=>{x=t})(0,r),onDrop:e=>((e,s)=>{e.preventDefault();const a=t[x],r=t[s];if(r&&"dir"===r._type){const e=[...t];return e.splice(x,1),r._children||(r._children=[]),r._children.push(a),D(e),void n(e)}const l=[...t],c=l[x];l.splice(x,1),l.splice(s,0,c),D(l),n(l)})(e,r),style:{cursor:y?"move":"pointer"},children:[(0,l.jsx)(c,{name:a.name,item:a,...a,div:y,target:"_blank",click_dir:z,clickItem:e.clickItem}),y&&(void 0!==b.find(e=>e===r)||C)&&(0,l.jsxs)("div",{className:C?"":" site_edit ",children:["dir"===a._type?(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(o.Sm,{value:a.name,handleInputChange:e=>{a.name=e},placeholder:w("输入类目名"),no_border:!0}),(0,l.jsx)(o.Sm,{value:a.color,handleInputChange:e=>{a.color=e},placeholder:"color",no_border:!0})]}):e.items.map((e,t)=>(0,l.jsx)("div",{children:(0,l.jsx)(o.Sm,{value:a[e.key],handleInputChange:t=>{a[e.key]=t},placeholder:e.preName,no_border:!0})},t)),!C&&(0,l.jsx)(d.C3,{text:w("折叠"),clickFun:()=>{I((0,i.P1)(b,r))}})]}),y&&(0,l.jsx)("div",{style:{display:"block"},children:(0,l.jsxs)("span",{className:"div-row ",children:[(0,l.jsx)(d.C3,{text:w("删除"),clickFun:()=>{(e=>{const s=[...t];s.splice(e,1),D(s),n(s)})(r)}}),(0,l.jsx)(d.C3,{text:w("编辑"),clickFun:()=>{void 0===b.find(e=>e===r)&&I([...b,r])}})]})})]},r)),y&&(0,l.jsxs)("div",{style:{display:"block"},children:[(0,l.jsx)(d.rA,{title:w("取消"),icon:"cancel",onClick:()=>{I([]),S(!1),m&&(n(m),D(m)),k(!1)}}),(0,l.jsx)(d.rA,{title:w("添加"),icon:"add",onClick:async()=>{const s=[...t,{name:"",color:(0,i.Lr)(p),...e.get_pre_add_item&&await e.get_pre_add_item()}];D(s),n(s)}}),(0,l.jsx)(d.rA,{title:w("添加类目"),icon:"add_box",onClick:()=>{const e=[...t,{name:"",_type:"dir",_children:[],color:"#c1edfb"}];D(e),n(e)}}),(0,l.jsx)(d.rA,{title:w("全部编辑"),icon:C?"unfold_less":"unfold_more",onClick:()=>{k(!C)}})]}),(void 0===e.have_auth_edit||!0===e.have_auth_edit)&&(0,l.jsx)(d.rA,{icon:y?"save":"edit",title:w(y?"保存":"编辑"),onClick:async()=>{y?e.save&&await e.save(j):m=t,S(!y)}})]})}},65877(e,t,n){n.r(t),n.d(t,{default:()=>D});var s=n(96540),a=n(75725),r=n(61443),l=n(70447),c=n(85997),i=n(34289),o=n(34899),d=n(62042),u=n(14284),h=n(53459),p=n(74848);function x(e){const{t}=(0,o.Bd)(),[n,x]=(0,s.useState)(t("毫秒")),[m,j]=(0,s.useState)(""),[_,v]=(0,s.useState)(""),[f,g]=(0,s.useState)(null),[y,S]=(0,s.useState)(null),[C,k]=(0,s.useState)(Date.now());return(0,s.useEffect)(()=>{(async()=>{const e=await u.Yu.get("sys_time/get");if(e.code===h.m.Success){const t=await e.data;g(t.timestamp),S(t.timezone),k(t.timestamp)}})();const e=setInterval(()=>{k(e=>e+1e3)},1e3);return()=>clearInterval(e)},[]),(0,p.jsxs)(a.fI,{children:[(0,p.jsx)(a.VP,{children:(0,p.jsxs)(l.Zp,{title:t("时间转换器"),rightBottomCom:(0,p.jsx)(c.C3,{text:t("确定"),clickFun:function(){if(!m&&!_)return void(0,d.zN)("不能都为空");let e=0;const t=""!==m&&0!==m;if(t){if(!(0,i.kf)(m))return void(0,d.zN)("must be number !");e=parseInt(m),"分秒"===n&&(e*=1e3)}const s=new Date(t?e:_),a=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(s);if(v(a),!m){const e=s.getTime();j("毫秒"===n?e:e/1e3)}}}),children:[(0,p.jsx)(r.l6,{value:n,options:[{title:t("毫秒"),value:"毫秒"},{title:t("分秒"),value:"分秒"}],onChange:function(e){x(e)}}),(0,p.jsx)(r.Sm,{placeholder:n,value:m,handleInputChange:e=>{j(e)}}),(0,p.jsx)(r.Sm,{placeholder:t("格式化时间"),value:_,handleInputChange:e=>{v(e)}})]})}),(0,p.jsx)(a.VP,{children:null!==f&&null!==y&&(0,p.jsxs)(l.Zp,{title:t("服务器时间"),children:[(0,p.jsxs)("h1",{children:[t("时区"),": ",y]}),(0,p.jsxs)("h1",{children:[t("时间"),": ",new Date(C).toLocaleString(navigator.language,{timeZone:y})]})]})})]})}var m=n(57952),j=n(83029),_=n(78247),v=n(23430);function f(e){const{t}=(0,o.Bd)(),{check_user_auth:n}=(0,_.MH)(),[a,l]=(0,s.useState)(""),i=async e=>{const t=e||a;if(!t)return void(0,d.zN)("mac地址不能为空");(await u._U.post("wol/exec",{mac:t})).code===h.m.Success&&(0,d.SK)("发送唤醒命令成功")};return(0,p.jsxs)("div",{children:[(0,p.jsxs)(m.A,{children:[(0,p.jsx)(c.rA,{icon:"play_arrow",title:t("发送"),onClick:()=>{i()}}),(0,p.jsx)(r.$Z,{placeholder:t("目标设备mac地址"),icon:"laptop_mac",value:a,handleInputChange:e=>l(e)})]}),(0,p.jsx)(j.N,{have_auth_edit:n(v.oV.wol_proxy_tag_update),getItems:async()=>{const e=await u._U.get("wol/tag");return e.code===h.m.Success?e.data:[]},save:async e=>{(await u._U.post("wol/tag/save",e)).code!==h.m.Success&&(0,d.zN)("网络错误")},clickItem:async e=>{l(e.mac),i(e.mac)},items:[{key:"name",preName:t("名字")},{key:"mac",preName:"mac"+t("地址")},{key:"color",preName:"color"}]})]})}var g=n(77481),y=n(34843),S=n(82893),C=n(40505);let k;function w(){const[e,t]=(0,s.useState)("rsa"),[n,i]=(0,s.useState)("pem"),{t:x,i18n:j}=(0,o.Bd)(),[_,v]=(0,y.fp)(S.AG.confirm),[f,w]=(0,s.useState)(""),[b,I]=(0,s.useState)(""),N=async t=>{if(!b||!f)return void(0,d.zN)("密钥不能为空");let n="id_"+e;"pub"===t&&(n+=".pub"),v({open:!0,title:x("将覆盖密钥文件"),sub_title:`之前的密钥将作废。 将会作为 ${n} 文件保存到系统上的"${k}"目录下,此目录会作为openssh(git)所使用的默认目录。`,handle:async()=>{(await u.cD.post("save_openssh",{name:n,context:"pub"===t?f:b})).code===h.m.Success&&((0,d.SK)("完成"),v({open:!1,handle:null}))}})};return(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(m.A,{children:(0,p.jsx)(g.S,{isFlex:!0,columns:[(0,p.jsx)(r.l6,{tip:x("加密算法"),value:e,width:"auto",onChange:e=>{t(e)},options:[{title:x("RSA"),value:"rsa"},{title:x("DSA"),value:"dsa"},{title:x("ECDSA"),value:"ecdsa"}]}),(0,p.jsx)(r.l6,{tip:x("输出格式"),value:n,width:"auto",onChange:e=>{i(e)},options:[{title:x("普通PEM"),value:"pem"},{title:x("opensshPEM"),value:"openssh_pem"}]}),(0,p.jsx)(c.rA,{icon:"play_arrow",title:x("生成"),onClick:()=>{(async()=>{const t=await u.cD.post("generate",{type:e,form:n});t.code===h.m.Success&&(w(t.data.public_key),I(t.data.private_key),k=t.data.home_path)})()}})]})}),(0,p.jsx)(a.xh,{children:(0,p.jsxs)(a.fI,{children:[(0,p.jsx)(a.VP,{children:(0,p.jsx)(l.Zp,{title:x("公钥"),titleCom:(0,p.jsx)(c.rA,{title:x("复制"),icon:"copy_all",onClick:()=>{f&&((0,C.lW)(f),(0,d.SK)("完成"))}}),rightBottomCom:"openssh_pem"===n&&(0,p.jsx)(c.C3,{text:x("保存到.ssh目录"),clickFun:()=>{N("pub")}}),children:(0,p.jsx)("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:e=>{w(e.target.value)},value:f})})}),(0,p.jsx)(a.VP,{children:(0,p.jsx)(l.Zp,{title:x("私钥"),titleCom:(0,p.jsx)(c.rA,{title:x("复制"),icon:"copy_all",onClick:()=>{b&&((0,C.lW)(b),(0,d.SK)("成功"))}}),rightBottomCom:"openssh_pem"===n&&(0,p.jsx)(c.C3,{text:x("保存到.ssh目录"),clickFun:()=>{N("pri")}}),children:(0,p.jsx)("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:b,onChange:e=>{I(e.target.value)}})})})]})})]})}var b=n(14944),I=n(92275);function N(){const{t:e}=(0,o.Bd)(),[t,n]=(0,s.useState)(""),[i,u]=(0,s.useState)("1"),[h,x]=(0,s.useState)("65535"),[m,j]=(0,s.useState)("100"),[_,v]=(0,s.useState)("2000"),[f,y]=(0,s.useState)(!1),[S,C]=(0,s.useState)(null),[k,w]=(0,s.useState)([]),[N,A]=(0,s.useState)(null),D=(0,s.useRef)([]),z=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!z.current)return z.current=!0,b.ws.addMsg(I.HK.port_scan_progress,e=>{C(e.context)}),b.ws.addMsg(I.HK.port_scan_result,e=>{const t=e.context,n=[...D.current,t];D.current=n,w(n)}),b.ws.addMsg(I.HK.port_scan_end,t=>{A(t.context),y(!1),t.context.cancelled?(0,d.zN)(e("扫描已取消")):(0,d.SK)(e("扫描完成"))}),()=>{b.ws.sendData(I.HK.port_scan_cancel,{}),b.ws.removeMsg(I.HK.port_scan_progress),b.ws.removeMsg(I.HK.port_scan_result),b.ws.removeMsg(I.HK.port_scan_end),z.current=!1}},[]);return(0,p.jsx)(a.xh,{children:(0,p.jsx)(a.fI,{children:(0,p.jsx)(a.VP,{children:(0,p.jsxs)(l.Zp,{title:e("TCP ")+e("端口扫描"),titleCom:(0,p.jsxs)("div",{style:{display:"flex",gap:"1rem",fontSize:"0.85em",color:"var(--textSecondary)"},children:[S&&(0,p.jsxs)("span",{children:[e("已发现"),": ",S.openCount]}),N&&(0,p.jsxs)("span",{children:[e("总计扫描"),": ",N.totalScanned," | ",e("开放"),": ",N.totalOpen]})]}),children:[(0,p.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap",marginBottom:"1rem"},children:[(0,p.jsx)(r.$Z,{placeholder:e("目标主机"),icon:"dns",value:t,handleInputChange:e=>n(e)}),(0,p.jsx)(r.$Z,{placeholder:e("起始端口"),icon:"login",value:i,handleInputChange:e=>u(e),type:"number"}),(0,p.jsx)(r.$Z,{placeholder:e("结束端口"),icon:"logout",value:h,handleInputChange:e=>x(e),type:"number"}),(0,p.jsx)(r.$Z,{placeholder:e("并发数"),icon:"shuffle",value:m,handleInputChange:e=>j(e),type:"number"}),(0,p.jsx)(r.$Z,{placeholder:e("超时(ms)"),icon:"timer",value:_,handleInputChange:e=>v(e),type:"number"}),f?(0,p.jsx)(c.C3,{text:e("取消"),clickFun:()=>{b.ws.sendData(I.HK.port_scan_cancel,{}).catch(()=>{})}}):(0,p.jsx)(c.C3,{text:e("扫描"),clickFun:()=>(()=>{if(!t)return void(0,d.zN)(e("主机地址不能为空"));const n=parseInt(i),s=parseInt(h);isNaN(n)||isNaN(s)||n<1||s<1||n>65535||s>65535?(0,d.zN)(e("端口范围无效")):n>s?(0,d.zN)(e("起始端口不能大于结束端口")):(y(!0),C(null),w([]),D.current=[],A(null),b.ws.sendData(I.HK.port_scan_req,{host:t,startPort:n,endPort:s,concurrency:parseInt(m)||100,timeout:parseInt(_)||2e3}).catch(()=>{}))})()})]}),f&&S&&(0,p.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.8em",color:"var(--textSecondary)",marginBottom:"0.3rem"},children:[(0,p.jsxs)("span",{children:[e("当前"),": ",S.currentPort]}),(0,p.jsxs)("span",{children:[S.scanned," / ",S.total]})]}),(0,p.jsx)(l.gz,{progress:S.percent})]}),k.length>0&&(0,p.jsx)(g.X,{headers:[e("端口"),e("状态")],rows:k.map(t=>[t.port,(0,p.jsx)("span",{style:{color:"var(--icon-green)"},children:e("开放")})])}),f&&0===k.length&&(0,p.jsx)("div",{style:{padding:"1rem",textAlign:"center",color:"var(--textSecondary)"},children:e("正在扫描...")}),!f&&N&&0===k.length&&(0,p.jsx)("div",{style:{padding:"1rem",textAlign:"center",color:"var(--textSecondary)"},children:e("未发现开放端口")}),!f&&!N&&0===k.length&&(0,p.jsx)("div",{style:{padding:"1rem",textAlign:"center",color:"var(--textSecondary)"},children:e("请输入参数后点击扫描")})]})})})})}var A=n(87361);function D(e){const{t}=(0,o.Bd)(),{check_user_auth:n}=(0,_.MH)(),s=[];return s.push({index:1,name:t("时间工具"),rto:"timeutil/",component:(0,p.jsx)(x,{})},{index:1,name:t("非对称密钥"),rto:"crypto/",component:(0,p.jsx)(w,{})}),n(v.oV.port_scan)&&s.push({index:1,name:t("端口扫描"),rto:"portscan/",component:(0,p.jsx)(N,{})}),n(v.oV.wol_proxy)&&s.push({index:1,name:t("网络唤醒"),rto:"netwol/",component:(0,p.jsx)(f,{})}),(0,p.jsx)(a.W1,{optionList:s,father_route:A.o.toolbox})}}}]);
|