Files
anthropic-client/docs/public/chunk-LDPOAEOH.min.js
T

17 lines
108 KiB
JavaScript
Raw Normal View History

2024-11-19 20:13:35 +00:00
import{a as Tt}from"./chunk-CIWIECNU.min.js";import{c as ft}from"./chunk-PYBRKFQJ.min.js";import{d as ct}from"./chunk-24EG6CQZ.min.js";import{i as ls,k as cs,o as ut,q as J}from"./chunk-KF4CENUX.min.js";import{D as Rt,H as Lt,I as Q,K as At,M as rs,N as is,Z as X,aa as ns,h as S,ia as Y,j as q,v as as}from"./chunk-UOD6J27N.min.js";function Wt(l,t,r){if(l&&l.length){let[a,e]=t,i=Math.PI/180*r,o=Math.cos(i),s=Math.sin(i);for(let h of l){let[n,c]=h;h[0]=(n-a)*o-(c-e)*s+a,h[1]=(n-a)*s+(c-e)*o+e}}}function _e(l,t){return l[0]===t[0]&&l[1]===t[1]}function ze(l,t,r,a=1){let e=r,i=Math.max(t,.1),o=l[0]&&l[0][0]&&typeof l[0][0]=="number"?[l]:l,s=[0,0];if(e)for(let n of o)Wt(n,s,e);let h=function(n,c,g){let f=[];for(let x of n){let b=[...x];_e(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&f.push(b)}let p=[];c=Math.max(c,.1);let u=[];for(let x of f)for(let b=0;b<x.length-1;b++){let k=x[b],w=x[b+1];if(k[1]!==w[1]){let v=Math.min(k[1],w[1]);u.push({ymin:v,ymax:Math.max(k[1],w[1]),x:v===k[1]?k[0]:w[0],islope:(w[0]-k[0])/(w[1]-k[1])})}}if(u.sort((x,b)=>x.ymin<b.ymin?-1:x.ymin>b.ymin?1:x.x<b.x?-1:x.x>b.x?1:x.ymax===b.ymax?0:(x.ymax-b.ymax)/Math.abs(x.ymax-b.ymax)),!u.length)return p;let y=[],m=u[0].ymin,d=0;for(;y.length||u.length;){if(u.length){let x=-1;for(let b=0;b<u.length&&!(u[b].ymin>m);b++)x=b;u.splice(0,x+1).forEach(b=>{y.push({s:m,edge:b})})}if(y=y.filter(x=>!(x.edge.ymax<=m)),y.sort((x,b)=>x.edge.x===b.edge.x?0:(x.edge.x-b.edge.x)/Math.abs(x.edge.x-b.edge.x)),(g!==1||d%c==0)&&y.length>1)for(let x=0;x<y.length;x+=2){let b=x+1;if(b>=y.length)break;let k=y[x].edge,w=y[b].edge;p.push([[Math.round(k.x),m],[Math.round(w.x),m]])}m+=g,y.forEach(x=>{x.edge.x=x.edge.x+g*x.edge.islope}),d++}return p}(o,i,a);if(e){for(let n of o)Wt(n,s,-e);(function(n,c,g){let f=[];n.forEach(p=>f.push(...p)),Wt(f,c,g)})(h,s,-e)}return h}function xt(l,t){var r;let a=t.hachureAngle+90,e=t.hachureGap;e<0&&(e=4*t.strokeWidth),e=Math.round(Math.max(e,.1));let i=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(i=e),ze(l,e,a,i||1)}var mt=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let a=xt(t,r);return{type:"fillSketch",ops:this.renderLines(a,r)}}renderLines(t,r){let a=[];for(let e of t)a.push(...this.helper.doubleLineOps(e[0][0],e[0][1],e[1][0],e[1][1],r));return a}};function Ct(l){let t=l[0],r=l[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}var _t=class extends mt{fillPolygons(t,r){let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let e=xt(t,Object.assign({},r,{hachureGap:a})),i=Math.PI/180*r.hachureAngle,o=[],s=.5*a*Math.cos(i),h=.5*a*Math.sin(i);for(let[n,c]of e)Ct([n,c])&&o.push([[n[0]-s,n[1]+h],[...c]],[[n[0]+s,n[1]-h],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},zt=class extends mt{fillPolygons(t,r){let a=this._fillPolygons(t,r),e=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),i=this._fillPolygons(t,e);return a.ops=a.ops.concat(i.ops),a}},jt=class{constructor(t){this.helper=t}fillPolygons(t,r){let a=xt(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(a,r)}dotsOnLines(t,r){let a=[],e=r.hachureGap;e<0&&(e=4*r.strokeWidth),e=Math.max(e,.1);let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);let o=e/4;for(let s of t){let h=Ct(s),n=h/e,c=Math.ceil(n)-1,g=h-c*e,f=(s[0][0]+s[1][0])/2-e/4,p=Math.min(s[0][1],s[1][1]);for(let u=0;u<c;u++){let y=p+g+u*e,m=f-o+2*Math.random()*o,d=y-o+2*Math.random()*o,x=this.helper.ellipse(m,d,i,i,r);a.push(...x.ops)}}return{type:"fillSketch",ops:a}}},Gt=class{constructor(t){this.helper=t}fillPolygons(t,r){let a=xt(t,r);return{type:"fillSketch",ops:this.dashedLine(a,r)}}dashedLine(t,r){let a=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,e=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,i=[];return t.forEach(o=>{let s=Ct(o),h=Math.floor(s/(a+e)),n=(s+e-h*(a+e))/2,c=o[0],g=o[1];c[0]>g[0]&&(c=o[1],g=o[0]);let f=Math.atan((g[1]-c[1])/(g[0]-c[0]));for(let p=0;p<h;p++){let u=p*(a+e),y=u+a,m=[c[0]+u*Math.cos(f)+n*
`),X()));let e=l.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+e+'" '+(l.labelStyle?'style="'+l.labelStyle+'"':"")+">"+a+"</span>"),ks(r,l.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}S(vs,"addHtmlLabel");var Ze=S(async(l,t,r,a)=>{let e=l||"";if(typeof e=="object"&&(e=e[0]),Q(X().flowchart.htmlLabels)){e=e.replace(/\\n|\n/g,"<br />"),q.info("vertexText"+e);let i={isNode:a,label:ut(e).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await vs(i)}else{let i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof e=="string"?o=e.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(e)?o=e:o=[];for(let s of o){let h=document.createElementNS("http://www.w3.org/2000/svg","tspan");h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),h.setAttribute("dy","1em"),h.setAttribute("x","0"),r?h.setAttribute("class","title-row"):h.setAttribute("class","row"),h.textContent=s.trim(),i.appendChild(h)}return i}},"createLabel"),Kt=Ze,at=S((l,t,r,a,e)=>["M",l+e,t,"H",l+r-e,"A",e,e,0,0,1,l+r,t+e,"V",t+a-e,"A",e,e,0,0,1,l+r-e,t+a,"H",l+e,"A",e,e,0,0,1,l,t+a-e,"V",t+e,"A",e,e,0,0,1,l+e,t,"Z"].join(" "),"createRoundedRectPathD"),Qe=S(l=>{let{handDrawnSeed:t}=X();return{fill:l,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:l,seed:t}},"solidStateFill"),pt=S(l=>{let t=Je([...l.cssCompiledStyles||[],...l.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Je=S(l=>{let t=new Map;return l.forEach(r=>{let[a,e]=r.split(":");t.set(a.trim(),e?.trim())}),t},"styles2Map"),I=S(l=>{let{stylesArray:t}=pt(l),r=[],a=[],e=[],i=[];return t.forEach(o=>{let s=o[0];s==="color"||s==="font-size"||s==="font-family"||s==="font-weight"||s==="font-style"||s==="text-decoration"||s==="text-align"||s==="text-transform"||s==="line-height"||s==="letter-spacing"||s==="word-spacing"||s==="text-shadow"||s==="text-overflow"||s==="white-space"||s==="word-wrap"||s==="word-break"||s==="overflow-wrap"||s==="hyphens"?r.push(o.join(":")+" !important"):(a.push(o.join(":")+" !important"),s.includes("stroke")&&e.push(o.join(":")+" !important"),s==="fill"&&i.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:e,backgroundStyles:i}},"styles2String"),T=S((l,t)=>{let{themeVariables:r,handDrawnSeed:a}=X(),{nodeBorder:e,mainBkg:i}=r,{stylesMap:o}=pt(l);return Object.assign({roughness:.7,fill:o.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||e,seed:a,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),$s=S(async(l,t)=>{q.info("Creating subgraph rect for ",t.id,t);let r=X(),{themeVariables:a,handDrawnSeed:e}=r,{clusterBkg:i,clusterBorder:o}=a,{labelStyles:s,nodeStyles:h,borderStyles:n,backgroundStyles:c}=I(t),g=l.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Q(r.flowchart.htmlLabels),p=g.insert("g").attr("class","cluster-label "),u=await ct(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0}),y=u.getBBox();if(Q(r.flowchart.htmlLabels)){let $=u.children[0],D=Y(u);y=$.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,x=t.x-m/2,b=t.y-d/2;q.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){let $=M.svg(g),D=T(t,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:e}),C=$.path(at(x,b,m,d,0),D);k=g.insert(()=>(q.debug("Rough node insert CXC",C),C),":first-child"),k.select("path:nth-child(2)").attr("style",n.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=g.insert("rect",":first-child"),k.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",b).at
M ${e.x},${e.y} L ${o.x},${o.y}`}S(Es,"createLine");function Os(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r,t.label="";let e=l.insert("g").attr("class",j(t)).attr("id",t.domId??t.id),i=Math.max(30,t?.width??0),{cssStyles:o}=t,s=M.svg(e),h=T(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let n=s.circle(0,0,i*2,h),c=Es(i),g=s.path(c,h),f=e.insert(()=>n,":first-child");return f.insert(()=>g),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),H(t,f),t.intersect=function(p){return q.info("crossedCircle intersect",t,{radius:i,point:p}),N.circle(t,i,p)},e}S(Os,"crossedCircle");function st(l,t,r,a=100,e=0,i=180){let o=[],s=e*Math.PI/180,c=(i*Math.PI/180-s)/(a-1);for(let g=0;g<a;g++){let f=s+g*c,p=l+r*Math.cos(f),u=t+r*Math.sin(f);o.push({x:-p,y:-u})}return o}S(st,"generateCirclePoints");async function _s(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=i.width+(t.padding??0),h=i.height+(t.padding??0),n=Math.max(5,h*.1),{cssStyles:c}=t,g=[...st(s/2,-h/2,n,30,-90,0),{x:-s/2-n,y:n},...st(s/2+n*2,-n,n,20,-180,-270),...st(s/2+n*2,n,n,20,-90,-180),{x:-s/2-n,y:-h/2},...st(s/2,h/2,n,20,0,90)],f=[{x:s/2,y:-h/2-n},{x:-s/2,y:-h/2-n},...st(s/2,-h/2,n,20,-90,0),{x:-s/2-n,y:-n},...st(s/2+s*.1,-n,n,20,-180,-270),...st(s/2+s*.1,n,n,20,-90,-180),{x:-s/2-n,y:h/2},...st(s/2,h/2,n,20,0,90),{x:-s/2,y:h/2+n},{x:s/2,y:h/2+n}],p=M.svg(e),u=T(t,{fill:"none"});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=F(g).replace("Z",""),d=p.path(m,u),x=F(f),b=p.path(x,{...u}),k=e.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>d,":first-child"),k.attr("class","text"),c&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",c),a&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",a),k.attr("transform",`translate(${n}, 0)`),o.attr("transform",`translate(${-s/2+n-(i.x-(i.left??0))},${-h/2+(t.padding??0)/2-(i.y-(i.top??0))})`),H(t,k),t.intersect=function(w){return N.polygon(t,f,w)},e}S(_s,"curlyBraceLeft");function et(l,t,r,a=100,e=0,i=180){let o=[],s=e*Math.PI/180,c=(i*Math.PI/180-s)/(a-1);for(let g=0;g<a;g++){let f=s+g*c,p=l+r*Math.cos(f),u=t+r*Math.sin(f);o.push({x:p,y:u})}return o}S(et,"generateCirclePoints");async function zs(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=i.width+(t.padding??0),h=i.height+(t.padding??0),n=Math.max(5,h*.1),{cssStyles:c}=t,g=[...et(s/2,-h/2,n,20,-90,0),{x:s/2+n,y:-n},...et(s/2+n*2,-n,n,20,-180,-270),...et(s/2+n*2,n,n,20,-90,-180),{x:s/2+n,y:h/2},...et(s/2,h/2,n,20,0,90)],f=[{x:-s/2,y:-h/2-n},{x:s/2,y:-h/2-n},...et(s/2,-h/2,n,20,-90,0),{x:s/2+n,y:-n},...et(s/2+n*2,-n,n,20,-180,-270),...et(s/2+n*2,n,n,20,-90,-180),{x:s/2+n,y:h/2},...et(s/2,h/2,n,20,0,90),{x:s/2,y:h/2+n},{x:-s/2,y:h/2+n}],p=M.svg(e),u=T(t,{fill:"none"});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=F(g).replace("Z",""),d=p.path(m,u),x=F(f),b=p.path(x,{...u}),k=e.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>d,":first-child"),k.attr("class","text"),c&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",c),a&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",a),k.attr("transform",`translate(${-n}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(i.x-(i.left??0))},${-h/2+(t.padding??0)/2-(i.y-(i.top??0))})`),H(t,k),t.intersect=function(w){return N.polygon(t,f,w)},e}S(zs,"curlyBraceRight");function V(l,t,r,a=100,e=0,i=180){let o=[],s=e*Math.PI/180,c=(i*Math.PI/180-s)/(a-1);for(let g=0;g<a;g++){let f=s+g*c,p=l+r*Math.cos(f),u=t+r*Math.sin(f);o.push({x:-p,y:-u})}return o}S(V,"generateCirclePoints");async function js(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=i.width+(t.padding??0),h=i.height+(t.padding??0),n=Math.max(5,h*.1),{cssStyles:c}=t,g=[...V(s/2,-h/2,n,30,-90,0),{x:-s/2-n,y:n},...V(s/2+n*2,-n,n,20,-
point:`,f,`
node:
`,t,`
res:`,N.polygon(t,n,f)),N.polygon(t,n,f)},e}S(ue,"question");async function ye(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=Math.max(i.width+(t.padding??0),t?.width??0),h=Math.max(i.height+(t.padding??0),t?.height??0),n=-s/2,c=-h/2,g=c/2,f=[{x:n+g,y:c},{x:n,y:0},{x:n+g,y:-c},{x:-n,y:-c},{x:-n,y:c}],{cssStyles:p}=t,u=M.svg(e),y=T(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=F(f),d=u.path(m,y),x=e.insert(()=>d,":first-child");return x.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),x.attr("transform",`translate(${-g/2},0)`),o.attr("transform",`translate(${-g/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),H(t,x),t.intersect=function(b){return N.polygon(t,f,b)},e}S(ye,"rect_left_inv_arrow");async function de(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let e;t.cssClasses?e="node "+t.cssClasses:e="node default";let i=l.insert("g").attr("class",e).attr("id",t.domId||t.id),o=i.insert("g"),s=i.insert("g").attr("class","label").attr("style",a),h=t.description,n=t.label,c=s.node().appendChild(await Kt(n,t.labelStyle,!0,!0)),g={width:0,height:0};if(Q(X()?.flowchart?.htmlLabels)){let D=c.children[0],C=Y(c);g=D.getBoundingClientRect(),C.attr("width",g.width),C.attr("height",g.height)}q.info("Text 2",h);let f=h||[],p=c.getBBox(),u=s.node().appendChild(await Kt(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),y=u.children[0],m=Y(u);g=y.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height);let d=(t.padding||0)/2;Y(u).attr("transform","translate( "+(g.width>p.width?0:(p.width-g.width)/2)+", "+(p.height+d+5)+")"),Y(c).attr("transform","translate( "+(g.width<p.width?0:-(p.width-g.width)/2)+", 0)"),g=s.node().getBBox(),s.attr("transform","translate("+-g.width/2+", "+(-g.height/2-d+3)+")");let x=g.width+(t.padding||0),b=g.height+(t.padding||0),k=-g.width/2-d,w=-g.height/2-d,v,$;if(t.look==="handDrawn"){let D=M.svg(i),C=T(t,{}),R=D.path(at(k,w,x,b,t.rx||0),C),L=D.line(-g.width/2-d,-g.height/2-d+p.height+d,g.width/2+d,-g.height/2-d+p.height+d,C);$=i.insert(()=>(q.debug("Rough node insert CXC",R),L),":first-child"),v=i.insert(()=>(q.debug("Rough node insert CXC",R),R),":first-child")}else v=o.insert("rect",":first-child"),$=o.insert("line"),v.attr("class","outer title-state").attr("style",a).attr("x",-g.width/2-d).attr("y",-g.height/2-d).attr("width",g.width+(t.padding||0)).attr("height",g.height+(t.padding||0)),$.attr("class","divider").attr("x1",-g.width/2-d).attr("x2",g.width/2+d).attr("y1",-g.height/2-d+p.height+d).attr("y2",-g.height/2-d+p.height+d);return H(t,v),t.intersect=function(D){return N.rect(t,D)},i}S(de,"rectWithTitle");async function me(l,t){let r={rx:5,ry:5,classes:"",labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return Bt(l,t,r)}S(me,"roundedRect");async function xe(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=t?.padding??0,h=Math.max(i.width+(t.padding??0)*2,t?.width??0),n=Math.max(i.height+(t.padding??0)*2,t?.height??0),c=-i.width/2-s,g=-i.height/2-s,{cssStyles:f}=t,p=M.svg(e),u=T(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=[{x:c,y:g},{x:c+h+8,y:g},{x:c+h+8,y:g+n},{x:c-8,y:g+n},{x:c-8,y:g},{x:c,y:g},{x:c,y:g+n}],m=p.polygon(y.map(x=>[x.x,x.y]),u),d=e.insert(()=>m,":first-child");return d.attr("class","basic label-container").attr("style",J(f)),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),f&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),o.attr("transform",`translate(${-h/2+4+(t.padding??0)-(i.x-(i.left??0))},${-n/2+(t.padding??0)-(i.y-(i.top??0))})`),H(t,d),t.intersect=function(x){return N.rect(t,x)},e}S(xe,"shadedProcess");async function be(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=Math.max(i.width+(t.padding??0)*2,t?.width??0),h=Math.max(i.height+(t.padding??0)*2,t?.height??0),n
a${e},${i} 0,0,1 0,${-a}
l${r},0
a${e},${i} 0,0,1 0,${a}
M${r},${-a}
a${e},${i} 0,0,0 0,${a}
l${-r},0`,"createCylinderPathD"),ma=S((l,t,r,a,e,i)=>[`M${l},${t}`,`M${l+r},${t}`,`a${e},${i} 0,0,0 0,${-a}`,`l${-r},0`,`a${e},${i} 0,0,0 0,${a}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),xa=S((l,t,r,a,e,i)=>[`M${l+r/2},${-a/2}`,`a${e},${i} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD");async function Be(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o,halfPadding:s}=await G(l,t,j(t)),h=t.look==="neo"?s*2:s,n=i.height+h,c=n/2,g=c/(2.5+n/50),f=i.width+g+h,{cssStyles:p}=t,u;if(t.look==="handDrawn"){let y=M.svg(e),m=ma(0,0,f,n,g,c),d=xa(0,0,f,n,g,c),x=y.path(m,T(t,{})),b=y.path(d,T(t,{fill:"none"}));u=e.insert(()=>b,":first-child"),u=e.insert(()=>x,":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else{let y=da(0,0,f,n,g,c);u=e.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",J(p)).attr("style",a),u.attr("class","basic label-container"),p&&u.selectAll("path").attr("style",p),a&&u.selectAll("path").attr("style",a)}return u.attr("label-offset-x",g),u.attr("transform",`translate(${-f/2}, ${n/2} )`),o.attr("transform",`translate(${-(i.width/2)-g-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),H(t,u),t.intersect=function(y){let m=N.rect(t,y),d=m.y-(t.y??0);if(c!=0&&(Math.abs(d)<(t.height??0)/2||Math.abs(d)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-g)){let x=g*g*(1-d*d/(c*c));x!=0&&(x=Math.sqrt(x)),x=g-x,y.x-(t.x??0)>0&&(x=-x),m.x+=x}return m},e}S(Be,"tiltedCylinder");async function Ne(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i}=await G(l,t,j(t)),o=i.width+t.padding,s=i.height+t.padding,h=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}],n,{cssStyles:c}=t;if(t.look==="handDrawn"){let g=M.svg(e),f=T(t,{}),p=F(h),u=g.path(p,f);n=e.insert(()=>u,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&n.attr("style",c)}else n=rt(e,o,s,h);return a&&n.attr("style",a),t.width=o,t.height=s,H(t,n),t.intersect=function(g){return N.polygon(t,h,g)},e}S(Ne,"trapezoid");async function Re(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i}=await G(l,t,j(t)),o=60,s=20,h=Math.max(o,i.width+(t.padding??0)*2,t?.width??0),n=Math.max(s,i.height+(t.padding??0)*2,t?.height??0),{cssStyles:c}=t,g=M.svg(e),f=T(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let p=[{x:-h/2*.8,y:-n/2},{x:h/2*.8,y:-n/2},{x:h/2,y:-n/2*.6},{x:h/2,y:n/2},{x:-h/2,y:n/2},{x:-h/2,y:-n/2*.6}],u=F(p),y=g.path(u,f),m=e.insert(()=>y,":first-child");return m.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),a&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",a),H(t,m),t.intersect=function(d){return N.polygon(t,p,d)},e}S(Re,"trapezoidalPentagon");async function Le(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=Q(X().flowchart?.htmlLabels),h=i.width+(t.padding??0),n=h+i.height,c=h+i.height,g=[{x:0,y:0},{x:c,y:0},{x:c/2,y:-n}],{cssStyles:f}=t,p=M.svg(e),u=T(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=F(g),m=p.path(y,u),d=e.insert(()=>m,":first-child").attr("transform",`translate(${-n/2}, ${n/2})`);return f&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",f),a&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",a),t.width=h,t.height=n,H(t,d),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${n/2-(i.height+(t.padding??0)/(s?2:1)-(i.y-(i.top??0)))})`),t.intersect=function(x){return q.info("Triangle intersect",t,g,x),N.polygon(t,g,x)},e}S(Le,"triangle");async function Ae(l,t){let{labelStyles:r,nodeStyles:a}=I(t);t.labelStyle=r;let{shapeSvg:e,bbox:i,label:o}=await G(l,t,j(t)),s=Math.max(i.width+(t.padding??0)*2,t?.width??0),h=Math.max(i.height+(t.padding??0)*2,t?.height??0),n=h/8,c=h+n,{cssStyles:g}=t,p=70-s,u=p>0?p/2:0,y=M.svg(e),m=T(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:-s/2-u,y:c/2},...nt(-s/2-u,c/2,s/2+u,c/2,n,.8),{x:s/2+u,y:-c/2},
M${c-n},${g} L${c+s},${g}
M${c},${g-n} L${c},${g+h}`;t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let d=p.path(m,u),x=e.insert(()=>d,":first-child");return x.attr("transform",`translate(${n/2}, ${n/2})`),x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),o.attr("transform",`translate(${-(i.width/2)+n/2-(i.x-(i.left??0))}, ${-(i.height/2)+n/2-(i.y-(i.top??0))})`),H(t,x),t.intersect=function(b){return N.polygon(t,y,b)},e}S(We,"windowPane");async function He(l,t,r,a,e=r.class.padding??12){let i=a?0:3,o=l.insert("g").attr("class",j(t)).attr("id",t.domId||t.id),s=null,h=null,n=null,c=null,g=0,f=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let x=t.annotations[0];await bt(s,{text:`\xAB${x}\xBB`},0),g=s.node().getBBox().height}h=o.insert("g").attr("class","label-group text"),await bt(h,t,0,["font-weight: bolder"]);let u=h.node().getBBox();f=u.height,n=o.insert("g").attr("class","members-group text");let y=0;for(let x of t.members){let b=await bt(n,x,y,[x.parseClassifier()]);y+=b+i}p=n.node().getBBox().height,p<=0&&(p=e/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(let x of t.methods){let b=await bt(c,x,m,[x.parseClassifier()]);m+=b+i}let d=o.node().getBBox();if(s!==null){let x=s.node().getBBox();s.attr("transform",`translate(${-x.width/2})`)}return h.attr("transform",`translate(${-u.width/2}, ${g})`),d=o.node().getBBox(),n.attr("transform",`translate(0, ${g+f+e*2})`),d=o.node().getBBox(),c.attr("transform",`translate(0, ${g+f+(p?p+e*4:e*2)})`),d=o.node().getBBox(),{shapeSvg:o,bbox:d}}S(He,"textHelper");async function bt(l,t,r,a=[]){let e=l.insert("g").attr("class","label").attr("style",a.join("; ")),i=Rt(),o="useHtmlLabels"in t?t.useHtmlLabels:Q(i.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),At(s)&&(o=!0);let h=await ct(e,ns(ut(s)),{width:ls(s,i)+50,classes:"markdown-node-label",useHtmlLabels:o},i),n,c=1;if(o){let g=h.children[0],f=Y(h);c=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(c+=g.innerHTML.split("<mrow>").length-1);let p=g.getElementsByTagName("img");if(p){let u=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(y=>new Promise(m=>{function d(){if(y.style.display="flex",y.style.flexDirection="column",u){let x=i.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,k=parseInt(x,10)*5+"px";y.style.minWidth=k,y.style.maxWidth=k}else y.style.width="100%";m(y)}S(d,"setupImage"),setTimeout(()=>{y.complete&&d()}),y.addEventListener("error",d),y.addEventListener("load",d)})))}n=g.getBoundingClientRect(),f.attr("width",n.width),f.attr("height",n.height)}else{a.includes("font-weight: bolder")&&Y(h).selectAll("tspan").attr("font-weight",""),c=h.children.length;let g=h.children[0];(h.textContent===""||h.textContent.includes("&gt"))&&(g.textContent=s[0]+s.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),s[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),n=h.getBBox()}return e.attr("transform","translate(0,"+(-n.height/(2*c)+r)+")"),n.height}S(bt,"addText");async function Ie(l,t){let r=X(),a=r.class.padding??12,e=a,i=t.useHtmlLabels??Q(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];let{shapeSvg:s,bbox:h}=await He(l,t,r,i,e),{labelStyles:n,nodeStyles:c}=I(t);t.labelStyle=n,t.cssStyles=o.styles||"";let g=o.styles?.join(";")||c||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));let f=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,p=M.svg(s),u=T(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=h.width,m=h.height;o.members.length===0&&o.methods.length===0?m+=e:o.members.length>0&&o.methods.length===0&&(m+=e*2);let d=-y/2,x=-m/2,b=p.rectangle(d-a,x-a-(f?a:o.members.length===0&&o.methods.length===0?-a/2:0),y+2*a,m+2*a+(f?a*2:o.members.length===0&&o.method
//# sourceMappingURL=chunk-LDPOAEOH.min.js.map