export const __rspack_esm_id="6953";export const __rspack_esm_ids=["6953"];export const __webpack_modules__={57104(t,e,a){a.d(e,{diagram:()=>z});var i,r=a(20406);a(37902),a(67508),a(52725),a(4791),a(76447),a(59195),a(50542),a(34478);var d=a(81179),n=a(50476),s=a(79723),o=a(26354),g=a(36172),l={},p=(0,n.K2)((t,e)=>{l[t]=e},"set"),h=(t=>l[t],(0,n.K2)(()=>Object.keys(l),"keys")),c=(()=>h().length,(0,n.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,n.D7)().state.sizeUnit).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit),"drawStartState")),x=(0,n.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,n.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,n.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),D=(0,n.K2)((t,e)=>{let a=t.append("text").attr("x",2*(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.textHeight+2*(0,n.D7)().state.padding).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding).attr("width",i.width+2*(0,n.D7)().state.padding).attr("height",i.height+2*(0,n.D7)().state.padding).attr("rx",(0,n.D7)().state.radius),a},"drawSimpleState"),u=(0,n.K2)((t,e)=>{let a=(0,n.K2)(function(t,e,a){let i=t.append("tspan").attr("x",2*(0,n.D7)().state.padding).text(e);a||i.attr("dy",(0,n.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.textHeight+1.3*(0,n.D7)().state.padding).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=i.height,d=t.append("text").attr("x",(0,n.D7)().state.padding).attr("y",r+.4*(0,n.D7)().state.padding+(0,n.D7)().state.dividerMargin+(0,n.D7)().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(a(d,t,o),o=!1),s=!1});let g=t.append("line").attr("x1",(0,n.D7)().state.padding).attr("y1",(0,n.D7)().state.padding+r+(0,n.D7)().state.dividerMargin/2).attr("y2",(0,n.D7)().state.padding+r+(0,n.D7)().state.dividerMargin/2).attr("class","descr-divider"),l=d.node().getBBox(),p=Math.max(l.width,i.width);return g.attr("x2",p+3*(0,n.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding).attr("width",p+2*(0,n.D7)().state.padding).attr("height",l.height+r+2*(0,n.D7)().state.padding).attr("rx",(0,n.D7)().state.radius),t},"drawDescrState"),f=(0,n.K2)((t,e,a)=>{let i,r=(0,n.D7)().state.padding,d=2*(0,n.D7)().state.padding,s=t.node().getBBox(),o=s.width,g=s.x,l=t.append("text").attr("x",0).attr("y",(0,n.D7)().state.titleShift).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.id),p=l.node().getBBox().width+d,h=Math.max(p,o);h===o&&(h+=d);let c=t.node().getBBox();e.doc,i=g-r,p>o&&(i=(o-h)/2+r),Math.abs(g-c.x)o&&(i=g-(p-o)/2);let x=1-(0,n.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",i).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",c.height+(0,n.D7)().state.textHeight+(0,n.D7)().state.titleShift+1).attr("rx","0"),l.attr("x",i+r),p<=o&&l.attr("x",g+(h-d)/2-p/2+r),t.insert("rect",":first-child").attr("x",i).attr("y",(0,n.D7)().state.titleShift-(0,n.D7)().state.textHeight-(0,n.D7)().state.padding).attr("width",h).attr("height",3*(0,n.D7)().state.textHeight).attr("rx",(0,n.D7)().state.radius),t.insert("rect",":first-child").attr("x",i).attr("y",(0,n.D7)().state.titleShift-(0,n.D7)().state.textHeight-(0,n.D7)().state.padding).attr("width",h).attr("height",c.height+3+2*(0,n.D7)().state.textHeight).attr("rx",(0,n.D7)().state.radius),t},"addTitleAndBox"),y=(0,n.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,n.D7)().state.sizeUnit).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+2).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+2)),"drawEndState"),w=(0,n.K2)((t,e)=>{let a=(0,n.D7)().state.forkWidth,i=(0,n.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding)},"drawForkJoinState"),m=(0,n.K2)((t,e,a,i)=>{let r=0,d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let s=t.replace(/\r\n/g,"
"),o=(s=s.replace(/\n/g,"
")).split(n.Y2.lineBreakRegex),g=1.25*(0,n.D7)().state.noteMargin;for(let t of o){let i=t.trim();if(i.length>0){let t=d.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),r+=g,t.attr("x",e+(0,n.D7)().state.noteMargin),t.attr("y",a+r+1.25*(0,n.D7)().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:r}},"_drawLongText"),b=(0,n.K2)((t,e)=>{e.attr("class","state-note");let a=e.append("rect").attr("x",0).attr("y",(0,n.D7)().state.padding),{textWidth:i,textHeight:r}=m(t,0,0,e.append("g"));return a.attr("height",r+2*(0,n.D7)().state.noteMargin),a.attr("width",i+2*(0,n.D7)().state.noteMargin),a},"drawNote"),B=(0,n.K2)(function(t,e){let a=e.id,i={id:a,label:e.id,width:0,height:0},r=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&c(r),"end"===e.type&&y(r),("fork"===e.type||"join"===e.type)&&w(r,e),"note"===e.type&&b(e.note.text,r),"divider"===e.type&&x(r),"default"===e.type&&0===e.descriptions.length&&D(r,e),"default"===e.type&&e.descriptions.length>0&&u(r,e);let d=r.node().getBBox();return i.width=d.width+2*(0,n.D7)().state.padding,i.height=d.height+2*(0,n.D7)().state.padding,p(a,i),i},"drawState"),k=0,S=(0,n.K2)(function(t,e,a){let i=(0,n.K2)(function(t){switch(t){case r.u4.relationType.AGGREGATION:return"aggregation";case r.u4.relationType.EXTENSION:return"extension";case r.u4.relationType.COMPOSITION:return"composition";case r.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let o=e.points,g=(0,s.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(s.qrM),l=t.append("path").attr("d",g(o)).attr("id","edge"+k).attr("class","transition"),p="";if((0,n.D7)().state.arrowMarkerAbsolute&&(p=(p=(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),l.attr("marker-end","url("+p+"#"+i(r.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){let i=t.append("g").attr("class","stateLabel"),{x:r,y:s}=d._K.calcLabelPosition(e.points),o=n.Y2.getRows(a.title),g=0,l=[],p=0,h=0;for(let t=0;t<=o.length;t++){let e=i.append("text").attr("text-anchor","middle").text(o[t]).attr("x",r).attr("y",s+g),a=e.node().getBBox();p=Math.max(p,a.width),h=Math.min(h,a.x),n.Rm.info(a.x,r,s+g),0===g&&(g=e.node().getBBox().height,n.Rm.info("Title height",g,s)),l.push(e)}let c=g*o.length;if(o.length>1){let t=(o.length-1)*g*.5;l.forEach((e,a)=>e.attr("y",s+a*g-t)),c=g*o.length}let x=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-p/2-(0,n.D7)().state.padding/2).attr("y",s-c/2-(0,n.D7)().state.padding/2-3.5).attr("width",p+(0,n.D7)().state.padding).attr("height",c+(0,n.D7)().state.padding),n.Rm.info(x)}k++},"drawEdge"),N={},E=(0,n.K2)(function(){},"setConf"),M=(0,n.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),v=(0,n.K2)(function(t,e,a,r){let d;i=(0,n.D7)().state;let o=(0,n.D7)().securityLevel;"sandbox"===o&&(d=(0,s.Ltv)("#i"+e));let g="sandbox"===o?(0,s.Ltv)(d.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),l="sandbox"===o?d.nodes()[0].contentDocument:document;n.Rm.debug("Rendering diagram "+t);let p=g.select(`[id='${e}']`);M(p),R(r.db.getRootDoc(),p,void 0,!1,g,l,r);let h=i.padding,c=p.node().getBBox(),x=c.width+2*h,D=c.height+2*h;(0,n.a$)(p,D,1.75*x,i.useMaxWidth),p.attr("viewBox",`${c.x-i.padding} ${c.y-i.padding} `+x+" "+D)},"draw"),K=(0,n.K2)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),R=(0,n.K2)((t,e,a,r,d,s,l)=>{let p,h=new g.T({compound:!0,multigraph:!0}),c=!0;for(p=0;p{let e=t.parentElement,a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),Number.isNaN(i=parseInt(e.getAttribute("data-x-shift"),10))&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})):n.Rm.debug("No Node "+t+": "+JSON.stringify(h.node(t)))});let w=y.getBBox();h.edges().forEach(function(t){void 0!==t&&void 0!==h.edge(t)&&(n.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(h.edge(t))),S(e,h.edge(t),h.edge(t).relation))});let m={id:a||"root",label:a||"root",width:0,height:0};return m.width=(w=y.getBBox()).width+2*i.padding,m.height=w.height+2*i.padding,n.Rm.debug("Doc rendered",m,h),m},"renderDoc"),z={parser:r.Zk,get db(){return new r.u4(1)},renderer:{setConf:E,draw:v},styles:r.tM,init:(0,n.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}};