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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9756],{72389(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(68861),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")},19756(t,e,s){s.d(e,{Zk:()=>y,q7:()=>G,tM:()=>ht,u4:()=>ct});var i=s(96755),n=s(59337),r=s(6923),o=s(72389),a=s(28342),l=s(68861),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")},59337(t,e,s){s.d(e,{P:()=>o});var i=s(68861),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")}}]);
|