@trohde/earos 1.1.0 → 1.1.2

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 (75) hide show
  1. package/README.md +1 -1
  2. package/assets/init/.agents/skills/earos-assess/SKILL.md +2 -2
  3. package/assets/init/.agents/skills/earos-assess/references/output-templates.md +61 -67
  4. package/assets/init/.agents/skills/earos-calibrate/SKILL.md +1 -1
  5. package/assets/init/.agents/skills/earos-calibrate/references/calibration-protocol.md +1 -1
  6. package/assets/init/.agents/skills/earos-create/references/validation-checklist.md +2 -2
  7. package/assets/init/.agents/skills/earos-profile-author/SKILL.md +1 -1
  8. package/assets/init/CLAUDE.md +46 -8
  9. package/assets/init/README.md +5 -6
  10. package/assets/init/core/core-meta-rubric.yaml +1 -1
  11. package/assets/init/docs/getting-started.md +20 -42
  12. package/assets/init/docs/onboarding/agent-assisted.md +2 -4
  13. package/assets/init/docs/onboarding/first-assessment.md +9 -9
  14. package/assets/init/docs/onboarding/governed-review.md +26 -20
  15. package/assets/init/docs/onboarding/overview.md +36 -36
  16. package/assets/init/docs/onboarding/scaling-optimization.md +2 -4
  17. package/assets/init/docs/profile-authoring-guide.md +1 -1
  18. package/assets/init/docs/terminology.md +4 -4
  19. package/assets/init/profiles/reference-architecture.yaml +1 -1
  20. package/assets/init/standard/EAROS.md +6 -16
  21. package/bin.js +1 -1
  22. package/dist/assets/{_basePickBy-tjzli7kg.js → _basePickBy-PmSUrUsK.js} +1 -1
  23. package/dist/assets/{_baseUniq-BDIo3mC7.js → _baseUniq-HuZouVIz.js} +1 -1
  24. package/dist/assets/{arc-BNok2G7z.js → arc-CJFxtF3d.js} +1 -1
  25. package/dist/assets/{architectureDiagram-2XIMDMQ5-BfsgXkPf.js → architectureDiagram-2XIMDMQ5-XA-oU2UG.js} +1 -1
  26. package/dist/assets/{blockDiagram-WCTKOSBZ-CHbtvtwm.js → blockDiagram-WCTKOSBZ-Oxp-wAST.js} +1 -1
  27. package/dist/assets/{c4Diagram-IC4MRINW-DbyeYqk4.js → c4Diagram-IC4MRINW-D8m5hQH9.js} +1 -1
  28. package/dist/assets/channel-SoktpVBQ.js +1 -0
  29. package/dist/assets/{chunk-4BX2VUAB-y_kN5vwb.js → chunk-4BX2VUAB-D2kBTn2O.js} +1 -1
  30. package/dist/assets/{chunk-55IACEB6-nKxG4YB4.js → chunk-55IACEB6-Dxqrf5oZ.js} +1 -1
  31. package/dist/assets/{chunk-FMBD7UC4-G8-DaCn0.js → chunk-FMBD7UC4-DoOEFFQC.js} +1 -1
  32. package/dist/assets/{chunk-JSJVCQXG-CSg9GaGK.js → chunk-JSJVCQXG-BerphV2K.js} +1 -1
  33. package/dist/assets/{chunk-KX2RTZJC-Cvc1NNLo.js → chunk-KX2RTZJC-CxUAqT05.js} +1 -1
  34. package/dist/assets/{chunk-NQ4KR5QH-BdgusETF.js → chunk-NQ4KR5QH-fCqZgFkU.js} +1 -1
  35. package/dist/assets/{chunk-QZHKN3VN-C3Be-8_s.js → chunk-QZHKN3VN-HlpHnJEy.js} +1 -1
  36. package/dist/assets/{chunk-WL4C6EOR-BYx-KVJV.js → chunk-WL4C6EOR-D9yxAHyd.js} +1 -1
  37. package/dist/assets/classDiagram-VBA2DB6C-BT2AdZTe.js +1 -0
  38. package/dist/assets/classDiagram-v2-RAHNMMFH-BT2AdZTe.js +1 -0
  39. package/dist/assets/clone-DOjIfi5r.js +1 -0
  40. package/dist/assets/{cose-bilkent-S5V4N54A-WC4p5ck2.js → cose-bilkent-S5V4N54A-F5xOBvqW.js} +1 -1
  41. package/dist/assets/{dagre-KLK3FWXG-DFuXM_09.js → dagre-KLK3FWXG-CD3BTpHv.js} +1 -1
  42. package/dist/assets/{diagram-E7M64L7V-CY5dFsoB.js → diagram-E7M64L7V-C3D9MCay.js} +1 -1
  43. package/dist/assets/{diagram-IFDJBPK2-CdbIPwKf.js → diagram-IFDJBPK2-zJBVM-GK.js} +1 -1
  44. package/dist/assets/{diagram-P4PSJMXO-Dj-Y2TLI.js → diagram-P4PSJMXO-BrmFZOLB.js} +1 -1
  45. package/dist/assets/{erDiagram-INFDFZHY-CRxURSRx.js → erDiagram-INFDFZHY-aSMhKiV2.js} +1 -1
  46. package/dist/assets/{flowDiagram-PKNHOUZH-DVdG_DX2.js → flowDiagram-PKNHOUZH-DwgX7l8F.js} +1 -1
  47. package/dist/assets/{ganttDiagram-A5KZAMGK-u-F-vtEM.js → ganttDiagram-A5KZAMGK-C57Hz6QW.js} +1 -1
  48. package/dist/assets/{gitGraphDiagram-K3NZZRJ6-9hE1rUxw.js → gitGraphDiagram-K3NZZRJ6-CuchqqGh.js} +1 -1
  49. package/dist/assets/{graph-DGzCagqF.js → graph-CPFGBV5J.js} +1 -1
  50. package/dist/assets/{index-RCn_0Vmo.js → index-DMt1cpG6.js} +124 -124
  51. package/dist/assets/{infoDiagram-LFFYTUFH-Doiw2_yz.js → infoDiagram-LFFYTUFH-Dd_5tfX7.js} +1 -1
  52. package/dist/assets/{ishikawaDiagram-PHBUUO56-CideeqfA.js → ishikawaDiagram-PHBUUO56-DwosSEvT.js} +1 -1
  53. package/dist/assets/{journeyDiagram-4ABVD52K-CEM9jUEi.js → journeyDiagram-4ABVD52K-BuCxcsX0.js} +1 -1
  54. package/dist/assets/{kanban-definition-K7BYSVSG-v1WwkrFT.js → kanban-definition-K7BYSVSG-DF_1UCkW.js} +1 -1
  55. package/dist/assets/{layout-BJNRwUHc.js → layout-DIcS6m1g.js} +1 -1
  56. package/dist/assets/{linear-CBgec4jE.js → linear-BXkwBhoJ.js} +1 -1
  57. package/dist/assets/{mindmap-definition-YRQLILUH-DpVEEU6a.js → mindmap-definition-YRQLILUH-DcDvYagd.js} +1 -1
  58. package/dist/assets/{pieDiagram-SKSYHLDU-DykxPoNT.js → pieDiagram-SKSYHLDU-BmeDeWDM.js} +1 -1
  59. package/dist/assets/{quadrantDiagram-337W2JSQ-vjyZoEP1.js → quadrantDiagram-337W2JSQ-3zfjULUM.js} +1 -1
  60. package/dist/assets/{requirementDiagram-Z7DCOOCP-CTyxfX0q.js → requirementDiagram-Z7DCOOCP-B2wQMJpq.js} +1 -1
  61. package/dist/assets/{sankeyDiagram-WA2Y5GQK-D4D8fO6M.js → sankeyDiagram-WA2Y5GQK-__kKlCTq.js} +1 -1
  62. package/dist/assets/{sequenceDiagram-2WXFIKYE-3z1v9Ki2.js → sequenceDiagram-2WXFIKYE-B7O81Vih.js} +1 -1
  63. package/dist/assets/{stateDiagram-RAJIS63D-DObK1vcA.js → stateDiagram-RAJIS63D-CcJaDrAK.js} +1 -1
  64. package/dist/assets/stateDiagram-v2-FVOUBMTO-B2goOPt-.js +1 -0
  65. package/dist/assets/{timeline-definition-YZTLITO2-0soOlZ-G.js → timeline-definition-YZTLITO2-DSaQQqIU.js} +1 -1
  66. package/dist/assets/{treemap-KZPCXAKY-Bv1wLSGh.js → treemap-KZPCXAKY-9Hcrd8XD.js} +1 -1
  67. package/dist/assets/{vennDiagram-LZ73GAT5-BujcJNFn.js → vennDiagram-LZ73GAT5-BqHNyca2.js} +1 -1
  68. package/dist/assets/{xychartDiagram-JWTSCODW--HI8jfYV.js → xychartDiagram-JWTSCODW-BqeYf6Fk.js} +1 -1
  69. package/dist/index.html +1 -1
  70. package/package.json +1 -1
  71. package/dist/assets/channel-CuTGY8al.js +0 -1
  72. package/dist/assets/classDiagram-VBA2DB6C-DcC3mUiW.js +0 -1
  73. package/dist/assets/classDiagram-v2-RAHNMMFH-DcC3mUiW.js +0 -1
  74. package/dist/assets/clone-DsLdz8K1.js +0 -1
  75. package/dist/assets/stateDiagram-v2-FVOUBMTO-DnTjW8rz.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_,n as je,c as et,d as kt,l as Q,j as ve,e as ts,f as es,k as S,b as me,s as ss,p as rs,a as as,g as is,q as ns,t as os,J as cs,z as ls,i as vt,u as q,L as U,M as Nt,N as Ce,Z as hs,O as ds,P as Me,G as Gt}from"./index-RCn_0Vmo.js";import{a as Ts,b as Qt,g as lt,d as Es,e as $t,f as jt}from"./chunk-JSJVCQXG-CSg9GaGK.js";import{I as ps}from"./chunk-QZHKN3VN-C3Be-8_s.js";var Xt=function(){var e=_(function(Tt,b,A,N){for(A=A||{},N=Tt.length;N--;A[Tt[N]]=b);return A},"o"),t=[1,2],a=[1,3],s=[1,4],i=[2,4],n=[1,9],o=[1,11],h=[1,12],l=[1,14],r=[1,15],E=[1,17],p=[1,18],f=[1,19],u=[1,25],y=[1,26],I=[1,27],L=[1,28],w=[1,29],P=[1,30],m=[1,31],k=[1,32],v=[1,33],W=[1,34],K=[1,35],H=[1,36],G=[1,37],X=[1,38],z=[1,39],C=[1,40],$=[1,42],J=[1,43],j=[1,44],st=[1,45],rt=[1,46],O=[1,47],R=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],nt=[1,74],ot=[1,80],M=[1,81],te=[1,82],ee=[1,83],se=[1,84],re=[1,85],ae=[1,86],ie=[1,87],ne=[1,88],oe=[1,89],ce=[1,90],le=[1,91],he=[1,92],de=[1,93],Te=[1,94],Ee=[1,95],pe=[1,96],ue=[1,97],_e=[1,98],fe=[1,99],ge=[1,100],xe=[1,101],Ie=[1,102],Re=[1,103],Oe=[1,104],ye=[1,105],Le=[2,78],Lt=[4,5,17,51,53,54],At=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Wt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Kt=[5,52],B=[70,71,72,73],at=[1,151],Ft={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement: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:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,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],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:_(function(b,A,N,g,V,c,bt){var T=c.length-1;switch(V){case 3:return g.apply(c[T]),c[T];case 4:case 10:this.$=[];break;case 5:case 11:c[T-1].push(c[T]),this.$=c[T-1];break;case 6:case 7:case 12:case 13:this.$=c[T];break;case 8:case 9:case 14:this.$=[];break;case 16:c[T].type="createParticipant",this.$=c[T];break;case 17:c[T-1].unshift({type:"boxStart",boxData:g.parseBoxData(c[T-2])}),c[T-1].push({type:"boxEnd",boxText:c[T-2]}),this.$=c[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-2]),sequenceIndexStep:Number(c[T-1]),sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:g.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:c[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:c[T-1].actor};break;case 30:g.setDiagramTitle(c[T].substring(6)),this.$=c[T].substring(6);break;case 31:g.setDiagramTitle(c[T].substring(7)),this.$=c[T].substring(7);break;case 32:this.$=c[T].trim(),g.setAccTitle(this.$);break;case 33:case 34:this.$=c[T].trim(),g.setAccDescription(this.$);break;case 35:c[T-1].unshift({type:"loopStart",loopText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.LOOP_START}),c[T-1].push({type:"loopEnd",loopText:c[T-2],signalType:g.LINETYPE.LOOP_END}),this.$=c[T-1];break;case 36:c[T-1].unshift({type:"rectStart",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_START}),c[T-1].push({type:"rectEnd",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_END}),this.$=c[T-1];break;case 37:c[T-1].unshift({type:"optStart",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_START}),c[T-1].push({type:"optEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_END}),this.$=c[T-1];break;case 38:c[T-1].unshift({type:"altStart",altText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.ALT_START}),c[T-1].push({type:"altEnd",signalType:g.LINETYPE.ALT_END}),this.$=c[T-1];break;case 39:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 40:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_OVER_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 41:c[T-1].unshift({type:"criticalStart",criticalText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.CRITICAL_START}),c[T-1].push({type:"criticalEnd",signalType:g.LINETYPE.CRITICAL_END}),this.$=c[T-1];break;case 42:c[T-1].unshift({type:"breakStart",breakText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_START}),c[T-1].push({type:"breakEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_END}),this.$=c[T-1];break;case 44:this.$=c[T-3].concat([{type:"option",optionText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.CRITICAL_OPTION},c[T]]);break;case 46:this.$=c[T-3].concat([{type:"and",parText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.PAR_AND},c[T]]);break;case 48:this.$=c[T-3].concat([{type:"else",altText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.ALT_ELSE},c[T]]);break;case 49:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 50:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 51:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 52:case 57:c[T-1].draw="actor",c[T-1].type="addParticipant",this.$=c[T-1];break;case 53:c[T-1].type="destroyParticipant",this.$=c[T-1];break;case 54:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 55:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 56:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 58:this.$=[c[T-1],{type:"addNote",placement:c[T-2],actor:c[T-1].actor,text:c[T]}];break;case 59:c[T-2]=[].concat(c[T-1],c[T-1]).slice(0,2),c[T-2][0]=c[T-2][0].actor,c[T-2][1]=c[T-2][1].actor,this.$=[c[T-1],{type:"addNote",placement:g.PLACEMENT.OVER,actor:c[T-2].slice(0,2),text:c[T]}];break;case 60:this.$=[c[T-1],{type:"addLinks",actor:c[T-1].actor,text:c[T]}];break;case 61:this.$=[c[T-1],{type:"addALink",actor:c[T-1].actor,text:c[T]}];break;case 62:this.$=[c[T-1],{type:"addProperties",actor:c[T-1].actor,text:c[T]}];break;case 63:this.$=[c[T-1],{type:"addDetails",actor:c[T-1].actor,text:c[T]}];break;case 66:this.$=[c[T-2],c[T]];break;case 67:this.$=c[T];break;case 68:this.$=g.PLACEMENT.LEFTOF;break;case 69:this.$=g.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0},{type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:c[T-1].actor}];break;case 71:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T]},{type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:c[T-4].actor}];break;case 72:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor}];break;case 73:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T],activate:!1,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-4].actor}];break;case 74:this.$=[c[T-5],c[T-1],{type:"addMessage",from:c[T-5].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-5].actor}];break;case 75:this.$=[c[T-3],c[T-1],{type:"addMessage",from:c[T-3].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T]}];break;case 76:this.$={type:"addParticipant",actor:c[T-1],config:c[T]};break;case 77:this.$=c[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[T]};break;case 79:this.$=g.LINETYPE.SOLID_OPEN;break;case 80:this.$=g.LINETYPE.DOTTED_OPEN;break;case 81:this.$=g.LINETYPE.SOLID;break;case 82:this.$=g.LINETYPE.SOLID_TOP;break;case 83:this.$=g.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=g.LINETYPE.STICK_TOP;break;case 85:this.$=g.LINETYPE.STICK_BOTTOM;break;case 86:this.$=g.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=g.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=g.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=g.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=g.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=g.LINETYPE.DOTTED;break;case 100:this.$=g.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=g.LINETYPE.SOLID_CROSS;break;case 102:this.$=g.LINETYPE.DOTTED_CROSS;break;case 103:this.$=g.LINETYPE.SOLID_POINT;break;case 104:this.$=g.LINETYPE.DOTTED_POINT;break;case 105:this.$=g.parseMessage(c[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:s},{1:[3]},{3:5,4:t,5:a,6:s},{3:6,4:t,5:a,6:s},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},e(R,[2,5]),{9:48,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},e(R,[2,7]),e(R,[2,8]),e(R,[2,9]),e(R,[2,15]),{13:49,51:X,53:z,54:C},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(R,[2,30]),e(R,[2,31]),{33:[1,62]},{35:[1,63]},e(R,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:nt},{23:75,55:76,73:nt},{23:77,73:O},{69:78,72:[1,79],78:ot,79:M,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Le),e(R,[2,6]),e(R,[2,16]),e(Lt,[2,10],{11:114}),e(R,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(R,[2,22]),{5:[1,118]},{5:[1,119]},e(R,[2,25]),e(R,[2,26]),e(R,[2,27]),e(R,[2,28]),e(R,[2,29]),e(R,[2,32]),e(R,[2,33]),e(At,i,{7:120}),e(At,i,{7:121}),e(At,i,{7:122}),e(be,i,{41:123,7:124}),e(Wt,i,{43:125,7:126}),e(Wt,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(At,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Kt,Le,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:O},{69:146,78:ot,79:M,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(B,[2,89]),e(B,[2,90]),e(B,[2,91]),e(B,[2,92]),e(B,[2,93]),e(B,[2,94]),e(B,[2,95]),e(B,[2,96]),e(B,[2,97]),e(B,[2,98]),e(B,[2,99]),e(B,[2,100]),e(B,[2,101]),e(B,[2,102]),e(B,[2,103]),e(B,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:at},{58:152,104:at},{58:153,104:at},{58:154,104:at},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:X,53:z,54:C},{5:[1,160]},e(R,[2,20]),e(R,[2,21]),e(R,[2,23]),e(R,[2,24]),{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,161],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,162],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,163],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,164]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,47],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,50:[1,165],51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,166]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,45],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,49:[1,167],51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,168]},{17:[1,169]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,43],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,48:[1,170],51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,171],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{16:[1,172]},e(R,[2,50]),{16:[1,173]},e(R,[2,55]),e(Kt,[2,76]),{76:[1,174]},{16:[1,175]},e(R,[2,52]),{16:[1,176]},e(R,[2,57]),e(R,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:at},{23:181,72:[1,182],73:O},{58:183,104:at},{58:184,104:at},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(R,[2,17]),e(Lt,[2,11]),{13:186,51:X,53:z,54:C},e(Lt,[2,13]),e(Lt,[2,14]),e(R,[2,19]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),e(R,[2,38]),{16:[1,187]},e(R,[2,39]),{16:[1,188]},e(R,[2,40]),e(R,[2,41]),{16:[1,189]},e(R,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:at},{58:196,104:at},{58:197,104:at},{5:[2,75]},{58:198,104:at},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},e(Lt,[2,12]),e(be,i,{7:124,41:201}),e(Wt,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(R,[2,49]),e(R,[2,54]),e(Kt,[2,77]),e(R,[2,51]),e(R,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:at},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:_(function(b,A){if(A.recoverable)this.trace(b);else{var N=new Error(b);throw N.hash=A,N}},"parseError"),parse:_(function(b){var A=this,N=[0],g=[],V=[null],c=[],bt=this.table,T="",Pt=0,Ne=0,Je=2,Ae=1,Ze=c.slice.call(arguments,1),F=Object.create(this.lexer),ut={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(ut.yy[qt]=this.yy[qt]);F.setInput(b,ut.yy),ut.yy.lexer=F,ut.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var Ht=F.yylloc;c.push(Ht);var Qe=F.options&&F.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(tt){N.length=N.length-2*tt,V.length=V.length-tt,c.length=c.length-tt}_($e,"popStack");function we(){var tt;return tt=g.pop()||F.lex()||Ae,typeof tt!="number"&&(tt instanceof Array&&(g=tt,tt=g.pop()),tt=A.symbols_[tt]||tt),tt}_(we,"lex");for(var Z,_t,it,zt,It={},mt,ht,Pe,Dt;;){if(_t=N[N.length-1],this.defaultActions[_t]?it=this.defaultActions[_t]:((Z===null||typeof Z>"u")&&(Z=we()),it=bt[_t]&&bt[_t][Z]),typeof it>"u"||!it.length||!it[0]){var Ut="";Dt=[];for(mt in bt[_t])this.terminals_[mt]&&mt>Je&&Dt.push("'"+this.terminals_[mt]+"'");F.showPosition?Ut="Parse error on line "+(Pt+1)+`:
1
+ import{_,n as je,c as et,d as kt,l as Q,j as ve,e as ts,f as es,k as S,b as me,s as ss,p as rs,a as as,g as is,q as ns,t as os,J as cs,z as ls,i as vt,u as q,L as U,M as Nt,N as Ce,Z as hs,O as ds,P as Me,G as Gt}from"./index-DMt1cpG6.js";import{a as Ts,b as Qt,g as lt,d as Es,e as $t,f as jt}from"./chunk-JSJVCQXG-BerphV2K.js";import{I as ps}from"./chunk-QZHKN3VN-HlpHnJEy.js";var Xt=function(){var e=_(function(Tt,b,A,N){for(A=A||{},N=Tt.length;N--;A[Tt[N]]=b);return A},"o"),t=[1,2],a=[1,3],s=[1,4],i=[2,4],n=[1,9],o=[1,11],h=[1,12],l=[1,14],r=[1,15],E=[1,17],p=[1,18],f=[1,19],u=[1,25],y=[1,26],I=[1,27],L=[1,28],w=[1,29],P=[1,30],m=[1,31],k=[1,32],v=[1,33],W=[1,34],K=[1,35],H=[1,36],G=[1,37],X=[1,38],z=[1,39],C=[1,40],$=[1,42],J=[1,43],j=[1,44],st=[1,45],rt=[1,46],O=[1,47],R=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],nt=[1,74],ot=[1,80],M=[1,81],te=[1,82],ee=[1,83],se=[1,84],re=[1,85],ae=[1,86],ie=[1,87],ne=[1,88],oe=[1,89],ce=[1,90],le=[1,91],he=[1,92],de=[1,93],Te=[1,94],Ee=[1,95],pe=[1,96],ue=[1,97],_e=[1,98],fe=[1,99],ge=[1,100],xe=[1,101],Ie=[1,102],Re=[1,103],Oe=[1,104],ye=[1,105],Le=[2,78],Lt=[4,5,17,51,53,54],At=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Wt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Kt=[5,52],B=[70,71,72,73],at=[1,151],Ft={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement: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:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,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],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:_(function(b,A,N,g,V,c,bt){var T=c.length-1;switch(V){case 3:return g.apply(c[T]),c[T];case 4:case 10:this.$=[];break;case 5:case 11:c[T-1].push(c[T]),this.$=c[T-1];break;case 6:case 7:case 12:case 13:this.$=c[T];break;case 8:case 9:case 14:this.$=[];break;case 16:c[T].type="createParticipant",this.$=c[T];break;case 17:c[T-1].unshift({type:"boxStart",boxData:g.parseBoxData(c[T-2])}),c[T-1].push({type:"boxEnd",boxText:c[T-2]}),this.$=c[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-2]),sequenceIndexStep:Number(c[T-1]),sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:g.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:c[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:c[T-1].actor};break;case 30:g.setDiagramTitle(c[T].substring(6)),this.$=c[T].substring(6);break;case 31:g.setDiagramTitle(c[T].substring(7)),this.$=c[T].substring(7);break;case 32:this.$=c[T].trim(),g.setAccTitle(this.$);break;case 33:case 34:this.$=c[T].trim(),g.setAccDescription(this.$);break;case 35:c[T-1].unshift({type:"loopStart",loopText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.LOOP_START}),c[T-1].push({type:"loopEnd",loopText:c[T-2],signalType:g.LINETYPE.LOOP_END}),this.$=c[T-1];break;case 36:c[T-1].unshift({type:"rectStart",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_START}),c[T-1].push({type:"rectEnd",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_END}),this.$=c[T-1];break;case 37:c[T-1].unshift({type:"optStart",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_START}),c[T-1].push({type:"optEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_END}),this.$=c[T-1];break;case 38:c[T-1].unshift({type:"altStart",altText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.ALT_START}),c[T-1].push({type:"altEnd",signalType:g.LINETYPE.ALT_END}),this.$=c[T-1];break;case 39:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 40:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_OVER_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 41:c[T-1].unshift({type:"criticalStart",criticalText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.CRITICAL_START}),c[T-1].push({type:"criticalEnd",signalType:g.LINETYPE.CRITICAL_END}),this.$=c[T-1];break;case 42:c[T-1].unshift({type:"breakStart",breakText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_START}),c[T-1].push({type:"breakEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_END}),this.$=c[T-1];break;case 44:this.$=c[T-3].concat([{type:"option",optionText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.CRITICAL_OPTION},c[T]]);break;case 46:this.$=c[T-3].concat([{type:"and",parText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.PAR_AND},c[T]]);break;case 48:this.$=c[T-3].concat([{type:"else",altText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.ALT_ELSE},c[T]]);break;case 49:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 50:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 51:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 52:case 57:c[T-1].draw="actor",c[T-1].type="addParticipant",this.$=c[T-1];break;case 53:c[T-1].type="destroyParticipant",this.$=c[T-1];break;case 54:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 55:c[T-1].draw="participant",c[T-1].type="addParticipant",this.$=c[T-1];break;case 56:c[T-3].draw="actor",c[T-3].type="addParticipant",c[T-3].description=g.parseMessage(c[T-1]),this.$=c[T-3];break;case 58:this.$=[c[T-1],{type:"addNote",placement:c[T-2],actor:c[T-1].actor,text:c[T]}];break;case 59:c[T-2]=[].concat(c[T-1],c[T-1]).slice(0,2),c[T-2][0]=c[T-2][0].actor,c[T-2][1]=c[T-2][1].actor,this.$=[c[T-1],{type:"addNote",placement:g.PLACEMENT.OVER,actor:c[T-2].slice(0,2),text:c[T]}];break;case 60:this.$=[c[T-1],{type:"addLinks",actor:c[T-1].actor,text:c[T]}];break;case 61:this.$=[c[T-1],{type:"addALink",actor:c[T-1].actor,text:c[T]}];break;case 62:this.$=[c[T-1],{type:"addProperties",actor:c[T-1].actor,text:c[T]}];break;case 63:this.$=[c[T-1],{type:"addDetails",actor:c[T-1].actor,text:c[T]}];break;case 66:this.$=[c[T-2],c[T]];break;case 67:this.$=c[T];break;case 68:this.$=g.PLACEMENT.LEFTOF;break;case 69:this.$=g.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0},{type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:c[T-1].actor}];break;case 71:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T]},{type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:c[T-4].actor}];break;case 72:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor}];break;case 73:this.$=[c[T-4],c[T-1],{type:"addMessage",from:c[T-4].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T],activate:!1,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-4].actor}];break;case 74:this.$=[c[T-5],c[T-1],{type:"addMessage",from:c[T-5].actor,to:c[T-1].actor,signalType:c[T-3],msg:c[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[T-5].actor}];break;case 75:this.$=[c[T-3],c[T-1],{type:"addMessage",from:c[T-3].actor,to:c[T-1].actor,signalType:c[T-2],msg:c[T]}];break;case 76:this.$={type:"addParticipant",actor:c[T-1],config:c[T]};break;case 77:this.$=c[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[T]};break;case 79:this.$=g.LINETYPE.SOLID_OPEN;break;case 80:this.$=g.LINETYPE.DOTTED_OPEN;break;case 81:this.$=g.LINETYPE.SOLID;break;case 82:this.$=g.LINETYPE.SOLID_TOP;break;case 83:this.$=g.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=g.LINETYPE.STICK_TOP;break;case 85:this.$=g.LINETYPE.STICK_BOTTOM;break;case 86:this.$=g.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=g.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=g.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=g.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=g.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=g.LINETYPE.DOTTED;break;case 100:this.$=g.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=g.LINETYPE.SOLID_CROSS;break;case 102:this.$=g.LINETYPE.DOTTED_CROSS;break;case 103:this.$=g.LINETYPE.SOLID_POINT;break;case 104:this.$=g.LINETYPE.DOTTED_POINT;break;case 105:this.$=g.parseMessage(c[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:s},{1:[3]},{3:5,4:t,5:a,6:s},{3:6,4:t,5:a,6:s},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},e(R,[2,5]),{9:48,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},e(R,[2,7]),e(R,[2,8]),e(R,[2,9]),e(R,[2,15]),{13:49,51:X,53:z,54:C},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(R,[2,30]),e(R,[2,31]),{33:[1,62]},{35:[1,63]},e(R,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:nt},{23:75,55:76,73:nt},{23:77,73:O},{69:78,72:[1,79],78:ot,79:M,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Le),e(R,[2,6]),e(R,[2,16]),e(Lt,[2,10],{11:114}),e(R,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(R,[2,22]),{5:[1,118]},{5:[1,119]},e(R,[2,25]),e(R,[2,26]),e(R,[2,27]),e(R,[2,28]),e(R,[2,29]),e(R,[2,32]),e(R,[2,33]),e(At,i,{7:120}),e(At,i,{7:121}),e(At,i,{7:122}),e(be,i,{41:123,7:124}),e(Wt,i,{43:125,7:126}),e(Wt,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(At,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Kt,Le,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:O},{69:146,78:ot,79:M,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(B,[2,89]),e(B,[2,90]),e(B,[2,91]),e(B,[2,92]),e(B,[2,93]),e(B,[2,94]),e(B,[2,95]),e(B,[2,96]),e(B,[2,97]),e(B,[2,98]),e(B,[2,99]),e(B,[2,100]),e(B,[2,101]),e(B,[2,102]),e(B,[2,103]),e(B,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:at},{58:152,104:at},{58:153,104:at},{58:154,104:at},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:X,53:z,54:C},{5:[1,160]},e(R,[2,20]),e(R,[2,21]),e(R,[2,23]),e(R,[2,24]),{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,161],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,162],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,163],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,164]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,47],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,50:[1,165],51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,166]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,45],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,49:[1,167],51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,168]},{17:[1,169]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,43],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,48:[1,170],51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,171],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:I,34:L,36:w,37:P,38:m,39:k,40:v,42:W,44:K,45:H,47:G,51:X,53:z,54:C,56:$,61:J,62:j,63:st,64:rt,73:O},{16:[1,172]},e(R,[2,50]),{16:[1,173]},e(R,[2,55]),e(Kt,[2,76]),{76:[1,174]},{16:[1,175]},e(R,[2,52]),{16:[1,176]},e(R,[2,57]),e(R,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:at},{23:181,72:[1,182],73:O},{58:183,104:at},{58:184,104:at},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(R,[2,17]),e(Lt,[2,11]),{13:186,51:X,53:z,54:C},e(Lt,[2,13]),e(Lt,[2,14]),e(R,[2,19]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),e(R,[2,38]),{16:[1,187]},e(R,[2,39]),{16:[1,188]},e(R,[2,40]),e(R,[2,41]),{16:[1,189]},e(R,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:at},{58:196,104:at},{58:197,104:at},{5:[2,75]},{58:198,104:at},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},e(Lt,[2,12]),e(be,i,{7:124,41:201}),e(Wt,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(R,[2,49]),e(R,[2,54]),e(Kt,[2,77]),e(R,[2,51]),e(R,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:at},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:_(function(b,A){if(A.recoverable)this.trace(b);else{var N=new Error(b);throw N.hash=A,N}},"parseError"),parse:_(function(b){var A=this,N=[0],g=[],V=[null],c=[],bt=this.table,T="",Pt=0,Ne=0,Je=2,Ae=1,Ze=c.slice.call(arguments,1),F=Object.create(this.lexer),ut={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(ut.yy[qt]=this.yy[qt]);F.setInput(b,ut.yy),ut.yy.lexer=F,ut.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var Ht=F.yylloc;c.push(Ht);var Qe=F.options&&F.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(tt){N.length=N.length-2*tt,V.length=V.length-tt,c.length=c.length-tt}_($e,"popStack");function we(){var tt;return tt=g.pop()||F.lex()||Ae,typeof tt!="number"&&(tt instanceof Array&&(g=tt,tt=g.pop()),tt=A.symbols_[tt]||tt),tt}_(we,"lex");for(var Z,_t,it,zt,It={},mt,ht,Pe,Dt;;){if(_t=N[N.length-1],this.defaultActions[_t]?it=this.defaultActions[_t]:((Z===null||typeof Z>"u")&&(Z=we()),it=bt[_t]&&bt[_t][Z]),typeof it>"u"||!it.length||!it[0]){var Ut="";Dt=[];for(mt in bt[_t])this.terminals_[mt]&&mt>Je&&Dt.push("'"+this.terminals_[mt]+"'");F.showPosition?Ut="Parse error on line "+(Pt+1)+`:
2
2
  `+F.showPosition()+`
3
3
  Expecting `+Dt.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":Ut="Parse error on line "+(Pt+1)+": Unexpected "+(Z==Ae?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(Ut,{text:F.match,token:this.terminals_[Z]||Z,line:F.yylineno,loc:Ht,expected:Dt})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_t+", token: "+Z);switch(it[0]){case 1:N.push(Z),V.push(F.yytext),c.push(F.yylloc),N.push(it[1]),Z=null,Ne=F.yyleng,T=F.yytext,Pt=F.yylineno,Ht=F.yylloc;break;case 2:if(ht=this.productions_[it[1]][1],It.$=V[V.length-ht],It._$={first_line:c[c.length-(ht||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ht||1)].first_column,last_column:c[c.length-1].last_column},Qe&&(It._$.range=[c[c.length-(ht||1)].range[0],c[c.length-1].range[1]]),zt=this.performAction.apply(It,[T,Ne,Pt,ut.yy,it[1],V,c].concat(Ze)),typeof zt<"u")return zt;ht&&(N=N.slice(0,-1*ht*2),V=V.slice(0,-1*ht),c=c.slice(0,-1*ht)),N.push(this.productions_[it[1]][0]),V.push(It.$),c.push(It._$),Pe=bt[N[N.length-2]][N[N.length-1]],N.push(Pe);break;case 3:return!0}}return!0},"parse")},Xe=function(){var Tt={EOF:1,parseError:_(function(A,N){if(this.yy.parser)this.yy.parser.parseError(A,N);else throw new Error(A)},"parseError"),setInput:_(function(b,A){return this.yy=A||this.yy||{},this._input=b,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:_(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var A=b.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},"input"),unput:_(function(b){var A=b.length,N=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var g=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 V=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===g.length?this.yylloc.first_column:0)+g[g.length-N.length].length-N[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(b){this.unput(this.match.slice(b))},"less"),pastInput:_(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var b=this.pastInput(),A=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{s as G,a as W,S as N}from"./chunk-NQ4KR5QH-BdgusETF.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-RCn_0Vmo.js";import{G as O}from"./graph-DGzCagqF.js";import{l as J}from"./layout-BJNRwUHc.js";import"./chunk-55IACEB6-nKxG4YB4.js";import"./chunk-KX2RTZJC-Cvc1NNLo.js";import"./_baseUniq-BDIo3mC7.js";import"./_basePickBy-tjzli7kg.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),R=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+R).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}R++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.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"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();A(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:G,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram};
1
+ import{s as G,a as W,S as N}from"./chunk-NQ4KR5QH-fCqZgFkU.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-DMt1cpG6.js";import{G as O}from"./graph-CPFGBV5J.js";import{l as J}from"./layout-DIcS6m1g.js";import"./chunk-55IACEB6-Dxqrf5oZ.js";import"./chunk-KX2RTZJC-CxUAqT05.js";import"./_baseUniq-HuZouVIz.js";import"./_basePickBy-PmSUrUsK.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),R=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+R).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}R++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.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"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();A(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:G,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram};
@@ -0,0 +1 @@
1
+ import{s as t,b as r,a,S as s}from"./chunk-NQ4KR5QH-fCqZgFkU.js";import{_ as i}from"./index-DMt1cpG6.js";import"./chunk-55IACEB6-Dxqrf5oZ.js";import"./chunk-KX2RTZJC-CxUAqT05.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as s,c as xt,l as E,d as q,V as kt,W as vt,X as _t,Y as bt,C as wt,$ as St,z as Et}from"./index-RCn_0Vmo.js";import{d as nt}from"./arc-BNok2G7z.js";var X=function(){var n=s(function(f,r,a,h){for(a=a||{},h=f.length;h--;a[f[h]]=r);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(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:s(function(r,a,h,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},"parseError"),parse:s(function(r){var a=this,h=[0],u=[],y=[null],o=[],S=this.table,k="",$=0,C=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(N.yy[L]=this.yy[L]);v.setInput(r,N.yy),N.yy.lexer=v,N.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var b=v.yylloc;o.push(b);var M=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(T){h.length=h.length-2*T,y.length=y.length-T,o.length=o.length-T}s(R,"popStack");function A(){var T;return T=u.pop()||v.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=a.symbols_[T]||T),T}s(A,"lex");for(var w,H,I,K,F={},j,P,et,G;;){if(H=h[h.length-1],this.defaultActions[H]?I=this.defaultActions[H]:((w===null||typeof w>"u")&&(w=A()),I=S[H]&&S[H][w]),typeof I>"u"||!I.length||!I[0]){var Q="";G=[];for(j in S[H])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+($+1)+`:
1
+ import{_ as s,c as xt,l as E,d as q,V as kt,W as vt,X as _t,Y as bt,C as wt,$ as St,z as Et}from"./index-DMt1cpG6.js";import{d as nt}from"./arc-CJFxtF3d.js";var X=function(){var n=s(function(f,r,a,h){for(a=a||{},h=f.length;h--;a[f[h]]=r);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(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:s(function(r,a,h,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},"parseError"),parse:s(function(r){var a=this,h=[0],u=[],y=[null],o=[],S=this.table,k="",$=0,C=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(N.yy[L]=this.yy[L]);v.setInput(r,N.yy),N.yy.lexer=v,N.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var b=v.yylloc;o.push(b);var M=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(T){h.length=h.length-2*T,y.length=y.length-T,o.length=o.length-T}s(R,"popStack");function A(){var T;return T=u.pop()||v.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=a.symbols_[T]||T),T}s(A,"lex");for(var w,H,I,K,F={},j,P,et,G;;){if(H=h[h.length-1],this.defaultActions[H]?I=this.defaultActions[H]:((w===null||typeof w>"u")&&(w=A()),I=S[H]&&S[H][w]),typeof I>"u"||!I.length||!I[0]){var Q="";G=[];for(j in S[H])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+($+1)+`:
2
2
  `+v.showPosition()+`
3
3
  Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+($+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:b,expected:G})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+w);switch(I[0]){case 1:h.push(w),y.push(v.yytext),o.push(v.yylloc),h.push(I[1]),w=null,C=v.yyleng,k=v.yytext,$=v.yylineno,b=v.yylloc;break;case 2:if(P=this.productions_[I[1]][1],F.$=y[y.length-P],F._$={first_line:o[o.length-(P||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(P||1)].first_column,last_column:o[o.length-1].last_column},M&&(F._$.range=[o[o.length-(P||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(F,[k,C,$,N.yy,I[1],y,o].concat(O)),typeof K<"u")return K;P&&(h=h.slice(0,-1*P*2),y=y.slice(0,-1*P),o=o.slice(0,-1*P)),h.push(this.productions_[I[1]][0]),y.push(F.$),o.push(F._$),et=S[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=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),h.length-1&&(this.yylineno-=h.length-1);var y=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:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- var Qp=Object.defineProperty;var Zp=(t,e,n)=>e in t?Qp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var fn=(t,e,n)=>Zp(t,typeof e!="symbol"?e+"":e,n);import{bF as em,bG as tm,aZ as Mf,bp as nm,b1 as rm,a_ as ze,aC as im,aD as su,bf as sm,bi as Ff,bj as Gf,bg as am,bu as au,aF as Qn,aG as oe,a$ as om,aV as cm,aL as Rt,bH as lm,bI as Ln}from"./index-RCn_0Vmo.js";import{k as Wr,j as Il,g as li,S as um,w as dm,x as fm,c as Uf,v as Oe,y as jf,l as hm,z as pm,A as mm,B as gm,C as ym,a as zf,d as j,i as nn,r as Qe,f as pt,D as Fe}from"./_baseUniq-BDIo3mC7.js";import{j as $l,m as M,d as Tm,f as vt,g as Vr,h as B,i as Pl,l as Wn,e as Rm}from"./_basePickBy-tjzli7kg.js";import{c as qe}from"./clone-DsLdz8K1.js";var vm=Object.prototype,Em=vm.hasOwnProperty,ht=em(function(t,e){if(tm(e)||Mf(e)){nm(e,Wr(e),t);return}for(var n in e)Em.call(e,n)&&rm(t,n,e[n])});function Bf(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function cs(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function Am(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function Sm(t,e,n,r){return Il(t,function(i,s,a){e(r,i,n(i),a)}),r}function Cm(t,e){return function(n,r){var i=ze(n)?Am:Sm,s=e?e():{};return i(n,t,li(r),s)}}var km=200;function Nm(t,e,n,r){var i=-1,s=dm,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=km&&(s=fm,a=!1,e=new um(e));e:for(;++i<o;){var d=t[i],h=d;if(d=d!==0?d:0,a&&h===h){for(var p=l;p--;)if(e[p]===h)continue e;c.push(d)}else s(e,h,r)||c.push(d)}return c}var Ua=im(function(t,e){return su(t)?Nm(t,Uf(e,1,su,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:$l(e),Bf(t,e<0?0:e,r)):[]}function Vi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:$l(e),e=r-e,Bf(t,0,e<0?0:e)):[]}function wm(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function bm(t,e){var n=!0;return Il(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function _t(t,e,n){var r=ze(t)?wm:bm;return r(t,li(e))}function $t(t){return t&&t.length?t[0]:void 0}function ft(t,e){return Uf(M(t,e))}var _m=Object.prototype,Im=_m.hasOwnProperty,$m=Cm(function(t,e,n){Im.call(t,n)?t[n].push(e):sm(t,n,[e])}),Pm="[object String]";function it(t){return typeof t=="string"||!ze(t)&&Ff(t)&&Gf(t)==Pm}var Lm=Math.max;function tt(t,e,n,r){t=Mf(t)?t:Oe(t),n=n?$l(n):0;var i=t.length;return n<0&&(n=Lm(i+n,0)),it(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&jf(t,e,n)>-1}function ou(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return jf(t,e,i)}var Om="[object RegExp]";function xm(t){return Ff(t)&&Gf(t)==Om}var cu=au&&au.isRegExp,rn=cu?am(cu):xm,Dm="Expected a function";function Mm(t){if(typeof t!="function")throw new TypeError(Dm);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Pt(t,e){if(t==null)return{};var n=hm(pm(t),function(r){return[r]});return e=li(e),Tm(t,n,function(r,i){return e(r,i[0])})}function ja(t,e){var n=ze(t)?mm:gm;return n(t,Mm(li(e)))}function Fm(t,e){var n;return Il(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function qf(t,e,n){var r=ze(t)?ym:Fm;return r(t,li(e))}function Ll(t){return t&&t.length?zf(t):[]}function Gm(t,e){return t&&t.length?zf(t,li(e)):[]}function Ke(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function wt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function pn(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Um(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function ki(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Wf{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return Ke(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Ki(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Vf(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Kf(t){return Ki(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ut})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=jm(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ut:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ut})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(la(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ut})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(la(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ut})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ut:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ut})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function jm(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function la(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Hf=new Ue(()=>{},()=>ut),ut=Object.freeze({done:!0,value:void 0});function he(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(la(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ut)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];la(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ut}):Hf}class Ol extends Ue{constructor(e,n,r){super(()=>({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ut})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Fo;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(Fo||(Fo={}));function Go(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ke(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Go(i,e))}):Ke(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Go(r,e)))}function za(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Hs(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Hs(t){for(;t.$container;)t=t.$container;return t}function lu(t){return wt(t)?t.ref?[t.ref]:[]:pn(t)?t.items.map(e=>e.ref):[]}function xl(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(Ke(s)){if(r.keyIndex++,uu(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(Ke(o)&&uu(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ut})}function ls(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Ol(t,n=>xl(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Ol(t,n=>xl(n,e),{includeRoot:!0})}function uu(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?ug(n,e):!1}function ua(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(wt(r)||pn(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(wt(s)||pn(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ut})}function zm(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Yf(i.defaultValue))}function Yf(t){return Array.isArray(t)?[...t.map(Yf)]:t}const lt={$type:"AbstractElement",cardinality:"cardinality"};function Bm(t){return Z.isInstance(t,lt.$type)}const Ys={$type:"AbstractParserRule"};function us(t){return Z.isInstance(t,Ys.$type)}const Ds={$type:"AbstractRule"},kt={$type:"AbstractType"},Dn={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ba(t){return Z.isInstance(t,Dn.$type)}const Xs={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Xf(t){return Z.isInstance(t,Xs.$type)}const du={$type:"ArrayLiteral",elements:"elements"},fu={$type:"ArrayType",elementType:"elementType"},Mn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Vn(t){return Z.isInstance(t,Mn.$type)}const Uo={$type:"BooleanLiteral",true:"true"};function qm(t){return Z.isInstance(t,Uo.$type)}const Fn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Wm(t){return Z.isInstance(t,Fn.$type)}const sr={$type:"Condition"},Js={$type:"Conjunction",left:"left",right:"right"};function Vm(t){return Z.isInstance(t,Js.$type)}const Gn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function qa(t){return Z.isInstance(t,Gn.$type)}const Qs={$type:"Disjunction",left:"left",right:"right"};function Km(t){return Z.isInstance(t,Qs.$type)}const jo={$type:"EndOfFile",cardinality:"cardinality"};function Hm(t){return Z.isInstance(t,jo.$type)}const On={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},hu={$type:"GrammarImport",path:"path"},dr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Dl(t){return Z.isInstance(t,dr.$type)}const zo={$type:"InferredType",name:"name"};function Jf(t){return Z.isInstance(t,zo.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function da(t){return Z.isInstance(t,Vt.$type)}const yo={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},pu={$type:"InfixRuleOperators",precedences:"precedences"},Oi={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Ym(t){return Z.isInstance(t,Oi.$type)}const xi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Kn(t){return Z.isInstance(t,xi.$type)}const Ms={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},fr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Xm(t){return Z.isInstance(t,fr.$type)}const Bo={$type:"Negation",value:"value"};function Jm(t){return Z.isInstance(t,Bo.$type)}const mu={$type:"NumberLiteral",value:"value"},Fs={$type:"Parameter",name:"name"},qo={$type:"ParameterReference",parameter:"parameter"};function Qm(t){return Z.isInstance(t,qo.$type)}const Dt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function on(t){return Z.isInstance(t,Dt.$type)}const To={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},hr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Zm(t){return Z.isInstance(t,hr.$type)}const Wo={$type:"ReturnType",name:"name"};function eg(t){return Z.isInstance(t,Wo.$type)}const pr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Hn(t){return Z.isInstance(t,pr.$type)}const Di={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function tg(t){return Z.isInstance(t,Di.$type)}const gu={$type:"StringLiteral",value:"value"},mr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function ng(t){return Z.isInstance(t,mr.$type)}const yt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},gr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function rg(t){return Z.isInstance(t,gr.$type)}const hn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function cn(t){return Z.isInstance(t,hn.$type)}const yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ig(t){return Z.isInstance(t,yr.$type)}const Zs={$type:"Type",name:"name",type:"type"};function sg(t){return Z.isInstance(t,Zs.$type)}const Ni={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},wi={$type:"TypeDefinition"},yu={$type:"UnionType",types:"types"},ea={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Qf(t){return Z.isInstance(t,ea.$type)}const Tr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ag(t){return Z.isInstance(t,Tr.$type)}const bi={$type:"ValueLiteral"},Mi={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function og(t){return Z.isInstance(t,Mi.$type)}class Zf extends Wf{constructor(){super(...arguments),this.types={AbstractElement:{name:lt.$type,properties:{cardinality:{name:lt.cardinality}},superTypes:[]},AbstractParserRule:{name:Ys.$type,properties:{},superTypes:[Ds.$type,kt.$type]},AbstractRule:{name:Ds.$type,properties:{},superTypes:[]},AbstractType:{name:kt.$type,properties:{},superTypes:[]},Action:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},feature:{name:Dn.feature},inferredType:{name:Dn.inferredType},operator:{name:Dn.operator},type:{name:Dn.type,referenceType:kt.$type}},superTypes:[lt.$type]},Alternatives:{name:Xs.$type,properties:{cardinality:{name:Xs.cardinality},elements:{name:Xs.elements,defaultValue:[]}},superTypes:[lt.$type]},ArrayLiteral:{name:du.$type,properties:{elements:{name:du.elements,defaultValue:[]}},superTypes:[bi.$type]},ArrayType:{name:fu.$type,properties:{elementType:{name:fu.elementType}},superTypes:[wi.$type]},Assignment:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},feature:{name:Mn.feature},operator:{name:Mn.operator},predicate:{name:Mn.predicate},terminal:{name:Mn.terminal}},superTypes:[lt.$type]},BooleanLiteral:{name:Uo.$type,properties:{true:{name:Uo.true,defaultValue:!1}},superTypes:[sr.$type,bi.$type]},CharacterRange:{name:Fn.$type,properties:{cardinality:{name:Fn.cardinality},left:{name:Fn.left},lookahead:{name:Fn.lookahead},parenthesized:{name:Fn.parenthesized,defaultValue:!1},right:{name:Fn.right}},superTypes:[yt.$type]},Condition:{name:sr.$type,properties:{},superTypes:[]},Conjunction:{name:Js.$type,properties:{left:{name:Js.left},right:{name:Js.right}},superTypes:[sr.$type]},CrossReference:{name:Gn.$type,properties:{cardinality:{name:Gn.cardinality},deprecatedSyntax:{name:Gn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Gn.isMulti,defaultValue:!1},terminal:{name:Gn.terminal},type:{name:Gn.type,referenceType:kt.$type}},superTypes:[lt.$type]},Disjunction:{name:Qs.$type,properties:{left:{name:Qs.left},right:{name:Qs.right}},superTypes:[sr.$type]},EndOfFile:{name:jo.$type,properties:{cardinality:{name:jo.cardinality}},superTypes:[lt.$type]},Grammar:{name:On.$type,properties:{imports:{name:On.imports,defaultValue:[]},interfaces:{name:On.interfaces,defaultValue:[]},isDeclared:{name:On.isDeclared,defaultValue:!1},name:{name:On.name},rules:{name:On.rules,defaultValue:[]},types:{name:On.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:hu.$type,properties:{path:{name:hu.path}},superTypes:[]},Group:{name:dr.$type,properties:{cardinality:{name:dr.cardinality},elements:{name:dr.elements,defaultValue:[]},guardCondition:{name:dr.guardCondition},predicate:{name:dr.predicate}},superTypes:[lt.$type]},InferredType:{name:zo.$type,properties:{name:{name:zo.name}},superTypes:[kt.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:kt.$type}},superTypes:[Ys.$type]},InfixRuleOperatorList:{name:yo.$type,properties:{associativity:{name:yo.associativity},operators:{name:yo.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:pu.$type,properties:{precedences:{name:pu.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Oi.$type,properties:{attributes:{name:Oi.attributes,defaultValue:[]},name:{name:Oi.name},superTypes:{name:Oi.superTypes,defaultValue:[],referenceType:kt.$type}},superTypes:[kt.$type]},Keyword:{name:xi.$type,properties:{cardinality:{name:xi.cardinality},predicate:{name:xi.predicate},value:{name:xi.value}},superTypes:[lt.$type]},NamedArgument:{name:Ms.$type,properties:{calledByName:{name:Ms.calledByName,defaultValue:!1},parameter:{name:Ms.parameter,referenceType:Fs.$type},value:{name:Ms.value}},superTypes:[]},NegatedToken:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1},terminal:{name:fr.terminal}},superTypes:[yt.$type]},Negation:{name:Bo.$type,properties:{value:{name:Bo.value}},superTypes:[sr.$type]},NumberLiteral:{name:mu.$type,properties:{value:{name:mu.value}},superTypes:[bi.$type]},Parameter:{name:Fs.$type,properties:{name:{name:Fs.name}},superTypes:[]},ParameterReference:{name:qo.$type,properties:{parameter:{name:qo.parameter,referenceType:Fs.$type}},superTypes:[sr.$type]},ParserRule:{name:Dt.$type,properties:{dataType:{name:Dt.dataType},definition:{name:Dt.definition},entry:{name:Dt.entry,defaultValue:!1},fragment:{name:Dt.fragment,defaultValue:!1},inferredType:{name:Dt.inferredType},name:{name:Dt.name},parameters:{name:Dt.parameters,defaultValue:[]},returnType:{name:Dt.returnType,referenceType:kt.$type}},superTypes:[Ys.$type]},ReferenceType:{name:To.$type,properties:{isMulti:{name:To.isMulti,defaultValue:!1},referenceType:{name:To.referenceType}},superTypes:[wi.$type]},RegexToken:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1},regex:{name:hr.regex}},superTypes:[yt.$type]},ReturnType:{name:Wo.$type,properties:{name:{name:Wo.name}},superTypes:[]},RuleCall:{name:pr.$type,properties:{arguments:{name:pr.arguments,defaultValue:[]},cardinality:{name:pr.cardinality},predicate:{name:pr.predicate},rule:{name:pr.rule,referenceType:Ds.$type}},superTypes:[lt.$type]},SimpleType:{name:Di.$type,properties:{primitiveType:{name:Di.primitiveType},stringType:{name:Di.stringType},typeRef:{name:Di.typeRef,referenceType:kt.$type}},superTypes:[wi.$type]},StringLiteral:{name:gu.$type,properties:{value:{name:gu.value}},superTypes:[bi.$type]},TerminalAlternatives:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},elements:{name:mr.elements,defaultValue:[]},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[lt.$type]},TerminalGroup:{name:gr.$type,properties:{cardinality:{name:gr.cardinality},elements:{name:gr.elements,defaultValue:[]},lookahead:{name:gr.lookahead},parenthesized:{name:gr.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:hn.$type,properties:{definition:{name:hn.definition},fragment:{name:hn.fragment,defaultValue:!1},hidden:{name:hn.hidden,defaultValue:!1},name:{name:hn.name},type:{name:hn.type}},superTypes:[Ds.$type]},TerminalRuleCall:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},lookahead:{name:yr.lookahead},parenthesized:{name:yr.parenthesized,defaultValue:!1},rule:{name:yr.rule,referenceType:hn.$type}},superTypes:[yt.$type]},Type:{name:Zs.$type,properties:{name:{name:Zs.name},type:{name:Zs.type}},superTypes:[kt.$type]},TypeAttribute:{name:Ni.$type,properties:{defaultValue:{name:Ni.defaultValue},isOptional:{name:Ni.isOptional,defaultValue:!1},name:{name:Ni.name},type:{name:Ni.type}},superTypes:[]},TypeDefinition:{name:wi.$type,properties:{},superTypes:[]},UnionType:{name:yu.$type,properties:{types:{name:yu.types,defaultValue:[]}},superTypes:[wi.$type]},UnorderedGroup:{name:ea.$type,properties:{cardinality:{name:ea.cardinality},elements:{name:ea.elements,defaultValue:[]}},superTypes:[lt.$type]},UntilToken:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},lookahead:{name:Tr.lookahead},parenthesized:{name:Tr.parenthesized,defaultValue:!1},terminal:{name:Tr.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:bi.$type,properties:{},superTypes:[]},Wildcard:{name:Mi.$type,properties:{cardinality:{name:Mi.cardinality},lookahead:{name:Mi.lookahead},parenthesized:{name:Mi.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}}const Z=new Zf;function Vo(t){return new Ol(t,e=>Ki(e)?e.content:[],{includeRoot:!0})}function cg(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Ko(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function fa(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Xt||(Xt={}));function lg(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function ug(t,e){return lg(t,e)>Xt.After}const dg=/^[\w\p{L}]$/u;function fg(t,e){if(t){const n=hg(t,!0);if(n&&Tu(n,e))return n;if(Kf(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Tu(s,e))return s}}}}function Tu(t,e){return Vf(t)&&e.includes(t.tokenType.name)}function hg(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class eh extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ds(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ro(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function _i(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ar(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function pg(){throw Error("Internal Error - Should never get here!")}function Ru(t){return t.type==="Character"}const ha=[];for(let t=W("0");t<=W("9");t++)ha.push(t);const pa=[W("_")].concat(ha);for(let t=W("a");t<=W("z");t++)pa.push(t);for(let t=W("A");t<=W("Z");t++)pa.push(t);const vu=[W(" "),W("\f"),W(`
1
+ var Qp=Object.defineProperty;var Zp=(t,e,n)=>e in t?Qp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var fn=(t,e,n)=>Zp(t,typeof e!="symbol"?e+"":e,n);import{bF as em,bG as tm,aZ as Mf,bp as nm,b1 as rm,a_ as ze,aC as im,aD as su,bf as sm,bi as Ff,bj as Gf,bg as am,bu as au,aF as Qn,aG as oe,a$ as om,aV as cm,aL as Rt,bH as lm,bI as Ln}from"./index-DMt1cpG6.js";import{k as Wr,j as Il,g as li,S as um,w as dm,x as fm,c as Uf,v as Oe,y as jf,l as hm,z as pm,A as mm,B as gm,C as ym,a as zf,d as j,i as nn,r as Qe,f as pt,D as Fe}from"./_baseUniq-HuZouVIz.js";import{j as $l,m as M,d as Tm,f as vt,g as Vr,h as B,i as Pl,l as Wn,e as Rm}from"./_basePickBy-PmSUrUsK.js";import{c as qe}from"./clone-DOjIfi5r.js";var vm=Object.prototype,Em=vm.hasOwnProperty,ht=em(function(t,e){if(tm(e)||Mf(e)){nm(e,Wr(e),t);return}for(var n in e)Em.call(e,n)&&rm(t,n,e[n])});function Bf(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function cs(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function Am(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function Sm(t,e,n,r){return Il(t,function(i,s,a){e(r,i,n(i),a)}),r}function Cm(t,e){return function(n,r){var i=ze(n)?Am:Sm,s=e?e():{};return i(n,t,li(r),s)}}var km=200;function Nm(t,e,n,r){var i=-1,s=dm,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=km&&(s=fm,a=!1,e=new um(e));e:for(;++i<o;){var d=t[i],h=d;if(d=d!==0?d:0,a&&h===h){for(var p=l;p--;)if(e[p]===h)continue e;c.push(d)}else s(e,h,r)||c.push(d)}return c}var Ua=im(function(t,e){return su(t)?Nm(t,Uf(e,1,su,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:$l(e),Bf(t,e<0?0:e,r)):[]}function Vi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:$l(e),e=r-e,Bf(t,0,e<0?0:e)):[]}function wm(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function bm(t,e){var n=!0;return Il(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function _t(t,e,n){var r=ze(t)?wm:bm;return r(t,li(e))}function $t(t){return t&&t.length?t[0]:void 0}function ft(t,e){return Uf(M(t,e))}var _m=Object.prototype,Im=_m.hasOwnProperty,$m=Cm(function(t,e,n){Im.call(t,n)?t[n].push(e):sm(t,n,[e])}),Pm="[object String]";function it(t){return typeof t=="string"||!ze(t)&&Ff(t)&&Gf(t)==Pm}var Lm=Math.max;function tt(t,e,n,r){t=Mf(t)?t:Oe(t),n=n?$l(n):0;var i=t.length;return n<0&&(n=Lm(i+n,0)),it(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&jf(t,e,n)>-1}function ou(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return jf(t,e,i)}var Om="[object RegExp]";function xm(t){return Ff(t)&&Gf(t)==Om}var cu=au&&au.isRegExp,rn=cu?am(cu):xm,Dm="Expected a function";function Mm(t){if(typeof t!="function")throw new TypeError(Dm);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Pt(t,e){if(t==null)return{};var n=hm(pm(t),function(r){return[r]});return e=li(e),Tm(t,n,function(r,i){return e(r,i[0])})}function ja(t,e){var n=ze(t)?mm:gm;return n(t,Mm(li(e)))}function Fm(t,e){var n;return Il(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function qf(t,e,n){var r=ze(t)?ym:Fm;return r(t,li(e))}function Ll(t){return t&&t.length?zf(t):[]}function Gm(t,e){return t&&t.length?zf(t,li(e)):[]}function Ke(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function wt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function pn(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Um(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function ki(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Wf{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return Ke(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Ki(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Vf(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Kf(t){return Ki(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ut})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=jm(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ut:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ut})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(la(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ut})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(la(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ut})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ut:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ut})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function jm(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function la(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Hf=new Ue(()=>{},()=>ut),ut=Object.freeze({done:!0,value:void 0});function he(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(la(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ut)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];la(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ut}):Hf}class Ol extends Ue{constructor(e,n,r){super(()=>({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ut})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Fo;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(Fo||(Fo={}));function Go(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ke(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Go(i,e))}):Ke(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Go(r,e)))}function za(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Hs(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Hs(t){for(;t.$container;)t=t.$container;return t}function lu(t){return wt(t)?t.ref?[t.ref]:[]:pn(t)?t.items.map(e=>e.ref):[]}function xl(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(Ke(s)){if(r.keyIndex++,uu(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(Ke(o)&&uu(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ut})}function ls(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Ol(t,n=>xl(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Ol(t,n=>xl(n,e),{includeRoot:!0})}function uu(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?ug(n,e):!1}function ua(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(wt(r)||pn(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(wt(s)||pn(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ut})}function zm(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Yf(i.defaultValue))}function Yf(t){return Array.isArray(t)?[...t.map(Yf)]:t}const lt={$type:"AbstractElement",cardinality:"cardinality"};function Bm(t){return Z.isInstance(t,lt.$type)}const Ys={$type:"AbstractParserRule"};function us(t){return Z.isInstance(t,Ys.$type)}const Ds={$type:"AbstractRule"},kt={$type:"AbstractType"},Dn={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ba(t){return Z.isInstance(t,Dn.$type)}const Xs={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Xf(t){return Z.isInstance(t,Xs.$type)}const du={$type:"ArrayLiteral",elements:"elements"},fu={$type:"ArrayType",elementType:"elementType"},Mn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Vn(t){return Z.isInstance(t,Mn.$type)}const Uo={$type:"BooleanLiteral",true:"true"};function qm(t){return Z.isInstance(t,Uo.$type)}const Fn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Wm(t){return Z.isInstance(t,Fn.$type)}const sr={$type:"Condition"},Js={$type:"Conjunction",left:"left",right:"right"};function Vm(t){return Z.isInstance(t,Js.$type)}const Gn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function qa(t){return Z.isInstance(t,Gn.$type)}const Qs={$type:"Disjunction",left:"left",right:"right"};function Km(t){return Z.isInstance(t,Qs.$type)}const jo={$type:"EndOfFile",cardinality:"cardinality"};function Hm(t){return Z.isInstance(t,jo.$type)}const On={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},hu={$type:"GrammarImport",path:"path"},dr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Dl(t){return Z.isInstance(t,dr.$type)}const zo={$type:"InferredType",name:"name"};function Jf(t){return Z.isInstance(t,zo.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function da(t){return Z.isInstance(t,Vt.$type)}const yo={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},pu={$type:"InfixRuleOperators",precedences:"precedences"},Oi={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Ym(t){return Z.isInstance(t,Oi.$type)}const xi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Kn(t){return Z.isInstance(t,xi.$type)}const Ms={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},fr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Xm(t){return Z.isInstance(t,fr.$type)}const Bo={$type:"Negation",value:"value"};function Jm(t){return Z.isInstance(t,Bo.$type)}const mu={$type:"NumberLiteral",value:"value"},Fs={$type:"Parameter",name:"name"},qo={$type:"ParameterReference",parameter:"parameter"};function Qm(t){return Z.isInstance(t,qo.$type)}const Dt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function on(t){return Z.isInstance(t,Dt.$type)}const To={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},hr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Zm(t){return Z.isInstance(t,hr.$type)}const Wo={$type:"ReturnType",name:"name"};function eg(t){return Z.isInstance(t,Wo.$type)}const pr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Hn(t){return Z.isInstance(t,pr.$type)}const Di={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function tg(t){return Z.isInstance(t,Di.$type)}const gu={$type:"StringLiteral",value:"value"},mr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function ng(t){return Z.isInstance(t,mr.$type)}const yt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},gr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function rg(t){return Z.isInstance(t,gr.$type)}const hn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function cn(t){return Z.isInstance(t,hn.$type)}const yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ig(t){return Z.isInstance(t,yr.$type)}const Zs={$type:"Type",name:"name",type:"type"};function sg(t){return Z.isInstance(t,Zs.$type)}const Ni={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},wi={$type:"TypeDefinition"},yu={$type:"UnionType",types:"types"},ea={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Qf(t){return Z.isInstance(t,ea.$type)}const Tr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ag(t){return Z.isInstance(t,Tr.$type)}const bi={$type:"ValueLiteral"},Mi={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function og(t){return Z.isInstance(t,Mi.$type)}class Zf extends Wf{constructor(){super(...arguments),this.types={AbstractElement:{name:lt.$type,properties:{cardinality:{name:lt.cardinality}},superTypes:[]},AbstractParserRule:{name:Ys.$type,properties:{},superTypes:[Ds.$type,kt.$type]},AbstractRule:{name:Ds.$type,properties:{},superTypes:[]},AbstractType:{name:kt.$type,properties:{},superTypes:[]},Action:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},feature:{name:Dn.feature},inferredType:{name:Dn.inferredType},operator:{name:Dn.operator},type:{name:Dn.type,referenceType:kt.$type}},superTypes:[lt.$type]},Alternatives:{name:Xs.$type,properties:{cardinality:{name:Xs.cardinality},elements:{name:Xs.elements,defaultValue:[]}},superTypes:[lt.$type]},ArrayLiteral:{name:du.$type,properties:{elements:{name:du.elements,defaultValue:[]}},superTypes:[bi.$type]},ArrayType:{name:fu.$type,properties:{elementType:{name:fu.elementType}},superTypes:[wi.$type]},Assignment:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},feature:{name:Mn.feature},operator:{name:Mn.operator},predicate:{name:Mn.predicate},terminal:{name:Mn.terminal}},superTypes:[lt.$type]},BooleanLiteral:{name:Uo.$type,properties:{true:{name:Uo.true,defaultValue:!1}},superTypes:[sr.$type,bi.$type]},CharacterRange:{name:Fn.$type,properties:{cardinality:{name:Fn.cardinality},left:{name:Fn.left},lookahead:{name:Fn.lookahead},parenthesized:{name:Fn.parenthesized,defaultValue:!1},right:{name:Fn.right}},superTypes:[yt.$type]},Condition:{name:sr.$type,properties:{},superTypes:[]},Conjunction:{name:Js.$type,properties:{left:{name:Js.left},right:{name:Js.right}},superTypes:[sr.$type]},CrossReference:{name:Gn.$type,properties:{cardinality:{name:Gn.cardinality},deprecatedSyntax:{name:Gn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Gn.isMulti,defaultValue:!1},terminal:{name:Gn.terminal},type:{name:Gn.type,referenceType:kt.$type}},superTypes:[lt.$type]},Disjunction:{name:Qs.$type,properties:{left:{name:Qs.left},right:{name:Qs.right}},superTypes:[sr.$type]},EndOfFile:{name:jo.$type,properties:{cardinality:{name:jo.cardinality}},superTypes:[lt.$type]},Grammar:{name:On.$type,properties:{imports:{name:On.imports,defaultValue:[]},interfaces:{name:On.interfaces,defaultValue:[]},isDeclared:{name:On.isDeclared,defaultValue:!1},name:{name:On.name},rules:{name:On.rules,defaultValue:[]},types:{name:On.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:hu.$type,properties:{path:{name:hu.path}},superTypes:[]},Group:{name:dr.$type,properties:{cardinality:{name:dr.cardinality},elements:{name:dr.elements,defaultValue:[]},guardCondition:{name:dr.guardCondition},predicate:{name:dr.predicate}},superTypes:[lt.$type]},InferredType:{name:zo.$type,properties:{name:{name:zo.name}},superTypes:[kt.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:kt.$type}},superTypes:[Ys.$type]},InfixRuleOperatorList:{name:yo.$type,properties:{associativity:{name:yo.associativity},operators:{name:yo.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:pu.$type,properties:{precedences:{name:pu.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Oi.$type,properties:{attributes:{name:Oi.attributes,defaultValue:[]},name:{name:Oi.name},superTypes:{name:Oi.superTypes,defaultValue:[],referenceType:kt.$type}},superTypes:[kt.$type]},Keyword:{name:xi.$type,properties:{cardinality:{name:xi.cardinality},predicate:{name:xi.predicate},value:{name:xi.value}},superTypes:[lt.$type]},NamedArgument:{name:Ms.$type,properties:{calledByName:{name:Ms.calledByName,defaultValue:!1},parameter:{name:Ms.parameter,referenceType:Fs.$type},value:{name:Ms.value}},superTypes:[]},NegatedToken:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1},terminal:{name:fr.terminal}},superTypes:[yt.$type]},Negation:{name:Bo.$type,properties:{value:{name:Bo.value}},superTypes:[sr.$type]},NumberLiteral:{name:mu.$type,properties:{value:{name:mu.value}},superTypes:[bi.$type]},Parameter:{name:Fs.$type,properties:{name:{name:Fs.name}},superTypes:[]},ParameterReference:{name:qo.$type,properties:{parameter:{name:qo.parameter,referenceType:Fs.$type}},superTypes:[sr.$type]},ParserRule:{name:Dt.$type,properties:{dataType:{name:Dt.dataType},definition:{name:Dt.definition},entry:{name:Dt.entry,defaultValue:!1},fragment:{name:Dt.fragment,defaultValue:!1},inferredType:{name:Dt.inferredType},name:{name:Dt.name},parameters:{name:Dt.parameters,defaultValue:[]},returnType:{name:Dt.returnType,referenceType:kt.$type}},superTypes:[Ys.$type]},ReferenceType:{name:To.$type,properties:{isMulti:{name:To.isMulti,defaultValue:!1},referenceType:{name:To.referenceType}},superTypes:[wi.$type]},RegexToken:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1},regex:{name:hr.regex}},superTypes:[yt.$type]},ReturnType:{name:Wo.$type,properties:{name:{name:Wo.name}},superTypes:[]},RuleCall:{name:pr.$type,properties:{arguments:{name:pr.arguments,defaultValue:[]},cardinality:{name:pr.cardinality},predicate:{name:pr.predicate},rule:{name:pr.rule,referenceType:Ds.$type}},superTypes:[lt.$type]},SimpleType:{name:Di.$type,properties:{primitiveType:{name:Di.primitiveType},stringType:{name:Di.stringType},typeRef:{name:Di.typeRef,referenceType:kt.$type}},superTypes:[wi.$type]},StringLiteral:{name:gu.$type,properties:{value:{name:gu.value}},superTypes:[bi.$type]},TerminalAlternatives:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},elements:{name:mr.elements,defaultValue:[]},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[lt.$type]},TerminalGroup:{name:gr.$type,properties:{cardinality:{name:gr.cardinality},elements:{name:gr.elements,defaultValue:[]},lookahead:{name:gr.lookahead},parenthesized:{name:gr.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:hn.$type,properties:{definition:{name:hn.definition},fragment:{name:hn.fragment,defaultValue:!1},hidden:{name:hn.hidden,defaultValue:!1},name:{name:hn.name},type:{name:hn.type}},superTypes:[Ds.$type]},TerminalRuleCall:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},lookahead:{name:yr.lookahead},parenthesized:{name:yr.parenthesized,defaultValue:!1},rule:{name:yr.rule,referenceType:hn.$type}},superTypes:[yt.$type]},Type:{name:Zs.$type,properties:{name:{name:Zs.name},type:{name:Zs.type}},superTypes:[kt.$type]},TypeAttribute:{name:Ni.$type,properties:{defaultValue:{name:Ni.defaultValue},isOptional:{name:Ni.isOptional,defaultValue:!1},name:{name:Ni.name},type:{name:Ni.type}},superTypes:[]},TypeDefinition:{name:wi.$type,properties:{},superTypes:[]},UnionType:{name:yu.$type,properties:{types:{name:yu.types,defaultValue:[]}},superTypes:[wi.$type]},UnorderedGroup:{name:ea.$type,properties:{cardinality:{name:ea.cardinality},elements:{name:ea.elements,defaultValue:[]}},superTypes:[lt.$type]},UntilToken:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},lookahead:{name:Tr.lookahead},parenthesized:{name:Tr.parenthesized,defaultValue:!1},terminal:{name:Tr.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:bi.$type,properties:{},superTypes:[]},Wildcard:{name:Mi.$type,properties:{cardinality:{name:Mi.cardinality},lookahead:{name:Mi.lookahead},parenthesized:{name:Mi.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}}const Z=new Zf;function Vo(t){return new Ol(t,e=>Ki(e)?e.content:[],{includeRoot:!0})}function cg(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Ko(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function fa(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Xt||(Xt={}));function lg(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function ug(t,e){return lg(t,e)>Xt.After}const dg=/^[\w\p{L}]$/u;function fg(t,e){if(t){const n=hg(t,!0);if(n&&Tu(n,e))return n;if(Kf(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Tu(s,e))return s}}}}function Tu(t,e){return Vf(t)&&e.includes(t.tokenType.name)}function hg(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class eh extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ds(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ro(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function _i(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ar(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function pg(){throw Error("Internal Error - Should never get here!")}function Ru(t){return t.type==="Character"}const ha=[];for(let t=W("0");t<=W("9");t++)ha.push(t);const pa=[W("_")].concat(ha);for(let t=W("a");t<=W("z");t++)pa.push(t);for(let t=W("A");t<=W("Z");t++)pa.push(t);const vu=[W(" "),W("\f"),W(`
2
2
  `),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],mg=/[0-9a-fA-F]/,Gs=/[0-9]/,gg=/[1-9]/;class th{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const n=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":_i(r,"global");break;case"i":_i(r,"ignoreCase");break;case"m":_i(r,"multiLine");break;case"u":_i(r,"unicode");break;case"y":_i(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}ar(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return pg()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;ar(n);break}if(!(e===!0&&n===void 0)&&ar(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),ar(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
3
3
  `),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,n=!1;switch(this.popChar()){case"d":e=ha;break;case"D":e=ha,n=!0;break;case"s":e=vu;break;case"S":e=vu,n=!0;break;case"w":e=pa;break;case"W":e=pa,n=!0;break}if(ar(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
4
4
  `);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(ar(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -1,4 +1,4 @@
1
- import{aI as Gt,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as S,G as St,I as Jt,d as rt,as as Qt,W as $t,X as te,Y as ee,e as ne,z as se,E as ie,F as re}from"./index-RCn_0Vmo.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),T=Math.atan2(f.x-x.x,f.y-x.y);let _=T-M;_<0&&(_+=2*Math.PI);const w=T-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const T=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(T),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(T),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,T){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=T)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,T=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Et({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let T=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<T&&(T=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in T)return T[p];var h=T[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const C=U.selectAll(".venn-area").data(h,I=>I.sets),O=C.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let E=p;z&&typeof E.transition=="function"?(E=R(p),E.selectAll("path").attrTween("d",A)):E.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=E.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const D=R(C.exit()).remove();typeof C.transition=="function"&&D.selectAll("path").attrTween("d",A);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:C,enter:O,update:E,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Ct:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const T=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${T+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
1
+ import{aI as Gt,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as S,G as St,I as Jt,d as rt,as as Qt,W as $t,X as te,Y as ee,e as ne,z as se,E as ie,F as re}from"./index-DMt1cpG6.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),T=Math.atan2(f.x-x.x,f.y-x.y);let _=T-M;_<0&&(_+=2*Math.PI);const w=T-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const T=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(T),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(T),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,T){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=T)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,T=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Et({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let T=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<T&&(T=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in T)return T[p];var h=T[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const C=U.selectAll(".venn-area").data(h,I=>I.sets),O=C.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let E=p;z&&typeof E.transition=="function"?(E=R(p),E.selectAll("path").attrTween("d",A)):E.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=E.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const D=R(C.exit()).remove();typeof C.transition=="function"&&D.selectAll("path").attrTween("d",A);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:C,enter:O,update:E,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Ct:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const T=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${T+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
2
2
  M`,t,n),e.push(`
3
3
  m`,-s,0),e.push(`
4
4
  a`,s,s,0,1,0,s*2,0),e.push(`
@@ -1,4 +1,4 @@
1
- import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Nt,I as mi,e as yi,z as bi,G as St,i as Ai,E as Yt,F as wi,K as Ci,aH as Si,R as Wt}from"./index-RCn_0Vmo.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-CBgec4jE.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function yt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,g,m=!1,p=0,k=0,v=.5;delete e.unknown;function C(){var b=t().length,E=n<s,D=E?n:s,P=E?s:n;o=(P-D)/Math.max(1,b-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(b-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var I=Ri(b).map(function(y){return D+o*y});return i(E?I.reverse():I)}return e.domain=function(b){return arguments.length?(t(b),C()):t()},e.range=function(b){return arguments.length?([s,n]=b,s=+s,n=+n,C()):[s,n]},e.rangeRound=function(b){return[s,n]=b,s=+s,n=+n,m=!0,C()},e.bandwidth=function(){return g},e.step=function(){return o},e.round=function(b){return arguments.length?(m=!!b,C()):m},e.padding=function(b){return arguments.length?(p=Math.min(1,k=+b),C()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),C()):p},e.paddingOuter=function(b){return arguments.length?(k=+b,C()):k},e.align=function(b){return arguments.length?(v=Math.max(0,Math.min(1,b)),C()):v},e.copy=function(){return yt(t(),[s,n]).round(m).paddingInner(p).paddingOuter(k).align(v)},_i.apply(C(),arguments)}var bt=function(){var e=a(function(F,h,u,x){for(u=u||{},x=F.length;x--;u[F[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],C=[1,29],b=[1,30],E=[1,31],D=[1,32],P=[1,33],I=[1,34],y=[1,35],_=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],$={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,u,x,d,w,r,at){var f=r.length-1;switch(w){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:g}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{20:[1,53]},{22:[1,54]},e(l,[2,18]),{1:[2,2]},e(l,[2,8]),e(l,[2,9]),e(L,[2,37],{40:55,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c}),e(L,[2,38]),e(L,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(l,[2,10]),e(l,[2,22],{30:41,29:56,24:W,27:z}),e(l,[2,24]),e(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,11]),e(l,[2,30],{33:60,27:U}),e(l,[2,32]),{31:[1,61]},e(l,[2,12]),{17:62,24:X},{25:63,27:R},e(l,[2,14]),{17:65,24:X},e(l,[2,16]),e(l,[2,17]),e(S,[2,41]),e(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(l,[2,31]),{27:[1,69]},e(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(l,[2,15]),e(l,[2,26]),e(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,33]),e(l,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:a(function(h){var u=this,x=[0],d=[],w=[null],r=[],at=this.table,f="",lt=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),T=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);T.setInput(h,Y.yy),Y.yy.lexer=T,Y.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var ft=T.yylloc;r.push(ft);var ci=T.options&&T.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(V){x.length=x.length-2*V,w.length=w.length-V,r.length=r.length-V}a(ui,"popStack");function Vt(){var V;return V=d.pop()||T.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}a(Vt,"lex");for(var M,H,B,pt,q={},ct,O,Bt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=Vt()),B=at[H]&&at[H][M]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");T.showPosition?mt="Parse error on line "+(lt+1)+`:
1
+ import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Nt,I as mi,e as yi,z as bi,G as St,i as Ai,E as Yt,F as wi,K as Ci,aH as Si,R as Wt}from"./index-DMt1cpG6.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-BXkwBhoJ.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function yt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,g,m=!1,p=0,k=0,v=.5;delete e.unknown;function C(){var b=t().length,E=n<s,D=E?n:s,P=E?s:n;o=(P-D)/Math.max(1,b-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(b-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var I=Ri(b).map(function(y){return D+o*y});return i(E?I.reverse():I)}return e.domain=function(b){return arguments.length?(t(b),C()):t()},e.range=function(b){return arguments.length?([s,n]=b,s=+s,n=+n,C()):[s,n]},e.rangeRound=function(b){return[s,n]=b,s=+s,n=+n,m=!0,C()},e.bandwidth=function(){return g},e.step=function(){return o},e.round=function(b){return arguments.length?(m=!!b,C()):m},e.padding=function(b){return arguments.length?(p=Math.min(1,k=+b),C()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),C()):p},e.paddingOuter=function(b){return arguments.length?(k=+b,C()):k},e.align=function(b){return arguments.length?(v=Math.max(0,Math.min(1,b)),C()):v},e.copy=function(){return yt(t(),[s,n]).round(m).paddingInner(p).paddingOuter(k).align(v)},_i.apply(C(),arguments)}var bt=function(){var e=a(function(F,h,u,x){for(u=u||{},x=F.length;x--;u[F[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],C=[1,29],b=[1,30],E=[1,31],D=[1,32],P=[1,33],I=[1,34],y=[1,35],_=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],$={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,u,x,d,w,r,at){var f=r.length-1;switch(w){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:g}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{20:[1,53]},{22:[1,54]},e(l,[2,18]),{1:[2,2]},e(l,[2,8]),e(l,[2,9]),e(L,[2,37],{40:55,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c}),e(L,[2,38]),e(L,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(l,[2,10]),e(l,[2,22],{30:41,29:56,24:W,27:z}),e(l,[2,24]),e(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,11]),e(l,[2,30],{33:60,27:U}),e(l,[2,32]),{31:[1,61]},e(l,[2,12]),{17:62,24:X},{25:63,27:R},e(l,[2,14]),{17:65,24:X},e(l,[2,16]),e(l,[2,17]),e(S,[2,41]),e(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(l,[2,31]),{27:[1,69]},e(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(l,[2,15]),e(l,[2,26]),e(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,33]),e(l,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:a(function(h){var u=this,x=[0],d=[],w=[null],r=[],at=this.table,f="",lt=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),T=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);T.setInput(h,Y.yy),Y.yy.lexer=T,Y.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var ft=T.yylloc;r.push(ft);var ci=T.options&&T.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(V){x.length=x.length-2*V,w.length=w.length-V,r.length=r.length-V}a(ui,"popStack");function Vt(){var V;return V=d.pop()||T.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}a(Vt,"lex");for(var M,H,B,pt,q={},ct,O,Bt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=Vt()),B=at[H]&&at[H][M]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");T.showPosition?mt="Parse error on line "+(lt+1)+`:
2
2
  `+T.showPosition()+`
3
3
  Expecting `+ut.join(", ")+", got '"+(this.terminals_[M]||M)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(mt,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+M);switch(B[0]){case 1:x.push(M),w.push(T.yytext),r.push(T.yylloc),x.push(B[1]),M=null,It=T.yyleng,f=T.yytext,lt=T.yylineno,ft=T.yylloc;break;case 2:if(O=this.productions_[B[1]][1],q.$=w[w.length-O],q._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},ci&&(q._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,It,lt,Y.yy,B[1],w,r].concat(li)),typeof pt<"u")return pt;O&&(x=x.slice(0,-1*O*2),w=w.slice(0,-1*O),r=r.slice(0,-1*O)),x.push(this.productions_[B[1]][0]),w.push(q.$),r.push(q._$),Bt=at[x[x.length-2]][x[x.length-1]],x.push(Bt);break;case 3:return!0}}return!0},"parse")},Et=function(){var F={EOF:1,parseError:a(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:a(function(h,u){return this.yy=u||this.yy||{},this._input=h,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:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=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),x.length-1&&(this.yylineno-=x.length-1);var w=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:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
package/dist/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  href="https://fonts.googleapis.com/icon?family=Material+Icons"
15
15
  rel="stylesheet"
16
16
  />
17
- <script type="module" crossorigin src="/assets/index-RCn_0Vmo.js"></script>
17
+ <script type="module" crossorigin src="/assets/index-DMt1cpG6.js"></script>
18
18
  <link rel="stylesheet" crossorigin href="/assets/index-H7f6VTz1.css">
19
19
  </head>
20
20
  <body style="margin: 0; padding: 0;">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trohde/earos",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Schema-driven editor and CLI for EaROS architecture assessment rubrics and evaluations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{aq as o,ar as n}from"./index-RCn_0Vmo.js";const t=(r,a)=>o.lang.round(n.parse(r)[a]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-BYx-KVJV.js";import{_ as i}from"./index-RCn_0Vmo.js";import"./chunk-FMBD7UC4-G8-DaCn0.js";import"./chunk-JSJVCQXG-CSg9GaGK.js";import"./chunk-55IACEB6-nKxG4YB4.js";import"./chunk-KX2RTZJC-Cvc1NNLo.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-BYx-KVJV.js";import{_ as i}from"./index-RCn_0Vmo.js";import"./chunk-FMBD7UC4-G8-DaCn0.js";import"./chunk-JSJVCQXG-CSg9GaGK.js";import"./chunk-55IACEB6-nKxG4YB4.js";import"./chunk-KX2RTZJC-Cvc1NNLo.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
@@ -1 +0,0 @@
1
- import{b as r}from"./_baseUniq-BDIo3mC7.js";var e=4;function a(o){return r(o,e)}export{a as c};
@@ -1 +0,0 @@
1
- import{s as t,b as r,a,S as s}from"./chunk-NQ4KR5QH-BdgusETF.js";import{_ as i}from"./index-RCn_0Vmo.js";import"./chunk-55IACEB6-nKxG4YB4.js";import"./chunk-KX2RTZJC-Cvc1NNLo.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};