@marimo-team/frontend 0.12.9-dev19 → 0.12.9-dev21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-B3EGe3J7.js → ConnectedDataExplorerComponent-B191HGGz.js} +1 -1
  2. package/dist/assets/VegaLite-CGPTuZm8.js +11 -0
  3. package/dist/assets/{_baseEach-BLu58TpK.js → _baseEach-DlpS-WrN.js} +1 -1
  4. package/dist/assets/_baseMap-D7MvHS12.js +1 -0
  5. package/dist/assets/_baseUniq-BcJ9YZpb.js +1 -0
  6. package/dist/assets/{any-language-editor-B9rOPYPE.js → any-language-editor-BSBsWFxN.js} +1 -1
  7. package/dist/assets/{arc-B5qYPUYs.js → arc-cUKDg37C.js} +1 -1
  8. package/dist/assets/architectureDiagram-IEHRJDOE-CI6g0CKR.js +1 -0
  9. package/dist/assets/blockDiagram-JOT3LUYC-Bggthd-f.js +1 -0
  10. package/dist/assets/c4Diagram-VJAJSXHY-PNGc3wkf.js +1 -0
  11. package/dist/assets/channel-ulJNqs9o.js +1 -0
  12. package/dist/assets/{chart-spec-C0kzZLp0.js → chart-spec-BNhKJote.js} +1 -1
  13. package/dist/assets/{chunk-4BMEZGHF-BiuHmakw.js → chunk-4BMEZGHF-D7SKFMJ1.js} +1 -1
  14. package/dist/assets/{chunk-A2AXSNBT-Bcf0SaXI.js → chunk-A2AXSNBT-BV5UmCCD.js} +1 -1
  15. package/dist/assets/{chunk-AEK57VVT-CFa_0aNx.js → chunk-AEK57VVT-B1_20kr6.js} +1 -1
  16. package/dist/assets/{chunk-D6G4REZN-Q6ZzHVis.js → chunk-D6G4REZN-DfUuspQK.js} +1 -1
  17. package/dist/assets/{chunk-RZ5BOZE2-Djj4U8sI.js → chunk-RZ5BOZE2-BKeKV9Yg.js} +1 -1
  18. package/dist/assets/{chunk-XZIHB7SX-Cdpy_Cfu.js → chunk-XZIHB7SX-Fnv__-wk.js} +1 -1
  19. package/dist/assets/circle-play-b29_CgIh.js +7 -0
  20. package/dist/assets/classDiagram-GIVACNV2-BarjTkYU.js +1 -0
  21. package/dist/assets/classDiagram-v2-COTLJTTW-BarjTkYU.js +1 -0
  22. package/dist/assets/clone-EBNMYT_U.js +1 -0
  23. package/dist/assets/compile-CjDDBz06.js +1 -0
  24. package/dist/assets/dagre-OKDRZEBW-CLvKz_qH.js +1 -0
  25. package/dist/assets/{data-editor-CpGf0n9O.js → data-editor-efTvcVjg.js} +1 -1
  26. package/dist/assets/diagram-SSKATNLV-WGgEVNVJ.js +1 -0
  27. package/dist/assets/diagram-VNBRO52H-BeYlKxGc.js +1 -0
  28. package/dist/assets/edit-page-gwC5o-r0.js +8 -0
  29. package/dist/assets/erDiagram-Q7BY3M3F-C670KnJ4.js +1 -0
  30. package/dist/assets/flowDiagram-4HSFHLVR-B18AXW0m.js +1 -0
  31. package/dist/assets/ganttDiagram-APWFNJXF-B831VkZm.js +1 -0
  32. package/dist/assets/gitGraphDiagram-7IBYFJ6S-CCz7Aqo7.js +1 -0
  33. package/dist/assets/{graph-BcYKg7pg.js → graph-DwVqkZok.js} +1 -1
  34. package/dist/assets/{home-page-nIUiVNCT.js → home-page-Dz3brA23.js} +2 -2
  35. package/dist/assets/{index-DjngPZbO.js → index-B-n2pVie.js} +1 -1
  36. package/dist/assets/index-B6ITZO6j.js +1 -0
  37. package/dist/assets/{index-QV1pM6V_.js → index-BByXE7o-.js} +4 -4
  38. package/dist/assets/{index-YjdcYS-W.js → index-Bm6xzdGF.js} +1 -1
  39. package/dist/assets/{index-C-K9DKwk.js → index-BwCEkOAi.js} +1 -1
  40. package/dist/assets/{index-CL7YXglf.js → index-CJzh4HrJ.js} +1 -1
  41. package/dist/assets/{index-DAw1AjBa.js → index-CQA_XCsI.js} +1 -1
  42. package/dist/assets/{index-_3GL5h1l.js → index-CkHg9kyA.js} +1 -1
  43. package/dist/assets/{index-xIkdt3qu.js → index-CsqRF1m8.js} +1 -1
  44. package/dist/assets/{index-BEUyRhH6.js → index-CuF4FnZ1.js} +1 -1
  45. package/dist/assets/{index-CMkaK8j3.js → index-D-6Kr2cw.js} +1 -1
  46. package/dist/assets/{index-DnUjB-_u.js → index-DXtofrS7.js} +1 -1
  47. package/dist/assets/{index-BMoKnSBv.js → index-DZKYx8U2.js} +1 -1
  48. package/dist/assets/{index-DCbocATP.js → index-D_g5F5hC.js} +1 -1
  49. package/dist/assets/{index-C95fxStd.js → index-dSqegs-o.js} +1 -1
  50. package/dist/assets/{index-piyT1ib6.js → index-eyMGFTC5.js} +1 -1
  51. package/dist/assets/{index-Bkwg-3Fb.js → index-uR40bDrI.js} +1 -1
  52. package/dist/assets/infoDiagram-PH2N3AL5-C1S52K4b.js +1 -0
  53. package/dist/assets/journeyDiagram-U35MCT3I-HFskJQK3.js +1 -0
  54. package/dist/assets/kanban-definition-NDS4AKOZ-DewmnCGw.js +1 -0
  55. package/dist/assets/{layout-162YDsiA.js → layout-BMFrITX8.js} +1 -1
  56. package/dist/assets/linear-xO0ooyuf.js +1 -0
  57. package/dist/assets/mermaid-C9RzdJLD.js +7 -0
  58. package/dist/assets/min-C6bmNa9O.js +1 -0
  59. package/dist/assets/mindmap-definition-ALO5MXBD-DRjqKp6F.js +1 -0
  60. package/dist/assets/pieDiagram-IB7DONF6-BxEBQ6MB.js +1 -0
  61. package/dist/assets/quadrantDiagram-7GDLP6J5-BzywN9U8.js +1 -0
  62. package/dist/assets/{radar-MK3ICKWK-DZtMJyk-.js → radar-MK3ICKWK-CD07te9f.js} +1 -1
  63. package/dist/assets/{react-plotly-KdZbKIdl.js → react-plotly-C4noI9OY.js} +1 -1
  64. package/dist/assets/requirementDiagram-KVF5MWMF-Bt4IBv9z.js +1 -0
  65. package/dist/assets/run-page-DxBt3NGx.js +1 -0
  66. package/dist/assets/sankeyDiagram-QLVOVGJD-olvnQKcC.js +1 -0
  67. package/dist/assets/sequenceDiagram-X6HHIX6F-BG-o81pS.js +1 -0
  68. package/dist/assets/{slides-component-Dwng0ybG.js → slides-component-BXnuKabl.js} +1 -1
  69. package/dist/assets/sortBy-DfNIFBIy.js +1 -0
  70. package/dist/assets/stateDiagram-DGXRK772-DNMTptZP.js +1 -0
  71. package/dist/assets/stateDiagram-v2-YXO3MK2T-CPrzCO8n.js +1 -0
  72. package/dist/assets/step-5BjdtTEt.js +1 -0
  73. package/dist/assets/{terminal-BzjaEUjW.js → terminal-BD7YO0CH.js} +1 -1
  74. package/dist/assets/time-os0SVE4b.js +1 -0
  75. package/dist/assets/timeline-definition-BDJGKUSR-BhPo8zNN.js +1 -0
  76. package/dist/assets/timer-DFzT7np-.js +1 -0
  77. package/dist/assets/tracing-a0BMXzgo.js +8 -0
  78. package/dist/assets/transform-DjHZbYKP.js +1 -0
  79. package/dist/assets/tree-BUgsinvP.js +8 -0
  80. package/dist/assets/{useMarimoWebSocket-c24mYV70.js → useMarimoWebSocket-BtHu1OXm.js} +4 -4
  81. package/dist/assets/vega-component-TS37cPmp.js +1 -0
  82. package/dist/assets/xychartDiagram-VJFVF3MP-Oq6axxRl.js +1 -0
  83. package/dist/assets/zoom-COrs4lFh.js +1 -0
  84. package/dist/index.html +1 -1
  85. package/package.json +1 -1
  86. package/dist/assets/VegaLite-C4jc3DbR.js +0 -11
  87. package/dist/assets/_baseMap-BwlisKUj.js +0 -1
  88. package/dist/assets/_baseUniq-CsVuRotB.js +0 -1
  89. package/dist/assets/architectureDiagram-IEHRJDOE-C5pFW9R1.js +0 -1
  90. package/dist/assets/blockDiagram-JOT3LUYC-BQnwS7p_.js +0 -1
  91. package/dist/assets/c4Diagram-VJAJSXHY-D4Eiiy_a.js +0 -1
  92. package/dist/assets/channel-BGLVWyn_.js +0 -1
  93. package/dist/assets/classDiagram-GIVACNV2-BUkoA7Gg.js +0 -1
  94. package/dist/assets/classDiagram-v2-COTLJTTW-BUkoA7Gg.js +0 -1
  95. package/dist/assets/clone-C8tCSJw7.js +0 -1
  96. package/dist/assets/compile-Bx_JarK2.js +0 -1
  97. package/dist/assets/dagre-OKDRZEBW-CkfGT-nJ.js +0 -1
  98. package/dist/assets/diagram-SSKATNLV-DQOATu41.js +0 -1
  99. package/dist/assets/diagram-VNBRO52H-C7wk6q1b.js +0 -1
  100. package/dist/assets/edit-page-C0wf4QXz.js +0 -8
  101. package/dist/assets/erDiagram-Q7BY3M3F-yyrvC-Az.js +0 -1
  102. package/dist/assets/flowDiagram-4HSFHLVR-Cegcb0W3.js +0 -1
  103. package/dist/assets/ganttDiagram-APWFNJXF-D9rummay.js +0 -1
  104. package/dist/assets/gitGraphDiagram-7IBYFJ6S-BBF9xrIU.js +0 -1
  105. package/dist/assets/index-Hcm6vytW.js +0 -1
  106. package/dist/assets/infoDiagram-PH2N3AL5-BUSS-YRa.js +0 -1
  107. package/dist/assets/journeyDiagram-U35MCT3I-DHtAwSAd.js +0 -1
  108. package/dist/assets/kanban-definition-NDS4AKOZ-BQLBJIYX.js +0 -1
  109. package/dist/assets/linear-CVoZ1MzX.js +0 -1
  110. package/dist/assets/mermaid-iAIjIGjg.js +0 -7
  111. package/dist/assets/min-BGi6L9wq.js +0 -1
  112. package/dist/assets/mindmap-definition-ALO5MXBD-B362nwlW.js +0 -1
  113. package/dist/assets/pieDiagram-IB7DONF6-kBXvdhdj.js +0 -1
  114. package/dist/assets/quadrantDiagram-7GDLP6J5-Dzv0VN2o.js +0 -1
  115. package/dist/assets/requirementDiagram-KVF5MWMF-D7Z4Eian.js +0 -1
  116. package/dist/assets/run-page-DUHz4-c7.js +0 -1
  117. package/dist/assets/sankeyDiagram-QLVOVGJD-D2NZz1SK.js +0 -1
  118. package/dist/assets/sequenceDiagram-X6HHIX6F-ByZmhmvp.js +0 -1
  119. package/dist/assets/sortBy-BvAVG72A.js +0 -1
  120. package/dist/assets/stateDiagram-DGXRK772-CRoRZtnB.js +0 -1
  121. package/dist/assets/stateDiagram-v2-YXO3MK2T-C8bmtTGw.js +0 -1
  122. package/dist/assets/step-xJWGRC3d.js +0 -1
  123. package/dist/assets/time-BGc4EDHL.js +0 -1
  124. package/dist/assets/timeline-definition-BDJGKUSR-BYOVXsNp.js +0 -1
  125. package/dist/assets/transform-CdY8z5kT.js +0 -1
  126. package/dist/assets/tree-c5ZvjiS5.js +0 -8
  127. package/dist/assets/vega-component-g-u_DEsv.js +0 -1
  128. package/dist/assets/xychartDiagram-VJFVF3MP-BbT-LZTy.js +0 -1
@@ -1 +0,0 @@
1
- var t;import{a as e,b as a,g as s,d as r,c as i,e as n}from"./chunk-D6G4REZN-Q6ZzHVis.js";import{I as o}from"./chunk-XZIHB7SX-Cdpy_Cfu.js";import{_ as c,n as l,c as d,l as h,i as p,d as g,e as u,j as x,b as y,s as m,p as b,a as T,g as E,q as f,y as w,h as I,u as L,M as P,N as _,O as v,Z as N,P as A,F as k}from"./mermaid-iAIjIGjg.js";import{s as M}from"./transform-CdY8z5kT.js";import"./index-QV1pM6V_.js";import"./step-xJWGRC3d.js";var O=function(){var t=c((function(t,e,a,s){for(a=a||{},s=t.length;s--;a[t[s]]=e);return a}),"o"),e=[1,2],a=[1,3],s=[1,4],r=[2,4],i=[1,9],n=[1,11],o=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],E=[1,31],f=[1,32],w=[1,33],I=[1,34],L=[1,35],P=[1,36],_=[1,37],v=[1,38],N=[1,39],A=[1,41],k=[1,42],M=[1,43],O=[1,44],S=[1,45],D=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],C=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],F=[68,69,70],W=[1,122],q={trace:c((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:c((function(t,e,a,s,r,i,n){var o=i.length-1;switch(r){case 3:return s.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:s.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:s.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:s.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:s.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:s.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),s.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),s.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:s.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:s.parseMessage(i[o-2]),signalType:s.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:s.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:s.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:s.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:s.parseMessage(i[o-2]),signalType:s.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:s.parseMessage(i[o-1]),signalType:s.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=s.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:s.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=s.PLACEMENT.LEFTOF;break;case 64:this.$=s.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:s.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:s.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=s.LINETYPE.SOLID_OPEN;break;case 70:this.$=s.LINETYPE.DOTTED_OPEN;break;case 71:this.$=s.LINETYPE.SOLID;break;case 72:this.$=s.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=s.LINETYPE.DOTTED;break;case 74:this.$=s.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=s.LINETYPE.SOLID_CROSS;break;case 76:this.$=s.LINETYPE.DOTTED_CROSS;break;case 77:this.$=s.LINETYPE.SOLID_POINT;break;case 78:this.$=s.LINETYPE.DOTTED_POINT;break;case 79:this.$=s.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:s},{1:[3]},{3:5,4:e,5:a,6:s},{3:6,4:e,5:a,6:s},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},t(R,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:_,52:v,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:D},{22:55,70:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:D},{22:72,70:D},{22:73,70:D},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:D},{22:90,70:D},{22:91,70:D},{22:92,70:D},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(C,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(B,r,{7:99}),t(B,r,{7:100}),t(B,r,{7:101}),t(Y,r,{40:102,7:103}),t($,r,{42:104,7:105}),t($,r,{7:105,42:106}),t(V,r,{45:107,7:108}),t(B,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:D},t(F,[2,69]),t(F,[2,70]),t(F,[2,71]),t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),{22:118,70:D},{22:120,58:119,70:D},{70:[2,63]},{70:[2,64]},{56:121,81:W},{56:123,81:W},{56:124,81:W},{56:125,81:W},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:_,52:v,53:N},{5:[1,131]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,135]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,49:[1,136],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,137]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,48:[1,138],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{16:[1,139]},{16:[1,140]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,47:[1,141],50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:P,50:_,52:v,53:N,54:A,59:k,60:M,61:O,62:S,70:D},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(R,[2,52]),{22:145,70:D},{22:146,70:D},{56:147,81:W},{56:148,81:W},{56:149,81:W},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(R,[2,16]),t(C,[2,10]),{12:151,50:_,52:v,53:N},t(C,[2,12]),t(C,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:W},{56:158,81:W},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:D},t(C,[2,11]),t(Y,r,{7:103,40:160}),t($,r,{7:105,42:161}),t(V,r,{7:108,45:162}),t(R,[2,48]),t(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:c((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:c((function(t){var e=this,a=[0],s=[],r=[null],i=[],n=this.table,o="",l=0,d=0,h=i.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(g.yy[u]=this.yy[u]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var x=p.yylloc;i.push(x);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,c((function(t){a.length=a.length-2*t,r.length=r.length-t,i.length=i.length-t}),"popStack"),c(m,"lex");for(var b,T,E,f,w,I,L,P,_={};;){if(T=a[a.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(null==b&&(b=m()),E=n[T]&&n[T][b]),void 0===E||!E.length||!E[0]){var v="";for(w in P=[],n[T])this.terminals_[w]&&w>2&&P.push("'"+this.terminals_[w]+"'");v=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:x,expected:P})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(E[0]){case 1:a.push(b),r.push(p.yytext),i.push(p.yylloc),a.push(E[1]),b=null,d=p.yyleng,o=p.yytext,l=p.yylineno,x=p.yylloc;break;case 2:if(I=this.productions_[E[1]][1],_.$=r[r.length-I],_._$={first_line:i[i.length-(I||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(I||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(I||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.apply(_,[o,d,l,g.yy,E[1],r,i].concat(h))))return f;I&&(a=a.slice(0,-1*I*2),r=r.slice(0,-1*I),i=i.slice(0,-1*I)),a.push(this.productions_[E[1]][0]),r.push(_.$),i.push(_._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0}),"parse")},z=function(){return{EOF:1,parseError:c((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:c((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:c((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:c((function(t){var e=t.length,a=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 s=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),a.length-1&&(this.yylineno-=a.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:a?(a.length===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[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}),"unput"),more:c((function(){return this._more=!0,this}),"more"),reject:c((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:c((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:c((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:c((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:c((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:c((function(t,e){var a,s,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))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1}),"test_match"),next:c((function(){if(this.done)return this.EOF;var t,e,a,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;i<r.length;i++)if((a=this._input.match(this.rules[r[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:c((function(){var t=this.next();return t||this.lex()}),"lex"),begin:c((function(t){this.conditionStack.push(t)}),"begin"),popState:c((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:c((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:c((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:c((function(t){this.begin(t)}),"pushState"),stateStackSize:c((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:c((function(t,e,a,s){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\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,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function H(){this.yy={}}return q.lexer=z,c(H,"Parser"),H.prototype=q,q.Parser=H,new H}();O.parser=O;var S=O,D={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},R={FILLED:0,OPEN:1},C={LEFTOF:0,RIGHTOF:1,OVER:2},B=(c(t=class{constructor(){this.state=new o((()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),this.setAccTitle=y,this.setAccDescription=m,this.setDiagramTitle=b,this.getAccTitle=T,this.getAccDescription=E,this.getDiagramTitle=f,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(d().wrap),this.LINETYPE=D,this.ARROWTYPE=R,this.PLACEMENT=C}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,s){let r=this.state.records.currentBox;const i=this.state.records.actors.get(t);if(i){if(this.state.records.currentBox&&i.box&&this.state.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(r=i.box?i.box:this.state.records.currentBox,i.box=r,i&&e===i.name&&null==a)return}if(null==(null==a?void 0:a.text)&&(a={text:e,type:s}),null!=s&&null!=a.text||(a={text:e,type:s}),this.state.records.actors.set(t,{box:r,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,s){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:s})}addSignal(t,e,a,s,r=!1){if(s===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:(null==a?void 0:a.text)??"",wrap:(null==a?void 0:a.wrap)??this.autoWrap(),type:s,activate:r}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some((t=>t.name))}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){var t;return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(null==(t=d().sequence)?void 0:t.wrap)??!1}clear(){this.state.reset(),w()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:s}=this.extractWrap(e),r={text:s,wrap:a};return h.debug(`parseMessage: ${JSON.stringify(r)}`),r}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=(null==e?void 0:e[1])?e[1].trim():"transparent",s=(null==e?void 0:e[2])?e[2].trim():void 0;if(null==window?void 0:window.CSS)window.CSS.supports("color",a)||(a="transparent",s=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",s=t.trim())}const{wrap:r,cleanedText:i}=this.extractWrap(s);return{text:i?I(i,d()):void 0,color:a,wrap:r}}addNote(t,e,a){const s={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},r=[].concat(t,t);this.state.records.notes.push(s),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r[0],to:r[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=I(e.text,d());t=t.replace(/&equals;/g,"="),t=t.replace(/&amp;/g,"&");const s=JSON.parse(t);this.insertLinks(a,s)}catch(s){h.error("error while parsing actor link text",s)}}addALink(t,e){const a=this.getActor(t);try{const t={};let s=I(e.text,d());const r=s.indexOf("@");s=s.replace(/&equals;/g,"="),s=s.replace(/&amp;/g,"&");const i=s.slice(0,r-1).trim(),n=s.slice(r+1).trim();t[i]=n,this.insertLinks(a,t)}catch(s){h.error("error while parsing actor link text",s)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=I(e.text,d()),s=JSON.parse(t);this.insertProperties(a,s)}catch(s){h.error("error while parsing actor properties text",s)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),s=document.getElementById(e.text);try{const t=s.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(r){h.error("error while parsing actor details text",r)}}getActorProperty(t,e){if(void 0!==(null==t?void 0:t.properties))return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach((t=>{this.apply(t)}));else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":y(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return d().sequence}},"SequenceDB"),t),Y=c((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),$="actor-top",V="actor-bottom",F="actor-man",W=c((function(t,e){return r(t,e)}),"drawRect"),q=c((function(t,e,a,s,r){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";r&&(c="block !important");const l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c);var d="";void 0!==o.class&&(d=" "+o.class);let h=o.width>a?o.width:a;const g=l.append("rect");if(g.attr("class","actorPopupMenuPanel"+d),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",h),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=l.append("a"),y=p.sanitizeUrl(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),ut(s)(t,x,o.x+10,o.height+u,h,20,{class:"actor"},s),u+=30}}return g.attr("height",u),{height:o.height+u,width:h}}),"drawPopup"),z=c((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),H=c((async function(t,e,a=null){let s=t.append("foreignObject");const r=await A(e.text,k()),i=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(s.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const r=a.getBBox();s.attr("x",Math.round(r.x+r.width/2-i.width/2)).attr("y",Math.round(r.y+r.height/2-i.height/2))}else if(a){let{startx:t,stopx:r,starty:n}=a;if(t>r){const e=t;t=r,r=e}s.attr("x",Math.round(t+Math.abs(t-r)/2-i.width/2)),"loopText"===e.class?s.attr("y",Math.round(n)):s.attr("y",Math.round(n-i.height))}return[s]}),"drawKatex"),j=c((function(t,e){let a=0,s=0;const r=e.text.split(x.lineBreakRegex),[i,n]=v(e.fontSize);let o=[],l=0,d=c((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=c((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":d=c((()=>Math.round(e.y+(a+s+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":d=c((()=>Math.round(e.y+(a+s+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[c,h]of r.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(l=c*i);const r=t.append("text");r.attr("x",e.x),r.attr("y",d()),void 0!==e.anchor&&r.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&r.style("font-family",e.fontFamily),void 0!==n&&r.style("font-size",n),void 0!==e.fontWeight&&r.style("font-weight",e.fontWeight),void 0!==e.fill&&r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class),void 0!==e.dy?r.attr("dy",e.dy):0!==l&&r.attr("dy",l);const p=h||N;if(e.tspan){const t=r.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(p)}else r.text(p);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(s+=(r._groups||r)[0][0].getBBox().height,a=s),o.push(r)}return o}),"drawText"),U=c((function(t,e){function a(t,e,a,s,r){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+s-r)+" "+(t+a-1.2*r)+","+(e+s)+" "+t+","+(e+s)}c(a,"genPoints");const s=t.append("polygon");return s.attr("points",a(e.x,e.y,e.width,e.height,7)),s.attr("class","labelBox"),e.y=e.y+e.height/2,j(t,e),s}),"drawLabel"),K=-1,X=c(((t,e,a,s)=>{t.select&&a.forEach((a=>{const r=e.get(a),i=t.select("#actor"+r.actorCnt);!s.mirrorActors&&r.stopy?i.attr("y2",r.stopy+r.height/2):s.mirrorActors&&i.attr("y2",r.stopy)}))}),"fixLifeLineHeights"),G=c((function(t,e,a,r){var o,c;const l=r?e.stopy:e.starty,d=e.x+e.width/2,h=l+e.height,p=t.append("g").lower();var g=p;r||(K++,Object.keys(e.links||{}).length&&!a.forceMenus&&g.attr("onclick",z(`actor${K}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+K).attr("x1",d).attr("y1",h).attr("x2",d).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),g=p.append("g"),e.actorCnt=K,null!=e.links&&g.attr("id","root-"+K));const u=s();var x="actor";(null==(o=e.properties)?void 0:o.class)?x=e.properties.class:u.fill="#eaeaea",x+=r?` ${V}`:` ${$}`,u.x=e.x,u.y=l,u.width=e.width,u.height=e.height,u.class=x,u.rx=3,u.ry=3,u.name=e.name;const y=W(g,u);if(e.rectData=u,null==(c=e.properties)?void 0:c.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?i(g,u.x+u.width-20,u.y+10,t.substr(1)):n(g,u.x+u.width-20,u.y+10,t)}gt(a,P(e.description))(e.description,g,u.x,u.y,u.width,u.height,{class:"actor actor-box"},a);let m=e.height;if(y.node){const t=y.node().getBBox();e.height=t.height,m=t.height}return m}),"drawActorTypeParticipant"),J=c((function(t,e,a,r){const i=r?e.stopy:e.starty,n=e.x+e.width/2,o=i+80,c=t.append("g").lower();r||(K++,c.append("line").attr("id","actor"+K).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=K);const l=t.append("g");let d=F;d+=r?` ${V}`:` ${$}`,l.attr("class",d),l.attr("name",e.name);const h=s();h.x=e.x,h.y=i,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"+K).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+K).attr("x1",n-18).attr("y1",i+33).attr("x2",n+18).attr("y2",i+33),l.append("line").attr("x1",n-18).attr("y1",i+60).attr("x2",n).attr("y2",i+45),l.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+18-2).attr("y2",i+60);const p=l.append("circle");p.attr("cx",e.x+e.width/2),p.attr("cy",i+10),p.attr("r",15),p.attr("width",e.width),p.attr("height",e.height);const g=l.node().getBBox();return e.height=g.height,gt(a,P(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${F}`},a),e.height}),"drawActorTypeActor"),Z=c((async function(t,e,a,s){switch(e.type){case"actor":return await J(t,e,a,s);case"participant":return await G(t,e,a,s)}}),"drawActor"),Q=c((function(t,e,a){const s=t.append("g");st(s,e),e.name&&gt(a)(e.name,s,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),s.lower()}),"drawBox"),tt=c((function(t){return t.append("g")}),"anchorElement"),et=c((function(t,e,a,r,i){const n=s(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,W(o,n)}),"drawActivation"),at=c((async function(t,e,s,r){const{boxMargin:i,boxTextMargin:n,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=r,g=t.append("g"),u=c((function(t,e,a,s){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",s).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=a();x.text=s,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=o||20,x.textMargin=n,x.class="labelText",U(g,x),x=ht(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+n,x.anchor="middle",x.valign="middle",x.textMargin=n,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=P(x.text)?await H(g,x,e):j(g,x);if(void 0!==e.sectionTitles)for(const[a,c]of Object.entries(e.sectionTitles))if(c.message){x.text=c.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[a].y+i+n,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,P(x.text)?(e.starty=e.sections[a].y,await H(g,x,e)):j(g,x);let t=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[a].height+=t-(i+n)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),st=c((function(t,a){e(t,a)}),"drawBackgroundRect"),rt=c((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")}),"insertDatabaseIcon"),it=c((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")}),"insertComputerIcon"),nt=c((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")}),"insertClockIcon"),ot=c((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-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),ct=c((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")}),"insertArrowFilledHead"),lt=c((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)}),"insertSequenceNumber"),dt=c((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).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")}),"insertArrowCrossHead"),ht=c((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}}),"getTextObj"),pt=c((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),gt=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a+i/2).attr("y",s+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,s,i,n,o,c){const{actorFontSize:l,actorFontFamily:d,actorFontWeight:h}=c,[p,g]=v(l),u=t.split(x.lineBreakRegex);for(let x=0;x<u.length;x++){const t=x*p-p*(u.length-1)/2,c=e.append("text").attr("x",a+i/2).attr("y",s).style("text-anchor","middle").style("font-size",g).style("font-weight",h).style("font-family",d);c.append("tspan").attr("x",a+i/2).attr("dy",t).text(u[x]),c.attr("y",s+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(c,o)}}function a(t,a,s,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,s,i,n,o,c,l),r(h,c)}async function s(t,a,s,i,n,o,c,l){const d=await _(t,k()),h=a.append("switch"),p=h.append("foreignObject").attr("x",s+n/2-d.width/2).attr("y",i+o/2-d.height/2).attr("width",d.width).attr("height",d.height).append("xhtml:div").style("height","100%").style("width","100%");p.append("div").style("text-align","center").style("vertical-align","middle").html(await A(t,k())),e(t,h,s,i,n,o,c,l),r(p,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return c(t,"byText"),c(e,"byTspan"),c(a,"byFo"),c(s,"byKatex"),c(r,"_setTextAttrs"),function(r,i=!1){return i?s:"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),ut=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").text(t),o)}function e(t,e,a,r,i,n,o,c){const{actorFontSize:l,actorFontFamily:d,actorFontWeight:h}=c,p=t.split(x.lineBreakRegex);for(let g=0;g<p.length;g++){const t=g*l-l*(p.length-1)/2,i=e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",d);i.append("tspan").attr("x",a).attr("dy",t).text(p[g]),i.attr("y",r+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(i,o)}}function a(t,a,r,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,r,i,0,o,c,l),s(h,c)}function s(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return c(t,"byText"),c(e,"byTspan"),c(a,"byFo"),c(s,"_setTextAttrs"),function(s){return"fo"===s.textPlacement?a:"old"===s.textPlacement?t:e}}(),xt={drawRect:W,drawText:j,drawLabel:U,drawActor:Z,drawBox:Q,drawPopup:q,anchorElement:tt,drawActivation:et,drawLoop:at,drawBackgroundRect:st,insertArrowHead:ot,insertArrowFilledHead:ct,insertSequenceNumber:lt,insertArrowCrossHead:dt,insertDatabaseIcon:rt,insertComputerIcon:it,insertClockIcon:nt,getTextObj:ht,getNoteRect:pt,fixLifeLineHeights:X,sanitizeUrl:p.sanitizeUrl},yt={},mt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:c((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)))}),"getHeight"),clear:c((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:c((function(t){this.boxes.push(t)}),"addBox"),addActor:c((function(t){this.actors.push(t)}),"addActor"),addLoop:c((function(t){this.loops.push(t)}),"addLoop"),addMessage:c((function(t){this.messages.push(t)}),"addMessage"),addNote:c((function(t){this.notes.push(t)}),"addNote"),lastActor:c((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:c((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:c((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:c((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:c((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,vt(d())}),"init"),updateVal:c((function(t,e,a,s){void 0===t[e]?t[e]=a:t[e]=s(a,t[e])}),"updateVal"),updateBounds:c((function(t,e,a,s){const r=this;let i=0;function n(n){return c((function(o){i++;const c=r.sequenceItems.length-i+1;r.updateVal(o,"starty",e-c*yt.boxMargin,Math.min),r.updateVal(o,"stopy",s+c*yt.boxMargin,Math.max),r.updateVal(mt.data,"startx",t-c*yt.boxMargin,Math.min),r.updateVal(mt.data,"stopx",a+c*yt.boxMargin,Math.max),"activation"!==n&&(r.updateVal(o,"startx",t-c*yt.boxMargin,Math.min),r.updateVal(o,"stopx",a+c*yt.boxMargin,Math.max),r.updateVal(mt.data,"starty",e-c*yt.boxMargin,Math.min),r.updateVal(mt.data,"stopy",s+c*yt.boxMargin,Math.max))}),"updateItemBounds")}c(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))}),"updateBounds"),insert:c((function(t,e,a,s){const r=x.getMin(t,a),i=x.getMax(t,a),n=x.getMin(e,s),o=x.getMax(e,s);this.updateVal(mt.data,"startx",r,Math.min),this.updateVal(mt.data,"starty",n,Math.min),this.updateVal(mt.data,"stopx",i,Math.max),this.updateVal(mt.data,"stopy",o,Math.max),this.updateBounds(r,n,i,o)}),"insert"),newActivation:c((function(t,e,a){const s=a.get(t.from),r=Nt(t.from).length||0,i=s.x+s.width/2+(r-1)*yt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+yt.activationWidth,stopy:void 0,actor:t.from,anchored:xt.anchorElement(e)})}),"newActivation"),endActivation:c((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:c((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}}),"createLoop"),newLoop:c((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:c((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:c((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:c((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:mt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:c((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:c((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:c((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=x.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:c((function(){return this.verticalPos}),"getVerticalPos"),getBounds:c((function(){return{bounds:this.data,models:this.models}}),"getBounds")},bt=c((async function(t,e){mt.bumpVerticalPos(yt.boxMargin),e.height=yt.boxMargin,e.starty=mt.getVerticalPos();const r=s();r.x=e.startx,r.y=e.starty,r.width=e.width||yt.width,r.class="note";const i=t.append("g"),n=xt.drawRect(i,r),o=a();o.x=e.startx,o.y=e.starty,o.width=r.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=yt.noteFontFamily,o.fontSize=yt.noteFontSize,o.fontWeight=yt.noteFontWeight,o.anchor=yt.noteAlign,o.textMargin=yt.noteMargin,o.valign="center";const c=P(o.text)?await H(i,o):j(i,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));n.attr("height",l+2*yt.noteMargin),e.height+=l+2*yt.noteMargin,mt.bumpVerticalPos(l+2*yt.noteMargin),e.stopy=e.starty+l+2*yt.noteMargin,e.stopx=e.startx+r.width,mt.insert(e.startx,e.starty,e.stopx,e.stopy),mt.models.addNote(e)}),"drawNote"),Tt=c((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),Et=c((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),ft=c((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function wt(t,e){mt.bumpVerticalPos(10);const{startx:a,stopx:s,message:r}=e,i=x.splitBreaks(r).length,n=P(r),o=n?await _(r,d()):L.calculateTextDimensions(r,Tt(yt));if(!n){const t=o.height/i;e.height+=t,mt.bumpVerticalPos(t)}let c,l=o.height-10;const h=o.width;if(a===s){c=mt.getVerticalPos()+l,yt.rightAngles||(l+=yt.boxMargin,c=mt.getVerticalPos()+l),l+=30;const t=x.getMax(h/2,yt.width/2);mt.insert(a-t,mt.getVerticalPos()-10+l,s+t,mt.getVerticalPos()+30+l)}else l+=yt.boxMargin,c=mt.getVerticalPos()+l,mt.insert(a,c-10,s,c);return mt.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,mt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),c}c(wt,"boundMessage");var It=c((async function(t,e,s,r){const{startx:i,stopx:n,starty:o,message:c,type:l,sequenceIndex:d,sequenceVisible:h}=e,p=L.calculateTextDimensions(c,Tt(yt)),g=a();g.x=i,g.y=o+10,g.width=n-i,g.class="messageText",g.dy="1em",g.text=c,g.fontFamily=yt.messageFontFamily,g.fontSize=yt.messageFontSize,g.fontWeight=yt.messageFontWeight,g.anchor=yt.messageAlign,g.valign="center",g.textMargin=yt.wrapPadding,g.tspan=!1,P(g.text)?await H(t,g,{startx:i,stopx:n,starty:s}):j(t,g);const u=p.width;let y;i===n?y=yt.rightAngles?t.append("path").attr("d",`M ${i},${s} H ${i+x.getMax(yt.width/2,u/2)} V ${s+25} H ${i}`):t.append("path").attr("d","M "+i+","+s+" C "+(i+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20)):(y=t.append("line"),y.attr("x1",i),y.attr("y1",s),y.attr("x2",n),y.attr("y2",s)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN||l===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let m="";yt.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),l!==r.db.LINETYPE.SOLID&&l!==r.db.LINETYPE.DOTTED||y.attr("marker-end","url("+m+"#arrowhead)"),l!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&l!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(y.attr("marker-start","url("+m+"#arrowhead)"),y.attr("marker-end","url("+m+"#arrowhead)")),l!==r.db.LINETYPE.SOLID_POINT&&l!==r.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+m+"#filled-head)"),l!==r.db.LINETYPE.SOLID_CROSS&&l!==r.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+m+"#crosshead)"),(h||yt.showSequenceNumbers)&&(y.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",s+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(d))}),"drawMessage"),Lt=c((function(t,e,a,s,r,i,n){let o,c=0,l=0,d=0;for(const h of s){const t=e.get(h),s=t.box;o&&o!=s&&(n||mt.models.addBox(o),l+=yt.boxMargin+o.margin),s&&s!=o&&(n||(s.x=c+l,s.y=r),l+=s.margin),t.width=t.width||yt.width,t.height=x.getMax(t.height||yt.height,yt.height),t.margin=t.margin||yt.actorMargin,d=x.getMax(d,t.height),a.get(t.name)&&(l+=t.width/2),t.x=c+l,t.starty=mt.getVerticalPos(),mt.insert(t.x,r,t.x+t.width,t.height),c+=t.width+l,t.box&&(t.box.width=c+s.margin-t.box.x),l=t.margin,o=t.box,mt.models.addActor(t)}o&&!n&&mt.models.addBox(o),mt.bumpVerticalPos(d)}),"addActorRenderingData"),Pt=c((async function(t,e,a,s){if(s){let s=0;mt.bumpVerticalPos(2*yt.boxMargin);for(const r of a){const a=e.get(r);a.stopy||(a.stopy=mt.getVerticalPos());const i=await xt.drawActor(t,a,yt,!0);s=x.getMax(s,i)}mt.bumpVerticalPos(s+yt.boxMargin)}else for(const r of a){const a=e.get(r);await xt.drawActor(t,a,yt,!1)}}),"drawActors"),_t=c((function(t,e,a,s){let r=0,i=0;for(const n of a){const a=e.get(n),o=Dt(a),c=xt.drawPopup(t,a,o,yt,yt.forceMenus,s);c.height>r&&(r=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:r,maxWidth:i}}),"drawActorsPopup"),vt=c((function(t){u(yt,t),t.fontFamily&&(yt.actorFontFamily=yt.noteFontFamily=yt.messageFontFamily=t.fontFamily),t.fontSize&&(yt.actorFontSize=yt.noteFontSize=yt.messageFontSize=t.fontSize),t.fontWeight&&(yt.actorFontWeight=yt.noteFontWeight=yt.messageFontWeight=t.fontWeight)}),"setConf"),Nt=c((function(t){return mt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),At=c((function(t,e){const a=e.get(t),s=Nt(t);return[s.reduce((function(t,e){return x.getMin(t,e.startx)}),a.x+a.width/2-1),s.reduce((function(t,e){return x.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function kt(t,e,a,s,r){mt.bumpVerticalPos(a);let i=s;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,r=Tt(yt);e.message=L.wrapLabel(`[${e.message}]`,a-2*yt.wrapPadding,r),e.width=a,e.wrap=!0;const n=L.calculateTextDimensions(e.message,r),o=x.getMax(n.height,yt.labelBoxHeight);i=s+o,h.debug(`${o} - ${e.message}`)}r(e),mt.bumpVerticalPos(i)}function Mt(t,e,a,s,r,i,n){function o(a,s){a.x<r.get(t.from).x?(mt.insert(e.stopx-s,e.starty,e.startx,e.stopy+a.height/2+yt.noteMargin),e.stopx=e.stopx+s):(mt.insert(e.startx,e.starty,e.stopx+s,e.stopy+a.height/2+yt.noteMargin),e.stopx=e.stopx-s)}function l(a,s){a.x<r.get(t.to).x?(mt.insert(e.startx-s,e.starty,e.stopx,e.stopy+a.height/2+yt.noteMargin),e.startx=e.startx+s):(mt.insert(e.stopx,e.starty,e.startx+s,e.stopy+a.height/2+yt.noteMargin),e.startx=e.startx-s)}if(c(o,"receiverAdjustment"),c(l,"senderAdjustment"),i.get(t.to)==s){const e=r.get(t.to);o(e,"actor"==e.type?21:e.width/2+3),e.starty=a-e.height/2,mt.bumpVerticalPos(e.height/2)}else if(n.get(t.from)==s){const e=r.get(t.from);if(yt.mirrorActors){l(e,"actor"==e.type?18:e.width/2)}e.stopy=a-e.height/2,mt.bumpVerticalPos(e.height/2)}else if(n.get(t.to)==s){const e=r.get(t.to);if(yt.mirrorActors){o(e,"actor"==e.type?21:e.width/2+3)}e.stopy=a-e.height/2,mt.bumpVerticalPos(e.height/2)}}c(kt,"adjustLoopHeightForWrap"),c(Mt,"adjustCreatedDestroyedData");var Ot=c((async function(t,e,a,s){const{securityLevel:r,sequence:i}=d();let n;yt=i,"sandbox"===r&&(n=M("#i"+e));const o=M("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),l="sandbox"===r?n.nodes()[0].contentDocument:document;mt.init(),h.debug(s.db);const p="sandbox"===r?o.select(`[id="${e}"]`):M(`[id="${e}"]`),u=s.db.getActors(),x=s.db.getCreatedActors(),y=s.db.getDestroyedActors(),m=s.db.getBoxes();let b=s.db.getActorKeys();const T=s.db.getMessages(),E=s.db.getDiagramTitle(),f=s.db.hasAtLeastOneBox(),w=s.db.hasAtLeastOneBoxWithTitle(),I=await St(u,T,s);if(yt.height=await Rt(u,I,m),xt.insertComputerIcon(p),xt.insertDatabaseIcon(p),xt.insertClockIcon(p),f&&(mt.bumpVerticalPos(yt.boxMargin),w&&mt.bumpVerticalPos(m[0].textMaxHeight)),!0===yt.hideUnusedParticipants){const t=new Set;T.forEach((e=>{t.add(e.from),t.add(e.to)})),b=b.filter((e=>t.has(e)))}Lt(p,u,x,b,0,T,!1);const L=await Yt(T,u,I,s);function P(t,e){const a=mt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),xt.drawActivation(p,a,e,yt,Nt(t.from).length),mt.insert(a.startx,e-10,a.stopx,e)}xt.insertArrowHead(p),xt.insertArrowCrossHead(p),xt.insertArrowFilledHead(p),xt.insertSequenceNumber(p),c(P,"activeEnd");let _=1,v=1;const N=[],A=[];let k=0;for(const c of T){let t,e,a;switch(c.type){case s.db.LINETYPE.NOTE:mt.resetVerticalPos(),e=c.noteModel,await bt(p,e);break;case s.db.LINETYPE.ACTIVE_START:mt.newActivation(c,p,u);break;case s.db.LINETYPE.ACTIVE_END:P(c,mt.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.LOOP_END:t=mt.endLoop(),await xt.drawLoop(p,t,"loop",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.RECT_START:kt(L,c,yt.boxMargin,yt.boxMargin,(t=>mt.newLoop(void 0,t.message)));break;case s.db.LINETYPE.RECT_END:t=mt.endLoop(),A.push(t),mt.models.addLoop(t),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos());break;case s.db.LINETYPE.OPT_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.OPT_END:t=mt.endLoop(),await xt.drawLoop(p,t,"opt",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.ALT_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.ALT_ELSE:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.ALT_END:t=mt.endLoop(),await xt.drawLoop(p,t,"alt",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t))),mt.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.PAR_END:t=mt.endLoop(),await xt.drawLoop(p,t,"par",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.AUTONUMBER:_=c.message.start||_,v=c.message.step||v,c.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.CRITICAL_OPTION:kt(L,c,yt.boxMargin+yt.boxTextMargin,yt.boxMargin,(t=>mt.addSectionToLoop(t)));break;case s.db.LINETYPE.CRITICAL_END:t=mt.endLoop(),await xt.drawLoop(p,t,"critical",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;case s.db.LINETYPE.BREAK_START:kt(L,c,yt.boxMargin,yt.boxMargin+yt.boxTextMargin,(t=>mt.newLoop(t)));break;case s.db.LINETYPE.BREAK_END:t=mt.endLoop(),await xt.drawLoop(p,t,"break",yt),mt.bumpVerticalPos(t.stopy-mt.getVerticalPos()),mt.models.addLoop(t);break;default:try{a=c.msgModel,a.starty=mt.getVerticalPos(),a.sequenceIndex=_,a.sequenceVisible=s.db.showSequenceNumbers();const t=await wt(0,a);Mt(c,a,t,k,u,x,y),N.push({messageModel:a,lineStartY:t}),mt.models.addMessage(a)}catch($){h.error("error while drawing message",$)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(c.type)&&(_+=v),k++}h.debug("createdActors",x),h.debug("destroyedActors",y),await Pt(p,u,b,!1);for(const c of N)await It(p,c.messageModel,c.lineStartY,s);yt.mirrorActors&&await Pt(p,u,b,!0),A.forEach((t=>xt.drawBackgroundRect(p,t))),X(p,u,b,yt);for(const c of mt.models.boxes)c.height=mt.getVerticalPos()-c.y,mt.insert(c.x,c.y,c.x+c.width,c.height),c.startx=c.x,c.starty=c.y,c.stopx=c.startx+c.width,c.stopy=c.starty+c.height,c.stroke="rgb(0,0,0, 0.5)",xt.drawBox(p,c,yt);f&&mt.bumpVerticalPos(yt.boxMargin);const O=_t(p,u,b,l),{bounds:S}=mt.getBounds();void 0===S.startx&&(S.startx=0),void 0===S.starty&&(S.starty=0),void 0===S.stopx&&(S.stopx=0),void 0===S.stopy&&(S.stopy=0);let D=S.stopy-S.starty;D<O.maxHeight&&(D=O.maxHeight);let R=D+2*yt.diagramMarginY;yt.mirrorActors&&(R=R-yt.boxMargin+yt.bottomMarginAdj);let C=S.stopx-S.startx;C<O.maxWidth&&(C=O.maxWidth);const B=C+2*yt.diagramMarginX;E&&p.append("text").text(E).attr("x",(S.stopx-S.startx)/2-2*yt.diagramMarginX).attr("y",-25),g(p,R,B,yt.useMaxWidth);const Y=E?40:0;p.attr("viewBox",S.startx-yt.diagramMarginX+" -"+(yt.diagramMarginY+Y)+" "+B+" "+(R+Y)),h.debug("models:",mt.models)}),"draw");async function St(t,e,a){const s={};for(const r of e)if(t.get(r.to)&&t.get(r.from)){const e=t.get(r.to);if(r.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(r.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const i=void 0!==r.placement,n=!i,o=i?Et(yt):Tt(yt),c=r.wrap?L.wrapLabel(r.message,yt.width-2*yt.wrapPadding,o):r.message,l=(P(c)?await _(r.message,d()):L.calculateTextDimensions(c,o)).width+2*yt.wrapPadding;n&&r.from===e.nextActor?s[r.to]=x.getMax(s[r.to]||0,l):n&&r.from===e.prevActor?s[r.from]=x.getMax(s[r.from]||0,l):n&&r.from===r.to?(s[r.from]=x.getMax(s[r.from]||0,l/2),s[r.to]=x.getMax(s[r.to]||0,l/2)):r.placement===a.db.PLACEMENT.RIGHTOF?s[r.from]=x.getMax(s[r.from]||0,l):r.placement===a.db.PLACEMENT.LEFTOF?s[e.prevActor]=x.getMax(s[e.prevActor]||0,l):r.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(s[e.prevActor]=x.getMax(s[e.prevActor]||0,l/2)),e.nextActor&&(s[r.from]=x.getMax(s[r.from]||0,l/2)))}return h.debug("maxMessageWidthPerActor:",s),s}c(St,"getMaxMessageWidthPerActor");var Dt=c((function(t){let e=0;const a=ft(yt);for(const s in t.links){const t=L.calculateTextDimensions(s,a).width+2*yt.wrapPadding+2*yt.boxMargin;e<t&&(e=t)}return e}),"getRequiredPopupWidth");async function Rt(t,e,a){let s=0;for(const i of t.keys()){const e=t.get(i);e.wrap&&(e.description=L.wrapLabel(e.description,yt.width-2*yt.wrapPadding,ft(yt)));const a=P(e.description)?await _(e.description,d()):L.calculateTextDimensions(e.description,ft(yt));e.width=e.wrap?yt.width:x.getMax(yt.width,a.width+2*yt.wrapPadding),e.height=e.wrap?x.getMax(a.height,yt.height):yt.height,s=x.getMax(s,e.height)}for(const i in e){const a=t.get(i);if(!a)continue;const s=t.get(a.nextActor);if(!s){const t=e[i]+yt.actorMargin-a.width/2;a.margin=x.getMax(t,yt.actorMargin);continue}const r=e[i]+yt.actorMargin-a.width/2-s.width/2;a.margin=x.getMax(r,yt.actorMargin)}let r=0;return a.forEach((e=>{const a=Tt(yt);let s=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);s-=2*yt.boxTextMargin,e.wrap&&(e.name=L.wrapLabel(e.name,s-2*yt.wrapPadding,a));const i=L.calculateTextDimensions(e.name,a);r=x.getMax(i.height,r);const n=x.getMax(s,i.width+2*yt.wrapPadding);if(e.margin=yt.boxTextMargin,s<n){const t=(n-s)/2;e.margin+=t}})),a.forEach((t=>t.textMaxHeight=r)),x.getMax(s,yt.height)}c(Rt,"calculateActorMargins");var Ct=c((async function(t,e,a){const s=e.get(t.from),r=e.get(t.to),i=s.x,n=r.x,o=t.wrap&&t.message;let c=P(t.message)?await _(t.message,d()):L.calculateTextDimensions(o?L.wrapLabel(t.message,yt.width,Et(yt)):t.message,Et(yt));const l={width:o?yt.width:x.getMax(yt.width,c.width+2*yt.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(l.width=o?x.getMax(yt.width,c.width):x.getMax(s.width/2+r.width/2,c.width+2*yt.noteMargin),l.startx=i+(s.width+yt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(l.width=o?x.getMax(yt.width,c.width+2*yt.noteMargin):x.getMax(s.width/2+r.width/2,c.width+2*yt.noteMargin),l.startx=i-l.width+(s.width-yt.actorMargin)/2):t.to===t.from?(c=L.calculateTextDimensions(o?L.wrapLabel(t.message,x.getMax(yt.width,s.width),Et(yt)):t.message,Et(yt)),l.width=o?x.getMax(yt.width,s.width):x.getMax(s.width,yt.width,c.width+2*yt.noteMargin),l.startx=i+(s.width-l.width)/2):(l.width=Math.abs(i+s.width/2-(n+r.width/2))+yt.actorMargin,l.startx=i<n?i+s.width/2-yt.actorMargin/2:n+r.width/2-yt.actorMargin/2),o&&(l.message=L.wrapLabel(t.message,l.width-2*yt.wrapPadding,Et(yt))),h.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l}),"buildNoteModel"),Bt=c((function(t,e,a){if(![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,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[s,r]=At(t.from,e),[i,n]=At(t.to,e),o=s<=i;let l=o?r:s,d=o?i:n;const h=Math.abs(i-n)>2,p=c((t=>o?-t:t),"adjustValue");t.from===t.to?d=l:(t.activate&&!h&&(d+=p(yt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=p(3)));const g=[s,r,i,n],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=L.wrapLabel(t.message,x.getMax(u+2*yt.wrapPadding,yt.width),Tt(yt)));const y=L.calculateTextDimensions(t.message,Tt(yt));return{width:x.getMax(t.wrap?0:y.width+2*yt.wrapPadding,u+2*yt.wrapPadding,yt.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}}),"buildMessageModel"),Yt=c((async function(t,e,a,s){const r={},i=[];let n,o,c;for(const l of t){switch(l.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:i.push({id:l.id,msg:l.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:l.message&&(n=i.pop(),r[n.id]=n,r[l.id]=n,i.push(n));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:n=i.pop(),r[n.id]=n;break;case s.db.LINETYPE.ACTIVE_START:{const t=e.get(l.from?l.from:l.to.actor),a=Nt(l.from?l.from:l.to.actor).length,s=t.x+t.width/2+(a-1)*yt.activationWidth/2,r={startx:s,stopx:s+yt.activationWidth,actor:l.from,enabled:!0};mt.activations.push(r)}break;case s.db.LINETYPE.ACTIVE_END:{const t=mt.activations.map((t=>t.actor)).lastIndexOf(l.from);mt.activations.splice(t,1).splice(0,1)}}void 0!==l.placement?(o=await Ct(l,e,s),l.noteModel=o,i.forEach((t=>{n=t,n.from=x.getMin(n.from,o.startx),n.to=x.getMax(n.to,o.startx+o.width),n.width=x.getMax(n.width,Math.abs(n.from-n.to))-yt.labelBoxWidth}))):(c=Bt(l,e,s),l.msgModel=c,c.startx&&c.stopx&&i.length>0&&i.forEach((t=>{if(n=t,c.startx===c.stopx){const t=e.get(l.from),a=e.get(l.to);n.from=x.getMin(t.x-c.width/2,t.x-t.width/2,n.from),n.to=x.getMax(a.x+c.width/2,a.x+t.width/2,n.to),n.width=x.getMax(n.width,Math.abs(n.to-n.from))-yt.labelBoxWidth}else n.from=x.getMin(c.startx,n.from),n.to=x.getMax(c.stopx,n.to),n.width=x.getMax(n.width,c.width)-yt.labelBoxWidth})))}return mt.activations=[],h.debug("Loop type widths:",r),r}),"calculateLoopBounds"),$t={bounds:mt,drawActors:Pt,drawActorsPopup:_t,setConf:vt,draw:Ot},Vt={parser:S,get db(){return new B},renderer:$t,styles:Y,init:c((t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,l({sequence:{wrap:t.wrap}}))}),"init")};export{Vt as diagram};
@@ -1 +0,0 @@
1
- import{aj as r,ak as n,al as t,am as a,an as e,ao as i,G as u,ap as o,H as f}from"./index-QV1pM6V_.js";import{a as s}from"./_baseEach-BLu58TpK.js";import{b as l}from"./_baseMap-BwlisKUj.js";function c(n,t){if(n!==t){var a=void 0!==n,e=null===n,i=n==n,u=r(n),o=void 0!==t,f=null===t,s=t==t,l=r(t);if(!f&&!l&&!u&&n>t||u&&o&&s&&!f&&!l||e&&o&&s||!a&&s||!i)return 1;if(!e&&!u&&!l&&n<t||l&&a&&i&&!e&&!u||f&&a&&i||!o&&i||!s)return-1}return 0}function v(r,u,o){u=u.length?n(u,(function(r){return t(r)?function(n){return a(n,1===r.length?r[0]:r)}:r})):[e];var f=-1;return u=n(u,i(s)),function(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}(l(r,(function(r,t,a){return{criteria:n(u,(function(n){return n(r)})),index:++f,value:r}})),(function(r,n){return function(r,n,t){for(var a=-1,e=r.criteria,i=n.criteria,u=e.length,o=t.length;++a<u;){var f=c(e[a],i[a]);if(f)return a>=o?f:f*("desc"==t[a]?-1:1)}return r.index-n.index}(r,n,o)}))}var m=u((function(r,n){if(null==r)return[];var t=n.length;return t>1&&o(r,n[0],n[1])?n=[]:t>2&&o(n[0],n[1],n[2])&&(n=[n[0]]),v(r,f(n),[])}));export{m as s};
@@ -1 +0,0 @@
1
- import{s as t,a as e,S as a}from"./chunk-AEK57VVT-CFa_0aNx.js";import{_ as i,c as r,l as n,d as s,j as d,u as o}from"./mermaid-iAIjIGjg.js";import{s as g}from"./transform-CdY8z5kT.js";import{G as p}from"./graph-BcYKg7pg.js";import{l as h}from"./layout-162YDsiA.js";import{l as c,k as l}from"./step-xJWGRC3d.js";import"./chunk-RZ5BOZE2-Djj4U8sI.js";import"./index-QV1pM6V_.js";import"./_baseUniq-CsVuRotB.js";import"./_baseEach-BLu58TpK.js";import"./min-BGi6L9wq.js";import"./_baseMap-BwlisKUj.js";import"./sortBy-BvAVG72A.js";var x,f={},u=i(((t,e)=>{f[t]=e}),"set"),y=i((t=>f[t]),"get"),m=i((()=>Object.keys(f)),"keys"),w=i((()=>m().length),"size"),b={get:y,set:u,keys:m,size:w},B=i((t=>t.append("circle").attr("class","start-state").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit).attr("cy",r().state.padding+r().state.sizeUnit)),"drawStartState"),k=i((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",r().state.textHeight).attr("class","divider").attr("x2",2*r().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),E=i(((t,e)=>{const a=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+2*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",i.width+2*r().state.padding).attr("height",i.height+2*r().state.padding).attr("rx",r().state.radius),a}),"drawSimpleState"),S=i(((t,e)=>{const a=i((function(t,e,a){const i=t.append("tspan").attr("x",2*r().state.padding).text(e);a||i.attr("dy",r().state.textHeight)}),"addTspan"),n=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+1.3*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,d=t.append("text").attr("x",r().state.padding).attr("y",s+.4*r().state.padding+r().state.dividerMargin+r().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach((function(t){o||(a(d,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+s+r().state.dividerMargin/2).attr("y2",r().state.padding+s+r().state.dividerMargin/2).attr("class","descr-divider"),h=d.node().getBBox(),c=Math.max(h.width,n.width);return p.attr("x2",c+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",c+2*r().state.padding).attr("height",h.height+s+2*r().state.padding).attr("rx",r().state.radius),t}),"drawDescrState"),N=i(((t,e,a)=>{const i=r().state.padding,n=2*r().state.padding,s=t.node().getBBox(),d=s.width,o=s.x,g=t.append("text").attr("x",0).attr("y",r().state.titleShift).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,d);c===d&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>d&&(h=(d-c)/2+i),Math.abs(o-l.x)<i&&p>d&&(h=o-(p-d)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=d&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",l.height+3+2*r().state.textHeight).attr("rx",r().state.radius),t}),"addTitleAndBox"),M=i((t=>(t.append("circle").attr("class","end-state-outer").attr("r",r().state.sizeUnit+r().state.miniPadding).attr("cx",r().state.padding+r().state.sizeUnit+r().state.miniPadding).attr("cy",r().state.padding+r().state.sizeUnit+r().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit+2).attr("cy",r().state.padding+r().state.sizeUnit+2))),"drawEndState"),v=i(((t,e)=>{let a=r().state.forkWidth,i=r().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",r().state.padding).attr("y",r().state.padding)}),"drawForkJoinState"),z=i(((t,e,a,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(d.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const d of g){const t=d.trim();if(t.length>0){const i=s.append("tspan");if(i.text(t),0===p){p+=i.node().getBBox().height}n+=p,i.attr("x",e+r().state.noteMargin),i.attr("y",a+n+1.25*r().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}}),"_drawLongText"),j=i(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",r().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=z(t,0,0,i);return a.attr("height",s+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),H=i((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&B(n),"end"===e.type&&M(n),"fork"!==e.type&&"join"!==e.type||v(n,e),"note"===e.type&&j(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&E(n,e),"default"===e.type&&e.descriptions.length>0&&S(n,e);const s=n.node().getBBox();return i.width=s.width+2*r().state.padding,i.height=s.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,e,s){const g=i((function(t){switch(t){case a.relationType.AGGREGATION:return"aggregation";case a.relationType.EXTENSION:return"extension";case a.relationType.COMPOSITION:return"composition";case a.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.points,h=c().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",h(p)).attr("id","edge"+T).attr("class","transition");let f="";if(r().state.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),x.attr("marker-end","url("+f+"#"+g(a.relationType.DEPENDENCY)+"End)"),void 0!==s.title){const a=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(e.points),p=d.getRows(s.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const e=a.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=e.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+h),0===h){const t=e.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(e)}let f=h*p.length;if(p.length>1){const t=(p.length-1)*h*.5;c.forEach(((e,a)=>e.attr("y",g+a*h-t))),f=h*p.length}const u=a.node().getBBox();a.insert("rect",":first-child").attr("class","box").attr("x",i-l/2-r().state.padding/2).attr("y",g-f/2-r().state.padding/2-3.5).attr("width",l+r().state.padding).attr("height",f+r().state.padding),n.info(u)}T++}),"drawEdge"),L={},A=i((function(){}),"setConf"),G=i((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),O=i((function(t,e,a,i){x=r().state;const d=r().securityLevel;let o;"sandbox"===d&&(o=g("#i"+e));const p=g("sandbox"===d?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===d?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);G(c);const l=i.db.getRootDoc();U(l,c,void 0,!1,p,h,i);const f=x.padding,u=c.node().getBBox(),y=u.width+2*f,m=u.height+2*f;s(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=i(((t,e,a,i,r,s,o)=>{const g=new p({compound:!0,multigraph:!0});let c,l=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){l=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let d;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");d=U(t.doc,a,t.id,!i,r,s,o);{a=N(a,t,i);let e=a.node().getBBox();d.width=e.width,d.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else d=H(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=H(e,a,g);"left of"===t.note.position?(g.setNode(d.id+"-note",i),g.setNode(d.id,d)):(g.setNode(d.id,d),g.setNode(d.id+"-note",i)),g.setParent(d.id,d.id+"-group"),g.setParent(d.id+"-note",d.id+"-group")}else g.setNode(d.id,d)}n.debug("Count=",g.nodeCount(),g);let m=0;u.forEach((function(t){m++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:R(t.title),height:x.labelHeight*d.getRows(t.title).length,labelpos:"c"},"id"+m)})),h(g),n.debug("Graph after layout",g.nodes());const w=e.node();g.nodes().forEach((function(t){if(void 0!==t&&void 0!==g.node(t)){n.warn("Node "+t+": "+JSON.stringify(g.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(L[t]?L[t].y:0)-g.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2);s.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=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",a-i-8)}))}else n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))}));let b=w.getBBox();g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),D(e,g.edge(t),g.edge(t).relation))})),b=w.getBBox();const B={id:a||"root",label:a||"root",width:0,height:0};return B.width=b.width+2*x.padding,B.height=b.height+2*x.padding,n.debug("Doc rendered",B,g),B}),"renderDoc"),P={setConf:A,draw:O},C={parser:e,get db(){return new a(1)},renderer:P,styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{C as diagram};
@@ -1 +0,0 @@
1
- import{s as r,b as s,a as t,S as e}from"./chunk-AEK57VVT-CFa_0aNx.js";import{_ as a}from"./mermaid-iAIjIGjg.js";import"./transform-CdY8z5kT.js";import"./chunk-RZ5BOZE2-Djj4U8sI.js";import"./index-QV1pM6V_.js";import"./step-xJWGRC3d.js";var o={parser:t,get db(){return new e(2)},renderer:s,styles:r,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{o as diagram};
@@ -1 +0,0 @@
1
- var t={value:()=>{}};function i(){for(var t,i=0,s=arguments.length,e={};i<s;++i){if(!(t=arguments[i]+"")||t in e||/[\s.]/.test(t))throw new Error("illegal type: "+t);e[t]=[]}return new n(e)}function n(t){this._=t}function s(t,i){for(var n,s=0,e=t.length;s<e;++s)if((n=t[s]).name===i)return n.value}function e(i,n,s){for(var e=0,h=i.length;e<h;++e)if(i[e].name===n){i[e]=t,i=i.slice(0,e).concat(i.slice(e+1));break}return null!=s&&i.push({name:n,value:s}),i}function h(t,i,n){t.prototype=i.prototype=n,n.constructor=t}function o(t,i){var n=Object.create(t.prototype);for(var s in i)n[s]=i[s];return n}function a(){}n.prototype=i.prototype={constructor:n,on:function(t,i){var n,h,o=this._,a=(h=o,(t+"").trim().split(/^|\s+/).map((function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!h.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}}))),_=-1,r=a.length;if(!(arguments.length<2)){if(null!=i&&"function"!=typeof i)throw new Error("invalid callback: "+i);for(;++_<r;)if(n=(t=a[_]).type)o[n]=e(o[n],t.name,i);else if(null==i)for(n in o)o[n]=e(o[n],t.name,null);return this}for(;++_<r;)if((n=(t=a[_]).type)&&(n=s(o[n],t.name)))return n},copy:function(){var t={},i=this._;for(var s in i)t[s]=i[s].slice();return new n(t)},call:function(t,i){if((n=arguments.length-2)>0)for(var n,s,e=new Array(n),h=0;h<n;++h)e[h]=arguments[h+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(h=0,n=(s=this._[t]).length;h<n;++h)s[h].value.apply(i,e)},apply:function(t,i,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var s=this._[t],e=0,h=s.length;e<h;++e)s[e].value.apply(i,n)}};var _=.7,r=1/_,l="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f=/^#([0-9a-f]{3,8})$/,p=new RegExp(`^rgb\\(${l},${l},${l}\\)$`),x=new RegExp(`^rgb\\(${u},${u},${u}\\)$`),y=new RegExp(`^rgba\\(${l},${l},${l},${c}\\)$`),d=new RegExp(`^rgba\\(${u},${u},${u},${c}\\)$`),w=new RegExp(`^hsl\\(${c},${u},${u}\\)$`),g=new RegExp(`^hsla\\(${c},${u},${u},${c}\\)$`),b={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function $(t){var i,n;return t=(t+"").trim().toLowerCase(),(i=f.exec(t))?(n=i[1].length,i=parseInt(i[1],16),6===n?k(i):3===n?new E(i>>8&15|i>>4&240,i>>4&15|240&i,(15&i)<<4|15&i,1):8===n?N(i>>24&255,i>>16&255,i>>8&255,(255&i)/255):4===n?N(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|240&i,((15&i)<<4|15&i)/255):null):(i=p.exec(t))?new E(i[1],i[2],i[3],1):(i=x.exec(t))?new E(255*i[1]/100,255*i[2]/100,255*i[3]/100,1):(i=y.exec(t))?N(i[1],i[2],i[3],i[4]):(i=d.exec(t))?N(255*i[1]/100,255*i[2]/100,255*i[3]/100,i[4]):(i=w.exec(t))?C(i[1],i[2]/100,i[3]/100,1):(i=g.exec(t))?C(i[1],i[2]/100,i[3]/100,i[4]):b.hasOwnProperty(t)?k(b[t]):"transparent"===t?new E(NaN,NaN,NaN,0):null}function k(t){return new E(t>>16&255,t>>8&255,255&t,1)}function N(t,i,n,s){return s<=0&&(t=i=n=NaN),new E(t,i,n,s)}function M(t){return t instanceof a||(t=$(t)),t?new E((t=t.rgb()).r,t.g,t.b,t.opacity):new E}function T(t,i,n,s){return 1===arguments.length?M(t):new E(t,i,n,null==s?1:s)}function E(t,i,n,s){this.r=+t,this.g=+i,this.b=+n,this.opacity=+s}function S(){return`#${X(this.r)}${X(this.g)}${X(this.b)}`}function P(){const t=q(this.opacity);return`${1===t?"rgb(":"rgba("}${A(this.r)}, ${A(this.g)}, ${A(this.b)}${1===t?")":`, ${t})`}`}function q(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function A(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function X(t){return((t=A(t))<16?"0":"")+t.toString(16)}function C(t,i,n,s){return s<=0?t=i=n=NaN:n<=0||n>=1?t=i=NaN:i<=0&&(t=NaN),new O(t,i,n,s)}function R(t){if(t instanceof O)return new O(t.h,t.s,t.l,t.opacity);if(t instanceof a||(t=$(t)),!t)return new O;if(t instanceof O)return t;var i=(t=t.rgb()).r/255,n=t.g/255,s=t.b/255,e=Math.min(i,n,s),h=Math.max(i,n,s),o=NaN,_=h-e,r=(h+e)/2;return _?(o=i===h?(n-s)/_+6*(n<s):n===h?(s-i)/_+2:(i-n)/_+4,_/=r<.5?h+e:2-h-e,o*=60):_=r>0&&r<1?0:o,new O(o,_,r,t.opacity)}function I(t,i,n,s){return 1===arguments.length?R(t):new O(t,i,n,null==s?1:s)}function O(t,i,n,s){this.h=+t,this.s=+i,this.l=+n,this.opacity=+s}function j(t){return(t=(t||0)%360)<0?t+360:t}function z(t){return Math.max(0,Math.min(1,t||0))}function H(t,i,n){return 255*(t<60?i+(n-i)*t/60:t<180?n:t<240?i+(n-i)*(240-t)/60:i)}function Y(t,i,n,s,e){var h=t*t,o=h*t;return((1-3*t+3*h-o)*i+(4-6*h+3*o)*n+(1+3*t+3*h-3*o)*s+o*e)/6}function L(t){var i=t.length-1;return function(n){var s=n<=0?n=0:n>=1?(n=1,i-1):Math.floor(n*i),e=t[s],h=t[s+1],o=s>0?t[s-1]:2*e-h,a=s<i-1?t[s+2]:2*h-e;return Y((n-s/i)*i,o,e,h,a)}}function D(t){var i=t.length;return function(n){var s=Math.floor(((n%=1)<0?++n:n)*i),e=t[(s+i-1)%i],h=t[s%i],o=t[(s+1)%i],a=t[(s+2)%i];return Y((n-s/i)*i,e,h,o,a)}}h(a,$,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:v,formatHex:v,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return R(this).formatHsl()},formatRgb:m,toString:m}),h(E,T,o(a,{brighter(t){return t=null==t?r:Math.pow(r,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?_:Math.pow(_,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new E(A(this.r),A(this.g),A(this.b),q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:S,formatHex:S,formatHex8:function(){return`#${X(this.r)}${X(this.g)}${X(this.b)}${X(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:P,toString:P})),h(O,I,o(a,{brighter(t){return t=null==t?r:Math.pow(r,t),new O(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?_:Math.pow(_,t),new O(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),i=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,s=n+(n<.5?n:1-n)*i,e=2*n-s;return new E(H(t>=240?t-240:t+120,e,s),H(t,e,s),H(t<120?t+240:t-120,e,s),this.opacity)},clamp(){return new O(j(this.h),z(this.s),z(this.l),q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=q(this.opacity);return`${1===t?"hsl(":"hsla("}${j(this.h)}, ${100*z(this.s)}%, ${100*z(this.l)}%${1===t?")":`, ${t})`}`}}));const F=t=>()=>t;function Z(t,i){return function(n){return t+n*i}}function K(t,i){var n=i-t;return n?Z(t,n>180||n<-180?n-360*Math.round(n/360):n):F(isNaN(t)?i:t)}function Q(t){return 1==(t=+t)?V:function(i,n){return n-i?function(t,i,n){return t=Math.pow(t,n),i=Math.pow(i,n)-t,n=1/n,function(s){return Math.pow(t+s*i,n)}}(i,n,t):F(isNaN(i)?n:i)}}function V(t,i){var n=i-t;return n?Z(t,n):F(isNaN(t)?i:t)}const W=function t(i){var n=Q(i);function s(t,i){var s=n((t=T(t)).r,(i=T(i)).r),e=n(t.g,i.g),h=n(t.b,i.b),o=V(t.opacity,i.opacity);return function(i){return t.r=s(i),t.g=e(i),t.b=h(i),t.opacity=o(i),t+""}}return s.gamma=t,s}(1);function B(t){return function(i){var n,s,e=i.length,h=new Array(e),o=new Array(e),a=new Array(e);for(n=0;n<e;++n)s=T(i[n]),h[n]=s.r||0,o[n]=s.g||0,a[n]=s.b||0;return h=t(h),o=t(o),a=t(a),s.opacity=1,function(t){return s.r=h(t),s.g=o(t),s.b=a(t),s+""}}}var G=B(L),J=B(D);function U(t,i){return t=+t,i=+i,function(n){return t*(1-n)+i*n}}var tt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,it=new RegExp(tt.source,"g");function nt(t,i){var n,s,e,h=tt.lastIndex=it.lastIndex=0,o=-1,a=[],_=[];for(t+="",i+="";(n=tt.exec(t))&&(s=it.exec(i));)(e=s.index)>h&&(e=i.slice(h,e),a[o]?a[o]+=e:a[++o]=e),(n=n[0])===(s=s[0])?a[o]?a[o]+=s:a[++o]=s:(a[++o]=null,_.push({i:o,x:U(n,s)})),h=it.lastIndex;return h<i.length&&(e=i.slice(h),a[o]?a[o]+=e:a[++o]=e),a.length<2?_[0]?function(t){return function(i){return t(i)+""}}(_[0].x):function(t){return function(){return t}}(i):(i=_.length,function(t){for(var n,s=0;s<i;++s)a[(n=_[s]).i]=n.x(t);return a.join("")})}var st,et=180/Math.PI,ht={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ot(t,i,n,s,e,h){var o,a,_;return(o=Math.sqrt(t*t+i*i))&&(t/=o,i/=o),(_=t*n+i*s)&&(n-=t*_,s-=i*_),(a=Math.sqrt(n*n+s*s))&&(n/=a,s/=a,_/=a),t*s<i*n&&(t=-t,i=-i,_=-_,o=-o),{translateX:e,translateY:h,rotate:Math.atan2(i,t)*et,skewX:Math.atan(_)*et,scaleX:o,scaleY:a}}function at(t,i,n,s){function e(t){return t.length?t.pop()+" ":""}return function(h,o){var a=[],_=[];return h=t(h),o=t(o),function(t,s,e,h,o,a){if(t!==e||s!==h){var _=o.push("translate(",null,i,null,n);a.push({i:_-4,x:U(t,e)},{i:_-2,x:U(s,h)})}else(e||h)&&o.push("translate("+e+i+h+n)}(h.translateX,h.translateY,o.translateX,o.translateY,a,_),function(t,i,n,h){t!==i?(t-i>180?i+=360:i-t>180&&(t+=360),h.push({i:n.push(e(n)+"rotate(",null,s)-2,x:U(t,i)})):i&&n.push(e(n)+"rotate("+i+s)}(h.rotate,o.rotate,a,_),function(t,i,n,h){t!==i?h.push({i:n.push(e(n)+"skewX(",null,s)-2,x:U(t,i)}):i&&n.push(e(n)+"skewX("+i+s)}(h.skewX,o.skewX,a,_),function(t,i,n,s,h,o){if(t!==n||i!==s){var a=h.push(e(h)+"scale(",null,",",null,")");o.push({i:a-4,x:U(t,n)},{i:a-2,x:U(i,s)})}else 1===n&&1===s||h.push(e(h)+"scale("+n+","+s+")")}(h.scaleX,h.scaleY,o.scaleX,o.scaleY,a,_),h=o=null,function(t){for(var i,n=-1,s=_.length;++n<s;)a[(i=_[n]).i]=i.x(t);return a.join("")}}}var _t,rt,lt=at((function(t){const i=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?ht:ot(i.a,i.b,i.c,i.d,i.e,i.f)}),"px, ","px)","deg)"),ct=at((function(t){return null==t?ht:(st||(st=document.createElementNS("http://www.w3.org/2000/svg","g")),st.setAttribute("transform",t),(t=st.transform.baseVal.consolidate())?ot((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ht)}),", ",")",")"),ut=0,ft=0,pt=0,xt=0,yt=0,dt=0,wt="object"==typeof performance&&performance.now?performance:Date,gt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function bt(){return yt||(gt(vt),yt=wt.now()+dt)}function vt(){yt=0}function mt(){this._call=this._time=this._next=null}function $t(t,i,n){var s=new mt;return s.restart(t,i,n),s}function kt(){yt=(xt=wt.now())+dt,ut=ft=0;try{!function(){bt(),++ut;for(var t,i=_t;i;)(t=yt-i._time)>=0&&i._call.call(void 0,t),i=i._next;--ut}()}finally{ut=0,function(){var t,i,n=_t,s=1/0;for(;n;)n._call?(s>n._time&&(s=n._time),t=n,n=n._next):(i=n._next,n._next=null,n=t?t._next=i:_t=i);rt=t,Mt(s)}(),yt=0}}function Nt(){var t=wt.now(),i=t-xt;i>1e3&&(dt-=i,xt=t)}function Mt(t){ut||(ft&&(ft=clearTimeout(ft)),t-yt>24?(t<1/0&&(ft=setTimeout(kt,t-wt.now()-dt)),pt&&(pt=clearInterval(pt))):(pt||(xt=wt.now(),pt=setInterval(Nt,1e3)),ut=1,gt(kt)))}function Tt(t){return function(){return t}}mt.prototype=$t.prototype={constructor:mt,restart:function(t,i,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?bt():+n)+(null==i?0:+i),this._next||rt===this||(rt?rt._next=this:_t=this,rt=this),this._call=t,this._time=n,Mt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Mt())}};const Et=Math.abs,St=Math.atan2,Pt=Math.cos,qt=Math.max,At=Math.min,Xt=Math.sin,Ct=Math.sqrt,Rt=1e-12,It=Math.PI,Ot=It/2,jt=2*It;function zt(t){return t>1?0:t<-1?It:Math.acos(t)}function Ht(t){return t>=1?Ot:t<=-1?-Ot:Math.asin(t)}const Yt=Math.PI,Lt=2*Yt,Dt=1e-6,Ft=Lt-Dt;function Zt(t){this._+=t[0];for(let i=1,n=t.length;i<n;++i)this._+=arguments[i]+t[i]}class Kt{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Zt:function(t){let i=Math.floor(t);if(!(i>=0))throw new Error(`invalid digits: ${t}`);if(i>15)return Zt;const n=10**i;return function(t){this._+=t[0];for(let i=1,s=t.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+t[i]}}(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,n,s){this._append`Q${+t},${+i},${this._x1=+n},${this._y1=+s}`}bezierCurveTo(t,i,n,s,e,h){this._append`C${+t},${+i},${+n},${+s},${this._x1=+e},${this._y1=+h}`}arcTo(t,i,n,s,e){if(t=+t,i=+i,n=+n,s=+s,(e=+e)<0)throw new Error(`negative radius: ${e}`);let h=this._x1,o=this._y1,a=n-t,_=s-i,r=h-t,l=o-i,c=r*r+l*l;if(null===this._x1)this._append`M${this._x1=t},${this._y1=i}`;else if(c>Dt)if(Math.abs(l*a-_*r)>Dt&&e){let u=n-h,f=s-o,p=a*a+_*_,x=u*u+f*f,y=Math.sqrt(p),d=Math.sqrt(c),w=e*Math.tan((Yt-Math.acos((p+c-x)/(2*y*d)))/2),g=w/d,b=w/y;Math.abs(g-1)>Dt&&this._append`L${t+g*r},${i+g*l}`,this._append`A${e},${e},0,0,${+(l*u>r*f)},${this._x1=t+b*a},${this._y1=i+b*_}`}else this._append`L${this._x1=t},${this._y1=i}`;else;}arc(t,i,n,s,e,h){if(t=+t,i=+i,h=!!h,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(s),a=n*Math.sin(s),_=t+o,r=i+a,l=1^h,c=h?s-e:e-s;null===this._x1?this._append`M${_},${r}`:(Math.abs(this._x1-_)>Dt||Math.abs(this._y1-r)>Dt)&&this._append`L${_},${r}`,n&&(c<0&&(c=c%Lt+Lt),c>Ft?this._append`A${n},${n},0,1,${l},${t-o},${i-a}A${n},${n},0,1,${l},${this._x1=_},${this._y1=r}`:c>Dt&&this._append`A${n},${n},0,${+(c>=Yt)},${l},${this._x1=t+n*Math.cos(e)},${this._y1=i+n*Math.sin(e)}`)}rect(t,i,n,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${n=+n}v${+s}h${-n}Z`}toString(){return this._}}function Qt(){return new Kt}function Vt(t){let i=3;return t.digits=function(n){if(!arguments.length)return i;if(null==n)i=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);i=t}return t},()=>new Kt(i)}function Wt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Bt(t){this._context=t}function Gt(t){return new Bt(t)}function Jt(t){return t[0]}function Ut(t){return t[1]}function ti(t,i){var n=Tt(!0),s=null,e=Gt,h=null,o=Vt(a);function a(a){var _,r,l,c=(a=Wt(a)).length,u=!1;for(null==s&&(h=e(l=o())),_=0;_<=c;++_)!(_<c&&n(r=a[_],_,a))===u&&((u=!u)?h.lineStart():h.lineEnd()),u&&h.point(+t(r,_,a),+i(r,_,a));if(l)return h=null,l+""||null}return t="function"==typeof t?t:void 0===t?Jt:Tt(t),i="function"==typeof i?i:void 0===i?Ut:Tt(i),a.x=function(i){return arguments.length?(t="function"==typeof i?i:Tt(+i),a):t},a.y=function(t){return arguments.length?(i="function"==typeof t?t:Tt(+t),a):i},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Tt(!!t),a):n},a.curve=function(t){return arguments.length?(e=t,null!=s&&(h=e(s)),a):e},a.context=function(t){return arguments.length?(null==t?s=h=null:h=e(s=t),a):s},a}function ii(){}function ni(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}function si(t){this._context=t}function ei(t){return new si(t)}function hi(t){this._context=t}function oi(t){return new hi(t)}function ai(t){this._context=t}function _i(t){return new ai(t)}function ri(t,i){this._basis=new si(t),this._beta=i}Qt.prototype=Kt.prototype,Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}},si.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ni(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ni(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},hi.prototype={areaStart:ii,areaEnd:ii,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:ni(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},ai.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,s=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,s):this._context.moveTo(n,s);break;case 3:this._point=4;default:ni(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},ri.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var s,e=t[0],h=i[0],o=t[n]-e,a=i[n]-h,_=-1;++_<=n;)s=_/n,this._basis.point(this._beta*t[_]+(1-this._beta)*(e+s*o),this._beta*i[_]+(1-this._beta)*(h+s*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const li=function t(i){function n(t){return 1===i?new si(t):new ri(t,i)}return n.beta=function(i){return t(+i)},n}(.85);function ci(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ui(t,i){this._context=t,this._k=(1-i)/6}ui.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ci(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:ci(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const fi=function t(i){function n(t){return new ui(t,i)}return n.tension=function(i){return t(+i)},n}(0);function pi(t,i){this._context=t,this._k=(1-i)/6}pi.prototype={areaStart:ii,areaEnd:ii,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:ci(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=function t(i){function n(t){return new pi(t,i)}return n.tension=function(i){return t(+i)},n}(0);function yi(t,i){this._context=t,this._k=(1-i)/6}yi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ci(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=function t(i){function n(t){return new yi(t,i)}return n.tension=function(i){return t(+i)},n}(0);function wi(t,i,n){var s=t._x1,e=t._y1,h=t._x2,o=t._y2;if(t._l01_a>Rt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,_=3*t._l01_a*(t._l01_a+t._l12_a);s=(s*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/_,e=(e*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/_}if(t._l23_a>Rt){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);h=(h*r+t._x1*t._l23_2a-i*t._l12_2a)/l,o=(o*r+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(s,e,h,o,t._x2,t._y2)}function gi(t,i){this._context=t,this._alpha=i}gi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:wi(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=function t(i){function n(t){return i?new gi(t,i):new ui(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function vi(t,i){this._context=t,this._alpha=i}vi.prototype={areaStart:ii,areaEnd:ii,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:wi(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=function t(i){function n(t){return i?new vi(t,i):new pi(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function $i(t,i){this._context=t,this._alpha=i}$i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wi(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const ki=function t(i){function n(t){return i?new $i(t,i):new yi(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Ni(t){this._context=t}function Mi(t){return new Ni(t)}function Ti(t){return t<0?-1:1}function Ei(t,i,n){var s=t._x1-t._x0,e=i-t._x1,h=(t._y1-t._y0)/(s||e<0&&-0),o=(n-t._y1)/(e||s<0&&-0),a=(h*e+o*s)/(s+e);return(Ti(h)+Ti(o))*Math.min(Math.abs(h),Math.abs(o),.5*Math.abs(a))||0}function Si(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function Pi(t,i,n){var s=t._x0,e=t._y0,h=t._x1,o=t._y1,a=(h-s)/3;t._context.bezierCurveTo(s+a,e+a*i,h-a,o-a*n,h,o)}function qi(t){this._context=t}function Ai(t){this._context=new Xi(t)}function Xi(t){this._context=t}function Ci(t){return new qi(t)}function Ri(t){return new Ai(t)}function Ii(t){this._context=t}function Oi(t){var i,n,s=t.length-1,e=new Array(s),h=new Array(s),o=new Array(s);for(e[0]=0,h[0]=2,o[0]=t[0]+2*t[1],i=1;i<s-1;++i)e[i]=1,h[i]=4,o[i]=4*t[i]+2*t[i+1];for(e[s-1]=2,h[s-1]=7,o[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)n=e[i]/h[i-1],h[i]-=n,o[i]-=n*o[i-1];for(e[s-1]=o[s-1]/h[s-1],i=s-2;i>=0;--i)e[i]=(o[i]-e[i+1])/h[i];for(h[s-1]=(t[s]+e[s-1])/2,i=0;i<s-1;++i)h[i]=2*t[i+1]-e[i+1];return[e,h]}function ji(t){return new Ii(t)}function zi(t,i){this._context=t,this._t=i}function Hi(t){return new zi(t,.5)}function Yi(t){return new zi(t,0)}function Li(t){return new zi(t,1)}Ni.prototype={areaStart:ii,areaEnd:ii,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},qi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Pi(this,this._t0,Si(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var n=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,Pi(this,Si(this,n=Ei(this,t,i)),n);break;default:Pi(this,this._t0,n=Ei(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}}},(Ai.prototype=Object.create(qi.prototype)).point=function(t,i){qi.prototype.point.call(this,i,t)},Xi.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,n,s,e,h){this._context.bezierCurveTo(i,t,s,n,h,e)}},Ii.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===n)this._context.lineTo(t[1],i[1]);else for(var s=Oi(t),e=Oi(i),h=0,o=1;o<n;++h,++o)this._context.bezierCurveTo(s[0][h],e[0][h],s[1][h],e[1][h],t[o],i[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},zi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i}};export{_ as $,nt as A,$ as B,a as C,Yi as D,Li as E,Hi as F,ji as G,Ri as H,Ci as I,Mi as J,Gt as K,bi as L,ki as M,mi as N,fi as O,di as P,xi as Q,E as R,li as S,_i as T,oi as U,mt as V,$t as W,i as X,ct as Y,lt as Z,bt as _,Et as a,r as a0,I as a1,L as a2,D as a3,G as a4,J as a5,Jt as a6,Ut as a7,Qt as a8,T as a9,Tt as b,Pt as c,Ct as d,Rt as e,St as f,Ht as g,Ot as h,zt as i,qt as j,ei as k,ti as l,At as m,Wt as n,h as o,It as p,o as q,M as r,Xt as s,jt as t,V as u,K as v,Vt as w,F as x,U as y,W as z};
@@ -1 +0,0 @@
1
- import{R as t,r as n,o as a,q as r,C as i,u as e,v as s}from"./step-xJWGRC3d.js";import{c as o,a as u}from"./linear-CVoZ1MzX.js";import{i as c}from"./init-DLRA0X12.js";import{aJ as l,aK as f,aL as h,aM as p,aN as b,aO as y,aP as v,aQ as w,aR as g,aS as m,aT as d,aU as M,aV as N,aW as D,aX as j,aY as k,aZ as I,a_ as x,a$ as P,b0 as q,b1 as L,b2 as R,b3 as S,b4 as Y}from"./index-QV1pM6V_.js";function A(t,n){let a;if(void 0===n)for(const r of t)null!=r&&(a<r||void 0===a&&r>=r)&&(a=r);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(a<i||void 0===a&&i>=i)&&(a=i)}return a}function B(t,n){let a;if(void 0===n)for(const r of t)null!=r&&(a>r||void 0===a&&r>=r)&&(a=r);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(a>i||void 0===a&&i>=i)&&(a=i)}return a}function C(t,n,a,r,i,e){const s=[[f,1,h],[f,5,5*h],[f,15,15*h],[f,30,30*h],[e,1,p],[e,5,5*p],[e,15,15*p],[e,30,30*p],[i,1,b],[i,3,3*b],[i,6,6*b],[i,12,12*b],[r,1,y],[r,2,2*y],[a,1,v],[n,1,w],[n,3,3*w],[t,1,g]];function o(n,a,r){const i=Math.abs(a-n)/r,e=l((([,,t])=>t)).right(s,i);if(e===s.length)return t.every(m(n/g,a/g,r));if(0===e)return d.every(Math.max(m(n,a,r),1));const[o,u]=s[i/s[e-1][2]<s[e][2]/i?e-1:e];return o.every(u)}return[function(t,n,a){const r=n<t;r&&([t,n]=[n,t]);const i=a&&"function"==typeof a.range?a:o(t,n,a),e=i?i.range(t,+n+1):[];return r?e.reverse():e},o]}const[F,J]=C(I,k,j,D,N,M),[K,O]=C(S,R,L,q,P,x),Q=Math.PI/180,T=180/Math.PI,U=.96422,V=.82521,W=4/29,X=6/29,Z=3*X*X,$=X*X*X;function _(a){if(a instanceof E)return new E(a.l,a.a,a.b,a.opacity);if(a instanceof rt)return it(a);a instanceof t||(a=n(a));var r,i,e=nt(a.r),s=nt(a.g),o=nt(a.b),u=G((.2225045*e+.7168786*s+.0606169*o)/1);return e===s&&s===o?r=i=u:(r=G((.4360747*e+.3850649*s+.1430804*o)/U),i=G((.0139322*e+.0971045*s+.7141733*o)/V)),new E(116*u-16,500*(r-u),200*(u-i),a.opacity)}function z(t,n,a,r){return 1===arguments.length?_(t):new E(t,n,a,null==r?1:r)}function E(t,n,a,r){this.l=+t,this.a=+n,this.b=+a,this.opacity=+r}function G(t){return t>$?Math.pow(t,1/3):t/Z+W}function H(t){return t>X?t*t*t:Z*(t-W)}function tt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function nt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function at(t,n,a,r){return 1===arguments.length?function(t){if(t instanceof rt)return new rt(t.h,t.c,t.l,t.opacity);if(t instanceof E||(t=_(t)),0===t.a&&0===t.b)return new rt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*T;return new rt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new rt(t,n,a,null==r?1:r)}function rt(t,n,a,r){this.h=+t,this.c=+n,this.l=+a,this.opacity=+r}function it(t){if(isNaN(t.h))return new E(t.l,0,0,t.opacity);var n=t.h*Q;return new E(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}function et(t){return function(n,a){var r=t((n=at(n)).h,(a=at(a)).h),i=e(n.c,a.c),s=e(n.l,a.l),o=e(n.opacity,a.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=s(t),n.opacity=o(t),n+""}}}a(E,z,r(i,{brighter(t){return new E(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new E(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,a=isNaN(this.a)?n:n+this.a/500,r=isNaN(this.b)?n:n-this.b/200;return a=U*H(a),n=1*H(n),r=V*H(r),new t(tt(3.1338561*a-1.6168667*n-.4906146*r),tt(-.9787684*a+1.9161415*n+.033454*r),tt(.0719453*a-.2289914*n+1.4052427*r),this.opacity)}})),a(rt,at,r(i,{brighter(t){return new rt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new rt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return it(this).rgb()}}));const st=et(s);var ot=et(e);function ut(t,n){var a,r=0,i=(t=t.slice()).length-1,e=t[r],s=t[i];return s<e&&(a=r,r=i,i=a,a=e,e=s,s=a),t[r]=n.floor(e),t[i]=n.ceil(s),t}function ct(t){return new Date(t)}function lt(t){return t instanceof Date?+t:+new Date(+t)}function ft(t,n,a,r,i,e,s,c,l,f){var h=o(),p=h.invert,b=h.domain,y=f(".%L"),v=f(":%S"),w=f("%I:%M"),g=f("%I %p"),m=f("%a %d"),d=f("%b %d"),M=f("%B"),N=f("%Y");function D(t){return(l(t)<t?y:c(t)<t?v:s(t)<t?w:e(t)<t?g:r(t)<t?i(t)<t?m:d:a(t)<t?M:N)(t)}return h.invert=function(t){return new Date(p(t))},h.domain=function(t){return arguments.length?b(Array.from(t,lt)):b().map(ct)},h.ticks=function(n){var a=b();return t(a[0],a[a.length-1],null==n?10:n)},h.tickFormat=function(t,n){return null==n?D:f(n)},h.nice=function(t){var a=b();return t&&"function"==typeof t.range||(t=n(a[0],a[a.length-1],null==t?10:t)),t?b(ut(a,t)):h},h.copy=function(){return u(h,ft(t,n,a,r,i,e,s,c,l,f))},h}function ht(){return c.apply(ft(K,O,S,R,L,q,P,x,f,Y).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{A as a,F as b,ft as c,T as d,at as e,ot as h,st as i,z as l,B as m,ut as n,Q as r,ht as t,J as u};
@@ -1 +0,0 @@
1
- import{_ as t,c as e,l as n,S as i,T as s,V as r,W as a,B as o,X as c,y as l}from"./mermaid-iAIjIGjg.js";import{s as h}from"./transform-CdY8z5kT.js";import{d}from"./arc-B5qYPUYs.js";import"./index-QV1pM6V_.js";import"./step-xJWGRC3d.js";var u=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[6,8,10,11,12,14,16,17,20,21],i=[1,9],s=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,16],l=[1,17],h={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:t((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:18,11:i,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,19]},{15:[1,20]},e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,4]),e(n,[2,9]),e(n,[2,10])],defaultActions:{},parseError:t((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:t((function(e){var n=this,i=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=a.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(e,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc;a.push(g);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){i.length=i.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),t(m,"lex");for(var x,b,k,_,w,v,S,$,E={};;){if(b=i[i.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==x&&(x=m()),k=o[b]&&o[b][x]),void 0===k||!k.length||!k[0]){var T="";for(w in $=[],o[b])this.terminals_[w]&&w>2&&$.push("'"+this.terminals_[w]+"'");T=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[x]||x,line:u.yylineno,loc:g,expected:$})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(k[0]){case 1:i.push(x),r.push(u.yytext),a.push(u.yylloc),i.push(k[1]),x=null,h=u.yyleng,c=u.yytext,l=u.yylineno,g=u.yylloc;break;case 2:if(v=this.productions_[k[1]][1],E.$=r[r.length-v],E._$={first_line:a[a.length-(v||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(v||1)].first_column,last_column:a[a.length-1].last_column},f&&(E._$.range=[a[a.length-(v||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(E,[c,h,l,p.yy,k[1],r,a].concat(d))))return _;v&&(i=i.slice(0,-1*v*2),r=r.slice(0,-1*v),a=a.slice(0,-1*v)),i.push(this.productions_[k[1]][0]),r.push(E.$),a.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0}),"parse")},d=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:t((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 s=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=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],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 r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:t((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 s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/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,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,t(u,"Parser"),u.prototype=h,h.Parser=u,new u}();u.parser=u;var p=u,y={};o(y,{addEvent:()=>E,addSection:()=>w,addTask:()=>$,addTaskOrg:()=>T,clear:()=>_,default:()=>M,getCommonDb:()=>k,getSections:()=>v,getTasks:()=>S});var g="",f=0,m=[],x=[],b=[],k=t((()=>c),"getCommonDb"),_=t((function(){m.length=0,x.length=0,g="",b.length=0,l()}),"clear"),w=t((function(t){g=t,m.push(t)}),"addSection"),v=t((function(){return m}),"getSections"),S=t((function(){let t=I();let e=0;for(;!t&&e<100;)t=I(),e++;return x.push(...b),x}),"getTasks"),$=t((function(t,e,n){const i={id:f++,section:g,type:g,task:t,score:e||0,events:n?[n]:[]};b.push(i)}),"addTask"),E=t((function(t){b.find((t=>t.id===f-1)).events.push(t)}),"addEvent"),T=t((function(t){const e={section:g,type:g,description:t,task:t,classes:[]};x.push(e)}),"addTaskOrg"),I=t((function(){const e=t((function(t){return b[t].processed}),"compileTask");let n=!0;for(const[t,i]of b.entries())e(t),n=n&&i.processed;return n}),"compileTasks"),M={clear:_,getCommonDb:k,addSection:w,getSections:v,getTasks:S,addTask:$,addTaskOrg:T,addEvent:E},N=t((function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n}),"drawRect"),A=t((function(e,n){const i=15,s=e.append("circle").attr("cx",n.cx).attr("cy",n.cy).attr("class","face").attr("r",i).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");function a(t){const e=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(i/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+n.cx+","+(n.cy+2)+")")}function o(t){const e=d().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(i/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+n.cx+","+(n.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",n.cx-5).attr("y1",n.cy+7).attr("x2",n.cx+5).attr("y2",n.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",n.cx-5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",n.cx+5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t(a,"smile"),t(o,"sad"),t(c,"ambivalent"),n.score>3?a(r):n.score<3?o(r):c(r),s}),"drawFace"),C=t((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),L=t((function(t,e){const n=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),i}),"drawText"),P=t((function(e,n){function i(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}t(i,"genPoints");const s=e.append("polygon");s.attr("points",i(n.x,n.y,50,20,7)),s.attr("class","labelBox"),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,L(e,n)}),"drawLabel"),j=t((function(t,e,n){const i=t.append("g"),s=z();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,N(i,s),B(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),H=-1,O=t((function(t,e,n){const i=e.x+n.width/2,s=t.append("g");H++;s.append("line").attr("id","task"+H).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),A(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=z();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,N(s,r),B(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)}),"drawTask"),R=t((function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),D=t((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),z=t((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),B=function(){function e(t,e,n,i,r,a,o,c){s(e.append("text").attr("x",n+r/2).attr("y",i+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function n(t,e,n,i,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(/<br\s*\/?>/gi);for(let p=0;p<u.length;p++){const t=p*h-h*(u.length-1)/2,c=e.append("text").attr("x",n+r/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",d);c.append("tspan").attr("x",n+r/2).attr("dy",t).text(u[p]),c.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(c,o)}}function i(t,e,i,r,a,o,c,l){const h=e.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),n(t,h,i,r,a,o,c,l),s(d,c)}function s(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return t(e,"byText"),t(n,"byTspan"),t(i,"byFo"),t(s,"_setTextAttrs"),function(t){return"fo"===t.textPlacement?i:"old"===t.textPlacement?e:n}}(),W=t((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}),"initGraphics");function F(t,e){t.each((function(){var t,n=h(this),i=n.text().split(/(\s+|<br>)/).reverse(),s=[],r=n.attr("y"),a=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",r).attr("dy",a+"em");for(let c=0;c<i.length;c++)t=i[i.length-1-c],s.push(t),o.text(s.join(" ").trim()),(o.node().getComputedTextLength()>e||"<br>"===t)&&(s.pop(),o.text(s.join(" ").trim()),s="<br>"===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",r).attr("dy","1.1em").text(t))}))}t(F,"wrap");var V=t((function(t,e,n,i){var s;const r=n%12-1,a=t.append("g");e.section=r,a.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r);const o=a.append("g"),c=a.append("g"),l=c.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(F,e.width).node().getBBox(),h=(null==(s=i.fontSize)?void 0:s.replace)?i.fontSize.replace("px",""):i.fontSize;return e.height=l.height+1.1*h*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,c.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),X(o,e,r,i),e}),"drawNode"),G=t((function(t,e,n){var i;const s=t.append("g"),r=s.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(F,e.width).node().getBBox(),a=(null==(i=n.fontSize)?void 0:i.replace)?n.fontSize.replace("px",""):n.fontSize;return s.remove(),r.height+1.1*a*.5+e.padding}),"getVirtualNodeHeight"),X=t((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),q={drawRect:N,drawCircle:C,drawSection:j,drawText:L,drawLabel:P,drawTask:O,drawBackgroundRect:R,getTextObj:D,getNoteRect:z,initGraphics:W,drawNode:V,getVirtualNodeHeight:G},U=t((function(t,s,r,a){var o,c;const l=e(),d=l.leftMargin??50;n.debug("timeline",a.db);const u=l.securityLevel;let p;"sandbox"===u&&(p=h("#i"+s));const y=h("sandbox"===u?p.nodes()[0].contentDocument.body:"body").select("#"+s);y.append("g");const g=a.db.getTasks(),f=a.db.getCommonDb().getDiagramTitle();n.debug("task",g),q.initGraphics(y);const m=a.db.getSections();n.debug("sections",m);let x=0,b=0,k=0,_=0,w=50+d,v=50;_=50;let S=0,$=!0;m.forEach((function(t){const e={number:S,descr:t,section:S,width:150,padding:20,maxHeight:x},i=q.getVirtualNodeHeight(y,e,l);n.debug("sectionHeight before draw",i),x=Math.max(x,i+20)}));let E=0,T=0;n.debug("tasks.length",g.length);for(const[e,i]of g.entries()){const t={number:e,descr:i,section:i.section,width:150,padding:20,maxHeight:b},s=q.getVirtualNodeHeight(y,t,l);n.debug("taskHeight before draw",s),b=Math.max(b,s+20),E=Math.max(E,i.events.length);let r=0;for(const e of i.events){const t={descr:e,section:i.section,number:i.section,width:150,padding:20,maxHeight:50};r+=q.getVirtualNodeHeight(y,t,l)}T=Math.max(T,r)}n.debug("maxSectionHeight before draw",x),n.debug("maxTaskHeight before draw",b),m&&m.length>0?m.forEach((t=>{const e=g.filter((e=>e.section===t)),i={number:S,descr:t,section:S,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:x};n.debug("sectionNode",i);const s=y.append("g"),r=q.drawNode(s,i,S,l);n.debug("sectionNode output",r),s.attr("transform",`translate(${w}, 50)`),v+=x+50,e.length>0&&Y(y,e,S,w,v,b,l,E,T,x,!1),w+=200*Math.max(e.length,1),v=50,S++})):($=!1,Y(y,g,S,w,v,b,l,E,T,x,!0));const I=y.node().getBBox();n.debug("bounds",I),f&&y.append("text").text(f).attr("x",I.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),k=$?x+b+150:b+100;y.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",k).attr("x2",I.width+3*d).attr("y2",k).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),i(void 0,y,(null==(o=l.timeline)?void 0:o.padding)??50,(null==(c=l.timeline)?void 0:c.useMaxWidth)??!1)}),"draw"),Y=t((function(t,e,i,s,r,a,o,c,l,h,d){var u;for(const p of e){const e={descr:p.task,section:i,number:i,width:150,padding:20,maxHeight:a};n.debug("taskNode",e);const c=t.append("g").attr("class","taskWrapper"),y=q.drawNode(c,e,i,o).height;if(n.debug("taskHeight after draw",y),c.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,y),p.events){const e=t.append("g").attr("class","lineWrapper");let n=a;r+=100,n+=Z(t,p.events,i,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!(null==(u=o.timeline)?void 0:u.disableMulticolor)&&i++}r-=10}),"drawTasks"),Z=t((function(t,e,i,s,r,a){let o=0;const c=r;r+=100;for(const l of e){const e={descr:l,section:i,number:i,width:150,padding:20,maxHeight:50};n.debug("eventNode",e);const c=t.append("g").attr("class","eventWrapper"),h=q.drawNode(c,e,i,a).height;o+=h,c.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=c,o}),"drawEvents"),J={setConf:t((()=>{}),"setConf"),draw:U},K=t((t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],s(t["lineColor"+n])?t["lineColor"+n]=r(t["lineColor"+n],20):t["lineColor"+n]=a(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+n]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e}),"genSections"),Q={db:y,renderer:J,parser:p,styles:t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${K(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles")};export{Q as diagram};
@@ -1 +0,0 @@
1
- import{V as t,W as n,X as e,y as r,z as i,A as o,B as u,Y as a,Z as s,_ as l}from"./step-xJWGRC3d.js";var c="http://www.w3.org/1999/xhtml";const f={svg:"http://www.w3.org/2000/svg",xhtml:c,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function h(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),f.hasOwnProperty(n)?{space:f[n],local:t}:t}function p(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===c&&n.documentElement.namespaceURI===c?n.createElement(t):n.createElementNS(e,t)}}function _(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function v(t){var n=h(t);return(n.local?_:p)(n)}function d(){}function y(t){return null==t?d:function(){return this.querySelector(t)}}function m(){return[]}function g(t){return null==t?m:function(){return this.querySelectorAll(t)}}function w(t){return function(){return null==(n=t.apply(this,arguments))?[]:Array.isArray(n)?n:Array.from(n);var n}}function A(t){return function(){return this.matches(t)}}function x(t){return function(n){return n.matches(t)}}var b=Array.prototype.find;function E(){return this.firstElementChild}var S=Array.prototype.filter;function N(){return Array.from(this.children)}function C(t){return new Array(t.length)}function k(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function P(t,n,e,r,i,o){for(var u,a=0,s=n.length,l=o.length;a<l;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new k(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function T(t,n,e,r,i,o,u){var a,s,l,c=new Map,f=n.length,h=o.length,p=new Array(f);for(a=0;a<f;++a)(s=n[a])&&(p[a]=l=u.call(s,s.__data__,a,n)+"",c.has(l)?i[a]=s:c.set(l,s));for(a=0;a<h;++a)l=u.call(t,o[a],a,o)+"",(s=c.get(l))?(r[a]=s,s.__data__=o[a],c.delete(l)):e[a]=new k(t,o[a]);for(a=0;a<f;++a)(s=n[a])&&c.get(p[a])===s&&(i[a]=s)}function L(t){return t.__data__}function B(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function M(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function q(t){return function(){this.removeAttribute(t)}}function D(t){return function(){this.removeAttributeNS(t.space,t.local)}}function O(t,n){return function(){this.setAttribute(t,n)}}function V(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function X(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function z(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Y(t){return function(){this.style.removeProperty(t)}}function H(t,n,e){return function(){this.style.setProperty(t,n,e)}}function I(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function R(t,n){return t.style.getPropertyValue(n)||z(t).getComputedStyle(t,null).getPropertyValue(n)}function U(t){return function(){delete this[t]}}function W(t,n){return function(){this[t]=n}}function Z(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function $(t){return t.trim().split(/^|\s+/)}function F(t){return t.classList||new G(t)}function G(t){this._node=t,this._names=$(t.getAttribute("class")||"")}function J(t,n){for(var e=F(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function K(t,n){for(var e=F(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Q(t){return function(){J(this,t)}}function tt(t){return function(){K(this,t)}}function nt(t,n){return function(){(n.apply(this,arguments)?J:K)(this,t)}}function et(){this.textContent=""}function rt(t){return function(){this.textContent=t}}function it(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ot(){this.innerHTML=""}function ut(t){return function(){this.innerHTML=t}}function at(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function st(){this.nextSibling&&this.parentNode.appendChild(this)}function lt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ct(){return null}function ft(){var t=this.parentNode;t&&t.removeChild(this)}function ht(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function pt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function _t(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function vt(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var u=0,a=i.length;u<a;++u)if((r=i[u]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function dt(t,n,e){var r=z(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function yt(t,n){return function(){return dt(this,t,n)}}function mt(t,n){return function(){return dt(this,t,n.apply(this,arguments))}}k.prototype={constructor:k,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},G.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var gt=[null];function wt(t,n){this._groups=t,this._parents=n}function At(){return new wt([[document.documentElement]],gt)}function xt(t){return"string"==typeof t?new wt([[document.querySelector(t)]],[document.documentElement]):new wt([[t]],gt)}function bt(n,e,r){var i=new t;return e=null==e?0:+e,i.restart((t=>{i.stop(),n(t+e)}),e,r),i}wt.prototype=At.prototype={constructor:wt,select:function(t){"function"!=typeof t&&(t=y(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,l=r[i]=new Array(s),c=0;c<s;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),l[c]=u);return new wt(r,this._parents)},selectAll:function(t){t="function"==typeof t?w(t):g(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new wt(r,i)},selectChild:function(t){return this.select(null==t?E:function(t){return function(){return b.call(this.children,t)}}("function"==typeof t?t:x(t)))},selectChildren:function(t){return this.selectAll(null==t?N:function(t){return function(){return S.call(this.children,t)}}("function"==typeof t?t:x(t)))},filter:function(t){"function"!=typeof t&&(t=A(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new wt(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,L);var e,r=n?T:P,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),c=0;c<u;++c){var f=i[c],h=o[c],p=h.length,_=B(t.call(f,f&&f.__data__,c,i)),v=_.length,d=s[c]=new Array(v),y=a[c]=new Array(v);r(f,h,d,y,l[c]=new Array(p),_,n);for(var m,g,w=0,A=0;w<v;++w)if(m=d[w]){for(w>=A&&(A=w+1);!(g=y[A])&&++A<v;);m._next=g||null}}return(a=new wt(a,i))._enter=s,a._exit=l,a},enter:function(){return new wt(this._enter||this._groups.map(C),this._parents)},exit:function(){return new wt(this._exit||this._groups.map(C),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),a=new Array(i),s=0;s<u;++s)for(var l,c=e[s],f=r[s],h=c.length,p=a[s]=new Array(h),_=0;_<h;++_)(l=c[_]||f[_])&&(p[_]=l);for(;s<i;++s)a[s]=e[s];return new wt(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=M);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new wt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=h(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?D:q:"function"==typeof n?e.local?j:X:e.local?V:O)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?Y:"function"==typeof n?I:H)(t,n,null==e?"":e)):R(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?U:"function"==typeof n?Z:W)(t,n)):this.node()[t]},classed:function(t,n){var e=$(t+"");if(arguments.length<2){for(var r=F(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?nt:n?Q:tt)(e,n))},text:function(t){return arguments.length?this.each(null==t?et:("function"==typeof t?it:rt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?at:ut)(t)):this.node().innerHTML},raise:function(){return this.each(st)},lower:function(){return this.each(lt)},append:function(t){var n="function"==typeof t?t:v(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:v(t),r=null==n?ct:"function"==typeof n?n:y(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ft)},clone:function(t){return this.select(t?pt:ht)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?vt:_t,r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?mt:yt)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,u=i.length;o<u;++o)(r=i[o])&&(yield r)}};var Et=e("start","end","cancel","interrupt"),St=[];function Nt(t,e,r,i,o,u){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function u(t){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)}function a(n){var u,c,f,h;if(1!==r.state)return l();for(u in o)if((h=o[u]).name===r.name){if(3===h.state)return bt(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[u])}if(bt((function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(n))})),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(f=r.tween.length),u=0,c=-1;u<f;++u)(h=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=h);i.length=c+1}}function s(n){for(var e=n<r.duration?r.ease.call(null,n/r.duration):(r.timer.restart(l),r.state=5,1),o=-1,u=i.length;++o<u;)i[o].call(t,e);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var n in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=n(u,0,r.time)}(t,r,{name:e,index:i,group:o,on:Et,tween:St,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:0})}function Ct(t,n){var e=Pt(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function kt(t,n){var e=Pt(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Pt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Tt(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}function Lt(t,n){var e,r;return function(){var i=kt(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function Bt(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=kt(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function Mt(t,n,e){var r=t._id;return t.each((function(){var t=kt(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Pt(t,r).value[n]}}function qt(t,n){var e;return("number"==typeof n?r:n instanceof u?i:(e=u(n))?(n=e,i):o)(t,n)}function Dt(t){return function(){this.removeAttribute(t)}}function Ot(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Vt(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}}function Xt(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}function jt(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}}function zt(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}function Yt(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}function Ht(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i}function It(t,n){return function(){Ct(this,t).delay=+n.apply(this,arguments)}}function Rt(t,n){return n=+n,function(){Ct(this,t).delay=n}}function Ut(t,n){return function(){kt(this,t).duration=+n.apply(this,arguments)}}function Wt(t,n){return n=+n,function(){kt(this,t).duration=n}}var Zt=At.prototype.constructor;function $t(t){return function(){this.style.removeProperty(t)}}var Ft=0;function Gt(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Jt(){return++Ft}var Kt=At.prototype;Gt.prototype={constructor:Gt,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=y(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,s,l=r[u],c=l.length,f=o[u]=new Array(c),h=0;h<c;++h)(a=l[h])&&(s=t.call(a,a.__data__,h,l))&&("__data__"in a&&(s.__data__=a.__data__),f[h]=s,Nt(f[h],n,e,h,f,Pt(a,e)));return new Gt(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=g(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,l=r[a],c=l.length,f=0;f<c;++f)if(s=l[f]){for(var h,p=t.call(s,s.__data__,f,l),_=Pt(s,e),v=0,d=p.length;v<d;++v)(h=p[v])&&Nt(h,n,e,v,p,_);o.push(p),u.push(s)}return new Gt(o,u,n,e)},selectChild:Kt.selectChild,selectChildren:Kt.selectChildren,filter:function(t){"function"!=typeof t&&(t=A(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new Gt(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new Gt(u,this._parents,this._name,this._id)},selection:function(){return new Zt(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Jt(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=Pt(u,n);Nt(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Gt(r,this._parents,t,e)},call:Kt.call,nodes:Kt.nodes,node:Kt.node,size:Kt.size,empty:Kt.empty,each:Kt.each,on:function(t,n){var e=this._id;return arguments.length<2?Pt(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Ct:kt;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=h(t),r="transform"===e?a:qt;return this.attrTween(t,"function"==typeof n?(e.local?zt:jt)(e,r,Mt(this,"attr."+t,n)):null==n?(e.local?Ot:Dt)(e):(e.local?Xt:Vt)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=h(t);return this.tween(e,(r.local?Yt:Ht)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?s:qt;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=R(this,t),u=(this.style.removeProperty(t),R(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,$t(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=R(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=R(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,Mt(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=kt(this,t),l=s.on,c=null==s.value[u]?o||(o=$t(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=R(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Mt(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Pt(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Lt:Bt)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?It:Rt)(n,t)):Pt(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Ut:Wt)(n,t)):Pt(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){kt(this,t).ease=n}}(n,t)):Pt(this.node(),n).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,n){return function(){var e=n.apply(this,arguments);if("function"!=typeof e)throw new Error;kt(this,t).ease=e}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each((function(){var e=kt(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n})),0===i&&o()}))},[Symbol.iterator]:Kt[Symbol.iterator]};var Qt={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function tn(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function nn(t,n,e){this.k=t,this.x=n,this.y=e}At.prototype.interrupt=function(t){return this.each((function(){Tt(this,t)}))},At.prototype.transition=function(t){var n,e;t instanceof Gt?(n=t._id,t=t._name):(n=Jt(),(e=Qt).time=l(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,c=0;c<s;++c)(u=a[c])&&Nt(u,t,n,c,a,e||tn(u,n));return new Gt(r,this._parents,t,n)},nn.prototype={constructor:nn,scale:function(t){return 1===t?this:new nn(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new nn(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var en=new nn(1,0,0);nn.prototype;export{nn as T,Tt as a,en as i,xt as s};