找回密码
 立即注册
搜索
热搜: 丝袜 魅魔 黑丝
查看: 7|回复: 0

19397007_【原创】正是洞房花烛时

[复制链接]

13万

主题

343

回帖

22万

积分

管理员

站长

UID
1
积分
224400
余额
13 R
Moe币
84881
在线时间
279 小时
注册时间
2025-12-28
最后登录
2026-11-9
发表于 2026-9-3 23:00:59 | 显示全部楼层 |阅读模式
th-20,h.y+10,t.substr(1)):(0,o.c)(u,h.x+h.width-20,h.y+10,t)}await Tt(n,(0,i.G)(e.description))(e.description,u,h.x,h.y,h.width,h.height,{class:"actor"},n);let g=e.height;if(d.node){const t=d.node().getBBox();e.height=t.height,g=t.height}return g},st=async function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,c=a+80;t.lower(),r||(rt++,t.append("line").attr("id","actor"+rt).attr("x1",s).attr("y1",c).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),e.actorCnt=rt);const l=t.append("g");let u="actor-man";u+=r?` ${Q}`:` ${X}`,l.attr("class",u),l.attr("name",e.name);const h=(0,o.g)();h.x=e.x,h.y=a,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+rt).attr("x1",s).attr("y1",a+25).attr("x2",s).attr("y2",a+45),l.append("line").attr("id","actor-man-arms"+rt).attr("x1",s-Y/2).attr("y1",a+33).attr("x2",s+Y/2).attr("y2",a+33),l.append("line").attr("x1",s-Y/2).attr("y1",a+60).attr("x2",s).attr("y2",a+45),l.append("line").attr("x1",s).attr("y1",a+45).attr("x2",s+Y/2-2).attr("y2",a+60);const f=l.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",a+10),f.attr("r",15),f.attr("width",e.width),f.attr("height",e.height);const d=l.node().getBBox();return e.height=d.height,await Tt(n,(0,i.G)(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:"actor"},n),e.height},ct=async function(t,e,n,i){switch(e.type){case"actor":return await st(t,e,n,i);case"participant":return await ot(t,e,n,i)}},lt=async function(t,e,n){const i=t.append("g"),r=i;dt(r,e),e.name&&await Tt(n)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},n),r.lower()},ut=function(t){return t.append("g")},ht=function(t,e,n,i,r){const a=(0,o.g)(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+r%3,a.width=e.stopx-e.startx,a.height=n-e.starty,Z(s,a)},ft=async function(t,e,n,r){const{boxMargin:a,boxTextMargin:s,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=r,d=t.append("g"),g=function(t,e,n,i){return d.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",i).attr("class","loopLine")};g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){g(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let p=(0,o.e)();p.text=n,p.x=e.startx,p.y=e.starty,p.fontFamily=u,p.fontSize=h,p.fontWeight=f,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=l||50,p.height=c||20,p.textMargin=s,p.class="labelText",it(d,p),p=xt(),p.text=e.title,p.x=e.startx+l/2+(e.stopx-e.startx)/2,p.y=e.starty+a+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=u,p.fontSize=h,p.fontWeight=f,p.wrap=!0;let b=(0,i.G)(p.text)?await et(d,p,e):nt(d,p);if(void 0!==e.sectionTitles)for(const[o,w]of Object.entries(e.sectionTitles))if(w.message){p.text=w.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[o].y+a+s,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=u,p.fontSize=h,p.fontWeight=f,p.wrap=e.wrap,(0,i.G)(p.text)?(e.starty=e.sections[o].y,await et(d,p,e)):nt(d,p);let t=Math.round(b.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[o].height+=t-(a+s)}return e.height=Math.round(e.stopy-e.starty),d},dt=function(t,e){(0,o.a)(t,e)},gt=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},pt=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},bt=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},wt=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).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")},yt=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},mt=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},vt=function(t){const e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5);n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},xt=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},kt=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Tt=function(){function t(t,e,n,i,r,o,s){const c=e.append("text").attr("x",n+r/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t);a(c,s)}function e(t,e,n,r,o,s,c,l){const{actorFontSize:u,actorFontFamily:h,actorFontWeight:f}=l,[d,g]=(0,i.D)(u),p=t.split(i.e.lineBreakRegex);for(let i=0;i<p.length;i++){const t=i*d-d*(p.length-1)/2,l=e.append("text").attr("x",n+o/2).attr("y",r).style("text-anchor","middle").style("font-size",g).style("font-weight",f).style("font-family",h);l.append("tspan").attr("x",n+o/2).attr("dy",t).text(p[i]),l.attr("y",r+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(l,c)}}function n(t,n,i,r,o,s,c,l){const u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",r).attr("width",o).attr("height",s),f=h.append("xhtml:div").style("display","table").style("height","100%").style("width","100%");f.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,r,o,s,c,l),a(f,c)}async function r(t,n,r,o,s,c,l,u){const h=await(0,i.H)(t,(0,i.F)()),f=n.append("switch"),d=f.append("foreignObject").attr("x",r+s/2-h.width/2).attr("y",o+c/2-h.height/2).attr("width",h.width).attr("height",h.height),g=d.append("xhtml:div").style("height","100%").style("width","100%");g.append("div").style("text-align","center").style("vertical-align","middle").html(await(0,i.r)(t,(0,i.F)())),e(t,f,r,o,s,c,l,u),a(g,l)}function a(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(i,a=!1){return a?r:"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Et=function(){function t(t,e,n,i,a,o,s){const c=e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").text(t);r(c,s)}function e(t,e,n,a,o,s,c,l){const{actorFontSize:u,actorFontFamily:h,actorFontWeight:f}=l,d=t.split(i.e.lineBreakRegex);for(let i=0;i<d.length;i++){const t=i*u-u*(d.length-1)/2,o=e.append("text").attr("x",n).attr("y",a).style("text-anchor","start").style("font-size",u).style("font-weight",f).style("font-family",h);o.append("tspan").attr("x",n).attr("dy",t).text(d[i]),o.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(o,c)}}function n(t,n,i,a,o,s,c,l){const u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s),f=h.append("xhtml:div").style("display","table").style("height","100%").style("width","100%");f.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,o,s,c,l),r(f,c)}function r(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Ct={drawRect:Z,drawText:nt,drawLabel:it,drawActor:ct,drawBox:lt,drawPopup:J,anchorElement:ut,drawActivation:ht,drawLoop:ft,drawBackgroundRect:dt,insertArrowHead:wt,insertArrowFilledHead:yt,insertSequenceNumber:mt,insertArrowCrossHead:vt,insertDatabaseIcon:gt,insertComputerIcon:pt,insertClockIcon:bt,getTextObj:xt,getNoteRect:kt,fixLifeLineHeights:at,sanitizeUrl:a.Jf};let At={};const _t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Rt((0,i.c)())},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,i){const r=this;let a=0;function o(o){return function(s){a++;const c=r.sequenceItems.length-a+1;r.updateVal(s,"starty",e-c*At.boxMargin,Math.min),r.updateVal(s,"stopy",i+c*At.boxMargin,Math.max),r.updateVal(_t.data,"startx",t-c*At.boxMargin,Math.min),r.updateVal(_t.data,"stopx",n+c*At.boxMargin,Math.max),"activation"!==o&&(r.updateVal(s,"startx",t-c*At.boxMargin,Math.min),r.updateVal(s,"stopx",n+c*At.boxMargin,Math.max),r.updateVal(_t.data,"starty",e-c*At.boxMargin,Math.min),r.updateVal(_t.data,"stopy",i+c*At.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){const a=i.e.getMin(t,n),o=i.e.getMax(t,n),s=i.e.getMin(e,r),c=i.e.getMax(e,r);this.updateVal(_t.data,"startx",a,Math.min),this.updateVal(_t.data,"starty",s,Math.min),this.updateVal(_t.data,"stopx",o,Math.max),this.updateVal(_t.data,"stopy",c,Math.max),this.updateBounds(a,s,o,c)},newActivation:function(t,e,n){const i=n[t.from.actor],r=Ft(t.from.actor).length||0,a=i.x+i.width/2+(r-1)*At.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+At.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Ct.anchorElement(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:_t.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=i.e.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},St=async function(t,e){_t.bumpVerticalPos(At.boxMargin),e.height=At.boxMargin,e.starty=_t.getVerticalPos();const n=(0,o.g)();n.x=e.startx,n.y=e.starty,n.width=e.width||At.width,n.class="note";const r=t.append("g"),a=Ct.drawRect(r,n),s=(0,o.e)();s.x=e.startx,s.y=e.starty,s.width=n.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=At.noteFontFamily,s.fontSize=At.noteFontSize,s.fontWeight=At.noteFontWeight,s.anchor=At.noteAlign,s.textMargin=At.noteMargin,s.valign="center";const c=(0,i.G)(s.text)?await et(r,s):nt(r,s),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));a.attr("height",l+2*At.noteMargin),e.height+=l+2*At.noteMargin,_t.bumpVerticalPos(l+2*At.noteMargin),e.stopy=e.starty+l+2*At.noteMargin,e.stopx=e.startx+n.width,_t.insert(e.startx,e.starty,e.stopx,e.stopy),_t.models.addNote(e)},Lt=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Mt=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),It=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});async function Ot(t,e){_t.bumpVerticalPos(10);const{startx:n,stopx:r,message:a}=e,o=i.e.splitBreaks(a).length,s=(0,i.G)(a),c=s?await(0,i.H)(a,(0,i.c)()):i.u.calculateTextDimensions(a,Lt(At));if(!s){const t=c.height/o;e.height+=t,_t.bumpVerticalPos(t)}let l,u=c.height-10;const h=c.width;if(n===r){l=_t.getVerticalPos()+u,At.rightAngles||(u+=At.boxMargin,l=_t.getVerticalPos()+u),u+=30;const t=i.e.getMax(h/2,At.width/2);_t.insert(n-t,_t.getVerticalPos()-10+u,r+t,_t.getVerticalPos()+30+u)}else u+=At.boxMargin,l=_t.getVerticalPos()+u,_t.insert(n,l-10,r,l);return _t.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,_t.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const Dt=async function(t,e,n,r){const{startx:a,stopx:s,starty:c,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=e,d=i.u.calculateTextDimensions(l,Lt(At)),g=(0,o.e)();g.x=a,g.y=c+10,g.width=s-a,g.class="messageText",g.dy="1em",g.text=l,g.fontFamily=At.messageFontFamily,g.fontSize=At.messageFontSize,g.fontWeight=At.messageFontWeight,g.anchor=At.messageAlign,g.valign="center",g.textMargin=At.wrapPadding,g.tspan=!1,(0,i.G)(g.text)?await et(t,g,{startx:a,stopx:s,starty:n}):nt(t,g);const p=d.width;let b;a===s?b=At.rightAngles?t.append("path").attr("d",`M  ${a},${n} H ${a+i.e.getMax(At.width/2,p/2)} V ${n+25} H ${a}`):t.append("path").attr("d","M "+a+","+n+" C "+(a+60)+","+(n-10)+" "+(a+60)+","+(n+30)+" "+a+","+(n+20)):(b=t.append("line"),b.attr("x1",a),b.attr("y1",n),b.attr("x2",s),b.attr("y2",n)),u===r.db.LINETYPE.DOTTED||u===r.db.LINETYPE.DOTTED_CROSS||u===r.db.LINETYPE.DOTTED_POINT||u===r.db.LINETYPE.DOTTED_OPEN?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0");let w="";At.arrowMarkerAbsolute&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\("),w=w.replace(/\)/g,"\\)")),b.attr("stroke-width",2),b.attr("stroke","none"),b.style("fill","none"),u!==r.db.LINETYPE.SOLID&&u!==r.db.LINETYPE.DOTTED||b.attr("marker-end","url("+w+"#arrowhead)"),u!==r.db.LINETYPE.SOLID_POINT&&u!==r.db.LINETYPE.DOTTED_POINT||b.attr("marker-end","url("+w+"#filled-head)"),u!==r.db.LINETYPE.SOLID_CROSS&&u!==r.db.LINETYPE.DOTTED_CROSS||b.attr("marker-end","url("+w+"#crosshead)"),(f||At.showSequenceNumbers)&&(b.attr("marker-start","url("+w+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},Pt=async function(t,e,n,r,a,o,s){let c,l=0,u=0,h=0;for(const f of r){const t=e[f],r=t.box;c&&c!=r&&(s||_t.models.addBox(c),u+=At.boxMargin+c.margin),r&&r!=c&&(s||(r.x=l+u,r.y=a),u+=r.margin),t.width=t.width||At.width,t.height=i.e.getMax(t.height||At.height,At.height),t.margin=t.margin||At.actorMargin,h=i.e.getMax(h,t.height),n[t.name]&&(u+=t.width/2),t.x=l+u,t.starty=_t.getVerticalPos(),_t.insert(t.x,a,t.x+t.width,t.height),l+=t.width+u,t.box&&(t.box.width=l+r.margin-t.box.x),u=t.margin,c=t.box,_t.models.addActor(t)}c&&!s&&_t.models.addBox(c),_t.bumpVerticalPos(h)},Nt=async function(t,e,n,r){if(r){let r=0;_t.bumpVerticalPos(2*At.boxMargin);for(const a of n){const n=e[a];n.stopy||(n.stopy=_t.getVerticalPos());const o=await Ct.drawActor(t,n,At,!0);r=i.e.getMax(r,o)}_t.bumpVerticalPos(r+At.boxMargin)}else for(const i of n){const n=e[i];await Ct.drawActor(t,n,At,!1)}},Bt=function(t,e,n,i){let r=0,a=0;for(const o of n){const n=e[o],s=Ht(n),c=Ct.drawPopup(t,n,s,At,At.forceMenus,i);c.height>r&&(r=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:r,maxWidth:a}},Rt=function(t){(0,i.f)(At,t),t.fontFamily&&(At.actorFontFamily=At.noteFontFamily=At.messageFontFamily=t.fontFamily),t.fontSize&&(At.actorFontSize=At.noteFontSize=At.messageFontSize=t.fontSize),t.fontWeight&&(At.actorFontWeight=At.noteFontWeight=At.messageFontWeight=t.fontWeight)},Ft=function(t){return _t.activations.filter((function(e){return e.actor===t}))},$t=function(t,e){const n=e[t],r=Ft(t),a=r.reduce((function(t,e){return i.e.getMin(t,e.startx)}),n.x+n.width/2-1),o=r.reduce((function(t,e){return i.e.getMax(t,e.stopx)}),n.x+n.width/2+1);return[a,o]};function jt(t,e,n,r,a){_t.bumpVerticalPos(n);let o=r;if(e.id&&e.message&&t[e.id]){const n=t[e.id].width,a=Lt(At);e.message=i.u.wrapLabel(`[${e.message}]`,n-2*At.wrapPadding,a),e.width=n,e.wrap=!0;const s=i.u.calculateTextDimensions(e.message,a),c=i.e.getMax(s.height,At.labelBoxHeight);o=r+c,i.l.debug(`${c} - ${e.message}`)}a(e),_t.bumpVerticalPos(o)}function zt(t,e,n,i,r,a,o){function s(n,i){n.x<r[t.from].x?(_t.insert(e.stopx-i,e.starty,e.startx,e.stopy+n.height/2+At.noteMargin),e.stopx=e.stopx+i):(_t.insert(e.startx,e.starty,e.stopx+i,e.stopy+n.height/2+At.noteMargin),e.stopx=e.stopx-i)}function c(n,i){n.x<r[t.to].x?(_t.insert(e.startx-i,e.starty,e.stopx,e.stopy+n.height/2+At.noteMargin),e.startx=e.startx+i):(_t.insert(e.stopx,e.starty,e.startx+i,e.stopy+n.height/2+At.noteMargin),e.startx=e.startx-i)}if(a[t.to]==i){const e=r[t.to],i="actor"==e.type?Y/2+3:e.width/2+3;s(e,i),e.starty=n-e.height/2,_t.bumpVerticalPos(e.height/2)}else if(o[t.from]==i){const e=r[t.from];if(At.mirrorActors){const t="actor"==e.type?Y/2:e.width/2;c(e,t)}e.stopy=n-e.height/2,_t.bumpVerticalPos(e.height/2)}else if(o[t.to]==i){const e=r[t.to];if(At.mirrorActors){const t="actor"==e.type?Y/2+3:e.width/2+3;s(e,t)}e.stopy=n-e.height/2,_t.bumpVerticalPos(e.height/2)}}const qt=async function(t,e,n,a){const{securityLevel:o,sequence:s}=(0,i.c)();let c;At=s,"sandbox"===o&&(c=(0,r.Ltv)("#i"+e));const l="sandbox"===o?(0,r.Ltv)(c.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),u="sandbox"===o?c.nodes()[0].contentDocument:document;_t.init(),i.l.debug(a.db);const h="sandbox"===o?l.select(`[id="${e}"]`):(0,r.Ltv)(`[id="${e}"]`),f=a.db.getActors(),d=a.db.getCreatedActors(),g=a.db.getDestroyedActors(),p=a.db.getBoxes();let b=a.db.getActorKeys();const w=a.db.getMessages(),y=a.db.getDiagramTitle(),m=a.db.hasAtLeastOneBox(),v=a.db.hasAtLeastOneBoxWithTitle(),x=await Ut(f,w,a);if(At.height=await Kt(f,x,p),Ct.insertComputerIcon(h),Ct.insertDatabaseIcon(h),Ct.insertClockIcon(h),m&&(_t.bumpVerticalPos(At.boxMargin),v&&_t.bumpVerticalPos(p[0].textMaxHeight)),!0===At.hideUnusedParticipants){const t=new Set;w.forEach((e=>{t.add(e.from),t.add(e.to)})),b=b.filter((e=>t.has(e)))}await Pt(h,f,d,b,0,w,!1);const k=await Vt(w,f,x,a);function T(t,e){const n=_t.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),Ct.drawActivation(h,n,e,At,Ft(t.from.actor).length),_t.insert(n.startx,e-10,n.stopx,e)}Ct.insertArrowHead(h),Ct.insertArrowCrossHead(h),Ct.insertArrowFilledHead(h),Ct.insertSequenceNumber(h);let E=1,C=1;const A=[],_=[];let S=0;for(const r of w){let t,e,n;switch(r.type){case a.db.LINETYPE.NOTE:_t.resetVerticalPos(),e=r.noteModel,await St(h,e);break;case a.db.LINETYPE.ACTIVE_START:_t.newActivation(r,h,f);break;case a.db.LINETYPE.ACTIVE_END:T(r,_t.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:jt(k,r,At.boxMargin,At.boxMargin+At.boxTextMargin,(t=>_t.newLoop(t)));break;case a.db.LINETYPE.LOOP_END:t=_t.endLoop(),await Ct.drawLoop(h,t,"loop",At),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos()),_t.models.addLoop(t);break;case a.db.LINETYPE.RECT_START:jt(k,r,At.boxMargin,At.boxMargin,(t=>_t.newLoop(void 0,t.message)));break;case a.db.LINETYPE.RECT_END:t=_t.endLoop(),_.push(t),_t.models.addLoop(t),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos());break;case a.db.LINETYPE.OPT_START:jt(k,r,At.boxMargin,At.boxMargin+At.boxTextMargin,(t=>_t.newLoop(t)));break;case a.db.LINETYPE.OPT_END:t=_t.endLoop(),await Ct.drawLoop(h,t,"opt",At),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos()),_t.models.addLoop(t);break;case a.db.LINETYPE.ALT_START:jt(k,r,At.boxMargin,At.boxMargin+At.boxTextMargin,(t=>_t.newLoop(t)));break;case a.db.LINETYPE.ALT_ELSE:jt(k,r,At.boxMargin+At.boxTextMargin,At.boxMargin,(t=>_t.addSectionToLoop(t)));break;case a.db.LINETYPE.ALT_END:t=_t.endLoop(),await Ct.drawLoop(h,t,"alt",At),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos()),_t.models.addLoop(t);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:jt(k,r,At.boxMargin,At.boxMargin+At.boxTextMargin,(t=>_t.newLoop(t))),_t.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:jt(k,r,At.boxMargin+At.boxTextMargin,At.boxMargin,(t=>_t.addSectionToLoop(t)));break;case a.db.LINETYPE.PAR_END:t=_t.endLoop(),await Ct.drawLoop(h,t,"par",At),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos()),_t.models.addLoop(t);break;case a.db.LINETYPE.AUTONUMBER:E=r.message.start||E,C=r.message.step||C,r.message.visible?a.db.enableSequenceNumbers():a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:jt(k,r,At.boxMargin,At.boxMargin+At.boxTextMargin,(t=>_t.newLoop(t)));break;case a.db.LINETYPE.CRITICAL_OPTION:jt(k,r,At.boxMargin+At.boxTextMargin,At.boxMargin,(t=>_t.addSectionToLoop(t)));break;case a.db.LINETYPE.CRITICAL_END:t=_t.endLoop(),await Ct.drawLoop(h,t,"critical",At),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos()),_t.models.addLoop(t);break;case a.db.LINETYPE.BREAK_START:jt(k,r,At.boxMargin,At.boxMargin+At.boxTextMargin,(t=>_t.newLoop(t)));break;case a.db.LINETYPE.BREAK_END:t=_t.endLoop(),await Ct.drawLoop(h,t,"break",At),_t.bumpVerticalPos(t.stopy-_t.getVerticalPos()),_t.models.addLoop(t);break;default:try{n=r.msgModel,n.starty=_t.getVerticalPos(),n.sequenceIndex=E,n.sequenceVisible=a.db.showSequenceNumbers();const t=await Ot(h,n);zt(r,n,t,S,f,d,g),A.push({messageModel:n,lineStartY:t}),_t.models.addMessage(n)}catch(B){i.l.error("error while drawing message",B)}}[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT].includes(r.type)&&(E+=C),S++}i.l.debug("createdActors",d),i.l.debug("destroyedActors",g),await Nt(h,f,b,!1);for(const i of A)await Dt(h,i.messageModel,i.lineStartY,a);At.mirrorActors&&await Nt(h,f,b,!0),_.forEach((t=>Ct.drawBackgroundRect(h,t))),at(h,f,b,At);for(const i of _t.models.boxes)i.height=_t.getVerticalPos()-i.y,_t.insert(i.x,i.y,i.x+i.width,i.height),i.startx=i.x,i.starty=i.y,i.stopx=i.startx+i.width,i.stopy=i.starty+i.height,i.stroke="rgb(0,0,0, 0.5)",await Ct.drawBox(h,i,At);m&&_t.bumpVerticalPos(At.boxMargin);const L=Bt(h,f,b,u),{bounds:M}=_t.getBounds();let I=M.stopy-M.starty;I<L.maxHeight&&(I=L.maxHeight);let O=I+2*At.diagramMarginY;At.mirrorActors&&(O=O-At.boxMargin+At.bottomMarginAdj);let D=M.stopx-M.startx;D<L.maxWidth&&(D=L.maxWidth);const P=D+2*At.diagramMarginX;y&&h.append("text").text(y).attr("x",(M.stopx-M.startx)/2-2*At.diagramMarginX).attr("y",-25),(0,i.i)(h,O,P,At.useMaxWidth);const N=y?40:0;h.attr("viewBox",M.startx-At.diagramMarginX+" -"+(At.diagramMarginY+N)+" "+P+" "+(O+N)),i.l.debug("models:",_t.models)};async function Ut(t,e,n){const r={};for(const a of e)if(t[a.to]&&t[a.from]){const e=t[a.to];if(a.placement===n.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(a.placement===n.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const o=void 0!==a.placement,s=!o,c=o?Mt(At):Lt(At),l=a.wrap?i.u.wrapLabel(a.message,At.width-2*At.wrapPadding,c):a.message,u=(0,i.G)(l)?await(0,i.H)(a.message,(0,i.c)()):i.u.calculateTextDimensions(l,c),h=u.width+2*At.wrapPadding;s&&a.from===e.nextActor?r[a.to]=i.e.getMax(r[a.to]||0,h):s&&a.from===e.prevActor?r[a.from]=i.e.getMax(r[a.from]||0,h):s&&a.from===a.to?(r[a.from]=i.e.getMax(r[a.from]||0,h/2),r[a.to]=i.e.getMax(r[a.to]||0,h/2)):a.placement===n.db.PLACEMENT.RIGHTOF?r[a.from]=i.e.getMax(r[a.from]||0,h):a.placement===n.db.PLACEMENT.LEFTOF?r[e.prevActor]=i.e.getMax(r[e.prevActor]||0,h):a.placement===n.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=i.e.getMax(r[e.prevActor]||0,h/2)),e.nextActor&&(r[a.from]=i.e.getMax(r[a.from]||0,h/2)))}return i.l.debug("maxMessageWidthPerActor:",r),r}const Ht=function(t){let e=0;const n=It(At);for(const r in t.links){const t=i.u.calculateTextDimensions(r,n),a=t.width+2*At.wrapPadding+2*At.boxMargin;e<a&&(e=a)}return e};async function Kt(t,e,n){let r=0;for(const o of Object.keys(t)){const e=t[o];e.wrap&&(e.description=i.u.wrapLabel(e.description,At.width-2*At.wrapPadding,It(At)));const n=(0,i.G)(e.description)?await(0,i.H)(e.description,(0,i.c)()):i.u.calculateTextDimensions(e.description,It(At));e.width=e.wrap?At.width:i.e.getMax(At.width,n.width+2*At.wrapPadding),e.height=e.wrap?i.e.getMax(n.height,At.height):At.height,r=i.e.getMax(r,e.height)}for(const o in e){const n=t[o];if(!n)continue;const r=t[n.nextActor];if(!r){const t=e[o],r=t+At.actorMargin-n.width/2;n.margin=i.e.getMax(r,At.actorMargin);continue}const a=e[o],s=a+At.actorMargin-n.width/2-r.width/2;n.margin=i.e.getMax(s,At.actorMargin)}let a=0;return n.forEach((e=>{const n=Lt(At);let r=e.actorKeys.reduce(((e,n)=>e+(t[n].width+(t[n].margin||0))),0);r-=2*At.boxTextMargin,e.wrap&&(e.name=i.u.wrapLabel(e.name,r-2*At.wrapPadding,n));const o=i.u.calculateTextDimensions(e.name,n);a=i.e.getMax(o.height,a);const s=i.e.getMax(r,o.width+2*At.wrapPadding);if(e.margin=At.boxTextMargin,r<s){const t=(s-r)/2;e.margin+=t}})),n.forEach((t=>t.textMaxHeight=a)),i.e.getMax(r,At.height)}const Gt=async function(t,e,n){const r=e[t.from].x,a=e[t.to].x,o=t.wrap&&t.message;let s=(0,i.G)(t.message)?await(0,i.H)(t.message,(0,i.c)()):i.u.calculateTextDimensions(o?i.u.wrapLabel(t.message,At.width,Mt(At)):t.message,Mt(At));const c={width:o?At.width:i.e.getMax(At.width,s.width+2*At.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(c.width=o?i.e.getMax(At.width,s.width):i.e.getMax(e[t.from].width/2+e[t.to].width/2,s.width+2*At.noteMargin),c.startx=r+(e[t.from].width+At.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(c.width=o?i.e.getMax(At.width,s.width+2*At.noteMargin):i.e.getMax(e[t.from].width/2+e[t.to].width/2,s.width+2*At.noteMargin),c.startx=r-c.width+(e[t.from].width-At.actorMargin)/2):t.to===t.from?(s=i.u.calculateTextDimensions(o?i.u.wrapLabel(t.message,i.e.getMax(At.width,e[t.from].width),Mt(At)):t.message,Mt(At)),c.width=o?i.e.getMax(At.width,e[t.from].width):i.e.getMax(e[t.from].width,At.width,s.width+2*At.noteMargin),c.startx=r+(e[t.from].width-c.width)/2):(c.width=Math.abs(r+e[t.from].width/2-(a+e[t.to].width/2))+At.actorMargin,c.startx=r<a?r+e[t.from].width/2-At.actorMargin/2:a+e[t.to].width/2-At.actorMargin/2),o&&(c.message=i.u.wrapLabel(t.message,c.width-2*At.wrapPadding,Mt(At))),i.l.debug(`NM:[${c.startx},${c.stopx},${c.starty},${c.stopy}:${c.width},${c.height}=${t.message}]`),c},Wt=function(t,e,n){if(![n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(t.type))return{};const[r,a]=$t(t.from,e),[o,s]=$t(t.to,e),c=r<=o,l=c?a:r;let u=c?o:s;const h=Math.abs(o-s)>2,f=t=>c?-t:t;t.from===t.to?u=l:(t.activate&&!h&&(u+=f(At.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(u+=f(3)));const d=[r,a,o,s],g=Math.abs(l-u);t.wrap&&t.message&&(t.message=i.u.wrapLabel(t.message,i.e.getMax(g+2*At.wrapPadding,At.width),Lt(At)));const p=i.u.calculateTextDimensions(t.message,Lt(At));return{width:i.e.getMax(t.wrap?0:p.width+2*At.wrapPadding,g+2*At.wrapPadding,At.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,d),toBounds:Math.max.apply(null,d)}},Vt=async function(t,e,n,r){const a={},o=[];let s,c,l;for(const u of t){switch(u.id=i.u.random({length:10}),u.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=o.pop(),a[s.id]=s,a[u.id]=s,o.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const t=e[u.from?u.from.actor:u.to.actor],n=Ft(u.from?u.from.actor:u.to.actor).length,i=t.x+t.width/2+(n-1)*At.activationWidth/2,r={startx:i,stopx:i+At.activationWidth,actor:u.from.actor,enabled:!0};_t.activations.push(r)}break;case r.db.LINETYPE.ACTIVE_END:{const t=_t.activations.map((t=>t.actor)).lastIndexOf(u.from.actor);delete _t.activations.splice(t,1)[0]}break}const t=void 0!==u.placement;t?(c=await Gt(u,e,r),u.noteModel=c,o.forEach((t=>{s=t,s.from=i.e.getMin(s.from,c.startx),s.to=i.e.getMax(s.to,c.startx+c.width),s.width=i.e.getMax(s.width,Math.abs(s.from-s.to))-At.labelBoxWidth}))):(l=Wt(u,e,r),u.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach((t=>{if(s=t,l.startx===l.stopx){const t=e[u.from],n=e[u.to];s.from=i.e.getMin(t.x-l.width/2,t.x-t.width/2,s.from),s.to=i.e.getMax(n.x+l.width/2,n.x+t.width/2,s.to),s.width=i.e.getMax(s.width,Math.abs(s.to-s.from))-At.labelBoxWidth}else s.from=i.e.getMin(l.startx,s.from),s.to=i.e.getMax(l.stopx,s.to),s.width=i.e.getMax(s.width,l.width)-At.labelBoxWidth})))}return _t.activations=[],i.l.debug("Loop type widths:",a),a},Yt={bounds:_t,drawActors:Nt,drawActorsPopup:Bt,setConf:Rt,draw:qt},Xt={parser:c,db:G,renderer:Yt,styles:V,init:({wrap:t})=>{G.setWrap(t)}}},97873:function(t,e,n){"use strict";n.d(e,{diagram:function(){return P}});var i=n(18480),r=n(30756),a=n(72724),o=n(697),s=n(56737);n(74353),n(16750),n(99418);const c={},l=(t,e)=>{c[t]=e},u=t=>c[t],h=()=>Object.keys(c),f=()=>h().length,d={get:u,set:l,keys:h,size:f},g=t=>t.append("circle").attr("class","start-state").attr("r",(0,s.c)().state.sizeUnit).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit),p=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,s.c)().state.textHeight).attr("class","divider").attr("x2",2*(0,s.c)().state.textHeight).attr("y1",0).attr("y2",0),b=(t,e)=>{const n=t.append("text").attr("x",2*(0,s.c)().state.padding).attr("y",(0,s.c)().state.textHeight+2*(0,s.c)().state.padding).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.id),i=n.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding).attr("width",i.width+2*(0,s.c)().state.padding).attr("height",i.height+2*(0,s.c)().state.padding).attr("rx",(0,s.c)().state.radius),n},w=(t,e)=>{const n=function(t,e,n){const i=t.append("tspan").attr("x",2*(0,s.c)().state.padding).text(e);n||i.attr("dy",(0,s.c)().state.textHeight)},i=t.append("text").attr("x",2*(0,s.c)().state.padding).attr("y",(0,s.c)().state.textHeight+1.3*(0,s.c)().state.padding).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.descriptions[0]),r=i.node().getBBox(),a=r.height,o=t.append("text").attr("x",(0,s.c)().state.padding).attr("y",a+.4*(0,s.c)().state.padding+(0,s.c)().state.dividerMargin+(0,s.c)().state.textHeight).attr("class","state-description");let c=!0,l=!0;e.descriptions.forEach((function(t){c||(n(o,t,l),l=!1),c=!1}));const u=t.append("line").attr("x1",(0,s.c)().state.padding).attr("y1",(0,s.c)().state.padding+a+(0,s.c)().state.dividerMargin/2).attr("y2",(0,s.c)().state.padding+a+(0,s.c)().state.dividerMargin/2).attr("class","descr-divider"),h=o.node().getBBox(),f=Math.max(h.width,r.width);return u.attr("x2",f+3*(0,s.c)().state.padding),t.insert("rect",":first-child").attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding).attr("width",f+2*(0,s.c)().state.padding).attr("height",h.height+a+2*(0,s.c)().state.padding).attr("rx",(0,s.c)().state.radius),t},y=(t,e,n)=>{const i=(0,s.c)().state.padding,r=2*(0,s.c)().state.padding,a=t.node().getBBox(),o=a.width,c=a.x,l=t.append("text").attr("x",0).attr("y",(0,s.c)().state.titleShift).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.id),u=l.node().getBBox(),h=u.width+r;let f,d=Math.max(h,o);d===o&&(d+=r);const g=t.node().getBBox();e.doc,f=c-i,h>o&&(f=(o-d)/2+i),Math.abs(c-g.x)<i&&h>o&&(f=c-(h-o)/2);const p=1-(0,s.c)().state.textHeight;return t.insert("rect",":first-child").attr("x",f).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",d).attr("height",g.height+(0,s.c)().state.textHeight+(0,s.c)().state.titleShift+1).attr("rx","0"),l.attr("x",f+i),h<=o&&l.attr("x",c+(d-r)/2-h/2+i),t.insert("rect",":first-child").attr("x",f).attr("y",(0,s.c)().state.titleShift-(0,s.c)().state.textHeight-(0,s.c)().state.padding).attr("width",d).attr("height",3*(0,s.c)().state.textHeight).attr("rx",(0,s.c)().state.radius),t.insert("rect",":first-child").attr("x",f).attr("y",(0,s.c)().state.titleShift-(0,s.c)().state.textHeight-(0,s.c)().state.padding).attr("width",d).attr("height",g.height+3+2*(0,s.c)().state.textHeight).attr("rx",(0,s.c)().state.radius),t},m=t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,s.c)().state.sizeUnit).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+2).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+2)),v=(t,e)=>{let n=(0,s.c)().state.forkWidth,i=(0,s.c)().state.forkHeight;if(e.parentId){let t=n;n=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",i).attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding)},x=(t,e,n,i)=>{let r=0;const a=i.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const c=o.split(s.e.lineBreakRegex);let l=1.25*(0,s.c)().state.noteMargin;for(const u of c){const t=u.trim();if(t.length>0){const i=a.append("tspan");if(i.text(t),0===l){const t=i.node().getBBox();l+=t.height}r+=l,i.attr("x",e+(0,s.c)().state.noteMargin),i.attr("y",n+r+1.25*(0,s.c)().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:r}},k=(t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",(0,s.c)().state.padding),i=e.append("g"),{textWidth:r,textHeight:a}=x(t,0,0,i);return n.attr("height",a+2*(0,s.c)().state.noteMargin),n.attr("width",r+2*(0,s.c)().state.noteMargin),n},T=function(t,e){const n=e.id,i={id:n,label:e.id,width:0,height:0},r=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&g(r),"end"===e.type&&m(r),"fork"!==e.type&&"join"!==e.type||v(r,e),"note"===e.type&&k(e.note.text,r),"divider"===e.type&&p(r),"default"===e.type&&0===e.descriptions.length&&b(r,e),"default"===e.type&&e.descriptions.length>0&&w(r,e);const a=r.node().getBBox();return i.width=a.width+2*(0,s.c)().state.padding,i.height=a.height+2*(0,s.c)().state.padding,d.set(n,i),i};let E=0;const C=function(t,e,n){const a=function(t){switch(t){case i.d.relationType.AGGREGATION:return"aggregation";case i.d.relationType.EXTENSION:return"extension";case i.d.relationType.COMPOSITION:return"composition";case i.d.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,c=(0,r.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.qrM),l=t.append("path").attr("d",c(o)).attr("id","edge"+E).attr("class","transition");let u="";if((0,s.c)().state.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),l.attr("marker-end","url("+u+"#"+a(i.d.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const i=t.append("g").attr("class","stateLabel"),{x:r,y:a}=s.u.calcLabelPosition(e.points),o=s.e.getRows(n.title);let c=0;const l=[];let u=0,h=0;for(let t=0;t<=o.length;t++){const e=i.append("text").attr("text-anchor","middle").text(o[t]).attr("x",r).attr("y",a+c),n=e.node().getBBox();if(u=Math.max(u,n.width),h=Math.min(h,n.x),s.l.info(n.x,r,a+c),0===c){const t=e.node().getBBox();c=t.height,s.l.info("Title height",c,a)}l.push(e)}let f=c*o.length;if(o.length>1){const t=(o.length-1)*c*.5;l.forEach(((e,n)=>e.attr("y",a+n*c-t))),f=c*o.length}const d=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-u/2-(0,s.c)().state.padding/2).attr("y",a-f/2-(0,s.c)().state.padding/2-3.5).attr("width",u+(0,s.c)().state.padding).attr("height",f+(0,s.c)().state.padding),s.l.info(d)}E++};let A;const _={},S=function(){},L=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")},M=function(t,e,n,i){A=(0,s.c)().state;const a=(0,s.c)().securityLevel;let o;"sandbox"===a&&(o=(0,r.Ltv)("#i"+e));const c="sandbox"===a?(0,r.Ltv)(o.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),l="sandbox"===a?o.nodes()[0].contentDocument:document;s.l.debug("Rendering diagram "+t);const u=c.select(`[id='${e}']`);L(u);const h=i.db.getRootDoc();O(h,u,void 0,!1,c,l,i);const f=A.padding,d=u.node().getBBox(),g=d.width+2*f,p=d.height+2*f,b=1.75*g;(0,s.i)(u,p,b,A.useMaxWidth),u.attr("viewBox",`${d.x-A.padding}  ${d.y-A.padding} `+g+" "+p)},I=t=>t?t.length*A.fontSizeFactor:1,O=(t,e,n,i,r,c,l)=>{const u=new o.T({compound:!0,multigraph:!0});let h,f=!0;for(h=0;h<t.length;h++)if("relation"===t[h].stmt){f=!1;break}n?u.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:f?1:A.edgeLengthFactor,nodeSep:f?1:50,isMultiGraph:!0}):u.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:f?1:A.edgeLengthFactor,nodeSep:f?1:50,ranker:"tight-tree",isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}})),l.db.extract(t);const d=l.db.getStates(),g=l.db.getRelations(),p=Object.keys(d);for(const a of p){const t=d[a];let o;if(n&&(t.parentId=n),t.doc){let n=e.append("g").attr("id",t.id).attr("class","stateGroup");o=O(t.doc,n,t.id,!i,r,c,l);{n=y(n,t,i);let e=n.node().getBBox();o.width=e.width,o.height=e.height+A.padding/2,_[t.id]={y:A.compositTitleSize}}}else o=T(e,t);if(t.note){const n={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=T(e,n);"left of"===t.note.position?(u.setNode(o.id+"-note",i),u.setNode(o.id,o)):(u.setNode(o.id,o),u.setNode(o.id+"-note",i)),u.setParent(o.id,o.id+"-group"),u.setParent(o.id+"-note",o.id+"-group")}else u.setNode(o.id,o)}s.l.debug("Count=",u.nodeCount(),u);let b=0;g.forEach((function(t){b++,s.l.debug("Setting edge",t),u.setEdge(t.id1,t.id2,{relation:t,width:I(t.title),height:A.labelHeight*s.e.getRows(t.title).length,labelpos:"c"},"id"+b)})),(0,a.Zp)(u),s.l.debug("Graph after layout",u.nodes());const w=e.node();u.nodes().forEach((function(t){if(void 0!==t&&void 0!==u.node(t)){s.l.warn("Node "+t+": "+JSON.stringify(u.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y+(_[t]?_[t].y:0)-u.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",u.node(t).x-u.node(t).width/2);const e=c.querySelectorAll("#"+w.id+" #"+t+" .divider");e.forEach((t=>{const e=t.parentElement;let n=0,i=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",n-i-8)}))}else s.l.debug("No Node "+t+": "+JSON.stringify(u.node(t)))}));let m=w.getBBox();u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(s.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),C(e,u.edge(t),u.edge(t).relation))})),m=w.getBBox();const v={id:n||"root",label:n||"root",width:0,height:0};return v.width=m.width+2*A.padding,v.height=m.height+2*A.padding,s.l.debug("Doc rendered",v,u),v},D={setConf:S,draw:M},P={parser:i.p,db:i.d,renderer:D,styles:i.s,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,i.d.clear()}}},88478:function(t,e,n){"use strict";n.d(e,{diagram:function(){return X}});var i=n(18480),r=n(697),a=n(30756),o=n(56737),s=n(37082);n(74353),n(16750),n(99418),n(72724),n(14075);const c="rect",l="rectWithTitle",u="start",h="end",f="divider",d="roundedWithTitle",g="note",p="noteGroup",b="statediagram",w="state",y=`${b}-${w}`,m="transition",v="note",x="note-edge",k=`${m} ${x}`,T=`${b}-${v}`,E="cluster",C=`${b}-${E}`,A="cluster-alt",_=`${b}-${A}`,S="parent",L="note",M="state",I="----",O=`${I}${L}`,D=`${I}${S}`,P="fill:none",N="fill: #333",B="c",R="text",F="normal";let $={},j=0;const z=function(t){const e=Object.keys(t);for(const n of e)t[n]},q=function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()};function U(t){return void 0===t||null===t?"":t.classes?t.classes.join(" "):""}function H(t="",e=0,n="",i=I){const r=null!==n&&n.length>0?`${i}${n}`:"";return`${M}-${t}${r}-${e}`}const K=(t,e,n,r,a,s)=>{const b=n.id,w=U(r[b]);if("root"!==b){let e=c;!0===n.start&&(e=u),!1===n.start&&(e=h),n.type!==i.D&&(e=n.type),$[b]||($[b]={id:b,shape:e,description:o.e.sanitizeText(b,(0,o.c)()),classes:`${w} ${y}`});const r=$[b];n.description&&(Array.isArray(r.description)?(r.shape=l,r.description.push(n.description)):r.description.length>0?(r.shape=l,r.description===b?r.description=[n.description]:r.description=[r.description,n.description]):(r.shape=c,r.description=n.description),r.description=o.e.sanitizeTextOrArray(r.description,(0,o.c)())),1===r.description.length&&r.shape===l&&(r.shape=c),!r.type&&n.doc&&(o.l.info("Setting cluster for ",b,W(n)),r.type="group",r.dir=W(n),r.shape=n.type===i.a?f:d,r.classes=r.classes+" "+C+" "+(s?_:""));const a={labelStyle:"",shape:r.shape,labelText:r.description,classes:r.classes,style:"",id:b,dir:r.dir,domId:H(b,j),type:r.type,padding:15,centerLabel:!0};if(n.note){const e={labelStyle:"",shape:g,labelText:n.note.text,classes:T,style:"",id:b+O+"-"+j,domId:H(b,j,L),type:r.type,padding:15},i={labelStyle:"",shape:p,labelText:n.note.text,classes:r.classes,style:"",id:b+D,domId:H(b,j,S),type:"group",padding:0};j++;const o=b+D;t.setNode(o,i),t.setNode(e.id,e),t.setNode(b,a),t.setParent(b,o),t.setParent(e.id,o);let s=b,c=e.id;"left of"===n.note.position&&(s=e.id,c=b),t.setEdge(s,c,{arrowhead:"none",arrowType:"",style:P,labelStyle:"",classes:k,arrowheadStyle:N,labelpos:B,labelType:R,thickness:F})}else t.setNode(b,a)}e&&"root"!==e.id&&(o.l.trace("Setting node ",b," to be child of its parent ",e.id),t.setParent(b,e.id)),n.doc&&(o.l.trace("Adding nodes children "),G(t,n,n.doc,r,a,!s))},G=(t,e,n,r,a,s)=>{o.l.trace("items",n),n.forEach((n=>{switch(n.stmt){case i.b:K(t,e,n,r,a,s);break;case i.D:K(t,e,n,r,a,s);break;case i.S:{K(t,e,n.state1,r,a,s),K(t,e,n.state2,r,a,s);const i={id:"edge"+j,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:P,labelStyle:"",label:o.e.sanitizeText(n.description,(0,o.c)()),arrowheadStyle:N,labelpos:B,labelType:R,thickness:F,classes:m};t.setEdge(n.state1.id,n.state2.id,i,j),j++}break}}))},W=(t,e=i.c)=>{let n=e;if(t.doc)for(let i=0;i<t.doc.length;i++){const e=t.doc[i];"dir"===e.stmt&&(n=e.value)}return n},V=async function(t,e,n,i){o.l.info("Drawing state diagram (v2)",e),$={},i.db.getDirection();const{securityLevel:l,state:u}=(0,o.c)(),h=u.nodeSpacing||50,f=u.rankSpacing||50;o.l.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),o.l.info(i.db.getRootDocV2());const d=i.db.getStates(),g=new r.T({multigraph:!0,compound:!0}).setGraph({rankdir:W(i.db.getRootDocV2()),nodesep:h,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));let p;K(g,void 0,i.db.getRootDocV2(),d,i.db,!0),"sandbox"===l&&(p=(0,a.Ltv)("#i"+e));const w="sandbox"===l?(0,a.Ltv)(p.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),y=w.select(`[id="${e}"]`),m=w.select("#"+e+" g");await(0,s.r)(m,g,["barb"],b,e);const v=8;o.u.insertTitle(y,"statediagramTitleText",u.titleTopMargin,i.db.getDiagramTitle());const x=y.node().getBBox(),k=x.width+2*v,T=x.height+2*v;y.attr("class",b);const E=y.node().getBBox();(0,o.i)(y,T,k,u.useMaxWidth);const C=`${E.x-v} ${E.y-v} ${k} ${T}`;o.l.debug(`viewBox ${C}`),y.attr("viewBox",C);const A=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const r of A){const t=r.getBBox(),e=document.createElementNS("http://www.w3.org/2000/svg",c);e.setAttribute("rx",0),e.setAttribute("ry",0),e.setAttribute("width",t.width),e.setAttribute("height",t.height),r.insertBefore(e,r.firstChild)}},Y={setConf:z,getClasses:q,draw:V},X={parser:i.p,db:i.d,renderer:Y,styles:i.s,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,i.d.clear()}}},18480:function(t,e,n){"use strict";n.d(e,{D:function(){return f},S:function(){return l},a:function(){return d},b:function(){return c},c:function(){return s},d:function(){return ct},p:function(){return a},s:function(){return ut}});var i=n(56737),r=function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[1,2],n=[1,3],i=[1,4],r=[2,4],a=[1,9],o=[1,11],s=[1,15],c=[1,16],l=[1,17],u=[1,18],h=[1,30],f=[1,19],d=[1,20],g=[1,21],p=[1,22],b=[1,23],w=[1,25],y=[1,26],m=[1,27],v=[1,28],x=[1,29],k=[1,32],T=[1,33],E=[1,34],C=[1,35],A=[1,31],_=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],S=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],L=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],M={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"--\x3e":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",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",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"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,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],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(t,e,n,i,r,a,o){var s=a.length-1;switch(r){case 3:return i.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$="nl";break;case 11:this.$=a[s];break;case 12:const t=a[s-1];t.description=i.trimColon(a[s]),this.$=t;break;case 13:this.$={stmt:"relation",state1:a[s-2],state2:a[s]};break;case 14:const e=i.trimColon(a[s]);this.$={stmt:"relation",state1:a[s-3],state2:a[s-1],description:e};break;case 18:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 19:var c=a[s],l=a[s-2].trim();if(a[s].match(":")){var u=a[s].split(":");c=u[0],l=[l,u[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 20:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 21:this.$={stmt:"state",id:a[s],type:"fork"};break;case 22:this.$={stmt:"state",id:a[s],type:"join"};break;case 23:this.$={stmt:"state",id:a[s],type:"choice"};break;case 24:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 28:this.$=a[s].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),i.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:a[s-1].trim(),classes:a[s].trim()};break;case 33:this.$={stmt:"applyClass",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 34:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:a[s].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:a[s-2].trim(),classes:[a[s].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:a[s-2].trim(),classes:[a[s].trim()],type:"default",description:""};break}},table:[{3:1,4:e,5:n,6:i},{1:[3]},{3:5,4:e,5:n,6:i},{3:6,4:e,5:n,6:i},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,15:s,16:c,18:l,21:u,23:h,24:f,25:d,26:g,27:p,28:b,31:24,32:w,34:y,36:m,37:v,41:x,44:k,45:T,46:E,47:C,50:A},t(_,[2,5]),{9:36,10:12,11:13,12:14,15:s,16:c,18:l,21:u,23:h,24:f,25:d,26:g,27:p,28:b,31:24,32:w,34:y,36:m,37:v,41:x,44:k,45:T,46:E,47:C,50:A},t(_,[2,7]),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(_,[2,11],{13:[1,37],14:[1,38]}),t(_,[2,15]),{17:[1,39]},t(_,[2,17],{19:[1,40]}),{22:[1,41]},t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(_,[2,27]),{33:[1,46]},{35:[1,47]},t(_,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(S,[2,40],{51:[1,51]}),t(S,[2,41],{51:[1,52]}),t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(_,[2,6]),t(_,[2,12]),{12:53,23:h,50:A},t(_,[2,16]),t(L,r,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(_,[2,28]),t(_,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(_,[2,13],{13:[1,63]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,15:s,16:c,18:l,20:[1,64],21:u,23:h,24:f,25:d,26:g,27:p,28:b,31:24,32:w,34:y,36:m,37:v,41:x,44:k,45:T,46:E,47:C,50:A},t(_,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(_,[2,31]),t(_,[2,32]),t(_,[2,33]),t(S,[2,42]),t(S,[2,43]),t(_,[2,14]),t(_,[2,18]),t(L,r,{7:68}),t(_,[2,25]),t(_,[2,26]),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,15:s,16:c,18:l,20:[1,69],21:u,23:h,24:f,25:d,26:g,27:p,28:b,31:24,32:w,34:y,36:m,37:v,41:x,44:k,45:T,46:E,47:C,50:A},t(_,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,f=a.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(t,g.yy),g.yy.lexer=d,g.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var b=d.yylloc;a.push(b);var w=d.options&&d.options.ranges;function y(){var t;return t=i.pop()||d.lex()||h,"number"!==typeof t&&(t instanceof Array&&(i=t,t=i.pop()),t=e.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;var m,v,x,k,T,E,C,A,_={};while(1){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null!==m&&"undefined"!=typeof m||(m=y()),x=o[v]&&o[v][m]),"undefined"===typeof x||!x.length||!x[0]){var S="";for(T in A=[],o[v])this.terminals_[T]&&T>u&&A.push("'"+this.terminals_[T]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(m==h?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:b,expected:A})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(x[0]){case 1:n.push(m),r.push(d.yytext),a.push(d.yylloc),n.push(x[1]),m=null,l=d.yyleng,s=d.yytext,c=d.yylineno,b=d.yylloc;break;case 2:if(E=this.productions_[x[1]][1],_.$=r[r.length-E],_._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},w&&(_._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(_,[s,l,c,g.yy,x[1],r,a].concat(f)),"undefined"!==typeof k)return k;E&&(n=n.slice(0,-1*E*2),r=r.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),r.push(_.$),a.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},I=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=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),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),i=t[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+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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a<r.length;a++)if(n=this._input.match(this.rules[r[a]]),n&&(!e||n[0].length>e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(t=this.test_match(n,r[a]),!1!==t)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,r[i]),!1!==t&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return 40;case 1:return 44;case 2:return 45;case 3:return 46;case 4:return 47;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),16;case 13:return 17;case 14:this.popState();break;case 15:return this.begin("acc_title"),32;ca
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|M男之家

GMT+8, 2026-11-13 00:28 , Processed in 0.049893 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表