agent-tower 0.5.3-beta.0 → 0.5.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/agent-icons/claude-code.svg +1 -0
- package/dist/web/agent-icons/codex.svg +1 -0
- package/dist/web/agent-icons/cursor-agent.svg +1 -0
- package/dist/web/agent-icons/gemini-cli.svg +1 -0
- package/dist/web/assets/AgentDemoPage-Cc1sKLmE.js +1 -0
- package/dist/web/assets/AgentLogo-DQId6FqS.js +1 -0
- package/dist/web/assets/{ConversationPage-Cyiw8Hra.js → ConversationPage-BXDIbwTR.js} +2 -2
- package/dist/web/assets/CreateTaskInput-CDynnXvO.js +2 -0
- package/dist/web/assets/{DemoPage-SywVXjL0.js → DemoPage-BeL28u5_.js} +2 -2
- package/dist/web/assets/{GeneralSettingsPage-CTymytF6.js → GeneralSettingsPage-CFc1CWWl.js} +1 -1
- package/dist/web/assets/{Icons-DmLVnVdg.js → Icons-EVcY239B.js} +1 -1
- package/dist/web/assets/LoadingPreviewPage-CRwEvHz_.js +1 -0
- package/dist/web/assets/{McpSettingsPage-DyolUN8C.js → McpSettingsPage-BujDKp8T.js} +1 -1
- package/dist/web/assets/{MemberAvatar-u6jTOiDY.js → MemberAvatar-Bvlu6rk3.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-BBop2Bu4.js → NotificationSettingsPage-Dsn-5Uft.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-Bw-eI0cF.js → ProfileSettingsPage-CuhQBP_t.js} +1 -1
- package/dist/web/assets/{ProjectKanbanPage-BFf2FZVz.js → ProjectKanbanPage-DiEo6BK_.js} +34 -34
- package/dist/web/assets/{ProjectSettingsPage-BJ4sOhMl.js → ProjectSettingsPage-Cj46vZYF.js} +1 -1
- package/dist/web/assets/ProviderSettingsPage-G7pPagR6.js +54 -0
- package/dist/web/assets/{SettingsMasterDetail-CdimTj5n.js → SettingsMasterDetail-_vE8P7ke.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-CqQTc5AI.js → TeamSettingsPage-CC_QgVbE.js} +1 -1
- package/dist/web/assets/arc-DWusz5nt.js +1 -0
- package/dist/web/assets/architectureDiagram-3BPJPVTR-BzUiKOFe.js +36 -0
- package/dist/web/assets/{arrow-left-B6KMicbE.js → arrow-left-C_pxdzZL.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-6_0hov2h.js → blockDiagram-GPEHLZMM-BGx2sLYW.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-Br6Tzu3R.js → c4Diagram-AAUBKEIU-BCihVD7R.js} +1 -1
- package/dist/web/assets/channel-BBvaRDfe.js +1 -0
- package/dist/web/assets/check-C7Na6M49.js +1 -0
- package/dist/web/assets/{chevron-down-Cur5jANy.js → chevron-down-DuZqUX3d.js} +1 -1
- package/dist/web/assets/{chevron-right-R3KVa8oQ.js → chevron-right-BTjA7BSq.js} +1 -1
- package/dist/web/assets/{chevron-up-DcLdFanO.js → chevron-up-BeZXjQ4W.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-D8zyttB-.js → chunk-2J33WTMH-BVhYZ0vK.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-Cqi9xJ8M.js → chunk-4BX2VUAB-amtolJb4.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-Dxjaitf1.js → chunk-55IACEB6-Bi5q9Evi.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-CAn8Y9XB.js → chunk-727SXJPM-Bb_qV3PR.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-B4sECH9U.js → chunk-AQP2D5EJ-BhFBU2pH.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-Ckd3e1dg.js → chunk-FMBD7UC4-CbBz10YF.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-h5WBT7BK.js → chunk-ND2GUHAM-B930BNNl.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-Cdzk46MK.js → chunk-QZHKN3VN-YlRfC0oD.js} +1 -1
- package/dist/web/assets/{circle-alert-OKyZ9U2p.js → circle-alert-DCm2E91k.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-XuAtffBc.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-XuAtffBc.js +1 -0
- package/dist/web/assets/code-block-OCS4YCEC-ImXQka3_.js +2 -0
- package/dist/web/assets/{confirm-dialog-BAnxa2C9.js → confirm-dialog-Cc27tq8j.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-CbFey2pd.js → cose-bilkent-S5V4N54A-Di3PzbLp.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-Bd2eIyf3.js → dagre-BM42HDAG-DD7qiU9m.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-CXONvVnW.js → diagram-2AECGRRQ-Bgr-CjRi.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-B2E90mVs.js → diagram-5GNKFQAL-CvRORhH2.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-ByaC99pb.js → diagram-KO2AKTUF-CkVyLyvM.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-DwVBF2fn.js → diagram-LMA3HP47-B-CPQQuU.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-FWRddceo.js → diagram-OG6HWLK6-DXow9CgH.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-ye6i3SGj.js → erDiagram-TEJ5UH35-BPLJJwjL.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-B6l7qTcg.js → flowDiagram-I6XJVG4X-ggyugmK6.js} +1 -1
- package/dist/web/assets/{folder-B0m3OL2U.js → folder-B35uD7uF.js} +1 -1
- package/dist/web/assets/{folder-picker-D5XrSfLA.js → folder-picker-DFxfUtH5.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-BCCqDrep.js → ganttDiagram-6RSMTGT7-317n6mcW.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-Ca4ANaSw.js → gitGraphDiagram-PVQCEYII-DTUyiJew.js} +1 -1
- package/dist/web/assets/{index-C9hQg1KT.js → index-BwKL3rKp.js} +5 -5
- package/dist/web/assets/index-DgO-2xBV.css +1 -0
- package/dist/web/assets/{index-DbO4YyUv.js → index-OY1TIdAK.js} +116 -9
- package/dist/web/assets/{infoDiagram-5YYISTIA-D1V1Tezr.js → infoDiagram-5YYISTIA-1GXYdkvW.js} +1 -1
- package/dist/web/assets/{input-Dqnd4oTj.js → input-6lLP89Y3.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DnGiJn9p.js → ishikawaDiagram-YF4QCWOH-DSGxwLxL.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-QFxbLfhN.js → journeyDiagram-JHISSGLW-Bk9wMzSo.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-BA2nBc7B.js → kanban-definition-UN3LZRKU-BW3QAONh.js} +4 -4
- package/dist/web/assets/{layers-CfFYGUtI.js → layers-CDcLPjE5.js} +1 -1
- package/dist/web/assets/{linear-DpASQZmA.js → linear-DTyT0tZy.js} +1 -1
- package/dist/web/assets/{loader-circle-B5Lfi46Y.js → loader-circle-DDrZegLO.js} +1 -1
- package/dist/web/assets/mermaid-NOHMQCX5-CeIvIbfU.js +122 -0
- package/dist/web/assets/{message-square-CEefL0sf.js → message-square-CunpcgQi.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-C7QuD-ms.js → mindmap-definition-RKZ34NQL-CMuh1LCP.js} +2 -2
- package/dist/web/assets/{modal-CAB_bs-c.js → modal-D8uSzIAd.js} +1 -1
- package/dist/web/assets/{pencil-B__GQn9r.js → pencil-BTaYfjKo.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-Bf5diCKb.js → pieDiagram-4H26LBE5-8PB3-bCK.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-BMbcPnH3.js → quadrantDiagram-W4KKPZXB-Dpf14KEr.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-CUPvJXMk.js → requirementDiagram-4Y6WPE33-ClTLx63o.js} +1 -1
- package/dist/web/assets/{rotate-ccw-5d-eMwsw.js → rotate-ccw-bVmcWqcA.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-C77g6vmK.js → sankeyDiagram-5OEKKPKP-ChlGi0jn.js} +1 -1
- package/dist/web/assets/select-tNVeGe-v.js +1 -0
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-xGOV8CdQ.js → sequenceDiagram-3UESZ5HK-6tJ810tk.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-Bc0piegy.js → stateDiagram-AJRCARHV-Cc5dwA5r.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-EVHRu9u3.js +1 -0
- package/dist/web/assets/{switch-bLlDOWNp.js → switch-7jE2n-KP.js} +1 -1
- package/dist/web/assets/{terminal-Bh2qSv0U.js → terminal-D5iU4zAj.js} +1 -1
- package/dist/web/assets/{textarea-BcVRpxhF.js → textarea-DVa2Yvj4.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-CcACRt_V.js → timeline-definition-PNZ67QCA-q32Hcn4m.js} +3 -3
- package/dist/web/assets/{trash-2-8Pu6lwnW.js → trash-2-z7TLHqpU.js} +1 -1
- package/dist/web/assets/{upload-DNwyW_bv.js → upload-DeI535ZH.js} +1 -1
- package/dist/web/assets/{use-profiles-BIqkQu69.js → use-profiles-BS_Mkp5d.js} +1 -1
- package/dist/web/assets/{use-providers-BOyY0DcV.js → use-providers-CWfLQ--R.js} +1 -1
- package/dist/web/assets/useNormalizedLogs-DW37m6Ji.js +1 -0
- package/dist/web/assets/{vennDiagram-CIIHVFJN-BC9RHBQ5.js → vennDiagram-CIIHVFJN-VxBXMI4P.js} +5 -5
- package/dist/web/assets/{wardley-L42UT6IY-BgPj73Dc.js → wardley-L42UT6IY-BvNOQGfh.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-PbfDUndy.js → wardleyDiagram-YWT4CUSO-DMTZkLB4.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-D87KYJUM.js → xychartDiagram-2RQKCTM6-BaJ2kymJ.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/AgentDemoPage-CUgqAjq9.js +0 -1
- package/dist/web/assets/CreateTaskInput-BILlpv9b.js +0 -2
- package/dist/web/assets/ProviderSettingsPage-BlLaN0i2.js +0 -54
- package/dist/web/assets/arc-Ddp5hhH6.js +0 -1
- package/dist/web/assets/architectureDiagram-3BPJPVTR-CpK7WDLU.js +0 -36
- package/dist/web/assets/channel-Bg_GO2e9.js +0 -1
- package/dist/web/assets/check-D9lM__p8.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-BeJctdRx.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BeJctdRx.js +0 -1
- package/dist/web/assets/code-block-OCS4YCEC-VMJOsrkF.js +0 -2
- package/dist/web/assets/index-C4twOgZR.css +0 -1
- package/dist/web/assets/log-adapter-CjgRCCYG.js +0 -1
- package/dist/web/assets/mermaid-NOHMQCX5-7FmPQynq.js +0 -122
- package/dist/web/assets/select-BJfNuuIV.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CiRT9t6d.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{_ as o,D as pt,
|
|
1
|
+
import{_ as o,D as pt,ac as Ct,ad as Rt,ae as Wt,c as gt,l as E,I as Pt,N as Bt,af as ft,d as X,C as Vt,ag as Ft,z as zt}from"./index-BwKL3rKp.js";import{d as ot}from"./arc-DWusz5nt.js";import"./index-OY1TIdAK.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,C=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var U=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,R={},G,B,Z,j;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";j=[];for(G in S[$])this.terminals_[G]&&G>W&&j.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
|
-
Expecting `+j.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,C=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],R.$=x[x.length-B],R._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},
|
|
3
|
+
Expecting `+j.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,C=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],R.$=x[x.length-B],R._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},U&&(R._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(R,[v,C,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(R.$),u.push(R._$),Z=S[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||this.yy||{},this._input=s,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:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=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),l.length-1&&(this.yylineno-=l.length-1);var x=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
5
|
`+d+"^"},"showPosition"),test_match:o(function(s,d){var l,p,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var u in x)this[u]=x[u];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,d,l,p;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),u=0;u<x.length;u++)if(l=this._input.match(this.rules[x[u]]),l&&(!d||l[0].length>d[0].length)){if(d=l,p=u,this.options.backtrack_lexer){if(s=this.test_match(l,x[u]),s!==!1)return s;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(s=this.test_match(d,x[p]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var d=this.next();return d||this.lex()},"lex"),begin:o(function(d){this.conditionStack.push(d)},"begin"),popState:o(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:o(function(d){this.begin(d)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(d,l,p,x){switch(p){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return k})();g.lexer=m;function y(){this.yy={}}return o(y,"Parser"),y.prototype=g,g.Parser=y,new y})();tt.parser=tt;var Ot=tt,yt={};Vt(yt,{addEvent:()=>Tt,addSection:()=>_t,addTask:()=>Et,addTaskOrg:()=>$t,clear:()=>kt,default:()=>Gt,getCommonDb:()=>xt,getDirection:()=>bt,getSections:()=>wt,getTasks:()=>St,setDirection:()=>vt});var D="",mt=0,nt="LR",rt=[],q=[],X=[],xt=o(()=>Ft,"getCommonDb"),kt=o(function(){rt.length=0,q.length=0,D="",X.length=0,nt="LR",zt()},"clear"),vt=o(function(e){nt=e},"setDirection"),bt=o(function(){return nt},"getDirection"),_t=o(function(e){D=e,rt.push(e)},"addSection"),wt=o(function(){return rt},"getSections"),St=o(function(){let e=ct();const t=100;let n=0;for(;!e&&n<t;)e=ct(),n++;return q.push(...X),q},"getTasks"),Et=o(function(e,t,n){const i={id:mt++,section:D,type:D,task:e,score:t||0,events:n?[n]:[]};X.push(i)},"addTask"),Tt=o(function(e){X.find(n=>n.id===mt-1).events.push(e)},"addEvent"),$t=o(function(e){const t={section:D,type:D,description:e,task:e,classes:[]};q.push(t)},"addTaskOrg"),ct=o(function(){const e=o(function(n){return X[n].processed},"compileTask");let t=!0;for(const[n,i]of X.entries())e(n),t=t&&i.processed;return t},"compileTasks"),Gt={clear:kt,getCommonDb:xt,getDirection:bt,setDirection:vt,addSection:_t,getSections:wt,getTasks:St,addTask:Et,addTaskOrg:$t,addEvent:Tt},Nt=0,J=o(function(e,t){const n=e.append("rect");return n.attr("x",t.x),n.attr("y",t.y),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("width",t.width),n.attr("height",t.height),n.attr("rx",t.rx),n.attr("ry",t.ry),t.class!==void 0&&n.attr("class",t.class),n},"drawRect"),Dt=o(function(e,t){const i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(f){const g=ot().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}o(h,"smile");function c(f){const g=ot().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}o(c,"sad");function a(f){f.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return o(a,"ambivalent"),t.score>3?h(r):t.score<3?c(r):a(r),i},"drawFace"),Xt=o(function(e,t){const n=e.append("circle");return n.attr("cx",t.cx),n.attr("cy",t.cy),n.attr("class","actor-"+t.pos),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("r",t.r),n.class!==void 0&&n.attr("class",n.class),t.title!==void 0&&n.append("title").text(t.title),n},"drawCircle"),It=o(function(e,t){const n=t.text.replace(/<br\s*\/?>/gi," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0&&i.attr("class",t.class);const r=i.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(n),i},"drawText"),Kt=o(function(e,t){function n(r,h,c,a,f){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+a-f)+" "+(r+c-f*1.2)+","+(h+a)+" "+r+","+(h+a)}o(n,"genPoints");const i=e.append("polygon");i.attr("points",n(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,It(e,t)},"drawLabel"),Ut=o(function(e,t,n){const i=e.append("g"),r=st();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,J(i,r),Ht(n)(t.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},n,t.colour)},"drawSection"),et=-1,Zt=o(function(e,t,n,i){const r=t.x+n.width/2,h=e.append("g");et++,h.append("line").attr("id",i+"-task"+et).attr("x1",r).attr("y1",t.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Dt(h,{cx:r,cy:300+(5-t.score)*30,score:t.score});const a=st();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+t.num,a.rx=3,a.ry=3,J(h,a),Ht(n)(t.task,h,a.x,a.y,a.width,a.height,{class:"task"},n,t.colour)},"drawTask"),jt=o(function(e,t){J(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),qt=o(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),st=o(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ht=(function(){function e(r,h,c,a,f,g,m,y){const k=h.append("text").attr("x",c+f/2).attr("y",a+g/2+5).style("font-color",y).style("text-anchor","middle").text(r);i(k,m)}o(e,"byText");function t(r,h,c,a,f,g,m,y,k){const{taskFontSize:s,taskFontFamily:d}=y,l=r.split(/<br\s*\/?>/gi);for(let p=0;p<l.length;p++){const x=p*s-s*(l.length-1)/2,u=h.append("text").attr("x",c+f/2).attr("y",a).attr("fill",k).style("text-anchor","middle").style("font-size",s).style("font-family",d);u.append("tspan").attr("x",c+f/2).attr("dy",x).text(l[p]),u.attr("y",a+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(u,m)}}o(t,"byTspan");function n(r,h,c,a,f,g,m,y){const k=h.append("switch"),d=k.append("foreignObject").attr("x",c).attr("y",a).attr("width",f).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,k,c,a,f,g,m,y),i(d,m)}o(n,"byFo");function i(r,h){for(const c in h)c in h&&r.attr(c,h[c])}return o(i,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?n:r.textPlacement==="old"?e:t}})(),Jt=o(function(e,t){Nt=0,et=-1,e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function it(e,t){e.each(function(){var n=U(this),i=n.text().split(/(\s+|<br>)/).reverse(),r,h=[],c=1.1,a=n.attr("y"),f=parseFloat(n.attr("dy")),g=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",f+"em");for(let m=0;m<i.length;m++)r=i[i.length-1-m],h.push(r),g.text(h.join(" ").trim()),(g.node().getComputedTextLength()>t||r==="<br>")&&(h.pop(),g.text(h.join(" ").trim()),r==="<br>"?h=[""]:h=[r],g=n.append("tspan").attr("x",0).attr("y",a).attr("dy",c+"em").text(r))})}o(it,"wrap");var Qt=o(function(e,t,n,i,r,h=!1){const{theme:c,look:a}=i,f=c?.includes("redux"),g=i?.themeVariables?.THEME_COLOR_LIMIT??12,m=n%g-1,y=e.append("g");t.section=m,y.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+m));const k=y.append("g"),s=y.append("g"),l=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),p=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(t.height=l.height+p*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,s.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),f&&s.attr("transform",`translate(${t.width/2}, ${h?t.padding/2+3:t.padding})`),te(k,t,m,r,i),a==="neo"&&(y.attr("data-look","neo"),f)){const x=c.includes("dark"),u=e.node()?.ownerSVGElement??e.node(),S=U(u),v=S.attr("id")??"",I=v?`${v}-drop-shadow`:"drop-shadow";if(S.select(`#${I}`).empty()){const C=S.select("defs");(C.empty()?S.append("defs"):C).append("filter").attr("id",I).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",x?"0.2":"0.06").attr("flood-color",x?"#FFFFFF":"#000000")}}return t},"drawNode"),Yt=o(function(e,t,n){const i=e.append("g"),h=i.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),c=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),te=o(function(e,t,n,i,r){const{theme:h}=r,c=h?.includes("redux")?0:5,a=5,f=c>0?`M0 ${t.height-a} v${-t.height+2*a} q0,-${c},${c},-${c} h${t.width-2*a} q${c},0,${c},${c} v${t.height-a} H0 Z`:`M0 ${t.height-a} v${-(t.height-a)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+Nt++).attr("class","node-bkg node-"+t.type).attr("d",f),h?.includes("redux")||e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),M={drawRect:J,drawCircle:Xt,drawSection:Ut,drawText:It,drawLabel:Kt,drawTask:Zt,drawBackgroundRect:jt,getTextObj:qt,getNoteRect:st,initGraphics:Jt,drawNode:Qt,getVirtualNodeHeight:Yt},ee=o(function(e,t,n,i){const r=gt(),{look:h,theme:c,themeVariables:a}=r,{useGradient:f,gradientStart:g,gradientStop:m}=a,y=r.timeline?.leftMargin??50;E.debug("timeline",i.db);const k=r.securityLevel;let s;k==="sandbox"&&(s=U("#i"+t));const l=(k==="sandbox"?U(s.nodes()[0].contentDocument.body):U("body")).select("#"+t);l.append("g");const p=i.db.getTasks(),x=i.db.getCommonDb().getDiagramTitle();E.debug("task",p),M.initGraphics(l,t);const u=i.db.getSections();E.debug("sections",u);let S=0,v=0,I=0,C=0,W=50+y,O=50;C=50;let L=0,w=!0;u.forEach(function(N){const b={number:L,descr:N,section:L,width:150,padding:20,maxHeight:S},_=M.getVirtualNodeHeight(l,b,r);E.debug("sectionHeight before draw",_),S=Math.max(S,_+20)});let H=0,V=0;E.debug("tasks.length",p.length);for(const[N,b]of p.entries()){const _={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:v},$=M.getVirtualNodeHeight(l,_,r);E.debug("taskHeight before draw",$),v=Math.max(v,$+20),H=Math.max(H,b.events.length);let T=0;for(const P of b.events){const R={descr:P,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};T+=M.getVirtualNodeHeight(l,R,r)}b.events.length>0&&(T+=(b.events.length-1)*10),V=Math.max(V,T)}E.debug("maxSectionHeight before draw",S),E.debug("maxTaskHeight before draw",v),u&&u.length>0?u.forEach(N=>{const b=p.filter(P=>P.section===N),_={number:L,descr:N,section:L,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:S};E.debug("sectionNode",_);const $=l.append("g"),T=M.drawNode($,_,L,r,t);E.debug("sectionNode output",T),$.attr("transform",`translate(${W}, ${C})`),O+=S+50,b.length>0&<(l,b,L,W,O,v,r,H,V,S,!1,t),W+=200*Math.max(b.length,1),O=C,L++}):(w=!1,lt(l,p,L,W,O,v,r,H,V,S,!0,t));const F=l.node().getBBox();if(E.debug("bounds",F),x&&l.append("text").text(x).attr("x",h==="neo"?F.x*2+y:F.width/2-y).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),I=w?S+v+150:v+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",y).attr("y1",I).attr("x2",F.width+3*y).attr("y2",I).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),h==="neo"&&f&&c!=="neutral"){const N=l.select("defs"),_=(N.empty()?l.append("defs"):N).append("linearGradient").attr("id",l.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");_.append("stop").attr("offset","0%").attr("stop-color",g).attr("stop-opacity",1),_.append("stop").attr("offset","100%").attr("stop-color",m).attr("stop-opacity",1)}ft(void 0,l,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),lt=o(function(e,t,n,i,r,h,c,a,f,g,m,y){for(const k of t){const s={descr:k.task,section:n,number:n,width:150,padding:20,maxHeight:h};E.debug("taskNode",s);const d=e.append("g").attr("class","taskWrapper"),p=M.drawNode(d,s,n,c,y).height;if(E.debug("taskHeight after draw",p),d.attr("transform",`translate(${i}, ${r})`),h=Math.max(h,p),k.events){const x=e.append("g").attr("class","lineWrapper");let u=h;r+=100,u=u+ne(e,k.events,n,i,r,c,y),r-=100,x.append("line").attr("x1",i+190/2).attr("y1",r+h).attr("x2",i+190/2).attr("y2",r+h+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${y}-arrowhead)`).attr("stroke-dasharray","5,5")}i=i+200,m&&!c.timeline?.disableMulticolor&&n++}r=r-10},"drawTasks"),ne=o(function(e,t,n,i,r,h,c){let a=0;const f=r;r=r+100;for(const g of t){const m={descr:g,section:n,number:n,width:150,padding:20,maxHeight:50};E.debug("eventNode",m);const y=e.append("g").attr("class","eventWrapper"),s=M.drawNode(y,m,n,h,c,!0).height;a=a+s,y.attr("transform",`translate(${i}, ${r})`),r=r+10+s}return r=f,a},"drawEvents"),re={setConf:o(()=>{},"setConf"),draw:ee},Q=200,z=5,se=Q+z*2,at=Q+100,ie=at+z*2,Lt=10,ae=0,ht=20,Mt=20,dt=30,At=50,oe=o(function(e,t,n,i){const r=gt(),h=r.timeline?.leftMargin??50;E.debug("timeline",i.db);const c=Pt(t);c.append("g");const a=i.db.getTasks(),f=i.db.getCommonDb().getDiagramTitle();E.debug("task",a),M.initGraphics(c);const g=i.db.getSections();E.debug("sections",g);let m=0,y=0;const k=50+h;let s=50;const d=s,l=k,p=se+Mt,x=ie+At,u=l+p;let S=0;const v=g&&g.length>0,I=v?u:k+p,C=Math.max(50,p+x-z*2);g.forEach(function(N){const b={number:S,descr:N,section:S,width:C,padding:z,maxHeight:m},_=M.getVirtualNodeHeight(c,b,r);E.debug("sectionHeight before draw",_),m=Math.max(m,_)});let W=0;E.debug("tasks.length",a.length);for(const[N,b]of a.entries()){const _={number:N,descr:b,section:b.section,width:Q,padding:z,maxHeight:y},$=M.getVirtualNodeHeight(c,_,r);E.debug("taskHeight before draw",$),y=Math.max(y,$);let T=0;for(const P of b.events){const R={descr:P,section:b.section,number:b.section,width:at,padding:z,maxHeight:50};T+=M.getVirtualNodeHeight(c,R,r)}b.events.length>0&&(T+=(b.events.length-1)*Lt),W=Math.max(W,T)+ae}E.debug("maxSectionHeight before draw",m),E.debug("maxTaskHeight before draw",y);const L=Math.max(y,W)+dt;v?g.forEach(N=>{const b=a.filter(Z=>Z.section===N),_={number:S,descr:N,section:S,width:C,padding:z,maxHeight:m};E.debug("sectionNode",_);const $=c.append("g"),T=M.drawNode($,_,S,r);E.debug("sectionNode output",T);const P=I-p;$.attr("transform",`translate(${P}, ${s})`);const R=s+T.height+ht;b.length>0&&ut(c,b,S,I,R,y,r,L,!1);const G=b.length,B=T.height+ht+L*Math.max(G,1)-(G>0?dt*2:0);s+=B,S++}):ut(c,a,S,I,s,y,r,L,!0);let w=c.node()?.getBBox();if(!w)throw new Error("bbox not found");if(E.debug("bounds",w),f){if(c.append("text").text(f).attr("x",w.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),w=c.node()?.getBBox(),!w)throw new Error("bbox not found");E.debug("bounds after title",w)}const[H]=Bt(r.fontSize),V=(H??16)*2,F=(H??16)*.5+20,K=c.append("g").attr("class","lineWrapper");K.append("line").attr("x1",I).attr("y1",d-V).attr("x2",I).attr("y2",w.y+w.height+F).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),K.lower(),ft(void 0,c,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),ut=o(function(e,t,n,i,r,h,c,a,f){for(const g of t){const m={descr:g.task,section:n,number:n,width:Q,padding:z,maxHeight:h};E.debug("taskNode",m);const y=e.append("g").attr("class","taskWrapper"),k=M.drawNode(y,m,n,c),s=k.height;E.debug("taskHeight after draw",s);const d=i-Mt-k.width;if(y.attr("transform",`translate(${d}, ${r})`),h=Math.max(h,s),g.events&&g.events.length>0){const l=r,p=i+At;ce(e,g.events,n,i,p,l,c)}r=r+a,f&&!c.timeline?.disableMulticolor&&n++}},"drawTasks"),ce=o(function(e,t,n,i,r,h,c){let a=h;for(const f of t){const g={descr:f,section:n,number:n,width:at,padding:z,maxHeight:0};E.debug("eventNode",g);const m=e.append("g").attr("class","eventWrapper"),k=M.drawNode(m,g,n,c).height;m.attr("transform",`translate(${r}, ${a})`);const s=e.append("g").attr("class","lineWrapper"),d=a+k/2;s.append("line").attr("x1",i).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),a=a+k+Lt}return a-h},"drawEvents"),le={setConf:o(()=>{},"setConf"),draw:oe},he=o(e=>{const{theme:t}=pt(),n=t?.includes("dark"),i=t?.includes("color"),r=e.svgId?.replace(/^#/,"")??"",h=r?`url(#${r}-drop-shadow)`:e.dropShadow??"none";let c="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++){const f=`${17-3*a}`,g=i?e.borderColorArray[a]:e.mainBkg,m=i?e.borderColorArray[a]:e.nodeBorder;c+=`
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var d=this.next();return d||this.lex()},"lex"),begin:o(function(d){this.conditionStack.push(d)},"begin"),popState:o(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:o(function(d){this.begin(d)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(d,l,p,x){switch(p){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return k})();g.lexer=m;function y(){this.yy={}}return o(y,"Parser"),y.prototype=g,g.Parser=y,new y})();tt.parser=tt;var Ot=tt,yt={};Vt(yt,{addEvent:()=>Tt,addSection:()=>_t,addTask:()=>Et,addTaskOrg:()=>$t,clear:()=>kt,default:()=>Gt,getCommonDb:()=>xt,getDirection:()=>bt,getSections:()=>wt,getTasks:()=>St,setDirection:()=>vt});var D="",mt=0,nt="LR",rt=[],q=[],K=[],xt=o(()=>Ft,"getCommonDb"),kt=o(function(){rt.length=0,q.length=0,D="",K.length=0,nt="LR",zt()},"clear"),vt=o(function(e){nt=e},"setDirection"),bt=o(function(){return nt},"getDirection"),_t=o(function(e){D=e,rt.push(e)},"addSection"),wt=o(function(){return rt},"getSections"),St=o(function(){let e=ct();const t=100;let n=0;for(;!e&&n<t;)e=ct(),n++;return q.push(...K),q},"getTasks"),Et=o(function(e,t,n){const i={id:mt++,section:D,type:D,task:e,score:t||0,events:n?[n]:[]};K.push(i)},"addTask"),Tt=o(function(e){K.find(n=>n.id===mt-1).events.push(e)},"addEvent"),$t=o(function(e){const t={section:D,type:D,description:e,task:e,classes:[]};q.push(t)},"addTaskOrg"),ct=o(function(){const e=o(function(n){return K[n].processed},"compileTask");let t=!0;for(const[n,i]of K.entries())e(n),t=t&&i.processed;return t},"compileTasks"),Gt={clear:kt,getCommonDb:xt,getDirection:bt,setDirection:vt,addSection:_t,getSections:wt,getTasks:St,addTask:Et,addTaskOrg:$t,addEvent:Tt},Nt=0,J=o(function(e,t){const n=e.append("rect");return n.attr("x",t.x),n.attr("y",t.y),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("width",t.width),n.attr("height",t.height),n.attr("rx",t.rx),n.attr("ry",t.ry),t.class!==void 0&&n.attr("class",t.class),n},"drawRect"),Dt=o(function(e,t){const i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(f){const g=ot().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}o(h,"smile");function c(f){const g=ot().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}o(c,"sad");function a(f){f.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return o(a,"ambivalent"),t.score>3?h(r):t.score<3?c(r):a(r),i},"drawFace"),Kt=o(function(e,t){const n=e.append("circle");return n.attr("cx",t.cx),n.attr("cy",t.cy),n.attr("class","actor-"+t.pos),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("r",t.r),n.class!==void 0&&n.attr("class",n.class),t.title!==void 0&&n.append("title").text(t.title),n},"drawCircle"),It=o(function(e,t){const n=t.text.replace(/<br\s*\/?>/gi," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0&&i.attr("class",t.class);const r=i.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(n),i},"drawText"),Ut=o(function(e,t){function n(r,h,c,a,f){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+a-f)+" "+(r+c-f*1.2)+","+(h+a)+" "+r+","+(h+a)}o(n,"genPoints");const i=e.append("polygon");i.attr("points",n(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,It(e,t)},"drawLabel"),Xt=o(function(e,t,n){const i=e.append("g"),r=st();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,J(i,r),Ht(n)(t.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},n,t.colour)},"drawSection"),et=-1,Zt=o(function(e,t,n,i){const r=t.x+n.width/2,h=e.append("g");et++,h.append("line").attr("id",i+"-task"+et).attr("x1",r).attr("y1",t.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Dt(h,{cx:r,cy:300+(5-t.score)*30,score:t.score});const a=st();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+t.num,a.rx=3,a.ry=3,J(h,a),Ht(n)(t.task,h,a.x,a.y,a.width,a.height,{class:"task"},n,t.colour)},"drawTask"),jt=o(function(e,t){J(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),qt=o(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),st=o(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ht=(function(){function e(r,h,c,a,f,g,m,y){const k=h.append("text").attr("x",c+f/2).attr("y",a+g/2+5).style("font-color",y).style("text-anchor","middle").text(r);i(k,m)}o(e,"byText");function t(r,h,c,a,f,g,m,y,k){const{taskFontSize:s,taskFontFamily:d}=y,l=r.split(/<br\s*\/?>/gi);for(let p=0;p<l.length;p++){const x=p*s-s*(l.length-1)/2,u=h.append("text").attr("x",c+f/2).attr("y",a).attr("fill",k).style("text-anchor","middle").style("font-size",s).style("font-family",d);u.append("tspan").attr("x",c+f/2).attr("dy",x).text(l[p]),u.attr("y",a+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(u,m)}}o(t,"byTspan");function n(r,h,c,a,f,g,m,y){const k=h.append("switch"),d=k.append("foreignObject").attr("x",c).attr("y",a).attr("width",f).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,k,c,a,f,g,m,y),i(d,m)}o(n,"byFo");function i(r,h){for(const c in h)c in h&&r.attr(c,h[c])}return o(i,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?n:r.textPlacement==="old"?e:t}})(),Jt=o(function(e,t){Nt=0,et=-1,e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function it(e,t){e.each(function(){var n=X(this),i=n.text().split(/(\s+|<br>)/).reverse(),r,h=[],c=1.1,a=n.attr("y"),f=parseFloat(n.attr("dy")),g=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",f+"em");for(let m=0;m<i.length;m++)r=i[i.length-1-m],h.push(r),g.text(h.join(" ").trim()),(g.node().getComputedTextLength()>t||r==="<br>")&&(h.pop(),g.text(h.join(" ").trim()),r==="<br>"?h=[""]:h=[r],g=n.append("tspan").attr("x",0).attr("y",a).attr("dy",c+"em").text(r))})}o(it,"wrap");var Qt=o(function(e,t,n,i,r,h=!1){const{theme:c,look:a}=i,f=c?.includes("redux"),g=i?.themeVariables?.THEME_COLOR_LIMIT??12,m=n%g-1,y=e.append("g");t.section=m,y.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+m));const k=y.append("g"),s=y.append("g"),l=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),p=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(t.height=l.height+p*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,s.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),f&&s.attr("transform",`translate(${t.width/2}, ${h?t.padding/2+3:t.padding})`),te(k,t,m,r,i),a==="neo"&&(y.attr("data-look","neo"),f)){const x=c.includes("dark"),u=e.node()?.ownerSVGElement??e.node(),S=X(u),v=S.attr("id")??"",I=v?`${v}-drop-shadow`:"drop-shadow";if(S.select(`#${I}`).empty()){const C=S.select("defs");(C.empty()?S.append("defs"):C).append("filter").attr("id",I).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",x?"0.2":"0.06").attr("flood-color",x?"#FFFFFF":"#000000")}}return t},"drawNode"),Yt=o(function(e,t,n){const i=e.append("g"),h=i.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),c=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),te=o(function(e,t,n,i,r){const{theme:h}=r,c=h?.includes("redux")?0:5,a=5,f=c>0?`M0 ${t.height-a} v${-t.height+2*a} q0,-${c},${c},-${c} h${t.width-2*a} q${c},0,${c},${c} v${t.height-a} H0 Z`:`M0 ${t.height-a} v${-(t.height-a)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+Nt++).attr("class","node-bkg node-"+t.type).attr("d",f),h?.includes("redux")||e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),M={drawRect:J,drawCircle:Kt,drawSection:Xt,drawText:It,drawLabel:Ut,drawTask:Zt,drawBackgroundRect:jt,getTextObj:qt,getNoteRect:st,initGraphics:Jt,drawNode:Qt,getVirtualNodeHeight:Yt},ee=o(function(e,t,n,i){const r=gt(),{look:h,theme:c,themeVariables:a}=r,{useGradient:f,gradientStart:g,gradientStop:m}=a,y=r.timeline?.leftMargin??50;E.debug("timeline",i.db);const k=r.securityLevel;let s;k==="sandbox"&&(s=X("#i"+t));const l=(k==="sandbox"?X(s.nodes()[0].contentDocument.body):X("body")).select("#"+t);l.append("g");const p=i.db.getTasks(),x=i.db.getCommonDb().getDiagramTitle();E.debug("task",p),M.initGraphics(l,t);const u=i.db.getSections();E.debug("sections",u);let S=0,v=0,I=0,C=0,W=50+y,O=50;C=50;let L=0,w=!0;u.forEach(function(N){const b={number:L,descr:N,section:L,width:150,padding:20,maxHeight:S},_=M.getVirtualNodeHeight(l,b,r);E.debug("sectionHeight before draw",_),S=Math.max(S,_+20)});let H=0,V=0;E.debug("tasks.length",p.length);for(const[N,b]of p.entries()){const _={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:v},$=M.getVirtualNodeHeight(l,_,r);E.debug("taskHeight before draw",$),v=Math.max(v,$+20),H=Math.max(H,b.events.length);let T=0;for(const P of b.events){const R={descr:P,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};T+=M.getVirtualNodeHeight(l,R,r)}b.events.length>0&&(T+=(b.events.length-1)*10),V=Math.max(V,T)}E.debug("maxSectionHeight before draw",S),E.debug("maxTaskHeight before draw",v),u&&u.length>0?u.forEach(N=>{const b=p.filter(P=>P.section===N),_={number:L,descr:N,section:L,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:S};E.debug("sectionNode",_);const $=l.append("g"),T=M.drawNode($,_,L,r,t);E.debug("sectionNode output",T),$.attr("transform",`translate(${W}, ${C})`),O+=S+50,b.length>0&<(l,b,L,W,O,v,r,H,V,S,!1,t),W+=200*Math.max(b.length,1),O=C,L++}):(w=!1,lt(l,p,L,W,O,v,r,H,V,S,!0,t));const F=l.node().getBBox();if(E.debug("bounds",F),x&&l.append("text").text(x).attr("x",h==="neo"?F.x*2+y:F.width/2-y).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),I=w?S+v+150:v+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",y).attr("y1",I).attr("x2",F.width+3*y).attr("y2",I).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),h==="neo"&&f&&c!=="neutral"){const N=l.select("defs"),_=(N.empty()?l.append("defs"):N).append("linearGradient").attr("id",l.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");_.append("stop").attr("offset","0%").attr("stop-color",g).attr("stop-opacity",1),_.append("stop").attr("offset","100%").attr("stop-color",m).attr("stop-opacity",1)}ft(void 0,l,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),lt=o(function(e,t,n,i,r,h,c,a,f,g,m,y){for(const k of t){const s={descr:k.task,section:n,number:n,width:150,padding:20,maxHeight:h};E.debug("taskNode",s);const d=e.append("g").attr("class","taskWrapper"),p=M.drawNode(d,s,n,c,y).height;if(E.debug("taskHeight after draw",p),d.attr("transform",`translate(${i}, ${r})`),h=Math.max(h,p),k.events){const x=e.append("g").attr("class","lineWrapper");let u=h;r+=100,u=u+ne(e,k.events,n,i,r,c,y),r-=100,x.append("line").attr("x1",i+190/2).attr("y1",r+h).attr("x2",i+190/2).attr("y2",r+h+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${y}-arrowhead)`).attr("stroke-dasharray","5,5")}i=i+200,m&&!c.timeline?.disableMulticolor&&n++}r=r-10},"drawTasks"),ne=o(function(e,t,n,i,r,h,c){let a=0;const f=r;r=r+100;for(const g of t){const m={descr:g,section:n,number:n,width:150,padding:20,maxHeight:50};E.debug("eventNode",m);const y=e.append("g").attr("class","eventWrapper"),s=M.drawNode(y,m,n,h,c,!0).height;a=a+s,y.attr("transform",`translate(${i}, ${r})`),r=r+10+s}return r=f,a},"drawEvents"),re={setConf:o(()=>{},"setConf"),draw:ee},Q=200,z=5,se=Q+z*2,at=Q+100,ie=at+z*2,Lt=10,ae=0,ht=20,Mt=20,dt=30,At=50,oe=o(function(e,t,n,i){const r=gt(),h=r.timeline?.leftMargin??50;E.debug("timeline",i.db);const c=Pt(t);c.append("g");const a=i.db.getTasks(),f=i.db.getCommonDb().getDiagramTitle();E.debug("task",a),M.initGraphics(c);const g=i.db.getSections();E.debug("sections",g);let m=0,y=0;const k=50+h;let s=50;const d=s,l=k,p=se+Mt,x=ie+At,u=l+p;let S=0;const v=g&&g.length>0,I=v?u:k+p,C=Math.max(50,p+x-z*2);g.forEach(function(N){const b={number:S,descr:N,section:S,width:C,padding:z,maxHeight:m},_=M.getVirtualNodeHeight(c,b,r);E.debug("sectionHeight before draw",_),m=Math.max(m,_)});let W=0;E.debug("tasks.length",a.length);for(const[N,b]of a.entries()){const _={number:N,descr:b,section:b.section,width:Q,padding:z,maxHeight:y},$=M.getVirtualNodeHeight(c,_,r);E.debug("taskHeight before draw",$),y=Math.max(y,$);let T=0;for(const P of b.events){const R={descr:P,section:b.section,number:b.section,width:at,padding:z,maxHeight:50};T+=M.getVirtualNodeHeight(c,R,r)}b.events.length>0&&(T+=(b.events.length-1)*Lt),W=Math.max(W,T)+ae}E.debug("maxSectionHeight before draw",m),E.debug("maxTaskHeight before draw",y);const L=Math.max(y,W)+dt;v?g.forEach(N=>{const b=a.filter(Z=>Z.section===N),_={number:S,descr:N,section:S,width:C,padding:z,maxHeight:m};E.debug("sectionNode",_);const $=c.append("g"),T=M.drawNode($,_,S,r);E.debug("sectionNode output",T);const P=I-p;$.attr("transform",`translate(${P}, ${s})`);const R=s+T.height+ht;b.length>0&&ut(c,b,S,I,R,y,r,L,!1);const G=b.length,B=T.height+ht+L*Math.max(G,1)-(G>0?dt*2:0);s+=B,S++}):ut(c,a,S,I,s,y,r,L,!0);let w=c.node()?.getBBox();if(!w)throw new Error("bbox not found");if(E.debug("bounds",w),f){if(c.append("text").text(f).attr("x",w.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),w=c.node()?.getBBox(),!w)throw new Error("bbox not found");E.debug("bounds after title",w)}const[H]=Bt(r.fontSize),V=(H??16)*2,F=(H??16)*.5+20,U=c.append("g").attr("class","lineWrapper");U.append("line").attr("x1",I).attr("y1",d-V).attr("x2",I).attr("y2",w.y+w.height+F).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),U.lower(),ft(void 0,c,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),ut=o(function(e,t,n,i,r,h,c,a,f){for(const g of t){const m={descr:g.task,section:n,number:n,width:Q,padding:z,maxHeight:h};E.debug("taskNode",m);const y=e.append("g").attr("class","taskWrapper"),k=M.drawNode(y,m,n,c),s=k.height;E.debug("taskHeight after draw",s);const d=i-Mt-k.width;if(y.attr("transform",`translate(${d}, ${r})`),h=Math.max(h,s),g.events&&g.events.length>0){const l=r,p=i+At;ce(e,g.events,n,i,p,l,c)}r=r+a,f&&!c.timeline?.disableMulticolor&&n++}},"drawTasks"),ce=o(function(e,t,n,i,r,h,c){let a=h;for(const f of t){const g={descr:f,section:n,number:n,width:at,padding:z,maxHeight:0};E.debug("eventNode",g);const m=e.append("g").attr("class","eventWrapper"),k=M.drawNode(m,g,n,c).height;m.attr("transform",`translate(${r}, ${a})`);const s=e.append("g").attr("class","lineWrapper"),d=a+k/2;s.append("line").attr("x1",i).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),a=a+k+Lt}return a-h},"drawEvents"),le={setConf:o(()=>{},"setConf"),draw:oe},he=o(e=>{const{theme:t}=pt(),n=t?.includes("dark"),i=t?.includes("color"),r=e.svgId?.replace(/^#/,"")??"",h=r?`url(#${r}-drop-shadow)`:e.dropShadow??"none";let c="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++){const f=`${17-3*a}`,g=i?e.borderColorArray[a]:e.mainBkg,m=i?e.borderColorArray[a]:e.nodeBorder;c+=`
|
|
7
7
|
.section-${a-1} rect,
|
|
8
8
|
.section-${a-1} path,
|
|
9
9
|
.section-${a-1} circle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a}from"./index-
|
|
1
|
+
import{h as a}from"./index-OY1TIdAK.js";const t=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],h=a("plus",t);const e=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=a("trash-2",e);export{h as P,s as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as c}from"./index-
|
|
1
|
+
import{h as c}from"./index-OY1TIdAK.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],t=c("circle-x",e);const a=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],d=c("upload",a);export{t as C,d as U};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as n,k as i,l as a,q as s,m as r}from"./index-
|
|
1
|
+
import{i as n,k as i,l as a,q as s,m as r}from"./index-OY1TIdAK.js";function f(){return n({queryKey:s.profiles.all,queryFn:()=>r.get("/profiles")})}function y(){return n({queryKey:s.profiles.defaults,queryFn:()=>r.get("/profiles/defaults")})}function c(e){return n({queryKey:s.profiles.agent(e),queryFn:()=>r.get(`/profiles/${e}`),enabled:!!e})}function p(){const e=i();return a({mutationFn:({agentType:u,variant:t,config:l})=>r.put(`/profiles/${u}/${t}`,l),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}function q(){const e=i();return a({mutationFn:({agentType:u,variant:t})=>r.delete(`/profiles/${u}/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}export{y as a,p as b,q as c,c as d,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as n,k as u,l as t,q as i,m as s}from"./index-
|
|
1
|
+
import{i as n,k as u,l as t,q as i,m as s}from"./index-OY1TIdAK.js";function p(){return n({queryKey:i.providers.all,queryFn:()=>s.get("/providers")})}function c(){const e=u();return t({mutationFn:r=>s.post("/providers",r),onSuccess:()=>{e.invalidateQueries({queryKey:i.providers.all})}})}function d(){const e=u();return t({mutationFn:({id:r,data:o})=>s.put(`/providers/${r}`,o),onSuccess:()=>{e.invalidateQueries({queryKey:i.providers.all})}})}function v(){const e=u();return t({mutationFn:r=>s.delete(`/providers/${r}`),onSuccess:()=>{e.invalidateQueries({queryKey:i.providers.all})}})}function l(){return t({mutationFn:()=>s.get("/providers/backup")})}function y(){return t({mutationFn:e=>s.post("/providers/import/preview",e)})}function m(){const e=u();return t({mutationFn:r=>s.post("/providers/import",r),onSuccess:()=>{e.invalidateQueries({queryKey:i.providers.all})}})}export{c as a,d as b,v as c,l as d,y as e,m as f,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as j,u as Z,r as n,j as o,I as T,J as E,m as ee,K as te}from"./index-OY1TIdAK.js";import{C as se}from"./chevron-down-DuZqUX3d.js";import{C as ne}from"./check-C7Na6M49.js";import{u as C,E as re,n as oe,c as ae,s as ce,d as ie,e as le,S as M}from"./mermaid-NOHMQCX5-CeIvIbfU.js";const ue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],de=j("circle-dot",ue);const fe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],K=j("circle",fe);const he=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],we=j("paperclip",he);const Se=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ye=j("square",Se),U="agent-tower-todo-panel-open";function ge(s,e){const c=e?"h-3 w-3":"h-3.5 w-3.5",l=(s||"").toLowerCase();return l==="completed"?o.jsx(ne,{"aria-hidden":!0,className:`${c} text-emerald-500`}):l==="in_progress"||l==="in-progress"?o.jsx(de,{"aria-hidden":!0,className:`${c} text-blue-500`}):l==="cancelled"?o.jsx(K,{"aria-hidden":!0,className:`${c} text-neutral-300`}):o.jsx(K,{"aria-hidden":!0,className:`${c} text-neutral-400`})}function _e({todos:s,compact:e}){const{t:c}=Z(),[l,i]=n.useState(()=>{if(e)return!1;const r=localStorage.getItem(U);return r===null?!0:r==="true"});if(n.useEffect(()=>{localStorage.setItem(U,String(l))},[l]),!s||s.length===0)return null;const d=s.filter(r=>r.status?.toLowerCase()==="completed").length,_=s.length>0?d/s.length*100:0;return o.jsxs("details",{className:"group",open:l,onToggle:r=>i(r.target.open),children:[o.jsx("summary",{className:"list-none cursor-pointer select-none [&::-webkit-details-marker]:hidden",children:o.jsxs("div",{className:`bg-neutral-50/80 border border-neutral-100 rounded-lg flex items-center justify-between hover:bg-neutral-100/80 transition-colors ${e?"px-3 py-1.5":"px-3 py-2"}`,children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx("span",{className:"text-neutral-500 font-medium text-xs",children:c("待办")}),o.jsxs("span",{className:"text-neutral-400 tabular-nums text-xs",children:[d,"/",s.length]}),o.jsx("div",{className:"w-12 h-1 bg-neutral-200/60 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-emerald-400 rounded-full transition-all duration-300",style:{width:`${_}%`}})})]}),o.jsx(se,{"aria-hidden":!0,className:`text-neutral-400 transition-transform group-open:rotate-180 ${e?"h-3 w-3":"h-3.5 w-3.5"}`})]})}),o.jsx("div",{className:`pt-1.5 pb-0.5 ${e?"max-h-28 overflow-y-auto px-1":"px-1"}`,children:o.jsx("ul",{className:"space-y-px",role:"list","aria-label":"Agent todo list",children:s.map((r,w)=>{const p=r.status?.toLowerCase()==="cancelled",k=r.status?.toLowerCase()==="completed";return o.jsxs("li",{className:`flex items-center gap-1.5 rounded-md px-2 ${e?"py-0.5":"py-[3px]"} ${k?"opacity-60":""}`,children:[o.jsx("span",{className:`flex items-center justify-center shrink-0 ${e?"h-3 w-3":"h-3.5 w-3.5"}`,children:ge(r.status,e)}),o.jsx("span",{className:`${e?"text-[11px] leading-[14px]":"text-xs leading-4"} text-neutral-600 wrap-break-word truncate ${p?"line-through text-neutral-400":""} ${k?"text-neutral-400":""}`,children:r.content})]},`${r.content}-${w}`)})})})]})}function ke(s){return n.useMemo(()=>{let e=[],c=0;for(const i of s)if(i.entryType==="tool_use"&&i.metadata?.action==="todo_management"&&i.metadata.todos&&i.metadata.todos.length>0){const d=i.metadata.todos;d.every(r=>r.content&&r.content.trim().length>0&&r.status)&&i.timestamp>=c&&(e=d,c=i.timestamp)}const l=e.find(i=>{const d=i.status?.toLowerCase();return d==="in_progress"||d==="in-progress"})??null;return{todos:e,inProgressTodo:l}},[s])}const me=!1,pe=1500;function b(s){return s===M.COMPLETED||s===M.FAILED||s===M.CANCELLED}function xe(s){return typeof s?.seq=="number"?s.seq:0}function V(s){return!b(s)}function ve(s){const{sessionId:e,sessionStatus:c,onAgentSessionId:l,onExit:i,onError:d}=s,[_,r]=n.useState(()=>T.isConnected()),[w,p]=n.useState(!1),[k,z]=n.useState(!1),[X,$]=n.useState(null),[F,N]=n.useState(!1),O=C(n.useCallback(t=>t.conversations[e]??re,[e])),h=n.useRef(!1),S=n.useRef({}),A=n.useRef(null),P=n.useRef(new Set),Y=n.useRef(e);Y.current=e;const v=n.useRef({onAgentSessionId:l,onExit:i,onError:d});v.current={onAgentSessionId:l,onExit:i,onError:d};const R=n.useRef(c);R.current=c,n.useEffect(()=>{if(!e)return;const t=T.getSocket();r(t.connected);let u=!b(c);const f=()=>r(!0),x=()=>{r(!1),p(!1),h.current=!1,S.current[e]=[]},D=a=>{if(a.sessionId!==e)return;if(!h.current){S.current[e]=[...S.current[e]??[],a];return}if(!C.getState().applyPatch(e,a.patch,a.seq)){h.current=!1,S.current[e]=[],A.current?.();return}N(!0)},I=a=>{a.sessionId===e&&($(a.agentSessionId),v.current.onAgentSessionId?.(a.agentSessionId))},y=a=>{a.sessionId===e&&(u=!1,p(!1),N(!1),v.current.onExit?.(a.exitCode))},g=a=>{a.sessionId===e&&v.current.onError?.(a.message)};return t.on("connect",f),t.on("disconnect",x),t.on(E.SESSION_PATCH,D),t.on(E.SESSION_ID,I),t.on(E.SESSION_EXIT,y),t.on(E.SESSION_ERROR,g),r(t.connected),()=>{t.off("connect",f),t.off("disconnect",x),t.off(E.SESSION_PATCH,D),t.off(E.SESSION_ID,I),t.off(E.SESSION_EXIT,y),t.off(E.SESSION_ERROR,g),h.current=!1,S.current[e]=[],$(null),N(!1),p(!1),u||C.getState().truncateSession(e)}},[e]);const q=n.useCallback(async()=>{if(!e)return;const t=e,u=()=>Y.current===t;if(P.current.has(t))return;const f=C.getState(),x=f.conversations[t];x&&x.entries.length>0&&(f.touchAccess(t),u()&&(p(!0),N(V(R.current)))),u()&&(h.current=!1),!(x&&x.entries.length>0)&&u()&&z(!0),P.current.add(t);try{const I=oe(await ee.get(`/sessions/${t}/logs`,{cache:"no-store"})),y=S.current[t]??[];S.current[t]=[],u()&&(h.current=!0);let g=I;const a=xe(I);let L=a;for(const m of y)if(!(typeof m.seq=="number"&&m.seq<=a))try{g=ae(g,m.patch,!0,!1).newDocument,typeof m.seq=="number"&&m.seq>L&&(L=m.seq)}catch(H){console.error("Failed to replay buffered patch:",H)}g={...g,seq:L,isTruncated:!1};const G=f.getConversation(t);if(y.length>0||ce(G,g)?f.setConversation(t,g):f.touchAccess(t),u()){p(!0);const m=C.getState().getConversation(t);m&&m.entries.length>0&&N(V(R.current))}}catch(I){console.error("[useNormalizedLogs:loadSnapshot] Failed to load snapshot:",I),u()&&(h.current=!0),S.current[t]=[]}finally{P.current.delete(t),u()&&z(!1)}},[e]);A.current=q;const B=n.useCallback(()=>new Promise(t=>{if(!T.getSocket().connected){t(!1);return}if(h.current){const f=C.getState().getConversation(e);if(!(b(R.current)||f?.isTruncated===!0)){t(!0);return}}q().then(()=>t(!0))}),[e,q]);n.useEffect(()=>{if(!e||!b(c))return;const t=window.setTimeout(()=>{A.current?.()},pe);return()=>window.clearTimeout(t)},[e,c]);const J=n.useCallback(t=>{T.getSocket().emit(te.INPUT,{sessionId:e,data:t})},[e]),W=n.useCallback(()=>{C.getState().removeSession(e),$(null),N(!1),p(!1),h.current=!1,S.current[e]=[]},[e]),Q=n.useMemo(()=>{const t=ie(O.entries);return F&&w&&t.push(le()),t},[O.entries,F,w]);return{isConnected:_,isAttached:w,isLoadingSnapshot:k,logs:Q,entries:O.entries,agentSessionId:X,attach:B,sendInput:J,clearLogs:W}}export{we as P,ye as S,_e as T,ke as a,ve as u};
|
package/dist/web/assets/{vennDiagram-CIIHVFJN-BC9RHBQ5.js → vennDiagram-CIIHVFJN-VxBXMI4P.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{aU as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as w,D as wt,I as Jt,d as ot,al as Qt,V as $t,W as te,X as ee,e as ne,z as se,F as ie,G as oe}from"./index-C9hQg1KT.js";import"./index-DbO4YyUv.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let T=A-M;T<0&&(T+=2*Math.PI);const S=A-T/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){T[p]=0;for(let f=0;f<b;++f)T[p]+=x[f][p];T[p]/=b}const l=x[b];if(J(S,1+h,T,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,T,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,T,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let T=0;T<16;++T)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,T=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,T=S)}u(T,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},D={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Ct(k,a,d)),I=Nt(k,s,e,i,h),D=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const R={};let _=!1;E.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let X=R[et],Z=I[et];return X||(X={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Z.x*F,y:X.y*(1-F)+Z.y*F,radius:X.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=E.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in D).text(k=>j(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const C=K(V.exit()).remove();typeof V.transition=="function"&&C.selectAll("path").attrTween("d",P);const Y=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),Y.style("font-size","0px")),{circles:I,textCentres:D,nodes:V,enter:O,update:z,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Dt:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aU as Gt,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as w,D as wt,I as Jt,d as ot,al as Qt,ac as $t,ad as te,ae as ee,e as ne,z as se,F as ie,G as oe}from"./index-BwKL3rKp.js";import"./index-OY1TIdAK.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let T=A-M;T<0&&(T+=2*Math.PI);const S=A-T/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){T[p]=0;for(let f=0;f<b;++f)T[p]+=x[f][p];T[p]/=b}const l=x[b];if(J(S,1+h,T,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,T,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,T,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let T=0;T<16;++T)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,T=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,T=S)}u(T,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},D={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Ct(k,a,d)),I=Nt(k,s,e,i,h),D=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const R={};let _=!1;E.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=E.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in D).text(k=>j(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const C=K(V.exit()).remove();typeof V.transition=="function"&&C.selectAll("path").attrTween("d",P);const X=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:D,nodes:V,enter:O,update:z,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Dt:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
5
5
|
a`,s,s,0,1,0,-s*2,0),e.join(" ")}function ke(t){const n=t.split(" ");return{x:Number.parseFloat(n[1]),y:Number.parseFloat(n[2]),radius:-Number.parseFloat(n[4])}}function Pt(t){if(t.length===0)return[];const n={};return st(t,n),n.arcs}function Vt(t,n){if(t.length===0)return"M 0 0";const s=Math.pow(10,n||0),e=n!=null?o=>Math.round(o*s)/s:o=>o;if(t.length==1){const o=t[0].circle;return Ie(e(o.x),e(o.y),e(o.radius))}const i=[`
|
|
6
6
|
M`,e(t[0].p2.x),e(t[0].p2.y)];for(const o of t){const a=e(o.circle.radius);i.push(`
|
|
7
|
-
A`,a,a,0,o.large?1:0,o.sweep?1:0,e(o.p1.x),e(o.p1.y))}return i.join(" ")}function St(t,n){return Vt(Pt(t),n)}function Me(t,n={}){const{lossFunction:s,layoutFunction:e=At,normalize:i=!0,orientation:o=Math.PI/2,orientationOrder:a,width:c=600,height:h=350,padding:u=15,scaleToFit:r=!1,symmetricalTextCentre:y=!1,distinct:d,round:b=2}=n;let x=e(t,{lossFunction:s==="default"||!s?tt:s==="logRatio"?Dt:s,distinct:d});i&&(x=Ct(x,o,a));const M=Nt(x,c,h,u,r),A=jt(M,t,y),T=new Map(Object.keys(M).map(m=>[m,{set:m,x:M[m].x,y:M[m].y,radius:M[m].radius}])),S=t.map(m=>{const v=m.sets.map(f=>T.get(f)),l=Pt(v),p=Vt(l,b);return{circles:v,arcs:l,path:p,area:m,has:new Set(m.sets)}});function g(m){let v="";for(const l of S)l.has.size>m.length&&m.every(p=>l.has.has(p))&&(v+=" "+l.path);return v}return S.map(({circles:m,arcs:v,path:l,area:p})=>({data:p,text:A[p.sets],circles:m,arcs:v,path:l,distinctPath:l+g(p.sets)}))}var gt=(function(){var t=w(function(S,g,m,v){for(m=m||{},v=S.length;v--;m[S[v]]=g);return m},"o"),n=[5,8],s=[7,8,11,12,17,19,22,24],e=[1,17],i=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],a=[1,31],c=[1,39],h=[7,8,11,12,17,19,22,24,27],u=[1,57],r=[1,56],y=[1,58],d=[1,59],b=[1,60],x=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],M={trace:w(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:w(function(g,m,v,l,p,f,N){var I=f.length-1;switch(p){case 1:return f[I-1];case 2:case 3:case 4:this.$=[];break;case 5:f[I-1].push(f[I]),this.$=f[I-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=f[I];break;case 8:l.setDiagramTitle(f[I].substr(6)),this.$=f[I].substr(6);break;case 9:l.addSubsetData([f[I]],void 0,void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 10:l.addSubsetData([f[I-1]],f[I],void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 11:l.addSubsetData([f[I-2]],void 0,parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 12:l.addSubsetData([f[I-3]],f[I-2],parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 13:if(f[I].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I]),l.addSubsetData(f[I],void 0,void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 14:if(f[I-1].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I-1]),l.addSubsetData(f[I-1],f[I],void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 15:if(f[I-2].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I-2]),l.addSubsetData(f[I-2],void 0,parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 16:if(f[I-3].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I-3]),l.addSubsetData(f[I-3],f[I-2],parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 17:case 18:case 19:l.addTextData(f[I-1],f[I],void 0);break;case 20:case 21:l.addTextData(f[I-2],f[I-1],f[I]);break;case 23:l.addStyleData(f[I-1],f[I]);break;case 24:case 25:case 26:var D=l.getCurrentSets();if(!D)throw new Error("text requires set");l.addTextData(D,f[I],void 0);break;case 27:case 28:var D=l.getCurrentSets();if(!D)throw new Error("text requires set");l.addTextData(D,f[I-1],f[I]);break;case 29:case 41:this.$=[f[I]];break;case 30:case 42:this.$=[...f[I-2],f[I]];break;case 31:this.$=[f[I-2],f[I]];break;case 33:this.$=f[I].join(" ");break;case 34:this.$=[f[I]];break;case 35:f[I-1].push(f[I]),this.$=f[I-1];break;case 43:case 44:this.$=f[I];break}},"anonymous"),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(s,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(s,[2,5]),t(s,[2,6]),t(s,[2,7]),t(s,[2,8]),{13:16,20:e,21:i},{13:20,18:19,20:e,21:i},{13:20,18:21,20:e,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:e,21:i},t(s,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(s,[2,13],{14:[1,29],15:[1,30],27:a}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:a},t(s,[2,22]),t(s,[2,24],{14:[1,35]}),t(s,[2,25],{14:[1,36]}),t(s,[2,26]),{20:c,25:37,26:38,27:a},t(s,[2,10],{15:[1,40]}),{16:[1,41]},t(s,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:e,21:i},t(s,[2,17],{14:[1,45]}),t(s,[2,18],{14:[1,46]}),t(s,[2,19]),t(s,[2,27]),t(s,[2,28]),t(s,[2,23],{27:[1,47]}),t(h,[2,29]),{15:[1,48]},{16:[1,49]},t(s,[2,11]),{16:[1,50]},t(s,[2,15]),t(o,[2,42]),t(s,[2,20]),t(s,[2,21]),{20:c,26:51},{16:u,20:r,21:[1,53],28:52,29:54,30:55,31:y,32:d,33:b},t(s,[2,12]),t(s,[2,16]),t(h,[2,30]),t(h,[2,31]),t(h,[2,32]),t(h,[2,33],{30:61,16:u,20:r,31:y,32:d,33:b}),t(x,[2,34]),t(x,[2,36]),t(x,[2,37]),t(x,[2,38]),t(x,[2,39]),t(x,[2,40]),t(x,[2,35])],defaultActions:{6:[2,1]},parseError:w(function(g,m){if(m.recoverable)this.trace(g);else{var v=new Error(g);throw v.hash=m,v}},"parseError"),parse:w(function(g){var m=this,v=[0],l=[],p=[null],f=[],N=this.table,I="",D=0,U=0,j=2,E=1,R=f.slice.call(arguments,1),_=Object.create(this.lexer),P={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(P.yy[V]=this.yy[V]);_.setInput(g,P.yy),P.yy.lexer=_,P.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var O=_.yylloc;f.push(O);var B=_.options&&_.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(G){v.length=v.length-2*G,p.length=p.length-G,f.length=f.length-G}w(W,"popStack");function K(){var G;return G=l.pop()||_.lex()||E,typeof G!="number"&&(G instanceof Array&&(l=G,G=l.pop()),G=m.symbols_[G]||G),G}w(K,"lex");for(var z,L,C,
|
|
7
|
+
A`,a,a,0,o.large?1:0,o.sweep?1:0,e(o.p1.x),e(o.p1.y))}return i.join(" ")}function St(t,n){return Vt(Pt(t),n)}function Me(t,n={}){const{lossFunction:s,layoutFunction:e=At,normalize:i=!0,orientation:o=Math.PI/2,orientationOrder:a,width:c=600,height:h=350,padding:u=15,scaleToFit:r=!1,symmetricalTextCentre:y=!1,distinct:d,round:b=2}=n;let x=e(t,{lossFunction:s==="default"||!s?tt:s==="logRatio"?Dt:s,distinct:d});i&&(x=Ct(x,o,a));const M=Nt(x,c,h,u,r),A=jt(M,t,y),T=new Map(Object.keys(M).map(m=>[m,{set:m,x:M[m].x,y:M[m].y,radius:M[m].radius}])),S=t.map(m=>{const v=m.sets.map(f=>T.get(f)),l=Pt(v),p=Vt(l,b);return{circles:v,arcs:l,path:p,area:m,has:new Set(m.sets)}});function g(m){let v="";for(const l of S)l.has.size>m.length&&m.every(p=>l.has.has(p))&&(v+=" "+l.path);return v}return S.map(({circles:m,arcs:v,path:l,area:p})=>({data:p,text:A[p.sets],circles:m,arcs:v,path:l,distinctPath:l+g(p.sets)}))}var gt=(function(){var t=w(function(S,g,m,v){for(m=m||{},v=S.length;v--;m[S[v]]=g);return m},"o"),n=[5,8],s=[7,8,11,12,17,19,22,24],e=[1,17],i=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],a=[1,31],c=[1,39],h=[7,8,11,12,17,19,22,24,27],u=[1,57],r=[1,56],y=[1,58],d=[1,59],b=[1,60],x=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],M={trace:w(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:w(function(g,m,v,l,p,f,N){var I=f.length-1;switch(p){case 1:return f[I-1];case 2:case 3:case 4:this.$=[];break;case 5:f[I-1].push(f[I]),this.$=f[I-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=f[I];break;case 8:l.setDiagramTitle(f[I].substr(6)),this.$=f[I].substr(6);break;case 9:l.addSubsetData([f[I]],void 0,void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 10:l.addSubsetData([f[I-1]],f[I],void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 11:l.addSubsetData([f[I-2]],void 0,parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 12:l.addSubsetData([f[I-3]],f[I-2],parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 13:if(f[I].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I]),l.addSubsetData(f[I],void 0,void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 14:if(f[I-1].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I-1]),l.addSubsetData(f[I-1],f[I],void 0),l.setIndentMode&&l.setIndentMode(!0);break;case 15:if(f[I-2].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I-2]),l.addSubsetData(f[I-2],void 0,parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 16:if(f[I-3].length<2)throw new Error("union requires multiple identifiers");l.validateUnionIdentifiers&&l.validateUnionIdentifiers(f[I-3]),l.addSubsetData(f[I-3],f[I-2],parseFloat(f[I])),l.setIndentMode&&l.setIndentMode(!0);break;case 17:case 18:case 19:l.addTextData(f[I-1],f[I],void 0);break;case 20:case 21:l.addTextData(f[I-2],f[I-1],f[I]);break;case 23:l.addStyleData(f[I-1],f[I]);break;case 24:case 25:case 26:var D=l.getCurrentSets();if(!D)throw new Error("text requires set");l.addTextData(D,f[I],void 0);break;case 27:case 28:var D=l.getCurrentSets();if(!D)throw new Error("text requires set");l.addTextData(D,f[I-1],f[I]);break;case 29:case 41:this.$=[f[I]];break;case 30:case 42:this.$=[...f[I-2],f[I]];break;case 31:this.$=[f[I-2],f[I]];break;case 33:this.$=f[I].join(" ");break;case 34:this.$=[f[I]];break;case 35:f[I-1].push(f[I]),this.$=f[I-1];break;case 43:case 44:this.$=f[I];break}},"anonymous"),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(s,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(s,[2,5]),t(s,[2,6]),t(s,[2,7]),t(s,[2,8]),{13:16,20:e,21:i},{13:20,18:19,20:e,21:i},{13:20,18:21,20:e,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:e,21:i},t(s,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(s,[2,13],{14:[1,29],15:[1,30],27:a}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:a},t(s,[2,22]),t(s,[2,24],{14:[1,35]}),t(s,[2,25],{14:[1,36]}),t(s,[2,26]),{20:c,25:37,26:38,27:a},t(s,[2,10],{15:[1,40]}),{16:[1,41]},t(s,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:e,21:i},t(s,[2,17],{14:[1,45]}),t(s,[2,18],{14:[1,46]}),t(s,[2,19]),t(s,[2,27]),t(s,[2,28]),t(s,[2,23],{27:[1,47]}),t(h,[2,29]),{15:[1,48]},{16:[1,49]},t(s,[2,11]),{16:[1,50]},t(s,[2,15]),t(o,[2,42]),t(s,[2,20]),t(s,[2,21]),{20:c,26:51},{16:u,20:r,21:[1,53],28:52,29:54,30:55,31:y,32:d,33:b},t(s,[2,12]),t(s,[2,16]),t(h,[2,30]),t(h,[2,31]),t(h,[2,32]),t(h,[2,33],{30:61,16:u,20:r,31:y,32:d,33:b}),t(x,[2,34]),t(x,[2,36]),t(x,[2,37]),t(x,[2,38]),t(x,[2,39]),t(x,[2,40]),t(x,[2,35])],defaultActions:{6:[2,1]},parseError:w(function(g,m){if(m.recoverable)this.trace(g);else{var v=new Error(g);throw v.hash=m,v}},"parseError"),parse:w(function(g){var m=this,v=[0],l=[],p=[null],f=[],N=this.table,I="",D=0,U=0,j=2,E=1,R=f.slice.call(arguments,1),_=Object.create(this.lexer),P={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(P.yy[V]=this.yy[V]);_.setInput(g,P.yy),P.yy.lexer=_,P.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var O=_.yylloc;f.push(O);var B=_.options&&_.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(G){v.length=v.length-2*G,p.length=p.length-G,f.length=f.length-G}w(W,"popStack");function K(){var G;return G=l.pop()||_.lex()||E,typeof G!="number"&&(G instanceof Array&&(l=G,G=l.pop()),G=m.symbols_[G]||G),G}w(K,"lex");for(var z,L,C,X,k={},F,H,et,Y;;){if(L=v[v.length-1],this.defaultActions[L]?C=this.defaultActions[L]:((z===null||typeof z>"u")&&(z=K()),C=N[L]&&N[L][z]),typeof C>"u"||!C.length||!C[0]){var Z="";Y=[];for(F in N[L])this.terminals_[F]&&F>j&&Y.push("'"+this.terminals_[F]+"'");_.showPosition?Z="Parse error on line "+(D+1)+`:
|
|
8
8
|
`+_.showPosition()+`
|
|
9
|
-
Expecting `+
|
|
9
|
+
Expecting `+Y.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Z="Parse error on line "+(D+1)+": Unexpected "+(z==E?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(Z,{text:_.match,token:this.terminals_[z]||z,line:_.yylineno,loc:O,expected:Y})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+z);switch(C[0]){case 1:v.push(z),p.push(_.yytext),f.push(_.yylloc),v.push(C[1]),z=null,U=_.yyleng,I=_.yytext,D=_.yylineno,O=_.yylloc;break;case 2:if(H=this.productions_[C[1]][1],k.$=p[p.length-H],k._$={first_line:f[f.length-(H||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(H||1)].first_column,last_column:f[f.length-1].last_column},B&&(k._$.range=[f[f.length-(H||1)].range[0],f[f.length-1].range[1]]),X=this.performAction.apply(k,[I,U,D,P.yy,C[1],p,f].concat(R)),typeof X<"u")return X;H&&(v=v.slice(0,-1*H*2),p=p.slice(0,-1*H),f=f.slice(0,-1*H)),v.push(this.productions_[C[1]][0]),p.push(k.$),f.push(k._$),et=N[v[v.length-2]][v[v.length-1]],v.push(et);break;case 3:return!0}}return!0},"parse")},A=(function(){var S={EOF:1,parseError:w(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:w(function(g,m){return this.yy=m||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:w(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var m=g.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:w(function(g){var m=g.length,v=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var l=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),v.length-1&&(this.yylineno-=v.length-1);var p=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:v?(v.length===l.length?this.yylloc.first_column:0)+l[l.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:w(function(){return this._more=!0,this},"more"),reject:w(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).
|
|
10
10
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:w(function(g){this.unput(this.match.slice(g))},"less"),pastInput:w(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:w(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:w(function(){var g=this.pastInput(),m=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
|
|
11
11
|
`+m+"^"},"showPosition"),test_match:w(function(g,m){var v,l,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),l=g[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(g[0].length),this.matched+=g[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var f in p)this[f]=p[f];return!1}return!1},"test_match"),next:w(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,m,v,l;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),f=0;f<p.length;f++)if(v=this._input.match(this.rules[p[f]]),v&&(!m||v[0].length>m[0].length)){if(m=v,l=f,this.options.backtrack_lexer){if(g=this.test_match(v,p[f]),g!==!1)return g;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(g=this.test_match(m,p[l]),g!==!1?g:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
12
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:w(function(){var m=this.next();return m||this.lex()},"lex"),begin:w(function(m){this.conditionStack.push(m)},"begin"),popState:w(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:w(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:w(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:w(function(m){this.begin(m)},"pushState"),stateStackSize:w(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:w(function(m,v,l,p){switch(l){case 0:break;case 1:break;case 2:break;case 3:if(m.getIndentMode&&m.getIndentMode())return m.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:m.setIndentMode&&m.setIndentMode(!1),this.begin("INITIAL"),this.unput(v.yytext);break;case 6:return this.begin("bol"),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(m.consumeIndentText)m.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return v.yytext=v.yytext.slice(2,-2),14;case 17:return v.yytext=v.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return S})();M.lexer=A;function T(){this.yy={}}return w(T,"Parser"),T.prototype=M,M.Parser=T,new T})();gt.parser=gt;var Se=gt,yt=[],pt=[],mt=[],bt=new Set,vt,It=!1,we=w((t,n,s)=>{const e=it(t).sort(),i=s??10/Math.pow(t.length,2);vt=e,e.length===1&&bt.add(e[0]),yt.push({sets:e,size:i,label:n?nt(n):void 0})},"addSubsetData"),_e=w(()=>yt,"getSubsetData"),nt=w(t=>{const n=t.trim();return n.length>=2&&n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n},"normalizeText"),Te=w(t=>t&&nt(t),"normalizeStyleValue"),Ee=w((t,n,s)=>{const e=nt(n);pt.push({sets:it(t).sort(),id:e,label:s?nt(s):void 0})},"addTextData"),ze=w((t,n)=>{const s=it(t).sort(),e={};for(const[i,o]of n)e[i]=Te(o)??o;mt.push({targets:s,styles:e})},"addStyleData"),Ae=w(()=>mt,"getStyleData"),it=w(t=>t.map(n=>nt(n)),"normalizeIdentifierList"),Re=w(t=>{const s=it(t).filter(e=>!bt.has(e));if(s.length>0)throw new Error(`unknown set identifier: ${s.join(", ")}`)},"validateUnionIdentifiers"),De=w(()=>pt,"getTextData"),Ce=w(()=>vt,"getCurrentSets"),Ne=w(()=>It,"getIndentMode"),Oe=w(t=>{It=t},"setIndentMode"),Fe=oe.venn;function Bt(){return ie(Fe,wt().venn)}w(Bt,"getConfig");var Le=w(()=>{se(),yt.length=0,pt.length=0,mt.length=0,bt.clear(),vt=void 0,It=!1},"customClear"),je={getConfig:Bt,clear:Le,setAccTitle:Zt,getAccTitle:
|
|
12
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:w(function(){var m=this.next();return m||this.lex()},"lex"),begin:w(function(m){this.conditionStack.push(m)},"begin"),popState:w(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:w(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:w(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:w(function(m){this.begin(m)},"pushState"),stateStackSize:w(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:w(function(m,v,l,p){switch(l){case 0:break;case 1:break;case 2:break;case 3:if(m.getIndentMode&&m.getIndentMode())return m.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:m.setIndentMode&&m.setIndentMode(!1),this.begin("INITIAL"),this.unput(v.yytext);break;case 6:return this.begin("bol"),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(m.consumeIndentText)m.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return v.yytext=v.yytext.slice(2,-2),14;case 17:return v.yytext=v.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return S})();M.lexer=A;function T(){this.yy={}}return w(T,"Parser"),T.prototype=M,M.Parser=T,new T})();gt.parser=gt;var Se=gt,yt=[],pt=[],mt=[],bt=new Set,vt,It=!1,we=w((t,n,s)=>{const e=it(t).sort(),i=s??10/Math.pow(t.length,2);vt=e,e.length===1&&bt.add(e[0]),yt.push({sets:e,size:i,label:n?nt(n):void 0})},"addSubsetData"),_e=w(()=>yt,"getSubsetData"),nt=w(t=>{const n=t.trim();return n.length>=2&&n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n},"normalizeText"),Te=w(t=>t&&nt(t),"normalizeStyleValue"),Ee=w((t,n,s)=>{const e=nt(n);pt.push({sets:it(t).sort(),id:e,label:s?nt(s):void 0})},"addTextData"),ze=w((t,n)=>{const s=it(t).sort(),e={};for(const[i,o]of n)e[i]=Te(o)??o;mt.push({targets:s,styles:e})},"addStyleData"),Ae=w(()=>mt,"getStyleData"),it=w(t=>t.map(n=>nt(n)),"normalizeIdentifierList"),Re=w(t=>{const s=it(t).filter(e=>!bt.has(e));if(s.length>0)throw new Error(`unknown set identifier: ${s.join(", ")}`)},"validateUnionIdentifiers"),De=w(()=>pt,"getTextData"),Ce=w(()=>vt,"getCurrentSets"),Ne=w(()=>It,"getIndentMode"),Oe=w(t=>{It=t},"setIndentMode"),Fe=oe.venn;function Bt(){return ie(Fe,wt().venn)}w(Bt,"getConfig");var Le=w(()=>{se(),yt.length=0,pt.length=0,mt.length=0,bt.clear(),vt=void 0,It=!1},"customClear"),je={getConfig:Bt,clear:Le,setAccTitle:Zt,getAccTitle:Xt,setDiagramTitle:Yt,getDiagramTitle:Ht,getAccDescription:Kt,setAccDescription:Wt,addSubsetData:we,getSubsetData:_e,addTextData:Ee,addStyleData:ze,validateUnionIdentifiers:Re,getTextData:De,getStyleData:Ae,getCurrentSets:Ce,getIndentMode:Ne,setIndentMode:Oe},Pe=w(t=>`
|
|
13
13
|
.venn-title {
|
|
14
14
|
font-size: 32px;
|
|
15
15
|
fill: ${t.vennTitleTextColor};
|
|
@@ -31,4 +31,4 @@ Expecting `+X.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Z="Parse error on
|
|
|
31
31
|
font-family: ${t.fontFamily};
|
|
32
32
|
color: ${t.vennSetTextColor};
|
|
33
33
|
}
|
|
34
|
-
`,"getStyles"),Ve=Pe;function qt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}w(qt,"buildStyleByKey");var Be=w((t,n,s,e)=>{const i=e.db,o=i.getConfig?.(),{themeVariables:a,look:c,handDrawnSeed:h}=wt(),u=c==="handDrawn",r=[a.venn1,a.venn2,a.venn3,a.venn4,a.venn5,a.venn6,a.venn7,a.venn8].filter(Boolean),y=i.getDiagramTitle?.(),d=i.getSubsetData(),b=i.getTextData(),x=qt(i.getStyleData()),M=o?.width??800,A=o?.height??450,S=M/1600,g=y?48*S:0,m=a.primaryTextColor??a.textColor,v=Jt(n);v.attr("viewBox",`0 0 ${M} ${A}`),y&&v.append("text").text(y).attr("class","venn-title").attr("font-size",`${32*S}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*S).style("fill",a.vennTitleTextColor||a.titleColor);const l=ot(document.createElement("div")),p=be().width(M).height(A-g);l.datum(d).call(p);const f=u?Qt.svg(l.select("svg").node()):void 0,N=Me(d,{width:M,height:A-g,padding:o?.padding??15}),I=new Map;for(const E of N){const R=Q([...E.data.sets].sort());I.set(R,E)}b.length>0&&Ut(o,I,l,b,S,x);const D=$t(a.background||"#f4f4f4");l.selectAll(".venn-circle").each(function(E,R){const _=ot(this),V=Q([...E.sets].sort()),O=x.get(V),B=O?.fill||r[R%r.length]||a.primaryColor;_.classed(`venn-set-${R%8}`,!0);const W=O?.["fill-opacity"]??.1,K=O?.stroke||B,z=O?.["stroke-width"]||`${5*S}`;if(u&&f){const C=I.get(V);if(C&&C.circles.length>0){const
|
|
34
|
+
`,"getStyles"),Ve=Pe;function qt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}w(qt,"buildStyleByKey");var Be=w((t,n,s,e)=>{const i=e.db,o=i.getConfig?.(),{themeVariables:a,look:c,handDrawnSeed:h}=wt(),u=c==="handDrawn",r=[a.venn1,a.venn2,a.venn3,a.venn4,a.venn5,a.venn6,a.venn7,a.venn8].filter(Boolean),y=i.getDiagramTitle?.(),d=i.getSubsetData(),b=i.getTextData(),x=qt(i.getStyleData()),M=o?.width??800,A=o?.height??450,S=M/1600,g=y?48*S:0,m=a.primaryTextColor??a.textColor,v=Jt(n);v.attr("viewBox",`0 0 ${M} ${A}`),y&&v.append("text").text(y).attr("class","venn-title").attr("font-size",`${32*S}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*S).style("fill",a.vennTitleTextColor||a.titleColor);const l=ot(document.createElement("div")),p=be().width(M).height(A-g);l.datum(d).call(p);const f=u?Qt.svg(l.select("svg").node()):void 0,N=Me(d,{width:M,height:A-g,padding:o?.padding??15}),I=new Map;for(const E of N){const R=Q([...E.data.sets].sort());I.set(R,E)}b.length>0&&Ut(o,I,l,b,S,x);const D=$t(a.background||"#f4f4f4");l.selectAll(".venn-circle").each(function(E,R){const _=ot(this),V=Q([...E.sets].sort()),O=x.get(V),B=O?.fill||r[R%r.length]||a.primaryColor;_.classed(`venn-set-${R%8}`,!0);const W=O?.["fill-opacity"]??.1,K=O?.stroke||B,z=O?.["stroke-width"]||`${5*S}`;if(u&&f){const C=I.get(V);if(C&&C.circles.length>0){const X=C.circles[0],k=f.circle(X.x,X.y,X.radius*2,{roughness:.7,seed:h,fill:kt(B,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+R*60,stroke:K,strokeWidth:parseFloat(String(z))});_.select("path").remove(),_.node()?.insertBefore(k,_.select("text").node())}}else _.select("path").style("fill",B).style("fill-opacity",W).style("stroke",K).style("stroke-width",z).style("stroke-opacity",.95);const L=O?.color||(D?te(B,30):ee(B,30));_.select("text").style("font-size",`${48*S}px`).style("fill",L)}),u&&f?l.selectAll(".venn-intersection").each(function(E){const R=ot(this),P=Q([...E.sets].sort()),V=x.get(P),O=V?.fill;if(O){const B=R.select("path"),W=B.attr("d");if(W){const K=f.path(W,{roughness:.7,seed:h,fill:kt(O,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),z=B.node();z?.parentNode?.insertBefore(K,z),B.remove()}}else R.select("path").style("fill-opacity",0);R.select("text").style("font-size",`${48*S}px`).style("fill",V?.color??a.vennSetTextColor??m)}):(l.selectAll(".venn-intersection text").style("font-size",`${48*S}px`).style("fill",E=>{const _=Q([...E.sets].sort());return x.get(_)?.color??a.vennSetTextColor??m}),l.selectAll(".venn-intersection path").style("fill-opacity",E=>{const _=Q([...E.sets].sort());return x.get(_)?.fill?1:0}).style("fill",E=>{const _=Q([...E.sets].sort());return x.get(_)?.fill??"transparent"}));const U=v.append("g").attr("transform",`translate(0, ${g})`),j=l.select("svg").node();if(j&&"childNodes"in j)for(const E of[...j.childNodes])U.node()?.appendChild(E);ne(v,A,M,o?.useMaxWidth??!0)},"draw");function Q(t){return t.join("|")}w(Q,"stableSetsKey");function Ut(t,n,s,e,i,o){const a=t?.useDebugLayout??!1,h=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const r of e){const y=Q(r.sets),d=u.get(y);d?d.push(r):u.set(y,[r])}for(const[r,y]of u.entries()){const d=n.get(r);if(!d?.text)continue;const b=d.text.x,x=d.text.y,M=Math.min(...d.circles.map(E=>E.radius)),A=Math.min(...d.circles.map(E=>E.radius-Math.hypot(b-E.x,x-E.y)));let T=Number.isFinite(A)?Math.max(0,A):0;T===0&&Number.isFinite(M)&&(T=M*.6);const S=h.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);a&&S.append("circle").attr("class","venn-text-debug-circle").attr("cx",b).attr("cy",x).attr("r",T).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const g=Math.max(80*i,T*2*.95),m=Math.max(60*i,T*2*.95),p=(d.data.label&&d.data.label.length>0?Math.min(32*i,T*.25):0)+(y.length<=2?30*i:0),f=b-g/2,N=x-m/2+p,I=Math.max(1,Math.ceil(Math.sqrt(y.length))),D=Math.max(1,Math.ceil(y.length/I)),U=g/I,j=m/D;for(const[E,R]of y.entries()){const _=E%I,P=Math.floor(E/I),V=f+U*(_+.5),O=N+j*(P+.5);a&&S.append("rect").attr("class","venn-text-debug-cell").attr("x",f+U*_).attr("y",N+j*P).attr("width",U).attr("height",j).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const B=U*.9,W=j*.9,K=S.append("foreignObject").attr("class","venn-text-node-fo").attr("width",B).attr("height",W).attr("x",V-B/2).attr("y",O-W/2).attr("overflow","visible"),z=o.get(R.id)?.color,L=K.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(R.label??R.id);z&&L.style("color",z)}}}w(Ut,"renderTextNodes");var qe={draw:Be},We={parser:Se,db:je,renderer:qe,styles:Ve};export{We as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{an as er}from"./index-DbO4YyUv.js";var LN=Object.create,pc=Object.defineProperty,DN=Object.getOwnPropertyDescriptor,xh=Object.getOwnPropertyNames,MN=Object.getPrototypeOf,xN=Object.prototype.hasOwnProperty,s=(t,e)=>pc(t,"name",{value:e,configurable:!0}),FN=(t,e)=>function(){return t&&(e=(0,t[xh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[xh(t)[0]])((e={exports:{}}).exports,e),e.exports},Zr=(t,e)=>{for(var r in e)pc(t,r,{get:e[r],enumerable:!0})},Fh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of xh(e))!xN.call(t,a)&&a!==r&&pc(t,a,{get:()=>e[a],enumerable:!(n=DN(e,a))||n.enumerable});return t},uf=(t,e,r)=>(Fh(t,e,"default"),r),Gh=(t,e,r)=>(r=t!=null?LN(MN(t)):{},Fh(pc(r,"default",{value:t,enumerable:!0}),t)),jh=t=>Fh(pc({},"__esModule",{value:!0}),t),ff={};Zr(ff,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>un,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>Ap,CodeActionContext:()=>$p,CodeActionKind:()=>Rp,CodeActionTriggerKind:()=>Il,CodeDescription:()=>Zd,CodeLens:()=>Ep,Color:()=>tu,ColorInformation:()=>Wd,ColorPresentation:()=>Vd,Command:()=>cn,CompletionItem:()=>lp,CompletionItemKind:()=>rp,CompletionItemLabelDetails:()=>op,CompletionItemTag:()=>ap,CompletionList:()=>cp,CreateFile:()=>Ta,DeleteFile:()=>$a,Diagnostic:()=>Cl,DiagnosticRelatedInformation:()=>ru,DiagnosticSeverity:()=>Xd,DiagnosticTag:()=>Jd,DocumentHighlight:()=>hp,DocumentHighlightKind:()=>pp,DocumentLink:()=>Cp,DocumentSymbol:()=>Tp,DocumentUri:()=>Bd,EOL:()=>hT,FoldingRange:()=>Yd,FoldingRangeKind:()=>Hd,FormattingOptions:()=>_p,Hover:()=>up,InlayHint:()=>Lp,InlayHintKind:()=>iu,InlayHintLabelPart:()=>su,InlineCompletionContext:()=>jp,InlineCompletionItem:()=>Mp,InlineCompletionList:()=>xp,InlineCompletionTriggerKind:()=>Fp,InlineValueContext:()=>Op,InlineValueEvaluatableExpression:()=>Pp,InlineValueText:()=>Np,InlineValueVariableLookup:()=>kp,InsertReplaceEdit:()=>ip,InsertTextFormat:()=>np,InsertTextMode:()=>sp,Location:()=>_l,LocationLink:()=>qd,MarkedString:()=>wl,MarkupContent:()=>Aa,MarkupKind:()=>au,OptionalVersionedTextDocumentIdentifier:()=>bl,ParameterInformation:()=>fp,Position:()=>ie,Range:()=>ee,RenameFile:()=>Ra,SelectedCompletionInfo:()=>Gp,SelectionRange:()=>Sp,SemanticTokenModifiers:()=>wp,SemanticTokenTypes:()=>bp,SemanticTokens:()=>Ip,SignatureInformation:()=>dp,StringValue:()=>Dp,SymbolInformation:()=>yp,SymbolKind:()=>mp,SymbolTag:()=>gp,TextDocument:()=>zp,TextDocumentEdit:()=>Sl,TextDocumentIdentifier:()=>Qd,TextDocumentItem:()=>tp,TextEdit:()=>rr,URI:()=>eu,VersionedTextDocumentIdentifier:()=>ep,WorkspaceChange:()=>pT,WorkspaceEdit:()=>nu,WorkspaceFolder:()=>Up,WorkspaceSymbol:()=>vp,integer:()=>Kd,uinteger:()=>El});var Bd,eu,Kd,El,ie,ee,_l,qd,tu,Wd,Vd,Hd,Yd,ru,Xd,Jd,Zd,Cl,cn,rr,un,Xe,Tr,Sl,Ta,Ra,$a,nu,pl,Rd,pT,Qd,ep,bl,tp,au,Aa,rp,np,ap,ip,sp,op,lp,cp,wl,up,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,Il,$p,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,iu,su,Lp,Dp,Mp,xp,Fp,Gp,jp,Up,hT,zp,Ey,E,hc=FN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Bd||(Bd={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(eu||(eu={})),(function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(Kd||(Kd={})),(function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(El||(El={})),(function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=El.MAX_VALUE),l===Number.MAX_VALUE&&(l=El.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&E.uinteger(l.line)&&E.uinteger(l.character)}s(o,"is"),a.is=o})(ie||(ie={})),(function(a){function i(c,l,u,f){if(E.uinteger(c)&&E.uinteger(l)&&E.uinteger(u)&&E.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o})(ee||(ee={})),(function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ee.is(l.range)&&(E.string(l.uri)||E.undefined(l.uri))}s(o,"is"),a.is=o})(_l||(_l={})),(function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ee.is(l.targetRange)&&E.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||E.undefined(l.originSelectionRange))}s(o,"is"),a.is=o})(qd||(qd={})),(function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.numberRange(l.red,0,1)&&E.numberRange(l.green,0,1)&&E.numberRange(l.blue,0,1)&&E.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o})(tu||(tu={})),(function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&ee.is(l.range)&&tu.is(l.color)}s(o,"is"),a.is=o})(Wd||(Wd={})),(function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.string(l.label)&&(E.undefined(l.textEdit)||rr.is(l))&&(E.undefined(l.additionalTextEdits)||E.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o})(Vd||(Vd={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(Hd||(Hd={})),(function(a){function i(c,l,u,f,d,p){const g={startLine:c,endLine:l};return E.defined(u)&&(g.startCharacter=u),E.defined(f)&&(g.endCharacter=f),E.defined(d)&&(g.kind=d),E.defined(p)&&(g.collapsedText=p),g}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.uinteger(l.startLine)&&E.uinteger(l.startLine)&&(E.undefined(l.startCharacter)||E.uinteger(l.startCharacter))&&(E.undefined(l.endCharacter)||E.uinteger(l.endCharacter))&&(E.undefined(l.kind)||E.string(l.kind))}s(o,"is"),a.is=o})(Yd||(Yd={})),(function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&_l.is(l.location)&&E.string(l.message)}s(o,"is"),a.is=o})(ru||(ru={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(Xd||(Xd={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Jd||(Jd={})),(function(a){function i(o){const c=o;return E.objectLiteral(c)&&E.string(c.href)}s(i,"is"),a.is=i})(Zd||(Zd={})),(function(a){function i(c,l,u,f,d,p){let g={range:c,message:l};return E.defined(u)&&(g.severity=u),E.defined(f)&&(g.code=f),E.defined(d)&&(g.source=d),E.defined(p)&&(g.relatedInformation=p),g}s(i,"create"),a.create=i;function o(c){var l;let u=c;return E.defined(u)&&ee.is(u.range)&&E.string(u.message)&&(E.number(u.severity)||E.undefined(u.severity))&&(E.integer(u.code)||E.string(u.code)||E.undefined(u.code))&&(E.undefined(u.codeDescription)||E.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(E.string(u.source)||E.undefined(u.source))&&(E.undefined(u.relatedInformation)||E.typedArray(u.relatedInformation,ru.is))}s(o,"is"),a.is=o})(Cl||(Cl={})),(function(a){function i(c,l,...u){let f={title:c,command:l};return E.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.title)&&E.string(l.command)}s(o,"is"),a.is=o})(cn||(cn={})),(function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return E.objectLiteral(f)&&E.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l})(rr||(rr={})),(function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.string(l.label)&&(E.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(E.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o})(un||(un={})),(function(a){function i(o){const c=o;return E.string(c)}s(i,"is"),a.is=i})(Xe||(Xe={})),(function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(un.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l})(Tr||(Tr={})),(function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&bl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(Sl||(Sl={})),(function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&E.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Ta||(Ta={})),(function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&E.string(l.oldUri)&&E.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Ra||(Ra={})),(function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&E.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||E.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||E.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})($a||($a={})),(function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>E.string(l.kind)?Ta.is(l)||Ra.is(l)||$a.is(l):Sl.is(l)))}s(i,"is"),a.is=i})(nu||(nu={})),pl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Xe.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Xe.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Xe.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Rd=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),pT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Rd(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(Sl.is(o)){const c=new pl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new pl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(bl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new pl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new pl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Rd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;un.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ta.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ta.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;un.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=Ra.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=Ra.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;un.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=$a.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=$a.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)}s(o,"is"),a.is=o})(Qd||(Qd={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)&&E.integer(l.version)}s(o,"is"),a.is=o})(ep||(ep={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)&&(l.version===null||E.integer(l.version))}s(o,"is"),a.is=o})(bl||(bl={})),(function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)&&E.string(l.languageId)&&E.integer(l.version)&&E.string(l.text)}s(o,"is"),a.is=o})(tp||(tp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i})(au||(au={})),(function(a){function i(o){const c=o;return E.objectLiteral(o)&&au.is(c.kind)&&E.string(c.value)}s(i,"is"),a.is=i})(Aa||(Aa={})),(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(rp||(rp={})),(function(a){a.PlainText=1,a.Snippet=2})(np||(np={})),(function(a){a.Deprecated=1})(ap||(ap={})),(function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&E.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o})(ip||(ip={})),(function(a){a.asIs=1,a.adjustIndentation=2})(sp||(sp={})),(function(a){function i(o){const c=o;return c&&(E.string(c.detail)||c.detail===void 0)&&(E.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i})(op||(op={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(lp||(lp={})),(function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i})(cp||(cp={})),(function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return E.string(l)||E.objectLiteral(l)&&E.string(l.language)&&E.string(l.value)}s(o,"is"),a.is=o})(wl||(wl={})),(function(a){function i(o){let c=o;return!!c&&E.objectLiteral(c)&&(Aa.is(c.contents)||wl.is(c.contents)||E.typedArray(c.contents,wl.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i})(up||(up={})),(function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i})(fp||(fp={})),(function(a){function i(o,c,...l){let u={label:o};return E.defined(c)&&(u.documentation=c),E.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i})(dp||(dp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(pp||(pp={})),(function(a){function i(o,c){let l={range:o};return E.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i})(hp||(hp={})),(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(mp||(mp={})),(function(a){a.Deprecated=1})(gp||(gp={})),(function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(yp||(yp={})),(function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i})(vp||(vp={})),(function(a){function i(c,l,u,f,d,p){let g={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(g.children=p),g}s(i,"create"),a.create=i;function o(c){let l=c;return l&&E.string(l.name)&&E.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||E.string(l.detail))&&(l.deprecated===void 0||E.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o})(Tp||(Tp={})),(function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"})(Rp||(Rp={})),(function(a){a.Invoked=1,a.Automatic=2})(Il||(Il={})),(function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.typedArray(l.diagnostics,Cl.is)&&(l.only===void 0||E.typedArray(l.only,E.string))&&(l.triggerKind===void 0||l.triggerKind===Il.Invoked||l.triggerKind===Il.Automatic)}s(o,"is"),a.is=o})($p||($p={})),(function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):cn.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&E.string(l.title)&&(l.diagnostics===void 0||E.typedArray(l.diagnostics,Cl.is))&&(l.kind===void 0||E.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||cn.is(l.command))&&(l.isPreferred===void 0||E.boolean(l.isPreferred))&&(l.edit===void 0||nu.is(l.edit))}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(c,l){let u={range:c};return E.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&ee.is(l.range)&&(E.undefined(l.command)||cn.is(l.command))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.uinteger(l.tabSize)&&E.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(_p||(_p={})),(function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&ee.is(l.range)&&(E.undefined(l.target)||E.string(l.target))}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(Sp||(Sp={})),(function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"})(bp||(bp={})),(function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"})(wp||(wp={})),(function(a){function i(o){const c=o;return E.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i})(Ip||(Ip={})),(function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&E.string(l.text)}s(o,"is"),a.is=o})(Np||(Np={})),(function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&E.boolean(l.caseSensitiveLookup)&&(E.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(kp||(kp={})),(function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(E.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return E.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o})(Op||(Op={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(iu||(iu={})),(function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&(l.tooltip===void 0||E.string(l.tooltip)||Aa.is(l.tooltip))&&(l.location===void 0||_l.is(l.location))&&(l.command===void 0||cn.is(l.command))}s(o,"is"),a.is=o})(su||(su={})),(function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&ie.is(l.position)&&(E.string(l.label)||E.typedArray(l.label,su.is))&&(l.kind===void 0||iu.is(l.kind))&&l.textEdits===void 0||E.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||E.string(l.tooltip)||Aa.is(l.tooltip))&&(l.paddingLeft===void 0||E.boolean(l.paddingLeft))&&(l.paddingRight===void 0||E.boolean(l.paddingRight))}s(o,"is"),a.is=o})(Lp||(Lp={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(Dp||(Dp={})),(function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i})(Mp||(Mp={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(xp||(xp={})),(function(a){a.Invoked=0,a.Automatic=1})(Fp||(Fp={})),(function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i})(Gp||(Gp={})),(function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o){const c=o;return E.objectLiteral(c)&&eu.is(c.uri)&&E.string(c.name)}s(i,"is"),a.is=i})(Up||(Up={})),hT=[`
|
|
1
|
+
import{aq as er}from"./index-OY1TIdAK.js";var LN=Object.create,pc=Object.defineProperty,DN=Object.getOwnPropertyDescriptor,xh=Object.getOwnPropertyNames,MN=Object.getPrototypeOf,xN=Object.prototype.hasOwnProperty,s=(t,e)=>pc(t,"name",{value:e,configurable:!0}),FN=(t,e)=>function(){return t&&(e=(0,t[xh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[xh(t)[0]])((e={exports:{}}).exports,e),e.exports},Zr=(t,e)=>{for(var r in e)pc(t,r,{get:e[r],enumerable:!0})},Fh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of xh(e))!xN.call(t,a)&&a!==r&&pc(t,a,{get:()=>e[a],enumerable:!(n=DN(e,a))||n.enumerable});return t},uf=(t,e,r)=>(Fh(t,e,"default"),r),Gh=(t,e,r)=>(r=t!=null?LN(MN(t)):{},Fh(pc(r,"default",{value:t,enumerable:!0}),t)),jh=t=>Fh(pc({},"__esModule",{value:!0}),t),ff={};Zr(ff,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>un,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>Ap,CodeActionContext:()=>$p,CodeActionKind:()=>Rp,CodeActionTriggerKind:()=>Il,CodeDescription:()=>Zd,CodeLens:()=>Ep,Color:()=>tu,ColorInformation:()=>Wd,ColorPresentation:()=>Vd,Command:()=>cn,CompletionItem:()=>lp,CompletionItemKind:()=>rp,CompletionItemLabelDetails:()=>op,CompletionItemTag:()=>ap,CompletionList:()=>cp,CreateFile:()=>Ta,DeleteFile:()=>$a,Diagnostic:()=>Cl,DiagnosticRelatedInformation:()=>ru,DiagnosticSeverity:()=>Xd,DiagnosticTag:()=>Jd,DocumentHighlight:()=>hp,DocumentHighlightKind:()=>pp,DocumentLink:()=>Cp,DocumentSymbol:()=>Tp,DocumentUri:()=>Bd,EOL:()=>hT,FoldingRange:()=>Yd,FoldingRangeKind:()=>Hd,FormattingOptions:()=>_p,Hover:()=>up,InlayHint:()=>Lp,InlayHintKind:()=>iu,InlayHintLabelPart:()=>su,InlineCompletionContext:()=>jp,InlineCompletionItem:()=>Mp,InlineCompletionList:()=>xp,InlineCompletionTriggerKind:()=>Fp,InlineValueContext:()=>Op,InlineValueEvaluatableExpression:()=>Pp,InlineValueText:()=>Np,InlineValueVariableLookup:()=>kp,InsertReplaceEdit:()=>ip,InsertTextFormat:()=>np,InsertTextMode:()=>sp,Location:()=>_l,LocationLink:()=>qd,MarkedString:()=>wl,MarkupContent:()=>Aa,MarkupKind:()=>au,OptionalVersionedTextDocumentIdentifier:()=>bl,ParameterInformation:()=>fp,Position:()=>ie,Range:()=>ee,RenameFile:()=>Ra,SelectedCompletionInfo:()=>Gp,SelectionRange:()=>Sp,SemanticTokenModifiers:()=>wp,SemanticTokenTypes:()=>bp,SemanticTokens:()=>Ip,SignatureInformation:()=>dp,StringValue:()=>Dp,SymbolInformation:()=>yp,SymbolKind:()=>mp,SymbolTag:()=>gp,TextDocument:()=>zp,TextDocumentEdit:()=>Sl,TextDocumentIdentifier:()=>Qd,TextDocumentItem:()=>tp,TextEdit:()=>rr,URI:()=>eu,VersionedTextDocumentIdentifier:()=>ep,WorkspaceChange:()=>pT,WorkspaceEdit:()=>nu,WorkspaceFolder:()=>Up,WorkspaceSymbol:()=>vp,integer:()=>Kd,uinteger:()=>El});var Bd,eu,Kd,El,ie,ee,_l,qd,tu,Wd,Vd,Hd,Yd,ru,Xd,Jd,Zd,Cl,cn,rr,un,Xe,Tr,Sl,Ta,Ra,$a,nu,pl,Rd,pT,Qd,ep,bl,tp,au,Aa,rp,np,ap,ip,sp,op,lp,cp,wl,up,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,Il,$p,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,iu,su,Lp,Dp,Mp,xp,Fp,Gp,jp,Up,hT,zp,Ey,E,hc=FN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Bd||(Bd={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(eu||(eu={})),(function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(Kd||(Kd={})),(function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(El||(El={})),(function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=El.MAX_VALUE),l===Number.MAX_VALUE&&(l=El.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&E.uinteger(l.line)&&E.uinteger(l.character)}s(o,"is"),a.is=o})(ie||(ie={})),(function(a){function i(c,l,u,f){if(E.uinteger(c)&&E.uinteger(l)&&E.uinteger(u)&&E.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o})(ee||(ee={})),(function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ee.is(l.range)&&(E.string(l.uri)||E.undefined(l.uri))}s(o,"is"),a.is=o})(_l||(_l={})),(function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ee.is(l.targetRange)&&E.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||E.undefined(l.originSelectionRange))}s(o,"is"),a.is=o})(qd||(qd={})),(function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.numberRange(l.red,0,1)&&E.numberRange(l.green,0,1)&&E.numberRange(l.blue,0,1)&&E.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o})(tu||(tu={})),(function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&ee.is(l.range)&&tu.is(l.color)}s(o,"is"),a.is=o})(Wd||(Wd={})),(function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.string(l.label)&&(E.undefined(l.textEdit)||rr.is(l))&&(E.undefined(l.additionalTextEdits)||E.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o})(Vd||(Vd={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(Hd||(Hd={})),(function(a){function i(c,l,u,f,d,p){const g={startLine:c,endLine:l};return E.defined(u)&&(g.startCharacter=u),E.defined(f)&&(g.endCharacter=f),E.defined(d)&&(g.kind=d),E.defined(p)&&(g.collapsedText=p),g}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.uinteger(l.startLine)&&E.uinteger(l.startLine)&&(E.undefined(l.startCharacter)||E.uinteger(l.startCharacter))&&(E.undefined(l.endCharacter)||E.uinteger(l.endCharacter))&&(E.undefined(l.kind)||E.string(l.kind))}s(o,"is"),a.is=o})(Yd||(Yd={})),(function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&_l.is(l.location)&&E.string(l.message)}s(o,"is"),a.is=o})(ru||(ru={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(Xd||(Xd={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Jd||(Jd={})),(function(a){function i(o){const c=o;return E.objectLiteral(c)&&E.string(c.href)}s(i,"is"),a.is=i})(Zd||(Zd={})),(function(a){function i(c,l,u,f,d,p){let g={range:c,message:l};return E.defined(u)&&(g.severity=u),E.defined(f)&&(g.code=f),E.defined(d)&&(g.source=d),E.defined(p)&&(g.relatedInformation=p),g}s(i,"create"),a.create=i;function o(c){var l;let u=c;return E.defined(u)&&ee.is(u.range)&&E.string(u.message)&&(E.number(u.severity)||E.undefined(u.severity))&&(E.integer(u.code)||E.string(u.code)||E.undefined(u.code))&&(E.undefined(u.codeDescription)||E.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(E.string(u.source)||E.undefined(u.source))&&(E.undefined(u.relatedInformation)||E.typedArray(u.relatedInformation,ru.is))}s(o,"is"),a.is=o})(Cl||(Cl={})),(function(a){function i(c,l,...u){let f={title:c,command:l};return E.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.title)&&E.string(l.command)}s(o,"is"),a.is=o})(cn||(cn={})),(function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return E.objectLiteral(f)&&E.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l})(rr||(rr={})),(function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&E.string(l.label)&&(E.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(E.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o})(un||(un={})),(function(a){function i(o){const c=o;return E.string(c)}s(i,"is"),a.is=i})(Xe||(Xe={})),(function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(un.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l})(Tr||(Tr={})),(function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&bl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(Sl||(Sl={})),(function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&E.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Ta||(Ta={})),(function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&E.string(l.oldUri)&&E.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||E.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||E.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Ra||(Ra={})),(function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&E.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||E.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||E.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})($a||($a={})),(function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>E.string(l.kind)?Ta.is(l)||Ra.is(l)||$a.is(l):Sl.is(l)))}s(i,"is"),a.is=i})(nu||(nu={})),pl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Xe.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Xe.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Xe.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Rd=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),pT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Rd(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(Sl.is(o)){const c=new pl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new pl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(bl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new pl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new pl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Rd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;un.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ta.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ta.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;un.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=Ra.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=Ra.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;un.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=$a.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=$a.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)}s(o,"is"),a.is=o})(Qd||(Qd={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)&&E.integer(l.version)}s(o,"is"),a.is=o})(ep||(ep={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)&&(l.version===null||E.integer(l.version))}s(o,"is"),a.is=o})(bl||(bl={})),(function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.string(l.uri)&&E.string(l.languageId)&&E.integer(l.version)&&E.string(l.text)}s(o,"is"),a.is=o})(tp||(tp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i})(au||(au={})),(function(a){function i(o){const c=o;return E.objectLiteral(o)&&au.is(c.kind)&&E.string(c.value)}s(i,"is"),a.is=i})(Aa||(Aa={})),(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(rp||(rp={})),(function(a){a.PlainText=1,a.Snippet=2})(np||(np={})),(function(a){a.Deprecated=1})(ap||(ap={})),(function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&E.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o})(ip||(ip={})),(function(a){a.asIs=1,a.adjustIndentation=2})(sp||(sp={})),(function(a){function i(o){const c=o;return c&&(E.string(c.detail)||c.detail===void 0)&&(E.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i})(op||(op={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(lp||(lp={})),(function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i})(cp||(cp={})),(function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return E.string(l)||E.objectLiteral(l)&&E.string(l.language)&&E.string(l.value)}s(o,"is"),a.is=o})(wl||(wl={})),(function(a){function i(o){let c=o;return!!c&&E.objectLiteral(c)&&(Aa.is(c.contents)||wl.is(c.contents)||E.typedArray(c.contents,wl.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i})(up||(up={})),(function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i})(fp||(fp={})),(function(a){function i(o,c,...l){let u={label:o};return E.defined(c)&&(u.documentation=c),E.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i})(dp||(dp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(pp||(pp={})),(function(a){function i(o,c){let l={range:o};return E.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i})(hp||(hp={})),(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(mp||(mp={})),(function(a){a.Deprecated=1})(gp||(gp={})),(function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(yp||(yp={})),(function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i})(vp||(vp={})),(function(a){function i(c,l,u,f,d,p){let g={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(g.children=p),g}s(i,"create"),a.create=i;function o(c){let l=c;return l&&E.string(l.name)&&E.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||E.string(l.detail))&&(l.deprecated===void 0||E.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o})(Tp||(Tp={})),(function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"})(Rp||(Rp={})),(function(a){a.Invoked=1,a.Automatic=2})(Il||(Il={})),(function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.typedArray(l.diagnostics,Cl.is)&&(l.only===void 0||E.typedArray(l.only,E.string))&&(l.triggerKind===void 0||l.triggerKind===Il.Invoked||l.triggerKind===Il.Automatic)}s(o,"is"),a.is=o})($p||($p={})),(function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):cn.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&E.string(l.title)&&(l.diagnostics===void 0||E.typedArray(l.diagnostics,Cl.is))&&(l.kind===void 0||E.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||cn.is(l.command))&&(l.isPreferred===void 0||E.boolean(l.isPreferred))&&(l.edit===void 0||nu.is(l.edit))}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(c,l){let u={range:c};return E.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&ee.is(l.range)&&(E.undefined(l.command)||cn.is(l.command))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&E.uinteger(l.tabSize)&&E.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(_p||(_p={})),(function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return E.defined(l)&&ee.is(l.range)&&(E.undefined(l.target)||E.string(l.target))}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return E.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(Sp||(Sp={})),(function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"})(bp||(bp={})),(function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"})(wp||(wp={})),(function(a){function i(o){const c=o;return E.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i})(Ip||(Ip={})),(function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&E.string(l.text)}s(o,"is"),a.is=o})(Np||(Np={})),(function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&E.boolean(l.caseSensitiveLookup)&&(E.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(kp||(kp={})),(function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(E.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return E.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o})(Op||(Op={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(iu||(iu={})),(function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&(l.tooltip===void 0||E.string(l.tooltip)||Aa.is(l.tooltip))&&(l.location===void 0||_l.is(l.location))&&(l.command===void 0||cn.is(l.command))}s(o,"is"),a.is=o})(su||(su={})),(function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return E.objectLiteral(l)&&ie.is(l.position)&&(E.string(l.label)||E.typedArray(l.label,su.is))&&(l.kind===void 0||iu.is(l.kind))&&l.textEdits===void 0||E.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||E.string(l.tooltip)||Aa.is(l.tooltip))&&(l.paddingLeft===void 0||E.boolean(l.paddingLeft))&&(l.paddingRight===void 0||E.boolean(l.paddingRight))}s(o,"is"),a.is=o})(Lp||(Lp={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(Dp||(Dp={})),(function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i})(Mp||(Mp={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(xp||(xp={})),(function(a){a.Invoked=0,a.Automatic=1})(Fp||(Fp={})),(function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i})(Gp||(Gp={})),(function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o){const c=o;return E.objectLiteral(c)&&eu.is(c.uri)&&E.string(c.name)}s(i,"is"),a.is=i})(Up||(Up={})),hT=[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`,"\r"],(function(a){function i(u,f,d,p){return new Ey(u,f,d,p)}s(i,"create"),a.create=i;function o(u){let f=u;return!!(E.defined(f)&&E.string(f.uri)&&(E.undefined(f.languageId)||E.string(f.languageId))&&E.uinteger(f.lineCount)&&E.func(f.getText)&&E.func(f.positionAt)&&E.func(f.offsetAt))}s(o,"is"),a.is=o;function c(u,f){let d=u.getText(),p=l(f,(m,T)=>{let _=m.range.start.line-T.range.start.line;return _===0?m.range.start.character-T.range.start.character:_}),g=d.length;for(let m=p.length-1;m>=0;m--){let T=p[m],_=u.offsetAt(T.range.start),v=u.offsetAt(T.range.end);if(v<=g)d=d.substring(0,_)+T.newText+d.substring(v,d.length);else throw new Error("Overlapping edit");g=_}return d}s(c,"applyEdits"),a.applyEdits=c;function l(u,f){if(u.length<=1)return u;const d=u.length/2|0,p=u.slice(0,d),g=u.slice(d);l(p,f),l(g,f);let m=0,T=0,_=0;for(;m<p.length&&T<g.length;)f(p[m],g[T])<=0?u[_++]=p[m++]:u[_++]=g[T++];for(;m<p.length;)u[_++]=p[m++];for(;T<g.length;)u[_++]=g[T++];return u}s(l,"mergeSort")})(zp||(zp={})),Ey=(n=class{constructor(i,o,c,l){this._uri=i,this._languageId=o,this._version=c,this._content=l,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let o=this.offsetAt(i.start),c=this.offsetAt(i.end);return this._content.substring(o,c)}return this._content}update(i,o){this._content=i.text,this._version=o,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],o=this._content,c=!0;for(let l=0;l<o.length;l++){c&&(i.push(l),c=!1);let u=o.charAt(l);c=u==="\r"||u===`
|
|
4
4
|
`,u==="\r"&&l+1<o.length&&o.charAt(l+1)===`
|