livebook/static/assets/requirementDiagram-730b4d6e-DHDZADGM.js

53 lines
25 KiB
JavaScript
Raw Normal View History

2023-05-27 15:05:48 +08:00
import{a as we,b as Ve}from"./chunk-N4T7OBQH.js";import"./chunk-I4NDSNS6.js";import{A as Ae,D as je,Qa as Fe,g as ze,ha as he,l as re,la as ue,ra as de,sa as $e,ua as qe,va as Le,wa as Oe,xa as Ce,ya as De}from"./chunk-CRHZHETQ.js";import{h as xe}from"./chunk-2YVZDWG7.js";var Lt=xe(ze(),1),Ot=xe(je(),1);var pe=function(){var e=function(q,r,s,l){for(s=s||{},l=q.length;l--;s[q[l]]=r);return s},t=[1,3],a=[1,5],c=[1,6],d=[1,7],u=[1,8],p=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],h=[1,22],o=[2,13],g=[1,26],R=[1,27],v=[1,28],S=[1,29],T=[1,30],x=[1,31],A=[1,24],N=[1,32],w=[1,33],ye=[1,36],F=[71,72],ge=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],Ee=[1,56],Re=[1,57],me=[1,58],Ie=[1,59],be=[1,60],ke=[1,61],Se=[1,62],O=[62,63],M=[1,74],P=[1,70],Y=[1,71],U=[1,72],B=[1,73],Q=[1,75],j=[1,79],X=[1,80],J=[1,77],Z=[1,78],m=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ne={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(r,s,l,i,f,n,K){var _=n.length-1;switch(f){case 6:this.$=n[_].trim(),i.setAccTitle(this.$);break;case 7:case 8:this.$=n[_].trim(),i.setAccDescription(this.$);break;case 9:i.parseDirective("%%{","open_directive");break;case 10:i.parseDirective(n[_],"type_directive");break;case 11:n[_]=n[_].trim().replace(/'/g,'"'),i.parseDirective(n[_],"arg_directive");break;case 12:i.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:i.addRequirement(n[_-3],n[_-4]);break;case 20:i.setNewReqId(n[_-2]);break;case 21:i.setNewReqText(n[_-2]);break;case 22:i.setNewReqRisk(n[_-2]);break;case 23:i.setNewReqVerifyMethod(n[_-2]);break;case 26:this.$=i.RequirementType.REQUIREMENT;break;case 27:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=i.RequirementType.PERFORMANCE
`+E.showPosition()+`
Expecting `+ie.join(", ")+", got '"+(this.terminals_[I]||I)+"'":oe="Parse error on line "+(ee+1)+": Unexpected "+(I==Ne?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(oe,{text:E.match,token:this.terminals_[I]||I,line:E.yylineno,loc:le,expected:ie})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+I);switch(k[0]){case 1:l.push(I),f.push(E.yytext),n.push(E.yylloc),l.push(k[1]),I=null,Te=E.yyleng,_=E.yytext,ee=E.yylineno,le=E.yylloc;break;case 2:if(V=this.productions_[k[1]][1],H.$=f[f.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},Ke&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),ce=this.performAction.apply(H,[_,Te,ee,C.yy,k[1],f,n].concat(We)),typeof ce!="undefined")return ce;V&&(l=l.slice(0,-1*V*2),f=f.slice(0,-1*V),n=n.slice(0,-1*V)),l.push(this.productions_[k[1]][0]),f.push(H.$),n.push(H._$),ve=K[l[l.length-2]][l[l.length-1]],l.push(ve);break;case 3:return!0}}return!0}},Qe=function(){var q={EOF:1,parseError:function(s,l){if(this.yy.parser)this.yy.parser.parseError(s,l);else throw new Error(s)},setInput:function(r,s){return this.yy=s||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var s=r.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var s=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;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),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===i.length?this.yylloc.first_column:0)+i[i.length-l.length].length-l[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),s=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
`+s+"^"},test_match:function(r,s){var l,i,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),i=r[0].match(/(?:\r\n?|\n).*/g),i&&(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+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var n in f)this[n]=f[n];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,s,l,i;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),n=0;n<f.length;n++)if(l=this._input.match(this.rules[f[n]]),l&&(!s||l[0].length>s[0].length)){if(s=l,i=n,this.options.backtrack_lexer){if(r=this.test_match(l,f[n]),r!==!1)return r;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(r=this.test_match(s,f[i]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(s,l,i,f){switch(i){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return l.yytext=l.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return q}();ne.lexer=Qe;function se(){this.yy={}}return se.prototype=ne,ne.Parser=se,new se}();pe.parser=pe;var Xe=pe,fe=[],b={},G={},L={},z={},Je={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Phy
marker {
fill: ${e.relationColor};
stroke: ${e.relationColor};
}
marker.cross {
stroke: ${e.lineColor};
}
svg {
font-family: ${e.fontFamily};
font-size: ${e.fontSize};
}
.reqBox {
fill: ${e.requirementBackground};
fill-opacity: 1.0;
stroke: ${e.requirementBorderColor};
stroke-width: ${e.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${e.requirementTextColor};
}
.reqLabelBox {
fill: ${e.relationLabelBackground};
fill-opacity: 1.0;
}
.req-title-line {
stroke: ${e.requirementBorderColor};
stroke-width: ${e.requirementBorderSize};
}
.relationshipLine {
stroke: ${e.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${e.relationLabelColor};
}
`,Et=gt,_e={CONTAINS:"contains",ARROW:"arrow"},Rt=(e,t)=>{let a=e.append("defs").append("marker").attr("id",_e.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");a.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),a.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),a.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",_e.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0
L${t.line_height},${t.line_height/2}
M${t.line_height},${t.line_height/2}
L0,${t.line_height}`).attr("stroke-width",1)},Pe={ReqMarkers:_e,insertLineEndings:Rt},y={},Me=0,Ye=(e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",y.rect_min_width+"px").attr("height",y.rect_min_height+"px"),Ue=(e,t,a)=>{let c=y.rect_min_width/2,d=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",c).attr("y",y.rect_padding).attr("dominant-baseline","hanging"),u=0;a.forEach(g=>{u==0?d.append("tspan").attr("text-anchor","middle").attr("x",y.rect_min_width/2).attr("dy",0).text(g):d.append("tspan").attr("text-anchor","middle").attr("x",y.rect_min_width/2).attr("dy",y.line_height*.75).text(g),u++});let p=1.5*y.rect_padding,h=u*y.line_height*.75,o=p+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",y.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:d,y:o}},Be=(e,t,a,c)=>{let d=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",y.rect_padding).attr("y",c).attr("dominant-baseline","hanging"),u=0,p=30,h=[];return a.forEach(o=>{let g=o.length;for(;g>p&&u<3;){let R=o.substring(0,p);o=o.substring(p,o.length),g=o.length,h[h.length]=R,u++}if(u==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;u=0}),h.forEach(o=>{d.append("tspan").attr("x",y.rect_padding).attr("dy",y.line_height).text(o)}),d},mt=(e,t,a,c)=>{let d=t.node().getTotalLength(),u=t.node().getPointAtLength(d*.5),p="rel"+Me;Me++;let o=e.append("text").attr("class","req relationshipLabel").attr("id",p).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(c).node().getBBox();e.insert("rect","#"+p).attr("class","req reqLabelBox").attr("x",u.x-o.width/2).attr("y",u.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},It=function(e,t,a,c,d){let u=a.edge(W(t.src),W(t.dst)),p=Ae().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+c).attr("class","er relationshipLine").attr("d",p(u.points)).attr("fill","none");t.type==d.db.Relationships.CONTAINS?h.attr("marker-start","url("+ue.getUrl(y.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+ue.getUrl(y.arrowMarkerAbsolute)+"#"+Pe.ReqMarkers.ARROW+"_line_ending)")),mt(e,h,y,`<<${t.type}>>`)},bt=(e,t,a)=>{Object.keys(e).forEach(c=>{let d=e[c];c=W(c),he.info("Added new requirement: ",c);let u=a.append("g").attr("id",c),p="req-"+c,h=Ye(u,p),o=Ue(u,c+"_title",[`<<${d.type}>>`,`${d.name}`]);Be(u,c+"_body",[`Id: ${d.id}`,`Text: ${d.text}`,`Risk: ${d.risk}`,`Verification: ${d.verifyMethod}`],o.y);let g=h.node().getBBox();t.setNode(c,{width:g.width,height:g.height,shape:"rect",id:c})})},kt=(e,t,a)=>{Object.keys(e).forEach(c=>{let d=e[c],u=W(c),p=a.append("g").attr("id",u),h="element-"+u,o=Ye(p,h),g=Ue(p,h+"_title",["<<Element>>",`${c}`]);Be(p,h+"_body",[`Type: ${d.type||"Not Specified"}`,`Doc Ref: ${d.docRef||"None"}`],g.y);let R=o.node().getBBox();t.setNode(u,{width:R.width,height:R.height,shape:"rect",id:u})})},St=(e,t)=>(e.forEach(function(a){let c=W(a.src),d=W(a.dst);t.setEdge(c,d,{relationship:a})}),e),Tt=function(e,t){t.nodes().forEach(function(a){a!==void 0&&t.node(a)!==void 0&&(e.select("#"+a),e.select("#"+a).attr("transform","translate("+(t.node(a).x-t.node(a).width/2)+","+(t.node(a).y-t.node(a).height/2)+" )"))})},W=e=>e.replace(/\s/g,"").replace(/\./g,"_"),Nt=(e,t,a,c)=>{y=de().requirement,c.db.clear(),c.parser.parse(e);let d=y.securityLevel,u;d==="sandbox"&&(u=re("#i"+t));let h=(d==="sandbox"?re(u.nodes()[0].contentDocument.body):re("body")).select(`[id='${t}']`);Pe.insertLineEndings(h,y);let o=new we({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:y.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),g=c.db.getRequirements(),R=c.db.getElements(),v=c.db.getRelationships();bt(g,o,h),kt(R,o,h),St(v,o),Ve(o),Tt(h,o),v.forEach(function(N){It(h,N,o,t,c)});let S=y.rect_padding,T=h.node().getBBox(),x=T.width+S*2,A=T.