@hpcc-js/composite 3.4.3 → 3.4.5
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var t,e,i,o,s,l,r,n,a,h,d,p,c,u,g,_,y,f,b,w=Object.defineProperty,m=(t,e)=>w(t,"name",{value:e,configurable:!0});import{HTMLWidget as x,FAChar as v,select as C,selectAll as T,Utility as S,d3Event as P,Platform as B,drag as z,SVGWidget as A,Database as W,Palette as k,format as I,scaleOrdinal as M,ProgressBar as D,ToggleButton as H,Text as F,Button as O,Spacer as L,TitleBar as R,IconBar as E,scaleLinear as G,dispatch as Y,formatPrefix as N,formatLocale as V,formatSpecifier as X,sum as U,map as j}from"@hpcc-js/common";import{Table as $}from"@hpcc-js/dgrid";import{instanceOfIHighlight as q,INDChart as J,IGraph as K}from"@hpcc-js/api";import{OnOff as Z,Button as Q,Input as tt,Select as et}from"@hpcc-js/form";import{PropertyEditor as it,Legend as ot,Html as st,Persist as lt}from"@hpcc-js/other";const rt="@hpcc-js/composite",nt="3.4.3",at="3.16.1";var ht=Object.defineProperty,dt=/* @__PURE__ */m((t,e)=>ht(t,"name",{value:e,configurable:!0}),"e");function pt(t,e){for(var i=0;i<e.length;i++){const o=e[i];if("string"!=typeof o&&!Array.isArray(o))for(const e in o)if("default"!==e&&!(e in t)){const i=Object.getOwnPropertyDescriptor(o,e);i&&Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:/* @__PURE__ */dt(()=>o[e],"get")})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}m(pt,"I"),dt(pt,"_mergeNamespaces");const ct=(m(t=class extends x{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);let i=0,o=0,s=this.clientWidth(),l=this.clientHeight();switch(this.units()){case"pixels":i=this.widgetX(),o=this.widgetY(),s=""===this.widgetWidth()?s-i:Number(this.widgetWidth()),l=""===this.widgetHeight()?l-o:Number(this.widgetHeight());break;case"percent":i=this.widgetX()*s/100,o=this.widgetY()*l/100,s=""===this.widgetWidth()?s-i:Number(this.widgetWidth())*s/100,l=""===this.widgetHeight()?l-o:Number(this.widgetHeight())*l/100}e.style("opacity",this.opacity());const r=e.selectAll("#"+this._id+" > .placeholder").data(this.widget()?[this.widget()]:[],function(t){return t._id});r.enter().append("div").attr("class","placeholder").each(function(t){t.target(this)}).merge(r).style("left",i+"px").style("top",o+"px").style("width",s+"px").style("bottom",l+"px").each(function(t){t.resize({width:s,height:l})}),r.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}},"_AbsoluteSurface"),t);dt(ct,"AbsoluteSurface");let ut=ct;ut.prototype._class+=" layout_AbsoluteSurface",ut.prototype.publish("units","percent","set","Units",["pixels","percent"]),ut.prototype.publish("widgetX",0,"number","Widget XPos"),ut.prototype.publish("widgetY",0,"number","Widget YPos"),ut.prototype.publish("widgetWidth","100","string","Widget Width, omit for full"),ut.prototype.publish("widgetHeight","100","string","Widget Height, omit for full"),ut.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]}),ut.prototype.publish("opacity",1,"number","Opacity");const gt=(m(e=class extends x{_isClosed;titleSpan;iconDiv;ul;icon;constructor(){super(),this._tag="div",this._isClosed=!1}pushListItem(t,e=!1,i=!1){const o=this.content();return t._protected=i,e?o.unshift(t):o.push(t),this.content(o),this}clearListItems(){const t=[];for(const e in this.content())this.content()[e]._protected&&t.push(this.content()[e]);return this.content(t),this}collapseClick(t){t.classed("closed")?(this._isClosed=!1,t.classed("open",!0),t.classed("closed",!1)):(this._isClosed=!0,t.classed("open",!1),t.classed("closed",!0))}enter(t,e){super.enter(t,e);const i=this;this._isClosed=this.defaultCollapsed(),e.classed(this._isClosed?"closed":"open",!0),this.titleSpan=e.append("span").classed("collapsible-title",!0),this.iconDiv=e.append("div").classed("collapsible-icon",!0),this.ul=e.append("ul"),this.icon=(new v).size({height:24,width:24}).target(this.iconDiv.node()),this.iconDiv.on("click",function(){i.collapseClick(e),i.render()}),this.titleSpan.on("click",function(){i.collapseClick(e),i.render()})}update(t,e){super.update(t,e);const i=this;this.titleSpan.text(i.title().length>0?i.title()+"":"Accordion ["+i._id+"]");const o=this.ul.selectAll("#"+i._id+" > ul > li").data(this.content(),function(t){return t._id});o.enter().append(function(t){const e=document.createElement("li");if(null!==t._target)return t._target;{const o=t.size();if(0===o.width||0===o.height){const e=i.size();t.size({width:e.width,height:e.width})}t.target(e)}return e}),o.exit().remove(),this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed?this.closedIcon():this.openIcon()).render()}exit(t,e){super.exit(t,e)}},"_Accordion"),e);dt(gt,"Accordion");let _t=gt;_t.prototype._class+=" layout_Accordion",_t.prototype.publish("content",[],"widgetArray","Array of widgets",null,{tags:["Basic"]}),_t.prototype.publish("title","","string","Title of collapsible section",null,{tags:["Private"]}),_t.prototype.publish("openIcon","","string","Icon to display when list is open",null,{tags:["Private"]}),_t.prototype.publish("closedIcon","","string","Icon to display when list is closed",null,{tags:["Private"]}),_t.prototype.publish("titleFontColor","#FFFFFF","html-color","Title font color",null,{tags:["Private"]}),_t.prototype.publish("titleBackgroundColor","#333333","html-color","Title background color",null,{tags:["Private"]}),_t.prototype.publish("defaultCollapsed",!1,"boolean","Collapsed by default if true",null,{tags:["Private"]});const yt=(m(i=class extends x{_surfaceButtons;constructor(){super(),this._tag="div",this._surfaceButtons=[]}widgetSize(t,e){let i=this.clientWidth(),o=this.clientHeight();return this.title()&&(o-=this.calcHeight(t)),o-=this.calcFrameHeight(e),i-=this.calcFrameWidth(e),{width:i,height:o}}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);const i=this;e.classed("shadow2",this.surfaceShadow()).style("border-width",this.surfaceBorderWidth_exists()?this.surfaceBorderWidth()+"px":null).style("border-color",this.surfaceBorderColor()).style("border-radius",this.surfaceBorderRadius_exists()?this.surfaceBorderRadius()+"px":null).style("background-color",this.surfaceBackgroundColor());const o=e.selectAll(".surfaceTitle").data(this.title()?[this.title()]:[]);o.enter().insert("h3","div").attr("class","surfaceTitle").merge(o).text(function(t){return t}).style("text-align",this.surfaceTitleAlignment()).style("color",this.surfaceTitleFontColor()).style("font-size",this.surfaceTitleFontSize_exists()?this.surfaceTitleFontSize()+"px":null).style("font-family",this.surfaceTitleFontFamily()).style("font-weight",this.surfaceTitleFontBold()?"bold":"normal").style("background-color",this.surfaceTitleBackgroundColor()).style("padding",this.surfaceTitlePadding_exists()?this.surfaceTitlePadding()+"px":null).style("title",this.altText_exists()?this.altText():null),o.exit().remove();const s=e.select(".surfaceTitle").append("div").attr("class","html-button-container").selectAll(".surface-button").data(this.buttonAnnotations());s.enter().append("button").classed("surface-button",!0).each(function(t,e){const o=i._surfaceButtons[e]=C(this).attr("class","surface-button"+(t.class?" "+t.class:"")).attr("id",t.id).style("padding",t.padding).style("width",t.width).style("height",t.height).style("cursor","pointer");"FontAwesome"===t.font?o.style("background","transparent").style("border","none").on("click",function(t){i.click(t)}).append("i").attr("class","fa").text(function(){return t.label}):o.text(function(){return t.label}).on("click",function(t){i.click(t)})}),s.exit().each(function(t,e){const o=C(this);delete i._surfaceButtons[e],o.remove()});const l=e.selectAll("#"+this._id+" > .surfaceWidget").data(this.widget()?[this.widget()]:[],function(t){return t._id});l.enter().append("div").attr("class","surfaceWidget").each(function(t){C(i.element().node().parentElement).classed("content-icon content-icon-"+t.classID().split("_")[1],!0),t.target(this)}).merge(l).style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null).each(function(t){const o=i.widgetSize(e.select("h3"),C(this));o.width<0&&(o.width=0),o.height<0&&(o.height=0),t.resize({width:o.width,height:o.height})}),l.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}click(t){}},"_Surface"),i);dt(yt,"Surface");let ft=yt;ft.prototype._class+=" layout_Surface",ft.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),ft.prototype.publish("altText",null,"string","Alt text",null,{optional:!0}),ft.prototype.publish("surfaceTitlePadding",null,"number","Title Padding (px)",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleBackgroundColor",null,"html-color","Title Background Color",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleAlignment","center","set","Title Alignment",["left","right","center"],{tags:["Basic"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceShadow",!1,"boolean","3D Shadow"),ft.prototype.publish("surfacePadding",null,"string","Surface Padding (px)",null,{tags:["Intermediate"]}),ft.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),ft.prototype.publish("surfaceBorderWidth",null,"number","Surface Border Width (px)",null,{tags:["Advanced"]}),ft.prototype.publish("surfaceBorderColor",null,"html-color","Surface Border Color",null,{tags:["Advanced"]}),ft.prototype.publish("surfaceBorderRadius",null,"number","Surface Border Radius (px)",null,{tags:["Advanced"]}),ft.prototype.publish("buttonAnnotations",[],"array","Button Array",null,{tags:["Private"]}),ft.prototype.publish("widget",null,"widget","Widget",null,{tags:["Basic"]});const bt=(m(o=class extends ft{_indicateTheseIds;constructor(){super(),this._indicateTheseIds=[]}indicateTheseIds(t){return arguments.length?(this._indicateTheseIds=t,this):this._indicateTheseIds}enter(t,e){super.enter(t,e);const i=this;e.classed("layout_Surface",!0).on("mouseenter",function(){i.onMouseEnter()}).on("mouseleave",function(){i.onMouseLeave()})}update(t,e){super.update(t,e)}onMouseEnter(){const t=this.indicateTheseIds(),e=this.indicatorOpacity(),i=this.indicatorBorderColor(),o=this.indicatorGlowColor();for(let s=0;s<t.length;s++){const l=C("#"+t[s]),r=l.datum();l&&r&&l.append("div").attr("class","update-indicator").style("width",r.width()+"px").style("height",r.height()+"px").style("opacity",e).style("border-color",i).style("-webkit-box-shadow","inset 0px 0px 30px 0px "+o).style("-moz-box-shadow","inset 0px 0px 30px 0px "+o).style("box-shadow","inset 0px 0px 30px 0px "+o)}}onMouseLeave(){const t=this.indicateTheseIds();for(let e=0;e<t.length;e++)T("#"+t[e]+" > div.update-indicator").remove()}},"_Cell"),o);dt(bt,"Cell");let wt=bt;wt.prototype._class+=" layout_Cell",wt.prototype.publish("gridRow",0,"number","Grid Row Position",null,{tags:["Private"]}),wt.prototype.publish("gridCol",0,"number","Grid Column Position",null,{tags:["Private"]}),wt.prototype.publish("gridRowSpan",1,"number","Grid Row Span",null,{tags:["Private"]}),wt.prototype.publish("gridColSpan",1,"number","Grid Column Span",null,{tags:["Private"]}),wt.prototype.publish("indicatorGlowColor","#EEEE11","html-color","Glow color of update-indicator",null,{tags:["Basic"]}),wt.prototype.publish("indicatorBorderColor","#F48A00","html-color","Border color of update-indicator",null,{tags:["Basic"]}),wt.prototype.publish("indicatorOpacity",.8,"number","Opacity of update-indicator",null,{tags:["Basic"]});const mt=(s=class extends x{_colCount;_rowCount;_colSize;_rowSize;_shrinkWrapBoxes;_watch;_offsetX;_offsetY;_dragCell;_dragCellSize;_dragCellStartSize;_handleTop;_handleLeft;_dragPrevX;_dragPrevY;_cellSizes;contentDiv;_scrollBarWidth;_borderHandles;_sectionTypeArr;constructor(){super(),this._tag="div",this._colCount=0,this._rowCount=0,this._colSize=0,this._rowSize=0,this._shrinkWrapBoxes={},this.content([]),this.sectionTypes([])}watchWidget(t){if(void 0===this._watch&&(this._watch={}),this._watch[t.id()]&&(this._watch[t.id()].remove(),delete this._watch[t.id()]),t){const e=this;this._watch[t.id()]=t.monitor(function(t,i,o){o!==i&&e.lazyPostUpdate()})}}lazyPostUpdate=S.debounce(function(){this.postUpdate()},100);applyLayoutType(){const t=this.borderLayoutObject();this.content().forEach(function(e,i){e._fixedLeft=t[this.sectionTypes()[i]].left,e._fixedTop=t[this.sectionTypes()[i]].top,e._fixedWidth=t[this.sectionTypes()[i]].width,e._fixedHeight=t[this.sectionTypes()[i]].height,e._dragHandles=this.cellSpecificDragHandles(this.sectionTypes()[i])},this)}cellSpecificDragHandles(t){switch(t){case"top":return["s"];case"right":return["w"];case"bottom":return["n"];case"left":return["e"];case"center":return[]}}borderLayoutObject(t){const e={},i=this;let o,s,l,r,n,a,h,d;const p=this.target().getBoundingClientRect();p.top,p.left,p.bottom,p.right,this.target()instanceof SVGElement?(parseFloat(this.target().getAttribute("width")),parseFloat(this.target().getAttribute("height"))):(p.width,p.height),-1!==this.sectionTypes().indexOf("top")&&(o=this.topSize(),s=this.topPercentage(),void 0!==this._shrinkWrapBoxes.top&&(o=this._shrinkWrapBoxes.top.height+this.gutter(),s=0)),-1!==this.sectionTypes().indexOf("bottom")&&(l=this.bottomSize(),r=this.bottomPercentage(),void 0!==this._shrinkWrapBoxes.bottom&&(l=this._shrinkWrapBoxes.bottom.height+this.gutter(),r=0)),-1!==this.sectionTypes().indexOf("left")&&(n=this.leftSize(),a=this.leftPercentage(),void 0!==this._shrinkWrapBoxes.left&&(n=this._shrinkWrapBoxes.left.width+this.gutter(),a=0)),-1!==this.sectionTypes().indexOf("right")&&(h=this.rightSize(),d=this.rightPercentage(),void 0!==this._shrinkWrapBoxes.right&&(h=this._shrinkWrapBoxes.right.width+this.gutter(),d=0));const c=f({width:{px:0,"%":100},height:{px:o,"%":s},top:{px:0,"%":0},left:{px:0,"%":0}}),u=f({width:{px:0,"%":100},height:{px:l,"%":r},top:{px:0,"%":100},left:{px:0,"%":0}});u.top-=u.height;const g=f({width:{px:n,"%":a},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:0,"%":0}}),_=f({width:{px:h,"%":d},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:0,"%":100}});_.left-=_.width;const y=f({width:{px:-_.width-g.width,"%":100},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:g.width,"%":0}});return e.top=c,e.bottom=u,e.right=_,e.left=g,e.center=y,e;function f(t){return t.width.px=void 0!==t.width.px?t.width.px:0,t.width["%"]=void 0!==t.width["%"]?t.width["%"]:0,t.height.px=void 0!==t.height.px?t.height.px:0,t.height["%"]=void 0!==t.height["%"]?t.height["%"]:0,{width:t.width.px+t.width["%"]/100*i.width(),height:t.height.px+t.height["%"]/100*i.height(),top:t.top.px+t.top["%"]/100*i.height()+i.gutter()/2,left:t.left.px+t.left["%"]/100*i.width()+i.gutter()/2}}}clearContent(t){if(t){const e=this.sectionTypes().indexOf(t);e>=0&&(this._watch&&this.content()[e]&&delete this._watch[this.content()[e].id()],this.content()[e].target(null),C("#"+this.id()+" > div.borderHandle_"+t).classed("borderHandleDisabled",!0),this.content().splice(e,1),this.sectionTypes().splice(e,1))}else this.content().forEach(function(t){return t.target(null),!1}),C("#"+this.id()+" > div.borderHandle").classed("borderHandleDisabled",!0),delete this._watch,this.content([]),this.sectionTypes([])}hasContent(t,e,i){return this.sectionTypes().indexOf(t)>=0}setContent(t,e,i){if(this.clearContent(t),i=void 0!==i?i:"",e){const o=(new wt).surfaceBorderWidth(0).widget(e).title(i);this.watchWidget(e),this.content().push(o),this.sectionTypes().push(t)}return this}getCell(t){const e=this.sectionTypes().indexOf(t);return e>=0?this.content()[e]:null}getContent(t){const e=this.sectionTypes().indexOf(t);return e>=0?this.content()[e].widget():null}setLayoutOffsets(){this._offsetX=this._element.node().getBoundingClientRect().left+this.gutter()/2,this._offsetY=this._element.node().getBoundingClientRect().top+this.gutter()/2}dragStart(t){const e=P();e.sourceEvent.stopPropagation();const i=this;this._dragCell=t,this._dragCellStartSize=this[t+"Size"](),this[t+"ShrinkWrap"]()&&(this[t+"Percentage"](0),this[t+"ShrinkWrap"](!1));const o=C("#"+i.id()+" > div.borderHandle_"+t);i._handleTop=parseFloat(o.style("top").split("px")[0]),i._handleLeft=parseFloat(o.style("left").split("px")[0]),this._dragPrevX=e.sourceEvent.clientX,this._dragPrevY=e.sourceEvent.clientY}dragTick(t){const e=this,i=P(),o=this._dragPrevX-i.sourceEvent.clientX,s=this._dragPrevY-i.sourceEvent.clientY;switch(t){case"top":case"bottom":l(t,s);break;case"right":case"left":l(t,o)}function l(t,i){if(0===i)return;const o=T("#"+e.id()+" > div.borderHandle"),s=C("#"+e.id()+" > div.borderHandle_"+t);s.classed("borderHandle_top")?(s.style("top",e._handleTop-i+"px"),e._cellSizes.topHeight=e._handleTop-i,e._cellSizes.leftHeight=e._cellSizes.height,e._cellSizes.leftHeight-=e._cellSizes.topHeight,e._cellSizes.leftHeight-=e._cellSizes.bottomHeight,e._cellSizes.rightHeight=e._cellSizes.leftHeight):s.classed("borderHandle_right")?(s.style("left",e._handleLeft-i+"px"),e._cellSizes.rightWidth=e._cellSizes.width-e._handleLeft+i):s.classed("borderHandle_bottom")?(s.style("top",e._handleTop-i+"px"),e._cellSizes.bottomHeight=e._cellSizes.height-e._handleTop+i,e._cellSizes.leftHeight=e._cellSizes.height,e._cellSizes.leftHeight-=e._cellSizes.bottomHeight,e._cellSizes.leftHeight-=e._cellSizes.topHeight,e._cellSizes.rightHeight=e._cellSizes.leftHeight):s.classed("borderHandle_left")&&(s.style("left",e._handleLeft-i+"px"),e._cellSizes.leftWidth=e._handleLeft-i),o.each(function(){const t=C(this);t.classed("borderHandle_top")?(t.style("width",e._cellSizes.width+"px"),t.style("top",e._cellSizes.topHeight-3+"px")):t.classed("borderHandle_right")?(t.style("left",e._cellSizes.width-e._cellSizes.rightWidth+"px"),t.style("top",e._cellSizes.topHeight+3+"px"),t.style("height",e._cellSizes.rightHeight+"px")):t.classed("borderHandle_bottom")?(t.style("width",e._cellSizes.width+"px"),t.style("top",e._cellSizes.height-e._cellSizes.bottomHeight-3+"px")):t.classed("borderHandle_left")&&(t.style("left",e._cellSizes.leftWidth+"px"),t.style("height",e._cellSizes.leftHeight+"px"),t.style("top",e._cellSizes.topHeight+3+"px"))})}m(l,"a"),dt(l,"_moveHandles")}dragEnd(t){if(t){const e=P(),i=this._dragPrevX-e.sourceEvent.clientX,o=this._dragPrevY-e.sourceEvent.clientY;switch(t){case"top":0!==o&&(this.topPercentage(0),this.topSize(0===this.topSize()?this.getContent("top").getBBox().height-o:this.topSize()-o));break;case"right":0!==i&&(this.rightPercentage(0),this.rightSize(0===this.rightSize()?this.getContent("right").getBBox().width+i:this.rightSize()+i));break;case"bottom":0!==o&&(this.bottomPercentage(0),this.bottomSize(0===this.bottomSize()?this.getContent("bottom").getBBox().height+o:this.bottomSize()+o));break;case"left":0!==i&&(this.leftPercentage(0),this.leftSize(0===this.leftSize()?this.getContent("left").getBBox().width-i:this.leftSize()-i))}this._dragPrevX=e.sourceEvent.clientX,this._dragPrevY=e.sourceEvent.clientY}this.render()}size(t){const e=x.prototype.size.apply(this,arguments);return arguments.length&&this.contentDiv&&this.contentDiv.style("width",this._size.width+"px").style("height",this._size.height+"px"),e}enter(t,e){super.enter(t,e);const i=this;e.style("position","relative"),this.contentDiv=e.append("div").classed("border-content",!0),this._scrollBarWidth=B.getScrollbarWidth(),this._borderHandles=["top","left","right","bottom"],e.selectAll("div.borderHandle").data(this._borderHandles).enter().append("div").classed("borderHandle",!0).each(function(t){C(this).classed("borderHandle_"+t,!0).classed("borderHandleDisabled",null===i.getContent(t))})}update(t,e){super.update(t,e),this._sectionTypeArr=this.sectionTypes();const i=this;e.classed("design-mode",this.designMode()),this.setLayoutOffsets();const o=this.contentDiv.selectAll(".cell_"+this._id).data(this.content(),function(t){return t._id}),s=o.enter().append("div").classed("cell_"+this._id,!0).style("position","absolute").each(function(t,e){C(this).classed("border-cell border-cell-"+i._sectionTypeArr[e],!0),t.target(this),C("#"+i.id()+" > div.borderHandle_"+i._sectionTypeArr[e]).classed("borderHandleDisabled",!1)}).merge(o);s.each(function(t,e){const o=i.sectionTypes()[e];void 0!==i[o+"ShrinkWrap"]&&i[o+"ShrinkWrap"]()?(t.render(),i._shrinkWrapBoxes[o]=t.widget().getBBox(!0)):delete i._shrinkWrapBoxes[o]});const l=z().on("start",function(t,e){i.dragStart.call(i,t,e)}).on("drag",function(t,e){i.dragTick.call(i,t,e)}).on("end",function(t,e){i.dragEnd.call(i,t,e)});this.designMode()?e.selectAll("#"+this.id()+" > div.borderHandle").call(l):e.selectAll("#"+this.id()+" > div.borderHandle").on(".drag",null);const r=this.borderLayoutObject();this.content().forEach(function(t,e){t._fixedLeft=r[this.sectionTypes()[e]].left,t._fixedTop=r[this.sectionTypes()[e]].top,t._fixedWidth=r[this.sectionTypes()[e]].width,t._fixedHeight=r[this.sectionTypes()[e]].height,t._dragHandles=[]},this),s.style("left",function(t){return t._fixedLeft+"px"}).style("top",function(t){return t._fixedTop+"px"}).style("width",function(t){return t._fixedWidth-i.gutter()+"px"}).style("height",function(t){return t._fixedHeight-i.gutter()+"px"}).each(function(t){t._placeholderElement.attr("draggable",i.designMode()).selectAll(".dragHandle").attr("draggable",i.designMode()),t.surfacePadding(i.surfacePadding()).resize()}),o.exit().each(function(t){t.target(null)}).remove(),this.getCellSizes(),e.selectAll("#"+this.id()+" > div.borderHandle").each(function(){const t=C(this);t.classed("borderHandle_top")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.topHeight-3+"px")):t.classed("borderHandle_right")?(t.style("left",i._cellSizes.width-i._cellSizes.rightWidth+"px"),t.style("top",i._cellSizes.topHeight+3+"px"),t.style("height",i._cellSizes.rightHeight+"px")):t.classed("borderHandle_bottom")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.height-i._cellSizes.bottomHeight-3+"px")):t.classed("borderHandle_left")&&(t.style("left",i._cellSizes.leftWidth+"px"),t.style("height",i._cellSizes.leftHeight+"px"),t.style("top",i._cellSizes.topHeight+3+"px"))})}getCellSizes(){const t=this;t._cellSizes={};const e=this.element().node().getBoundingClientRect();t._cellSizes.width=e.width,t._cellSizes.height=e.height,this.element().selectAll("#"+this.id()+" > div > div.border-cell").each(function(){const e=C(this);if("function"==typeof e.node){const i=e.node().getBoundingClientRect();e.classed("border-cell-top")?t._cellSizes.topHeight=i.height:e.classed("border-cell-left")?(t._cellSizes.leftWidth=i.width,t._cellSizes.leftHeight=i.height):e.classed("border-cell-right")?(t._cellSizes.rightWidth=i.width,t._cellSizes.rightHeight=i.height):e.classed("border-cell-bottom")&&(t._cellSizes.bottomHeight=i.height)}}),["height","width","topHeight","bottomHeight","leftHeight","rightHeight","leftWidth","rightWidth"].forEach(function(e){t._cellSizes[e]=void 0===t._cellSizes[e]?0:t._cellSizes[e]})}postUpdate(t,e){const i=this;this.content().forEach(function(t){if(null!==t._element.node()&&t.widget()){const e=t.widget().getBBox(!1,!0),o=t.widget().getBBox(!0,!0);e.width===o.width&&e.height===o.height||i.lazyRender()}})}exit(t,e){this.content().forEach(t=>t.target(null)),super.exit(t,e)}},m(s,"_Border"),s);dt(mt,"Border");let xt=mt;xt.prototype._class+=" layout_Border",xt.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),xt.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Intermediate"]}),xt.prototype.publish("gutter",0,"number","Gap Between Widgets",null,{tags:["Basic"]}),xt.prototype.publish("topShrinkWrap",!1,"boolean","'Top' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("leftShrinkWrap",!1,"boolean","'Left' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("rightShrinkWrap",!1,"boolean","'Right' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("bottomShrinkWrap",!1,"boolean","'Bottom' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("topSize",0,"number","Height of the 'Top' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("leftSize",0,"number","Width of the 'Left' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("rightSize",0,"number","Width of the 'Right' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("bottomSize",0,"number","Height of the 'Bottom' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("topPercentage",20,"number","Percentage (of parent) Height of the 'Top' Cell",null,{tags:["Private"]}),xt.prototype.publish("leftPercentage",20,"number","Percentage (of parent) Width of the 'Left' Cell",null,{tags:["Private"]}),xt.prototype.publish("rightPercentage",20,"number","Percentage (of parent) Width of the 'Right' Cell",null,{tags:["Private"]}),xt.prototype.publish("bottomPercentage",20,"number","Percentage (of parent) Height of the 'Bottom' Cell",null,{tags:["Private"]}),xt.prototype.publish("surfacePadding",0,"number","Cell Padding (px)",null,{tags:["Intermediate"]}),xt.prototype.publish("sectionTypes",[],"array","Section Types sharing an index with 'content' - Used to determine position/size.",null,{tags:["Private"]});const vt=(m(l=class{_div;_overlay=!1;_overflowX="visible";_overflowY="visible";_widget;constructor(t){this._div=t}overlay(t){return arguments.length?(this._overlay=t,this):this._overlay}overflowX(t){return arguments.length?(this._overflowX=t,this._div.style("overflow-x",t),this):this._overflowX}overflowY(t){return arguments.length?(this._overflowY=t,this._div.style("overflow-y",t),this):this._overflowY}element(){return this._div}node(){return this._div.node()}widget(t){return arguments.length?(this._widget!==t&&(this._widget&&this._widget.target(null),this._widget=t,this._widget&&this._widget.target(this._div.node())),this):this._widget}resize(t){return this._widget&&(this._div.style("width",`${t.width}px`).style("height",`${t.height}px`),this._widget.resize(t)),this}async render(t,e,i){let o=this.overflowX();this.overlay()||"visible"!==o||(o=null);let s=this.overflowY();return this.overlay()||"visible"!==s||(s=null),this._div.style("height",this.overlay()?"0px":null).style("overflow-x",o).style("overflow-y",s),this._widget?this._widget.renderPromise().then(o=>{if(t&&this._widget.visible()){const t=this._widget.getBBox();return t.width+=8,void 0!==e&&t.height>e&&(t.width+=B.getScrollbarWidth()),void 0!==i&&t.width>i&&(t.height+=B.getScrollbarWidth()),this.overlay()?t.height=0:t.height+=4,t}return t?{x:0,y:0,width:0,height:0}:void 0}):Promise.resolve(t?{x:0,y:0,width:0,height:0}:void 0)}},"_WidgetDiv"),l);dt(vt,"WidgetDiv");let Ct=vt;const Tt=(m(r=class extends x{_bodyElement;_topWA;_leftWA;_centerWA;_rightWA;_bottomWA;_topPrevOverflow;_leftPrevOverflow;_rightPrevOverflow;_bottomPrevOverflow;constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e);const i=e.append("header");this._bodyElement=e.append("div").attr("class","body");const o=this._bodyElement.append("div").attr("class","center"),s=this._bodyElement.append("div").attr("class","lhs"),l=this._bodyElement.append("div").attr("class","rhs"),r=e.append("div").attr("class","footer");this._topWA=new Ct(i),this._centerWA=new Ct(o),this._leftWA=new Ct(s),this._rightWA=new Ct(l),this._bottomWA=new Ct(r)}update(t,e){super.update(t,e),this._topWA.element().style("display",this.showTop()?null:"none"),this._rightWA.element().style("display",this.showRight()?null:"none"),this._bottomWA.element().style("display",this.showBottom()?null:"none"),this._leftWA.element().style("display",this.showLeft()?null:"none"),this.topOverflowX()!==this._topWA.overflowX()&&this._topWA.overflowX(this.topOverflowX()),this.rightOverflowX()!==this._rightWA.overflowX()&&this._rightWA.overflowX(this.rightOverflowX()),this.bottomOverflowX()!==this._bottomWA.overflowX()&&this._bottomWA.overflowX(this.bottomOverflowX()),this.leftOverflowX()!==this._leftWA.overflowX()&&this._leftWA.overflowX(this.leftOverflowX()),this.topOverflowY()!==this._topWA.overflowY()&&this._topWA.overflowY(this.topOverflowY()),this.rightOverflowY()!==this._rightWA.overflowY()&&this._rightWA.overflowY(this.rightOverflowY()),this.bottomOverflowY()!==this._bottomWA.overflowY()&&this._bottomWA.overflowY(this.bottomOverflowY()),this.leftOverflowY()!==this._leftWA.overflowY()&&this._leftWA.overflowY(this.leftOverflowY()),this.element().style("width",`${this.width()}px`).style("height",`${this.height()}px`)}targetNull(t){t&&t.target(null)}exit(t,e){this.targetNull(this.center()),this.targetNull(this.bottom()),this.targetNull(this.right()),this.targetNull(this.left()),this.targetNull(this.top()),super.exit(t,e)}swap(t,e){const i=this[t](),o=this[e]();return this.targetNull(i),this.targetNull(o),this[`_${t}WA`].widget(null),this[`_${e}WA`].widget(null),this[t](o),this[e](i),this}render(t){return super.render(e=>{this._topWA?this._topWA.widget(this.top()).overlay(this.topOverlay()).render(!0).then(async e=>{const i=await this._bottomWA.widget(this.bottom()).render(!0,void 0,this.width()),o=this.height()-(e.height+i.height),s=await this._leftWA.widget(this.left()).render(!0,o),l=await this._rightWA.widget(this.right()).render(!0,o);this.bottomHeight_exists()&&(i.height=this.bottomHeight());const r=this.width()-(s.width+l.width),n=this.height()-(e.height+i.height),a=this.centerOverflowX(),h=this.centerOverflowY(),d=-1!==["auto","scroll"].indexOf(a),p=-1!==["auto","scroll"].indexOf(h);(d||p)&&this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:r,height:n}).render(),this._bodyElement.style("height",`${n}px`);const c=[this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({width:this.width(),height:e.height}).render(),this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({width:s.width,height:n}).render(),this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({width:l.width,height:n}).render(),this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:r,height:n}).render(),this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({width:this.width(),height:i.height}).render()];Promise.all(c).then(e=>{t&&t(this)})}):t&&t(this)})}},"_Border2"),r);dt(Tt,"Border2");let St=Tt;St.prototype._class+=" layout_Border2",St.prototype.publish("showTop",!0,"boolean","If true, top widget adapter will display"),St.prototype.publish("showRight",!0,"boolean","If true, right widget adapter will display"),St.prototype.publish("showBottom",!0,"boolean","If true, bottom widget adapter will display"),St.prototype.publish("showLeft",!0,"boolean","If true, left widget adapter will display"),St.prototype.publish("topOverflowX","visible","set","Sets the overflow-x css style for the top widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("rightOverflowX","visible","set","Sets the overflow-x css style for the right widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("bottomOverflowX","visible","set","Sets the overflow-x css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("leftOverflowX","visible","set","Sets the overflow-x css style for the left widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("centerOverflowX","visible","set","Sets the overflow-x css style for the center widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("topOverflowY","visible","set","Sets the overflow-y css style for the top widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("rightOverflowY","visible","set","Sets the overflow-y css style for the right widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("bottomOverflowY","visible","set","Sets the overflow-y css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("leftOverflowY","visible","set","Sets the overflow-y css style for the left widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("centerOverflowY","visible","set","Sets the overflow-y css style for the center widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("top",null,"widget","Top Widget",void 0,{render:!1}),St.prototype.publish("topOverlay",!1,"boolean","Overlay Top Widget"),St.prototype.publish("left",null,"widget","Left Widget",void 0,{render:!1}),St.prototype.publish("center",null,"widget","Center Widget",void 0,{render:!1}),St.prototype.publish("right",null,"widget","Right Widget",void 0,{render:!1}),St.prototype.publish("bottom",null,"widget","Bottom Widget",void 0,{render:!1}),St.prototype.publish("bottomHeight",null,"number","Bottom Fixed Height",void 0,{optional:!0});const Pt=(m(n=class extends x{_prevActive=0;_root;activeWidget(){return this.widgets()[this.active()]}enter(t,e){super.enter(t,e),this._root=e.append("div").attr("id",`${this.id()}_root`)}update(t,e){super.update(t,e);const i=this.active(),o=this.width();this._root.style("width",`${o}px`).style("height",`${this.height()}px`);const s=this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(),t=>t.id()),l=s.enter().append("div").attr("class","carouselItem").each(function(t){t.target(this)}).merge(s).style("left",(t,e)=>(e-this._prevActive)*o+"px").style("width",`${o}px`);this._prevActive!==i&&(l.style("display",(t,e)=>e===this._prevActive||e===i?null:"none").transition().duration(this.transitionDuration()).style("left",(t,e)=>(e-i)*o+"px").on("end",function(t,e){C(this).style("display",()=>e===i?null:"none")}),this._prevActive=i),s.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widgets().forEach(t=>t.target(null)),super.exit(t,e)}render(t){return super.render(e=>{if(!this.visible()||this.isDOMHidden())t&&t(e);else{const i=this.activeWidget();i&&i.resize(this.size()).render(i=>{t&&t(e)})}})}},"_Carousel"),n);dt(Pt,"Carousel");let Bt=Pt;Bt.prototype._class+=" layout_Carousel",Bt.prototype.publish("widgets",[],"widgetArray","Widgets",null,{render:!1}),Bt.prototype.publish("active",0,"number","Active widget"),Bt.prototype.publish("transitionDuration",500,"number","Transition duration");var zt=Math.PI,At=2*zt,Wt=1e-6,kt=At-Wt;function It(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Mt(){return new It}function Dt(t){return dt(function(){return t},"constant")}m(It,"tt"),m(Mt,"et"),m(Dt,"it"),dt(It,"Path"),dt(Mt,"path"),It.prototype=Mt.prototype={constructor:It,moveTo:/* @__PURE__ */dt(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:/* @__PURE__ */dt(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:/* @__PURE__ */dt(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:/* @__PURE__ */dt(function(t,e,i,o){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+o)},"quadraticCurveTo"),bezierCurveTo:/* @__PURE__ */dt(function(t,e,i,o,s,l){this._+="C"+ +t+","+ +e+","+ +i+","+ +o+","+(this._x1=+s)+","+(this._y1=+l)},"bezierCurveTo"),arcTo:/* @__PURE__ */dt(function(t,e,i,o,s){t=+t,e=+e,i=+i,o=+o,s=+s;var l=this._x1,r=this._y1,n=i-t,a=o-e,h=l-t,d=r-e,p=h*h+d*d;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(p>Wt)if(Math.abs(d*n-a*h)>Wt&&s){var c=i-l,u=o-r,g=n*n+a*a,_=c*c+u*u,y=Math.sqrt(g),f=Math.sqrt(p),b=s*Math.tan((zt-Math.acos((g+p-_)/(2*y*f)))/2),w=b/f,m=b/y;Math.abs(w-1)>Wt&&(this._+="L"+(t+w*h)+","+(e+w*d)),this._+="A"+s+","+s+",0,0,"+ +(d*c>h*u)+","+(this._x1=t+m*n)+","+(this._y1=e+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},"arcTo"),arc:/* @__PURE__ */dt(function(t,e,i,o,s,l){t=+t,e=+e,l=!!l;var r=(i=+i)*Math.cos(o),n=i*Math.sin(o),a=t+r,h=e+n,d=1^l,p=l?o-s:s-o;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+a+","+h:(Math.abs(this._x1-a)>Wt||Math.abs(this._y1-h)>Wt)&&(this._+="L"+a+","+h),i&&(p<0&&(p=p%At+At),p>kt?this._+="A"+i+","+i+",0,1,"+d+","+(t-r)+","+(e-n)+"A"+i+","+i+",0,1,"+d+","+(this._x1=a)+","+(this._y1=h):p>Wt&&(this._+="A"+i+","+i+",0,"+ +(p>=zt)+","+d+","+(this._x1=t+i*Math.cos(s))+","+(this._y1=e+i*Math.sin(s))))},"arc"),rect:/* @__PURE__ */dt(function(t,e,i,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +o+"h"+-i+"Z"},"rect"),toString:/* @__PURE__ */dt(function(){return this._},"toString")},dt(Dt,"constant");var Ht=Math.PI,Ft=2*Ht;const Ot={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/Ht);t.moveTo(i,0),t.arc(0,0,i,0,Ft)},"draw")},Lt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()},"draw")};var Rt=Math.sqrt(1/3),Et=2*Rt;const Gt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/Et),o=i*Rt;t.moveTo(0,-i),t.lineTo(o,0),t.lineTo(0,i),t.lineTo(-o,0),t.closePath()},"draw")};var Yt=Math.sin(Ht/10)/Math.sin(7*Ht/10),Nt=Math.sin(Ft/10)*Yt,Vt=-Math.cos(Ft/10)*Yt;const Xt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(.8908130915292852*e),o=Nt*i,s=Vt*i;t.moveTo(0,-i),t.lineTo(o,s);for(var l=1;l<5;++l){var r=Ft*l/5,n=Math.cos(r),a=Math.sin(r);t.lineTo(a*i,-n*i),t.lineTo(n*o-a*s,a*o+n*s)}t.closePath()},"draw")},Ut={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e),o=-i/2;t.rect(o,o,i,i)},"draw")};var jt=Math.sqrt(3);const $t={draw:/* @__PURE__ */dt(function(t,e){var i=-Math.sqrt(e/(3*jt));t.moveTo(0,2*i),t.lineTo(-jt*i,-i),t.lineTo(jt*i,-i),t.closePath()},"draw")};var qt=-.5,Jt=Math.sqrt(3)/2,Kt=1/Math.sqrt(12),Zt=3*(Kt/2+1);const Qt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/Zt),o=i/2,s=i*Kt,l=o,r=i*Kt+i,n=-l,a=r;t.moveTo(o,s),t.lineTo(l,r),t.lineTo(n,a),t.lineTo(qt*o-Jt*s,Jt*o+qt*s),t.lineTo(qt*l-Jt*r,Jt*l+qt*r),t.lineTo(qt*n-Jt*a,Jt*n+qt*a),t.lineTo(qt*o+Jt*s,qt*s-Jt*o),t.lineTo(qt*l+Jt*r,qt*r-Jt*l),t.lineTo(qt*n+Jt*a,qt*a-Jt*n),t.closePath()},"draw")};function te(){var t=Dt(Ot),e=Dt(64),i=null;function o(){var o;if(i||(i=o=Mt()),t.apply(this,arguments).draw(i,+e.apply(this,arguments)),o)return i=null,o+""||null}return m(o,"o"),dt(o,"symbol"),o.type=function(e){return arguments.length?(t="function"==typeof e?e:Dt(e),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:Dt(+t),o):e},o.context=function(t){return arguments.length?(i=null==t?null:t,o):i},o}m(te,"xt"),dt(te,"d3Symbol");var ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie=/* @__PURE__ */dt(function(t){return t},"d3_identity"),oe=/* @__PURE__ */dt(function(t){for(var e=[],i=0,o=t.length;i<o;i++)e[i]=t[o-i-1];return e},"d3_reverse"),se=/* @__PURE__ */dt(function(t,e){t.each(function(){var t,i=C(this),o=i.text().split(/\s+/).reverse(),s=[];i.attr("y");for(var l=parseFloat(i.attr("dy"))||0,r=i.text(null).append("tspan").attr("x",0).attr("dy",l+"em");t=o.pop();)s.push(t),r.text(s.join(" ")),r.node().getComputedTextLength()>e&&s.length>1&&(s.pop(),r.text(s.join(" ")),s=[t],r=i.append("tspan").attr("x",0).attr("dy",1.2+l+"em").text(t))})},"d3_textWrapping"),le=/* @__PURE__ */dt(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],i=arguments[2],o=arguments[3],s=arguments[4];if("object"===(void 0===e?"undefined":ee(e))){if(0===e.length)return t;for(var l=e.length;l<t.length;l++)e.push(t[l]);return e}if("function"==typeof e){for(var r=[],n=t.length,a=0;a<n;a++)r.push(e({i:a,genLength:n,generatedLabels:t,domain:i,range:o,labelDelimiter:s}));return r}return t},"d3_mergeLabels"),re=/* @__PURE__ */dt(function(t,e,i){var o=[];if(e.length>1)o=e;else for(var s=t.domain(),l=(s[s.length-1]-s[0])/(e-1),r=0;r<e;r++)o.push(s[0]+r*l);var n=o.map(i);return{data:o,labels:n,feature:/* @__PURE__ */dt(function(e){return t(e)},"feature")}},"d3_linearLegend"),ne=/* @__PURE__ */dt(function(t,e,i){var o=t.range().map(function(o){var s=t.invertExtent(o);return e(s[0])+" "+i+" "+e(s[1])});return{data:t.range(),labels:o,feature:ie}},"d3_quantLegend"),ae=/* @__PURE__ */dt(function(t){return{data:t.domain(),labels:t.domain(),feature:/* @__PURE__ */dt(function(e){return t(e)},"feature")}},"d3_ordinalLegend"),he=/* @__PURE__ */dt(function(t,e,i){t.call("cellover",i,e)},"d3_cellOver"),de=/* @__PURE__ */dt(function(t,e,i){t.call("cellout",i,e)},"d3_cellOut"),pe=/* @__PURE__ */dt(function(t,e,i){t.call("cellclick",i,e)},"d3_cellClick"),ce={d3_drawShapes:/* @__PURE__ */dt(function(t,e,i,o,s,l){"rect"===t?e.attr("height",i).attr("width",o):"circle"===t?e.attr("r",s):"line"===t?e.attr("x1",0).attr("x2",o).attr("y1",0).attr("y2",0):"path"===t&&e.attr("d",l)},"d3_drawShapes"),d3_addText:/* @__PURE__ */dt(function(t,e,i,o,s){e.append("text").attr("class",o+"label");var l=t.selectAll("g."+o+"cell text."+o+"label").data(i).text(ie);return s&&t.selectAll("g."+o+"cell text."+o+"label").call(se,s),l},"d3_addText"),d3_calcType:/* @__PURE__ */dt(function(t,e,i,o,s,l){var r=t.invertExtent?ne(t,s,l):t.ticks?re(t,i,s):ae(t),n=t.range&&t.range()||t.domain();return r.labels=le(r.labels,o,t.domain(),n,l),e&&(r.labels=oe(r.labels),r.data=oe(r.data)),r},"d3_calcType"),d3_filterCells:/* @__PURE__ */dt(function(t,e){var i=t.data.map(function(e,i){return{data:e,label:t.labels[i]}}).filter(e),o=i.map(function(t){return t.data}),s=i.map(function(t){return t.label});return t.data=t.data.filter(function(t){return-1!==o.indexOf(t)}),t.labels=t.labels.filter(function(t){return-1!==s.indexOf(t)}),t},"d3_filterCells"),d3_placement:/* @__PURE__ */dt(function(t,e,i,o,s,l){e.attr("transform",i),o.attr("transform",s),"horizontal"===t&&o.style("text-anchor",l)},"d3_placement"),d3_addEvents:/* @__PURE__ */dt(function(t,e){t.on("mouseover.legend",function(t){he(e,t,this)}).on("mouseout.legend",function(t){de(e,t,this)}).on("click.legend",function(t){pe(e,t,this)})},"d3_addEvents"),d3_title:/* @__PURE__ */dt(function(t,e,i,o){if(""!==e){t.selectAll("text."+i+"legendTitle").data([e]).enter().append("text").attr("class",i+"legendTitle"),t.selectAll("text."+i+"legendTitle").text(e),o&&t.selectAll("text."+i+"legendTitle").call(se,o);var s=t.select("."+i+"legendCells"),l=t.select("."+i+"legendTitle").nodes().map(function(t){return t.getBBox().height})[0],r=-s.nodes().map(function(t){return t.getBBox().x})[0];s.attr("transform","translate("+r+","+l+")")}},"d3_title"),d3_defaultLocale:{format:I,formatPrefix:N},d3_defaultFormatSpecifier:".01f",d3_defaultDelimiter:"to"};function ue(){var t=G(),e="rect",i=15,o=15,s=10,l=2,r=[5],n=void 0,a=[],h="",d=!1,p="",c=ce.d3_defaultLocale,u=ce.d3_defaultFormatSpecifier,g=10,_="middle",y=ce.d3_defaultDelimiter,f=void 0,b="vertical",w=!1,x=void 0,v=void 0,C=Y("cellover","cellout","cellclick");function T(m){var T=ce.d3_calcType(t,w,r,a,c.format(u),y);m.selectAll("g").data([t]).enter().append("g").attr("class",h+"legendCells"),n&&ce.d3_filterCells(T,n);var S=m.select("."+h+"legendCells").selectAll("."+h+"cell").data(T.data),P=S.enter().append("g").attr("class",h+"cell");P.append(e).attr("class",h+"swatch");var B=m.selectAll("g."+h+"cell "+e+"."+h+"swatch").data(T.data);ce.d3_addEvents(P,C),S.exit().transition().style("opacity",0).remove(),B.exit().transition().style("opacity",0).remove(),B=B.merge(B),ce.d3_drawShapes(e,B,o,i,s,x);var z=ce.d3_addText(m,P,T.labels,h,f);S=P.merge(S);var A=z.nodes().map(function(t){return t.getBBox()}),W=B.nodes().map(function(t){return t.getBBox()});d?B.attr("class",function(t){return h+"swatch "+T.feature(t)}):"line"==e?B.style("stroke",T.feature):B.style("fill",T.feature);var k,I=void 0,M=void 0,D="start"==_?0:"middle"==_?.5:1;"vertical"===b?(k=A.map(function(t,e){return Math.max(t.height,W[e].height)}),I=/* @__PURE__ */dt(function(t,e){return"translate(0, "+(U(k.slice(0,e))+e*l)+")"},"cellTrans"),M=/* @__PURE__ */dt(function(t,e){return"translate( "+(W[e].width+W[e].x+g)+", "+(W[e].y+W[e].height/2+5)+")"},"textTrans")):"horizontal"===b&&(I=/* @__PURE__ */dt(function(t,e){return"translate("+e*(W[e].width+l)+",0)"},"cellTrans"),M=/* @__PURE__ */dt(function(t,e){return"translate("+(W[e].width*D+W[e].x)+",\n "+(W[e].height+W[e].y+g+8)+")"},"textTrans")),ce.d3_placement(b,S,I,z,M,_),ce.d3_title(m,p,h,v),S.transition().style("opacity",1)}return m(T,"B"),dt(T,"legend"),T.scale=function(e){return arguments.length?(t=e,T):t},T.cells=function(t){return arguments.length?((t.length>1||t>=2)&&(r=t),T):r},T.cellFilter=function(t){return arguments.length?(n=t,T):n},T.shape=function(t,i){return arguments.length?(("rect"==t||"circle"==t||"line"==t||"path"==t&&"string"==typeof i)&&(e=t,x=i),T):e},T.shapeWidth=function(t){return arguments.length?(i=+t,T):i},T.shapeHeight=function(t){return arguments.length?(o=+t,T):o},T.shapeRadius=function(t){return arguments.length?(s=+t,T):s},T.shapePadding=function(t){return arguments.length?(l=+t,T):l},T.labels=function(t){return arguments.length?(a=t,T):a},T.labelAlign=function(t){return arguments.length?("start"!=t&&"end"!=t&&"middle"!=t||(_=t),T):_},T.locale=function(t){return arguments.length?(c=V(t),T):c},T.labelFormat=function(t){return arguments.length?(u=X(t),T):T.locale().format(u)},T.labelOffset=function(t){return arguments.length?(g=+t,T):g},T.labelDelimiter=function(t){return arguments.length?(y=t,T):y},T.labelWrap=function(t){return arguments.length?(f=t,T):f},T.useClass=function(t){return arguments.length?(!0!==t&&!1!==t||(d=t),T):d},T.orient=function(t){return arguments.length?("horizontal"!=(t=t.toLowerCase())&&"vertical"!=t||(b=t),T):b},T.ascending=function(t){return arguments.length?(w=!!t,T):w},T.classPrefix=function(t){return arguments.length?(h=t,T):h},T.title=function(t){return arguments.length?(p=t,T):p},T.titleWidth=function(t){return arguments.length?(v=t,T):v},T.textWrap=function(t){return arguments.length?(textWrap=t,T):textWrap},T.on=function(){var t=C.on.apply(C,arguments);return t===C?T:t},T}m(ue,"Ft"),dt(ue,"color");const ge=(m(a=class extends A{_owner;_targetWidget;_targetWidgetMonitor;_legendOrdinal;_disabled=[];_symbolTypeMap={circle:Ot,cross:Lt,diamond:Gt,square:Ut,star:Xt,triangle:$t,wye:Qt};constructor(t){super(),this._owner=t,this._drawStartPos="origin";const e=this;this._legendOrdinal=ue().shape("path",te().type(Ot).size(150)()).shapePadding(10).shapeRadius(10).on("cellclick",function(t){e.onClick(t,this)}).on("cellover",t=>{e.onOver(t,this)}).on("cellout",t=>{e.onOut(t,this)})}isDisabled(t){return void 0!==t&&("string"==typeof t?0===t.indexOf("__")||this._disabled.indexOf(t)>=0:t instanceof W.Field?0===t.id().indexOf("__")||this._disabled.indexOf(t.id())>=0:this._disabled.indexOf(t)>=0)}filteredFields(){switch(this.dataFamily()){case"2D":return this.fields();case"ND":return this.fields().filter(t=>!this.isDisabled(t))}return this.fields()}filteredColumns(){switch(this.dataFamily()){case"2D":return this.columns();case"ND":return this.columns().filter(t=>!this.isDisabled(t))}return this.columns()}filteredData(){switch(this.dataFamily()){case"2D":return this.data().filter(t=>!this.isDisabled(t[0]));case"ND":const t={};let e=!1;return this.columns().forEach((i,o)=>{const s=this.isDisabled(i);t[o]=s,s&&(e=!0)}),e?this.data().map(e=>e.filter((e,i)=>!t[i])):this.data()}return this.data()}isRainbow(){const t=this.getWidget();return t&&t._palette&&"rainbow"===t._palette.type()}targetWidget(t){if(!arguments.length)return this._targetWidget;if(this._targetWidget=t,this._targetWidgetMonitor&&(this._targetWidgetMonitor.remove(),delete this._targetWidgetMonitor),this._targetWidget){const t=this;this._targetWidgetMonitor=this._targetWidget.monitor(function(e,i,o,s){switch(e){case"chart":case"columns":case"data":case"paletteID":t.lazyRender()}})}return this}getWidget(){return this._targetWidget&&"composite_MultiChart"===this._targetWidget.classID()?this._targetWidget.chart():this._targetWidget}getPalette(){const t=this.getWidget();if(t&&t._palette)switch(t._palette.type()){case"ordinal":return k.ordinal(t._palette.id());case"rainbow":return k.rainbow(t._palette.id())}return k.ordinal("default")}getPaletteType(){return this.getPalette().type()}fillColorFunc(){const t=this.getWidget();if(t&&t.fillColor)return t._palette&&t.paletteID&&t._palette.name!==t.paletteID()&&(t._palette=t._palette.switch(t.paletteID())),(e,i,o)=>t.fillColor(e,i,o);const e=k.ordinal(t&&t.paletteID&&t.paletteID()||"default");return(t,i,o)=>e(i)}fillColor(t,e,i){return this.fillColorFunc()(t,e,i)}_g;enter(t,e){super.enter(t,e),this._g=e.append("g").attr("class","legendOrdinal")}calcMetaData(){let t=[],e=0,i=0;const o=this.columns().length;if(this._targetWidget){const s=this.columns();switch(this.getPaletteType()){case"ordinal":const l=this.fillColorFunc();let r=0;switch(this.dataFamily()){case"2D":t=this.data().map(function(t,s){r=this.data()[s].slice(1,o).reduce((t,e)=>t+e,0);const n=this.isDisabled(t[0]);n||(e+=r);const a=t[0]+(!n&&this.showSeriesTotal()?` (${r})`:""),h=this.textSize(a);return i<h.width&&(i=h.width),[l(t,t[0],!1),t[0],a]},this);break;case"ND":t=this.columns().filter(t=>0!==t.indexOf("__")).filter(function(t,e){return e>0}).map(function(t,o){r=this.data().reduce((t,e)=>t+e[o+1],0);const n=this.isDisabled(s[o+1]),a=t+(!n&&this.showSeriesTotal()?` (${r})`:"");n||(e+=r);const h=this.textSize(a);return i<h.width&&(i=h.width),[l(void 0,t,!1),t,a]},this);break;default:t=this.columns().map(function(t){return[l(void 0,t,!1),t]},this)}break;case"rainbow":const n=this.getPalette(),a=I(this.rainbowFormat()),h=this.getWidget(),d=this.rainbowBins(),p=h._dataMinWeight,c=h._dataMaxWeight,u=(c-p)/(d-1);t.push([n(p,p,c),a(p)]);for(let e=1;e<d-1;++e){let i=u*e;Math.floor(i)>parseInt(t[0][1])&&(i=Math.floor(i)),t.push([n(i,p,c),a(i)])}t.push([n(c,p,c),a(c)])}}return{dataArr:t,total:e,maxLabelWidth:i}}update(t,e){super.update(t,e);const{dataArr:i,maxLabelWidth:o,total:s}=this.calcMetaData(),l=this.shapeRadius(),r=this.radiusToSymbolSize(l);let n=this.itemPadding();"horizontal"===this.orientation()&&(n+=o-2*l);const a=M().domain(i.map(t=>t[1])).range(i.map(t=>t[0]));this._legendOrdinal.shape("path",te().type(this._symbolTypeMap[this.symbolType()]).size(r)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(n).scale(a).labels(t=>i[t.i][2]),this._g.call(this._legendOrdinal),this.updateDisabled(e,i);const h=this._g.select(".legendCells").node().getBBox();let d=Math.abs(h.x),p=Math.abs(h.y)+1;"horizontal"===this.orientation()?("start"===this.labelAlign()?d+=1:"end"===this.labelAlign()&&(d-=1),this.width()>h.width&&(d+=(this.width()-h.width)/2)):"vertical"===this.orientation()&&(d+=1,this._containerSize.height>h.height)&&(p+=(this.height()-h.height)/2),this._g.attr("transform",`translate(${d}, ${p})`),this.pos({x:0,y:0}),this._legendOrdinal.labelOffset(this.itemPadding());const c=this._g.selectAll(".legendTotal").data(i.length&&this.showLegendTotal()?[s]:[]),u=`Total: ${s}`,g=-d,_=h.height+this.itemPadding()+1;this.enableOverflowScroll(!1),this.enableOverflow(!0),c.enter().append("text").classed("legendTotal",!0).merge(c).attr("transform",`translate(${g}, ${_})`).text(u),c.exit().remove()}updateDisabled(t,e){t.style("cursor","pointer").selectAll("path.swatch").filter((t,i)=>i<e.length).style("stroke",(t,i)=>e[i][0]).style("fill",(t,i)=>this._disabled.indexOf(t)<0?e[i][0]:"white")}postUpdate(t,e){let i;this._boundingBox&&(i=this._boundingBox.width,this._boundingBox.width=this._size.width),super.postUpdate(t,e),void 0!==i&&(this._boundingBox.width=i),this._parentRelativeDiv.style("overflow","hidden")}exit(t,e){super.exit(t,e)}radiusToSymbolSize(t){const e=Math.pow(t,2)*Math.PI;switch(this.symbolType()){case"star":return.45*e;case"triangle":return.65*e;case"cross":case"diamond":case"wye":return.75*e;case"circle":return e;case"square":return 1.3*e}}onClick(t,e){if("ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":const e=this._disabled.indexOf(t);e<0?this._disabled.push(t):this._disabled.splice(e,1),this._owner.refreshColumns(),this._owner.refreshData(),this._owner.render()}}onOver(t,e){if(q(this._owner)&&"ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":this._disabled.indexOf(t)<0&&this._owner.highlightColumn(t)}}onOut(t,e){if(q(this._owner)&&"ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":this._owner.highlightColumn()}}onDblClick(t,e){}onMouseOver(t,e){}_containerSize;resize(t){let e;if(this.fitToContent()){this._containerSize=t;const i=this.getBBox();t.width>i.width&&(i.width=t.width),t.height>i.height&&(i.height=t.height),e=super.resize.apply(this,[{...i}])}else e=super.resize.apply(this,arguments);return e}},"_Legend"),a);dt(ge,"Legend");let _e=ge;_e.prototype._class+=" layout_Legend",_e.prototype.publish("title","","string","Title"),_e.prototype.publish("symbolType","circle","set","Shape of each legend item",["circle","cross","diamond","square","star","triangle","wye"]),_e.prototype.publish("labelMaxWidth",null,"number","Max Label Width (pixels)",null,{optional:!0}),_e.prototype.publish("orientation","vertical","set","Orientation of Legend rows",["vertical","horizontal"],{tags:["Private"]}),_e.prototype.publish("dataFamily","ND","set","Type of data",["1D","2D","ND","map","graph","any"],{tags:["Private"]}),_e.prototype.publish("rainbowFormat",",","string","Rainbow number formatting",null,{tags:["Private"],optional:!0,disable:/* @__PURE__ */dt(t=>!t.isRainbow(),"disable")}),_e.prototype.publish("rainbowBins",8,"number","Number of rainbow bins",null,{tags:["Private"],disable:/* @__PURE__ */dt(t=>!t.isRainbow(),"disable")}),_e.prototype.publish("showSeriesTotal",!1,"boolean","Show value next to series"),_e.prototype.publish("showLegendTotal",!1,"boolean","Show a total of the series values under the legend",null),_e.prototype.publish("itemPadding",8,"number","Padding between legend items (pixels)"),_e.prototype.publish("shapeRadius",7,"number","Radius of legend shape (pixels)"),_e.prototype.publish("fitToContent",!0,"boolean","If true, resize will simply reapply the bounding box dimensions"),_e.prototype.publish("labelAlign","start","set","Horizontal alignment of legend item label (for horizontal orientation only)",["start","middle","end"],{optional:!0,disable:/* @__PURE__ */dt(t=>"vertical"===t.orientation(),"disable")});const ye=(m(h=class extends x{_widget;_relativeTarget;_fade;_modal;_modalHeader;_modalBody;_modalHeaderAnnotations;_modalHeaderCloseButton;_close;constructor(){super(),this._tag="div"}closeModal(){this.visible(!1)}getRelativeTarget(){let t;return this.relativeTargetId()&&(t=document.getElementById(this.relativeTargetId()),t)?t:!t&&(t=this.locateAncestor("layout_Grid"),t&&t.element)?t.element().node():document.body}setModalSize(){null!==this.fixedHeight()&&null!==this.fixedWidth()?this._modal.style("height",this.fixedHeight()).style("width",this.fixedWidth()).style("min-height",null).style("min-width",null).style("max-height",null).style("max-width",null):(this.minHeight()||this.minWidth())&&this._modal.style("min-height",this.minHeight()).style("min-width",this.minWidth()).style("max-height",this.maxHeight()).style("max-width",this.maxWidth());const t=this._modal.node().getBoundingClientRect(),e=this._modalHeader.node().getBoundingClientRect();return this._modalBody.style("height",t.height-e.height+"px").style("width",t.width),t}setFadePosition(t){this._fade.style("top",t.top+"px").style("left",t.left+"px").style("width",t.width+"px").style("height",t.height+"px")}setModalPosition(t){const e=this.setModalSize();if(null!==this.fixedTop()&&null!==this.fixedLeft())this._modal.style("top",`calc(${this.fixedTop()} + ${t.top}px)`).style("left",`calc(${this.fixedLeft()} + ${t.left}px)`);else if(null!==this.fixedHeight()&&null!==this.fixedWidth())this._modal.style("top",t.top+t.height/2-e.height/2+"px").style("left",t.left+t.width/2-e.width/2+"px");else if(this.minHeight()||this.minWidth()){const e=this._modal.node().getBoundingClientRect();this._modal.style("top",t.top+t.height/2-e.height/2+"px").style("left",t.left+t.width/2-e.width/2+"px")}}resize(t){return super.resize(),this._modal&&this.setModalSize(),this}resizeBodySync(t,e){const i=this._modalHeader.node().getBoundingClientRect();return this._modal.style("width",t+"px").style("height",e+i.height+"px").style("min-width",t+"px").style("min-height",e+i.height+"px"),this._modalHeader.style("width",t+"px"),this._modalBody.style("width",t+"px").style("height",e+"px"),this.minWidth(t+"px").minHeight(e+i.height+"px").resize({height:e+i.height,width:t})}enter(t,e){super.enter(t,e),this._fade=e.append("div").classed("layout_Modal-fade",!0).classed("layout_Modal-fadeClickable",this.enableClickFadeToClose()).classed("layout_Modal-fade-hidden",!this.showFade());const i=2*this.titleFontSize();this._modal=e.append("div").classed("layout_Modal-content",!0),this._modalHeader=this._modal.append("div").classed("layout_Modal-header",!0).style("color",this.titleFontColor()).style("font-size",this.titleFontSize()+"px").style("height",i+"px"),this._modalBody=this._modal.append("div").classed("layout_Modal-body",!0).style("height",`calc( 100% - ${i}px )`).style("overflow-x",this.overflowX()).style("overflow-y",this.overflowY()),this._modalHeader.append("div").classed("layout_Modal-title",!0).style("line-height",this.titleFontSize()+"px").style("top",this.titleFontSize()/2+"px").style("left",this.titleFontSize()/2+"px").text(this.formattedTitle()),this._modalHeaderAnnotations=this._modalHeader.append("div").classed("layout_Modal-annotations",!0),this._modalHeaderCloseButton=this._modalHeaderAnnotations.append("div").classed("layout_Modal-closeButton",!0).html('<i class="fa fa-close"></i>'),this._modalHeaderAnnotations.style("line-height",this.titleFontSize()+"px").style("right",this.titleFontSize()/2+"px").style("top",this.titleFontSize()/2+"px"),this._modalHeaderCloseButton.on("click",()=>{this.closeModal()}),this._fade.on("click",t=>{this.enableClickFadeToClose()&&this.closeModal()})}update(t,e){super.update(t,e),e.style("display",this.show()?null:"none"),this._fade.classed("layout_Modal-fade-hidden",!this.showFade()),this._relativeTarget=this.getRelativeTarget(),this.setModalSize();const i=this._relativeTarget.getBoundingClientRect();this.setFadePosition(i),this.setModalPosition(i),this.show()?(this._widget.target()||this._widget.target(this._modalBody.node()),this._widget.resize().render()):this._widget.target(null).render()}exit(t,e){this._widget&&this._widget.target(null),super.exit(t,e)}formattedTitle(){const t=this.title_exists()?this.title().trim():"";return t.length>0&&"("===t.slice(0,1)&&")"===t.slice(-1)?t.slice(1,-1):this.title()}},"_Modal"),h);dt(ye,"Modal");let fe=ye;fe.prototype._class+=" layout_Modal",fe.prototype.publish("title",null,"string","title"),fe.prototype.publish("widget",null,"widget","widget"),fe.prototype.publish("titleFontSize",18,"number","titleFontSize (in pixels)"),fe.prototype.publish("titleFontColor","#ffffff","html-color","titleFontColor"),fe.prototype.publish("relativeTargetId",null,"string","relativeTargetId"),fe.prototype.publish("show",!0,"boolean","show"),fe.prototype.publish("showFade",!0,"boolean","showFade"),fe.prototype.publish("enableClickFadeToClose",!0,"boolean","enableClickFadeToClose"),fe.prototype.publish("minWidth","400px","string","minWidth"),fe.prototype.publish("minHeight","400px","string","minHeight"),fe.prototype.publish("maxWidth","800px","string","maxWidth"),fe.prototype.publish("maxHeight","800px","string","maxHeight"),fe.prototype.publish("fixedWidth",null,"string","fixedWidth"),fe.prototype.publish("fixedHeight",null,"string","fixedHeight"),fe.prototype.publish("fixedTop",null,"string","fixedTop"),fe.prototype.publish("fixedLeft",null,"string","fixedLeft"),fe.prototype.publish("overflowX","hidden","string","overflowX"),fe.prototype.publish("overflowY","scroll","string","overflowY");const be=(m(d=class extends St{_legend=new _e(this).enableOverflow(!0);_progressBar=new D;_autoScale=!1;_resolutions={tiny:{width:100,height:100},small:{width:300,height:300}};_modal=new fe;_highlight;_scale;_orig_size;_toggleInfo=(new H).faChar("fa-info-circle").tooltip(".Description").selected(!1).on("enabled",()=>""!==this.description()).on("click",()=>{if(this._toggleInfo.selected()){this._modal.title(this.title()).widget((new F).text(this.description())).show(!0).render();const t=this._modal._close;this._modal._close=()=>{this._toggleInfo.selected(!1).render(),this._modal._close=t}}}).on("mouseMove",()=>{}).on("mouseOut",()=>{});_toggleData=(new H).faChar("fa-table").tooltip("Data").on("click",()=>{this.dataVisible(this._toggleData.selected()),this.render()});_buttonDownload=(new O).faChar("fa-download").tooltip("Download").on("click",()=>{this.downloadCSV()});_buttonDownloadImage=(new O).faChar("fa-image").tooltip("Download Image").on("click",()=>{this.downloadPNG()});_toggleLegend=(new H).faChar("fa-list-ul").tooltip("Legend").selected(!1).on("click",()=>{const t=this._toggleLegend.selected();"bottom"===this.legendPosition()?this.showBottom(t):"right"===this.legendPosition()&&this.showRight(t),this.legendVisible(t),this.render()});_spacer=new L;_titleBar=(new R).buttons([this._toggleData,this._buttonDownload,this._buttonDownloadImage,this._spacer,this._toggleLegend]);_carousel=new Bt;_table=new $;_widget;_hideLegendToggleList=["dgrid_Table"];constructor(){super(),this._tag="div"}fields(t){return arguments.length?(super.fields(t),this._legend.fields(t),this.refreshFields(),this):super.fields()}refreshFields(){return this._widget.fields(this._legend.filteredFields()),this._table.fields(this._legend.filteredFields()),this}columns(t,e){return arguments.length?(super.columns(t,e),this._legend.columns(t,e),this.refreshColumns(),this):super.columns()}refreshColumns(){return this._widget.columns(this._legend.filteredColumns()),this._table.columns(this._legend.filteredColumns()),this}data(t){return arguments.length?(super.data(t),this._legend.data(t),this.refreshData(),this):super.data()}refreshData(){return this._widget.data(this._legend.filteredData()),this._table.data(this._legend.filteredData()),this}highlight(t){return arguments.length?(this._highlight=t,this):this._highlight}startProgress(){this._progressBar.start()}finishProgress(){this._progressBar.finish()}buttons(t){return arguments.length?(this._titleBar.buttons(t),this):this._titleBar.buttons()}downloadCSV(){const t=this.downloadTitle()?this.downloadTitle():this.title()?this.title():"data",e=this.downloadTimestampSuffix()?"_"+S.timestamp():"";return S.downloadString("CSV",this._widget.export("CSV"),t+e),this}downloadPNG(){const t=this.widget();return t instanceof A&&(this.legendVisible()?t.downloadPNG(this.title(),void 0,this._legend):t.downloadPNG(this.title())),this}highlightColumn(t){if(t){const e=`series-${this.cssTag(t)}`;this._centerWA.element().selectAll(".series").each(function(){const t=C(this),i=t.classed(e);t.classed("highlight",i).classed("lowlight",!i)})}else this._centerWA.element().selectAll(".series").classed("highlight",!1).classed("lowlight",!1);return this}getResponsiveMode(){return this.enableAutoscaling()?this._autoScale?this.size().width<=this._resolutions.tiny.width||this.size().height<=this._resolutions.tiny.height?"tiny":this.size().width<=this._resolutions.small.width||this.size().height<=this._resolutions.small.height?"small":"regular":"regular":"none"}setOrigSize(){this._orig_size=JSON.parse(JSON.stringify(this.size()))}enter(t,e){super.enter(t,e),this._modal.target(this.target()).relativeTargetId(this.id()),this.top(this._titleBar),this.center(this._carousel),this._legend.targetWidget(this._widget).orientation("vertical").title("").visible(!1),this._progressBar.enter(t,e),this.setOrigSize()}preUpdateTiny(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display","none")}preUpdateSmall(t){const e=this._orig_size.width/this._resolutions.small.width,i=this._orig_size.height/this._resolutions.small.height;this._scale=Math.min(e,i);const o=this._scale===e;this.size({width:o?this._resolutions.small.width:this._orig_size.width*(1/this._scale),height:o?this._orig_size.height*(1/this._scale):this._resolutions.small.height}),t.select("div.title-icon").style("position","static"),t.selectAll("lhs").style("display","none"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden"),t.style("transform",`scale(${this._scale})`)}preUpdateRegular(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden"),t.select("div.title-icon").style("position","static"),t.style("transform","translate(0px,0px) scale(1)")}_prevdataVisible;_prevlegendVisible;_prevLegendPosition;_prevChartDataFamily;_prevChart;_prevButtons;update(t,e){super.update(t,e)}preUpdate(t,e){switch(super.preUpdate(t,e),this._prevLegendPosition!==this.legendPosition()&&(null!==this._legend.target()&&this._legend.target(null),void 0!==this._prevLegendPosition?this.swap(this._prevLegendPosition,this.legendPosition()):this[this.legendPosition()](this._legend),"right"===this.legendPosition()?(this.rightOverflowX("hidden"),this.rightOverflowY("auto"),this.bottomOverflowX("visible"),this.bottomOverflowY("visible")):(this.rightOverflowX("visible"),this.rightOverflowY("visible"),this.bottomOverflowX("auto"),this.bottomOverflowY("hidden")),this._prevLegendPosition=this.legendPosition()),this._prevdataVisible!==this.dataVisible()&&(this._prevdataVisible=this.dataVisible(),this._toggleData.selected(this._prevdataVisible),this._legend.visible(this._prevlegendVisible&&!this._prevdataVisible),this._carousel.active(this._prevdataVisible?1:0)),this._prevlegendVisible!==this.legendVisible()&&(this._prevlegendVisible=this.legendVisible(),this._toggleLegend.selected(this._prevlegendVisible),this._legend.visible(this._prevlegendVisible&&!this._prevdataVisible)),this._legend.orientation("bottom"===this.legendPosition()?"horizontal":"vertical"),this.showLeft(!this.left()),this.getResponsiveMode()){case"tiny":this.preUpdateTiny(e);break;case"small":this.preUpdateSmall(e);break;case"regular":this.preUpdateRegular(e)}const i="composite_MultiChart"===this._widget.classID()?this._widget.chart():this._widget;if(this._legend.dataFamily(i._dataFamily||"any"),this._prevChartDataFamily!==this._legend.dataFamily()&&(this._prevChartDataFamily=this._legend.dataFamily(),"any"===this._prevChartDataFamily)&&(this._toggleLegend.selected(!1),this._legend.visible(!1)),e.style("box-shadow",this.highlight()?`inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}`:"none"),-1!==this._hideLegendToggleList.indexOf(i.classID())?(this._spacer.visible(!1),this._toggleLegend.visible(!1)):(this._spacer.visible(!0),this._toggleLegend.visible(!0)),this._prevChart!==i){this._prevChart=i;const t=i?i._titleBar||i._iconBar:void 0;if(t&&t instanceof E){this._prevButtons=this._prevButtons||[...this.buttons()];const e=[...t.buttons(),new L,...this._prevButtons];t.buttons([]).render(),this.buttons(e)}else this._prevButtons&&this.buttons(this._prevButtons)}const o=[];this.dataButtonVisible()||o.push(this._toggleData),this.downloadButtonVisible()||o.push(this._buttonDownload),this.downloadImageButtonVisible()||o.push(this._buttonDownloadImage),this.legendButtonVisible()||o.push(this._toggleLegend),this._buttonDownloadImage.enabled(this.widget()instanceof A),this._titleBar.hiddenButtons(o).visible(this.titleVisible()),this.topOverlay(this.titleOverlay()||!this.titleVisible())}postUpdate(t,e){switch(super.postUpdate(t,e),this.getResponsiveMode()){case"tiny":this.postUpdateTiny(e);break;case"small":this.postUpdateSmall(e);break;case"regular":this.postUpdateRegular(e)}}postUpdateTiny(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display","none"),t.selectAll("div.data-count").style("visibility","visible").style("font-size",this.titleIconFontSize()/3+"px").style("line-height",this.titleIconFontSize()/3+"px").style("left",this.titleIconFontSize()+"px").text(this.data().length),t.style("transform","translate(0px,0px) scale(1)");const e=t.selectAll("div.title-icon"),i=e.node(),o=t.node().parentElement.getBoundingClientRect();if(i){const i=e.node().getBoundingClientRect(),s=o.height/2;e.style("position","absolute").style("left",`calc(50% - ${i.width/2}px)`).style("top",s-i.height/2+"px"),t.selectAll("div.data-count").style("position","absolute").style("left",`calc(50% + ${i.width/2}px)`).style("top",s-i.height/2+"px")}}postUpdateSmall(t){t.selectAll("lhs").style("display","none"),t.selectAll("div.title-icon").style("position","static"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden");const e=t.node().getBoundingClientRect(),i=t.node().parentElement.getBoundingClientRect();t.style("transform",`translate(${i.x-e.x}px, ${i.y-e.y}px) scale(${this._scale})`)}postUpdateRegular(t){t.selectAll("div.title-icon").style("position","static"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden")}exit(t,e){this._progressBar.exit(t,e),this.right(null),this._legend.target(null),this.center(null),this._carousel.target(null),this.top(null),this._titleBar.target(null),this._modal.target(null),delete this._prevChart,delete this._prevButtons,delete this._prevChartDataFamily,delete this._prevPos,delete this._prevdataVisible,delete this._prevlegendVisible,super.exit(t,e)}click(t,e,i){}dblclick(t,e,i){}vertex_click(t,e,i,o){o&&o.vertex}vertex_dblclick(t,e,i,o){o&&o.vertex}edge_click(t,e,i,o){o&&o.edge}edge_dblclick(t,e,i,o){o&&o.edge}},"_ChartPanel"),d);dt(be,"ChartPanel");let we=be;we.prototype._class+=" layout_ChartPanel",we.prototype.publishReset(),we.prototype.publishProxy("title","_titleBar"),we.prototype.publish("titleVisible",!0,"boolean"),we.prototype.publish("titleOverlay",!1,"boolean"),we.prototype.publishProxy("titleIcon","_titleBar"),we.prototype.publishProxy("titleIconFont","_titleBar"),we.prototype.publishProxy("titleFont","_titleBar"),we.prototype.publishProxy("titleIconFontSize","_titleBar"),we.prototype.publishProxy("titleFontSize","_titleBar"),we.prototype.publishProxy("description","_titleBar"),we.prototype.publishProxy("descriptionFont","_titleBar"),we.prototype.publishProxy("descriptionFontSize","_titleBar"),we.prototype.publish("dataVisible",!1,"boolean","Show data table"),we.prototype.publish("dataButtonVisible",!0,"boolean","Show data table button"),we.prototype.publish("downloadButtonVisible",!0,"boolean","Show data download button"),we.prototype.publish("downloadImageButtonVisible",!1,"boolean","Show image download button"),we.prototype.publish("downloadTitle","","string","File name when downloaded"),we.prototype.publish("downloadTimestampSuffix",!0,"boolean","Use timestamp as file name suffix"),we.prototype.publish("legendVisible",!1,"boolean","Show legend"),we.prototype.publish("legendButtonVisible",!0,"boolean","Show legend button"),we.prototype.publish("legendPosition","right","set","Position of legend",["right","bottom"]),we.prototype.publishProxy("legend_labelMaxWidth","_legend","labelMaxWidth"),we.prototype.publishProxy("legend_showSeriesTotal","_legend","showSeriesTotal"),we.prototype.publishProxy("legend_showLegendTotal","_legend","showLegendTotal"),we.prototype.publishProxy("legend_itemPadding","_legend","itemPadding"),we.prototype.publishProxy("legend_shapeRadius","_legend","shapeRadius"),we.prototype.publishProxy("legend_symbolType","_legend","symbolType"),we.prototype.publishProxy("legend_labelAlign","_legend","labelAlign"),we.prototype.publish("widget",null,"widget","Widget",void 0,{render:!1}),we.prototype.publish("enableAutoscaling",!1,"boolean"),we.prototype.publish("highlightSize",4,"number"),we.prototype.publish("highlightColor","#e67e22","html-color"),we.prototype.publishProxy("progress_halfLife","_progressBar","halfLife"),we.prototype.publishProxy("progress_decay","_progressBar","decay"),we.prototype.publishProxy("progress_size","_progressBar","size"),we.prototype.publishProxy("progress_color","_progressBar","color"),we.prototype.publishProxy("progress_blurBar","_progressBar","blurBar"),we.prototype.publishProxy("progress_blurSize","_progressBar","blurSize"),we.prototype.publishProxy("progress_blurColor","_progressBar","blurColor"),we.prototype.publishProxy("progress_blurOpacity","_progressBar","blurOpacity"),we.prototype.widget=function(t){if(!arguments.length)return this._widget;this._carousel.widgets([t,this._table]),this._widget=t,this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());const e=this,i=this._widget;return i.click=function(){e.click.apply(e,arguments)},i.dblclick=function(){e.dblclick.apply(e,arguments)},i.vertex_click=function(){e.vertex_click.apply(e,arguments)},i.vertex_dblclick=function(){e.vertex_dblclick.apply(e,arguments)},i.edge_click=function(){e.edge_click.apply(e,arguments)},i.edge_dblclick=function(){e.edge_dblclick.apply(e,arguments)},this};const me=(m(p=class extends x{constructor(){super()}enter(t,e){super.enter(t,e),C(t.parentNode).style("height","100%").style("width","100%")}update(t,e){super.update(t,e);const i=this,o=[];this.updateFlexParent(e);const s=e.selectAll(".FlexGrid-list-item").data(this.widgets(),t=>t.id());s.enter().append("div").classed("FlexGrid-list-item",!0).each(function(t){t.target(this)}).merge(s).style("min-height",this.itemMinHeight()+"px").style("min-width",this.itemMinWidth()+"px").style("flex-basis",(t,e)=>{const i=this.widgetsFlexBasis()[e];return void 0!==i?i:this.flexBasis()}).style("flex-grow",(t,e)=>{const i=this.widgetsFlexGrow()[e];return void 0!==i?i:this.flexGrow()}).style("border-width",this.borderWidth()+"px").style("border-color",this.itemBorderColor()).each(function(){this.firstChild.style.display="none"}).each(function(){const t=this.getBoundingClientRect();o.push([t.width,t.height])}).each(function(t,e){this.firstChild.style.display="block",t.resize({width:o[e][0]-2*i.borderWidth(),height:o[e][1]-2*i.borderWidth()})}),s.exit().remove()}exit(t,e){super.exit(t,e)}updateFlexParent(t){t.style("height","100%").style("flex-direction","horizontal"===this.orientation()?"row":"column").style("flex-wrap",this.flexWrap()).style("align-items",this.alignItems()).style("align-content",this.alignContent()).style("overflow-x",()=>this.forceXScroll()||"horizontal"===this.orientation()&&"nowrap"===this.flexWrap()&&!this.disableScroll()?"scroll":"hidden").style("overflow-y",()=>this.forceYScroll()||"vertical"===this.orientation()&&"nowrap"===this.flexWrap()&&!this.disableScroll()?"scroll":"hidden")}},"_FlexGrid"),p);dt(me,"FlexGrid");let xe=me;function ve(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}m(ve,"Vt"),xe.prototype._class+=" layout_FlexGrid",xe.prototype.publish("itemBorderColor","transparent","html-color","Color of list item borders"),xe.prototype.publish("borderWidth",0,"number","Width of list item borders (pixels)"),xe.prototype.publish("orientation","horizontal","set","Controls the flex-direction of the list items",["horizontal","vertical"]),xe.prototype.publish("flexWrap","wrap","set","Controls the line wrap when overflow occurs",["nowrap","wrap","wrap-reverse"]),xe.prototype.publish("disableScroll",!1,"boolean","If false, scrollbar will show (when flexWrap is set to 'nowrap')",null,{disable:/* @__PURE__ */dt(t=>"nowrap"!==t.flexWrap(),"disable")}),xe.prototype.publish("forceXScroll",!1,"boolean","If true, horzontal scrollbar will show"),xe.prototype.publish("forceYScroll",!1,"boolean","If true, vertical scrollbar will show"),xe.prototype.publish("itemMinHeight",64,"number","Minimum height of a list item (pixels)"),xe.prototype.publish("itemMinWidth",64,"number","Minimum width of a list item (pixels)"),xe.prototype.publish("alignItems","stretch","set","Controls normal alignment of items",["flex-start","center","flex-end","stretch"]),xe.prototype.publish("alignContent","stretch","set","Controls normal alignment of item rows",["flex-start","center","flex-end","stretch","space-between","space-around"]),xe.prototype.publish("flexGrow",1,"number","Default flex-grow style for all list items"),xe.prototype.publish("flexBasis","10%","string","Default flex-basis style for all list items"),xe.prototype.publish("widgetsFlexGrow",[],"array","Array of flex-grow values keyed on the widgets array"),xe.prototype.publish("widgetsFlexBasis",[],"array","Array of flex-basis values keyed on the widgets array"),xe.prototype.publish("widgets",[],"widgetArray","Array of widgets to be rendered as list items"),dt(ve,"getDefaultExportFromCjs");var Ce,Te={exports:{}};function Se(){return Ce?Te.exports:(Ce=1,Te.exports=function(){var t=/* @__PURE__ */dt(function(t,e){for(var i in this._options=e,this.defaults)this._options.hasOwnProperty(i)||(this._options[i]=this.defaults[i]);this.items=t,this._adjustSizeOfItems(),this.generateGrid()},"GridList");t.cloneItems=function(t,e){var i,o;for(void 0===e&&(e=[]),i=0;i<t.length;i++)for(o in e[i]||(e[i]={}),t[i])e[i][o]=t[i][o];return e},t.prototype={defaults:{lanes:5,direction:"horizontal"},toString:/* @__PURE__ */dt(function(){var t,e,i,o=this.grid.length,s="\n #|",l="\n --";for(e=0;e<o;e++)s+=" "+this._padNumber(e," "),l+="---";for(s+=l,e=0;e<this._options.lanes;e++)for(s+="\n"+this._padNumber(e," ")+"|",i=0;i<o;i++)s+=" ",s+=(t=this.grid[i][e])?this._padNumber(this.items.indexOf(t),"0"):"--";return s+"\n"},"toString"),generateGrid:/* @__PURE__ */dt(function(){var t;for(this._resetGrid(),t=0;t<this.items.length;t++)this._markItemPositionToGrid(this.items[t])},"generateGrid"),resizeGrid:/* @__PURE__ */dt(function(t){var e=0;this._options.lanes=t,this._adjustSizeOfItems(),this._sortItemsByPosition(),this._resetGrid();for(var i=0;i<this.items.length;i++){var o=this.items[i],s=this._getItemPosition(o);this._updateItemPosition(o,this.findPositionForItem(o,{x:e,y:0})),e=Math.max(e,s.x)}this._pullItemsToLeft()},"resizeGrid"),findPositionForItem:/* @__PURE__ */dt(function(t,e,i){var o,s,l;for(o=e.x;o<this.grid.length;o++)if(void 0!==i){if(l=[o,i],this._itemFitsAtPosition(t,l))return l}else for(s=e.y;s<this._options.lanes;s++)if(l=[o,s],this._itemFitsAtPosition(t,l))return l;var r=this.grid.length,n=0;return void 0!==i&&this._itemFitsAtPosition(t,[r,i])&&(n=i),[r,n]},"findPositionForItem"),moveItemToPosition:/* @__PURE__ */dt(function(t,e){var i=this._getItemPosition({x:e[0],y:e[1],w:t.w,h:t.h});this._updateItemPosition(t,[i.x,i.y]),this._resolveCollisions(t)},"moveItemToPosition"),resizeItem:/* @__PURE__ */dt(function(t,e){var i=e.w||t.w,o=e.h||t.h;this._updateItemSize(t,i,o),this._resolveCollisions(t),this._pullItemsToLeft()},"resizeItem"),getChangedItems:/* @__PURE__ */dt(function(t,e){for(var i=[],o=0;o<t.length;o++){var s=this._getItemByAttribute(e,t[o][e]);s.x===t[o].x&&s.y===t[o].y&&s.w===t[o].w&&s.h===t[o].h||i.push(s)}return i},"getChangedItems"),_sortItemsByPosition:/* @__PURE__ */dt(function(){this.items.sort(function(t,e){var i=this._getItemPosition(t),o=this._getItemPosition(e);return i.x!=o.x?i.x-o.x:i.y!=o.y?i.y-o.y:0}.bind(this))},"_sortItemsByPosition"),_adjustSizeOfItems:/* @__PURE__ */dt(function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];void 0===e.autoSize&&(e.autoSize=0===e.w||0===e.h),e.autoSize&&("horizontal"===this._options.direction?e.h=this._options.lanes:e.w=this._options.lanes)}},"_adjustSizeOfItems"),_resetGrid:/* @__PURE__ */dt(function(){this.grid=[]},"_resetGrid"),_itemFitsAtPosition:/* @__PURE__ */dt(function(t,e){var i,o,s=this._getItemPosition(t);if(e[0]<0||e[1]<0)return!1;if(e[1]+s.h>this._options.lanes)return!1;for(i=e[0];i<e[0]+s.w;i++){var l=this.grid[i];if(l)for(o=e[1];o<e[1]+s.h;o++)if(l[o]&&l[o]!==t)return!1}return!0},"_itemFitsAtPosition"),_updateItemPosition:/* @__PURE__ */dt(function(t,e){null!==t.x&&null!==t.y&&this._deleteItemPositionFromGrid(t),this._setItemPosition(t,e),this._markItemPositionToGrid(t)},"_updateItemPosition"),_updateItemSize:/* @__PURE__ */dt(function(t,e,i){null!==t.x&&null!==t.y&&this._deleteItemPositionFromGrid(t),t.w=e,t.h=i,this._markItemPositionToGrid(t)},"_updateItemSize"),_markItemPositionToGrid:/* @__PURE__ */dt(function(t){var e,i,o=this._getItemPosition(t);for(this._ensureColumns(o.x+o.w),e=o.x;e<o.x+o.w;e++)for(i=o.y;i<o.y+o.h;i++)this.grid[e][i]=t},"_markItemPositionToGrid"),_deleteItemPositionFromGrid:/* @__PURE__ */dt(function(t){var e,i,o=this._getItemPosition(t);for(e=o.x;e<o.x+o.w;e++)if(this.grid[e])for(i=o.y;i<o.y+o.h;i++)this.grid[e][i]==t&&(this.grid[e][i]=null)},"_deleteItemPositionFromGrid"),_ensureColumns:/* @__PURE__ */dt(function(t){var i;for(i=0;i<t;i++)this.grid[i]||this.grid.push(new e(this._options.lanes))},"_ensureColumns"),_getItemsCollidingWithItem:/* @__PURE__ */dt(function(t){for(var e=[],i=0;i<this.items.length;i++)t!=this.items[i]&&this._itemsAreColliding(t,this.items[i])&&e.push(i);return e},"_getItemsCollidingWithItem"),_itemsAreColliding:/* @__PURE__ */dt(function(t,e){var i=this._getItemPosition(t),o=this._getItemPosition(e);return!(o.x>=i.x+i.w||o.x+o.w<=i.x||o.y>=i.y+i.h||o.y+o.h<=i.y)},"_itemsAreColliding"),_resolveCollisions:/* @__PURE__ */dt(function(t){this._tryToResolveCollisionsLocally(t)||this._pullItemsToLeft(t),this._pullItemsToLeft()},"_resolveCollisions"),_tryToResolveCollisionsLocally:/* @__PURE__ */dt(function(e){var i=this._getItemsCollidingWithItem(e);if(!i.length)return!0;var o,s,l,r,n=new t([],this._options);t.cloneItems(this.items,n.items),n.generateGrid();for(var a=0;a<i.length;a++){var h=n.items[i[a]],d=this._getItemPosition(h),p=this._getItemPosition(e);if(o=[p.x-d.w,d.y],s=[p.x+p.w,d.y],l=[d.x,p.y-d.h],r=[d.x,p.y+p.h],n._itemFitsAtPosition(h,o))n._updateItemPosition(h,o);else if(n._itemFitsAtPosition(h,l))n._updateItemPosition(h,l);else if(n._itemFitsAtPosition(h,r))n._updateItemPosition(h,r);else{if(!n._itemFitsAtPosition(h,s))return!1;n._updateItemPosition(h,s)}}return t.cloneItems(n.items,this.items),this.generateGrid(),!0},"_tryToResolveCollisionsLocally"),_pullItemsToLeft:/* @__PURE__ */dt(function(t){if(this._sortItemsByPosition(),this._resetGrid(),t){var e=this._getItemPosition(t);this._updateItemPosition(t,[e.x,e.y])}for(var i=0;i<this.items.length;i++){var o=this.items[i],s=this._getItemPosition(o);if(!t||o!=t){var l=this._findLeftMostPositionForItem(o),r=this.findPositionForItem(o,{x:l,y:0},s.y);this._updateItemPosition(o,r)}}},"_pullItemsToLeft"),_findLeftMostPositionForItem:/* @__PURE__ */dt(function(t){for(var e=0,i=this._getItemPosition(t),o=0;o<this.grid.length;o++)for(var s=i.y;s<i.y+i.h;s++){var l=this.grid[o][s];if(l){var r=this._getItemPosition(l);this.items.indexOf(l)<this.items.indexOf(t)&&(e=r.x+r.w)}}return e},"_findLeftMostPositionForItem"),_getItemByAttribute:/* @__PURE__ */dt(function(t,e){for(var i=0;i<this.items.length;i++)if(this.items[i][t]===e)return this.items[i];return null},"_getItemByAttribute"),_padNumber:/* @__PURE__ */dt(function(t,e){return t>=10?t:e+t},"_padNumber"),_getItemPosition:/* @__PURE__ */dt(function(t){return"horizontal"===this._options.direction?t:{x:t.y,y:t.x,w:t.h,h:t.w}},"_getItemPosition"),_setItemPosition:/* @__PURE__ */dt(function(t,e){"horizontal"===this._options.direction?(t.x=e[0],t.y=e[1]):(t.x=e[1],t.y=e[0])},"_setItemPosition")};var e=/* @__PURE__ */dt(function(t){for(var e=0;e<t;e++)this.push(null)},"GridCol");return e.prototype=[],t}())}m(Se,"Ut"),dt(Se,"requireGridList");var Pe=Se();const Be=/* @__PURE__ */ve(Pe),ze=/* @__PURE__ */pt({__proto__:null,default:Be},[Pe]),Ae=ze&&Be||ze,We=(m(c=class extends x{divItems;gridList;items;itemsMap;origItems;cellWidth;cellHeight;dragItem;dragItemPos;_d3Drag;_d3DragResize;_selectionBag;_scrollBarWidth;constructor(){super(),this._tag="div",this._selectionBag=new S.Selection(this),this.content([])}getDimensions(){const t={width:0,height:0};return this.content().forEach(function(e){t.width<e.gridCol()+e.gridColSpan()&&(t.width=e.gridCol()+e.gridColSpan()),t.height<e.gridRow()+e.gridRowSpan()&&(t.height=e.gridRow()+e.gridRowSpan())},this),t}clearContent(t){this.content(this.content().filter(function(e){if(!t)return e.target(null),!1;let i=e;for(;i;){if(t===i)return e.target(null),!1;i=i.widget?i.widget():null}return!0}))}setContent(t,e,i,o,s,l){if(s=s||1,l=l||1,o=o||"",this.content(this.content().filter(function(i){return i.gridRow()!==t||i.gridCol()!==e||(i.target(null),!1)})),i){const r=(new wt).gridRow(t).gridCol(e).widget(i).title(o).gridRowSpan(s).gridColSpan(l);this.content().push(r)}return this}sortedContent(){return this.content().sort(function(t,e){return t.gridRow()===e.gridRow()?t.gridCol()-e.gridCol():t.gridRow()-e.gridRow()})}getCell(t,e){let i=null;return this.content().some(function(o){return t>=o.gridRow()&&t<o.gridRow()+o.gridRowSpan()&&e>=o.gridCol()&&e<o.gridCol()+o.gridColSpan()&&(i=o,!0)}),i}getWidgetCell(t){let e=null;return this.content().some(function(i){return i.widget().id()===t&&(e=i,!0)}),e}getContent(t){let e=null;return this.content().some(function(i){return i.widget().id()===t&&(e=i.widget(),!0)}),e}cellToGridItem(t){return{x:t.gridCol(),y:t.gridRow(),w:t.gridColSpan(),h:t.gridRowSpan(),id:t.id(),cell:t}}gridItemToCell(t){t.cell.gridCol(t.x).gridRow(t.y).gridColSpan(t.w).gridRowSpan(t.h)}resetItemsPos(){this.origItems.forEach(function(t){const e=this.itemsMap[t.id];e.x=t.x,e.y=t.y},this)}initGridList(){this.itemsMap={},this.items=this.content().map(function(t){const e=this.cellToGridItem(t);return this.itemsMap[e.id]=e,e},this),this.origItems=this.content().map(this.cellToGridItem),this.gridList=new Ae(this.items,{direction:this.snapping(),lanes:"horizontal"===this.snapping()?this.snappingRows():this.snappingColumns()})}killGridList(){this.gridList=null,delete this.items,delete this.itemsMap}enter(t,e){super.enter(t,e),this._scrollBarWidth=B.getScrollbarWidth();const i=this;this._d3Drag=z().subject(function(t){const e=i.cellToGridItem(t);return{x:e.x*i.cellWidth,y:e.y*i.cellHeight}}).on("start",function(t){if(!i.designMode())return;P().sourceEvent.stopPropagation(),i.initGridList();const o=i.itemsMap[t.id()];i.dragItem=e.append("div").attr("class","dragging").style("transform",function(){return"translate("+o.x*i.cellWidth+"px, "+o.y*i.cellHeight+"px)"}).style("width",function(){return o.w*i.cellWidth-i.gutter()+"px"}).style("height",function(){return o.h*i.cellHeight-i.gutter()+"px"}),i.selectionBagClick(t)}).on("drag",function(t){if(!i.designMode())return;const e=P();e.sourceEvent.stopPropagation();const o=i.itemsMap[t.id()];e.x<0&&(e.x=0),e.x+o.w*i.cellWidth>i.snappingColumns()*i.cellWidth&&(e.x=i.snappingColumns()*i.cellWidth-o.w*i.cellWidth),e.y<0&&(e.y=0),e.y+o.h*i.cellWidth>i.snappingRows()*i.cellWidth&&(e.y=i.snappingRows()*i.cellWidth-o.h*i.cellWidth);const s=[Math.max(0,Math.floor((e.x+i.cellWidth/2)/i.cellWidth)),Math.max(0,Math.floor((e.y+i.cellHeight/2)/i.cellHeight))];o.x===s[0]&&o.y===s[1]||("none"!==i.snapping()?(i.resetItemsPos(),i.gridList.moveItemToPosition(o,s)):(o.x=s[0],o.y=s[1]),t.gridCol()===o.x&&t.gridRow()===o.y||(i.items.forEach(i.gridItemToCell),i.updateGrid(!1,100))),i.dragItem.style("transform",function(){return"translate("+e.x+"px, "+e.y+"px)"}).style("width",function(){return o.w*i.cellWidth+"px"}).style("height",function(){return o.h*i.cellHeight+"px"})}).on("end",function(){i.designMode()&&(P().sourceEvent.stopPropagation(),i.dragItem.remove(),i.dragItem=null,i.killGridList())}),this._d3DragResize=z().subject(function(t){const e=i.cellToGridItem(t);return{x:(e.x+e.w-1)*i.cellWidth,y:(e.y+e.h-1)*i.cellHeight}}).on("start",function(t){if(!i.designMode())return;P().sourceEvent.stopPropagation(),i.initGridList();const o=i.itemsMap[t.id()];i.dragItem=e.append("div").attr("class","resizing").style("transform",function(){return"translate("+o.x*i.cellWidth+"px, "+o.y*i.cellHeight+"px)"}).style("width",function(){return o.w*i.cellWidth-i.gutter()+"px"}).style("height",function(){return o.h*i.cellHeight-i.gutter()+"px"}),i.dragItemPos={x:o.x,y:o.y}}).on("drag",function(t){if(!i.designMode())return;const e=P();e.sourceEvent.stopPropagation();const o=i.itemsMap[t.id()],s=[Math.max(0,Math.round(e.x/i.cellWidth)),Math.max(0,Math.round(e.y/i.cellHeight))],l={w:Math.max(1,s[0]-o.x+1),h:Math.max(1,s[1]-o.y+1)};o.w===l.w&&o.h===l.h||("none"!==i.snapping()?(i.resetItemsPos(),i.gridList.resizeItem(o,l)):(o.w=l.w,o.h=l.h),t.gridColSpan()===o.w&&t.gridRowSpan()===o.h||(i.items.forEach(i.gridItemToCell),i.updateGrid(o.id,100))),i.dragItem.style("width",function(){return(1-o.x)*i.cellWidth+e.x-i.gutter()+"px"}).style("height",function(){return(1-o.y)*i.cellHeight+e.y-i.gutter()+"px"})}).on("end",function(){i.designMode()&&(P().sourceEvent.stopPropagation(),i.dragItem.remove(),i.dragItem=null,i.killGridList())})}updateGrid(t,e=0,i=!1){e=e||0;const o=this;this.divItems.classed("draggable",this.designMode()).transition().duration(e).style("left",function(t){return t.gridCol()*o.cellWidth+o.gutter()/2+"px"}).style("top",function(t){return t.gridRow()*o.cellHeight+o.gutter()/2+"px"}).style("width",function(t){return t.gridColSpan()*o.cellWidth-o.gutter()+"px"}).style("height",function(t){return t.gridRowSpan()*o.cellHeight-o.gutter()+"px"}).on("end",function(e){e.surfaceShadow_default(o.surfaceShadow()).surfacePadding_default(o.surfacePadding()).surfaceBorderWidth_default(o.surfaceBorderWidth()).surfaceBackgroundColor_default(o.surfaceBackgroundColor()),!0!==t&&t!==e.id()||e.resize().lazyRender()})}update(t,e){super.update(t,e),this._placeholderElement.style("overflow-x","width"===this.fitTo()?"hidden":null),this._placeholderElement.style("overflow-y","width"===this.fitTo()?"scroll":null);const i=this.getDimensions(),o=this.width()-("width"===this.fitTo()?this._scrollBarWidth:0);if(this.cellWidth=o/i.width,this.cellHeight="all"===this.fitTo()?this.height()/i.height:this.cellWidth,this.designMode()){const t=Math.min(this.width()/this.snappingColumns(),this.height()/this.snappingRows()),e=Math.floor(t);this.cellWidth=e,this.cellHeight=this.cellWidth}const s=this,l=e.selectAll("#"+this.id()+" > .ddCell").data(this.content(),function(t){return t.id()});this.divItems=l.enter().append("div").attr("class","ddCell").each(function(t){t.target(this),t.__grid_watch=t.monitor(function(e,i,o){!s._renderCount||"snapping"!==e&&0!==e.indexOf("grid")||i===o||s.gridList||(s.initGridList(),"none"!==s.snapping()&&s.gridList.resizeGrid("horizontal"===s.snapping()?s.snappingRows():s.snappingColumns()),s.items.forEach(s.gridItemToCell),s.updateGrid(t.id(),100),s.killGridList())}),C(this).append("div").attr("class","resizeHandle").call(s._d3DragResize).append("div").attr("class","resizeHandleDisplay")}).merge(l),this.divItems.each(function(t){const e=C(this);s.designMode()?e.call(s._d3Drag):e.on("mousedown.drag",null).on("touchstart.drag",null)}),this.divItems.select(".resizeHandle").style("display",this.designMode()?null:"none"),this.updateGrid(!0),l.exit().each(function(t){t.target(null),t.__grid_watch&&t.__grid_watch.remove()}).remove();const r=e.selectAll("#"+this.id()+" > .laneBackground").data(this.designMode()?[""]:[]);r.enter().insert("div",":first-child").attr("class","laneBackground").style("left","1px").style("top","1px").on("click",function(){s.selectionBagClear()}).merge(r).style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px"),r.exit().each(function(){s.selectionBagClear()}).remove();const n=e.selectAll("#"+this.id()+" > .lane").data(this.designMode()?[""]:[]);n.enter().append("div").attr("class","lane").style("left","1px").style("top","1px"),n.style("display",this.showLanes()?null:"none").style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px").style("background-image","linear-gradient(to right, grey 1px, transparent 1px), linear-gradient(to bottom, grey 1px, transparent 1px)").style("background-size",this.cellWidth+"px "+this.cellHeight+"px"),n.exit().remove()}exit(t,e){this.content().forEach(t=>t.target(null)),super.exit(t,e)}_createSelectionObject(t){return{_id:t._id,element:/* @__PURE__ */dt(()=>t._element,"element"),widget:t}}selection(t){return arguments.length?(this._selectionBag.set(t.map(function(t){return this._createSelectionObject(t)},this)),this):this._selectionBag.get().map(function(t){return t._id})}selectionBagClear(){this._selectionBag.isEmpty()||(this._selectionBag.clear(),this.postSelectionChange())}selectionBagClick(t){if(null!==t){const e=this._createSelectionObject(t);if(P().sourceEvent.ctrlKey)this._selectionBag.isSelected(e)?(this._selectionBag.remove(e),this.postSelectionChange()):(this._selectionBag.append(e),this.postSelectionChange());else{const t=this._selectionBag.get();1===t.length&&t[0]._id===e._id?this.selectionBagClear():this._selectionBag.set([e]),this.postSelectionChange()}}}postSelectionChange(){}applyLayout(t){this.divItems.each((e,i)=>{if(t[i]){const[o,s,l,r]=t[i];e.gridCol(o).gridRow(s).gridColSpan(l).gridRowSpan(r)}}),this.updateGrid(!0)}vizActivation(t){}},"_Grid"),c);dt(We,"Grid");let ke=We;ke.prototype._class+=" layout_Grid",ke.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),ke.prototype.publish("showLanes",!0,"boolean","Show snapping lanes when in design mode",null,{tags:["Basic"],disable:/* @__PURE__ */dt(t=>!t.designMode(),"disable")}),ke.prototype.publish("fitTo","all","set","Sizing Strategy",["all","width"],{tags:["Basic"]}),ke.prototype.publish("snapping","vertical","set","Snapping Strategy",["vertical","horizontal","none"]),ke.prototype.publish("snappingColumns",12,"number","Snapping Columns"),ke.prototype.publish("snappingRows",16,"number","Snapping Rows"),ke.prototype.publish("gutter",6,"number","Gap Between Widgets",null,{tags:["Basic"]}),ke.prototype.publish("surfaceShadow",!0,"boolean","3D Shadow"),ke.prototype.publish("surfacePadding",null,"string","Cell Padding (px)",null,{tags:["Intermediate"]}),ke.prototype.publish("surfaceBorderWidth",1,"number","Width (px) of Cell Border",null,{tags:["Intermediate"]}),ke.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),ke.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Basic"],render:!1});const Ie=(m(u=class extends xe{constructor(){super(),this.orientation_default("horizontal"),this.flexWrap_default("nowrap")}},"_HorizontalList"),u);dt(Ie,"HorizontalList"),Ie.prototype._class+=" layout_HorizontalList";const Me=(m(g=class extends x{_contentContainer;_widgetPlacements;_widgetRatios;constructor(){super(),this._tag="div",this._widgetPlacements=[],this._widgetRatios=[]}addLayer(t,e="default",i=1,o=1){const s=this.widgets();return s.push(t||(new F).text("No widget defined for layer.")),this.widgets(s),this._widgetPlacements.push(e),this._widgetRatios.push([i,o]),this}enter(t,e){super.enter(t,e),this._contentContainer=e.append("div").attr("class","container")}update(t,e){super.update(t,e);const i=this;e.style("padding",this.surfacePadding()+"px");const o=this._contentContainer.selectAll(".content.id"+this.id()).data(this.widgets(),function(t){return t.id()});o.enter().append("div").attr("class","content id"+this.id()).each(function(t,e){t.target(this)}).merge(o).each(function(t,e){const o={width:i.clientWidth(),height:i.clientHeight()},s=i.widgetSize(e,o),l=i.widgetPosition(e,o,s);this.style.top=l.y+"px",this.style.left=l.x+"px",t.resize(s).render()}),o.exit().each(function(t,e){t.target(null)}).remove(),o.order()}widgetSize(t,e){return this._widgetPlacements[t],{width:e.width*this._widgetRatios[t][0],height:e.height*this._widgetRatios[t][1]}}widgetPosition(t,e,i){switch(this._widgetPlacements[t]){default:return{x:0,y:0};case"top":return{x:e.width/2-i.width/2,y:0};case"bottom":return{x:e.width/2-i.width/2,y:e.height-i.height};case"left":return{x:0,y:e.height/2-i.height/2};case"right":return{x:e.width-i.width,y:e.height/2-i.height/2};case"center":return{x:e.width/2-i.width/2,y:e.height/2-i.height/2}}}},"_Layered"),g);dt(Me,"Layered");let De=Me;De.prototype._class+=" layout_Layered",De.prototype.publish("surfacePadding",0,"number","Padding"),De.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});const He=(m(_=class extends x{_surfaceButtons;_originalPosition;constructor(){super(),this._tag="div",this._surfaceButtons=[]}updateState(t){t=t||!this.popupState(),this.popupState(t).render()}enter(t,e){super.enter(t,e),this.widget().target(t),this._originalPosition=this.position()}update(t,e){super.update(t,e),e.style("visibility",this.popupState()?null:"hidden").style("opacity",this.popupState()?null:0).style("width",this.shrinkWrap()?this.widget().width()+"px":this._size.width+"px").style("height",this.shrinkWrap()?this.widget().height()+"px":this._size.height+"px"),0===this.widget().size().height&&this.widget().resize(this.size())}postUpdate(t,e){let i,o;switch(this.centerPopup()){case"container":this._placeholderElement&&(i=parseInt(this._placeholderElement.style("width"))/2-this.widget().width()/2,o=parseInt(this._placeholderElement.style("height"))/2-this.widget().height()/2),this.position("absolute");break;case"window":i=window.innerWidth/2-this.widget().width()/2,o=window.innerHeight/2-this.widget().height()/2,this.position("fixed");break;default:i=0,o=0,this.position(this._originalPosition)}this.pos({x:i,y:o}),super.postUpdate(t,e),e.style("position",this.position()).style("left",this.left()+"px").style("right",this.right()+"px").style("top",this.top()+"px").style("bottom",this.bottom()+"px")}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}click(t){}},"_Popup"),_);dt(He,"Popup");let Fe=He;Fe.prototype._class+=" layout_Popup",Fe.prototype.publish("popupState",!1,"boolean","State of the popup, visible (true) or hidden (false)",null,{}),Fe.prototype.publish("shrinkWrap",!1,"boolean","The popup parent container either shrinks to the size of its contents (true) or expands to fit thge popup's parentDiv (false)",null,{}),Fe.prototype.publish("centerPopup","none","set","Center the widget in its container element (target) or in the window",["none","container","window"],{}),Fe.prototype.publish("top",null,"number","Top position property of popup",null,{}),Fe.prototype.publish("bottom",null,"number","Bottom position property of popup",null,{}),Fe.prototype.publish("left",null,"number","Left position property of popup",null,{}),Fe.prototype.publish("right",null,"number","Right position property of popup",null,{}),Fe.prototype.publish("position","relative","set","Value of the 'position' property",["absolute","relative","fixed","static","initial","inherit"],{tags:["Private"]}),Fe.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]});const Oe=(m(y=class extends x{_tabContainer;_contentContainer;constructor(){super(),this._tag="div"}clearTabs(){return this.labels([]),this.widgets([]),this}addTab(t,e,i,o){const s=t.size();0===s.width&&0===s.height&&t.size({width:"100%",height:"100%"});const l=this.labels(),r=this.widgets();i&&this.activeTabIdx(this.widgets().length),l.push(e);const n=(new ft).widget(t||(new F).text("No widget defined for tab"));return r.push(n),this.labels(l),this.widgets(r),o&&o(n),this}widgetSize(t){const e=this.clientWidth();let i=this.clientHeight();const o=this._tabContainer.node().getBoundingClientRect();return void 0!==o.height&&(i-=o.height),{width:e,height:i}}enter(t,e){super.enter(t,e),this._tabContainer=e.append("div"),this._contentContainer=e.append("div")}update(t,e){super.update(t,e);const i=this;e.style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null);const o=this._tabContainer.selectAll(".tab-button.id"+this.id()).data(this.showTabs()?this.labels():[],function(t){return t});o.enter().append("span").attr("class","tab-button id"+this.id()).style("cursor","pointer").on("click",function(t,e){i.click(i.widgets()[e].widget(),t,e),i.activeTabIdx(e).render()}).merge(o).classed("active",function(t,e){return i.activeTabIdx()===e}).text(function(t){return t}),o.exit().remove();const s=this._contentContainer.selectAll(".tab-content.id"+this.id()).data(this.widgets(),function(t){return t.id()});s.enter().append("div").attr("class","tab-content id"+this.id()).each(function(t,e){t.target(this)}).merge(s).classed("active",function(t,e){return i.activeTabIdx()===e}).style("display",function(t,e){return i.activeTabIdx()===e?"block":"none"}).each(function(t,e){if(t.visible(i.activeTabIdx()===e),i.activeTabIdx()===e){const e=i.widgetSize(C(this));t.surfaceBorderWidth(i.showTabs()?null:0).surfacePadding(i.showTabs()?null:0).resize(e)}}),s.exit().each(function(t,e){t.target(null)}).remove(),"bottom"===this.tabLocation()?(this._tabContainer.attr("class","on_bottom").style("top",this._contentContainer.node().offsetHeight+this.surfacePadding()+"px").style("position","absolute"),this._contentContainer.style("top",this.surfacePadding_exists()?this.surfacePadding()+"px":null).style("position","absolute")):(this._tabContainer.attr("class","on_top").style("top",null).style("position","relative"),this._contentContainer.style("top",this._tabContainer.node().offsetHeight+this.surfacePadding()+"px").style("position","absolute"))}click(t,e,i){}},"_Tabbed"),y);dt(Oe,"Tabbed");let Le=Oe;Le.prototype._class+=" layout_Tabbed",Le.prototype.publish("showTabs",!0,"boolean","Show Tabs",null,{}),Le.prototype.publish("surfacePadding",4,"number","Padding"),Le.prototype.publish("activeTabIdx",0,"number","Index of active tab",null,{}),Le.prototype.publish("labels",[],"array","Array of tab labels sharing an index with ",null,{tags:["Private"]}),Le.prototype.publish("tabLocation","top","set","Position the tabs at the bottom of the widget",["top","bottom"],{tags:["Private"]}),Le.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});const Re=(m(f=class extends x{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);const i=this;e.attr("title",i.title()).style("background-color",this.backgroundColor());const o=e.selectAll("div.toolbar-title").data(this.title()?[this.title()]:[]);o.enter().append("div").classed("toolbar-title",!0).append("span"),o.selectAll("div.toolbar-title > span").style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("color",this.fontColor_exists()?this.fontColor():null).style("font-family",this.fontFamily_exists()?this.fontFamily():null).style("font-weight",this.fontBold_exists()?this.fontBold()?"bold":"normal":null).style("background-color",this.backgroundColor_exists()?this.backgroundColor():null).text(i.title()),o.exit().remove();const s=e.selectAll("div.toolbar-child").data(null!==this.widgets()?this.widgets():[],function(t){return t.id()});s.enter().insert("div","div.toolbar-title").each(function(t,e){const o=i.widgetClasses()[e]?i.widgetClasses()[e]+" toolbar-child":"toolbar-child";C(this).classed(o,!0),t.target(this)}),s.exit().each(function(t){t.target(null)}).remove(),s.order()}render(t){const e=this;return super.render(function(i){const o=e.element().node().getBoundingClientRect();let s=o.left+o.width;e.element().selectAll("div.toolbar-child").each(function(t,e){const i=this.getBoundingClientRect();s>i.left&&(s=i.left)}),e.element().select(".toolbar-title").style("width",s-o.left-4+"px"),t&&t(i)})}exit(t,e){this.widgets().forEach(function(t){t.target(null)}),super.exit(t,e)}},"_Toolbar"),f);dt(Re,"Toolbar");let Ee=Re;Ee.prototype._class+=" layout_Toolbar",Ee.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),Ee.prototype.publish("fontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("fontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("fontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("fontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("backgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),Ee.prototype.publish("responsive",!0,"boolean","Adapts to pixel width",null,{tags:["Basic"]}),Ee.prototype.publish("widgets",[],"widgetArray","Child widgets of the toolbar",null,{tags:["Basic"]}),Ee.prototype.publish("widgetClasses",[],"array","Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)",null,{tags:["Basic"]});const Ge=(m(b=class extends xe{constructor(){super(),this.orientation_default("vertical"),this.flexWrap_default("nowrap")}},"_VerticalList"),b);function Ye(t){return new Promise(function(e,i){const o=S.parseClassID(t);require&&require([o.package],function(t){let i=null;t&&t[o.widgetID]&&(i=t[o.widgetID]),e(o.memberWidgetID?i.prototype?i.prototype[o.memberWidgetID]:i[o.memberWidgetID]:i)})})}function Ne(t){return Promise.all(t.map(Ye))}dt(Ge,"VerticalList"),Ge.prototype._class+=" layout_VerticalList",function(){try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.layout_AbsoluteSurface{pointer-events:none!important}.layout_AbsoluteSurface>.placeholder{position:relative;overflow:hidden;pointer-events:all}.layout_Accordion>ul{position:relative}.layout_Accordion.open>span{font-style:italic}.layout_Accordion.closed>ul{height:0px;overflow:hidden}.layout_Accordion.open>ul{display:block}.layout_Accordion>.collapsible-icon,.layout_Accordion>.collapsible-title{cursor:pointer;box-sizing:border-box}.layout_Accordion>.collapsible-title{display:block;width:100%}.layout_Accordion>.collapsible-title{font-size:13px;color:#fff;padding:4px 8px;height:26px;-webkit-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);-moz-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);box-shadow:inset 0 -1px 1px #0003}.layout_Accordion li{background-color:#fff}.layout_Accordion>ul,.layout_Accordion>.collapsible-title{background-color:#333}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>.collapsible-title{background-color:#555}.layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#777}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#999}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#bbb}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ccc}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ddd}.layout_Accordion>ul,.layout_Accordion>span{padding-left:0}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>span{padding-left:12px}.layout_Accordion>.collapsible-title:before{padding:4px 8px;position:absolute;left:0;top:0}.layout_Accordion>.collapsible-icon{position:absolute;top:0;right:0;width:24px;height:24px;color:#fff}.layout_Surface{box-sizing:border-box;margin:0;border:1px solid #e5e5e5;overflow:hidden;height:100%;width:100%}.layout_Surface.shadow2{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0003,0 1px 5px #0000001f}.layout_Surface>h3{margin:0;padding:2px;background-color:#e5e5e5}.layout_Surface .html-button-container{position:absolute;right:0;top:3px}.layout_Surface>div{padding:8px}.layout_Surface .html-button-container .surface-button{margin-right:5px}.layout_Surface .html-button-container .surface-button i{opacity:.8}.layout_Surface .html-button-container .surface-button:hover{opacity:1}.layout_Surface .html-button-container .surface-button:active{opacity:.5}div[draggable=true].hideDragCellContent.content-icon:before{content:"";font-family:FontAwesome;position:absolute;top:calc(50% - 74px);left:calc(50% - 56px);font-size:100px}div[draggable=true].hideDragCellContent.content-icon-Line:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Pie:before{top:calc(50% - 72px);left:calc(50% - 45px);content:""}div[draggable=true].hideDragCellContent.content-icon-Area:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Gauge:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Table:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Form:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Grid:before,div[draggable=true].hideDragCellContent.content-icon-Graph:before,div[draggable=true].hideDragCellContent.content-icon-Border:before,div[draggable=true].hideDragCellContent.content-icon-Tabbed:before,div[draggable=true].hideDragCellContent.content-icon-Accordion:before,div[draggable=true].hideDragCellContent.content-icon-MultiChart:before,div[draggable=true].hideDragCellContent.content-icon-MultiChartSurface:before{content:""}div[draggable=true].hideDragCellContent.content-icon-ChoroplethStates:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethStatesHeat:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCounties:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCountries:before,div[draggable=true].hideDragCellContent.content-icon-GMap:before,div[draggable=true].hideDragCellContent.content-icon-GMapHeat:before,div[draggable=true].hideDragCellContent.content-icon-GMapGraph:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Text:before,div[draggable=true].hideDragCellContent.content-icon-TextBox:before,div[draggable=true].hideDragCellContent.content-icon-FAChar:before{content:""}.layout_Cell .update-indicator{box-sizing:border-box;position:absolute;top:0;left:0;padding:0;z-index:1000;border-width:0px;border-style:solid;pointer-events:none}.layout_Border{width:100%;height:100%}.layout_Border>.border-content{width:100%;height:100%;position:relative}.layout_Border>.borderHandle{width:6px;height:6px;background-color:#444;opacity:.3;position:absolute;visibility:hidden}.layout_Border.design-mode>.borderHandle{visibility:visible}.layout_Border>.borderHandle:hover{background-color:#666}.layout_Border>.borderHandle.borderHandleDisabled{display:none}.layout_Border>.borderHandle_top,.layout_Border>.borderHandle_bottom{cursor:ns-resize}.layout_Border>.borderHandle_left,.layout_Border>.borderHandle_right{cursor:ew-resize}.layout_Border .cell{border-radius:5px;border:1px solid #e5e5e5;display:inline-block;overflow:hidden}.layout_Border .cell h2{margin:0;padding-top:4px;-webkit-margin:0px;text-align:center}.layout_Border .layout_BorderCell.over{border:2px dashed #000}.layout_Border .dragItem{z-index:-1;opacity:.33}.layout_Border .notDragItem{z-index:-1;opacity:1}.layout_Border div[draggable=true]{opacity:.75;cursor:default}.layout_Border div[draggable=true] .dragHandle{opacity:1}.layout_Border div[draggable=true] .dragHandle_n,.layout_Border div[draggable=true] .dragHandle_e,.layout_Border div[draggable=true] .dragHandle_s,.layout_Border div[draggable=true] .dragHandle_w{background-color:#aaa}.layout_Border div[draggable=true] .dragHandle_nw,.layout_Border div[draggable=true] .dragHandle_ne,.layout_Border div[draggable=true] .dragHandle_se,.layout_Border div[draggable=true] .dragHandle_sw{background-color:#333}.layout_Border div[draggable=true] .dragHandle_nw{cursor:nw-resize}.layout_Border div[draggable=true] .dragHandle_n{cursor:n-resize}.layout_Border div[draggable=true] .dragHandle_ne{cursor:ne-resize}.layout_Border div[draggable=true] .dragHandle_e{cursor:e-resize}.layout_Border div[draggable=true] .dragHandle_se{cursor:se-resize}.layout_Border div[draggable=true] .dragHandle_s{cursor:s-resize}.layout_Border div[draggable=true] .dragHandle_sw{cursor:sw-resize}.layout_Border div[draggable=true] .dragHandle_w{cursor:w-resize}.layout_Border div[draggable=false]>div>.dragHandle{display:none}.layout_Border .grid-drop-target{position:fixed;box-sizing:border-box;border:2px dashed #7f8c8d;border-radius:0;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Border .grid-drop-target.drop-target-over{border:2px dashed #179BD7;background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px 12px)}.layout_Border2{display:flex;flex-direction:column}.layout_Border2>.body{margin:0;padding:0;display:flex;flex-flow:row}.layout_Border2>.body>.center{flex:1}.layout_Border2>.header{display:block}.layout_Border2>.footer{display:block}.layout_Carousel>div{position:relative;overflow:hidden}.layout_Carousel>div>.carouselItem{position:absolute}.layout_Modal-header{background-color:#3f51b5;overflow:hidden}.layout_Modal-body{background-color:#fff;overflow-y:scroll;overflow-x:hidden}.layout_Modal-title,.layout_Modal-annotations{position:absolute}.layout_Modal-closeButton{cursor:pointer}.layout_Modal-closeButton:hover{opacity:.7}.layout_Modal-closeButton:active{opacity:.5}.layout_Modal-fade{position:fixed;background-color:#000;opacity:.5;z-index:10000}.layout_Modal-content{position:fixed;background-color:#fff;z-index:10100}.layout_Modal-fade-hidden{display:none}.layout_Modal-fadeClickable{cursor:pointer}.layout_ChartPanel .series.highlight{stroke-width:2px;opacity:1}.layout_ChartPanel .series.lowlight{opacity:.3!important}.layout_FlexGrid{display:flex}.FlexGrid-list-item{overflow:hidden;border-style:solid;flex-grow:1}.layout_Grid>.ddCell{position:absolute}.layout_Grid>.laneBackground{position:absolute;border-style:solid;border-width:1px;background:#f5f5f5}.layout_Grid>.lane{position:absolute;border-style:none;opacity:.25;border-radius:0;pointer-events:none}.layout_Grid>.ddCell.draggable{border-style:solid;border-width:1px;background-color:#f8f8ff;border-radius:0;cursor:move}.layout_Grid>.ddCell.draggable>.resizeHandle{bottom:0;right:0;width:8px;height:8px;border-style:none;position:absolute;cursor:nwse-resize}.layout_Grid>.ddCell.draggable .resizeHandleDisplay{bottom:2px;right:2px;width:4px;height:4px;border-style:solid;border-left-width:0px;border-top-width:0px;border-right-width:2px;border-bottom-width:2px;border-color:#a9a9a9;background-color:none;position:absolute}.layout_Grid>.ddCell.draggable .resizeHandleDisplay:hover{border-color:orange}.layout_Grid>.dragging{border-style:solid;border-width:1px;border-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Grid>.resizing{border-style:solid;border-width:1px;border-color:gray;background-color:orange;border-radius:0;position:absolute;opacity:.3;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,orange 4px 8px)}.layout_Grid>.ddCell.draggable .common_Widget.selected{border-style:solid;border-width:1px;border-color:red;background-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6400001a 4px 8px)}.layout_Grid #drag-me:before{content:"#" attr(id);font-weight:700}.layout_Layered{pointer-events:none}.layout_Layered>.container>.content{position:absolute}.layout_Layered>.container>.content>div>.common_Widget,.layout_Layered>.container>.content>div>svg>.common_Widget{pointer-events:all}.layout_Tabbed .tab-button{position:relative;top:1px;display:inline-block;border-left:1px solid #ddd;border-top:1px solid #ddd;border-right:1px solid #ddd;background-color:transparent;margin-right:4px;padding:2px 2px 4px;background-color:#ccc}.layout_Tabbed .tab-button.active{background-color:#fff;z-index:999}.layout_Tabbed .on_bottom .tab-button{border-bottom:1px solid #ddd;border-top:none;top:-1px}.layout_Toolbar{height:100%;background-color:#ddd;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-title{display:inline-block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);margin-left:4px;font-weight:700;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-child{position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);float:right;margin-left:4px;margin-right:4px;line-height:16px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}(),m(Ye,"requireWidget"),m(Ne,"requireWidgets");const Ve=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,requireWidget:Ye,requireWidgets:Ne},Symbol.toStringTag,{value:"Module"})),Xe=class _MultiChart extends x{_allCharts={};_chartTypeDefaults;_chartTypeProperties;_chartMonitor;_switchingTo;constructor(){super(),J.call(this),K.call(this),this._tag="div",this._allCharts={},this._allChartTypes.forEach(function(t){const e=JSON.parse(JSON.stringify(t));e.widget=null,this._allCharts[t.id]=e,this._allCharts[t.display]=e,this._allCharts[t.widgetClass]=e},this),this._chartTypeDefaults={},this._chartTypeProperties={}}fields(t){const e=super.fields.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().fields();this.chart().fields(t)}return e}columns(t,e){const i=x.prototype.columns.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().columns();this.chart().columns(t,e)}return i}data(t){const e=x.prototype.data.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().data();this.chart().data(t)}return e}hasOverlay(){return this.chart()&&this.chart().hasOverlay()}visible(t){return arguments.length?(this.chart()&&this.chart().visible(t),this):this.chart()&&this.chart().visible()}chartTypeDefaults(t){return arguments.length?(this._chartTypeDefaults=t,this):this._chartTypeDefaults}chartTypeProperties(t){return arguments.length?(this._chartTypeProperties=t,this):this._chartTypeProperties}getChartDataFamily(){return this._allCharts[this.chartType()].family}requireContent(t,e){const i=S.parseClassID(this._allCharts[t].widgetClass);switch(i.package){case"@hpcc-js/chart":import("@hpcc-js/chart").then(t=>{e(new t[i.widgetID])});break;case"@hpcc-js/dgrid":import("@hpcc-js/dgrid").then(t=>{e(new t[i.widgetID])});break;default:Ye(this._allCharts[t].widgetClass).then(function(t){e(new t)})}}switchChart(t){if(this._switchingTo===this.chartType())return void(t&&t(this));this._switchingTo&&console.warn("Attempting switch to: "+this.chartType()+", before previous switch is complete ("+this._switchingTo+")"),this._switchingTo=this.chartType();const e=this.chart(),i=this;this.requireContent(this.chartType(),function(o){if(o!==e){const t=i.size();o.fields(i.fields()).data(i.data()).size(t),i.chart(o),e&&e.size({width:1,height:1}).render()}delete i._switchingTo,t&&t(this)})}update(t,e){super.update(t,e);const i=e.selectAll(".multiChart").data(this.chart()?[this.chart()]:[],function(t){return t._id});i.enter().append("div").attr("class","multiChart").each(function(t){t.target(this)});const o=this.chart();if(o){for(const t in this._chartTypeDefaults)if(o[t+"_default"])try{o[t+"_default"](this._chartTypeDefaults[t])}catch(l){console.warn("Exception Setting Default: "+t)}else console.warn("Unknown Default: "+t);this._chartTypeDefaults={};for(const t in this._chartTypeProperties)if(o[t])try{o[t](this._chartTypeProperties[t])}catch(l){console.warn("Exception Setting Property: "+t)}else console.warn("Unknown Property: "+t);this._chartTypeProperties={}}const s=this;i.each(function(t){t.resize(s.size())}),i.exit().transition().each(function(t){t.target(null)}).remove()}exit(t,e){this._chartMonitor&&(this._chartMonitor.remove(),delete this._chartMonitor),this.chart()&&this.chart().target(null),super.exit(t,e)}render(t){if(this.chartType()&&(!this.chart()||this.chart().classID()!==this._allCharts[this.chartType()].widgetClass)){const t=this,e=arguments;return this.switchChart(function(){x.prototype.render.apply(t,e)}),this}return x.prototype.render.apply(this,arguments)}};m(Xe,"MultiChart");let Ue=Xe;Ue.prototype._class+=" composite_MultiChart",Ue.prototype.implements(J.prototype),Ue.prototype.implements(K.prototype),Ue.prototype._otherChartTypes=[{id:"FORM",display:"Form",widgetClass:"form_FieldForm"}].map(function(t){return t.family="other",t}),Ue.prototype._graphChartTypes=[{id:"GRAPH",display:"Graph",widgetClass:"graph_Graph"},{id:"ADJACENCY_GRAPH",display:"Graph",widgetClass:"graph_AdjacencyGraph"},{id:"GRAPHC",display:"GraphC",widgetClass:"graph_GraphC"}].map(function(t){return t.family="GRAPH",t}),Ue.prototype._1DChartTypes=[].map(function(t){return t.family="1D",t}),Ue.prototype._2DChartTypes=[{id:"SUMMARY",display:"Summary",widgetClass:"chart_Summary"},{id:"BUBBLE",display:"Bubble",widgetClass:"chart_Bubble"},{id:"PIE",display:"Pie",widgetClass:"chart_Pie"},{id:"WORD_CLOUD",display:"Word Cloud",widgetClass:"other_WordCloud"}].map(function(t){return t.family="2D",t}),Ue.prototype._NDChartTypes=[{id:"COLUMN",display:"Column",widgetClass:"chart_Column"},{id:"BAR",display:"Bar",widgetClass:"chart_Bar"},{id:"LINE",display:"Line",widgetClass:"chart_Line"},{id:"AREA",display:"Area",widgetClass:"chart_Area"},{id:"STEP",display:"Step",widgetClass:"chart_Step"},{id:"SCATTER",display:"Scatter",widgetClass:"chart_Scatter"},{id:"HEXBIN",display:"Hex Bin",widgetClass:"chart_HexBin"}].map(function(t){return t.family="ND",t}),Ue.prototype._mapChartTypes=[{id:"CHORO_USSTATES",display:"US State Choropleth",widgetClass:"map_ChoroplethStates"},{id:"CHORO_USCOUNTIES",display:"US County Choropleth",widgetClass:"map_ChoroplethCounties"},{id:"CHORO_COUNTRIES",display:"Country Choropleth",widgetClass:"map_ChoroplethCountries"},{id:"GMAP_CHORO_USCOUNTIES",display:"Google Map US County Choropleth",widgetClass:"map_GMapCounties"},{id:"GOOGLE_MAP",display:"Google Map",widgetClass:"map_GMapLayered"},{id:"OPENSTREET",display:"Open Street Map",widgetClass:"map_OpenStreet"}].map(function(t){return t.family="map",t}),Ue.prototype._anyChartTypes=[{id:"TABLE",display:"Table",widgetClass:"dgrid_Table"},{id:"TABLE_LEGACY",display:"Table (legacy)",widgetClass:"other_Table"},{id:"TABLE_NESTED",display:"Nested Table",widgetClass:"other_NestedTable"},{id:"TABLE_CALENDAR",display:"Table driven Calendar Heat Map",widgetClass:"other_CalendarHeatMap"},{id:"TABLE_BULLET",display:"Table driven bullet chart",widgetClass:"chart_Bullet"},{id:"TABLE_SELECT",display:"Table driven select",widgetClass:"other_Select"},{id:"TABLE_AUTOCOMPLETE",display:"Table driven auto complete",widgetClass:"other_AutoCompleteText"},{id:"TABLE_OPPORTUNITY",display:"Table driven opportunity widget",widgetClass:"graph_Opportunity"},{id:"TABLE_TREE",display:"Table driven tree",widgetClass:"tree_Dendrogram"},{id:"TABLE_TREEMAP",display:"Table driven Treemap",widgetClass:"tree_Treemap"},{id:"TABLE_SANKEY",display:"Table driven Sankey",widgetClass:"graph_Sankey"},{id:"TABLE_GMAP_PIN",display:"Table driven Google Map (pins)",widgetClass:"map_GMapPin"},{id:"TABLE_GMAP_PINLINE",display:"Table driven Google Map (pins/lines)",widgetClass:"map_GMapPinLine"},{id:"TABLE_XML_TREE",display:"Table driven XML Tree",widgetClass:"tree_Indented"}].map(function(t){return t.family="any",t}),Ue.prototype._allChartTypes=Ue.prototype._otherChartTypes.concat(Ue.prototype._graphChartTypes.concat(Ue.prototype._1DChartTypes.concat(Ue.prototype._2DChartTypes.concat(Ue.prototype._NDChartTypes.concat(Ue.prototype._mapChartTypes.concat(Ue.prototype._anyChartTypes)))))),Ue.prototype._allMap=j(Ue.prototype._allChartTypes,function(t){return t.family}),Ue.prototype._allFamilies=Ue.prototype._allMap.keys(),Ue.prototype._allChartTypesMap={},Ue.prototype._allChartTypesByClass={},Ue.prototype._allChartTypes.forEach(function(t){t.widgetPath=S.widgetPath(t.widgetClass),Ue.prototype._allChartTypesMap[t.id]=t,Ue.prototype._allChartTypesByClass[t.widgetClass]=t}),Ue.prototype.publishReset(),Ue.prototype.publish("hideRowOnLegendClick",!1,"boolean","Enable/Disable hiding row on legend clicks",null,{tags:["Basic"]}),Ue.prototype.publish("chartType","BUBBLE","set","Chart Type",Ue.prototype._allChartTypes.map(function(t){return t.id}),{tags:["Basic"]}),Ue.prototype.publish("chart",null,"widget","Chart",null,{tags:["Basic"]});const je=Ue.prototype.chart;Ue.prototype.chart=function(t){const e=je.apply(this,arguments);if(arguments.length){const e=this;this._allChartTypesByClass[t.classID()]?this.chartType(this._allChartTypesByClass[t.classID()].id):console.warn("Unknown Class ID: "+t.classID()),t.click=function(t,i,o){e.click.apply(e,arguments)},t.dblclick=function(t,i,o){e.dblclick.apply(e,arguments)},t.vertex_click=function(t,i,o,s){e.vertex_click.apply(e,arguments)},t.vertex_dblclick=function(t,i,o,s){e.vertex_dblclick.apply(e,arguments)},t.edge_click=function(t,i,o,s){e.edge_click.apply(e,arguments)},t.edge_dblclick=function(t,i,o,s){e.edge_dblclick.apply(e,arguments)},this._chartMonitor&&(this._chartMonitor.remove(),delete this._chartMonitor),this._chartMonitor=t.monitor(function(i,o,s){e.broadcast(i,o,s,t)})}return e};const $e=class _Summary extends x{constructor(){super()}enter(t,e){super.enter(t,e),e.append("p")}update(t,e){super.update(t,e),e.select("p").text(this.text())}};m($e,"Summary"),$e.prototype.publish("text","","string");const qe=class _MultiChartPanel extends we{constructor(){super(),this.widget((new Ue).chartType("COLUMN"))}multiChart(){return this._widget}chartType(t){return arguments.length?(this._widget.chartType(t),this):this._widget.chartType()}chart(t){return arguments.length?(this._widget.chart(t),this):this._widget.chart()}chartTypeDefaults(t){return arguments.length?(this._widget.chartTypeDefaults(t),this):this._widget.chartTypeDefaults()}chartTypeProperties(t){return arguments.length?(this._widget.chartTypeProperties(t),this):this._widget.chartTypeProperties()}update(t,e){super.update(t,e),this._widget instanceof Ue&&this._legend.dataFamily(this._widget.getChartDataFamily()),super.update(t,e)}};m(qe,"MultiChartPanel");let Je=qe;Je.prototype._class+=" composite_MultiChartPanel";const Ke=class _Dermatology extends xt{_toolbar;_propEditor;_showProperties;_propsButton;_prevWidget;constructor(){super(),this._toolbar=(new Ee).title("Dermatology"),this._propEditor=(new it).show_settings(!0)}showProperties(t){if(!arguments.length)return this._showProperties;this._showProperties=t,this.rightPercentage(0).rightSize(this._showProperties?360:0).setContent("right",this._showProperties?this._propEditor:null);const e=this.widget();return e&&e.designMode&&e.designMode(this._showProperties),this}toggleProperties(){return this.showProperties(!this.showProperties())}enter(t,e){super.enter(t,e),this.topPercentage(0).topSize(0).setContent("top",this._toolbar),this.getCell("top").surfaceShadow(!0);const i=this;this._propsButton=(new Z).id(this.id()+"_props").value("Properties").on("click",function(){i.toggleProperties().render()}),this._toolbar.widgets([this._propsButton])}update(t,e){this.topPercentage(0).topSize(this.showToolbar()?32:0),super.update(t,e);const i=this.widget();e.style("background-color",i&&i.surfaceShadow?null:"white")}render(t){const e=this.widget();return e!==this._prevWidget&&(e&&e.surfaceShadow&&e.surfaceBackgroundColor_default("white"),this.setContent("center",e),this._propEditor.widget(e),this._prevWidget=e),super.render(t)}showToolbar;showToolbar_exists;widget;widget_exists};m(Ke,"Dermatology");let Ze=Ke;Ze.prototype._class+=" composite_Dermatology",Ze.prototype.publish("showToolbar",!0,"boolean","Show Toolbar"),Ze.prototype.publish("widget",null,"widget","Widget");const Qe=class _MegaChart extends xt{_chart=new Ue;_toolbar=new Ee;_valueTitle=new F;_domainTitle=new F;_legend=new ot;_csvButton;_infoButton;_maximizeButton;_legendButton;_chartTypeSelect;_prevLegendPosition;_prevShowToolbar;_1DChartTypes;_2DChartTypes;_NDChartTypes;_anyChartTypes;_allChartTypes;_contentClasses;_dataCount;constructor(){super(),this._tag="div";const t=this;this._chart.click=function(){t.click.apply(t,arguments)},this._chart.dblclick=function(){t.dblclick.apply(t,arguments)},this._chart.vertex_click=function(){t.vertex_click.apply(t,arguments)},this._chart.vertex_dblclick=function(){t.vertex_dblclick.apply(t,arguments)},this._chart.edge_click=function(){t.edge_click.apply(t,arguments)},this._chart.edge_dblclick=function(){t.edge_dblclick.apply(t,arguments)}}toolbarWidgets(t){return arguments.length?(this._toolbar.widgets(t),this):this._toolbar.widgets()}chartTypeDefaults(t){return arguments.length?(this._chart.chartTypeDefaults(t),this):this._chart.chartTypeDefaults()}chartTypeProperties(t){return arguments.length?(this._chart.chartTypeProperties(t),this):this._chart.chartTypeProperties()}fields(t){return arguments.length?(this._chart.fields(t),this):this._chart.fields()}columns(t,e){return arguments.length?(this._chart.columns(t,e),this):this._chart.columns()}data(t){return arguments.length?(this._chart.data(t),this):this._chart.data()}downloadCSV(){return S.downloadString("CSV",this._chart.export("CSV")),this}enter(t,e){super.enter(t,e);const i=this;this.topShrinkWrap(!1).topPercentage(0).topSize(30),this._dataCount=(new st).classed({"composite_MegaChart-dataCount":!0}).id(this.id()+"_dataCount").html('<span class="MegaChart-dataCount-label">Count:</span> <span class="MegaChart-dataCount-value">'+(this.data()?this.data().length:"0")+"</span>").overflowX("visible").overflowY("visible"),this._csvButton=(new Q).classed({"composite_MegaChart-CSV":!0}).id(this.id()+"_csv").value("CSV"),this._csvButton.click=function(t){i.downloadCSV()},this._infoButton=(new Q).classed({"composite_MegaChart-Info":!0}).id(this.id()+"_info").value(this.infoIcon()),this._maximizeButton=(new Q).classed({"composite_MegaChart-Maximize":!0}).id(this.id()+"_maximize").value(""),this._maximizeButton.click=function(t){const e=i.target();let o=e;const s=C(e).classed("__hpccisMaximized"),l=i.locateAncestor("layout_Grid");o=l?l.element().node():document.body;const r=C(i.target());if(s){const o=e.parentElement.getBoundingClientRect(),s=parseInt(getComputedStyle(e,null).getPropertyValue("padding-top").replace("px","")),l=parseInt(getComputedStyle(e,null).getPropertyValue("padding-left").replace("px","")),n=parseInt(getComputedStyle(e,null).getPropertyValue("padding-right").replace("px","")),a=parseInt(getComputedStyle(e,null).getPropertyValue("padding-bottom").replace("px",""));i.contentDiv.style("opacity",0).transition(100),r.transition().style("top",o.top+"px").style("left",o.left+"px").style("width",o.width-l-n+"px").style("height",o.height-s-a+"px").each("end",function(){r.style("position",e.__old_position),r.style("z-index",e.__old_zindex),r.style("background-color",e.__old_backgroundColor),r.style("box-shadow",e.__old_boxshadow),i.resize({width:o.width-l-n,height:o.height-s-a}).render(function(){i.contentDiv.transition().style("opacity",1)}),t.value("").render()})}else{e.__old_position=e.style.position,e.__old_zindex=e.style.zIndex,e.__old_boxshadow=e.style.boxShadow,e.__old_backgroundColor=i.element().style("background-color");const s=C(o).datum(),l=s.target(),n=s?l.getBoundingClientRect():o.getBoundingClientRect(),a=parseInt(getComputedStyle(l,null).getPropertyValue("padding-top").replace("px","")),h=parseInt(getComputedStyle(l,null).getPropertyValue("padding-left").replace("px","")),d=parseInt(getComputedStyle(l,null).getPropertyValue("padding-right").replace("px","")),p=parseInt(getComputedStyle(l,null).getPropertyValue("padding-bottom").replace("px",""));i.contentDiv.style("opacity",0).transition(100),r.style("position","fixed").style("z-index",999999).style("box-shadow","0 8px 8px 0 rgba(0,0,0,.14),0 12px 4px -8px rgba(0,0,0,.2),0 4px 20px 0 rgba(0,0,0,.12)").style("background-color",e.__old_backgroundColor).transition().style("top",n.top+a+"px").style("left",n.left+h+"px").style("width",n.width-h-d+"px").style("height",n.height-a-p+"px").each("end",function(){r.style("background-color",i.maximizedBackgroundColor()),i.resize({width:n.width-h-d,height:n.height-a-p}).render(function(){i.contentDiv.transition().style("opacity",1)}),t.value("").render()})}C(e).classed("__hpccisMaximized",!s)},this._legendButton=(new tt).classed({"composite_MegaChart-legend":!0}).id(this.id()+"_legend").type("checkbox").inlineLabel("Legend: "),this._legendButton.click=function(t){i.render()},this._chartTypeSelect=(new et).classed({"composite_MegaChart-chartType":!0}).id(this.id()+"_chartType").selectOptions(this._allChartTypes.map(function(t){return[t.id,t.display]})).value(this.chartType()),this._chartTypeSelect.change=function(t){i.chartType(t.value()).render()},this.setContent("center",this._chart),this._legend.targetWidget(this._chart).orientation(-1!==["top","bottom"].indexOf(this.legendPosition())?"horizontal":"vertical").fixedSize(!0),this._prevLegendPosition=this.legendPosition(),this.valueAxisTitle()&&this.setContent("left",this._valueTitle.rotation(-90)).leftShrinkWrap(!0),this.domainAxisTitle()&&this.setContent("bottom",this._domainTitle).bottomShrinkWrap(!0),"none"!==this.legendPosition()&&this.setContent(this.legendPosition(),this._legend)[this.legendPosition()+"ShrinkWrap"](!0)}update(t,e){function i(t,e,i){if(i&&-1===t.indexOf(e))t.push(e);else if(!i){const i=t.indexOf(e);i>=0&&t.splice(i,1)}}m(i,"showHideButton"),this._chart&&"function"==typeof this._chart.hideRowOnLegendClick&&this._chart.hideRowOnLegendClick(this.hideRowOnLegendClick()),this._dataCount.html('<span class="MegaChart-dataCount-label">Count:</span> <span class="MegaChart-dataCount-value">'+(this.data()?this.data().length:"0")+"</span>"),this._chartTypeSelect.value(this.chartType());const o=this.toolbarWidgets();i(o,this._csvButton,this.showCSV()),i(o,this._maximizeButton,this.showMaximize()),i(o,this._legendButton,this.toolbarShowLegend()),i(o,this._chartTypeSelect,this.showChartSelect()),i(o,this._infoButton,this.showInfoButton()),i(o,this._dataCount,this.showCount()),this.toolbarWidgets(o),this._prevShowToolbar!==this.showToolbar()&&(this.setContent("top",this.showToolbar()?this._toolbar:null),this._prevShowToolbar=this.showToolbar()),this._toolbar.fontSize(this.titleFontSize()).fontColor(this.titleFontColor()).fontFamily(this.titleFontFamily()).fontBold(this.titleFontBold()).backgroundColor(this.titleBackgroundColor()),this._chart.data(this.data()),this._chart.chartType()!==this.chartType()&&this._chart.chartType(this.chartType());let s=this.legendPosition();this.toolbarShowLegend()&&!this._legendButton.checked()&&(s="none"),this._prevLegendPosition!==s&&("none"!==this._prevLegendPosition&&this.clearContent(this._prevLegendPosition),this._prevLegendPosition=s,"none"!==s&&(this._legend=(new ot).targetWidget(this.getContent("center").fixedSize(!0)),this.setContent(s,this._legend),this._legend.orientation(-1!==["top","bottom"].indexOf(s)?"horizontal":"vertical"))),this._contentClasses=this.getContentClasses(),this.valueAxisTitle()&&"common_Text"!==this._contentClasses.left&&"left"!==s&&this.setContent("left",this._valueTitle.rotation(-90)),this.domainAxisTitle()&&"common_Text"!==this._contentClasses.bottom&&"bottom"!==s&&this.setContent("bottom",this._domainTitle).bottomShrinkWrap(!0),this._legend.dataFamily(this._chart.getChartDataFamily()),super.update(t,e)}exit(t,e){super.exit(t,e)}getContentClasses(){const t={},e=this.getContent("top"),i=this.getContent("right"),o=this.getContent("bottom"),s=this.getContent("left");return t.top=null!==e?e.classID():void 0,t.right=null!==i?i.classID():void 0,t.bottom=null!==o?o.classID():void 0,t.left=null!==s?s.classID():void 0,t}serializeState(){const t={title:this.title(),data:this.data()},e=this.chart();return e&&e.serializeState&&(t.chart=e.serializeState(),delete t.chart.data),t}deserializeState(t){if(t){this.title(t.title).data(t.data);const e=this.chart();e&&t.chart&&e.serializeState&&e.deserializeState(t.chart)}return this}click(t,e,i){}dblclick(t,e,i){}vertex_click(t,e,i,o){o&&o.vertex}vertex_dblclick(t,e,i,o){o&&o.vertex}edge_click(t,e,i,o){o&&o.edge}edge_dblclick(t,e,i,o){o&&o.edge}hideRowOnLegendClick;hideRowOnLegendClick_exists;showToolbar;showToolbar_exists;titleFontSize;titleFontSize_exists;titleFontColor;titleFontColor_exists;titleFontFamily;titleFontFamily_exists;titleFontBold;titleFontBold_exists;titleBackgroundColor;titleBackgroundColor_exists;maximizedBackgroundColor;maximizedBackgroundColor_exists;showChartSelect;showChartSelect_exists;showCSV;showCSV_exists;showCount;showCount_exists;showMaximize;showMaximize_exists;toolbarShowLegend;toolbarShowLegend_exists;showInfoButton;showInfoButton_exists;infoIcon;infoIcon_exists;legendPosition;legendPosition_exists;title;title_exists;domainAxisTitle;domainAxisTitle_exists;valueAxisTitle;valueAxisTitle_exists;chartType;chartType_exists;chart;chart_exists};m(Qe,"MegaChart");let ti=Qe;function ei(t,e){if(e=e&&"1.14.2-dev"!==e?e:"1.18.0",!t.__version)return t;const i=S.parseVersionString(t.__version),o=S.parseVersionString(e);if(1===i.major&&14===i.minor){console.info("Upgrading old persist from "+t.__version+" to "+e);let i=JSON.stringify(t);i=i.split('"'+t.__version).join('"'+e);const s=JSON.parse(i);return s.__properties&&s.__properties.content&&s.__properties.content.forEach(function(t){JSON.stringify(t).split("graph_Graph").length>1&&o.minor>=16&&(t.__properties.widget.__id=t.__properties.widget.__properties.widget.__id,t.__properties.widget.__class="composite_MegaChart",t.__properties.widget.__properties.showCSV=!1,t.__properties.widget.__properties.chartType="GRAPH",t.__properties.widget.__properties.chart=t.__properties.widget.__properties.widget,delete t.__properties.widget.__properties.chart.__id,delete t.__properties.widget.__properties.widget),void 0===t.__properties.fields&&(t.__properties.fields=[])}),s}return t}function ii(t,e){const i=[];return lt.widgetPropertyWalker(t,null,(t,o)=>{if(t[o.id+"_reset"](),void 0!==e.__properties[o.id])switch(o.type){case"widget":const s=o.id;i.push(si(e.__properties[o.id]).then(e=>(e._owner=t,t[s](e),e)));break;case"widgetArray":case"propertyArray":const l=o.id,r=e.__properties[o.id];if(r.length){const e=[];for(const i of r)e.push(si(i).then(e=>(e._owner=t,e)));i.push(Promise.all(e).then(e=>{t[l](e)}))}break;default:t[o.id](e.__properties[o.id])}}),Promise.all(i).then(i=>{if(e.__data)for(const o in e.__data)if(e.__data.HasOwnProperty(o))if("data"===o)t.data(e.__data[o]);else console.warn("Unexpected __data item: "+o),t[o](e.__data[o]);return e.__state&&(t.deserializeState?t.deserializeState(e.__state):e.__state.data&&t.data&&t.data(e.__state.data)),t})}function oi(t,e){"string"==typeof e&&(e=JSON.parse(e)),e.__id&&0!==e.__id.indexOf(t._idSeed)&&t._id!==e.__id&&console.warn("Deserialize: IDs do not match - "+t._id),ii(t,e)}function si(t){return"string"==typeof t&&(t=JSON.parse(t)),Ye((t=ei(t,B.version())).__class).then(e=>{const i=new e;return t.__id&&0!==t.__id.indexOf(i._idSeed)&&0!==t.__id.indexOf("_pe")&&(i._id=t.__id),ii(i,t)}).catch(function(t){console.error("Persist.create: ***exception***"),console.error(t)})}function li(t){si(lt.serializeToObject(t,void 0,!0,!0))}ti.prototype._class+=" composite_MegaChart",ti.prototype._1DChartTypes=Ue.prototype._1DChartTypes,ti.prototype._2DChartTypes=Ue.prototype._2DChartTypes,ti.prototype._NDChartTypes=Ue.prototype._NDChartTypes,ti.prototype._anyChartTypes=Ue.prototype._anyChartTypes,ti.prototype._allChartTypes=Ue.prototype._allChartTypes,ti.prototype.publishReset(),ti.prototype.publish("hideRowOnLegendClick",!1,"boolean","Enable/Disable hiding row on legend clicks",null,{tags:["Basic"]}),ti.prototype.publish("showToolbar",!0,"boolean","Enable/Disable Toolbar widget",null,{tags:["Basic"]}),ti.prototype.publishProxy("title","_toolbar","title"),ti.prototype.publish("ddlParamsFormat","","string","DDL Param Format '{fname}, {lname}'",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleBackgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),ti.prototype.publish("maximizedBackgroundColor","#FFFFFF","html-color","Background Color while maximized",null,{tags:["Intermediate"],optional:!0}),ti.prototype.publish("showChartSelect",!0,"boolean","Show/Hide the chartType dropdown in the toolbar",null,{tags:["Basic"]}),ti.prototype.publish("showCSV",!0,"boolean","Show/Hide CSV button",null,{tags:["Basic"]}),ti.prototype.publish("showCount",!1,"boolean","Show/Hide Data Count",null,{tags:["Basic"]}),ti.prototype.publish("showMaximize",!1,"boolean","Show/Hide Maximize button",null,{tags:["Basic"]}),ti.prototype.publish("toolbarShowLegend",!1,"boolean","Show/Hide Legend button",null,{tags:["Basic"]}),ti.prototype.publish("showInfoButton",!1,"boolean","Show/Hide Info button in toolbar",null,{tags:["Basic"]}),ti.prototype.publish("infoIcon","","string","Help Icon",null,{tags:["Basic"]}),ti.prototype.publish("legendPosition","none","set","Position of the Legend widget",["none","top","right","bottom","left"],{tags:["Basic"]}),ti.prototype.publishProxy("legendFormat","_legend","rainbowFormat"),ti.prototype.publishProxy("legendBins","_legend","rainbowBins"),ti.prototype.publishProxy("domainAxisTitle","_domainTitle","text"),ti.prototype.publishProxy("valueAxisTitle","_valueTitle","text"),ti.prototype.publishProxy("chartType","_chart","chartType"),ti.prototype.publishProxy("chart","_chart","chart"),m(ei,"retrofit_114_serialization"),m(ii,"deserializeFromObject"),m(oi,"deserialize"),m(si,"create"),m(li,"clone");const ri=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,clone:li,create:si,deserialize:oi,deserializeFromObject:ii,retrofit_114_serialization:ei},Symbol.toStringTag,{value:"Module"}));export{at as BUILD_VERSION,Ze as Dermatology,ti as MegaChart,Ue as MultiChart,Je as MultiChartPanel,rt as PKG_NAME,nt as PKG_VERSION,ri as Persist,Ve as Utility};
|
|
1
|
+
var t,e,i,o,s,l,r,n,a,h,d,p,c,u,g,_,y,f,b,w=Object.defineProperty,m=(t,e)=>w(t,"name",{value:e,configurable:!0});import{HTMLWidget as x,FAChar as v,select as C,selectAll as T,Utility as S,d3Event as P,Platform as B,drag as z,SVGWidget as A,Database as W,Palette as k,format as I,scaleOrdinal as M,ProgressBar as D,ToggleButton as H,Text as F,Button as O,Spacer as L,TitleBar as R,IconBar as E,scaleLinear as G,dispatch as Y,formatPrefix as N,formatLocale as V,formatSpecifier as X,sum as U,map as j}from"@hpcc-js/common";import{Table as $}from"@hpcc-js/dgrid";import{instanceOfIHighlight as q,INDChart as J,IGraph as K}from"@hpcc-js/api";import{OnOff as Z,Button as Q,Input as tt,Select as et}from"@hpcc-js/form";import{PropertyEditor as it,Legend as ot,Html as st,Persist as lt}from"@hpcc-js/other";const rt="@hpcc-js/composite",nt="3.4.5",at="3.18.0";var ht=Object.defineProperty,dt=/* @__PURE__ */m((t,e)=>ht(t,"name",{value:e,configurable:!0}),"e");function pt(t,e){for(var i=0;i<e.length;i++){const o=e[i];if("string"!=typeof o&&!Array.isArray(o))for(const e in o)if("default"!==e&&!(e in t)){const i=Object.getOwnPropertyDescriptor(o,e);i&&Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:/* @__PURE__ */dt(()=>o[e],"get")})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}m(pt,"I"),dt(pt,"_mergeNamespaces");const ct=(m(t=class extends x{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);let i=0,o=0,s=this.clientWidth(),l=this.clientHeight();switch(this.units()){case"pixels":i=this.widgetX(),o=this.widgetY(),s=""===this.widgetWidth()?s-i:Number(this.widgetWidth()),l=""===this.widgetHeight()?l-o:Number(this.widgetHeight());break;case"percent":i=this.widgetX()*s/100,o=this.widgetY()*l/100,s=""===this.widgetWidth()?s-i:Number(this.widgetWidth())*s/100,l=""===this.widgetHeight()?l-o:Number(this.widgetHeight())*l/100}e.style("opacity",this.opacity());const r=e.selectAll("#"+this._id+" > .placeholder").data(this.widget()?[this.widget()]:[],function(t){return t._id});r.enter().append("div").attr("class","placeholder").each(function(t){t.target(this)}).merge(r).style("left",i+"px").style("top",o+"px").style("width",s+"px").style("bottom",l+"px").each(function(t){t.resize({width:s,height:l})}),r.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}},"_AbsoluteSurface"),t);dt(ct,"AbsoluteSurface");let ut=ct;ut.prototype._class+=" layout_AbsoluteSurface",ut.prototype.publish("units","percent","set","Units",["pixels","percent"]),ut.prototype.publish("widgetX",0,"number","Widget XPos"),ut.prototype.publish("widgetY",0,"number","Widget YPos"),ut.prototype.publish("widgetWidth","100","string","Widget Width, omit for full"),ut.prototype.publish("widgetHeight","100","string","Widget Height, omit for full"),ut.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]}),ut.prototype.publish("opacity",1,"number","Opacity");const gt=(m(e=class extends x{_isClosed;titleSpan;iconDiv;ul;icon;constructor(){super(),this._tag="div",this._isClosed=!1}pushListItem(t,e=!1,i=!1){const o=this.content();return t._protected=i,e?o.unshift(t):o.push(t),this.content(o),this}clearListItems(){const t=[];for(const e in this.content())this.content()[e]._protected&&t.push(this.content()[e]);return this.content(t),this}collapseClick(t){t.classed("closed")?(this._isClosed=!1,t.classed("open",!0),t.classed("closed",!1)):(this._isClosed=!0,t.classed("open",!1),t.classed("closed",!0))}enter(t,e){super.enter(t,e);const i=this;this._isClosed=this.defaultCollapsed(),e.classed(this._isClosed?"closed":"open",!0),this.titleSpan=e.append("span").classed("collapsible-title",!0),this.iconDiv=e.append("div").classed("collapsible-icon",!0),this.ul=e.append("ul"),this.icon=(new v).size({height:24,width:24}).target(this.iconDiv.node()),this.iconDiv.on("click",function(){i.collapseClick(e),i.render()}),this.titleSpan.on("click",function(){i.collapseClick(e),i.render()})}update(t,e){super.update(t,e);const i=this;this.titleSpan.text(i.title().length>0?i.title()+"":"Accordion ["+i._id+"]");const o=this.ul.selectAll("#"+i._id+" > ul > li").data(this.content(),function(t){return t._id});o.enter().append(function(t){const e=document.createElement("li");if(null!==t._target)return t._target;{const o=t.size();if(0===o.width||0===o.height){const e=i.size();t.size({width:e.width,height:e.width})}t.target(e)}return e}),o.exit().remove(),this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed?this.closedIcon():this.openIcon()).render()}exit(t,e){super.exit(t,e)}},"_Accordion"),e);dt(gt,"Accordion");let _t=gt;_t.prototype._class+=" layout_Accordion",_t.prototype.publish("content",[],"widgetArray","Array of widgets",null,{tags:["Basic"]}),_t.prototype.publish("title","","string","Title of collapsible section",null,{tags:["Private"]}),_t.prototype.publish("openIcon","","string","Icon to display when list is open",null,{tags:["Private"]}),_t.prototype.publish("closedIcon","","string","Icon to display when list is closed",null,{tags:["Private"]}),_t.prototype.publish("titleFontColor","#FFFFFF","html-color","Title font color",null,{tags:["Private"]}),_t.prototype.publish("titleBackgroundColor","#333333","html-color","Title background color",null,{tags:["Private"]}),_t.prototype.publish("defaultCollapsed",!1,"boolean","Collapsed by default if true",null,{tags:["Private"]});const yt=(m(i=class extends x{_surfaceButtons;constructor(){super(),this._tag="div",this._surfaceButtons=[]}widgetSize(t,e){let i=this.clientWidth(),o=this.clientHeight();return this.title()&&(o-=this.calcHeight(t)),o-=this.calcFrameHeight(e),i-=this.calcFrameWidth(e),{width:i,height:o}}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);const i=this;e.classed("shadow2",this.surfaceShadow()).style("border-width",this.surfaceBorderWidth_exists()?this.surfaceBorderWidth()+"px":null).style("border-color",this.surfaceBorderColor()).style("border-radius",this.surfaceBorderRadius_exists()?this.surfaceBorderRadius()+"px":null).style("background-color",this.surfaceBackgroundColor());const o=e.selectAll(".surfaceTitle").data(this.title()?[this.title()]:[]);o.enter().insert("h3","div").attr("class","surfaceTitle").merge(o).text(function(t){return t}).style("text-align",this.surfaceTitleAlignment()).style("color",this.surfaceTitleFontColor()).style("font-size",this.surfaceTitleFontSize_exists()?this.surfaceTitleFontSize()+"px":null).style("font-family",this.surfaceTitleFontFamily()).style("font-weight",this.surfaceTitleFontBold()?"bold":"normal").style("background-color",this.surfaceTitleBackgroundColor()).style("padding",this.surfaceTitlePadding_exists()?this.surfaceTitlePadding()+"px":null).style("title",this.altText_exists()?this.altText():null),o.exit().remove();const s=e.select(".surfaceTitle").append("div").attr("class","html-button-container").selectAll(".surface-button").data(this.buttonAnnotations());s.enter().append("button").classed("surface-button",!0).each(function(t,e){const o=i._surfaceButtons[e]=C(this).attr("class","surface-button"+(t.class?" "+t.class:"")).attr("id",t.id).style("padding",t.padding).style("width",t.width).style("height",t.height).style("cursor","pointer");"FontAwesome"===t.font?o.style("background","transparent").style("border","none").on("click",function(t){i.click(t)}).append("i").attr("class","fa").text(function(){return t.label}):o.text(function(){return t.label}).on("click",function(t){i.click(t)})}),s.exit().each(function(t,e){const o=C(this);delete i._surfaceButtons[e],o.remove()});const l=e.selectAll("#"+this._id+" > .surfaceWidget").data(this.widget()?[this.widget()]:[],function(t){return t._id});l.enter().append("div").attr("class","surfaceWidget").each(function(t){C(i.element().node().parentElement).classed("content-icon content-icon-"+t.classID().split("_")[1],!0),t.target(this)}).merge(l).style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null).each(function(t){const o=i.widgetSize(e.select("h3"),C(this));o.width<0&&(o.width=0),o.height<0&&(o.height=0),t.resize({width:o.width,height:o.height})}),l.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}click(t){}},"_Surface"),i);dt(yt,"Surface");let ft=yt;ft.prototype._class+=" layout_Surface",ft.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),ft.prototype.publish("altText",null,"string","Alt text",null,{optional:!0}),ft.prototype.publish("surfaceTitlePadding",null,"number","Title Padding (px)",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleBackgroundColor",null,"html-color","Title Background Color",null,{tags:["Advanced"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceTitleAlignment","center","set","Title Alignment",["left","right","center"],{tags:["Basic"],disable:/* @__PURE__ */dt(t=>!t.title(),"disable")}),ft.prototype.publish("surfaceShadow",!1,"boolean","3D Shadow"),ft.prototype.publish("surfacePadding",null,"string","Surface Padding (px)",null,{tags:["Intermediate"]}),ft.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),ft.prototype.publish("surfaceBorderWidth",null,"number","Surface Border Width (px)",null,{tags:["Advanced"]}),ft.prototype.publish("surfaceBorderColor",null,"html-color","Surface Border Color",null,{tags:["Advanced"]}),ft.prototype.publish("surfaceBorderRadius",null,"number","Surface Border Radius (px)",null,{tags:["Advanced"]}),ft.prototype.publish("buttonAnnotations",[],"array","Button Array",null,{tags:["Private"]}),ft.prototype.publish("widget",null,"widget","Widget",null,{tags:["Basic"]});const bt=(m(o=class extends ft{_indicateTheseIds;constructor(){super(),this._indicateTheseIds=[]}indicateTheseIds(t){return arguments.length?(this._indicateTheseIds=t,this):this._indicateTheseIds}enter(t,e){super.enter(t,e);const i=this;e.classed("layout_Surface",!0).on("mouseenter",function(){i.onMouseEnter()}).on("mouseleave",function(){i.onMouseLeave()})}update(t,e){super.update(t,e)}onMouseEnter(){const t=this.indicateTheseIds(),e=this.indicatorOpacity(),i=this.indicatorBorderColor(),o=this.indicatorGlowColor();for(let s=0;s<t.length;s++){const l=C("#"+t[s]),r=l.datum();l&&r&&l.append("div").attr("class","update-indicator").style("width",r.width()+"px").style("height",r.height()+"px").style("opacity",e).style("border-color",i).style("-webkit-box-shadow","inset 0px 0px 30px 0px "+o).style("-moz-box-shadow","inset 0px 0px 30px 0px "+o).style("box-shadow","inset 0px 0px 30px 0px "+o)}}onMouseLeave(){const t=this.indicateTheseIds();for(let e=0;e<t.length;e++)T("#"+t[e]+" > div.update-indicator").remove()}},"_Cell"),o);dt(bt,"Cell");let wt=bt;wt.prototype._class+=" layout_Cell",wt.prototype.publish("gridRow",0,"number","Grid Row Position",null,{tags:["Private"]}),wt.prototype.publish("gridCol",0,"number","Grid Column Position",null,{tags:["Private"]}),wt.prototype.publish("gridRowSpan",1,"number","Grid Row Span",null,{tags:["Private"]}),wt.prototype.publish("gridColSpan",1,"number","Grid Column Span",null,{tags:["Private"]}),wt.prototype.publish("indicatorGlowColor","#EEEE11","html-color","Glow color of update-indicator",null,{tags:["Basic"]}),wt.prototype.publish("indicatorBorderColor","#F48A00","html-color","Border color of update-indicator",null,{tags:["Basic"]}),wt.prototype.publish("indicatorOpacity",.8,"number","Opacity of update-indicator",null,{tags:["Basic"]});const mt=(s=class extends x{_colCount;_rowCount;_colSize;_rowSize;_shrinkWrapBoxes;_watch;_offsetX;_offsetY;_dragCell;_dragCellSize;_dragCellStartSize;_handleTop;_handleLeft;_dragPrevX;_dragPrevY;_cellSizes;contentDiv;_scrollBarWidth;_borderHandles;_sectionTypeArr;constructor(){super(),this._tag="div",this._colCount=0,this._rowCount=0,this._colSize=0,this._rowSize=0,this._shrinkWrapBoxes={},this.content([]),this.sectionTypes([])}watchWidget(t){if(void 0===this._watch&&(this._watch={}),this._watch[t.id()]&&(this._watch[t.id()].remove(),delete this._watch[t.id()]),t){const e=this;this._watch[t.id()]=t.monitor(function(t,i,o){o!==i&&e.lazyPostUpdate()})}}lazyPostUpdate=S.debounce(function(){this.postUpdate()},100);applyLayoutType(){const t=this.borderLayoutObject();this.content().forEach(function(e,i){e._fixedLeft=t[this.sectionTypes()[i]].left,e._fixedTop=t[this.sectionTypes()[i]].top,e._fixedWidth=t[this.sectionTypes()[i]].width,e._fixedHeight=t[this.sectionTypes()[i]].height,e._dragHandles=this.cellSpecificDragHandles(this.sectionTypes()[i])},this)}cellSpecificDragHandles(t){switch(t){case"top":return["s"];case"right":return["w"];case"bottom":return["n"];case"left":return["e"];case"center":return[]}}borderLayoutObject(t){const e={},i=this;let o,s,l,r,n,a,h,d;const p=this.target().getBoundingClientRect();p.top,p.left,p.bottom,p.right,this.target()instanceof SVGElement?(parseFloat(this.target().getAttribute("width")),parseFloat(this.target().getAttribute("height"))):(p.width,p.height),-1!==this.sectionTypes().indexOf("top")&&(o=this.topSize(),s=this.topPercentage(),void 0!==this._shrinkWrapBoxes.top&&(o=this._shrinkWrapBoxes.top.height+this.gutter(),s=0)),-1!==this.sectionTypes().indexOf("bottom")&&(l=this.bottomSize(),r=this.bottomPercentage(),void 0!==this._shrinkWrapBoxes.bottom&&(l=this._shrinkWrapBoxes.bottom.height+this.gutter(),r=0)),-1!==this.sectionTypes().indexOf("left")&&(n=this.leftSize(),a=this.leftPercentage(),void 0!==this._shrinkWrapBoxes.left&&(n=this._shrinkWrapBoxes.left.width+this.gutter(),a=0)),-1!==this.sectionTypes().indexOf("right")&&(h=this.rightSize(),d=this.rightPercentage(),void 0!==this._shrinkWrapBoxes.right&&(h=this._shrinkWrapBoxes.right.width+this.gutter(),d=0));const c=f({width:{px:0,"%":100},height:{px:o,"%":s},top:{px:0,"%":0},left:{px:0,"%":0}}),u=f({width:{px:0,"%":100},height:{px:l,"%":r},top:{px:0,"%":100},left:{px:0,"%":0}});u.top-=u.height;const g=f({width:{px:n,"%":a},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:0,"%":0}}),_=f({width:{px:h,"%":d},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:0,"%":100}});_.left-=_.width;const y=f({width:{px:-_.width-g.width,"%":100},height:{px:-c.height-u.height,"%":100},top:{px:c.height,"%":0},left:{px:g.width,"%":0}});return e.top=c,e.bottom=u,e.right=_,e.left=g,e.center=y,e;function f(t){return t.width.px=void 0!==t.width.px?t.width.px:0,t.width["%"]=void 0!==t.width["%"]?t.width["%"]:0,t.height.px=void 0!==t.height.px?t.height.px:0,t.height["%"]=void 0!==t.height["%"]?t.height["%"]:0,{width:t.width.px+t.width["%"]/100*i.width(),height:t.height.px+t.height["%"]/100*i.height(),top:t.top.px+t.top["%"]/100*i.height()+i.gutter()/2,left:t.left.px+t.left["%"]/100*i.width()+i.gutter()/2}}}clearContent(t){if(t){const e=this.sectionTypes().indexOf(t);e>=0&&(this._watch&&this.content()[e]&&delete this._watch[this.content()[e].id()],this.content()[e].target(null),C("#"+this.id()+" > div.borderHandle_"+t).classed("borderHandleDisabled",!0),this.content().splice(e,1),this.sectionTypes().splice(e,1))}else this.content().forEach(function(t){return t.target(null),!1}),C("#"+this.id()+" > div.borderHandle").classed("borderHandleDisabled",!0),delete this._watch,this.content([]),this.sectionTypes([])}hasContent(t,e,i){return this.sectionTypes().indexOf(t)>=0}setContent(t,e,i){if(this.clearContent(t),i=void 0!==i?i:"",e){const o=(new wt).surfaceBorderWidth(0).widget(e).title(i);this.watchWidget(e),this.content().push(o),this.sectionTypes().push(t)}return this}getCell(t){const e=this.sectionTypes().indexOf(t);return e>=0?this.content()[e]:null}getContent(t){const e=this.sectionTypes().indexOf(t);return e>=0?this.content()[e].widget():null}setLayoutOffsets(){this._offsetX=this._element.node().getBoundingClientRect().left+this.gutter()/2,this._offsetY=this._element.node().getBoundingClientRect().top+this.gutter()/2}dragStart(t){const e=P();e.sourceEvent.stopPropagation();const i=this;this._dragCell=t,this._dragCellStartSize=this[t+"Size"](),this[t+"ShrinkWrap"]()&&(this[t+"Percentage"](0),this[t+"ShrinkWrap"](!1));const o=C("#"+i.id()+" > div.borderHandle_"+t);i._handleTop=parseFloat(o.style("top").split("px")[0]),i._handleLeft=parseFloat(o.style("left").split("px")[0]),this._dragPrevX=e.sourceEvent.clientX,this._dragPrevY=e.sourceEvent.clientY}dragTick(t){const e=this,i=P(),o=this._dragPrevX-i.sourceEvent.clientX,s=this._dragPrevY-i.sourceEvent.clientY;switch(t){case"top":case"bottom":l(t,s);break;case"right":case"left":l(t,o)}function l(t,i){if(0===i)return;const o=T("#"+e.id()+" > div.borderHandle"),s=C("#"+e.id()+" > div.borderHandle_"+t);s.classed("borderHandle_top")?(s.style("top",e._handleTop-i+"px"),e._cellSizes.topHeight=e._handleTop-i,e._cellSizes.leftHeight=e._cellSizes.height,e._cellSizes.leftHeight-=e._cellSizes.topHeight,e._cellSizes.leftHeight-=e._cellSizes.bottomHeight,e._cellSizes.rightHeight=e._cellSizes.leftHeight):s.classed("borderHandle_right")?(s.style("left",e._handleLeft-i+"px"),e._cellSizes.rightWidth=e._cellSizes.width-e._handleLeft+i):s.classed("borderHandle_bottom")?(s.style("top",e._handleTop-i+"px"),e._cellSizes.bottomHeight=e._cellSizes.height-e._handleTop+i,e._cellSizes.leftHeight=e._cellSizes.height,e._cellSizes.leftHeight-=e._cellSizes.bottomHeight,e._cellSizes.leftHeight-=e._cellSizes.topHeight,e._cellSizes.rightHeight=e._cellSizes.leftHeight):s.classed("borderHandle_left")&&(s.style("left",e._handleLeft-i+"px"),e._cellSizes.leftWidth=e._handleLeft-i),o.each(function(){const t=C(this);t.classed("borderHandle_top")?(t.style("width",e._cellSizes.width+"px"),t.style("top",e._cellSizes.topHeight-3+"px")):t.classed("borderHandle_right")?(t.style("left",e._cellSizes.width-e._cellSizes.rightWidth+"px"),t.style("top",e._cellSizes.topHeight+3+"px"),t.style("height",e._cellSizes.rightHeight+"px")):t.classed("borderHandle_bottom")?(t.style("width",e._cellSizes.width+"px"),t.style("top",e._cellSizes.height-e._cellSizes.bottomHeight-3+"px")):t.classed("borderHandle_left")&&(t.style("left",e._cellSizes.leftWidth+"px"),t.style("height",e._cellSizes.leftHeight+"px"),t.style("top",e._cellSizes.topHeight+3+"px"))})}m(l,"a"),dt(l,"_moveHandles")}dragEnd(t){if(t){const e=P(),i=this._dragPrevX-e.sourceEvent.clientX,o=this._dragPrevY-e.sourceEvent.clientY;switch(t){case"top":0!==o&&(this.topPercentage(0),this.topSize(0===this.topSize()?this.getContent("top").getBBox().height-o:this.topSize()-o));break;case"right":0!==i&&(this.rightPercentage(0),this.rightSize(0===this.rightSize()?this.getContent("right").getBBox().width+i:this.rightSize()+i));break;case"bottom":0!==o&&(this.bottomPercentage(0),this.bottomSize(0===this.bottomSize()?this.getContent("bottom").getBBox().height+o:this.bottomSize()+o));break;case"left":0!==i&&(this.leftPercentage(0),this.leftSize(0===this.leftSize()?this.getContent("left").getBBox().width-i:this.leftSize()-i))}this._dragPrevX=e.sourceEvent.clientX,this._dragPrevY=e.sourceEvent.clientY}this.render()}size(t){const e=x.prototype.size.apply(this,arguments);return arguments.length&&this.contentDiv&&this.contentDiv.style("width",this._size.width+"px").style("height",this._size.height+"px"),e}enter(t,e){super.enter(t,e);const i=this;e.style("position","relative"),this.contentDiv=e.append("div").classed("border-content",!0),this._scrollBarWidth=B.getScrollbarWidth(),this._borderHandles=["top","left","right","bottom"],e.selectAll("div.borderHandle").data(this._borderHandles).enter().append("div").classed("borderHandle",!0).each(function(t){C(this).classed("borderHandle_"+t,!0).classed("borderHandleDisabled",null===i.getContent(t))})}update(t,e){super.update(t,e),this._sectionTypeArr=this.sectionTypes();const i=this;e.classed("design-mode",this.designMode()),this.setLayoutOffsets();const o=this.contentDiv.selectAll(".cell_"+this._id).data(this.content(),function(t){return t._id}),s=o.enter().append("div").classed("cell_"+this._id,!0).style("position","absolute").each(function(t,e){C(this).classed("border-cell border-cell-"+i._sectionTypeArr[e],!0),t.target(this),C("#"+i.id()+" > div.borderHandle_"+i._sectionTypeArr[e]).classed("borderHandleDisabled",!1)}).merge(o);s.each(function(t,e){const o=i.sectionTypes()[e];void 0!==i[o+"ShrinkWrap"]&&i[o+"ShrinkWrap"]()?(t.render(),i._shrinkWrapBoxes[o]=t.widget().getBBox(!0)):delete i._shrinkWrapBoxes[o]});const l=z().on("start",function(t,e){i.dragStart.call(i,t,e)}).on("drag",function(t,e){i.dragTick.call(i,t,e)}).on("end",function(t,e){i.dragEnd.call(i,t,e)});this.designMode()?e.selectAll("#"+this.id()+" > div.borderHandle").call(l):e.selectAll("#"+this.id()+" > div.borderHandle").on(".drag",null);const r=this.borderLayoutObject();this.content().forEach(function(t,e){t._fixedLeft=r[this.sectionTypes()[e]].left,t._fixedTop=r[this.sectionTypes()[e]].top,t._fixedWidth=r[this.sectionTypes()[e]].width,t._fixedHeight=r[this.sectionTypes()[e]].height,t._dragHandles=[]},this),s.style("left",function(t){return t._fixedLeft+"px"}).style("top",function(t){return t._fixedTop+"px"}).style("width",function(t){return t._fixedWidth-i.gutter()+"px"}).style("height",function(t){return t._fixedHeight-i.gutter()+"px"}).each(function(t){t._placeholderElement.attr("draggable",i.designMode()).selectAll(".dragHandle").attr("draggable",i.designMode()),t.surfacePadding(i.surfacePadding()).resize()}),o.exit().each(function(t){t.target(null)}).remove(),this.getCellSizes(),e.selectAll("#"+this.id()+" > div.borderHandle").each(function(){const t=C(this);t.classed("borderHandle_top")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.topHeight-3+"px")):t.classed("borderHandle_right")?(t.style("left",i._cellSizes.width-i._cellSizes.rightWidth+"px"),t.style("top",i._cellSizes.topHeight+3+"px"),t.style("height",i._cellSizes.rightHeight+"px")):t.classed("borderHandle_bottom")?(t.style("width",i._cellSizes.width+"px"),t.style("top",i._cellSizes.height-i._cellSizes.bottomHeight-3+"px")):t.classed("borderHandle_left")&&(t.style("left",i._cellSizes.leftWidth+"px"),t.style("height",i._cellSizes.leftHeight+"px"),t.style("top",i._cellSizes.topHeight+3+"px"))})}getCellSizes(){const t=this;t._cellSizes={};const e=this.element().node().getBoundingClientRect();t._cellSizes.width=e.width,t._cellSizes.height=e.height,this.element().selectAll("#"+this.id()+" > div > div.border-cell").each(function(){const e=C(this);if("function"==typeof e.node){const i=e.node().getBoundingClientRect();e.classed("border-cell-top")?t._cellSizes.topHeight=i.height:e.classed("border-cell-left")?(t._cellSizes.leftWidth=i.width,t._cellSizes.leftHeight=i.height):e.classed("border-cell-right")?(t._cellSizes.rightWidth=i.width,t._cellSizes.rightHeight=i.height):e.classed("border-cell-bottom")&&(t._cellSizes.bottomHeight=i.height)}}),["height","width","topHeight","bottomHeight","leftHeight","rightHeight","leftWidth","rightWidth"].forEach(function(e){t._cellSizes[e]=void 0===t._cellSizes[e]?0:t._cellSizes[e]})}postUpdate(t,e){const i=this;this.content().forEach(function(t){if(null!==t._element.node()&&t.widget()){const e=t.widget().getBBox(!1,!0),o=t.widget().getBBox(!0,!0);e.width===o.width&&e.height===o.height||i.lazyRender()}})}exit(t,e){this.content().forEach(t=>t.target(null)),super.exit(t,e)}},m(s,"_Border"),s);dt(mt,"Border");let xt=mt;xt.prototype._class+=" layout_Border",xt.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),xt.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Intermediate"]}),xt.prototype.publish("gutter",0,"number","Gap Between Widgets",null,{tags:["Basic"]}),xt.prototype.publish("topShrinkWrap",!1,"boolean","'Top' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("leftShrinkWrap",!1,"boolean","'Left' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("rightShrinkWrap",!1,"boolean","'Right' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("bottomShrinkWrap",!1,"boolean","'Bottom' Cell shrinks to fit content",null,{tags:["Intermediate"]}),xt.prototype.publish("topSize",0,"number","Height of the 'Top' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("leftSize",0,"number","Width of the 'Left' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("rightSize",0,"number","Width of the 'Right' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("bottomSize",0,"number","Height of the 'Bottom' Cell (px)",null,{tags:["Private"]}),xt.prototype.publish("topPercentage",20,"number","Percentage (of parent) Height of the 'Top' Cell",null,{tags:["Private"]}),xt.prototype.publish("leftPercentage",20,"number","Percentage (of parent) Width of the 'Left' Cell",null,{tags:["Private"]}),xt.prototype.publish("rightPercentage",20,"number","Percentage (of parent) Width of the 'Right' Cell",null,{tags:["Private"]}),xt.prototype.publish("bottomPercentage",20,"number","Percentage (of parent) Height of the 'Bottom' Cell",null,{tags:["Private"]}),xt.prototype.publish("surfacePadding",0,"number","Cell Padding (px)",null,{tags:["Intermediate"]}),xt.prototype.publish("sectionTypes",[],"array","Section Types sharing an index with 'content' - Used to determine position/size.",null,{tags:["Private"]});const vt=(m(l=class{_div;_overlay=!1;_overflowX="visible";_overflowY="visible";_widget;constructor(t){this._div=t}overlay(t){return arguments.length?(this._overlay=t,this):this._overlay}overflowX(t){return arguments.length?(this._overflowX=t,this._div.style("overflow-x",t),this):this._overflowX}overflowY(t){return arguments.length?(this._overflowY=t,this._div.style("overflow-y",t),this):this._overflowY}element(){return this._div}node(){return this._div.node()}widget(t){return arguments.length?(this._widget!==t&&(this._widget&&this._widget.target(null),this._widget=t,this._widget&&this._widget.target(this._div.node())),this):this._widget}resize(t){return this._widget&&(this._div.style("width",`${t.width}px`).style("height",`${t.height}px`),this._widget.resize(t)),this}async render(t,e,i){let o=this.overflowX();this.overlay()||"visible"!==o||(o=null);let s=this.overflowY();return this.overlay()||"visible"!==s||(s=null),this._div.style("height",this.overlay()?"0px":null).style("overflow-x",o).style("overflow-y",s),this._widget?this._widget.renderPromise().then(o=>{if(t&&this._widget.visible()){const t=this._widget.getBBox();return t.width+=8,void 0!==e&&t.height>e&&(t.width+=B.getScrollbarWidth()),void 0!==i&&t.width>i&&(t.height+=B.getScrollbarWidth()),this.overlay()?t.height=0:t.height+=4,t}return t?{x:0,y:0,width:0,height:0}:void 0}):Promise.resolve(t?{x:0,y:0,width:0,height:0}:void 0)}},"_WidgetDiv"),l);dt(vt,"WidgetDiv");let Ct=vt;const Tt=(m(r=class extends x{_bodyElement;_topWA;_leftWA;_centerWA;_rightWA;_bottomWA;_topPrevOverflow;_leftPrevOverflow;_rightPrevOverflow;_bottomPrevOverflow;constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e);const i=e.append("header");this._bodyElement=e.append("div").attr("class","body");const o=this._bodyElement.append("div").attr("class","center"),s=this._bodyElement.append("div").attr("class","lhs"),l=this._bodyElement.append("div").attr("class","rhs"),r=e.append("div").attr("class","footer");this._topWA=new Ct(i),this._centerWA=new Ct(o),this._leftWA=new Ct(s),this._rightWA=new Ct(l),this._bottomWA=new Ct(r)}update(t,e){super.update(t,e),this._topWA.element().style("display",this.showTop()?null:"none"),this._rightWA.element().style("display",this.showRight()?null:"none"),this._bottomWA.element().style("display",this.showBottom()?null:"none"),this._leftWA.element().style("display",this.showLeft()?null:"none"),this.topOverflowX()!==this._topWA.overflowX()&&this._topWA.overflowX(this.topOverflowX()),this.rightOverflowX()!==this._rightWA.overflowX()&&this._rightWA.overflowX(this.rightOverflowX()),this.bottomOverflowX()!==this._bottomWA.overflowX()&&this._bottomWA.overflowX(this.bottomOverflowX()),this.leftOverflowX()!==this._leftWA.overflowX()&&this._leftWA.overflowX(this.leftOverflowX()),this.topOverflowY()!==this._topWA.overflowY()&&this._topWA.overflowY(this.topOverflowY()),this.rightOverflowY()!==this._rightWA.overflowY()&&this._rightWA.overflowY(this.rightOverflowY()),this.bottomOverflowY()!==this._bottomWA.overflowY()&&this._bottomWA.overflowY(this.bottomOverflowY()),this.leftOverflowY()!==this._leftWA.overflowY()&&this._leftWA.overflowY(this.leftOverflowY()),this.element().style("width",`${this.width()}px`).style("height",`${this.height()}px`)}targetNull(t){t&&t.target(null)}exit(t,e){this.targetNull(this.center()),this.targetNull(this.bottom()),this.targetNull(this.right()),this.targetNull(this.left()),this.targetNull(this.top()),super.exit(t,e)}swap(t,e){const i=this[t](),o=this[e]();return this.targetNull(i),this.targetNull(o),this[`_${t}WA`].widget(null),this[`_${e}WA`].widget(null),this[t](o),this[e](i),this}render(t){return super.render(e=>{this._topWA?this._topWA.widget(this.top()).overlay(this.topOverlay()).render(!0).then(async e=>{const i=await this._bottomWA.widget(this.bottom()).render(!0,void 0,this.width()),o=this.height()-(e.height+i.height),s=await this._leftWA.widget(this.left()).render(!0,o),l=await this._rightWA.widget(this.right()).render(!0,o);this.bottomHeight_exists()&&(i.height=this.bottomHeight());const r=this.width()-(s.width+l.width),n=this.height()-(e.height+i.height),a=this.centerOverflowX(),h=this.centerOverflowY(),d=-1!==["auto","scroll"].indexOf(a),p=-1!==["auto","scroll"].indexOf(h);(d||p)&&this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:r,height:n}).render(),this._bodyElement.style("height",`${n}px`);const c=[this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({width:this.width(),height:e.height}).render(),this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({width:s.width,height:n}).render(),this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({width:l.width,height:n}).render(),this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:r,height:n}).render(),this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({width:this.width(),height:i.height}).render()];Promise.all(c).then(e=>{t&&t(this)})}):t&&t(this)})}},"_Border2"),r);dt(Tt,"Border2");let St=Tt;St.prototype._class+=" layout_Border2",St.prototype.publish("showTop",!0,"boolean","If true, top widget adapter will display"),St.prototype.publish("showRight",!0,"boolean","If true, right widget adapter will display"),St.prototype.publish("showBottom",!0,"boolean","If true, bottom widget adapter will display"),St.prototype.publish("showLeft",!0,"boolean","If true, left widget adapter will display"),St.prototype.publish("topOverflowX","visible","set","Sets the overflow-x css style for the top widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("rightOverflowX","visible","set","Sets the overflow-x css style for the right widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("bottomOverflowX","visible","set","Sets the overflow-x css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("leftOverflowX","visible","set","Sets the overflow-x css style for the left widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("centerOverflowX","visible","set","Sets the overflow-x css style for the center widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("topOverflowY","visible","set","Sets the overflow-y css style for the top widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("rightOverflowY","visible","set","Sets the overflow-y css style for the right widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("bottomOverflowY","visible","set","Sets the overflow-y css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("leftOverflowY","visible","set","Sets the overflow-y css style for the left widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("centerOverflowY","visible","set","Sets the overflow-y css style for the center widget adapter",["hidden","scroll","visible","auto"]),St.prototype.publish("top",null,"widget","Top Widget",void 0,{render:!1}),St.prototype.publish("topOverlay",!1,"boolean","Overlay Top Widget"),St.prototype.publish("left",null,"widget","Left Widget",void 0,{render:!1}),St.prototype.publish("center",null,"widget","Center Widget",void 0,{render:!1}),St.prototype.publish("right",null,"widget","Right Widget",void 0,{render:!1}),St.prototype.publish("bottom",null,"widget","Bottom Widget",void 0,{render:!1}),St.prototype.publish("bottomHeight",null,"number","Bottom Fixed Height",void 0,{optional:!0});const Pt=(m(n=class extends x{_prevActive=0;_root;activeWidget(){return this.widgets()[this.active()]}enter(t,e){super.enter(t,e),this._root=e.append("div").attr("id",`${this.id()}_root`)}update(t,e){super.update(t,e);const i=this.active(),o=this.width();this._root.style("width",`${o}px`).style("height",`${this.height()}px`);const s=this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(),t=>t.id()),l=s.enter().append("div").attr("class","carouselItem").each(function(t){t.target(this)}).merge(s).style("left",(t,e)=>(e-this._prevActive)*o+"px").style("width",`${o}px`);this._prevActive!==i&&(l.style("display",(t,e)=>e===this._prevActive||e===i?null:"none").transition().duration(this.transitionDuration()).style("left",(t,e)=>(e-i)*o+"px").on("end",function(t,e){C(this).style("display",()=>e===i?null:"none")}),this._prevActive=i),s.exit().each(function(t){t.target(null)}).remove()}exit(t,e){this.widgets().forEach(t=>t.target(null)),super.exit(t,e)}render(t){return super.render(e=>{if(!this.visible()||this.isDOMHidden())t&&t(e);else{const i=this.activeWidget();i&&i.resize(this.size()).render(i=>{t&&t(e)})}})}},"_Carousel"),n);dt(Pt,"Carousel");let Bt=Pt;Bt.prototype._class+=" layout_Carousel",Bt.prototype.publish("widgets",[],"widgetArray","Widgets",null,{render:!1}),Bt.prototype.publish("active",0,"number","Active widget"),Bt.prototype.publish("transitionDuration",500,"number","Transition duration");var zt=Math.PI,At=2*zt,Wt=1e-6,kt=At-Wt;function It(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Mt(){return new It}function Dt(t){return dt(function(){return t},"constant")}m(It,"tt"),m(Mt,"et"),m(Dt,"it"),dt(It,"Path"),dt(Mt,"path"),It.prototype=Mt.prototype={constructor:It,moveTo:/* @__PURE__ */dt(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:/* @__PURE__ */dt(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:/* @__PURE__ */dt(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:/* @__PURE__ */dt(function(t,e,i,o){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+o)},"quadraticCurveTo"),bezierCurveTo:/* @__PURE__ */dt(function(t,e,i,o,s,l){this._+="C"+ +t+","+ +e+","+ +i+","+ +o+","+(this._x1=+s)+","+(this._y1=+l)},"bezierCurveTo"),arcTo:/* @__PURE__ */dt(function(t,e,i,o,s){t=+t,e=+e,i=+i,o=+o,s=+s;var l=this._x1,r=this._y1,n=i-t,a=o-e,h=l-t,d=r-e,p=h*h+d*d;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(p>Wt)if(Math.abs(d*n-a*h)>Wt&&s){var c=i-l,u=o-r,g=n*n+a*a,_=c*c+u*u,y=Math.sqrt(g),f=Math.sqrt(p),b=s*Math.tan((zt-Math.acos((g+p-_)/(2*y*f)))/2),w=b/f,m=b/y;Math.abs(w-1)>Wt&&(this._+="L"+(t+w*h)+","+(e+w*d)),this._+="A"+s+","+s+",0,0,"+ +(d*c>h*u)+","+(this._x1=t+m*n)+","+(this._y1=e+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},"arcTo"),arc:/* @__PURE__ */dt(function(t,e,i,o,s,l){t=+t,e=+e,l=!!l;var r=(i=+i)*Math.cos(o),n=i*Math.sin(o),a=t+r,h=e+n,d=1^l,p=l?o-s:s-o;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+a+","+h:(Math.abs(this._x1-a)>Wt||Math.abs(this._y1-h)>Wt)&&(this._+="L"+a+","+h),i&&(p<0&&(p=p%At+At),p>kt?this._+="A"+i+","+i+",0,1,"+d+","+(t-r)+","+(e-n)+"A"+i+","+i+",0,1,"+d+","+(this._x1=a)+","+(this._y1=h):p>Wt&&(this._+="A"+i+","+i+",0,"+ +(p>=zt)+","+d+","+(this._x1=t+i*Math.cos(s))+","+(this._y1=e+i*Math.sin(s))))},"arc"),rect:/* @__PURE__ */dt(function(t,e,i,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +o+"h"+-i+"Z"},"rect"),toString:/* @__PURE__ */dt(function(){return this._},"toString")},dt(Dt,"constant");var Ht=Math.PI,Ft=2*Ht;const Ot={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/Ht);t.moveTo(i,0),t.arc(0,0,i,0,Ft)},"draw")},Lt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()},"draw")};var Rt=Math.sqrt(1/3),Et=2*Rt;const Gt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/Et),o=i*Rt;t.moveTo(0,-i),t.lineTo(o,0),t.lineTo(0,i),t.lineTo(-o,0),t.closePath()},"draw")};var Yt=Math.sin(Ht/10)/Math.sin(7*Ht/10),Nt=Math.sin(Ft/10)*Yt,Vt=-Math.cos(Ft/10)*Yt;const Xt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(.8908130915292852*e),o=Nt*i,s=Vt*i;t.moveTo(0,-i),t.lineTo(o,s);for(var l=1;l<5;++l){var r=Ft*l/5,n=Math.cos(r),a=Math.sin(r);t.lineTo(a*i,-n*i),t.lineTo(n*o-a*s,a*o+n*s)}t.closePath()},"draw")},Ut={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e),o=-i/2;t.rect(o,o,i,i)},"draw")};var jt=Math.sqrt(3);const $t={draw:/* @__PURE__ */dt(function(t,e){var i=-Math.sqrt(e/(3*jt));t.moveTo(0,2*i),t.lineTo(-jt*i,-i),t.lineTo(jt*i,-i),t.closePath()},"draw")};var qt=-.5,Jt=Math.sqrt(3)/2,Kt=1/Math.sqrt(12),Zt=3*(Kt/2+1);const Qt={draw:/* @__PURE__ */dt(function(t,e){var i=Math.sqrt(e/Zt),o=i/2,s=i*Kt,l=o,r=i*Kt+i,n=-l,a=r;t.moveTo(o,s),t.lineTo(l,r),t.lineTo(n,a),t.lineTo(qt*o-Jt*s,Jt*o+qt*s),t.lineTo(qt*l-Jt*r,Jt*l+qt*r),t.lineTo(qt*n-Jt*a,Jt*n+qt*a),t.lineTo(qt*o+Jt*s,qt*s-Jt*o),t.lineTo(qt*l+Jt*r,qt*r-Jt*l),t.lineTo(qt*n+Jt*a,qt*a-Jt*n),t.closePath()},"draw")};function te(){var t=Dt(Ot),e=Dt(64),i=null;function o(){var o;if(i||(i=o=Mt()),t.apply(this,arguments).draw(i,+e.apply(this,arguments)),o)return i=null,o+""||null}return m(o,"o"),dt(o,"symbol"),o.type=function(e){return arguments.length?(t="function"==typeof e?e:Dt(e),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:Dt(+t),o):e},o.context=function(t){return arguments.length?(i=null==t?null:t,o):i},o}m(te,"xt"),dt(te,"d3Symbol");var ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie=/* @__PURE__ */dt(function(t){return t},"d3_identity"),oe=/* @__PURE__ */dt(function(t){for(var e=[],i=0,o=t.length;i<o;i++)e[i]=t[o-i-1];return e},"d3_reverse"),se=/* @__PURE__ */dt(function(t,e){t.each(function(){var t,i=C(this),o=i.text().split(/\s+/).reverse(),s=[];i.attr("y");for(var l=parseFloat(i.attr("dy"))||0,r=i.text(null).append("tspan").attr("x",0).attr("dy",l+"em");t=o.pop();)s.push(t),r.text(s.join(" ")),r.node().getComputedTextLength()>e&&s.length>1&&(s.pop(),r.text(s.join(" ")),s=[t],r=i.append("tspan").attr("x",0).attr("dy",1.2+l+"em").text(t))})},"d3_textWrapping"),le=/* @__PURE__ */dt(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],i=arguments[2],o=arguments[3],s=arguments[4];if("object"===(void 0===e?"undefined":ee(e))){if(0===e.length)return t;for(var l=e.length;l<t.length;l++)e.push(t[l]);return e}if("function"==typeof e){for(var r=[],n=t.length,a=0;a<n;a++)r.push(e({i:a,genLength:n,generatedLabels:t,domain:i,range:o,labelDelimiter:s}));return r}return t},"d3_mergeLabels"),re=/* @__PURE__ */dt(function(t,e,i){var o=[];if(e.length>1)o=e;else for(var s=t.domain(),l=(s[s.length-1]-s[0])/(e-1),r=0;r<e;r++)o.push(s[0]+r*l);var n=o.map(i);return{data:o,labels:n,feature:/* @__PURE__ */dt(function(e){return t(e)},"feature")}},"d3_linearLegend"),ne=/* @__PURE__ */dt(function(t,e,i){var o=t.range().map(function(o){var s=t.invertExtent(o);return e(s[0])+" "+i+" "+e(s[1])});return{data:t.range(),labels:o,feature:ie}},"d3_quantLegend"),ae=/* @__PURE__ */dt(function(t){return{data:t.domain(),labels:t.domain(),feature:/* @__PURE__ */dt(function(e){return t(e)},"feature")}},"d3_ordinalLegend"),he=/* @__PURE__ */dt(function(t,e,i){t.call("cellover",i,e)},"d3_cellOver"),de=/* @__PURE__ */dt(function(t,e,i){t.call("cellout",i,e)},"d3_cellOut"),pe=/* @__PURE__ */dt(function(t,e,i){t.call("cellclick",i,e)},"d3_cellClick"),ce={d3_drawShapes:/* @__PURE__ */dt(function(t,e,i,o,s,l){"rect"===t?e.attr("height",i).attr("width",o):"circle"===t?e.attr("r",s):"line"===t?e.attr("x1",0).attr("x2",o).attr("y1",0).attr("y2",0):"path"===t&&e.attr("d",l)},"d3_drawShapes"),d3_addText:/* @__PURE__ */dt(function(t,e,i,o,s){e.append("text").attr("class",o+"label");var l=t.selectAll("g."+o+"cell text."+o+"label").data(i).text(ie);return s&&t.selectAll("g."+o+"cell text."+o+"label").call(se,s),l},"d3_addText"),d3_calcType:/* @__PURE__ */dt(function(t,e,i,o,s,l){var r=t.invertExtent?ne(t,s,l):t.ticks?re(t,i,s):ae(t),n=t.range&&t.range()||t.domain();return r.labels=le(r.labels,o,t.domain(),n,l),e&&(r.labels=oe(r.labels),r.data=oe(r.data)),r},"d3_calcType"),d3_filterCells:/* @__PURE__ */dt(function(t,e){var i=t.data.map(function(e,i){return{data:e,label:t.labels[i]}}).filter(e),o=i.map(function(t){return t.data}),s=i.map(function(t){return t.label});return t.data=t.data.filter(function(t){return-1!==o.indexOf(t)}),t.labels=t.labels.filter(function(t){return-1!==s.indexOf(t)}),t},"d3_filterCells"),d3_placement:/* @__PURE__ */dt(function(t,e,i,o,s,l){e.attr("transform",i),o.attr("transform",s),"horizontal"===t&&o.style("text-anchor",l)},"d3_placement"),d3_addEvents:/* @__PURE__ */dt(function(t,e){t.on("mouseover.legend",function(t){he(e,t,this)}).on("mouseout.legend",function(t){de(e,t,this)}).on("click.legend",function(t){pe(e,t,this)})},"d3_addEvents"),d3_title:/* @__PURE__ */dt(function(t,e,i,o){if(""!==e){t.selectAll("text."+i+"legendTitle").data([e]).enter().append("text").attr("class",i+"legendTitle"),t.selectAll("text."+i+"legendTitle").text(e),o&&t.selectAll("text."+i+"legendTitle").call(se,o);var s=t.select("."+i+"legendCells"),l=t.select("."+i+"legendTitle").nodes().map(function(t){return t.getBBox().height})[0],r=-s.nodes().map(function(t){return t.getBBox().x})[0];s.attr("transform","translate("+r+","+l+")")}},"d3_title"),d3_defaultLocale:{format:I,formatPrefix:N},d3_defaultFormatSpecifier:".01f",d3_defaultDelimiter:"to"};function ue(){var t=G(),e="rect",i=15,o=15,s=10,l=2,r=[5],n=void 0,a=[],h="",d=!1,p="",c=ce.d3_defaultLocale,u=ce.d3_defaultFormatSpecifier,g=10,_="middle",y=ce.d3_defaultDelimiter,f=void 0,b="vertical",w=!1,x=void 0,v=void 0,C=Y("cellover","cellout","cellclick");function T(m){var T=ce.d3_calcType(t,w,r,a,c.format(u),y);m.selectAll("g").data([t]).enter().append("g").attr("class",h+"legendCells"),n&&ce.d3_filterCells(T,n);var S=m.select("."+h+"legendCells").selectAll("."+h+"cell").data(T.data),P=S.enter().append("g").attr("class",h+"cell");P.append(e).attr("class",h+"swatch");var B=m.selectAll("g."+h+"cell "+e+"."+h+"swatch").data(T.data);ce.d3_addEvents(P,C),S.exit().transition().style("opacity",0).remove(),B.exit().transition().style("opacity",0).remove(),B=B.merge(B),ce.d3_drawShapes(e,B,o,i,s,x);var z=ce.d3_addText(m,P,T.labels,h,f);S=P.merge(S);var A=z.nodes().map(function(t){return t.getBBox()}),W=B.nodes().map(function(t){return t.getBBox()});d?B.attr("class",function(t){return h+"swatch "+T.feature(t)}):"line"==e?B.style("stroke",T.feature):B.style("fill",T.feature);var k,I=void 0,M=void 0,D="start"==_?0:"middle"==_?.5:1;"vertical"===b?(k=A.map(function(t,e){return Math.max(t.height,W[e].height)}),I=/* @__PURE__ */dt(function(t,e){return"translate(0, "+(U(k.slice(0,e))+e*l)+")"},"cellTrans"),M=/* @__PURE__ */dt(function(t,e){return"translate( "+(W[e].width+W[e].x+g)+", "+(W[e].y+W[e].height/2+5)+")"},"textTrans")):"horizontal"===b&&(I=/* @__PURE__ */dt(function(t,e){return"translate("+e*(W[e].width+l)+",0)"},"cellTrans"),M=/* @__PURE__ */dt(function(t,e){return"translate("+(W[e].width*D+W[e].x)+",\n "+(W[e].height+W[e].y+g+8)+")"},"textTrans")),ce.d3_placement(b,S,I,z,M,_),ce.d3_title(m,p,h,v),S.transition().style("opacity",1)}return m(T,"B"),dt(T,"legend"),T.scale=function(e){return arguments.length?(t=e,T):t},T.cells=function(t){return arguments.length?((t.length>1||t>=2)&&(r=t),T):r},T.cellFilter=function(t){return arguments.length?(n=t,T):n},T.shape=function(t,i){return arguments.length?(("rect"==t||"circle"==t||"line"==t||"path"==t&&"string"==typeof i)&&(e=t,x=i),T):e},T.shapeWidth=function(t){return arguments.length?(i=+t,T):i},T.shapeHeight=function(t){return arguments.length?(o=+t,T):o},T.shapeRadius=function(t){return arguments.length?(s=+t,T):s},T.shapePadding=function(t){return arguments.length?(l=+t,T):l},T.labels=function(t){return arguments.length?(a=t,T):a},T.labelAlign=function(t){return arguments.length?("start"!=t&&"end"!=t&&"middle"!=t||(_=t),T):_},T.locale=function(t){return arguments.length?(c=V(t),T):c},T.labelFormat=function(t){return arguments.length?(u=X(t),T):T.locale().format(u)},T.labelOffset=function(t){return arguments.length?(g=+t,T):g},T.labelDelimiter=function(t){return arguments.length?(y=t,T):y},T.labelWrap=function(t){return arguments.length?(f=t,T):f},T.useClass=function(t){return arguments.length?(!0!==t&&!1!==t||(d=t),T):d},T.orient=function(t){return arguments.length?("horizontal"!=(t=t.toLowerCase())&&"vertical"!=t||(b=t),T):b},T.ascending=function(t){return arguments.length?(w=!!t,T):w},T.classPrefix=function(t){return arguments.length?(h=t,T):h},T.title=function(t){return arguments.length?(p=t,T):p},T.titleWidth=function(t){return arguments.length?(v=t,T):v},T.textWrap=function(t){return arguments.length?(textWrap=t,T):textWrap},T.on=function(){var t=C.on.apply(C,arguments);return t===C?T:t},T}m(ue,"Ft"),dt(ue,"color");const ge=(m(a=class extends A{_owner;_targetWidget;_targetWidgetMonitor;_legendOrdinal;_disabled=[];_symbolTypeMap={circle:Ot,cross:Lt,diamond:Gt,square:Ut,star:Xt,triangle:$t,wye:Qt};constructor(t){super(),this._owner=t,this._drawStartPos="origin";const e=this;this._legendOrdinal=ue().shape("path",te().type(Ot).size(150)()).shapePadding(10).shapeRadius(10).on("cellclick",function(t){e.onClick(t,this)}).on("cellover",t=>{e.onOver(t,this)}).on("cellout",t=>{e.onOut(t,this)})}isDisabled(t){return void 0!==t&&("string"==typeof t?0===t.indexOf("__")||this._disabled.indexOf(t)>=0:t instanceof W.Field?0===t.id().indexOf("__")||this._disabled.indexOf(t.id())>=0:this._disabled.indexOf(t)>=0)}filteredFields(){switch(this.dataFamily()){case"2D":return this.fields();case"ND":return this.fields().filter(t=>!this.isDisabled(t))}return this.fields()}filteredColumns(){switch(this.dataFamily()){case"2D":return this.columns();case"ND":return this.columns().filter(t=>!this.isDisabled(t))}return this.columns()}filteredData(){switch(this.dataFamily()){case"2D":return this.data().filter(t=>!this.isDisabled(t[0]));case"ND":const t={};let e=!1;return this.columns().forEach((i,o)=>{const s=this.isDisabled(i);t[o]=s,s&&(e=!0)}),e?this.data().map(e=>e.filter((e,i)=>!t[i])):this.data()}return this.data()}isRainbow(){const t=this.getWidget();return t&&t._palette&&"rainbow"===t._palette.type()}targetWidget(t){if(!arguments.length)return this._targetWidget;if(this._targetWidget=t,this._targetWidgetMonitor&&(this._targetWidgetMonitor.remove(),delete this._targetWidgetMonitor),this._targetWidget){const t=this;this._targetWidgetMonitor=this._targetWidget.monitor(function(e,i,o,s){switch(e){case"chart":case"columns":case"data":case"paletteID":t.lazyRender()}})}return this}getWidget(){return this._targetWidget&&"composite_MultiChart"===this._targetWidget.classID()?this._targetWidget.chart():this._targetWidget}getPalette(){const t=this.getWidget();if(t&&t._palette)switch(t._palette.type()){case"ordinal":return k.ordinal(t._palette.id());case"rainbow":return k.rainbow(t._palette.id())}return k.ordinal("default")}getPaletteType(){return this.getPalette().type()}fillColorFunc(){const t=this.getWidget();if(t&&t.fillColor)return t._palette&&t.paletteID&&t._palette.name!==t.paletteID()&&(t._palette=t._palette.switch(t.paletteID())),(e,i,o)=>t.fillColor(e,i,o);const e=k.ordinal(t&&t.paletteID&&t.paletteID()||"default");return(t,i,o)=>e(i)}fillColor(t,e,i){return this.fillColorFunc()(t,e,i)}_g;enter(t,e){super.enter(t,e),this._g=e.append("g").attr("class","legendOrdinal")}calcMetaData(){let t=[],e=0,i=0;const o=this.columns().length;if(this._targetWidget){const s=this.columns();switch(this.getPaletteType()){case"ordinal":const l=this.fillColorFunc();let r=0;switch(this.dataFamily()){case"2D":t=this.data().map(function(t,s){r=this.data()[s].slice(1,o).reduce((t,e)=>t+e,0);const n=this.isDisabled(t[0]);n||(e+=r);const a=t[0]+(!n&&this.showSeriesTotal()?` (${r})`:""),h=this.textSize(a);return i<h.width&&(i=h.width),[l(t,t[0],!1),t[0],a]},this);break;case"ND":t=this.columns().filter(t=>0!==t.indexOf("__")).filter(function(t,e){return e>0}).map(function(t,o){r=this.data().reduce((t,e)=>t+e[o+1],0);const n=this.isDisabled(s[o+1]),a=t+(!n&&this.showSeriesTotal()?` (${r})`:"");n||(e+=r);const h=this.textSize(a);return i<h.width&&(i=h.width),[l(void 0,t,!1),t,a]},this);break;default:t=this.columns().map(function(t){return[l(void 0,t,!1),t]},this)}break;case"rainbow":const n=this.getPalette(),a=I(this.rainbowFormat()),h=this.getWidget(),d=this.rainbowBins(),p=h._dataMinWeight,c=h._dataMaxWeight,u=(c-p)/(d-1);t.push([n(p,p,c),a(p)]);for(let e=1;e<d-1;++e){let i=u*e;Math.floor(i)>parseInt(t[0][1])&&(i=Math.floor(i)),t.push([n(i,p,c),a(i)])}t.push([n(c,p,c),a(c)])}}return{dataArr:t,total:e,maxLabelWidth:i}}update(t,e){super.update(t,e);const{dataArr:i,maxLabelWidth:o,total:s}=this.calcMetaData(),l=this.shapeRadius(),r=this.radiusToSymbolSize(l);let n=this.itemPadding();"horizontal"===this.orientation()&&(n+=o-2*l);const a=M().domain(i.map(t=>t[1])).range(i.map(t=>t[0]));this._legendOrdinal.shape("path",te().type(this._symbolTypeMap[this.symbolType()]).size(r)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(n).scale(a).labels(t=>i[t.i][2]),this._g.call(this._legendOrdinal),this.updateDisabled(e,i);const h=this._g.select(".legendCells").node().getBBox();let d=Math.abs(h.x),p=Math.abs(h.y)+1;"horizontal"===this.orientation()?("start"===this.labelAlign()?d+=1:"end"===this.labelAlign()&&(d-=1),this.width()>h.width&&(d+=(this.width()-h.width)/2)):"vertical"===this.orientation()&&(d+=1,this._containerSize.height>h.height)&&(p+=(this.height()-h.height)/2),this._g.attr("transform",`translate(${d}, ${p})`),this.pos({x:0,y:0}),this._legendOrdinal.labelOffset(this.itemPadding());const c=this._g.selectAll(".legendTotal").data(i.length&&this.showLegendTotal()?[s]:[]),u=`Total: ${s}`,g=-d,_=h.height+this.itemPadding()+1;this.enableOverflowScroll(!1),this.enableOverflow(!0),c.enter().append("text").classed("legendTotal",!0).merge(c).attr("transform",`translate(${g}, ${_})`).text(u),c.exit().remove()}updateDisabled(t,e){t.style("cursor","pointer").selectAll("path.swatch").filter((t,i)=>i<e.length).style("stroke",(t,i)=>e[i][0]).style("fill",(t,i)=>this._disabled.indexOf(t)<0?e[i][0]:"white")}postUpdate(t,e){let i;this._boundingBox&&(i=this._boundingBox.width,this._boundingBox.width=this._size.width),super.postUpdate(t,e),void 0!==i&&(this._boundingBox.width=i),this._parentRelativeDiv.style("overflow","hidden")}exit(t,e){super.exit(t,e)}radiusToSymbolSize(t){const e=Math.pow(t,2)*Math.PI;switch(this.symbolType()){case"star":return.45*e;case"triangle":return.65*e;case"cross":case"diamond":case"wye":return.75*e;case"circle":return e;case"square":return 1.3*e}}onClick(t,e){if("ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":const e=this._disabled.indexOf(t);e<0?this._disabled.push(t):this._disabled.splice(e,1),this._owner.refreshColumns(),this._owner.refreshData(),this._owner.render()}}onOver(t,e){if(q(this._owner)&&"ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":this._disabled.indexOf(t)<0&&this._owner.highlightColumn(t)}}onOut(t,e){if(q(this._owner)&&"ordinal"===this.getPaletteType())switch(this.dataFamily()){case"2D":case"ND":this._owner.highlightColumn()}}onDblClick(t,e){}onMouseOver(t,e){}_containerSize;resize(t){let e;if(this.fitToContent()){this._containerSize=t;const i=this.getBBox();t.width>i.width&&(i.width=t.width),t.height>i.height&&(i.height=t.height),e=super.resize.apply(this,[{...i}])}else e=super.resize.apply(this,arguments);return e}},"_Legend"),a);dt(ge,"Legend");let _e=ge;_e.prototype._class+=" layout_Legend",_e.prototype.publish("title","","string","Title"),_e.prototype.publish("symbolType","circle","set","Shape of each legend item",["circle","cross","diamond","square","star","triangle","wye"]),_e.prototype.publish("labelMaxWidth",null,"number","Max Label Width (pixels)",null,{optional:!0}),_e.prototype.publish("orientation","vertical","set","Orientation of Legend rows",["vertical","horizontal"],{tags:["Private"]}),_e.prototype.publish("dataFamily","ND","set","Type of data",["1D","2D","ND","map","graph","any"],{tags:["Private"]}),_e.prototype.publish("rainbowFormat",",","string","Rainbow number formatting",null,{tags:["Private"],optional:!0,disable:/* @__PURE__ */dt(t=>!t.isRainbow(),"disable")}),_e.prototype.publish("rainbowBins",8,"number","Number of rainbow bins",null,{tags:["Private"],disable:/* @__PURE__ */dt(t=>!t.isRainbow(),"disable")}),_e.prototype.publish("showSeriesTotal",!1,"boolean","Show value next to series"),_e.prototype.publish("showLegendTotal",!1,"boolean","Show a total of the series values under the legend",null),_e.prototype.publish("itemPadding",8,"number","Padding between legend items (pixels)"),_e.prototype.publish("shapeRadius",7,"number","Radius of legend shape (pixels)"),_e.prototype.publish("fitToContent",!0,"boolean","If true, resize will simply reapply the bounding box dimensions"),_e.prototype.publish("labelAlign","start","set","Horizontal alignment of legend item label (for horizontal orientation only)",["start","middle","end"],{optional:!0,disable:/* @__PURE__ */dt(t=>"vertical"===t.orientation(),"disable")});const ye=(m(h=class extends x{_widget;_relativeTarget;_fade;_modal;_modalHeader;_modalBody;_modalHeaderAnnotations;_modalHeaderCloseButton;_close;constructor(){super(),this._tag="div"}closeModal(){this.visible(!1)}getRelativeTarget(){let t;return this.relativeTargetId()&&(t=document.getElementById(this.relativeTargetId()),t)?t:!t&&(t=this.locateAncestor("layout_Grid"),t&&t.element)?t.element().node():document.body}setModalSize(){null!==this.fixedHeight()&&null!==this.fixedWidth()?this._modal.style("height",this.fixedHeight()).style("width",this.fixedWidth()).style("min-height",null).style("min-width",null).style("max-height",null).style("max-width",null):(this.minHeight()||this.minWidth())&&this._modal.style("min-height",this.minHeight()).style("min-width",this.minWidth()).style("max-height",this.maxHeight()).style("max-width",this.maxWidth());const t=this._modal.node().getBoundingClientRect(),e=this._modalHeader.node().getBoundingClientRect();return this._modalBody.style("height",t.height-e.height+"px").style("width",t.width),t}setFadePosition(t){this._fade.style("top",t.top+"px").style("left",t.left+"px").style("width",t.width+"px").style("height",t.height+"px")}setModalPosition(t){const e=this.setModalSize();if(null!==this.fixedTop()&&null!==this.fixedLeft())this._modal.style("top",`calc(${this.fixedTop()} + ${t.top}px)`).style("left",`calc(${this.fixedLeft()} + ${t.left}px)`);else if(null!==this.fixedHeight()&&null!==this.fixedWidth())this._modal.style("top",t.top+t.height/2-e.height/2+"px").style("left",t.left+t.width/2-e.width/2+"px");else if(this.minHeight()||this.minWidth()){const e=this._modal.node().getBoundingClientRect();this._modal.style("top",t.top+t.height/2-e.height/2+"px").style("left",t.left+t.width/2-e.width/2+"px")}}resize(t){return super.resize(),this._modal&&this.setModalSize(),this}resizeBodySync(t,e){const i=this._modalHeader.node().getBoundingClientRect();return this._modal.style("width",t+"px").style("height",e+i.height+"px").style("min-width",t+"px").style("min-height",e+i.height+"px"),this._modalHeader.style("width",t+"px"),this._modalBody.style("width",t+"px").style("height",e+"px"),this.minWidth(t+"px").minHeight(e+i.height+"px").resize({height:e+i.height,width:t})}enter(t,e){super.enter(t,e),this._fade=e.append("div").classed("layout_Modal-fade",!0).classed("layout_Modal-fadeClickable",this.enableClickFadeToClose()).classed("layout_Modal-fade-hidden",!this.showFade());const i=2*this.titleFontSize();this._modal=e.append("div").classed("layout_Modal-content",!0),this._modalHeader=this._modal.append("div").classed("layout_Modal-header",!0).style("color",this.titleFontColor()).style("font-size",this.titleFontSize()+"px").style("height",i+"px"),this._modalBody=this._modal.append("div").classed("layout_Modal-body",!0).style("height",`calc( 100% - ${i}px )`).style("overflow-x",this.overflowX()).style("overflow-y",this.overflowY()),this._modalHeader.append("div").classed("layout_Modal-title",!0).style("line-height",this.titleFontSize()+"px").style("top",this.titleFontSize()/2+"px").style("left",this.titleFontSize()/2+"px").text(this.formattedTitle()),this._modalHeaderAnnotations=this._modalHeader.append("div").classed("layout_Modal-annotations",!0),this._modalHeaderCloseButton=this._modalHeaderAnnotations.append("div").classed("layout_Modal-closeButton",!0).html('<i class="fa fa-close"></i>'),this._modalHeaderAnnotations.style("line-height",this.titleFontSize()+"px").style("right",this.titleFontSize()/2+"px").style("top",this.titleFontSize()/2+"px"),this._modalHeaderCloseButton.on("click",()=>{this.closeModal()}),this._fade.on("click",t=>{this.enableClickFadeToClose()&&this.closeModal()})}update(t,e){super.update(t,e),e.style("display",this.show()?null:"none"),this._fade.classed("layout_Modal-fade-hidden",!this.showFade()),this._relativeTarget=this.getRelativeTarget(),this.setModalSize();const i=this._relativeTarget.getBoundingClientRect();this.setFadePosition(i),this.setModalPosition(i),this.show()?(this._widget.target()||this._widget.target(this._modalBody.node()),this._widget.resize().render()):this._widget.target(null).render()}exit(t,e){this._widget&&this._widget.target(null),super.exit(t,e)}formattedTitle(){const t=this.title_exists()?this.title().trim():"";return t.length>0&&"("===t.slice(0,1)&&")"===t.slice(-1)?t.slice(1,-1):this.title()}},"_Modal"),h);dt(ye,"Modal");let fe=ye;fe.prototype._class+=" layout_Modal",fe.prototype.publish("title",null,"string","title"),fe.prototype.publish("widget",null,"widget","widget"),fe.prototype.publish("titleFontSize",18,"number","titleFontSize (in pixels)"),fe.prototype.publish("titleFontColor","#ffffff","html-color","titleFontColor"),fe.prototype.publish("relativeTargetId",null,"string","relativeTargetId"),fe.prototype.publish("show",!0,"boolean","show"),fe.prototype.publish("showFade",!0,"boolean","showFade"),fe.prototype.publish("enableClickFadeToClose",!0,"boolean","enableClickFadeToClose"),fe.prototype.publish("minWidth","400px","string","minWidth"),fe.prototype.publish("minHeight","400px","string","minHeight"),fe.prototype.publish("maxWidth","800px","string","maxWidth"),fe.prototype.publish("maxHeight","800px","string","maxHeight"),fe.prototype.publish("fixedWidth",null,"string","fixedWidth"),fe.prototype.publish("fixedHeight",null,"string","fixedHeight"),fe.prototype.publish("fixedTop",null,"string","fixedTop"),fe.prototype.publish("fixedLeft",null,"string","fixedLeft"),fe.prototype.publish("overflowX","hidden","string","overflowX"),fe.prototype.publish("overflowY","scroll","string","overflowY");const be=(m(d=class extends St{_legend=new _e(this).enableOverflow(!0);_progressBar=new D;_autoScale=!1;_resolutions={tiny:{width:100,height:100},small:{width:300,height:300}};_modal=new fe;_highlight;_scale;_orig_size;_toggleInfo=(new H).faChar("fa-info-circle").tooltip(".Description").selected(!1).on("enabled",()=>""!==this.description()).on("click",()=>{if(this._toggleInfo.selected()){this._modal.title(this.title()).widget((new F).text(this.description())).show(!0).render();const t=this._modal._close;this._modal._close=()=>{this._toggleInfo.selected(!1).render(),this._modal._close=t}}}).on("mouseMove",()=>{}).on("mouseOut",()=>{});_toggleData=(new H).faChar("fa-table").tooltip("Data").on("click",()=>{this.dataVisible(this._toggleData.selected()),this.render()});_buttonDownload=(new O).faChar("fa-download").tooltip("Download").on("click",()=>{this.downloadCSV()});_buttonDownloadImage=(new O).faChar("fa-image").tooltip("Download Image").on("click",()=>{this.downloadPNG()});_toggleLegend=(new H).faChar("fa-list-ul").tooltip("Legend").selected(!1).on("click",()=>{const t=this._toggleLegend.selected();"bottom"===this.legendPosition()?this.showBottom(t):"right"===this.legendPosition()&&this.showRight(t),this.legendVisible(t),this.render()});_spacer=new L;_titleBar=(new R).buttons([this._toggleData,this._buttonDownload,this._buttonDownloadImage,this._spacer,this._toggleLegend]);_carousel=new Bt;_table=new $;_widget;_hideLegendToggleList=["dgrid_Table"];constructor(){super(),this._tag="div"}fields(t){return arguments.length?(super.fields(t),this._legend.fields(t),this.refreshFields(),this):super.fields()}refreshFields(){return this._widget.fields(this._legend.filteredFields()),this._table.fields(this._legend.filteredFields()),this}columns(t,e){return arguments.length?(super.columns(t,e),this._legend.columns(t,e),this.refreshColumns(),this):super.columns()}refreshColumns(){return this._widget.columns(this._legend.filteredColumns()),this._table.columns(this._legend.filteredColumns()),this}data(t){return arguments.length?(super.data(t),this._legend.data(t),this.refreshData(),this):super.data()}refreshData(){return this._widget.data(this._legend.filteredData()),this._table.data(this._legend.filteredData()),this}highlight(t){return arguments.length?(this._highlight=t,this):this._highlight}startProgress(){this._progressBar.start()}finishProgress(){this._progressBar.finish()}buttons(t){return arguments.length?(this._titleBar.buttons(t),this):this._titleBar.buttons()}downloadCSV(){const t=this.downloadTitle()?this.downloadTitle():this.title()?this.title():"data",e=this.downloadTimestampSuffix()?"_"+S.timestamp():"";return S.downloadString("CSV",this._widget.export("CSV"),t+e),this}downloadPNG(){const t=this.widget();return t instanceof A&&(this.legendVisible()?t.downloadPNG(this.title(),void 0,this._legend):t.downloadPNG(this.title())),this}highlightColumn(t){if(t){const e=`series-${this.cssTag(t)}`;this._centerWA.element().selectAll(".series").each(function(){const t=C(this),i=t.classed(e);t.classed("highlight",i).classed("lowlight",!i)})}else this._centerWA.element().selectAll(".series").classed("highlight",!1).classed("lowlight",!1);return this}getResponsiveMode(){return this.enableAutoscaling()?this._autoScale?this.size().width<=this._resolutions.tiny.width||this.size().height<=this._resolutions.tiny.height?"tiny":this.size().width<=this._resolutions.small.width||this.size().height<=this._resolutions.small.height?"small":"regular":"regular":"none"}setOrigSize(){this._orig_size=JSON.parse(JSON.stringify(this.size()))}enter(t,e){super.enter(t,e),this._modal.target(this.target()).relativeTargetId(this.id()),this.top(this._titleBar),this.center(this._carousel),this._legend.targetWidget(this._widget).orientation("vertical").title("").visible(!1),this._progressBar.enter(t,e),this.setOrigSize()}preUpdateTiny(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display","none")}preUpdateSmall(t){const e=this._orig_size.width/this._resolutions.small.width,i=this._orig_size.height/this._resolutions.small.height;this._scale=Math.min(e,i);const o=this._scale===e;this.size({width:o?this._resolutions.small.width:this._orig_size.width*(1/this._scale),height:o?this._orig_size.height*(1/this._scale):this._resolutions.small.height}),t.select("div.title-icon").style("position","static"),t.selectAll("lhs").style("display","none"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden"),t.style("transform",`scale(${this._scale})`)}preUpdateRegular(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden"),t.select("div.title-icon").style("position","static"),t.style("transform","translate(0px,0px) scale(1)")}_prevdataVisible;_prevlegendVisible;_prevLegendPosition;_prevChartDataFamily;_prevChart;_prevButtons;update(t,e){super.update(t,e)}preUpdate(t,e){switch(super.preUpdate(t,e),this._prevLegendPosition!==this.legendPosition()&&(null!==this._legend.target()&&this._legend.target(null),void 0!==this._prevLegendPosition?this.swap(this._prevLegendPosition,this.legendPosition()):this[this.legendPosition()](this._legend),"right"===this.legendPosition()?(this.rightOverflowX("hidden"),this.rightOverflowY("auto"),this.bottomOverflowX("visible"),this.bottomOverflowY("visible")):(this.rightOverflowX("visible"),this.rightOverflowY("visible"),this.bottomOverflowX("auto"),this.bottomOverflowY("hidden")),this._prevLegendPosition=this.legendPosition()),this._prevdataVisible!==this.dataVisible()&&(this._prevdataVisible=this.dataVisible(),this._toggleData.selected(this._prevdataVisible),this._legend.visible(this._prevlegendVisible&&!this._prevdataVisible),this._carousel.active(this._prevdataVisible?1:0)),this._prevlegendVisible!==this.legendVisible()&&(this._prevlegendVisible=this.legendVisible(),this._toggleLegend.selected(this._prevlegendVisible),this._legend.visible(this._prevlegendVisible&&!this._prevdataVisible)),this._legend.orientation("bottom"===this.legendPosition()?"horizontal":"vertical"),this.showLeft(!this.left()),this.getResponsiveMode()){case"tiny":this.preUpdateTiny(e);break;case"small":this.preUpdateSmall(e);break;case"regular":this.preUpdateRegular(e)}const i="composite_MultiChart"===this._widget.classID()?this._widget.chart():this._widget;if(this._legend.dataFamily(i._dataFamily||"any"),this._prevChartDataFamily!==this._legend.dataFamily()&&(this._prevChartDataFamily=this._legend.dataFamily(),"any"===this._prevChartDataFamily)&&(this._toggleLegend.selected(!1),this._legend.visible(!1)),e.style("box-shadow",this.highlight()?`inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}`:"none"),-1!==this._hideLegendToggleList.indexOf(i.classID())?(this._spacer.visible(!1),this._toggleLegend.visible(!1)):(this._spacer.visible(!0),this._toggleLegend.visible(!0)),this._prevChart!==i){this._prevChart=i;const t=i?i._titleBar||i._iconBar:void 0;if(t&&t instanceof E){this._prevButtons=this._prevButtons||[...this.buttons()];const e=[...t.buttons(),new L,...this._prevButtons];t.buttons([]).render(),this.buttons(e)}else this._prevButtons&&this.buttons(this._prevButtons)}const o=[];this.dataButtonVisible()||o.push(this._toggleData),this.downloadButtonVisible()||o.push(this._buttonDownload),this.downloadImageButtonVisible()||o.push(this._buttonDownloadImage),this.legendButtonVisible()||o.push(this._toggleLegend),this._buttonDownloadImage.enabled(this.widget()instanceof A),this._titleBar.hiddenButtons(o).visible(this.titleVisible()),this.topOverlay(this.titleOverlay()||!this.titleVisible())}postUpdate(t,e){switch(super.postUpdate(t,e),this.getResponsiveMode()){case"tiny":this.postUpdateTiny(e);break;case"small":this.postUpdateSmall(e);break;case"regular":this.postUpdateRegular(e)}}postUpdateTiny(t){t.selectAll("div.body,div.title-text,div.icon-bar").style("display","none"),t.selectAll("div.data-count").style("visibility","visible").style("font-size",this.titleIconFontSize()/3+"px").style("line-height",this.titleIconFontSize()/3+"px").style("left",this.titleIconFontSize()+"px").text(this.data().length),t.style("transform","translate(0px,0px) scale(1)");const e=t.selectAll("div.title-icon"),i=e.node(),o=t.node().parentElement.getBoundingClientRect();if(i){const i=e.node().getBoundingClientRect(),s=o.height/2;e.style("position","absolute").style("left",`calc(50% - ${i.width/2}px)`).style("top",s-i.height/2+"px"),t.selectAll("div.data-count").style("position","absolute").style("left",`calc(50% + ${i.width/2}px)`).style("top",s-i.height/2+"px")}}postUpdateSmall(t){t.selectAll("lhs").style("display","none"),t.selectAll("div.title-icon").style("position","static"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden");const e=t.node().getBoundingClientRect(),i=t.node().parentElement.getBoundingClientRect();t.style("transform",`translate(${i.x-e.x}px, ${i.y-e.y}px) scale(${this._scale})`)}postUpdateRegular(t){t.selectAll("div.title-icon").style("position","static"),t.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),t.selectAll("div.data-count").style("visibility","hidden")}exit(t,e){this._progressBar.exit(t,e),this.right(null),this._legend.target(null),this.center(null),this._carousel.target(null),this.top(null),this._titleBar.target(null),this._modal.target(null),delete this._prevChart,delete this._prevButtons,delete this._prevChartDataFamily,delete this._prevPos,delete this._prevdataVisible,delete this._prevlegendVisible,super.exit(t,e)}click(t,e,i){}dblclick(t,e,i){}vertex_click(t,e,i,o){o&&o.vertex}vertex_dblclick(t,e,i,o){o&&o.vertex}edge_click(t,e,i,o){o&&o.edge}edge_dblclick(t,e,i,o){o&&o.edge}},"_ChartPanel"),d);dt(be,"ChartPanel");let we=be;we.prototype._class+=" layout_ChartPanel",we.prototype.publishReset(),we.prototype.publishProxy("title","_titleBar"),we.prototype.publish("titleVisible",!0,"boolean"),we.prototype.publish("titleOverlay",!1,"boolean"),we.prototype.publishProxy("titleIcon","_titleBar"),we.prototype.publishProxy("titleIconFont","_titleBar"),we.prototype.publishProxy("titleFont","_titleBar"),we.prototype.publishProxy("titleIconFontSize","_titleBar"),we.prototype.publishProxy("titleFontSize","_titleBar"),we.prototype.publishProxy("description","_titleBar"),we.prototype.publishProxy("descriptionFont","_titleBar"),we.prototype.publishProxy("descriptionFontSize","_titleBar"),we.prototype.publish("dataVisible",!1,"boolean","Show data table"),we.prototype.publish("dataButtonVisible",!0,"boolean","Show data table button"),we.prototype.publish("downloadButtonVisible",!0,"boolean","Show data download button"),we.prototype.publish("downloadImageButtonVisible",!1,"boolean","Show image download button"),we.prototype.publish("downloadTitle","","string","File name when downloaded"),we.prototype.publish("downloadTimestampSuffix",!0,"boolean","Use timestamp as file name suffix"),we.prototype.publish("legendVisible",!1,"boolean","Show legend"),we.prototype.publish("legendButtonVisible",!0,"boolean","Show legend button"),we.prototype.publish("legendPosition","right","set","Position of legend",["right","bottom"]),we.prototype.publishProxy("legend_labelMaxWidth","_legend","labelMaxWidth"),we.prototype.publishProxy("legend_showSeriesTotal","_legend","showSeriesTotal"),we.prototype.publishProxy("legend_showLegendTotal","_legend","showLegendTotal"),we.prototype.publishProxy("legend_itemPadding","_legend","itemPadding"),we.prototype.publishProxy("legend_shapeRadius","_legend","shapeRadius"),we.prototype.publishProxy("legend_symbolType","_legend","symbolType"),we.prototype.publishProxy("legend_labelAlign","_legend","labelAlign"),we.prototype.publish("widget",null,"widget","Widget",void 0,{render:!1}),we.prototype.publish("enableAutoscaling",!1,"boolean"),we.prototype.publish("highlightSize",4,"number"),we.prototype.publish("highlightColor","#e67e22","html-color"),we.prototype.publishProxy("progress_halfLife","_progressBar","halfLife"),we.prototype.publishProxy("progress_decay","_progressBar","decay"),we.prototype.publishProxy("progress_size","_progressBar","size"),we.prototype.publishProxy("progress_color","_progressBar","color"),we.prototype.publishProxy("progress_blurBar","_progressBar","blurBar"),we.prototype.publishProxy("progress_blurSize","_progressBar","blurSize"),we.prototype.publishProxy("progress_blurColor","_progressBar","blurColor"),we.prototype.publishProxy("progress_blurOpacity","_progressBar","blurOpacity"),we.prototype.widget=function(t){if(!arguments.length)return this._widget;this._carousel.widgets([t,this._table]),this._widget=t,this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());const e=this,i=this._widget;return i.click=function(){e.click.apply(e,arguments)},i.dblclick=function(){e.dblclick.apply(e,arguments)},i.vertex_click=function(){e.vertex_click.apply(e,arguments)},i.vertex_dblclick=function(){e.vertex_dblclick.apply(e,arguments)},i.edge_click=function(){e.edge_click.apply(e,arguments)},i.edge_dblclick=function(){e.edge_dblclick.apply(e,arguments)},this};const me=(m(p=class extends x{constructor(){super()}enter(t,e){super.enter(t,e),C(t.parentNode).style("height","100%").style("width","100%")}update(t,e){super.update(t,e);const i=this,o=[];this.updateFlexParent(e);const s=e.selectAll(".FlexGrid-list-item").data(this.widgets(),t=>t.id());s.enter().append("div").classed("FlexGrid-list-item",!0).each(function(t){t.target(this)}).merge(s).style("min-height",this.itemMinHeight()+"px").style("min-width",this.itemMinWidth()+"px").style("flex-basis",(t,e)=>{const i=this.widgetsFlexBasis()[e];return void 0!==i?i:this.flexBasis()}).style("flex-grow",(t,e)=>{const i=this.widgetsFlexGrow()[e];return void 0!==i?i:this.flexGrow()}).style("border-width",this.borderWidth()+"px").style("border-color",this.itemBorderColor()).each(function(){this.firstChild.style.display="none"}).each(function(){const t=this.getBoundingClientRect();o.push([t.width,t.height])}).each(function(t,e){this.firstChild.style.display="block",t.resize({width:o[e][0]-2*i.borderWidth(),height:o[e][1]-2*i.borderWidth()})}),s.exit().remove()}exit(t,e){super.exit(t,e)}updateFlexParent(t){t.style("height","100%").style("flex-direction","horizontal"===this.orientation()?"row":"column").style("flex-wrap",this.flexWrap()).style("align-items",this.alignItems()).style("align-content",this.alignContent()).style("overflow-x",()=>this.forceXScroll()||"horizontal"===this.orientation()&&"nowrap"===this.flexWrap()&&!this.disableScroll()?"scroll":"hidden").style("overflow-y",()=>this.forceYScroll()||"vertical"===this.orientation()&&"nowrap"===this.flexWrap()&&!this.disableScroll()?"scroll":"hidden")}},"_FlexGrid"),p);dt(me,"FlexGrid");let xe=me;function ve(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}m(ve,"Vt"),xe.prototype._class+=" layout_FlexGrid",xe.prototype.publish("itemBorderColor","transparent","html-color","Color of list item borders"),xe.prototype.publish("borderWidth",0,"number","Width of list item borders (pixels)"),xe.prototype.publish("orientation","horizontal","set","Controls the flex-direction of the list items",["horizontal","vertical"]),xe.prototype.publish("flexWrap","wrap","set","Controls the line wrap when overflow occurs",["nowrap","wrap","wrap-reverse"]),xe.prototype.publish("disableScroll",!1,"boolean","If false, scrollbar will show (when flexWrap is set to 'nowrap')",null,{disable:/* @__PURE__ */dt(t=>"nowrap"!==t.flexWrap(),"disable")}),xe.prototype.publish("forceXScroll",!1,"boolean","If true, horzontal scrollbar will show"),xe.prototype.publish("forceYScroll",!1,"boolean","If true, vertical scrollbar will show"),xe.prototype.publish("itemMinHeight",64,"number","Minimum height of a list item (pixels)"),xe.prototype.publish("itemMinWidth",64,"number","Minimum width of a list item (pixels)"),xe.prototype.publish("alignItems","stretch","set","Controls normal alignment of items",["flex-start","center","flex-end","stretch"]),xe.prototype.publish("alignContent","stretch","set","Controls normal alignment of item rows",["flex-start","center","flex-end","stretch","space-between","space-around"]),xe.prototype.publish("flexGrow",1,"number","Default flex-grow style for all list items"),xe.prototype.publish("flexBasis","10%","string","Default flex-basis style for all list items"),xe.prototype.publish("widgetsFlexGrow",[],"array","Array of flex-grow values keyed on the widgets array"),xe.prototype.publish("widgetsFlexBasis",[],"array","Array of flex-basis values keyed on the widgets array"),xe.prototype.publish("widgets",[],"widgetArray","Array of widgets to be rendered as list items"),dt(ve,"getDefaultExportFromCjs");var Ce,Te={exports:{}};function Se(){return Ce?Te.exports:(Ce=1,Te.exports=function(){var t=/* @__PURE__ */dt(function(t,e){for(var i in this._options=e,this.defaults)this._options.hasOwnProperty(i)||(this._options[i]=this.defaults[i]);this.items=t,this._adjustSizeOfItems(),this.generateGrid()},"GridList");t.cloneItems=function(t,e){var i,o;for(void 0===e&&(e=[]),i=0;i<t.length;i++)for(o in e[i]||(e[i]={}),t[i])e[i][o]=t[i][o];return e},t.prototype={defaults:{lanes:5,direction:"horizontal"},toString:/* @__PURE__ */dt(function(){var t,e,i,o=this.grid.length,s="\n #|",l="\n --";for(e=0;e<o;e++)s+=" "+this._padNumber(e," "),l+="---";for(s+=l,e=0;e<this._options.lanes;e++)for(s+="\n"+this._padNumber(e," ")+"|",i=0;i<o;i++)s+=" ",s+=(t=this.grid[i][e])?this._padNumber(this.items.indexOf(t),"0"):"--";return s+"\n"},"toString"),generateGrid:/* @__PURE__ */dt(function(){var t;for(this._resetGrid(),t=0;t<this.items.length;t++)this._markItemPositionToGrid(this.items[t])},"generateGrid"),resizeGrid:/* @__PURE__ */dt(function(t){var e=0;this._options.lanes=t,this._adjustSizeOfItems(),this._sortItemsByPosition(),this._resetGrid();for(var i=0;i<this.items.length;i++){var o=this.items[i],s=this._getItemPosition(o);this._updateItemPosition(o,this.findPositionForItem(o,{x:e,y:0})),e=Math.max(e,s.x)}this._pullItemsToLeft()},"resizeGrid"),findPositionForItem:/* @__PURE__ */dt(function(t,e,i){var o,s,l;for(o=e.x;o<this.grid.length;o++)if(void 0!==i){if(l=[o,i],this._itemFitsAtPosition(t,l))return l}else for(s=e.y;s<this._options.lanes;s++)if(l=[o,s],this._itemFitsAtPosition(t,l))return l;var r=this.grid.length,n=0;return void 0!==i&&this._itemFitsAtPosition(t,[r,i])&&(n=i),[r,n]},"findPositionForItem"),moveItemToPosition:/* @__PURE__ */dt(function(t,e){var i=this._getItemPosition({x:e[0],y:e[1],w:t.w,h:t.h});this._updateItemPosition(t,[i.x,i.y]),this._resolveCollisions(t)},"moveItemToPosition"),resizeItem:/* @__PURE__ */dt(function(t,e){var i=e.w||t.w,o=e.h||t.h;this._updateItemSize(t,i,o),this._resolveCollisions(t),this._pullItemsToLeft()},"resizeItem"),getChangedItems:/* @__PURE__ */dt(function(t,e){for(var i=[],o=0;o<t.length;o++){var s=this._getItemByAttribute(e,t[o][e]);s.x===t[o].x&&s.y===t[o].y&&s.w===t[o].w&&s.h===t[o].h||i.push(s)}return i},"getChangedItems"),_sortItemsByPosition:/* @__PURE__ */dt(function(){this.items.sort(function(t,e){var i=this._getItemPosition(t),o=this._getItemPosition(e);return i.x!=o.x?i.x-o.x:i.y!=o.y?i.y-o.y:0}.bind(this))},"_sortItemsByPosition"),_adjustSizeOfItems:/* @__PURE__ */dt(function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];void 0===e.autoSize&&(e.autoSize=0===e.w||0===e.h),e.autoSize&&("horizontal"===this._options.direction?e.h=this._options.lanes:e.w=this._options.lanes)}},"_adjustSizeOfItems"),_resetGrid:/* @__PURE__ */dt(function(){this.grid=[]},"_resetGrid"),_itemFitsAtPosition:/* @__PURE__ */dt(function(t,e){var i,o,s=this._getItemPosition(t);if(e[0]<0||e[1]<0)return!1;if(e[1]+s.h>this._options.lanes)return!1;for(i=e[0];i<e[0]+s.w;i++){var l=this.grid[i];if(l)for(o=e[1];o<e[1]+s.h;o++)if(l[o]&&l[o]!==t)return!1}return!0},"_itemFitsAtPosition"),_updateItemPosition:/* @__PURE__ */dt(function(t,e){null!==t.x&&null!==t.y&&this._deleteItemPositionFromGrid(t),this._setItemPosition(t,e),this._markItemPositionToGrid(t)},"_updateItemPosition"),_updateItemSize:/* @__PURE__ */dt(function(t,e,i){null!==t.x&&null!==t.y&&this._deleteItemPositionFromGrid(t),t.w=e,t.h=i,this._markItemPositionToGrid(t)},"_updateItemSize"),_markItemPositionToGrid:/* @__PURE__ */dt(function(t){var e,i,o=this._getItemPosition(t);for(this._ensureColumns(o.x+o.w),e=o.x;e<o.x+o.w;e++)for(i=o.y;i<o.y+o.h;i++)this.grid[e][i]=t},"_markItemPositionToGrid"),_deleteItemPositionFromGrid:/* @__PURE__ */dt(function(t){var e,i,o=this._getItemPosition(t);for(e=o.x;e<o.x+o.w;e++)if(this.grid[e])for(i=o.y;i<o.y+o.h;i++)this.grid[e][i]==t&&(this.grid[e][i]=null)},"_deleteItemPositionFromGrid"),_ensureColumns:/* @__PURE__ */dt(function(t){var i;for(i=0;i<t;i++)this.grid[i]||this.grid.push(new e(this._options.lanes))},"_ensureColumns"),_getItemsCollidingWithItem:/* @__PURE__ */dt(function(t){for(var e=[],i=0;i<this.items.length;i++)t!=this.items[i]&&this._itemsAreColliding(t,this.items[i])&&e.push(i);return e},"_getItemsCollidingWithItem"),_itemsAreColliding:/* @__PURE__ */dt(function(t,e){var i=this._getItemPosition(t),o=this._getItemPosition(e);return!(o.x>=i.x+i.w||o.x+o.w<=i.x||o.y>=i.y+i.h||o.y+o.h<=i.y)},"_itemsAreColliding"),_resolveCollisions:/* @__PURE__ */dt(function(t){this._tryToResolveCollisionsLocally(t)||this._pullItemsToLeft(t),this._pullItemsToLeft()},"_resolveCollisions"),_tryToResolveCollisionsLocally:/* @__PURE__ */dt(function(e){var i=this._getItemsCollidingWithItem(e);if(!i.length)return!0;var o,s,l,r,n=new t([],this._options);t.cloneItems(this.items,n.items),n.generateGrid();for(var a=0;a<i.length;a++){var h=n.items[i[a]],d=this._getItemPosition(h),p=this._getItemPosition(e);if(o=[p.x-d.w,d.y],s=[p.x+p.w,d.y],l=[d.x,p.y-d.h],r=[d.x,p.y+p.h],n._itemFitsAtPosition(h,o))n._updateItemPosition(h,o);else if(n._itemFitsAtPosition(h,l))n._updateItemPosition(h,l);else if(n._itemFitsAtPosition(h,r))n._updateItemPosition(h,r);else{if(!n._itemFitsAtPosition(h,s))return!1;n._updateItemPosition(h,s)}}return t.cloneItems(n.items,this.items),this.generateGrid(),!0},"_tryToResolveCollisionsLocally"),_pullItemsToLeft:/* @__PURE__ */dt(function(t){if(this._sortItemsByPosition(),this._resetGrid(),t){var e=this._getItemPosition(t);this._updateItemPosition(t,[e.x,e.y])}for(var i=0;i<this.items.length;i++){var o=this.items[i],s=this._getItemPosition(o);if(!t||o!=t){var l=this._findLeftMostPositionForItem(o),r=this.findPositionForItem(o,{x:l,y:0},s.y);this._updateItemPosition(o,r)}}},"_pullItemsToLeft"),_findLeftMostPositionForItem:/* @__PURE__ */dt(function(t){for(var e=0,i=this._getItemPosition(t),o=0;o<this.grid.length;o++)for(var s=i.y;s<i.y+i.h;s++){var l=this.grid[o][s];if(l){var r=this._getItemPosition(l);this.items.indexOf(l)<this.items.indexOf(t)&&(e=r.x+r.w)}}return e},"_findLeftMostPositionForItem"),_getItemByAttribute:/* @__PURE__ */dt(function(t,e){for(var i=0;i<this.items.length;i++)if(this.items[i][t]===e)return this.items[i];return null},"_getItemByAttribute"),_padNumber:/* @__PURE__ */dt(function(t,e){return t>=10?t:e+t},"_padNumber"),_getItemPosition:/* @__PURE__ */dt(function(t){return"horizontal"===this._options.direction?t:{x:t.y,y:t.x,w:t.h,h:t.w}},"_getItemPosition"),_setItemPosition:/* @__PURE__ */dt(function(t,e){"horizontal"===this._options.direction?(t.x=e[0],t.y=e[1]):(t.x=e[1],t.y=e[0])},"_setItemPosition")};var e=/* @__PURE__ */dt(function(t){for(var e=0;e<t;e++)this.push(null)},"GridCol");return e.prototype=[],t}())}m(Se,"Ut"),dt(Se,"requireGridList");var Pe=Se();const Be=/* @__PURE__ */ve(Pe),ze=/* @__PURE__ */pt({__proto__:null,default:Be},[Pe]),Ae=ze&&Be||ze,We=(m(c=class extends x{divItems;gridList;items;itemsMap;origItems;cellWidth;cellHeight;dragItem;dragItemPos;_d3Drag;_d3DragResize;_selectionBag;_scrollBarWidth;constructor(){super(),this._tag="div",this._selectionBag=new S.Selection(this),this.content([])}getDimensions(){const t={width:0,height:0};return this.content().forEach(function(e){t.width<e.gridCol()+e.gridColSpan()&&(t.width=e.gridCol()+e.gridColSpan()),t.height<e.gridRow()+e.gridRowSpan()&&(t.height=e.gridRow()+e.gridRowSpan())},this),t}clearContent(t){this.content(this.content().filter(function(e){if(!t)return e.target(null),!1;let i=e;for(;i;){if(t===i)return e.target(null),!1;i=i.widget?i.widget():null}return!0}))}setContent(t,e,i,o,s,l){if(s=s||1,l=l||1,o=o||"",this.content(this.content().filter(function(i){return i.gridRow()!==t||i.gridCol()!==e||(i.target(null),!1)})),i){const r=(new wt).gridRow(t).gridCol(e).widget(i).title(o).gridRowSpan(s).gridColSpan(l);this.content().push(r)}return this}sortedContent(){return this.content().sort(function(t,e){return t.gridRow()===e.gridRow()?t.gridCol()-e.gridCol():t.gridRow()-e.gridRow()})}getCell(t,e){let i=null;return this.content().some(function(o){return t>=o.gridRow()&&t<o.gridRow()+o.gridRowSpan()&&e>=o.gridCol()&&e<o.gridCol()+o.gridColSpan()&&(i=o,!0)}),i}getWidgetCell(t){let e=null;return this.content().some(function(i){return i.widget().id()===t&&(e=i,!0)}),e}getContent(t){let e=null;return this.content().some(function(i){return i.widget().id()===t&&(e=i.widget(),!0)}),e}cellToGridItem(t){return{x:t.gridCol(),y:t.gridRow(),w:t.gridColSpan(),h:t.gridRowSpan(),id:t.id(),cell:t}}gridItemToCell(t){t.cell.gridCol(t.x).gridRow(t.y).gridColSpan(t.w).gridRowSpan(t.h)}resetItemsPos(){this.origItems.forEach(function(t){const e=this.itemsMap[t.id];e.x=t.x,e.y=t.y},this)}initGridList(){this.itemsMap={},this.items=this.content().map(function(t){const e=this.cellToGridItem(t);return this.itemsMap[e.id]=e,e},this),this.origItems=this.content().map(this.cellToGridItem),this.gridList=new Ae(this.items,{direction:this.snapping(),lanes:"horizontal"===this.snapping()?this.snappingRows():this.snappingColumns()})}killGridList(){this.gridList=null,delete this.items,delete this.itemsMap}enter(t,e){super.enter(t,e),this._scrollBarWidth=B.getScrollbarWidth();const i=this;this._d3Drag=z().subject(function(t){const e=i.cellToGridItem(t);return{x:e.x*i.cellWidth,y:e.y*i.cellHeight}}).on("start",function(t){if(!i.designMode())return;P().sourceEvent.stopPropagation(),i.initGridList();const o=i.itemsMap[t.id()];i.dragItem=e.append("div").attr("class","dragging").style("transform",function(){return"translate("+o.x*i.cellWidth+"px, "+o.y*i.cellHeight+"px)"}).style("width",function(){return o.w*i.cellWidth-i.gutter()+"px"}).style("height",function(){return o.h*i.cellHeight-i.gutter()+"px"}),i.selectionBagClick(t)}).on("drag",function(t){if(!i.designMode())return;const e=P();e.sourceEvent.stopPropagation();const o=i.itemsMap[t.id()];e.x<0&&(e.x=0),e.x+o.w*i.cellWidth>i.snappingColumns()*i.cellWidth&&(e.x=i.snappingColumns()*i.cellWidth-o.w*i.cellWidth),e.y<0&&(e.y=0),e.y+o.h*i.cellWidth>i.snappingRows()*i.cellWidth&&(e.y=i.snappingRows()*i.cellWidth-o.h*i.cellWidth);const s=[Math.max(0,Math.floor((e.x+i.cellWidth/2)/i.cellWidth)),Math.max(0,Math.floor((e.y+i.cellHeight/2)/i.cellHeight))];o.x===s[0]&&o.y===s[1]||("none"!==i.snapping()?(i.resetItemsPos(),i.gridList.moveItemToPosition(o,s)):(o.x=s[0],o.y=s[1]),t.gridCol()===o.x&&t.gridRow()===o.y||(i.items.forEach(i.gridItemToCell),i.updateGrid(!1,100))),i.dragItem.style("transform",function(){return"translate("+e.x+"px, "+e.y+"px)"}).style("width",function(){return o.w*i.cellWidth+"px"}).style("height",function(){return o.h*i.cellHeight+"px"})}).on("end",function(){i.designMode()&&(P().sourceEvent.stopPropagation(),i.dragItem.remove(),i.dragItem=null,i.killGridList())}),this._d3DragResize=z().subject(function(t){const e=i.cellToGridItem(t);return{x:(e.x+e.w-1)*i.cellWidth,y:(e.y+e.h-1)*i.cellHeight}}).on("start",function(t){if(!i.designMode())return;P().sourceEvent.stopPropagation(),i.initGridList();const o=i.itemsMap[t.id()];i.dragItem=e.append("div").attr("class","resizing").style("transform",function(){return"translate("+o.x*i.cellWidth+"px, "+o.y*i.cellHeight+"px)"}).style("width",function(){return o.w*i.cellWidth-i.gutter()+"px"}).style("height",function(){return o.h*i.cellHeight-i.gutter()+"px"}),i.dragItemPos={x:o.x,y:o.y}}).on("drag",function(t){if(!i.designMode())return;const e=P();e.sourceEvent.stopPropagation();const o=i.itemsMap[t.id()],s=[Math.max(0,Math.round(e.x/i.cellWidth)),Math.max(0,Math.round(e.y/i.cellHeight))],l={w:Math.max(1,s[0]-o.x+1),h:Math.max(1,s[1]-o.y+1)};o.w===l.w&&o.h===l.h||("none"!==i.snapping()?(i.resetItemsPos(),i.gridList.resizeItem(o,l)):(o.w=l.w,o.h=l.h),t.gridColSpan()===o.w&&t.gridRowSpan()===o.h||(i.items.forEach(i.gridItemToCell),i.updateGrid(o.id,100))),i.dragItem.style("width",function(){return(1-o.x)*i.cellWidth+e.x-i.gutter()+"px"}).style("height",function(){return(1-o.y)*i.cellHeight+e.y-i.gutter()+"px"})}).on("end",function(){i.designMode()&&(P().sourceEvent.stopPropagation(),i.dragItem.remove(),i.dragItem=null,i.killGridList())})}updateGrid(t,e=0,i=!1){e=e||0;const o=this;this.divItems.classed("draggable",this.designMode()).transition().duration(e).style("left",function(t){return t.gridCol()*o.cellWidth+o.gutter()/2+"px"}).style("top",function(t){return t.gridRow()*o.cellHeight+o.gutter()/2+"px"}).style("width",function(t){return t.gridColSpan()*o.cellWidth-o.gutter()+"px"}).style("height",function(t){return t.gridRowSpan()*o.cellHeight-o.gutter()+"px"}).on("end",function(e){e.surfaceShadow_default(o.surfaceShadow()).surfacePadding_default(o.surfacePadding()).surfaceBorderWidth_default(o.surfaceBorderWidth()).surfaceBackgroundColor_default(o.surfaceBackgroundColor()),!0!==t&&t!==e.id()||e.resize().lazyRender()})}update(t,e){super.update(t,e),this._placeholderElement.style("overflow-x","width"===this.fitTo()?"hidden":null),this._placeholderElement.style("overflow-y","width"===this.fitTo()?"scroll":null);const i=this.getDimensions(),o=this.width()-("width"===this.fitTo()?this._scrollBarWidth:0);if(this.cellWidth=o/i.width,this.cellHeight="all"===this.fitTo()?this.height()/i.height:this.cellWidth,this.designMode()){const t=Math.min(this.width()/this.snappingColumns(),this.height()/this.snappingRows()),e=Math.floor(t);this.cellWidth=e,this.cellHeight=this.cellWidth}const s=this,l=e.selectAll("#"+this.id()+" > .ddCell").data(this.content(),function(t){return t.id()});this.divItems=l.enter().append("div").attr("class","ddCell").each(function(t){t.target(this),t.__grid_watch=t.monitor(function(e,i,o){!s._renderCount||"snapping"!==e&&0!==e.indexOf("grid")||i===o||s.gridList||(s.initGridList(),"none"!==s.snapping()&&s.gridList.resizeGrid("horizontal"===s.snapping()?s.snappingRows():s.snappingColumns()),s.items.forEach(s.gridItemToCell),s.updateGrid(t.id(),100),s.killGridList())}),C(this).append("div").attr("class","resizeHandle").call(s._d3DragResize).append("div").attr("class","resizeHandleDisplay")}).merge(l),this.divItems.each(function(t){const e=C(this);s.designMode()?e.call(s._d3Drag):e.on("mousedown.drag",null).on("touchstart.drag",null)}),this.divItems.select(".resizeHandle").style("display",this.designMode()?null:"none"),this.updateGrid(!0),l.exit().each(function(t){t.target(null),t.__grid_watch&&t.__grid_watch.remove()}).remove();const r=e.selectAll("#"+this.id()+" > .laneBackground").data(this.designMode()?[""]:[]);r.enter().insert("div",":first-child").attr("class","laneBackground").style("left","1px").style("top","1px").on("click",function(){s.selectionBagClear()}).merge(r).style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px"),r.exit().each(function(){s.selectionBagClear()}).remove();const n=e.selectAll("#"+this.id()+" > .lane").data(this.designMode()?[""]:[]);n.enter().append("div").attr("class","lane").style("left","1px").style("top","1px"),n.style("display",this.showLanes()?null:"none").style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px").style("background-image","linear-gradient(to right, grey 1px, transparent 1px), linear-gradient(to bottom, grey 1px, transparent 1px)").style("background-size",this.cellWidth+"px "+this.cellHeight+"px"),n.exit().remove()}exit(t,e){this.content().forEach(t=>t.target(null)),super.exit(t,e)}_createSelectionObject(t){return{_id:t._id,element:/* @__PURE__ */dt(()=>t._element,"element"),widget:t}}selection(t){return arguments.length?(this._selectionBag.set(t.map(function(t){return this._createSelectionObject(t)},this)),this):this._selectionBag.get().map(function(t){return t._id})}selectionBagClear(){this._selectionBag.isEmpty()||(this._selectionBag.clear(),this.postSelectionChange())}selectionBagClick(t){if(null!==t){const e=this._createSelectionObject(t);if(P().sourceEvent.ctrlKey)this._selectionBag.isSelected(e)?(this._selectionBag.remove(e),this.postSelectionChange()):(this._selectionBag.append(e),this.postSelectionChange());else{const t=this._selectionBag.get();1===t.length&&t[0]._id===e._id?this.selectionBagClear():this._selectionBag.set([e]),this.postSelectionChange()}}}postSelectionChange(){}applyLayout(t){this.divItems.each((e,i)=>{if(t[i]){const[o,s,l,r]=t[i];e.gridCol(o).gridRow(s).gridColSpan(l).gridRowSpan(r)}}),this.updateGrid(!0)}vizActivation(t){}},"_Grid"),c);dt(We,"Grid");let ke=We;ke.prototype._class+=" layout_Grid",ke.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),ke.prototype.publish("showLanes",!0,"boolean","Show snapping lanes when in design mode",null,{tags:["Basic"],disable:/* @__PURE__ */dt(t=>!t.designMode(),"disable")}),ke.prototype.publish("fitTo","all","set","Sizing Strategy",["all","width"],{tags:["Basic"]}),ke.prototype.publish("snapping","vertical","set","Snapping Strategy",["vertical","horizontal","none"]),ke.prototype.publish("snappingColumns",12,"number","Snapping Columns"),ke.prototype.publish("snappingRows",16,"number","Snapping Rows"),ke.prototype.publish("gutter",6,"number","Gap Between Widgets",null,{tags:["Basic"]}),ke.prototype.publish("surfaceShadow",!0,"boolean","3D Shadow"),ke.prototype.publish("surfacePadding",null,"string","Cell Padding (px)",null,{tags:["Intermediate"]}),ke.prototype.publish("surfaceBorderWidth",1,"number","Width (px) of Cell Border",null,{tags:["Intermediate"]}),ke.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),ke.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Basic"],render:!1});const Ie=(m(u=class extends xe{constructor(){super(),this.orientation_default("horizontal"),this.flexWrap_default("nowrap")}},"_HorizontalList"),u);dt(Ie,"HorizontalList"),Ie.prototype._class+=" layout_HorizontalList";const Me=(m(g=class extends x{_contentContainer;_widgetPlacements;_widgetRatios;constructor(){super(),this._tag="div",this._widgetPlacements=[],this._widgetRatios=[]}addLayer(t,e="default",i=1,o=1){const s=this.widgets();return s.push(t||(new F).text("No widget defined for layer.")),this.widgets(s),this._widgetPlacements.push(e),this._widgetRatios.push([i,o]),this}enter(t,e){super.enter(t,e),this._contentContainer=e.append("div").attr("class","container")}update(t,e){super.update(t,e);const i=this;e.style("padding",this.surfacePadding()+"px");const o=this._contentContainer.selectAll(".content.id"+this.id()).data(this.widgets(),function(t){return t.id()});o.enter().append("div").attr("class","content id"+this.id()).each(function(t,e){t.target(this)}).merge(o).each(function(t,e){const o={width:i.clientWidth(),height:i.clientHeight()},s=i.widgetSize(e,o),l=i.widgetPosition(e,o,s);this.style.top=l.y+"px",this.style.left=l.x+"px",t.resize(s).render()}),o.exit().each(function(t,e){t.target(null)}).remove(),o.order()}widgetSize(t,e){return this._widgetPlacements[t],{width:e.width*this._widgetRatios[t][0],height:e.height*this._widgetRatios[t][1]}}widgetPosition(t,e,i){switch(this._widgetPlacements[t]){default:return{x:0,y:0};case"top":return{x:e.width/2-i.width/2,y:0};case"bottom":return{x:e.width/2-i.width/2,y:e.height-i.height};case"left":return{x:0,y:e.height/2-i.height/2};case"right":return{x:e.width-i.width,y:e.height/2-i.height/2};case"center":return{x:e.width/2-i.width/2,y:e.height/2-i.height/2}}}},"_Layered"),g);dt(Me,"Layered");let De=Me;De.prototype._class+=" layout_Layered",De.prototype.publish("surfacePadding",0,"number","Padding"),De.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});const He=(m(_=class extends x{_surfaceButtons;_originalPosition;constructor(){super(),this._tag="div",this._surfaceButtons=[]}updateState(t){t=t||!this.popupState(),this.popupState(t).render()}enter(t,e){super.enter(t,e),this.widget().target(t),this._originalPosition=this.position()}update(t,e){super.update(t,e),e.style("visibility",this.popupState()?null:"hidden").style("opacity",this.popupState()?null:0).style("width",this.shrinkWrap()?this.widget().width()+"px":this._size.width+"px").style("height",this.shrinkWrap()?this.widget().height()+"px":this._size.height+"px"),0===this.widget().size().height&&this.widget().resize(this.size())}postUpdate(t,e){let i,o;switch(this.centerPopup()){case"container":this._placeholderElement&&(i=parseInt(this._placeholderElement.style("width"))/2-this.widget().width()/2,o=parseInt(this._placeholderElement.style("height"))/2-this.widget().height()/2),this.position("absolute");break;case"window":i=window.innerWidth/2-this.widget().width()/2,o=window.innerHeight/2-this.widget().height()/2,this.position("fixed");break;default:i=0,o=0,this.position(this._originalPosition)}this.pos({x:i,y:o}),super.postUpdate(t,e),e.style("position",this.position()).style("left",this.left()+"px").style("right",this.right()+"px").style("top",this.top()+"px").style("bottom",this.bottom()+"px")}exit(t,e){this.widget()&&this.widget().target(null),super.exit(t,e)}click(t){}},"_Popup"),_);dt(He,"Popup");let Fe=He;Fe.prototype._class+=" layout_Popup",Fe.prototype.publish("popupState",!1,"boolean","State of the popup, visible (true) or hidden (false)",null,{}),Fe.prototype.publish("shrinkWrap",!1,"boolean","The popup parent container either shrinks to the size of its contents (true) or expands to fit thge popup's parentDiv (false)",null,{}),Fe.prototype.publish("centerPopup","none","set","Center the widget in its container element (target) or in the window",["none","container","window"],{}),Fe.prototype.publish("top",null,"number","Top position property of popup",null,{}),Fe.prototype.publish("bottom",null,"number","Bottom position property of popup",null,{}),Fe.prototype.publish("left",null,"number","Left position property of popup",null,{}),Fe.prototype.publish("right",null,"number","Right position property of popup",null,{}),Fe.prototype.publish("position","relative","set","Value of the 'position' property",["absolute","relative","fixed","static","initial","inherit"],{tags:["Private"]}),Fe.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]});const Oe=(m(y=class extends x{_tabContainer;_contentContainer;constructor(){super(),this._tag="div"}clearTabs(){return this.labels([]),this.widgets([]),this}addTab(t,e,i,o){const s=t.size();0===s.width&&0===s.height&&t.size({width:"100%",height:"100%"});const l=this.labels(),r=this.widgets();i&&this.activeTabIdx(this.widgets().length),l.push(e);const n=(new ft).widget(t||(new F).text("No widget defined for tab"));return r.push(n),this.labels(l),this.widgets(r),o&&o(n),this}widgetSize(t){const e=this.clientWidth();let i=this.clientHeight();const o=this._tabContainer.node().getBoundingClientRect();return void 0!==o.height&&(i-=o.height),{width:e,height:i}}enter(t,e){super.enter(t,e),this._tabContainer=e.append("div"),this._contentContainer=e.append("div")}update(t,e){super.update(t,e);const i=this;e.style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null);const o=this._tabContainer.selectAll(".tab-button.id"+this.id()).data(this.showTabs()?this.labels():[],function(t){return t});o.enter().append("span").attr("class","tab-button id"+this.id()).style("cursor","pointer").on("click",function(t,e){i.click(i.widgets()[e].widget(),t,e),i.activeTabIdx(e).render()}).merge(o).classed("active",function(t,e){return i.activeTabIdx()===e}).text(function(t){return t}),o.exit().remove();const s=this._contentContainer.selectAll(".tab-content.id"+this.id()).data(this.widgets(),function(t){return t.id()});s.enter().append("div").attr("class","tab-content id"+this.id()).each(function(t,e){t.target(this)}).merge(s).classed("active",function(t,e){return i.activeTabIdx()===e}).style("display",function(t,e){return i.activeTabIdx()===e?"block":"none"}).each(function(t,e){if(t.visible(i.activeTabIdx()===e),i.activeTabIdx()===e){const e=i.widgetSize(C(this));t.surfaceBorderWidth(i.showTabs()?null:0).surfacePadding(i.showTabs()?null:0).resize(e)}}),s.exit().each(function(t,e){t.target(null)}).remove(),"bottom"===this.tabLocation()?(this._tabContainer.attr("class","on_bottom").style("top",this._contentContainer.node().offsetHeight+this.surfacePadding()+"px").style("position","absolute"),this._contentContainer.style("top",this.surfacePadding_exists()?this.surfacePadding()+"px":null).style("position","absolute")):(this._tabContainer.attr("class","on_top").style("top",null).style("position","relative"),this._contentContainer.style("top",this._tabContainer.node().offsetHeight+this.surfacePadding()+"px").style("position","absolute"))}click(t,e,i){}},"_Tabbed"),y);dt(Oe,"Tabbed");let Le=Oe;Le.prototype._class+=" layout_Tabbed",Le.prototype.publish("showTabs",!0,"boolean","Show Tabs",null,{}),Le.prototype.publish("surfacePadding",4,"number","Padding"),Le.prototype.publish("activeTabIdx",0,"number","Index of active tab",null,{}),Le.prototype.publish("labels",[],"array","Array of tab labels sharing an index with ",null,{tags:["Private"]}),Le.prototype.publish("tabLocation","top","set","Position the tabs at the bottom of the widget",["top","bottom"],{tags:["Private"]}),Le.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});const Re=(m(f=class extends x{constructor(){super(),this._tag="div"}enter(t,e){super.enter(t,e)}update(t,e){super.update(t,e);const i=this;e.attr("title",i.title()).style("background-color",this.backgroundColor());const o=e.selectAll("div.toolbar-title").data(this.title()?[this.title()]:[]);o.enter().append("div").classed("toolbar-title",!0).append("span"),o.selectAll("div.toolbar-title > span").style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("color",this.fontColor_exists()?this.fontColor():null).style("font-family",this.fontFamily_exists()?this.fontFamily():null).style("font-weight",this.fontBold_exists()?this.fontBold()?"bold":"normal":null).style("background-color",this.backgroundColor_exists()?this.backgroundColor():null).text(i.title()),o.exit().remove();const s=e.selectAll("div.toolbar-child").data(null!==this.widgets()?this.widgets():[],function(t){return t.id()});s.enter().insert("div","div.toolbar-title").each(function(t,e){const o=i.widgetClasses()[e]?i.widgetClasses()[e]+" toolbar-child":"toolbar-child";C(this).classed(o,!0),t.target(this)}),s.exit().each(function(t){t.target(null)}).remove(),s.order()}render(t){const e=this;return super.render(function(i){const o=e.element().node().getBoundingClientRect();let s=o.left+o.width;e.element().selectAll("div.toolbar-child").each(function(t,e){const i=this.getBoundingClientRect();s>i.left&&(s=i.left)}),e.element().select(".toolbar-title").style("width",s-o.left-4+"px"),t&&t(i)})}exit(t,e){this.widgets().forEach(function(t){t.target(null)}),super.exit(t,e)}},"_Toolbar"),f);dt(Re,"Toolbar");let Ee=Re;Ee.prototype._class+=" layout_Toolbar",Ee.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),Ee.prototype.publish("fontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("fontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("fontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("fontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),Ee.prototype.publish("backgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),Ee.prototype.publish("responsive",!0,"boolean","Adapts to pixel width",null,{tags:["Basic"]}),Ee.prototype.publish("widgets",[],"widgetArray","Child widgets of the toolbar",null,{tags:["Basic"]}),Ee.prototype.publish("widgetClasses",[],"array","Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)",null,{tags:["Basic"]});const Ge=(m(b=class extends xe{constructor(){super(),this.orientation_default("vertical"),this.flexWrap_default("nowrap")}},"_VerticalList"),b);function Ye(t){return new Promise(function(e,i){const o=S.parseClassID(t);require&&require([o.package],function(t){let i=null;t&&t[o.widgetID]&&(i=t[o.widgetID]),e(o.memberWidgetID?i.prototype?i.prototype[o.memberWidgetID]:i[o.memberWidgetID]:i)})})}function Ne(t){return Promise.all(t.map(Ye))}dt(Ge,"VerticalList"),Ge.prototype._class+=" layout_VerticalList",function(){try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.layout_AbsoluteSurface{pointer-events:none!important}.layout_AbsoluteSurface>.placeholder{position:relative;overflow:hidden;pointer-events:all}.layout_Accordion>ul{position:relative}.layout_Accordion.open>span{font-style:italic}.layout_Accordion.closed>ul{height:0px;overflow:hidden}.layout_Accordion.open>ul{display:block}.layout_Accordion>.collapsible-icon,.layout_Accordion>.collapsible-title{cursor:pointer;box-sizing:border-box}.layout_Accordion>.collapsible-title{display:block;width:100%}.layout_Accordion>.collapsible-title{font-size:13px;color:#fff;padding:4px 8px;height:26px;-webkit-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);-moz-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);box-shadow:inset 0 -1px 1px #0003}.layout_Accordion li{background-color:#fff}.layout_Accordion>ul,.layout_Accordion>.collapsible-title{background-color:#333}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>.collapsible-title{background-color:#555}.layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#777}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#999}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#bbb}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ccc}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ddd}.layout_Accordion>ul,.layout_Accordion>span{padding-left:0}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>span{padding-left:12px}.layout_Accordion>.collapsible-title:before{padding:4px 8px;position:absolute;left:0;top:0}.layout_Accordion>.collapsible-icon{position:absolute;top:0;right:0;width:24px;height:24px;color:#fff}.layout_Surface{box-sizing:border-box;margin:0;border:1px solid #e5e5e5;overflow:hidden;height:100%;width:100%}.layout_Surface.shadow2{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0003,0 1px 5px #0000001f}.layout_Surface>h3{margin:0;padding:2px;background-color:#e5e5e5}.layout_Surface .html-button-container{position:absolute;right:0;top:3px}.layout_Surface>div{padding:8px}.layout_Surface .html-button-container .surface-button{margin-right:5px}.layout_Surface .html-button-container .surface-button i{opacity:.8}.layout_Surface .html-button-container .surface-button:hover{opacity:1}.layout_Surface .html-button-container .surface-button:active{opacity:.5}div[draggable=true].hideDragCellContent.content-icon:before{content:"";font-family:FontAwesome;position:absolute;top:calc(50% - 74px);left:calc(50% - 56px);font-size:100px}div[draggable=true].hideDragCellContent.content-icon-Line:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Pie:before{top:calc(50% - 72px);left:calc(50% - 45px);content:""}div[draggable=true].hideDragCellContent.content-icon-Area:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Gauge:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Table:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Form:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Grid:before,div[draggable=true].hideDragCellContent.content-icon-Graph:before,div[draggable=true].hideDragCellContent.content-icon-Border:before,div[draggable=true].hideDragCellContent.content-icon-Tabbed:before,div[draggable=true].hideDragCellContent.content-icon-Accordion:before,div[draggable=true].hideDragCellContent.content-icon-MultiChart:before,div[draggable=true].hideDragCellContent.content-icon-MultiChartSurface:before{content:""}div[draggable=true].hideDragCellContent.content-icon-ChoroplethStates:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethStatesHeat:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCounties:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCountries:before,div[draggable=true].hideDragCellContent.content-icon-GMap:before,div[draggable=true].hideDragCellContent.content-icon-GMapHeat:before,div[draggable=true].hideDragCellContent.content-icon-GMapGraph:before{content:""}div[draggable=true].hideDragCellContent.content-icon-Text:before,div[draggable=true].hideDragCellContent.content-icon-TextBox:before,div[draggable=true].hideDragCellContent.content-icon-FAChar:before{content:""}.layout_Cell .update-indicator{box-sizing:border-box;position:absolute;top:0;left:0;padding:0;z-index:1000;border-width:0px;border-style:solid;pointer-events:none}.layout_Border{width:100%;height:100%}.layout_Border>.border-content{width:100%;height:100%;position:relative}.layout_Border>.borderHandle{width:6px;height:6px;background-color:#444;opacity:.3;position:absolute;visibility:hidden}.layout_Border.design-mode>.borderHandle{visibility:visible}.layout_Border>.borderHandle:hover{background-color:#666}.layout_Border>.borderHandle.borderHandleDisabled{display:none}.layout_Border>.borderHandle_top,.layout_Border>.borderHandle_bottom{cursor:ns-resize}.layout_Border>.borderHandle_left,.layout_Border>.borderHandle_right{cursor:ew-resize}.layout_Border .cell{border-radius:5px;border:1px solid #e5e5e5;display:inline-block;overflow:hidden}.layout_Border .cell h2{margin:0;padding-top:4px;-webkit-margin:0px;text-align:center}.layout_Border .layout_BorderCell.over{border:2px dashed #000}.layout_Border .dragItem{z-index:-1;opacity:.33}.layout_Border .notDragItem{z-index:-1;opacity:1}.layout_Border div[draggable=true]{opacity:.75;cursor:default}.layout_Border div[draggable=true] .dragHandle{opacity:1}.layout_Border div[draggable=true] .dragHandle_n,.layout_Border div[draggable=true] .dragHandle_e,.layout_Border div[draggable=true] .dragHandle_s,.layout_Border div[draggable=true] .dragHandle_w{background-color:#aaa}.layout_Border div[draggable=true] .dragHandle_nw,.layout_Border div[draggable=true] .dragHandle_ne,.layout_Border div[draggable=true] .dragHandle_se,.layout_Border div[draggable=true] .dragHandle_sw{background-color:#333}.layout_Border div[draggable=true] .dragHandle_nw{cursor:nw-resize}.layout_Border div[draggable=true] .dragHandle_n{cursor:n-resize}.layout_Border div[draggable=true] .dragHandle_ne{cursor:ne-resize}.layout_Border div[draggable=true] .dragHandle_e{cursor:e-resize}.layout_Border div[draggable=true] .dragHandle_se{cursor:se-resize}.layout_Border div[draggable=true] .dragHandle_s{cursor:s-resize}.layout_Border div[draggable=true] .dragHandle_sw{cursor:sw-resize}.layout_Border div[draggable=true] .dragHandle_w{cursor:w-resize}.layout_Border div[draggable=false]>div>.dragHandle{display:none}.layout_Border .grid-drop-target{position:fixed;box-sizing:border-box;border:2px dashed #7f8c8d;border-radius:0;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Border .grid-drop-target.drop-target-over{border:2px dashed #179BD7;background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px 12px)}.layout_Border2{display:flex;flex-direction:column}.layout_Border2>.body{margin:0;padding:0;display:flex;flex-flow:row}.layout_Border2>.body>.center{flex:1}.layout_Border2>.header{display:block}.layout_Border2>.footer{display:block}.layout_Carousel>div{position:relative;overflow:hidden}.layout_Carousel>div>.carouselItem{position:absolute}.layout_Modal-header{background-color:#3f51b5;overflow:hidden}.layout_Modal-body{background-color:#fff;overflow-y:scroll;overflow-x:hidden}.layout_Modal-title,.layout_Modal-annotations{position:absolute}.layout_Modal-closeButton{cursor:pointer}.layout_Modal-closeButton:hover{opacity:.7}.layout_Modal-closeButton:active{opacity:.5}.layout_Modal-fade{position:fixed;background-color:#000;opacity:.5;z-index:10000}.layout_Modal-content{position:fixed;background-color:#fff;z-index:10100}.layout_Modal-fade-hidden{display:none}.layout_Modal-fadeClickable{cursor:pointer}.layout_ChartPanel .series.highlight{stroke-width:2px;opacity:1}.layout_ChartPanel .series.lowlight{opacity:.3!important}.layout_FlexGrid{display:flex}.FlexGrid-list-item{overflow:hidden;border-style:solid;flex-grow:1}.layout_Grid>.ddCell{position:absolute}.layout_Grid>.laneBackground{position:absolute;border-style:solid;border-width:1px;background:#f5f5f5}.layout_Grid>.lane{position:absolute;border-style:none;opacity:.25;border-radius:0;pointer-events:none}.layout_Grid>.ddCell.draggable{border-style:solid;border-width:1px;background-color:#f8f8ff;border-radius:0;cursor:move}.layout_Grid>.ddCell.draggable>.resizeHandle{bottom:0;right:0;width:8px;height:8px;border-style:none;position:absolute;cursor:nwse-resize}.layout_Grid>.ddCell.draggable .resizeHandleDisplay{bottom:2px;right:2px;width:4px;height:4px;border-style:solid;border-left-width:0px;border-top-width:0px;border-right-width:2px;border-bottom-width:2px;border-color:#a9a9a9;background-color:none;position:absolute}.layout_Grid>.ddCell.draggable .resizeHandleDisplay:hover{border-color:orange}.layout_Grid>.dragging{border-style:solid;border-width:1px;border-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Grid>.resizing{border-style:solid;border-width:1px;border-color:gray;background-color:orange;border-radius:0;position:absolute;opacity:.3;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,orange 4px 8px)}.layout_Grid>.ddCell.draggable .common_Widget.selected{border-style:solid;border-width:1px;border-color:red;background-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6400001a 4px 8px)}.layout_Grid #drag-me:before{content:"#" attr(id);font-weight:700}.layout_Layered{pointer-events:none}.layout_Layered>.container>.content{position:absolute}.layout_Layered>.container>.content>div>.common_Widget,.layout_Layered>.container>.content>div>svg>.common_Widget{pointer-events:all}.layout_Tabbed .tab-button{position:relative;top:1px;display:inline-block;border-left:1px solid #ddd;border-top:1px solid #ddd;border-right:1px solid #ddd;background-color:transparent;margin-right:4px;padding:2px 2px 4px;background-color:#ccc}.layout_Tabbed .tab-button.active{background-color:#fff;z-index:999}.layout_Tabbed .on_bottom .tab-button{border-bottom:1px solid #ddd;border-top:none;top:-1px}.layout_Toolbar{height:100%;background-color:#ddd;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-title{display:inline-block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);margin-left:4px;font-weight:700;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-child{position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);float:right;margin-left:4px;margin-right:4px;line-height:16px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}(),m(Ye,"requireWidget"),m(Ne,"requireWidgets");const Ve=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,requireWidget:Ye,requireWidgets:Ne},Symbol.toStringTag,{value:"Module"})),Xe=class _MultiChart extends x{_allCharts={};_chartTypeDefaults;_chartTypeProperties;_chartMonitor;_switchingTo;constructor(){super(),J.call(this),K.call(this),this._tag="div",this._allCharts={},this._allChartTypes.forEach(function(t){const e=JSON.parse(JSON.stringify(t));e.widget=null,this._allCharts[t.id]=e,this._allCharts[t.display]=e,this._allCharts[t.widgetClass]=e},this),this._chartTypeDefaults={},this._chartTypeProperties={}}fields(t){const e=super.fields.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().fields();this.chart().fields(t)}return e}columns(t,e){const i=x.prototype.columns.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().columns();this.chart().columns(t,e)}return i}data(t){const e=x.prototype.data.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().data();this.chart().data(t)}return e}hasOverlay(){return this.chart()&&this.chart().hasOverlay()}visible(t){return arguments.length?(this.chart()&&this.chart().visible(t),this):this.chart()&&this.chart().visible()}chartTypeDefaults(t){return arguments.length?(this._chartTypeDefaults=t,this):this._chartTypeDefaults}chartTypeProperties(t){return arguments.length?(this._chartTypeProperties=t,this):this._chartTypeProperties}getChartDataFamily(){return this._allCharts[this.chartType()].family}requireContent(t,e){const i=S.parseClassID(this._allCharts[t].widgetClass);switch(i.package){case"@hpcc-js/chart":import("@hpcc-js/chart").then(t=>{e(new t[i.widgetID])});break;case"@hpcc-js/dgrid":import("@hpcc-js/dgrid").then(t=>{e(new t[i.widgetID])});break;default:Ye(this._allCharts[t].widgetClass).then(function(t){e(new t)})}}switchChart(t){if(this._switchingTo===this.chartType())return void(t&&t(this));this._switchingTo&&console.warn("Attempting switch to: "+this.chartType()+", before previous switch is complete ("+this._switchingTo+")"),this._switchingTo=this.chartType();const e=this.chart(),i=this;this.requireContent(this.chartType(),function(o){if(o!==e){const t=i.size();o.fields(i.fields()).data(i.data()).size(t),i.chart(o),e&&e.size({width:1,height:1}).render()}delete i._switchingTo,t&&t(this)})}update(t,e){super.update(t,e);const i=e.selectAll(".multiChart").data(this.chart()?[this.chart()]:[],function(t){return t._id});i.enter().append("div").attr("class","multiChart").each(function(t){t.target(this)});const o=this.chart();if(o){for(const t in this._chartTypeDefaults)if(o[t+"_default"])try{o[t+"_default"](this._chartTypeDefaults[t])}catch(l){console.warn("Exception Setting Default: "+t)}else console.warn("Unknown Default: "+t);this._chartTypeDefaults={};for(const t in this._chartTypeProperties)if(o[t])try{o[t](this._chartTypeProperties[t])}catch(l){console.warn("Exception Setting Property: "+t)}else console.warn("Unknown Property: "+t);this._chartTypeProperties={}}const s=this;i.each(function(t){t.resize(s.size())}),i.exit().transition().each(function(t){t.target(null)}).remove()}exit(t,e){this._chartMonitor&&(this._chartMonitor.remove(),delete this._chartMonitor),this.chart()&&this.chart().target(null),super.exit(t,e)}render(t){if(this.chartType()&&(!this.chart()||this.chart().classID()!==this._allCharts[this.chartType()].widgetClass)){const t=this,e=arguments;return this.switchChart(function(){x.prototype.render.apply(t,e)}),this}return x.prototype.render.apply(this,arguments)}};m(Xe,"MultiChart");let Ue=Xe;Ue.prototype._class+=" composite_MultiChart",Ue.prototype.implements(J.prototype),Ue.prototype.implements(K.prototype),Ue.prototype._otherChartTypes=[{id:"FORM",display:"Form",widgetClass:"form_FieldForm"}].map(function(t){return t.family="other",t}),Ue.prototype._graphChartTypes=[{id:"GRAPH",display:"Graph",widgetClass:"graph_Graph"},{id:"ADJACENCY_GRAPH",display:"Graph",widgetClass:"graph_AdjacencyGraph"},{id:"GRAPHC",display:"GraphC",widgetClass:"graph_GraphC"}].map(function(t){return t.family="GRAPH",t}),Ue.prototype._1DChartTypes=[].map(function(t){return t.family="1D",t}),Ue.prototype._2DChartTypes=[{id:"SUMMARY",display:"Summary",widgetClass:"chart_Summary"},{id:"BUBBLE",display:"Bubble",widgetClass:"chart_Bubble"},{id:"PIE",display:"Pie",widgetClass:"chart_Pie"},{id:"WORD_CLOUD",display:"Word Cloud",widgetClass:"other_WordCloud"}].map(function(t){return t.family="2D",t}),Ue.prototype._NDChartTypes=[{id:"COLUMN",display:"Column",widgetClass:"chart_Column"},{id:"BAR",display:"Bar",widgetClass:"chart_Bar"},{id:"LINE",display:"Line",widgetClass:"chart_Line"},{id:"AREA",display:"Area",widgetClass:"chart_Area"},{id:"STEP",display:"Step",widgetClass:"chart_Step"},{id:"SCATTER",display:"Scatter",widgetClass:"chart_Scatter"},{id:"HEXBIN",display:"Hex Bin",widgetClass:"chart_HexBin"}].map(function(t){return t.family="ND",t}),Ue.prototype._mapChartTypes=[{id:"CHORO_USSTATES",display:"US State Choropleth",widgetClass:"map_ChoroplethStates"},{id:"CHORO_USCOUNTIES",display:"US County Choropleth",widgetClass:"map_ChoroplethCounties"},{id:"CHORO_COUNTRIES",display:"Country Choropleth",widgetClass:"map_ChoroplethCountries"},{id:"GMAP_CHORO_USCOUNTIES",display:"Google Map US County Choropleth",widgetClass:"map_GMapCounties"},{id:"GOOGLE_MAP",display:"Google Map",widgetClass:"map_GMapLayered"},{id:"OPENSTREET",display:"Open Street Map",widgetClass:"map_OpenStreet"}].map(function(t){return t.family="map",t}),Ue.prototype._anyChartTypes=[{id:"TABLE",display:"Table",widgetClass:"dgrid_Table"},{id:"TABLE_LEGACY",display:"Table (legacy)",widgetClass:"other_Table"},{id:"TABLE_NESTED",display:"Nested Table",widgetClass:"other_NestedTable"},{id:"TABLE_CALENDAR",display:"Table driven Calendar Heat Map",widgetClass:"other_CalendarHeatMap"},{id:"TABLE_BULLET",display:"Table driven bullet chart",widgetClass:"chart_Bullet"},{id:"TABLE_SELECT",display:"Table driven select",widgetClass:"other_Select"},{id:"TABLE_AUTOCOMPLETE",display:"Table driven auto complete",widgetClass:"other_AutoCompleteText"},{id:"TABLE_OPPORTUNITY",display:"Table driven opportunity widget",widgetClass:"graph_Opportunity"},{id:"TABLE_TREE",display:"Table driven tree",widgetClass:"tree_Dendrogram"},{id:"TABLE_TREEMAP",display:"Table driven Treemap",widgetClass:"tree_Treemap"},{id:"TABLE_SANKEY",display:"Table driven Sankey",widgetClass:"graph_Sankey"},{id:"TABLE_GMAP_PIN",display:"Table driven Google Map (pins)",widgetClass:"map_GMapPin"},{id:"TABLE_GMAP_PINLINE",display:"Table driven Google Map (pins/lines)",widgetClass:"map_GMapPinLine"},{id:"TABLE_XML_TREE",display:"Table driven XML Tree",widgetClass:"tree_Indented"}].map(function(t){return t.family="any",t}),Ue.prototype._allChartTypes=Ue.prototype._otherChartTypes.concat(Ue.prototype._graphChartTypes.concat(Ue.prototype._1DChartTypes.concat(Ue.prototype._2DChartTypes.concat(Ue.prototype._NDChartTypes.concat(Ue.prototype._mapChartTypes.concat(Ue.prototype._anyChartTypes)))))),Ue.prototype._allMap=j(Ue.prototype._allChartTypes,function(t){return t.family}),Ue.prototype._allFamilies=Ue.prototype._allMap.keys(),Ue.prototype._allChartTypesMap={},Ue.prototype._allChartTypesByClass={},Ue.prototype._allChartTypes.forEach(function(t){t.widgetPath=S.widgetPath(t.widgetClass),Ue.prototype._allChartTypesMap[t.id]=t,Ue.prototype._allChartTypesByClass[t.widgetClass]=t}),Ue.prototype.publishReset(),Ue.prototype.publish("hideRowOnLegendClick",!1,"boolean","Enable/Disable hiding row on legend clicks",null,{tags:["Basic"]}),Ue.prototype.publish("chartType","BUBBLE","set","Chart Type",Ue.prototype._allChartTypes.map(function(t){return t.id}),{tags:["Basic"]}),Ue.prototype.publish("chart",null,"widget","Chart",null,{tags:["Basic"]});const je=Ue.prototype.chart;Ue.prototype.chart=function(t){const e=je.apply(this,arguments);if(arguments.length){const e=this;this._allChartTypesByClass[t.classID()]?this.chartType(this._allChartTypesByClass[t.classID()].id):console.warn("Unknown Class ID: "+t.classID()),t.click=function(t,i,o){e.click.apply(e,arguments)},t.dblclick=function(t,i,o){e.dblclick.apply(e,arguments)},t.vertex_click=function(t,i,o,s){e.vertex_click.apply(e,arguments)},t.vertex_dblclick=function(t,i,o,s){e.vertex_dblclick.apply(e,arguments)},t.edge_click=function(t,i,o,s){e.edge_click.apply(e,arguments)},t.edge_dblclick=function(t,i,o,s){e.edge_dblclick.apply(e,arguments)},this._chartMonitor&&(this._chartMonitor.remove(),delete this._chartMonitor),this._chartMonitor=t.monitor(function(i,o,s){e.broadcast(i,o,s,t)})}return e};const $e=class _Summary extends x{constructor(){super()}enter(t,e){super.enter(t,e),e.append("p")}update(t,e){super.update(t,e),e.select("p").text(this.text())}};m($e,"Summary"),$e.prototype.publish("text","","string");const qe=class _MultiChartPanel extends we{constructor(){super(),this.widget((new Ue).chartType("COLUMN"))}multiChart(){return this._widget}chartType(t){return arguments.length?(this._widget.chartType(t),this):this._widget.chartType()}chart(t){return arguments.length?(this._widget.chart(t),this):this._widget.chart()}chartTypeDefaults(t){return arguments.length?(this._widget.chartTypeDefaults(t),this):this._widget.chartTypeDefaults()}chartTypeProperties(t){return arguments.length?(this._widget.chartTypeProperties(t),this):this._widget.chartTypeProperties()}update(t,e){super.update(t,e),this._widget instanceof Ue&&this._legend.dataFamily(this._widget.getChartDataFamily()),super.update(t,e)}};m(qe,"MultiChartPanel");let Je=qe;Je.prototype._class+=" composite_MultiChartPanel";const Ke=class _Dermatology extends xt{_toolbar;_propEditor;_showProperties;_propsButton;_prevWidget;constructor(){super(),this._toolbar=(new Ee).title("Dermatology"),this._propEditor=(new it).show_settings(!0)}showProperties(t){if(!arguments.length)return this._showProperties;this._showProperties=t,this.rightPercentage(0).rightSize(this._showProperties?360:0).setContent("right",this._showProperties?this._propEditor:null);const e=this.widget();return e&&e.designMode&&e.designMode(this._showProperties),this}toggleProperties(){return this.showProperties(!this.showProperties())}enter(t,e){super.enter(t,e),this.topPercentage(0).topSize(0).setContent("top",this._toolbar),this.getCell("top").surfaceShadow(!0);const i=this;this._propsButton=(new Z).id(this.id()+"_props").value("Properties").on("click",function(){i.toggleProperties().render()}),this._toolbar.widgets([this._propsButton])}update(t,e){this.topPercentage(0).topSize(this.showToolbar()?32:0),super.update(t,e);const i=this.widget();e.style("background-color",i&&i.surfaceShadow?null:"white")}render(t){const e=this.widget();return e!==this._prevWidget&&(e&&e.surfaceShadow&&e.surfaceBackgroundColor_default("white"),this.setContent("center",e),this._propEditor.widget(e),this._prevWidget=e),super.render(t)}showToolbar;showToolbar_exists;widget;widget_exists};m(Ke,"Dermatology");let Ze=Ke;Ze.prototype._class+=" composite_Dermatology",Ze.prototype.publish("showToolbar",!0,"boolean","Show Toolbar"),Ze.prototype.publish("widget",null,"widget","Widget");const Qe=class _MegaChart extends xt{_chart=new Ue;_toolbar=new Ee;_valueTitle=new F;_domainTitle=new F;_legend=new ot;_csvButton;_infoButton;_maximizeButton;_legendButton;_chartTypeSelect;_prevLegendPosition;_prevShowToolbar;_1DChartTypes;_2DChartTypes;_NDChartTypes;_anyChartTypes;_allChartTypes;_contentClasses;_dataCount;constructor(){super(),this._tag="div";const t=this;this._chart.click=function(){t.click.apply(t,arguments)},this._chart.dblclick=function(){t.dblclick.apply(t,arguments)},this._chart.vertex_click=function(){t.vertex_click.apply(t,arguments)},this._chart.vertex_dblclick=function(){t.vertex_dblclick.apply(t,arguments)},this._chart.edge_click=function(){t.edge_click.apply(t,arguments)},this._chart.edge_dblclick=function(){t.edge_dblclick.apply(t,arguments)}}toolbarWidgets(t){return arguments.length?(this._toolbar.widgets(t),this):this._toolbar.widgets()}chartTypeDefaults(t){return arguments.length?(this._chart.chartTypeDefaults(t),this):this._chart.chartTypeDefaults()}chartTypeProperties(t){return arguments.length?(this._chart.chartTypeProperties(t),this):this._chart.chartTypeProperties()}fields(t){return arguments.length?(this._chart.fields(t),this):this._chart.fields()}columns(t,e){return arguments.length?(this._chart.columns(t,e),this):this._chart.columns()}data(t){return arguments.length?(this._chart.data(t),this):this._chart.data()}downloadCSV(){return S.downloadString("CSV",this._chart.export("CSV")),this}enter(t,e){super.enter(t,e);const i=this;this.topShrinkWrap(!1).topPercentage(0).topSize(30),this._dataCount=(new st).classed({"composite_MegaChart-dataCount":!0}).id(this.id()+"_dataCount").html('<span class="MegaChart-dataCount-label">Count:</span> <span class="MegaChart-dataCount-value">'+(this.data()?this.data().length:"0")+"</span>").overflowX("visible").overflowY("visible"),this._csvButton=(new Q).classed({"composite_MegaChart-CSV":!0}).id(this.id()+"_csv").value("CSV"),this._csvButton.click=function(t){i.downloadCSV()},this._infoButton=(new Q).classed({"composite_MegaChart-Info":!0}).id(this.id()+"_info").value(this.infoIcon()),this._maximizeButton=(new Q).classed({"composite_MegaChart-Maximize":!0}).id(this.id()+"_maximize").value(""),this._maximizeButton.click=function(t){const e=i.target();let o=e;const s=C(e).classed("__hpccisMaximized"),l=i.locateAncestor("layout_Grid");o=l?l.element().node():document.body;const r=C(i.target());if(s){const o=e.parentElement.getBoundingClientRect(),s=parseInt(getComputedStyle(e,null).getPropertyValue("padding-top").replace("px","")),l=parseInt(getComputedStyle(e,null).getPropertyValue("padding-left").replace("px","")),n=parseInt(getComputedStyle(e,null).getPropertyValue("padding-right").replace("px","")),a=parseInt(getComputedStyle(e,null).getPropertyValue("padding-bottom").replace("px",""));i.contentDiv.style("opacity",0).transition(100),r.transition().style("top",o.top+"px").style("left",o.left+"px").style("width",o.width-l-n+"px").style("height",o.height-s-a+"px").each("end",function(){r.style("position",e.__old_position),r.style("z-index",e.__old_zindex),r.style("background-color",e.__old_backgroundColor),r.style("box-shadow",e.__old_boxshadow),i.resize({width:o.width-l-n,height:o.height-s-a}).render(function(){i.contentDiv.transition().style("opacity",1)}),t.value("").render()})}else{e.__old_position=e.style.position,e.__old_zindex=e.style.zIndex,e.__old_boxshadow=e.style.boxShadow,e.__old_backgroundColor=i.element().style("background-color");const s=C(o).datum(),l=s.target(),n=s?l.getBoundingClientRect():o.getBoundingClientRect(),a=parseInt(getComputedStyle(l,null).getPropertyValue("padding-top").replace("px","")),h=parseInt(getComputedStyle(l,null).getPropertyValue("padding-left").replace("px","")),d=parseInt(getComputedStyle(l,null).getPropertyValue("padding-right").replace("px","")),p=parseInt(getComputedStyle(l,null).getPropertyValue("padding-bottom").replace("px",""));i.contentDiv.style("opacity",0).transition(100),r.style("position","fixed").style("z-index",999999).style("box-shadow","0 8px 8px 0 rgba(0,0,0,.14),0 12px 4px -8px rgba(0,0,0,.2),0 4px 20px 0 rgba(0,0,0,.12)").style("background-color",e.__old_backgroundColor).transition().style("top",n.top+a+"px").style("left",n.left+h+"px").style("width",n.width-h-d+"px").style("height",n.height-a-p+"px").each("end",function(){r.style("background-color",i.maximizedBackgroundColor()),i.resize({width:n.width-h-d,height:n.height-a-p}).render(function(){i.contentDiv.transition().style("opacity",1)}),t.value("").render()})}C(e).classed("__hpccisMaximized",!s)},this._legendButton=(new tt).classed({"composite_MegaChart-legend":!0}).id(this.id()+"_legend").type("checkbox").inlineLabel("Legend: "),this._legendButton.click=function(t){i.render()},this._chartTypeSelect=(new et).classed({"composite_MegaChart-chartType":!0}).id(this.id()+"_chartType").selectOptions(this._allChartTypes.map(function(t){return[t.id,t.display]})).value(this.chartType()),this._chartTypeSelect.change=function(t){i.chartType(t.value()).render()},this.setContent("center",this._chart),this._legend.targetWidget(this._chart).orientation(-1!==["top","bottom"].indexOf(this.legendPosition())?"horizontal":"vertical").fixedSize(!0),this._prevLegendPosition=this.legendPosition(),this.valueAxisTitle()&&this.setContent("left",this._valueTitle.rotation(-90)).leftShrinkWrap(!0),this.domainAxisTitle()&&this.setContent("bottom",this._domainTitle).bottomShrinkWrap(!0),"none"!==this.legendPosition()&&this.setContent(this.legendPosition(),this._legend)[this.legendPosition()+"ShrinkWrap"](!0)}update(t,e){function i(t,e,i){if(i&&-1===t.indexOf(e))t.push(e);else if(!i){const i=t.indexOf(e);i>=0&&t.splice(i,1)}}m(i,"showHideButton"),this._chart&&"function"==typeof this._chart.hideRowOnLegendClick&&this._chart.hideRowOnLegendClick(this.hideRowOnLegendClick()),this._dataCount.html('<span class="MegaChart-dataCount-label">Count:</span> <span class="MegaChart-dataCount-value">'+(this.data()?this.data().length:"0")+"</span>"),this._chartTypeSelect.value(this.chartType());const o=this.toolbarWidgets();i(o,this._csvButton,this.showCSV()),i(o,this._maximizeButton,this.showMaximize()),i(o,this._legendButton,this.toolbarShowLegend()),i(o,this._chartTypeSelect,this.showChartSelect()),i(o,this._infoButton,this.showInfoButton()),i(o,this._dataCount,this.showCount()),this.toolbarWidgets(o),this._prevShowToolbar!==this.showToolbar()&&(this.setContent("top",this.showToolbar()?this._toolbar:null),this._prevShowToolbar=this.showToolbar()),this._toolbar.fontSize(this.titleFontSize()).fontColor(this.titleFontColor()).fontFamily(this.titleFontFamily()).fontBold(this.titleFontBold()).backgroundColor(this.titleBackgroundColor()),this._chart.data(this.data()),this._chart.chartType()!==this.chartType()&&this._chart.chartType(this.chartType());let s=this.legendPosition();this.toolbarShowLegend()&&!this._legendButton.checked()&&(s="none"),this._prevLegendPosition!==s&&("none"!==this._prevLegendPosition&&this.clearContent(this._prevLegendPosition),this._prevLegendPosition=s,"none"!==s&&(this._legend=(new ot).targetWidget(this.getContent("center").fixedSize(!0)),this.setContent(s,this._legend),this._legend.orientation(-1!==["top","bottom"].indexOf(s)?"horizontal":"vertical"))),this._contentClasses=this.getContentClasses(),this.valueAxisTitle()&&"common_Text"!==this._contentClasses.left&&"left"!==s&&this.setContent("left",this._valueTitle.rotation(-90)),this.domainAxisTitle()&&"common_Text"!==this._contentClasses.bottom&&"bottom"!==s&&this.setContent("bottom",this._domainTitle).bottomShrinkWrap(!0),this._legend.dataFamily(this._chart.getChartDataFamily()),super.update(t,e)}exit(t,e){super.exit(t,e)}getContentClasses(){const t={},e=this.getContent("top"),i=this.getContent("right"),o=this.getContent("bottom"),s=this.getContent("left");return t.top=null!==e?e.classID():void 0,t.right=null!==i?i.classID():void 0,t.bottom=null!==o?o.classID():void 0,t.left=null!==s?s.classID():void 0,t}serializeState(){const t={title:this.title(),data:this.data()},e=this.chart();return e&&e.serializeState&&(t.chart=e.serializeState(),delete t.chart.data),t}deserializeState(t){if(t){this.title(t.title).data(t.data);const e=this.chart();e&&t.chart&&e.serializeState&&e.deserializeState(t.chart)}return this}click(t,e,i){}dblclick(t,e,i){}vertex_click(t,e,i,o){o&&o.vertex}vertex_dblclick(t,e,i,o){o&&o.vertex}edge_click(t,e,i,o){o&&o.edge}edge_dblclick(t,e,i,o){o&&o.edge}hideRowOnLegendClick;hideRowOnLegendClick_exists;showToolbar;showToolbar_exists;titleFontSize;titleFontSize_exists;titleFontColor;titleFontColor_exists;titleFontFamily;titleFontFamily_exists;titleFontBold;titleFontBold_exists;titleBackgroundColor;titleBackgroundColor_exists;maximizedBackgroundColor;maximizedBackgroundColor_exists;showChartSelect;showChartSelect_exists;showCSV;showCSV_exists;showCount;showCount_exists;showMaximize;showMaximize_exists;toolbarShowLegend;toolbarShowLegend_exists;showInfoButton;showInfoButton_exists;infoIcon;infoIcon_exists;legendPosition;legendPosition_exists;title;title_exists;domainAxisTitle;domainAxisTitle_exists;valueAxisTitle;valueAxisTitle_exists;chartType;chartType_exists;chart;chart_exists};m(Qe,"MegaChart");let ti=Qe;function ei(t,e){if(e=e&&"1.14.2-dev"!==e?e:"1.18.0",!t.__version)return t;const i=S.parseVersionString(t.__version),o=S.parseVersionString(e);if(1===i.major&&14===i.minor){console.info("Upgrading old persist from "+t.__version+" to "+e);let i=JSON.stringify(t);i=i.split('"'+t.__version).join('"'+e);const s=JSON.parse(i);return s.__properties&&s.__properties.content&&s.__properties.content.forEach(function(t){JSON.stringify(t).split("graph_Graph").length>1&&o.minor>=16&&(t.__properties.widget.__id=t.__properties.widget.__properties.widget.__id,t.__properties.widget.__class="composite_MegaChart",t.__properties.widget.__properties.showCSV=!1,t.__properties.widget.__properties.chartType="GRAPH",t.__properties.widget.__properties.chart=t.__properties.widget.__properties.widget,delete t.__properties.widget.__properties.chart.__id,delete t.__properties.widget.__properties.widget),void 0===t.__properties.fields&&(t.__properties.fields=[])}),s}return t}function ii(t,e){const i=[];return lt.widgetPropertyWalker(t,null,(t,o)=>{if(t[o.id+"_reset"](),void 0!==e.__properties[o.id])switch(o.type){case"widget":const s=o.id;i.push(si(e.__properties[o.id]).then(e=>(e._owner=t,t[s](e),e)));break;case"widgetArray":case"propertyArray":const l=o.id,r=e.__properties[o.id];if(r.length){const e=[];for(const i of r)e.push(si(i).then(e=>(e._owner=t,e)));i.push(Promise.all(e).then(e=>{t[l](e)}))}break;default:t[o.id](e.__properties[o.id])}}),Promise.all(i).then(i=>{if(e.__data)for(const o in e.__data)if(e.__data.HasOwnProperty(o))if("data"===o)t.data(e.__data[o]);else console.warn("Unexpected __data item: "+o),t[o](e.__data[o]);return e.__state&&(t.deserializeState?t.deserializeState(e.__state):e.__state.data&&t.data&&t.data(e.__state.data)),t})}function oi(t,e){"string"==typeof e&&(e=JSON.parse(e)),e.__id&&0!==e.__id.indexOf(t._idSeed)&&t._id!==e.__id&&console.warn("Deserialize: IDs do not match - "+t._id),ii(t,e)}function si(t){return"string"==typeof t&&(t=JSON.parse(t)),Ye((t=ei(t,B.version())).__class).then(e=>{const i=new e;return t.__id&&0!==t.__id.indexOf(i._idSeed)&&0!==t.__id.indexOf("_pe")&&(i._id=t.__id),ii(i,t)}).catch(function(t){console.error("Persist.create: ***exception***"),console.error(t)})}function li(t){si(lt.serializeToObject(t,void 0,!0,!0))}ti.prototype._class+=" composite_MegaChart",ti.prototype._1DChartTypes=Ue.prototype._1DChartTypes,ti.prototype._2DChartTypes=Ue.prototype._2DChartTypes,ti.prototype._NDChartTypes=Ue.prototype._NDChartTypes,ti.prototype._anyChartTypes=Ue.prototype._anyChartTypes,ti.prototype._allChartTypes=Ue.prototype._allChartTypes,ti.prototype.publishReset(),ti.prototype.publish("hideRowOnLegendClick",!1,"boolean","Enable/Disable hiding row on legend clicks",null,{tags:["Basic"]}),ti.prototype.publish("showToolbar",!0,"boolean","Enable/Disable Toolbar widget",null,{tags:["Basic"]}),ti.prototype.publishProxy("title","_toolbar","title"),ti.prototype.publish("ddlParamsFormat","","string","DDL Param Format '{fname}, {lname}'",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),ti.prototype.publish("titleBackgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),ti.prototype.publish("maximizedBackgroundColor","#FFFFFF","html-color","Background Color while maximized",null,{tags:["Intermediate"],optional:!0}),ti.prototype.publish("showChartSelect",!0,"boolean","Show/Hide the chartType dropdown in the toolbar",null,{tags:["Basic"]}),ti.prototype.publish("showCSV",!0,"boolean","Show/Hide CSV button",null,{tags:["Basic"]}),ti.prototype.publish("showCount",!1,"boolean","Show/Hide Data Count",null,{tags:["Basic"]}),ti.prototype.publish("showMaximize",!1,"boolean","Show/Hide Maximize button",null,{tags:["Basic"]}),ti.prototype.publish("toolbarShowLegend",!1,"boolean","Show/Hide Legend button",null,{tags:["Basic"]}),ti.prototype.publish("showInfoButton",!1,"boolean","Show/Hide Info button in toolbar",null,{tags:["Basic"]}),ti.prototype.publish("infoIcon","","string","Help Icon",null,{tags:["Basic"]}),ti.prototype.publish("legendPosition","none","set","Position of the Legend widget",["none","top","right","bottom","left"],{tags:["Basic"]}),ti.prototype.publishProxy("legendFormat","_legend","rainbowFormat"),ti.prototype.publishProxy("legendBins","_legend","rainbowBins"),ti.prototype.publishProxy("domainAxisTitle","_domainTitle","text"),ti.prototype.publishProxy("valueAxisTitle","_valueTitle","text"),ti.prototype.publishProxy("chartType","_chart","chartType"),ti.prototype.publishProxy("chart","_chart","chart"),m(ei,"retrofit_114_serialization"),m(ii,"deserializeFromObject"),m(oi,"deserialize"),m(si,"create"),m(li,"clone");const ri=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,clone:li,create:si,deserialize:oi,deserializeFromObject:ii,retrofit_114_serialization:ei},Symbol.toStringTag,{value:"Module"}));export{at as BUILD_VERSION,Ze as Dermatology,ti as MegaChart,Ue as MultiChart,Je as MultiChartPanel,rt as PKG_NAME,nt as PKG_VERSION,ri as Persist,Ve as Utility};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode(".composite_ChartPanel>.body{margin:0;padding:0;display:flex;flex-flow:row}.composite_ChartPanel>.body>article{flex:3 1 60%;order:2}.composite_ChartPanel>.body>nav{flex:1 6 20%;order:1}.composite_ChartPanel>.body>aside{margin-left:4px;flex:1 6 20%;order:3}header,footer{display:block}.composite_Dermatology{background-color:#f8f8ff}.composite_Dermatology .common_Icon{background-color:red;opacity:.75}.composite_Dermatology .common_Icon .common_Shape{fill:#fff;stroke:#a9a9a9;cursor:pointer}.composite_Dermatology .common_Icon.show .common_Shape{fill:#d3d3d3}.composite_Dermatology .common_Icon .common_FAChar .common_Text{fill:#a9a9a9;cursor:pointer}.composite_Dermatology .other_PropertyEditor{font-family:sans-serif;font-size:11px}.composite_Dermatology .other_PropertyEditor input{font-family:sans-serif;font-size:11px;border:0px}.composite_Dermatology .other_PropertyEditor .property-label{height:unset}.composite_MegaChart-Info,.composite_MegaChart-Info *,.composite_MegaChart-Maximize,.composite_MegaChart-Maximize *{font-family:FontAwesome}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|