orbitchat 2.1.8 → 2.2.1

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 (49) hide show
  1. package/README.md +21 -0
  2. package/bin/dev-server.js +62 -0
  3. package/bin/orbitchat.js +212 -61
  4. package/dist/assets/{api-uEDUqkTi.js → api-CE_B4ED-.js} +1 -1
  5. package/dist/assets/{arc-m8RC5oDD-BT8qBEWK.js → arc-m8RC5oDD-BWi4oeHb.js} +1 -1
  6. package/dist/assets/{blockDiagram-c4efeb88-CZ2mpei3-DwC_8AXi.js → blockDiagram-c4efeb88-CZ2mpei3-dprDqkUE.js} +1 -1
  7. package/dist/assets/{c4Diagram-c83219d4-DL2EmCLj-Bb77Yjks.js → c4Diagram-c83219d4-DL2EmCLj-BscgT0Av.js} +1 -1
  8. package/dist/assets/channel-BKp1WYnX-BQrSwznf.js +1 -0
  9. package/dist/assets/{classDiagram-beda092f-vKbJ2bcD-ByRiBo_z.js → classDiagram-beda092f-vKbJ2bcD-CDb4hHuG.js} +1 -1
  10. package/dist/assets/{classDiagram-v2-2358418a-BHXpn1Du-CsAMUMgi.js → classDiagram-v2-2358418a-BHXpn1Du-WY-tIMyW.js} +1 -1
  11. package/dist/assets/clone-B1V2003j-Cwz0SSjy.js +1 -0
  12. package/dist/assets/{createText-1719965b-C2-AT0ab-Ngc7i9D1.js → createText-1719965b-C2-AT0ab-CgEMUHnk.js} +1 -1
  13. package/dist/assets/{edges-96097737-Zk-qG_8u-dmc-RUJc.js → edges-96097737-Zk-qG_8u-nsO-00KN.js} +1 -1
  14. package/dist/assets/{erDiagram-0228fc6a-B94anMjz-CVrsMLr0.js → erDiagram-0228fc6a-B94anMjz-C5FmvKvp.js} +1 -1
  15. package/dist/assets/{flowDb-c6c81e3f-CRRW-bQO-BYHCtAAr.js → flowDb-c6c81e3f-CRRW-bQO-BZwfoArH.js} +1 -1
  16. package/dist/assets/{flowDiagram-50d868cf-DPzQMhJv-CrArx2UT.js → flowDiagram-50d868cf-DPzQMhJv-AFdreGhq.js} +1 -1
  17. package/dist/assets/flowDiagram-v2-4f6560a1-Si9enBmB-CtywLDu0.js +1 -0
  18. package/dist/assets/{flowchart-elk-definition-6af322e1-CULhtvD--Bc4SZDEI.js → flowchart-elk-definition-6af322e1-CULhtvD--DYPPOYFJ.js} +1 -1
  19. package/dist/assets/{ganttDiagram-a2739b55-Bp8yOLEz-DMtD2BxT.js → ganttDiagram-a2739b55-Bp8yOLEz-kKkprIMV.js} +1 -1
  20. package/dist/assets/{gitGraphDiagram-82fe8481-BYtOQJl0-BxXpgB9C.js → gitGraphDiagram-82fe8481-BYtOQJl0-BPubM2oD.js} +1 -1
  21. package/dist/assets/{graph-BV6jB5rk-DcOA8BmL.js → graph-BV6jB5rk-DUrEc0st.js} +1 -1
  22. package/dist/assets/index-42QQgFVq.css +1 -0
  23. package/dist/assets/{index-5325376f-DrY72DrM-BQxxLtiM.js → index-5325376f-DrY72DrM-C7kJKw52.js} +1 -1
  24. package/dist/assets/index-D5Z2TibF.js +1008 -0
  25. package/dist/assets/{index-DlFdZiHl-B3vsLXXB.js → index-DlFdZiHl-BSYQfW2e.js} +1 -1
  26. package/dist/assets/{infoDiagram-8eee0895-C6GFnrZ7-OKacvbId.js → infoDiagram-8eee0895-C6GFnrZ7-Ew4LW_iF.js} +1 -1
  27. package/dist/assets/{journeyDiagram-c64418c1-daS1W8qe-BkJ9QLFM.js → journeyDiagram-c64418c1-daS1W8qe-DXiIzncU.js} +1 -1
  28. package/dist/assets/{layout-LXMv3mSS-CNNBHyhJ.js → layout-LXMv3mSS-C4UceiUZ.js} +1 -1
  29. package/dist/assets/{mindmap-definition-8da855dc-DmNQYVT1-BsCbTj6n.js → mindmap-definition-8da855dc-DmNQYVT1-CE6VYCmW.js} +1 -1
  30. package/dist/assets/{pieDiagram-a8764435-381urBY5-A6raAt-D.js → pieDiagram-a8764435-381urBY5-DvUbhtgr.js} +1 -1
  31. package/dist/assets/{quadrantDiagram-1e28029f-hgRmK2bX-CiuNGTtQ.js → quadrantDiagram-1e28029f-hgRmK2bX-CKt4Y4a_.js} +1 -1
  32. package/dist/assets/{requirementDiagram-08caed73-BB0Q-cI9-T9Fr-hSN.js → requirementDiagram-08caed73-BB0Q-cI9-eX0yWLuX.js} +1 -1
  33. package/dist/assets/{sankeyDiagram-a04cb91d-BpsipZNt-DeqT-JYz.js → sankeyDiagram-a04cb91d-BpsipZNt-BlCd4QUW.js} +1 -1
  34. package/dist/assets/{sequenceDiagram-c5b8d532-xoAvPcQJ-Dh_25-gi.js → sequenceDiagram-c5b8d532-xoAvPcQJ-HGG33gON.js} +1 -1
  35. package/dist/assets/{stateDiagram-1ecb1508-b721R49K-DfgySJAt.js → stateDiagram-1ecb1508-b721R49K-BWFqvRwH.js} +1 -1
  36. package/dist/assets/{stateDiagram-v2-c2b004d7-BmSbrbqZ-BT-EqIcl.js → stateDiagram-v2-c2b004d7-BmSbrbqZ-lwosNc5u.js} +1 -1
  37. package/dist/assets/{styles-b4e223ce-TYmJC5IN-CyGeIEtW.js → styles-b4e223ce-TYmJC5IN-S1iO1Zgs.js} +1 -1
  38. package/dist/assets/{styles-ca3715f6-CfJZu0Yn-Czxwj2Eo.js → styles-ca3715f6-CfJZu0Yn-gRGuE5-m.js} +1 -1
  39. package/dist/assets/{styles-d45a18b0-DZ8oSYcV-KS40LPFU.js → styles-d45a18b0-DZ8oSYcV-xXRcj4Kl.js} +1 -1
  40. package/dist/assets/{svgDrawCommon-b86b1483-CXPkN8HW-Dq40yjrO.js → svgDrawCommon-b86b1483-CXPkN8HW-KVQO5kon.js} +1 -1
  41. package/dist/assets/{timeline-definition-faaaa080-LDFf1jfb-CB8wN-VT.js → timeline-definition-faaaa080-LDFf1jfb-BxWw5Sjp.js} +1 -1
  42. package/dist/assets/{xychartDiagram-f5964ef8-DdhO5-Bp-B3w4U23E.js → xychartDiagram-f5964ef8-DdhO5-Bp-8_2nsWx2.js} +1 -1
  43. package/dist/index.html +2 -2
  44. package/package.json +6 -2
  45. package/dist/assets/channel-BKp1WYnX-BpupPR-0.js +0 -1
  46. package/dist/assets/clone-B1V2003j-DKfYfMmY.js +0 -1
  47. package/dist/assets/flowDiagram-v2-4f6560a1-Si9enBmB-CcZjaZir.js +0 -1
  48. package/dist/assets/index-3H3i7ExC.js +0 -1006
  49. package/dist/assets/index-CITIGg-2.css +0 -1
@@ -1,4 +1,4 @@
1
- import{E as wt,D as Oe,L as ke,R as ve,N as Te,F as jt,O as re,Q as we,P as Re,k as kt,W as he,T as De,J as Ne,m as Ht,e as le}from"./index-3H3i7ExC.js";import{l as Pe,p as je}from"./svgDrawCommon-b86b1483-CXPkN8HW-Dq40yjrO.js";var Yt=function(){var e=function(F,g,x,b){for(x=x||{},b=F.length;b--;x[F[b]]=g);return x},t=[1,24],r=[1,25],o=[1,26],l=[1,27],n=[1,28],i=[1,63],s=[1,64],a=[1,65],d=[1,66],u=[1,67],p=[1,68],f=[1,69],m=[1,29],v=[1,30],T=[1,31],P=[1,32],U=[1,33],Y=[1,34],V=[1,35],q=[1,36],H=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],dt=[1,54],pt=[1,55],ut=[1,56],yt=[1,57],ft=[1,58],bt=[1,59],gt=[1,60],Ct=[14,42],Ft=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],vt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],S=[1,84],C=[1,85],O=[12,14,42],ne=[12,14,33,42],Dt=[12,14,33,42,76,77,79,80],mt=[12,33],Xt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(F,g,x,b,k,h,D){var y=h.length-1;switch(k){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[y-3]);break;case 19:b.setTitle(h[y].substring(6)),this.$=h[y].substring(6);break;case 20:b.setAccDescription(h[y].substring(15)),this.$=h[y].substring(15);break;case 21:this.$=h[y].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[y].trim(),b.setAccDescription(this.$);break;case 28:case 29:h[y].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 30:b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 31:h[y].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[y]),this.$=h[y];break;case 32:b.addDeploymentNode("node",...h[y]),this.$=h[y];break;case 33:b.addDeploymentNode("nodeL",...h[y]),this.$=h[y];break;case 34:b.addDeploymentNode("nodeR",...h[y]),this.$=h[y];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[y]),this.$=h[y];break;case 40:b.addPersonOrSystem("external_person",...h[y]),this.$=h[y];break;case 41:b.addPersonOrSystem("system",...h[y]),this.$=h[y];break;case 42:b.addPersonOrSystem("system_db",...h[y]),this.$=h[y];break;case 43:b.addPersonOrSystem("system_queue",...h[y]),this.$=h[y];break;case 44:b.addPersonOrSystem("external_system",...h[y]),this.$=h[y];break;case 45:b.addPersonOrSystem("external_system_db",...h[y]),this.$=h[y];break;case 46:b.addPersonOrSystem("external_system_queue",...h[y]),this.$=h[y];break;case 47:b.addContainer("container",...h[y]),this.$=h[y];break;case 48:b.addContainer("container_db",...h[y]),this.$=h[y];break;case 49:b.addContainer("container_queue",...h[y]),this.$=h[y];break;case 50:b.addContainer("external_container",...h[y]),this.$=h[y];break;case 51:b.addContainer("external_container_db",...h[y]),this.$=h[y];break;case 52:b.addContainer("external_container_queue",...h[y]),this.$=h[y];break;case 53:b.addComponent("component",...h[y]),this.$=h[y];break;case 54:b.addComponent("component_db",...h[y]),this.$=h[y];break;case 55:b.addComponent("component_queue",...h[y]),this.$=h[y];break;case 56:b.addComponent("external_component",...h[y]),this.$=h[y];break;case 57:b.addComponent("external_component_db",...h[y]),this.$=h[y];break;case 58:b.addComponent("external_component_queue",...h[y]),this.$=h[y];break;case 60:b.addRel("rel",...h[y]),this.$=h[y];break;case 61:b.addRel("birel",...h[y]),this.$=h[y];break;case 62:b.addRel("rel_u",...h[y]),this.$=h[y];break;case 63:b.addRel("rel_d",...h[y]),this.$=h[y];break;case 64:b.addRel("rel_l",...h[y]),this.$=h[y];break;case 65:b.addRel("rel_r",...h[y]),this.$=h[y];break;case 66:b.addRel("rel_b",...h[y]),this.$=h[y];break;case 67:h[y].splice(0,1),b.addRel("rel",...h[y]),this.$=h[y];break;case 68:b.updateElStyle("update_el_style",...h[y]),this.$=h[y];break;case 69:b.updateRelStyle("update_rel_style",...h[y]),this.$=h[y];break;case 70:b.updateLayoutConfig("update_layout_config",...h[y]),this.$=h[y];break;case 71:this.$=[h[y]];break;case 72:h[y].unshift(h[y-1]),this.$=h[y];break;case 73:case 75:this.$=h[y].trim();break;case 74:let Et={};Et[h[y-1].trim()]=h[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(Ct,[2,14]),e(Ft,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(vt,[2,19]),e(vt,[2,20]),{25:[1,78]},{27:[1,79]},e(vt,[2,23]),{35:80,75:81,76:E,77:A,79:S,80:C},{35:86,75:81,76:E,77:A,79:S,80:C},{35:87,75:81,76:E,77:A,79:S,80:C},{35:88,75:81,76:E,77:A,79:S,80:C},{35:89,75:81,76:E,77:A,79:S,80:C},{35:90,75:81,76:E,77:A,79:S,80:C},{35:91,75:81,76:E,77:A,79:S,80:C},{35:92,75:81,76:E,77:A,79:S,80:C},{35:93,75:81,76:E,77:A,79:S,80:C},{35:94,75:81,76:E,77:A,79:S,80:C},{35:95,75:81,76:E,77:A,79:S,80:C},{35:96,75:81,76:E,77:A,79:S,80:C},{35:97,75:81,76:E,77:A,79:S,80:C},{35:98,75:81,76:E,77:A,79:S,80:C},{35:99,75:81,76:E,77:A,79:S,80:C},{35:100,75:81,76:E,77:A,79:S,80:C},{35:101,75:81,76:E,77:A,79:S,80:C},{35:102,75:81,76:E,77:A,79:S,80:C},{35:103,75:81,76:E,77:A,79:S,80:C},{35:104,75:81,76:E,77:A,79:S,80:C},e(O,[2,59]),{35:105,75:81,76:E,77:A,79:S,80:C},{35:106,75:81,76:E,77:A,79:S,80:C},{35:107,75:81,76:E,77:A,79:S,80:C},{35:108,75:81,76:E,77:A,79:S,80:C},{35:109,75:81,76:E,77:A,79:S,80:C},{35:110,75:81,76:E,77:A,79:S,80:C},{35:111,75:81,76:E,77:A,79:S,80:C},{35:112,75:81,76:E,77:A,79:S,80:C},{35:113,75:81,76:E,77:A,79:S,80:C},{35:114,75:81,76:E,77:A,79:S,80:C},{35:115,75:81,76:E,77:A,79:S,80:C},{20:116,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:S,80:C},{35:120,75:81,76:E,77:A,79:S,80:C},{35:121,75:81,76:E,77:A,79:S,80:C},{35:122,75:81,76:E,77:A,79:S,80:C},{35:123,75:81,76:E,77:A,79:S,80:C},{35:124,75:81,76:E,77:A,79:S,80:C},{35:125,75:81,76:E,77:A,79:S,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Ft,[2,17],{21:22,19:130,22:t,23:r,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:o,26:l,28:n,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(vt,[2,21]),e(vt,[2,22]),e(O,[2,39]),e(ne,[2,71],{75:81,35:132,76:E,77:A,79:S,80:C}),e(Dt,[2,73]),{78:[1,133]},e(Dt,[2,75]),e(Dt,[2,76]),e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),e(O,[2,47]),e(O,[2,48]),e(O,[2,49]),e(O,[2,50]),e(O,[2,51]),e(O,[2,52]),e(O,[2,53]),e(O,[2,54]),e(O,[2,55]),e(O,[2,56]),e(O,[2,57]),e(O,[2,58]),e(O,[2,60]),e(O,[2,61]),e(O,[2,62]),e(O,[2,63]),e(O,[2,64]),e(O,[2,65]),e(O,[2,66]),e(O,[2,67]),e(O,[2,68]),e(O,[2,69]),e(O,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Ft,[2,18]),e(Ct,[2,38]),e(ne,[2,72]),e(Dt,[2,74]),e(O,[2,24]),e(O,[2,35]),e(Xt,[2,25]),e(Xt,[2,26],{12:[1,138]}),e(Xt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(F,g){if(g.recoverable)this.trace(F);else{var x=new Error(F);throw x.hash=g,x}},parse:function(F){var g=this,x=[0],b=[],k=[null],h=[],D=this.table,y="",Et=0,ae=0,Ee=2,ie=1,Ae=h.slice.call(arguments,1),w=Object.create(this.lexer),At={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(At.yy[Qt]=this.yy[Qt]);w.setInput(F,At.yy),At.yy.lexer=w,At.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var $t=w.yylloc;h.push($t);var Se=w.options&&w.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var Q;return Q=b.pop()||w.lex()||ie,typeof Q!="number"&&(Q instanceof Array&&(b=Q,Q=b.pop()),Q=g.symbols_[Q]||Q),Q}for(var N,St,j,Vt,Ot={},Nt,z,se,Pt;;){if(St=x[x.length-1],this.defaultActions[St]?j=this.defaultActions[St]:((N===null||typeof N>"u")&&(N=Ce()),j=D[St]&&D[St][N]),typeof j>"u"||!j.length||!j[0]){var qt="";Pt=[];for(Nt in D[St])this.terminals_[Nt]&&Nt>Ee&&Pt.push("'"+this.terminals_[Nt]+"'");w.showPosition?qt="Parse error on line "+(Et+1)+`:
1
+ import{E as wt,D as Oe,L as ke,R as ve,N as Te,F as jt,O as re,Q as we,P as Re,k as kt,W as he,T as De,J as Ne,m as Ht,e as le}from"./index-D5Z2TibF.js";import{l as Pe,p as je}from"./svgDrawCommon-b86b1483-CXPkN8HW-KVQO5kon.js";var Yt=function(){var e=function(F,g,x,b){for(x=x||{},b=F.length;b--;x[F[b]]=g);return x},t=[1,24],r=[1,25],o=[1,26],l=[1,27],n=[1,28],i=[1,63],s=[1,64],a=[1,65],d=[1,66],u=[1,67],p=[1,68],f=[1,69],m=[1,29],v=[1,30],T=[1,31],P=[1,32],U=[1,33],Y=[1,34],V=[1,35],q=[1,36],H=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],dt=[1,54],pt=[1,55],ut=[1,56],yt=[1,57],ft=[1,58],bt=[1,59],gt=[1,60],Ct=[14,42],Ft=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],vt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],S=[1,84],C=[1,85],O=[12,14,42],ne=[12,14,33,42],Dt=[12,14,33,42,76,77,79,80],mt=[12,33],Xt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(F,g,x,b,k,h,D){var y=h.length-1;switch(k){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[y-3]);break;case 19:b.setTitle(h[y].substring(6)),this.$=h[y].substring(6);break;case 20:b.setAccDescription(h[y].substring(15)),this.$=h[y].substring(15);break;case 21:this.$=h[y].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[y].trim(),b.setAccDescription(this.$);break;case 28:case 29:h[y].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 30:b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 31:h[y].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[y]),this.$=h[y];break;case 32:b.addDeploymentNode("node",...h[y]),this.$=h[y];break;case 33:b.addDeploymentNode("nodeL",...h[y]),this.$=h[y];break;case 34:b.addDeploymentNode("nodeR",...h[y]),this.$=h[y];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[y]),this.$=h[y];break;case 40:b.addPersonOrSystem("external_person",...h[y]),this.$=h[y];break;case 41:b.addPersonOrSystem("system",...h[y]),this.$=h[y];break;case 42:b.addPersonOrSystem("system_db",...h[y]),this.$=h[y];break;case 43:b.addPersonOrSystem("system_queue",...h[y]),this.$=h[y];break;case 44:b.addPersonOrSystem("external_system",...h[y]),this.$=h[y];break;case 45:b.addPersonOrSystem("external_system_db",...h[y]),this.$=h[y];break;case 46:b.addPersonOrSystem("external_system_queue",...h[y]),this.$=h[y];break;case 47:b.addContainer("container",...h[y]),this.$=h[y];break;case 48:b.addContainer("container_db",...h[y]),this.$=h[y];break;case 49:b.addContainer("container_queue",...h[y]),this.$=h[y];break;case 50:b.addContainer("external_container",...h[y]),this.$=h[y];break;case 51:b.addContainer("external_container_db",...h[y]),this.$=h[y];break;case 52:b.addContainer("external_container_queue",...h[y]),this.$=h[y];break;case 53:b.addComponent("component",...h[y]),this.$=h[y];break;case 54:b.addComponent("component_db",...h[y]),this.$=h[y];break;case 55:b.addComponent("component_queue",...h[y]),this.$=h[y];break;case 56:b.addComponent("external_component",...h[y]),this.$=h[y];break;case 57:b.addComponent("external_component_db",...h[y]),this.$=h[y];break;case 58:b.addComponent("external_component_queue",...h[y]),this.$=h[y];break;case 60:b.addRel("rel",...h[y]),this.$=h[y];break;case 61:b.addRel("birel",...h[y]),this.$=h[y];break;case 62:b.addRel("rel_u",...h[y]),this.$=h[y];break;case 63:b.addRel("rel_d",...h[y]),this.$=h[y];break;case 64:b.addRel("rel_l",...h[y]),this.$=h[y];break;case 65:b.addRel("rel_r",...h[y]),this.$=h[y];break;case 66:b.addRel("rel_b",...h[y]),this.$=h[y];break;case 67:h[y].splice(0,1),b.addRel("rel",...h[y]),this.$=h[y];break;case 68:b.updateElStyle("update_el_style",...h[y]),this.$=h[y];break;case 69:b.updateRelStyle("update_rel_style",...h[y]),this.$=h[y];break;case 70:b.updateLayoutConfig("update_layout_config",...h[y]),this.$=h[y];break;case 71:this.$=[h[y]];break;case 72:h[y].unshift(h[y-1]),this.$=h[y];break;case 73:case 75:this.$=h[y].trim();break;case 74:let Et={};Et[h[y-1].trim()]=h[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(Ct,[2,14]),e(Ft,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(vt,[2,19]),e(vt,[2,20]),{25:[1,78]},{27:[1,79]},e(vt,[2,23]),{35:80,75:81,76:E,77:A,79:S,80:C},{35:86,75:81,76:E,77:A,79:S,80:C},{35:87,75:81,76:E,77:A,79:S,80:C},{35:88,75:81,76:E,77:A,79:S,80:C},{35:89,75:81,76:E,77:A,79:S,80:C},{35:90,75:81,76:E,77:A,79:S,80:C},{35:91,75:81,76:E,77:A,79:S,80:C},{35:92,75:81,76:E,77:A,79:S,80:C},{35:93,75:81,76:E,77:A,79:S,80:C},{35:94,75:81,76:E,77:A,79:S,80:C},{35:95,75:81,76:E,77:A,79:S,80:C},{35:96,75:81,76:E,77:A,79:S,80:C},{35:97,75:81,76:E,77:A,79:S,80:C},{35:98,75:81,76:E,77:A,79:S,80:C},{35:99,75:81,76:E,77:A,79:S,80:C},{35:100,75:81,76:E,77:A,79:S,80:C},{35:101,75:81,76:E,77:A,79:S,80:C},{35:102,75:81,76:E,77:A,79:S,80:C},{35:103,75:81,76:E,77:A,79:S,80:C},{35:104,75:81,76:E,77:A,79:S,80:C},e(O,[2,59]),{35:105,75:81,76:E,77:A,79:S,80:C},{35:106,75:81,76:E,77:A,79:S,80:C},{35:107,75:81,76:E,77:A,79:S,80:C},{35:108,75:81,76:E,77:A,79:S,80:C},{35:109,75:81,76:E,77:A,79:S,80:C},{35:110,75:81,76:E,77:A,79:S,80:C},{35:111,75:81,76:E,77:A,79:S,80:C},{35:112,75:81,76:E,77:A,79:S,80:C},{35:113,75:81,76:E,77:A,79:S,80:C},{35:114,75:81,76:E,77:A,79:S,80:C},{35:115,75:81,76:E,77:A,79:S,80:C},{20:116,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:S,80:C},{35:120,75:81,76:E,77:A,79:S,80:C},{35:121,75:81,76:E,77:A,79:S,80:C},{35:122,75:81,76:E,77:A,79:S,80:C},{35:123,75:81,76:E,77:A,79:S,80:C},{35:124,75:81,76:E,77:A,79:S,80:C},{35:125,75:81,76:E,77:A,79:S,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Ft,[2,17],{21:22,19:130,22:t,23:r,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:o,26:l,28:n,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(vt,[2,21]),e(vt,[2,22]),e(O,[2,39]),e(ne,[2,71],{75:81,35:132,76:E,77:A,79:S,80:C}),e(Dt,[2,73]),{78:[1,133]},e(Dt,[2,75]),e(Dt,[2,76]),e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),e(O,[2,47]),e(O,[2,48]),e(O,[2,49]),e(O,[2,50]),e(O,[2,51]),e(O,[2,52]),e(O,[2,53]),e(O,[2,54]),e(O,[2,55]),e(O,[2,56]),e(O,[2,57]),e(O,[2,58]),e(O,[2,60]),e(O,[2,61]),e(O,[2,62]),e(O,[2,63]),e(O,[2,64]),e(O,[2,65]),e(O,[2,66]),e(O,[2,67]),e(O,[2,68]),e(O,[2,69]),e(O,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Ft,[2,18]),e(Ct,[2,38]),e(ne,[2,72]),e(Dt,[2,74]),e(O,[2,24]),e(O,[2,35]),e(Xt,[2,25]),e(Xt,[2,26],{12:[1,138]}),e(Xt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(F,g){if(g.recoverable)this.trace(F);else{var x=new Error(F);throw x.hash=g,x}},parse:function(F){var g=this,x=[0],b=[],k=[null],h=[],D=this.table,y="",Et=0,ae=0,Ee=2,ie=1,Ae=h.slice.call(arguments,1),w=Object.create(this.lexer),At={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(At.yy[Qt]=this.yy[Qt]);w.setInput(F,At.yy),At.yy.lexer=w,At.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var $t=w.yylloc;h.push($t);var Se=w.options&&w.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var Q;return Q=b.pop()||w.lex()||ie,typeof Q!="number"&&(Q instanceof Array&&(b=Q,Q=b.pop()),Q=g.symbols_[Q]||Q),Q}for(var N,St,j,Vt,Ot={},Nt,z,se,Pt;;){if(St=x[x.length-1],this.defaultActions[St]?j=this.defaultActions[St]:((N===null||typeof N>"u")&&(N=Ce()),j=D[St]&&D[St][N]),typeof j>"u"||!j.length||!j[0]){var qt="";Pt=[];for(Nt in D[St])this.terminals_[Nt]&&Nt>Ee&&Pt.push("'"+this.terminals_[Nt]+"'");w.showPosition?qt="Parse error on line "+(Et+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+Pt.join(", ")+", got '"+(this.terminals_[N]||N)+"'":qt="Parse error on line "+(Et+1)+": Unexpected "+(N==ie?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(qt,{text:w.match,token:this.terminals_[N]||N,line:w.yylineno,loc:$t,expected:Pt})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+St+", token: "+N);switch(j[0]){case 1:x.push(N),k.push(w.yytext),h.push(w.yylloc),x.push(j[1]),N=null,ae=w.yyleng,y=w.yytext,Et=w.yylineno,$t=w.yylloc;break;case 2:if(z=this.productions_[j[1]][1],Ot.$=k[k.length-z],Ot._$={first_line:h[h.length-(z||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(z||1)].first_column,last_column:h[h.length-1].last_column},Se&&(Ot._$.range=[h[h.length-(z||1)].range[0],h[h.length-1].range[1]]),Vt=this.performAction.apply(Ot,[y,ae,Et,At.yy,j[1],k,h].concat(Ae)),typeof Vt<"u")return Vt;z&&(x=x.slice(0,-1*z*2),k=k.slice(0,-1*z),h=h.slice(0,-1*z)),x.push(this.productions_[j[1]][0]),k.push(Ot.$),h.push(Ot._$),se=D[x[x.length-2]][x[x.length-1]],x.push(se);break;case 3:return!0}}return!0}},me=function(){var F={EOF:1,parseError:function(g,x){if(this.yy.parser)this.yy.parser.parseError(g,x);else throw new Error(g)},setInput:function(g,x){return this.yy=x||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var x=g.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},unput:function(g){var x=g.length,b=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var k=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),b.length-1&&(this.yylineno-=b.length-1);var h=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:b?(b.length===k.length?this.yylloc.first_column:0)+k[k.length-b.length].length-b[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(g){this.unput(this.match.slice(g))},pastInput:function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var g=this.pastInput(),x=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{b0 as t,b1 as a}from"./index-D5Z2TibF.js";const n=(o,r)=>t.lang.round(a.parse(o)[r]);export{n as t};
@@ -1,2 +1,2 @@
1
- import{Y,K as B,z as C}from"./styles-b4e223ce-TYmJC5IN-CyGeIEtW.js";import{E as H,O as f,F as T,Q as Z,d as D,o as J,f as v,Z as W}from"./index-3H3i7ExC.js";import{K as X}from"./graph-BV6jB5rk-DcOA8BmL.js";import{A as $}from"./layout-LXMv3mSS-CNNBHyhJ.js";let O=0;const R=function(n,a,t,s,l){const c=function(i){switch(i){case l.db.relationType.AGGREGATION:return"aggregation";case l.db.relationType.EXTENSION:return"extension";case l.db.relationType.COMPOSITION:return"composition";case l.db.relationType.DEPENDENCY:return"dependency";case l.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(i=>!Number.isNaN(i.y));const o=a.points,g=D().x(function(i){return i.x}).y(function(i){return i.y}).curve(J),d=n.append("path").attr("d",g(o)).attr("id","edge"+O).attr("class","relation");let r="";s.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&d.attr("class","relation dashed-line"),t.relation.lineType==10&&d.attr("class","relation dotted-line"),t.relation.type1!=="none"&&d.attr("marker-start","url("+r+"#"+c(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&d.attr("marker-end","url("+r+"#"+c(t.relation.type2)+"End)");let y,p;const x=a.points.length;let m=v.calcLabelPosition(a.points);y=m.x,p=m.y;let b,w,e,h;if(x%2!==0&&x>1){let i=v.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),u=v.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);f.debug("cardinality_1_point "+JSON.stringify(i)),f.debug("cardinality_2_point "+JSON.stringify(u)),b=i.x,w=i.y,e=u.x,h=u.y}if(t.title!==void 0){const i=n.append("g").attr("class","classLabel"),u=i.append("text").attr("class","label").attr("x",y).attr("y",p).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=u;const E=u.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",E.x-s.padding/2).attr("y",E.y-s.padding/2).attr("width",E.width+s.padding).attr("height",E.height+s.padding)}f.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",w).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",e).attr("y",h).attr("fill","black").attr("font-size","6").text(t.relationTitle2),O++},F=function(n,a,t,s){f.debug("Rendering class ",a,t);const l=a.id,c={id:l,label:a.id,width:0,height:0},o=n.append("g").attr("id",s.db.lookUpDomId(l)).attr("class","classGroup");let g;a.link?g=o.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let d=!0;a.annotations.forEach(function(i){const u=g.append("tspan").text("«"+i+"»");d||u.attr("dy",t.textHeight),d=!1});let r=A(a);const y=g.append("tspan").text(r).attr("class","title");d||y.attr("dy",t.textHeight);const p=g.node().getBBox().height;let x,m,b;if(a.members.length>0){x=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin/2).attr("y2",t.padding+p+t.dividerMargin/2);const i=o.append("text").attr("x",t.padding).attr("y",p+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.members.forEach(function(u){S(i,u,d,t),d=!1}),m=i.node().getBBox()}if(a.methods.length>0){b=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin+m.height).attr("y2",t.padding+p+t.dividerMargin+m.height);const i=o.append("text").attr("x",t.padding).attr("y",p+2*t.dividerMargin+m.height+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.methods.forEach(function(u){S(i,u,d,t),d=!1})}const w=o.node().getBBox();var e=" ";a.cssClasses.length>0&&(e=e+a.cssClasses.join(" "));const h=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",w.width+2*t.padding).attr("height",w.height+t.padding+.5*t.dividerMargin).attr("class",e).node().getBBox().width;return g.node().childNodes.forEach(function(i){i.setAttribute("x",(h-i.getBBox().width)/2)}),a.tooltip&&g.insert("title").text(a.tooltip),x&&x.attr("x2",h),b&&b.attr("x2",h),c.width=h,c.height=w.height+t.padding+.5*t.dividerMargin,c},A=function(n){let a=n.id;return n.type&&(a+="<"+W(n.type)+">"),a},G=function(n,a,t,s){f.debug("Rendering note ",a,t);const l=a.id,c={id:l,text:a.text,width:0,height:0},o=n.append("g").attr("id",l).attr("class","classGroup");let g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const d=JSON.parse(`"${a.text}"`).split(`
1
+ import{Y,K as B,z as C}from"./styles-b4e223ce-TYmJC5IN-S1iO1Zgs.js";import{E as H,O as f,F as T,Q as Z,d as D,o as J,f as v,Z as W}from"./index-D5Z2TibF.js";import{K as X}from"./graph-BV6jB5rk-DUrEc0st.js";import{A as $}from"./layout-LXMv3mSS-C4UceiUZ.js";let O=0;const R=function(n,a,t,s,l){const c=function(i){switch(i){case l.db.relationType.AGGREGATION:return"aggregation";case l.db.relationType.EXTENSION:return"extension";case l.db.relationType.COMPOSITION:return"composition";case l.db.relationType.DEPENDENCY:return"dependency";case l.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(i=>!Number.isNaN(i.y));const o=a.points,g=D().x(function(i){return i.x}).y(function(i){return i.y}).curve(J),d=n.append("path").attr("d",g(o)).attr("id","edge"+O).attr("class","relation");let r="";s.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&d.attr("class","relation dashed-line"),t.relation.lineType==10&&d.attr("class","relation dotted-line"),t.relation.type1!=="none"&&d.attr("marker-start","url("+r+"#"+c(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&d.attr("marker-end","url("+r+"#"+c(t.relation.type2)+"End)");let y,p;const x=a.points.length;let m=v.calcLabelPosition(a.points);y=m.x,p=m.y;let b,w,e,h;if(x%2!==0&&x>1){let i=v.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),u=v.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);f.debug("cardinality_1_point "+JSON.stringify(i)),f.debug("cardinality_2_point "+JSON.stringify(u)),b=i.x,w=i.y,e=u.x,h=u.y}if(t.title!==void 0){const i=n.append("g").attr("class","classLabel"),u=i.append("text").attr("class","label").attr("x",y).attr("y",p).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=u;const E=u.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",E.x-s.padding/2).attr("y",E.y-s.padding/2).attr("width",E.width+s.padding).attr("height",E.height+s.padding)}f.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",w).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",e).attr("y",h).attr("fill","black").attr("font-size","6").text(t.relationTitle2),O++},F=function(n,a,t,s){f.debug("Rendering class ",a,t);const l=a.id,c={id:l,label:a.id,width:0,height:0},o=n.append("g").attr("id",s.db.lookUpDomId(l)).attr("class","classGroup");let g;a.link?g=o.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let d=!0;a.annotations.forEach(function(i){const u=g.append("tspan").text("«"+i+"»");d||u.attr("dy",t.textHeight),d=!1});let r=A(a);const y=g.append("tspan").text(r).attr("class","title");d||y.attr("dy",t.textHeight);const p=g.node().getBBox().height;let x,m,b;if(a.members.length>0){x=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin/2).attr("y2",t.padding+p+t.dividerMargin/2);const i=o.append("text").attr("x",t.padding).attr("y",p+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.members.forEach(function(u){S(i,u,d,t),d=!1}),m=i.node().getBBox()}if(a.methods.length>0){b=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin+m.height).attr("y2",t.padding+p+t.dividerMargin+m.height);const i=o.append("text").attr("x",t.padding).attr("y",p+2*t.dividerMargin+m.height+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.methods.forEach(function(u){S(i,u,d,t),d=!1})}const w=o.node().getBBox();var e=" ";a.cssClasses.length>0&&(e=e+a.cssClasses.join(" "));const h=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",w.width+2*t.padding).attr("height",w.height+t.padding+.5*t.dividerMargin).attr("class",e).node().getBBox().width;return g.node().childNodes.forEach(function(i){i.setAttribute("x",(h-i.getBBox().width)/2)}),a.tooltip&&g.insert("title").text(a.tooltip),x&&x.attr("x2",h),b&&b.attr("x2",h),c.width=h,c.height=w.height+t.padding+.5*t.dividerMargin,c},A=function(n){let a=n.id;return n.type&&(a+="<"+W(n.type)+">"),a},G=function(n,a,t,s){f.debug("Rendering note ",a,t);const l=a.id,c={id:l,text:a.text,width:0,height:0},o=n.append("g").attr("id",l).attr("class","classGroup");let g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const d=JSON.parse(`"${a.text}"`).split(`
2
2
  `);d.forEach(function(p){f.debug(`Adding line: ${p}`),g.append("tspan").text(p).attr("class","title").attr("dy",t.textHeight)});const r=o.node().getBBox(),y=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",r.width+2*t.padding).attr("height",r.height+d.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return g.node().childNodes.forEach(function(p){p.setAttribute("x",(y-p.getBBox().width)/2)}),c.width=y,c.height=r.height+d.length*t.textHeight+t.padding+.5*t.dividerMargin,c},S=function(n,a,t,s){const{displayText:l,cssStyle:c}=a.getDisplayDetails(),o=n.append("tspan").attr("x",s.padding).text(l);c!==""&&o.attr("style",a.cssStyle),t||o.attr("dy",s.textHeight)},M={getClassTitleString:A,drawClass:F,drawEdge:R,drawNote:G};let N={};const L=20,k=function(n){const a=Object.entries(N).find(t=>t[1].label===n);if(a)return a[0]},I=function(n){n.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.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 18,7 L9,13 L14,7 L9,1 Z")},P=function(n,a,t,s){const l=H().class;N={},f.info("Rendering diagram "+n);const c=H().securityLevel;let o;c==="sandbox"&&(o=T("#i"+a));const g=c==="sandbox"?T(o.nodes()[0].contentDocument.body):T("body"),d=g.select(`[id='${a}']`);I(d);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const y=s.db.getClasses(),p=Object.keys(y);for(const e of p){const h=y[e],i=M.drawClass(d,h,l,s);N[i.id]=i,r.setNode(i.id,i),f.info("Org height: "+i.height)}s.db.getRelations().forEach(function(e){f.info("tjoho"+k(e.id1)+k(e.id2)+JSON.stringify(e)),r.setEdge(k(e.id1),k(e.id2),{relation:e},e.title||"DEFAULT")}),s.db.getNotes().forEach(function(e){f.debug(`Adding note: ${JSON.stringify(e)}`);const h=M.drawNote(d,e,l,s);N[h.id]=h,r.setNode(h.id,h),e.class&&e.class in y&&r.setEdge(e.id,k(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),$(r),r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&(f.debug("Node "+e+": "+JSON.stringify(r.node(e))),g.select("#"+(s.db.lookUpDomId(e)||e)).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )"))}),r.edges().forEach(function(e){e!==void 0&&r.edge(e)!==void 0&&(f.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r.edge(e))),M.drawEdge(d,r.edge(e),r.edge(e).relation,l,s))});const x=d.node().getBBox(),m=x.width+L*2,b=x.height+L*2;Z(d,b,m,l.useMaxWidth);const w=`${x.x-L} ${x.y-L} ${m} ${b}`;f.debug(`viewBox ${w}`),d.attr("viewBox",w)},z={draw:P},Q={parser:C,db:B,renderer:z,styles:Y,init:n=>{n.class||(n.class={}),n.class.arrowMarkerAbsolute=n.arrowMarkerAbsolute,B.clear()}};export{Q as diagram};
@@ -1,2 +1,2 @@
1
- import{Y as M,K as L,z as _}from"./styles-b4e223ce-TYmJC5IN-CyGeIEtW.js";import{O as c,E as d,F as w,f as B,A as K,m as N,a as A,z as D,b as C}from"./index-3H3i7ExC.js";import{K as O}from"./graph-BV6jB5rk-DcOA8BmL.js";import{b as R}from"./index-5325376f-DrY72DrM-BQxxLtiM.js";import"./layout-LXMv3mSS-CNNBHyhJ.js";import"./clone-B1V2003j-DKfYfMmY.js";import"./edges-96097737-Zk-qG_8u-dmc-RUJc.js";import"./createText-1719965b-C2-AT0ab-Ngc7i9D1.js";const k=o=>N.sanitizeText(o,d());let x={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const j=function(o,t,b,i){const e=Object.keys(o);c.info("keys:",e),c.info(o),e.forEach(function(s){var l,r;const a=o[s],n={shape:"rect",id:a.id,domId:a.domId,labelText:k(a.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};t.setNode(a.id,n),I(a.classes,t,b,i,a.id),c.info("setNode",n)})},I=function(o,t,b,i,e){const s=Object.keys(o);c.info("keys:",s),c.info(o),s.filter(l=>o[l].parent==e).forEach(function(l){var r,a;const n=o[l],g=n.cssClasses.join(" "),y=A(n.styles),u=n.label??n.id,p=0,f={labelStyle:y.labelStyle,shape:"class_box",labelText:k(u),classData:n,rx:p,ry:p,class:g,style:y.style,id:n.id,domId:n.domId,tooltip:i.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=d().flowchart)==null?void 0:r.padding)??((a=d().class)==null?void 0:a.padding)};t.setNode(n.id,f),e&&t.setParent(n.id,e),c.info("setNode",f)})},F=function(o,t,b,i){c.info(o),o.forEach(function(e,s){var l,r;const a=e,n="",g={labelStyle:"",style:""},y=a.text,u=0,p={labelStyle:g.labelStyle,shape:"note",labelText:k(y),noteData:a,rx:u,ry:u,class:n,style:g.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};if(t.setNode(a.id,p),c.info("setNode",p),!a.class||!(a.class in i))return;const f=b+s,m={id:`edgeNote${f}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:D(x.curve,C)};t.setEdge(a.id,a.class,m,f)})},P=function(o,t){const b=d().flowchart;let i=0;o.forEach(function(e){var s;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:E(e.relation.type1),arrowTypeEnd:E(e.relation.type2),style:"fill:none",labelStyle:"",curve:D(b==null?void 0:b.curve,C)};if(c.info(l,e),e.style!==void 0){const r=A(e.style);l.style=r.style,l.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((s=d().flowchart)==null?void 0:s.htmlLabels)??d().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(N.lineBreakRegex,`
1
+ import{Y as M,K as L,z as _}from"./styles-b4e223ce-TYmJC5IN-S1iO1Zgs.js";import{O as c,E as d,F as w,f as B,A as K,m as N,a as A,z as D,b as C}from"./index-D5Z2TibF.js";import{K as O}from"./graph-BV6jB5rk-DUrEc0st.js";import{b as R}from"./index-5325376f-DrY72DrM-C7kJKw52.js";import"./layout-LXMv3mSS-C4UceiUZ.js";import"./clone-B1V2003j-Cwz0SSjy.js";import"./edges-96097737-Zk-qG_8u-nsO-00KN.js";import"./createText-1719965b-C2-AT0ab-CgEMUHnk.js";const k=o=>N.sanitizeText(o,d());let x={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const j=function(o,t,b,i){const e=Object.keys(o);c.info("keys:",e),c.info(o),e.forEach(function(s){var l,r;const a=o[s],n={shape:"rect",id:a.id,domId:a.domId,labelText:k(a.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};t.setNode(a.id,n),I(a.classes,t,b,i,a.id),c.info("setNode",n)})},I=function(o,t,b,i,e){const s=Object.keys(o);c.info("keys:",s),c.info(o),s.filter(l=>o[l].parent==e).forEach(function(l){var r,a;const n=o[l],g=n.cssClasses.join(" "),y=A(n.styles),u=n.label??n.id,p=0,f={labelStyle:y.labelStyle,shape:"class_box",labelText:k(u),classData:n,rx:p,ry:p,class:g,style:y.style,id:n.id,domId:n.domId,tooltip:i.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=d().flowchart)==null?void 0:r.padding)??((a=d().class)==null?void 0:a.padding)};t.setNode(n.id,f),e&&t.setParent(n.id,e),c.info("setNode",f)})},F=function(o,t,b,i){c.info(o),o.forEach(function(e,s){var l,r;const a=e,n="",g={labelStyle:"",style:""},y=a.text,u=0,p={labelStyle:g.labelStyle,shape:"note",labelText:k(y),noteData:a,rx:u,ry:u,class:n,style:g.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};if(t.setNode(a.id,p),c.info("setNode",p),!a.class||!(a.class in i))return;const f=b+s,m={id:`edgeNote${f}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:D(x.curve,C)};t.setEdge(a.id,a.class,m,f)})},P=function(o,t){const b=d().flowchart;let i=0;o.forEach(function(e){var s;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:E(e.relation.type1),arrowTypeEnd:E(e.relation.type2),style:"fill:none",labelStyle:"",curve:D(b==null?void 0:b.curve,C)};if(c.info(l,e),e.style!==void 0){const r=A(e.style);l.style=r.style,l.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((s=d().flowchart)==null?void 0:s.htmlLabels)??d().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(N.lineBreakRegex,`
2
2
  `),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,l,i)})},W=function(o){x={...x,...o}},H=async function(o,t,b,i){c.info("Drawing class - ",t);const e=d().flowchart??d().class,s=d().securityLevel;c.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,a=new O({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=i.db.getNamespaces(),g=i.db.getClasses(),y=i.db.getRelations(),u=i.db.getNotes();c.info(y),j(n,a,t,i),I(g,a,t,i),P(y,a),F(u,a,y.length+1,g);let p;s==="sandbox"&&(p=w("#i"+t));const f=s==="sandbox"?w(p.nodes()[0].contentDocument.body):w("body"),m=f.select(`[id="${t}"]`),$=f.select("#"+t+" g");if(await R($,a,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),B.insertTitle(m,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),K(a,m,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=s==="sandbox"?p.nodes()[0].contentDocument:document,z=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const v of z){const S=v.getBBox(),h=T.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",S.width),h.setAttribute("height",S.height),v.insertBefore(h,v.firstChild)}}};function E(o){let t;switch(o){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const Y={setConf:W,draw:H},ee={parser:_,db:L,renderer:Y,styles:M,init:o=>{o.class||(o.class={}),o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,L.clear()}};export{ee as diagram};
@@ -0,0 +1 @@
1
+ import{U as o}from"./graph-BV6jB5rk-DUrEc0st.js";var t=4;function n(r){return o(r,t)}export{n as a};
@@ -1,4 +1,4 @@
1
- import{O as Et,br as At,W as It,ak as Tt,bs as Ct,bt as ze}from"./index-3H3i7ExC.js";const wt={};function zt(e,r){const t=wt,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return et(e,n,u)}function et(e,r,t){if(Dt(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qe(e.children,r,t)}return Array.isArray(e)?qe(e,r,t):""}function qe(e,r,t){const n=[];let u=-1;for(;++u<e.length;)n[u]=et(e[u],r,t);return n.join("")}function Dt(e){return!!(e&&typeof e=="object")}function te(e,r,t,n){const u=e.length;let c=0,i;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,n.length<1e4)i=Array.from(n),i.unshift(r,t),e.splice(...i);else for(t&&e.splice(r,t);c<n.length;)i=n.slice(c,c+1e4),i.unshift(r,0),e.splice(...i),c+=1e4,r+=1e4}function K(e,r){return e.length>0?(te(e,e.length,0,r),e):r}const Ve={}.hasOwnProperty;function _t(e){const r={};let t=-1;for(;++t<e.length;)Bt(r,e[t]);return r}function Bt(e,r){let t;for(t in r){const n=(Ve.call(e,t)?e[t]:void 0)||(e[t]={}),u=r[t];let c;if(u)for(c in u){Ve.call(n,c)||(n[c]=[]);const i=u[c];Mt(n[c],Array.isArray(i)?i:i?[i]:[])}}}function Mt(e,r){let t=-1;const n=[];for(;++t<r.length;)(r[t].add==="after"?e:n).push(r[t]);te(e,0,0,n)}const Pt=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ee=se(/[A-Za-z]/),Z=se(/[\dA-Za-z]/),Lt=se(/[#-'*+\--9=?A-Z^-~]/);function Ae(e){return e!==null&&(e<32||e===127)}const Ie=se(/\d/),Ot=se(/[\dA-Fa-f]/),jt=se(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function T(e){return e===-2||e===-1||e===32}const Ht=se(Pt),Rt=se(/\s/);function se(e){return r;function r(t){return t!==null&&e.test(String.fromCharCode(t))}}function _(e,r,t,n){const u=n?n-1:Number.POSITIVE_INFINITY;let c=0;return i;function i(p){return T(p)?(e.enter(t),o(p)):r(p)}function o(p){return T(p)&&c++<u?(e.consume(p),o):(e.exit(t),r(p))}}const qt={tokenize:Vt};function Vt(e){const r=e.attempt(this.parser.constructs.contentInitial,n,u);let t;return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_(e,r,"linePrefix")}function u(o){return e.enter("paragraph"),c(o)}function c(o){const p=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=p),t=p,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return E(o)?(e.consume(o),e.exit("chunkText"),c):(e.consume(o),i)}}const Nt={tokenize:Ut},Ne={tokenize:Wt};function Ut(e){const r=this,t=[];let n=0,u,c,i;return o;function o(S){if(n<t.length){const B=t[n];return r.containerState=B[1],e.attempt(B[0].continuation,p,a)(S)}return a(S)}function p(S){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&O();const B=r.events.length;let P=B,x;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){x=r.events[P][1].end;break}y(n);let w=B;for(;w<r.events.length;)r.events[w][1].end=Object.assign({},x),w++;return te(r.events,P+1,0,r.events.slice(B)),r.events.length=w,a(S)}return o(S)}function a(S){if(n===t.length){if(!u)return g(S);if(u.currentConstruct&&u.currentConstruct.concrete)return I(S);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Ne,d,h)(S)}function d(S){return u&&O(),y(n),g(S)}function h(S){return r.parser.lazy[r.now().line]=n!==t.length,i=r.now().offset,I(S)}function g(S){return r.containerState={},e.attempt(Ne,f,I)(S)}function f(S){return n++,t.push([r.currentConstruct,r.containerState]),g(S)}function I(S){if(S===null){u&&O(),y(0),e.consume(S);return}return u=u||r.parser.flow(r.now()),e.enter("chunkFlow",{contentType:"flow",previous:c,_tokenizer:u}),C(S)}function C(S){if(S===null){L(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return E(S)?(e.consume(S),L(e.exit("chunkFlow")),n=0,r.interrupt=void 0,o):(e.consume(S),C)}function L(S,B){const P=r.sliceStream(S);if(B&&P.push(null),S.previous=c,c&&(c.next=S),c=S,u.defineSkip(S.start),u.write(P),r.parser.lazy[S.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<i&&(!u.events[x][1].end||u.events[x][1].end.offset>i))return;const w=r.events.length;let R=w,q,V;for(;R--;)if(r.events[R][0]==="exit"&&r.events[R][1].type==="chunkFlow"){if(q){V=r.events[R][1].end;break}q=!0}for(y(n),x=w;x<r.events.length;)r.events[x][1].end=Object.assign({},V),x++;te(r.events,R+1,0,r.events.slice(w)),r.events.length=x}}function y(S){let B=t.length;for(;B-- >S;){const P=t[B];r.containerState=P[1],P[0].exit.call(r,e)}t.length=S}function O(){u.write([null]),c=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Wt(e,r,t){return _(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||Q(e)||Rt(e))return 1;if(Ht(e))return 2}function De(e,r,t){const n=[];let u=-1;for(;++u<e.length;){const c=e[u].resolveAll;c&&!n.includes(c)&&(r=c(r,t),n.push(c))}return r}const Te={name:"attention",tokenize:Qt,resolveAll:$t};function $t(e,r){let t=-1,n,u,c,i,o,p,a,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(n=t;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&r.sliceSerialize(e[n][1]).charCodeAt(0)===r.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[n][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;p=e[n][1].end.offset-e[n][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),g=Object.assign({},e[t][1].start);We(h,-p),We(g,p),i={type:p>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:p>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:g},c={type:p>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[t][1].start)},u={type:p>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[t][1].start=Object.assign({},o.end),a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=K(a,[["enter",e[n][1],r],["exit",e[n][1],r]])),a=K(a,[["enter",u,r],["enter",i,r],["exit",i,r],["enter",c,r]]),a=K(a,De(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),a=K(a,[["exit",c,r],["enter",o,r],["exit",o,r],["exit",u,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,a=K(a,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,te(e,n-1,t-n+3,a),t=n+a.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Qt(e,r){const t=this.parser.constructs.attentionMarkers.null,n=this.previous,u=Ue(n);let c;return i;function i(p){return c=p,e.enter("attentionSequence"),o(p)}function o(p){if(p===c)return e.consume(p),o;const a=e.exit("attentionSequence"),d=Ue(p),h=!d||d===2&&u||t.includes(p),g=!u||u===2&&d||t.includes(n);return a._open=!!(c===42?h:h&&(u||!g)),a._close=!!(c===42?g:g&&(d||!h)),r(p)}}function We(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const Kt={name:"autolink",tokenize:Gt};function Gt(e,r,t){let n=0;return u;function u(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(f){return ee(f)?(e.consume(f),i):a(f)}function i(f){return f===43||f===45||f===46||Z(f)?(n=1,o(f)):a(f)}function o(f){return f===58?(e.consume(f),n=0,p):(f===43||f===45||f===46||Z(f))&&n++<32?(e.consume(f),o):(n=0,a(f))}function p(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):f===null||f===32||f===60||Ae(f)?t(f):(e.consume(f),p)}function a(f){return f===64?(e.consume(f),d):Lt(f)?(e.consume(f),a):t(f)}function d(f){return Z(f)?h(f):t(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):g(f)}function g(f){if((f===45||Z(f))&&n++<63){const I=f===45?g:h;return e.consume(f),I}return t(f)}}const Fe={tokenize:Jt,partial:!0};function Jt(e,r,t){return n;function n(c){return T(c)?_(e,u,"linePrefix")(c):u(c)}function u(c){return c===null||E(c)?r(c):t(c)}}const tt={name:"blockQuote",tokenize:Xt,continuation:{tokenize:Zt},exit:Yt};function Xt(e,r,t){const n=this;return u;function u(i){if(i===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),c}return t(i)}function c(i){return T(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(i))}}function Zt(e,r,t){const n=this;return u;function u(i){return T(i)?_(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):c(i)}function c(i){return e.attempt(tt,r,t)(i)}}function Yt(e){e.exit("blockQuote")}const nt={name:"characterEscape",tokenize:en};function en(e,r,t){return n;function n(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),u}function u(c){return jt(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):t(c)}}const rt={name:"characterReference",tokenize:tn};function tn(e,r,t){const n=this;let u=0,c,i;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),p}function p(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),c=31,i=Z,d(h))}function a(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,i=Ot,d):(e.enter("characterReferenceValue"),c=7,i=Ie,d(h))}function d(h){if(h===59&&u){const g=e.exit("characterReferenceValue");return i===Z&&!ze(n.sliceSerialize(g))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return i(h)&&u++<c?(e.consume(h),d):t(h)}}const $e={tokenize:rn,partial:!0},Qe={name:"codeFenced",tokenize:nn,concrete:!0};function nn(e,r,t){const n=this,u={tokenize:P,partial:!0};let c=0,i=0,o;return p;function p(x){return a(x)}function a(x){const w=n.events[n.events.length-1];return c=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===o?(i++,e.consume(x),d):i<3?t(x):(e.exit("codeFencedFenceSequence"),T(x)?_(e,h,"whitespace")(x):h(x))}function h(x){return x===null||E(x)?(e.exit("codeFencedFence"),n.interrupt?r(x):e.check($e,C,B)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(x)):T(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(e,f,"whitespace")(x)):x===96&&x===o?t(x):(e.consume(x),g)}function f(x){return x===null||E(x)?h(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),I(x))}function I(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(x)):x===96&&x===o?t(x):(e.consume(x),I)}function C(x){return e.attempt(u,B,L)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y}function y(x){return c>0&&T(x)?_(e,O,"linePrefix",c+1)(x):O(x)}function O(x){return x===null||E(x)?e.check($e,C,B)(x):(e.enter("codeFlowValue"),S(x))}function S(x){return x===null||E(x)?(e.exit("codeFlowValue"),O(x)):(e.consume(x),S)}function B(x){return e.exit("codeFenced"),r(x)}function P(x,w,R){let q=0;return V;function V(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),F}function F(A){return x.enter("codeFencedFence"),T(A)?_(x,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A)}function v(A){return A===o?(x.enter("codeFencedFenceSequence"),M(A)):R(A)}function M(A){return A===o?(q++,x.consume(A),M):q>=i?(x.exit("codeFencedFenceSequence"),T(A)?_(x,j,"whitespace")(A):j(A)):R(A)}function j(A){return A===null||E(A)?(x.exit("codeFencedFence"),w(A)):R(A)}}}function rn(e,r,t){const n=this;return u;function u(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}const be={name:"codeIndented",tokenize:cn},un={tokenize:on,partial:!0};function cn(e,r,t){const n=this;return u;function u(a){return e.enter("codeIndented"),_(e,c,"linePrefix",5)(a)}function c(a){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(a):t(a)}function i(a){return a===null?p(a):E(a)?e.attempt(un,i,p)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||E(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function p(a){return e.exit("codeIndented"),r(a)}}function on(e,r,t){const n=this;return u;function u(i){return n.parser.lazy[n.now().line]?t(i):E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):_(e,c,"linePrefix",5)(i)}function c(i){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):E(i)?u(i):t(i)}}const sn={name:"codeText",tokenize:fn,resolve:ln,previous:an};function ln(e){let r=e.length-4,t=3,n,u;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n<r;)if(e[n][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(n=t-1,r++;++n<=r;)u===void 0?n!==r&&e[n][1].type!=="lineEnding"&&(u=n):(n===r||e[n][1].type==="lineEnding")&&(e[u][1].type="codeTextData",n!==u+2&&(e[u][1].end=e[n-1][1].end,e.splice(u+2,n-u-2),r-=n-u-2,n=u+2),u=void 0);return e}function an(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fn(e,r,t){let n=0,u,c;return i;function i(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),n++,o):(e.exit("codeTextSequence"),p(h))}function p(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),p):h===96?(c=e.enter("codeTextSequence"),u=0,d(h)):E(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),p):(e.enter("codeTextData"),a(h))}function a(h){return h===null||h===32||h===96||E(h)?(e.exit("codeTextData"),p(h)):(e.consume(h),a)}function d(h){return h===96?(e.consume(h),u++,d):u===n?(e.exit("codeTextSequence"),e.exit("codeText"),r(h)):(c.type="codeTextData",a(h))}}function it(e){const r={};let t=-1,n,u,c,i,o,p,a;for(;++t<e.length;){for(;t in r;)t=r[t];if(n=e[t],t&&n[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(p=n[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,dn(e,t)),t=r[t],a=!0);else if(n[1]._container){for(c=t,u=void 0;c--&&(i=e[c],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(u&&(e[u][1].type="lineEndingBlank"),i[1].type="lineEnding",u=c);u&&(n[1].end=Object.assign({},e[u][1].start),o=e.slice(u,t),o.unshift(n),te(e,u,t-u+1,o))}}return!a}function dn(e,r){const t=e[r][1],n=e[r][2];let u=r-1;const c=[],i=t._tokenizer||n.parser[t.contentType](t.start),o=i.events,p=[],a={};let d,h,g=-1,f=t,I=0,C=0;const L=[C];for(;f;){for(;e[++u][1]!==f;);c.push(u),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=t;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(C=g+1,L.push(C),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):L.pop(),g=L.length;g--;){const y=o.slice(L[g],L[g+1]),O=c.pop();p.unshift([O,O+y.length-1]),te(e,O,2,y)}for(g=-1;++g<p.length;)a[I+p[g][0]]=I+p[g][1],I+=p[g][1]-p[g][0]-1;return a}const pn={tokenize:gn,resolve:mn},hn={tokenize:xn,partial:!0};function mn(e){return it(e),e}function gn(e,r){let t;return n;function n(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?c(o):E(o)?e.check(hn,i,c)(o):(e.consume(o),u)}function c(o){return e.exit("chunkContent"),e.exit("content"),r(o)}function i(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function xn(e,r,t){const n=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_(e,c,"linePrefix")}function c(i){if(i===null||E(i))return t(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):e.interrupt(n.parser.constructs.flow,t,r)(i)}}function ut(e,r,t,n,u,c,i,o,p){const a=p||Number.POSITIVE_INFINITY;let d=0;return h;function h(y){return y===60?(e.enter(n),e.enter(u),e.enter(c),e.consume(y),e.exit(c),g):y===null||y===32||y===41||Ae(y)?t(y):(e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),C(y))}function g(y){return y===62?(e.enter(c),e.consume(y),e.exit(c),e.exit(u),e.exit(n),r):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),g(y)):y===null||y===60||E(y)?t(y):(e.consume(y),y===92?I:f)}function I(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function C(y){return!d&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),r(y)):d<a&&y===40?(e.consume(y),d++,C):y===41?(e.consume(y),d--,C):y===null||y===32||y===40||Ae(y)?t(y):(e.consume(y),y===92?L:C)}function L(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function ct(e,r,t,n,u,c){const i=this;let o=0,p;return a;function a(f){return e.enter(n),e.enter(u),e.consume(f),e.exit(u),e.enter(c),d}function d(f){return o>999||f===null||f===91||f===93&&!p||f===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?t(f):f===93?(e.exit(c),e.enter(u),e.consume(f),e.exit(u),e.exit(n),r):E(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||E(f)||o++>999?(e.exit("chunkString"),d(f)):(e.consume(f),p||(p=!T(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function ot(e,r,t,n,u,c){let i;return o;function o(g){return g===34||g===39||g===40?(e.enter(n),e.enter(u),e.consume(g),e.exit(u),i=g===40?41:g,p):t(g)}function p(g){return g===i?(e.enter(u),e.consume(g),e.exit(u),e.exit(n),r):(e.enter(c),a(g))}function a(g){return g===i?(e.exit(c),p(i)):g===null?t(g):E(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===i||g===null||E(g)?(e.exit("chunkString"),a(g)):(e.consume(g),g===92?h:d)}function h(g){return g===i||g===92?(e.consume(g),d):d(g)}}function xe(e,r){let t;return n;function n(u){return E(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t=!0,n):T(u)?_(e,n,t?"linePrefix":"lineSuffix")(u):r(u)}}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn={name:"definition",tokenize:Fn},yn={tokenize:vn,partial:!0};function Fn(e,r,t){const n=this;let u;return c;function c(f){return e.enter("definition"),i(f)}function i(f){return ct.call(n,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return u=he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),p):t(f)}function p(f){return Q(f)?xe(e,a)(f):a(f)}function a(f){return ut(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(yn,h,h)(f)}function h(f){return T(f)?_(e,g,"whitespace")(f):g(f)}function g(f){return f===null||E(f)?(e.exit("definition"),n.parser.defined.push(u),r(f)):t(f)}}function vn(e,r,t){return n;function n(o){return Q(o)?xe(e,u)(o):t(o)}function u(o){return ot(e,c,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function c(o){return T(o)?_(e,i,"whitespace")(o):i(o)}function i(o){return o===null||E(o)?r(o):t(o)}}const Sn={name:"hardBreakEscape",tokenize:bn};function bn(e,r,t){return n;function n(c){return e.enter("hardBreakEscape"),e.consume(c),u}function u(c){return E(c)?(e.exit("hardBreakEscape"),r(c)):t(c)}}const En={name:"headingAtx",tokenize:In,resolve:An};function An(e,r){let t=e.length-2,n=3,u,c;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(u={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},c={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},te(e,n,t-n+1,[["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r]])),e}function In(e,r,t){let n=0;return u;function u(d){return e.enter("atxHeading"),c(d)}function c(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&n++<6?(e.consume(d),i):d===null||Q(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),p(d)):d===null||E(d)?(e.exit("atxHeading"),r(d)):T(d)?_(e,o,"whitespace")(d):(e.enter("atxHeadingText"),a(d))}function p(d){return d===35?(e.consume(d),p):(e.exit("atxHeadingSequence"),o(d))}function a(d){return d===null||d===35||Q(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),a)}}const Tn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ke=["pre","script","style","textarea"],Cn={name:"htmlFlow",tokenize:_n,resolveTo:Dn,concrete:!0},wn={tokenize:Mn,partial:!0},zn={tokenize:Bn,partial:!0};function Dn(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function _n(e,r,t){const n=this;let u,c,i,o,p;return a;function a(l){return d(l)}function d(l){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(l),h}function h(l){return l===33?(e.consume(l),g):l===47?(e.consume(l),c=!0,C):l===63?(e.consume(l),u=3,n.interrupt?r:s):ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function g(l){return l===45?(e.consume(l),u=2,f):l===91?(e.consume(l),u=5,o=0,I):ee(l)?(e.consume(l),u=4,n.interrupt?r:s):t(l)}function f(l){return l===45?(e.consume(l),n.interrupt?r:s):t(l)}function I(l){const X="CDATA[";return l===X.charCodeAt(o++)?(e.consume(l),o===X.length?n.interrupt?r:v:I):t(l)}function C(l){return ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function L(l){if(l===null||l===47||l===62||Q(l)){const X=l===47,ae=i.toLowerCase();return!X&&!c&&Ke.includes(ae)?(u=1,n.interrupt?r(l):v(l)):Tn.includes(i.toLowerCase())?(u=6,X?(e.consume(l),y):n.interrupt?r(l):v(l)):(u=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(l):c?O(l):S(l))}return l===45||Z(l)?(e.consume(l),i+=String.fromCharCode(l),L):t(l)}function y(l){return l===62?(e.consume(l),n.interrupt?r:v):t(l)}function O(l){return T(l)?(e.consume(l),O):V(l)}function S(l){return l===47?(e.consume(l),V):l===58||l===95||ee(l)?(e.consume(l),B):T(l)?(e.consume(l),S):V(l)}function B(l){return l===45||l===46||l===58||l===95||Z(l)?(e.consume(l),B):P(l)}function P(l){return l===61?(e.consume(l),x):T(l)?(e.consume(l),P):S(l)}function x(l){return l===null||l===60||l===61||l===62||l===96?t(l):l===34||l===39?(e.consume(l),p=l,w):T(l)?(e.consume(l),x):R(l)}function w(l){return l===p?(e.consume(l),p=null,q):l===null||E(l)?t(l):(e.consume(l),w)}function R(l){return l===null||l===34||l===39||l===47||l===60||l===61||l===62||l===96||Q(l)?P(l):(e.consume(l),R)}function q(l){return l===47||l===62||T(l)?S(l):t(l)}function V(l){return l===62?(e.consume(l),F):t(l)}function F(l){return l===null||E(l)?v(l):T(l)?(e.consume(l),F):t(l)}function v(l){return l===45&&u===2?(e.consume(l),W):l===60&&u===1?(e.consume(l),N):l===62&&u===4?(e.consume(l),J):l===63&&u===3?(e.consume(l),s):l===93&&u===5?(e.consume(l),ne):E(l)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(wn,re,M)(l)):l===null||E(l)?(e.exit("htmlFlowData"),M(l)):(e.consume(l),v)}function M(l){return e.check(zn,j,re)(l)}function j(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),A}function A(l){return l===null||E(l)?M(l):(e.enter("htmlFlowData"),v(l))}function W(l){return l===45?(e.consume(l),s):v(l)}function N(l){return l===47?(e.consume(l),i="",G):v(l)}function G(l){if(l===62){const X=i.toLowerCase();return Ke.includes(X)?(e.consume(l),J):v(l)}return ee(l)&&i.length<8?(e.consume(l),i+=String.fromCharCode(l),G):v(l)}function ne(l){return l===93?(e.consume(l),s):v(l)}function s(l){return l===62?(e.consume(l),J):l===45&&u===2?(e.consume(l),s):v(l)}function J(l){return l===null||E(l)?(e.exit("htmlFlowData"),re(l)):(e.consume(l),J)}function re(l){return e.exit("htmlFlow"),r(l)}}function Bn(e,r,t){const n=this;return u;function u(i){return E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c):t(i)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}function Mn(e,r,t){return n;function n(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(Fe,r,t)}}const Pn={name:"htmlText",tokenize:Ln};function Ln(e,r,t){const n=this;let u,c,i;return o;function o(s){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(s),p}function p(s){return s===33?(e.consume(s),a):s===47?(e.consume(s),P):s===63?(e.consume(s),S):ee(s)?(e.consume(s),R):t(s)}function a(s){return s===45?(e.consume(s),d):s===91?(e.consume(s),c=0,I):ee(s)?(e.consume(s),O):t(s)}function d(s){return s===45?(e.consume(s),f):t(s)}function h(s){return s===null?t(s):s===45?(e.consume(s),g):E(s)?(i=h,N(s)):(e.consume(s),h)}function g(s){return s===45?(e.consume(s),f):h(s)}function f(s){return s===62?W(s):s===45?g(s):h(s)}function I(s){const J="CDATA[";return s===J.charCodeAt(c++)?(e.consume(s),c===J.length?C:I):t(s)}function C(s){return s===null?t(s):s===93?(e.consume(s),L):E(s)?(i=C,N(s)):(e.consume(s),C)}function L(s){return s===93?(e.consume(s),y):C(s)}function y(s){return s===62?W(s):s===93?(e.consume(s),y):C(s)}function O(s){return s===null||s===62?W(s):E(s)?(i=O,N(s)):(e.consume(s),O)}function S(s){return s===null?t(s):s===63?(e.consume(s),B):E(s)?(i=S,N(s)):(e.consume(s),S)}function B(s){return s===62?W(s):S(s)}function P(s){return ee(s)?(e.consume(s),x):t(s)}function x(s){return s===45||Z(s)?(e.consume(s),x):w(s)}function w(s){return E(s)?(i=w,N(s)):T(s)?(e.consume(s),w):W(s)}function R(s){return s===45||Z(s)?(e.consume(s),R):s===47||s===62||Q(s)?q(s):t(s)}function q(s){return s===47?(e.consume(s),W):s===58||s===95||ee(s)?(e.consume(s),V):E(s)?(i=q,N(s)):T(s)?(e.consume(s),q):W(s)}function V(s){return s===45||s===46||s===58||s===95||Z(s)?(e.consume(s),V):F(s)}function F(s){return s===61?(e.consume(s),v):E(s)?(i=F,N(s)):T(s)?(e.consume(s),F):q(s)}function v(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(e.consume(s),u=s,M):E(s)?(i=v,N(s)):T(s)?(e.consume(s),v):(e.consume(s),j)}function M(s){return s===u?(e.consume(s),u=void 0,A):s===null?t(s):E(s)?(i=M,N(s)):(e.consume(s),M)}function j(s){return s===null||s===34||s===39||s===60||s===61||s===96?t(s):s===47||s===62||Q(s)?q(s):(e.consume(s),j)}function A(s){return s===47||s===62||Q(s)?q(s):t(s)}function W(s){return s===62?(e.consume(s),e.exit("htmlTextData"),e.exit("htmlText"),r):t(s)}function N(s){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),G}function G(s){return T(s)?_(e,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):ne(s)}function ne(s){return e.enter("htmlTextData"),i(s)}}const _e={name:"labelEnd",tokenize:Vn,resolveTo:qn,resolveAll:Rn},On={tokenize:Nn},jn={tokenize:Un},Hn={tokenize:Wn};function Rn(e){let r=-1;for(;++r<e.length;){const t=e[r][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++)}return e}function qn(e,r){let t=e.length,n=0,u,c,i,o;for(;t--;)if(u=e[t][1],c){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(c=t,u.type!=="labelLink")){n=2;break}}else u.type==="labelEnd"&&(i=t);const p={type:e[c][1].type==="labelLink"?"link":"image",start:Object.assign({},e[c][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"label",start:Object.assign({},e[c][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[c+n+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",p,r],["enter",a,r]],o=K(o,e.slice(c+1,c+n+3)),o=K(o,[["enter",d,r]]),o=K(o,De(r.parser.constructs.insideSpan.null,e.slice(c+n+4,i-3),r)),o=K(o,[["exit",d,r],e[i-2],e[i-1],["exit",a,r]]),o=K(o,e.slice(i+1)),o=K(o,[["exit",p,r]]),te(e,c,e.length,o),e}function Vn(e,r,t){const n=this;let u=n.events.length,c,i;for(;u--;)if((n.events[u][1].type==="labelImage"||n.events[u][1].type==="labelLink")&&!n.events[u][1]._balanced){c=n.events[u][1];break}return o;function o(g){return c?c._inactive?h(g):(i=n.parser.defined.includes(he(n.sliceSerialize({start:c.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):t(g)}function p(g){return g===40?e.attempt(On,d,i?d:h)(g):g===91?e.attempt(jn,d,i?a:h)(g):i?d(g):h(g)}function a(g){return e.attempt(Hn,d,h)(g)}function d(g){return r(g)}function h(g){return c._balanced=!0,t(g)}}function Nn(e,r,t){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),u}function u(h){return Q(h)?xe(e,c)(h):c(h)}function c(h){return h===41?d(h):ut(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function i(h){return Q(h)?xe(e,p)(h):d(h)}function o(h){return t(h)}function p(h){return h===34||h===39||h===40?ot(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function a(h){return Q(h)?xe(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),r):t(h)}}function Un(e,r,t){const n=this;return u;function u(o){return ct.call(n,e,c,i,"reference","referenceMarker","referenceString")(o)}function c(o){return n.parser.defined.includes(he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(o):t(o)}function i(o){return t(o)}}function Wn(e,r,t){return n;function n(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),u}function u(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),r):t(c)}}const $n={name:"labelStartImage",tokenize:Qn,resolveAll:_e.resolveAll};function Qn(e,r,t){const n=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),c}function c(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):t(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(o):r(o)}}const Kn={name:"labelStartLink",tokenize:Gn,resolveAll:_e.resolveAll};function Gn(e,r,t){const n=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),c}function c(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(i):r(i)}}const Ee={name:"lineEnding",tokenize:Jn};function Jn(e,r){return t;function t(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),_(e,r,"linePrefix")}}const ke={name:"thematicBreak",tokenize:Xn};function Xn(e,r,t){let n=0,u;return c;function c(a){return e.enter("thematicBreak"),i(a)}function i(a){return u=a,o(a)}function o(a){return a===u?(e.enter("thematicBreakSequence"),p(a)):n>=3&&(a===null||E(a))?(e.exit("thematicBreak"),r(a)):t(a)}function p(a){return a===u?(e.consume(a),n++,p):(e.exit("thematicBreakSequence"),T(a)?_(e,o,"whitespace")(a):o(a))}}const $={name:"list",tokenize:er,continuation:{tokenize:tr},exit:rr},Zn={tokenize:ir,partial:!0},Yn={tokenize:nr,partial:!0};function er(e,r,t){const n=this,u=n.events[n.events.length-1];let c=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(f){const I=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(I==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ie(f)){if(n.containerState.type||(n.containerState.type=I,e.enter(I,{_container:!0})),I==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ke,t,a)(f):a(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(f)}return t(f)}function p(f){return Ie(f)&&++i<10?(e.consume(f),p):(!n.interrupt||i<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),a(f)):t(f)}function a(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Fe,n.interrupt?t:d,e.attempt(Zn,g,h))}function d(f){return n.containerState.initialBlankLine=!0,c++,g(f)}function h(f){return T(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=c+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(f)}}function tr(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(Fe,u,c);function u(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,_(e,r,"listItemIndent",n.containerState.size+1)(o)}function c(o){return n.containerState.furtherBlankLines||!T(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Yn,r,i)(o))}function i(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,_(e,e.attempt($,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nr(e,r,t){const n=this;return _(e,u,"listItemIndent",n.containerState.size+1);function u(c){const i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?r(c):t(c)}}function rr(e){e.exit(this.containerState.type)}function ir(e,r,t){const n=this;return _(e,u,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(c){const i=n.events[n.events.length-1];return!T(c)&&i&&i[1].type==="listItemPrefixWhitespace"?r(c):t(c)}}const Ge={name:"setextUnderline",tokenize:cr,resolveTo:ur};function ur(e,r){let t=e.length,n,u,c;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(u=t)}else e[t][1].type==="content"&&e.splice(t,1),!c&&e[t][1].type==="definition"&&(c=t);const i={type:"setextHeading",start:Object.assign({},e[u][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[u][1].type="setextHeadingText",c?(e.splice(u,0,["enter",i,r]),e.splice(c+1,0,["exit",e[n][1],r]),e[n][1].end=Object.assign({},e[c][1].end)):e[n][1]=i,e.push(["exit",i,r]),e}function cr(e,r,t){const n=this;let u;return c;function c(a){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),u=a,i(a)):t(a)}function i(a){return e.enter("setextHeadingLineSequence"),o(a)}function o(a){return a===u?(e.consume(a),o):(e.exit("setextHeadingLineSequence"),T(a)?_(e,p,"lineSuffix")(a):p(a))}function p(a){return a===null||E(a)?(e.exit("setextHeadingLine"),r(a)):t(a)}}const or={tokenize:sr};function sr(e){const r=this,t=e.attempt(Fe,n,e.attempt(this.parser.constructs.flowInitial,u,_(e,e.attempt(this.parser.constructs.flow,u,e.attempt(pn,u)),"linePrefix")));return t;function n(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const lr={resolveAll:lt()},ar=st("string"),fr=st("text");function st(e){return{tokenize:r,resolveAll:lt(e==="text"?dr:void 0)};function r(t){const n=this,u=this.parser.constructs[e],c=t.attempt(u,i,o);return i;function i(d){return a(d)?c(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),p}function p(d){return a(d)?(t.exit("data"),c(d)):(t.consume(d),p)}function a(d){if(d===null)return!0;const h=u[d];let g=-1;if(h)for(;++g<h.length;){const f=h[g];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function lt(e){return r;function r(t,n){let u=-1,c;for(;++u<=t.length;)c===void 0?t[u]&&t[u][1].type==="data"&&(c=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==c+2&&(t[c][1].end=t[u-1][1].end,t.splice(c+2,u-c-2),u=c+2),c=void 0);return e?e(t,n):t}}function dr(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],u=r.sliceStream(n);let c=u.length,i=-1,o=0,p;for(;c--;){const a=u[c];if(typeof a=="string"){for(i=a.length;a.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(a===-2)p=!0,o++;else if(a!==-1){c++;break}}if(o){const a={type:t===e.length||p||o<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-o,offset:n.end.offset-o,_index:n.start._index+c,_bufferIndex:c?i:n.start._bufferIndex+i},end:Object.assign({},n.end)};n.end=Object.assign({},a.start),n.start.offset===n.end.offset?Object.assign(n,a):(e.splice(t,0,["enter",a,r],["exit",a,r]),t+=2)}t++}return e}function pr(e,r,t){let n=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const u={},c=[];let i=[],o=[];const p={consume:O,enter:S,exit:B,attempt:w(P),check:w(x),interrupt:w(x,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:g,now:I,defineSkip:C,write:h};let d=r.tokenize.call(a,p);return r.resolveAll&&c.push(r),a;function h(F){return i=K(i,F),L(),i[i.length-1]!==null?[]:(R(r,0),a.events=De(c,a.events,a),a.events)}function g(F,v){return mr(f(F),v)}function f(F){return hr(i,F)}function I(){const{line:F,column:v,offset:M,_index:j,_bufferIndex:A}=n;return{line:F,column:v,offset:M,_index:j,_bufferIndex:A}}function C(F){u[F.line]=F.column,V()}function L(){let F;for(;n._index<i.length;){const v=i[n._index];if(typeof v=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<v.length;)y(v.charCodeAt(n._bufferIndex));else y(v)}}function y(F){d=d(F)}function O(F){E(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,V()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===i[n._index].length&&(n._bufferIndex=-1,n._index++)),a.previous=F}function S(F,v){const M=v||{};return M.type=F,M.start=I(),a.events.push(["enter",M,a]),o.push(M),M}function B(F){const v=o.pop();return v.end=I(),a.events.push(["exit",v,a]),v}function P(F,v){R(F,v.from)}function x(F,v){v.restore()}function w(F,v){return M;function M(j,A,W){let N,G,ne,s;return Array.isArray(j)?re(j):"tokenize"in j?re([j]):J(j);function J(U){return fe;function fe(ce){const de=ce!==null&&U[ce],pe=ce!==null&&U.null,ve=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return re(ve)(ce)}}function re(U){return N=U,G=0,U.length===0?W:l(U[G])}function l(U){return fe;function fe(ce){return s=q(),ne=U,U.partial||(a.currentConstruct=U),U.name&&a.parser.constructs.disable.null.includes(U.name)?ae():U.tokenize.call(v?Object.assign(Object.create(a),v):a,p,X,ae)(ce)}}function X(U){return F(ne,s),A}function ae(U){return s.restore(),++G<N.length?l(N[G]):W}}}function R(F,v){F.resolveAll&&!c.includes(F)&&c.push(F),F.resolve&&te(a.events,v,a.events.length-v,F.resolve(a.events.slice(v),a)),F.resolveTo&&(a.events=F.resolveTo(a.events,a))}function q(){const F=I(),v=a.previous,M=a.currentConstruct,j=a.events.length,A=Array.from(o);return{restore:W,from:j};function W(){n=F,a.previous=v,a.currentConstruct=M,a.events.length=j,o=A,V()}}function V(){n.line in u&&n.column<2&&(n.column=u[n.line],n.offset+=u[n.line]-1)}}function hr(e,r){const t=r.start._index,n=r.start._bufferIndex,u=r.end._index,c=r.end._bufferIndex;let i;if(t===u)i=[e[t].slice(n,c)];else{if(i=e.slice(t,u),n>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(n):i.shift()}c>0&&i.push(e[u].slice(0,c))}return i}function mr(e,r){let t=-1;const n=[];let u;for(;++t<e.length;){const c=e[t];let i;if(typeof c=="string")i=c;else switch(c){case-5:{i="\r";break}case-4:{i=`
1
+ import{O as Et,br as At,W as It,ak as Tt,bs as Ct,bt as ze}from"./index-D5Z2TibF.js";const wt={};function zt(e,r){const t=wt,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return et(e,n,u)}function et(e,r,t){if(Dt(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qe(e.children,r,t)}return Array.isArray(e)?qe(e,r,t):""}function qe(e,r,t){const n=[];let u=-1;for(;++u<e.length;)n[u]=et(e[u],r,t);return n.join("")}function Dt(e){return!!(e&&typeof e=="object")}function te(e,r,t,n){const u=e.length;let c=0,i;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,n.length<1e4)i=Array.from(n),i.unshift(r,t),e.splice(...i);else for(t&&e.splice(r,t);c<n.length;)i=n.slice(c,c+1e4),i.unshift(r,0),e.splice(...i),c+=1e4,r+=1e4}function K(e,r){return e.length>0?(te(e,e.length,0,r),e):r}const Ve={}.hasOwnProperty;function _t(e){const r={};let t=-1;for(;++t<e.length;)Bt(r,e[t]);return r}function Bt(e,r){let t;for(t in r){const n=(Ve.call(e,t)?e[t]:void 0)||(e[t]={}),u=r[t];let c;if(u)for(c in u){Ve.call(n,c)||(n[c]=[]);const i=u[c];Mt(n[c],Array.isArray(i)?i:i?[i]:[])}}}function Mt(e,r){let t=-1;const n=[];for(;++t<r.length;)(r[t].add==="after"?e:n).push(r[t]);te(e,0,0,n)}const Pt=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ee=se(/[A-Za-z]/),Z=se(/[\dA-Za-z]/),Lt=se(/[#-'*+\--9=?A-Z^-~]/);function Ae(e){return e!==null&&(e<32||e===127)}const Ie=se(/\d/),Ot=se(/[\dA-Fa-f]/),jt=se(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function T(e){return e===-2||e===-1||e===32}const Ht=se(Pt),Rt=se(/\s/);function se(e){return r;function r(t){return t!==null&&e.test(String.fromCharCode(t))}}function _(e,r,t,n){const u=n?n-1:Number.POSITIVE_INFINITY;let c=0;return i;function i(p){return T(p)?(e.enter(t),o(p)):r(p)}function o(p){return T(p)&&c++<u?(e.consume(p),o):(e.exit(t),r(p))}}const qt={tokenize:Vt};function Vt(e){const r=e.attempt(this.parser.constructs.contentInitial,n,u);let t;return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_(e,r,"linePrefix")}function u(o){return e.enter("paragraph"),c(o)}function c(o){const p=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=p),t=p,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return E(o)?(e.consume(o),e.exit("chunkText"),c):(e.consume(o),i)}}const Nt={tokenize:Ut},Ne={tokenize:Wt};function Ut(e){const r=this,t=[];let n=0,u,c,i;return o;function o(S){if(n<t.length){const B=t[n];return r.containerState=B[1],e.attempt(B[0].continuation,p,a)(S)}return a(S)}function p(S){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&O();const B=r.events.length;let P=B,x;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){x=r.events[P][1].end;break}y(n);let w=B;for(;w<r.events.length;)r.events[w][1].end=Object.assign({},x),w++;return te(r.events,P+1,0,r.events.slice(B)),r.events.length=w,a(S)}return o(S)}function a(S){if(n===t.length){if(!u)return g(S);if(u.currentConstruct&&u.currentConstruct.concrete)return I(S);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Ne,d,h)(S)}function d(S){return u&&O(),y(n),g(S)}function h(S){return r.parser.lazy[r.now().line]=n!==t.length,i=r.now().offset,I(S)}function g(S){return r.containerState={},e.attempt(Ne,f,I)(S)}function f(S){return n++,t.push([r.currentConstruct,r.containerState]),g(S)}function I(S){if(S===null){u&&O(),y(0),e.consume(S);return}return u=u||r.parser.flow(r.now()),e.enter("chunkFlow",{contentType:"flow",previous:c,_tokenizer:u}),C(S)}function C(S){if(S===null){L(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return E(S)?(e.consume(S),L(e.exit("chunkFlow")),n=0,r.interrupt=void 0,o):(e.consume(S),C)}function L(S,B){const P=r.sliceStream(S);if(B&&P.push(null),S.previous=c,c&&(c.next=S),c=S,u.defineSkip(S.start),u.write(P),r.parser.lazy[S.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<i&&(!u.events[x][1].end||u.events[x][1].end.offset>i))return;const w=r.events.length;let R=w,q,V;for(;R--;)if(r.events[R][0]==="exit"&&r.events[R][1].type==="chunkFlow"){if(q){V=r.events[R][1].end;break}q=!0}for(y(n),x=w;x<r.events.length;)r.events[x][1].end=Object.assign({},V),x++;te(r.events,R+1,0,r.events.slice(w)),r.events.length=x}}function y(S){let B=t.length;for(;B-- >S;){const P=t[B];r.containerState=P[1],P[0].exit.call(r,e)}t.length=S}function O(){u.write([null]),c=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Wt(e,r,t){return _(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||Q(e)||Rt(e))return 1;if(Ht(e))return 2}function De(e,r,t){const n=[];let u=-1;for(;++u<e.length;){const c=e[u].resolveAll;c&&!n.includes(c)&&(r=c(r,t),n.push(c))}return r}const Te={name:"attention",tokenize:Qt,resolveAll:$t};function $t(e,r){let t=-1,n,u,c,i,o,p,a,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(n=t;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&r.sliceSerialize(e[n][1]).charCodeAt(0)===r.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[n][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;p=e[n][1].end.offset-e[n][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),g=Object.assign({},e[t][1].start);We(h,-p),We(g,p),i={type:p>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:p>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:g},c={type:p>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[t][1].start)},u={type:p>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[t][1].start=Object.assign({},o.end),a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=K(a,[["enter",e[n][1],r],["exit",e[n][1],r]])),a=K(a,[["enter",u,r],["enter",i,r],["exit",i,r],["enter",c,r]]),a=K(a,De(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),a=K(a,[["exit",c,r],["enter",o,r],["exit",o,r],["exit",u,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,a=K(a,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,te(e,n-1,t-n+3,a),t=n+a.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Qt(e,r){const t=this.parser.constructs.attentionMarkers.null,n=this.previous,u=Ue(n);let c;return i;function i(p){return c=p,e.enter("attentionSequence"),o(p)}function o(p){if(p===c)return e.consume(p),o;const a=e.exit("attentionSequence"),d=Ue(p),h=!d||d===2&&u||t.includes(p),g=!u||u===2&&d||t.includes(n);return a._open=!!(c===42?h:h&&(u||!g)),a._close=!!(c===42?g:g&&(d||!h)),r(p)}}function We(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const Kt={name:"autolink",tokenize:Gt};function Gt(e,r,t){let n=0;return u;function u(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(f){return ee(f)?(e.consume(f),i):a(f)}function i(f){return f===43||f===45||f===46||Z(f)?(n=1,o(f)):a(f)}function o(f){return f===58?(e.consume(f),n=0,p):(f===43||f===45||f===46||Z(f))&&n++<32?(e.consume(f),o):(n=0,a(f))}function p(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):f===null||f===32||f===60||Ae(f)?t(f):(e.consume(f),p)}function a(f){return f===64?(e.consume(f),d):Lt(f)?(e.consume(f),a):t(f)}function d(f){return Z(f)?h(f):t(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):g(f)}function g(f){if((f===45||Z(f))&&n++<63){const I=f===45?g:h;return e.consume(f),I}return t(f)}}const Fe={tokenize:Jt,partial:!0};function Jt(e,r,t){return n;function n(c){return T(c)?_(e,u,"linePrefix")(c):u(c)}function u(c){return c===null||E(c)?r(c):t(c)}}const tt={name:"blockQuote",tokenize:Xt,continuation:{tokenize:Zt},exit:Yt};function Xt(e,r,t){const n=this;return u;function u(i){if(i===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),c}return t(i)}function c(i){return T(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(i))}}function Zt(e,r,t){const n=this;return u;function u(i){return T(i)?_(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):c(i)}function c(i){return e.attempt(tt,r,t)(i)}}function Yt(e){e.exit("blockQuote")}const nt={name:"characterEscape",tokenize:en};function en(e,r,t){return n;function n(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),u}function u(c){return jt(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):t(c)}}const rt={name:"characterReference",tokenize:tn};function tn(e,r,t){const n=this;let u=0,c,i;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),p}function p(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),c=31,i=Z,d(h))}function a(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,i=Ot,d):(e.enter("characterReferenceValue"),c=7,i=Ie,d(h))}function d(h){if(h===59&&u){const g=e.exit("characterReferenceValue");return i===Z&&!ze(n.sliceSerialize(g))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return i(h)&&u++<c?(e.consume(h),d):t(h)}}const $e={tokenize:rn,partial:!0},Qe={name:"codeFenced",tokenize:nn,concrete:!0};function nn(e,r,t){const n=this,u={tokenize:P,partial:!0};let c=0,i=0,o;return p;function p(x){return a(x)}function a(x){const w=n.events[n.events.length-1];return c=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===o?(i++,e.consume(x),d):i<3?t(x):(e.exit("codeFencedFenceSequence"),T(x)?_(e,h,"whitespace")(x):h(x))}function h(x){return x===null||E(x)?(e.exit("codeFencedFence"),n.interrupt?r(x):e.check($e,C,B)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(x)):T(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(e,f,"whitespace")(x)):x===96&&x===o?t(x):(e.consume(x),g)}function f(x){return x===null||E(x)?h(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),I(x))}function I(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(x)):x===96&&x===o?t(x):(e.consume(x),I)}function C(x){return e.attempt(u,B,L)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y}function y(x){return c>0&&T(x)?_(e,O,"linePrefix",c+1)(x):O(x)}function O(x){return x===null||E(x)?e.check($e,C,B)(x):(e.enter("codeFlowValue"),S(x))}function S(x){return x===null||E(x)?(e.exit("codeFlowValue"),O(x)):(e.consume(x),S)}function B(x){return e.exit("codeFenced"),r(x)}function P(x,w,R){let q=0;return V;function V(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),F}function F(A){return x.enter("codeFencedFence"),T(A)?_(x,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A)}function v(A){return A===o?(x.enter("codeFencedFenceSequence"),M(A)):R(A)}function M(A){return A===o?(q++,x.consume(A),M):q>=i?(x.exit("codeFencedFenceSequence"),T(A)?_(x,j,"whitespace")(A):j(A)):R(A)}function j(A){return A===null||E(A)?(x.exit("codeFencedFence"),w(A)):R(A)}}}function rn(e,r,t){const n=this;return u;function u(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}const be={name:"codeIndented",tokenize:cn},un={tokenize:on,partial:!0};function cn(e,r,t){const n=this;return u;function u(a){return e.enter("codeIndented"),_(e,c,"linePrefix",5)(a)}function c(a){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(a):t(a)}function i(a){return a===null?p(a):E(a)?e.attempt(un,i,p)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||E(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function p(a){return e.exit("codeIndented"),r(a)}}function on(e,r,t){const n=this;return u;function u(i){return n.parser.lazy[n.now().line]?t(i):E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):_(e,c,"linePrefix",5)(i)}function c(i){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):E(i)?u(i):t(i)}}const sn={name:"codeText",tokenize:fn,resolve:ln,previous:an};function ln(e){let r=e.length-4,t=3,n,u;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n<r;)if(e[n][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(n=t-1,r++;++n<=r;)u===void 0?n!==r&&e[n][1].type!=="lineEnding"&&(u=n):(n===r||e[n][1].type==="lineEnding")&&(e[u][1].type="codeTextData",n!==u+2&&(e[u][1].end=e[n-1][1].end,e.splice(u+2,n-u-2),r-=n-u-2,n=u+2),u=void 0);return e}function an(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fn(e,r,t){let n=0,u,c;return i;function i(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),n++,o):(e.exit("codeTextSequence"),p(h))}function p(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),p):h===96?(c=e.enter("codeTextSequence"),u=0,d(h)):E(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),p):(e.enter("codeTextData"),a(h))}function a(h){return h===null||h===32||h===96||E(h)?(e.exit("codeTextData"),p(h)):(e.consume(h),a)}function d(h){return h===96?(e.consume(h),u++,d):u===n?(e.exit("codeTextSequence"),e.exit("codeText"),r(h)):(c.type="codeTextData",a(h))}}function it(e){const r={};let t=-1,n,u,c,i,o,p,a;for(;++t<e.length;){for(;t in r;)t=r[t];if(n=e[t],t&&n[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(p=n[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,dn(e,t)),t=r[t],a=!0);else if(n[1]._container){for(c=t,u=void 0;c--&&(i=e[c],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(u&&(e[u][1].type="lineEndingBlank"),i[1].type="lineEnding",u=c);u&&(n[1].end=Object.assign({},e[u][1].start),o=e.slice(u,t),o.unshift(n),te(e,u,t-u+1,o))}}return!a}function dn(e,r){const t=e[r][1],n=e[r][2];let u=r-1;const c=[],i=t._tokenizer||n.parser[t.contentType](t.start),o=i.events,p=[],a={};let d,h,g=-1,f=t,I=0,C=0;const L=[C];for(;f;){for(;e[++u][1]!==f;);c.push(u),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=t;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(C=g+1,L.push(C),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):L.pop(),g=L.length;g--;){const y=o.slice(L[g],L[g+1]),O=c.pop();p.unshift([O,O+y.length-1]),te(e,O,2,y)}for(g=-1;++g<p.length;)a[I+p[g][0]]=I+p[g][1],I+=p[g][1]-p[g][0]-1;return a}const pn={tokenize:gn,resolve:mn},hn={tokenize:xn,partial:!0};function mn(e){return it(e),e}function gn(e,r){let t;return n;function n(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?c(o):E(o)?e.check(hn,i,c)(o):(e.consume(o),u)}function c(o){return e.exit("chunkContent"),e.exit("content"),r(o)}function i(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function xn(e,r,t){const n=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_(e,c,"linePrefix")}function c(i){if(i===null||E(i))return t(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):e.interrupt(n.parser.constructs.flow,t,r)(i)}}function ut(e,r,t,n,u,c,i,o,p){const a=p||Number.POSITIVE_INFINITY;let d=0;return h;function h(y){return y===60?(e.enter(n),e.enter(u),e.enter(c),e.consume(y),e.exit(c),g):y===null||y===32||y===41||Ae(y)?t(y):(e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),C(y))}function g(y){return y===62?(e.enter(c),e.consume(y),e.exit(c),e.exit(u),e.exit(n),r):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),g(y)):y===null||y===60||E(y)?t(y):(e.consume(y),y===92?I:f)}function I(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function C(y){return!d&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),r(y)):d<a&&y===40?(e.consume(y),d++,C):y===41?(e.consume(y),d--,C):y===null||y===32||y===40||Ae(y)?t(y):(e.consume(y),y===92?L:C)}function L(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function ct(e,r,t,n,u,c){const i=this;let o=0,p;return a;function a(f){return e.enter(n),e.enter(u),e.consume(f),e.exit(u),e.enter(c),d}function d(f){return o>999||f===null||f===91||f===93&&!p||f===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?t(f):f===93?(e.exit(c),e.enter(u),e.consume(f),e.exit(u),e.exit(n),r):E(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||E(f)||o++>999?(e.exit("chunkString"),d(f)):(e.consume(f),p||(p=!T(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function ot(e,r,t,n,u,c){let i;return o;function o(g){return g===34||g===39||g===40?(e.enter(n),e.enter(u),e.consume(g),e.exit(u),i=g===40?41:g,p):t(g)}function p(g){return g===i?(e.enter(u),e.consume(g),e.exit(u),e.exit(n),r):(e.enter(c),a(g))}function a(g){return g===i?(e.exit(c),p(i)):g===null?t(g):E(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===i||g===null||E(g)?(e.exit("chunkString"),a(g)):(e.consume(g),g===92?h:d)}function h(g){return g===i||g===92?(e.consume(g),d):d(g)}}function xe(e,r){let t;return n;function n(u){return E(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t=!0,n):T(u)?_(e,n,t?"linePrefix":"lineSuffix")(u):r(u)}}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn={name:"definition",tokenize:Fn},yn={tokenize:vn,partial:!0};function Fn(e,r,t){const n=this;let u;return c;function c(f){return e.enter("definition"),i(f)}function i(f){return ct.call(n,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return u=he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),p):t(f)}function p(f){return Q(f)?xe(e,a)(f):a(f)}function a(f){return ut(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(yn,h,h)(f)}function h(f){return T(f)?_(e,g,"whitespace")(f):g(f)}function g(f){return f===null||E(f)?(e.exit("definition"),n.parser.defined.push(u),r(f)):t(f)}}function vn(e,r,t){return n;function n(o){return Q(o)?xe(e,u)(o):t(o)}function u(o){return ot(e,c,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function c(o){return T(o)?_(e,i,"whitespace")(o):i(o)}function i(o){return o===null||E(o)?r(o):t(o)}}const Sn={name:"hardBreakEscape",tokenize:bn};function bn(e,r,t){return n;function n(c){return e.enter("hardBreakEscape"),e.consume(c),u}function u(c){return E(c)?(e.exit("hardBreakEscape"),r(c)):t(c)}}const En={name:"headingAtx",tokenize:In,resolve:An};function An(e,r){let t=e.length-2,n=3,u,c;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(u={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},c={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},te(e,n,t-n+1,[["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r]])),e}function In(e,r,t){let n=0;return u;function u(d){return e.enter("atxHeading"),c(d)}function c(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&n++<6?(e.consume(d),i):d===null||Q(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),p(d)):d===null||E(d)?(e.exit("atxHeading"),r(d)):T(d)?_(e,o,"whitespace")(d):(e.enter("atxHeadingText"),a(d))}function p(d){return d===35?(e.consume(d),p):(e.exit("atxHeadingSequence"),o(d))}function a(d){return d===null||d===35||Q(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),a)}}const Tn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ke=["pre","script","style","textarea"],Cn={name:"htmlFlow",tokenize:_n,resolveTo:Dn,concrete:!0},wn={tokenize:Mn,partial:!0},zn={tokenize:Bn,partial:!0};function Dn(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function _n(e,r,t){const n=this;let u,c,i,o,p;return a;function a(l){return d(l)}function d(l){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(l),h}function h(l){return l===33?(e.consume(l),g):l===47?(e.consume(l),c=!0,C):l===63?(e.consume(l),u=3,n.interrupt?r:s):ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function g(l){return l===45?(e.consume(l),u=2,f):l===91?(e.consume(l),u=5,o=0,I):ee(l)?(e.consume(l),u=4,n.interrupt?r:s):t(l)}function f(l){return l===45?(e.consume(l),n.interrupt?r:s):t(l)}function I(l){const X="CDATA[";return l===X.charCodeAt(o++)?(e.consume(l),o===X.length?n.interrupt?r:v:I):t(l)}function C(l){return ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function L(l){if(l===null||l===47||l===62||Q(l)){const X=l===47,ae=i.toLowerCase();return!X&&!c&&Ke.includes(ae)?(u=1,n.interrupt?r(l):v(l)):Tn.includes(i.toLowerCase())?(u=6,X?(e.consume(l),y):n.interrupt?r(l):v(l)):(u=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(l):c?O(l):S(l))}return l===45||Z(l)?(e.consume(l),i+=String.fromCharCode(l),L):t(l)}function y(l){return l===62?(e.consume(l),n.interrupt?r:v):t(l)}function O(l){return T(l)?(e.consume(l),O):V(l)}function S(l){return l===47?(e.consume(l),V):l===58||l===95||ee(l)?(e.consume(l),B):T(l)?(e.consume(l),S):V(l)}function B(l){return l===45||l===46||l===58||l===95||Z(l)?(e.consume(l),B):P(l)}function P(l){return l===61?(e.consume(l),x):T(l)?(e.consume(l),P):S(l)}function x(l){return l===null||l===60||l===61||l===62||l===96?t(l):l===34||l===39?(e.consume(l),p=l,w):T(l)?(e.consume(l),x):R(l)}function w(l){return l===p?(e.consume(l),p=null,q):l===null||E(l)?t(l):(e.consume(l),w)}function R(l){return l===null||l===34||l===39||l===47||l===60||l===61||l===62||l===96||Q(l)?P(l):(e.consume(l),R)}function q(l){return l===47||l===62||T(l)?S(l):t(l)}function V(l){return l===62?(e.consume(l),F):t(l)}function F(l){return l===null||E(l)?v(l):T(l)?(e.consume(l),F):t(l)}function v(l){return l===45&&u===2?(e.consume(l),W):l===60&&u===1?(e.consume(l),N):l===62&&u===4?(e.consume(l),J):l===63&&u===3?(e.consume(l),s):l===93&&u===5?(e.consume(l),ne):E(l)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(wn,re,M)(l)):l===null||E(l)?(e.exit("htmlFlowData"),M(l)):(e.consume(l),v)}function M(l){return e.check(zn,j,re)(l)}function j(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),A}function A(l){return l===null||E(l)?M(l):(e.enter("htmlFlowData"),v(l))}function W(l){return l===45?(e.consume(l),s):v(l)}function N(l){return l===47?(e.consume(l),i="",G):v(l)}function G(l){if(l===62){const X=i.toLowerCase();return Ke.includes(X)?(e.consume(l),J):v(l)}return ee(l)&&i.length<8?(e.consume(l),i+=String.fromCharCode(l),G):v(l)}function ne(l){return l===93?(e.consume(l),s):v(l)}function s(l){return l===62?(e.consume(l),J):l===45&&u===2?(e.consume(l),s):v(l)}function J(l){return l===null||E(l)?(e.exit("htmlFlowData"),re(l)):(e.consume(l),J)}function re(l){return e.exit("htmlFlow"),r(l)}}function Bn(e,r,t){const n=this;return u;function u(i){return E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c):t(i)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}function Mn(e,r,t){return n;function n(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(Fe,r,t)}}const Pn={name:"htmlText",tokenize:Ln};function Ln(e,r,t){const n=this;let u,c,i;return o;function o(s){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(s),p}function p(s){return s===33?(e.consume(s),a):s===47?(e.consume(s),P):s===63?(e.consume(s),S):ee(s)?(e.consume(s),R):t(s)}function a(s){return s===45?(e.consume(s),d):s===91?(e.consume(s),c=0,I):ee(s)?(e.consume(s),O):t(s)}function d(s){return s===45?(e.consume(s),f):t(s)}function h(s){return s===null?t(s):s===45?(e.consume(s),g):E(s)?(i=h,N(s)):(e.consume(s),h)}function g(s){return s===45?(e.consume(s),f):h(s)}function f(s){return s===62?W(s):s===45?g(s):h(s)}function I(s){const J="CDATA[";return s===J.charCodeAt(c++)?(e.consume(s),c===J.length?C:I):t(s)}function C(s){return s===null?t(s):s===93?(e.consume(s),L):E(s)?(i=C,N(s)):(e.consume(s),C)}function L(s){return s===93?(e.consume(s),y):C(s)}function y(s){return s===62?W(s):s===93?(e.consume(s),y):C(s)}function O(s){return s===null||s===62?W(s):E(s)?(i=O,N(s)):(e.consume(s),O)}function S(s){return s===null?t(s):s===63?(e.consume(s),B):E(s)?(i=S,N(s)):(e.consume(s),S)}function B(s){return s===62?W(s):S(s)}function P(s){return ee(s)?(e.consume(s),x):t(s)}function x(s){return s===45||Z(s)?(e.consume(s),x):w(s)}function w(s){return E(s)?(i=w,N(s)):T(s)?(e.consume(s),w):W(s)}function R(s){return s===45||Z(s)?(e.consume(s),R):s===47||s===62||Q(s)?q(s):t(s)}function q(s){return s===47?(e.consume(s),W):s===58||s===95||ee(s)?(e.consume(s),V):E(s)?(i=q,N(s)):T(s)?(e.consume(s),q):W(s)}function V(s){return s===45||s===46||s===58||s===95||Z(s)?(e.consume(s),V):F(s)}function F(s){return s===61?(e.consume(s),v):E(s)?(i=F,N(s)):T(s)?(e.consume(s),F):q(s)}function v(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(e.consume(s),u=s,M):E(s)?(i=v,N(s)):T(s)?(e.consume(s),v):(e.consume(s),j)}function M(s){return s===u?(e.consume(s),u=void 0,A):s===null?t(s):E(s)?(i=M,N(s)):(e.consume(s),M)}function j(s){return s===null||s===34||s===39||s===60||s===61||s===96?t(s):s===47||s===62||Q(s)?q(s):(e.consume(s),j)}function A(s){return s===47||s===62||Q(s)?q(s):t(s)}function W(s){return s===62?(e.consume(s),e.exit("htmlTextData"),e.exit("htmlText"),r):t(s)}function N(s){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),G}function G(s){return T(s)?_(e,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):ne(s)}function ne(s){return e.enter("htmlTextData"),i(s)}}const _e={name:"labelEnd",tokenize:Vn,resolveTo:qn,resolveAll:Rn},On={tokenize:Nn},jn={tokenize:Un},Hn={tokenize:Wn};function Rn(e){let r=-1;for(;++r<e.length;){const t=e[r][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++)}return e}function qn(e,r){let t=e.length,n=0,u,c,i,o;for(;t--;)if(u=e[t][1],c){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(c=t,u.type!=="labelLink")){n=2;break}}else u.type==="labelEnd"&&(i=t);const p={type:e[c][1].type==="labelLink"?"link":"image",start:Object.assign({},e[c][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"label",start:Object.assign({},e[c][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[c+n+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",p,r],["enter",a,r]],o=K(o,e.slice(c+1,c+n+3)),o=K(o,[["enter",d,r]]),o=K(o,De(r.parser.constructs.insideSpan.null,e.slice(c+n+4,i-3),r)),o=K(o,[["exit",d,r],e[i-2],e[i-1],["exit",a,r]]),o=K(o,e.slice(i+1)),o=K(o,[["exit",p,r]]),te(e,c,e.length,o),e}function Vn(e,r,t){const n=this;let u=n.events.length,c,i;for(;u--;)if((n.events[u][1].type==="labelImage"||n.events[u][1].type==="labelLink")&&!n.events[u][1]._balanced){c=n.events[u][1];break}return o;function o(g){return c?c._inactive?h(g):(i=n.parser.defined.includes(he(n.sliceSerialize({start:c.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):t(g)}function p(g){return g===40?e.attempt(On,d,i?d:h)(g):g===91?e.attempt(jn,d,i?a:h)(g):i?d(g):h(g)}function a(g){return e.attempt(Hn,d,h)(g)}function d(g){return r(g)}function h(g){return c._balanced=!0,t(g)}}function Nn(e,r,t){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),u}function u(h){return Q(h)?xe(e,c)(h):c(h)}function c(h){return h===41?d(h):ut(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function i(h){return Q(h)?xe(e,p)(h):d(h)}function o(h){return t(h)}function p(h){return h===34||h===39||h===40?ot(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function a(h){return Q(h)?xe(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),r):t(h)}}function Un(e,r,t){const n=this;return u;function u(o){return ct.call(n,e,c,i,"reference","referenceMarker","referenceString")(o)}function c(o){return n.parser.defined.includes(he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(o):t(o)}function i(o){return t(o)}}function Wn(e,r,t){return n;function n(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),u}function u(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),r):t(c)}}const $n={name:"labelStartImage",tokenize:Qn,resolveAll:_e.resolveAll};function Qn(e,r,t){const n=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),c}function c(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):t(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(o):r(o)}}const Kn={name:"labelStartLink",tokenize:Gn,resolveAll:_e.resolveAll};function Gn(e,r,t){const n=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),c}function c(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(i):r(i)}}const Ee={name:"lineEnding",tokenize:Jn};function Jn(e,r){return t;function t(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),_(e,r,"linePrefix")}}const ke={name:"thematicBreak",tokenize:Xn};function Xn(e,r,t){let n=0,u;return c;function c(a){return e.enter("thematicBreak"),i(a)}function i(a){return u=a,o(a)}function o(a){return a===u?(e.enter("thematicBreakSequence"),p(a)):n>=3&&(a===null||E(a))?(e.exit("thematicBreak"),r(a)):t(a)}function p(a){return a===u?(e.consume(a),n++,p):(e.exit("thematicBreakSequence"),T(a)?_(e,o,"whitespace")(a):o(a))}}const $={name:"list",tokenize:er,continuation:{tokenize:tr},exit:rr},Zn={tokenize:ir,partial:!0},Yn={tokenize:nr,partial:!0};function er(e,r,t){const n=this,u=n.events[n.events.length-1];let c=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(f){const I=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(I==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ie(f)){if(n.containerState.type||(n.containerState.type=I,e.enter(I,{_container:!0})),I==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ke,t,a)(f):a(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(f)}return t(f)}function p(f){return Ie(f)&&++i<10?(e.consume(f),p):(!n.interrupt||i<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),a(f)):t(f)}function a(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Fe,n.interrupt?t:d,e.attempt(Zn,g,h))}function d(f){return n.containerState.initialBlankLine=!0,c++,g(f)}function h(f){return T(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=c+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(f)}}function tr(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(Fe,u,c);function u(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,_(e,r,"listItemIndent",n.containerState.size+1)(o)}function c(o){return n.containerState.furtherBlankLines||!T(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Yn,r,i)(o))}function i(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,_(e,e.attempt($,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nr(e,r,t){const n=this;return _(e,u,"listItemIndent",n.containerState.size+1);function u(c){const i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?r(c):t(c)}}function rr(e){e.exit(this.containerState.type)}function ir(e,r,t){const n=this;return _(e,u,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(c){const i=n.events[n.events.length-1];return!T(c)&&i&&i[1].type==="listItemPrefixWhitespace"?r(c):t(c)}}const Ge={name:"setextUnderline",tokenize:cr,resolveTo:ur};function ur(e,r){let t=e.length,n,u,c;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(u=t)}else e[t][1].type==="content"&&e.splice(t,1),!c&&e[t][1].type==="definition"&&(c=t);const i={type:"setextHeading",start:Object.assign({},e[u][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[u][1].type="setextHeadingText",c?(e.splice(u,0,["enter",i,r]),e.splice(c+1,0,["exit",e[n][1],r]),e[n][1].end=Object.assign({},e[c][1].end)):e[n][1]=i,e.push(["exit",i,r]),e}function cr(e,r,t){const n=this;let u;return c;function c(a){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),u=a,i(a)):t(a)}function i(a){return e.enter("setextHeadingLineSequence"),o(a)}function o(a){return a===u?(e.consume(a),o):(e.exit("setextHeadingLineSequence"),T(a)?_(e,p,"lineSuffix")(a):p(a))}function p(a){return a===null||E(a)?(e.exit("setextHeadingLine"),r(a)):t(a)}}const or={tokenize:sr};function sr(e){const r=this,t=e.attempt(Fe,n,e.attempt(this.parser.constructs.flowInitial,u,_(e,e.attempt(this.parser.constructs.flow,u,e.attempt(pn,u)),"linePrefix")));return t;function n(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const lr={resolveAll:lt()},ar=st("string"),fr=st("text");function st(e){return{tokenize:r,resolveAll:lt(e==="text"?dr:void 0)};function r(t){const n=this,u=this.parser.constructs[e],c=t.attempt(u,i,o);return i;function i(d){return a(d)?c(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),p}function p(d){return a(d)?(t.exit("data"),c(d)):(t.consume(d),p)}function a(d){if(d===null)return!0;const h=u[d];let g=-1;if(h)for(;++g<h.length;){const f=h[g];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function lt(e){return r;function r(t,n){let u=-1,c;for(;++u<=t.length;)c===void 0?t[u]&&t[u][1].type==="data"&&(c=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==c+2&&(t[c][1].end=t[u-1][1].end,t.splice(c+2,u-c-2),u=c+2),c=void 0);return e?e(t,n):t}}function dr(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],u=r.sliceStream(n);let c=u.length,i=-1,o=0,p;for(;c--;){const a=u[c];if(typeof a=="string"){for(i=a.length;a.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(a===-2)p=!0,o++;else if(a!==-1){c++;break}}if(o){const a={type:t===e.length||p||o<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-o,offset:n.end.offset-o,_index:n.start._index+c,_bufferIndex:c?i:n.start._bufferIndex+i},end:Object.assign({},n.end)};n.end=Object.assign({},a.start),n.start.offset===n.end.offset?Object.assign(n,a):(e.splice(t,0,["enter",a,r],["exit",a,r]),t+=2)}t++}return e}function pr(e,r,t){let n=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const u={},c=[];let i=[],o=[];const p={consume:O,enter:S,exit:B,attempt:w(P),check:w(x),interrupt:w(x,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:g,now:I,defineSkip:C,write:h};let d=r.tokenize.call(a,p);return r.resolveAll&&c.push(r),a;function h(F){return i=K(i,F),L(),i[i.length-1]!==null?[]:(R(r,0),a.events=De(c,a.events,a),a.events)}function g(F,v){return mr(f(F),v)}function f(F){return hr(i,F)}function I(){const{line:F,column:v,offset:M,_index:j,_bufferIndex:A}=n;return{line:F,column:v,offset:M,_index:j,_bufferIndex:A}}function C(F){u[F.line]=F.column,V()}function L(){let F;for(;n._index<i.length;){const v=i[n._index];if(typeof v=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<v.length;)y(v.charCodeAt(n._bufferIndex));else y(v)}}function y(F){d=d(F)}function O(F){E(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,V()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===i[n._index].length&&(n._bufferIndex=-1,n._index++)),a.previous=F}function S(F,v){const M=v||{};return M.type=F,M.start=I(),a.events.push(["enter",M,a]),o.push(M),M}function B(F){const v=o.pop();return v.end=I(),a.events.push(["exit",v,a]),v}function P(F,v){R(F,v.from)}function x(F,v){v.restore()}function w(F,v){return M;function M(j,A,W){let N,G,ne,s;return Array.isArray(j)?re(j):"tokenize"in j?re([j]):J(j);function J(U){return fe;function fe(ce){const de=ce!==null&&U[ce],pe=ce!==null&&U.null,ve=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return re(ve)(ce)}}function re(U){return N=U,G=0,U.length===0?W:l(U[G])}function l(U){return fe;function fe(ce){return s=q(),ne=U,U.partial||(a.currentConstruct=U),U.name&&a.parser.constructs.disable.null.includes(U.name)?ae():U.tokenize.call(v?Object.assign(Object.create(a),v):a,p,X,ae)(ce)}}function X(U){return F(ne,s),A}function ae(U){return s.restore(),++G<N.length?l(N[G]):W}}}function R(F,v){F.resolveAll&&!c.includes(F)&&c.push(F),F.resolve&&te(a.events,v,a.events.length-v,F.resolve(a.events.slice(v),a)),F.resolveTo&&(a.events=F.resolveTo(a.events,a))}function q(){const F=I(),v=a.previous,M=a.currentConstruct,j=a.events.length,A=Array.from(o);return{restore:W,from:j};function W(){n=F,a.previous=v,a.currentConstruct=M,a.events.length=j,o=A,V()}}function V(){n.line in u&&n.column<2&&(n.column=u[n.line],n.offset+=u[n.line]-1)}}function hr(e,r){const t=r.start._index,n=r.start._bufferIndex,u=r.end._index,c=r.end._bufferIndex;let i;if(t===u)i=[e[t].slice(n,c)];else{if(i=e.slice(t,u),n>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(n):i.shift()}c>0&&i.push(e[u].slice(0,c))}return i}function mr(e,r){let t=-1;const n=[];let u;for(;++t<e.length;){const c=e[t];let i;if(typeof c=="string")i=c;else switch(c){case-5:{i="\r";break}case-4:{i=`
2
2
  `;break}case-3:{i=`\r
3
3
  `;break}case-2:{i=r?" ":" ";break}case-1:{if(!r&&u)continue;i=" ";break}default:i=String.fromCharCode(c)}u=c===-2,n.push(i)}return n.join("")}const gr={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:tt},xr={91:kn},kr={[-2]:be,[-1]:be,32:be},yr={35:En,42:ke,45:[Ge,ke],60:Cn,61:Ge,95:ke,96:Qe,126:Qe},Fr={38:rt,92:nt},vr={[-5]:Ee,[-4]:Ee,[-3]:Ee,33:$n,38:rt,42:Te,60:[Kt,Pn],91:Kn,92:[Sn,nt],93:_e,95:Te,96:sn},Sr={null:[Te,lr]},br={null:[42,95]},Er={null:[]},Ar=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:br,contentInitial:xr,disable:Er,document:gr,flow:yr,flowInitial:kr,insideSpan:Sr,string:Fr,text:vr},Symbol.toStringTag,{value:"Module"}));function Ir(e){const r=_t([Ar,...(e||{}).extensions||[]]),t={defined:[],lazy:{},constructs:r,content:n(qt),document:n(Nt),flow:n(or),string:n(ar),text:n(fr)};return t;function n(u){return c;function c(i){return pr(t,u,i)}}}const Je=/[\0\t\n\r]/g;function Tr(){let e=1,r="",t=!0,n;return u;function u(c,i,o){const p=[];let a,d,h,g,f;for(c=r+c.toString(i),h=0,r="",t&&(c.charCodeAt(0)===65279&&h++,t=void 0);h<c.length;){if(Je.lastIndex=h,a=Je.exec(c),g=a&&a.index!==void 0?a.index:c.length,f=c.charCodeAt(g),!a){r=c.slice(h);break}if(f===10&&h===g&&n)p.push(-3),n=void 0;else switch(n&&(p.push(-5),n=void 0),h<g&&(p.push(c.slice(h,g)),e+=g-h),f){case 0:{p.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,p.push(-2);e++<d;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:n=!0,e=1}h=g+1}return o&&(n&&p.push(-5),r&&p.push(r),p.push(null)),p}}function Cr(e){for(;!it(e););return e}function at(e,r){const t=Number.parseInt(e,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const wr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zr(e){return e.replace(wr,Dr)}function Dr(e,r,t){if(r)return r;if(t.charCodeAt(0)===35){const n=t.charCodeAt(1),u=n===120||n===88;return at(t.slice(u?2:1),u?16:10)}return ze(t)||e}function ye(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xe(e.position):"start"in e||"end"in e?Xe(e):"line"in e||"column"in e?Ce(e):""}function Ce(e){return Ze(e&&e.line)+":"+Ze(e&&e.column)}function Xe(e){return Ce(e&&e.start)+"-"+Ce(e&&e.end)}function Ze(e){return e&&typeof e=="number"?e:1}const ft={}.hasOwnProperty,dt=function(e,r,t){return typeof r!="string"&&(t=r,r=void 0),_r(t)(Cr(Ir(t).document().write(Tr()(e,r,!0))))};function _r(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(He),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Le),blockQuote:o(ve),characterEscape:F,characterReference:F,codeFenced:o(Pe),codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:o(Pe,p),codeText:o(mt,p),codeTextData:F,data:F,codeFlowValue:F,definition:o(gt),definitionDestinationString:p,definitionLabelString:p,definitionTitleString:p,emphasis:o(xt),hardBreakEscape:o(Oe),hardBreakTrailing:o(Oe),htmlFlow:o(je,p),htmlFlowData:F,htmlText:o(je,p),htmlTextData:F,image:o(kt),label:p,link:o(He),listItem:o(yt),listItemValue:I,listOrdered:o(Re,f),listUnordered:o(Re),paragraph:o(Ft),reference:ae,referenceString:p,resourceDestinationString:p,resourceTitleString:p,setextHeading:o(Le),strong:o(vt),thematicBreak:o(bt)},exit:{atxHeading:d(),atxHeadingSequence:w,autolink:d(),autolinkEmail:pe,autolinkProtocol:de,blockQuote:d(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ce,codeFenced:d(O),codeFencedFence:y,codeFencedFenceInfo:C,codeFencedFenceMeta:L,codeFlowValue:v,codeIndented:d(S),codeText:d(N),codeTextData:v,data:v,definition:d(),definitionDestinationString:x,definitionLabelString:B,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(j),hardBreakTrailing:d(j),htmlFlow:d(A),htmlFlowData:v,htmlText:d(W),htmlTextData:v,image:d(ne),label:J,labelText:s,lineEnding:M,link:d(G),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:U,resourceDestinationString:re,resourceTitleString:l,resource:X,setextHeading:d(V),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};pt(r,(e||{}).mdastExtensions||[]);const t={};return n;function n(m){let k={type:"root",children:[]};const b={stack:[k],tokenStack:[],config:r,enter:a,exit:h,buffer:p,resume:g,setData:c,getData:i},z=[];let D=-1;for(;++D<m.length;)if(m[D][1].type==="listOrdered"||m[D][1].type==="listUnordered")if(m[D][0]==="enter")z.push(D);else{const Y=z.pop();D=u(m,Y,D)}for(D=-1;++D<m.length;){const Y=r[m[D][0]];ft.call(Y,m[D][1].type)&&Y[m[D][1].type].call(Object.assign({sliceSerialize:m[D][2].sliceSerialize},b),m[D][1])}if(b.tokenStack.length>0){const Y=b.tokenStack[b.tokenStack.length-1];(Y[1]||Ye).call(b,void 0,Y[0])}for(k.position={start:oe(m.length>0?m[0][1].start:{line:1,column:1,offset:0}),end:oe(m.length>0?m[m.length-2][1].end:{line:1,column:1,offset:0})},D=-1;++D<r.transforms.length;)k=r.transforms[D](k)||k;return k}function u(m,k,b){let z=k-1,D=-1,Y=!1,le,ie,me,ge;for(;++z<=b;){const H=m[z];if(H[1].type==="listUnordered"||H[1].type==="listOrdered"||H[1].type==="blockQuote"?(H[0]==="enter"?D++:D--,ge=void 0):H[1].type==="lineEndingBlank"?H[0]==="enter"&&(le&&!ge&&!D&&!me&&(me=z),ge=void 0):H[1].type==="linePrefix"||H[1].type==="listItemValue"||H[1].type==="listItemMarker"||H[1].type==="listItemPrefix"||H[1].type==="listItemPrefixWhitespace"||(ge=void 0),!D&&H[0]==="enter"&&H[1].type==="listItemPrefix"||D===-1&&H[0]==="exit"&&(H[1].type==="listUnordered"||H[1].type==="listOrdered")){if(le){let Se=z;for(ie=void 0;Se--;){const ue=m[Se];if(ue[1].type==="lineEnding"||ue[1].type==="lineEndingBlank"){if(ue[0]==="exit")continue;ie&&(m[ie][1].type="lineEndingBlank",Y=!0),ue[1].type="lineEnding",ie=Se}else if(!(ue[1].type==="linePrefix"||ue[1].type==="blockQuotePrefix"||ue[1].type==="blockQuotePrefixWhitespace"||ue[1].type==="blockQuoteMarker"||ue[1].type==="listItemIndent"))break}me&&(!ie||me<ie)&&(le._spread=!0),le.end=Object.assign({},ie?m[ie][1].start:H[1].end),m.splice(ie||z,0,["exit",le,H[2]]),z++,b++}H[1].type==="listItemPrefix"&&(le={type:"listItem",_spread:!1,start:Object.assign({},H[1].start),end:void 0},m.splice(z,0,["enter",le,H[2]]),z++,b++,me=void 0,ge=!0)}}return m[k][1]._spread=Y,b}function c(m,k){t[m]=k}function i(m){return t[m]}function o(m,k){return b;function b(z){a.call(this,m(z),z),k&&k.call(this,z)}}function p(){this.stack.push({type:"fragment",children:[]})}function a(m,k,b){return this.stack[this.stack.length-1].children.push(m),this.stack.push(m),this.tokenStack.push([k,b]),m.position={start:oe(k.start)},m}function d(m){return k;function k(b){m&&m.call(this,b),h.call(this,b)}}function h(m,k){const b=this.stack.pop(),z=this.tokenStack.pop();if(z)z[0].type!==m.type&&(k?k.call(this,m,z[0]):(z[1]||Ye).call(this,m,z[0]));else throw new Error("Cannot close `"+m.type+"` ("+ye({start:m.start,end:m.end})+"): it’s not open");return b.position.end=oe(m.end),b}function g(){return zt(this.stack.pop())}function f(){c("expectingFirstListItemValue",!0)}function I(m){if(i("expectingFirstListItemValue")){const k=this.stack[this.stack.length-2];k.start=Number.parseInt(this.sliceSerialize(m),10),c("expectingFirstListItemValue")}}function C(){const m=this.resume(),k=this.stack[this.stack.length-1];k.lang=m}function L(){const m=this.resume(),k=this.stack[this.stack.length-1];k.meta=m}function y(){i("flowCodeInside")||(this.buffer(),c("flowCodeInside",!0))}function O(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c("flowCodeInside")}function S(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m.replace(/(\r?\n|\r)$/g,"")}function B(m){const k=this.resume(),b=this.stack[this.stack.length-1];b.label=k,b.identifier=he(this.sliceSerialize(m)).toLowerCase()}function P(){const m=this.resume(),k=this.stack[this.stack.length-1];k.title=m}function x(){const m=this.resume(),k=this.stack[this.stack.length-1];k.url=m}function w(m){const k=this.stack[this.stack.length-1];if(!k.depth){const b=this.sliceSerialize(m).length;k.depth=b}}function R(){c("setextHeadingSlurpLineEnding",!0)}function q(m){const k=this.stack[this.stack.length-1];k.depth=this.sliceSerialize(m).charCodeAt(0)===61?1:2}function V(){c("setextHeadingSlurpLineEnding")}function F(m){const k=this.stack[this.stack.length-1];let b=k.children[k.children.length-1];(!b||b.type!=="text")&&(b=St(),b.position={start:oe(m.start)},k.children.push(b)),this.stack.push(b)}function v(m){const k=this.stack.pop();k.value+=this.sliceSerialize(m),k.position.end=oe(m.end)}function M(m){const k=this.stack[this.stack.length-1];if(i("atHardBreak")){const b=k.children[k.children.length-1];b.position.end=oe(m.end),c("atHardBreak");return}!i("setextHeadingSlurpLineEnding")&&r.canContainEols.includes(k.type)&&(F.call(this,m),v.call(this,m))}function j(){c("atHardBreak",!0)}function A(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function W(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function N(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function G(){const m=this.stack[this.stack.length-1];if(i("inReference")){const k=i("referenceType")||"shortcut";m.type+="Reference",m.referenceType=k,delete m.url,delete m.title}else delete m.identifier,delete m.label;c("referenceType")}function ne(){const m=this.stack[this.stack.length-1];if(i("inReference")){const k=i("referenceType")||"shortcut";m.type+="Reference",m.referenceType=k,delete m.url,delete m.title}else delete m.identifier,delete m.label;c("referenceType")}function s(m){const k=this.sliceSerialize(m),b=this.stack[this.stack.length-2];b.label=zr(k),b.identifier=he(k).toLowerCase()}function J(){const m=this.stack[this.stack.length-1],k=this.resume(),b=this.stack[this.stack.length-1];if(c("inReference",!0),b.type==="link"){const z=m.children;b.children=z}else b.alt=k}function re(){const m=this.resume(),k=this.stack[this.stack.length-1];k.url=m}function l(){const m=this.resume(),k=this.stack[this.stack.length-1];k.title=m}function X(){c("inReference")}function ae(){c("referenceType","collapsed")}function U(m){const k=this.resume(),b=this.stack[this.stack.length-1];b.label=k,b.identifier=he(this.sliceSerialize(m)).toLowerCase(),c("referenceType","full")}function fe(m){c("characterReferenceType",m.type)}function ce(m){const k=this.sliceSerialize(m),b=i("characterReferenceType");let z;b?(z=at(k,b==="characterReferenceMarkerNumeric"?10:16),c("characterReferenceType")):z=ze(k);const D=this.stack.pop();D.value+=z,D.position.end=oe(m.end)}function de(m){v.call(this,m);const k=this.stack[this.stack.length-1];k.url=this.sliceSerialize(m)}function pe(m){v.call(this,m);const k=this.stack[this.stack.length-1];k.url="mailto:"+this.sliceSerialize(m)}function ve(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function mt(){return{type:"inlineCode",value:""}}function gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:void 0,children:[]}}function Oe(){return{type:"break"}}function je(){return{type:"html",value:""}}function kt(){return{type:"image",title:null,url:"",alt:null}}function He(){return{type:"link",title:null,url:"",children:[]}}function Re(m){return{type:"list",ordered:m.type==="listOrdered",start:null,spread:m._spread,children:[]}}function yt(m){return{type:"listItem",spread:m._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function bt(){return{type:"thematicBreak"}}}function oe(e){return{line:e.line,column:e.column,offset:e.offset}}function pt(e,r){let t=-1;for(;++t<r.length;){const n=r[t];Array.isArray(n)?pt(e,n):Br(e,n)}}function Br(e,r){let t;for(t in r)if(ft.call(r,t)){if(t==="canContainEols"){const n=r[t];n&&e[t].push(...n)}else if(t==="transforms"){const n=r[t];n&&e[t].push(...n)}else if(t==="enter"||t==="exit"){const n=r[t];n&&Object.assign(e[t],n)}}}function Ye(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+ye({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+ye({start:r.start,end:r.end})+") is still open")}function Mr(e){const r=e.replace(/\n{2,}/g,`
4
4
  `);return Ct(r)}function Pr(e){const r=Mr(e),{children:t}=dt(r),n=[[]];let u=0;function c(i,o="normal"){i.type==="text"?i.value.split(`