@hpcc-js/react 3.2.9 → 3.2.10

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.
@@ -1,3 +1,2 @@
1
- (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@hpcc-js/common")):typeof define=="function"&&define.amd?define(["exports","@hpcc-js/common"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/react"]={},global["@hpcc-js/common"]))})(this,function(exports2,common){"use strict";const PKG_NAME="@hpcc-js/react",PKG_VERSION="3.1.1",BUILD_VERSION="3.2.1";var n,l$1,u$2,i$1,r$1,o$1,e$1,f$2,c$1,s$1,a$1,p$1={},y$1=[],v$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w$1=Array.isArray;function d$1(n2,l2){for(var u2 in l2)n2[u2]=l2[u2];return n2}function g$1(n2){n2&&n2.parentNode&&n2.parentNode.removeChild(n2)}function _$1(l2,u2,t2){var i2,r2,o2,e2={};for(o2 in u2)o2=="key"?i2=u2[o2]:o2=="ref"?r2=u2[o2]:e2[o2]=u2[o2];if(arguments.length>2&&(e2.children=arguments.length>3?n.call(arguments,2):t2),typeof l2=="function"&&l2.defaultProps!=null)for(o2 in l2.defaultProps)e2[o2]==null&&(e2[o2]=l2.defaultProps[o2]);return m$1(l2,e2,i2,r2,null)}function m$1(n2,t2,i2,r2,o2){var e2={type:n2,props:t2,key:i2,ref:r2,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o2??++u$2,__i:-1,__u:0};return o2==null&&l$1.vnode!=null&&l$1.vnode(e2),e2}function k$1(n2){return n2.children}function x(n2,l2){this.props=n2,this.context=l2}function S(n2,l2){if(l2==null)return n2.__?S(n2.__,n2.__i+1):null;for(var u2;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null)return u2.__e;return typeof n2.type=="function"?S(n2):null}function C$1(n2){var l2,u2;if((n2=n2.__)!=null&&n2.__c!=null){for(n2.__e=n2.__c.base=null,l2=0;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null){n2.__e=n2.__c.base=u2.__e;break}return C$1(n2)}}function M(n2){(!n2.__d&&(n2.__d=!0)&&i$1.push(n2)&&!$.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($)}function $(){for(var n2,u2,t2,r2,o2,f2,c2,s2=1;i$1.length;)i$1.length>s2&&i$1.sort(e$1),n2=i$1.shift(),s2=i$1.length,n2.__d&&(t2=void 0,o2=(r2=(u2=n2).__v).__e,f2=[],c2=[],u2.__P&&((t2=d$1({},r2)).__v=r2.__v+1,l$1.vnode&&l$1.vnode(t2),O(u2.__P,t2,r2,u2.__n,u2.__P.namespaceURI,32&r2.__u?[o2]:null,f2,o2??S(r2),!!(32&r2.__u),c2),t2.__v=r2.__v,t2.__.__k[t2.__i]=t2,z$1(f2,t2,c2),t2.__e!=o2&&C$1(t2)));$.__r=0}function I(n2,l2,u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,v2,w2,d2,g2,_2=t2&&t2.__k||y$1,m2=l2.length;for(f2=P$1(u2,l2,_2,f2,m2),a2=0;a2<m2;a2++)(v2=u2.__k[a2])!=null&&(h2=v2.__i==-1?p$1:_2[v2.__i]||p$1,v2.__i=a2,g2=O(n2,v2,h2,i2,r2,o2,e2,f2,c2,s2),w2=v2.__e,v2.ref&&h2.ref!=v2.ref&&(h2.ref&&q$2(h2.ref,null,v2),s2.push(v2.ref,v2.__c||w2,v2)),d2==null&&w2!=null&&(d2=w2),4&v2.__u||h2.__k===v2.__k?f2=A(v2,f2,n2):typeof v2.type=="function"&&g2!==void 0?f2=g2:w2&&(f2=w2.nextSibling),v2.__u&=-7);return u2.__e=d2,f2}function P$1(n2,l2,u2,t2,i2){var r2,o2,e2,f2,c2,s2=u2.length,a2=s2,h2=0;for(n2.__k=new Array(i2),r2=0;r2<i2;r2++)(o2=l2[r2])!=null&&typeof o2!="boolean"&&typeof o2!="function"?(f2=r2+h2,(o2=n2.__k[r2]=typeof o2=="string"||typeof o2=="number"||typeof o2=="bigint"||o2.constructor==String?m$1(null,o2,null,null,null):w$1(o2)?m$1(k$1,{children:o2},null,null,null):o2.constructor==null&&o2.__b>0?m$1(o2.type,o2.props,o2.key,o2.ref?o2.ref:null,o2.__v):o2).__=n2,o2.__b=n2.__b+1,e2=null,(c2=o2.__i=L(o2,u2,f2,a2))!=-1&&(a2--,(e2=u2[c2])&&(e2.__u|=2)),e2==null||e2.__v==null?(c2==-1&&(i2>s2?h2--:i2<s2&&h2++),typeof o2.type!="function"&&(o2.__u|=4)):c2!=f2&&(c2==f2-1?h2--:c2==f2+1?h2++:(c2>f2?h2--:h2++,o2.__u|=4))):n2.__k[r2]=null;if(a2)for(r2=0;r2<s2;r2++)(e2=u2[r2])!=null&&!(2&e2.__u)&&(e2.__e==t2&&(t2=S(e2)),B$2(e2,e2));return t2}function A(n2,l2,u2){var t2,i2;if(typeof n2.type=="function"){for(t2=n2.__k,i2=0;t2&&i2<t2.length;i2++)t2[i2]&&(t2[i2].__=n2,l2=A(t2[i2],l2,u2));return l2}n2.__e!=l2&&(l2&&n2.type&&!u2.contains(l2)&&(l2=S(n2)),u2.insertBefore(n2.__e,l2||null),l2=n2.__e);do l2=l2&&l2.nextSibling;while(l2!=null&&l2.nodeType==8);return l2}function H$1(n2,l2){return l2=l2||[],n2==null||typeof n2=="boolean"||(w$1(n2)?n2.some(function(n3){H$1(n3,l2)}):l2.push(n2)),l2}function L(n2,l2,u2,t2){var i2,r2,o2=n2.key,e2=n2.type,f2=l2[u2];if(f2===null&&n2.key==null||f2&&o2==f2.key&&e2==f2.type&&!(2&f2.__u))return u2;if(t2>(f2!=null&&!(2&f2.__u)?1:0))for(i2=u2-1,r2=u2+1;i2>=0||r2<l2.length;){if(i2>=0){if((f2=l2[i2])&&!(2&f2.__u)&&o2==f2.key&&e2==f2.type)return i2;i2--}if(r2<l2.length){if((f2=l2[r2])&&!(2&f2.__u)&&o2==f2.key&&e2==f2.type)return r2;r2++}}return-1}function T$2(n2,l2,u2){l2[0]=="-"?n2.setProperty(l2,u2??""):n2[l2]=u2==null?"":typeof u2!="number"||v$1.test(l2)?u2:u2+"px"}function j$2(n2,l2,u2,t2,i2){var r2;n:if(l2=="style")if(typeof u2=="string")n2.style.cssText=u2;else{if(typeof t2=="string"&&(n2.style.cssText=t2=""),t2)for(l2 in t2)u2&&l2 in u2||T$2(n2.style,l2,"");if(u2)for(l2 in u2)t2&&u2[l2]==t2[l2]||T$2(n2.style,l2,u2[l2])}else if(l2[0]=="o"&&l2[1]=="n")r2=l2!=(l2=l2.replace(f$2,"$1")),l2=l2.toLowerCase()in n2||l2=="onFocusOut"||l2=="onFocusIn"?l2.toLowerCase().slice(2):l2.slice(2),n2.l||(n2.l={}),n2.l[l2+r2]=u2,u2?t2?u2.u=t2.u:(u2.u=c$1,n2.addEventListener(l2,r2?a$1:s$1,r2)):n2.removeEventListener(l2,r2?a$1:s$1,r2);else{if(i2=="http://www.w3.org/2000/svg")l2=l2.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");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{n2[l2]=u2??"";break n}catch{}typeof u2=="function"||(u2==null||u2===!1&&l2[4]!="-"?n2.removeAttribute(l2):n2.setAttribute(l2,l2=="popover"&&u2==1?"":u2))}}function F$1(n2){return function(u2){if(this.l){var t2=this.l[u2.type+n2];if(u2.t==null)u2.t=c$1++;else if(u2.t<t2.u)return;return t2(l$1.event?l$1.event(u2):u2)}}}function O(n2,u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,p2,y2,v2,_2,m2,b,S2,C2,M2,$2,P2,A2,H2,L2,T2,j2=u2.type;if(u2.constructor!=null)return null;128&t2.__u&&(c2=!!(32&t2.__u),o2=[f2=u2.__e=t2.__e]),(a2=l$1.__b)&&a2(u2);n:if(typeof j2=="function")try{if(b=u2.props,S2="prototype"in j2&&j2.prototype.render,C2=(a2=j2.contextType)&&i2[a2.__c],M2=a2?C2?C2.props.value:a2.__:i2,t2.__c?m2=(h2=u2.__c=t2.__c).__=h2.__E:(S2?u2.__c=h2=new j2(b,M2):(u2.__c=h2=new x(b,M2),h2.constructor=j2,h2.render=D$1),C2&&C2.sub(h2),h2.props=b,h2.state||(h2.state={}),h2.context=M2,h2.__n=i2,p2=h2.__d=!0,h2.__h=[],h2._sb=[]),S2&&h2.__s==null&&(h2.__s=h2.state),S2&&j2.getDerivedStateFromProps!=null&&(h2.__s==h2.state&&(h2.__s=d$1({},h2.__s)),d$1(h2.__s,j2.getDerivedStateFromProps(b,h2.__s))),y2=h2.props,v2=h2.state,h2.__v=u2,p2)S2&&j2.getDerivedStateFromProps==null&&h2.componentWillMount!=null&&h2.componentWillMount(),S2&&h2.componentDidMount!=null&&h2.__h.push(h2.componentDidMount);else{if(S2&&j2.getDerivedStateFromProps==null&&b!==y2&&h2.componentWillReceiveProps!=null&&h2.componentWillReceiveProps(b,M2),!h2.__e&&h2.shouldComponentUpdate!=null&&h2.shouldComponentUpdate(b,h2.__s,M2)===!1||u2.__v==t2.__v){for(u2.__v!=t2.__v&&(h2.props=b,h2.state=h2.__s,h2.__d=!1),u2.__e=t2.__e,u2.__k=t2.__k,u2.__k.some(function(n3){n3&&(n3.__=u2)}),$2=0;$2<h2._sb.length;$2++)h2.__h.push(h2._sb[$2]);h2._sb=[],h2.__h.length&&e2.push(h2);break n}h2.componentWillUpdate!=null&&h2.componentWillUpdate(b,h2.__s,M2),S2&&h2.componentDidUpdate!=null&&h2.__h.push(function(){h2.componentDidUpdate(y2,v2,_2)})}if(h2.context=M2,h2.props=b,h2.__P=n2,h2.__e=!1,P2=l$1.__r,A2=0,S2){for(h2.state=h2.__s,h2.__d=!1,P2&&P2(u2),a2=h2.render(h2.props,h2.state,h2.context),H2=0;H2<h2._sb.length;H2++)h2.__h.push(h2._sb[H2]);h2._sb=[]}else do h2.__d=!1,P2&&P2(u2),a2=h2.render(h2.props,h2.state,h2.context),h2.state=h2.__s;while(h2.__d&&++A2<25);h2.state=h2.__s,h2.getChildContext!=null&&(i2=d$1(d$1({},i2),h2.getChildContext())),S2&&!p2&&h2.getSnapshotBeforeUpdate!=null&&(_2=h2.getSnapshotBeforeUpdate(y2,v2)),L2=a2,a2!=null&&a2.type===k$1&&a2.key==null&&(L2=N$1(a2.props.children)),f2=I(n2,w$1(L2)?L2:[L2],u2,t2,i2,r2,o2,e2,f2,c2,s2),h2.base=u2.__e,u2.__u&=-161,h2.__h.length&&e2.push(h2),m2&&(h2.__E=h2.__=null)}catch(n3){if(u2.__v=null,c2||o2!=null)if(n3.then){for(u2.__u|=c2?160:128;f2&&f2.nodeType==8&&f2.nextSibling;)f2=f2.nextSibling;o2[o2.indexOf(f2)]=null,u2.__e=f2}else for(T2=o2.length;T2--;)g$1(o2[T2]);else u2.__e=t2.__e,u2.__k=t2.__k;l$1.__e(n3,u2,t2)}else o2==null&&u2.__v==t2.__v?(u2.__k=t2.__k,u2.__e=t2.__e):f2=u2.__e=V$1(t2.__e,u2,t2,i2,r2,o2,e2,c2,s2);return(a2=l$1.diffed)&&a2(u2),128&u2.__u?void 0:f2}function z$1(n2,u2,t2){for(var i2=0;i2<t2.length;i2++)q$2(t2[i2],t2[++i2],t2[++i2]);l$1.__c&&l$1.__c(u2,n2),n2.some(function(u3){try{n2=u3.__h,u3.__h=[],n2.some(function(n3){n3.call(u3)})}catch(n3){l$1.__e(n3,u3.__v)}})}function N$1(n2){return typeof n2!="object"||n2==null||n2.__b&&n2.__b>0?n2:w$1(n2)?n2.map(N$1):d$1({},n2)}function V$1(u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,y2,v2,d2,_2,m2,b=i2.props,k2=t2.props,x2=t2.type;if(x2=="svg"?o2="http://www.w3.org/2000/svg":x2=="math"?o2="http://www.w3.org/1998/Math/MathML":o2||(o2="http://www.w3.org/1999/xhtml"),e2!=null){for(a2=0;a2<e2.length;a2++)if((d2=e2[a2])&&"setAttribute"in d2==!!x2&&(x2?d2.localName==x2:d2.nodeType==3)){u2=d2,e2[a2]=null;break}}if(u2==null){if(x2==null)return document.createTextNode(k2);u2=document.createElementNS(o2,x2,k2.is&&k2),c2&&(l$1.__m&&l$1.__m(t2,e2),c2=!1),e2=null}if(x2==null)b===k2||c2&&u2.data==k2||(u2.data=k2);else{if(e2=e2&&n.call(u2.childNodes),b=i2.props||p$1,!c2&&e2!=null)for(b={},a2=0;a2<u2.attributes.length;a2++)b[(d2=u2.attributes[a2]).name]=d2.value;for(a2 in b)if(d2=b[a2],a2!="children"){if(a2=="dangerouslySetInnerHTML")y2=d2;else if(!(a2 in k2)){if(a2=="value"&&"defaultValue"in k2||a2=="checked"&&"defaultChecked"in k2)continue;j$2(u2,a2,null,d2,o2)}}for(a2 in k2)d2=k2[a2],a2=="children"?v2=d2:a2=="dangerouslySetInnerHTML"?h2=d2:a2=="value"?_2=d2:a2=="checked"?m2=d2:c2&&typeof d2!="function"||b[a2]===d2||j$2(u2,a2,d2,b[a2],o2);if(h2)c2||y2&&(h2.__html==y2.__html||h2.__html==u2.innerHTML)||(u2.innerHTML=h2.__html),t2.__k=[];else if(y2&&(u2.innerHTML=""),I(t2.type=="template"?u2.content:u2,w$1(v2)?v2:[v2],t2,i2,r2,x2=="foreignObject"?"http://www.w3.org/1999/xhtml":o2,e2,f2,e2?e2[0]:i2.__k&&S(i2,0),c2,s2),e2!=null)for(a2=e2.length;a2--;)g$1(e2[a2]);c2||(a2="value",x2=="progress"&&_2==null?u2.removeAttribute("value"):_2!=null&&(_2!==u2[a2]||x2=="progress"&&!_2||x2=="option"&&_2!=b[a2])&&j$2(u2,a2,_2,b[a2],o2),a2="checked",m2!=null&&m2!=u2[a2]&&j$2(u2,a2,m2,b[a2],o2))}return u2}function q$2(n2,u2,t2){try{if(typeof n2=="function"){var i2=typeof n2.__u=="function";i2&&n2.__u(),i2&&u2==null||(n2.__u=n2(u2))}else n2.current=u2}catch(n3){l$1.__e(n3,t2)}}function B$2(n2,u2,t2){var i2,r2;if(l$1.unmount&&l$1.unmount(n2),(i2=n2.ref)&&(i2.current&&i2.current!=n2.__e||q$2(i2,null,u2)),(i2=n2.__c)!=null){if(i2.componentWillUnmount)try{i2.componentWillUnmount()}catch(n3){l$1.__e(n3,u2)}i2.base=i2.__P=null}if(i2=n2.__k)for(r2=0;r2<i2.length;r2++)i2[r2]&&B$2(i2[r2],u2,t2||typeof n2.type!="function");t2||g$1(n2.__e),n2.__c=n2.__=n2.__e=void 0}function D$1(n2,l2,u2){return this.constructor(n2,u2)}function E$1(u2,t2,i2){var r2,o2,e2,f2;t2==document&&(t2=document.documentElement),l$1.__&&l$1.__(u2,t2),o2=(r2=typeof i2=="function")?null:i2&&i2.__k||t2.__k,e2=[],f2=[],O(t2,u2=(!r2&&i2||t2).__k=_$1(k$1,null,[u2]),o2||p$1,p$1,t2.namespaceURI,!r2&&i2?[i2]:o2?null:t2.firstChild?n.call(t2.childNodes):null,e2,!r2&&i2?i2:o2?o2.__e:t2.firstChild,r2,f2),z$1(e2,u2,f2)}n=y$1.slice,l$1={__e:function(n2,l2,u2,t2){for(var i2,r2,o2;l2=l2.__;)if((i2=l2.__c)&&!i2.__)try{if((r2=i2.constructor)&&r2.getDerivedStateFromError!=null&&(i2.setState(r2.getDerivedStateFromError(n2)),o2=i2.__d),i2.componentDidCatch!=null&&(i2.componentDidCatch(n2,t2||{}),o2=i2.__d),o2)return i2.__E=i2}catch(l3){n2=l3}throw n2}},u$2=0,x.prototype.setState=function(n2,l2){var u2;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),M(this))},x.prototype.forceUpdate=function(n2){this.__v&&(this.__e=!0,n2&&this.__h.push(n2),M(this))},x.prototype.render=k$1,i$1=[],o$1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n2,l2){return n2.__v.__b-l2.__v.__b},$.__r=0,f$2=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$1(!1),a$1=F$1(!0);var f$1=0;function u$1(e2,t2,n2,o2,i2,u2){t2||(t2={});var a2,c2,p2=t2;if("ref"in p2)for(c2 in p2={},t2)c2=="ref"?a2=t2[c2]:p2[c2]=t2[c2];var l2={type:e2,props:p2,key:n2,ref:a2,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f$1,__i:-1,__u:0,__source:i2,__self:u2};if(typeof e2=="function"&&(a2=e2.defaultProps))for(c2 in a2)p2[c2]===void 0&&(p2[c2]=a2[c2]);return l$1.vnode&&l$1.vnode(l2),l2}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.__;function p(n2,t2){c.__h&&c.__h(r,n2,o||t2),o=0;var u2=r.__H||(r.__H={__:[],__h:[]});return n2>=u2.__.length&&u2.__.push({}),u2.__[n2]}function d(n2){return o=1,h(D,n2)}function h(n2,u2,i2){var o2=p(t++,2);if(o2.t=n2,!o2.__c&&(o2.__=[i2?i2(u2):D(void 0,u2),function(n3){var t2=o2.__N?o2.__N[0]:o2.__[0],r2=o2.t(t2,n3);t2!==r2&&(o2.__N=[r2,o2.__[1]],o2.__c.setState({}))}],o2.__c=r,!r.__f)){var f2=function(n3,t2,r2){if(!o2.__c.__H)return!0;var u3=o2.__c.__H.__.filter(function(n4){return!!n4.__c});if(u3.every(function(n4){return!n4.__N}))return!c2||c2.call(this,n3,t2,r2);var i3=o2.__c.props!==n3;return u3.forEach(function(n4){if(n4.__N){var t3=n4.__[0];n4.__=n4.__N,n4.__N=void 0,t3!==n4.__[0]&&(i3=!0)}}),c2&&c2.call(this,n3,t2,r2)||i3};r.__f=!0;var c2=r.shouldComponentUpdate,e2=r.componentWillUpdate;r.componentWillUpdate=function(n3,t2,r2){if(this.__e){var u3=c2;c2=void 0,f2(n3,t2,r2),c2=u3}e2&&e2.call(this,n3,t2,r2)},r.shouldComponentUpdate=f2}return o2.__N||o2.__}function y(n2,u2){var i2=p(t++,3);!c.__s&&C(i2.__H,u2)&&(i2.__=n2,i2.u=u2,r.__H.__h.push(i2))}function _(n2,u2){var i2=p(t++,4);!c.__s&&C(i2.__H,u2)&&(i2.__=n2,i2.u=u2,r.__h.push(i2))}function T$1(n2,r2){var u2=p(t++,7);return C(u2.__H,r2)&&(u2.__=n2(),u2.__H=r2,u2.__h=n2),u2.__}function q$1(n2,t2){return o=8,T$1(function(){return n2},t2)}function j$1(){for(var n2;n2=f.shift();)if(n2.__P&&n2.__H)try{n2.__H.__h.forEach(z),n2.__H.__h.forEach(B$1),n2.__H.__h=[]}catch(t2){n2.__H.__h=[],c.__e(t2,n2.__v)}}c.__b=function(n2){r=null,e&&e(n2)},c.__=function(n2,t2){n2&&t2.__k&&t2.__k.__m&&(n2.__m=t2.__k.__m),s&&s(n2,t2)},c.__r=function(n2){a&&a(n2),t=0;var i2=(r=n2.__c).__H;i2&&(u===r?(i2.__h=[],r.__h=[],i2.__.forEach(function(n3){n3.__N&&(n3.__=n3.__N),n3.u=n3.__N=void 0})):(i2.__h.forEach(z),i2.__h.forEach(B$1),i2.__h=[],t=0)),u=r},c.diffed=function(n2){v&&v(n2);var t2=n2.__c;t2&&t2.__H&&(t2.__H.__h.length&&(f.push(t2)!==1&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t2.__H.__.forEach(function(n3){n3.u&&(n3.__H=n3.u),n3.u=void 0})),u=r=null},c.__c=function(n2,t2){t2.some(function(n3){try{n3.__h.forEach(z),n3.__h=n3.__h.filter(function(n4){return!n4.__||B$1(n4)})}catch(r2){t2.some(function(n4){n4.__h&&(n4.__h=[])}),t2=[],c.__e(r2,n3.__v)}}),l&&l(n2,t2)},c.unmount=function(n2){m&&m(n2);var t2,r2=n2.__c;r2&&r2.__H&&(r2.__H.__.forEach(function(n3){try{z(n3)}catch(n4){t2=n4}}),r2.__H=void 0,t2&&c.__e(t2,r2.__v))};var k=typeof requestAnimationFrame=="function";function w(n2){var t2,r2=function(){clearTimeout(u2),k&&cancelAnimationFrame(t2),setTimeout(n2)},u2=setTimeout(r2,100);k&&(t2=requestAnimationFrame(r2))}function z(n2){var t2=r,u2=n2.__c;typeof u2=="function"&&(n2.__c=void 0,u2()),r=t2}function B$1(n2){var t2=r;n2.__c=n2.__(),r=t2}function C(n2,t2){return!n2||n2.length!==t2.length||t2.some(function(t3,r2){return t3!==n2[r2]})}function D(n2,t2){return typeof t2=="function"?t2(n2):t2}function g(n2,t2){for(var e2 in t2)n2[e2]=t2[e2];return n2}function E(n2,t2){for(var e2 in n2)if(e2!=="__source"&&!(e2 in t2))return!0;for(var r2 in t2)if(r2!=="__source"&&n2[r2]!==t2[r2])return!0;return!1}function N(n2,t2){this.props=n2,this.context=t2}(N.prototype=new x).isPureReactComponent=!0,N.prototype.shouldComponentUpdate=function(n2,t2){return E(this.props,n2)||E(this.state,t2)};var T=l$1.__b;l$1.__b=function(n2){n2.type&&n2.type.__f&&n2.ref&&(n2.props.ref=n2.ref,n2.ref=null),T&&T(n2)};var F=l$1.__e;l$1.__e=function(n2,t2,e2,r2){if(n2.then){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)}F(n2,t2,e2,r2)};var U=l$1.unmount;function V(n2,t2,e2){return n2&&(n2.__c&&n2.__c.__H&&(n2.__c.__H.__.forEach(function(n3){typeof n3.__c=="function"&&n3.__c()}),n2.__c.__H=null),(n2=g({},n2)).__c!=null&&(n2.__c.__P===e2&&(n2.__c.__P=t2),n2.__c.__e=!0,n2.__c=null),n2.__k=n2.__k&&n2.__k.map(function(n3){return V(n3,t2,e2)})),n2}function W(n2,t2,e2){return n2&&e2&&(n2.__v=null,n2.__k=n2.__k&&n2.__k.map(function(n3){return W(n3,t2,e2)}),n2.__c&&n2.__c.__P===t2&&(n2.__e&&e2.appendChild(n2.__e),n2.__c.__e=!0,n2.__c.__P=e2)),n2}function P(){this.__u=0,this.o=null,this.__b=null}function j(n2){var t2=n2.__.__c;return t2&&t2.__a&&t2.__a(n2)}function B(){this.i=null,this.l=null}l$1.unmount=function(n2){var t2=n2.__c;t2&&t2.__R&&t2.__R(),t2&&32&n2.__u&&(n2.type=null),U&&U(n2)},(P.prototype=new x).__c=function(n2,t2){var e2=t2.__c,r2=this;r2.o==null&&(r2.o=[]),r2.o.push(e2);var u2=j(r2.__v),o2=!1,i2=function(){o2||(o2=!0,e2.__R=null,u2?u2(c2):c2())};e2.__R=i2;var c2=function(){if(!--r2.__u){if(r2.state.__a){var n3=r2.state.__a;r2.__v.__k[0]=W(n3,n3.__c.__P,n3.__c.__O)}var t3;for(r2.setState({__a:r2.__b=null});t3=r2.o.pop();)t3.forceUpdate()}};r2.__u++||32&t2.__u||r2.setState({__a:r2.__b=r2.__v.__k[0]}),n2.then(i2,i2)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n2,e2){if(this.__b){if(this.__v.__k){var r2=document.createElement("div"),o2=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r2,o2.__O=o2.__P)}this.__b=null}var i2=e2.__a&&_$1(k$1,null,n2.fallback);return i2&&(i2.__u&=-33),[_$1(k$1,null,e2.__a?null:n2.children),i2]};var H=function(n2,t2,e2){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;){for(;e2.length>3;)e2.pop()();if(e2[1]<e2[0])break;n2.i=e2=e2[2]}};(B.prototype=new x).__a=function(n2){var t2=this,e2=j(t2.__v),r2=t2.l.get(n2);return r2[0]++,function(u2){var o2=function(){t2.props.revealOrder?(r2.push(u2),H(t2,n2,r2)):u2()};e2?e2(o2):o2()}},B.prototype.render=function(n2){this.i=null,this.l=new Map;var t2=H$1(n2.children);n2.revealOrder&&n2.revealOrder[0]==="b"&&t2.reverse();for(var e2=t2.length;e2--;)this.l.set(t2[e2],this.i=[1,0,this.i]);return n2.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n2=this;this.l.forEach(function(t2,e2){H(n2,e2,t2)})};var q=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,G=/^(?: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]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=typeof document<"u",X=function(n2){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n2)};x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t2){Object.defineProperty(x.prototype,t2,{configurable:!0,get:function(){return this["UNSAFE_"+t2]},set:function(n2){Object.defineProperty(this,t2,{configurable:!0,writable:!0,value:n2})}})});var en=l$1.event;function rn(){}function un(){return this.cancelBubble}function on(){return this.defaultPrevented}l$1.event=function(n2){return en&&(n2=en(n2)),n2.persist=rn,n2.isPropagationStopped=un,n2.isDefaultPrevented=on,n2.nativeEvent=n2};var ln={enumerable:!1,configurable:!0,get:function(){return this.class}},fn=l$1.vnode;l$1.vnode=function(n2){typeof n2.type=="string"&&function(n3){var t2=n3.props,e2=n3.type,u2={},o2=e2.indexOf("-")===-1;for(var i2 in t2){var c2=t2[i2];if(!(i2==="value"&&"defaultValue"in t2&&c2==null||Q&&i2==="children"&&e2==="noscript"||i2==="class"||i2==="className")){var l2=i2.toLowerCase();i2==="defaultValue"&&"value"in t2&&t2.value==null?i2="value":i2==="download"&&c2===!0?c2="":l2==="translate"&&c2==="no"?c2=!1:l2[0]==="o"&&l2[1]==="n"?l2==="ondoubleclick"?i2="ondblclick":l2!=="onchange"||e2!=="input"&&e2!=="textarea"||X(t2.type)?l2==="onfocus"?i2="onfocusin":l2==="onblur"?i2="onfocusout":J.test(i2)&&(i2=l2):l2=i2="oninput":o2&&G.test(i2)?i2=i2.replace(K,"-$&").toLowerCase():c2===null&&(c2=void 0),l2==="oninput"&&u2[i2=l2]&&(i2="oninputCapture"),u2[i2]=c2}}e2=="select"&&u2.multiple&&Array.isArray(u2.value)&&(u2.value=H$1(t2.children).forEach(function(n4){n4.props.selected=u2.value.indexOf(n4.props.value)!=-1})),e2=="select"&&u2.defaultValue!=null&&(u2.value=H$1(t2.children).forEach(function(n4){n4.props.selected=u2.multiple?u2.defaultValue.indexOf(n4.props.value)!=-1:u2.defaultValue==n4.props.value})),t2.class&&!t2.className?(u2.class=t2.class,Object.defineProperty(u2,"className",ln)):(t2.className&&!t2.class||t2.class&&t2.className)&&(u2.class=u2.className=t2.className),n3.props=u2}(n2),n2.$$typeof=q,fn&&fn(n2)};var an=l$1.__r;l$1.__r=function(n2){an&&an(n2),n2.__c};var sn=l$1.diffed;l$1.diffed=function(n2){sn&&sn(n2);var t2=n2.props,e2=n2.__e;e2!=null&&n2.type==="textarea"&&"value"in t2&&t2.value!==e2.value&&(e2.value=t2.value==null?"":t2.value)};function bn(n2){return!!n2.__k&&(E$1(null,n2),!0)}const preactShim=Object.freeze(Object.defineProperty({__proto__:null,Component:x,Fragment:k$1,createElement:_$1,h:_$1,render:E$1,unmountComponentAtNode:bn,useCallback:q$1,useEffect:y,useLayoutEffect:_,useMemo:T$1,useReducer:h,useState:d},Symbol.toStringTag,{value:"Module"})),Image=({href,x:x2,y:y2=0,height=12})=>u$1("image",{xlinkHref:href,x:x2-height/2,y:y2-height/2,width:height,height}),ImageChar=({x:x2,y:y2=0,height=12,fill,stroke,fontFamily="FontAwesome",char="",fontWeight})=>{const renderChar=T$1(()=>fontFamily==="FontAwesome"?common.Utility.faChar(char):char,[char,fontFamily]);return u$1("text",{x:x2,y:y2,fill,stroke,fontFamily,fontSize:`${height}px`,fontWeight,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:renderChar})},Circle=({radius=32,fill="navy",stroke=fill,strokeWidth=1,shapeRendering})=>u$1("circle",{r:radius,fill,stroke,strokeWidth,shapeRendering}),Square=({radius=30,cornerRadius=0,fill="white",stroke,strokeWidth=1,shapeRendering})=>u$1("rect",{x:-radius,y:-radius,rx:cornerRadius,ry:cornerRadius,width:radius*2,height:radius*2,fill,stroke:stroke||fill,strokeWidth,shapeRendering}),Rectangle=({width=30,height=30,cornerRadius=0,fill="white",stroke="black",strokeWidth=1,shapeRendering})=>u$1("rect",{x:-width/2,y:-height/2,rx:cornerRadius,ry:cornerRadius,width,height,fill,stroke:stroke||fill,strokeWidth,shapeRendering}),Shape=({shape="circle",height=128,width,fill,stroke,strokeWidth=1,shapeRendering,cornerRadius})=>{switch(shape){case"square":return u$1(Square,{radius:height/2,fill,stroke,strokeWidth,shapeRendering,cornerRadius});case"rectangle":return u$1(Rectangle,{width:width??height,height,fill,stroke,strokeWidth,shapeRendering,cornerRadius});case"circle":default:return u$1(Circle,{radius:height/2,fill,stroke,strokeWidth,shapeRendering})}},Icon=({shape="circle",width,height=32,fill,stroke,strokeWidth=0,imageUrl="",imageFontFamily="FontAwesome",imageChar="",imageCharFill=common.Palette.textColor(fill),padding=height/5,xOffset=0,yOffset=0,cornerRadius,shapeRendering})=>u$1(k$1,{children:[u$1(Shape,{shape,width,height,fill,stroke,strokeWidth,shapeRendering,cornerRadius}),imageUrl?u$1(Image,{href:imageUrl,x:xOffset,y:yOffset,height:height-padding}):u$1(ImageChar,{x:xOffset,y:yOffset,height:height-padding,fontFamily:imageFontFamily,char:imageChar,fill:imageCharFill,fontWeight:400})]}),Icons=({icons=[]})=>{const IconComponents=icons.map(cat=>u$1("g",{id:cat.id,children:u$1(Icon,{...cat})},cat.id));return u$1(k$1,{children:IconComponents})},TextLine=({text,height=12,anchor="middle",baseline="middle",fontFamily="Verdana",fill="black"})=>u$1("text",{"font-family":fontFamily,"font-size":`${height}px`,"text-anchor":anchor,"dominant-baseline":baseline,fill,children:text}),Text=({text,height=12,fontFamily="Verdana",fill="black",onSizeUpdate})=>{const[totalWidth,setTotalWidth]=d(0),[totalHeight,setTotalHeight]=d(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:totalWidth,height:totalHeight})},[totalWidth,totalHeight,onSizeUpdate]);const parts=T$1(()=>text.split(`
2
- `),[text]);_(()=>{const size=common.Utility.textSize(parts,fontFamily,height);setTotalWidth(size.width),setTotalHeight(size.height)},[fontFamily,height,parts]);const TextLines=T$1(()=>{const yOffset=-(totalHeight/2)+height/2;return parts.map((p2,i2)=>u$1("g",{transform:`translate(0 ${yOffset+i2*(height+2)})`,children:u$1(TextLine,{text:p2,height,fontFamily,fill})},`key-${i2}`))},[parts,totalHeight,height,fontFamily,fill]);return u$1("g",{children:TextLines})},TextBox=({text,height=12,fontFamily="Verdana",padding=4,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0,onSizeUpdate})=>{const[textWidth,setTextWidthUpdate]=d(0),[textHeight,setTextHeightUpdate]=d(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:textWidth,height:textHeight})},[textWidth,textHeight,onSizeUpdate]);const onTextSizeUpdate=q$1(size=>{setTextWidthUpdate(size.width),setTextHeightUpdate(size.height)},[]),w2=textWidth+padding*2+strokeWidth,h2=textHeight+padding*2+strokeWidth,textOffsetY=Math.floor(height/10);return u$1(k$1,{children:[u$1(Rectangle,{width:w2,height:h2,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(0 ${textOffsetY})`,children:u$1(Text,{text,fontFamily,height,fill:textFill,onSizeUpdate:onTextSizeUpdate})})]})},LabelledRect=({text,height=12,width=12,fontFamily="Verdana",fontSize=10,padding=3,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0,onSizeUpdate})=>{const[actualWidth,setActualWidthUpdate]=d(width),[actualHeight,setActualHeightUpdate]=d(height);return _(()=>{const size=common.Utility.textSize(text,fontFamily,fontSize);setActualWidthUpdate(size.width+padding*2),setActualHeightUpdate(size.height+padding*2)},[text,fontFamily,fontSize,padding]),_(()=>{onSizeUpdate&&onSizeUpdate({width:actualWidth,height:actualHeight})},[actualWidth,actualHeight,padding,onSizeUpdate]),u$1(k$1,{children:[u$1(Rectangle,{width,height,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(${-(width/2)+padding} ${-(height/2)+padding})`,children:u$1(TextLine,{text,fontFamily,height:fontSize,fill:textFill,anchor:"start",baseline:"hanging"})})]})},IconLabelledRect=({icon,iconFontFamily,text,height=12,width=12,fontFamily="Verdana",fontSize=10,padding=3,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0})=>u$1(k$1,{children:[u$1(Rectangle,{width,height,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(${-(width/2)+padding} ${-(height/2)+padding})`,children:u$1(Icon,{shape:"square",imageFontFamily:iconFontFamily,imageChar:icon,height,fill,imageCharFill:textFill})}),u$1("g",{transform:`translate(${-(width/2)+padding*2+height} ${-(height/2)+padding})`,children:u$1(TextLine,{text,fontFamily,height:fontSize,fill:textFill,anchor:"start",baseline:"hanging"})})]}),Edge=({label,labelPos,labelFill="black",labelHeight=12,path,stroke,strokeWidth,strokeDasharray})=>u$1(k$1,{children:[u$1("path",{d:path,stroke,style:{strokeWidth,strokeDasharray}}),label&&labelPos&&labelPos.length===2?u$1("g",{transform:`translate(${labelPos[0]} ${labelPos[1]})`,children:u$1(Text,{text:label,fill:labelFill,height:labelHeight})}):void 0]});function render(C2,props,parent,replaceNode){E$1(_$1(C2,props),parent,replaceNode)}function svgRender(C2,props,parent,replaceNode){E$1(_$1("svg",null,_$1(C2,props)),parent,replaceNode)}class HTMLAdapter extends common.HTMLWidget{constructor(_component){super(),this._component=_component}props(_2){return arguments.length?(this._props={...this._props,..._2},this):this._props}prop(_2,value){return arguments.length===1?this._props[_2]:(this._props[_2]=value,this)}update(domNode,element){super.update(domNode,element),render(this._component,this._props,domNode)}}HTMLAdapter.prototype._class+=" react_HTMLAdapter",HTMLAdapter.prototype.publish("props",{},"object","Properties");class SVGAdapter extends common.SVGWidget{constructor(_component){super(),this._component=_component}props(_2){return arguments.length?(this._props={...this._props,..._2},this):this._props}prop(_2,value){return arguments.length===1?this._props[_2]:(this._props[_2]=value,this)}update(domNode,element){super.update(domNode,element),render(this._component,this._props,domNode)}}SVGAdapter.prototype._class+=" react_SVGAdapter",SVGAdapter.prototype.publish("props",{},"object","Properties");const Span=({text})=>u$1("span",{children:text}),Annotations=({x:x2,y:y2,annotationIDs=[],stepSize=-16})=>{const IconComponents=annotationIDs.map((id,i2)=>u$1("g",{transform:`translate(${x2+i2*stepSize} ${y2})`,children:u$1("use",{xlinkHref:"#"+id})},id));return u$1(k$1,{children:IconComponents})},Vertex=({categoryID="",text="",textHeight=12,textPadding=4,icon={},annotationsHeight=12,annotationIDs=[],textFill,textboxFill,textboxStroke,textFontFamily,onSizeUpdate,showLabel=!0,scale=1})=>{icon={imageChar:"fa-question",height:32,fill:"transparent",...icon};const[textBoxWidth,setTextBoxWidthUpdate]=d(0),[textBoxHeight,setTextBoxHeightUpdate]=d(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:0,height:0})},[textBoxWidth,textBoxHeight,onSizeUpdate]);let width=textBoxWidth;width+=4;let offsetY=-(icon.height*2/6+textHeight+8)/2;const textboxOffsetY=icon.height/3+textBoxHeight/2+textPadding;let annotationOffsetY=icon.height/3+textBoxHeight+textPadding+annotationsHeight/3;showLabel||(offsetY+=(textHeight+8)/2,annotationOffsetY-=textBoxHeight+textPadding);const onTextBoxSizeUpdate=q$1(size=>{setTextBoxWidthUpdate(size.width),setTextBoxHeightUpdate(size.height)},[]),label=showLabel?u$1("g",{transform:`translate(0 ${textboxOffsetY})`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,onSizeUpdate:onTextBoxSizeUpdate,textFill,fill:textboxFill,stroke:textboxStroke,fontFamily:textFontFamily})}):void 0;return categoryID?u$1("g",{transform:`translate(0 ${offsetY}) scale(${scale})`,children:[u$1("use",{xlinkHref:"#"+categoryID}),label,u$1(Annotations,{x:width/2,y:annotationOffsetY,annotationIDs})]}):u$1("g",{transform:`translate(0 ${offsetY}) scale(${scale})`,children:[u$1(Icon,{...icon}),label]})},Vertex2=({categoryID="",text="",textHeight=12,textPadding=4,icon={},textFill="black",textboxFill="white",textboxStroke="black",textFontFamily,annotationsHeight=12,annotationIDs=[]})=>{icon={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...icon};const textBoxHeight=textHeight+textPadding*2,{width}=T$1(()=>common.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;return categoryID?u$1("g",{transform:`translate(${offsetX} ${offsetY})`,children:[u$1("g",{transform:`translate(${iconOffsetX} ${iconOffsetY})`,children:u$1("use",{xlinkHref:"#"+categoryID})}),u$1("g",{transform:`translate(${textboxOffsetX} ${textboxOffsetY})`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily})}),u$1(Annotations,{x:annotationOffsetX,y:annotationOffsetY,annotationIDs,stepSize})]}):u$1(k$1,{children:[u$1("g",{transform:`translate(${iconOffsetX} ${iconOffsetY})scale(1.0002)`,children:u$1(Icon,{...icon,shape:"square"})}),u$1("g",{transform:`translate(${textboxOffsetX} ${textboxOffsetY})scale(1.0002)`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,stroke:textboxStroke,fill:textboxFill})})]})},Vertex3=({text="",textHeight=10,textPadding=4,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],cornerRadius=3,icon={},subText={text:""},showLabel=!0,noLabelRadius=5,expansionIcon,scale=1})=>{icon={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...icon},subText={text:"",fill:"white",textFill:"#555555",...subText},expansionIcon=expansionIcon?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...expansionIcon}:void 0;let fullAnnotationWidth=0;const annoOffsetY=0,labelWidth=T$1(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1).width,[text,textFontFamily,textHeight]);let labelShapeWidth=0;text!==""&&(labelShapeWidth=labelWidth+textPadding*2+textboxStrokeWidth*2),fullAnnotationWidth+=labelShapeWidth+annotationGutter;const textOffsetX=fullAnnotationWidth-labelShapeWidth/2,textShapeHeight=textHeight+textPadding*2+textboxStrokeWidth*2,annotationArr=[];annotations.forEach((anno,idx)=>{const annoText=anno.imageChar,annoShapeWidth=textShapeHeight;fullAnnotationWidth+=annoShapeWidth+annotationGutter;const annoOffsetX=fullAnnotationWidth-annoShapeWidth/2;annotationArr.push(u$1("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(anno),transform:`translate(${annoOffsetX} ${annoOffsetY})`,children:u$1(Icon,{...anno,shape:"square",height:textShapeHeight,imageChar:annoText,imageFontFamily:anno.imageFontFamily,cornerRadius,strokeWidth:0})},idx))}),annotations.length>0&&(fullAnnotationWidth+=annotationGutter*(annotations.length-1));const textElement=u$1("g",{"data-click":"text",transform:`translate(${textOffsetX} ${annoOffsetY})`,children:!showLabel||text===""?u$1("circle",{r:noLabelRadius,stroke:textboxStroke,fill:textFill}):u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily,cornerRadius})}),iconHeight=icon.height||20,iconStrokeWidth=icon.strokeWidth||0,iconOffsetX=0;let iconOffsetY=0;const subTextOffsetX=0;let subTextOffsetY=textShapeHeight+annotationGutter*2;text!==""||annotationArr.length>0?iconOffsetY=-(iconHeight/2)-iconStrokeWidth-textShapeHeight/2-annotationGutter*2:subText.text!==""&&(subTextOffsetY=iconHeight/2+iconStrokeWidth+annotationGutter*2);const subtextElement=subText.text===""?null:u$1("g",{"data-click":"subtext",transform:`translate(${subTextOffsetX} ${subTextOffsetY})`,children:u$1(TextBox,{fill:subText.fill||"#FFFFFF",textFill:subText.textFill||textFill,...subText,height:textHeight,padding:textPadding,strokeWidth:0,stroke:textboxStroke,fontFamily:textFontFamily,cornerRadius})});return u$1("g",{transform:`scale(${scale})`,children:[u$1("g",{"data-click":"icon",transform:`translate(${iconOffsetX} ${iconOffsetY})`,children:[u$1(Icon,{...icon}),expansionIcon&&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:u$1(Icon,{...expansionIcon})})]}),u$1("g",{transform:`translate(${-fullAnnotationWidth/2} ${annoOffsetY})`,children:[textElement,annotationArr]}),subtextElement]})},CentroidVertex3=function({id,categoryID="",text="",textHeight=12,textPadding=10,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],cornerRadius,icon={},subText={},expansionIcon,scale=1}){return icon={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...icon},subText={text:"",fill:"transparent",textFill:"#555555",...subText},u$1(Vertex3,{...{id,categoryID,text,textHeight,textPadding,textFill,textboxFill,textboxStroke,textboxStrokeWidth,textFontFamily,annotationGutter,annotations,cornerRadius,icon,subText,expansionIcon,scale},icon,subText})},Vertex4=({categoryID="",text="",textHeight=10,textPadding=4,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],iconAnnotations=[],cornerRadius=3,icon={},subText={},showLabel=!0,noLabelRadius=5,iconBorderWidth=1,iconBorderColor="#333",iconBackgroundColor="#fff",iconFontColor="#000",iconFontSize=20,iconFontFamily="FontAwesome",shapeOffsetX=0,shapeOffsetY=0,iconOffsetX=0,iconOffsetY=0,iconPadding=4,iconText="?",shapeRendering="auto"})=>{icon={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...icon},subText={text:"",fill:"white",textFill:"#555555",...subText};const annoOffsetY=0,labelWidth=T$1(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1).width,[text,textFontFamily,textHeight]);let labelShapeWidth=0;text!==""&&(labelShapeWidth=labelWidth+textPadding*2+textboxStrokeWidth*2);let fullAnnotationWidth=labelShapeWidth+annotationGutter;const textOffsetX=fullAnnotationWidth-labelShapeWidth/2,textShapeHeight=textHeight+annotationGutter*2+textboxStrokeWidth*2,annoWidthArr=annotations.map(anno=>common.Utility.textSize(anno.imageChar,anno.imageFontFamily,anno.height,!1).width),annotationArr=[];let _labelAnnoOffsetX=fullAnnotationWidth;annotations.forEach((anno,i2)=>{const annoText=anno.imageChar,annoTextHeight=anno.height??textShapeHeight;_labelAnnoOffsetX+=annoWidthArr[i2]+annotationGutter;const annoOffsetX=_labelAnnoOffsetX-annoWidthArr[i2]/2;annotationArr.push(u$1("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(anno),transform:`translate(${annoOffsetX} ${annoOffsetY})`,children:u$1(Icon,{...anno,shape:"rectangle",width:annoWidthArr[i2],height:annoTextHeight,imageChar:annoText,imageFontFamily:anno.imageFontFamily,cornerRadius,strokeWidth:0})},i2))}),annotations.length>0&&(fullAnnotationWidth+=annotationGutter*(annotations.length-1));const iconAnnotationArr=[];iconAnnotations.forEach((anno,i2)=>{const x2=anno.shapeOffsetX,y2=anno.shapeOffsetY;iconAnnotationArr.push(u$1("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(anno),transform:`translate(${x2} ${y2})`,children:u$1(Icon,{...anno,shape:anno.shape??"square",imageChar:anno.imageChar,imageFontFamily:anno.imageFontFamily,cornerRadius,stroke:anno.stroke,strokeWidth:anno.strokeWidth})},i2))});const textElement=u$1("g",{"data-click":"text",transform:`translate(${textOffsetX} ${annoOffsetY})`,children:!showLabel||text===""?u$1("circle",{r:noLabelRadius,stroke:textboxStroke,fill:textFill}):u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily,cornerRadius})}),subTextOffsetX=0,subTextOffsetY=textShapeHeight+annotationGutter*2,subtextElement=subText.text===""?null:u$1("g",{"data-click":"subtext",transform:`translate(${subTextOffsetX} ${subTextOffsetY})`,children:u$1(TextBox,{fill:subText.fill||"#FFFFFF",textFill:subText.textFill||textFill,...subText,height:textHeight,padding:textPadding,strokeWidth:0,stroke:textboxStroke,fontFamily:textFontFamily,cornerRadius})});return u$1("g",{children:[u$1("g",{"data-click":"icon",transform:`translate(${shapeOffsetX} ${shapeOffsetY})`,children:[u$1(Icon,{...icon,strokeWidth:iconBorderWidth,shape:"circle",height:iconFontSize,fill:iconBackgroundColor,stroke:iconBorderColor,imageFontFamily:iconFontFamily,imageChar:iconText,imageCharFill:iconFontColor,padding:iconPadding,xOffset:iconOffsetX,yOffset:iconOffsetY,cornerRadius,shapeRendering}),iconAnnotationArr]}),u$1("g",{transform:`translate(${-fullAnnotationWidth/2} ${annoOffsetY})`,children:[textElement,annotationArr]}),subtextElement]})},CentroidVertex4=function({id,categoryID="",text="",textHeight=12,textPadding=10,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],iconAnnotations=[],cornerRadius,icon={},subText={},showLabel=!0,noLabelRadius=5,iconBorderWidth=1,iconBorderColor="#333",iconBackgroundColor="#fff",iconFontColor="#000",iconFontSize=20,iconFontFamily="FontAwesome",shapeOffsetX=0,shapeOffsetY=0,iconOffsetX=0,iconOffsetY=0,iconPadding=4,iconText="?",shapeRendering="auto"}){return icon={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...icon},subText={text:"",fill:"transparent",textFill:"#555555",...subText},u$1(Vertex4,{...{id,categoryID,text,textHeight,textPadding,textFill,textboxFill,textboxStroke,textboxStrokeWidth,textFontFamily,annotationGutter,annotations,iconAnnotations,cornerRadius,icon,subText,showLabel,noLabelRadius,iconBorderWidth,iconBorderColor,iconBackgroundColor,iconFontColor,iconFontSize,iconFontFamily,shapeOffsetX,shapeOffsetY,iconOffsetX,iconOffsetY,iconPadding,iconText,shapeRendering},icon,subText})},Subgraph=({text,width=100,height=100,fill="transparent",stroke="black",fontHeight=12,fontFamily})=>{const tSize=common.Utility.textSize(text,fontFamily,fontHeight,!1);return u$1(k$1,{children:[u$1(Rectangle,{width,height,fill,stroke}),u$1("g",{transform:`translate(${(-width+tSize.width)/2+4} ${(-height+tSize.height)/2+4})`,children:u$1(Text,{height:fontHeight,text,fontFamily})})]})};exports2.Annotations=Annotations,exports2.BUILD_VERSION=BUILD_VERSION,exports2.CentroidVertex3=CentroidVertex3,exports2.CentroidVertex4=CentroidVertex4,exports2.Circle=Circle,exports2.Edge=Edge,exports2.HTMLAdapter=HTMLAdapter,exports2.Icon=Icon,exports2.IconLabelledRect=IconLabelledRect,exports2.Icons=Icons,exports2.Image=Image,exports2.ImageChar=ImageChar,exports2.LabelledRect=LabelledRect,exports2.PKG_NAME=PKG_NAME,exports2.PKG_VERSION=PKG_VERSION,exports2.React=preactShim,exports2.Rectangle=Rectangle,exports2.SVGAdapter=SVGAdapter,exports2.Shape=Shape,exports2.Span=Span,exports2.Square=Square,exports2.Subgraph=Subgraph,exports2.Text=Text,exports2.TextBox=TextBox,exports2.TextLine=TextLine,exports2.Vertex=Vertex,exports2.Vertex2=Vertex2,exports2.Vertex3=Vertex3,exports2.Vertex4=Vertex4,exports2.render=render,exports2.svgRender=svgRender,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/react"]={},t["@hpcc-js/common"])}(this,function(t,e){"use strict";var n=Object.defineProperty,i=(t,e)=>n(t,"name",{value:e,configurable:!0});var o,r,l,a,_,s,c,u,h,f,d,p={},g=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,x=Array.isArray;function y(t,e){for(var n in e)t[n]=e[n];return t}function v(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function k(t,e,n){var i,r,l,a={};for(l in e)"key"==l?i=e[l]:"ref"==l?r=e[l]:a[l]=e[l];if(arguments.length>2&&(a.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===a[l]&&(a[l]=t.defaultProps[l]);return F(t,a,i,r,null)}function F(t,e,n,i,o){var a={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++l:o,__i:-1,__u:0};return null==o&&null!=r.vnode&&r.vnode(a),a}function b(t){return t.children}function C(t,e){this.props=t,this.context=e}function w(t,e){if(null==e)return t.__?w(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?w(t):null}function S(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return S(t)}}function $(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!R.__r++||_!=r.debounceRendering)&&((_=r.debounceRendering)||s)(R)}function R(){for(var t,e,n,i,o,l,_,s=1;a.length;)a.length>s&&a.sort(c),t=a.shift(),s=a.length,t.__d&&(n=void 0,o=(i=(e=t).__v).__e,l=[],_=[],e.__P&&((n=y({},i)).__v=i.__v+1,r.vnode&&r.vnode(n),N(e.__P,n,i,e.__n,e.__P.namespaceURI,32&i.__u?[o]:null,l,null==o?w(i):o,!!(32&i.__u),_),n.__v=i.__v,n.__.__k[n.__i]=n,D(l,n,_),n.__e!=o&&S(n)));R.__r=0}function W(t,e,n,i,o,r,l,a,_,s,c){var u,h,f,d,m,x,y=i&&i.__k||g,v=e.length;for(_=P(n,e,y,_,v),u=0;u<v;u++)null!=(f=n.__k[u])&&(h=-1==f.__i?p:y[f.__i]||p,f.__i=u,x=N(t,f,h,o,r,l,a,_,s,c),d=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&L(h.ref,null,f),c.push(f.ref,f.__c||d,f)),null==m&&null!=d&&(m=d),4&f.__u||h.__k===f.__k?_=H(f,_,t):"function"==typeof f.type&&void 0!==x?_=x:d&&(_=d.nextSibling),f.__u&=-7);return n.__e=m,_}function P(t,e,n,i,o){var r,l,a,_,s,c=n.length,u=c,h=0;for(t.__k=new Array(o),r=0;r<o;r++)null!=(l=e[r])&&"boolean"!=typeof l&&"function"!=typeof l?(_=r+h,(l=t.__k[r]="string"==typeof l||"number"==typeof l||"bigint"==typeof l||l.constructor==String?F(null,l,null,null,null):x(l)?F(b,{children:l},null,null,null):null==l.constructor&&l.__b>0?F(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l).__=t,l.__b=t.__b+1,a=null,-1!=(s=l.__i=A(l,n,_,u))&&(u--,(a=n[s])&&(a.__u|=2)),null==a||null==a.__v?(-1==s&&(o>c?h--:o<c&&h++),"function"!=typeof l.type&&(l.__u|=4)):s!=_&&(s==_-1?h--:s==_+1?h++:(s>_?h--:h++,l.__u|=4))):t.__k[r]=null;if(u)for(r=0;r<c;r++)null!=(a=n[r])&&!(2&a.__u)&&(a.__e==i&&(i=w(a)),z(a,a));return i}function H(t,e,n){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=H(i[o],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=w(t)),n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function O(t,e){return e=e||[],null==t||"boolean"==typeof t||(x(t)?t.some(function(t){O(t,e)}):e.push(t)),e}function A(t,e,n,i){var o,r,l=t.key,a=t.type,_=e[n];if(null===_&&null==t.key||_&&l==_.key&&a==_.type&&!(2&_.__u))return n;if(i>(null==_||2&_.__u?0:1))for(o=n-1,r=n+1;o>=0||r<e.length;){if(o>=0){if((_=e[o])&&!(2&_.__u)&&l==_.key&&a==_.type)return o;o--}if(r<e.length){if((_=e[r])&&!(2&_.__u)&&l==_.key&&a==_.type)return r;r++}}return-1}function T(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||m.test(e)?n:n+"px"}function E(t,e,n,i,o){var r,l;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||T(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||T(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])r=e!=(e=e.replace(u,"$1")),l=e.toLowerCase(),e=l in t||"onFocusOut"==e||"onFocusIn"==e?l.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=h,t.addEventListener(e,r?d:f,r)):t.removeEventListener(e,r?d:f,r);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(a){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function U(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=h++;else if(e.t<n.u)return;return n(r.event?r.event(e):e)}}}function N(t,e,n,i,o,l,a,_,s,c){var u,h,f,d,p,g,m,k,F,w,S,$,R,P,H,O,A,T=e.type;if(null!=e.constructor)return null;128&n.__u&&(s=!!(32&n.__u),l=[_=e.__e=n.__e]),(u=r.__b)&&u(e);t:if("function"==typeof T)try{if(k=e.props,F="prototype"in T&&T.prototype.render,w=(u=T.contextType)&&i[u.__c],S=u?w?w.props.value:u.__:i,n.__c?m=(h=e.__c=n.__c).__=h.__E:(F?e.__c=h=new T(k,S):(e.__c=h=new C(k,S),h.constructor=T,h.render=M),w&&w.sub(h),h.props=k,h.state||(h.state={}),h.context=S,h.__n=i,f=h.__d=!0,h.__h=[],h._sb=[]),F&&null==h.__s&&(h.__s=h.state),F&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=y({},h.__s)),y(h.__s,T.getDerivedStateFromProps(k,h.__s))),d=h.props,p=h.state,h.__v=e,f)F&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),F&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(F&&null==T.getDerivedStateFromProps&&k!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,S),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,S)||e.__v==n.__v){for(e.__v!=n.__v&&(h.props=k,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(t){t&&(t.__=e)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&a.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,S),F&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,p,g)})}if(h.context=S,h.props=k,h.__P=t,h.__e=!1,R=r.__r,P=0,F){for(h.state=h.__s,h.__d=!1,R&&R(e),u=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,R&&R(e),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(i=y(y({},i),h.getChildContext())),F&&!f&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(d,p)),O=u,null!=u&&u.type===b&&null==u.key&&(O=I(u.props.children)),_=W(t,x(O)?O:[O],e,n,i,o,l,a,_,s,c),h.base=e.__e,e.__u&=-161,h.__h.length&&a.push(h),m&&(h.__E=h.__=null)}catch(E){if(e.__v=null,s||null!=l)if(E.then){for(e.__u|=s?160:128;_&&8==_.nodeType&&_.nextSibling;)_=_.nextSibling;l[l.indexOf(_)]=null,e.__e=_}else for(A=l.length;A--;)v(l[A]);else e.__e=n.__e,e.__k=n.__k;r.__e(E,e,n)}else null==l&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):_=e.__e=V(n.__e,e,n,i,o,l,a,s,c);return(u=r.diffed)&&u(e),128&e.__u?void 0:_}function D(t,e,n){for(var i=0;i<n.length;i++)L(n[i],n[++i],n[++i]);r.__c&&r.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(n){r.__e(n,e.__v)}})}function I(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:x(t)?t.map(I):y({},t)}function V(t,e,n,i,l,a,_,s,c){var u,h,f,d,g,m,y,k=n.props,F=e.props,b=e.type;if("svg"==b?l="http://www.w3.org/2000/svg":"math"==b?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),null!=a)for(u=0;u<a.length;u++)if((g=a[u])&&"setAttribute"in g==!!b&&(b?g.localName==b:3==g.nodeType)){t=g,a[u]=null;break}if(null==t){if(null==b)return document.createTextNode(F);t=document.createElementNS(l,b,F.is&&F),s&&(r.__m&&r.__m(e,a),s=!1),a=null}if(null==b)k===F||s&&t.data==F||(t.data=F);else{if(a=a&&o.call(t.childNodes),k=n.props||p,!s&&null!=a)for(k={},u=0;u<t.attributes.length;u++)k[(g=t.attributes[u]).name]=g.value;for(u in k)if(g=k[u],"children"==u);else if("dangerouslySetInnerHTML"==u)f=g;else if(!(u in F)){if("value"==u&&"defaultValue"in F||"checked"==u&&"defaultChecked"in F)continue;E(t,u,null,g,l)}for(u in F)g=F[u],"children"==u?d=g:"dangerouslySetInnerHTML"==u?h=g:"value"==u?m=g:"checked"==u?y=g:s&&"function"!=typeof g||k[u]===g||E(t,u,g,k[u],l);if(h)s||f&&(h.__html==f.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(f&&(t.innerHTML=""),W("template"==e.type?t.content:t,x(d)?d:[d],e,n,i,"foreignObject"==b?"http://www.w3.org/1999/xhtml":l,a,_,a?a[0]:n.__k&&w(n,0),s,c),null!=a)for(u=a.length;u--;)v(a[u]);s||(u="value","progress"==b&&null==m?t.removeAttribute("value"):null!=m&&(m!==t[u]||"progress"==b&&!m||"option"==b&&m!=k[u])&&E(t,u,m,k[u],l),u="checked",null!=y&&y!=t[u]&&E(t,u,y,k[u],l))}return t}function L(t,e,n){try{if("function"==typeof t){var i="function"==typeof t.__u;i&&t.__u(),i&&null==e||(t.__u=t(e))}else t.current=e}catch(o){r.__e(o,n)}}function z(t,e,n){var i,o;if(r.unmount&&r.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||L(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(l){r.__e(l,e)}i.base=i.__P=null}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&z(i[o],e,n||"function"!=typeof t.type);n||v(t.__e),t.__c=t.__=t.__e=void 0}function M(t,e,n){return this.constructor(t,n)}function B(t,e,n){var i,l,a,_;e==document&&(e=document.documentElement),r.__&&r.__(t,e),l=(i="function"==typeof n)?null:n&&n.__k||e.__k,a=[],_=[],N(e,t=(!i&&n||e).__k=k(b,null,[t]),l||p,p,e.namespaceURI,!i&&n?[n]:l?null:e.firstChild?o.call(e.childNodes):null,a,!i&&n?n:l?l.__e:e.firstChild,i,_),D(a,t,_)}i(y,"d$1"),i(v,"g$1"),i(k,"_$1"),i(F,"m$1"),i(b,"k$1"),i(C,"x"),i(w,"S"),i(S,"C$1"),i($,"M"),i(R,"$"),i(W,"I"),i(P,"P$1"),i(H,"A"),i(O,"H$1"),i(A,"L"),i(T,"T$2"),i(E,"j$2"),i(U,"F$1"),i(N,"O"),i(D,"z$1"),i(I,"N$1"),i(V,"V$1"),i(L,"q$2"),i(z,"B$2"),i(M,"D$1"),i(B,"E$1"),o=g.slice,r={__e:i(function(t,e,n,i){for(var o,r,l;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),l=o.__d),l)return o.__E=o}catch(a){t=a}throw t},"__e")},l=0,C.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=y({},this.state),"function"==typeof t&&(t=t(y({},n),this.props)),t&&y(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),$(this))},C.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),$(this))},C.prototype.render=b,a=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=i(function(t,e){return t.__v.__b-e.__v.__b},"e$1"),R.__r=0,u=/(PointerCapture)$|Capture$/i,h=0,f=U(!1),d=U(!0);var j=0;function q(t,e,n,i,o,l){e||(e={});var a,_,s=e;if("ref"in s)for(_ in s={},e)"ref"==_?a=e[_]:s[_]=e[_];var c={type:t,props:s,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--j,__i:-1,__u:0,__source:o,__self:l};if("function"==typeof t&&(a=t.defaultProps))for(_ in a)void 0===s[_]&&(s[_]=a[_]);return r.vnode&&r.vnode(c),c}i(q,"u$1");var G,X,Y,J,K=0,Z=[],Q=r,tt=Q.__b,et=Q.__r,nt=Q.diffed,it=Q.__c,ot=Q.unmount,rt=Q.__;function lt(t,e){Q.__h&&Q.__h(X,t,K||e),K=0;var n=X.__H||(X.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function at(t){return K=1,_t(yt,t)}function _t(t,e,n){var o=lt(G++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):yt(void 0,e),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.__f)){var r=i(function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter(function(t){return!!t.__c});if(i.every(function(t){return!t.__N}))return!l||l.call(this,t,e,n);var r=o.__c.props!==t;return i.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(r=!0)}}),l&&l.call(this,t,e,n)||r},"f");X.__f=!0;var l=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(t,e,n){if(this.__e){var i=l;l=void 0,r(t,e,n),l=i}a&&a.call(this,t,e,n)},X.shouldComponentUpdate=r}return o.__N||o.__}function st(t,e){var n=lt(G++,3);!Q.__s&&xt(n.__H,e)&&(n.__=t,n.u=e,X.__H.__h.push(n))}function ct(t,e){var n=lt(G++,4);!Q.__s&&xt(n.__H,e)&&(n.__=t,n.u=e,X.__h.push(n))}function ut(t,e){var n=lt(G++,7);return xt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ht(t,e){return K=8,ut(function(){return t},e)}function ft(){for(var t;t=Z.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(gt),t.__H.__h.forEach(mt),t.__H.__h=[]}catch(e){t.__H.__h=[],Q.__e(e,t.__v)}}i(lt,"p"),i(at,"d"),i(_t,"h"),i(st,"y"),i(ct,"_"),i(ut,"T$1"),i(ht,"q$1"),i(ft,"j$1"),Q.__b=function(t){X=null,tt&&tt(t)},Q.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rt&&rt(t,e)},Q.__r=function(t){et&&et(t),G=0;var e=(X=t.__c).__H;e&&(Y===X?(e.__h=[],X.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(gt),e.__h.forEach(mt),e.__h=[],G=0)),Y=X},Q.diffed=function(t){nt&&nt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Z.push(e)&&J===Q.requestAnimationFrame||((J=Q.requestAnimationFrame)||pt)(ft)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),Y=X=null},Q.__c=function(t,e){e.some(function(t){try{t.__h.forEach(gt),t.__h=t.__h.filter(function(t){return!t.__||mt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],Q.__e(n,t.__v)}}),it&&it(t,e)},Q.unmount=function(t){ot&&ot(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{gt(t)}catch(n){e=n}}),n.__H=void 0,e&&Q.__e(e,n.__v))};var dt="function"==typeof requestAnimationFrame;function pt(t){var e,n=i(function(){clearTimeout(o),dt&&cancelAnimationFrame(e),setTimeout(t)},"r"),o=setTimeout(n,35);dt&&(e=requestAnimationFrame(n))}function gt(t){var e=X,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),X=e}function mt(t){var e=X;t.__c=t.__(),X=e}function xt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function yt(t,e){return"function"==typeof e?e(t):e}function vt(t,e){for(var n in e)t[n]=e[n];return t}function kt(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function Ft(t,e){this.props=t,this.context=e}i(pt,"w"),i(gt,"z"),i(mt,"B$1"),i(xt,"C"),i(yt,"D"),i(vt,"g"),i(kt,"E"),i(Ft,"N"),(Ft.prototype=new C).isPureReactComponent=!0,Ft.prototype.shouldComponentUpdate=function(t,e){return kt(this.props,t)||kt(this.state,e)};var bt=r.__b;r.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),bt&&bt(t)};var Ct=r.__e;r.__e=function(t,e,n,i){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Ct(t,e,n,i)};var wt=r.unmount;function St(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=vt({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return St(t,e,n)})),t}function $t(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return $t(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Rt(){this.__u=0,this.o=null,this.__b=null}function Wt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Pt(){this.i=null,this.l=null}i(St,"V"),i($t,"W"),i(Rt,"P"),i(Wt,"j"),i(Pt,"B"),r.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),wt&&wt(t)},(Rt.prototype=new C).__c=function(t,e){var n=e.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=Wt(o.__v),l=!1,a=i(function(){l||(l=!0,n.__R=null,r?r(_):_())},"i");n.__R=a;var _=i(function(){if(! --o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=$t(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}},"l");o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(a,a)},Rt.prototype.componentWillUnmount=function(){this.o=[]},Rt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=St(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&k(b,null,t.fallback);return o&&(o.__u&=-33),[k(b,null,e.__a?null:t.children),o]};var Ht=i(function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}},"H");(Pt.prototype=new C).__a=function(t){var e=this,n=Wt(e.__v),o=e.l.get(t);return o[0]++,function(r){var l=i(function(){e.props.revealOrder?(o.push(r),Ht(e,t,o)):r()},"o");n?n(l):l()}},Pt.prototype.render=function(t){this.i=null,this.l=new Map;var e=O(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Pt.prototype.componentDidUpdate=Pt.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ht(t,n,e)})};var Ot="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,At=/^(?: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]/,Tt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Et=/[A-Z0-9]/g,Ut="undefined"!=typeof document,Nt=i(function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)},"X");C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(C.prototype,t,{configurable:!0,get:i(function(){return this["UNSAFE_"+t]},"get"),set:i(function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})},"set")})});var Dt=r.event;function It(){}function Vt(){return this.cancelBubble}function Lt(){return this.defaultPrevented}i(It,"rn"),i(Vt,"un"),i(Lt,"on"),r.event=function(t){return Dt&&(t=Dt(t)),t.persist=It,t.isPropagationStopped=Vt,t.isDefaultPrevented=Lt,t.nativeEvent=t};var zt={enumerable:!1,configurable:!0,get:i(function(){return this.class},"get")},Mt=r.vnode;r.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={},o=-1===n.indexOf("-");for(var r in e){var l=e[r];if(!("value"===r&&"defaultValue"in e&&null==l||Ut&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var a=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===l?l="":"translate"===a&&"no"===l?l=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?r="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Nt(e.type)?"onfocus"===a?r="onfocusin":"onblur"===a?r="onfocusout":Tt.test(r)&&(r=a):a=r="oninput":o&&At.test(r)?r=r.replace(Et,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===a&&i[r=a]&&(r="oninputCapture"),i[r]=l}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=O(e.children).forEach(function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)})),"select"==n&&null!=i.defaultValue&&(i.value=O(e.children).forEach(function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value})),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",zt)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Ot,Mt&&Mt(t)};var Bt=r.__r;r.__r=function(t){Bt&&Bt(t),t.__c};var jt=r.diffed;function qt(t){return!!t.__k&&(B(null,t),!0)}r.diffed=function(t){jt&&jt(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)},i(qt,"bn");const Gt=Object.freeze(Object.defineProperty({__proto__:null,Component:C,Fragment:b,createElement:k,h:k,render:B,unmountComponentAtNode:qt,useCallback:ht,useEffect:st,useLayoutEffect:ct,useMemo:ut,useReducer:_t,useState:at},Symbol.toStringTag,{value:"Module"})),Xt=i(({href:t,x:e,y:n=0,height:i=12})=>q("image",{xlinkHref:t,x:e-i/2,y:n-i/2,width:i,height:i}),"Image"),Yt=i(({x:t,y:n=0,height:i=12,fill:o,stroke:r,fontFamily:l="FontAwesome",char:a="",fontWeight:_})=>{const s=ut(()=>"FontAwesome"===l?e.Utility.faChar(a):a,[a,l]);return q("text",{x:t,y:n,fill:o,stroke:r,fontFamily:l,fontSize:`${i}px`,fontWeight:_,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:s})},"ImageChar"),Jt=i(({radius:t=32,fill:e="navy",stroke:n=e,strokeWidth:i=1,shapeRendering:o})=>q("circle",{r:t,fill:e,stroke:n,strokeWidth:i,shapeRendering:o}),"Circle"),Kt=i(({radius:t=30,cornerRadius:e=0,fill:n="white",stroke:i,strokeWidth:o=1,shapeRendering:r})=>q("rect",{x:-t,y:-t,rx:e,ry:e,width:2*t,height:2*t,fill:n,stroke:i||n,strokeWidth:o,shapeRendering:r}),"Square"),Zt=i(({width:t=30,height:e=30,cornerRadius:n=0,fill:i="white",stroke:o="black",strokeWidth:r=1,shapeRendering:l})=>q("rect",{x:-t/2,y:-e/2,rx:n,ry:n,width:t,height:e,fill:i,stroke:o||i,strokeWidth:r,shapeRendering:l}),"Rectangle"),Qt=i(({shape:t="circle",height:e=128,width:n,fill:i,stroke:o,strokeWidth:r=1,shapeRendering:l,cornerRadius:a})=>{switch(t){case"square":return q(Kt,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:a});case"rectangle":return q(Zt,{width:n??e,height:e,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:a});default:return q(Jt,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l})}},"Shape"),te=i(({shape:t="circle",width:n,height:i=32,fill:o,stroke:r,strokeWidth:l=0,imageUrl:a="",imageFontFamily:_="FontAwesome",imageChar:s="",imageCharFill:c=e.Palette.textColor(o),padding:u=i/5,xOffset:h=0,yOffset:f=0,cornerRadius:d,shapeRendering:p})=>q(b,{children:[q(Qt,{shape:t,width:n,height:i,fill:o,stroke:r,strokeWidth:l,shapeRendering:p,cornerRadius:d}),a?q(Xt,{href:a,x:h,y:f,height:i-u}):q(Yt,{x:h,y:f,height:i-u,fontFamily:_,char:s,fill:c,fontWeight:400})]}),"Icon"),ee=i(({icons:t=[]})=>q(b,{children:t.map(t=>q("g",{id:t.id,children:q(te,{...t})},t.id))}),"Icons"),ne=i(({text:t,height:e=12,anchor:n="middle",baseline:i="middle",fontFamily:o="Verdana",fill:r="black"})=>q("text",{"font-family":o,"font-size":`${e}px`,"text-anchor":n,"dominant-baseline":i,fill:r,children:t}),"TextLine"),ie=i(({text:t,height:n=12,fontFamily:i="Verdana",fill:o="black",onSizeUpdate:r})=>{const[l,a]=at(0),[_,s]=at(0);st(()=>{r&&r({width:l,height:_})},[l,_,r]);const c=ut(()=>t.split("\n"),[t]);ct(()=>{const t=e.Utility.textSize(c,i,n);a(t.width),s(t.height)},[i,n,c]);return q("g",{children:ut(()=>{const t=-_/2+n/2;return c.map((e,r)=>q("g",{transform:`translate(0 ${t+r*(n+2)})`,children:q(ne,{text:e,height:n,fontFamily:i,fill:o})},`key-${r}`))},[c,_,n,i,o])})},"Text"),oe=i(({text:t,height:e=12,fontFamily:n="Verdana",padding:i=4,fill:o="whitesmoke",stroke:r="lightgray",textFill:l="black",strokeWidth:a=1,cornerRadius:_=0,onSizeUpdate:s})=>{const[c,u]=at(0),[h,f]=at(0);st(()=>{s&&s({width:c,height:h})},[c,h,s]);const d=ht(t=>{u(t.width),f(t.height)},[]),p=c+2*i+a,g=h+2*i+a,m=Math.floor(e/10);return q(b,{children:[q(Zt,{width:p,height:g,fill:o,stroke:r,strokeWidth:a,cornerRadius:_}),q("g",{transform:`translate(0 ${m})`,children:q(ie,{text:t,fontFamily:n,height:e,fill:l,onSizeUpdate:d})})]})},"TextBox"),re=i(({text:t,height:n=12,width:i=12,fontFamily:o="Verdana",fontSize:r=10,padding:l=3,fill:a="whitesmoke",stroke:_="lightgray",textFill:s="black",strokeWidth:c=1,cornerRadius:u=0,onSizeUpdate:h})=>{const[f,d]=at(i),[p,g]=at(n);return ct(()=>{const n=e.Utility.textSize(t,o,r);d(n.width+2*l),g(n.height+2*l)},[t,o,r,l]),ct(()=>{h&&h({width:f,height:p})},[f,p,l,h]),q(b,{children:[q(Zt,{width:i,height:n,fill:a,stroke:_,strokeWidth:c,cornerRadius:u}),q("g",{transform:`translate(${-i/2+l} ${-n/2+l})`,children:q(ne,{text:t,fontFamily:o,height:r,fill:s,anchor:"start",baseline:"hanging"})})]})},"LabelledRect"),le=i(({icon:t,iconFontFamily:e,text:n,height:i=12,width:o=12,fontFamily:r="Verdana",fontSize:l=10,padding:a=3,fill:_="whitesmoke",stroke:s="lightgray",textFill:c="black",strokeWidth:u=1,cornerRadius:h=0})=>q(b,{children:[q(Zt,{width:o,height:i,fill:_,stroke:s,strokeWidth:u,cornerRadius:h}),q("g",{transform:`translate(${-o/2+a} ${-i/2+a})`,children:q(te,{shape:"square",imageFontFamily:e,imageChar:t,height:i,fill:_,imageCharFill:c})}),q("g",{transform:`translate(${-o/2+2*a+i} ${-i/2+a})`,children:q(ne,{text:n,fontFamily:r,height:l,fill:c,anchor:"start",baseline:"hanging"})})]}),"IconLabelledRect"),ae=i(({label:t,labelPos:e,labelFill:n="black",labelHeight:i=12,path:o,stroke:r,strokeWidth:l,strokeDasharray:a})=>q(b,{children:[q("path",{d:o,stroke:r,style:{strokeWidth:l,strokeDasharray:a}}),t&&e&&2===e.length?q("g",{transform:`translate(${e[0]} ${e[1]})`,children:q(ie,{text:t,fill:n,height:i})}):void 0]}),"Edge");function _e(t,e,n,i){B(k(t,e),n,i)}function se(t,e,n,i){B(k("svg",null,k(t,e)),n,i)}i(_e,"render"),i(se,"svgRender");const ce=class _HTMLAdapter extends e.HTMLWidget{constructor(t){super(),this._component=t}props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),_e(this._component,this._props,t)}};i(ce,"HTMLAdapter");let ue=ce;ue.prototype._class+=" react_HTMLAdapter",ue.prototype.publish("props",{},"object","Properties");const he=class _SVGAdapter extends e.SVGWidget{constructor(t){super(),this._component=t}props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),_e(this._component,this._props,t)}};i(he,"SVGAdapter");let fe=he;fe.prototype._class+=" react_SVGAdapter",fe.prototype.publish("props",{},"object","Properties");const de=i(({text:t})=>q("span",{children:t}),"Span"),pe=i(({x:t,y:e,annotationIDs:n=[],stepSize:i=-16})=>q(b,{children:n.map((n,o)=>q("g",{transform:`translate(${t+o*i} ${e})`,children:q("use",{xlinkHref:"#"+n})},n))}),"Annotations"),ge=i(({categoryID:t="",text:e="",textHeight:n=12,textPadding:i=4,icon:o={},annotationsHeight:r=12,annotationIDs:l=[],textFill:a,textboxFill:_,textboxStroke:s,textFontFamily:c,onSizeUpdate:u,showLabel:h=!0,scale:f=1})=>{o={imageChar:"fa-question",height:32,fill:"transparent",...o};const[d,p]=at(0),[g,m]=at(0);st(()=>{u&&u({width:0,height:0})},[d,g,u]);let x=d;x+=4;let y=-(2*o.height/6+n+8)/2;const v=o.height/3+g/2+i;let k=o.height/3+g+i+r/3;h||(y+=(n+8)/2,k-=g+i);const F=ht(t=>{p(t.width),m(t.height)},[]),b=h?q("g",{transform:`translate(0 ${v})`,children:q(oe,{text:e,height:n,padding:i,onSizeUpdate:F,textFill:a,fill:_,stroke:s,fontFamily:c})}):void 0;return q("g",t?{transform:`translate(0 ${y}) scale(${f})`,children:[q("use",{xlinkHref:"#"+t}),b,q(pe,{x:x/2,y:k,annotationIDs:l})]}:{transform:`translate(0 ${y}) scale(${f})`,children:[q(te,{...o}),b]})},"Vertex"),me=i(({categoryID:t="",text:n="",textHeight:i=12,textPadding:o=4,icon:r={},textFill:l="black",textboxFill:a="white",textboxStroke:_="black",textFontFamily:s,annotationsHeight:c=12,annotationIDs:u=[]})=>{r={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...r};const h=i+2*o,{width:f}=ut(()=>e.Utility.textSize(n,s,i,!1),[n,s,i]),d=c,p=h/2,g=-(2*r.height/6+i+8)/2,m=-r.height/2,x=Math.ceil(f/2+o),y=p-r.height/2,v=d/2,k=p;return t?q("g",{transform:`translate(0 ${g})`,children:[q("g",{transform:`translate(${m} 0)`,children:q("use",{xlinkHref:"#"+t})}),q("g",{transform:`translate(${x} ${y})`,children:q(oe,{text:n,height:i,padding:o,strokeWidth:1,stroke:_,fill:a,textFill:l,fontFamily:s})}),q(pe,{x:v,y:k,annotationIDs:u,stepSize:d})]}):q(b,{children:[q("g",{transform:`translate(${m} 0)scale(1.0002)`,children:q(te,{...r,shape:"square"})}),q("g",{transform:`translate(${x} ${y})scale(1.0002)`,children:q(oe,{text:n,height:i,padding:o,stroke:_,fill:a})})]})},"Vertex2"),xe=i(({text:t="",textHeight:n=10,textPadding:i=4,textFill:o="#287EC4",textboxFill:r="white",textboxStroke:l="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:_="Verdana",annotationGutter:s=2,annotations:c=[],cornerRadius:u=3,icon:h={},subText:f={text:""},showLabel:d=!0,noLabelRadius:p=5,expansionIcon:g,scale:m=1})=>{h={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...h},f={text:"",fill:"white",textFill:"#555555",...f},g=g?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...g}:void 0;let x=0;const y=ut(()=>e.Utility.textSize(t,_,n,!1).width,[t,_,n]);let v=0;""!==t&&(v=y+2*i+2*a),x+=v+s;const k=x-v/2,F=n+2*i+2*a,b=[];c.forEach((t,e)=>{const n=t.imageChar;x+=F+s;const i=x-F/2;b.push(q("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${i} 0)`,children:q(te,{...t,shape:"square",height:F,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:u,strokeWidth:0})},e))}),c.length>0&&(x+=s*(c.length-1));const C=q("g",{"data-click":"text",transform:`translate(${k} 0)`,children:d&&""!==t?q(oe,{text:t,height:n,padding:i,strokeWidth:a,stroke:l,fill:r,textFill:o,fontFamily:_,cornerRadius:u}):q("circle",{r:p,stroke:l,fill:o})}),w=h.height||20,S=h.strokeWidth||0;let $=0;let R=F+2*s;""!==t||b.length>0?$=-w/2-S-F/2-2*s:""!==f.text&&(R=w/2+S+2*s);const W=""===f.text?null:q("g",{"data-click":"subtext",transform:`translate(0 ${R})`,children:q(oe,{fill:f.fill||"#FFFFFF",textFill:f.textFill||o,...f,height:n,padding:i,strokeWidth:0,stroke:l,fontFamily:_,cornerRadius:u})});return q("g",{transform:`scale(${m})`,children:[q("g",{"data-click":"icon",transform:`translate(0 ${$})`,children:[q(te,{...h}),g&&q("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(g),transform:`translate(${(h.height+S)/2-g.height/2} ${-(h.height+S)/2+g.height/2})`,children:q(te,{...g})})]}),q("g",{transform:`translate(${-x/2} 0)`,children:[C,b]}),W]})},"Vertex3"),ye=i(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:a="#CCCCCC",textboxStrokeWidth:_=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],cornerRadius:h,icon:f={},subText:d={},expansionIcon:p,scale:g=1}){f={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...f},d={text:"",fill:"transparent",textFill:"#555555",...d};return q(xe,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:a,textboxStrokeWidth:_,textFontFamily:s,annotationGutter:c,annotations:u,cornerRadius:h,icon:f,subText:d,expansionIcon:p,scale:g},icon:f,subText:d})},"CentroidVertex3"),ve=i(({categoryID:t="",text:n="",textHeight:i=10,textPadding:o=4,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:a="#CCCCCC",textboxStrokeWidth:_=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f=3,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"})=>{d={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...d},p={text:"",fill:"white",textFill:"#555555",...p};const H=ut(()=>e.Utility.textSize(n,s,i,!1).width,[n,s,i]);let O=0;""!==n&&(O=H+2*o+2*_);let A=O+c;const T=A-O/2,E=i+2*c+2*_,U=u.map(t=>e.Utility.textSize(t.imageChar,t.imageFontFamily,t.height,!1).width),N=[];let D=A;u.forEach((t,e)=>{const n=t.imageChar,i=t.height??E;D+=U[e]+c;const o=D-U[e]/2;N.push(q("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${o} 0)`,children:q(te,{...t,shape:"rectangle",width:U[e],height:i,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:f,strokeWidth:0})},e))}),u.length>0&&(A+=c*(u.length-1));const I=[];h.forEach((t,e)=>{const n=t.shapeOffsetX,i=t.shapeOffsetY;I.push(q("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(t),transform:`translate(${n} ${i})`,children:q(te,{...t,shape:t.shape??"square",imageChar:t.imageChar,imageFontFamily:t.imageFontFamily,cornerRadius:f,stroke:t.stroke,strokeWidth:t.strokeWidth})},e))});const V=q("g",{"data-click":"text",transform:`translate(${T} 0)`,children:g&&""!==n?q(oe,{text:n,height:i,padding:o,strokeWidth:_,stroke:a,fill:l,textFill:r,fontFamily:s,cornerRadius:f}):q("circle",{r:m,stroke:a,fill:r})}),L=E+2*c,z=""===p.text?null:q("g",{"data-click":"subtext",transform:`translate(0 ${L})`,children:q(oe,{fill:p.fill||"#FFFFFF",textFill:p.textFill||r,...p,height:i,padding:o,strokeWidth:0,stroke:a,fontFamily:s,cornerRadius:f})});return q("g",{children:[q("g",{"data-click":"icon",transform:`translate(${C} ${w})`,children:[q(te,{...d,strokeWidth:x,shape:"circle",height:F,fill:v,stroke:y,imageFontFamily:b,imageChar:W,imageCharFill:k,padding:R,xOffset:S,yOffset:$,cornerRadius:f,shapeRendering:P}),I]}),q("g",{transform:`translate(${-A/2} 0)`,children:[V,N]}),z]})},"Vertex4"),ke=i(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:a="#CCCCCC",textboxStrokeWidth:_=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"}){d={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...d},p={text:"",fill:"transparent",textFill:"#555555",...p};return q(ve,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:a,textboxStrokeWidth:_,textFontFamily:s,annotationGutter:c,annotations:u,iconAnnotations:h,cornerRadius:f,icon:d,subText:p,showLabel:g,noLabelRadius:m,iconBorderWidth:x,iconBorderColor:y,iconBackgroundColor:v,iconFontColor:k,iconFontSize:F,iconFontFamily:b,shapeOffsetX:C,shapeOffsetY:w,iconOffsetX:S,iconOffsetY:$,iconPadding:R,iconText:W,shapeRendering:P},icon:d,subText:p})},"CentroidVertex4"),Fe=i(({text:t,width:n=100,height:i=100,fill:o="transparent",stroke:r="black",fontHeight:l=12,fontFamily:a})=>{const _=e.Utility.textSize(t,a,l,!1);return q(b,{children:[q(Zt,{width:n,height:i,fill:o,stroke:r}),q("g",{transform:`translate(${(-n+_.width)/2+4} ${(-i+_.height)/2+4})`,children:q(ie,{height:l,text:t,fontFamily:a})})]})},"Subgraph");t.Annotations=pe,t.BUILD_VERSION="3.2.1",t.CentroidVertex3=ye,t.CentroidVertex4=ke,t.Circle=Jt,t.Edge=ae,t.HTMLAdapter=ue,t.Icon=te,t.IconLabelledRect=le,t.Icons=ee,t.Image=Xt,t.ImageChar=Yt,t.LabelledRect=re,t.PKG_NAME="@hpcc-js/react",t.PKG_VERSION="3.1.1",t.React=Gt,t.Rectangle=Zt,t.SVGAdapter=fe,t.Shape=Qt,t.Span=de,t.Square=Kt,t.Subgraph=Fe,t.Text=ie,t.TextBox=oe,t.TextLine=ne,t.Vertex=ge,t.Vertex2=me,t.Vertex3=xe,t.Vertex4=ve,t.render=_e,t.svgRender=se,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
3
2
  //# sourceMappingURL=index.umd.cjs.map