handmux 0.33.2 → 0.33.4
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/build-meta.json +3 -3
- package/dist/package.json +13 -13
- package/dist/public/assets/{abnfDiagram-O67JEVCF-CEQgAYi1.js → abnfDiagram-O67JEVCF-CTyexkYw.js} +1 -1
- package/dist/public/assets/{arc-gObMfWQt.js → arc-DdDiy07q.js} +1 -1
- package/dist/public/assets/{architectureDiagram-NJMV4G6O-C_xZNQjZ.js → architectureDiagram-NJMV4G6O-Bot9hstQ.js} +1 -1
- package/dist/public/assets/{blockDiagram-BEXU5L5S-BAoZ2IDv.js → blockDiagram-BEXU5L5S-W9XzhGdS.js} +1 -1
- package/dist/public/assets/{c4Diagram-YGBWAQC7-B2NSKFIB.js → c4Diagram-YGBWAQC7-BAijt2HM.js} +1 -1
- package/dist/public/assets/channel-CKSNhfVj.js +1 -0
- package/dist/public/assets/{chunk-2Q5K7J3B-K0QpQx4V.js → chunk-2Q5K7J3B-B2piJqsT.js} +1 -1
- package/dist/public/assets/{chunk-3FUC2YCW-xsylvvKQ.js → chunk-3FUC2YCW-D3Sx9dKt.js} +2 -2
- package/dist/public/assets/{chunk-5VM5RSS4-Bu5nSAVn.js → chunk-5VM5RSS4-BUArEHwl.js} +1 -1
- package/dist/public/assets/{chunk-GTNCS2PH-BdympnRg.js → chunk-GTNCS2PH-CCbMJktB.js} +1 -1
- package/dist/public/assets/{chunk-GWA4HPMP-Dq6iCE-e.js → chunk-GWA4HPMP-C6TuPRFq.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-Bz98Hu8d.js → chunk-JWPE2WC7-aSSTyo6M.js} +1 -1
- package/dist/public/assets/{chunk-NETBCI7D-C_B-DWYb.js → chunk-NETBCI7D-CjU_M6rV.js} +1 -1
- package/dist/public/assets/{chunk-WEXAMYUT-Dd1kDMJp.js → chunk-WEXAMYUT-DoGrOfJC.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-D1iZdH4V.js → chunk-XXDRQBXY-DsVaYCaN.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-NBCMYWYE-TbHVtlsK.js → classDiagram-v2-NBCMYWYE-DY7FiJEP.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-CRDXT20A.js → cose-bilkent-JH36ORCC-BXxbe0fb.js} +1 -1
- package/dist/public/assets/{cynefin-OW5HDTMX-BjiH0OhR.js → cynefin-OW5HDTMX-CCDWLi08.js} +1 -1
- package/dist/public/assets/{cynefinDiagram-VND7K2PF-BxTreWie.js → cynefinDiagram-VND7K2PF-DZqqidYi.js} +1 -1
- package/dist/public/assets/{dagre-6A5THRUB-Cf9vO3PH.js → dagre-6A5THRUB-mnFkYCPJ.js} +1 -1
- package/dist/public/assets/{diagram-22UHCM2B-DKiEsIcj.js → diagram-22UHCM2B-24J1jkjw.js} +1 -1
- package/dist/public/assets/{diagram-3UASUU5V-BWEV32hy.js → diagram-3UASUU5V-BjrIrnar.js} +1 -1
- package/dist/public/assets/{diagram-ATOU4E4O-DpX9ClkT.js → diagram-ATOU4E4O-Z1JX3sq5.js} +1 -1
- package/dist/public/assets/{diagram-CDSNMT55-BDsVk1ax.js → diagram-CDSNMT55-C_prd06u.js} +1 -1
- package/dist/public/assets/{diagram-MLGK6HIB-SAwq9615.js → diagram-MLGK6HIB-D9mjfvWc.js} +1 -1
- package/dist/public/assets/{diagram-MPIPVDR6-D1dhiC50.js → diagram-MPIPVDR6-Dk23DnyI.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-ZINNZB2B-d2s3skPq.js → ebnfDiagram-ZINNZB2B-BFAi_SN0.js} +1 -1
- package/dist/public/assets/{elk-276RUBZZ-Dj1QJ_m7.js → elk-276RUBZZ-85AZyxvX.js} +1 -1
- package/dist/public/assets/{erDiagram-OPXOYQCR-BXjQfyS4.js → erDiagram-OPXOYQCR-DGK2YMJn.js} +1 -1
- package/dist/public/assets/{flowDiagram-KWPJA3E3-DPwKY_iH.js → flowDiagram-KWPJA3E3-AbELUL1s.js} +1 -1
- package/dist/public/assets/{ganttDiagram-FUAMR5RP-Dxu6YY8n.js → ganttDiagram-FUAMR5RP-D4EwkrB-.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-X574FWY7-CUf4BDYT.js → gitGraphDiagram-X574FWY7-SuIg9MNn.js} +1 -1
- package/dist/public/assets/index-1-G2JyaA.js +363 -0
- package/dist/public/assets/{infoDiagram-VRGFBTTK-Ezboy1z0.js → infoDiagram-VRGFBTTK-USYiLU2N.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-OU5B5YK6-CO4KGQtx.js → ishikawaDiagram-OU5B5YK6-DKl1cwGt.js} +1 -1
- package/dist/public/assets/{journeyDiagram-ZHPQQLJL-BIHomnNS.js → journeyDiagram-ZHPQQLJL-DA6WJWzc.js} +1 -1
- package/dist/public/assets/{kanban-definition-PNTS6WVX-Dd-ZhTiW.js → kanban-definition-PNTS6WVX-CHwoeiSV.js} +1 -1
- package/dist/public/assets/{linear-DiQLsGJD.js → linear-CrX1doCP.js} +1 -1
- package/dist/public/assets/{mermaid.core-BVBLuQ4L.js → mermaid.core-DycEQHIJ.js} +4 -4
- package/dist/public/assets/{mindmap-definition-NLK3R4M7-DgCZ1THg.js → mindmap-definition-NLK3R4M7-CYZkgL2m.js} +1 -1
- package/dist/public/assets/{pegDiagram-GJSIUBJH-NzxNKBVq.js → pegDiagram-GJSIUBJH-CLBKPdy7.js} +1 -1
- package/dist/public/assets/{pieDiagram-5QR66LMP-BbqW9zhn.js → pieDiagram-5QR66LMP-fqgZKq3d.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-O4NWA36T-CpzMtU5x.js → quadrantDiagram-O4NWA36T-Dpz9EdzN.js} +1 -1
- package/dist/public/assets/{railroadDiagram-XR7U4H2S-CrkG84hw.js → railroadDiagram-XR7U4H2S-CrjZ98Io.js} +1 -1
- package/dist/public/assets/{requirementDiagram-PLB6GJNP-Q0UAuo9v.js → requirementDiagram-PLB6GJNP-3uFiTOPz.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-IPEJSGJF-BESz67zf.js → sankeyDiagram-IPEJSGJF-BB4xiA5r.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-PO4LG4MO-ZEVvVKw2.js → sequenceDiagram-PO4LG4MO-CSV5btYj.js} +1 -1
- package/dist/public/assets/{sizeCapture-INFHLROL-CsfZkbtN.js → sizeCapture-INFHLROL-CZM8lmXs.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-GCMORJYK-DFlA40kP.js → stateDiagram-v2-GCMORJYK-CQMNaqRS.js} +1 -1
- package/dist/public/assets/{swimlanes-2SLR337P-DiXugNrr.js → swimlanes-2SLR337P-D4XoDXeX.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-TC7HE7FX-aOhW9PVk.js +8 -0
- package/dist/public/assets/{timeline-definition-EJHVYXUP-V0cPbycq.js → timeline-definition-EJHVYXUP-8vN31GK-.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-POWQR4AR-DLPAg98Z.js → usecaseDiagram-POWQR4AR-DV8aZbyi.js} +1 -1
- package/dist/public/assets/{vennDiagram-UO4OBE2U-mx17DyZw.js → vennDiagram-UO4OBE2U-CzhdJPaP.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-VNRHLVJA-2abV5MJ_.js → wardleyDiagram-VNRHLVJA-Br_J8zgL.js} +1 -1
- package/dist/public/assets/{xychartDiagram-PMCCYNJV-DImmlCIa.js → xychartDiagram-PMCCYNJV-DV4_m3f4.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/src/agent-runtime/builtinRuntime.js +10 -6
- package/dist/src/agent-runtime/conversation.js +5 -0
- package/dist/src/agents/hookEvents.js +6 -0
- package/dist/src/codexAppServer.js +1 -0
- package/dist/src/terminalStream.js +19 -3
- package/dist/src/tmux/commands.js +11 -4
- package/package.json +4 -4
- package/dist/public/assets/channel-BQPKZepC.js +0 -1
- package/dist/public/assets/index-CTECnRDI.js +0 -199
- package/dist/public/assets/swimlanesDiagram-TC7HE7FX-BE21W-TR.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as l,a3 as gt,A as nt,aw as Pt,ax as Bt,aD as Vt,M as Ft,a4 as ft,aH as S,b8 as zt,aU as Gt,bf as yt,b7 as J,_ as Ot,B as Dt,u as Ut}from"./mermaid.core-
|
|
1
|
+
import{c as l,a3 as gt,A as nt,aw as Pt,ax as Bt,aD as Vt,M as Ft,a4 as ft,aH as S,b8 as zt,aU as Gt,bf as yt,b7 as J,_ as Ot,B as Dt,u as Ut}from"./mermaid.core-DycEQHIJ.js";import{d as lt}from"./arc-DdDiy07q.js";import"./index-1-G2JyaA.js";var tt=function(){var e=l(function(k,i,d,h){for(d=d||{},h=k.length;h--;d[k[h]]=i);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],s=[1,12],r=[1,13],n=[1,14],o=[1,15],a=[1,16],c=[1,19],p=[1,20],y={trace:l(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:l(function(i,d,h,g,x,u,w){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.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:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.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:s,15:r,17:n,19:o,20:a,21:17,22:18,23:c,24:p},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:s,15:r,17:n,19:o,20:a,21:17,22:18,23:c,24:p},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:l(function(i,d){if(d.recoverable)this.trace(i);else{var h=new Error(i);throw h.hash=d,h}},"parseError"),parse:l(function(i){var d=this,h=[0],g=[],x=[null],u=[],w=this.table,v="",M=0,R=0,P=2,V=1,L=u.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);_.setInput(i,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;u.push(z);var q=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(A){h.length=h.length-2*A,x.length=x.length-A,u.length=u.length-A}l(U,"popStack");function O(){var A;return A=g.pop()||_.lex()||V,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}l(O,"lex");for(var $,N,b,T,E={},H,I,B,D;;){if(N=h[h.length-1],this.defaultActions[N]?b=this.defaultActions[N]:(($===null||typeof $>"u")&&($=O()),b=w[N]&&w[N][$]),typeof b>"u"||!b.length||!b[0]){var K="";D=[];for(H in w[N])this.terminals_[H]&&H>P&&D.push("'"+this.terminals_[H]+"'");_.showPosition?K="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+D.join(", ")+", got '"+(this.terminals_[$]||$)+"'":K="Parse error on line "+(M+1)+": Unexpected "+($==V?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(K,{text:_.match,token:this.terminals_[$]||$,line:_.yylineno,loc:z,expected:D})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+$);switch(b[0]){case 1:h.push($),x.push(_.yytext),u.push(_.yylloc),h.push(b[1]),$=null,R=_.yyleng,v=_.yytext,M=_.yylineno,z=_.yylloc;break;case 2:if(I=this.productions_[b[1]][1],E.$=x[x.length-I],E._$={first_line:u[u.length-(I||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(I||1)].first_column,last_column:u[u.length-1].last_column},q&&(E._$.range=[u[u.length-(I||1)].range[0],u[u.length-1].range[1]]),T=this.performAction.apply(E,[v,R,M,C.yy,b[1],x,u].concat(L)),typeof T<"u")return T;I&&(h=h.slice(0,-1*I*2),x=x.slice(0,-1*I),u=u.slice(0,-1*I)),h.push(this.productions_[b[1]][0]),x.push(E.$),u.push(E._$),B=w[h[h.length-2]][h[h.length-1]],h.push(B);break;case 3:return!0}}return!0},"parse")},m=function(){var k={EOF:1,parseError:l(function(d,h){if(this.yy.parser)this.yy.parser.parseError(d,h);else throw new Error(d)},"parseError"),setInput:l(function(i,d){return this.yy=d||this.yy||{},this._input=i,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:l(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var d=i.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),i},"input"),unput:l(function(i){var d=i.length,h=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.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:h?(h.length===g.length?this.yylloc.first_column:0)+g[g.length-h.length].length-h[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:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(i){this.unput(this.match.slice(i))},"less"),pastInput:l(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var i=this.pastInput(),d=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ma}from"./chunk-XXDRQBXY-D1iZdH4V.js";import{s as Ea}from"./chunk-WEXAMYUT-Dd1kDMJp.js";import{a1 as Mn,b9 as ms,a2 as wn,ba as Es,a5 as ga,bc as Ta,c as u,b4 as ht,aH as Aa,a4 as Un,a8 as Sa,b0 as ya,bw as La,b5 as Ra,u as Na,S as Oa,aw as ka,a3 as Ia,ai as Ca,aT as ba,aJ as va,b7 as _a}from"./mermaid.core-BVBLuQ4L.js";import{j as xa,i as Ma,a as wa,c as Ua,w as xs,u as T,b as Pa,n as Da,e as Fa,m as ue,l as Ze,p as y,k as Ms,t as Be}from"./_basePickBy-BzC0P9Wg.js";import{X as Ba,N as Pn,$ as Qe,j as ws,t as St,M as W,S as $a,e as Ga,x as Wa,u as Ka,O as qs,m as Dn,W as Fn,r as Bn,aa as P,s as $n,v as ja,a0 as Zs,g as Va,d as za,k as Ha,i as Ya,w as Xa,E as R,_ as Oe,R as Ge,a4 as Q,Q as C,D as oe,a1 as $,K as Ja,V as qa}from"./_baseUniq-DNOfPYVY.js";import"./index-CTECnRDI.js";var Za=Object.prototype,Qa=Za.hasOwnProperty,ee=xa(function(s,e){if(Ba(e)||Pn(e)){Ma(e,Qe(e),s);return}for(var t in e)Qa.call(e,t)&&wa(s,t,e[t])});function Gn(s,e,t){var n=-1,i=s.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=s[n+e];return a}var er=4;function K(s){return Ua(s,er)}function yt(s){for(var e=-1,t=s==null?0:s.length,n=0,i=[];++e<t;){var a=s[e];a&&(i[n++]=a)}return i}function tr(s,e,t,n){for(var i=-1,a=s==null?0:s.length;++i<a;){var r=s[i];e(n,r,t(r),s)}return n}function sr(s,e,t,n){return ws(s,function(i,a,r){e(n,i,t(i),r)}),n}function nr(s,e){return function(t,n){var i=W(t)?tr:sr,a=e?e():{};return i(t,s,St(n),a)}}var ir=200;function ar(s,e,t,n){var i=-1,a=Ga,r=!0,o=s.length,l=[],h=e.length;if(!o)return l;e.length>=ir&&(a=Wa,r=!1,e=new $a(e));e:for(;++i<o;){var d=s[i],c=d;if(d=d!==0?d:0,r&&c===c){for(var f=h;f--;)if(e[f]===c)continue e;l.push(d)}else a(e,c,n)||l.push(d)}return l}var Zt=Ka(function(s,e){return qs(s)?ar(s,Dn(e,1,qs,!0)):[]});function G(s,e,t){var n=s==null?0:s.length;return n?(e=e===void 0?1:xs(e),Gn(s,e<0?0:e,n)):[]}function At(s,e,t){var n=s==null?0:s.length;return n?(e=e===void 0?1:xs(e),e=n-e,Gn(s,0,e<0?0:e)):[]}function rr(s,e){for(var t=-1,n=s==null?0:s.length;++t<n;)if(!e(s[t],t,s))return!1;return!0}function or(s,e){var t=!0;return ws(s,function(n,i,a){return t=!!e(n,i,a),t}),t}function de(s,e,t){var n=W(s)?rr:or;return n(s,St(e))}function fe(s){return s&&s.length?s[0]:void 0}function re(s,e){return Dn(T(s,e))}var lr=Object.prototype,cr=lr.hasOwnProperty,hr=nr(function(s,e,t){cr.call(s,t)?s[t].push(e):Pa(s,t,[e])}),ur="[object String]";function q(s){return typeof s=="string"||!W(s)&&Fn(s)&&Bn(s)==ur}var dr=Math.max;function Y(s,e,t,n){s=Pn(s)?s:P(s),t=t?xs(t):0;var i=s.length;return t<0&&(t=dr(i+t,0)),q(s)?t<=i&&s.indexOf(e,t)>-1:!!i&&$n(s,e,t)>-1}function Qs(s,e,t){var n=s==null?0:s.length;if(!n)return-1;var i=0;return $n(s,e,i)}var fr="[object RegExp]";function pr(s){return Fn(s)&&Bn(s)==fr}var en=Zs&&Zs.isRegExp,ke=en?ja(en):pr,mr="Expected a function";function Er(s){if(typeof s!="function")throw new TypeError(mr);return function(){var e=arguments;switch(e.length){case 0:return!s.call(this);case 1:return!s.call(this,e[0]);case 2:return!s.call(this,e[0],e[1]);case 3:return!s.call(this,e[0],e[1],e[2])}return!s.apply(this,e)}}function pe(s,e){if(s==null)return{};var t=Va(Da(s),function(n){return[n]});return e=St(e),Fa(s,t,function(n,i){return e(n,i[0])})}function Qt(s,e){var t=W(s)?za:Ha;return t(s,Er(St(e)))}function gr(s,e){var t;return ws(s,function(n,i,a){return t=e(n,i,a),!t}),!!t}function Wn(s,e,t){var n=W(s)?Ya:gr;return n(s,St(e))}function Us(s){return s&&s.length?Xa(s):[]}function gs(s){console&&console.error&&console.error(`Error: ${s}`)}function Kn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function jn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function Vn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Tr(s){return Ar(s)?s.LABEL:s.name}function Ar(s){return q(s.LABEL)&&s.LABEL!==""}class Ae{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),R(this.definition,t=>{t.accept(e)})}}class te extends Ae{constructor(e){super([]),this.idx=1,ee(this,pe(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class et extends Ae{constructor(e){super(e.definition),this.orgText="",ee(this,pe(e,t=>t!==void 0))}}class Z extends Ae{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ee(this,pe(e,t=>t!==void 0))}}class J extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class Se extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class ye extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class D extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class me extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class Ee extends Ae{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,ee(this,pe(e,t=>t!==void 0))}}class v{constructor(e){this.idx=1,ee(this,pe(e,t=>t!==void 0))}accept(e){e.visit(this)}}function Sr(s){return T(s,_t)}function _t(s){function e(t){return T(t,_t)}if(s instanceof te){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return q(s.label)&&(t.label=s.label),t}else{if(s instanceof Z)return{type:"Alternative",definition:e(s.definition)};if(s instanceof J)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof Se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ye)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:_t(new v({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof me)return{type:"RepetitionWithSeparator",idx:s.idx,separator:_t(new v({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof D)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Ee)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof v){const t={type:"Terminal",name:s.terminalType.name,label:Tr(s.terminalType),idx:s.idx};q(s.label)&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=ke(n)?n.source:n),t}else{if(s instanceof et)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}class tt{visit(e){const t=e;switch(t.constructor){case te:return this.visitNonTerminal(t);case Z:return this.visitAlternative(t);case J:return this.visitOption(t);case Se:return this.visitRepetitionMandatory(t);case ye:return this.visitRepetitionMandatoryWithSeparator(t);case me:return this.visitRepetitionWithSeparator(t);case D:return this.visitRepetition(t);case Ee:return this.visitAlternation(t);case v:return this.visitTerminal(t);case et:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function yr(s){return s instanceof Z||s instanceof J||s instanceof D||s instanceof Se||s instanceof ye||s instanceof me||s instanceof v||s instanceof et}function Wt(s,e=[]){return s instanceof J||s instanceof D||s instanceof me?!0:s instanceof Ee?Wn(s.definition,n=>Wt(n,e)):s instanceof te&&Y(e,s)?!1:s instanceof Ae?(s instanceof te&&e.push(s),de(s.definition,n=>Wt(n,e))):!1}function Lr(s){return s instanceof Ee}function Te(s){if(s instanceof te)return"SUBRULE";if(s instanceof J)return"OPTION";if(s instanceof Ee)return"OR";if(s instanceof Se)return"AT_LEAST_ONE";if(s instanceof ye)return"AT_LEAST_ONE_SEP";if(s instanceof me)return"MANY_SEP";if(s instanceof D)return"MANY";if(s instanceof v)return"CONSUME";throw Error("non exhaustive match")}class es{walk(e,t=[]){R(e.definition,(n,i)=>{const a=G(e.definition,i+1);if(n instanceof te)this.walkProdRef(n,a,t);else if(n instanceof v)this.walkTerminal(n,a,t);else if(n instanceof Z)this.walkFlat(n,a,t);else if(n instanceof J)this.walkOption(n,a,t);else if(n instanceof Se)this.walkAtLeastOne(n,a,t);else if(n instanceof ye)this.walkAtLeastOneSep(n,a,t);else if(n instanceof me)this.walkManySep(n,a,t);else if(n instanceof D)this.walkMany(n,a,t);else if(n instanceof Ee)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new J({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=tn(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new J({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=tn(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);R(e.definition,a=>{const r=new Z({definition:[a]});this.walk(r,i)})}}function tn(s,e,t){return[new J({definition:[new v({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Lt(s){if(s instanceof te)return Lt(s.referencedRule);if(s instanceof v)return Or(s);if(yr(s))return Rr(s);if(Lr(s))return Nr(s);throw Error("non exhaustive match")}function Rr(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Wt(a),e=e.concat(Lt(a)),n=n+1,i=t.length>n;return Us(e)}function Nr(s){const e=T(s.definition,t=>Lt(t));return Us(ue(e))}function Or(s){return[s.terminalType]}const zn="_~IN~_";class kr extends es{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=Cr(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new Z({definition:a}),o=Lt(r);this.follows[i]=o}}function Ir(s){const e={};return R(s,t=>{const n=new kr(t).startWalking();ee(e,n)}),e}function Cr(s,e){return s.name+e+zn}function N(s){return s.charCodeAt(0)}function cs(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function ot(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Ke(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function br(){throw Error("Internal Error - Should never get here!")}function sn(s){return s.type==="Character"}const Kt=[];for(let s=N("0");s<=N("9");s++)Kt.push(s);const jt=[N("_")].concat(Kt);for(let s=N("a");s<=N("z");s++)jt.push(s);for(let s=N("A");s<=N("Z");s++)jt.push(s);const nn=[N(" "),N("\f"),N(`
|
|
1
|
+
import{g as ma}from"./chunk-XXDRQBXY-DsVaYCaN.js";import{s as Ea}from"./chunk-WEXAMYUT-DoGrOfJC.js";import{a1 as Mn,b9 as ms,a2 as wn,ba as Es,a5 as ga,bc as Ta,c as u,b4 as ht,aH as Aa,a4 as Un,a8 as Sa,b0 as ya,bw as La,b5 as Ra,u as Na,S as Oa,aw as ka,a3 as Ia,ai as Ca,aT as ba,aJ as va,b7 as _a}from"./mermaid.core-DycEQHIJ.js";import{j as xa,i as Ma,a as wa,c as Ua,w as xs,u as T,b as Pa,n as Da,e as Fa,m as ue,l as Ze,p as y,k as Ms,t as Be}from"./_basePickBy-BzC0P9Wg.js";import{X as Ba,N as Pn,$ as Qe,j as ws,t as St,M as W,S as $a,e as Ga,x as Wa,u as Ka,O as qs,m as Dn,W as Fn,r as Bn,aa as P,s as $n,v as ja,a0 as Zs,g as Va,d as za,k as Ha,i as Ya,w as Xa,E as R,_ as Oe,R as Ge,a4 as Q,Q as C,D as oe,a1 as $,K as Ja,V as qa}from"./_baseUniq-DNOfPYVY.js";import"./index-1-G2JyaA.js";var Za=Object.prototype,Qa=Za.hasOwnProperty,ee=xa(function(s,e){if(Ba(e)||Pn(e)){Ma(e,Qe(e),s);return}for(var t in e)Qa.call(e,t)&&wa(s,t,e[t])});function Gn(s,e,t){var n=-1,i=s.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=s[n+e];return a}var er=4;function K(s){return Ua(s,er)}function yt(s){for(var e=-1,t=s==null?0:s.length,n=0,i=[];++e<t;){var a=s[e];a&&(i[n++]=a)}return i}function tr(s,e,t,n){for(var i=-1,a=s==null?0:s.length;++i<a;){var r=s[i];e(n,r,t(r),s)}return n}function sr(s,e,t,n){return ws(s,function(i,a,r){e(n,i,t(i),r)}),n}function nr(s,e){return function(t,n){var i=W(t)?tr:sr,a=e?e():{};return i(t,s,St(n),a)}}var ir=200;function ar(s,e,t,n){var i=-1,a=Ga,r=!0,o=s.length,l=[],h=e.length;if(!o)return l;e.length>=ir&&(a=Wa,r=!1,e=new $a(e));e:for(;++i<o;){var d=s[i],c=d;if(d=d!==0?d:0,r&&c===c){for(var f=h;f--;)if(e[f]===c)continue e;l.push(d)}else a(e,c,n)||l.push(d)}return l}var Zt=Ka(function(s,e){return qs(s)?ar(s,Dn(e,1,qs,!0)):[]});function G(s,e,t){var n=s==null?0:s.length;return n?(e=e===void 0?1:xs(e),Gn(s,e<0?0:e,n)):[]}function At(s,e,t){var n=s==null?0:s.length;return n?(e=e===void 0?1:xs(e),e=n-e,Gn(s,0,e<0?0:e)):[]}function rr(s,e){for(var t=-1,n=s==null?0:s.length;++t<n;)if(!e(s[t],t,s))return!1;return!0}function or(s,e){var t=!0;return ws(s,function(n,i,a){return t=!!e(n,i,a),t}),t}function de(s,e,t){var n=W(s)?rr:or;return n(s,St(e))}function fe(s){return s&&s.length?s[0]:void 0}function re(s,e){return Dn(T(s,e))}var lr=Object.prototype,cr=lr.hasOwnProperty,hr=nr(function(s,e,t){cr.call(s,t)?s[t].push(e):Pa(s,t,[e])}),ur="[object String]";function q(s){return typeof s=="string"||!W(s)&&Fn(s)&&Bn(s)==ur}var dr=Math.max;function Y(s,e,t,n){s=Pn(s)?s:P(s),t=t?xs(t):0;var i=s.length;return t<0&&(t=dr(i+t,0)),q(s)?t<=i&&s.indexOf(e,t)>-1:!!i&&$n(s,e,t)>-1}function Qs(s,e,t){var n=s==null?0:s.length;if(!n)return-1;var i=0;return $n(s,e,i)}var fr="[object RegExp]";function pr(s){return Fn(s)&&Bn(s)==fr}var en=Zs&&Zs.isRegExp,ke=en?ja(en):pr,mr="Expected a function";function Er(s){if(typeof s!="function")throw new TypeError(mr);return function(){var e=arguments;switch(e.length){case 0:return!s.call(this);case 1:return!s.call(this,e[0]);case 2:return!s.call(this,e[0],e[1]);case 3:return!s.call(this,e[0],e[1],e[2])}return!s.apply(this,e)}}function pe(s,e){if(s==null)return{};var t=Va(Da(s),function(n){return[n]});return e=St(e),Fa(s,t,function(n,i){return e(n,i[0])})}function Qt(s,e){var t=W(s)?za:Ha;return t(s,Er(St(e)))}function gr(s,e){var t;return ws(s,function(n,i,a){return t=e(n,i,a),!t}),!!t}function Wn(s,e,t){var n=W(s)?Ya:gr;return n(s,St(e))}function Us(s){return s&&s.length?Xa(s):[]}function gs(s){console&&console.error&&console.error(`Error: ${s}`)}function Kn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function jn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function Vn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Tr(s){return Ar(s)?s.LABEL:s.name}function Ar(s){return q(s.LABEL)&&s.LABEL!==""}class Ae{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),R(this.definition,t=>{t.accept(e)})}}class te extends Ae{constructor(e){super([]),this.idx=1,ee(this,pe(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class et extends Ae{constructor(e){super(e.definition),this.orgText="",ee(this,pe(e,t=>t!==void 0))}}class Z extends Ae{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ee(this,pe(e,t=>t!==void 0))}}class J extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class Se extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class ye extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class D extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class me extends Ae{constructor(e){super(e.definition),this.idx=1,ee(this,pe(e,t=>t!==void 0))}}class Ee extends Ae{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,ee(this,pe(e,t=>t!==void 0))}}class v{constructor(e){this.idx=1,ee(this,pe(e,t=>t!==void 0))}accept(e){e.visit(this)}}function Sr(s){return T(s,_t)}function _t(s){function e(t){return T(t,_t)}if(s instanceof te){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return q(s.label)&&(t.label=s.label),t}else{if(s instanceof Z)return{type:"Alternative",definition:e(s.definition)};if(s instanceof J)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof Se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ye)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:_t(new v({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof me)return{type:"RepetitionWithSeparator",idx:s.idx,separator:_t(new v({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof D)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Ee)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof v){const t={type:"Terminal",name:s.terminalType.name,label:Tr(s.terminalType),idx:s.idx};q(s.label)&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=ke(n)?n.source:n),t}else{if(s instanceof et)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}class tt{visit(e){const t=e;switch(t.constructor){case te:return this.visitNonTerminal(t);case Z:return this.visitAlternative(t);case J:return this.visitOption(t);case Se:return this.visitRepetitionMandatory(t);case ye:return this.visitRepetitionMandatoryWithSeparator(t);case me:return this.visitRepetitionWithSeparator(t);case D:return this.visitRepetition(t);case Ee:return this.visitAlternation(t);case v:return this.visitTerminal(t);case et:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function yr(s){return s instanceof Z||s instanceof J||s instanceof D||s instanceof Se||s instanceof ye||s instanceof me||s instanceof v||s instanceof et}function Wt(s,e=[]){return s instanceof J||s instanceof D||s instanceof me?!0:s instanceof Ee?Wn(s.definition,n=>Wt(n,e)):s instanceof te&&Y(e,s)?!1:s instanceof Ae?(s instanceof te&&e.push(s),de(s.definition,n=>Wt(n,e))):!1}function Lr(s){return s instanceof Ee}function Te(s){if(s instanceof te)return"SUBRULE";if(s instanceof J)return"OPTION";if(s instanceof Ee)return"OR";if(s instanceof Se)return"AT_LEAST_ONE";if(s instanceof ye)return"AT_LEAST_ONE_SEP";if(s instanceof me)return"MANY_SEP";if(s instanceof D)return"MANY";if(s instanceof v)return"CONSUME";throw Error("non exhaustive match")}class es{walk(e,t=[]){R(e.definition,(n,i)=>{const a=G(e.definition,i+1);if(n instanceof te)this.walkProdRef(n,a,t);else if(n instanceof v)this.walkTerminal(n,a,t);else if(n instanceof Z)this.walkFlat(n,a,t);else if(n instanceof J)this.walkOption(n,a,t);else if(n instanceof Se)this.walkAtLeastOne(n,a,t);else if(n instanceof ye)this.walkAtLeastOneSep(n,a,t);else if(n instanceof me)this.walkManySep(n,a,t);else if(n instanceof D)this.walkMany(n,a,t);else if(n instanceof Ee)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new J({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=tn(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new J({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=tn(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);R(e.definition,a=>{const r=new Z({definition:[a]});this.walk(r,i)})}}function tn(s,e,t){return[new J({definition:[new v({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Lt(s){if(s instanceof te)return Lt(s.referencedRule);if(s instanceof v)return Or(s);if(yr(s))return Rr(s);if(Lr(s))return Nr(s);throw Error("non exhaustive match")}function Rr(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Wt(a),e=e.concat(Lt(a)),n=n+1,i=t.length>n;return Us(e)}function Nr(s){const e=T(s.definition,t=>Lt(t));return Us(ue(e))}function Or(s){return[s.terminalType]}const zn="_~IN~_";class kr extends es{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=Cr(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new Z({definition:a}),o=Lt(r);this.follows[i]=o}}function Ir(s){const e={};return R(s,t=>{const n=new kr(t).startWalking();ee(e,n)}),e}function Cr(s,e){return s.name+e+zn}function N(s){return s.charCodeAt(0)}function cs(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function ot(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Ke(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function br(){throw Error("Internal Error - Should never get here!")}function sn(s){return s.type==="Character"}const Kt=[];for(let s=N("0");s<=N("9");s++)Kt.push(s);const jt=[N("_")].concat(Kt);for(let s=N("a");s<=N("z");s++)jt.push(s);for(let s=N("A");s<=N("Z");s++)jt.push(s);const nn=[N(" "),N("\f"),N(`
|
|
2
2
|
`),N("\r"),N(" "),N("\v"),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N(" "),N("\u2028"),N("\u2029"),N(" "),N(" "),N(" "),N("\uFEFF")],vr=/[0-9a-fA-F]/,It=/[0-9]/,_r=/[1-9]/;class xr{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":ot(n,"global");break;case"i":ot(n,"ignoreCase");break;case"m":ot(n,"multiLine");break;case"u":ot(n,"unicode");break;case"y":ot(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Ke(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return br()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Ke(t);break}if(!(e===!0&&t===void 0)&&Ke(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ke(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[N(`
|
|
3
3
|
`),N("\r"),N("\u2028"),N("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=Kt;break;case"D":e=Kt,t=!0;break;case"s":e=nn;break;case"S":e=nn,t=!0;break;case"w":e=jt;break;case"W":e=jt,t=!0;break}if(Ke(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=N("\f");break;case"n":e=N(`
|
|
4
4
|
`);break;case"r":e=N("\r");break;case"t":e=N(" ");break;case"v":e=N("\v");break}if(Ke(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:N("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:N(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/dist/public/assets/{vennDiagram-UO4OBE2U-mx17DyZw.js → vennDiagram-UO4OBE2U-CzhdJPaP.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as Wt,b9 as Kt,a1 as Ht,a5 as Yt,bc as Xt,a2 as Zt,ba as Jt,c as S,a3 as St,b8 as Qt,b7 as rt,m as $t,ax as te,aD as ee,M as ne,F as se,u as ie,t as re,S as oe}from"./mermaid.core-BVBLuQ4L.js";import"./index-CTECnRDI.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,r=0;const o=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(h.x+a.x)*(a.y-h.y);const p={x:(a.x+h.x)/2,y:(a.y+h.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(h.parentIndex.includes(a.parentIndex[m])){const y=t[a.parentIndex[m]],M=Math.atan2(a.x-y.x,a.y-y.y),E=Math.atan2(h.x-y.x,h.y-y.y);let T=E-M;T<0&&(T+=2*Math.PI);const w=E-T/2;let g=K(p,{x:y.x+y.radius*Math.sin(w),y:y.y+y.radius*Math.cos(w)});g>y.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:a,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),h=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){h=!0;break}h?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ae(t,n){return n.every(s=>K(t,s)<s.radius+_t)}function le(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 r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function K(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=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,h=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:h-a},{x:l-u,y:h+a}]}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 ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s);let h=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u<i;++u){h/=2;const a=n+h,p=t(a);if(p*o>=0&&(n=a),Math.abs(h)<r||p===0)return a}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 tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,p=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,y=new Array(m+1);y[0]=n,y[0].fx=t(n),y[0].id=0;for(let v=0;v<m;++v){const c=n.slice();c[v]=c[v]?c[v]*i:r,y[v+1]=c,y[v+1].fx=t(c),y[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)y[m][c]=v[c];y[m].fx=v.fx}const E=(v,c)=>v.fx-c.fx,T=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(y.sort(E),s.history){const x=y.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});x.sort((f,N)=>f.id-N.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:x})}d=0;for(let x=0;x<m;++x)d=Math.max(d,Math.abs(y[0][x]-y[1][x]));if(Math.abs(y[0].fx-y[m].fx)<o&&d<l)break;for(let x=0;x<m;++x){T[x]=0;for(let f=0;f<m;++f)T[x]+=y[f][x];T[x]/=m}const c=y[m];if(J(w,1+h,T,-h,c),w.fx=t(w),w.fx<y[0].fx)J(b,1+u,T,-u,c),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=y[m-1].fx){let x=!1;if(w.fx>c.fx?(J(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*h,T,a*h,c),g.fx=t(g),g.fx<w.fx?M(g):x=!0),x){if(p>=1)break;for(let f=1;f<y.length;++f)J(y[f],1-p,y[0],p,y[f]),y[f].fx=t(y[f])}}else M(w)}return y.sort(E),{fx:y[0].fx,x:y[0]}}function ue(t,n,s,e,i,r,o){const l=s.fx,h=tt(s.fxprime,n);let u=l,a=l,p=h,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(y,M,E){for(let T=0;T<16;++T)if(i=(y+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||u>=E)M=i;else{if(Math.abs(p)<=-o*h)return i;p*(M-y)>=0&&(M=y),y=i,E=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||y&&u>=a)return m(d,i,a);if(Math.abs(p)<=-o*h)return i;if(p>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function he(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,l,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(h=ue(t,o,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ht(o,e.fxprime,-1);else{J(r,1,i.fxprime,-1,e.fxprime);const p=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/p);J(o,d,o,-1,i.fxprime),l=e,e=i,i=l}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||xe,e=n.lossFunction||et,i=fe(t,n),r=s(i,n),o=Object.keys(r),l=[];for(const a of o)l.push(r[a].x),l.push(r[a].y);const u=zt(a=>{const p={};for(let d=0;d<o.length;++d){const m=o[d];p[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(p,i)},l,n).x;for(let a=0;a<o.length;++a){const p=o[a];r[p].x=u[2*a],r[p].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const a=String(h.sets[u]);l.set(a,h.size+(l.get(a)||0));for(let p=u+1;p<h.sets.length;p++){const d=String(h.sets[p]),m=`${a};${d}`,y=`${d};${a}`;l.set(m,h.size+(l.get(m)||0)),l.set(y,h.size+(l.get(y)||0))}}for(const h of e)h.sets.length<3&&(h.size=l.get(i(h.sets)))}const r=[],o=new Set;for(const l of e)if(l.sets.length===1)r.push(l.sets[0]);else if(l.sets.length===2){const h=l.sets[0],u=l.sets[1];o.add(i(l.sets)),o.add(i([u,h]))}r.sort((l,h)=>l===h?0:l<h?-1:1);for(let l=0;l<r.length;++l){const h=r[l];for(let u=l+1;u<r.length;++u){const a=r[u];o.has(i([h,a]))||e.push({sets:[h,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],l=s[r.sets[1]],h=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(h,u,r.size);e[o][l]=e[l][o]=a;let p=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?p=1:r.size<=1e-10&&(p=-1),i[o][l]=i[l][o]=p}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],l=t[2*r+1];for(let h=r+1;h<s.length;++h){const u=t[2*h],a=t[2*h+1],p=s[r][h],d=e[r][h],m=(u-o)*(u-o)+(a-l)*(a-l),y=Math.sqrt(m),M=m-p*p;d>0&&y<=p||d<0&&y>=p||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*h]+=4*M*(u-o),n[2*h+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ye(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=de(t,e,i);const l=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/l));const h=(d,m)=>ge(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),y=he(h,m,n);(!u||y.fx<u.fx)&&(u=y)}const a=u.x,p={};for(let d=0;d<e.length;++d){const m=e[d];p[m.sets[0]]={x:a[2*d]*l,y:a[2*d+1]*l,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,l);return p}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const p of t)if(p.sets.length===1){const d=p.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:p.size,radius:Math.sqrt(p.size/Math.PI)},i[d]=[]}t=t.filter(p=>p.sets.length===2);for(const p of t){let d=p.weight!=null?p.weight:1;const m=p.sets[0],y=p.sets[1];p.size+Rt>=Math.min(e[m].size,e[y].size)&&(d=0),i[m].push({set:y,size:p.size,weight:d}),i[y].push({set:m,size:p.size,weight:d})}const r=[];Object.keys(i).forEach(p=>{let d=0;for(let m=0;m<i[p].length;++m)d+=i[p][m].size*i[p][m].weight;r.push({set:p,size:d})});function o(p,d){return d.size-p.size}r.sort(o);const l={};function h(p){return p.set in l}function u(p,d){e[d].x=p.x,e[d].y=p.y,l[d]=!0}u({x:0,y:0},r[0].set);for(let p=1;p<r.length;++p){const d=r[p].set,m=i[d].filter(h),y=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(y.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],c=ft(y.radius,v.radius,m[b].size),x=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,T=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,T=w)}u(T,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],l=t[e.sets[1]];i=xt(o.radius,l.radius,K(o,l))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],h=t[e.sets[1]];i=xt(l.radius,h.radius,K(l,h))}else i=st(e.sets.map(l=>t[l]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function me(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const l of t){const h=l.x,u=l.y;l.x=r*h-o*u,l.y=o*h+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),l=n(r);o.parent=l}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;K(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function l(u,a,p){if(!u)return;const d=u.bounds;let m,y;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(p)y=r.yRange.max-d.yRange.min+o;else{y=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=m,M.y+=y,e.push(M)}let h=1;for(;h<i.length;)l(i[h],!0,!1),l(i[h+1],!1,!0),l(i[h+2],!0,!0),h+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:l}=dt(r);if(o.max===o.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const m=Math.sqrt(i/Math.PI)*2;h=n/m,u=s/m}else h=n/(o.max-o.min),u=s/(l.max-l.min);const a=Math.min(u,h),p=(n-(o.max-o.min)*a)/2,d=(s-(l.max-l.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+p+(m.x-o.min)*a,y:e+d+(m.y-l.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,h=null,u=!0,a=!0,p=null,d=null,m=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(x){if(x in E)return E[x];var f=E[x]=T[w];return w+=1,w>=T.length&&(w=0),f},b=At,v=et;function c(x){let f=x.datum();const N=new Set;f.forEach(I=>{I.size==0&&I.sets.length==1&&N.add(I.sets[0])}),f=f.filter(I=>!I.sets.some(C=>N.has(C)));let k={},D={};if(f.length>0){let I=b(f,{lossFunction:v,distinct:m});l&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,h),D=Lt(k,f,M)}const X={};f.forEach(I=>{I.label&&(X[I.sets]=I.label)});function G(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}x.selectAll("svg").data([k]).enter().append("svg");const B=x.select("svg");n?B.attr("viewBox",`0 0 ${s} ${e}`):B.attr("width",s).attr("height",e);const V={};let z=!1;B.selectAll(".venn-area path").each(function(I){const C=this.getAttribute("d");I.sets.length==1&&C&&!m&&(z=!0,V[I.sets[0]]=Me(C))});function q(I){return C=>{const H=I.sets.map(Q=>{let W=V[Q],Y=k[Q];return W||(W={x:s/2,y:e/2,radius:1}),Y||(Y={x:s/2,y:e/2,radius:1}),{x:W.x*(1-C)+Y.x*C,y:W.y*(1-C)+Y.y*C,radius:W.radius*(1-C)+Y.radius*C}});return wt(H,y)}}const R=B.selectAll(".venn-area").data(f,I=>I.sets),O=R.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),j=O.append("path"),L=O.append("text").attr("class","label").text(I=>G(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(j.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),L.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function P(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let _=x;z&&typeof _.transition=="function"?(_=P(x),_.selectAll("path").attrTween("d",q)):_.selectAll("path").attr("d",I=>wt(I.sets.map(C=>k[C])),y);const F=_.selectAll("text").filter(I=>I.sets in D).text(I=>G(I)).attr("x",I=>Math.floor(D[I.sets].x)).attr("y",I=>Math.floor(D[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,G)):F.each("end",ot(k,G)):F.each(ot(k,G)));const A=P(R.exit()).remove();typeof R.transition=="function"&&A.selectAll("path").attrTween("d",q);const Z=A.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(L.style("font-size","0px"),F.style("font-size",p),Z.style("font-size","0px")),{circles:k,textCentres:D,nodes:R,enter:O,update:_,exit:A}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(m=x,c):m},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(p=x,c):p},c.round=function(x){return arguments.length?(y=x,c):y},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(b=x,c):b},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(h=x,c):h},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Ct:x,c):v},c}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),h=(r.length+o.length)/3;let u=o.pop(),a=[u],p=0;const d=1.1;e.textContent=null;const m=[];function y(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=y(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=y(u),p++)}const E=.35-p*d/2,T=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-K(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=K(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const p=at(e[a],t,n);p>=r&&(i=e[a],r=p)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]};let h=!0;for(const a of t)if(K(l,a)>a.radius){h=!1;break}for(const a of n)if(K(l,a)<a.radius){h=!1;break}if(h)return l;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?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const l=s[o],h=t[l],u=K(r,h);u+h.radius<=r.radius+1e-10?n[l].push(i):u+r.radius<=h.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let r=0;r<n.length;++r){const o=n[r].sets,l={},h={};for(let d=0;d<o.length;++d){l[o[d]]=!0;const m=i[o[d]];for(let y=0;y<m.length;++y)h[m[y]]=!0}const u=[],a=[];for(let d in t)d in l?u.push(t[d]):d in h||a.push(t[d]);const p=jt(u,a,s);e[o]=p,p.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{f as Wt,b9 as Kt,a1 as Ht,a5 as Yt,bc as Xt,a2 as Zt,ba as Jt,c as S,a3 as St,b8 as Qt,b7 as rt,m as $t,ax as te,aD as ee,M as ne,F as se,u as ie,t as re,S as oe}from"./mermaid.core-DycEQHIJ.js";import"./index-1-G2JyaA.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,r=0;const o=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(h.x+a.x)*(a.y-h.y);const p={x:(a.x+h.x)/2,y:(a.y+h.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(h.parentIndex.includes(a.parentIndex[m])){const y=t[a.parentIndex[m]],M=Math.atan2(a.x-y.x,a.y-y.y),E=Math.atan2(h.x-y.x,h.y-y.y);let T=E-M;T<0&&(T+=2*Math.PI);const w=E-T/2;let g=K(p,{x:y.x+y.radius*Math.sin(w),y:y.y+y.radius*Math.cos(w)});g>y.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:a,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),h=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){h=!0;break}h?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ae(t,n){return n.every(s=>K(t,s)<s.radius+_t)}function le(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 r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function K(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=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,h=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:h-a},{x:l-u,y:h+a}]}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 ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s);let h=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u<i;++u){h/=2;const a=n+h,p=t(a);if(p*o>=0&&(n=a),Math.abs(h)<r||p===0)return a}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 tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,p=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,y=new Array(m+1);y[0]=n,y[0].fx=t(n),y[0].id=0;for(let v=0;v<m;++v){const c=n.slice();c[v]=c[v]?c[v]*i:r,y[v+1]=c,y[v+1].fx=t(c),y[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)y[m][c]=v[c];y[m].fx=v.fx}const E=(v,c)=>v.fx-c.fx,T=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(y.sort(E),s.history){const x=y.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});x.sort((f,N)=>f.id-N.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:x})}d=0;for(let x=0;x<m;++x)d=Math.max(d,Math.abs(y[0][x]-y[1][x]));if(Math.abs(y[0].fx-y[m].fx)<o&&d<l)break;for(let x=0;x<m;++x){T[x]=0;for(let f=0;f<m;++f)T[x]+=y[f][x];T[x]/=m}const c=y[m];if(J(w,1+h,T,-h,c),w.fx=t(w),w.fx<y[0].fx)J(b,1+u,T,-u,c),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=y[m-1].fx){let x=!1;if(w.fx>c.fx?(J(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*h,T,a*h,c),g.fx=t(g),g.fx<w.fx?M(g):x=!0),x){if(p>=1)break;for(let f=1;f<y.length;++f)J(y[f],1-p,y[0],p,y[f]),y[f].fx=t(y[f])}}else M(w)}return y.sort(E),{fx:y[0].fx,x:y[0]}}function ue(t,n,s,e,i,r,o){const l=s.fx,h=tt(s.fxprime,n);let u=l,a=l,p=h,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(y,M,E){for(let T=0;T<16;++T)if(i=(y+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||u>=E)M=i;else{if(Math.abs(p)<=-o*h)return i;p*(M-y)>=0&&(M=y),y=i,E=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||y&&u>=a)return m(d,i,a);if(Math.abs(p)<=-o*h)return i;if(p>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function he(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,l,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(h=ue(t,o,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ht(o,e.fxprime,-1);else{J(r,1,i.fxprime,-1,e.fxprime);const p=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/p);J(o,d,o,-1,i.fxprime),l=e,e=i,i=l}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||xe,e=n.lossFunction||et,i=fe(t,n),r=s(i,n),o=Object.keys(r),l=[];for(const a of o)l.push(r[a].x),l.push(r[a].y);const u=zt(a=>{const p={};for(let d=0;d<o.length;++d){const m=o[d];p[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(p,i)},l,n).x;for(let a=0;a<o.length;++a){const p=o[a];r[p].x=u[2*a],r[p].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const a=String(h.sets[u]);l.set(a,h.size+(l.get(a)||0));for(let p=u+1;p<h.sets.length;p++){const d=String(h.sets[p]),m=`${a};${d}`,y=`${d};${a}`;l.set(m,h.size+(l.get(m)||0)),l.set(y,h.size+(l.get(y)||0))}}for(const h of e)h.sets.length<3&&(h.size=l.get(i(h.sets)))}const r=[],o=new Set;for(const l of e)if(l.sets.length===1)r.push(l.sets[0]);else if(l.sets.length===2){const h=l.sets[0],u=l.sets[1];o.add(i(l.sets)),o.add(i([u,h]))}r.sort((l,h)=>l===h?0:l<h?-1:1);for(let l=0;l<r.length;++l){const h=r[l];for(let u=l+1;u<r.length;++u){const a=r[u];o.has(i([h,a]))||e.push({sets:[h,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],l=s[r.sets[1]],h=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(h,u,r.size);e[o][l]=e[l][o]=a;let p=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?p=1:r.size<=1e-10&&(p=-1),i[o][l]=i[l][o]=p}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],l=t[2*r+1];for(let h=r+1;h<s.length;++h){const u=t[2*h],a=t[2*h+1],p=s[r][h],d=e[r][h],m=(u-o)*(u-o)+(a-l)*(a-l),y=Math.sqrt(m),M=m-p*p;d>0&&y<=p||d<0&&y>=p||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*h]+=4*M*(u-o),n[2*h+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ye(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=de(t,e,i);const l=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/l));const h=(d,m)=>ge(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),y=he(h,m,n);(!u||y.fx<u.fx)&&(u=y)}const a=u.x,p={};for(let d=0;d<e.length;++d){const m=e[d];p[m.sets[0]]={x:a[2*d]*l,y:a[2*d+1]*l,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,l);return p}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const p of t)if(p.sets.length===1){const d=p.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:p.size,radius:Math.sqrt(p.size/Math.PI)},i[d]=[]}t=t.filter(p=>p.sets.length===2);for(const p of t){let d=p.weight!=null?p.weight:1;const m=p.sets[0],y=p.sets[1];p.size+Rt>=Math.min(e[m].size,e[y].size)&&(d=0),i[m].push({set:y,size:p.size,weight:d}),i[y].push({set:m,size:p.size,weight:d})}const r=[];Object.keys(i).forEach(p=>{let d=0;for(let m=0;m<i[p].length;++m)d+=i[p][m].size*i[p][m].weight;r.push({set:p,size:d})});function o(p,d){return d.size-p.size}r.sort(o);const l={};function h(p){return p.set in l}function u(p,d){e[d].x=p.x,e[d].y=p.y,l[d]=!0}u({x:0,y:0},r[0].set);for(let p=1;p<r.length;++p){const d=r[p].set,m=i[d].filter(h),y=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(y.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],c=ft(y.radius,v.radius,m[b].size),x=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,T=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,T=w)}u(T,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],l=t[e.sets[1]];i=xt(o.radius,l.radius,K(o,l))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],h=t[e.sets[1]];i=xt(l.radius,h.radius,K(l,h))}else i=st(e.sets.map(l=>t[l]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function me(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const l of t){const h=l.x,u=l.y;l.x=r*h-o*u,l.y=o*h+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),l=n(r);o.parent=l}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;K(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function l(u,a,p){if(!u)return;const d=u.bounds;let m,y;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(p)y=r.yRange.max-d.yRange.min+o;else{y=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=m,M.y+=y,e.push(M)}let h=1;for(;h<i.length;)l(i[h],!0,!1),l(i[h+1],!1,!0),l(i[h+2],!0,!0),h+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:l}=dt(r);if(o.max===o.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const m=Math.sqrt(i/Math.PI)*2;h=n/m,u=s/m}else h=n/(o.max-o.min),u=s/(l.max-l.min);const a=Math.min(u,h),p=(n-(o.max-o.min)*a)/2,d=(s-(l.max-l.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+p+(m.x-o.min)*a,y:e+d+(m.y-l.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,h=null,u=!0,a=!0,p=null,d=null,m=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(x){if(x in E)return E[x];var f=E[x]=T[w];return w+=1,w>=T.length&&(w=0),f},b=At,v=et;function c(x){let f=x.datum();const N=new Set;f.forEach(I=>{I.size==0&&I.sets.length==1&&N.add(I.sets[0])}),f=f.filter(I=>!I.sets.some(C=>N.has(C)));let k={},D={};if(f.length>0){let I=b(f,{lossFunction:v,distinct:m});l&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,h),D=Lt(k,f,M)}const X={};f.forEach(I=>{I.label&&(X[I.sets]=I.label)});function G(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}x.selectAll("svg").data([k]).enter().append("svg");const B=x.select("svg");n?B.attr("viewBox",`0 0 ${s} ${e}`):B.attr("width",s).attr("height",e);const V={};let z=!1;B.selectAll(".venn-area path").each(function(I){const C=this.getAttribute("d");I.sets.length==1&&C&&!m&&(z=!0,V[I.sets[0]]=Me(C))});function q(I){return C=>{const H=I.sets.map(Q=>{let W=V[Q],Y=k[Q];return W||(W={x:s/2,y:e/2,radius:1}),Y||(Y={x:s/2,y:e/2,radius:1}),{x:W.x*(1-C)+Y.x*C,y:W.y*(1-C)+Y.y*C,radius:W.radius*(1-C)+Y.radius*C}});return wt(H,y)}}const R=B.selectAll(".venn-area").data(f,I=>I.sets),O=R.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),j=O.append("path"),L=O.append("text").attr("class","label").text(I=>G(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(j.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),L.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function P(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let _=x;z&&typeof _.transition=="function"?(_=P(x),_.selectAll("path").attrTween("d",q)):_.selectAll("path").attr("d",I=>wt(I.sets.map(C=>k[C])),y);const F=_.selectAll("text").filter(I=>I.sets in D).text(I=>G(I)).attr("x",I=>Math.floor(D[I.sets].x)).attr("y",I=>Math.floor(D[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,G)):F.each("end",ot(k,G)):F.each(ot(k,G)));const A=P(R.exit()).remove();typeof R.transition=="function"&&A.selectAll("path").attrTween("d",q);const Z=A.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(L.style("font-size","0px"),F.style("font-size",p),Z.style("font-size","0px")),{circles:k,textCentres:D,nodes:R,enter:O,update:_,exit:A}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(m=x,c):m},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(p=x,c):p},c.round=function(x){return arguments.length?(y=x,c):y},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(b=x,c):b},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(h=x,c):h},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Ct:x,c):v},c}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),h=(r.length+o.length)/3;let u=o.pop(),a=[u],p=0;const d=1.1;e.textContent=null;const m=[];function y(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=y(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=y(u),p++)}const E=.35-p*d/2,T=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-K(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=K(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const p=at(e[a],t,n);p>=r&&(i=e[a],r=p)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]};let h=!0;for(const a of t)if(K(l,a)>a.radius){h=!1;break}for(const a of n)if(K(l,a)<a.radius){h=!1;break}if(h)return l;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?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const l=s[o],h=t[l],u=K(r,h);u+h.radius<=r.radius+1e-10?n[l].push(i):u+r.radius<=h.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let r=0;r<n.length;++r){const o=n[r].sets,l={},h={};for(let d=0;d<o.length;++d){l[o[d]]=!0;const m=i[o[d]];for(let y=0;y<m.length;++y)h[m[y]]=!0}const u=[],a=[];for(let d in t)d in l?u.push(t[d]):d in h||a.push(t[d]);const p=jt(u,a,s);e[o]=p,p.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as zt}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as zt}from"./chunk-JWPE2WC7-aSSTyo6M.js";import{b9 as Lt,a1 as Tt,a5 as At,bc as Xt,a2 as Et,ba as Yt,c as y,ac as It,a3 as Ft,t as Q,aH as et,b8 as Bt,F as Rt,u as Ot,a4 as V}from"./mermaid.core-DycEQHIJ.js";import{p as Wt}from"./cynefin-OW5HDTMX-CCDWLi08.js";import"./index-1-G2JyaA.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(zt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,L=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,Ht=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new Ht;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Ot()}y(wt,"clear");var qt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:Xt,getDiagramTitle:At,getAccDescription:Tt,setAccDescription:Lt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,L,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var J,K;et.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),L=v.getDiagramTitle(),M=((J=g.size)==null?void 0:J.width)??r.width,k=((K=g.size)==null?void 0:K.height)??r.height,N=Bt(o);N.selectAll("*").remove(),Rt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),H=N.append("defs");H.append("marker").attr("id",`arrow-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-end-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-start-${o}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const F=M-r.padding*2,B=k-r.padding*2;L&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(L);const T=y(t=>r.padding+t/100*F,"projectX"),A=y(t=>k-r.padding-t/100*B,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+F/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+B/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*F,f=r.padding+l.end*F,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-B*s).attr("y2",k-r.padding-B*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const z=(h+l)/2;S.x=z,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const U=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(U).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(U.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,z=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${z} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=A(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const C=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));C.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const X=C.filter(t=>t.sourceStrategy==="market");X.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:A(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=T(g.annotationsBox.x),s=A(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const z=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(z)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const z=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-z,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",z).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=A(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-l/2}
|
|
4
4
|
L ${s+h-x} ${i-l/2}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b9 as pe,a1 as me,a5 as $t,bc as ye,a2 as be,ba as we,c as a,aH as Ut,b8 as Ae,F as Ce,u as Se,a3 as Dt,b5 as Re,t as Gt,S as _e,ac as ke,E as Te,aE as Xt}from"./mermaid.core-
|
|
1
|
+
import{b9 as pe,a1 as me,a5 as $t,bc as ye,a2 as be,ba as we,c as a,aH as Ut,b8 as Ae,F as Ce,u as Se,a3 as Dt,b5 as Re,t as Gt,S as _e,ac as ke,E as Te,aE as Xt}from"./mermaid.core-DycEQHIJ.js";import{i as De}from"./init-Gi6I4Gst.js";import{o as Pe}from"./ordinal-Cboi1Yqb.js";import{l as Nt}from"./linear-CrX1doCP.js";import"./index-1-G2JyaA.js";import"./defaultLocale-CrowFXzY.js";function ve(i,t,e){i=+i,t=+t,e=(n=arguments.length)<2?(t=i,i=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(n);++s<n;)o[s]=i+s*e;return o}function St(){var i=Pe().unknown(void 0),t=i.domain,e=i.range,s=0,n=1,o,h,p=!1,u=0,f=0,R=.5;delete i.unknown;function C(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-u+f*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-u))*R,h=o*(1-u),p&&(v=Math.round(v),h=Math.round(h));var M=ve(y).map(function(b){return v+o*b});return e(E?M.reverse():M)}return i.domain=function(y){return arguments.length?(t(y),C()):t()},i.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,C()):[s,n]},i.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,C()},i.bandwidth=function(){return h},i.step=function(){return o},i.round=function(y){return arguments.length?(p=!!y,C()):p},i.padding=function(y){return arguments.length?(u=Math.min(1,f=+y),C()):u},i.paddingInner=function(y){return arguments.length?(u=Math.min(1,y),C()):u},i.paddingOuter=function(y){return arguments.length?(f=+y,C()):f},i.align=function(y){return arguments.length?(R=Math.max(0,Math.min(1,y)),C()):R},i.copy=function(){return St(t(),[s,n]).round(p).paddingInner(u).paddingOuter(f).align(R)},De.apply(C(),arguments)}var Rt=function(){var i=a(function(W,l,g,d){for(g=g||{},d=W.length;d--;g[W[d]]=l);return g},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],o=[1,6],h=[1,7],p=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],f=[1,26],R=[1,28],C=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],M=[1,34],b=[1,35],D=[1,36],c=[1,37],B=[1,43],F=[1,42],X=[1,47],N=[1,50],k=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],S=[1,65],O=[26,28],T={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(l,g,d,x,_,r,lt){var m=r.length-1;switch(_){case 5:x.setOrientation(r[m]);break;case 9:x.setDiagramTitle(r[m].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[m]);break;case 13:x.setLineData(r[m-1],r[m]);break;case 14:x.setBarData({text:"",type:"text"},r[m]);break;case 15:x.setBarData(r[m-1],r[m]);break;case 16:this.$=r[m].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[m].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[m-1];break;case 20:case 30:this.$=[r[m-2],...r[m]];break;case 21:case 31:this.$=[r[m]];break;case 22:this.$={value:Number(r[m-1]),label:r[m]};break;case 23:this.$={value:Number(r[m]),label:""};break;case 24:x.setXAxisTitle(r[m]);break;case 25:x.setXAxisTitle(r[m-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(r[m]);break;case 28:x.setXAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 29:this.$=r[m-1];break;case 32:x.setYAxisTitle(r[m]);break;case 33:x.setYAxisTitle(r[m-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 39:this.$={text:r[m],type:"text"};break;case 40:this.$={text:r[m],type:"text"};break;case 41:this.$={text:r[m],type:"markdown"};break;case 42:this.$=r[m];break;case 43:this.$=r[m-1]+""+r[m];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,36:n,37:o,38:h}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,36:n,37:o,38:h}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(p,[2,36]),i(p,[2,37]),i(p,[2,38]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,36:n,37:o,38:h}),{1:[2,3]},i(p,[2,5]),i(t,[2,7],{4:22,36:n,37:o,38:h}),{11:23,30:u,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},{11:39,13:38,24:B,29:F,30:u,31:40,32:41,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},{11:45,15:44,29:X,30:u,35:46,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},{11:49,17:48,24:N,30:u,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},{11:52,17:51,24:N,30:u,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},{20:[1,53]},{22:[1,54]},i(k,[2,18]),{1:[2,2]},i(k,[2,8]),i(k,[2,9]),i(H,[2,39],{41:55,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c}),i(H,[2,40]),i(H,[2,41]),i(A,[2,42]),i(A,[2,44]),i(A,[2,45]),i(A,[2,46]),i(A,[2,47]),i(A,[2,48]),i(A,[2,49]),i(A,[2,50]),i(A,[2,51]),i(A,[2,52]),i(A,[2,53]),i(k,[2,10]),i(k,[2,24],{32:41,31:56,24:B,29:F}),i(k,[2,26]),i(k,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},i(k,[2,11]),i(k,[2,32],{35:60,29:X}),i(k,[2,34]),{33:[1,61]},i(k,[2,12]),{17:62,24:N},{25:63,27:64,29:S},i(k,[2,14]),{17:66,24:N},i(k,[2,16]),i(k,[2,17]),i(A,[2,43]),i(k,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},i(k,[2,33]),{29:[1,70]},i(k,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},i(O,[2,23],{30:[1,73]}),i(k,[2,15]),i(k,[2,28]),i(k,[2,29]),{11:59,30:u,34:74,39:24,40:f,41:27,42:R,43:C,44:y,45:E,46:v,47:L,48:M,49:b,50:D,51:c},i(k,[2,35]),i(k,[2,19]),{25:75,27:64,29:S},i(O,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(l,g){if(g.recoverable)this.trace(l);else{var d=new Error(l);throw d.hash=g,d}},"parseError"),parse:a(function(l){var g=this,d=[0],x=[],_=[null],r=[],lt=this.table,m="",dt=0,Ot=0,ue=2,Vt=1,de=r.slice.call(arguments,1),P=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);P.setInput(l,$.yy),$.yy.lexer=P,$.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var wt=P.yylloc;r.push(wt);var xe=P.options&&P.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fe(z){d.length=d.length-2*z,_.length=_.length-z,r.length=r.length-z}a(fe,"popStack");function Ft(){var z;return z=x.pop()||P.lex()||Vt,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=g.symbols_[z]||z),z}a(Ft,"lex");for(var I,U,V,At,j={},xt,Y,Wt,ft;;){if(U=d[d.length-1],this.defaultActions[U]?V=this.defaultActions[U]:((I===null||typeof I>"u")&&(I=Ft()),V=lt[U]&<[U][I]),typeof V>"u"||!V.length||!V[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ue&&ft.push("'"+this.terminals_[xt]+"'");P.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+P.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(I==Vt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Ct,{text:P.match,token:this.terminals_[I]||I,line:P.yylineno,loc:wt,expected:ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+I);switch(V[0]){case 1:d.push(I),_.push(P.yytext),r.push(P.yylloc),d.push(V[1]),I=null,Ot=P.yyleng,m=P.yytext,dt=P.yylineno,wt=P.yylloc;break;case 2:if(Y=this.productions_[V[1]][1],j.$=_[_.length-Y],j._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},xe&&(j._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),At=this.performAction.apply(j,[m,Ot,dt,$.yy,V[1],_,r].concat(de)),typeof At<"u")return At;Y&&(d=d.slice(0,-1*Y*2),_=_.slice(0,-1*Y),r=r.slice(0,-1*Y)),d.push(this.productions_[V[1]][0]),_.push(j.$),r.push(j._$),Wt=lt[d[d.length-2]][d[d.length-1]],d.push(Wt);break;case 3:return!0}}return!0},"parse")},ht=function(){var W={EOF:1,parseError:a(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw new Error(g)},"parseError"),setInput:a(function(l,g){return this.yy=g||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var g=l.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:a(function(l){var g=l.length,d=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===x.length?this.yylloc.first_column:0)+x[x.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(l){this.unput(this.match.slice(l))},"less"),pastInput:a(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var l=this.pastInput(),g=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
package/dist/public/index.html
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
@keyframes bootDot { 0%,100% { opacity: .22; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
|
|
50
50
|
@media (prefers-reduced-motion: reduce) { .boot-glow, .boot-dots i { animation: none; opacity: .8; } }
|
|
51
51
|
</style>
|
|
52
|
-
<script type="module" crossorigin src="/assets/index-
|
|
52
|
+
<script type="module" crossorigin src="/assets/index-1-G2JyaA.js"></script>
|
|
53
53
|
<link rel="stylesheet" crossorigin href="/assets/index-CCO6YrGs.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" crossorigin href="/assets/index-CCO6YrGs.css"></noscript>
|
|
54
54
|
</head>
|
|
55
55
|
<body>
|
|
@@ -76,7 +76,15 @@ export function createCodexConversationActivityReader(app) {
|
|
|
76
76
|
const status = raw && typeof raw === 'object' ? raw : {};
|
|
77
77
|
const native = status.status && typeof status.status === 'object'
|
|
78
78
|
? status.status : {};
|
|
79
|
-
|
|
79
|
+
const lastTurn = status.lastTurn && typeof status.lastTurn === 'object'
|
|
80
|
+
? status.lastTurn : {};
|
|
81
|
+
const terminalLastTurn = typeof lastTurn.id === 'string' && lastTurn.id
|
|
82
|
+
&& ['completed', 'failed', 'interrupted'].includes(String(lastTurn.status))
|
|
83
|
+
? lastTurn.id : null;
|
|
84
|
+
const recoverableSystemError = native.type === 'systemError'
|
|
85
|
+
&& status.canAcceptDirectInput === true && terminalLastTurn !== null;
|
|
86
|
+
if (status.managed !== true
|
|
87
|
+
|| (native.type !== 'active' && native.type !== 'idle' && !recoverableSystemError)) {
|
|
80
88
|
return { activity: 'unknown', activeTurn: { state: 'unknown' } };
|
|
81
89
|
}
|
|
82
90
|
const flags = Array.isArray(native.activeFlags) ? native.activeFlags : [];
|
|
@@ -87,11 +95,7 @@ export function createCodexConversationActivityReader(app) {
|
|
|
87
95
|
: native.type === 'active' ? 'working' : 'idle';
|
|
88
96
|
const activeTurnId = typeof status.activeTurnId === 'string' && status.activeTurnId
|
|
89
97
|
? status.activeTurnId : null;
|
|
90
|
-
const
|
|
91
|
-
? status.lastTurn : {};
|
|
92
|
-
const terminalTurnId = typeof lastTurn.id === 'string' && lastTurn.id
|
|
93
|
-
&& ['completed', 'failed', 'interrupted'].includes(String(lastTurn.status))
|
|
94
|
-
? lastTurn.id : null;
|
|
98
|
+
const terminalTurnId = terminalLastTurn;
|
|
95
99
|
return {
|
|
96
100
|
activity,
|
|
97
101
|
activeTurn: activeTurnId
|
|
@@ -678,6 +678,11 @@ export class ConversationService {
|
|
|
678
678
|
id: receipt.clientRequestId,
|
|
679
679
|
...(receipt.nativeId === undefined ? {} : { nativeId: receipt.nativeId }),
|
|
680
680
|
}));
|
|
681
|
+
// A queue can survive a process restart with an already-closed cycle. Observing the same idle
|
|
682
|
+
// snapshot is not a state transition, so #observeActivity alone would not wake its dispatcher.
|
|
683
|
+
// Every authoritative queue read is therefore also a safe opportunity to resume draining.
|
|
684
|
+
if (queueItems.length > 0)
|
|
685
|
+
this.#wake(owner);
|
|
681
686
|
return {
|
|
682
687
|
activity: activity.activity,
|
|
683
688
|
canSteer,
|
|
@@ -134,6 +134,12 @@ export function hookErrorMessage(body) {
|
|
|
134
134
|
: typeof body.type === 'string' ? body.type
|
|
135
135
|
: typeof body.error === 'string' ? body.error
|
|
136
136
|
: typeof error?.type === 'string' ? error.type : '';
|
|
137
|
+
const assistantMessage = typeof body.last_assistant_message === 'string'
|
|
138
|
+
? body.last_assistant_message : '';
|
|
139
|
+
const billingError = ERROR_LABEL.billing_error;
|
|
140
|
+
if (type === 'unknown' && billingError && /\binsufficient\s+balance\b/i.test(assistantMessage)) {
|
|
141
|
+
return billingError;
|
|
142
|
+
}
|
|
137
143
|
const label = ERROR_LABEL[type];
|
|
138
144
|
if (label)
|
|
139
145
|
return label;
|
|
@@ -3070,6 +3070,7 @@ export function createCodexAppServer({ home, connect = connectUnixWebSocket, exi
|
|
|
3070
3070
|
threadId,
|
|
3071
3071
|
gitBranch: state.thread?.gitInfo?.branch || null,
|
|
3072
3072
|
status: state.status || state.thread?.status,
|
|
3073
|
+
canAcceptDirectInput: state.thread?.canAcceptDirectInput === true,
|
|
3073
3074
|
activeTurnId,
|
|
3074
3075
|
plan: activeTurnId ? state.plans.get(activeTurnId) || null : null,
|
|
3075
3076
|
lastPlan: state.lastTurn?.id ? state.plans.get(state.lastTurn.id) || null : null,
|
|
@@ -4,6 +4,7 @@ import { tokenEquals } from './auth.js';
|
|
|
4
4
|
import { isPaneId } from './tmux/commands.js';
|
|
5
5
|
import { restoreCaptureBackgrounds } from './captureBackground.js';
|
|
6
6
|
import { decodeControlData } from './tmux/controlProtocol.js';
|
|
7
|
+
import { parseTmuxFields, tmuxFormat } from './tmux/format.js';
|
|
7
8
|
export { decodeControlData } from './tmux/controlProtocol.js';
|
|
8
9
|
const MAX_BUFFERED_BYTES = 1024 * 1024;
|
|
9
10
|
const MAX_CLIENT_MESSAGE_BYTES = 16 * 1024;
|
|
@@ -11,7 +12,10 @@ const START_TIMEOUT_MS = 5000;
|
|
|
11
12
|
const SUBSCRIBE_TIMEOUT_MS = 5000;
|
|
12
13
|
const HEARTBEAT_MS = 30000;
|
|
13
14
|
const INITIAL_HISTORY_LINES = 100;
|
|
14
|
-
const PANE_INFO =
|
|
15
|
+
const PANE_INFO = `"${tmuxFormat([
|
|
16
|
+
'pane_width', 'pane_height', 'cursor_x', 'cursor_y',
|
|
17
|
+
'cursor_flag', 'alternate_on', 'mouse_any_flag', 'mouse_sgr_flag',
|
|
18
|
+
])}"`;
|
|
15
19
|
const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
16
20
|
const defaultSpawnControl = (command, args, options) => spawn(command, [...args], options);
|
|
17
21
|
export function echoTerminalProbe(ws, message) {
|
|
@@ -31,7 +35,7 @@ export function startSubscribeDeadline(ws, timeoutMs = SUBSCRIBE_TIMEOUT_MS) {
|
|
|
31
35
|
return () => clearTimeout(timer);
|
|
32
36
|
}
|
|
33
37
|
function parsePaneInfo(infoLines) {
|
|
34
|
-
const values = Buffer.concat(infoLines).toString('utf8')
|
|
38
|
+
const values = parseTmuxFields(Buffer.concat(infoLines).toString('utf8'), 8, 'tmux pane info').map(Number);
|
|
35
39
|
if (!values.every(Number.isFinite) || values.length !== 8
|
|
36
40
|
|| (values[0] ?? 0) < 1 || (values[1] ?? 0) < 1) {
|
|
37
41
|
throw new Error('invalid tmux pane info');
|
|
@@ -426,10 +430,14 @@ export function createTerminalStream({ token, commands, spawnControl, deviceAuth
|
|
|
426
430
|
}
|
|
427
431
|
authenticating = true;
|
|
428
432
|
cancelSubscribeDeadline();
|
|
433
|
+
let setupStage = 'paneSession';
|
|
434
|
+
let setupSession;
|
|
429
435
|
try {
|
|
430
436
|
const session = await commands.paneSession(message.pane);
|
|
437
|
+
setupSession = session;
|
|
431
438
|
if (ws.readyState !== 1 || !stillAuthorized())
|
|
432
439
|
return;
|
|
440
|
+
setupStage = 'stream.start';
|
|
433
441
|
stream = new PaneControlStream({
|
|
434
442
|
ws, pane: message.pane, session,
|
|
435
443
|
...(spawnControl ? { spawnControl } : {}),
|
|
@@ -438,7 +446,15 @@ export function createTerminalStream({ token, commands, spawnControl, deviceAuth
|
|
|
438
446
|
socketStreams.set(ws, stream);
|
|
439
447
|
await stream.start();
|
|
440
448
|
}
|
|
441
|
-
catch {
|
|
449
|
+
catch (error) {
|
|
450
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
451
|
+
const streamError = stream?.lastError?.trim();
|
|
452
|
+
console.warn(`[handmux] terminal stream setup failed stage=${setupStage}`
|
|
453
|
+
+ ` pane=${message.pane}`
|
|
454
|
+
+ `${setupSession ? ` session=${setupSession}` : ''}`
|
|
455
|
+
+ ` pid=${process.pid}`
|
|
456
|
+
+ ` error=${detail.slice(0, 500)}`
|
|
457
|
+
+ `${streamError ? ` tmuxStderr=${streamError.slice(0, 500)}` : ''}`);
|
|
442
458
|
if (ws.readyState < 2)
|
|
443
459
|
ws.close(1011, 'stream setup failed');
|
|
444
460
|
}
|
|
@@ -248,15 +248,22 @@ export async function sendText(paneId, text) {
|
|
|
248
248
|
throw error;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
+
const MAX_RAW_KEY_BYTES = 1024;
|
|
251
252
|
export async function sendHexInput(paneId, hex) {
|
|
252
253
|
if (!hex)
|
|
253
254
|
return;
|
|
255
|
+
// tmux paste-buffer marks its payload as literal paste. Interactive programs then insert escape
|
|
256
|
+
// sequences and Backspace as visible characters instead of handling them as keys. xterm keyboard
|
|
257
|
+
// events are small; send those bytes as keys, while retaining the buffer path for bulk input.
|
|
258
|
+
const bytes = hex.match(/../g) || [];
|
|
259
|
+
if (bytes.length <= MAX_RAW_KEY_BYTES) {
|
|
260
|
+
await runTmux(['send-keys', '-t', paneId, '-H', ...bytes]);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
254
263
|
const buffer = nextInputBufferName();
|
|
255
264
|
try {
|
|
256
|
-
//
|
|
257
|
-
//
|
|
258
|
-
// payload through the command argument parser. This is the same transport as sendText, while
|
|
259
|
-
// preserving the direct terminal's raw-byte semantics.
|
|
265
|
+
// Bulk input can exceed tmux's command argument limit. The input queue caps each batch, so
|
|
266
|
+
// large text is sent through a tmux buffer without expanding every byte into an argument.
|
|
260
267
|
await runTmuxWithInput(['load-buffer', '-b', buffer, '-'], Buffer.from(hex, 'hex'));
|
|
261
268
|
await runTmux(['paste-buffer', '-d', '-b', buffer, '-t', paneId]);
|
|
262
269
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "handmux",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.4",
|
|
4
4
|
"description": "A mobile vibe-coding cockpit — built on tmux: drive your live session, Claude Code / Codex — anything a terminal can run — from your phone.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"vitest": "^2.0.0"
|
|
76
76
|
},
|
|
77
77
|
"whatsNew": [
|
|
78
|
+
{"version":"0.33.4","date":"2026-10-10","zh":"修复终端实时连接、电脑键盘与 Codex 排队","en":"Fixes live terminal, desktop keys, and Codex queues"},
|
|
79
|
+
{"version":"0.33.3","date":"2026-10-06","zh":"Claude 余额不足提示更明确","en":"Clearer Claude insufficient-balance errors"},
|
|
78
80
|
{"version":"0.33.2","date":"2026-10-03","zh":"修复 v0.33.1 发布包的构建兼容问题","en":"Fixes build compatibility in the v0.33.1 package"},
|
|
79
81
|
{"version":"0.33.1","date":"2026-10-02","zh":"对话复制和工作区操作更顺手","en":"Smoother conversation copying and workspace actions"},
|
|
80
82
|
{"version":"0.33.0","date":"2026-09-30","zh":"终端路径高亮不再闪烁 · 服务更新提示更可靠","en":"Steady terminal paths · reliable service update prompts"},
|
|
81
83
|
{"version":"0.32.1","date":"2026-09-28","zh":"抽屉与工作区切换更顺滑","en":"Smoother drawer and workspace switching"},
|
|
82
84
|
{"version":"0.32.0","date":"2026-09-24","zh":"项目与会话导航全面升级 · 抽屉切换更顺滑","en":"Project and session navigation, rebuilt"},
|
|
83
|
-
{"version":"0.31.1","date":"2026-09-22","zh":"忙时默认排队 · 被拒可重发","en":"Queue by default · refusals can be sent again"}
|
|
84
|
-
{"version":"0.31.0","date":"2026-09-22","zh":"CodeBuddy 对话接入 · Agent 状态更可靠","en":"CodeBuddy chat support · more reliable Agent state"},
|
|
85
|
-
{"version":"0.30.0","date":"2026-09-19","zh":"文档预览全面升级:朗读、目录、查找、图表","en":"A full document reader: read-aloud, outline, search, diagrams"}
|
|
85
|
+
{"version":"0.31.1","date":"2026-09-22","zh":"忙时默认排队 · 被拒可重发","en":"Queue by default · refusals can be sent again"}
|
|
86
86
|
]
|
|
87
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as o,a as n}from"./mermaid.core-BVBLuQ4L.js";const t=(r,a)=>o.lang.round(n.parse(r)[a]);export{t as c};
|