@hpcc-js/react 3.1.0 → 3.2.0
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/index.js +1689 -2
- package/dist/index.js.map +1 -7
- package/dist/index.umd.cjs +3 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +13 -15
- package/src/ImageChar.tsx +3 -2
- package/src/__package__.ts +2 -2
- package/src/edge.tsx +2 -2
- package/src/icon.tsx +3 -3
- package/src/image.tsx +3 -3
- package/src/index.ts +1 -4
- package/src/preact-shim.ts +4 -0
- package/src/render.ts +11 -35
- package/src/shape.tsx +5 -5
- package/src/span.tsx +2 -2
- package/src/subgraph.tsx +2 -2
- package/src/text.tsx +28 -27
- package/src/vertex.tsx +10 -9
- package/src/vertex2.tsx +5 -4
- package/src/vertex3.tsx +5 -4
- package/src/vertex4.tsx +5 -4
- package/types/ImageChar.d.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types/edge.d.ts +2 -2
- package/types/icon.d.ts +3 -3
- package/types/image.d.ts +2 -2
- package/types/index.d.ts +1 -2
- package/types/preact-shim.d.ts +4 -0
- package/types/render.d.ts +7 -14
- package/types/shape.d.ts +5 -5
- package/types/span.d.ts +2 -2
- package/types/subgraph.d.ts +2 -2
- package/types/text.d.ts +6 -6
- package/types/vertex.d.ts +3 -3
- package/types/vertex2.d.ts +2 -2
- package/types/vertex3.d.ts +3 -3
- package/types/vertex4.d.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,1690 @@
|
|
|
1
|
-
|
|
2
|
-
`),[o]);h.useLayoutEffect(()=>{let l=ft.textSize(g,t,r);a(l.width),f(l.height)},[t,r,g]);let u=h.useMemo(()=>{let l=-(s/2)+r/2;return g.map((m,d)=>h.createElement("g",{key:`key-${d}`,transform:`translate(0 ${l+d*(r+2)})`},h.createElement(ot,{text:m,height:r,fontFamily:t,fill:e})))},[g,s,r,t,e]);return h.createElement("g",null,u)},"Text"),E=p(({text:o,height:r=12,fontFamily:t="Verdana",padding:e=4,fill:n="whitesmoke",stroke:i="lightgray",textFill:a="black",strokeWidth:s=1,cornerRadius:f=0,onSizeUpdate:g})=>{let[u,l]=h.useState(0),[m,d]=h.useState(0);h.useEffect(()=>{g&&g({width:u,height:m})},[u,m,g]);let c=h.useCallback(C=>{l(C.width),d(C.height)},[]),x=u+e*2+s,b=m+e*2+s,k=Math.floor(r/10);return h.createElement(h.Fragment,null,h.createElement(D,{width:x,height:b,fill:n,stroke:i,strokeWidth:s,cornerRadius:f}),h.createElement("g",{transform:`translate(0 ${k})`},h.createElement(J,{text:o,fontFamily:t,height:r,fill:a,onSizeUpdate:c})))},"TextBox"),le=p(({text:o,height:r=12,width:t=12,fontFamily:e="Verdana",fontSize:n=10,padding:i=3,fill:a="whitesmoke",stroke:s="lightgray",textFill:f="black",strokeWidth:g=1,cornerRadius:u=0,onSizeUpdate:l})=>{let[m,d]=h.useState(t),[c,x]=h.useState(r);return h.useLayoutEffect(()=>{let b=ft.textSize(o,e,n);d(b.width+i*2),x(b.height+i*2)},[o,e,n,i]),h.useLayoutEffect(()=>{l&&l({width:m,height:c})},[m,c,i,l]),h.createElement(h.Fragment,null,h.createElement(D,{width:m,height:c,fill:a,stroke:s,strokeWidth:g,cornerRadius:u}),h.createElement("g",{transform:`translate(${-(m/2)+i} ${-(c/2)+i+n*.15})`},h.createElement(ot,{text:o,fontFamily:e,height:n,fill:f,anchor:"start",baseline:"hanging"})))},"LabelledRect"),he=p(({icon:o,iconFontFamily:r,text:t,height:e=12,width:n=12,fontFamily:i="Verdana",fontSize:a=10,padding:s=3,fill:f="whitesmoke",stroke:g="lightgray",textFill:u="black",strokeWidth:l=1,cornerRadius:m=0})=>h.createElement(h.Fragment,null,h.createElement(D,{width:n,height:e,fill:f,stroke:g,strokeWidth:l,cornerRadius:m}),h.createElement("g",{transform:`translate(${-(n/2)+s} ${-(e/2)+s})`},h.createElement(P,{shape:"square",imageFontFamily:r,imageChar:o,height:e,fill:f,imageCharFill:u})),h.createElement("g",{transform:`translate(${-(n/2)+s*2+e} ${-(e/2)+s})`},h.createElement(ot,{text:t,fontFamily:i,height:a,fill:u,anchor:"start",baseline:"hanging"}))),"IconLabelledRect");var de=p(({label:o,labelPos:r,labelFill:t="black",labelHeight:e=12,path:n,stroke:i,strokeWidth:a,strokeDasharray:s})=>j.createElement(j.Fragment,null,j.createElement("path",{d:n,stroke:i,style:{strokeWidth:a,strokeDasharray:s}}),o&&r&&r.length===2?j.createElement("g",{transform:`translate(${r[0]} ${r[1]})`},j.createElement(J,{text:o,fill:t,height:e})):void 0),"Edge");import nt from"react";import{render as It}from"react-dom";import{createRoot as gt}from"react-dom/client";import{HTMLWidget as Ot,SVGWidget as Vt}from"@hpcc-js/common";function we(o,r,t){let e=nt.createElement(o,r);It(e,t)}p(we,"render");var G=class extends Ot{constructor(t){super();this._component=t}static{p(this,"HTMLAdapter")}_root;props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return arguments.length===1?this._props[t]:(this._props[t]=e,this)}enter(t,e){super.enter(t,e),this._root=gt(t)}update(t,e){super.update(t,e),this._root.render(nt.createElement(this._component,this.props()))}exit(t,e){this._root.unmount(),super.exit(t,e)}};G.prototype._class+=" react_HTMLAdapter";G.prototype.publish("props",{},"object","Properties");var R=class extends Vt{constructor(t){super();this._component=t}static{p(this,"SVGAdapter")}_root;props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return arguments.length===1?this._props[t]:(this._props[t]=e,this)}_c2;enter(t,e){super.enter(t,e),this._root=gt(t)}update(t,e){super.update(t,e),this._root.render(nt.createElement(this._component,this.props()))}exit(t,e){this._root.unmount(),super.exit(t,e)}};R.prototype._class+=" react_SVGAdapter";R.prototype.publish("props",{},"object","Properties");import _t from"react";var Ie=p(({text:o})=>_t.createElement("span",null,o),"Span");import y from"react";var it=p(({x:o,y:r,annotationIDs:t=[],stepSize:e=-16})=>{let n=t.map((i,a)=>y.createElement("g",{key:i,transform:`translate(${o+a*e} ${r})`},y.createElement("use",{href:"#"+i})));return y.createElement(y.Fragment,null,n)},"Annotations"),Be=p(({categoryID:o="",text:r="",textHeight:t=12,textPadding:e=4,icon:n={},annotationsHeight:i=12,annotationIDs:a=[],textFill:s,textboxFill:f,textboxStroke:g,textFontFamily:u,onSizeUpdate:l,showLabel:m=!0,scale:d=1})=>{n={imageChar:"fa-question",height:32,fill:"transparent",...n};let[c,x]=y.useState(0),[b,k]=y.useState(0);y.useEffect(()=>{l&&l({width:0,height:0})},[c,b,l]);let C=c;C+=4;let W=-(n.height*2/6+t+8)/2,I=n.height/3+b/2+e,_=n.height/3+b+e+i/3;m||(W+=(t+8)/2,_-=b+e);let O=y.useCallback(T=>{x(T.width),k(T.height)},[]),V=m?y.createElement("g",{transform:`translate(0 ${I})`},y.createElement(E,{text:r,height:t,padding:e,onSizeUpdate:O,textFill:s,fill:f,stroke:g,fontFamily:u})):void 0;return o?y.createElement("g",{transform:`translate(0 ${W}) scale(${d})`},y.createElement("use",{href:"#"+o}),V,y.createElement(it,{x:C/2,y:_,annotationIDs:a})):y.createElement("g",{transform:`translate(0 ${W}) scale(${d})`},y.createElement(P,{...n}),V)},"Vertex");import S from"react";import{Utility as Et}from"@hpcc-js/common";var Me=p(({categoryID:o="",text:r="",textHeight:t=12,textPadding:e=4,icon:n={},textFill:i="black",textboxFill:a="white",textboxStroke:s="black",textFontFamily:f,annotationsHeight:g=12,annotationIDs:u=[]})=>{n={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...n};let l=t+e*2,{width:m}=S.useMemo(()=>Et.textSize(r,f,t,!1),[r,f,t]),d=g,c=1,x=l/2,b=0,k=-(n.height*2/6+t+8)/2,C=-n.height/2,W=0,I=Math.ceil(m/2+e),_=x-n.height/2,O=d/2,V=x;return o?S.createElement("g",{transform:`translate(${b} ${k})`},S.createElement("g",{transform:`translate(${C} ${W})`},S.createElement("use",{href:"#"+o})),S.createElement("g",{transform:`translate(${I} ${_})`},S.createElement(E,{text:r,height:t,padding:e,strokeWidth:c,stroke:s,fill:a,textFill:i,fontFamily:f})),S.createElement(it,{x:O,y:V,annotationIDs:u,stepSize:d})):S.createElement(S.Fragment,null,S.createElement("g",{transform:`translate(${C} ${W})scale(1.0002)`},S.createElement(P,{...n,shape:"square"})),S.createElement("g",{transform:`translate(${I} ${_})scale(1.0002)`},S.createElement(E,{text:r,height:t,padding:e,stroke:s,fill:a})))},"Vertex2");import w from"react";import{Utility as At}from"@hpcc-js/common";var Tt=p(({text:o="",textHeight:r=10,textPadding:t=4,textFill:e="#287EC4",textboxFill:n="white",textboxStroke:i="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:f=2,annotations:g=[],cornerRadius:u=3,icon:l={},subText:m={text:""},showLabel:d=!0,noLabelRadius:c=5,expansionIcon:x,scale:b=1})=>{l={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...l},m={text:"",fill:"white",textFill:"#555555",...m},x=x?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...x}:void 0;let k=0,C=0,W=w.useMemo(()=>At.textSize(o,s,r,!1).width,[o,s,r]),I=0;o!==""&&(I=W+t*2+a*2),k+=I+f;let _=k-I/2,O=r+t*2+a*2,V=[];g.forEach((K,X)=>{let tt=K.imageChar,N=O;k+=N+f;let H=k-N/2;V.push(w.createElement("g",{key:X,className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(K),transform:`translate(${H} ${C})`},w.createElement(P,{...K,shape:"square",height:O,imageChar:tt,imageFontFamily:K.imageFontFamily,cornerRadius:u,strokeWidth:0})))}),g.length>0&&(k+=f*(g.length-1));let T=w.createElement("g",{"data-click":"text",transform:`translate(${_} ${C})`},!d||o===""?w.createElement("circle",{r:c,stroke:i,fill:e}):w.createElement(E,{text:o,height:r,padding:t,strokeWidth:a,stroke:i,fill:n,textFill:e,fontFamily:s,cornerRadius:u})),L=l.height||20,B=l.strokeWidth||0,v=0,Y=0,M=0,z=O+f*2;o!==""||V.length>0?Y=-(L/2)-B-O/2-f*2:m.text!==""&&(z=L/2+B+f*2);let Z=m.text===""?null:w.createElement("g",{"data-click":"subtext",transform:`translate(${M} ${z})`},w.createElement(E,{fill:m.fill||"#FFFFFF",textFill:m.textFill||e,...m,height:r,padding:t,strokeWidth:0,stroke:i,fontFamily:s,cornerRadius:u}));return w.createElement("g",{transform:`scale(${b})`},w.createElement("g",{"data-click":"icon",transform:`translate(${v} ${Y})`},w.createElement(P,{...l}),x&&w.createElement("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(x),transform:`translate(${(l.height+B)/2-x.height/2} ${-(l.height+B)/2+x.height/2})`},w.createElement(P,{...x}))),w.createElement("g",{transform:`translate(${-k/2} ${C})`},T,V),Z)},"Vertex3"),tr=p(function({id:o,categoryID:r="",text:t="",textHeight:e=12,textPadding:n=10,textFill:i="#287EC4",textboxFill:a="white",textboxStroke:s="#CCCCCC",textboxStrokeWidth:f=1,textFontFamily:g="Verdana",annotationGutter:u=2,annotations:l=[],cornerRadius:m,icon:d={},subText:c={},expansionIcon:x,scale:b=1}){return d={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...d},c={text:"",fill:"transparent",textFill:"#555555",...c},w.createElement(Tt,{...{id:o,categoryID:r,text:t,textHeight:e,textPadding:n,textFill:i,textboxFill:a,textboxStroke:s,textboxStrokeWidth:f,textFontFamily:g,annotationGutter:u,annotations:l,cornerRadius:m,icon:d,subText:c,expansionIcon:x,scale:b},icon:d,subText:c})},"CentroidVertex3");import $ from"react";import{Utility as ct}from"@hpcc-js/common";var Bt=p(({categoryID:o="",text:r="",textHeight:t=10,textPadding:e=4,textFill:n="#287EC4",textboxFill:i="white",textboxStroke:a="#CCCCCC",textboxStrokeWidth:s=1,textFontFamily:f="Verdana",annotationGutter:g=2,annotations:u=[],iconAnnotations:l=[],cornerRadius:m=3,icon:d={},subText:c={},showLabel:x=!0,noLabelRadius:b=5,iconBorderWidth:k=1,iconBorderColor:C="#333",iconBackgroundColor:W="#fff",iconFontColor:I="#000",iconFontSize:_=20,iconFontFamily:O="FontAwesome",shapeOffsetX:V=0,shapeOffsetY:T=0,iconOffsetX:L=0,iconOffsetY:B=0,iconPadding:v=4,iconText:Y="?",shapeRendering:M="auto"})=>{d={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...d},c={text:"",fill:"white",textFill:"#555555",...c};let z=0,Z=$.useMemo(()=>ct.textSize(r,f,t,!1).width,[r,f,t]),K=0;r!==""&&(K=Z+e*2+s*2);let X=K+g,tt=X-K/2,N=t+g*2+s*2,H=u.map(F=>ct.textSize(F.imageChar,F.imageFontFamily,F.height,!1).width),st=[],at=X;u.forEach((F,q)=>{let et=F.imageChar,rt=F.height??N;at+=H[q]+g;let Ft=at-H[q]/2;st.push($.createElement("g",{key:q,className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(F),transform:`translate(${Ft} ${z})`},$.createElement(P,{...F,shape:"rectangle",width:H[q],height:rt,imageChar:et,imageFontFamily:F.imageFontFamily,cornerRadius:m,strokeWidth:0})))}),u.length>0&&(X+=g*(u.length-1));let pt=[];l.forEach((F,q)=>{let et=F.shapeOffsetX,rt=F.shapeOffsetY;pt.push($.createElement("g",{key:q,className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(F),transform:`translate(${et} ${rt})`},$.createElement(P,{...F,shape:F.shape??"square",imageChar:F.imageChar,imageFontFamily:F.imageFontFamily,cornerRadius:m,stroke:F.stroke,strokeWidth:F.strokeWidth})))});let ut=$.createElement("g",{"data-click":"text",transform:`translate(${tt} ${z})`},!x||r===""?$.createElement("circle",{r:b,stroke:a,fill:n}):$.createElement(E,{text:r,height:t,padding:e,strokeWidth:s,stroke:a,fill:i,textFill:n,fontFamily:f,cornerRadius:m})),dt=0,xt=N+g*2,bt=c.text===""?null:$.createElement("g",{"data-click":"subtext",transform:`translate(${dt} ${xt})`},$.createElement(E,{fill:c.fill||"#FFFFFF",textFill:c.textFill||n,...c,height:t,padding:e,strokeWidth:0,stroke:a,fontFamily:f,cornerRadius:m}));return $.createElement("g",null,$.createElement("g",{"data-click":"icon",transform:`translate(${V} ${T})`},$.createElement(P,{...d,strokeWidth:k,shape:"circle",height:_,fill:W,stroke:C,imageFontFamily:O,imageChar:Y,imageCharFill:I,padding:v,xOffset:L,yOffset:B,cornerRadius:m,shapeRendering:M}),pt),$.createElement("g",{transform:`translate(${-X/2} ${z})`},ut,st),bt)},"Vertex4"),mr=p(function({id:o,categoryID:r="",text:t="",textHeight:e=12,textPadding:n=10,textFill:i="#287EC4",textboxFill:a="white",textboxStroke:s="#CCCCCC",textboxStrokeWidth:f=1,textFontFamily:g="Verdana",annotationGutter:u=2,annotations:l=[],iconAnnotations:m=[],cornerRadius:d,icon:c={},subText:x={},showLabel:b=!0,noLabelRadius:k=5,iconBorderWidth:C=1,iconBorderColor:W="#333",iconBackgroundColor:I="#fff",iconFontColor:_="#000",iconFontSize:O=20,iconFontFamily:V="FontAwesome",shapeOffsetX:T=0,shapeOffsetY:L=0,iconOffsetX:B=0,iconOffsetY:v=0,iconPadding:Y=4,iconText:M="?",shapeRendering:z="auto"}){return c={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...c},x={text:"",fill:"transparent",textFill:"#555555",...x},$.createElement(Bt,{...{id:o,categoryID:r,text:t,textHeight:e,textPadding:n,textFill:i,textboxFill:a,textboxStroke:s,textboxStrokeWidth:f,textFontFamily:g,annotationGutter:u,annotations:l,iconAnnotations:m,cornerRadius:d,icon:c,subText:x,showLabel:b,noLabelRadius:k,iconBorderWidth:C,iconBorderColor:W,iconBackgroundColor:I,iconFontColor:_,iconFontSize:O,iconFontFamily:V,shapeOffsetX:T,shapeOffsetY:L,iconOffsetX:B,iconOffsetY:v,iconPadding:Y,iconText:M,shapeRendering:z},icon:c,subText:x})},"CentroidVertex4");import Q from"react";import{Utility as zt}from"@hpcc-js/common";var dr=p(({text:o,width:r=100,height:t=100,fill:e="transparent",stroke:n="black",fontHeight:i=12,fontFamily:a})=>{let s=zt.textSize(o,a,i,!1);return Q.createElement(Q.Fragment,null,Q.createElement(D,{width:r,height:t,fill:e,stroke:n}),Q.createElement("g",{transform:`translate(${(-r+s.width)/2+4} ${(-t+s.height)/2+4})`},Q.createElement(J,{height:i,text:o,fontFamily:a})))},"Subgraph");import kr from"react";export{it as Annotations,Yt as BUILD_VERSION,tr as CentroidVertex3,mr as CentroidVertex4,$t as Circle,de as Edge,G as HTMLAdapter,P as Icon,he as IconLabelledRect,oe as Icons,mt as Image,lt as ImageChar,le as LabelledRect,Dt as PKG_NAME,Lt as PKG_VERSION,kr as React,D as Rectangle,R as SVGAdapter,ht as Shape,Ie as Span,St as Square,dr as Subgraph,J as Text,E as TextBox,ot as TextLine,Be as Vertex,Me as Vertex2,Tt as Vertex3,Bt as Vertex4,we as render};
|
|
1
|
+
import { Utility, Palette, HTMLWidget, SVGWidget } from "@hpcc-js/common";
|
|
2
|
+
const PKG_NAME = "@hpcc-js/react", PKG_VERSION = "3.1.1", BUILD_VERSION = "3.2.1";
|
|
3
|
+
var n, l$1, u$2, i$1, o$1, r$1, f$2, e$1, c$1, s$1, h$1 = {}, v$1 = [], p$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, y$1 = Array.isArray;
|
|
4
|
+
function d$1(n2, l2) {
|
|
5
|
+
for (var u2 in l2) n2[u2] = l2[u2];
|
|
6
|
+
return n2;
|
|
7
|
+
}
|
|
8
|
+
function w$1(n2) {
|
|
9
|
+
n2 && n2.parentNode && n2.parentNode.removeChild(n2);
|
|
10
|
+
}
|
|
11
|
+
function _$1(l2, u2, t2) {
|
|
12
|
+
var i2, o2, r2, f2 = {};
|
|
13
|
+
for (r2 in u2) r2 == "key" ? i2 = u2[r2] : r2 == "ref" ? o2 = u2[r2] : f2[r2] = u2[r2];
|
|
14
|
+
if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), typeof l2 == "function" && l2.defaultProps != null) for (r2 in l2.defaultProps) f2[r2] === void 0 && (f2[r2] = l2.defaultProps[r2]);
|
|
15
|
+
return g$1(l2, f2, i2, o2, null);
|
|
16
|
+
}
|
|
17
|
+
function g$1(n2, t2, i2, o2, r2) {
|
|
18
|
+
var f2 = { type: n2, props: t2, key: i2, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: r2 ?? ++u$2, __i: -1, __u: 0 };
|
|
19
|
+
return r2 == null && l$1.vnode != null && l$1.vnode(f2), f2;
|
|
20
|
+
}
|
|
21
|
+
function b(n2) {
|
|
22
|
+
return n2.children;
|
|
23
|
+
}
|
|
24
|
+
function k$1(n2, l2) {
|
|
25
|
+
this.props = n2, this.context = l2;
|
|
26
|
+
}
|
|
27
|
+
function x(n2, l2) {
|
|
28
|
+
if (l2 == null) return n2.__ ? x(n2.__, n2.__i + 1) : null;
|
|
29
|
+
for (var u2; l2 < n2.__k.length; l2++) if ((u2 = n2.__k[l2]) != null && u2.__e != null) return u2.__e;
|
|
30
|
+
return typeof n2.type == "function" ? x(n2) : null;
|
|
31
|
+
}
|
|
32
|
+
function C$1(n2) {
|
|
33
|
+
var l2, u2;
|
|
34
|
+
if ((n2 = n2.__) != null && n2.__c != null) {
|
|
35
|
+
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++) if ((u2 = n2.__k[l2]) != null && u2.__e != null) {
|
|
36
|
+
n2.__e = n2.__c.base = u2.__e;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
return C$1(n2);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function S(n2) {
|
|
43
|
+
(!n2.__d && (n2.__d = !0) && i$1.push(n2) && !M$1.__r++ || o$1 !== l$1.debounceRendering) && ((o$1 = l$1.debounceRendering) || r$1)(M$1);
|
|
44
|
+
}
|
|
45
|
+
function M$1() {
|
|
46
|
+
var n2, u2, t2, o2, r2, e2, c2, s2;
|
|
47
|
+
for (i$1.sort(f$2); n2 = i$1.shift(); ) n2.__d && (u2 = i$1.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((o2 = d$1({}, r2)).__v = r2.__v + 1, l$1.vnode && l$1.vnode(o2), O$1(t2.__P, o2, r2, t2.__n, t2.__P.namespaceURI, 32 & r2.__u ? [e2] : null, c2, e2 ?? x(r2), !!(32 & r2.__u), s2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, j$1(c2, o2, s2), o2.__e != e2 && C$1(o2)), i$1.length > u2 && i$1.sort(f$2));
|
|
48
|
+
M$1.__r = 0;
|
|
49
|
+
}
|
|
50
|
+
function P$1(n2, l2, u2, t2, i2, o2, r2, f2, e2, c2, s2) {
|
|
51
|
+
var a2, p2, y2, d2, w2, _2 = t2 && t2.__k || v$1, g2 = l2.length;
|
|
52
|
+
for (u2.__d = e2, $$1(u2, l2, _2), e2 = u2.__d, a2 = 0; a2 < g2; a2++) (y2 = u2.__k[a2]) != null && (p2 = y2.__i === -1 ? h$1 : _2[y2.__i] || h$1, y2.__i = a2, O$1(n2, y2, p2, i2, o2, r2, f2, e2, c2, s2), d2 = y2.__e, y2.ref && p2.ref != y2.ref && (p2.ref && E(p2.ref, null, y2), s2.push(y2.ref, y2.__c || d2, y2)), w2 == null && d2 != null && (w2 = d2), 65536 & y2.__u || p2.__k === y2.__k ? e2 = I$1(y2, e2, n2) : typeof y2.type == "function" && y2.__d !== void 0 ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609);
|
|
53
|
+
u2.__d = e2, u2.__e = w2;
|
|
54
|
+
}
|
|
55
|
+
function $$1(n2, l2, u2) {
|
|
56
|
+
var t2, i2, o2, r2, f2, e2 = l2.length, c2 = u2.length, s2 = c2, a2 = 0;
|
|
57
|
+
for (n2.__k = [], t2 = 0; t2 < e2; t2++) (i2 = l2[t2]) != null && typeof i2 != "boolean" && typeof i2 != "function" ? (r2 = t2 + a2, (i2 = n2.__k[t2] = typeof i2 == "string" || typeof i2 == "number" || typeof i2 == "bigint" || i2.constructor == String ? g$1(null, i2, null, null, null) : y$1(i2) ? g$1(b, { children: i2 }, null, null, null) : i2.constructor === void 0 && i2.__b > 0 ? g$1(i2.type, i2.props, i2.key, i2.ref ? i2.ref : null, i2.__v) : i2).__ = n2, i2.__b = n2.__b + 1, o2 = null, (f2 = i2.__i = L(i2, u2, r2, s2)) !== -1 && (s2--, (o2 = u2[f2]) && (o2.__u |= 131072)), o2 == null || o2.__v === null ? (f2 == -1 && a2--, typeof i2.type != "function" && (i2.__u |= 65536)) : f2 !== r2 && (f2 == r2 - 1 ? a2-- : f2 == r2 + 1 ? a2++ : (f2 > r2 ? a2-- : a2++, i2.__u |= 65536))) : i2 = n2.__k[t2] = null;
|
|
58
|
+
if (s2) for (t2 = 0; t2 < c2; t2++) (o2 = u2[t2]) != null && !(131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x(o2)), N(o2, o2));
|
|
59
|
+
}
|
|
60
|
+
function I$1(n2, l2, u2) {
|
|
61
|
+
var t2, i2;
|
|
62
|
+
if (typeof n2.type == "function") {
|
|
63
|
+
for (t2 = n2.__k, i2 = 0; t2 && i2 < t2.length; i2++) t2[i2] && (t2[i2].__ = n2, l2 = I$1(t2[i2], l2, u2));
|
|
64
|
+
return l2;
|
|
65
|
+
}
|
|
66
|
+
n2.__e != l2 && (l2 && n2.type && !u2.contains(l2) && (l2 = x(n2)), u2.insertBefore(n2.__e, l2 || null), l2 = n2.__e);
|
|
67
|
+
do
|
|
68
|
+
l2 = l2 && l2.nextSibling;
|
|
69
|
+
while (l2 != null && l2.nodeType === 8);
|
|
70
|
+
return l2;
|
|
71
|
+
}
|
|
72
|
+
function H(n2, l2) {
|
|
73
|
+
return l2 = l2 || [], n2 == null || typeof n2 == "boolean" || (y$1(n2) ? n2.some(function(n3) {
|
|
74
|
+
H(n3, l2);
|
|
75
|
+
}) : l2.push(n2)), l2;
|
|
76
|
+
}
|
|
77
|
+
function L(n2, l2, u2, t2) {
|
|
78
|
+
var i2 = n2.key, o2 = n2.type, r2 = u2 - 1, f2 = u2 + 1, e2 = l2[u2];
|
|
79
|
+
if (e2 === null || e2 && i2 == e2.key && o2 === e2.type && !(131072 & e2.__u)) return u2;
|
|
80
|
+
if ((typeof o2 != "function" || o2 === b || i2) && t2 > (e2 != null && !(131072 & e2.__u) ? 1 : 0)) for (; r2 >= 0 || f2 < l2.length; ) {
|
|
81
|
+
if (r2 >= 0) {
|
|
82
|
+
if ((e2 = l2[r2]) && !(131072 & e2.__u) && i2 == e2.key && o2 === e2.type) return r2;
|
|
83
|
+
r2--;
|
|
84
|
+
}
|
|
85
|
+
if (f2 < l2.length) {
|
|
86
|
+
if ((e2 = l2[f2]) && !(131072 & e2.__u) && i2 == e2.key && o2 === e2.type) return f2;
|
|
87
|
+
f2++;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
function T$1(n2, l2, u2) {
|
|
93
|
+
l2[0] === "-" ? n2.setProperty(l2, u2 ?? "") : n2[l2] = u2 == null ? "" : typeof u2 != "number" || p$1.test(l2) ? u2 : u2 + "px";
|
|
94
|
+
}
|
|
95
|
+
function A(n2, l2, u2, t2, i2) {
|
|
96
|
+
var o2;
|
|
97
|
+
n: if (l2 === "style") if (typeof u2 == "string") n2.style.cssText = u2;
|
|
98
|
+
else {
|
|
99
|
+
if (typeof t2 == "string" && (n2.style.cssText = t2 = ""), t2) for (l2 in t2) u2 && l2 in u2 || T$1(n2.style, l2, "");
|
|
100
|
+
if (u2) for (l2 in u2) t2 && u2[l2] === t2[l2] || T$1(n2.style, l2, u2[l2]);
|
|
101
|
+
}
|
|
102
|
+
else if (l2[0] === "o" && l2[1] === "n") o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 || l2 === "onFocusOut" || l2 === "onFocusIn" ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u2, u2 ? t2 ? u2.u = t2.u : (u2.u = e$1, n2.addEventListener(l2, o2 ? s$1 : c$1, o2)) : n2.removeEventListener(l2, o2 ? s$1 : c$1, o2);
|
|
103
|
+
else {
|
|
104
|
+
if (i2 == "http://www.w3.org/2000/svg") l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
105
|
+
else if (l2 != "width" && l2 != "height" && l2 != "href" && l2 != "list" && l2 != "form" && l2 != "tabIndex" && l2 != "download" && l2 != "rowSpan" && l2 != "colSpan" && l2 != "role" && l2 != "popover" && l2 in n2) try {
|
|
106
|
+
n2[l2] = u2 ?? "";
|
|
107
|
+
break n;
|
|
108
|
+
} catch {
|
|
109
|
+
}
|
|
110
|
+
typeof u2 == "function" || (u2 == null || u2 === !1 && l2[4] !== "-" ? n2.removeAttribute(l2) : n2.setAttribute(l2, l2 == "popover" && u2 == 1 ? "" : u2));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function F$1(n2) {
|
|
114
|
+
return function(u2) {
|
|
115
|
+
if (this.l) {
|
|
116
|
+
var t2 = this.l[u2.type + n2];
|
|
117
|
+
if (u2.t == null) u2.t = e$1++;
|
|
118
|
+
else if (u2.t < t2.u) return;
|
|
119
|
+
return l$1.event && (u2 = l$1.event(u2)), "handleEvent" in t2 ? t2.handleEvent(u2) : t2(u2);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function O$1(n2, u2, t2, i2, o2, r2, f2, e2, c2, s2) {
|
|
124
|
+
var a2, h2, v2, p2, w2, _2, g2, m2, x2, C2, S2, M2, $2, I2, H2, L2, T2 = u2.type;
|
|
125
|
+
if (u2.constructor !== void 0) return null;
|
|
126
|
+
128 & t2.__u && (c2 = !!(32 & t2.__u), r2 = [e2 = u2.__e = t2.__e]), (a2 = l$1.__b) && a2(u2);
|
|
127
|
+
n: if (typeof T2 == "function") try {
|
|
128
|
+
if (m2 = u2.props, x2 = "prototype" in T2 && T2.prototype.render, C2 = (a2 = T2.contextType) && i2[a2.__c], S2 = a2 ? C2 ? C2.props.value : a2.__ : i2, t2.__c ? g2 = (h2 = u2.__c = t2.__c).__ = h2.__E : (x2 ? u2.__c = h2 = new T2(m2, S2) : (u2.__c = h2 = new k$1(m2, S2), h2.constructor = T2, h2.render = V$1), C2 && C2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = S2, h2.__n = i2, v2 = h2.__d = !0, h2.__h = [], h2._sb = []), x2 && h2.__s == null && (h2.__s = h2.state), x2 && T2.getDerivedStateFromProps != null && (h2.__s == h2.state && (h2.__s = d$1({}, h2.__s)), d$1(h2.__s, T2.getDerivedStateFromProps(m2, h2.__s))), p2 = h2.props, w2 = h2.state, h2.__v = u2, v2) x2 && T2.getDerivedStateFromProps == null && h2.componentWillMount != null && h2.componentWillMount(), x2 && h2.componentDidMount != null && h2.__h.push(h2.componentDidMount);
|
|
129
|
+
else {
|
|
130
|
+
if (x2 && T2.getDerivedStateFromProps == null && m2 !== p2 && h2.componentWillReceiveProps != null && h2.componentWillReceiveProps(m2, S2), !h2.__e && (h2.shouldComponentUpdate != null && h2.shouldComponentUpdate(m2, h2.__s, S2) === !1 || u2.__v === t2.__v)) {
|
|
131
|
+
for (u2.__v !== t2.__v && (h2.props = m2, h2.state = h2.__s, h2.__d = !1), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.some(function(n3) {
|
|
132
|
+
n3 && (n3.__ = u2);
|
|
133
|
+
}), M2 = 0; M2 < h2._sb.length; M2++) h2.__h.push(h2._sb[M2]);
|
|
134
|
+
h2._sb = [], h2.__h.length && f2.push(h2);
|
|
135
|
+
break n;
|
|
136
|
+
}
|
|
137
|
+
h2.componentWillUpdate != null && h2.componentWillUpdate(m2, h2.__s, S2), x2 && h2.componentDidUpdate != null && h2.__h.push(function() {
|
|
138
|
+
h2.componentDidUpdate(p2, w2, _2);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (h2.context = S2, h2.props = m2, h2.__P = n2, h2.__e = !1, $2 = l$1.__r, I2 = 0, x2) {
|
|
142
|
+
for (h2.state = h2.__s, h2.__d = !1, $2 && $2(u2), a2 = h2.render(h2.props, h2.state, h2.context), H2 = 0; H2 < h2._sb.length; H2++) h2.__h.push(h2._sb[H2]);
|
|
143
|
+
h2._sb = [];
|
|
144
|
+
} else do
|
|
145
|
+
h2.__d = !1, $2 && $2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s;
|
|
146
|
+
while (h2.__d && ++I2 < 25);
|
|
147
|
+
h2.state = h2.__s, h2.getChildContext != null && (i2 = d$1(d$1({}, i2), h2.getChildContext())), x2 && !v2 && h2.getSnapshotBeforeUpdate != null && (_2 = h2.getSnapshotBeforeUpdate(p2, w2)), P$1(n2, y$1(L2 = a2 != null && a2.type === b && a2.key == null ? a2.props.children : a2) ? L2 : [L2], u2, t2, i2, o2, r2, f2, e2, c2, s2), h2.base = u2.__e, u2.__u &= -161, h2.__h.length && f2.push(h2), g2 && (h2.__E = h2.__ = null);
|
|
148
|
+
} catch (n3) {
|
|
149
|
+
if (u2.__v = null, c2 || r2 != null) {
|
|
150
|
+
for (u2.__u |= c2 ? 160 : 128; e2 && e2.nodeType === 8 && e2.nextSibling; ) e2 = e2.nextSibling;
|
|
151
|
+
r2[r2.indexOf(e2)] = null, u2.__e = e2;
|
|
152
|
+
} else u2.__e = t2.__e, u2.__k = t2.__k;
|
|
153
|
+
l$1.__e(n3, u2, t2);
|
|
154
|
+
}
|
|
155
|
+
else r2 == null && u2.__v === t2.__v ? (u2.__k = t2.__k, u2.__e = t2.__e) : u2.__e = z$2(t2.__e, u2, t2, i2, o2, r2, f2, c2, s2);
|
|
156
|
+
(a2 = l$1.diffed) && a2(u2);
|
|
157
|
+
}
|
|
158
|
+
function j$1(n2, u2, t2) {
|
|
159
|
+
u2.__d = void 0;
|
|
160
|
+
for (var i2 = 0; i2 < t2.length; i2++) E(t2[i2], t2[++i2], t2[++i2]);
|
|
161
|
+
l$1.__c && l$1.__c(u2, n2), n2.some(function(u3) {
|
|
162
|
+
try {
|
|
163
|
+
n2 = u3.__h, u3.__h = [], n2.some(function(n3) {
|
|
164
|
+
n3.call(u3);
|
|
165
|
+
});
|
|
166
|
+
} catch (n3) {
|
|
167
|
+
l$1.__e(n3, u3.__v);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function z$2(u2, t2, i2, o2, r2, f2, e2, c2, s2) {
|
|
172
|
+
var a2, v2, p2, d2, _2, g2, m2, b2 = i2.props, k2 = t2.props, C2 = t2.type;
|
|
173
|
+
if (C2 === "svg" ? r2 = "http://www.w3.org/2000/svg" : C2 === "math" ? r2 = "http://www.w3.org/1998/Math/MathML" : r2 || (r2 = "http://www.w3.org/1999/xhtml"), f2 != null) {
|
|
174
|
+
for (a2 = 0; a2 < f2.length; a2++) if ((_2 = f2[a2]) && "setAttribute" in _2 == !!C2 && (C2 ? _2.localName === C2 : _2.nodeType === 3)) {
|
|
175
|
+
u2 = _2, f2[a2] = null;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (u2 == null) {
|
|
180
|
+
if (C2 === null) return document.createTextNode(k2);
|
|
181
|
+
u2 = document.createElementNS(r2, C2, k2.is && k2), c2 && (l$1.__m && l$1.__m(t2, f2), c2 = !1), f2 = null;
|
|
182
|
+
}
|
|
183
|
+
if (C2 === null) b2 === k2 || c2 && u2.data === k2 || (u2.data = k2);
|
|
184
|
+
else {
|
|
185
|
+
if (f2 = f2 && n.call(u2.childNodes), b2 = i2.props || h$1, !c2 && f2 != null) for (b2 = {}, a2 = 0; a2 < u2.attributes.length; a2++) b2[(_2 = u2.attributes[a2]).name] = _2.value;
|
|
186
|
+
for (a2 in b2) if (_2 = b2[a2], a2 != "children") {
|
|
187
|
+
if (a2 == "dangerouslySetInnerHTML") p2 = _2;
|
|
188
|
+
else if (!(a2 in k2)) {
|
|
189
|
+
if (a2 == "value" && "defaultValue" in k2 || a2 == "checked" && "defaultChecked" in k2) continue;
|
|
190
|
+
A(u2, a2, null, _2, r2);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
for (a2 in k2) _2 = k2[a2], a2 == "children" ? d2 = _2 : a2 == "dangerouslySetInnerHTML" ? v2 = _2 : a2 == "value" ? g2 = _2 : a2 == "checked" ? m2 = _2 : c2 && typeof _2 != "function" || b2[a2] === _2 || A(u2, a2, _2, b2[a2], r2);
|
|
194
|
+
if (v2) c2 || p2 && (v2.__html === p2.__html || v2.__html === u2.innerHTML) || (u2.innerHTML = v2.__html), t2.__k = [];
|
|
195
|
+
else if (p2 && (u2.innerHTML = ""), P$1(u2, y$1(d2) ? d2 : [d2], t2, i2, o2, C2 === "foreignObject" ? "http://www.w3.org/1999/xhtml" : r2, f2, e2, f2 ? f2[0] : i2.__k && x(i2, 0), c2, s2), f2 != null) for (a2 = f2.length; a2--; ) w$1(f2[a2]);
|
|
196
|
+
c2 || (a2 = "value", C2 === "progress" && g2 == null ? u2.removeAttribute("value") : g2 !== void 0 && (g2 !== u2[a2] || C2 === "progress" && !g2 || C2 === "option" && g2 !== b2[a2]) && A(u2, a2, g2, b2[a2], r2), a2 = "checked", m2 !== void 0 && m2 !== u2[a2] && A(u2, a2, m2, b2[a2], r2));
|
|
197
|
+
}
|
|
198
|
+
return u2;
|
|
199
|
+
}
|
|
200
|
+
function E(n2, u2, t2) {
|
|
201
|
+
try {
|
|
202
|
+
if (typeof n2 == "function") {
|
|
203
|
+
var i2 = typeof n2.__u == "function";
|
|
204
|
+
i2 && n2.__u(), i2 && u2 == null || (n2.__u = n2(u2));
|
|
205
|
+
} else n2.current = u2;
|
|
206
|
+
} catch (n3) {
|
|
207
|
+
l$1.__e(n3, t2);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function N(n2, u2, t2) {
|
|
211
|
+
var i2, o2;
|
|
212
|
+
if (l$1.unmount && l$1.unmount(n2), (i2 = n2.ref) && (i2.current && i2.current !== n2.__e || E(i2, null, u2)), (i2 = n2.__c) != null) {
|
|
213
|
+
if (i2.componentWillUnmount) try {
|
|
214
|
+
i2.componentWillUnmount();
|
|
215
|
+
} catch (n3) {
|
|
216
|
+
l$1.__e(n3, u2);
|
|
217
|
+
}
|
|
218
|
+
i2.base = i2.__P = null;
|
|
219
|
+
}
|
|
220
|
+
if (i2 = n2.__k) for (o2 = 0; o2 < i2.length; o2++) i2[o2] && N(i2[o2], u2, t2 || typeof n2.type != "function");
|
|
221
|
+
t2 || w$1(n2.__e), n2.__c = n2.__ = n2.__e = n2.__d = void 0;
|
|
222
|
+
}
|
|
223
|
+
function V$1(n2, l2, u2) {
|
|
224
|
+
return this.constructor(n2, u2);
|
|
225
|
+
}
|
|
226
|
+
function q$2(u2, t2, i2) {
|
|
227
|
+
var o2, r2, f2, e2;
|
|
228
|
+
l$1.__ && l$1.__(u2, t2), r2 = (o2 = typeof i2 == "function") ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], O$1(t2, u2 = (!o2 && i2 || t2).__k = _$1(b, null, [u2]), r2 || h$1, h$1, t2.namespaceURI, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), j$1(f2, u2, e2);
|
|
229
|
+
}
|
|
230
|
+
n = v$1.slice, l$1 = { __e: function(n2, l2, u2, t2) {
|
|
231
|
+
for (var i2, o2, r2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
|
|
232
|
+
if ((o2 = i2.constructor) && o2.getDerivedStateFromError != null && (i2.setState(o2.getDerivedStateFromError(n2)), r2 = i2.__d), i2.componentDidCatch != null && (i2.componentDidCatch(n2, t2 || {}), r2 = i2.__d), r2) return i2.__E = i2;
|
|
233
|
+
} catch (l3) {
|
|
234
|
+
n2 = l3;
|
|
235
|
+
}
|
|
236
|
+
throw n2;
|
|
237
|
+
} }, u$2 = 0, k$1.prototype.setState = function(n2, l2) {
|
|
238
|
+
var u2;
|
|
239
|
+
u2 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = d$1({}, this.state), typeof n2 == "function" && (n2 = n2(d$1({}, u2), this.props)), n2 && d$1(u2, n2), n2 != null && this.__v && (l2 && this._sb.push(l2), S(this));
|
|
240
|
+
}, k$1.prototype.forceUpdate = function(n2) {
|
|
241
|
+
this.__v && (this.__e = !0, n2 && this.__h.push(n2), S(this));
|
|
242
|
+
}, k$1.prototype.render = b, i$1 = [], r$1 = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$2 = function(n2, l2) {
|
|
243
|
+
return n2.__v.__b - l2.__v.__b;
|
|
244
|
+
}, M$1.__r = 0, e$1 = 0, c$1 = F$1(!1), s$1 = F$1(!0);
|
|
245
|
+
var f$1 = 0;
|
|
246
|
+
function u$1(e2, t2, n2, o2, i2, u2) {
|
|
247
|
+
t2 || (t2 = {});
|
|
248
|
+
var a2, c2, l2 = t2;
|
|
249
|
+
"ref" in t2 && (a2 = t2.ref, delete t2.ref);
|
|
250
|
+
var p2 = { type: e2, props: l2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
|
|
251
|
+
if (typeof e2 == "function" && (a2 = e2.defaultProps)) for (c2 in a2) l2[c2] === void 0 && (l2[c2] = a2[c2]);
|
|
252
|
+
return l$1.vnode && l$1.vnode(p2), p2;
|
|
253
|
+
}
|
|
254
|
+
var t, r, u, i, o = 0, f = [], c = l$1, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
|
|
255
|
+
function d(n2, t2) {
|
|
256
|
+
c.__h && c.__h(r, n2, o || t2), o = 0;
|
|
257
|
+
var u2 = r.__H || (r.__H = { __: [], __h: [] });
|
|
258
|
+
return n2 >= u2.__.length && u2.__.push({}), u2.__[n2];
|
|
259
|
+
}
|
|
260
|
+
function h(n2) {
|
|
261
|
+
return o = 1, p(D, n2);
|
|
262
|
+
}
|
|
263
|
+
function p(n2, u2, i2) {
|
|
264
|
+
var o2 = d(t++, 2);
|
|
265
|
+
if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : D(void 0, u2), function(n3) {
|
|
266
|
+
var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
|
|
267
|
+
t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
|
|
268
|
+
}], o2.__c = r, !r.u)) {
|
|
269
|
+
var f2 = function(n3, t2, r2) {
|
|
270
|
+
if (!o2.__c.__H) return !0;
|
|
271
|
+
var u3 = o2.__c.__H.__.filter(function(n4) {
|
|
272
|
+
return !!n4.__c;
|
|
273
|
+
});
|
|
274
|
+
if (u3.every(function(n4) {
|
|
275
|
+
return !n4.__N;
|
|
276
|
+
})) return !c2 || c2.call(this, n3, t2, r2);
|
|
277
|
+
var i3 = o2.__c.props !== n3;
|
|
278
|
+
return u3.forEach(function(n4) {
|
|
279
|
+
if (n4.__N) {
|
|
280
|
+
var t3 = n4.__[0];
|
|
281
|
+
n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = !0);
|
|
282
|
+
}
|
|
283
|
+
}), c2 && c2.call(this, n3, t2, r2) || i3;
|
|
284
|
+
};
|
|
285
|
+
r.u = !0;
|
|
286
|
+
var c2 = r.shouldComponentUpdate, e2 = r.componentWillUpdate;
|
|
287
|
+
r.componentWillUpdate = function(n3, t2, r2) {
|
|
288
|
+
if (this.__e) {
|
|
289
|
+
var u3 = c2;
|
|
290
|
+
c2 = void 0, f2(n3, t2, r2), c2 = u3;
|
|
291
|
+
}
|
|
292
|
+
e2 && e2.call(this, n3, t2, r2);
|
|
293
|
+
}, r.shouldComponentUpdate = f2;
|
|
294
|
+
}
|
|
295
|
+
return o2.__N || o2.__;
|
|
296
|
+
}
|
|
297
|
+
function y(n2, u2) {
|
|
298
|
+
var i2 = d(t++, 3);
|
|
299
|
+
!c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r.__H.__h.push(i2));
|
|
300
|
+
}
|
|
301
|
+
function _(n2, u2) {
|
|
302
|
+
var i2 = d(t++, 4);
|
|
303
|
+
!c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r.__h.push(i2));
|
|
304
|
+
}
|
|
305
|
+
function T(n2, r2) {
|
|
306
|
+
var u2 = d(t++, 7);
|
|
307
|
+
return C(u2.__H, r2) && (u2.__ = n2(), u2.__H = r2, u2.__h = n2), u2.__;
|
|
308
|
+
}
|
|
309
|
+
function q$1(n2, t2) {
|
|
310
|
+
return o = 8, T(function() {
|
|
311
|
+
return n2;
|
|
312
|
+
}, t2);
|
|
313
|
+
}
|
|
314
|
+
function j() {
|
|
315
|
+
for (var n2; n2 = f.shift(); ) if (n2.__P && n2.__H) try {
|
|
316
|
+
n2.__H.__h.forEach(z$1), n2.__H.__h.forEach(B$1), n2.__H.__h = [];
|
|
317
|
+
} catch (t2) {
|
|
318
|
+
n2.__H.__h = [], c.__e(t2, n2.__v);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
c.__b = function(n2) {
|
|
322
|
+
r = null, e && e(n2);
|
|
323
|
+
}, c.__ = function(n2, t2) {
|
|
324
|
+
n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), s && s(n2, t2);
|
|
325
|
+
}, c.__r = function(n2) {
|
|
326
|
+
a && a(n2), t = 0;
|
|
327
|
+
var i2 = (r = n2.__c).__H;
|
|
328
|
+
i2 && (u === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n3) {
|
|
329
|
+
n3.__N && (n3.__ = n3.__N), n3.i = n3.__N = void 0;
|
|
330
|
+
})) : (i2.__h.forEach(z$1), i2.__h.forEach(B$1), i2.__h = [], t = 0)), u = r;
|
|
331
|
+
}, c.diffed = function(n2) {
|
|
332
|
+
v && v(n2);
|
|
333
|
+
var t2 = n2.__c;
|
|
334
|
+
t2 && t2.__H && (t2.__H.__h.length && (f.push(t2) !== 1 && i === c.requestAnimationFrame || ((i = c.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) {
|
|
335
|
+
n3.i && (n3.__H = n3.i), n3.i = void 0;
|
|
336
|
+
})), u = r = null;
|
|
337
|
+
}, c.__c = function(n2, t2) {
|
|
338
|
+
t2.some(function(n3) {
|
|
339
|
+
try {
|
|
340
|
+
n3.__h.forEach(z$1), n3.__h = n3.__h.filter(function(n4) {
|
|
341
|
+
return !n4.__ || B$1(n4);
|
|
342
|
+
});
|
|
343
|
+
} catch (r2) {
|
|
344
|
+
t2.some(function(n4) {
|
|
345
|
+
n4.__h && (n4.__h = []);
|
|
346
|
+
}), t2 = [], c.__e(r2, n3.__v);
|
|
347
|
+
}
|
|
348
|
+
}), l && l(n2, t2);
|
|
349
|
+
}, c.unmount = function(n2) {
|
|
350
|
+
m && m(n2);
|
|
351
|
+
var t2, r2 = n2.__c;
|
|
352
|
+
r2 && r2.__H && (r2.__H.__.forEach(function(n3) {
|
|
353
|
+
try {
|
|
354
|
+
z$1(n3);
|
|
355
|
+
} catch (n4) {
|
|
356
|
+
t2 = n4;
|
|
357
|
+
}
|
|
358
|
+
}), r2.__H = void 0, t2 && c.__e(t2, r2.__v));
|
|
359
|
+
};
|
|
360
|
+
var k = typeof requestAnimationFrame == "function";
|
|
361
|
+
function w(n2) {
|
|
362
|
+
var t2, r2 = function() {
|
|
363
|
+
clearTimeout(u2), k && cancelAnimationFrame(t2), setTimeout(n2);
|
|
364
|
+
}, u2 = setTimeout(r2, 100);
|
|
365
|
+
k && (t2 = requestAnimationFrame(r2));
|
|
366
|
+
}
|
|
367
|
+
function z$1(n2) {
|
|
368
|
+
var t2 = r, u2 = n2.__c;
|
|
369
|
+
typeof u2 == "function" && (n2.__c = void 0, u2()), r = t2;
|
|
370
|
+
}
|
|
371
|
+
function B$1(n2) {
|
|
372
|
+
var t2 = r;
|
|
373
|
+
n2.__c = n2.__(), r = t2;
|
|
374
|
+
}
|
|
375
|
+
function C(n2, t2) {
|
|
376
|
+
return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
|
|
377
|
+
return t3 !== n2[r2];
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
function D(n2, t2) {
|
|
381
|
+
return typeof t2 == "function" ? t2(n2) : t2;
|
|
382
|
+
}
|
|
383
|
+
const Image = ({
|
|
384
|
+
href,
|
|
385
|
+
x: x2,
|
|
386
|
+
y: y2 = 0,
|
|
387
|
+
height = 12
|
|
388
|
+
}) => /* @__PURE__ */ u$1(
|
|
389
|
+
"image",
|
|
390
|
+
{
|
|
391
|
+
xlinkHref: href,
|
|
392
|
+
x: x2 - height / 2,
|
|
393
|
+
y: y2 - height / 2,
|
|
394
|
+
width: height,
|
|
395
|
+
height
|
|
396
|
+
}
|
|
397
|
+
), ImageChar = ({
|
|
398
|
+
x: x2,
|
|
399
|
+
y: y2 = 0,
|
|
400
|
+
height = 12,
|
|
401
|
+
fill,
|
|
402
|
+
stroke,
|
|
403
|
+
fontFamily = "FontAwesome",
|
|
404
|
+
char = "",
|
|
405
|
+
fontWeight
|
|
406
|
+
}) => {
|
|
407
|
+
const renderChar = T(() => fontFamily === "FontAwesome" ? Utility.faChar(char) : char, [char, fontFamily]);
|
|
408
|
+
return /* @__PURE__ */ u$1(
|
|
409
|
+
"text",
|
|
410
|
+
{
|
|
411
|
+
x: x2,
|
|
412
|
+
y: y2,
|
|
413
|
+
fill,
|
|
414
|
+
stroke,
|
|
415
|
+
fontFamily,
|
|
416
|
+
fontSize: `${height}px`,
|
|
417
|
+
fontWeight,
|
|
418
|
+
dominantBaseline: "middle",
|
|
419
|
+
style: { textAnchor: "middle", alignmentBaseline: "middle" },
|
|
420
|
+
children: renderChar
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
}, Circle = ({
|
|
424
|
+
radius = 32,
|
|
425
|
+
fill = "navy",
|
|
426
|
+
stroke = fill,
|
|
427
|
+
strokeWidth = 1,
|
|
428
|
+
shapeRendering
|
|
429
|
+
}) => /* @__PURE__ */ u$1(
|
|
430
|
+
"circle",
|
|
431
|
+
{
|
|
432
|
+
r: radius,
|
|
433
|
+
fill,
|
|
434
|
+
stroke,
|
|
435
|
+
strokeWidth,
|
|
436
|
+
shapeRendering
|
|
437
|
+
}
|
|
438
|
+
), Square = ({
|
|
439
|
+
radius = 30,
|
|
440
|
+
cornerRadius = 0,
|
|
441
|
+
fill = "white",
|
|
442
|
+
stroke,
|
|
443
|
+
strokeWidth = 1,
|
|
444
|
+
shapeRendering
|
|
445
|
+
}) => /* @__PURE__ */ u$1(
|
|
446
|
+
"rect",
|
|
447
|
+
{
|
|
448
|
+
x: -radius,
|
|
449
|
+
y: -radius,
|
|
450
|
+
rx: cornerRadius,
|
|
451
|
+
ry: cornerRadius,
|
|
452
|
+
width: radius * 2,
|
|
453
|
+
height: radius * 2,
|
|
454
|
+
fill,
|
|
455
|
+
stroke: stroke || fill,
|
|
456
|
+
strokeWidth,
|
|
457
|
+
shapeRendering
|
|
458
|
+
}
|
|
459
|
+
), Rectangle = ({
|
|
460
|
+
width = 30,
|
|
461
|
+
height = 30,
|
|
462
|
+
cornerRadius = 0,
|
|
463
|
+
fill = "white",
|
|
464
|
+
stroke = "black",
|
|
465
|
+
strokeWidth = 1,
|
|
466
|
+
shapeRendering
|
|
467
|
+
}) => /* @__PURE__ */ u$1(
|
|
468
|
+
"rect",
|
|
469
|
+
{
|
|
470
|
+
x: -width / 2,
|
|
471
|
+
y: -height / 2,
|
|
472
|
+
rx: cornerRadius,
|
|
473
|
+
ry: cornerRadius,
|
|
474
|
+
width,
|
|
475
|
+
height,
|
|
476
|
+
fill,
|
|
477
|
+
stroke: stroke || fill,
|
|
478
|
+
strokeWidth,
|
|
479
|
+
shapeRendering
|
|
480
|
+
}
|
|
481
|
+
), Shape = ({
|
|
482
|
+
shape = "circle",
|
|
483
|
+
height = 128,
|
|
484
|
+
width,
|
|
485
|
+
fill,
|
|
486
|
+
stroke,
|
|
487
|
+
strokeWidth = 1,
|
|
488
|
+
shapeRendering,
|
|
489
|
+
cornerRadius
|
|
490
|
+
}) => {
|
|
491
|
+
switch (shape) {
|
|
492
|
+
case "square":
|
|
493
|
+
return /* @__PURE__ */ u$1(
|
|
494
|
+
Square,
|
|
495
|
+
{
|
|
496
|
+
radius: height / 2,
|
|
497
|
+
fill,
|
|
498
|
+
stroke,
|
|
499
|
+
strokeWidth,
|
|
500
|
+
shapeRendering,
|
|
501
|
+
cornerRadius
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
case "rectangle":
|
|
505
|
+
return /* @__PURE__ */ u$1(
|
|
506
|
+
Rectangle,
|
|
507
|
+
{
|
|
508
|
+
width: width ?? height,
|
|
509
|
+
height,
|
|
510
|
+
fill,
|
|
511
|
+
stroke,
|
|
512
|
+
strokeWidth,
|
|
513
|
+
shapeRendering,
|
|
514
|
+
cornerRadius
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
case "circle":
|
|
518
|
+
default:
|
|
519
|
+
return /* @__PURE__ */ u$1(
|
|
520
|
+
Circle,
|
|
521
|
+
{
|
|
522
|
+
radius: height / 2,
|
|
523
|
+
fill,
|
|
524
|
+
stroke,
|
|
525
|
+
strokeWidth,
|
|
526
|
+
shapeRendering
|
|
527
|
+
}
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
}, Icon = ({
|
|
531
|
+
shape = "circle",
|
|
532
|
+
width,
|
|
533
|
+
height = 32,
|
|
534
|
+
fill,
|
|
535
|
+
stroke,
|
|
536
|
+
strokeWidth = 0,
|
|
537
|
+
imageUrl = "",
|
|
538
|
+
imageFontFamily = "FontAwesome",
|
|
539
|
+
imageChar = "",
|
|
540
|
+
imageCharFill = Palette.textColor(fill),
|
|
541
|
+
padding = height / 5,
|
|
542
|
+
xOffset = 0,
|
|
543
|
+
yOffset = 0,
|
|
544
|
+
cornerRadius,
|
|
545
|
+
shapeRendering
|
|
546
|
+
}) => /* @__PURE__ */ u$1(b, { children: [
|
|
547
|
+
/* @__PURE__ */ u$1(
|
|
548
|
+
Shape,
|
|
549
|
+
{
|
|
550
|
+
shape,
|
|
551
|
+
width,
|
|
552
|
+
height,
|
|
553
|
+
fill,
|
|
554
|
+
stroke,
|
|
555
|
+
strokeWidth,
|
|
556
|
+
shapeRendering,
|
|
557
|
+
cornerRadius
|
|
558
|
+
}
|
|
559
|
+
),
|
|
560
|
+
imageUrl ? /* @__PURE__ */ u$1(
|
|
561
|
+
Image,
|
|
562
|
+
{
|
|
563
|
+
href: imageUrl,
|
|
564
|
+
x: xOffset,
|
|
565
|
+
y: yOffset,
|
|
566
|
+
height: height - padding
|
|
567
|
+
}
|
|
568
|
+
) : /* @__PURE__ */ u$1(
|
|
569
|
+
ImageChar,
|
|
570
|
+
{
|
|
571
|
+
x: xOffset,
|
|
572
|
+
y: yOffset,
|
|
573
|
+
height: height - padding,
|
|
574
|
+
fontFamily: imageFontFamily,
|
|
575
|
+
char: imageChar,
|
|
576
|
+
fill: imageCharFill,
|
|
577
|
+
fontWeight: 400
|
|
578
|
+
}
|
|
579
|
+
)
|
|
580
|
+
] }), Icons = ({
|
|
581
|
+
icons = []
|
|
582
|
+
}) => {
|
|
583
|
+
const IconComponents = icons.map((cat) => /* @__PURE__ */ u$1(
|
|
584
|
+
"g",
|
|
585
|
+
{
|
|
586
|
+
id: cat.id,
|
|
587
|
+
children: /* @__PURE__ */ u$1(
|
|
588
|
+
Icon,
|
|
589
|
+
{
|
|
590
|
+
...cat
|
|
591
|
+
}
|
|
592
|
+
)
|
|
593
|
+
},
|
|
594
|
+
cat.id
|
|
595
|
+
));
|
|
596
|
+
return /* @__PURE__ */ u$1(b, { children: IconComponents });
|
|
597
|
+
}, TextLine = ({
|
|
598
|
+
text,
|
|
599
|
+
height = 12,
|
|
600
|
+
anchor = "middle",
|
|
601
|
+
baseline = "middle",
|
|
602
|
+
fontFamily = "Verdana",
|
|
603
|
+
fill = "black"
|
|
604
|
+
}) => /* @__PURE__ */ u$1(
|
|
605
|
+
"text",
|
|
606
|
+
{
|
|
607
|
+
"font-family": fontFamily,
|
|
608
|
+
"font-size": `${height}px`,
|
|
609
|
+
"text-anchor": anchor,
|
|
610
|
+
"dominant-baseline": baseline,
|
|
611
|
+
fill,
|
|
612
|
+
children: text
|
|
613
|
+
}
|
|
614
|
+
), Text = ({
|
|
615
|
+
text,
|
|
616
|
+
height = 12,
|
|
617
|
+
fontFamily = "Verdana",
|
|
618
|
+
fill = "black",
|
|
619
|
+
onSizeUpdate
|
|
620
|
+
}) => {
|
|
621
|
+
const [totalWidth, setTotalWidth] = h(0), [totalHeight, setTotalHeight] = h(0);
|
|
622
|
+
y(() => {
|
|
623
|
+
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
|
|
624
|
+
}, [totalWidth, totalHeight, onSizeUpdate]);
|
|
625
|
+
const parts = T(() => text.split(`
|
|
626
|
+
`), [text]);
|
|
627
|
+
_(() => {
|
|
628
|
+
const size = Utility.textSize(parts, fontFamily, height);
|
|
629
|
+
setTotalWidth(size.width), setTotalHeight(size.height);
|
|
630
|
+
}, [fontFamily, height, parts]);
|
|
631
|
+
const TextLines = T(() => {
|
|
632
|
+
const yOffset = -(totalHeight / 2) + height / 2;
|
|
633
|
+
return parts.map((p2, i2) => /* @__PURE__ */ u$1("g", { transform: `translate(0 ${yOffset + i2 * (height + 2)})`, children: /* @__PURE__ */ u$1(
|
|
634
|
+
TextLine,
|
|
635
|
+
{
|
|
636
|
+
text: p2,
|
|
637
|
+
height,
|
|
638
|
+
fontFamily,
|
|
639
|
+
fill
|
|
640
|
+
}
|
|
641
|
+
) }, `key-${i2}`));
|
|
642
|
+
}, [parts, totalHeight, height, fontFamily, fill]);
|
|
643
|
+
return /* @__PURE__ */ u$1("g", { children: TextLines });
|
|
644
|
+
}, TextBox = ({
|
|
645
|
+
text,
|
|
646
|
+
height = 12,
|
|
647
|
+
fontFamily = "Verdana",
|
|
648
|
+
padding = 4,
|
|
649
|
+
fill = "whitesmoke",
|
|
650
|
+
stroke = "lightgray",
|
|
651
|
+
textFill = "black",
|
|
652
|
+
strokeWidth = 1,
|
|
653
|
+
cornerRadius = 0,
|
|
654
|
+
onSizeUpdate
|
|
655
|
+
}) => {
|
|
656
|
+
const [textWidth, setTextWidthUpdate] = h(0), [textHeight, setTextHeightUpdate] = h(0);
|
|
657
|
+
y(() => {
|
|
658
|
+
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
|
|
659
|
+
}, [textWidth, textHeight, onSizeUpdate]);
|
|
660
|
+
const onTextSizeUpdate = q$1((size) => {
|
|
661
|
+
setTextWidthUpdate(size.width), setTextHeightUpdate(size.height);
|
|
662
|
+
}, []), w2 = textWidth + padding * 2 + strokeWidth, h$12 = textHeight + padding * 2 + strokeWidth, textOffsetY = Math.floor(height / 10);
|
|
663
|
+
return /* @__PURE__ */ u$1(b, { children: [
|
|
664
|
+
/* @__PURE__ */ u$1(
|
|
665
|
+
Rectangle,
|
|
666
|
+
{
|
|
667
|
+
width: w2,
|
|
668
|
+
height: h$12,
|
|
669
|
+
fill,
|
|
670
|
+
stroke,
|
|
671
|
+
strokeWidth,
|
|
672
|
+
cornerRadius
|
|
673
|
+
}
|
|
674
|
+
),
|
|
675
|
+
/* @__PURE__ */ u$1("g", { transform: `translate(0 ${textOffsetY})`, children: /* @__PURE__ */ u$1(
|
|
676
|
+
Text,
|
|
677
|
+
{
|
|
678
|
+
text,
|
|
679
|
+
fontFamily,
|
|
680
|
+
height,
|
|
681
|
+
fill: textFill,
|
|
682
|
+
onSizeUpdate: onTextSizeUpdate
|
|
683
|
+
}
|
|
684
|
+
) })
|
|
685
|
+
] });
|
|
686
|
+
}, LabelledRect = ({
|
|
687
|
+
text,
|
|
688
|
+
height = 12,
|
|
689
|
+
width = 12,
|
|
690
|
+
fontFamily = "Verdana",
|
|
691
|
+
fontSize = 10,
|
|
692
|
+
padding = 3,
|
|
693
|
+
fill = "whitesmoke",
|
|
694
|
+
stroke = "lightgray",
|
|
695
|
+
textFill = "black",
|
|
696
|
+
strokeWidth = 1,
|
|
697
|
+
cornerRadius = 0,
|
|
698
|
+
onSizeUpdate
|
|
699
|
+
}) => {
|
|
700
|
+
const [actualWidth, setActualWidthUpdate] = h(width), [actualHeight, setActualHeightUpdate] = h(height);
|
|
701
|
+
return _(() => {
|
|
702
|
+
const size = Utility.textSize(text, fontFamily, fontSize);
|
|
703
|
+
setActualWidthUpdate(size.width + padding * 2), setActualHeightUpdate(size.height + padding * 2);
|
|
704
|
+
}, [text, fontFamily, fontSize, padding]), _(() => {
|
|
705
|
+
onSizeUpdate && onSizeUpdate({ width: actualWidth, height: actualHeight });
|
|
706
|
+
}, [actualWidth, actualHeight, padding, onSizeUpdate]), /* @__PURE__ */ u$1(b, { children: [
|
|
707
|
+
/* @__PURE__ */ u$1(
|
|
708
|
+
Rectangle,
|
|
709
|
+
{
|
|
710
|
+
width,
|
|
711
|
+
height,
|
|
712
|
+
fill,
|
|
713
|
+
stroke,
|
|
714
|
+
strokeWidth,
|
|
715
|
+
cornerRadius
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
/* @__PURE__ */ u$1("g", { transform: `translate(${-(width / 2) + padding} ${-(height / 2) + padding})`, children: /* @__PURE__ */ u$1(
|
|
719
|
+
TextLine,
|
|
720
|
+
{
|
|
721
|
+
text,
|
|
722
|
+
fontFamily,
|
|
723
|
+
height: fontSize,
|
|
724
|
+
fill: textFill,
|
|
725
|
+
anchor: "start",
|
|
726
|
+
baseline: "hanging"
|
|
727
|
+
}
|
|
728
|
+
) })
|
|
729
|
+
] });
|
|
730
|
+
}, IconLabelledRect = ({
|
|
731
|
+
icon,
|
|
732
|
+
iconFontFamily,
|
|
733
|
+
text,
|
|
734
|
+
height = 12,
|
|
735
|
+
width = 12,
|
|
736
|
+
fontFamily = "Verdana",
|
|
737
|
+
fontSize = 10,
|
|
738
|
+
padding = 3,
|
|
739
|
+
fill = "whitesmoke",
|
|
740
|
+
stroke = "lightgray",
|
|
741
|
+
textFill = "black",
|
|
742
|
+
strokeWidth = 1,
|
|
743
|
+
cornerRadius = 0
|
|
744
|
+
}) => /* @__PURE__ */ u$1(b, { children: [
|
|
745
|
+
/* @__PURE__ */ u$1(
|
|
746
|
+
Rectangle,
|
|
747
|
+
{
|
|
748
|
+
width,
|
|
749
|
+
height,
|
|
750
|
+
fill,
|
|
751
|
+
stroke,
|
|
752
|
+
strokeWidth,
|
|
753
|
+
cornerRadius
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
/* @__PURE__ */ u$1("g", { transform: `translate(${-(width / 2) + padding} ${-(height / 2) + padding})`, children: /* @__PURE__ */ u$1(
|
|
757
|
+
Icon,
|
|
758
|
+
{
|
|
759
|
+
shape: "square",
|
|
760
|
+
imageFontFamily: iconFontFamily,
|
|
761
|
+
imageChar: icon,
|
|
762
|
+
height,
|
|
763
|
+
fill,
|
|
764
|
+
imageCharFill: textFill
|
|
765
|
+
}
|
|
766
|
+
) }),
|
|
767
|
+
/* @__PURE__ */ u$1("g", { transform: `translate(${-(width / 2) + padding * 2 + height} ${-(height / 2) + padding})`, children: /* @__PURE__ */ u$1(
|
|
768
|
+
TextLine,
|
|
769
|
+
{
|
|
770
|
+
text,
|
|
771
|
+
fontFamily,
|
|
772
|
+
height: fontSize,
|
|
773
|
+
fill: textFill,
|
|
774
|
+
anchor: "start",
|
|
775
|
+
baseline: "hanging"
|
|
776
|
+
}
|
|
777
|
+
) })
|
|
778
|
+
] }), Edge = ({
|
|
779
|
+
label,
|
|
780
|
+
labelPos,
|
|
781
|
+
labelFill = "black",
|
|
782
|
+
labelHeight = 12,
|
|
783
|
+
path,
|
|
784
|
+
stroke,
|
|
785
|
+
strokeWidth,
|
|
786
|
+
strokeDasharray
|
|
787
|
+
}) => /* @__PURE__ */ u$1(b, { children: [
|
|
788
|
+
/* @__PURE__ */ u$1("path", { d: path, stroke, style: { strokeWidth, strokeDasharray } }),
|
|
789
|
+
label && labelPos && labelPos.length === 2 ? /* @__PURE__ */ u$1("g", { transform: `translate(${labelPos[0]} ${labelPos[1]})`, children: /* @__PURE__ */ u$1(Text, { text: label, fill: labelFill, height: labelHeight }) }) : void 0
|
|
790
|
+
] });
|
|
791
|
+
function render(C2, props, parent, replaceNode) {
|
|
792
|
+
q$2(_$1(C2, props), parent, replaceNode);
|
|
793
|
+
}
|
|
794
|
+
function svgRender(C2, props, parent, replaceNode) {
|
|
795
|
+
q$2(_$1("svg", null, _$1(C2, props)), parent, replaceNode);
|
|
796
|
+
}
|
|
797
|
+
class HTMLAdapter extends HTMLWidget {
|
|
798
|
+
constructor(_component) {
|
|
799
|
+
super(), this._component = _component;
|
|
800
|
+
}
|
|
801
|
+
props(_2) {
|
|
802
|
+
return arguments.length ? (this._props = { ...this._props, ..._2 }, this) : this._props;
|
|
803
|
+
}
|
|
804
|
+
prop(_2, value) {
|
|
805
|
+
return arguments.length === 1 ? this._props[_2] : (this._props[_2] = value, this);
|
|
806
|
+
}
|
|
807
|
+
update(domNode, element) {
|
|
808
|
+
super.update(domNode, element), render(this._component, this._props, domNode);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
HTMLAdapter.prototype._class += " react_HTMLAdapter";
|
|
812
|
+
HTMLAdapter.prototype.publish("props", {}, "object", "Properties");
|
|
813
|
+
class SVGAdapter extends SVGWidget {
|
|
814
|
+
constructor(_component) {
|
|
815
|
+
super(), this._component = _component;
|
|
816
|
+
}
|
|
817
|
+
props(_2) {
|
|
818
|
+
return arguments.length ? (this._props = { ...this._props, ..._2 }, this) : this._props;
|
|
819
|
+
}
|
|
820
|
+
prop(_2, value) {
|
|
821
|
+
return arguments.length === 1 ? this._props[_2] : (this._props[_2] = value, this);
|
|
822
|
+
}
|
|
823
|
+
update(domNode, element) {
|
|
824
|
+
super.update(domNode, element), render(this._component, this._props, domNode);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
SVGAdapter.prototype._class += " react_SVGAdapter";
|
|
828
|
+
SVGAdapter.prototype.publish("props", {}, "object", "Properties");
|
|
829
|
+
const Span = ({
|
|
830
|
+
text
|
|
831
|
+
}) => /* @__PURE__ */ u$1("span", { children: text }), Annotations = ({
|
|
832
|
+
x: x2,
|
|
833
|
+
y: y2,
|
|
834
|
+
annotationIDs = [],
|
|
835
|
+
stepSize = -16
|
|
836
|
+
}) => {
|
|
837
|
+
const IconComponents = annotationIDs.map(
|
|
838
|
+
(id, i2) => /* @__PURE__ */ u$1(
|
|
839
|
+
"g",
|
|
840
|
+
{
|
|
841
|
+
transform: `translate(${x2 + i2 * stepSize} ${y2})`,
|
|
842
|
+
children: /* @__PURE__ */ u$1(
|
|
843
|
+
"use",
|
|
844
|
+
{
|
|
845
|
+
xlinkHref: "#" + id
|
|
846
|
+
}
|
|
847
|
+
)
|
|
848
|
+
},
|
|
849
|
+
id
|
|
850
|
+
)
|
|
851
|
+
);
|
|
852
|
+
return /* @__PURE__ */ u$1(b, { children: IconComponents });
|
|
853
|
+
}, Vertex = ({
|
|
854
|
+
categoryID = "",
|
|
855
|
+
text = "",
|
|
856
|
+
textHeight = 12,
|
|
857
|
+
textPadding = 4,
|
|
858
|
+
icon = {},
|
|
859
|
+
annotationsHeight = 12,
|
|
860
|
+
annotationIDs = [],
|
|
861
|
+
textFill,
|
|
862
|
+
textboxFill,
|
|
863
|
+
textboxStroke,
|
|
864
|
+
textFontFamily,
|
|
865
|
+
onSizeUpdate,
|
|
866
|
+
showLabel = !0,
|
|
867
|
+
scale = 1
|
|
868
|
+
}) => {
|
|
869
|
+
icon = {
|
|
870
|
+
imageChar: "fa-question",
|
|
871
|
+
height: 32,
|
|
872
|
+
fill: "transparent",
|
|
873
|
+
...icon
|
|
874
|
+
};
|
|
875
|
+
const [textBoxWidth, setTextBoxWidthUpdate] = h(0), [textBoxHeight, setTextBoxHeightUpdate] = h(0);
|
|
876
|
+
y(() => {
|
|
877
|
+
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
|
|
878
|
+
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
|
|
879
|
+
let width = textBoxWidth;
|
|
880
|
+
width += 4;
|
|
881
|
+
let offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
|
|
882
|
+
const textboxOffsetY = icon.height / 3 + textBoxHeight / 2 + textPadding;
|
|
883
|
+
let annotationOffsetY = icon.height / 3 + textBoxHeight + textPadding + annotationsHeight / 3;
|
|
884
|
+
showLabel || (offsetY += (textHeight + 8) / 2, annotationOffsetY -= textBoxHeight + textPadding);
|
|
885
|
+
const onTextBoxSizeUpdate = q$1((size) => {
|
|
886
|
+
setTextBoxWidthUpdate(size.width), setTextBoxHeightUpdate(size.height);
|
|
887
|
+
}, []), label = showLabel ? /* @__PURE__ */ u$1("g", { transform: `translate(0 ${textboxOffsetY})`, children: /* @__PURE__ */ u$1(
|
|
888
|
+
TextBox,
|
|
889
|
+
{
|
|
890
|
+
text,
|
|
891
|
+
height: textHeight,
|
|
892
|
+
padding: textPadding,
|
|
893
|
+
onSizeUpdate: onTextBoxSizeUpdate,
|
|
894
|
+
textFill,
|
|
895
|
+
fill: textboxFill,
|
|
896
|
+
stroke: textboxStroke,
|
|
897
|
+
fontFamily: textFontFamily
|
|
898
|
+
}
|
|
899
|
+
) }) : void 0;
|
|
900
|
+
return categoryID ? /* @__PURE__ */ u$1("g", { transform: `translate(0 ${offsetY}) scale(${scale})`, children: [
|
|
901
|
+
/* @__PURE__ */ u$1("use", { xlinkHref: "#" + categoryID }),
|
|
902
|
+
label,
|
|
903
|
+
/* @__PURE__ */ u$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs })
|
|
904
|
+
] }) : /* @__PURE__ */ u$1("g", { transform: `translate(0 ${offsetY}) scale(${scale})`, children: [
|
|
905
|
+
/* @__PURE__ */ u$1(Icon, { ...icon }),
|
|
906
|
+
label
|
|
907
|
+
] });
|
|
908
|
+
}, Vertex2 = ({
|
|
909
|
+
categoryID = "",
|
|
910
|
+
text = "",
|
|
911
|
+
textHeight = 12,
|
|
912
|
+
textPadding = 4,
|
|
913
|
+
icon = {},
|
|
914
|
+
textFill = "black",
|
|
915
|
+
textboxFill = "white",
|
|
916
|
+
textboxStroke = "black",
|
|
917
|
+
textFontFamily,
|
|
918
|
+
annotationsHeight = 12,
|
|
919
|
+
annotationIDs = []
|
|
920
|
+
}) => {
|
|
921
|
+
icon = {
|
|
922
|
+
imageChar: "fa-question",
|
|
923
|
+
imageCharFill: "white",
|
|
924
|
+
height: 32,
|
|
925
|
+
fill: "black",
|
|
926
|
+
shape: "square",
|
|
927
|
+
...icon
|
|
928
|
+
};
|
|
929
|
+
const textBoxHeight = textHeight + textPadding * 2, { width } = T(() => Utility.textSize(text, textFontFamily, textHeight, !1), [text, textFontFamily, textHeight]), stepSize = annotationsHeight, textboxStrokeWidth = 1, halfTextboxHeight = textBoxHeight / 2, offsetX = 0, offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2, iconOffsetX = -icon.height / 2, iconOffsetY = 0, textboxOffsetX = Math.ceil(width / 2 + textPadding), textboxOffsetY = halfTextboxHeight - icon.height / 2, annotationOffsetX = stepSize / 2, annotationOffsetY = halfTextboxHeight;
|
|
930
|
+
return categoryID ? /* @__PURE__ */ u$1(
|
|
931
|
+
"g",
|
|
932
|
+
{
|
|
933
|
+
transform: `translate(${offsetX} ${offsetY})`,
|
|
934
|
+
children: [
|
|
935
|
+
/* @__PURE__ */ u$1(
|
|
936
|
+
"g",
|
|
937
|
+
{
|
|
938
|
+
transform: `translate(${iconOffsetX} ${iconOffsetY})`,
|
|
939
|
+
children: /* @__PURE__ */ u$1(
|
|
940
|
+
"use",
|
|
941
|
+
{
|
|
942
|
+
xlinkHref: "#" + categoryID
|
|
943
|
+
}
|
|
944
|
+
)
|
|
945
|
+
}
|
|
946
|
+
),
|
|
947
|
+
/* @__PURE__ */ u$1(
|
|
948
|
+
"g",
|
|
949
|
+
{
|
|
950
|
+
transform: `translate(${textboxOffsetX} ${textboxOffsetY})`,
|
|
951
|
+
children: /* @__PURE__ */ u$1(
|
|
952
|
+
TextBox,
|
|
953
|
+
{
|
|
954
|
+
text,
|
|
955
|
+
height: textHeight,
|
|
956
|
+
padding: textPadding,
|
|
957
|
+
strokeWidth: textboxStrokeWidth,
|
|
958
|
+
stroke: textboxStroke,
|
|
959
|
+
fill: textboxFill,
|
|
960
|
+
textFill,
|
|
961
|
+
fontFamily: textFontFamily
|
|
962
|
+
}
|
|
963
|
+
)
|
|
964
|
+
}
|
|
965
|
+
),
|
|
966
|
+
/* @__PURE__ */ u$1(
|
|
967
|
+
Annotations,
|
|
968
|
+
{
|
|
969
|
+
x: annotationOffsetX,
|
|
970
|
+
y: annotationOffsetY,
|
|
971
|
+
annotationIDs,
|
|
972
|
+
stepSize
|
|
973
|
+
}
|
|
974
|
+
)
|
|
975
|
+
]
|
|
976
|
+
}
|
|
977
|
+
) : /* @__PURE__ */ u$1(b, { children: [
|
|
978
|
+
/* @__PURE__ */ u$1(
|
|
979
|
+
"g",
|
|
980
|
+
{
|
|
981
|
+
transform: `translate(${iconOffsetX} ${iconOffsetY})scale(1.0002)`,
|
|
982
|
+
children: /* @__PURE__ */ u$1(
|
|
983
|
+
Icon,
|
|
984
|
+
{
|
|
985
|
+
...icon,
|
|
986
|
+
shape: "square"
|
|
987
|
+
}
|
|
988
|
+
)
|
|
989
|
+
}
|
|
990
|
+
),
|
|
991
|
+
/* @__PURE__ */ u$1(
|
|
992
|
+
"g",
|
|
993
|
+
{
|
|
994
|
+
transform: `translate(${textboxOffsetX} ${textboxOffsetY})scale(1.0002)`,
|
|
995
|
+
children: /* @__PURE__ */ u$1(
|
|
996
|
+
TextBox,
|
|
997
|
+
{
|
|
998
|
+
text,
|
|
999
|
+
height: textHeight,
|
|
1000
|
+
padding: textPadding,
|
|
1001
|
+
stroke: textboxStroke,
|
|
1002
|
+
fill: textboxFill
|
|
1003
|
+
}
|
|
1004
|
+
)
|
|
1005
|
+
}
|
|
1006
|
+
)
|
|
1007
|
+
] });
|
|
1008
|
+
}, Vertex3 = ({
|
|
1009
|
+
text = "",
|
|
1010
|
+
textHeight = 10,
|
|
1011
|
+
textPadding = 4,
|
|
1012
|
+
textFill = "#287EC4",
|
|
1013
|
+
textboxFill = "white",
|
|
1014
|
+
textboxStroke = "#CCCCCC",
|
|
1015
|
+
textboxStrokeWidth = 1,
|
|
1016
|
+
textFontFamily = "Verdana",
|
|
1017
|
+
annotationGutter = 2,
|
|
1018
|
+
annotations = [],
|
|
1019
|
+
cornerRadius = 3,
|
|
1020
|
+
icon = {},
|
|
1021
|
+
subText = { text: "" },
|
|
1022
|
+
showLabel = !0,
|
|
1023
|
+
noLabelRadius = 5,
|
|
1024
|
+
expansionIcon,
|
|
1025
|
+
scale = 1
|
|
1026
|
+
}) => {
|
|
1027
|
+
icon = {
|
|
1028
|
+
height: 50,
|
|
1029
|
+
imageChar: "?",
|
|
1030
|
+
imageFontFamily: "FontAwesome",
|
|
1031
|
+
imageCharFill: "#555555",
|
|
1032
|
+
fill: "transparent",
|
|
1033
|
+
strokeWidth: 0,
|
|
1034
|
+
...icon
|
|
1035
|
+
}, subText = {
|
|
1036
|
+
text: "",
|
|
1037
|
+
fill: "white",
|
|
1038
|
+
textFill: "#555555",
|
|
1039
|
+
...subText
|
|
1040
|
+
}, expansionIcon = expansionIcon ? {
|
|
1041
|
+
height: 16,
|
|
1042
|
+
shape: "circle",
|
|
1043
|
+
padding: 6,
|
|
1044
|
+
imageChar: "?",
|
|
1045
|
+
imageFontFamily: "FontAwesome",
|
|
1046
|
+
imageCharFill: "black",
|
|
1047
|
+
fill: "whitesmoke",
|
|
1048
|
+
stroke: "whitesmoke",
|
|
1049
|
+
strokeWidth: 0,
|
|
1050
|
+
...expansionIcon
|
|
1051
|
+
} : void 0;
|
|
1052
|
+
let fullAnnotationWidth = 0;
|
|
1053
|
+
const annoOffsetY = 0, labelWidth = T(() => Utility.textSize(text, textFontFamily, textHeight, !1).width, [text, textFontFamily, textHeight]);
|
|
1054
|
+
let labelShapeWidth = 0;
|
|
1055
|
+
text !== "" && (labelShapeWidth = labelWidth + textPadding * 2 + textboxStrokeWidth * 2), fullAnnotationWidth += labelShapeWidth + annotationGutter;
|
|
1056
|
+
const textOffsetX = fullAnnotationWidth - labelShapeWidth / 2, textShapeHeight = textHeight + textPadding * 2 + textboxStrokeWidth * 2, annotationArr = [];
|
|
1057
|
+
annotations.forEach((anno, idx) => {
|
|
1058
|
+
const annoText = anno.imageChar, annoShapeWidth = textShapeHeight;
|
|
1059
|
+
fullAnnotationWidth += annoShapeWidth + annotationGutter;
|
|
1060
|
+
const annoOffsetX = fullAnnotationWidth - annoShapeWidth / 2;
|
|
1061
|
+
annotationArr.push(
|
|
1062
|
+
/* @__PURE__ */ u$1("g", { className: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: `translate(${annoOffsetX} ${annoOffsetY})`, children: /* @__PURE__ */ u$1(
|
|
1063
|
+
Icon,
|
|
1064
|
+
{
|
|
1065
|
+
...anno,
|
|
1066
|
+
shape: "square",
|
|
1067
|
+
height: textShapeHeight,
|
|
1068
|
+
imageChar: annoText,
|
|
1069
|
+
imageFontFamily: anno.imageFontFamily,
|
|
1070
|
+
cornerRadius,
|
|
1071
|
+
strokeWidth: 0
|
|
1072
|
+
}
|
|
1073
|
+
) }, idx)
|
|
1074
|
+
);
|
|
1075
|
+
}), annotations.length > 0 && (fullAnnotationWidth += annotationGutter * (annotations.length - 1));
|
|
1076
|
+
const textElement = /* @__PURE__ */ u$1("g", { "data-click": "text", transform: `translate(${textOffsetX} ${annoOffsetY})`, children: !showLabel || text === "" ? /* @__PURE__ */ u$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : /* @__PURE__ */ u$1(
|
|
1077
|
+
TextBox,
|
|
1078
|
+
{
|
|
1079
|
+
text,
|
|
1080
|
+
height: textHeight,
|
|
1081
|
+
padding: textPadding,
|
|
1082
|
+
strokeWidth: textboxStrokeWidth,
|
|
1083
|
+
stroke: textboxStroke,
|
|
1084
|
+
fill: textboxFill,
|
|
1085
|
+
textFill,
|
|
1086
|
+
fontFamily: textFontFamily,
|
|
1087
|
+
cornerRadius
|
|
1088
|
+
}
|
|
1089
|
+
) }), iconHeight = icon.height || 20, iconStrokeWidth = icon.strokeWidth || 0, iconOffsetX = 0;
|
|
1090
|
+
let iconOffsetY = 0;
|
|
1091
|
+
const subTextOffsetX = 0;
|
|
1092
|
+
let subTextOffsetY = textShapeHeight + annotationGutter * 2;
|
|
1093
|
+
text !== "" || annotationArr.length > 0 ? iconOffsetY = -(iconHeight / 2) - iconStrokeWidth - textShapeHeight / 2 - annotationGutter * 2 : subText.text !== "" && (subTextOffsetY = iconHeight / 2 + iconStrokeWidth + annotationGutter * 2);
|
|
1094
|
+
const subtextElement = subText.text === "" ? null : /* @__PURE__ */ u$1(
|
|
1095
|
+
"g",
|
|
1096
|
+
{
|
|
1097
|
+
"data-click": "subtext",
|
|
1098
|
+
transform: `translate(${subTextOffsetX} ${subTextOffsetY})`,
|
|
1099
|
+
children: /* @__PURE__ */ u$1(
|
|
1100
|
+
TextBox,
|
|
1101
|
+
{
|
|
1102
|
+
fill: subText.fill || "#FFFFFF",
|
|
1103
|
+
textFill: subText.textFill || textFill,
|
|
1104
|
+
...subText,
|
|
1105
|
+
height: textHeight,
|
|
1106
|
+
padding: textPadding,
|
|
1107
|
+
strokeWidth: 0,
|
|
1108
|
+
stroke: textboxStroke,
|
|
1109
|
+
fontFamily: textFontFamily,
|
|
1110
|
+
cornerRadius
|
|
1111
|
+
}
|
|
1112
|
+
)
|
|
1113
|
+
}
|
|
1114
|
+
);
|
|
1115
|
+
return /* @__PURE__ */ u$1("g", { transform: `scale(${scale})`, children: [
|
|
1116
|
+
/* @__PURE__ */ u$1("g", { "data-click": "icon", transform: `translate(${iconOffsetX} ${iconOffsetY})`, children: [
|
|
1117
|
+
/* @__PURE__ */ u$1(Icon, { ...icon }),
|
|
1118
|
+
expansionIcon && /* @__PURE__ */ u$1("g", { "data-click": "expanded-icon", "data-click-data": JSON.stringify(expansionIcon), transform: `translate(${(icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2} ${-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2})`, children: /* @__PURE__ */ u$1(Icon, { ...expansionIcon }) })
|
|
1119
|
+
] }),
|
|
1120
|
+
/* @__PURE__ */ u$1("g", { transform: `translate(${-fullAnnotationWidth / 2} ${annoOffsetY})`, children: [
|
|
1121
|
+
textElement,
|
|
1122
|
+
annotationArr
|
|
1123
|
+
] }),
|
|
1124
|
+
subtextElement
|
|
1125
|
+
] });
|
|
1126
|
+
}, CentroidVertex3 = function({
|
|
1127
|
+
id,
|
|
1128
|
+
categoryID = "",
|
|
1129
|
+
text = "",
|
|
1130
|
+
textHeight = 12,
|
|
1131
|
+
textPadding = 10,
|
|
1132
|
+
textFill = "#287EC4",
|
|
1133
|
+
textboxFill = "white",
|
|
1134
|
+
textboxStroke = "#CCCCCC",
|
|
1135
|
+
textboxStrokeWidth = 1,
|
|
1136
|
+
textFontFamily = "Verdana",
|
|
1137
|
+
annotationGutter = 2,
|
|
1138
|
+
annotations = [],
|
|
1139
|
+
cornerRadius,
|
|
1140
|
+
icon = {},
|
|
1141
|
+
subText = {},
|
|
1142
|
+
expansionIcon,
|
|
1143
|
+
scale = 1
|
|
1144
|
+
}) {
|
|
1145
|
+
return icon = {
|
|
1146
|
+
height: 91,
|
|
1147
|
+
padding: 40,
|
|
1148
|
+
imageCharFill: "#555555",
|
|
1149
|
+
imageFontFamily: "FontAwesome",
|
|
1150
|
+
fill: "#FFCC33",
|
|
1151
|
+
stroke: "#DFDFDF",
|
|
1152
|
+
imageChar: "?",
|
|
1153
|
+
strokeWidth: 4,
|
|
1154
|
+
yOffset: -15,
|
|
1155
|
+
...icon
|
|
1156
|
+
}, subText = {
|
|
1157
|
+
text: "",
|
|
1158
|
+
fill: "transparent",
|
|
1159
|
+
textFill: "#555555",
|
|
1160
|
+
...subText
|
|
1161
|
+
}, /* @__PURE__ */ u$1(
|
|
1162
|
+
Vertex3,
|
|
1163
|
+
{
|
|
1164
|
+
...{
|
|
1165
|
+
id,
|
|
1166
|
+
categoryID,
|
|
1167
|
+
text,
|
|
1168
|
+
textHeight,
|
|
1169
|
+
textPadding,
|
|
1170
|
+
textFill,
|
|
1171
|
+
textboxFill,
|
|
1172
|
+
textboxStroke,
|
|
1173
|
+
textboxStrokeWidth,
|
|
1174
|
+
textFontFamily,
|
|
1175
|
+
annotationGutter,
|
|
1176
|
+
annotations,
|
|
1177
|
+
cornerRadius,
|
|
1178
|
+
icon,
|
|
1179
|
+
subText,
|
|
1180
|
+
expansionIcon,
|
|
1181
|
+
scale
|
|
1182
|
+
},
|
|
1183
|
+
icon,
|
|
1184
|
+
subText
|
|
1185
|
+
}
|
|
1186
|
+
);
|
|
1187
|
+
}, Vertex4 = ({
|
|
1188
|
+
categoryID = "",
|
|
1189
|
+
text = "",
|
|
1190
|
+
textHeight = 10,
|
|
1191
|
+
textPadding = 4,
|
|
1192
|
+
textFill = "#287EC4",
|
|
1193
|
+
textboxFill = "white",
|
|
1194
|
+
textboxStroke = "#CCCCCC",
|
|
1195
|
+
textboxStrokeWidth = 1,
|
|
1196
|
+
textFontFamily = "Verdana",
|
|
1197
|
+
annotationGutter = 2,
|
|
1198
|
+
annotations = [],
|
|
1199
|
+
iconAnnotations = [],
|
|
1200
|
+
cornerRadius = 3,
|
|
1201
|
+
icon = {},
|
|
1202
|
+
subText = {},
|
|
1203
|
+
showLabel = !0,
|
|
1204
|
+
noLabelRadius = 5,
|
|
1205
|
+
iconBorderWidth = 1,
|
|
1206
|
+
iconBorderColor = "#333",
|
|
1207
|
+
iconBackgroundColor = "#fff",
|
|
1208
|
+
iconFontColor = "#000",
|
|
1209
|
+
iconFontSize = 20,
|
|
1210
|
+
iconFontFamily = "FontAwesome",
|
|
1211
|
+
shapeOffsetX = 0,
|
|
1212
|
+
shapeOffsetY = 0,
|
|
1213
|
+
iconOffsetX = 0,
|
|
1214
|
+
iconOffsetY = 0,
|
|
1215
|
+
iconPadding = 4,
|
|
1216
|
+
iconText = "?",
|
|
1217
|
+
shapeRendering = "auto"
|
|
1218
|
+
}) => {
|
|
1219
|
+
icon = {
|
|
1220
|
+
height: 50,
|
|
1221
|
+
imageChar: "?",
|
|
1222
|
+
imageFontFamily: "FontAwesome",
|
|
1223
|
+
imageCharFill: "#555555",
|
|
1224
|
+
fill: "transparent",
|
|
1225
|
+
strokeWidth: 0,
|
|
1226
|
+
...icon
|
|
1227
|
+
}, subText = {
|
|
1228
|
+
text: "",
|
|
1229
|
+
fill: "white",
|
|
1230
|
+
textFill: "#555555",
|
|
1231
|
+
...subText
|
|
1232
|
+
};
|
|
1233
|
+
const annoOffsetY = 0, labelWidth = T(() => Utility.textSize(text, textFontFamily, textHeight, !1).width, [text, textFontFamily, textHeight]);
|
|
1234
|
+
let labelShapeWidth = 0;
|
|
1235
|
+
text !== "" && (labelShapeWidth = labelWidth + textPadding * 2 + textboxStrokeWidth * 2);
|
|
1236
|
+
let fullAnnotationWidth = labelShapeWidth + annotationGutter;
|
|
1237
|
+
const textOffsetX = fullAnnotationWidth - labelShapeWidth / 2, textShapeHeight = textHeight + annotationGutter * 2 + textboxStrokeWidth * 2, annoWidthArr = annotations.map((anno) => Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, !1).width), annotationArr = [];
|
|
1238
|
+
let _labelAnnoOffsetX = fullAnnotationWidth;
|
|
1239
|
+
annotations.forEach((anno, i2) => {
|
|
1240
|
+
const annoText = anno.imageChar, annoTextHeight = anno.height ?? textShapeHeight;
|
|
1241
|
+
_labelAnnoOffsetX += annoWidthArr[i2] + annotationGutter;
|
|
1242
|
+
const annoOffsetX = _labelAnnoOffsetX - annoWidthArr[i2] / 2;
|
|
1243
|
+
annotationArr.push(
|
|
1244
|
+
/* @__PURE__ */ u$1("g", { className: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: `translate(${annoOffsetX} ${annoOffsetY})`, children: /* @__PURE__ */ u$1(
|
|
1245
|
+
Icon,
|
|
1246
|
+
{
|
|
1247
|
+
...anno,
|
|
1248
|
+
shape: "rectangle",
|
|
1249
|
+
width: annoWidthArr[i2],
|
|
1250
|
+
height: annoTextHeight,
|
|
1251
|
+
imageChar: annoText,
|
|
1252
|
+
imageFontFamily: anno.imageFontFamily,
|
|
1253
|
+
cornerRadius,
|
|
1254
|
+
strokeWidth: 0
|
|
1255
|
+
}
|
|
1256
|
+
) }, i2)
|
|
1257
|
+
);
|
|
1258
|
+
}), annotations.length > 0 && (fullAnnotationWidth += annotationGutter * (annotations.length - 1));
|
|
1259
|
+
const iconAnnotationArr = [];
|
|
1260
|
+
iconAnnotations.forEach((anno, i2) => {
|
|
1261
|
+
const x2 = anno.shapeOffsetX, y2 = anno.shapeOffsetY;
|
|
1262
|
+
iconAnnotationArr.push(
|
|
1263
|
+
/* @__PURE__ */ u$1("g", { className: "vertex3-iconAnno", "data-click": "icon-annotation", "data-click-data": JSON.stringify(anno), transform: `translate(${x2} ${y2})`, children: /* @__PURE__ */ u$1(
|
|
1264
|
+
Icon,
|
|
1265
|
+
{
|
|
1266
|
+
...anno,
|
|
1267
|
+
shape: anno.shape ?? "square",
|
|
1268
|
+
imageChar: anno.imageChar,
|
|
1269
|
+
imageFontFamily: anno.imageFontFamily,
|
|
1270
|
+
cornerRadius,
|
|
1271
|
+
stroke: anno.stroke,
|
|
1272
|
+
strokeWidth: anno.strokeWidth
|
|
1273
|
+
}
|
|
1274
|
+
) }, i2)
|
|
1275
|
+
);
|
|
1276
|
+
});
|
|
1277
|
+
const textElement = /* @__PURE__ */ u$1("g", { "data-click": "text", transform: `translate(${textOffsetX} ${annoOffsetY})`, children: !showLabel || text === "" ? /* @__PURE__ */ u$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : /* @__PURE__ */ u$1(
|
|
1278
|
+
TextBox,
|
|
1279
|
+
{
|
|
1280
|
+
text,
|
|
1281
|
+
height: textHeight,
|
|
1282
|
+
padding: textPadding,
|
|
1283
|
+
strokeWidth: textboxStrokeWidth,
|
|
1284
|
+
stroke: textboxStroke,
|
|
1285
|
+
fill: textboxFill,
|
|
1286
|
+
textFill,
|
|
1287
|
+
fontFamily: textFontFamily,
|
|
1288
|
+
cornerRadius
|
|
1289
|
+
}
|
|
1290
|
+
) }), subTextOffsetX = 0, subTextOffsetY = textShapeHeight + annotationGutter * 2, subtextElement = subText.text === "" ? null : /* @__PURE__ */ u$1(
|
|
1291
|
+
"g",
|
|
1292
|
+
{
|
|
1293
|
+
"data-click": "subtext",
|
|
1294
|
+
transform: `translate(${subTextOffsetX} ${subTextOffsetY})`,
|
|
1295
|
+
children: /* @__PURE__ */ u$1(
|
|
1296
|
+
TextBox,
|
|
1297
|
+
{
|
|
1298
|
+
fill: subText.fill || "#FFFFFF",
|
|
1299
|
+
textFill: subText.textFill || textFill,
|
|
1300
|
+
...subText,
|
|
1301
|
+
height: textHeight,
|
|
1302
|
+
padding: textPadding,
|
|
1303
|
+
strokeWidth: 0,
|
|
1304
|
+
stroke: textboxStroke,
|
|
1305
|
+
fontFamily: textFontFamily,
|
|
1306
|
+
cornerRadius
|
|
1307
|
+
}
|
|
1308
|
+
)
|
|
1309
|
+
}
|
|
1310
|
+
);
|
|
1311
|
+
return /* @__PURE__ */ u$1("g", { children: [
|
|
1312
|
+
/* @__PURE__ */ u$1(
|
|
1313
|
+
"g",
|
|
1314
|
+
{
|
|
1315
|
+
"data-click": "icon",
|
|
1316
|
+
transform: `translate(${shapeOffsetX} ${shapeOffsetY})`,
|
|
1317
|
+
children: [
|
|
1318
|
+
/* @__PURE__ */ u$1(
|
|
1319
|
+
Icon,
|
|
1320
|
+
{
|
|
1321
|
+
...icon,
|
|
1322
|
+
strokeWidth: iconBorderWidth,
|
|
1323
|
+
shape: "circle",
|
|
1324
|
+
height: iconFontSize,
|
|
1325
|
+
fill: iconBackgroundColor,
|
|
1326
|
+
stroke: iconBorderColor,
|
|
1327
|
+
imageFontFamily: iconFontFamily,
|
|
1328
|
+
imageChar: iconText,
|
|
1329
|
+
imageCharFill: iconFontColor,
|
|
1330
|
+
padding: iconPadding,
|
|
1331
|
+
xOffset: iconOffsetX,
|
|
1332
|
+
yOffset: iconOffsetY,
|
|
1333
|
+
cornerRadius,
|
|
1334
|
+
shapeRendering
|
|
1335
|
+
}
|
|
1336
|
+
),
|
|
1337
|
+
iconAnnotationArr
|
|
1338
|
+
]
|
|
1339
|
+
}
|
|
1340
|
+
),
|
|
1341
|
+
/* @__PURE__ */ u$1(
|
|
1342
|
+
"g",
|
|
1343
|
+
{
|
|
1344
|
+
transform: `translate(${-fullAnnotationWidth / 2} ${annoOffsetY})`,
|
|
1345
|
+
children: [
|
|
1346
|
+
textElement,
|
|
1347
|
+
annotationArr
|
|
1348
|
+
]
|
|
1349
|
+
}
|
|
1350
|
+
),
|
|
1351
|
+
subtextElement
|
|
1352
|
+
] });
|
|
1353
|
+
}, CentroidVertex4 = function({
|
|
1354
|
+
id,
|
|
1355
|
+
categoryID = "",
|
|
1356
|
+
text = "",
|
|
1357
|
+
textHeight = 12,
|
|
1358
|
+
textPadding = 10,
|
|
1359
|
+
textFill = "#287EC4",
|
|
1360
|
+
textboxFill = "white",
|
|
1361
|
+
textboxStroke = "#CCCCCC",
|
|
1362
|
+
textboxStrokeWidth = 1,
|
|
1363
|
+
textFontFamily = "Verdana",
|
|
1364
|
+
annotationGutter = 2,
|
|
1365
|
+
annotations = [],
|
|
1366
|
+
iconAnnotations = [],
|
|
1367
|
+
cornerRadius,
|
|
1368
|
+
icon = {},
|
|
1369
|
+
subText = {},
|
|
1370
|
+
showLabel = !0,
|
|
1371
|
+
noLabelRadius = 5,
|
|
1372
|
+
iconBorderWidth = 1,
|
|
1373
|
+
iconBorderColor = "#333",
|
|
1374
|
+
iconBackgroundColor = "#fff",
|
|
1375
|
+
iconFontColor = "#000",
|
|
1376
|
+
iconFontSize = 20,
|
|
1377
|
+
iconFontFamily = "FontAwesome",
|
|
1378
|
+
shapeOffsetX = 0,
|
|
1379
|
+
shapeOffsetY = 0,
|
|
1380
|
+
iconOffsetX = 0,
|
|
1381
|
+
iconOffsetY = 0,
|
|
1382
|
+
iconPadding = 4,
|
|
1383
|
+
iconText = "?",
|
|
1384
|
+
shapeRendering = "auto"
|
|
1385
|
+
}) {
|
|
1386
|
+
return icon = {
|
|
1387
|
+
height: 91,
|
|
1388
|
+
padding: 40,
|
|
1389
|
+
imageCharFill: "#555555",
|
|
1390
|
+
imageFontFamily: "FontAwesome",
|
|
1391
|
+
fill: "#FFCC33",
|
|
1392
|
+
stroke: "#DFDFDF",
|
|
1393
|
+
imageChar: "?",
|
|
1394
|
+
strokeWidth: 4,
|
|
1395
|
+
yOffset: -15,
|
|
1396
|
+
...icon
|
|
1397
|
+
}, subText = {
|
|
1398
|
+
text: "",
|
|
1399
|
+
fill: "transparent",
|
|
1400
|
+
textFill: "#555555",
|
|
1401
|
+
...subText
|
|
1402
|
+
}, /* @__PURE__ */ u$1(
|
|
1403
|
+
Vertex4,
|
|
1404
|
+
{
|
|
1405
|
+
...{
|
|
1406
|
+
id,
|
|
1407
|
+
categoryID,
|
|
1408
|
+
text,
|
|
1409
|
+
textHeight,
|
|
1410
|
+
textPadding,
|
|
1411
|
+
textFill,
|
|
1412
|
+
textboxFill,
|
|
1413
|
+
textboxStroke,
|
|
1414
|
+
textboxStrokeWidth,
|
|
1415
|
+
textFontFamily,
|
|
1416
|
+
annotationGutter,
|
|
1417
|
+
annotations,
|
|
1418
|
+
iconAnnotations,
|
|
1419
|
+
cornerRadius,
|
|
1420
|
+
icon,
|
|
1421
|
+
subText,
|
|
1422
|
+
showLabel,
|
|
1423
|
+
noLabelRadius,
|
|
1424
|
+
iconBorderWidth,
|
|
1425
|
+
iconBorderColor,
|
|
1426
|
+
iconBackgroundColor,
|
|
1427
|
+
iconFontColor,
|
|
1428
|
+
iconFontSize,
|
|
1429
|
+
iconFontFamily,
|
|
1430
|
+
shapeOffsetX,
|
|
1431
|
+
shapeOffsetY,
|
|
1432
|
+
iconOffsetX,
|
|
1433
|
+
iconOffsetY,
|
|
1434
|
+
iconPadding,
|
|
1435
|
+
iconText,
|
|
1436
|
+
shapeRendering
|
|
1437
|
+
},
|
|
1438
|
+
icon,
|
|
1439
|
+
subText
|
|
1440
|
+
}
|
|
1441
|
+
);
|
|
1442
|
+
}, Subgraph = ({
|
|
1443
|
+
text,
|
|
1444
|
+
width = 100,
|
|
1445
|
+
height = 100,
|
|
1446
|
+
fill = "transparent",
|
|
1447
|
+
stroke = "black",
|
|
1448
|
+
fontHeight = 12,
|
|
1449
|
+
fontFamily
|
|
1450
|
+
}) => {
|
|
1451
|
+
const tSize = Utility.textSize(text, fontFamily, fontHeight, !1);
|
|
1452
|
+
return /* @__PURE__ */ u$1(b, { children: [
|
|
1453
|
+
/* @__PURE__ */ u$1(
|
|
1454
|
+
Rectangle,
|
|
1455
|
+
{
|
|
1456
|
+
width,
|
|
1457
|
+
height,
|
|
1458
|
+
fill,
|
|
1459
|
+
stroke
|
|
1460
|
+
}
|
|
1461
|
+
),
|
|
1462
|
+
/* @__PURE__ */ u$1(
|
|
1463
|
+
"g",
|
|
1464
|
+
{
|
|
1465
|
+
transform: `translate(${(-width + tSize.width) / 2 + 4} ${(-height + tSize.height) / 2 + 4})`,
|
|
1466
|
+
children: /* @__PURE__ */ u$1(
|
|
1467
|
+
Text,
|
|
1468
|
+
{
|
|
1469
|
+
height: fontHeight,
|
|
1470
|
+
text,
|
|
1471
|
+
fontFamily
|
|
1472
|
+
}
|
|
1473
|
+
)
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1476
|
+
] });
|
|
1477
|
+
};
|
|
1478
|
+
function g(n2, t2) {
|
|
1479
|
+
for (var e2 in n2) if (e2 !== "__source" && !(e2 in t2)) return !0;
|
|
1480
|
+
for (var r2 in t2) if (r2 !== "__source" && n2[r2] !== t2[r2]) return !0;
|
|
1481
|
+
return !1;
|
|
1482
|
+
}
|
|
1483
|
+
function I(n2, t2) {
|
|
1484
|
+
this.props = n2, this.context = t2;
|
|
1485
|
+
}
|
|
1486
|
+
(I.prototype = new k$1()).isPureReactComponent = !0, I.prototype.shouldComponentUpdate = function(n2, t2) {
|
|
1487
|
+
return g(this.props, n2) || g(this.state, t2);
|
|
1488
|
+
};
|
|
1489
|
+
var M = l$1.__b;
|
|
1490
|
+
l$1.__b = function(n2) {
|
|
1491
|
+
n2.type && n2.type.__f && n2.ref && (n2.props.ref = n2.ref, n2.ref = null), M && M(n2);
|
|
1492
|
+
};
|
|
1493
|
+
var O = l$1.__e;
|
|
1494
|
+
l$1.__e = function(n2, t2, e2, r2) {
|
|
1495
|
+
if (n2.then) {
|
|
1496
|
+
for (var u2, o2 = t2; o2 = o2.__; ) if ((u2 = o2.__c) && u2.__c) return t2.__e == null && (t2.__e = e2.__e, t2.__k = e2.__k), u2.__c(n2, t2);
|
|
1497
|
+
}
|
|
1498
|
+
O(n2, t2, e2, r2);
|
|
1499
|
+
};
|
|
1500
|
+
var F = l$1.unmount;
|
|
1501
|
+
function U(n2, t2, e2) {
|
|
1502
|
+
return n2 && (n2.__c && n2.__c.__H && (n2.__c.__H.__.forEach(function(n3) {
|
|
1503
|
+
typeof n3.__c == "function" && n3.__c();
|
|
1504
|
+
}), n2.__c.__H = null), (n2 = function(n3, t3) {
|
|
1505
|
+
for (var e3 in t3) n3[e3] = t3[e3];
|
|
1506
|
+
return n3;
|
|
1507
|
+
}({}, n2)).__c != null && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
|
|
1508
|
+
return U(n3, t2, e2);
|
|
1509
|
+
})), n2;
|
|
1510
|
+
}
|
|
1511
|
+
function V(n2, t2, e2) {
|
|
1512
|
+
return n2 && e2 && (n2.__v = null, n2.__k = n2.__k && n2.__k.map(function(n3) {
|
|
1513
|
+
return V(n3, t2, e2);
|
|
1514
|
+
}), n2.__c && n2.__c.__P === t2 && (n2.__e && e2.appendChild(n2.__e), n2.__c.__e = !0, n2.__c.__P = e2)), n2;
|
|
1515
|
+
}
|
|
1516
|
+
function W() {
|
|
1517
|
+
this.__u = 0, this.o = null, this.__b = null;
|
|
1518
|
+
}
|
|
1519
|
+
function P(n2) {
|
|
1520
|
+
var t2 = n2.__.__c;
|
|
1521
|
+
return t2 && t2.__a && t2.__a(n2);
|
|
1522
|
+
}
|
|
1523
|
+
function z() {
|
|
1524
|
+
this.i = null, this.l = null;
|
|
1525
|
+
}
|
|
1526
|
+
l$1.unmount = function(n2) {
|
|
1527
|
+
var t2 = n2.__c;
|
|
1528
|
+
t2 && t2.__R && t2.__R(), t2 && 32 & n2.__u && (n2.type = null), F && F(n2);
|
|
1529
|
+
}, (W.prototype = new k$1()).__c = function(n2, t2) {
|
|
1530
|
+
var e2 = t2.__c, r2 = this;
|
|
1531
|
+
r2.o == null && (r2.o = []), r2.o.push(e2);
|
|
1532
|
+
var u2 = P(r2.__v), o2 = !1, i2 = function() {
|
|
1533
|
+
o2 || (o2 = !0, e2.__R = null, u2 ? u2(c2) : c2());
|
|
1534
|
+
};
|
|
1535
|
+
e2.__R = i2;
|
|
1536
|
+
var c2 = function() {
|
|
1537
|
+
if (!--r2.__u) {
|
|
1538
|
+
if (r2.state.__a) {
|
|
1539
|
+
var n3 = r2.state.__a;
|
|
1540
|
+
r2.__v.__k[0] = V(n3, n3.__c.__P, n3.__c.__O);
|
|
1541
|
+
}
|
|
1542
|
+
var t3;
|
|
1543
|
+
for (r2.setState({ __a: r2.__b = null }); t3 = r2.o.pop(); ) t3.forceUpdate();
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
r2.__u++ || 32 & t2.__u || r2.setState({ __a: r2.__b = r2.__v.__k[0] }), n2.then(i2, i2);
|
|
1547
|
+
}, W.prototype.componentWillUnmount = function() {
|
|
1548
|
+
this.o = [];
|
|
1549
|
+
}, W.prototype.render = function(n2, e2) {
|
|
1550
|
+
if (this.__b) {
|
|
1551
|
+
if (this.__v.__k) {
|
|
1552
|
+
var r2 = document.createElement("div"), o2 = this.__v.__k[0].__c;
|
|
1553
|
+
this.__v.__k[0] = U(this.__b, r2, o2.__O = o2.__P);
|
|
1554
|
+
}
|
|
1555
|
+
this.__b = null;
|
|
1556
|
+
}
|
|
1557
|
+
var i2 = e2.__a && _$1(b, null, n2.fallback);
|
|
1558
|
+
return i2 && (i2.__u &= -33), [_$1(b, null, e2.__a ? null : n2.children), i2];
|
|
1559
|
+
};
|
|
1560
|
+
var B = function(n2, t2, e2) {
|
|
1561
|
+
if (++e2[1] === e2[0] && n2.l.delete(t2), n2.props.revealOrder && (n2.props.revealOrder[0] !== "t" || !n2.l.size)) for (e2 = n2.i; e2; ) {
|
|
1562
|
+
for (; e2.length > 3; ) e2.pop()();
|
|
1563
|
+
if (e2[1] < e2[0]) break;
|
|
1564
|
+
n2.i = e2 = e2[2];
|
|
1565
|
+
}
|
|
1566
|
+
};
|
|
1567
|
+
(z.prototype = new k$1()).__a = function(n2) {
|
|
1568
|
+
var t2 = this, e2 = P(t2.__v), r2 = t2.l.get(n2);
|
|
1569
|
+
return r2[0]++, function(u2) {
|
|
1570
|
+
var o2 = function() {
|
|
1571
|
+
t2.props.revealOrder ? (r2.push(u2), B(t2, n2, r2)) : u2();
|
|
1572
|
+
};
|
|
1573
|
+
e2 ? e2(o2) : o2();
|
|
1574
|
+
};
|
|
1575
|
+
}, z.prototype.render = function(n2) {
|
|
1576
|
+
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
1577
|
+
var t2 = H(n2.children);
|
|
1578
|
+
n2.revealOrder && n2.revealOrder[0] === "b" && t2.reverse();
|
|
1579
|
+
for (var e2 = t2.length; e2--; ) this.l.set(t2[e2], this.i = [1, 0, this.i]);
|
|
1580
|
+
return n2.children;
|
|
1581
|
+
}, z.prototype.componentDidUpdate = z.prototype.componentDidMount = function() {
|
|
1582
|
+
var n2 = this;
|
|
1583
|
+
this.l.forEach(function(t2, e2) {
|
|
1584
|
+
B(n2, e2, t2);
|
|
1585
|
+
});
|
|
1586
|
+
};
|
|
1587
|
+
var $ = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, q = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, G = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, J = /[A-Z0-9]/g, K = typeof document < "u", Q = function(n2) {
|
|
1588
|
+
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n2);
|
|
1589
|
+
};
|
|
1590
|
+
k$1.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t2) {
|
|
1591
|
+
Object.defineProperty(k$1.prototype, t2, { configurable: !0, get: function() {
|
|
1592
|
+
return this["UNSAFE_" + t2];
|
|
1593
|
+
}, set: function(n2) {
|
|
1594
|
+
Object.defineProperty(this, t2, { configurable: !0, writable: !0, value: n2 });
|
|
1595
|
+
} });
|
|
1596
|
+
});
|
|
1597
|
+
var tn = l$1.event;
|
|
1598
|
+
function en() {
|
|
1599
|
+
}
|
|
1600
|
+
function rn() {
|
|
1601
|
+
return this.cancelBubble;
|
|
1602
|
+
}
|
|
1603
|
+
function un() {
|
|
1604
|
+
return this.defaultPrevented;
|
|
1605
|
+
}
|
|
1606
|
+
l$1.event = function(n2) {
|
|
1607
|
+
return tn && (n2 = tn(n2)), n2.persist = en, n2.isPropagationStopped = rn, n2.isDefaultPrevented = un, n2.nativeEvent = n2;
|
|
1608
|
+
};
|
|
1609
|
+
var cn = { enumerable: !1, configurable: !0, get: function() {
|
|
1610
|
+
return this.class;
|
|
1611
|
+
} }, fn = l$1.vnode;
|
|
1612
|
+
l$1.vnode = function(n2) {
|
|
1613
|
+
typeof n2.type == "string" && function(n3) {
|
|
1614
|
+
var t2 = n3.props, e2 = n3.type, u2 = {}, o2 = e2.indexOf("-") === -1;
|
|
1615
|
+
for (var i2 in t2) {
|
|
1616
|
+
var c2 = t2[i2];
|
|
1617
|
+
if (!(i2 === "value" && "defaultValue" in t2 && c2 == null || K && i2 === "children" && e2 === "noscript" || i2 === "class" || i2 === "className")) {
|
|
1618
|
+
var f2 = i2.toLowerCase();
|
|
1619
|
+
i2 === "defaultValue" && "value" in t2 && t2.value == null ? i2 = "value" : i2 === "download" && c2 === !0 ? c2 = "" : f2 === "translate" && c2 === "no" ? c2 = !1 : f2[0] === "o" && f2[1] === "n" ? f2 === "ondoubleclick" ? i2 = "ondblclick" : f2 !== "onchange" || e2 !== "input" && e2 !== "textarea" || Q(t2.type) ? f2 === "onfocus" ? i2 = "onfocusin" : f2 === "onblur" ? i2 = "onfocusout" : G.test(i2) && (i2 = f2) : f2 = i2 = "oninput" : o2 && q.test(i2) ? i2 = i2.replace(J, "-$&").toLowerCase() : c2 === null && (c2 = void 0), f2 === "oninput" && u2[i2 = f2] && (i2 = "oninputCapture"), u2[i2] = c2;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
e2 == "select" && u2.multiple && Array.isArray(u2.value) && (u2.value = H(t2.children).forEach(function(n4) {
|
|
1623
|
+
n4.props.selected = u2.value.indexOf(n4.props.value) != -1;
|
|
1624
|
+
})), e2 == "select" && u2.defaultValue != null && (u2.value = H(t2.children).forEach(function(n4) {
|
|
1625
|
+
n4.props.selected = u2.multiple ? u2.defaultValue.indexOf(n4.props.value) != -1 : u2.defaultValue == n4.props.value;
|
|
1626
|
+
})), t2.class && !t2.className ? (u2.class = t2.class, Object.defineProperty(u2, "className", cn)) : (t2.className && !t2.class || t2.class && t2.className) && (u2.class = u2.className = t2.className), n3.props = u2;
|
|
1627
|
+
}(n2), n2.$$typeof = $, fn && fn(n2);
|
|
1628
|
+
};
|
|
1629
|
+
var ln = l$1.__r;
|
|
1630
|
+
l$1.__r = function(n2) {
|
|
1631
|
+
ln && ln(n2), n2.__c;
|
|
1632
|
+
};
|
|
1633
|
+
var an = l$1.diffed;
|
|
1634
|
+
l$1.diffed = function(n2) {
|
|
1635
|
+
an && an(n2);
|
|
1636
|
+
var t2 = n2.props, e2 = n2.__e;
|
|
1637
|
+
e2 != null && n2.type === "textarea" && "value" in t2 && t2.value !== e2.value && (e2.value = t2.value == null ? "" : t2.value);
|
|
1638
|
+
};
|
|
1639
|
+
function _n(n2) {
|
|
1640
|
+
return !!n2.__k && (q$2(null, n2), !0);
|
|
1641
|
+
}
|
|
1642
|
+
const preactShim = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1643
|
+
__proto__: null,
|
|
1644
|
+
Component: k$1,
|
|
1645
|
+
Fragment: b,
|
|
1646
|
+
createElement: _$1,
|
|
1647
|
+
h: _$1,
|
|
1648
|
+
render: q$2,
|
|
1649
|
+
unmountComponentAtNode: _n,
|
|
1650
|
+
useCallback: q$1,
|
|
1651
|
+
useEffect: y,
|
|
1652
|
+
useLayoutEffect: _,
|
|
1653
|
+
useMemo: T,
|
|
1654
|
+
useReducer: p,
|
|
1655
|
+
useState: h
|
|
1656
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1657
|
+
export {
|
|
1658
|
+
Annotations,
|
|
1659
|
+
BUILD_VERSION,
|
|
1660
|
+
CentroidVertex3,
|
|
1661
|
+
CentroidVertex4,
|
|
1662
|
+
Circle,
|
|
1663
|
+
Edge,
|
|
1664
|
+
HTMLAdapter,
|
|
1665
|
+
Icon,
|
|
1666
|
+
IconLabelledRect,
|
|
1667
|
+
Icons,
|
|
1668
|
+
Image,
|
|
1669
|
+
ImageChar,
|
|
1670
|
+
LabelledRect,
|
|
1671
|
+
PKG_NAME,
|
|
1672
|
+
PKG_VERSION,
|
|
1673
|
+
preactShim as React,
|
|
1674
|
+
Rectangle,
|
|
1675
|
+
SVGAdapter,
|
|
1676
|
+
Shape,
|
|
1677
|
+
Span,
|
|
1678
|
+
Square,
|
|
1679
|
+
Subgraph,
|
|
1680
|
+
Text,
|
|
1681
|
+
TextBox,
|
|
1682
|
+
TextLine,
|
|
1683
|
+
Vertex,
|
|
1684
|
+
Vertex2,
|
|
1685
|
+
Vertex3,
|
|
1686
|
+
Vertex4,
|
|
1687
|
+
render,
|
|
1688
|
+
svgRender
|
|
1689
|
+
};
|
|
3
1690
|
//# sourceMappingURL=index.js.map
|