webapp.sankeyDiagram-707fac0f.24fb25a2.js Maven / Gradle / Ivy
Show all versions of langgraph4j-studio Show documentation
function t(t,e,n,i){Object.defineProperty(t,e,{get:n,set:i,enumerable:!0,configurable:!0})}var e=globalThis.parcelRequire0031,n=e.register;n("kxhjd",function(n,i){t(n.exports,"diagram",()=>m);var r=e("4jcZX"),s=e("2YFJl");e("2kFlU");var o=e("h2syK"),l=e("69cYt"),a=e("hQhx0");e("eJNXH"),e("gngdn"),e("2ujND"),e("i8Fxz");var h=function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[1,9],n=[1,10],i=[1,5,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(t,e,n,i,r,s,o){var l=s.length-1;switch(r){case 7:let a=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),h=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),u=parseFloat(s[l].trim());i.addLink(a,h,u);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:n},{15:18,16:7,17:8,18:e,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:e,20:n},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],o=this.table,l="",a=0,h=0,u=s.slice.call(arguments,1),c=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);c.setInput(t,f.yy),f.yy.lexer=c,f.yy.parser=this,void 0===c.yylloc&&(c.yylloc={});var d=c.yylloc;s.push(d);var p=c.options&&c.options.ranges;"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,_,x,k,m,v,b,w,L={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==g&&(g=function(){var t;return"number"!=typeof(t=i.pop()||c.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}()),x=o[_]&&o[_][g]),void 0===x||!x.length||!x[0]){var A="";for(m in w=[],o[_])this.terminals_[m]&&m>2&&w.push("'"+this.terminals_[m]+"'");A=c.showPosition?"Parse error on line "+(a+1)+":\n"+c.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(A,{text:c.match,token:this.terminals_[g]||g,line:c.yylineno,loc:d,expected:w})}if(x[0]instanceof Array&&x.length>1)throw Error("Parse Error: multiple actions possible at state: "+_+", token: "+g);switch(x[0]){case 1:n.push(g),r.push(c.yytext),s.push(c.yylloc),n.push(x[1]),g=null,h=c.yyleng,l=c.yytext,a=c.yylineno,d=c.yylloc;break;case 2:if(v=this.productions_[x[1]][1],L.$=r[r.length-v],L._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},p&&(L._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(L,[l,h,a,f.yy,x[1],r,s].concat(u))))return k;v&&(n=n.slice(0,-1*v*2),r=r.slice(0,-1*v),s=s.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),r.push(L.$),s.push(L._$),b=o[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}};function s(){this.yy={}}return r.lexer={EOF:1,parseError:function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var s in r)this[s]=r[s];return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}},s.prototype=r,r.Parser=s,new s}();h.parser=h;let u=[],c=[],f={};class y{constructor(t,e,n=0){this.source=t,this.target=e,this.value=n}}class d{constructor(t){this.ID=t}}let p={nodesMap:f,getConfig:()=>(0,r.c)().sankey,getNodes:()=>c,getLinks:()=>u,getGraph:()=>({nodes:c.map(t=>({id:t.ID})),links:u.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),addLink:(t,e,n)=>{u.push(new y(t,e,n))},findOrCreateNode:t=>(f[t=(0,r.e).sanitizeText(t,(0,r.c)())]||(f[t]=new d(t),c.push(f[t])),f[t]),getAccTitle:r.g,setAccTitle:r.s,getAccDescription:r.a,setAccDescription:r.b,getDiagramTitle:r.t,setDiagramTitle:r.q,clear:()=>{u=[],c=[],f={},(0,r.v)()}},g=class t{static next(e){return new t(e+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}};g.count=0;let _={left:l.left,right:l.right,center:l.center,justify:l.justify},x=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),k=h.parse.bind(h);h.parse=t=>k(x(t));let m={parser:h,db:p,renderer:{draw:function(t,e,n,i){let l,h;let{securityLevel:u,sankey:c}=(0,r.c)(),f=r.K.sankey;"sandbox"===u&&(l=(0,s.select)("#i"+e));let y="sandbox"===u?(0,s.select)(l.nodes()[0].contentDocument.body):(0,s.select)("body"),d="sandbox"===u?y.select(`[id="${e}"]`):(0,s.select)(`[id="${e}"]`),p=(null==c?void 0:c.width)??f.width,x=(null==c?void 0:c.height)??f.width,k=(null==c?void 0:c.useMaxWidth)??f.useMaxWidth,m=(null==c?void 0:c.nodeAlignment)??f.nodeAlignment,v=(null==c?void 0:c.prefix)??f.prefix,b=(null==c?void 0:c.suffix)??f.suffix,w=(null==c?void 0:c.showValues)??f.showValues,L=i.db.getGraph(),A=_[m];(0,o.default)().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(w?15:0)).nodeAlign(A).extent([[0,0],[p,x]])(L);let E=(0,s.scaleOrdinal)(s.schemeTableau10);d.append("g").attr("class","nodes").selectAll(".node").data(L.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=g.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>E(t.id)),d.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(L.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",`${w?"0":"0.35"}em`).attr("text-anchor",t=>t.x0
w?`${t}
${v}${Math.round(100*e)/100}${b}`:t);let M=d.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(L.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),S=(null==c?void 0:c.linkColor)||"gradient";if("gradient"===S){let t=M.append("linearGradient").attr("id",t=>(t.uid=g.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>E(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>E(t.target.id))}switch(S){case"gradient":h=t=>t.uid;break;case"source":h=t=>E(t.source.id);break;case"target":h=t=>E(t.target.id);break;default:h=S}M.append("path").attr("d",(0,a.default)()).attr("stroke",h).attr("stroke-width",t=>Math.max(1,t.width)),(0,r.o)(void 0,d,0,k)}}}}),n("2kFlU",function(n,i){t(n.exports,"sankey",()=>e("h2syK").default),t(n.exports,"sankeyCenter",()=>e("69cYt").center),t(n.exports,"sankeyLeft",()=>e("69cYt").left),t(n.exports,"sankeyRight",()=>e("69cYt").right),t(n.exports,"sankeyJustify",()=>e("69cYt").justify),t(n.exports,"sankeyLinkHorizontal",()=>e("hQhx0").default),e("h2syK"),e("69cYt"),e("hQhx0")}),n("h2syK",function(n,i){t(n.exports,"default",()=>x);var r=e("arN7y"),s=e("fRuM4"),o=e("fqZOr"),l=e("69cYt"),a=e("femsB");function h(t,e){return c(t.source,e.source)||t.index-e.index}function u(t,e){return c(t.target,e.target)||t.index-e.index}function c(t,e){return t.y0-e.y0}function f(t){return t.value}function y(t){return t.index}function d(t){return t.nodes}function p(t){return t.links}function g(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function _({nodes:t}){for(let e of t){let t=e.y0,n=t;for(let n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(let t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function x(){let t,e,n=0,i=0,x=1,k=1,m=24,v=8,b,w=y,L=l.justify,A=d,E=p,M=6;function S(){let l={nodes:A.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(let[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];let i=new Map(t.map((e,n)=>[w(e,n,t),e]));for(let[t,e]of n.entries()){e.index=t;let{source:n,target:r}=e;"object"!=typeof n&&(n=e.source=g(i,n)),"object"!=typeof r&&(r=e.target=g(i,r)),n.sourceLinks.push(e),r.targetLinks.push(e)}if(null!=e)for(let{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(l),function({nodes:t}){for(let e of t)e.value=void 0===e.fixedValue?Math.max((0,o.default)(e.sourceLinks,f),(0,o.default)(e.targetLinks,f)):e.fixedValue}(l),function({nodes:t}){let e=t.length,n=new Set(t),i=new Set,r=0;for(;n.size;){for(let t of n)for(let{target:e}of(t.depth=r,t.sourceLinks))i.add(e);if(++r>e)throw Error("circular link");n=i,i=new Set}}(l),function({nodes:t}){let e=t.length,n=new Set(t),i=new Set,r=0;for(;n.size;){for(let t of n)for(let{source:e}of(t.height=r,t.targetLinks))i.add(e);if(++r>e)throw Error("circular link");n=i,i=new Set}}(l),function(l){let a=function({nodes:e}){let i=(0,r.default)(e,t=>t.depth)+1,s=(x-n-m)/(i-1),o=Array(i);for(let t of e){let e=Math.max(0,Math.min(i-1,Math.floor(L.call(null,t,i))));t.layer=e,t.x0=n+e*s,t.x1=t.x0+m,o[e]?o[e].push(t):o[e]=[t]}if(t)for(let e of o)e.sort(t);return o}(l);b=Math.min(v,(k-i)/((0,r.default)(a,t=>t.length)-1)),function(t){let n=(0,s.default)(t,t=>(k-i-(t.length-1)*b)/(0,o.default)(t,f));for(let r of t){let t=i;for(let e of r)for(let i of(e.y0=t,e.y1=t+e.value*n,t=e.y1+b,e.sourceLinks))i.width=i.value*n;t=(k-t+b)/(r.length+1);for(let e=0;e=0;--s){let r=e[s];for(let t of r){let e=0,i=0;for(let{target:n,value:r}of t.sourceLinks){let s=r*(n.layer-t.layer);e+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*b/2;for(let{source:i,width:r}of e.targetLinks){if(i===t)break;n+=r+b}for(let{target:i,width:r}of t.sourceLinks){if(i===e)break;n-=r}return n}(t,n)*s,i+=s}if(!(i>0))continue;let r=(e/i-t.y0)*n;t.y0+=r,t.y1+=r,D(t)}void 0===t&&r.sort(c),I(r,i)}})(a,n,i),function(e,n,i){for(let r=1,s=e.length;r0))continue;let r=(e/i-t.y0)*n;t.y0+=r,t.y1+=r,D(t)}void 0===t&&s.sort(c),I(s,i)}}(a,n,i)}}(l),_(l),l}function I(t,e){let n=t.length>>1,r=t[n];O(t,r.y0-b,n-1,e),T(t,r.y1+b,n+1,e),O(t,k,t.length-1,e),T(t,i,0,e)}function T(t,e,n,i){for(;n1e-6&&(r.y0+=s,r.y1+=s),e=r.y1+b}}function O(t,e,n,i){for(;n>=0;--n){let r=t[n],s=(r.y1-e)*i;s>1e-6&&(r.y0-=s,r.y1-=s),e=r.y0-b}}function D({sourceLinks:t,targetLinks:n}){if(void 0===e){for(let{source:{sourceLinks:t}}of n)t.sort(u);for(let{target:{targetLinks:e}}of t)e.sort(h)}}return S.update=function(t){return _(t),t},S.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:(0,a.default)(t),S):w},S.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:(0,a.default)(t),S):L},S.nodeSort=function(e){return arguments.length?(t=e,S):t},S.nodeWidth=function(t){return arguments.length?(m=+t,S):m},S.nodePadding=function(t){return arguments.length?(v=b=+t,S):v},S.nodes=function(t){return arguments.length?(A="function"==typeof t?t:(0,a.default)(t),S):A},S.links=function(t){return arguments.length?(E="function"==typeof t?t:(0,a.default)(t),S):E},S.linkSort=function(t){return arguments.length?(e=t,S):e},S.size=function(t){return arguments.length?(n=i=0,x=+t[0],k=+t[1],S):[x-n,k-i]},S.extent=function(t){return arguments.length?(n=+t[0][0],x=+t[1][0],i=+t[0][1],k=+t[1][1],S):[[n,i],[x,k]]},S.iterations=function(t){return arguments.length?(M=+t,S):M},S}}),n("arN7y",function(e,n){t(e.exports,"default",()=>i);function i(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n=r)&&(n=r)}return n}}),n("fRuM4",function(e,n){t(e.exports,"default",()=>i);function i(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}}),n("fqZOr",function(e,n){t(e.exports,"default",()=>i);function i(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}}),n("69cYt",function(n,i){t(n.exports,"left",()=>o),t(n.exports,"right",()=>l),t(n.exports,"justify",()=>a),t(n.exports,"center",()=>h);var r=e("fRuM4");function s(t){return t.target.depth}function o(t){return t.depth}function l(t,e){return e-1-t.height}function a(t,e){return t.sourceLinks.length?t.depth:e-1}function h(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,r.default)(t.sourceLinks,s)-1:0}}),n("femsB",function(e,n){t(e.exports,"default",()=>i);function i(t){return function(){return t}}}),n("hQhx0",function(n,i){t(n.exports,"default",()=>l);var r=e("bMisq");function s(t){return[t.source.x1,t.y0]}function o(t){return[t.target.x0,t.y1]}function l(){return(0,r.linkHorizontal)().source(s).target(o)}}),n("bMisq",function(n,i){t(n.exports,"linkHorizontal",()=>c);var r=e("i2Uw0"),s=e("eQUJD"),o=e("lf5pR"),l=e("hMiB2");function a(t){return t.source}function h(t){return t.target}function u(t,e,n,i,r){t.moveTo(e,n),t.bezierCurveTo(e=(e+i)/2,n,e,r,i,r)}function c(){return function(t){var e=a,n=h,i=l.x,u=l.y,c=null;function f(){var o,l=(0,s.slice).call(arguments),a=e.apply(this,l),h=n.apply(this,l);if(c||(c=o=(0,r.default)()),t(c,+i.apply(this,(l[0]=a,l)),+u.apply(this,l),+i.apply(this,(l[0]=h,l)),+u.apply(this,l)),o)return c=null,o+""||null}return f.source=function(t){return arguments.length?(e=t,f):e},f.target=function(t){return arguments.length?(n=t,f):n},f.x=function(t){return arguments.length?(i="function"==typeof t?t:(0,o.default)(+t),f):i},f.y=function(t){return arguments.length?(u="function"==typeof t?t:(0,o.default)(+t),f):u},f.context=function(t){return arguments.length?(c=null==t?null:t,f):c},f}(u)}e("hBFQA")}),n("i2Uw0",function(e,n){t(e.exports,"default",()=>a);var i=Math.PI,r=2*i,s=r-1e-6;function o(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new o}o.prototype=l.prototype={constructor:o,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,e,n,r,s){t=+t,e=+e,n=+n,r=+r,s=+s;var o=this._x1,l=this._y1,a=n-t,h=r-e,u=o-t,c=l-e,f=u*u+c*c;if(s<0)throw Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6){if(Math.abs(c*a-h*u)>1e-6&&s){var y=n-o,d=r-l,p=a*a+h*h,g=Math.sqrt(p),_=Math.sqrt(f),x=s*Math.tan((i-Math.acos((p+f-(y*y+d*d))/(2*g*_)))/2),k=x/_,m=x/g;Math.abs(k-1)>1e-6&&(this._+="L"+(t+k*u)+","+(e+k*c)),this._+="A"+s+","+s+",0,0,"+ +(c*y>u*d)+","+(this._x1=t+m*a)+","+(this._y1=e+m*h)}else this._+="L"+(this._x1=t)+","+(this._y1=e)}},arc:function(t,e,n,o,l,a){t=+t,e=+e,n=+n,a=!!a;var h=n*Math.cos(o),u=n*Math.sin(o),c=t+h,f=e+u,y=1^a,d=a?o-l:l-o;if(n<0)throw Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),n&&(d<0&&(d=d%r+r),d>s?this._+="A"+n+","+n+",0,1,"+y+","+(t-h)+","+(e-u)+"A"+n+","+n+",0,1,"+y+","+(this._x1=c)+","+(this._y1=f):d>1e-6&&(this._+="A"+n+","+n+",0,"+ +(d>=i)+","+y+","+(this._x1=t+n*Math.cos(l))+","+(this._y1=e+n*Math.sin(l))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var a=l}),n("eQUJD",function(e,n){t(e.exports,"slice",()=>i);var i=Array.prototype.slice}),n("lf5pR",function(e,n){t(e.exports,"default",()=>i);function i(t){return function(){return t}}}),n("hMiB2",function(e,n){function i(t){return t[0]}function r(t){return t[1]}t(e.exports,"x",()=>i),t(e.exports,"y",()=>r)}),n("hBFQA",function(e,n){t(e.exports,"default",()=>i);function i(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}});
//# sourceMappingURL=sankeyDiagram-707fac0f.24fb25a2.js.map