dimcode 0.0.7 → 0.0.9
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.
- package/assets/gui/200.html +1 -1
- package/assets/gui/404.html +1 -1
- package/assets/gui/_nuxt/{CctfDgzL.js → 0b551Iup.js} +1 -1
- package/assets/gui/_nuxt/{waGmH_zw.js → 4plqNI3E.js} +1 -1
- package/assets/gui/_nuxt/{B41oyhUX.js → B2yiF0dP.js} +1 -1
- package/assets/gui/_nuxt/{Cx8lgPkP.js → B8sXOwue.js} +1 -1
- package/assets/gui/_nuxt/BAAwCcKi.js +1 -0
- package/assets/gui/_nuxt/{BHBA7_9A.js → BE4JB3YQ.js} +1 -1
- package/assets/gui/_nuxt/{zPZrJS7V.js → BGp_FwD9.js} +1 -1
- package/assets/gui/_nuxt/{DQcJWYOz.js → BIM4RUHw.js} +1 -1
- package/assets/gui/_nuxt/{WbTodJZi.js → BJmxWypQ.js} +1 -1
- package/assets/gui/_nuxt/{BAsEomiL.js → BKMTnum7.js} +1 -1
- package/assets/gui/_nuxt/{CgCvTYUb.js → BPM3vi7L.js} +1 -1
- package/assets/gui/_nuxt/{CxrwCJPS.js → BloQGtiP.js} +1 -1
- package/assets/gui/_nuxt/{C2r5gH2d.js → BnC2hR_I.js} +1 -1
- package/assets/gui/_nuxt/{DCBWnvUv.js → BtMqZKeb.js} +1 -1
- package/assets/gui/_nuxt/BtYWoTeV.js +1 -0
- package/assets/gui/_nuxt/{a4I2nS0P.js → Bu7UbN50.js} +1 -1
- package/assets/gui/_nuxt/{DDwo0uwT.js → C11b51Ac.js} +1 -1
- package/assets/gui/_nuxt/{BtytU9Nc.js → C1yhW14G.js} +2 -2
- package/assets/gui/_nuxt/{BJgShMaj.js → C5cXMF-A.js} +1 -1
- package/assets/gui/_nuxt/{Fi3JZ7gi.js → C6Po8woU.js} +1 -1
- package/assets/gui/_nuxt/C6lP39IU.js +4 -0
- package/assets/gui/_nuxt/{m1p94B0o.js → C8BqVsjE.js} +1 -1
- package/assets/gui/_nuxt/{FdVDP1dJ.js → C8FO969Z.js} +48 -48
- package/assets/gui/_nuxt/C8tOkigv.js +1 -0
- package/assets/gui/_nuxt/{Dgtmkgv6.js → CILJ3eP4.js} +1 -1
- package/assets/gui/_nuxt/{fGWXVeDl.js → CJeKOH-v.js} +2 -2
- package/assets/gui/_nuxt/CKgPEzpl.js +1 -0
- package/assets/gui/_nuxt/{C_nwuZOL.js → CNpnPA49.js} +1 -1
- package/assets/gui/_nuxt/{DLps5vLc.js → CSea6CJ5.js} +1 -1
- package/assets/gui/_nuxt/{Be9sogz8.js → CU5WgS48.js} +1 -1
- package/assets/gui/_nuxt/{gw8YJBUN.js → CZ1LJRt8.js} +1 -1
- package/assets/gui/_nuxt/{4latAK5N.js → CfQJsi7e.js} +3 -3
- package/assets/gui/_nuxt/{DuPuI2eK.js → Cgg1My-l.js} +1 -1
- package/assets/gui/_nuxt/{CR-veSvi.js → ChaLjQbU.js} +1 -1
- package/assets/gui/_nuxt/CmKTTxBW.js +1 -0
- package/assets/gui/_nuxt/{QrFbBF0x.js → Conicgba.js} +1 -1
- package/assets/gui/_nuxt/{B-ocCvqj.js → CupMKq6u.js} +1 -1
- package/assets/gui/_nuxt/{1fcVKlQD.js → D0ya9d-G.js} +1 -1
- package/assets/gui/_nuxt/{DJ0FGiPu.js → D2lZokPL.js} +1 -1
- package/assets/gui/_nuxt/{BHmwI27Q.js → D5KI-6FL.js} +2 -2
- package/assets/gui/_nuxt/{BCdCHJrs.js → DCxOw3GV.js} +2 -2
- package/assets/gui/_nuxt/{I4qJV1od.js → DCyR-K5m.js} +4 -4
- package/assets/gui/_nuxt/DLnSW1IF.js +1 -0
- package/assets/gui/_nuxt/{FmGx3-yC.js → DUsPre0P.js} +1 -1
- package/assets/gui/_nuxt/{DNM2C9RQ.js → DX6XiGOO.js} +1 -1
- package/assets/gui/_nuxt/{CM2Ru5jE.js → DXsty2qm.js} +1 -1
- package/assets/gui/_nuxt/{CvBv_9Ii.js → DZ0NWvbi.js} +1 -1
- package/assets/gui/_nuxt/{VvxifOG2.js → DaWfUpsD.js} +68 -68
- package/assets/gui/_nuxt/{BIK3UA9H.js → DlL1-BJh.js} +1 -1
- package/assets/gui/_nuxt/Dn4y6C2r.js +1 -0
- package/assets/gui/_nuxt/{B-QRPBiU.js → DpTvXhMN.js} +1 -1
- package/assets/gui/_nuxt/{C5QU6AII.js → DzzoB_Be.js} +1 -1
- package/assets/gui/_nuxt/{BMPUUilT.js → GsNec5dh.js} +1 -1
- package/assets/gui/_nuxt/{JhHowHQY.js → _RKv1NgS.js} +1 -1
- package/assets/gui/_nuxt/{eM4IBQGT.js → _mPeMGlT.js} +1 -1
- package/assets/gui/_nuxt/builds/latest.json +1 -1
- package/assets/gui/_nuxt/builds/meta/899e1dcf-7a7e-4c41-8525-c1d394dec180.json +1 -0
- package/assets/gui/_nuxt/{entry.DKEE1mdx.css → entry.PbPm020F.css} +1 -1
- package/assets/gui/_nuxt/error-404.DF6r4GP7.css +1 -0
- package/assets/gui/_nuxt/error-500.Bo5pzFPU.css +1 -0
- package/assets/gui/_nuxt/{CYh22N6Z.js → gpkmuIcl.js} +1 -1
- package/assets/gui/_nuxt/{0OuYuFdd.js → kTUG9xEK.js} +1 -1
- package/assets/gui/_nuxt/{moIhOSp_.js → nJjJxbsW.js} +3 -3
- package/assets/gui/index.html +1 -1
- package/dist/aihubmix.json +1 -1
- package/dist/anthropic.json +1 -1
- package/dist/cli.mjs +468 -468
- package/dist/deepseek.json +1 -1
- package/dist/google.json +1 -1
- package/dist/kimi-for-coding.json +1 -1
- package/dist/minimax-cn-coding-plan.json +1 -1
- package/dist/minimax-cn.json +1 -1
- package/dist/minimax-coding-plan.json +1 -1
- package/dist/minimax.json +1 -1
- package/dist/models/aihubmix.json +1 -1
- package/dist/models/openrouter.json +1 -1
- package/dist/models/siliconflow-com.json +1 -1
- package/dist/models/siliconflow.json +1 -1
- package/dist/models/zenmux.json +1 -1
- package/dist/moonshot-ai.json +1 -1
- package/dist/moonshot.json +1 -1
- package/dist/openai.json +1 -1
- package/dist/ppinfra.json +1 -1
- package/dist/xai.json +1 -1
- package/dist/zai-coding-plan.json +1 -1
- package/dist/zai.json +1 -1
- package/dist/zenmux.json +1 -1
- package/dist/zhipuai-coding-plan.json +1 -1
- package/dist/zhipuai.json +1 -1
- package/package.json +2 -2
- package/assets/gui/_nuxt/5tCQ9P9x.js +0 -1
- package/assets/gui/_nuxt/CRt9G2a3.js +0 -1
- package/assets/gui/_nuxt/CW5-BTm0.js +0 -1
- package/assets/gui/_nuxt/CjaZXJmO.js +0 -1
- package/assets/gui/_nuxt/DGBBJ9Xx.js +0 -1
- package/assets/gui/_nuxt/DYanJOYX.js +0 -1
- package/assets/gui/_nuxt/DhXJpUyf.js +0 -261
- package/assets/gui/_nuxt/DhgdKvf3.js +0 -4
- package/assets/gui/_nuxt/Dr-RzAtV.js +0 -1
- package/assets/gui/_nuxt/builds/meta/ec7f63c2-1217-4402-b8e2-236e5db0f71a.json +0 -1
- package/assets/gui/_nuxt/error-404.BAwq3L4-.css +0 -1
- package/assets/gui/_nuxt/error-500.DFXMopWe.css +0 -1
- package/assets/native/build.zig +0 -16
- package/assets/native/src/lib.zig +0 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as et}from"./CYh22N6Z.js";import{g as tt}from"./DJ0FGiPu.js";import{s as st}from"./C2r5gH2d.js";import{_ as A,l as Oe,c as D,o as it,r as at,u as we,d as ee,b as nt,a as rt,s as ut,g as lt,p as ot,q as ct,k as v,y as ht,x as dt,i as pt,Q as R}from"./VvxifOG2.js";var Ve=(function(){var s=A(function(I,o,c,d){for(c=c||{},d=I.length;d--;c[I[d]]=o);return c},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],n=[1,42],p=[1,26],f=[1,24],C=[1,25],B=[1,32],L=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],Te=[1,30],ke=[1,31],b=[1,44],E=[1,46],y=[1,43],T=[1,47],De=[1,9],h=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],ne=[1,62],Fe=[1,63],Be=[1,64],z=[1,8,9,41],Pe=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],re=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ue=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],_e=[1,100],Y=[1,117],Q=[1,113],W=[1,109],j=[1,115],X=[1,110],q=[1,111],H=[1,112],J=[1,114],Z=[1,116],Re=[22,48,60,61,82,86,87,88,89,90],Se=[1,8,9,39,41,44],le=[1,8,9,22],Ge=[1,145],Ue=[1,8,9,61],N=[1,8,9,22,48,60,61,82,86,87,88,89,90],Ne={trace:A(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:A(function(o,c,d,r,g,e,$){var t=e.length-1;switch(g){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:r.addRelation(e[t]);break;case 20:e[t-1].title=r.cleanupLabel(e[t]),r.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(e[t-3],e[t-1]);break;case 35:r.addClassesToNamespace(e[t-4],e[t-1]);break;case 36:this.$=e[t],r.addNamespace(e[t]);break;case 37:this.$=[e[t]];break;case 38:this.$=[e[t-1]];break;case 39:e[t].unshift(e[t-2]),this.$=e[t];break;case 41:r.setCssClass(e[t-2],e[t]);break;case 42:r.addMembers(e[t-3],e[t-1]);break;case 44:r.setCssClass(e[t-5],e[t-3]),r.addMembers(e[t-5],e[t-1]);break;case 45:this.$=e[t],r.addClass(e[t]);break;case 46:this.$=e[t-1],r.addClass(e[t-1]),r.setClassLabel(e[t-1],e[t]);break;case 50:r.addAnnotation(e[t],e[t-2]);break;case 51:case 64:this.$=[e[t]];break;case 52:e[t].push(e[t-1]),this.$=e[t];break;case 53:break;case 54:r.addMember(e[t-1],r.cleanupLabel(e[t]));break;case 55:break;case 56:break;case 57:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 59:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 60:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 61:r.addNote(e[t],e[t-1]);break;case 62:r.addNote(e[t]);break;case 63:this.$=e[t-2],r.defineClass(e[t-1],e[t]);break;case 65:this.$=e[t-2].concat([e[t]]);break;case 66:r.setDirection("TB");break;case 67:r.setDirection("BT");break;case 68:r.setDirection("RL");break;case 69:r.setDirection("LR");break;case 70:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 71:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 72:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 73:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 74:this.$=r.relationType.AGGREGATION;break;case 75:this.$=r.relationType.EXTENSION;break;case 76:this.$=r.relationType.COMPOSITION;break;case 77:this.$=r.relationType.DEPENDENCY;break;case 78:this.$=r.relationType.LOLLIPOP;break;case 79:this.$=r.lineType.LINE;break;case 80:this.$=r.lineType.DOTTED_LINE;break;case 81:case 87:this.$=e[t-2],r.setClickEvent(e[t-1],e[t]);break;case 82:case 88:this.$=e[t-3],r.setClickEvent(e[t-2],e[t-1]),r.setTooltip(e[t-2],e[t]);break;case 83:this.$=e[t-2],r.setLink(e[t-1],e[t]);break;case 84:this.$=e[t-3],r.setLink(e[t-2],e[t-1],e[t]);break;case 85:this.$=e[t-3],r.setLink(e[t-2],e[t-1]),r.setTooltip(e[t-2],e[t]);break;case 86:this.$=e[t-4],r.setLink(e[t-3],e[t-2],e[t]),r.setTooltip(e[t-3],e[t-1]);break;case 89:this.$=e[t-3],r.setClickEvent(e[t-2],e[t-1],e[t]);break;case 90:this.$=e[t-4],r.setClickEvent(e[t-3],e[t-2],e[t-1]),r.setTooltip(e[t-3],e[t]);break;case 91:this.$=e[t-3],r.setLink(e[t-2],e[t]);break;case 92:this.$=e[t-4],r.setLink(e[t-3],e[t-1],e[t]);break;case 93:this.$=e[t-4],r.setLink(e[t-3],e[t-1]),r.setTooltip(e[t-3],e[t]);break;case 94:this.$=e[t-5],r.setLink(e[t-4],e[t-2],e[t]),r.setTooltip(e[t-4],e[t-1]);break;case 95:this.$=e[t-2],r.setCssStyle(e[t-1],e[t]);break;case 96:r.setCssClass(e[t-1],e[t]);break;case 97:this.$=[e[t]];break;case 98:e[t-2].push(e[t]),this.$=e[t-2];break;case 100:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:n,49:p,51:f,52:C,54:B,56:L,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:Te,83:ke,86:b,100:E,102:y,103:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(h,[2,19],{22:[1,50]}),s(h,[2,21]),s(h,[2,22]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),{34:[1,51]},{36:[1,52]},s(h,[2,33]),s(h,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:ne,73:Fe,74:Be}),{39:[1,65]},s(z,[2,40],{39:[1,67],44:[1,66]}),s(h,[2,55]),s(h,[2,56]),{16:68,60:m,86:b,100:E,102:y},{16:39,17:40,19:69,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:70,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:71,60:m,86:b,100:E,102:y,103:T},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:m,86:b,100:E,102:y,103:T},{13:Pe,55:75},{58:77,60:[1,78]},s(h,[2,66]),s(h,[2,67]),s(h,[2,68]),s(h,[2,69]),s(P,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:m,86:b,100:E,102:y,103:T}),s(P,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:86,60:m,86:b,100:E,102:y,103:T},s(re,[2,123]),s(re,[2,124]),s(re,[2,125]),s(re,[2,126]),s([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:a,37:u,42:l,46:n,49:p,51:f,52:C,54:B,56:L,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:Te,83:ke,86:b,100:E,102:y,103:T}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:n,49:p,51:f,52:C,54:B,56:L,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:Te,83:ke,86:b,100:E,102:y,103:T},s(h,[2,20]),s(h,[2,31]),s(h,[2,32]),{13:[1,90],16:39,17:40,19:89,60:m,86:b,100:E,102:y,103:T},{53:91,66:56,67:57,68:te,69:se,70:ie,71:ae,72:ne,73:Fe,74:Be},s(h,[2,54]),{67:92,73:Fe,74:Be},s(ue,[2,73],{66:93,68:te,69:se,70:ie,71:ae,72:ne}),s(K,[2,74]),s(K,[2,75]),s(K,[2,76]),s(K,[2,77]),s(K,[2,78]),s(Me,[2,79]),s(Me,[2,80]),{8:[1,95],24:96,40:94,43:23,46:n},{16:97,60:m,86:b,100:E,102:y},{41:[1,99],45:98,51:_e},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:Y,48:Q,59:106,60:W,82:j,84:107,85:108,86:X,87:q,88:H,89:J,90:Z},{60:[1,118]},{13:Pe,55:119},s(h,[2,62]),s(h,[2,128]),{22:Y,48:Q,59:120,60:W,61:[1,121],82:j,84:107,85:108,86:X,87:q,88:H,89:J,90:Z},s(Re,[2,64]),{16:39,17:40,19:122,60:m,86:b,100:E,102:y,103:T},s(P,[2,16]),s(P,[2,17]),s(P,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:m,86:b,100:E,102:y,103:T},{39:[2,10]},s(Se,[2,45],{11:125,12:[1,126]}),s(De,[2,7]),{9:[1,127]},s(le,[2,57]),{16:39,17:40,19:128,60:m,86:b,100:E,102:y,103:T},{13:[1,130],16:39,17:40,19:129,60:m,86:b,100:E,102:y,103:T},s(ue,[2,72],{66:131,68:te,69:se,70:ie,71:ae,72:ne}),s(ue,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:n},{8:[1,134],41:[2,37]},s(z,[2,41],{39:[1,135]}),{41:[1,136]},s(z,[2,43]),{41:[2,51],45:137,51:_e},{16:39,17:40,19:138,60:m,86:b,100:E,102:y,103:T},s(h,[2,81],{13:[1,139]}),s(h,[2,83],{13:[1,141],77:[1,140]}),s(h,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},s(h,[2,95],{61:Ge}),s(Ue,[2,97],{85:146,22:Y,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(N,[2,99]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(N,[2,105]),s(N,[2,106]),s(N,[2,107]),s(N,[2,108]),s(N,[2,109]),s(h,[2,96]),s(h,[2,61]),s(h,[2,63],{61:Ge}),{60:[1,147]},s(P,[2,14]),{15:148,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{39:[2,12]},s(Se,[2,46]),{13:[1,149]},{1:[2,4]},s(le,[2,59]),s(le,[2,58]),{16:39,17:40,19:150,60:m,86:b,100:E,102:y,103:T},s(ue,[2,70]),s(h,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:n},{45:153,51:_e},s(z,[2,42]),{41:[2,52]},s(h,[2,50]),s(h,[2,82]),s(h,[2,84]),s(h,[2,85],{77:[1,154]}),s(h,[2,88]),s(h,[2,89],{13:[1,155]}),s(h,[2,91],{13:[1,157],77:[1,156]}),{22:Y,48:Q,60:W,82:j,84:158,85:108,86:X,87:q,88:H,89:J,90:Z},s(N,[2,100]),s(Re,[2,65]),{39:[2,11]},{14:[1,159]},s(le,[2,60]),s(h,[2,35]),{41:[2,39]},{41:[1,160]},s(h,[2,86]),s(h,[2,90]),s(h,[2,92]),s(h,[2,93],{77:[1,161]}),s(Ue,[2,98],{85:146,22:Y,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(Se,[2,8]),s(z,[2,44]),s(h,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:A(function(o,c){if(c.recoverable)this.trace(o);else{var d=new Error(o);throw d.hash=c,d}},"parseError"),parse:A(function(o){var c=this,d=[0],r=[],g=[null],e=[],$=this.table,t="",ce=0,ze=0,He=2,Ke=1,Je=e.slice.call(arguments,1),k=Object.create(this.lexer),O={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(O.yy[Le]=this.yy[Le]);k.setInput(o,O.yy),O.yy.lexer=k,O.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var xe=k.yylloc;e.push(xe);var Ze=k.options&&k.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(_){d.length=d.length-2*_,g.length=g.length-_,e.length=e.length-_}A($e,"popStack");function Ye(){var _;return _=r.pop()||k.lex()||Ke,typeof _!="number"&&(_ instanceof Array&&(r=_,_=r.pop()),_=c.symbols_[_]||_),_}A(Ye,"lex");for(var F,w,S,ve,M={},he,x,Qe,de;;){if(w=d[d.length-1],this.defaultActions[w]?S=this.defaultActions[w]:((F===null||typeof F>"u")&&(F=Ye()),S=$[w]&&$[w][F]),typeof S>"u"||!S.length||!S[0]){var Ie="";de=[];for(he in $[w])this.terminals_[he]&&he>He&&de.push("'"+this.terminals_[he]+"'");k.showPosition?Ie="Parse error on line "+(ce+1)+`:
|
|
1
|
+
import{g as et}from"./gpkmuIcl.js";import{g as tt}from"./D2lZokPL.js";import{s as st}from"./BnC2hR_I.js";import{_ as A,l as Oe,c as D,o as it,r as at,u as we,d as ee,b as nt,a as rt,s as ut,g as lt,p as ot,q as ct,k as v,y as ht,x as dt,i as pt,Q as R}from"./DaWfUpsD.js";var Ve=(function(){var s=A(function(I,o,c,d){for(c=c||{},d=I.length;d--;c[I[d]]=o);return c},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],n=[1,42],p=[1,26],f=[1,24],C=[1,25],B=[1,32],L=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],Te=[1,30],ke=[1,31],b=[1,44],E=[1,46],y=[1,43],T=[1,47],De=[1,9],h=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],ne=[1,62],Fe=[1,63],Be=[1,64],z=[1,8,9,41],Pe=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],re=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ue=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],_e=[1,100],Y=[1,117],Q=[1,113],W=[1,109],j=[1,115],X=[1,110],q=[1,111],H=[1,112],J=[1,114],Z=[1,116],Re=[22,48,60,61,82,86,87,88,89,90],Se=[1,8,9,39,41,44],le=[1,8,9,22],Ge=[1,145],Ue=[1,8,9,61],N=[1,8,9,22,48,60,61,82,86,87,88,89,90],Ne={trace:A(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:A(function(o,c,d,r,g,e,$){var t=e.length-1;switch(g){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:r.addRelation(e[t]);break;case 20:e[t-1].title=r.cleanupLabel(e[t]),r.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(e[t-3],e[t-1]);break;case 35:r.addClassesToNamespace(e[t-4],e[t-1]);break;case 36:this.$=e[t],r.addNamespace(e[t]);break;case 37:this.$=[e[t]];break;case 38:this.$=[e[t-1]];break;case 39:e[t].unshift(e[t-2]),this.$=e[t];break;case 41:r.setCssClass(e[t-2],e[t]);break;case 42:r.addMembers(e[t-3],e[t-1]);break;case 44:r.setCssClass(e[t-5],e[t-3]),r.addMembers(e[t-5],e[t-1]);break;case 45:this.$=e[t],r.addClass(e[t]);break;case 46:this.$=e[t-1],r.addClass(e[t-1]),r.setClassLabel(e[t-1],e[t]);break;case 50:r.addAnnotation(e[t],e[t-2]);break;case 51:case 64:this.$=[e[t]];break;case 52:e[t].push(e[t-1]),this.$=e[t];break;case 53:break;case 54:r.addMember(e[t-1],r.cleanupLabel(e[t]));break;case 55:break;case 56:break;case 57:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 59:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 60:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 61:r.addNote(e[t],e[t-1]);break;case 62:r.addNote(e[t]);break;case 63:this.$=e[t-2],r.defineClass(e[t-1],e[t]);break;case 65:this.$=e[t-2].concat([e[t]]);break;case 66:r.setDirection("TB");break;case 67:r.setDirection("BT");break;case 68:r.setDirection("RL");break;case 69:r.setDirection("LR");break;case 70:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 71:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 72:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 73:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 74:this.$=r.relationType.AGGREGATION;break;case 75:this.$=r.relationType.EXTENSION;break;case 76:this.$=r.relationType.COMPOSITION;break;case 77:this.$=r.relationType.DEPENDENCY;break;case 78:this.$=r.relationType.LOLLIPOP;break;case 79:this.$=r.lineType.LINE;break;case 80:this.$=r.lineType.DOTTED_LINE;break;case 81:case 87:this.$=e[t-2],r.setClickEvent(e[t-1],e[t]);break;case 82:case 88:this.$=e[t-3],r.setClickEvent(e[t-2],e[t-1]),r.setTooltip(e[t-2],e[t]);break;case 83:this.$=e[t-2],r.setLink(e[t-1],e[t]);break;case 84:this.$=e[t-3],r.setLink(e[t-2],e[t-1],e[t]);break;case 85:this.$=e[t-3],r.setLink(e[t-2],e[t-1]),r.setTooltip(e[t-2],e[t]);break;case 86:this.$=e[t-4],r.setLink(e[t-3],e[t-2],e[t]),r.setTooltip(e[t-3],e[t-1]);break;case 89:this.$=e[t-3],r.setClickEvent(e[t-2],e[t-1],e[t]);break;case 90:this.$=e[t-4],r.setClickEvent(e[t-3],e[t-2],e[t-1]),r.setTooltip(e[t-3],e[t]);break;case 91:this.$=e[t-3],r.setLink(e[t-2],e[t]);break;case 92:this.$=e[t-4],r.setLink(e[t-3],e[t-1],e[t]);break;case 93:this.$=e[t-4],r.setLink(e[t-3],e[t-1]),r.setTooltip(e[t-3],e[t]);break;case 94:this.$=e[t-5],r.setLink(e[t-4],e[t-2],e[t]),r.setTooltip(e[t-4],e[t-1]);break;case 95:this.$=e[t-2],r.setCssStyle(e[t-1],e[t]);break;case 96:r.setCssClass(e[t-1],e[t]);break;case 97:this.$=[e[t]];break;case 98:e[t-2].push(e[t]),this.$=e[t-2];break;case 100:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:n,49:p,51:f,52:C,54:B,56:L,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:Te,83:ke,86:b,100:E,102:y,103:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(h,[2,19],{22:[1,50]}),s(h,[2,21]),s(h,[2,22]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),{34:[1,51]},{36:[1,52]},s(h,[2,33]),s(h,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:ne,73:Fe,74:Be}),{39:[1,65]},s(z,[2,40],{39:[1,67],44:[1,66]}),s(h,[2,55]),s(h,[2,56]),{16:68,60:m,86:b,100:E,102:y},{16:39,17:40,19:69,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:70,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:71,60:m,86:b,100:E,102:y,103:T},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:m,86:b,100:E,102:y,103:T},{13:Pe,55:75},{58:77,60:[1,78]},s(h,[2,66]),s(h,[2,67]),s(h,[2,68]),s(h,[2,69]),s(P,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:m,86:b,100:E,102:y,103:T}),s(P,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:86,60:m,86:b,100:E,102:y,103:T},s(re,[2,123]),s(re,[2,124]),s(re,[2,125]),s(re,[2,126]),s([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:a,37:u,42:l,46:n,49:p,51:f,52:C,54:B,56:L,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:Te,83:ke,86:b,100:E,102:y,103:T}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:n,49:p,51:f,52:C,54:B,56:L,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:Te,83:ke,86:b,100:E,102:y,103:T},s(h,[2,20]),s(h,[2,31]),s(h,[2,32]),{13:[1,90],16:39,17:40,19:89,60:m,86:b,100:E,102:y,103:T},{53:91,66:56,67:57,68:te,69:se,70:ie,71:ae,72:ne,73:Fe,74:Be},s(h,[2,54]),{67:92,73:Fe,74:Be},s(ue,[2,73],{66:93,68:te,69:se,70:ie,71:ae,72:ne}),s(K,[2,74]),s(K,[2,75]),s(K,[2,76]),s(K,[2,77]),s(K,[2,78]),s(Me,[2,79]),s(Me,[2,80]),{8:[1,95],24:96,40:94,43:23,46:n},{16:97,60:m,86:b,100:E,102:y},{41:[1,99],45:98,51:_e},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:Y,48:Q,59:106,60:W,82:j,84:107,85:108,86:X,87:q,88:H,89:J,90:Z},{60:[1,118]},{13:Pe,55:119},s(h,[2,62]),s(h,[2,128]),{22:Y,48:Q,59:120,60:W,61:[1,121],82:j,84:107,85:108,86:X,87:q,88:H,89:J,90:Z},s(Re,[2,64]),{16:39,17:40,19:122,60:m,86:b,100:E,102:y,103:T},s(P,[2,16]),s(P,[2,17]),s(P,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:m,86:b,100:E,102:y,103:T},{39:[2,10]},s(Se,[2,45],{11:125,12:[1,126]}),s(De,[2,7]),{9:[1,127]},s(le,[2,57]),{16:39,17:40,19:128,60:m,86:b,100:E,102:y,103:T},{13:[1,130],16:39,17:40,19:129,60:m,86:b,100:E,102:y,103:T},s(ue,[2,72],{66:131,68:te,69:se,70:ie,71:ae,72:ne}),s(ue,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:n},{8:[1,134],41:[2,37]},s(z,[2,41],{39:[1,135]}),{41:[1,136]},s(z,[2,43]),{41:[2,51],45:137,51:_e},{16:39,17:40,19:138,60:m,86:b,100:E,102:y,103:T},s(h,[2,81],{13:[1,139]}),s(h,[2,83],{13:[1,141],77:[1,140]}),s(h,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},s(h,[2,95],{61:Ge}),s(Ue,[2,97],{85:146,22:Y,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(N,[2,99]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(N,[2,105]),s(N,[2,106]),s(N,[2,107]),s(N,[2,108]),s(N,[2,109]),s(h,[2,96]),s(h,[2,61]),s(h,[2,63],{61:Ge}),{60:[1,147]},s(P,[2,14]),{15:148,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{39:[2,12]},s(Se,[2,46]),{13:[1,149]},{1:[2,4]},s(le,[2,59]),s(le,[2,58]),{16:39,17:40,19:150,60:m,86:b,100:E,102:y,103:T},s(ue,[2,70]),s(h,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:n},{45:153,51:_e},s(z,[2,42]),{41:[2,52]},s(h,[2,50]),s(h,[2,82]),s(h,[2,84]),s(h,[2,85],{77:[1,154]}),s(h,[2,88]),s(h,[2,89],{13:[1,155]}),s(h,[2,91],{13:[1,157],77:[1,156]}),{22:Y,48:Q,60:W,82:j,84:158,85:108,86:X,87:q,88:H,89:J,90:Z},s(N,[2,100]),s(Re,[2,65]),{39:[2,11]},{14:[1,159]},s(le,[2,60]),s(h,[2,35]),{41:[2,39]},{41:[1,160]},s(h,[2,86]),s(h,[2,90]),s(h,[2,92]),s(h,[2,93],{77:[1,161]}),s(Ue,[2,98],{85:146,22:Y,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(Se,[2,8]),s(z,[2,44]),s(h,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:A(function(o,c){if(c.recoverable)this.trace(o);else{var d=new Error(o);throw d.hash=c,d}},"parseError"),parse:A(function(o){var c=this,d=[0],r=[],g=[null],e=[],$=this.table,t="",ce=0,ze=0,He=2,Ke=1,Je=e.slice.call(arguments,1),k=Object.create(this.lexer),O={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(O.yy[Le]=this.yy[Le]);k.setInput(o,O.yy),O.yy.lexer=k,O.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var xe=k.yylloc;e.push(xe);var Ze=k.options&&k.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(_){d.length=d.length-2*_,g.length=g.length-_,e.length=e.length-_}A($e,"popStack");function Ye(){var _;return _=r.pop()||k.lex()||Ke,typeof _!="number"&&(_ instanceof Array&&(r=_,_=r.pop()),_=c.symbols_[_]||_),_}A(Ye,"lex");for(var F,w,S,ve,M={},he,x,Qe,de;;){if(w=d[d.length-1],this.defaultActions[w]?S=this.defaultActions[w]:((F===null||typeof F>"u")&&(F=Ye()),S=$[w]&&$[w][F]),typeof S>"u"||!S.length||!S[0]){var Ie="";de=[];for(he in $[w])this.terminals_[he]&&he>He&&de.push("'"+this.terminals_[he]+"'");k.showPosition?Ie="Parse error on line "+(ce+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+de.join(", ")+", got '"+(this.terminals_[F]||F)+"'":Ie="Parse error on line "+(ce+1)+": Unexpected "+(F==Ke?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(Ie,{text:k.match,token:this.terminals_[F]||F,line:k.yylineno,loc:xe,expected:de})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+F);switch(S[0]){case 1:d.push(F),g.push(k.yytext),e.push(k.yylloc),d.push(S[1]),F=null,ze=k.yyleng,t=k.yytext,ce=k.yylineno,xe=k.yylloc;break;case 2:if(x=this.productions_[S[1]][1],M.$=g[g.length-x],M._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Ze&&(M._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),ve=this.performAction.apply(M,[t,ze,ce,O.yy,S[1],g,e].concat(Je)),typeof ve<"u")return ve;x&&(d=d.slice(0,-1*x*2),g=g.slice(0,-1*x),e=e.slice(0,-1*x)),d.push(this.productions_[S[1]][0]),g.push(M.$),e.push(M._$),Qe=$[d[d.length-2]][d[d.length-1]],d.push(Qe);break;case 3:return!0}}return!0},"parse")},qe=(function(){var I={EOF:1,parseError:A(function(c,d){if(this.yy.parser)this.yy.parser.parseError(c,d);else throw new Error(c)},"parseError"),setInput:A(function(o,c){return this.yy=c||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:A(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var c=o.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:A(function(o){var c=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=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),d.length-1&&(this.yylineno-=d.length-1);var g=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:d?(d.length===r.length?this.yylloc.first_column:0)+r[r.length-d.length].length-d[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:A(function(){return this._more=!0,this},"more"),reject:A(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:A(function(o){this.unput(this.match.slice(o))},"less"),pastInput:A(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:A(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:A(function(){var o=this.pastInput(),c=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as R,d as B,c as C,w as b,o as M,
|
|
1
|
+
import{e as R,d as B,c as C,f as _,w as b,o as M,g as I,j as E,y as O,n as T,p as N,m as V,r as p,T as A,z as K,s as L,t as z,B as D,x as H}from"./C8FO969Z.js";var g=(d,e,r)=>new Promise((l,u)=>{var v=t=>{try{a(r.next(t))}catch(n){u(n)}},i=t=>{try{a(r.throw(t))}catch(n){u(n)}},a=t=>t.done?l(t.value):Promise.resolve(t.value).then(v,i);a((r=r.apply(d,e)).next())});const P={key:0,class:"math-loading-overlay"},w=R(B({__name:"MathBlockNode",props:{node:{}},setup(d){const e=d,r=p(null),l=p(null);let u=!1,v=0,i=!1,a=null;const t=C();let n=null;const s=p(!0);function y(){return g(this,null,function*(){if(!l.value||i)return;if(!e.node.content)return s.value=!1,l.value.textContent=e.node.raw,void(u=!0);if(!u)try{!n&&r.value&&(n=t(r.value)),yield n?.whenVisible}catch{}a&&(a.abort(),a=null);const c=++v,f=new AbortController;a=f,L(e.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:f.signal}).then(o=>{i||c!==v||l.value&&(l.value.innerHTML=o,u=!0,s.value=!1)}).catch(o=>g(null,null,function*(){if(i||c!==v||!l.value)return;const m=o?.code||o?.name,k=m==="KATEX_DISABLED";if(m==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||m===z||m==="WORKER_TIMEOUT"){const x=yield D();if(x){try{const h=x.renderToString(e.node.content,{throwOnError:e.node.loading,displayMode:!0});l.value.innerHTML=h,u=!0,s.value=!1,H(e.node.content,!0,h)}catch{}return}}if(k)return s.value=!1,void(l.value.textContent=e.node.raw);u||(s.value=!0),e.node.loading||(s.value=!1,l.value.textContent=e.node.raw)}))})}return b(()=>e.node.content,()=>{y()}),M(()=>{y()}),I(()=>{var c;i=!0,a&&(a.abort(),a=null),(c=n?.destroy)==null||c.call(n),n=null}),(c,f)=>(E(),_("div",{ref_key:"containerEl",ref:r,class:"math-block text-center overflow-x-auto relative min-h-[40px]"},[O(A,{name:"math-fade"},{default:N(()=>[s.value?(E(),_("div",P,[...f[0]||(f[0]=[T("div",{class:"math-loading-spinner"},null,-1)])])):V("",!0)]),_:1}),T("div",{ref_key:"mathBlockElement",ref:l,class:K({"math-rendering":s.value})},null,2)],512))}}),[["__scopeId","data-v-f432e706"]]);w.install=d=>{d.component(w.__name,w)};export{w as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Y}from"./eM4IBQGT.js";import{I as K}from"./DCBWnvUv.js";import{q as U,p as V,s as X,g as J,a as Q,b as Z,_ as l,l as m,d as rr,u as er,C as tr,y as ar,k as C,D as sr,E as nr,F as or,c as cr,G as ir}from"./VvxifOG2.js";import{p as dr}from"./CM2Ru5jE.js";import"./FdVDP1dJ.js";import"./BIK3UA9H.js";import"./1fcVKlQD.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},hr=nr.gitGraph,I=l(()=>sr({...hr,...or().gitGraph}),"getConfig"),c=new K(()=>{const t=I(),r=t.mainBranchName,s=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:s}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function A(){return ir({length:7})}l(A,"getID");function F(t,r){const s=Object.create(null);return t.reduce((n,e)=>{const a=r(e);return s[a]||(s[a]=!0,n.push(e)),n},[])}l(F,"uniqBy");var lr=l(function(t){c.records.direction=t},"setDirection"),$r=l(function(t){m.debug("options str",t),t=t?.trim(),t=t||"{}";try{c.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),fr=l(function(){return c.records.options},"getOptions"),gr=l(function(t){let r=t.msg,s=t.id;const n=t.type;let e=t.tags;m.info("commit",r,s,n,e),m.debug("Entering commit:",r,s,n,e);const a=I();s=C.sanitizeText(s,a),r=C.sanitizeText(r,a),e=e?.map(o=>C.sanitizeText(o,a));const d={id:s||c.records.seq+"-"+A(),message:r,seq:c.records.seq++,type:n??x.NORMAL,tags:e??[],parents:c.records.head==null?[]:[c.records.head.id],branch:c.records.currBranch};c.records.head=d,m.info("main branch",a.mainBranchName),c.records.commits.has(d.id)&&m.warn(`Commit ID ${d.id} already exists`),c.records.commits.set(d.id,d),c.records.branches.set(c.records.currBranch,d.id),m.debug("in pushCommit "+d.id)},"commit"),yr=l(function(t){let r=t.name;const s=t.order;if(r=C.sanitizeText(r,I()),c.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);c.records.branches.set(r,c.records.head!=null?c.records.head.id:null),c.records.branchConfig.set(r,{name:r,order:s}),z(r),m.debug("in createBranch")},"branch"),ur=l(t=>{let r=t.branch,s=t.id;const n=t.type,e=t.tags,a=I();r=C.sanitizeText(r,a),s&&(s=C.sanitizeText(s,a));const d=c.records.branches.get(c.records.currBranch),o=c.records.branches.get(r),f=d?c.records.commits.get(d):void 0,h=o?c.records.commits.get(o):void 0;if(f&&h&&f.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(c.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(f===void 0||!f){const i=new Error(`Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!c.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(h===void 0||!h){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(f===h){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(s&&c.records.commits.has(s)){const i=new Error('Incorrect usage of "merge". Commit with id:'+s+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${s} ${n} ${e?.join(" ")}`,token:`merge ${r} ${s} ${n} ${e?.join(" ")}`,expected:[`merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`]},i}const $=o||"",g={id:s||`${c.records.seq}-${A()}`,message:`merged branch ${r} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,$],branch:c.records.currBranch,type:x.MERGE,customType:n,customId:!!s,tags:e??[]};c.records.head=g,c.records.commits.set(g.id,g),c.records.branches.set(c.records.currBranch,g.id),m.debug(c.records.branches),m.debug("in mergeBranch")},"merge"),pr=l(function(t){let r=t.id,s=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,s,n);const a=I();if(r=C.sanitizeText(r,a),s=C.sanitizeText(s,a),n=n?.map(f=>C.sanitizeText(f,a)),e=C.sanitizeText(e,a),!r||!c.records.commits.has(r)){const f=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw f.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},f}const d=c.records.commits.get(r);if(d===void 0||!d)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(d.parents)&&d.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=d.branch;if(d.type===x.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!s||!c.records.commits.has(s)){if(o===c.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const f=c.records.branches.get(c.records.currBranch);if(f===void 0||!f){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const h=c.records.commits.get(f);if(h===void 0||!h){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const $={id:c.records.seq+"-"+A(),message:`cherry-picked ${d?.message} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,d.id],branch:c.records.currBranch,type:x.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${d.id}${d.type===x.MERGE?`|parent:${e}`:""}`]};c.records.head=$,c.records.commits.set($.id,$),c.records.branches.set(c.records.currBranch,$.id),m.debug(c.records.branches),m.debug("in cherryPick")}},"cherryPick"),z=l(function(t){if(t=C.sanitizeText(t,I()),c.records.branches.has(t)){c.records.currBranch=t;const r=c.records.branches.get(c.records.currBranch);r===void 0||!r?c.records.head=null:c.records.head=c.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function H(t,r,s){const n=t.indexOf(r);n===-1?t.push(s):t.splice(n,1,s)}l(H,"upsert");function P(t){const r=t.reduce((e,a)=>e.seq>a.seq?e:a,t[0]);let s="";t.forEach(function(e){e===r?s+=" *":s+=" |"});const n=[s,r.id,r.seq];for(const e in c.records.branches)c.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=c.records.commits.get(r.parents[0]);H(t,r,e),r.parents[1]&&t.push(c.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=c.records.commits.get(r.parents[0]);H(t,r,e)}}t=F(t,e=>e.id),P(t)}l(P,"prettyPrintCommitHistory");var xr=l(function(){m.debug(c.records.commits);const t=N()[0];P([t])},"prettyPrint"),mr=l(function(){c.reset(),ar()},"clear"),br=l(function(){return[...c.records.branchConfig.values()].map((r,s)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${s}`)}).sort((r,s)=>(r.order??0)-(s.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),wr=l(function(){return c.records.branches},"getBranches"),vr=l(function(){return c.records.commits},"getCommits"),N=l(function(){const t=[...c.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,s)=>r.seq-s.seq),t},"getCommitsArray"),Cr=l(function(){return c.records.currBranch},"getCurrentBranch"),Er=l(function(){return c.records.direction},"getDirection"),Tr=l(function(){return c.records.head},"getHead"),S={commitType:x,getConfig:I,setDirection:lr,setOptions:$r,getOptions:fr,commit:gr,branch:yr,merge:ur,cherryPick:pr,checkout:z,prettyPrint:xr,clear:mr,getBranchesAsObjArray:br,getBranches:wr,getCommits:vr,getCommitsArray:N,getCurrentBranch:Cr,getDirection:Er,getHead:Tr,setAccTitle:Z,getAccTitle:Q,getAccDescription:J,setAccDescription:X,setDiagramTitle:V,getDiagramTitle:U},Br=l((t,r)=>{Y(t,r),t.dir&&r.setDirection(t.dir);for(const s of t.statements)Lr(s,r)},"populate"),Lr=l((t,r)=>{const n={Commit:l(e=>r.commit(kr(e)),"Commit"),Branch:l(e=>r.branch(Mr(e)),"Branch"),Merge:l(e=>r.merge(Ir(e)),"Merge"),Checkout:l(e=>r.checkout(Rr(e)),"Checkout"),CherryPicking:l(e=>r.cherryPick(Gr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),kr=l(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),Mr=l(t=>({name:t.name,order:t.order??0}),"parseBranch"),Ir=l(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Rr=l(t=>t.branch,"parseCheckout"),Gr=l(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Or={parse:l(async t=>{const r=await dr("gitGraph",t);m.debug(r),Br(r,S)},"parse")},qr=cr(),v=qr?.gitGraph,L=10,k=40,E=4,T=2,M=8,b=new Map,w=new Map,O=30,R=new Map,q=[],B=0,u="LR",Ar=l(()=>{b.clear(),w.clear(),R.clear(),B=0,q=[],u="LR"},"clear"),W=l(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=n.trim(),r.appendChild(e)}),r},"drawText"),j=l(t=>{let r,s,n;return u==="BT"?(s=l((e,a)=>e<=a,"comparisonFunc"),n=1/0):(s=l((e,a)=>e>=a,"comparisonFunc"),n=0),t.forEach(e=>{const a=u==="TB"||u=="BT"?w.get(e)?.y:w.get(e)?.x;a!==void 0&&s(a,n)&&(r=e,n=a)}),r},"findClosestParent"),_r=l(t=>{let r="",s=1/0;return t.forEach(n=>{const e=w.get(n).y;e<=s&&(r=n,s=e)}),r||void 0},"findClosestParentBT"),Hr=l((t,r,s)=>{let n=s,e=s;const a=[];t.forEach(d=>{const o=r.get(d);if(!o)throw new Error(`Commit not found for key ${d}`);o.parents.length?(n=Dr(o),e=Math.max(n,e)):a.push(o),Fr(o,n)}),n=e,a.forEach(d=>{zr(d,n,s)}),t.forEach(d=>{const o=r.get(d);if(o?.parents.length){const f=_r(o.parents);n=w.get(f).y-k,n<=e&&(e=n);const h=b.get(o.branch).pos,$=n-L;w.set(o.id,{x:h,y:$})}})},"setParallelBTPos"),Pr=l(t=>{const r=j(t.parents.filter(n=>n!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const s=w.get(r)?.y;if(s===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return s},"findClosestParentPos"),Dr=l(t=>Pr(t)+k,"calculateCommitPosition"),Fr=l((t,r)=>{const s=b.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const n=s.pos,e=r+L;return w.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),zr=l((t,r,s)=>{const n=b.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+s,a=n.pos;w.set(t.id,{x:a,y:e})},"setRootPosition"),Nr=l((t,r,s,n,e,a)=>{if(a===x.HIGHLIGHT)t.append("rect").attr("x",s.x-10).attr("y",s.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%M} ${n}-outer`),t.append("rect").attr("x",s.x-6).attr("y",s.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%M} ${n}-inner`);else if(a===x.CHERRY_PICK)t.append("circle").attr("cx",s.x).attr("cy",s.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",s.x-3).attr("cy",s.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",s.x+3).attr("cy",s.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",s.x+3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",s.x-3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const d=t.append("circle");if(d.attr("cx",s.x),d.attr("cy",s.y),d.attr("r",r.type===x.MERGE?9:10),d.attr("class",`commit ${r.id} commit${e%M}`),a===x.MERGE){const o=t.append("circle");o.attr("cx",s.x),o.attr("cy",s.y),o.attr("r",6),o.attr("class",`commit ${n} ${r.id} commit${e%M}`)}a===x.REVERSE&&t.append("path").attr("d",`M ${s.x-5},${s.y-5}L${s.x+5},${s.y+5}M${s.x-5},${s.y+5}L${s.x+5},${s.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%M}`)}},"drawCommitBullet"),Sr=l((t,r,s,n)=>{if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&v?.showCommitLabel){const e=t.append("g"),a=e.insert("rect").attr("class","commit-label-bkg"),d=e.append("text").attr("x",n).attr("y",s.y+25).attr("class","commit-label").text(r.id),o=d.node()?.getBBox();if(o&&(a.attr("x",s.posWithOffset-o.width/2-T).attr("y",s.y+13.5).attr("width",o.width+2*T).attr("height",o.height+2*T),u==="TB"||u==="BT"?(a.attr("x",s.x-(o.width+4*E+5)).attr("y",s.y-12),d.attr("x",s.x-(o.width+4*E)).attr("y",s.y+o.height-12)):d.attr("x",s.posWithOffset-o.width/2),v.rotateCommitLabel))if(u==="TB"||u==="BT")d.attr("transform","rotate(-45, "+s.x+", "+s.y+")"),a.attr("transform","rotate(-45, "+s.x+", "+s.y+")");else{const f=-7.5-(o.width+10)/25*9.5,h=10+o.width/25*8.5;e.attr("transform","translate("+f+", "+h+") rotate(-45, "+n+", "+s.y+")")}}},"drawCommitLabel"),Wr=l((t,r,s,n)=>{if(r.tags.length>0){let e=0,a=0,d=0;const o=[];for(const f of r.tags.reverse()){const h=t.insert("polygon"),$=t.append("circle"),g=t.append("text").attr("y",s.y-16-e).attr("class","tag-label").text(f),i=g.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");a=Math.max(a,i.width),d=Math.max(d,i.height),g.attr("x",s.posWithOffset-i.width/2),o.push({tag:g,hole:$,rect:h,yOffset:e}),e+=20}for(const{tag:f,hole:h,rect:$,yOffset:g}of o){const i=d/2,y=s.y-19.2-g;if($.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{p as Y}from"./_mPeMGlT.js";import{I as K}from"./BtMqZKeb.js";import{_ as l,q as U,p as V,s as X,g as J,a as Q,b as Z,l as m,c as rr,d as er,u as tr,C as ar,y as sr,k as C,D as nr,E as or,F as cr,G as ir}from"./DaWfUpsD.js";import{p as dr}from"./DXsty2qm.js";import"./C8FO969Z.js";import"./DlL1-BJh.js";import"./D0ya9d-G.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},hr=cr.gitGraph,I=l(()=>nr({...hr,...or().gitGraph}),"getConfig"),c=new K(()=>{const t=I(),r=t.mainBranchName,s=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:s}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function A(){return ir({length:7})}l(A,"getID");function F(t,r){const s=Object.create(null);return t.reduce((n,e)=>{const a=r(e);return s[a]||(s[a]=!0,n.push(e)),n},[])}l(F,"uniqBy");var lr=l(function(t){c.records.direction=t},"setDirection"),$r=l(function(t){m.debug("options str",t),t=t?.trim(),t=t||"{}";try{c.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),fr=l(function(){return c.records.options},"getOptions"),gr=l(function(t){let r=t.msg,s=t.id;const n=t.type;let e=t.tags;m.info("commit",r,s,n,e),m.debug("Entering commit:",r,s,n,e);const a=I();s=C.sanitizeText(s,a),r=C.sanitizeText(r,a),e=e?.map(o=>C.sanitizeText(o,a));const d={id:s||c.records.seq+"-"+A(),message:r,seq:c.records.seq++,type:n??x.NORMAL,tags:e??[],parents:c.records.head==null?[]:[c.records.head.id],branch:c.records.currBranch};c.records.head=d,m.info("main branch",a.mainBranchName),c.records.commits.has(d.id)&&m.warn(`Commit ID ${d.id} already exists`),c.records.commits.set(d.id,d),c.records.branches.set(c.records.currBranch,d.id),m.debug("in pushCommit "+d.id)},"commit"),yr=l(function(t){let r=t.name;const s=t.order;if(r=C.sanitizeText(r,I()),c.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);c.records.branches.set(r,c.records.head!=null?c.records.head.id:null),c.records.branchConfig.set(r,{name:r,order:s}),z(r),m.debug("in createBranch")},"branch"),ur=l(t=>{let r=t.branch,s=t.id;const n=t.type,e=t.tags,a=I();r=C.sanitizeText(r,a),s&&(s=C.sanitizeText(s,a));const d=c.records.branches.get(c.records.currBranch),o=c.records.branches.get(r),f=d?c.records.commits.get(d):void 0,h=o?c.records.commits.get(o):void 0;if(f&&h&&f.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(c.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(f===void 0||!f){const i=new Error(`Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!c.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(h===void 0||!h){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(f===h){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(s&&c.records.commits.has(s)){const i=new Error('Incorrect usage of "merge". Commit with id:'+s+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${s} ${n} ${e?.join(" ")}`,token:`merge ${r} ${s} ${n} ${e?.join(" ")}`,expected:[`merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`]},i}const $=o||"",g={id:s||`${c.records.seq}-${A()}`,message:`merged branch ${r} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,$],branch:c.records.currBranch,type:x.MERGE,customType:n,customId:!!s,tags:e??[]};c.records.head=g,c.records.commits.set(g.id,g),c.records.branches.set(c.records.currBranch,g.id),m.debug(c.records.branches),m.debug("in mergeBranch")},"merge"),pr=l(function(t){let r=t.id,s=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,s,n);const a=I();if(r=C.sanitizeText(r,a),s=C.sanitizeText(s,a),n=n?.map(f=>C.sanitizeText(f,a)),e=C.sanitizeText(e,a),!r||!c.records.commits.has(r)){const f=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw f.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},f}const d=c.records.commits.get(r);if(d===void 0||!d)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(d.parents)&&d.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=d.branch;if(d.type===x.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!s||!c.records.commits.has(s)){if(o===c.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const f=c.records.branches.get(c.records.currBranch);if(f===void 0||!f){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const h=c.records.commits.get(f);if(h===void 0||!h){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const $={id:c.records.seq+"-"+A(),message:`cherry-picked ${d?.message} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,d.id],branch:c.records.currBranch,type:x.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${d.id}${d.type===x.MERGE?`|parent:${e}`:""}`]};c.records.head=$,c.records.commits.set($.id,$),c.records.branches.set(c.records.currBranch,$.id),m.debug(c.records.branches),m.debug("in cherryPick")}},"cherryPick"),z=l(function(t){if(t=C.sanitizeText(t,I()),c.records.branches.has(t)){c.records.currBranch=t;const r=c.records.branches.get(c.records.currBranch);r===void 0||!r?c.records.head=null:c.records.head=c.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function H(t,r,s){const n=t.indexOf(r);n===-1?t.push(s):t.splice(n,1,s)}l(H,"upsert");function P(t){const r=t.reduce((e,a)=>e.seq>a.seq?e:a,t[0]);let s="";t.forEach(function(e){e===r?s+=" *":s+=" |"});const n=[s,r.id,r.seq];for(const e in c.records.branches)c.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=c.records.commits.get(r.parents[0]);H(t,r,e),r.parents[1]&&t.push(c.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=c.records.commits.get(r.parents[0]);H(t,r,e)}}t=F(t,e=>e.id),P(t)}l(P,"prettyPrintCommitHistory");var xr=l(function(){m.debug(c.records.commits);const t=N()[0];P([t])},"prettyPrint"),mr=l(function(){c.reset(),sr()},"clear"),br=l(function(){return[...c.records.branchConfig.values()].map((r,s)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${s}`)}).sort((r,s)=>(r.order??0)-(s.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),wr=l(function(){return c.records.branches},"getBranches"),vr=l(function(){return c.records.commits},"getCommits"),N=l(function(){const t=[...c.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,s)=>r.seq-s.seq),t},"getCommitsArray"),Cr=l(function(){return c.records.currBranch},"getCurrentBranch"),Er=l(function(){return c.records.direction},"getDirection"),Tr=l(function(){return c.records.head},"getHead"),S={commitType:x,getConfig:I,setDirection:lr,setOptions:$r,getOptions:fr,commit:gr,branch:yr,merge:ur,cherryPick:pr,checkout:z,prettyPrint:xr,clear:mr,getBranchesAsObjArray:br,getBranches:wr,getCommits:vr,getCommitsArray:N,getCurrentBranch:Cr,getDirection:Er,getHead:Tr,setAccTitle:Z,getAccTitle:Q,getAccDescription:J,setAccDescription:X,setDiagramTitle:V,getDiagramTitle:U},Br=l((t,r)=>{Y(t,r),t.dir&&r.setDirection(t.dir);for(const s of t.statements)Lr(s,r)},"populate"),Lr=l((t,r)=>{const n={Commit:l(e=>r.commit(kr(e)),"Commit"),Branch:l(e=>r.branch(Mr(e)),"Branch"),Merge:l(e=>r.merge(Ir(e)),"Merge"),Checkout:l(e=>r.checkout(Rr(e)),"Checkout"),CherryPicking:l(e=>r.cherryPick(Gr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),kr=l(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),Mr=l(t=>({name:t.name,order:t.order??0}),"parseBranch"),Ir=l(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Rr=l(t=>t.branch,"parseCheckout"),Gr=l(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Or={parse:l(async t=>{const r=await dr("gitGraph",t);m.debug(r),Br(r,S)},"parse")},qr=rr(),v=qr?.gitGraph,L=10,k=40,E=4,T=2,M=8,b=new Map,w=new Map,O=30,R=new Map,q=[],B=0,u="LR",Ar=l(()=>{b.clear(),w.clear(),R.clear(),B=0,q=[],u="LR"},"clear"),W=l(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=n.trim(),r.appendChild(e)}),r},"drawText"),j=l(t=>{let r,s,n;return u==="BT"?(s=l((e,a)=>e<=a,"comparisonFunc"),n=1/0):(s=l((e,a)=>e>=a,"comparisonFunc"),n=0),t.forEach(e=>{const a=u==="TB"||u=="BT"?w.get(e)?.y:w.get(e)?.x;a!==void 0&&s(a,n)&&(r=e,n=a)}),r},"findClosestParent"),_r=l(t=>{let r="",s=1/0;return t.forEach(n=>{const e=w.get(n).y;e<=s&&(r=n,s=e)}),r||void 0},"findClosestParentBT"),Hr=l((t,r,s)=>{let n=s,e=s;const a=[];t.forEach(d=>{const o=r.get(d);if(!o)throw new Error(`Commit not found for key ${d}`);o.parents.length?(n=Dr(o),e=Math.max(n,e)):a.push(o),Fr(o,n)}),n=e,a.forEach(d=>{zr(d,n,s)}),t.forEach(d=>{const o=r.get(d);if(o?.parents.length){const f=_r(o.parents);n=w.get(f).y-k,n<=e&&(e=n);const h=b.get(o.branch).pos,$=n-L;w.set(o.id,{x:h,y:$})}})},"setParallelBTPos"),Pr=l(t=>{const r=j(t.parents.filter(n=>n!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const s=w.get(r)?.y;if(s===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return s},"findClosestParentPos"),Dr=l(t=>Pr(t)+k,"calculateCommitPosition"),Fr=l((t,r)=>{const s=b.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const n=s.pos,e=r+L;return w.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),zr=l((t,r,s)=>{const n=b.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+s,a=n.pos;w.set(t.id,{x:a,y:e})},"setRootPosition"),Nr=l((t,r,s,n,e,a)=>{if(a===x.HIGHLIGHT)t.append("rect").attr("x",s.x-10).attr("y",s.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%M} ${n}-outer`),t.append("rect").attr("x",s.x-6).attr("y",s.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%M} ${n}-inner`);else if(a===x.CHERRY_PICK)t.append("circle").attr("cx",s.x).attr("cy",s.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",s.x-3).attr("cy",s.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",s.x+3).attr("cy",s.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",s.x+3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",s.x-3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const d=t.append("circle");if(d.attr("cx",s.x),d.attr("cy",s.y),d.attr("r",r.type===x.MERGE?9:10),d.attr("class",`commit ${r.id} commit${e%M}`),a===x.MERGE){const o=t.append("circle");o.attr("cx",s.x),o.attr("cy",s.y),o.attr("r",6),o.attr("class",`commit ${n} ${r.id} commit${e%M}`)}a===x.REVERSE&&t.append("path").attr("d",`M ${s.x-5},${s.y-5}L${s.x+5},${s.y+5}M${s.x-5},${s.y+5}L${s.x+5},${s.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%M}`)}},"drawCommitBullet"),Sr=l((t,r,s,n)=>{if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&v?.showCommitLabel){const e=t.append("g"),a=e.insert("rect").attr("class","commit-label-bkg"),d=e.append("text").attr("x",n).attr("y",s.y+25).attr("class","commit-label").text(r.id),o=d.node()?.getBBox();if(o&&(a.attr("x",s.posWithOffset-o.width/2-T).attr("y",s.y+13.5).attr("width",o.width+2*T).attr("height",o.height+2*T),u==="TB"||u==="BT"?(a.attr("x",s.x-(o.width+4*E+5)).attr("y",s.y-12),d.attr("x",s.x-(o.width+4*E)).attr("y",s.y+o.height-12)):d.attr("x",s.posWithOffset-o.width/2),v.rotateCommitLabel))if(u==="TB"||u==="BT")d.attr("transform","rotate(-45, "+s.x+", "+s.y+")"),a.attr("transform","rotate(-45, "+s.x+", "+s.y+")");else{const f=-7.5-(o.width+10)/25*9.5,h=10+o.width/25*8.5;e.attr("transform","translate("+f+", "+h+") rotate(-45, "+n+", "+s.y+")")}}},"drawCommitLabel"),Wr=l((t,r,s,n)=>{if(r.tags.length>0){let e=0,a=0,d=0;const o=[];for(const f of r.tags.reverse()){const h=t.insert("polygon"),$=t.append("circle"),g=t.append("text").attr("y",s.y-16-e).attr("class","tag-label").text(f),i=g.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");a=Math.max(a,i.width),d=Math.max(d,i.height),g.attr("x",s.posWithOffset-i.width/2),o.push({tag:g,hole:$,rect:h,yOffset:e}),e+=20}for(const{tag:f,hole:h,rect:$,yOffset:g}of o){const i=d/2,y=s.y-19.2-g;if($.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${n-a/2-E/2},${y+T}
|
|
3
3
|
${n-a/2-E/2},${y-T}
|
|
4
4
|
${s.posWithOffset-a/2-E},${y-i-T}
|
|
@@ -11,7 +11,7 @@ import{p as Y}from"./eM4IBQGT.js";import{I as K}from"./DCBWnvUv.js";import{q as
|
|
|
11
11
|
${s.x+L+a+4},${p-i-2}
|
|
12
12
|
${s.x+L+a+4},${p+i+2}
|
|
13
13
|
${s.x+L},${p+i+2}`).attr("transform","translate(12,12) rotate(45, "+s.x+","+n+")"),h.attr("cx",s.x+E/2).attr("cy",p).attr("transform","translate(12,12) rotate(45, "+s.x+","+n+")"),f.attr("x",s.x+5).attr("y",p+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+n+")")}}}},"drawCommitTags"),jr=l(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Yr=l((t,r,s,n)=>{const e={x:0,y:0};if(t.parents.length>0){const a=j(t.parents);if(a){const d=n.get(a)??e;return r==="TB"?d.y+k:r==="BT"?(n.get(t.id)??e).y-k:d.x+k}}else return r==="TB"?O:r==="BT"?(n.get(t.id)??e).y-k:0;return 0},"calculatePosition"),Kr=l((t,r,s)=>{const n=u==="BT"&&s?r:r+L,e=u==="TB"||u==="BT"?n:b.get(t.branch)?.pos,a=u==="TB"||u==="BT"?b.get(t.branch)?.pos:n;if(a===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:e,posWithOffset:n}},"getCommitPosition"),D=l((t,r,s)=>{if(!v)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let a=u==="TB"||u==="BT"?O:0;const d=[...r.keys()],o=v?.parallelCommits??!1,f=l(($,g)=>{const i=r.get($)?.seq,y=r.get(g)?.seq;return i!==void 0&&y!==void 0?i-y:0},"sortKeys");let h=d.sort(f);u==="BT"&&(o&&Hr(h,r,a),h=h.reverse()),h.forEach($=>{const g=r.get($);if(!g)throw new Error(`Commit not found for key ${$}`);o&&(a=Yr(g,u,a,w));const i=Kr(g,a,o);if(s){const y=jr(g),p=g.customType??g.type,_=b.get(g.branch)?.index??0;Nr(n,g,i,y,_,p),Sr(e,g,i,a),Wr(e,g,i,a)}u==="TB"||u==="BT"?w.set(g.id,{x:i.x,y:i.posWithOffset}):w.set(g.id,{x:i.posWithOffset,y:i.y}),a=u==="BT"&&o?a+k:a+k+L,a>B&&(B=a)})},"drawCommits"),Ur=l((t,r,s,n,e)=>{const d=(u==="TB"||u==="BT"?s.x<n.x:s.y<n.y)?r.branch:t.branch,o=l(h=>h.branch===d,"isOnBranchToGetCurve"),f=l(h=>h.seq>t.seq&&h.seq<r.seq,"isBetweenCommits");return[...e.values()].some(h=>f(h)&&o(h))},"shouldRerouteArrow"),G=l((t,r,s=0)=>{const n=t+Math.abs(t-r)/2;if(s>5)return n;if(q.every(d=>Math.abs(d-n)>=10))return q.push(n),n;const a=Math.abs(t-r);return G(t,r-a/5,s+1)},"findLane"),Vr=l((t,r,s,n)=>{const e=w.get(r.id),a=w.get(s.id);if(e===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${s.id}`);const d=Ur(r,s,e,a,n);let o="",f="",h=0,$=0,g=b.get(s.branch)?.index;s.type===x.MERGE&&r.id!==s.parents[0]&&(g=b.get(r.branch)?.index);let i;if(d){o="A 10 10, 0, 0, 0,",f="A 10 10, 0, 0, 1,",h=10,$=10;const y=e.y<a.y?G(e.y,a.y):G(a.y,e.y),p=e.x<a.x?G(e.x,a.x):G(a.x,e.x);u==="TB"?e.x<a.x?i=`M ${e.x} ${e.y} L ${p-h} ${e.y} ${f} ${p} ${e.y+$} L ${p} ${a.y-h} ${o} ${p+$} ${a.y} L ${a.x} ${a.y}`:(g=b.get(r.branch)?.index,i=`M ${e.x} ${e.y} L ${p+h} ${e.y} ${o} ${p} ${e.y+$} L ${p} ${a.y-h} ${f} ${p-$} ${a.y} L ${a.x} ${a.y}`):u==="BT"?e.x<a.x?i=`M ${e.x} ${e.y} L ${p-h} ${e.y} ${o} ${p} ${e.y-$} L ${p} ${a.y+h} ${f} ${p+$} ${a.y} L ${a.x} ${a.y}`:(g=b.get(r.branch)?.index,i=`M ${e.x} ${e.y} L ${p+h} ${e.y} ${f} ${p} ${e.y-$} L ${p} ${a.y+h} ${o} ${p-$} ${a.y} L ${a.x} ${a.y}`):e.y<a.y?i=`M ${e.x} ${e.y} L ${e.x} ${y-h} ${o} ${e.x+$} ${y} L ${a.x-h} ${y} ${f} ${a.x} ${y+$} L ${a.x} ${a.y}`:(g=b.get(r.branch)?.index,i=`M ${e.x} ${e.y} L ${e.x} ${y+h} ${f} ${e.x+$} ${y} L ${a.x-h} ${y} ${o} ${a.x} ${y-$} L ${a.x} ${a.y}`)}else o="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,u==="TB"?(e.x<a.x&&(s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${e.x} ${a.y-h} ${o} ${e.x+$} ${a.y} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${f} ${a.x} ${e.y+$} L ${a.x} ${a.y}`),e.x>a.x&&(o="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${e.x} ${a.y-h} ${f} ${e.x-$} ${a.y} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${a.x+h} ${e.y} ${o} ${a.x} ${e.y+$} L ${a.x} ${a.y}`),e.x===a.x&&(i=`M ${e.x} ${e.y} L ${a.x} ${a.y}`)):u==="BT"?(e.x<a.x&&(s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${e.x} ${a.y+h} ${f} ${e.x+$} ${a.y} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${o} ${a.x} ${e.y-$} L ${a.x} ${a.y}`),e.x>a.x&&(o="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${e.x} ${a.y+h} ${o} ${e.x-$} ${a.y} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${o} ${a.x} ${e.y-$} L ${a.x} ${a.y}`),e.x===a.x&&(i=`M ${e.x} ${e.y} L ${a.x} ${a.y}`)):(e.y<a.y&&(s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${f} ${a.x} ${e.y+$} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${e.x} ${a.y-h} ${o} ${e.x+$} ${a.y} L ${a.x} ${a.y}`),e.y>a.y&&(s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${o} ${a.x} ${e.y-$} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${e.x} ${a.y+h} ${f} ${e.x+$} ${a.y} L ${a.x} ${a.y}`),e.y===a.y&&(i=`M ${e.x} ${e.y} L ${a.x} ${a.y}`));if(i===void 0)throw new Error("Line definition not found");t.append("path").attr("d",i).attr("class","arrow arrow"+g%M)},"drawArrow"),Xr=l((t,r)=>{const s=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(n=>{const e=r.get(n);e.parents&&e.parents.length>0&&e.parents.forEach(a=>{Vr(s,r.get(a),e,r)})})},"drawArrows"),Jr=l((t,r)=>{const s=t.append("g");r.forEach((n,e)=>{const a=e%M,d=b.get(n.name)?.pos;if(d===void 0)throw new Error(`Position not found for branch ${n.name}`);const o=s.append("line");o.attr("x1",0),o.attr("y1",d),o.attr("x2",B),o.attr("y2",d),o.attr("class","branch branch"+a),u==="TB"?(o.attr("y1",O),o.attr("x1",d),o.attr("y2",B),o.attr("x2",d)):u==="BT"&&(o.attr("y1",B),o.attr("x1",d),o.attr("y2",O),o.attr("x2",d)),q.push(d);const f=n.name,h=W(f),$=s.insert("rect"),i=s.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);i.node().appendChild(h);const y=h.getBBox();$.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-y.width-4-(v?.rotateCommitLabel===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),i.attr("transform","translate("+(-y.width-14-(v?.rotateCommitLabel===!0?30:0))+", "+(d-y.height/2-1)+")"),u==="TB"?($.attr("x",d-y.width/2-10).attr("y",0),i.attr("transform","translate("+(d-y.width/2-5)+", 0)")):u==="BT"?($.attr("x",d-y.width/2-10).attr("y",B),i.attr("transform","translate("+(d-y.width/2-5)+", "+B+")")):$.attr("transform","translate(-19, "+(d-y.height/2)+")")})},"drawBranches"),Qr=l(function(t,r,s,n,e){return b.set(t,{pos:r,index:s}),r+=50+(e?40:0)+(u==="TB"||u==="BT"?n.width/2:0),r},"setBranchPosition"),Zr=l(function(t,r,s,n){if(Ar(),m.debug("in gitgraph renderer",t+`
|
|
14
|
-
`,"id:",r,s),!v)throw new Error("GitGraph config not found");const e=v.rotateCommitLabel??!1,a=n.db;R=a.getCommits();const d=a.getBranchesAsObjArray();u=a.getDirection();const o=
|
|
14
|
+
`,"id:",r,s),!v)throw new Error("GitGraph config not found");const e=v.rotateCommitLabel??!1,a=n.db;R=a.getCommits();const d=a.getBranchesAsObjArray();u=a.getDirection();const o=er(`[id="${r}"]`);let f=0;d.forEach((h,$)=>{const g=W(h.name),i=o.append("g"),y=i.insert("g").attr("class","branchLabel"),p=y.insert("g").attr("class","label branch-label");p.node()?.appendChild(g);const _=g.getBBox();f=Qr(h.name,f,$,_,e),p.remove(),y.remove(),i.remove()}),D(o,R,!1),v.showBranches&&Jr(o,d),Xr(o,R),D(o,R,!0),tr.insertTitle(o,"gitTitleText",v.titleTopMargin??0,a.getDiagramTitle()),ar(void 0,o,v.diagramPadding,v.useMaxWidth)},"draw"),re={draw:Zr},ee=l(t=>`
|
|
15
15
|
.commit-id,
|
|
16
16
|
.commit-msg,
|
|
17
17
|
.branch-label {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as oe}from"./
|
|
1
|
+
import{g as oe}from"./gpkmuIcl.js";import{_ as d,E as rt,d as O,e as he,l as L,y as de,A as ge,c as R,ak as ue,R as pe,S as fe,O as xe,al as j,am as Wt,an as ye,u as $,k as be,ao as we,ap as xt,i as yt,aq as me}from"./DaWfUpsD.js";import{c as Le}from"./CKgPEzpl.js";import{G as Se}from"./DUsPre0P.js";import{c as ke}from"./C8tOkigv.js";import"./C8FO969Z.js";import"./D0ya9d-G.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Nt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Nt,"lex");for(var F,J,H,pt,Q={},st,G,Tt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Nt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+z.showPosition()+`
|
|
3
3
|
Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":ft="Parse error on line "+(I+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(ft,{text:z.match,token:this.terminals_[F]||F,line:z.yylineno,loc:ut,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(H[0]){case 1:f.push(F),E.push(z.yytext),h.push(z.yylloc),f.push(H[1]),F=null,Z=z.yyleng,p=z.yytext,I=z.yylineno,ut=z.yylloc;break;case 2:if(G=this.productions_[H[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},le&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),pt=this.performAction.apply(Q,[p,Z,I,q.yy,H[1],E,h].concat(ne)),typeof pt<"u")return pt;G&&(f=f.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),f.push(this.productions_[H[1]][0]),E.push(Q.$),h.push(Q._$),Tt=W[f[f.length-2]][f[f.length-1]],f.push(Tt);break;case 3:return!0}}return!0},"parse")},B=(function(){var D={EOF:1,parseError:d(function(g,f){if(this.yy.parser)this.yy.parser.parseError(g,f);else throw new Error(g)},"parseError"),setInput:d(function(y,g){return this.yy=g||this.yy||{},this._input=y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var g=y.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},"input"),unput:d(function(y){var g=y.length,f=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),f.length-1&&(this.yylineno-=f.length-1);var E=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:f?(f.length===m.length?this.yylloc.first_column:0)+m[m.length-f.length].length-f[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(y){this.unput(this.match.slice(y))},"less"),pastInput:d(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var y=this.pastInput(),g=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as ln,Y as an,$ as C,a0 as q,a1 as $,a2 as un,a3 as y,a4 as tn,a5 as H,a6 as _,a7 as rn,a8 as o,a9 as
|
|
1
|
+
import{X as ln,Y as an,$ as C,a0 as q,a1 as $,a2 as un,a3 as y,a4 as tn,a5 as H,a6 as _,a7 as rn,a8 as o,a9 as sn,aa as on,ab as fn}from"./DaWfUpsD.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,j,a){var O=I-l,i=D-h,n=j-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function Q(l,h,I,D,v,A,j){var a=l-I,O=h-D,i=(j?A:-A)/H(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,z=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*H(on(0,T*T*R-P*P)),X=(P*g-m*S)/R,Y=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=X-z,e=Y-t,r=w-z,B=p-t;return x*x+e*e>r*r+B*B&&(X=w,Y=p),{cx:X,cy:Y,x01:-n,y01:-d,x11:X*(v/T-1),y11:Y*(v/T-1)}}function hn(){var l=cn,h=yn,I=$(0),D=null,v=gn,A=dn,j=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,z=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(z>tn-y)a.moveTo(s*C(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*C(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=z,S=z,X=j.apply(this,arguments)/2,Y=X>y&&(D?+D.apply(this,arguments):H(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(Y>y){var B=sn(Y/u*q(X)),J=sn(Y/s*q(X));(P-=B*2)>y?(B*=t?1:-1,R+=B,T-=B):(P=0,R=T=(f+c)/2),(S-=J*2)>y?(J*=t?1:-1,m+=J,g-=J):(S=0,m=g=(f+c)/2)}var F=s*C(m),G=s*q(m),K=u*C(T),L=u*q(T);if(w>y){var M=s*C(g),N=s*q(g),U=u*C(R),V=u*q(R),E;if(z<an)if(E=pn(F,G,U,V,M,N,K,L)){var W=F-E[0],Z=G-E[1],b=M-E[0],k=N-E[1],nn=1/q(fn((W*b+Z*k)/(H(W*W+Z*Z)*H(b*b+k*k)))/2),en=H(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=Q(U,V,F,G,s,x,t),r=Q(M,N,K,L,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(F,G),a.arc(0,0,s,m,g,!t)):a.moveTo(F,G),!(u>y)||!(P>y)?a.lineTo(K,L):p>y?(e=Q(K,L,M,N,u,-p,t),r=Q(F,G,U,V,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[C(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:$(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:$(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:$(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:$(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:$(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:$(+n),i):A},i.padAngle=function(n){return arguments.length?(j=typeof n=="function"?n:$(+n),i):j},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{e as $t,d as At,A as Ft,c as Ht,w as V,r as d,g as Rt,C as Q,o as Nt,D as Xt,f as w,j as g,m as ee,k as _t,z as y,q as Je,n as r,E as h,H as xe,I as xt,v as Yt,l as Vt,S as kt,U as bt,y as Zt,p as qt,O as It,T as Ut,P as Wt,M as Mt,N as Gt,R as A,V as Kt,W as Jt,X as Qt}from"./C8FO969Z.js";import{e as el}from"./DvJDa2y1.js";var tl=Object.defineProperty,ll=Object.defineProperties,nl=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,rl=Object.prototype.hasOwnProperty,ol=Object.prototype.propertyIsEnumerable,Ct=($,P,M)=>P in $?tl($,P,{enumerable:!0,configurable:!0,writable:!0,value:M}):$[P]=M,Qe=($,P)=>{for(var M in P||(P={}))rl.call(P,M)&&Ct($,M,P[M]);if(Tt)for(var M of Tt(P))ol.call(P,M)&&Ct($,M,P[M]);return $},D=($,P,M)=>new Promise((ke,o)=>{var ne=F=>{try{j(M.next(F))}catch(re){o(re)}},be=F=>{try{j(M.throw(F))}catch(re){o(re)}},j=F=>F.done?ke(F.value):Promise.resolve(F.value).then(ne,be);j((M=M.apply($,P)).next())});const al={key:0},il={key:1,class:"flex items-center gap-x-2 overflow-hidden"},ul=["src"],sl={key:2},cl={class:"flex items-center gap-x-1"},dl={class:"flex items-center gap-x-1"},vl={key:4},ml={key:5,class:"flex items-center gap-x-1"},fl=["aria-pressed"],hl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},gl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},pl=["disabled"],wl=["disabled"],yl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},xl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},kl={key:1,class:"relative"},bl={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Ml={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Tl={class:"markstream-vue"},Cl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},et=$t(At({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!1}},emits:["copy","export","openModal","toggleMode"],setup($,{emit:P}){var M,ke;const o=$,ne=P,be={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},j=d(!1),F=Q(()=>o.isStrict?"strict":"loose"),re=Q(()=>({startOnLoad:!1,securityLevel:F.value,dompurifyConfig:F.value==="strict"?be:void 0,flowchart:F.value==="strict"?{htmlLabels:!1}:void 0})),Dt=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Bt=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function St(t){if(!t)return"";const e=t.trim();return Bt.test(e)?e:""}function Me(t){if(t)try{t.replaceChildren()}catch{t.innerHTML=""}}function oe(t,e){if(!t)return"";if(F.value==="strict")return(function(l,n){if(!l)return"";try{l.replaceChildren()}catch{l.innerHTML=""}const c=(function(a){if(typeof window>"u"||typeof DOMParser>"u"||!a)return null;const s=a.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),i=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;if(!i||i.nodeName.toLowerCase()!=="svg")return null;const m=i;return(function(v){const p=new Set(["script"]),L=[v,...Array.from(v.querySelectorAll("*"))];for(const C of L){if(p.has(C.tagName.toLowerCase())){C.remove();continue}const Y=Array.from(C.attributes);for(const N of Y){const b=N.name;if(/^on/i.test(b))C.removeAttribute(b);else{if(b==="style"&&N.value){const k=N.value;if(Dt.some(Ye=>Ye.test(k))){C.removeAttribute(b);continue}}if((b==="href"||b==="xlink:href")&&N.value){const k=St(N.value);if(!k){C.removeAttribute(b);continue}k!==N.value&&C.setAttribute(b,k)}}}}})(m),m})(n);return c?(l.appendChild(c),l.innerHTML):""})(t,e);try{t.replaceChildren()}catch{t.innerHTML=""}if(e)try{t.insertAdjacentHTML("afterbegin",e)}catch{t.innerHTML=e}return t.innerHTML}const{t:f}=Ft();function Te(){return D(this,null,function*(){try{const t=yield Qt();return j.value=!!t,t}catch(t){throw j.value=!1,t}})}typeof window<"u"&&D(null,null,function*(){var t;try{const e=yield Te();if(!e)return;(t=e?.initialize)==null||t.call(e,Qe({},re.value))}catch(e){j.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",e)}});const Ce=d(!1),Z=d(!1),q=d(),u=d(),ae=d(),De=d(null),Et=Ht(),me=d(null),ie=d(typeof window>"u"),tt=d(),R=Q(()=>o.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode")),x=d(1),O=d(0),z=d(0),Be=d(!1),Se=d({x:0,y:0}),S=d(!1),Ee=d(!1),W=d(!1),Pe=d(null),je=d(0),Ve=d(!1);let fe=null,he=null,ge=0;const lt=(M=globalThis.requestIdleCallback)!=null?M:(t,e)=>setTimeout(()=>t({didTimeout:!0}),16),ue=(function(){let t=null;return(...e)=>{t&&clearTimeout(t),t=setTimeout(()=>(()=>{lt(()=>{wt()},{timeout:500})})(...e),300)}})();function pe(){he!=null&&(globalThis.clearTimeout(he),he=null)}function nt(t=600){if(typeof globalThis>"u")return;const e=Math.max(0,t);pe(),he=globalThis.setTimeout(()=>{he=null,o.loading||W.value||!ie.value?nt(Math.min(1200,Math.max(300,1.2*e))):ue()},e)}const G=d("360px");let se=null;const B=d(!1),te=d(!1),K=d({}),rt=d(null),we=d(""),Ze=d(0);let H=null;const I=d(!1),le=d({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),ot=Q(()=>o.enableWheelZoom?{wheel:jt}:{}),U=Q(()=>{var t,e,l,n;return{worker:(t=o.workerTimeoutMs)!=null?t:1400,parse:(e=o.parseTimeoutMs)!=null?e:1800,render:(l=o.renderTimeoutMs)!=null?l:2500,fullRender:(n=o.fullRenderTimeoutMs)!=null?n:4e3}}),Pt=(ke=globalThis.cancelIdleCallback)!=null?ke:t=>clearTimeout(t);let ce=null,Oe=null,de=!1,ye=800,X=null,ze=0,qe=!0,Le=0;function $e(t,e){const l=e?.timeoutMs,n=e?.signal;if(n?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let c=null,a=!1,s=null;return new Promise((i,m)=>{const v=()=>{c!=null&&clearTimeout(c),s&&n&&n.removeEventListener("abort",s)};l&&l>0&&(c=globalThis.setTimeout(()=>{a||(a=!0,v(),m(new Error("Operation timed out")))},l)),n&&(s=()=>{a||(a=!0,v(),m(new DOMException("Aborted","AbortError")))},n.addEventListener("abort",s)),t().then(p=>{a||(a=!0,v(),i(p))}).catch(p=>{a||(a=!0,v(),m(p))})})}function at(t){if(typeof document>"u"||!u.value)return;const e=document.createElement("div");e.className="text-red-500 p-4",e.textContent="Failed to render diagram: ";const l=document.createElement("span");l.textContent=t instanceof Error?t.message:"Unknown error",e.appendChild(l),Me(u.value),u.value.appendChild(e),G.value="360px",I.value=!0,_()}function it(t){return!t||t.disabled}function E(t,e,l="top"){if(it(t.currentTarget))return;const n=t,c=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;Mt(t.currentTarget,e,l,!1,c,o.isDark)}function T(){Gt()}function ut(t){if(it(t.currentTarget))return;const e=Ce.value?f("common.copied")||"Copied":f("common.copy")||"Copy",l=t,n=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;Mt(t.currentTarget,e,"top",!1,n,o.isDark)}function st(t,e){const l=`%%{init: {"theme": "${e==="dark"?"dark":"default"}"}}%%
|
|
2
|
+
`;return t.trimStart().startsWith("%%{")?t:l+t}function ct(){return qe&&!S.value&&!B.value&&!I.value}function dt(t){const e=t.split(/\r?\n/);for(;e.length>0;){const l=e[e.length-1].trimEnd();if(l!==""){if(!(/^[-=~>|<\s]+$/.test(l.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(l)||/[-|><]$/.test(l)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(l)))break;e.pop()}else e.pop()}return e.join(`
|
|
3
|
+
`)}function Ae(t,e,l){return D(this,null,function*(){var n;try{return yield Jt(t,e,(n=l?.timeoutMs)!=null?n:U.value.worker)}catch{return yield(function(a,s,i){return D(this,null,function*(){var m,v;const p=yield Te();if(!p)return;const L=p,C=st(a,s);if(typeof L.parse=="function")return yield $e(()=>L.parse(C),{timeoutMs:(m=i?.timeoutMs)!=null?m:U.value.parse,signal:i?.signal}),!0;const Y=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield $e(()=>p.render(Y,C),{timeoutMs:(v=i?.timeoutMs)!=null?v:U.value.render,signal:i?.signal}),!0})})(t,e,l)}})}typeof window<"u"&&V(()=>q.value,t=>{var e;if((e=me.value)==null||e.destroy(),me.value=null,!t)return void(ie.value=!1);const l=Et(t,{rootMargin:"400px"});me.value=l,ie.value=l.isVisible.value,l.whenVisible.then(()=>{ie.value=!0})},{immediate:!0}),Rt(()=>{var t;(t=me.value)==null||t.destroy(),me.value=null});const Fe=Q(()=>S.value||W.value||Z.value);function Ie(t){if(!q.value||!u.value)return;const e=u.value.querySelector("svg");if(!e)return;let l=0,n=0;const c=e.getAttribute("viewBox"),a=e.getAttribute("width"),s=e.getAttribute("height");if(c){const i=c.split(" ");i.length===4&&(l=Number.parseFloat(i[2]),n=Number.parseFloat(i[3]))}if(l&&n||a&&s&&(l=Number.parseFloat(a),n=Number.parseFloat(s)),Number.isNaN(l)||Number.isNaN(n)||l<=0||n<=0)try{const i=e.getBBox();i&&i.width>0&&i.height>0&&(l=i.width,n=i.height)}catch(i){return void console.error("Failed to get SVG BBox:",i)}if(l>0&&n>0){const i=n/l;let m=(t??q.value.clientWidth)*i;m>n&&(m=n),G.value=`${m}px`}}const J=d(!1),Ue=Q(()=>({transform:`translate(${O.value}px, ${z.value}px) scale(${x.value})`}));function vt(t){t.key==="Escape"&&J.value&&We()}function We(){if(J.value=!1,ae.value&&Me(ae.value),De.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",vt)}catch{}}function mt(){x.value<3&&(x.value+=.1)}function ft(){x.value>.5&&(x.value-=.1)}function ht(){x.value=1,O.value=0,z.value=0}function He(t){Be.value=!0,t instanceof MouseEvent?Se.value={x:t.clientX-O.value,y:t.clientY-z.value}:Se.value={x:t.touches[0].clientX-O.value,y:t.touches[0].clientY-z.value}}function Re(t){if(!Be.value)return;let e,l;t instanceof MouseEvent?(e=t.clientX,l=t.clientY):(e=t.touches[0].clientX,l=t.touches[0].clientY),O.value=e-Se.value.x,z.value=l-Se.value.y}function ve(){Be.value=!1}function jt(t){if(o.enableWheelZoom&&(t.ctrlKey||t.metaKey)){if(t.preventDefault(),!q.value)return;const e=q.value.getBoundingClientRect(),l=t.clientX-e.left,n=t.clientY-e.top,c=l-e.width/2,a=n-e.height/2,s=(c-O.value)/x.value,i=(a-z.value)/x.value,m=.01,v=-t.deltaY*m,p=Math.min(Math.max(x.value+v,.5),3);p!==x.value&&(O.value=c-s*p,z.value=a-i*p,x.value=p)}}function Ot(){return D(this,null,function*(){try{const t=R.value,e={payload:{type:"copy",text:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(ne("copy",e),e.defaultPrevented)return;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),Ce.value=!0,setTimeout(()=>{Ce.value=!1},1e3)}catch(t){console.error("Failed to copy:",t)}})}function zt(){var t;const e=(t=u.value)==null?void 0:t.querySelector("svg");if(!e)return void console.error("SVG element not found");const l=new XMLSerializer().serializeToString(e),n={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:l};ne("export",n),n.defaultPrevented||(function(c,a=null){D(this,null,function*(){try{const s=a??new XMLSerializer().serializeToString(c),i=new Blob([s],{type:"image/svg+xml;charset=utf-8"}),m=URL.createObjectURL(i);if(typeof document<"u"){const v=document.createElement("a");v.href=m,v.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(v),v.click(),document.body.removeChild(v)}catch{}URL.revokeObjectURL(m)}}catch(s){console.error("Failed to export SVG:",s)}})})(e,l)}function Lt(){var t,e;const l=(e=(t=u.value)==null?void 0:t.querySelector("svg"))!=null?e:null,n=l?new XMLSerializer().serializeToString(l):null,c={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:l,svgString:n};ne("openModal",c),c.defaultPrevented||(function(){if(J.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",vt)}catch{}A(()=>{if(q.value&&ae.value){const a=q.value.cloneNode(!0);a.classList.add("fullscreen");const s=a.querySelector("[data-mermaid-wrapper]");s&&(De.value=s,s.style.transform=Ue.value.transform),Me(ae.value),ae.value.appendChild(a)}})})()}function gt(t){const e={payload:{type:"toggle-mode",target:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};ne("toggleMode",t,e),e.defaultPrevented||pt(t)}function pt(t){return D(this,null,function*(){const e=tt.value;if(!e)return Ee.value=!0,void(S.value=t==="source");const l=e.getBoundingClientRect().height;e.style.height=`${l}px`,e.style.overflow="hidden",Ee.value=!0,S.value=t==="source",yield A();const n=e.scrollHeight;e.style.transition="height 180ms ease",e.offsetHeight,e.style.height=`${n}px`;const c=()=>{e.style.transition="",e.style.height="",e.style.overflow="",e.removeEventListener("transitionend",a)};function a(){c()}e.addEventListener("transitionend",a),setTimeout(()=>c(),220)})}function Ne(){return D(this,null,function*(){return W.value?Pe.value:u.value||(yield A(),u.value)?(W.value=!0,Pe.value=D(null,null,function*(){var t,e,l;u.value&&(u.value.style.opacity="0");try{const n=yield Te();if(!n)return;const c=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;B.value||te.value||(t=n.initialize)==null||t.call(n,(e=Qe({},re.value),l={dompurifyConfig:Qe({},be)},ll(e,nl(l))));const a=(function(m,v=R.value){const p=v,L=`%%{init: {"theme": "${m==="dark"?"dark":"default"}"}}%%
|
|
4
|
+
`;return p.trim().startsWith("%%{")?p:L+p})(o.isDark?"dark":"light"),s=yield $e(()=>n.render(c,a),{timeoutMs:U.value.fullRender}),i=s?.svg;if(u.value){const m=oe(u.value,i);B.value||te.value||(Ie(),B.value=!0,le.value={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value});const v=o.isDark?"dark":"light";m&&(K.value[v]=m),te.value&&(te.value=!1),I.value=!1,ge=0,pe()}}catch(n){const c=(function(s){const i=typeof s=="string"?s:typeof s?.message=="string"?s.message:"";return typeof i=="string"&&/timed out/i.test(i)})(n),a=ge+1;c&&a<=3?(ge=a,nt(Math.min(1200,600*a))):(ge=0,pe(),console.error("Failed to render mermaid diagram:",n),o.loading===!1&&at(n))}finally{yield A(),u.value&&(u.value.style.opacity="1"),W.value=!1,Pe.value=null}}),Pe.value):void console.warn("Mermaid container not ready")})}function wt(){return D(this,null,function*(){var t,e;const l=Date.now(),n=++Ze.value;H&&H.abort(),H=new AbortController;const c=H.signal,a=o.isDark?"dark":"light",s=R.value,i=s.replace(/\s+/g,"");if(!s.trim())return u.value&&Me(u.value),rt.value=null,we.value="",void(I.value=!1);if(i===we.value)return;try{const v=yield(function(L,C,Y){return D(this,null,function*(){var N;try{if(yield Ae(L,C,Y))return{fullOk:!0,prefixOk:!1}}catch(k){if(k?.name==="AbortError")throw k}let b=dt(L);if(b&&b.trim()&&b!==L)try{try{const k=yield Kt(L,C,(N=Y?.timeoutMs)!=null?N:U.value.worker);k&&k.trim()&&(b=k)}catch{}if(yield Ae(b,C,Y))return{fullOk:!1,prefixOk:!0,prefix:b}}catch(k){if(k?.name==="AbortError")throw k}return{fullOk:!1,prefixOk:!1}})})(s,a,{signal:c,timeoutMs:U.value.worker});if(v.fullOk)return yield Ne(),void(Ze.value===n&&(rt.value=(e=(t=u.value)==null?void 0:t.innerHTML)!=null?e:null,we.value=i,I.value=!1));const p=ze&&l<=ze;if(v.prefixOk&&v.prefix&&ct()&&!p)return void(yield(function(L){return D(this,null,function*(){if(ct()&&(u.value||(yield A(),u.value))&&!W.value){W.value=!0;try{const C=yield Te();if(!C)return;const Y=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,N=o.isDark?"dark":"light",b=dt(L),k=st(b&&b.trim()?b:L,N);u.value&&(u.value.style.opacity="0");const Ye=yield $e(()=>C.render(Y,k),{timeoutMs:U.value.render}),yt=Ye?.svg;u.value&&yt&&(oe(u.value,yt),Ie())}catch{}finally{yield A(),u.value&&(u.value.style.opacity="1"),W.value=!1}}})})(v.prefix))}catch(v){if(v?.name==="AbortError")return}if(Ze.value!==n||I.value)return;const m=K.value[a];m&&u.value&&oe(u.value,m)})}function _(){de&&(de=!1,ye=800,qe=!1,X&&(X.abort(),X=null),ce&&(globalThis.clearTimeout(ce),ce=null),Oe&&(Pt(Oe),Oe=null),ze=Date.now())}function Xe(){if(_(),H){try{H.abort()}catch{}H=null}if(X){try{X.abort()}catch{}X=null}pe(),ge=0}function Ge(t=800){de&&(Le>=12?_():(ce&&globalThis.clearTimeout(ce),ce=globalThis.setTimeout(()=>{Oe=lt(()=>D(null,null,function*(){if(!de)return;if(S.value||B.value)return void _();const e=o.isDark?"dark":"light",l=R.value;if(!l.trim())return o.loading===!1?void _():void Ge(ye);if(Le++,Le>12)_();else{X&&X.abort(),X=new AbortController;try{if((yield Ae(l,e,{signal:X.signal,timeoutMs:U.value.worker}))&&(yield Ne(),B.value))return void _()}catch{}ye=Math.min(Math.floor(1.5*ye),4e3),Ge(ye)}}),{timeout:500})},t)))}function Ke(){de||S.value||B.value||(de=!0,ze=0,qe=!0,Le=0,Ge(500))}V(Ue,t=>{J.value&&De.value&&(De.value.style.transform=t.transform)},{immediate:!0}),V(()=>R.value,()=>{B.value=!1,K.value={},ue(),!S.value&&j.value&&Ke(),(function(){if(!S.value||!j.value)return;const t=R.value.length;t!==je.value&&(Ve.value=!0,je.value=t,fe&&clearTimeout(fe),fe=setTimeout(()=>{Ve.value&&S.value&&R.value.trim()&&(Ve.value=!1,pt("preview"))},500))})()}),V(()=>o.isDark,()=>D(null,null,function*(){if(!B.value||I.value)return;const t=o.isDark?"dark":"light",e=K.value[t];if(e)return void(u.value&&oe(u.value,e));const l={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value},n=x.value!==1||O.value!==0||z.value!==0;te.value=!0,n&&(x.value=1,O.value=0,z.value=0,yield A()),yield Ne(),n&&(yield A(),x.value=l.zoom,O.value=l.translateX,z.value=l.translateY,G.value=l.containerHeight,le.value=l)})),V(()=>S.value,t=>D(null,null,function*(){if(t)_(),B.value&&(le.value={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value});else{if(I.value)return;const e=o.isDark?"dark":"light";if(B.value&&K.value[e])return yield A(),u.value&&oe(u.value,K.value[e]),x.value=le.value.zoom,O.value=le.value.translateX,z.value=le.value.translateY,void(G.value=le.value.containerHeight);if(yield A(),!j.value)return;yield wt(),Ke()}})),V(()=>o.loading,(t,e)=>D(null,null,function*(){if(e===!0&&t===!1){const l=R.value.trim();if(!l)return Xe();const n=o.isDark?"dark":"light",c=l.replace(/\s+/g,"");if(B.value&&c===we.value)return yield A(),u.value&&!u.value.querySelector("svg")&&K.value[n]&&oe(u.value,K.value[n]),void Xe();try{yield Ae(l,n,{timeoutMs:U.value.worker}),yield Ne(),we.value=c,I.value=!1,Xe()}catch(a){Xe(),at(a)}}})),V(q,t=>{se&&se.disconnect(),!t||B.value||te.value||(se=new ResizeObserver(e=>{e&&e.length>0&&!B.value&&!te.value&&el(()=>{Ie(e[0].contentRect.width)})}),se.observe(t))},{immediate:!0}),Nt(()=>D(null,null,function*(){yield A(),Ee.value||(S.value=!j.value),ie.value&&(ue(),je.value=R.value.length)})),V(()=>j.value,t=>{Ee.value||(S.value=!t)}),V(()=>ie.value,t=>{t&&(B.value||(ue(),je.value=R.value.length),o.loading||B.value||ue())},{immediate:!1}),Xt(()=>{fe&&clearTimeout(fe),se&&se.disconnect(),H&&(H.abort(),H=null),_(),pe()}),V(()=>Z.value,t=>D(null,null,function*(){t?(_(),H&&H.abort()):B.value||(yield A(),ue(),S.value||Ke())}),{immediate:!1});const _e=Q(()=>o.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return(t,e)=>(g(),w("div",{class:y(["my-4 rounded-lg border overflow-hidden shadow-sm",[o.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":o.loading}]])},[o.showHeader?(g(),w("div",{key:0,class:y(["mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",o.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"])},[t.$slots["header-left"]?(g(),w("div",al,[Je(t.$slots,"header-left",{},void 0,!0)])):(g(),w("div",il,[r("img",{src:h("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cpath%20fill='none'%20stroke='%23ca9ee6'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M1.5%202.5c0%206%202.25%205.75%204%207%20.83.67%201.17%202%201%204h3c-.17-2%20.17-3.33%201-4%201.75-1.25%204-1%204-7C12%202.5%2010%203%208%207%206%203%204%202.5%201.5%202.5'%20/%3e%3c/svg%3e"),class:"w-4 h-4 my-0",alt:"Mermaid"},null,8,ul),r("span",{class:y(["text-sm font-medium font-mono truncate",o.isDark?"text-gray-400":"text-gray-600"])},"Mermaid",2)])),t.$slots["header-center"]?(g(),w("div",sl,[Je(t.$slots,"header-center",{},void 0,!0)])):o.showModeToggle&&j.value?(g(),w("div",{key:3,class:y(["flex items-center gap-x-1 rounded-md p-0.5",o.isDark?"bg-gray-700":"bg-gray-100"])},[r("button",{class:y(["px-2.5 py-1 text-xs rounded transition-colors",[S.value?o.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":o.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"]]),onClick:e[0]||(e[0]=()=>gt("preview")),onMouseenter:e[1]||(e[1]=l=>E(l,h(f)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=l=>E(l,h(f)("common.preview")||"Preview")),onMouseleave:T,onBlur:T},[r("div",cl,[e[21]||(e[21]=r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),r("circle",{cx:"12",cy:"12",r:"3"})])],-1)),r("span",null,xe(h(f)("common.preview")||"Preview"),1)])],34),r("button",{class:y(["px-2.5 py-1 text-xs rounded transition-colors",[S.value?o.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":o.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"]]),onClick:e[3]||(e[3]=()=>gt("source")),onMouseenter:e[4]||(e[4]=l=>E(l,h(f)("common.source")||"Source")),onFocus:e[5]||(e[5]=l=>E(l,h(f)("common.source")||"Source")),onMouseleave:T,onBlur:T},[r("div",dl,[e[22]||(e[22]=r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),r("span",null,xe(h(f)("common.source")||"Source"),1)])],34)],2)):ee("",!0),t.$slots["header-right"]?(g(),w("div",vl,[Je(t.$slots,"header-right",{},void 0,!0)])):(g(),w("div",ml,[o.showCollapseButton?(g(),w("button",{key:0,class:y(_e.value),"aria-pressed":Z.value,onClick:e[6]||(e[6]=l=>Z.value=!Z.value),onMouseenter:e[7]||(e[7]=l=>E(l,Z.value?h(f)("common.expand")||"Expand":h(f)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=l=>E(l,Z.value?h(f)("common.expand")||"Expand":h(f)("common.collapse")||"Collapse")),onMouseleave:T,onBlur:T},[(g(),w("svg",{style:xt({rotate:Z.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...e[23]||(e[23]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],42,fl)):ee("",!0),o.showCopyButton?(g(),w("button",{key:1,class:y(_e.value),onClick:Ot,onMouseenter:e[9]||(e[9]=l=>ut(l)),onFocus:e[10]||(e[10]=l=>ut(l)),onMouseleave:T,onBlur:T},[Ce.value?(g(),w("svg",gl,[...e[25]||(e[25]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(g(),w("svg",hl,[...e[24]||(e[24]=[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),r("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],34)):ee("",!0),o.showExportButton&&j.value?(g(),w("button",{key:2,class:y(`${_e.value} ${Fe.value?"opacity-50 cursor-not-allowed":""}`),disabled:Fe.value,onClick:zt,onMouseenter:e[11]||(e[11]=l=>E(l,h(f)("common.export")||"Export")),onFocus:e[12]||(e[12]=l=>E(l,h(f)("common.export")||"Export")),onMouseleave:T,onBlur:T},[...e[26]||(e[26]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,pl)):ee("",!0),o.showFullscreenButton&&j.value?(g(),w("button",{key:3,class:y(`${_e.value} ${Fe.value?"opacity-50 cursor-not-allowed":""}`),disabled:Fe.value,onClick:Lt,onMouseenter:e[13]||(e[13]=l=>E(l,J.value?h(f)("common.minimize")||"Minimize":h(f)("common.open")||"Open")),onFocus:e[14]||(e[14]=l=>E(l,J.value?h(f)("common.minimize")||"Minimize":h(f)("common.open")||"Open")),onMouseleave:T,onBlur:T},[J.value?(g(),w("svg",xl,[...e[28]||(e[28]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(g(),w("svg",yl,[...e[27]||(e[27]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,wl)):ee("",!0)]))],2)):ee("",!0),_t(r("div",{ref_key:"modeContainerRef",ref:tt},[S.value?(g(),w("div",{key:0,class:y(["p-4",o.isDark?"bg-gray-900":"bg-gray-50"])},[r("pre",{class:y(["text-sm font-mono whitespace-pre-wrap",o.isDark?"text-gray-300":"text-gray-700"])},xe(R.value),3)],2)):(g(),w("div",kl,[o.showZoomControls?(g(),w("div",bl,[r("div",Ml,[r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:mt,onMouseenter:e[15]||(e[15]=l=>E(l,h(f)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=l=>E(l,h(f)("common.zoomIn")||"Zoom in")),onMouseleave:T,onBlur:T},[...e[29]||(e[29]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],34),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ft,onMouseenter:e[17]||(e[17]=l=>E(l,h(f)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=l=>E(l,h(f)("common.zoomOut")||"Zoom out")),onMouseleave:T,onBlur:T},[...e[30]||(e[30]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],34),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ht,onMouseenter:e[19]||(e[19]=l=>E(l,h(f)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=l=>E(l,h(f)("common.resetZoom")||"Reset zoom")),onMouseleave:T,onBlur:T},xe(Math.round(100*x.value))+"% ",35)])])):ee("",!0),r("div",kt({ref_key:"mermaidContainer",ref:q,class:["min-h-[360px] relative transition-all duration-100 overflow-hidden block",o.isDark?"bg-gray-900":"bg-gray-50"],style:{height:G.value}},bt(ot.value),{onMousedown:He,onMousemove:Re,onMouseup:ve,onMouseleave:ve,onTouchstartPassive:He,onTouchmovePassive:Re,onTouchendPassive:ve}),[r("div",{"data-mermaid-wrapper":"",class:y(["absolute inset-0 cursor-grab",{"cursor-grabbing":Be.value}]),style:xt(Ue.value)},[r("div",{ref_key:"mermaidContent",ref:u,class:"_mermaid w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],16),(g(),Vt(Wt,{to:"body"},[r("div",Tl,[Zt(Ut,{name:"mermaid-dialog",appear:""},{default:qt(()=>[J.value?(g(),w("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:It(We,["self"])},[r("div",{class:y(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",o.isDark?"bg-gray-900":"bg-white"])},[r("div",Cl,[r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:mt},[...e[31]||(e[31]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],2),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ft},[...e[32]||(e[32]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],2),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ht},xe(Math.round(100*x.value))+"% ",3),r("button",{class:y(["inline-flex items-center justify-center p-2 rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:We},[...e[33]||(e[33]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])],2)]),r("div",kt({ref_key:"modalContent",ref:ae,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},bt(ot.value,!0),{onMousedown:He,onMousemove:Re,onMouseup:ve,onMouseleave:ve,onTouchstartPassive:He,onTouchmovePassive:Re,onTouchendPassive:ve}),null,16)],2)])):ee("",!0)]),_:1})])]))]))],512),[[Yt,!Z.value]])],2))}}),[["__scopeId","data-v-2ff46cc8"]]);et.install=$=>{$.component(et.__name,et)};export{et as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as b,D as m,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,E as z,F as A,y as W}from"./
|
|
1
|
+
import{_ as b,D as m,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,E as z,F as A,y as W}from"./DaWfUpsD.js";import{p as _}from"./_mPeMGlT.js";import{p as N}from"./DXsty2qm.js";import"./C8FO969Z.js";import"./DlL1-BJh.js";import"./D0ya9d-G.js";var L=A.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=m({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{_(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[p,s]=H({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(t.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(o)},"populate"),H=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},I=b((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewbox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(o+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:e}={})=>{const t=m(q,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|