@hpcc-js/composite 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){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)}})();
2
+ (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/form"),require("@hpcc-js/other")):typeof define=="function"&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/form","@hpcc-js/other"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/composite"]={},global["@hpcc-js/common"],global["@hpcc-js/api"],global["@hpcc-js/form"],global["@hpcc-js/other"]))})(this,function(exports2,common,api,form,other){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);const PKG_NAME="@hpcc-js/composite",PKG_VERSION="3.1.1",BUILD_VERSION="3.2.1";(function(){try{if(typeof document<"u"){var r2=document.createElement("style");r2.appendChild(document.createTextNode('@layer rdg{@layer Defaults,FocusSink,CheckboxInput,CheckboxIcon,CheckboxLabel,Cell,HeaderCell,SummaryCell,EditCell,Row,HeaderRow,SummaryRow,GroupedRow,Root;}@layer rdg.MeasuringCell{.mlln6zg7-0-0-beta-47{contain:strict;grid-row:1;visibility:hidden}}@layer rdg.Cell{.cj343x07-0-0-beta-47{position:relative;padding-block:0;padding-inline:8px;border-inline-end:1px solid var(--rdg-border-color);border-block-end:1px solid var(--rdg-border-color);grid-row-start:var(--rdg-grid-row-start);align-content:center;background-color:inherit;white-space:nowrap;overflow:clip;text-overflow:ellipsis;outline:none}.cj343x07-0-0-beta-47[aria-selected=true]{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}}@layer rdg.Cell{.csofj7r7-0-0-beta-47{position:sticky;z-index:1}.csofj7r7-0-0-beta-47:nth-last-child(1 of.csofj7r7-0-0-beta-47){box-shadow:var(--rdg-cell-frozen-box-shadow)}}@layer rdg.CheckboxInput{.c1bn88vv7-0-0-beta-47{display:block;margin:auto;inline-size:20px;block-size:20px}.c1bn88vv7-0-0-beta-47:focus-visible{outline:2px solid var(--rdg-checkbox-focus-color);outline-offset:-3px}.c1bn88vv7-0-0-beta-47:enabled{cursor:pointer}}@layer rdg.GroupCellContent{.g1s9ylgp7-0-0-beta-47{outline:none}}@layer rdg.GroupCellCaret{.cz54e4y7-0-0-beta-47{margin-inline-start:4px;stroke:currentColor;stroke-width:1.5px;fill:transparent;vertical-align:middle}.cz54e4y7-0-0-beta-47>path{transition:d .1s}}@layer rdg.DragHandle{.c1w9bbhr7-0-0-beta-47{--rdg-drag-handle-size: 8px;z-index:0;cursor:move;inline-size:var(--rdg-drag-handle-size);block-size:var(--rdg-drag-handle-size);background-color:var(--rdg-selection-color);place-self:end}.c1w9bbhr7-0-0-beta-47:hover{--rdg-drag-handle-size: 16px;border:2px solid var(--rdg-selection-color);background-color:var(--rdg-background-color)}}@layer rdg.DragHandle{.c1creorc7-0-0-beta-47{z-index:1;position:sticky}}@layer rdg.EditCell{.cis5rrm7-0-0-beta-47{padding:0}}@layer rdg.SortableHeaderCell{.h44jtk67-0-0-beta-47{display:flex}}@layer rdg.SortableHeaderCellName{.hcgkhxz7-0-0-beta-47{flex-grow:1;overflow:clip;text-overflow:ellipsis}}@layer rdg.HeaderCell{.c6l2wv17-0-0-beta-47{cursor:pointer}}@layer rdg.HeaderCell{.c1kqdw7y7-0-0-beta-47{touch-action:none}}@layer rdg.HeaderCell{.r1y6ywlx7-0-0-beta-47{cursor:col-resize;position:absolute;inset-block-start:0;inset-inline-end:0;inset-block-end:0;inline-size:10px}}.c1bezg5o7-0-0-beta-47{opacity:.5}.c1vc96037-0-0-beta-47{background-color:var(--rdg-header-draggable-background-color)}@layer rdg.Row{.r1upfr807-0-0-beta-47{display:contents;background-color:var(--rdg-background-color)}.r1upfr807-0-0-beta-47:hover{background-color:var(--rdg-row-hover-background-color)}.r1upfr807-0-0-beta-47[aria-selected=true]{background-color:var(--rdg-row-selected-background-color)}.r1upfr807-0-0-beta-47[aria-selected=true]:hover{background-color:var(--rdg-row-selected-hover-background-color)}}@layer rdg.FocusSink{.r190mhd37-0-0-beta-47{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}}@layer rdg.FocusSink{.r139qu9m7-0-0-beta-47:before{content:"";display:inline-block;block-size:100%;position:sticky;inset-inline-start:0;border-inline-start:2px solid var(--rdg-selection-color)}}@layer rdg.HeaderRow{.h10tskcx7-0-0-beta-47{display:contents;background-color:var(--rdg-header-background-color);font-weight:700}.h10tskcx7-0-0-beta-47>.cj343x07-0-0-beta-47{z-index:2;position:sticky}.h10tskcx7-0-0-beta-47>.csofj7r7-0-0-beta-47{z-index:3}}@layer rdg.Cell{.c6ra8a37-0-0-beta-47{background-color:#ccf}}@layer rdg.Cell{.cq910m07-0-0-beta-47{background-color:#ccf}.cq910m07-0-0-beta-47.c6ra8a37-0-0-beta-47{background-color:#99f}}@layer rdg.SortIcon{.a3ejtar7-0-0-beta-47{fill:currentColor}.a3ejtar7-0-0-beta-47>path{transition:d .1s}}@layer rdg.Defaults{.rnvodz57-0-0-beta-47 *,.rnvodz57-0-0-beta-47 *:before,.rnvodz57-0-0-beta-47 *:after{box-sizing:inherit}}@layer rdg.Root{.rnvodz57-0-0-beta-47{--rdg-color: #000;--rdg-border-color: #ddd;--rdg-summary-border-color: #aaa;--rdg-background-color: hsl(0deg 0% 100%);--rdg-header-background-color: hsl(0deg 0% 97.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 90.5%);--rdg-row-hover-background-color: hsl(0deg 0% 96%);--rdg-row-selected-background-color: hsl(207deg 76% 92%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 88%);--rdg-checkbox-focus-color: hsl(207deg 100% 69%);--rdg-selection-color: #66afe9;--rdg-font-size: 14px;--rdg-cell-frozen-box-shadow: 2px 0 5px -2px rgba(136, 136, 136, .3);display:grid;color-scheme:var(--rdg-color-scheme, light dark);accent-color:light-dark(hsl(207deg 100% 29%),hsl(207deg 100% 79%));contain:content;content-visibility:auto;block-size:350px;border:1px solid var(--rdg-border-color);box-sizing:border-box;overflow:auto;background-color:var(--rdg-background-color);color:var(--rdg-color);font-size:var(--rdg-font-size)}.rnvodz57-0-0-beta-47:dir(rtl){--rdg-cell-frozen-box-shadow: -2px 0 5px -2px rgba(136, 136, 136, .3)}.rnvodz57-0-0-beta-47:before{content:"";grid-column:1/-1;grid-row:1/-1}.rnvodz57-0-0-beta-47.rdg-dark{--rdg-color-scheme: dark;--rdg-color: #ddd;--rdg-border-color: #444;--rdg-summary-border-color: #555;--rdg-background-color: hsl(0deg 0% 13%);--rdg-header-background-color: hsl(0deg 0% 10.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);--rdg-row-hover-background-color: hsl(0deg 0% 9%);--rdg-row-selected-background-color: hsl(207deg 76% 42%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);--rdg-checkbox-focus-color: hsl(207deg 100% 89%)}.rnvodz57-0-0-beta-47.rdg-light{--rdg-color-scheme: light}@media (prefers-color-scheme: dark){.rnvodz57-0-0-beta-47:not(.rdg-light){--rdg-color: #ddd;--rdg-border-color: #444;--rdg-summary-border-color: #555;--rdg-background-color: hsl(0deg 0% 13%);--rdg-header-background-color: hsl(0deg 0% 10.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);--rdg-row-hover-background-color: hsl(0deg 0% 9%);--rdg-row-selected-background-color: hsl(207deg 76% 42%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);--rdg-checkbox-focus-color: hsl(207deg 100% 89%)}}.rnvodz57-0-0-beta-47>:nth-last-child(1 of.rdg-top-summary-row)>.cj343x07-0-0-beta-47{border-block-end:2px solid var(--rdg-summary-border-color)}.rnvodz57-0-0-beta-47>:nth-child(1 of.rdg-bottom-summary-row)>.cj343x07-0-0-beta-47{border-block-start:2px solid var(--rdg-summary-border-color)}}@layer rdg.Root{.vlqv91k7-0-0-beta-47{-webkit-user-select:none;user-select:none}.vlqv91k7-0-0-beta-47 .r1upfr807-0-0-beta-47{cursor:move}}@layer rdg.FocusSink{.f1lsfrzw7-0-0-beta-47{grid-column:1/-1;pointer-events:none;z-index:1}}@layer rdg.FocusSink{.f1cte0lg7-0-0-beta-47{z-index:3}}@layer rdg.SummaryCell{.s8wc6fl7-0-0-beta-47{inset-block-start:var(--rdg-summary-row-top);inset-block-end:var(--rdg-summary-row-bottom)}}@layer rdg.SummaryRow{.skuhp557-0-0-beta-47>.cj343x07-0-0-beta-47{position:sticky}}@layer rdg.SummaryRow{.tf8l5ub7-0-0-beta-47>.cj343x07-0-0-beta-47{z-index:2}.tf8l5ub7-0-0-beta-47>.csofj7r7-0-0-beta-47{z-index:3}}@layer rdg.GroupedRow{.g1yxluv37-0-0-beta-47:not([aria-selected=true]){background-color:var(--rdg-header-background-color)}.g1yxluv37-0-0-beta-47>.cj343x07-0-0-beta-47:not(:last-child,.csofj7r7-0-0-beta-47),.g1yxluv37-0-0-beta-47>:nth-last-child(n+2 of.csofj7r7-0-0-beta-47){border-inline-end:none}}@layer rdg.TextEditor{.t7vyx3i7-0-0-beta-47{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;inline-size:100%;block-size:100%;padding-block:0;padding-inline:6px;border:2px solid #ccc;vertical-align:top;color:var(--rdg-color);background-color:var(--rdg-background-color);font-family:inherit;font-size:var(--rdg-font-size)}.t7vyx3i7-0-0-beta-47:focus{border-color:var(--rdg-selection-color);outline:none}.t7vyx3i7-0-0-beta-47::placeholder{color:#999;opacity:1}}.dgrid2_Table .rdg{font-family:monospace,Courier New,Courier}.dgrid2_Table .rdg-checkbox-label .rdg-checkbox{block-size:16px;inline-size:16px;border-width:2px;box-shadow:inset 0 0 0 3px var(--rdg-background-color)}')),document.head.appendChild(r2)}}catch(e2){console.error("vite-plugin-css-injected-by-js",e2)}})();var __defProp$1=Object.defineProperty,__defNormalProp$1=(obj,key,value)=>key in obj?__defProp$1(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField$1=(obj,key,value)=>__defNormalProp$1(obj,typeof key!="symbol"?key+"":key,value),n,l$1,u$2,i$1,o$1,r$2,f$2,e$1,c$1,s$1,a$1,h$1={},v$1=[],p$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y$1=Array.isArray;function d$1(n2,l2){for(var u2 in l2)n2[u2]=l2[u2];return n2}function w$2(n2){n2&&n2.parentNode&&n2.parentNode.removeChild(n2)}function _$1(l2,u2,t2){var i2,o2,r2,f2={};for(r2 in u2)r2=="key"?i2=u2[r2]:r2=="ref"?o2=u2[r2]:f2[r2]=u2[r2];if(arguments.length>2&&(f2.children=arguments.length>3?n.call(arguments,2):t2),typeof l2=="function"&&l2.defaultProps!=null)for(r2 in l2.defaultProps)f2[r2]===void 0&&(f2[r2]=l2.defaultProps[r2]);return g$2(l2,f2,i2,o2,null)}function g$2(n2,t2,i2,o2,r2){var f2={type:n2,props:t2,key:i2,ref:o2,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r2??++u$2,__i:-1,__u:0};return r2==null&&l$1.vnode!=null&&l$1.vnode(f2),f2}function m$1(){return{current:null}}function b(n2){return n2.children}function k$2(n2,l2){this.props=n2,this.context=l2}function x$2(n2,l2){if(l2==null)return n2.__?x$2(n2.__,n2.__i+1):null;for(var u2;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null)return u2.__e;return typeof n2.type=="function"?x$2(n2):null}function C$2(n2){var l2,u2;if((n2=n2.__)!=null&&n2.__c!=null){for(n2.__e=n2.__c.base=null,l2=0;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null){n2.__e=n2.__c.base=u2.__e;break}return C$2(n2)}}function S(n2){(!n2.__d&&(n2.__d=!0)&&i$1.push(n2)&&!M$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$2)(M$1)}function M$1(){var n2,u2,t2,o2,r2,e2,c2,s2;for(i$1.sort(f$2);n2=i$1.shift();)n2.__d&&(u2=i$1.length,o2=void 0,e2=(r2=(t2=n2).__v).__e,c2=[],s2=[],t2.__P&&((o2=d$1({},r2)).__v=r2.__v+1,l$1.vnode&&l$1.vnode(o2),O$1(t2.__P,o2,r2,t2.__n,t2.__P.namespaceURI,32&r2.__u?[e2]:null,c2,e2??x$2(r2),!!(32&r2.__u),s2),o2.__v=r2.__v,o2.__.__k[o2.__i]=o2,j$2(c2,o2,s2),o2.__e!=e2&&C$2(o2)),i$1.length>u2&&i$1.sort(f$2));M$1.__r=0}function P$2(n2,l2,u2,t2,i2,o2,r2,f2,e2,c2,s2){var a2,p2,y2,d2,w2,_2=t2&&t2.__k||v$1,g2=l2.length;for(u2.__d=e2,$$1(u2,l2,_2),e2=u2.__d,a2=0;a2<g2;a2++)(y2=u2.__k[a2])!=null&&(p2=y2.__i===-1?h$1:_2[y2.__i]||h$1,y2.__i=a2,O$1(n2,y2,p2,i2,o2,r2,f2,e2,c2,s2),d2=y2.__e,y2.ref&&p2.ref!=y2.ref&&(p2.ref&&E$1(p2.ref,null,y2),s2.push(y2.ref,y2.__c||d2,y2)),w2==null&&d2!=null&&(w2=d2),65536&y2.__u||p2.__k===y2.__k?e2=I$1(y2,e2,n2):typeof y2.type=="function"&&y2.__d!==void 0?e2=y2.__d:d2&&(e2=d2.nextSibling),y2.__d=void 0,y2.__u&=-196609);u2.__d=e2,u2.__e=w2}function $$1(n2,l2,u2){var t2,i2,o2,r2,f2,e2=l2.length,c2=u2.length,s2=c2,a2=0;for(n2.__k=[],t2=0;t2<e2;t2++)(i2=l2[t2])!=null&&typeof i2!="boolean"&&typeof i2!="function"?(r2=t2+a2,(i2=n2.__k[t2]=typeof i2=="string"||typeof i2=="number"||typeof i2=="bigint"||i2.constructor==String?g$2(null,i2,null,null,null):y$1(i2)?g$2(b,{children:i2},null,null,null):i2.constructor===void 0&&i2.__b>0?g$2(i2.type,i2.props,i2.key,i2.ref?i2.ref:null,i2.__v):i2).__=n2,i2.__b=n2.__b+1,o2=null,(f2=i2.__i=L$1(i2,u2,r2,s2))!==-1&&(s2--,(o2=u2[f2])&&(o2.__u|=131072)),o2==null||o2.__v===null?(f2==-1&&a2--,typeof i2.type!="function"&&(i2.__u|=65536)):f2!==r2&&(f2==r2-1?a2--:f2==r2+1?a2++:(f2>r2?a2--:a2++,i2.__u|=65536))):i2=n2.__k[t2]=null;if(s2)for(t2=0;t2<c2;t2++)(o2=u2[t2])!=null&&!(131072&o2.__u)&&(o2.__e==n2.__d&&(n2.__d=x$2(o2)),N$1(o2,o2))}function I$1(n2,l2,u2){var t2,i2;if(typeof n2.type=="function"){for(t2=n2.__k,i2=0;t2&&i2<t2.length;i2++)t2[i2]&&(t2[i2].__=n2,l2=I$1(t2[i2],l2,u2));return l2}n2.__e!=l2&&(l2&&n2.type&&!u2.contains(l2)&&(l2=x$2(n2)),u2.insertBefore(n2.__e,l2||null),l2=n2.__e);do l2=l2&&l2.nextSibling;while(l2!=null&&l2.nodeType===8);return l2}function H$1(n2,l2){return l2=l2||[],n2==null||typeof n2=="boolean"||(y$1(n2)?n2.some(function(n3){H$1(n3,l2)}):l2.push(n2)),l2}function L$1(n2,l2,u2,t2){var i2=n2.key,o2=n2.type,r2=u2-1,f2=u2+1,e2=l2[u2];if(e2===null||e2&&i2==e2.key&&o2===e2.type&&!(131072&e2.__u))return u2;if((typeof o2!="function"||o2===b||i2)&&t2>(e2!=null&&!(131072&e2.__u)?1:0))for(;r2>=0||f2<l2.length;){if(r2>=0){if((e2=l2[r2])&&!(131072&e2.__u)&&i2==e2.key&&o2===e2.type)return r2;r2--}if(f2<l2.length){if((e2=l2[f2])&&!(131072&e2.__u)&&i2==e2.key&&o2===e2.type)return f2;f2++}}return-1}function T$2(n2,l2,u2){l2[0]==="-"?n2.setProperty(l2,u2??""):n2[l2]=u2==null?"":typeof u2!="number"||p$1.test(l2)?u2:u2+"px"}function A$2(n2,l2,u2,t2,i2){var o2;n:if(l2==="style")if(typeof u2=="string")n2.style.cssText=u2;else{if(typeof t2=="string"&&(n2.style.cssText=t2=""),t2)for(l2 in t2)u2&&l2 in u2||T$2(n2.style,l2,"");if(u2)for(l2 in u2)t2&&u2[l2]===t2[l2]||T$2(n2.style,l2,u2[l2])}else if(l2[0]==="o"&&l2[1]==="n")o2=l2!==(l2=l2.replace(/(PointerCapture)$|Capture$/i,"$1")),l2=l2.toLowerCase()in n2||l2==="onFocusOut"||l2==="onFocusIn"?l2.toLowerCase().slice(2):l2.slice(2),n2.l||(n2.l={}),n2.l[l2+o2]=u2,u2?t2?u2.u=t2.u:(u2.u=e$1,n2.addEventListener(l2,o2?s$1:c$1,o2)):n2.removeEventListener(l2,o2?s$1:c$1,o2);else{if(i2=="http://www.w3.org/2000/svg")l2=l2.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(l2!="width"&&l2!="height"&&l2!="href"&&l2!="list"&&l2!="form"&&l2!="tabIndex"&&l2!="download"&&l2!="rowSpan"&&l2!="colSpan"&&l2!="role"&&l2!="popover"&&l2 in n2)try{n2[l2]=u2??"";break n}catch{}typeof u2=="function"||(u2==null||u2===!1&&l2[4]!=="-"?n2.removeAttribute(l2):n2.setAttribute(l2,l2=="popover"&&u2==1?"":u2))}}function F$2(n2){return function(u2){if(this.l){var t2=this.l[u2.type+n2];if(u2.t==null)u2.t=e$1++;else if(u2.t<t2.u)return;return l$1.event&&(u2=l$1.event(u2)),"handleEvent"in t2?t2.handleEvent(u2):t2(u2)}}}function O$1(n2,u2,t2,i2,o2,r2,f2,e2,c2,s2){var a2,h2,v2,p2,w2,_2,g2,m2,x2,C2,S2,M2,$2,I2,H2,L2,T2=u2.type;if(u2.constructor!==void 0)return null;128&t2.__u&&(c2=!!(32&t2.__u),r2=[e2=u2.__e=t2.__e]),(a2=l$1.__b)&&a2(u2);n:if(typeof T2=="function")try{if(m2=u2.props,x2="prototype"in T2&&T2.prototype.render,C2=(a2=T2.contextType)&&i2[a2.__c],S2=a2?C2?C2.props.value:a2.__:i2,t2.__c?g2=(h2=u2.__c=t2.__c).__=h2.__E:(x2?u2.__c=h2=new T2(m2,S2):(u2.__c=h2=new k$2(m2,S2),h2.constructor=T2,h2.render=V$1),C2&&C2.sub(h2),h2.props=m2,h2.state||(h2.state={}),h2.context=S2,h2.__n=i2,v2=h2.__d=!0,h2.__h=[],h2._sb=[]),x2&&h2.__s==null&&(h2.__s=h2.state),x2&&T2.getDerivedStateFromProps!=null&&(h2.__s==h2.state&&(h2.__s=d$1({},h2.__s)),d$1(h2.__s,T2.getDerivedStateFromProps(m2,h2.__s))),p2=h2.props,w2=h2.state,h2.__v=u2,v2)x2&&T2.getDerivedStateFromProps==null&&h2.componentWillMount!=null&&h2.componentWillMount(),x2&&h2.componentDidMount!=null&&h2.__h.push(h2.componentDidMount);else{if(x2&&T2.getDerivedStateFromProps==null&&m2!==p2&&h2.componentWillReceiveProps!=null&&h2.componentWillReceiveProps(m2,S2),!h2.__e&&(h2.shouldComponentUpdate!=null&&h2.shouldComponentUpdate(m2,h2.__s,S2)===!1||u2.__v===t2.__v)){for(u2.__v!==t2.__v&&(h2.props=m2,h2.state=h2.__s,h2.__d=!1),u2.__e=t2.__e,u2.__k=t2.__k,u2.__k.some(function(n3){n3&&(n3.__=u2)}),M2=0;M2<h2._sb.length;M2++)h2.__h.push(h2._sb[M2]);h2._sb=[],h2.__h.length&&f2.push(h2);break n}h2.componentWillUpdate!=null&&h2.componentWillUpdate(m2,h2.__s,S2),x2&&h2.componentDidUpdate!=null&&h2.__h.push(function(){h2.componentDidUpdate(p2,w2,_2)})}if(h2.context=S2,h2.props=m2,h2.__P=n2,h2.__e=!1,$2=l$1.__r,I2=0,x2){for(h2.state=h2.__s,h2.__d=!1,$2&&$2(u2),a2=h2.render(h2.props,h2.state,h2.context),H2=0;H2<h2._sb.length;H2++)h2.__h.push(h2._sb[H2]);h2._sb=[]}else do h2.__d=!1,$2&&$2(u2),a2=h2.render(h2.props,h2.state,h2.context),h2.state=h2.__s;while(h2.__d&&++I2<25);h2.state=h2.__s,h2.getChildContext!=null&&(i2=d$1(d$1({},i2),h2.getChildContext())),x2&&!v2&&h2.getSnapshotBeforeUpdate!=null&&(_2=h2.getSnapshotBeforeUpdate(p2,w2)),P$2(n2,y$1(L2=a2!=null&&a2.type===b&&a2.key==null?a2.props.children:a2)?L2:[L2],u2,t2,i2,o2,r2,f2,e2,c2,s2),h2.base=u2.__e,u2.__u&=-161,h2.__h.length&&f2.push(h2),g2&&(h2.__E=h2.__=null)}catch(n3){if(u2.__v=null,c2||r2!=null){for(u2.__u|=c2?160:128;e2&&e2.nodeType===8&&e2.nextSibling;)e2=e2.nextSibling;r2[r2.indexOf(e2)]=null,u2.__e=e2}else u2.__e=t2.__e,u2.__k=t2.__k;l$1.__e(n3,u2,t2)}else r2==null&&u2.__v===t2.__v?(u2.__k=t2.__k,u2.__e=t2.__e):u2.__e=z$2(t2.__e,u2,t2,i2,o2,r2,f2,c2,s2);(a2=l$1.diffed)&&a2(u2)}function j$2(n2,u2,t2){u2.__d=void 0;for(var i2=0;i2<t2.length;i2++)E$1(t2[i2],t2[++i2],t2[++i2]);l$1.__c&&l$1.__c(u2,n2),n2.some(function(u3){try{n2=u3.__h,u3.__h=[],n2.some(function(n3){n3.call(u3)})}catch(n3){l$1.__e(n3,u3.__v)}})}function z$2(u2,t2,i2,o2,r2,f2,e2,c2,s2){var a2,v2,p2,d2,_2,g2,m2,b2=i2.props,k2=t2.props,C2=t2.type;if(C2==="svg"?r2="http://www.w3.org/2000/svg":C2==="math"?r2="http://www.w3.org/1998/Math/MathML":r2||(r2="http://www.w3.org/1999/xhtml"),f2!=null){for(a2=0;a2<f2.length;a2++)if((_2=f2[a2])&&"setAttribute"in _2==!!C2&&(C2?_2.localName===C2:_2.nodeType===3)){u2=_2,f2[a2]=null;break}}if(u2==null){if(C2===null)return document.createTextNode(k2);u2=document.createElementNS(r2,C2,k2.is&&k2),c2&&(l$1.__m&&l$1.__m(t2,f2),c2=!1),f2=null}if(C2===null)b2===k2||c2&&u2.data===k2||(u2.data=k2);else{if(f2=f2&&n.call(u2.childNodes),b2=i2.props||h$1,!c2&&f2!=null)for(b2={},a2=0;a2<u2.attributes.length;a2++)b2[(_2=u2.attributes[a2]).name]=_2.value;for(a2 in b2)if(_2=b2[a2],a2!="children"){if(a2=="dangerouslySetInnerHTML")p2=_2;else if(!(a2 in k2)){if(a2=="value"&&"defaultValue"in k2||a2=="checked"&&"defaultChecked"in k2)continue;A$2(u2,a2,null,_2,r2)}}for(a2 in k2)_2=k2[a2],a2=="children"?d2=_2:a2=="dangerouslySetInnerHTML"?v2=_2:a2=="value"?g2=_2:a2=="checked"?m2=_2:c2&&typeof _2!="function"||b2[a2]===_2||A$2(u2,a2,_2,b2[a2],r2);if(v2)c2||p2&&(v2.__html===p2.__html||v2.__html===u2.innerHTML)||(u2.innerHTML=v2.__html),t2.__k=[];else if(p2&&(u2.innerHTML=""),P$2(u2,y$1(d2)?d2:[d2],t2,i2,o2,C2==="foreignObject"?"http://www.w3.org/1999/xhtml":r2,f2,e2,f2?f2[0]:i2.__k&&x$2(i2,0),c2,s2),f2!=null)for(a2=f2.length;a2--;)w$2(f2[a2]);c2||(a2="value",C2==="progress"&&g2==null?u2.removeAttribute("value"):g2!==void 0&&(g2!==u2[a2]||C2==="progress"&&!g2||C2==="option"&&g2!==b2[a2])&&A$2(u2,a2,g2,b2[a2],r2),a2="checked",m2!==void 0&&m2!==u2[a2]&&A$2(u2,a2,m2,b2[a2],r2))}return u2}function E$1(n2,u2,t2){try{if(typeof n2=="function"){var i2=typeof n2.__u=="function";i2&&n2.__u(),i2&&u2==null||(n2.__u=n2(u2))}else n2.current=u2}catch(n3){l$1.__e(n3,t2)}}function N$1(n2,u2,t2){var i2,o2;if(l$1.unmount&&l$1.unmount(n2),(i2=n2.ref)&&(i2.current&&i2.current!==n2.__e||E$1(i2,null,u2)),(i2=n2.__c)!=null){if(i2.componentWillUnmount)try{i2.componentWillUnmount()}catch(n3){l$1.__e(n3,u2)}i2.base=i2.__P=null}if(i2=n2.__k)for(o2=0;o2<i2.length;o2++)i2[o2]&&N$1(i2[o2],u2,t2||typeof n2.type!="function");t2||w$2(n2.__e),n2.__c=n2.__=n2.__e=n2.__d=void 0}function V$1(n2,l2,u2){return this.constructor(n2,u2)}function q$2(u2,t2,i2){var o2,r2,f2,e2;l$1.__&&l$1.__(u2,t2),r2=(o2=typeof i2=="function")?null:i2&&i2.__k||t2.__k,f2=[],e2=[],O$1(t2,u2=(!o2&&i2||t2).__k=_$1(b,null,[u2]),r2||h$1,h$1,t2.namespaceURI,!o2&&i2?[i2]:r2?null:t2.firstChild?n.call(t2.childNodes):null,f2,!o2&&i2?i2:r2?r2.__e:t2.firstChild,o2,e2),j$2(f2,u2,e2)}function B$2(n2,l2){q$2(n2,l2,B$2)}function D$2(l2,u2,t2){var i2,o2,r2,f2,e2=d$1({},l2.props);for(r2 in l2.type&&l2.type.defaultProps&&(f2=l2.type.defaultProps),u2)r2=="key"?i2=u2[r2]:r2=="ref"?o2=u2[r2]:e2[r2]=u2[r2]===void 0&&f2!==void 0?f2[r2]:u2[r2];return arguments.length>2&&(e2.children=arguments.length>3?n.call(arguments,2):t2),g$2(l2.type,e2,i2||l2.key,o2||l2.ref,null)}function G$1(n2,l2){var u2={__c:l2="__cC"+a$1++,__:n2,Consumer:function(n3,l3){return n3.children(l3)},Provider:function(n3){var u3,t2;return this.getChildContext||(u3=new Set,(t2={})[l2]=this,this.getChildContext=function(){return t2},this.componentWillUnmount=function(){u3=null},this.shouldComponentUpdate=function(n4){this.props.value!==n4.value&&u3.forEach(function(n5){n5.__e=!0,S(n5)})},this.sub=function(n4){u3.add(n4);var l3=n4.componentWillUnmount;n4.componentWillUnmount=function(){u3&&u3.delete(n4),l3&&l3.call(n4)}}),n3.children}};return u2.Provider.__=u2.Consumer.contextType=u2}n=v$1.slice,l$1={__e:function(n2,l2,u2,t2){for(var i2,o2,r2;l2=l2.__;)if((i2=l2.__c)&&!i2.__)try{if((o2=i2.constructor)&&o2.getDerivedStateFromError!=null&&(i2.setState(o2.getDerivedStateFromError(n2)),r2=i2.__d),i2.componentDidCatch!=null&&(i2.componentDidCatch(n2,t2||{}),r2=i2.__d),r2)return i2.__E=i2}catch(l3){n2=l3}throw n2}},u$2=0,k$2.prototype.setState=function(n2,l2){var u2;u2=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=d$1({},this.state),typeof n2=="function"&&(n2=n2(d$1({},u2),this.props)),n2&&d$1(u2,n2),n2!=null&&this.__v&&(l2&&this._sb.push(l2),S(this))},k$2.prototype.forceUpdate=function(n2){this.__v&&(this.__e=!0,n2&&this.__h.push(n2),S(this))},k$2.prototype.render=b,i$1=[],r$2=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$2=function(n2,l2){return n2.__v.__b-l2.__v.__b},M$1.__r=0,e$1=0,c$1=F$2(!1),s$1=F$2(!0),a$1=0;var f$1=0;function u$1(e2,t2,n2,o2,i2,u2){t2||(t2={});var a2,c2,l2=t2;"ref"in t2&&(a2=t2.ref,delete t2.ref);var p2={type:e2,props:l2,key:n2,ref:a2,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--f$1,__i:-1,__u:0,__source:i2,__self:u2};if(typeof e2=="function"&&(a2=e2.defaultProps))for(c2 in a2)l2[c2]===void 0&&(l2[c2]=a2[c2]);return l$1.vnode&&l$1.vnode(p2),p2}var t,r$1,u,i,o=0,f=[],c$2=l$1,e=c$2.__b,a$2=c$2.__r,v=c$2.diffed,l=c$2.__c,m=c$2.unmount,s$2=c$2.__;function d(n2,t2){c$2.__h&&c$2.__h(r$1,n2,o||t2),o=0;var u2=r$1.__H||(r$1.__H={__:[],__h:[]});return n2>=u2.__.length&&u2.__.push({}),u2.__[n2]}function h(n2){return o=1,p(D$1,n2)}function p(n2,u2,i2){var o2=d(t++,2);if(o2.t=n2,!o2.__c&&(o2.__=[i2?i2(u2):D$1(void 0,u2),function(n3){var t2=o2.__N?o2.__N[0]:o2.__[0],r2=o2.t(t2,n3);t2!==r2&&(o2.__N=[r2,o2.__[1]],o2.__c.setState({}))}],o2.__c=r$1,!r$1.u)){var f2=function(n3,t2,r2){if(!o2.__c.__H)return!0;var u3=o2.__c.__H.__.filter(function(n4){return!!n4.__c});if(u3.every(function(n4){return!n4.__N}))return!c2||c2.call(this,n3,t2,r2);var i3=o2.__c.props!==n3;return u3.forEach(function(n4){if(n4.__N){var t3=n4.__[0];n4.__=n4.__N,n4.__N=void 0,t3!==n4.__[0]&&(i3=!0)}}),c2&&c2.call(this,n3,t2,r2)||i3};r$1.u=!0;var c2=r$1.shouldComponentUpdate,e2=r$1.componentWillUpdate;r$1.componentWillUpdate=function(n3,t2,r2){if(this.__e){var u3=c2;c2=void 0,f2(n3,t2,r2),c2=u3}e2&&e2.call(this,n3,t2,r2)},r$1.shouldComponentUpdate=f2}return o2.__N||o2.__}function y(n2,u2){var i2=d(t++,3);!c$2.__s&&C$1(i2.__H,u2)&&(i2.__=n2,i2.i=u2,r$1.__H.__h.push(i2))}function _(n2,u2){var i2=d(t++,4);!c$2.__s&&C$1(i2.__H,u2)&&(i2.__=n2,i2.i=u2,r$1.__h.push(i2))}function A$1(n2){return o=5,T$1(function(){return{current:n2}},[])}function F$1(n2,t2,r2){o=6,_(function(){return typeof n2=="function"?(n2(t2()),function(){return n2(null)}):n2?(n2.current=t2(),function(){return n2.current=null}):void 0},r2==null?r2:r2.concat(n2))}function T$1(n2,r2){var u2=d(t++,7);return C$1(u2.__H,r2)&&(u2.__=n2(),u2.__H=r2,u2.__h=n2),u2.__}function q$1(n2,t2){return o=8,T$1(function(){return n2},t2)}function x$1(n2){var u2=r$1.context[n2.__c],i2=d(t++,9);return i2.c=n2,u2?(i2.__==null&&(i2.__=!0,u2.sub(r$1)),u2.props.value):n2.__}function P$1(n2,t2){c$2.useDebugValue&&c$2.useDebugValue(t2?t2(n2):n2)}function g$1(){var n2=d(t++,11);if(!n2.__){for(var u2=r$1.__v;u2!==null&&!u2.__m&&u2.__!==null;)u2=u2.__;var i2=u2.__m||(u2.__m=[0,0]);n2.__="P"+i2[0]+"-"+i2[1]++}return n2.__}function j$1(){for(var n2;n2=f.shift();)if(n2.__P&&n2.__H)try{n2.__H.__h.forEach(z$1),n2.__H.__h.forEach(B$1),n2.__H.__h=[]}catch(t2){n2.__H.__h=[],c$2.__e(t2,n2.__v)}}c$2.__b=function(n2){r$1=null,e&&e(n2)},c$2.__=function(n2,t2){n2&&t2.__k&&t2.__k.__m&&(n2.__m=t2.__k.__m),s$2&&s$2(n2,t2)},c$2.__r=function(n2){a$2&&a$2(n2),t=0;var i2=(r$1=n2.__c).__H;i2&&(u===r$1?(i2.__h=[],r$1.__h=[],i2.__.forEach(function(n3){n3.__N&&(n3.__=n3.__N),n3.i=n3.__N=void 0})):(i2.__h.forEach(z$1),i2.__h.forEach(B$1),i2.__h=[],t=0)),u=r$1},c$2.diffed=function(n2){v&&v(n2);var t2=n2.__c;t2&&t2.__H&&(t2.__H.__h.length&&(f.push(t2)!==1&&i===c$2.requestAnimationFrame||((i=c$2.requestAnimationFrame)||w$1)(j$1)),t2.__H.__.forEach(function(n3){n3.i&&(n3.__H=n3.i),n3.i=void 0})),u=r$1=null},c$2.__c=function(n2,t2){t2.some(function(n3){try{n3.__h.forEach(z$1),n3.__h=n3.__h.filter(function(n4){return!n4.__||B$1(n4)})}catch(r2){t2.some(function(n4){n4.__h&&(n4.__h=[])}),t2=[],c$2.__e(r2,n3.__v)}}),l&&l(n2,t2)},c$2.unmount=function(n2){m&&m(n2);var t2,r2=n2.__c;r2&&r2.__H&&(r2.__H.__.forEach(function(n3){try{z$1(n3)}catch(n4){t2=n4}}),r2.__H=void 0,t2&&c$2.__e(t2,r2.__v))};var k$1=typeof requestAnimationFrame=="function";function w$1(n2){var t2,r2=function(){clearTimeout(u2),k$1&&cancelAnimationFrame(t2),setTimeout(n2)},u2=setTimeout(r2,100);k$1&&(t2=requestAnimationFrame(r2))}function z$1(n2){var t2=r$1,u2=n2.__c;typeof u2=="function"&&(n2.__c=void 0,u2()),r$1=t2}function B$1(n2){var t2=r$1;n2.__c=n2.__(),r$1=t2}function C$1(n2,t2){return!n2||n2.length!==t2.length||t2.some(function(t3,r2){return t3!==n2[r2]})}function D$1(n2,t2){return typeof t2=="function"?t2(n2):t2}function g(n2,t2){for(var e2 in n2)if(e2!=="__source"&&!(e2 in t2))return!0;for(var r2 in t2)if(r2!=="__source"&&n2[r2]!==t2[r2])return!0;return!1}function E(n2,t2){var e2=t2(),r2=h({t:{__:e2,u:t2}}),u2=r2[0].t,o2=r2[1];return _(function(){u2.__=e2,u2.u=t2,C(u2)&&o2({t:u2})},[n2,e2,t2]),y(function(){return C(u2)&&o2({t:u2}),n2(function(){C(u2)&&o2({t:u2})})},[n2]),e2}function C(n2){var t2,e2,r2=n2.u,u2=n2.__;try{var o2=r2();return!((t2=u2)===(e2=o2)&&(t2!==0||1/t2==1/e2)||t2!=t2&&e2!=e2)}catch{return!0}}function x(n2){n2()}function R(n2){return n2}function w(){return[!1,x]}var k$3=_;function I(n2,t2){this.props=n2,this.context=t2}function N(n2,e2){function r2(n3){var t2=this.props.ref,r3=t2==n3.ref;return!r3&&t2&&(t2.call?t2(null):t2.current=null),e2?!e2(this.props,n3)||!r3:g(this.props,n3)}function u2(e3){return this.shouldComponentUpdate=r2,_$1(n2,e3)}return u2.displayName="Memo("+(n2.displayName||n2.name)+")",u2.prototype.isReactComponent=!0,u2.__f=!0,u2}(I.prototype=new k$2).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(n2,t2){return g(this.props,n2)||g(this.state,t2)};var M=l$1.__b;l$1.__b=function(n2){n2.type&&n2.type.__f&&n2.ref&&(n2.props.ref=n2.ref,n2.ref=null),M&&M(n2)};var T=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function A(n2){function t2(t3){if(!("ref"in t3))return n2(t3,null);var e2=t3.ref;delete t3.ref;var r2=n2(t3,e2);return t3.ref=e2,r2}return t2.$$typeof=T,t2.render=t2,t2.prototype.isReactComponent=t2.__f=!0,t2.displayName="ForwardRef("+(n2.displayName||n2.name)+")",t2}var D=function(n2,t2){return n2==null?null:H$1(H$1(n2).map(t2))},L={map:D,forEach:D,count:function(n2){return n2?H$1(n2).length:0},only:function(n2){var t2=H$1(n2);if(t2.length!==1)throw"Children.only";return t2[0]},toArray:H$1},O=l$1.__e;l$1.__e=function(n2,t2,e2,r2){if(n2.then){for(var u2,o2=t2;o2=o2.__;)if((u2=o2.__c)&&u2.__c)return t2.__e==null&&(t2.__e=e2.__e,t2.__k=e2.__k),u2.__c(n2,t2)}O(n2,t2,e2,r2)};var F=l$1.unmount;function U(n2,t2,e2){return n2&&(n2.__c&&n2.__c.__H&&(n2.__c.__H.__.forEach(function(n3){typeof n3.__c=="function"&&n3.__c()}),n2.__c.__H=null),(n2=function(n3,t3){for(var e3 in t3)n3[e3]=t3[e3];return n3}({},n2)).__c!=null&&(n2.__c.__P===e2&&(n2.__c.__P=t2),n2.__c=null),n2.__k=n2.__k&&n2.__k.map(function(n3){return U(n3,t2,e2)})),n2}function V(n2,t2,e2){return n2&&e2&&(n2.__v=null,n2.__k=n2.__k&&n2.__k.map(function(n3){return V(n3,t2,e2)}),n2.__c&&n2.__c.__P===t2&&(n2.__e&&e2.appendChild(n2.__e),n2.__c.__e=!0,n2.__c.__P=e2)),n2}function W(){this.__u=0,this.o=null,this.__b=null}function P(n2){var t2=n2.__.__c;return t2&&t2.__a&&t2.__a(n2)}function j(n2){var e2,r2,u2;function o2(o3){if(e2||(e2=n2()).then(function(n3){r2=n3.default||n3},function(n3){u2=n3}),u2)throw u2;if(!r2)throw e2;return _$1(r2,o3)}return o2.displayName="Lazy",o2.__f=!0,o2}function z(){this.i=null,this.l=null}l$1.unmount=function(n2){var t2=n2.__c;t2&&t2.__R&&t2.__R(),t2&&32&n2.__u&&(n2.type=null),F&&F(n2)},(W.prototype=new k$2).__c=function(n2,t2){var e2=t2.__c,r2=this;r2.o==null&&(r2.o=[]),r2.o.push(e2);var u2=P(r2.__v),o2=!1,i2=function(){o2||(o2=!0,e2.__R=null,u2?u2(c2):c2())};e2.__R=i2;var c2=function(){if(!--r2.__u){if(r2.state.__a){var n3=r2.state.__a;r2.__v.__k[0]=V(n3,n3.__c.__P,n3.__c.__O)}var t3;for(r2.setState({__a:r2.__b=null});t3=r2.o.pop();)t3.forceUpdate()}};r2.__u++||32&t2.__u||r2.setState({__a:r2.__b=r2.__v.__k[0]}),n2.then(i2,i2)},W.prototype.componentWillUnmount=function(){this.o=[]},W.prototype.render=function(n2,e2){if(this.__b){if(this.__v.__k){var r2=document.createElement("div"),o2=this.__v.__k[0].__c;this.__v.__k[0]=U(this.__b,r2,o2.__O=o2.__P)}this.__b=null}var i2=e2.__a&&_$1(b,null,n2.fallback);return i2&&(i2.__u&=-33),[_$1(b,null,e2.__a?null:n2.children),i2]};var B=function(n2,t2,e2){if(++e2[1]===e2[0]&&n2.l.delete(t2),n2.props.revealOrder&&(n2.props.revealOrder[0]!=="t"||!n2.l.size))for(e2=n2.i;e2;){for(;e2.length>3;)e2.pop()();if(e2[1]<e2[0])break;n2.i=e2=e2[2]}};function H(n2){return this.getChildContext=function(){return n2.context},n2.children}function Z(n2){var e2=this,r2=n2.h;e2.componentWillUnmount=function(){q$2(null,e2.v),e2.v=null,e2.h=null},e2.h&&e2.h!==r2&&e2.componentWillUnmount(),e2.v||(e2.h=r2,e2.v={nodeType:1,parentNode:r2,childNodes:[],contains:function(){return!0},appendChild:function(n3){this.childNodes.push(n3),e2.h.appendChild(n3)},insertBefore:function(n3,t2){this.childNodes.push(n3),e2.h.appendChild(n3)},removeChild:function(n3){this.childNodes.splice(this.childNodes.indexOf(n3)>>>1,1),e2.h.removeChild(n3)}}),q$2(_$1(H,{context:e2.context},n2.__v),e2.v)}function Y(n2,e2){var r2=_$1(Z,{__v:n2,h:e2});return r2.containerInfo=e2,r2}(z.prototype=new k$2).__a=function(n2){var t2=this,e2=P(t2.__v),r2=t2.l.get(n2);return r2[0]++,function(u2){var o2=function(){t2.props.revealOrder?(r2.push(u2),B(t2,n2,r2)):u2()};e2?e2(o2):o2()}},z.prototype.render=function(n2){this.i=null,this.l=new Map;var t2=H$1(n2.children);n2.revealOrder&&n2.revealOrder[0]==="b"&&t2.reverse();for(var e2=t2.length;e2--;)this.l.set(t2[e2],this.i=[1,0,this.i]);return n2.children},z.prototype.componentDidUpdate=z.prototype.componentDidMount=function(){var n2=this;this.l.forEach(function(t2,e2){B(n2,e2,t2)})};var $=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,q=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,G=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,J=/[A-Z0-9]/g,K=typeof document<"u",Q=function(n2){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n2)};function X(n2,t2,e2){return t2.__k==null&&(t2.textContent=""),q$2(n2,t2),typeof e2=="function"&&e2(),n2?n2.__c:null}function nn(n2,t2,e2){return B$2(n2,t2),typeof e2=="function"&&e2(),n2?n2.__c:null}k$2.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t2){Object.defineProperty(k$2.prototype,t2,{configurable:!0,get:function(){return this["UNSAFE_"+t2]},set:function(n2){Object.defineProperty(this,t2,{configurable:!0,writable:!0,value:n2})}})});var tn=l$1.event;function en(){}function rn(){return this.cancelBubble}function un(){return this.defaultPrevented}l$1.event=function(n2){return tn&&(n2=tn(n2)),n2.persist=en,n2.isPropagationStopped=rn,n2.isDefaultPrevented=un,n2.nativeEvent=n2};var on,cn={enumerable:!1,configurable:!0,get:function(){return this.class}},fn=l$1.vnode;l$1.vnode=function(n2){typeof n2.type=="string"&&function(n3){var t2=n3.props,e2=n3.type,u2={},o2=e2.indexOf("-")===-1;for(var i2 in t2){var c2=t2[i2];if(!(i2==="value"&&"defaultValue"in t2&&c2==null||K&&i2==="children"&&e2==="noscript"||i2==="class"||i2==="className")){var f2=i2.toLowerCase();i2==="defaultValue"&&"value"in t2&&t2.value==null?i2="value":i2==="download"&&c2===!0?c2="":f2==="translate"&&c2==="no"?c2=!1:f2[0]==="o"&&f2[1]==="n"?f2==="ondoubleclick"?i2="ondblclick":f2!=="onchange"||e2!=="input"&&e2!=="textarea"||Q(t2.type)?f2==="onfocus"?i2="onfocusin":f2==="onblur"?i2="onfocusout":G.test(i2)&&(i2=f2):f2=i2="oninput":o2&&q.test(i2)?i2=i2.replace(J,"-$&").toLowerCase():c2===null&&(c2=void 0),f2==="oninput"&&u2[i2=f2]&&(i2="oninputCapture"),u2[i2]=c2}}e2=="select"&&u2.multiple&&Array.isArray(u2.value)&&(u2.value=H$1(t2.children).forEach(function(n4){n4.props.selected=u2.value.indexOf(n4.props.value)!=-1})),e2=="select"&&u2.defaultValue!=null&&(u2.value=H$1(t2.children).forEach(function(n4){n4.props.selected=u2.multiple?u2.defaultValue.indexOf(n4.props.value)!=-1:u2.defaultValue==n4.props.value})),t2.class&&!t2.className?(u2.class=t2.class,Object.defineProperty(u2,"className",cn)):(t2.className&&!t2.class||t2.class&&t2.className)&&(u2.class=u2.className=t2.className),n3.props=u2}(n2),n2.$$typeof=$,fn&&fn(n2)};var ln=l$1.__r;l$1.__r=function(n2){ln&&ln(n2),on=n2.__c};var an=l$1.diffed;l$1.diffed=function(n2){an&&an(n2);var t2=n2.props,e2=n2.__e;e2!=null&&n2.type==="textarea"&&"value"in t2&&t2.value!==e2.value&&(e2.value=t2.value==null?"":t2.value),on=null};var sn={ReactCurrentDispatcher:{current:{readContext:function(n2){return on.__n[n2.__c].props.value},useCallback:q$1,useContext:x$1,useDebugValue:P$1,useDeferredValue:R,useEffect:y,useId:g$1,useImperativeHandle:F$1,useInsertionEffect:k$3,useLayoutEffect:_,useMemo:T$1,useReducer:p,useRef:A$1,useState:h,useSyncExternalStore:E,useTransition:w}}};function vn(n2){return _$1.bind(null,n2)}function dn(n2){return!!n2&&n2.$$typeof===$}function pn(n2){return dn(n2)&&n2.type===b}function mn(n2){return!!n2&&!!n2.displayName&&(typeof n2.displayName=="string"||n2.displayName instanceof String)&&n2.displayName.startsWith("Memo(")}function yn(n2){return dn(n2)?D$2.apply(null,arguments):n2}function _n(n2){return!!n2.__k&&(q$2(null,n2),!0)}function bn(n2){return n2&&(n2.base||n2.nodeType===1&&n2)||null}var Sn=function(n2,t2){return n2(t2)},gn=function(n2,t2){return n2(t2)},En=b,Cn=dn,xn={useState:h,useId:g$1,useReducer:p,useEffect:y,useLayoutEffect:_,useInsertionEffect:k$3,useTransition:w,useDeferredValue:R,useSyncExternalStore:E,startTransition:x,useRef:A$1,useImperativeHandle:F$1,useMemo:T$1,useCallback:q$1,useContext:x$1,useDebugValue:P$1,version:"18.3.1",Children:L,render:X,hydrate:nn,unmountComponentAtNode:_n,createPortal:Y,createElement:_$1,createContext:G$1,createFactory:vn,cloneElement:yn,createRef:m$1,Fragment:b,isValidElement:dn,isElement:Cn,isFragment:pn,isMemo:mn,findDOMNode:bn,Component:k$2,PureComponent:I,memo:N,forwardRef:A,flushSync:gn,unstable_batchedUpdates:Sn,StrictMode:En,Suspense:W,SuspenseList:z,lazy:j,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:sn};function r(e2){var t2,f2,n2="";if(typeof e2=="string"||typeof e2=="number")n2+=e2;else if(typeof e2=="object")if(Array.isArray(e2)){var o2=e2.length;for(t2=0;t2<o2;t2++)e2[t2]&&(f2=r(e2[t2]))&&(n2&&(n2+=" "),n2+=f2)}else for(f2 in e2)e2[f2]&&(n2&&(n2+=" "),n2+=f2);return n2}function clsx(){for(var e2,t2,f2=0,n2="",o2=arguments.length;f2<o2;f2++)(e2=arguments[f2])&&(t2=r(e2))&&(n2&&(n2+=" "),n2+=t2);return n2}function getColSpan(column,lastFrozenColumnIndex,args){const colSpan=typeof column.colSpan=="function"?column.colSpan(args):1;if(Number.isInteger(colSpan)&&colSpan>1&&(!column.frozen||column.idx+colSpan-1<=lastFrozenColumnIndex))return colSpan}function stopPropagation(event){event.stopPropagation()}function scrollIntoView(element){element==null||element.scrollIntoView({inline:"nearest",block:"nearest"})}function createCellEvent(event){let defaultPrevented=!1;const cellEvent={...event,preventGridDefault(){defaultPrevented=!0},isGridDefaultPrevented(){return defaultPrevented}};return Object.setPrototypeOf(cellEvent,Object.getPrototypeOf(event)),cellEvent}const nonInputKeys=new Set(["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Insert","ContextMenu","Escape","Pause","Play","PrintScreen","F1","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]);function isCtrlKeyHeldDown(e2){return(e2.ctrlKey||e2.metaKey)&&e2.key!=="Control"}function isDefaultCellInput(event){return isCtrlKeyHeldDown(event)&&event.keyCode!==86?!1:!nonInputKeys.has(event.key)}function onEditorNavigation({key,target}){var _a;return key==="Tab"&&(target instanceof HTMLInputElement||target instanceof HTMLTextAreaElement||target instanceof HTMLSelectElement)?((_a=target.closest(".rdg-editor-container"))==null?void 0:_a.querySelectorAll("input, textarea, select").length)===1:!1}const measuringCellClassname="mlln6zg7-0-0-beta-47";function renderMeasuringCells(viewportColumns){return viewportColumns.map(({key,idx,minWidth,maxWidth})=>u$1("div",{className:measuringCellClassname,style:{gridColumnStart:idx+1,minWidth,maxWidth},"data-measuring-cell-key":key},key))}function isSelectedCellEditable({selectedPosition,columns,rows}){const column=columns[selectedPosition.idx],row2=rows[selectedPosition.rowIdx];return isCellEditableUtil(column,row2)}function isCellEditableUtil(column,row2){return column.renderEditCell!=null&&(typeof column.editable=="function"?column.editable(row2):column.editable)!==!1}function getSelectedCellColSpan({rows,topSummaryRows,bottomSummaryRows,rowIdx,mainHeaderRowIdx,lastFrozenColumnIndex,column}){const topSummaryRowsCount=(topSummaryRows==null?void 0:topSummaryRows.length)??0;if(rowIdx===mainHeaderRowIdx)return getColSpan(column,lastFrozenColumnIndex,{type:"HEADER"});if(topSummaryRows&&rowIdx>mainHeaderRowIdx&&rowIdx<=topSummaryRowsCount+mainHeaderRowIdx)return getColSpan(column,lastFrozenColumnIndex,{type:"SUMMARY",row:topSummaryRows[rowIdx+topSummaryRowsCount]});if(rowIdx>=0&&rowIdx<rows.length){const row2=rows[rowIdx];return getColSpan(column,lastFrozenColumnIndex,{type:"ROW",row:row2})}if(bottomSummaryRows)return getColSpan(column,lastFrozenColumnIndex,{type:"SUMMARY",row:bottomSummaryRows[rowIdx-rows.length]})}function getNextSelectedCellPosition({moveUp,moveNext,cellNavigationMode,columns,colSpanColumns,rows,topSummaryRows,bottomSummaryRows,minRowIdx,mainHeaderRowIdx,maxRowIdx,currentPosition:{idx:currentIdx,rowIdx:currentRowIdx},nextPosition,lastFrozenColumnIndex,isCellWithinBounds}){let{idx:nextIdx,rowIdx:nextRowIdx}=nextPosition;const columnsCount=columns.length,setColSpan=moveNext2=>{for(const column of colSpanColumns){const colIdx=column.idx;if(colIdx>nextIdx)break;const colSpan=getSelectedCellColSpan({rows,topSummaryRows,bottomSummaryRows,rowIdx:nextRowIdx,mainHeaderRowIdx,lastFrozenColumnIndex,column});if(colSpan&&nextIdx>colIdx&&nextIdx<colSpan+colIdx){nextIdx=colIdx+(moveNext2?colSpan:0);break}}},getParentRowIdx=parent=>parent.level+mainHeaderRowIdx,setHeaderGroupColAndRowSpan=()=>{if(moveNext){let parent=columns[nextIdx].parent;for(;parent!==void 0;){const parentRowIdx=getParentRowIdx(parent);if(nextRowIdx===parentRowIdx){nextIdx=parent.idx+parent.colSpan;break}parent=parent.parent}}else if(moveUp){let parent=columns[nextIdx].parent,found=!1;for(;parent!==void 0;){const parentRowIdx=getParentRowIdx(parent);if(nextRowIdx>=parentRowIdx){nextIdx=parent.idx,nextRowIdx=parentRowIdx,found=!0;break}parent=parent.parent}found||(nextIdx=currentIdx,nextRowIdx=currentRowIdx)}};if(isCellWithinBounds(nextPosition)&&(setColSpan(moveNext),nextRowIdx<mainHeaderRowIdx&&setHeaderGroupColAndRowSpan()),cellNavigationMode==="CHANGE_ROW"&&(nextIdx===columnsCount?nextRowIdx===maxRowIdx||(nextIdx=0,nextRowIdx+=1):nextIdx===-1&&(nextRowIdx===minRowIdx||(nextRowIdx-=1,nextIdx=columnsCount-1),setColSpan(!1))),nextRowIdx<mainHeaderRowIdx){let parent=columns[nextIdx].parent;const nextParentRowIdx=nextRowIdx;for(nextRowIdx=mainHeaderRowIdx;parent!==void 0;){const parentRowIdx=getParentRowIdx(parent);parentRowIdx>=nextParentRowIdx&&(nextRowIdx=parentRowIdx,nextIdx=parent.idx),parent=parent.parent}}return{idx:nextIdx,rowIdx:nextRowIdx}}function canExitGrid({maxColIdx,minRowIdx,maxRowIdx,selectedPosition:{rowIdx,idx},shiftKey}){return shiftKey?idx===0&&rowIdx===minRowIdx:idx===maxColIdx&&rowIdx===maxRowIdx}const cell="cj343x07-0-0-beta-47",cellClassname=`rdg-cell ${cell}`,cellFrozen="csofj7r7-0-0-beta-47",cellFrozenClassname=`rdg-cell-frozen ${cellFrozen}`;function getRowStyle(rowIdx){return{"--rdg-grid-row-start":rowIdx}}function getHeaderCellStyle(column,rowIdx,rowSpan){const gridRowEnd=rowIdx+1,paddingBlockStart=`calc(${rowSpan-1} * var(--rdg-header-row-height))`;return column.parent===void 0?{insetBlockStart:0,gridRowStart:1,gridRowEnd,paddingBlockStart}:{insetBlockStart:`calc(${rowIdx-rowSpan} * var(--rdg-header-row-height))`,gridRowStart:gridRowEnd-rowSpan,gridRowEnd,paddingBlockStart}}function getCellStyle(column,colSpan=1){const index=column.idx+1;return{gridColumnStart:index,gridColumnEnd:index+colSpan,insetInlineStart:column.frozen?`var(--rdg-frozen-left-${column.idx})`:void 0}}function getCellClassname(column,...extraClasses){return clsx(cellClassname,...extraClasses,column.frozen&&cellFrozenClassname)}const{min,max,floor,sign,abs}=Math;function assertIsValidKeyGetter(keyGetter){if(typeof keyGetter!="function")throw new Error("Please specify the rowKeyGetter prop to use selection")}function clampColumnWidth(width,{minWidth,maxWidth}){return width=max(width,minWidth),typeof maxWidth=="number"&&maxWidth>=minWidth?min(width,maxWidth):width}function getHeaderCellRowSpan(column,rowIdx){return column.parent===void 0?rowIdx:column.level-column.parent.level}const checkbox="c1bn88vv7-0-0-beta-47",checkboxClassname=`rdg-checkbox-input ${checkbox}`;function renderCheckbox({onChange,indeterminate,...props}){function handleChange(e2){onChange(e2.target.checked,e2.nativeEvent.shiftKey)}return u$1("input",{ref:el=>{el&&(el.indeterminate=indeterminate===!0)},type:"checkbox",className:checkboxClassname,onChange:handleChange,...props})}function renderValue(props){try{return props.row[props.column.key]}catch{return null}}const DataGridDefaultRenderersContext=G$1(void 0),DataGridDefaultRenderersProvider=DataGridDefaultRenderersContext.Provider;function useDefaultRenderers(){return x$1(DataGridDefaultRenderersContext)}function SelectCellFormatter({value,tabIndex,indeterminate,disabled,onChange,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy}){const renderCheckbox2=useDefaultRenderers().renderCheckbox;return renderCheckbox2({"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,tabIndex,indeterminate,disabled,checked:value,onChange})}const RowSelectionContext=G$1(void 0),RowSelectionProvider=RowSelectionContext.Provider,RowSelectionChangeContext=G$1(void 0),RowSelectionChangeProvider=RowSelectionChangeContext.Provider;function useRowSelection(){const rowSelectionContext=x$1(RowSelectionContext),rowSelectionChangeContext=x$1(RowSelectionChangeContext);if(rowSelectionContext===void 0||rowSelectionChangeContext===void 0)throw new Error("useRowSelection must be used within DataGrid cells");return{isRowSelectionDisabled:rowSelectionContext.isRowSelectionDisabled,isRowSelected:rowSelectionContext.isRowSelected,onRowSelectionChange:rowSelectionChangeContext}}const HeaderRowSelectionContext=G$1(void 0),HeaderRowSelectionProvider=HeaderRowSelectionContext.Provider,HeaderRowSelectionChangeContext=G$1(void 0),HeaderRowSelectionChangeProvider=HeaderRowSelectionChangeContext.Provider;function useHeaderRowSelection(){const headerRowSelectionContext=x$1(HeaderRowSelectionContext),headerRowSelectionChangeContext=x$1(HeaderRowSelectionChangeContext);if(headerRowSelectionContext===void 0||headerRowSelectionChangeContext===void 0)throw new Error("useHeaderRowSelection must be used within DataGrid cells");return{isIndeterminate:headerRowSelectionContext.isIndeterminate,isRowSelected:headerRowSelectionContext.isRowSelected,onRowSelectionChange:headerRowSelectionChangeContext}}const SELECT_COLUMN_KEY="rdg-select-column";function HeaderRenderer(props){const{isIndeterminate,isRowSelected,onRowSelectionChange}=useHeaderRowSelection();return u$1(SelectCellFormatter,{"aria-label":"Select All",tabIndex:props.tabIndex,indeterminate:isIndeterminate,value:isRowSelected,onChange:checked=>{onRowSelectionChange({checked:isIndeterminate?!1:checked})}})}function SelectFormatter(props){const{isRowSelectionDisabled,isRowSelected,onRowSelectionChange}=useRowSelection();return u$1(SelectCellFormatter,{"aria-label":"Select",tabIndex:props.tabIndex,disabled:isRowSelectionDisabled,value:isRowSelected,onChange:(checked,isShiftClick)=>{onRowSelectionChange({row:props.row,checked,isShiftClick})}})}function SelectGroupFormatter(props){const{isRowSelected,onRowSelectionChange}=useRowSelection();return u$1(SelectCellFormatter,{"aria-label":"Select Group",tabIndex:props.tabIndex,value:isRowSelected,onChange:checked=>{onRowSelectionChange({row:props.row,checked,isShiftClick:!1})}})}const SelectColumn={key:SELECT_COLUMN_KEY,name:"",width:35,minWidth:35,maxWidth:35,resizable:!1,sortable:!1,frozen:!0,renderHeaderCell(props){return u$1(HeaderRenderer,{...props})},renderCell(props){return u$1(SelectFormatter,{...props})},renderGroupCell(props){return u$1(SelectGroupFormatter,{...props})}},DEFAULT_COLUMN_WIDTH="auto",DEFAULT_COLUMN_MIN_WIDTH=50;function useCalculatedColumns({rawColumns,defaultColumnOptions,getColumnWidth,viewportWidth,scrollLeft,enableVirtualization}){const defaultWidth=(defaultColumnOptions==null?void 0:defaultColumnOptions.width)??DEFAULT_COLUMN_WIDTH,defaultMinWidth=(defaultColumnOptions==null?void 0:defaultColumnOptions.minWidth)??DEFAULT_COLUMN_MIN_WIDTH,defaultMaxWidth=(defaultColumnOptions==null?void 0:defaultColumnOptions.maxWidth)??void 0,defaultCellRenderer=(defaultColumnOptions==null?void 0:defaultColumnOptions.renderCell)??renderValue,defaultSortable=(defaultColumnOptions==null?void 0:defaultColumnOptions.sortable)??!1,defaultResizable=(defaultColumnOptions==null?void 0:defaultColumnOptions.resizable)??!1,defaultDraggable=(defaultColumnOptions==null?void 0:defaultColumnOptions.draggable)??!1,{columns,colSpanColumns,lastFrozenColumnIndex,headerRowsCount}=T$1(()=>{let lastFrozenColumnIndex2=-1,headerRowsCount2=1;const columns2=[];collectColumns(rawColumns,1);function collectColumns(rawColumns2,level,parent){for(const rawColumn of rawColumns2){if("children"in rawColumn){const calculatedColumnParent={name:rawColumn.name,parent,idx:-1,colSpan:0,level:0,headerCellClass:rawColumn.headerCellClass};collectColumns(rawColumn.children,level+1,calculatedColumnParent);continue}const frozen=rawColumn.frozen??!1,column={...rawColumn,parent,idx:0,level:0,frozen,width:rawColumn.width??defaultWidth,minWidth:rawColumn.minWidth??defaultMinWidth,maxWidth:rawColumn.maxWidth??defaultMaxWidth,sortable:rawColumn.sortable??defaultSortable,resizable:rawColumn.resizable??defaultResizable,draggable:rawColumn.draggable??defaultDraggable,renderCell:rawColumn.renderCell??defaultCellRenderer};columns2.push(column),frozen&&lastFrozenColumnIndex2++,level>headerRowsCount2&&(headerRowsCount2=level)}}columns2.sort(({key:aKey,frozen:frozenA},{key:bKey,frozen:frozenB})=>aKey===SELECT_COLUMN_KEY?-1:bKey===SELECT_COLUMN_KEY?1:frozenA?frozenB?0:-1:frozenB?1:0);const colSpanColumns2=[];return columns2.forEach((column,idx)=>{column.idx=idx,updateColumnParent(column,idx,0),column.colSpan!=null&&colSpanColumns2.push(column)}),{columns:columns2,colSpanColumns:colSpanColumns2,lastFrozenColumnIndex:lastFrozenColumnIndex2,headerRowsCount:headerRowsCount2}},[rawColumns,defaultWidth,defaultMinWidth,defaultMaxWidth,defaultCellRenderer,defaultResizable,defaultSortable,defaultDraggable]),{templateColumns,layoutCssVars,totalFrozenColumnWidth,columnMetrics}=T$1(()=>{const columnMetrics2=new Map;let left=0,totalFrozenColumnWidth2=0;const templateColumns2=[];for(const column of columns){let width=getColumnWidth(column);typeof width=="number"?width=clampColumnWidth(width,column):width=column.minWidth,templateColumns2.push(`${width}px`),columnMetrics2.set(column,{width,left}),left+=width}if(lastFrozenColumnIndex!==-1){const columnMetric=columnMetrics2.get(columns[lastFrozenColumnIndex]);totalFrozenColumnWidth2=columnMetric.left+columnMetric.width}const layoutCssVars2={};for(let i2=0;i2<=lastFrozenColumnIndex;i2++){const column=columns[i2];layoutCssVars2[`--rdg-frozen-left-${column.idx}`]=`${columnMetrics2.get(column).left}px`}return{templateColumns:templateColumns2,layoutCssVars:layoutCssVars2,totalFrozenColumnWidth:totalFrozenColumnWidth2,columnMetrics:columnMetrics2}},[getColumnWidth,columns,lastFrozenColumnIndex]),[colOverscanStartIdx,colOverscanEndIdx]=T$1(()=>{if(!enableVirtualization)return[0,columns.length-1];const viewportLeft=scrollLeft+totalFrozenColumnWidth,viewportRight=scrollLeft+viewportWidth,lastColIdx=columns.length-1,firstUnfrozenColumnIdx=min(lastFrozenColumnIndex+1,lastColIdx);if(viewportLeft>=viewportRight)return[firstUnfrozenColumnIdx,firstUnfrozenColumnIdx];let colVisibleStartIdx=firstUnfrozenColumnIdx;for(;colVisibleStartIdx<lastColIdx;){const{left,width}=columnMetrics.get(columns[colVisibleStartIdx]);if(left+width>viewportLeft)break;colVisibleStartIdx++}let colVisibleEndIdx=colVisibleStartIdx;for(;colVisibleEndIdx<lastColIdx;){const{left,width}=columnMetrics.get(columns[colVisibleEndIdx]);if(left+width>=viewportRight)break;colVisibleEndIdx++}const colOverscanStartIdx2=max(firstUnfrozenColumnIdx,colVisibleStartIdx-1),colOverscanEndIdx2=min(lastColIdx,colVisibleEndIdx+1);return[colOverscanStartIdx2,colOverscanEndIdx2]},[columnMetrics,columns,lastFrozenColumnIndex,scrollLeft,totalFrozenColumnWidth,viewportWidth,enableVirtualization]);return{columns,colSpanColumns,colOverscanStartIdx,colOverscanEndIdx,templateColumns,layoutCssVars,headerRowsCount,lastFrozenColumnIndex,totalFrozenColumnWidth}}function updateColumnParent(column,index,level){if(level<column.level&&(column.level=level),column.parent!==void 0){const{parent}=column;parent.idx===-1&&(parent.idx=index),parent.colSpan+=1,updateColumnParent(parent,index,level-1)}}const useLayoutEffect=typeof window>"u"?y:_;function useColumnWidths(columns,viewportColumns,templateColumns,gridRef,gridWidth,resizedColumnWidths,measuredColumnWidths,setResizedColumnWidths,setMeasuredColumnWidths,onColumnResize){const prevGridWidthRef=A$1(gridWidth),columnsCanFlex=columns.length===viewportColumns.length,ignorePreviouslyMeasuredColumns=columnsCanFlex&&gridWidth!==prevGridWidthRef.current,newTemplateColumns=[...templateColumns],columnsToMeasure=[];for(const{key,idx,width}of viewportColumns)typeof width=="string"&&(ignorePreviouslyMeasuredColumns||!measuredColumnWidths.has(key))&&!resizedColumnWidths.has(key)&&(newTemplateColumns[idx]=width,columnsToMeasure.push(key));const gridTemplateColumns=newTemplateColumns.join(" ");useLayoutEffect(()=>{prevGridWidthRef.current=gridWidth,updateMeasuredWidths(columnsToMeasure)});function updateMeasuredWidths(columnsToMeasure2){columnsToMeasure2.length!==0&&setMeasuredColumnWidths(measuredColumnWidths2=>{const newMeasuredColumnWidths=new Map(measuredColumnWidths2);let hasChanges=!1;for(const key of columnsToMeasure2){const measuredWidth=measureColumnWidth(gridRef,key);hasChanges||(hasChanges=measuredWidth!==measuredColumnWidths2.get(key)),measuredWidth===void 0?newMeasuredColumnWidths.delete(key):newMeasuredColumnWidths.set(key,measuredWidth)}return hasChanges?newMeasuredColumnWidths:measuredColumnWidths2})}function handleColumnResize(column,nextWidth){const{key:resizingKey}=column,newTemplateColumns2=[...templateColumns],columnsToMeasure2=[];for(const{key,idx,width}of viewportColumns)if(resizingKey===key){const width2=typeof nextWidth=="number"?`${nextWidth}px`:nextWidth;newTemplateColumns2[idx]=width2}else columnsCanFlex&&typeof width=="string"&&!resizedColumnWidths.has(key)&&(newTemplateColumns2[idx]=width,columnsToMeasure2.push(key));gridRef.current.style.gridTemplateColumns=newTemplateColumns2.join(" ");const measuredWidth=typeof nextWidth=="number"?nextWidth:measureColumnWidth(gridRef,resizingKey);gn(()=>{setResizedColumnWidths(resizedColumnWidths2=>{const newResizedColumnWidths=new Map(resizedColumnWidths2);return newResizedColumnWidths.set(resizingKey,measuredWidth),newResizedColumnWidths}),updateMeasuredWidths(columnsToMeasure2)}),onColumnResize==null||onColumnResize(column.idx,measuredWidth)}return{gridTemplateColumns,handleColumnResize}}function measureColumnWidth(gridRef,key){var _a;const selector=`[data-measuring-cell-key="${CSS.escape(key)}"]`,measuringCell=(_a=gridRef.current)==null?void 0:_a.querySelector(selector);return measuringCell==null?void 0:measuringCell.getBoundingClientRect().width}function useGridDimensions(){const gridRef=A$1(null),[inlineSize,setInlineSize]=h(1),[blockSize,setBlockSize]=h(1),[horizontalScrollbarHeight,setHorizontalScrollbarHeight]=h(0);return useLayoutEffect(()=>{const{ResizeObserver}=window;if(ResizeObserver==null)return;const{clientWidth,clientHeight,offsetWidth,offsetHeight}=gridRef.current,{width,height}=gridRef.current.getBoundingClientRect(),initialHorizontalScrollbarHeight=offsetHeight-clientHeight,initialWidth=width-offsetWidth+clientWidth,initialHeight=height-initialHorizontalScrollbarHeight;setInlineSize(initialWidth),setBlockSize(initialHeight),setHorizontalScrollbarHeight(initialHorizontalScrollbarHeight);const resizeObserver=new ResizeObserver(entries=>{const size=entries[0].contentBoxSize[0],{clientHeight:clientHeight2,offsetHeight:offsetHeight2}=gridRef.current;gn(()=>{setInlineSize(size.inlineSize),setBlockSize(size.blockSize),setHorizontalScrollbarHeight(offsetHeight2-clientHeight2)})});return resizeObserver.observe(gridRef.current),()=>{resizeObserver.disconnect()}},[]),[gridRef,inlineSize,blockSize,horizontalScrollbarHeight]}function useLatestFunc(fn2){const ref=A$1(fn2);y(()=>{ref.current=fn2});const callbackFn=q$1((...args)=>{ref.current(...args)},[]);return fn2&&callbackFn}function useRovingTabIndex(isSelected){const[isChildFocused,setIsChildFocused]=h(!1);isChildFocused&&!isSelected&&setIsChildFocused(!1);function onFocus(event){event.target!==event.currentTarget&&setIsChildFocused(!0)}return{tabIndex:isSelected&&!isChildFocused?0:-1,childTabIndex:isSelected?0:-1,onFocus:isSelected?onFocus:void 0}}function useViewportColumns({columns,colSpanColumns,rows,topSummaryRows,bottomSummaryRows,colOverscanStartIdx,colOverscanEndIdx,lastFrozenColumnIndex,rowOverscanStartIdx,rowOverscanEndIdx}){const startIdx=T$1(()=>{if(colOverscanStartIdx===0)return 0;let startIdx2=colOverscanStartIdx;const updateStartIdx=(colIdx,colSpan)=>colSpan!==void 0&&colIdx+colSpan>colOverscanStartIdx?(startIdx2=colIdx,!0):!1;for(const column of colSpanColumns){const colIdx=column.idx;if(colIdx>=startIdx2||updateStartIdx(colIdx,getColSpan(column,lastFrozenColumnIndex,{type:"HEADER"})))break;for(let rowIdx=rowOverscanStartIdx;rowIdx<=rowOverscanEndIdx;rowIdx++){const row2=rows[rowIdx];if(updateStartIdx(colIdx,getColSpan(column,lastFrozenColumnIndex,{type:"ROW",row:row2})))break}if(topSummaryRows!=null){for(const row2 of topSummaryRows)if(updateStartIdx(colIdx,getColSpan(column,lastFrozenColumnIndex,{type:"SUMMARY",row:row2})))break}if(bottomSummaryRows!=null){for(const row2 of bottomSummaryRows)if(updateStartIdx(colIdx,getColSpan(column,lastFrozenColumnIndex,{type:"SUMMARY",row:row2})))break}}return startIdx2},[rowOverscanStartIdx,rowOverscanEndIdx,rows,topSummaryRows,bottomSummaryRows,colOverscanStartIdx,lastFrozenColumnIndex,colSpanColumns]);return T$1(()=>{const viewportColumns=[];for(let colIdx=0;colIdx<=colOverscanEndIdx;colIdx++){const column=columns[colIdx];colIdx<startIdx&&!column.frozen||viewportColumns.push(column)}return viewportColumns},[startIdx,colOverscanEndIdx,columns])}function useViewportRows({rows,rowHeight,clientHeight,scrollTop,enableVirtualization}){const{totalRowHeight,gridTemplateRows,getRowTop,getRowHeight,findRowIdx}=T$1(()=>{if(typeof rowHeight=="number")return{totalRowHeight:rowHeight*rows.length,gridTemplateRows:` repeat(${rows.length}, ${rowHeight}px)`,getRowTop:rowIdx=>rowIdx*rowHeight,getRowHeight:()=>rowHeight,findRowIdx:offset=>floor(offset/rowHeight)};let totalRowHeight2=0,gridTemplateRows2=" ";const rowPositions=rows.map(row2=>{const currentRowHeight=rowHeight(row2),position={top:totalRowHeight2,height:currentRowHeight};return gridTemplateRows2+=`${currentRowHeight}px `,totalRowHeight2+=currentRowHeight,position}),validateRowIdx=rowIdx=>max(0,min(rows.length-1,rowIdx));return{totalRowHeight:totalRowHeight2,gridTemplateRows:gridTemplateRows2,getRowTop:rowIdx=>rowPositions[validateRowIdx(rowIdx)].top,getRowHeight:rowIdx=>rowPositions[validateRowIdx(rowIdx)].height,findRowIdx(offset){let start=0,end=rowPositions.length-1;for(;start<=end;){const middle=start+floor((end-start)/2),currentOffset=rowPositions[middle].top;if(currentOffset===offset)return middle;if(currentOffset<offset?start=middle+1:currentOffset>offset&&(end=middle-1),start>end)return end}return 0}}},[rowHeight,rows]);let rowOverscanStartIdx=0,rowOverscanEndIdx=rows.length-1;if(enableVirtualization){const rowVisibleStartIdx=findRowIdx(scrollTop),rowVisibleEndIdx=findRowIdx(scrollTop+clientHeight);rowOverscanStartIdx=max(0,rowVisibleStartIdx-4),rowOverscanEndIdx=min(rows.length-1,rowVisibleEndIdx+4)}return{rowOverscanStartIdx,rowOverscanEndIdx,totalRowHeight,gridTemplateRows,getRowTop,getRowHeight,findRowIdx}}const cellDragHandle="c1w9bbhr7-0-0-beta-47",cellDragHandleFrozenClassname="c1creorc7-0-0-beta-47",cellDragHandleClassname=`rdg-cell-drag-handle ${cellDragHandle}`;function DragHandle({gridRowStart,rows,column,columnWidth,maxColIdx,isLastRow,selectedPosition,latestDraggedOverRowIdx,isCellEditable,onRowsChange,onFill,onClick,setDragging,setDraggedOverRowIdx}){const{idx,rowIdx}=selectedPosition;function handleMouseDown(event){if(event.preventDefault(),event.buttons!==1)return;setDragging(!0),window.addEventListener("mouseover",onMouseOver),window.addEventListener("mouseup",onMouseUp);function onMouseOver(event2){event2.buttons!==1&&onMouseUp()}function onMouseUp(){window.removeEventListener("mouseover",onMouseOver),window.removeEventListener("mouseup",onMouseUp),setDragging(!1),handleDragEnd()}}function handleDragEnd(){const overRowIdx=latestDraggedOverRowIdx.current;if(overRowIdx===void 0)return;const startRowIndex=rowIdx<overRowIdx?rowIdx+1:overRowIdx,endRowIndex=rowIdx<overRowIdx?overRowIdx+1:rowIdx;updateRows(startRowIndex,endRowIndex),setDraggedOverRowIdx(void 0)}function handleDoubleClick(event){event.stopPropagation(),updateRows(rowIdx+1,rows.length)}function updateRows(startRowIdx,endRowIdx){const sourceRow=rows[rowIdx],updatedRows=[...rows],indexes=[];for(let i2=startRowIdx;i2<endRowIdx;i2++)if(isCellEditable({rowIdx:i2,idx})){const updatedRow=onFill({columnKey:column.key,sourceRow,targetRow:rows[i2]});updatedRow!==rows[i2]&&(updatedRows[i2]=updatedRow,indexes.push(i2))}indexes.length>0&&(onRowsChange==null||onRowsChange(updatedRows,{indexes,column}))}function getStyle(){var _a;const colSpan=((_a=column.colSpan)==null?void 0:_a.call(column,{type:"ROW",row:rows[rowIdx]}))??1,{insetInlineStart,...style}=getCellStyle(column,colSpan),marginEnd="calc(var(--rdg-drag-handle-size) * -0.5 + 1px)",isLastColumn=column.idx+colSpan-1===maxColIdx;return{...style,gridRowStart,marginInlineEnd:isLastColumn?void 0:marginEnd,marginBlockEnd:isLastRow?void 0:marginEnd,insetInlineStart:insetInlineStart?`calc(${insetInlineStart} + ${columnWidth}px + var(--rdg-drag-handle-size) * -0.5 - 1px)`:void 0}}return u$1("div",{style:getStyle(),className:clsx(cellDragHandleClassname,column.frozen&&cellDragHandleFrozenClassname),onClick,onMouseDown:handleMouseDown,onDoubleClick:handleDoubleClick})}const cellEditing="cis5rrm7-0-0-beta-47";function EditCell({column,colSpan,row:row2,rowIdx,onRowChange,closeEditor,onKeyDown,navigate}){var _a,_b,_c;const frameRequestRef=A$1(void 0),commitOnOutsideClick=((_a=column.editorOptions)==null?void 0:_a.commitOnOutsideClick)!==!1,commitOnOutsideMouseDown=useLatestFunc(()=>{onClose(!0,!1)});y(()=>{if(!commitOnOutsideClick)return;function onWindowCaptureMouseDown(){frameRequestRef.current=requestAnimationFrame(commitOnOutsideMouseDown)}return addEventListener("mousedown",onWindowCaptureMouseDown,{capture:!0}),()=>{removeEventListener("mousedown",onWindowCaptureMouseDown,{capture:!0}),cancelFrameRequest()}},[commitOnOutsideClick,commitOnOutsideMouseDown]);function cancelFrameRequest(){cancelAnimationFrame(frameRequestRef.current)}function handleKeyDown(event){if(onKeyDown){const cellEvent=createCellEvent(event);if(onKeyDown({mode:"EDIT",row:row2,column,rowIdx,navigate(){navigate(event)},onClose},cellEvent),cellEvent.isGridDefaultPrevented())return}event.key==="Escape"?onClose():event.key==="Enter"?onClose(!0):onEditorNavigation(event)&&navigate(event)}function onClose(commitChanges=!1,shouldFocusCell=!0){commitChanges?onRowChange(row2,!0,shouldFocusCell):closeEditor(shouldFocusCell)}function onEditorRowChange(row3,commitChangesAndFocus=!1){onRowChange(row3,commitChangesAndFocus,commitChangesAndFocus)}const{cellClass}=column,className=getCellClassname(column,"rdg-editor-container",typeof cellClass=="function"?cellClass(row2):cellClass,!((_b=column.editorOptions)!=null&&_b.displayCellContent)&&cellEditing);return u$1("div",{role:"gridcell","aria-colindex":column.idx+1,"aria-colspan":colSpan,"aria-selected":!0,className,style:getCellStyle(column,colSpan),onKeyDown:handleKeyDown,onMouseDownCapture:cancelFrameRequest,children:column.renderEditCell!=null&&u$1(b,{children:[column.renderEditCell({column,row:row2,rowIdx,onRowChange:onEditorRowChange,onClose}),((_c=column.editorOptions)==null?void 0:_c.displayCellContent)&&column.renderCell({column,row:row2,rowIdx,isCellEditable:!0,tabIndex:-1,onRowChange:onEditorRowChange})]})})}function GroupedColumnHeaderCell({column,rowIdx,isCellSelected,selectCell}){const{tabIndex,onFocus}=useRovingTabIndex(isCellSelected),{colSpan}=column,rowSpan=getHeaderCellRowSpan(column,rowIdx),index=column.idx+1;function onClick(){selectCell({idx:column.idx,rowIdx})}return u$1("div",{role:"columnheader","aria-colindex":index,"aria-colspan":colSpan,"aria-rowspan":rowSpan,"aria-selected":isCellSelected,tabIndex,className:clsx(cellClassname,column.headerCellClass),style:{...getHeaderCellStyle(column,rowIdx,rowSpan),gridColumnStart:index,gridColumnEnd:index+colSpan},onFocus,onClick,children:column.name})}const headerSortCellClassname="h44jtk67-0-0-beta-47",headerSortName="hcgkhxz7-0-0-beta-47",headerSortNameClassname=`rdg-header-sort-name ${headerSortName}`;function renderHeaderCell({column,sortDirection,priority}){return column.sortable?u$1(SortableHeaderCell,{sortDirection,priority,children:column.name}):column.name}function SortableHeaderCell({sortDirection,priority,children}){const renderSortStatus2=useDefaultRenderers().renderSortStatus;return u$1("span",{className:headerSortCellClassname,children:[u$1("span",{className:headerSortNameClassname,children}),u$1("span",{children:renderSortStatus2({sortDirection,priority})})]})}const cellSortableClassname="c6l2wv17-0-0-beta-47",cellResizable="c1kqdw7y7-0-0-beta-47",cellResizableClassname=`rdg-cell-resizable ${cellResizable}`,resizeHandleClassname="r1y6ywlx7-0-0-beta-47",cellDraggableClassname="rdg-cell-draggable",cellDragging="c1bezg5o7-0-0-beta-47",cellDraggingClassname=`rdg-cell-dragging ${cellDragging}`,cellOver="c1vc96037-0-0-beta-47",cellOverClassname=`rdg-cell-drag-over ${cellOver}`;function HeaderCell({column,colSpan,rowIdx,isCellSelected,onColumnResize,onColumnsReorder,sortColumns,onSortColumnsChange,selectCell,shouldFocusGrid,direction,dragDropKey}){const[isDragging,setIsDragging]=h(!1),[isOver,setIsOver]=h(!1),isRtl=direction==="rtl",rowSpan=getHeaderCellRowSpan(column,rowIdx),{tabIndex,childTabIndex,onFocus}=useRovingTabIndex(isCellSelected),sortIndex=sortColumns==null?void 0:sortColumns.findIndex(sort=>sort.columnKey===column.key),sortColumn=sortIndex!==void 0&&sortIndex>-1?sortColumns[sortIndex]:void 0,sortDirection=sortColumn==null?void 0:sortColumn.direction,priority=sortColumn!==void 0&&sortColumns.length>1?sortIndex+1:void 0,ariaSort=sortDirection&&!priority?sortDirection==="ASC"?"ascending":"descending":void 0,{sortable,resizable,draggable}=column,className=getCellClassname(column,column.headerCellClass,sortable&&cellSortableClassname,resizable&&cellResizableClassname,draggable&&cellDraggableClassname,isDragging&&cellDraggingClassname,isOver&&cellOverClassname),renderHeaderCell$1=column.renderHeaderCell??renderHeaderCell;function onPointerDown(event){if(event.pointerType==="mouse"&&event.buttons!==1)return;event.preventDefault();const{currentTarget,pointerId}=event,headerCell=currentTarget.parentElement,{right,left}=headerCell.getBoundingClientRect(),offset=isRtl?event.clientX-left:right-event.clientX;let hasDoubleClicked=!1;function onPointerMove(event2){const{width,right:right2,left:left2}=headerCell.getBoundingClientRect();let newWidth=isRtl?right2+offset-event2.clientX:event2.clientX+offset-left2;newWidth=clampColumnWidth(newWidth,column),width>0&&newWidth!==width&&onColumnResize(column,newWidth)}function onDoubleClick(){hasDoubleClicked=!0,onColumnResize(column,"max-content")}function onLostPointerCapture(event2){hasDoubleClicked||onPointerMove(event2),currentTarget.removeEventListener("pointermove",onPointerMove),currentTarget.removeEventListener("dblclick",onDoubleClick),currentTarget.removeEventListener("lostpointercapture",onLostPointerCapture)}currentTarget.setPointerCapture(pointerId),currentTarget.addEventListener("pointermove",onPointerMove),currentTarget.addEventListener("dblclick",onDoubleClick),currentTarget.addEventListener("lostpointercapture",onLostPointerCapture)}function onSort(ctrlClick){if(onSortColumnsChange==null)return;const{sortDescendingFirst}=column;if(sortColumn===void 0){const nextSort={columnKey:column.key,direction:sortDescendingFirst?"DESC":"ASC"};onSortColumnsChange(sortColumns&&ctrlClick?[...sortColumns,nextSort]:[nextSort])}else{let nextSortColumn;if((sortDescendingFirst===!0&&sortDirection==="DESC"||sortDescendingFirst!==!0&&sortDirection==="ASC")&&(nextSortColumn={columnKey:column.key,direction:sortDirection==="ASC"?"DESC":"ASC"}),ctrlClick){const nextSortColumns=[...sortColumns];nextSortColumn?nextSortColumns[sortIndex]=nextSortColumn:nextSortColumns.splice(sortIndex,1),onSortColumnsChange(nextSortColumns)}else onSortColumnsChange(nextSortColumn?[nextSortColumn]:[])}}function onClick(event){selectCell({idx:column.idx,rowIdx}),sortable&&onSort(event.ctrlKey||event.metaKey)}function handleFocus(event){onFocus==null||onFocus(event),shouldFocusGrid&&selectCell({idx:0,rowIdx})}function onKeyDown(event){(event.key===" "||event.key==="Enter")&&(event.preventDefault(),onSort(event.ctrlKey||event.metaKey))}function onDragStart(event){event.dataTransfer.setData(dragDropKey,column.key),event.dataTransfer.dropEffect="move",setIsDragging(!0)}function onDragEnd(){setIsDragging(!1)}function onDragOver(event){event.preventDefault(),event.dataTransfer.dropEffect="move"}function onDrop(event){if(setIsOver(!1),event.dataTransfer.types.includes(dragDropKey.toLowerCase())){const sourceKey=event.dataTransfer.getData(dragDropKey.toLowerCase());sourceKey!==column.key&&(event.preventDefault(),onColumnsReorder==null||onColumnsReorder(sourceKey,column.key))}}function onDragEnter(event){isEventPertinent(event)&&setIsOver(!0)}function onDragLeave(event){isEventPertinent(event)&&setIsOver(!1)}let draggableProps;return draggable&&(draggableProps={draggable:!0,onDragStart,onDragEnd,onDragOver,onDragEnter,onDragLeave,onDrop}),u$1("div",{role:"columnheader","aria-colindex":column.idx+1,"aria-colspan":colSpan,"aria-rowspan":rowSpan,"aria-selected":isCellSelected,"aria-sort":ariaSort,tabIndex:shouldFocusGrid?0:tabIndex,className,style:{...getHeaderCellStyle(column,rowIdx,rowSpan),...getCellStyle(column,colSpan)},onFocus:handleFocus,onClick,onKeyDown:sortable?onKeyDown:void 0,...draggableProps,children:[renderHeaderCell$1({column,sortDirection,priority,tabIndex:childTabIndex}),resizable&&u$1("div",{className:resizeHandleClassname,onClick:stopPropagation,onPointerDown})]})}function isEventPertinent(event){const relatedTarget=event.relatedTarget;return!event.currentTarget.contains(relatedTarget)}const row="r1upfr807-0-0-beta-47",rowClassname=`rdg-row ${row}`,rowSelected="r190mhd37-0-0-beta-47",rowSelectedClassname="rdg-row-selected",rowSelectedWithFrozenCell="r139qu9m7-0-0-beta-47",topSummaryRowClassname="rdg-top-summary-row",bottomSummaryRowClassname="rdg-bottom-summary-row",headerRow="h10tskcx7-0-0-beta-47",headerRowClassname=`rdg-header-row ${headerRow}`;function HeaderRow({rowIdx,columns,onColumnResize,onColumnsReorder,sortColumns,onSortColumnsChange,lastFrozenColumnIndex,selectedCellIdx,selectCell,shouldFocusGrid,direction}){const dragDropKey=g$1(),cells=[];for(let index=0;index<columns.length;index++){const column=columns[index],colSpan=getColSpan(column,lastFrozenColumnIndex,{type:"HEADER"});colSpan!==void 0&&(index+=colSpan-1),cells.push(u$1(HeaderCell,{column,colSpan,rowIdx,isCellSelected:selectedCellIdx===column.idx,onColumnResize,onColumnsReorder,onSortColumnsChange,sortColumns,selectCell,shouldFocusGrid:shouldFocusGrid&&index===0,direction,dragDropKey},column.key))}return u$1("div",{role:"row","aria-rowindex":rowIdx,className:clsx(headerRowClassname,selectedCellIdx===-1&&rowSelectedClassname),children:cells})}const HeaderRow$1=N(HeaderRow);function GroupedColumnHeaderRow({rowIdx,level,columns,selectedCellIdx,selectCell}){const cells=[],renderedParents=new Set;for(const column of columns){let{parent}=column;if(parent!==void 0){for(;parent.level>level&&parent.parent!==void 0;)parent=parent.parent;if(parent.level===level&&!renderedParents.has(parent)){renderedParents.add(parent);const{idx}=parent;cells.push(u$1(GroupedColumnHeaderCell,{column:parent,rowIdx,isCellSelected:selectedCellIdx===idx,selectCell},idx))}}}return u$1("div",{role:"row","aria-rowindex":rowIdx,className:headerRowClassname,children:cells})}const GroupedColumnHeaderRow$1=N(GroupedColumnHeaderRow),cellCopied="c6ra8a37-0-0-beta-47",cellCopiedClassname=`rdg-cell-copied ${cellCopied}`,cellDraggedOver="cq910m07-0-0-beta-47",cellDraggedOverClassname=`rdg-cell-dragged-over ${cellDraggedOver}`;function Cell$1({column,colSpan,isCellSelected,isCopied,isDraggedOver,row:row2,rowIdx,onClick,onDoubleClick,onContextMenu,onRowChange,selectCell,...props}){const{tabIndex,childTabIndex,onFocus}=useRovingTabIndex(isCellSelected),{cellClass}=column,className=getCellClassname(column,typeof cellClass=="function"?cellClass(row2):cellClass,isCopied&&cellCopiedClassname,isDraggedOver&&cellDraggedOverClassname),isEditable=isCellEditableUtil(column,row2);function selectCellWrapper(openEditor){selectCell({rowIdx,idx:column.idx},openEditor)}function handleClick(event){if(onClick){const cellEvent=createCellEvent(event);if(onClick({row:row2,column,selectCell:selectCellWrapper},cellEvent),cellEvent.isGridDefaultPrevented())return}selectCellWrapper()}function handleContextMenu(event){if(onContextMenu){const cellEvent=createCellEvent(event);if(onContextMenu({row:row2,column,selectCell:selectCellWrapper},cellEvent),cellEvent.isGridDefaultPrevented())return}selectCellWrapper()}function handleDoubleClick(event){if(onDoubleClick){const cellEvent=createCellEvent(event);if(onDoubleClick({row:row2,column,selectCell:selectCellWrapper},cellEvent),cellEvent.isGridDefaultPrevented())return}selectCellWrapper(!0)}function handleRowChange(newRow){onRowChange(column,newRow)}return u$1("div",{role:"gridcell","aria-colindex":column.idx+1,"aria-colspan":colSpan,"aria-selected":isCellSelected,"aria-readonly":!isEditable||void 0,tabIndex,className,style:getCellStyle(column,colSpan),onClick:handleClick,onDoubleClick:handleDoubleClick,onContextMenu:handleContextMenu,onFocus,...props,children:column.renderCell({column,row:row2,rowIdx,isCellEditable:isEditable,tabIndex:childTabIndex,onRowChange:handleRowChange})})}const Cell$1$1=N(Cell$1);function Row({className,rowIdx,gridRowStart,selectedCellIdx,isRowSelectionDisabled,isRowSelected,copiedCellIdx,draggedOverCellIdx,lastFrozenColumnIndex,row:row2,viewportColumns,selectedCellEditor,onCellClick,onCellDoubleClick,onCellContextMenu,rowClass,setDraggedOverRowIdx,onMouseEnter,onRowChange,selectCell,...props},ref){const handleRowChange=useLatestFunc((column,newRow)=>{onRowChange(column,rowIdx,newRow)});function handleDragEnter(event){setDraggedOverRowIdx==null||setDraggedOverRowIdx(rowIdx),onMouseEnter==null||onMouseEnter(event)}className=clsx(rowClassname,`rdg-row-${rowIdx%2===0?"even":"odd"}`,rowClass==null?void 0:rowClass(row2,rowIdx),className,selectedCellIdx===-1&&rowSelectedClassname);const cells=[];for(let index=0;index<viewportColumns.length;index++){const column=viewportColumns[index],{idx}=column,colSpan=getColSpan(column,lastFrozenColumnIndex,{type:"ROW",row:row2});colSpan!==void 0&&(index+=colSpan-1);const isCellSelected=selectedCellIdx===idx;isCellSelected&&selectedCellEditor?cells.push(selectedCellEditor):cells.push(u$1(Cell$1$1,{column,colSpan,row:row2,rowIdx,isCopied:copiedCellIdx===idx,isDraggedOver:draggedOverCellIdx===idx,isCellSelected,onClick:onCellClick,onDoubleClick:onCellDoubleClick,onContextMenu:onCellContextMenu,onRowChange:handleRowChange,selectCell},column.key))}const selectionValue=T$1(()=>({isRowSelected,isRowSelectionDisabled}),[isRowSelectionDisabled,isRowSelected]);return u$1(RowSelectionProvider,{value:selectionValue,children:u$1("div",{role:"row",ref,className,onMouseEnter:handleDragEnter,style:getRowStyle(gridRowStart),...props,children:cells})})}const RowComponent=N(A(Row));function defaultRenderRow(key,props){return u$1(RowComponent,{...props},key)}function ScrollToCell({scrollToPosition:{idx,rowIdx},gridElement,setScrollToCellPosition}){const ref=A$1(null);return useLayoutEffect(()=>{scrollIntoView(ref.current)}),useLayoutEffect(()=>{function removeScrollToCell(){setScrollToCellPosition(null)}const observer=new IntersectionObserver(removeScrollToCell,{root:gridElement,threshold:1});return observer.observe(ref.current),()=>{observer.disconnect()}},[gridElement,setScrollToCellPosition]),u$1("div",{ref,style:{gridColumn:idx===void 0?"1/-1":idx+1,gridRow:rowIdx===void 0?"1/-1":rowIdx+2}})}const arrow="a3ejtar7-0-0-beta-47",arrowClassname=`rdg-sort-arrow ${arrow}`;function renderSortStatus({sortDirection,priority}){return u$1(b,{children:[renderSortIcon({sortDirection}),renderSortPriority({priority})]})}function renderSortIcon({sortDirection}){return sortDirection===void 0?null:u$1("svg",{viewBox:"0 0 12 8",width:"12",height:"8",className:arrowClassname,"aria-hidden":!0,children:u$1("path",{d:sortDirection==="ASC"?"M0 8 6 0 12 8":"M0 0 6 8 12 0"})})}function renderSortPriority({priority}){return priority}const root="rnvodz57-0-0-beta-47",rootClassname=`rdg ${root}`,viewportDragging="vlqv91k7-0-0-beta-47",viewportDraggingClassname=`rdg-viewport-dragging ${viewportDragging}`,focusSinkClassname="f1lsfrzw7-0-0-beta-47",focusSinkHeaderAndSummaryClassname="f1cte0lg7-0-0-beta-47",summaryCellClassname="s8wc6fl7-0-0-beta-47";function SummaryCell({column,colSpan,row:row2,rowIdx,isCellSelected,selectCell}){var _a;const{tabIndex,childTabIndex,onFocus}=useRovingTabIndex(isCellSelected),{summaryCellClass}=column,className=getCellClassname(column,summaryCellClassname,typeof summaryCellClass=="function"?summaryCellClass(row2):summaryCellClass);function onClick(){selectCell({rowIdx,idx:column.idx})}return u$1("div",{role:"gridcell","aria-colindex":column.idx+1,"aria-colspan":colSpan,"aria-selected":isCellSelected,tabIndex,className,style:getCellStyle(column,colSpan),onClick,onFocus,children:(_a=column.renderSummaryCell)==null?void 0:_a.call(column,{column,row:row2,tabIndex:childTabIndex})})}const SummaryCell$1=N(SummaryCell),summaryRow="skuhp557-0-0-beta-47",topSummaryRow="tf8l5ub7-0-0-beta-47",summaryRowClassname=`rdg-summary-row ${summaryRow}`;function SummaryRow({rowIdx,gridRowStart,row:row2,viewportColumns,top,bottom,lastFrozenColumnIndex,selectedCellIdx,isTop,selectCell,"aria-rowindex":ariaRowIndex}){const cells=[];for(let index=0;index<viewportColumns.length;index++){const column=viewportColumns[index],colSpan=getColSpan(column,lastFrozenColumnIndex,{type:"SUMMARY",row:row2});colSpan!==void 0&&(index+=colSpan-1);const isCellSelected=selectedCellIdx===column.idx;cells.push(u$1(SummaryCell$1,{column,colSpan,row:row2,rowIdx,isCellSelected,selectCell},column.key))}return u$1("div",{role:"row","aria-rowindex":ariaRowIndex,className:clsx(rowClassname,`rdg-row-${rowIdx%2===0?"even":"odd"}`,summaryRowClassname,isTop?`${topSummaryRowClassname} ${topSummaryRow}`:bottomSummaryRowClassname,selectedCellIdx===-1&&rowSelectedClassname),style:{...getRowStyle(gridRowStart),"--rdg-summary-row-top":top!==void 0?`${top}px`:void 0,"--rdg-summary-row-bottom":bottom!==void 0?`${bottom}px`:void 0},children:cells})}const SummaryRow$1=N(SummaryRow);function DataGrid(props,ref){const{columns:rawColumns,rows,topSummaryRows,bottomSummaryRows,rowKeyGetter,onRowsChange,rowHeight:rawRowHeight,headerRowHeight:rawHeaderRowHeight,summaryRowHeight:rawSummaryRowHeight,selectedRows,isRowSelectionDisabled,onSelectedRowsChange,sortColumns,onSortColumnsChange,defaultColumnOptions,onCellClick,onCellDoubleClick,onCellContextMenu,onCellKeyDown,onSelectedCellChange,onScroll,onColumnResize,onColumnsReorder,onFill,onCopy,onPaste,enableVirtualization:rawEnableVirtualization,renderers,className,style,rowClass,direction:rawDirection,role:rawRole,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,"aria-describedby":ariaDescribedBy,"aria-rowcount":rawAriaRowCount,"data-testid":testId}=props,defaultRenderers=useDefaultRenderers(),role=rawRole??"grid",rowHeight=rawRowHeight??35,headerRowHeight=rawHeaderRowHeight??(typeof rowHeight=="number"?rowHeight:35),summaryRowHeight=rawSummaryRowHeight??(typeof rowHeight=="number"?rowHeight:35),renderRow=(renderers==null?void 0:renderers.renderRow)??(defaultRenderers==null?void 0:defaultRenderers.renderRow)??defaultRenderRow,renderSortStatus$1=(renderers==null?void 0:renderers.renderSortStatus)??(defaultRenderers==null?void 0:defaultRenderers.renderSortStatus)??renderSortStatus,renderCheckbox$1=(renderers==null?void 0:renderers.renderCheckbox)??(defaultRenderers==null?void 0:defaultRenderers.renderCheckbox)??renderCheckbox,noRowsFallback=(renderers==null?void 0:renderers.noRowsFallback)??(defaultRenderers==null?void 0:defaultRenderers.noRowsFallback),enableVirtualization=rawEnableVirtualization??!0,direction=rawDirection??"ltr",[scrollTop,setScrollTop]=h(0),[scrollLeft,setScrollLeft]=h(0),[resizedColumnWidths,setResizedColumnWidths]=h(()=>new Map),[measuredColumnWidths,setMeasuredColumnWidths]=h(()=>new Map),[copiedCell,setCopiedCell]=h(null),[isDragging,setDragging]=h(!1),[draggedOverRowIdx,setOverRowIdx]=h(void 0),[scrollToPosition,setScrollToPosition]=h(null),getColumnWidth=q$1(column=>resizedColumnWidths.get(column.key)??measuredColumnWidths.get(column.key)??column.width,[measuredColumnWidths,resizedColumnWidths]),[gridRef,gridWidth,gridHeight,horizontalScrollbarHeight]=useGridDimensions(),{columns,colSpanColumns,lastFrozenColumnIndex,headerRowsCount,colOverscanStartIdx,colOverscanEndIdx,templateColumns,layoutCssVars,totalFrozenColumnWidth}=useCalculatedColumns({rawColumns,defaultColumnOptions,getColumnWidth,scrollLeft,viewportWidth:gridWidth,enableVirtualization}),topSummaryRowsCount=(topSummaryRows==null?void 0:topSummaryRows.length)??0,bottomSummaryRowsCount=(bottomSummaryRows==null?void 0:bottomSummaryRows.length)??0,summaryRowsCount=topSummaryRowsCount+bottomSummaryRowsCount,headerAndTopSummaryRowsCount=headerRowsCount+topSummaryRowsCount,groupedColumnHeaderRowsCount=headerRowsCount-1,minRowIdx=-headerAndTopSummaryRowsCount,mainHeaderRowIdx=minRowIdx+groupedColumnHeaderRowsCount,maxRowIdx=rows.length+bottomSummaryRowsCount-1,[selectedPosition,setSelectedPosition]=h(()=>({idx:-1,rowIdx:minRowIdx-1,mode:"SELECT"})),prevSelectedPosition=A$1(selectedPosition),latestDraggedOverRowIdx=A$1(draggedOverRowIdx),lastSelectedRowIdx=A$1(-1),focusSinkRef=A$1(null),shouldFocusCellRef=A$1(!1),isTreeGrid=role==="treegrid",headerRowsHeight=headerRowsCount*headerRowHeight,summaryRowsHeight=summaryRowsCount*summaryRowHeight,clientHeight=gridHeight-headerRowsHeight-summaryRowsHeight,isSelectable=selectedRows!=null&&onSelectedRowsChange!=null,isRtl=direction==="rtl",leftKey=isRtl?"ArrowRight":"ArrowLeft",rightKey=isRtl?"ArrowLeft":"ArrowRight",ariaRowCount=rawAriaRowCount??headerRowsCount+rows.length+summaryRowsCount,defaultGridComponents=T$1(()=>({renderCheckbox:renderCheckbox$1,renderSortStatus:renderSortStatus$1}),[renderCheckbox$1,renderSortStatus$1]),headerSelectionValue=T$1(()=>{let hasSelectedRow=!1,hasUnselectedRow=!1;if(rowKeyGetter!=null&&selectedRows!=null&&selectedRows.size>0){for(const row2 of rows)if(selectedRows.has(rowKeyGetter(row2))?hasSelectedRow=!0:hasUnselectedRow=!0,hasSelectedRow&&hasUnselectedRow)break}return{isRowSelected:hasSelectedRow&&!hasUnselectedRow,isIndeterminate:hasSelectedRow&&hasUnselectedRow}},[rows,selectedRows,rowKeyGetter]),{rowOverscanStartIdx,rowOverscanEndIdx,totalRowHeight,gridTemplateRows,getRowTop,getRowHeight,findRowIdx}=useViewportRows({rows,rowHeight,clientHeight,scrollTop,enableVirtualization}),viewportColumns=useViewportColumns({columns,colSpanColumns,colOverscanStartIdx,colOverscanEndIdx,lastFrozenColumnIndex,rowOverscanStartIdx,rowOverscanEndIdx,rows,topSummaryRows,bottomSummaryRows}),{gridTemplateColumns,handleColumnResize}=useColumnWidths(columns,viewportColumns,templateColumns,gridRef,gridWidth,resizedColumnWidths,measuredColumnWidths,setResizedColumnWidths,setMeasuredColumnWidths,onColumnResize),minColIdx=isTreeGrid?-1:0,maxColIdx=columns.length-1,selectedCellIsWithinSelectionBounds=isCellWithinSelectionBounds(selectedPosition),selectedCellIsWithinViewportBounds=isCellWithinViewportBounds(selectedPosition),scrollHeight=headerRowHeight+totalRowHeight+summaryRowsHeight+horizontalScrollbarHeight,handleColumnResizeLatest=useLatestFunc(handleColumnResize),onColumnsReorderLastest=useLatestFunc(onColumnsReorder),onSortColumnsChangeLatest=useLatestFunc(onSortColumnsChange),onCellClickLatest=useLatestFunc(onCellClick),onCellDoubleClickLatest=useLatestFunc(onCellDoubleClick),onCellContextMenuLatest=useLatestFunc(onCellContextMenu),selectHeaderRowLatest=useLatestFunc(selectHeaderRow),selectRowLatest=useLatestFunc(selectRow),handleFormatterRowChangeLatest=useLatestFunc(updateRow),selectCellLatest=useLatestFunc(selectCell),selectHeaderCellLatest=useLatestFunc(({idx,rowIdx})=>{selectCell({rowIdx:minRowIdx+rowIdx-1,idx})});useLayoutEffect(()=>{if(!selectedCellIsWithinSelectionBounds||isSamePosition(selectedPosition,prevSelectedPosition.current)){prevSelectedPosition.current=selectedPosition;return}prevSelectedPosition.current=selectedPosition,selectedPosition.idx===-1&&(focusSinkRef.current.focus({preventScroll:!0}),scrollIntoView(focusSinkRef.current))}),useLayoutEffect(()=>{shouldFocusCellRef.current&&(shouldFocusCellRef.current=!1,focusCellOrCellContent())}),F$1(ref,()=>({element:gridRef.current,scrollToCell({idx,rowIdx}){const scrollToIdx=idx!==void 0&&idx>lastFrozenColumnIndex&&idx<columns.length?idx:void 0,scrollToRowIdx=rowIdx!==void 0&&isRowIdxWithinViewportBounds(rowIdx)?rowIdx:void 0;(scrollToIdx!==void 0||scrollToRowIdx!==void 0)&&setScrollToPosition({idx:scrollToIdx,rowIdx:scrollToRowIdx})},selectCell}));const setDraggedOverRowIdx=q$1(rowIdx=>{setOverRowIdx(rowIdx),latestDraggedOverRowIdx.current=rowIdx},[]);function selectHeaderRow(args){if(!onSelectedRowsChange)return;assertIsValidKeyGetter(rowKeyGetter);const newSelectedRows=new Set(selectedRows);for(const row2 of rows){if((isRowSelectionDisabled==null?void 0:isRowSelectionDisabled(row2))===!0)continue;const rowKey=rowKeyGetter(row2);args.checked?newSelectedRows.add(rowKey):newSelectedRows.delete(rowKey)}onSelectedRowsChange(newSelectedRows)}function selectRow(args){if(!onSelectedRowsChange)return;assertIsValidKeyGetter(rowKeyGetter);const{row:row2,checked,isShiftClick}=args;if((isRowSelectionDisabled==null?void 0:isRowSelectionDisabled(row2))===!0)return;const newSelectedRows=new Set(selectedRows),rowKey=rowKeyGetter(row2),previousRowIdx=lastSelectedRowIdx.current,rowIdx=rows.indexOf(row2);if(lastSelectedRowIdx.current=rowIdx,checked?newSelectedRows.add(rowKey):newSelectedRows.delete(rowKey),isShiftClick&&previousRowIdx!==-1&&previousRowIdx!==rowIdx&&previousRowIdx<rows.length){const step=sign(rowIdx-previousRowIdx);for(let i2=previousRowIdx+step;i2!==rowIdx;i2+=step){const row3=rows[i2];(isRowSelectionDisabled==null?void 0:isRowSelectionDisabled(row3))!==!0&&(checked?newSelectedRows.add(rowKeyGetter(row3)):newSelectedRows.delete(rowKeyGetter(row3)))}}onSelectedRowsChange(newSelectedRows)}function handleKeyDown(event){var _a;const{idx,rowIdx,mode}=selectedPosition;if(mode==="EDIT")return;if(onCellKeyDown&&isRowIdxWithinViewportBounds(rowIdx)){const row2=rows[rowIdx],cellEvent=createCellEvent(event);if(onCellKeyDown({mode:"SELECT",row:row2,column:columns[idx],rowIdx,selectCell},cellEvent),cellEvent.isGridDefaultPrevented())return}if(!(event.target instanceof Element))return;const isCellEvent=event.target.closest(".rdg-cell")!==null,isRowEvent=isTreeGrid&&event.target===focusSinkRef.current;if(!isCellEvent&&!isRowEvent)return;const{keyCode}=event;if(selectedCellIsWithinViewportBounds&&(onPaste!=null||onCopy!=null)&&isCtrlKeyHeldDown(event)){if(keyCode===67){if(((_a=window.getSelection())==null?void 0:_a.isCollapsed)===!1)return;handleCopy();return}if(keyCode===86){handlePaste();return}}switch(event.key){case"Escape":setCopiedCell(null);return;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Tab":case"Home":case"End":case"PageUp":case"PageDown":navigate(event);break;default:handleCellInput(event);break}}function handleScroll(event){const{scrollTop:scrollTop2,scrollLeft:scrollLeft2}=event.currentTarget;gn(()=>{setScrollTop(scrollTop2),setScrollLeft(abs(scrollLeft2))}),onScroll==null||onScroll(event)}function updateRow(column,rowIdx,row2){if(typeof onRowsChange!="function"||row2===rows[rowIdx])return;const updatedRows=[...rows];updatedRows[rowIdx]=row2,onRowsChange(updatedRows,{indexes:[rowIdx],column})}function commitEditorChanges(){selectedPosition.mode==="EDIT"&&updateRow(columns[selectedPosition.idx],selectedPosition.rowIdx,selectedPosition.row)}function handleCopy(){const{idx,rowIdx}=selectedPosition,sourceRow=rows[rowIdx],sourceColumnKey=columns[idx].key;setCopiedCell({row:sourceRow,columnKey:sourceColumnKey}),onCopy==null||onCopy({sourceRow,sourceColumnKey})}function handlePaste(){if(!onPaste||!onRowsChange||copiedCell===null||!isCellEditable(selectedPosition))return;const{idx,rowIdx}=selectedPosition,targetColumn=columns[idx],targetRow=rows[rowIdx],updatedTargetRow=onPaste({sourceRow:copiedCell.row,sourceColumnKey:copiedCell.columnKey,targetRow,targetColumnKey:targetColumn.key});updateRow(targetColumn,rowIdx,updatedTargetRow)}function handleCellInput(event){if(!selectedCellIsWithinViewportBounds)return;const row2=rows[selectedPosition.rowIdx],{key,shiftKey}=event;if(isSelectable&&shiftKey&&key===" "){assertIsValidKeyGetter(rowKeyGetter);const rowKey=rowKeyGetter(row2);selectRow({row:row2,checked:!selectedRows.has(rowKey),isShiftClick:!1}),event.preventDefault();return}isCellEditable(selectedPosition)&&isDefaultCellInput(event)&&setSelectedPosition(({idx,rowIdx})=>({idx,rowIdx,mode:"EDIT",row:row2,originalRow:row2}))}function isColIdxWithinSelectionBounds(idx){return idx>=minColIdx&&idx<=maxColIdx}function isRowIdxWithinViewportBounds(rowIdx){return rowIdx>=0&&rowIdx<rows.length}function isCellWithinSelectionBounds({idx,rowIdx}){return rowIdx>=minRowIdx&&rowIdx<=maxRowIdx&&isColIdxWithinSelectionBounds(idx)}function isCellWithinEditBounds({idx,rowIdx}){return isRowIdxWithinViewportBounds(rowIdx)&&idx>=0&&idx<=maxColIdx}function isCellWithinViewportBounds({idx,rowIdx}){return isRowIdxWithinViewportBounds(rowIdx)&&isColIdxWithinSelectionBounds(idx)}function isCellEditable(position){return isCellWithinEditBounds(position)&&isSelectedCellEditable({columns,rows,selectedPosition:position})}function selectCell(position,enableEditor){if(!isCellWithinSelectionBounds(position))return;commitEditorChanges();const row2=rows[position.rowIdx],samePosition=isSamePosition(selectedPosition,position);enableEditor&&isCellEditable(position)?setSelectedPosition({...position,mode:"EDIT",row:row2,originalRow:row2}):samePosition?scrollIntoView(getCellToScroll(gridRef.current)):(shouldFocusCellRef.current=!0,setSelectedPosition({...position,mode:"SELECT"})),onSelectedCellChange&&!samePosition&&onSelectedCellChange({rowIdx:position.rowIdx,row:row2,column:columns[position.idx]})}function getNextPosition(key,ctrlKey,shiftKey){const{idx,rowIdx}=selectedPosition,isRowSelected=selectedCellIsWithinSelectionBounds&&idx===-1;switch(key){case"ArrowUp":return{idx,rowIdx:rowIdx-1};case"ArrowDown":return{idx,rowIdx:rowIdx+1};case leftKey:return{idx:idx-1,rowIdx};case rightKey:return{idx:idx+1,rowIdx};case"Tab":return{idx:idx+(shiftKey?-1:1),rowIdx};case"Home":return isRowSelected?{idx,rowIdx:minRowIdx}:{idx:0,rowIdx:ctrlKey?minRowIdx:rowIdx};case"End":return isRowSelected?{idx,rowIdx:maxRowIdx}:{idx:maxColIdx,rowIdx:ctrlKey?maxRowIdx:rowIdx};case"PageUp":{if(selectedPosition.rowIdx===minRowIdx)return selectedPosition;const nextRowY=getRowTop(rowIdx)+getRowHeight(rowIdx)-clientHeight;return{idx,rowIdx:nextRowY>0?findRowIdx(nextRowY):0}}case"PageDown":{if(selectedPosition.rowIdx>=rows.length)return selectedPosition;const nextRowY=getRowTop(rowIdx)+clientHeight;return{idx,rowIdx:nextRowY<totalRowHeight?findRowIdx(nextRowY):rows.length-1}}default:return selectedPosition}}function navigate(event){const{key,shiftKey}=event;let cellNavigationMode="NONE";if(key==="Tab"){if(canExitGrid({shiftKey,maxColIdx,minRowIdx,maxRowIdx,selectedPosition})){commitEditorChanges();return}cellNavigationMode="CHANGE_ROW"}event.preventDefault();const ctrlKey=isCtrlKeyHeldDown(event),nextPosition=getNextPosition(key,ctrlKey,shiftKey);if(isSamePosition(selectedPosition,nextPosition))return;const nextSelectedCellPosition=getNextSelectedCellPosition({moveUp:key==="ArrowUp",moveNext:key===rightKey||key==="Tab"&&!shiftKey,columns,colSpanColumns,rows,topSummaryRows,bottomSummaryRows,minRowIdx,mainHeaderRowIdx,maxRowIdx,lastFrozenColumnIndex,cellNavigationMode,currentPosition:selectedPosition,nextPosition,isCellWithinBounds:isCellWithinSelectionBounds});selectCell(nextSelectedCellPosition)}function getDraggedOverCellIdx(currentRowIdx){if(draggedOverRowIdx===void 0)return;const{rowIdx}=selectedPosition;return(rowIdx<draggedOverRowIdx?rowIdx<currentRowIdx&&currentRowIdx<=draggedOverRowIdx:rowIdx>currentRowIdx&&currentRowIdx>=draggedOverRowIdx)?selectedPosition.idx:void 0}function focusCellOrCellContent(){const cell2=getCellToScroll(gridRef.current);cell2!==null&&(scrollIntoView(cell2),(cell2.querySelector('[tabindex="0"]')??cell2).focus({preventScroll:!0}))}function renderDragHandle(){if(onFill==null||selectedPosition.mode==="EDIT"||!isCellWithinViewportBounds(selectedPosition))return;const{idx,rowIdx}=selectedPosition,column=columns[idx];if(column.renderEditCell==null||column.editable===!1)return;const columnWidth=getColumnWidth(column);return u$1(DragHandle,{gridRowStart:headerAndTopSummaryRowsCount+rowIdx+1,rows,column,columnWidth,maxColIdx,isLastRow:rowIdx===maxRowIdx,selectedPosition,isCellEditable,latestDraggedOverRowIdx,onRowsChange,onClick:focusCellOrCellContent,onFill,setDragging,setDraggedOverRowIdx})}function getCellEditor(rowIdx){if(selectedPosition.rowIdx!==rowIdx||selectedPosition.mode==="SELECT")return;const{idx,row:row2}=selectedPosition,column=columns[idx],colSpan=getColSpan(column,lastFrozenColumnIndex,{type:"ROW",row:row2}),closeEditor=shouldFocusCell=>{shouldFocusCellRef.current=shouldFocusCell,setSelectedPosition(({idx:idx2,rowIdx:rowIdx2})=>({idx:idx2,rowIdx:rowIdx2,mode:"SELECT"}))},onRowChange=(row3,commitChanges,shouldFocusCell)=>{commitChanges?gn(()=>{updateRow(column,selectedPosition.rowIdx,row3),closeEditor(shouldFocusCell)}):setSelectedPosition(position=>({...position,row:row3}))};return rows[selectedPosition.rowIdx]!==selectedPosition.originalRow&&closeEditor(!1),u$1(EditCell,{column,colSpan,row:row2,rowIdx,onRowChange,closeEditor,onKeyDown:onCellKeyDown,navigate},column.key)}function getRowViewportColumns(rowIdx){const selectedColumn=selectedPosition.idx===-1?void 0:columns[selectedPosition.idx];return selectedColumn!==void 0&&selectedPosition.rowIdx===rowIdx&&!viewportColumns.includes(selectedColumn)?selectedPosition.idx>colOverscanEndIdx?[...viewportColumns,selectedColumn]:[...viewportColumns.slice(0,lastFrozenColumnIndex+1),selectedColumn,...viewportColumns.slice(lastFrozenColumnIndex+1)]:viewportColumns}function getViewportRows(){const rowElements=[],{idx:selectedIdx,rowIdx:selectedRowIdx}=selectedPosition,startRowIdx=selectedCellIsWithinViewportBounds&&selectedRowIdx<rowOverscanStartIdx?rowOverscanStartIdx-1:rowOverscanStartIdx,endRowIdx=selectedCellIsWithinViewportBounds&&selectedRowIdx>rowOverscanEndIdx?rowOverscanEndIdx+1:rowOverscanEndIdx;for(let viewportRowIdx=startRowIdx;viewportRowIdx<=endRowIdx;viewportRowIdx++){const isRowOutsideViewport=viewportRowIdx===rowOverscanStartIdx-1||viewportRowIdx===rowOverscanEndIdx+1,rowIdx=isRowOutsideViewport?selectedRowIdx:viewportRowIdx;let rowColumns=viewportColumns;const selectedColumn=selectedIdx===-1?void 0:columns[selectedIdx];selectedColumn!==void 0&&(isRowOutsideViewport?rowColumns=[selectedColumn]:rowColumns=getRowViewportColumns(rowIdx));const row2=rows[rowIdx],gridRowStart=headerAndTopSummaryRowsCount+rowIdx+1;let key=rowIdx,isRowSelected=!1;typeof rowKeyGetter=="function"&&(key=rowKeyGetter(row2),isRowSelected=(selectedRows==null?void 0:selectedRows.has(key))??!1),rowElements.push(renderRow(key,{"aria-rowindex":headerAndTopSummaryRowsCount+rowIdx+1,"aria-selected":isSelectable?isRowSelected:void 0,rowIdx,row:row2,viewportColumns:rowColumns,isRowSelectionDisabled:(isRowSelectionDisabled==null?void 0:isRowSelectionDisabled(row2))??!1,isRowSelected,onCellClick:onCellClickLatest,onCellDoubleClick:onCellDoubleClickLatest,onCellContextMenu:onCellContextMenuLatest,rowClass,gridRowStart,copiedCellIdx:copiedCell!==null&&copiedCell.row===row2?columns.findIndex(c2=>c2.key===copiedCell.columnKey):void 0,selectedCellIdx:selectedRowIdx===rowIdx?selectedIdx:void 0,draggedOverCellIdx:getDraggedOverCellIdx(rowIdx),setDraggedOverRowIdx:isDragging?setDraggedOverRowIdx:void 0,lastFrozenColumnIndex,onRowChange:handleFormatterRowChangeLatest,selectCell:selectCellLatest,selectedCellEditor:getCellEditor(rowIdx)}))}return rowElements}(selectedPosition.idx>maxColIdx||selectedPosition.rowIdx>maxRowIdx)&&(setSelectedPosition({idx:-1,rowIdx:minRowIdx-1,mode:"SELECT"}),setDraggedOverRowIdx(void 0));let templateRows=`repeat(${headerRowsCount}, ${headerRowHeight}px)`;topSummaryRowsCount>0&&(templateRows+=` repeat(${topSummaryRowsCount}, ${summaryRowHeight}px)`),rows.length>0&&(templateRows+=gridTemplateRows),bottomSummaryRowsCount>0&&(templateRows+=` repeat(${bottomSummaryRowsCount}, ${summaryRowHeight}px)`);const isGroupRowFocused=selectedPosition.idx===-1&&selectedPosition.rowIdx!==minRowIdx-1;return u$1("div",{role,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,"aria-describedby":ariaDescribedBy,"aria-multiselectable":isSelectable?!0:void 0,"aria-colcount":columns.length,"aria-rowcount":ariaRowCount,className:clsx(rootClassname,className,isDragging&&viewportDraggingClassname),style:{...style,scrollPaddingInlineStart:selectedPosition.idx>lastFrozenColumnIndex||(scrollToPosition==null?void 0:scrollToPosition.idx)!==void 0?`${totalFrozenColumnWidth}px`:void 0,scrollPaddingBlock:isRowIdxWithinViewportBounds(selectedPosition.rowIdx)||(scrollToPosition==null?void 0:scrollToPosition.rowIdx)!==void 0?`${headerRowsHeight+topSummaryRowsCount*summaryRowHeight}px ${bottomSummaryRowsCount*summaryRowHeight}px`:void 0,gridTemplateColumns,gridTemplateRows:templateRows,"--rdg-header-row-height":`${headerRowHeight}px`,"--rdg-scroll-height":`${scrollHeight}px`,...layoutCssVars},dir:direction,ref:gridRef,onScroll:handleScroll,onKeyDown:handleKeyDown,"data-testid":testId,children:[u$1(DataGridDefaultRenderersProvider,{value:defaultGridComponents,children:[u$1(HeaderRowSelectionChangeProvider,{value:selectHeaderRowLatest,children:u$1(HeaderRowSelectionProvider,{value:headerSelectionValue,children:[Array.from({length:groupedColumnHeaderRowsCount},(_2,index)=>u$1(GroupedColumnHeaderRow$1,{rowIdx:index+1,level:-groupedColumnHeaderRowsCount+index,columns:getRowViewportColumns(minRowIdx+index),selectedCellIdx:selectedPosition.rowIdx===minRowIdx+index?selectedPosition.idx:void 0,selectCell:selectHeaderCellLatest},index)),u$1(HeaderRow$1,{rowIdx:headerRowsCount,columns:getRowViewportColumns(mainHeaderRowIdx),onColumnResize:handleColumnResizeLatest,onColumnsReorder:onColumnsReorderLastest,sortColumns,onSortColumnsChange:onSortColumnsChangeLatest,lastFrozenColumnIndex,selectedCellIdx:selectedPosition.rowIdx===mainHeaderRowIdx?selectedPosition.idx:void 0,selectCell:selectHeaderCellLatest,shouldFocusGrid:!selectedCellIsWithinSelectionBounds,direction})]})}),rows.length===0&&noRowsFallback?noRowsFallback:u$1(b,{children:[topSummaryRows==null?void 0:topSummaryRows.map((row2,rowIdx)=>{const gridRowStart=headerRowsCount+1+rowIdx,summaryRowIdx=mainHeaderRowIdx+1+rowIdx,isSummaryRowSelected=selectedPosition.rowIdx===summaryRowIdx,top=headerRowsHeight+summaryRowHeight*rowIdx;return u$1(SummaryRow$1,{"aria-rowindex":gridRowStart,rowIdx:summaryRowIdx,gridRowStart,row:row2,top,bottom:void 0,viewportColumns:getRowViewportColumns(summaryRowIdx),lastFrozenColumnIndex,selectedCellIdx:isSummaryRowSelected?selectedPosition.idx:void 0,isTop:!0,selectCell:selectCellLatest},rowIdx)}),u$1(RowSelectionChangeProvider,{value:selectRowLatest,children:getViewportRows()}),bottomSummaryRows==null?void 0:bottomSummaryRows.map((row2,rowIdx)=>{const gridRowStart=headerAndTopSummaryRowsCount+rows.length+rowIdx+1,summaryRowIdx=rows.length+rowIdx,isSummaryRowSelected=selectedPosition.rowIdx===summaryRowIdx,top=clientHeight>totalRowHeight?gridHeight-summaryRowHeight*(bottomSummaryRows.length-rowIdx):void 0,bottom=top===void 0?summaryRowHeight*(bottomSummaryRows.length-1-rowIdx):void 0;return u$1(SummaryRow$1,{"aria-rowindex":ariaRowCount-bottomSummaryRowsCount+rowIdx+1,rowIdx:summaryRowIdx,gridRowStart,row:row2,top,bottom,viewportColumns:getRowViewportColumns(summaryRowIdx),lastFrozenColumnIndex,selectedCellIdx:isSummaryRowSelected?selectedPosition.idx:void 0,isTop:!1,selectCell:selectCellLatest},rowIdx)})]})]}),renderDragHandle(),renderMeasuringCells(viewportColumns),isTreeGrid&&u$1("div",{ref:focusSinkRef,tabIndex:isGroupRowFocused?0:-1,className:clsx(focusSinkClassname,isGroupRowFocused&&[rowSelected,lastFrozenColumnIndex!==-1&&rowSelectedWithFrozenCell],!isRowIdxWithinViewportBounds(selectedPosition.rowIdx)&&focusSinkHeaderAndSummaryClassname),style:{gridRowStart:selectedPosition.rowIdx+headerAndTopSummaryRowsCount+1}}),scrollToPosition!==null&&u$1(ScrollToCell,{scrollToPosition,setScrollToCellPosition:setScrollToPosition,gridElement:gridRef.current})]})}function getCellToScroll(gridEl){return gridEl.querySelector(':scope > [role="row"] > [tabindex="0"]')}function isSamePosition(p1,p2){return p1.idx===p2.idx&&p1.rowIdx===p2.rowIdx}const DataGrid$1=A(DataGrid);function useData(widget){const columns=xn.useMemo(()=>widget.columns(),[widget,widget.dataChecksum()]),data=xn.useMemo(()=>widget.data(),[widget,widget.dataChecksum()]);return[columns,data]}function copyAndSort(items,attribute,descending){const key=attribute;return[...items].sort((a2,b2)=>a2[key]<b2[key]?descending?1:-1:a2[key]>b2[key]?descending?-1:1:0)}const EmptyRowsRenderer=({message})=>u$1("div",{style:{textAlign:"center",gridColumn:"1/-1"},children:message}),ReactTable=({table,sort})=>{const[columns,data]=useData(table),multiSelect=table.multiSelect(),columnTypes=table.columnTypes(),columnPatterns=table.columnPatterns(),columnFormats=table.columnFormats(),[listColumns,setListColumns]=h([]),[sortColumn,setSortColumn]=h(),[rows,setRows]=h([]),[selectedRows,setSelectedRows]=h(new Set);y(()=>{setListColumns([...multiSelect?[SelectColumn]:[],...columns.map(column=>{const type=columnTypes[column]??"string";let formatter,__hpcc_pattern,__hpcc_format;switch(type){case"time":__hpcc_pattern=columnPatterns[column]!==void 0?common.timeParse(columnPatterns[column]):void 0,__hpcc_format=columnFormats[column]!==void 0?common.timeFormat(columnFormats[column]):void 0;break;case"number":formatter=props=>u$1("div",{style:{textAlign:"right"},children:props.row[props.column.key]});default:__hpcc_format=columnFormats[column]!==void 0?common.format(columnFormats[column]):void 0}return{key:column,name:column,resizable:!0,sortable:!0,minWidth:80,renderCell:formatter,__hpcc_pattern,__hpcc_format}})])},[columnFormats,columnPatterns,columnTypes,columns,multiSelect]);const onSortColumnsChange=q$1(sortColumns=>{const futureSortColumn=sortColumns.slice(-1)[0],sorted=futureSortColumn!==void 0,isSortedDescending=(futureSortColumn==null?void 0:futureSortColumn.direction)==="DESC";setSortColumn(futureSortColumn),setRows(copyAndSort(rows,sorted?futureSortColumn.columnKey:"key",sorted?isSortedDescending:!1))},[rows]),rowKeyGetter=q$1(row2=>row2.key,[]),onSelectedRowsChange=q$1(selectedRows2=>{setSelectedRows(selectedRows2)},[]),onCellClick=q$1((row2,column)=>{table.onRowClickCallback(row2,column.key)},[table]);return y(()=>{let items=data.map((row2,index)=>{const retVal={key:index};return listColumns.forEach((column,index2)=>{let val=row2[index2];column.__hpcc_pattern&&column.__hpcc_format?val=column.__hpcc_format(column.__hpcc_pattern(val)):column.__hpcc_pattern?val=column.__hpcc_pattern(val).toString():column.__hpcc_format&&(val=column.__hpcc_format(val)),retVal[column.key]=val}),retVal});sort!=null&&sort.attribute&&(items=copyAndSort(items,sort.attribute,sort.descending)),setRows(items)},[listColumns,data,sort]),u$1(DataGrid$1,{columns:listColumns,headerRowHeight:24,rows,rowKeyGetter,rowHeight:20,renderers:{noRowsFallback:u$1(EmptyRowsRenderer,{message:table.noDataMessage()})},className:table.darkMode()?"rdg-dark":"rdg-light",sortColumns:sortColumn?[sortColumn]:[],onSortColumnsChange,selectedRows,onSelectedRowsChange:multiSelect?onSelectedRowsChange:void 0,onCellClick:multiSelect?void 0:(args,event)=>onCellClick(args.row,args.column),"aria-describedby":"","aria-label":"","aria-labelledby":"",style:{height:"100%"}})};class Table extends common.HTMLWidget{constructor(){super(),__publicField$1(this,"_div"),__publicField$1(this,"_prevRow"),__publicField$1(this,"_prevColumn")}columnType(column,type){return arguments.length===1?this.columnTypes()[column]:(this.columnTypes({...this.columnTypes(),[column]:type}),this)}columnPattern(column,pattern){return arguments.length===1?this.columnPatterns()[column]:(this.columnPatterns({...this.columnPatterns(),[column]:pattern}),this)}columnFormat(column,format2){return arguments.length===1?this.columnFormats()[column]:(this.columnFormats({...this.columnFormats(),[column]:format2}),this)}onRowClickCallback(row2,column){this._prevRow&&JSON.stringify(this._prevRow)!==JSON.stringify(row2)&&this.click(this._prevRow,this._prevColumn??"",!1),row2&&this.click(row2,column,!0),this._prevRow=row2,this._prevColumn=column}enter(domNode,element){super.enter(domNode,element),this._div=element.append("div").style("display","grid")}update(domNode,element){super.update(domNode,element),this._div.style("width",this.width()+"px"),this._div.style("height",this.height()+"px"),q$2(_$1(ReactTable,{table:this}),this._div.node())}exit(domNode,element){this._div.remove(),super.exit(domNode,element)}click(row2,col,sel){}}Table.prototype._class+=" dgrid2_Table",Table.prototype.publish("noDataMessage","...empty...","string","No Data Message"),Table.prototype.publish("darkMode",!1,"boolean","Dark Mode"),Table.prototype.publish("multiSelect",!1,"boolean","Multiple Selection"),Table.prototype.publish("columnTypes",{},"object",'Column Types ("boolean" | "number" | "string" | "time"'),Table.prototype.publish("columnPatterns",{},"object","Column Patterns"),Table.prototype.publish("columnFormats",{},"object","Column Formats"),function(){try{if(typeof document<"u"){var o2=document.createElement("style");o2.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,#6464641a 8px)}.layout_Border .grid-drop-target.drop-target-over{border:2px dashed #179BD7;background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px,#119bd71a 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,#6464641a 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,orange 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,#6400001a 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(o2)}}catch(e2){console.error("vite-plugin-css-injected-by-js",e2)}}();var __defProp2=Object.defineProperty,__defNormalProp2=(obj,key,value)=>key in obj?__defProp2(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField2=(obj,key,value)=>__defNormalProp2(obj,typeof key!="symbol"?key+"":key,value);function _mergeNamespaces$1(n2,m2){for(var i2=0;i2<m2.length;i2++){const e2=m2[i2];if(typeof e2!="string"&&!Array.isArray(e2)){for(const k2 in e2)if(k2!=="default"&&!(k2 in n2)){const d2=Object.getOwnPropertyDescriptor(e2,k2);d2&&Object.defineProperty(n2,k2,d2.get?d2:{enumerable:!0,get:()=>e2[k2]})}}}return Object.freeze(Object.defineProperty(n2,Symbol.toStringTag,{value:"Module"}))}class AbsoluteSurface extends common.HTMLWidget{constructor(){super(),this._tag="div"}enter(domNode,element){super.enter(domNode,element)}update(domNode,element){super.update(domNode,element);let xPos=0,yPos=0,width=this.clientWidth(),height=this.clientHeight();switch(this.units()){case"pixels":xPos=this.widgetX(),yPos=this.widgetY(),width=this.widgetWidth()===""?width-xPos:Number(this.widgetWidth()),height=this.widgetHeight()===""?height-yPos:Number(this.widgetHeight());break;case"percent":xPos=this.widgetX()*width/100,yPos=this.widgetY()*height/100,width=this.widgetWidth()===""?width-xPos:Number(this.widgetWidth())*width/100,height=this.widgetHeight()===""?height-yPos:Number(this.widgetHeight())*height/100;break}element.style("opacity",this.opacity());const widgets=element.selectAll("#"+this._id+" > .placeholder").data(this.widget()?[this.widget()]:[],function(d2){return d2._id});widgets.enter().append("div").attr("class","placeholder").each(function(d2){d2.target(this)}).merge(widgets).style("left",xPos+"px").style("top",yPos+"px").style("width",width+"px").style("bottom",height+"px").each(function(d2){d2.resize({width,height})}),widgets.exit().each(function(d2){d2.target(null)}).remove()}exit(domNode,element){this.widget()&&this.widget().target(null),super.exit(domNode,element)}}AbsoluteSurface.prototype._class+=" layout_AbsoluteSurface",AbsoluteSurface.prototype.publish("units","percent","set","Units",["pixels","percent"]),AbsoluteSurface.prototype.publish("widgetX",0,"number","Widget XPos"),AbsoluteSurface.prototype.publish("widgetY",0,"number","Widget YPos"),AbsoluteSurface.prototype.publish("widgetWidth","100","string","Widget Width, omit for full"),AbsoluteSurface.prototype.publish("widgetHeight","100","string","Widget Height, omit for full"),AbsoluteSurface.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]}),AbsoluteSurface.prototype.publish("opacity",1,"number","Opacity");class Accordion extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_isClosed"),__publicField2(this,"titleSpan"),__publicField2(this,"iconDiv"),__publicField2(this,"ul"),__publicField2(this,"icon"),this._tag="div",this._isClosed=!1}pushListItem(widget,prepend=!1,protect=!1){const contentArr=this.content();return widget._protected=protect,prepend?contentArr.unshift(widget):contentArr.push(widget),this.content(contentArr),this}clearListItems(){const arr=[];for(const i2 in this.content())this.content()[i2]._protected&&arr.push(this.content()[i2]);return this.content(arr),this}collapseClick(element){element.classed("closed")?(this._isClosed=!1,element.classed("open",!0),element.classed("closed",!1)):(this._isClosed=!0,element.classed("open",!1),element.classed("closed",!0))}enter(domNode,element){super.enter(domNode,element);const context=this;this._isClosed=this.defaultCollapsed(),element.classed(this._isClosed?"closed":"open",!0),this.titleSpan=element.append("span").classed("collapsible-title",!0),this.iconDiv=element.append("div").classed("collapsible-icon",!0),this.ul=element.append("ul"),this.icon=new common.FAChar().size({height:24,width:24}).target(this.iconDiv.node()),this.iconDiv.on("click",function(){context.collapseClick(element),context.render()}),this.titleSpan.on("click",function(){context.collapseClick(element),context.render()})}update(domNode,element){super.update(domNode,element);const context=this,this_id="";this.titleSpan.text(context.title().length>0?context.title()+this_id:"Accordion ["+context._id+"]"+this_id);const rows=this.ul.selectAll("#"+context._id+" > ul > li").data(this.content(),function(d2){return d2._id});rows.enter().append(function(widget){const li=document.createElement("li");if(widget._target===null){const wSize=widget.size();if(wSize.width===0||wSize.height===0){const cSize=context.size();widget.size({width:cSize.width,height:cSize.width})}widget.target(li)}else return widget._target;return li}),rows.exit().remove(),this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed?this.closedIcon():this.openIcon()).render()}exit(domNode,element){super.exit(domNode,element)}}Accordion.prototype._class+=" layout_Accordion",Accordion.prototype.publish("content",[],"widgetArray","Array of widgets",null,{tags:["Basic"]}),Accordion.prototype.publish("title","","string","Title of collapsible section",null,{tags:["Private"]}),Accordion.prototype.publish("openIcon","","string","Icon to display when list is open",null,{tags:["Private"]}),Accordion.prototype.publish("closedIcon","","string","Icon to display when list is closed",null,{tags:["Private"]}),Accordion.prototype.publish("titleFontColor","#FFFFFF","html-color","Title font color",null,{tags:["Private"]}),Accordion.prototype.publish("titleBackgroundColor","#333333","html-color","Title background color",null,{tags:["Private"]}),Accordion.prototype.publish("defaultCollapsed",!1,"boolean","Collapsed by default if true",null,{tags:["Private"]});class Surface extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_surfaceButtons"),this._tag="div",this._surfaceButtons=[]}widgetSize(titleDiv,widgetDiv){let width=this.clientWidth(),height=this.clientHeight();return this.title()&&(height-=this.calcHeight(titleDiv)),height-=this.calcFrameHeight(widgetDiv),width-=this.calcFrameWidth(widgetDiv),{width,height}}enter(domNode,element){super.enter(domNode,element)}update(domNode,element2){super.update(domNode,element2);const context=this;element2.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 titles=element2.selectAll(".surfaceTitle").data(this.title()?[this.title()]:[]);titles.enter().insert("h3","div").attr("class","surfaceTitle").merge(titles).text(function(d2){return d2}).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),titles.exit().remove();const surfaceButtons=element2.select(".surfaceTitle").append("div").attr("class","html-button-container").selectAll(".surface-button").data(this.buttonAnnotations());surfaceButtons.enter().append("button").classed("surface-button",!0).each(function(button,idx){const el=context._surfaceButtons[idx]=common.select(this).attr("class","surface-button"+(button.class?" "+button.class:"")).attr("id",button.id).style("padding",button.padding).style("width",button.width).style("height",button.height).style("cursor","pointer");button.font==="FontAwesome"?el.style("background","transparent").style("border","none").on("click",function(d2){context.click(d2)}).append("i").attr("class","fa").text(function(){return button.label}):el.text(function(){return button.label}).on("click",function(d2){context.click(d2)})}),surfaceButtons.exit().each(function(_d,idx){const element=common.select(this);delete context._surfaceButtons[idx],element.remove()});const widgets=element2.selectAll("#"+this._id+" > .surfaceWidget").data(this.widget()?[this.widget()]:[],function(d2){return d2._id});widgets.enter().append("div").attr("class","surfaceWidget").each(function(d2){common.select(context.element().node().parentElement).classed("content-icon content-icon-"+d2.classID().split("_")[1],!0),d2.target(this)}).merge(widgets).style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null).each(function(d2){const widgetSize=context.widgetSize(element2.select("h3"),common.select(this));widgetSize.width<0&&(widgetSize.width=0),widgetSize.height<0&&(widgetSize.height=0),d2.resize({width:widgetSize.width,height:widgetSize.height})}),widgets.exit().each(function(d2){d2.target(null)}).remove()}exit(domNode,element){this.widget()&&this.widget().target(null),super.exit(domNode,element)}click(obj){}}Surface.prototype._class+=" layout_Surface",Surface.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),Surface.prototype.publish("altText",null,"string","Alt text",null,{optional:!0}),Surface.prototype.publish("surfaceTitlePadding",null,"number","Title Padding (px)",null,{tags:["Advanced"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceTitleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceTitleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceTitleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceTitleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceTitleBackgroundColor",null,"html-color","Title Background Color",null,{tags:["Advanced"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceTitleAlignment","center","set","Title Alignment",["left","right","center"],{tags:["Basic"],disable:w2=>!w2.title()}),Surface.prototype.publish("surfaceShadow",!1,"boolean","3D Shadow"),Surface.prototype.publish("surfacePadding",null,"string","Surface Padding (px)",null,{tags:["Intermediate"]}),Surface.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),Surface.prototype.publish("surfaceBorderWidth",null,"number","Surface Border Width (px)",null,{tags:["Advanced"]}),Surface.prototype.publish("surfaceBorderColor",null,"html-color","Surface Border Color",null,{tags:["Advanced"]}),Surface.prototype.publish("surfaceBorderRadius",null,"number","Surface Border Radius (px)",null,{tags:["Advanced"]}),Surface.prototype.publish("buttonAnnotations",[],"array","Button Array",null,{tags:["Private"]}),Surface.prototype.publish("widget",null,"widget","Widget",null,{tags:["Basic"]});class Cell extends Surface{constructor(){super(),__publicField2(this,"_indicateTheseIds"),this._indicateTheseIds=[]}indicateTheseIds(_2){return arguments.length?(this._indicateTheseIds=_2,this):this._indicateTheseIds}enter(domNode,element){super.enter(domNode,element);const context=this;element.classed("layout_Surface",!0).on("mouseenter",function(){context.onMouseEnter()}).on("mouseleave",function(){context.onMouseLeave()})}update(domNode,element){super.update(domNode,element)}onMouseEnter(){const arr=this.indicateTheseIds(),opacity=this.indicatorOpacity(),indicatorBorderColor=this.indicatorBorderColor(),indicatorGlowColor=this.indicatorGlowColor();for(let i2=0;i2<arr.length;i2++){const otherElement=common.select("#"+arr[i2]),otherWidget=otherElement.datum();otherElement&&otherWidget&&otherElement.append("div").attr("class","update-indicator").style("width",otherWidget.width()+"px").style("height",otherWidget.height()+"px").style("opacity",opacity).style("border-color",indicatorBorderColor).style("-webkit-box-shadow","inset 0px 0px 30px 0px "+indicatorGlowColor).style("-moz-box-shadow","inset 0px 0px 30px 0px "+indicatorGlowColor).style("box-shadow","inset 0px 0px 30px 0px "+indicatorGlowColor)}}onMouseLeave(){const arr=this.indicateTheseIds();for(let i2=0;i2<arr.length;i2++)common.selectAll("#"+arr[i2]+" > div.update-indicator").remove()}}Cell.prototype._class+=" layout_Cell",Cell.prototype.publish("gridRow",0,"number","Grid Row Position",null,{tags:["Private"]}),Cell.prototype.publish("gridCol",0,"number","Grid Column Position",null,{tags:["Private"]}),Cell.prototype.publish("gridRowSpan",1,"number","Grid Row Span",null,{tags:["Private"]}),Cell.prototype.publish("gridColSpan",1,"number","Grid Column Span",null,{tags:["Private"]}),Cell.prototype.publish("indicatorGlowColor","#EEEE11","html-color","Glow color of update-indicator",null,{tags:["Basic"]}),Cell.prototype.publish("indicatorBorderColor","#F48A00","html-color","Border color of update-indicator",null,{tags:["Basic"]}),Cell.prototype.publish("indicatorOpacity",.8,"number","Opacity of update-indicator",null,{tags:["Basic"]});class Border extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_colCount"),__publicField2(this,"_rowCount"),__publicField2(this,"_colSize"),__publicField2(this,"_rowSize"),__publicField2(this,"_shrinkWrapBoxes"),__publicField2(this,"_watch"),__publicField2(this,"_offsetX"),__publicField2(this,"_offsetY"),__publicField2(this,"_dragCell"),__publicField2(this,"_dragCellSize"),__publicField2(this,"_dragCellStartSize"),__publicField2(this,"_handleTop"),__publicField2(this,"_handleLeft"),__publicField2(this,"_dragPrevX"),__publicField2(this,"_dragPrevY"),__publicField2(this,"_cellSizes"),__publicField2(this,"contentDiv"),__publicField2(this,"_scrollBarWidth"),__publicField2(this,"_borderHandles"),__publicField2(this,"_sectionTypeArr"),__publicField2(this,"lazyPostUpdate",common.Utility.debounce(function(){this.postUpdate()},100)),this._tag="div",this._colCount=0,this._rowCount=0,this._colSize=0,this._rowSize=0,this._shrinkWrapBoxes={},this.content([]),this.sectionTypes([])}watchWidget(widget){if(this._watch===void 0&&(this._watch={}),this._watch[widget.id()]&&(this._watch[widget.id()].remove(),delete this._watch[widget.id()]),widget){const context=this;this._watch[widget.id()]=widget.monitor(function(paramId,newVal,oldVal){oldVal!==newVal&&context.lazyPostUpdate()})}}applyLayoutType(){const layoutObj=this.borderLayoutObject();this.content().forEach(function(cell2,i2){cell2._fixedLeft=layoutObj[this.sectionTypes()[i2]].left,cell2._fixedTop=layoutObj[this.sectionTypes()[i2]].top,cell2._fixedWidth=layoutObj[this.sectionTypes()[i2]].width,cell2._fixedHeight=layoutObj[this.sectionTypes()[i2]].height,cell2._dragHandles=this.cellSpecificDragHandles(this.sectionTypes()[i2])},this)}cellSpecificDragHandles(sectionType){switch(sectionType){case"top":return["s"];case"right":return["w"];case"bottom":return["n"];case"left":return["e"];case"center":return[]}}borderLayoutObject(layoutType){const retObj={},context=this;let topSize,topPerc,bottomSize,bottomPerc,leftSize,leftPerc,rightSize,rightPerc;const bcRect=this.target().getBoundingClientRect();bcRect.top,bcRect.left,bcRect.bottom,bcRect.right,this.target()instanceof SVGElement?(parseFloat(this.target().getAttribute("width")),parseFloat(this.target().getAttribute("height"))):(bcRect.width,bcRect.height),this.sectionTypes().indexOf("top")!==-1&&(topSize=this.topSize(),topPerc=this.topPercentage(),typeof this._shrinkWrapBoxes.top<"u"&&(topSize=this._shrinkWrapBoxes.top.height+this.gutter(),topPerc=0)),this.sectionTypes().indexOf("bottom")!==-1&&(bottomSize=this.bottomSize(),bottomPerc=this.bottomPercentage(),typeof this._shrinkWrapBoxes.bottom<"u"&&(bottomSize=this._shrinkWrapBoxes.bottom.height+this.gutter(),bottomPerc=0)),this.sectionTypes().indexOf("left")!==-1&&(leftSize=this.leftSize(),leftPerc=this.leftPercentage(),typeof this._shrinkWrapBoxes.left<"u"&&(leftSize=this._shrinkWrapBoxes.left.width+this.gutter(),leftPerc=0)),this.sectionTypes().indexOf("right")!==-1&&(rightSize=this.rightSize(),rightPerc=this.rightPercentage(),typeof this._shrinkWrapBoxes.right<"u"&&(rightSize=this._shrinkWrapBoxes.right.width+this.gutter(),rightPerc=0));const t2=_sectionPlacementObject({width:{px:0,"%":100},height:{px:topSize,"%":topPerc},top:{px:0,"%":0},left:{px:0,"%":0}}),b2=_sectionPlacementObject({width:{px:0,"%":100},height:{px:bottomSize,"%":bottomPerc},top:{px:0,"%":100},left:{px:0,"%":0}});b2.top-=b2.height;const l2=_sectionPlacementObject({width:{px:leftSize,"%":leftPerc},height:{px:-t2.height-b2.height,"%":100},top:{px:t2.height,"%":0},left:{px:0,"%":0}}),r2=_sectionPlacementObject({width:{px:rightSize,"%":rightPerc},height:{px:-t2.height-b2.height,"%":100},top:{px:t2.height,"%":0},left:{px:0,"%":100}});r2.left-=r2.width;const c2=_sectionPlacementObject({width:{px:-r2.width-l2.width,"%":100},height:{px:-t2.height-b2.height,"%":100},top:{px:t2.height,"%":0},left:{px:l2.width,"%":0}});return retObj.top=t2,retObj.bottom=b2,retObj.right=r2,retObj.left=l2,retObj.center=c2,retObj;function _sectionPlacementObject(obj){return obj.width.px=typeof obj.width.px<"u"?obj.width.px:0,obj.width["%"]=typeof obj.width["%"]<"u"?obj.width["%"]:0,obj.height.px=typeof obj.height.px<"u"?obj.height.px:0,obj.height["%"]=typeof obj.height["%"]<"u"?obj.height["%"]:0,{width:obj.width.px+obj.width["%"]/100*context.width(),height:obj.height.px+obj.height["%"]/100*context.height(),top:obj.top.px+obj.top["%"]/100*context.height()+context.gutter()/2,left:obj.left.px+obj.left["%"]/100*context.width()+context.gutter()/2}}}clearContent(sectionType){if(!sectionType)this.content().forEach(function(contentWidget){return contentWidget.target(null),!1}),common.select("#"+this.id()+" > div.borderHandle").classed("borderHandleDisabled",!0),delete this._watch,this.content([]),this.sectionTypes([]);else{const idx=this.sectionTypes().indexOf(sectionType);idx>=0&&(this._watch&&this.content()[idx]&&delete this._watch[this.content()[idx].id()],this.content()[idx].target(null),common.select("#"+this.id()+" > div.borderHandle_"+sectionType).classed("borderHandleDisabled",!0),this.content().splice(idx,1),this.sectionTypes().splice(idx,1))}}hasContent(sectionType,widget,title){return this.sectionTypes().indexOf(sectionType)>=0}setContent(sectionType,widget,title){if(this.clearContent(sectionType),title=typeof title<"u"?title:"",widget){const cell2=new Cell().surfaceBorderWidth(0).widget(widget).title(title);this.watchWidget(widget),this.content().push(cell2),this.sectionTypes().push(sectionType)}return this}getCell(id){const idx=this.sectionTypes().indexOf(id);return idx>=0?this.content()[idx]:null}getContent(id){const idx=this.sectionTypes().indexOf(id);return idx>=0?this.content()[idx].widget():null}setLayoutOffsets(){this._offsetX=this._element.node().getBoundingClientRect().left+this.gutter()/2,this._offsetY=this._element.node().getBoundingClientRect().top+this.gutter()/2}dragStart(handle){const event=common.d3Event();event.sourceEvent.stopPropagation();const context=this;this._dragCell=handle,this._dragCellStartSize=this[handle+"Size"](),this[handle+"ShrinkWrap"]()&&(this[handle+"Percentage"](0),this[handle+"ShrinkWrap"](!1));const handleElm=common.select("#"+context.id()+" > div.borderHandle_"+handle);context._handleTop=parseFloat(handleElm.style("top").split("px")[0]),context._handleLeft=parseFloat(handleElm.style("left").split("px")[0]),this._dragPrevX=event.sourceEvent.clientX,this._dragPrevY=event.sourceEvent.clientY}dragTick(handle){const context=this,event=common.d3Event(),xDelta=this._dragPrevX-event.sourceEvent.clientX,yDelta=this._dragPrevY-event.sourceEvent.clientY;switch(handle){case"top":case"bottom":_moveHandles(handle,yDelta);break;case"right":case"left":_moveHandles(handle,xDelta);break}function _moveHandles(handle2,delta){if(delta===0)return;const handles=common.selectAll("#"+context.id()+" > div.borderHandle"),grabbedHandle=common.select("#"+context.id()+" > div.borderHandle_"+handle2);grabbedHandle.classed("borderHandle_top")?(grabbedHandle.style("top",context._handleTop-delta+"px"),context._cellSizes.topHeight=context._handleTop-delta,context._cellSizes.leftHeight=context._cellSizes.height,context._cellSizes.leftHeight-=context._cellSizes.topHeight,context._cellSizes.leftHeight-=context._cellSizes.bottomHeight,context._cellSizes.rightHeight=context._cellSizes.leftHeight):grabbedHandle.classed("borderHandle_right")?(grabbedHandle.style("left",context._handleLeft-delta+"px"),context._cellSizes.rightWidth=context._cellSizes.width-context._handleLeft+delta):grabbedHandle.classed("borderHandle_bottom")?(grabbedHandle.style("top",context._handleTop-delta+"px"),context._cellSizes.bottomHeight=context._cellSizes.height-context._handleTop+delta,context._cellSizes.leftHeight=context._cellSizes.height,context._cellSizes.leftHeight-=context._cellSizes.bottomHeight,context._cellSizes.leftHeight-=context._cellSizes.topHeight,context._cellSizes.rightHeight=context._cellSizes.leftHeight):grabbedHandle.classed("borderHandle_left")&&(grabbedHandle.style("left",context._handleLeft-delta+"px"),context._cellSizes.leftWidth=context._handleLeft-delta),handles.each(function(){const handle3=common.select(this);handle3.classed("borderHandle_top")?(handle3.style("width",context._cellSizes.width+"px"),handle3.style("top",context._cellSizes.topHeight-3+"px")):handle3.classed("borderHandle_right")?(handle3.style("left",context._cellSizes.width-context._cellSizes.rightWidth+"px"),handle3.style("top",context._cellSizes.topHeight+3+"px"),handle3.style("height",context._cellSizes.rightHeight+"px")):handle3.classed("borderHandle_bottom")?(handle3.style("width",context._cellSizes.width+"px"),handle3.style("top",context._cellSizes.height-context._cellSizes.bottomHeight-3+"px")):handle3.classed("borderHandle_left")&&(handle3.style("left",context._cellSizes.leftWidth+"px"),handle3.style("height",context._cellSizes.leftHeight+"px"),handle3.style("top",context._cellSizes.topHeight+3+"px"))})}}dragEnd(handle){if(handle){const event=common.d3Event(),xDelta=this._dragPrevX-event.sourceEvent.clientX,yDelta=this._dragPrevY-event.sourceEvent.clientY;switch(handle){case"top":yDelta!==0&&(this.topPercentage(0),this.topSize(this.topSize()===0?this.getContent("top").getBBox().height-yDelta:this.topSize()-yDelta));break;case"right":xDelta!==0&&(this.rightPercentage(0),this.rightSize(this.rightSize()===0?this.getContent("right").getBBox().width+xDelta:this.rightSize()+xDelta));break;case"bottom":yDelta!==0&&(this.bottomPercentage(0),this.bottomSize(this.bottomSize()===0?this.getContent("bottom").getBBox().height+yDelta:this.bottomSize()+yDelta));break;case"left":xDelta!==0&&(this.leftPercentage(0),this.leftSize(this.leftSize()===0?this.getContent("left").getBBox().width-xDelta:this.leftSize()-xDelta));break}this._dragPrevX=event.sourceEvent.clientX,this._dragPrevY=event.sourceEvent.clientY}this.render()}size(_2){const retVal=common.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this.contentDiv&&this.contentDiv.style("width",this._size.width+"px").style("height",this._size.height+"px"),retVal}enter(domNode,element){super.enter(domNode,element);const context=this;element.style("position","relative"),this.contentDiv=element.append("div").classed("border-content",!0),this._scrollBarWidth=common.Platform.getScrollbarWidth(),this._borderHandles=["top","left","right","bottom"],element.selectAll("div.borderHandle").data(this._borderHandles).enter().append("div").classed("borderHandle",!0).each(function(handle){common.select(this).classed("borderHandle_"+handle,!0).classed("borderHandleDisabled",context.getContent(handle)===null)})}update(domNode,element){super.update(domNode,element),this._sectionTypeArr=this.sectionTypes();const context=this;element.classed("design-mode",this.designMode()),this.setLayoutOffsets();const rows=this.contentDiv.selectAll(".cell_"+this._id).data(this.content(),function(d2){return d2._id}),rowsUpdate=rows.enter().append("div").classed("cell_"+this._id,!0).style("position","absolute").each(function(d2,i2){common.select(this).classed("border-cell border-cell-"+context._sectionTypeArr[i2],!0),d2.target(this),common.select("#"+context.id()+" > div.borderHandle_"+context._sectionTypeArr[i2]).classed("borderHandleDisabled",!1)}).merge(rows);rowsUpdate.each(function(d2,idx){const sectionType=context.sectionTypes()[idx];typeof context[sectionType+"ShrinkWrap"]<"u"&&context[sectionType+"ShrinkWrap"]()?(d2.render(),context._shrinkWrapBoxes[sectionType]=d2.widget().getBBox(!0)):delete context._shrinkWrapBoxes[sectionType]});const drag$1=common.drag().on("start",function(d2,i2){context.dragStart.call(context,d2,i2)}).on("drag",function(d2,i2){context.dragTick.call(context,d2,i2)}).on("end",function(d2,i2){context.dragEnd.call(context,d2,i2)});this.designMode()?element.selectAll("#"+this.id()+" > div.borderHandle").call(drag$1):element.selectAll("#"+this.id()+" > div.borderHandle").on(".drag",null);const layoutObj=this.borderLayoutObject();this.content().forEach(function(cell2,i2){cell2._fixedLeft=layoutObj[this.sectionTypes()[i2]].left,cell2._fixedTop=layoutObj[this.sectionTypes()[i2]].top,cell2._fixedWidth=layoutObj[this.sectionTypes()[i2]].width,cell2._fixedHeight=layoutObj[this.sectionTypes()[i2]].height,cell2._dragHandles=[]},this),rowsUpdate.style("left",function(d2){return d2._fixedLeft+"px"}).style("top",function(d2){return d2._fixedTop+"px"}).style("width",function(d2){return d2._fixedWidth-context.gutter()+"px"}).style("height",function(d2){return d2._fixedHeight-context.gutter()+"px"}).each(function(d2){d2._placeholderElement.attr("draggable",context.designMode()).selectAll(".dragHandle").attr("draggable",context.designMode()),d2.surfacePadding(context.surfacePadding()).resize()}),rows.exit().each(function(d2){d2.target(null)}).remove(),this.getCellSizes(),element.selectAll("#"+this.id()+" > div.borderHandle").each(function(){const handle=common.select(this);handle.classed("borderHandle_top")?(handle.style("width",context._cellSizes.width+"px"),handle.style("top",context._cellSizes.topHeight-3+"px")):handle.classed("borderHandle_right")?(handle.style("left",context._cellSizes.width-context._cellSizes.rightWidth+"px"),handle.style("top",context._cellSizes.topHeight+3+"px"),handle.style("height",context._cellSizes.rightHeight+"px")):handle.classed("borderHandle_bottom")?(handle.style("width",context._cellSizes.width+"px"),handle.style("top",context._cellSizes.height-context._cellSizes.bottomHeight-3+"px")):handle.classed("borderHandle_left")&&(handle.style("left",context._cellSizes.leftWidth+"px"),handle.style("height",context._cellSizes.leftHeight+"px"),handle.style("top",context._cellSizes.topHeight+3+"px"))})}getCellSizes(){const context=this;context._cellSizes={};const contentRect=this.element().node().getBoundingClientRect();context._cellSizes.width=contentRect.width,context._cellSizes.height=contentRect.height,this.element().selectAll("#"+this.id()+" > div > div.border-cell").each(function(){const cell2=common.select(this);if(typeof cell2.node=="function"){const rect=cell2.node().getBoundingClientRect();cell2.classed("border-cell-top")?context._cellSizes.topHeight=rect.height:cell2.classed("border-cell-left")?(context._cellSizes.leftWidth=rect.width,context._cellSizes.leftHeight=rect.height):cell2.classed("border-cell-right")?(context._cellSizes.rightWidth=rect.width,context._cellSizes.rightHeight=rect.height):cell2.classed("border-cell-bottom")&&(context._cellSizes.bottomHeight=rect.height)}}),["height","width","topHeight","bottomHeight","leftHeight","rightHeight","leftWidth","rightWidth"].forEach(function(size){context._cellSizes[size]=context._cellSizes[size]===void 0?0:context._cellSizes[size]})}postUpdate(domNode,element){const context=this;this.content().forEach(function(n2){if(n2._element.node()!==null&&n2.widget()){const prevBox=n2.widget().getBBox(!1,!0),currBox=n2.widget().getBBox(!0,!0);(prevBox.width!==currBox.width||prevBox.height!==currBox.height)&&context.lazyRender()}})}exit(domNode,element){this.content().forEach(w2=>w2.target(null)),super.exit(domNode,element)}}Border.prototype._class+=" layout_Border",Border.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),Border.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Intermediate"]}),Border.prototype.publish("gutter",0,"number","Gap Between Widgets",null,{tags:["Basic"]}),Border.prototype.publish("topShrinkWrap",!1,"boolean","'Top' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Border.prototype.publish("leftShrinkWrap",!1,"boolean","'Left' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Border.prototype.publish("rightShrinkWrap",!1,"boolean","'Right' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Border.prototype.publish("bottomShrinkWrap",!1,"boolean","'Bottom' Cell shrinks to fit content",null,{tags:["Intermediate"]}),Border.prototype.publish("topSize",0,"number","Height of the 'Top' Cell (px)",null,{tags:["Private"]}),Border.prototype.publish("leftSize",0,"number","Width of the 'Left' Cell (px)",null,{tags:["Private"]}),Border.prototype.publish("rightSize",0,"number","Width of the 'Right' Cell (px)",null,{tags:["Private"]}),Border.prototype.publish("bottomSize",0,"number","Height of the 'Bottom' Cell (px)",null,{tags:["Private"]}),Border.prototype.publish("topPercentage",20,"number","Percentage (of parent) Height of the 'Top' Cell",null,{tags:["Private"]}),Border.prototype.publish("leftPercentage",20,"number","Percentage (of parent) Width of the 'Left' Cell",null,{tags:["Private"]}),Border.prototype.publish("rightPercentage",20,"number","Percentage (of parent) Width of the 'Right' Cell",null,{tags:["Private"]}),Border.prototype.publish("bottomPercentage",20,"number","Percentage (of parent) Height of the 'Bottom' Cell",null,{tags:["Private"]}),Border.prototype.publish("surfacePadding",0,"number","Cell Padding (px)",null,{tags:["Intermediate"]}),Border.prototype.publish("sectionTypes",[],"array","Section Types sharing an index with 'content' - Used to determine position/size.",null,{tags:["Private"]});class WidgetDiv{constructor(div){__publicField2(this,"_div"),__publicField2(this,"_overlay",!1),__publicField2(this,"_overflowX","visible"),__publicField2(this,"_overflowY","visible"),__publicField2(this,"_widget"),this._div=div}overlay(_2){return arguments.length?(this._overlay=_2,this):this._overlay}overflowX(_2){return arguments.length?(this._overflowX=_2,this._div.style("overflow-x",_2),this):this._overflowX}overflowY(_2){return arguments.length?(this._overflowY=_2,this._div.style("overflow-y",_2),this):this._overflowY}element(){return this._div}node(){return this._div.node()}widget(_2){return arguments.length?(this._widget!==_2&&(this._widget&&this._widget.target(null),this._widget=_2,this._widget&&this._widget.target(this._div.node())),this):this._widget}resize(size){return this._widget&&(this._div.style("width",`${size.width}px`).style("height",`${size.height}px`),this._widget.resize(size)),this}async render(getBBox,availableHeight,availableWidth){let overflowX=this.overflowX();!this.overlay()&&overflowX==="visible"&&(overflowX=null);let overflowY=this.overflowY();return!this.overlay()&&overflowY==="visible"&&(overflowY=null),this._div.style("height",this.overlay()?"0px":null).style("overflow-x",overflowX).style("overflow-y",overflowY),this._widget?this._widget.renderPromise().then(w2=>{if(getBBox&&this._widget.visible()){const retVal=this._widget.getBBox();return retVal.width+=8,availableHeight!==void 0&&retVal.height>availableHeight&&(retVal.width+=common.Platform.getScrollbarWidth()),availableWidth!==void 0&&retVal.width>availableWidth&&(retVal.height+=common.Platform.getScrollbarWidth()),this.overlay()?retVal.height=0:retVal.height+=4,retVal}return getBBox?{x:0,y:0,width:0,height:0}:void 0}):Promise.resolve(getBBox?{x:0,y:0,width:0,height:0}:void 0)}}class Border2 extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_bodyElement"),__publicField2(this,"_topWA"),__publicField2(this,"_leftWA"),__publicField2(this,"_centerWA"),__publicField2(this,"_rightWA"),__publicField2(this,"_bottomWA"),__publicField2(this,"_topPrevOverflow"),__publicField2(this,"_leftPrevOverflow"),__publicField2(this,"_rightPrevOverflow"),__publicField2(this,"_bottomPrevOverflow"),this._tag="div"}enter(domNode,element){super.enter(domNode,element);const topElement=element.append("header");this._bodyElement=element.append("div").attr("class","body");const centerElement=this._bodyElement.append("div").attr("class","center"),leftElement=this._bodyElement.append("div").attr("class","lhs"),rightElement=this._bodyElement.append("div").attr("class","rhs"),bottomElement=element.append("div").attr("class","footer");this._topWA=new WidgetDiv(topElement),this._centerWA=new WidgetDiv(centerElement),this._leftWA=new WidgetDiv(leftElement),this._rightWA=new WidgetDiv(rightElement),this._bottomWA=new WidgetDiv(bottomElement)}update(domNode,element){super.update(domNode,element),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(w2){w2&&w2.target(null)}exit(domNode,element){this.targetNull(this.center()),this.targetNull(this.bottom()),this.targetNull(this.right()),this.targetNull(this.left()),this.targetNull(this.top()),super.exit(domNode,element)}swap(sectionA,sectionB){const a2=this[sectionA](),b2=this[sectionB]();return this.targetNull(a2),this.targetNull(b2),this[`_${sectionA}WA`].widget(null),this[`_${sectionB}WA`].widget(null),this[sectionA](b2),this[sectionB](a2),this}render(callback){return super.render(w2=>{this._topWA?this._topWA.widget(this.top()).overlay(this.topOverlay()).render(!0).then(async topBBox=>{const bottomBBox=await this._bottomWA.widget(this.bottom()).render(!0,void 0,this.width()),availableHeight=this.height()-(topBBox.height+bottomBBox.height),leftBBox=await this._leftWA.widget(this.left()).render(!0,availableHeight),rightBBox=await this._rightWA.widget(this.right()).render(!0,availableHeight);this.bottomHeight_exists()&&(bottomBBox.height=this.bottomHeight());const bodyWidth=this.width()-(leftBBox.width+rightBBox.width),bodyHeight=this.height()-(topBBox.height+bottomBBox.height),centerOverflowX=this.centerOverflowX(),centerOverflowY=this.centerOverflowY(),scrollCenterX=["auto","scroll"].indexOf(centerOverflowX)!==-1,scrollCenterY=["auto","scroll"].indexOf(centerOverflowY)!==-1;(scrollCenterX||scrollCenterY)&&this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:bodyWidth,height:bodyHeight}).render(),this._bodyElement.style("height",`${bodyHeight}px`);const promises=[this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({width:this.width(),height:topBBox.height}).render(),this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({width:leftBBox.width,height:bodyHeight}).render(),this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({width:rightBBox.width,height:bodyHeight}).render(),this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({width:bodyWidth,height:bodyHeight}).render(),this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({width:this.width(),height:bottomBBox.height}).render()];Promise.all(promises).then(promises2=>{callback&&callback(this)})}):callback&&callback(this)})}}Border2.prototype._class+=" layout_Border2",Border2.prototype.publish("showTop",!0,"boolean","If true, top widget adapter will display"),Border2.prototype.publish("showRight",!0,"boolean","If true, right widget adapter will display"),Border2.prototype.publish("showBottom",!0,"boolean","If true, bottom widget adapter will display"),Border2.prototype.publish("showLeft",!0,"boolean","If true, left widget adapter will display"),Border2.prototype.publish("topOverflowX","visible","set","Sets the overflow-x css style for the top widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("rightOverflowX","visible","set","Sets the overflow-x css style for the right widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("bottomOverflowX","visible","set","Sets the overflow-x css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("leftOverflowX","visible","set","Sets the overflow-x css style for the left widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("centerOverflowX","visible","set","Sets the overflow-x css style for the center widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("topOverflowY","visible","set","Sets the overflow-y css style for the top widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("rightOverflowY","visible","set","Sets the overflow-y css style for the right widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("bottomOverflowY","visible","set","Sets the overflow-y css style for the bottom widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("leftOverflowY","visible","set","Sets the overflow-y css style for the left widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("centerOverflowY","visible","set","Sets the overflow-y css style for the center widget adapter",["hidden","scroll","visible","auto"]),Border2.prototype.publish("top",null,"widget","Top Widget",void 0,{render:!1}),Border2.prototype.publish("topOverlay",!1,"boolean","Overlay Top Widget"),Border2.prototype.publish("left",null,"widget","Left Widget",void 0,{render:!1}),Border2.prototype.publish("center",null,"widget","Center Widget",void 0,{render:!1}),Border2.prototype.publish("right",null,"widget","Right Widget",void 0,{render:!1}),Border2.prototype.publish("bottom",null,"widget","Bottom Widget",void 0,{render:!1}),Border2.prototype.publish("bottomHeight",null,"number","Bottom Fixed Height",void 0,{optional:!0});class Carousel extends common.HTMLWidget{constructor(){super(...arguments),__publicField2(this,"_prevActive",0),__publicField2(this,"_root")}activeWidget(){return this.widgets()[this.active()]}enter(domNode,element){super.enter(domNode,element),this._root=element.append("div").attr("id",`${this.id()}_root`)}update(domNode,element){super.update(domNode,element);const active=this.active(),width=this.width();this._root.style("width",`${width}px`).style("height",`${this.height()}px`);const widgetElements=this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(),d2=>d2.id()),update=widgetElements.enter().append("div").attr("class","carouselItem").each(function(w2){w2.target(this)}).merge(widgetElements).style("left",(d2,i2)=>`${(i2-this._prevActive)*width}px`).style("width",`${width}px`);this._prevActive!==active&&(update.style("display",(d2,i2)=>i2===this._prevActive||i2===active?null:"none").transition().duration(this.transitionDuration()).style("left",(d2,i2)=>`${(i2-active)*width}px`).on("end",function(d2,i2){common.select(this).style("display",()=>i2===active?null:"none")}),this._prevActive=active),widgetElements.exit().each(function(w2){w2.target(null)}).remove()}exit(domNode,element){this.widgets().forEach(w2=>w2.target(null)),super.exit(domNode,element)}render(callback){return super.render(w2=>{if(!this.visible()||this.isDOMHidden())callback&&callback(w2);else{const aw=this.activeWidget();aw&&aw.resize(this.size()).render(w22=>{callback&&callback(w2)})}})}}Carousel.prototype._class+=" layout_Carousel",Carousel.prototype.publish("widgets",[],"widgetArray","Widgets",null,{render:!1}),Carousel.prototype.publish("active",0,"number","Active widget"),Carousel.prototype.publish("transitionDuration",500,"number","Transition duration");var pi$1=Math.PI,tau$1=2*pi$1,epsilon=1e-6,tauEpsilon=tau$1-epsilon;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path(){return new Path}Path.prototype=path.prototype={constructor:Path,moveTo:function(x2,y2){this._+="M"+(this._x0=this._x1=+x2)+","+(this._y0=this._y1=+y2)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(x2,y2){this._+="L"+(this._x1=+x2)+","+(this._y1=+y2)},quadraticCurveTo:function(x1,y1,x2,y2){this._+="Q"+ +x1+","+ +y1+","+(this._x1=+x2)+","+(this._y1=+y2)},bezierCurveTo:function(x1,y1,x2,y2,x3,y3){this._+="C"+ +x1+","+ +y1+","+ +x2+","+ +y2+","+(this._x1=+x3)+","+(this._y1=+y3)},arcTo:function(x1,y1,x2,y2,r2){x1=+x1,y1=+y1,x2=+x2,y2=+y2,r2=+r2;var x0=this._x1,y0=this._y1,x21=x2-x1,y21=y2-y1,x01=x0-x1,y01=y0-y1,l01_2=x01*x01+y01*y01;if(r2<0)throw new Error("negative radius: "+r2);if(this._x1===null)this._+="M"+(this._x1=x1)+","+(this._y1=y1);else if(l01_2>epsilon)if(!(Math.abs(y01*x21-y21*x01)>epsilon)||!r2)this._+="L"+(this._x1=x1)+","+(this._y1=y1);else{var x20=x2-x0,y20=y2-y0,l21_2=x21*x21+y21*y21,l20_2=x20*x20+y20*y20,l21=Math.sqrt(l21_2),l01=Math.sqrt(l01_2),l2=r2*Math.tan((pi$1-Math.acos((l21_2+l01_2-l20_2)/(2*l21*l01)))/2),t01=l2/l01,t21=l2/l21;Math.abs(t01-1)>epsilon&&(this._+="L"+(x1+t01*x01)+","+(y1+t01*y01)),this._+="A"+r2+","+r2+",0,0,"+ +(y01*x20>x01*y20)+","+(this._x1=x1+t21*x21)+","+(this._y1=y1+t21*y21)}},arc:function(x2,y2,r2,a0,a1,ccw){x2=+x2,y2=+y2,r2=+r2,ccw=!!ccw;var dx=r2*Math.cos(a0),dy=r2*Math.sin(a0),x0=x2+dx,y0=y2+dy,cw=1^ccw,da=ccw?a0-a1:a1-a0;if(r2<0)throw new Error("negative radius: "+r2);this._x1===null?this._+="M"+x0+","+y0:(Math.abs(this._x1-x0)>epsilon||Math.abs(this._y1-y0)>epsilon)&&(this._+="L"+x0+","+y0),r2&&(da<0&&(da=da%tau$1+tau$1),da>tauEpsilon?this._+="A"+r2+","+r2+",0,1,"+cw+","+(x2-dx)+","+(y2-dy)+"A"+r2+","+r2+",0,1,"+cw+","+(this._x1=x0)+","+(this._y1=y0):da>epsilon&&(this._+="A"+r2+","+r2+",0,"+ +(da>=pi$1)+","+cw+","+(this._x1=x2+r2*Math.cos(a1))+","+(this._y1=y2+r2*Math.sin(a1))))},rect:function(x2,y2,w2,h2){this._+="M"+(this._x0=this._x1=+x2)+","+(this._y0=this._y1=+y2)+"h"+ +w2+"v"+ +h2+"h"+-w2+"Z"},toString:function(){return this._}};function constant(x2){return function(){return x2}}var pi=Math.PI,tau=2*pi;const d3SymbolCircle={draw:function(context,size){var r2=Math.sqrt(size/pi);context.moveTo(r2,0),context.arc(0,0,r2,0,tau)}},d3SymbolCross={draw:function(context,size){var r2=Math.sqrt(size/5)/2;context.moveTo(-3*r2,-r2),context.lineTo(-r2,-r2),context.lineTo(-r2,-3*r2),context.lineTo(r2,-3*r2),context.lineTo(r2,-r2),context.lineTo(3*r2,-r2),context.lineTo(3*r2,r2),context.lineTo(r2,r2),context.lineTo(r2,3*r2),context.lineTo(-r2,3*r2),context.lineTo(-r2,r2),context.lineTo(-3*r2,r2),context.closePath()}};var tan30=Math.sqrt(1/3),tan30_2=tan30*2;const d3SymbolDiamond={draw:function(context,size){var y2=Math.sqrt(size/tan30_2),x2=y2*tan30;context.moveTo(0,-y2),context.lineTo(x2,0),context.lineTo(0,y2),context.lineTo(-x2,0),context.closePath()}};var ka=.8908130915292852,kr=Math.sin(pi/10)/Math.sin(7*pi/10),kx=Math.sin(tau/10)*kr,ky=-Math.cos(tau/10)*kr;const d3SymbolStar={draw:function(context,size){var r2=Math.sqrt(size*ka),x2=kx*r2,y2=ky*r2;context.moveTo(0,-r2),context.lineTo(x2,y2);for(var i2=1;i2<5;++i2){var a2=tau*i2/5,c2=Math.cos(a2),s2=Math.sin(a2);context.lineTo(s2*r2,-c2*r2),context.lineTo(c2*x2-s2*y2,s2*x2+c2*y2)}context.closePath()}},d3SymbolSquare={draw:function(context,size){var w2=Math.sqrt(size),x2=-w2/2;context.rect(x2,x2,w2,w2)}};var sqrt3=Math.sqrt(3);const d3SymbolTriangle={draw:function(context,size){var y2=-Math.sqrt(size/(sqrt3*3));context.moveTo(0,y2*2),context.lineTo(-sqrt3*y2,-y2),context.lineTo(sqrt3*y2,-y2),context.closePath()}};var c=-.5,s=Math.sqrt(3)/2,k=1/Math.sqrt(12),a=(k/2+1)*3;const d3SymbolWye={draw:function(context,size){var r2=Math.sqrt(size/a),x0=r2/2,y0=r2*k,x1=x0,y1=r2*k+r2,x2=-x1,y2=y1;context.moveTo(x0,y0),context.lineTo(x1,y1),context.lineTo(x2,y2),context.lineTo(c*x0-s*y0,s*x0+c*y0),context.lineTo(c*x1-s*y1,s*x1+c*y1),context.lineTo(c*x2-s*y2,s*x2+c*y2),context.lineTo(c*x0+s*y0,c*y0-s*x0),context.lineTo(c*x1+s*y1,c*y1-s*x1),context.lineTo(c*x2+s*y2,c*y2-s*x2),context.closePath()}};function d3Symbol(){var type=constant(d3SymbolCircle),size=constant(64),context=null;function symbol(){var buffer;if(context||(context=buffer=path()),type.apply(this,arguments).draw(context,+size.apply(this,arguments)),buffer)return context=null,buffer+""||null}return symbol.type=function(_2){return arguments.length?(type=typeof _2=="function"?_2:constant(_2),symbol):type},symbol.size=function(_2){return arguments.length?(size=typeof _2=="function"?_2:constant(+_2),symbol):size},symbol.context=function(_2){return arguments.length?(context=_2??null,symbol):context},symbol}var _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol=="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},d3_identity=function(d2){return d2},d3_reverse=function(arr){for(var mirror=[],i2=0,l2=arr.length;i2<l2;i2++)mirror[i2]=arr[l2-i2-1];return mirror},d3_textWrapping=function(text,width){text.each(function(){var text2=common.select(this),words=text2.text().split(/\s+/).reverse(),word,line=[],lineHeight=1.2;text2.attr("y");for(var dy=parseFloat(text2.attr("dy"))||0,tspan=text2.text(null).append("tspan").attr("x",0).attr("dy",dy+"em");word=words.pop();)line.push(word),tspan.text(line.join(" ")),tspan.node().getComputedTextLength()>width&&line.length>1&&(line.pop(),tspan.text(line.join(" ")),line=[word],tspan=text2.append("tspan").attr("x",0).attr("dy",lineHeight+dy+"em").text(word))})},d3_mergeLabels=function(){var gen=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],labels=arguments[1],domain=arguments[2],range=arguments[3],labelDelimiter=arguments[4];if((typeof labels>"u"?"undefined":_typeof(labels))==="object"){if(labels.length===0)return gen;for(var i2=labels.length;i2<gen.length;i2++)labels.push(gen[i2]);return labels}else if(typeof labels=="function"){for(var customLabels=[],genLength=gen.length,_i=0;_i<genLength;_i++)customLabels.push(labels({i:_i,genLength,generatedLabels:gen,domain,range,labelDelimiter}));return customLabels}return gen},d3_linearLegend=function(scale,cells,labelFormat){var data=[];if(cells.length>1)data=cells;else for(var domain=scale.domain(),increment=(domain[domain.length-1]-domain[0])/(cells-1),i2=0;i2<cells;i2++)data.push(domain[0]+i2*increment);var labels=data.map(labelFormat);return{data,labels,feature:function(d2){return scale(d2)}}},d3_quantLegend=function(scale,labelFormat,labelDelimiter){var labels=scale.range().map(function(d2){var invert=scale.invertExtent(d2);return labelFormat(invert[0])+" "+labelDelimiter+" "+labelFormat(invert[1])});return{data:scale.range(),labels,feature:d3_identity}},d3_ordinalLegend=function(scale){return{data:scale.domain(),labels:scale.domain(),feature:function(d2){return scale(d2)}}},d3_cellOver=function(cellDispatcher,d2,obj){cellDispatcher.call("cellover",obj,d2)},d3_cellOut=function(cellDispatcher,d2,obj){cellDispatcher.call("cellout",obj,d2)},d3_cellClick=function(cellDispatcher,d2,obj){cellDispatcher.call("cellclick",obj,d2)},helper={d3_drawShapes:function(shape,shapes,shapeHeight,shapeWidth,shapeRadius,path2){shape==="rect"?shapes.attr("height",shapeHeight).attr("width",shapeWidth):shape==="circle"?shapes.attr("r",shapeRadius):shape==="line"?shapes.attr("x1",0).attr("x2",shapeWidth).attr("y1",0).attr("y2",0):shape==="path"&&shapes.attr("d",path2)},d3_addText:function(svg,enter,labels,classPrefix,labelWidth){enter.append("text").attr("class",classPrefix+"label");var text=svg.selectAll("g."+classPrefix+"cell text."+classPrefix+"label").data(labels).text(d3_identity);return labelWidth&&svg.selectAll("g."+classPrefix+"cell text."+classPrefix+"label").call(d3_textWrapping,labelWidth),text},d3_calcType:function(scale,ascending,cells,labels,labelFormat,labelDelimiter){var type=scale.invertExtent?d3_quantLegend(scale,labelFormat,labelDelimiter):scale.ticks?d3_linearLegend(scale,cells,labelFormat):d3_ordinalLegend(scale),range=scale.range&&scale.range()||scale.domain();return type.labels=d3_mergeLabels(type.labels,labels,scale.domain(),range,labelDelimiter),ascending&&(type.labels=d3_reverse(type.labels),type.data=d3_reverse(type.data)),type},d3_filterCells:function(type,cellFilter){var filterCells=type.data.map(function(d2,i2){return{data:d2,label:type.labels[i2]}}).filter(cellFilter),dataValues=filterCells.map(function(d2){return d2.data}),labelValues=filterCells.map(function(d2){return d2.label});return type.data=type.data.filter(function(d2){return dataValues.indexOf(d2)!==-1}),type.labels=type.labels.filter(function(d2){return labelValues.indexOf(d2)!==-1}),type},d3_placement:function(orient,cell2,cellTrans,text,textTrans,labelAlign){cell2.attr("transform",cellTrans),text.attr("transform",textTrans),orient==="horizontal"&&text.style("text-anchor",labelAlign)},d3_addEvents:function(cells,dispatcher){cells.on("mouseover.legend",function(d2){d3_cellOver(dispatcher,d2,this)}).on("mouseout.legend",function(d2){d3_cellOut(dispatcher,d2,this)}).on("click.legend",function(d2){d3_cellClick(dispatcher,d2,this)})},d3_title:function(svg,title,classPrefix,titleWidth){if(title!==""){var titleText=svg.selectAll("text."+classPrefix+"legendTitle");titleText.data([title]).enter().append("text").attr("class",classPrefix+"legendTitle"),svg.selectAll("text."+classPrefix+"legendTitle").text(title),titleWidth&&svg.selectAll("text."+classPrefix+"legendTitle").call(d3_textWrapping,titleWidth);var cellsSvg=svg.select("."+classPrefix+"legendCells"),yOffset=svg.select("."+classPrefix+"legendTitle").nodes().map(function(d2){return d2.getBBox().height})[0],xOffset=-cellsSvg.nodes().map(function(d2){return d2.getBBox().x})[0];cellsSvg.attr("transform","translate("+xOffset+","+yOffset+")")}},d3_defaultLocale:{format:common.format,formatPrefix:common.formatPrefix},d3_defaultFormatSpecifier:".01f",d3_defaultDelimiter:"to"};function color(){var scale=common.scaleLinear(),shape="rect",shapeWidth=15,shapeHeight=15,shapeRadius=10,shapePadding=2,cells=[5],cellFilter=void 0,labels=[],classPrefix="",useClass=!1,title="",locale=helper.d3_defaultLocale,specifier=helper.d3_defaultFormatSpecifier,labelOffset=10,labelAlign="middle",labelDelimiter=helper.d3_defaultDelimiter,labelWrap=void 0,orient="vertical",ascending=!1,path2=void 0,titleWidth=void 0,legendDispatcher=common.dispatch("cellover","cellout","cellclick");function legend(svg){var type=helper.d3_calcType(scale,ascending,cells,labels,locale.format(specifier),labelDelimiter),legendG=svg.selectAll("g").data([scale]);legendG.enter().append("g").attr("class",classPrefix+"legendCells"),cellFilter&&helper.d3_filterCells(type,cellFilter);var cell2=svg.select("."+classPrefix+"legendCells").selectAll("."+classPrefix+"cell").data(type.data),cellEnter=cell2.enter().append("g").attr("class",classPrefix+"cell");cellEnter.append(shape).attr("class",classPrefix+"swatch");var shapes=svg.selectAll("g."+classPrefix+"cell "+shape+"."+classPrefix+"swatch").data(type.data);helper.d3_addEvents(cellEnter,legendDispatcher),cell2.exit().transition().style("opacity",0).remove(),shapes.exit().transition().style("opacity",0).remove(),shapes=shapes.merge(shapes),helper.d3_drawShapes(shape,shapes,shapeHeight,shapeWidth,shapeRadius,path2);var text=helper.d3_addText(svg,cellEnter,type.labels,classPrefix,labelWrap);cell2=cellEnter.merge(cell2);var textSize=text.nodes().map(function(d2){return d2.getBBox()}),shapeSize=shapes.nodes().map(function(d2){return d2.getBBox()});useClass?shapes.attr("class",function(d2){return classPrefix+"swatch "+type.feature(d2)}):shape=="line"?shapes.style("stroke",type.feature):shapes.style("fill",type.feature);var cellTrans=void 0,textTrans=void 0,textAlign=labelAlign=="start"?0:labelAlign=="middle"?.5:1;orient==="vertical"?function(){var cellSize=textSize.map(function(d2,i2){return Math.max(d2.height,shapeSize[i2].height)});cellTrans=function(d2,i2){var height=common.sum(cellSize.slice(0,i2));return"translate(0, "+(height+i2*shapePadding)+")"},textTrans=function(d2,i2){return"translate( "+(shapeSize[i2].width+shapeSize[i2].x+labelOffset)+", "+(shapeSize[i2].y+shapeSize[i2].height/2+5)+")"}}():orient==="horizontal"&&(cellTrans=function(d2,i2){return"translate("+i2*(shapeSize[i2].width+shapePadding)+",0)"},textTrans=function(d2,i2){return"translate("+(shapeSize[i2].width*textAlign+shapeSize[i2].x)+`,
3
+ `+(shapeSize[i2].height+shapeSize[i2].y+labelOffset+8)+")"}),helper.d3_placement(orient,cell2,cellTrans,text,textTrans,labelAlign),helper.d3_title(svg,title,classPrefix,titleWidth),cell2.transition().style("opacity",1)}return legend.scale=function(_2){return arguments.length?(scale=_2,legend):scale},legend.cells=function(_2){return arguments.length?((_2.length>1||_2>=2)&&(cells=_2),legend):cells},legend.cellFilter=function(_2){return arguments.length?(cellFilter=_2,legend):cellFilter},legend.shape=function(_2,d2){return arguments.length?((_2=="rect"||_2=="circle"||_2=="line"||_2=="path"&&typeof d2=="string")&&(shape=_2,path2=d2),legend):shape},legend.shapeWidth=function(_2){return arguments.length?(shapeWidth=+_2,legend):shapeWidth},legend.shapeHeight=function(_2){return arguments.length?(shapeHeight=+_2,legend):shapeHeight},legend.shapeRadius=function(_2){return arguments.length?(shapeRadius=+_2,legend):shapeRadius},legend.shapePadding=function(_2){return arguments.length?(shapePadding=+_2,legend):shapePadding},legend.labels=function(_2){return arguments.length?(labels=_2,legend):labels},legend.labelAlign=function(_2){return arguments.length?((_2=="start"||_2=="end"||_2=="middle")&&(labelAlign=_2),legend):labelAlign},legend.locale=function(_2){return arguments.length?(locale=common.formatLocale(_2),legend):locale},legend.labelFormat=function(_2){return arguments.length?(specifier=common.formatSpecifier(_2),legend):legend.locale().format(specifier)},legend.labelOffset=function(_2){return arguments.length?(labelOffset=+_2,legend):labelOffset},legend.labelDelimiter=function(_2){return arguments.length?(labelDelimiter=_2,legend):labelDelimiter},legend.labelWrap=function(_2){return arguments.length?(labelWrap=_2,legend):labelWrap},legend.useClass=function(_2){return arguments.length?((_2===!0||_2===!1)&&(useClass=_2),legend):useClass},legend.orient=function(_2){return arguments.length?(_2=_2.toLowerCase(),(_2=="horizontal"||_2=="vertical")&&(orient=_2),legend):orient},legend.ascending=function(_2){return arguments.length?(ascending=!!_2,legend):ascending},legend.classPrefix=function(_2){return arguments.length?(classPrefix=_2,legend):classPrefix},legend.title=function(_2){return arguments.length?(title=_2,legend):title},legend.titleWidth=function(_2){return arguments.length?(titleWidth=_2,legend):titleWidth},legend.textWrap=function(_2){return arguments.length?(textWrap=_2,legend):textWrap},legend.on=function(){var value=legendDispatcher.on.apply(legendDispatcher,arguments);return value===legendDispatcher?legend:value},legend}class Legend extends common.SVGWidget{constructor(owner){super(),__publicField2(this,"_owner"),__publicField2(this,"_targetWidget"),__publicField2(this,"_targetWidgetMonitor"),__publicField2(this,"_legendOrdinal"),__publicField2(this,"_disabled",[]),__publicField2(this,"_symbolTypeMap",{circle:d3SymbolCircle,cross:d3SymbolCross,diamond:d3SymbolDiamond,square:d3SymbolSquare,star:d3SymbolStar,triangle:d3SymbolTriangle,wye:d3SymbolWye}),__publicField2(this,"_g"),__publicField2(this,"_containerSize"),this._owner=owner,this._drawStartPos="origin";const context=this;this._legendOrdinal=color().shape("path",d3Symbol().type(d3SymbolCircle).size(150)()).shapePadding(10).shapeRadius(10).on("cellclick",function(d2){context.onClick(d2,this)}).on("cellover",d2=>{context.onOver(d2,this)}).on("cellout",d2=>{context.onOut(d2,this)})}isDisabled(d2){return typeof d2>"u"?!1:typeof d2=="string"?d2.indexOf("__")===0||this._disabled.indexOf(d2)>=0:d2 instanceof common.Database.Field?d2.id().indexOf("__")===0||this._disabled.indexOf(d2.id())>=0:this._disabled.indexOf(d2)>=0}filteredFields(){switch(this.dataFamily()){case"2D":return this.fields();case"ND":return this.fields().filter(d2=>!this.isDisabled(d2))}return this.fields()}filteredColumns(){switch(this.dataFamily()){case"2D":return this.columns();case"ND":return this.columns().filter(d2=>!this.isDisabled(d2))}return this.columns()}filteredData(){switch(this.dataFamily()){case"2D":return this.data().filter(row2=>!this.isDisabled(row2[0]));case"ND":const disabledCols={};let anyDisabled=!1;return this.columns().forEach((col,idx)=>{const disabled=this.isDisabled(col);disabledCols[idx]=disabled,disabled&&(anyDisabled=!0)}),anyDisabled?this.data().map(row2=>row2.filter((cell2,idx)=>!disabledCols[idx])):this.data()}return this.data()}isRainbow(){const widget=this.getWidget();return widget&&widget._palette&&widget._palette.type()==="rainbow"}targetWidget(_2){if(!arguments.length)return this._targetWidget;if(this._targetWidget=_2,this._targetWidgetMonitor&&(this._targetWidgetMonitor.remove(),delete this._targetWidgetMonitor),this._targetWidget){const context=this;this._targetWidgetMonitor=this._targetWidget.monitor(function(key,newProp,oldProp,source){switch(key){case"chart":case"columns":case"data":case"paletteID":context.lazyRender();break}})}return this}getWidget(){if(this._targetWidget)switch(this._targetWidget.classID()){case"composite_MultiChart":return this._targetWidget.chart()}return this._targetWidget}getPalette(){const widget=this.getWidget();if(widget&&widget._palette)switch(widget._palette.type()){case"ordinal":return common.Palette.ordinal(widget._palette.id());case"rainbow":return common.Palette.rainbow(widget._palette.id())}return common.Palette.ordinal("default")}getPaletteType(){return this.getPalette().type()}fillColorFunc(){const widget=this.getWidget();if(widget&&widget.fillColor)return widget._palette&&widget.paletteID&&widget._palette.name!==widget.paletteID()&&(widget._palette=widget._palette.switch(widget.paletteID())),(row2,col,sel)=>widget.fillColor(row2,col,sel);const palette=common.Palette.ordinal(widget&&widget.paletteID&&widget.paletteID()||"default");return(row2,col,sel)=>palette(col)}fillColor(row2,col,sel){return this.fillColorFunc()(row2,col,sel)}enter(domNode,element){super.enter(domNode,element),this._g=element.append("g").attr("class","legendOrdinal")}calcMetaData(){let dataArr=[],total=0,maxLabelWidth=0;const colLength=this.columns().length;if(this._targetWidget){const columns=this.columns();switch(this.getPaletteType()){case"ordinal":const fillColor=this.fillColorFunc();let val=0;switch(this.dataFamily()){case"2D":dataArr=this.data().map(function(n2,i2){val=this.data()[i2].slice(1,colLength).reduce((acc,n22)=>acc+n22,0);const disabled=this.isDisabled(n2[0]);disabled||(total+=val);const label=n2[0]+(!disabled&&this.showSeriesTotal()?` (${val})`:""),textSize=this.textSize(label);return maxLabelWidth<textSize.width&&(maxLabelWidth=textSize.width),[fillColor(n2,n2[0],!1),n2[0],label]},this);break;case"ND":dataArr=this.columns().filter(col=>col.indexOf("__")!==0).filter(function(n2,i2){return i2>0}).map(function(n2,i2){val=this.data().reduce((acc,n22)=>acc+n22[i2+1],0);const disabled=this.isDisabled(columns[i2+1]),label=n2+(!disabled&&this.showSeriesTotal()?` (${val})`:"");disabled||(total+=val);const textSize=this.textSize(label);return maxLabelWidth<textSize.width&&(maxLabelWidth=textSize.width),[fillColor(void 0,n2,!1),n2,label]},this);break;default:dataArr=this.columns().map(function(n2){return[fillColor(void 0,n2,!1),n2]},this);break}break;case"rainbow":const palette=this.getPalette(),format$1=common.format(this.rainbowFormat()),widget=this.getWidget(),steps=this.rainbowBins(),weightMin=widget._dataMinWeight,weightMax=widget._dataMaxWeight,stepWeightDiff=(weightMax-weightMin)/(steps-1);dataArr.push([palette(weightMin,weightMin,weightMax),format$1(weightMin)]);for(let x2=1;x2<steps-1;++x2){let mid=stepWeightDiff*x2;Math.floor(mid)>parseInt(dataArr[0][1])&&(mid=Math.floor(mid)),dataArr.push([palette(mid,weightMin,weightMax),format$1(mid)])}dataArr.push([palette(weightMax,weightMin,weightMax),format$1(weightMax)]);break}}return{dataArr,total,maxLabelWidth}}update(domNode,element){super.update(domNode,element);const{dataArr,maxLabelWidth,total}=this.calcMetaData(),radius=this.shapeRadius(),size=this.radiusToSymbolSize(radius),strokeWidth=1;let shapePadding=this.itemPadding();this.orientation()==="horizontal"&&(shapePadding+=maxLabelWidth-radius*2);const ordinal=common.scaleOrdinal().domain(dataArr.map(row2=>row2[1])).range(dataArr.map(row2=>row2[0]));this._legendOrdinal.shape("path",d3Symbol().type(this._symbolTypeMap[this.symbolType()]).size(size)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(shapePadding).scale(ordinal).labels(d2=>dataArr[d2.i][2]),this._g.call(this._legendOrdinal),this.updateDisabled(element,dataArr);const legendCellsBbox=this._g.select(".legendCells").node().getBBox();let offsetX=Math.abs(legendCellsBbox.x),offsetY=Math.abs(legendCellsBbox.y)+strokeWidth;if(this.orientation()==="horizontal"){if(this.labelAlign()==="start"?offsetX+=strokeWidth:this.labelAlign()==="end"&&(offsetX-=strokeWidth),this.width()>legendCellsBbox.width){const extraWidth=this.width()-legendCellsBbox.width;offsetX+=extraWidth/2}}else if(this.orientation()==="vertical"&&(offsetX+=strokeWidth,this._containerSize.height>legendCellsBbox.height)){const extraHeight=this.height()-legendCellsBbox.height;offsetY+=extraHeight/2}this._g.attr("transform",`translate(${offsetX}, ${offsetY})`),this.pos({x:0,y:0}),this._legendOrdinal.labelOffset(this.itemPadding());const legendTotal=this._g.selectAll(".legendTotal").data(dataArr.length&&this.showLegendTotal()?[total]:[]),totalText=`Total: ${total}`,totalOffsetX=-offsetX,totalOffsetY=legendCellsBbox.height+this.itemPadding()+strokeWidth;this.enableOverflowScroll(!1),this.enableOverflow(!0),legendTotal.enter().append("text").classed("legendTotal",!0).merge(legendTotal).attr("transform",`translate(${totalOffsetX}, ${totalOffsetY})`).text(totalText),legendTotal.exit().remove()}updateDisabled(element,dataArr){element.style("cursor","pointer").selectAll("path.swatch").filter((d2,i2)=>i2<dataArr.length).style("stroke",(d2,i2)=>dataArr[i2][0]).style("fill",(d2,i2)=>this._disabled.indexOf(d2)<0?dataArr[i2][0]:"white")}postUpdate(domNode,element){let w2;this._boundingBox&&(w2=this._boundingBox.width,this._boundingBox.width=this._size.width),super.postUpdate(domNode,element),w2!==void 0&&(this._boundingBox.width=w2),this._parentRelativeDiv.style("overflow","hidden")}exit(domNode,element){super.exit(domNode,element)}radiusToSymbolSize(radius){const circleSize=Math.pow(radius,2)*Math.PI;switch(this.symbolType()){case"star":return circleSize*.45;case"triangle":return circleSize*.65;case"cross":case"diamond":case"wye":return circleSize*.75;case"circle":return circleSize;case"square":return circleSize*1.3}}onClick(d2,domNode){switch(this.getPaletteType()){case"ordinal":switch(this.dataFamily()){case"2D":case"ND":const disabledIdx=this._disabled.indexOf(d2);disabledIdx<0?this._disabled.push(d2):this._disabled.splice(disabledIdx,1),this._owner.refreshColumns(),this._owner.refreshData(),this._owner.render();break}break}}onOver(d2,domNode){if(api.instanceOfIHighlight(this._owner))switch(this.getPaletteType()){case"ordinal":switch(this.dataFamily()){case"2D":case"ND":this._disabled.indexOf(d2)<0&&this._owner.highlightColumn(d2);break}break}}onOut(d2,domNode){if(api.instanceOfIHighlight(this._owner))switch(this.getPaletteType()){case"ordinal":switch(this.dataFamily()){case"2D":case"ND":this._owner.highlightColumn();break}break}}onDblClick(rowData,rowIdx){}onMouseOver(rowData,rowIdx){}resize(_size){let retVal;if(this.fitToContent()){this._containerSize=_size;const bbox=this.getBBox();_size.width>bbox.width&&(bbox.width=_size.width),_size.height>bbox.height&&(bbox.height=_size.height),retVal=super.resize.apply(this,[{...bbox}])}else retVal=super.resize.apply(this,arguments);return retVal}}Legend.prototype._class+=" layout_Legend",Legend.prototype.publish("title","","string","Title"),Legend.prototype.publish("symbolType","circle","set","Shape of each legend item",["circle","cross","diamond","square","star","triangle","wye"]),Legend.prototype.publish("labelMaxWidth",null,"number","Max Label Width (pixels)",null,{optional:!0}),Legend.prototype.publish("orientation","vertical","set","Orientation of Legend rows",["vertical","horizontal"],{tags:["Private"]}),Legend.prototype.publish("dataFamily","ND","set","Type of data",["1D","2D","ND","map","graph","any"],{tags:["Private"]}),Legend.prototype.publish("rainbowFormat",",","string","Rainbow number formatting",null,{tags:["Private"],optional:!0,disable:w2=>!w2.isRainbow()}),Legend.prototype.publish("rainbowBins",8,"number","Number of rainbow bins",null,{tags:["Private"],disable:w2=>!w2.isRainbow()}),Legend.prototype.publish("showSeriesTotal",!1,"boolean","Show value next to series"),Legend.prototype.publish("showLegendTotal",!1,"boolean","Show a total of the series values under the legend",null),Legend.prototype.publish("itemPadding",8,"number","Padding between legend items (pixels)"),Legend.prototype.publish("shapeRadius",7,"number","Radius of legend shape (pixels)"),Legend.prototype.publish("fitToContent",!0,"boolean","If true, resize will simply reapply the bounding box dimensions"),Legend.prototype.publish("labelAlign","start","set","Horizontal alignment of legend item label (for horizontal orientation only)",["start","middle","end"],{optional:!0,disable:w2=>w2.orientation()==="vertical"});class Modal extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_widget"),__publicField2(this,"_relativeTarget"),__publicField2(this,"_fade"),__publicField2(this,"_modal"),__publicField2(this,"_modalHeader"),__publicField2(this,"_modalBody"),__publicField2(this,"_modalHeaderAnnotations"),__publicField2(this,"_modalHeaderCloseButton"),__publicField2(this,"_close"),this._tag="div"}closeModal(){this.visible(!1)}getRelativeTarget(){let relativeTarget;return this.relativeTargetId()&&(relativeTarget=document.getElementById(this.relativeTargetId()),relativeTarget)?relativeTarget:!relativeTarget&&(relativeTarget=this.locateAncestor("layout_Grid"),relativeTarget&&relativeTarget.element)?relativeTarget.element().node():document.body}setModalSize(){this.fixedHeight()!==null&&this.fixedWidth()!==null?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 modalRect=this._modal.node().getBoundingClientRect(),headerRect=this._modalHeader.node().getBoundingClientRect();return this._modalBody.style("height",modalRect.height-headerRect.height+"px").style("width",modalRect.width),modalRect}setFadePosition(rect){this._fade.style("top",rect.top+"px").style("left",rect.left+"px").style("width",rect.width+"px").style("height",rect.height+"px")}setModalPosition(rect){const modalRect=this.setModalSize();if(this.fixedTop()!==null&&this.fixedLeft()!==null)this._modal.style("top",`calc(${this.fixedTop()} + ${rect.top}px)`).style("left",`calc(${this.fixedLeft()} + ${rect.left}px)`);else if(this.fixedHeight()!==null&&this.fixedWidth()!==null)this._modal.style("top",rect.top+rect.height/2-modalRect.height/2+"px").style("left",rect.left+rect.width/2-modalRect.width/2+"px");else if(this.minHeight()||this.minWidth()){const contentRect=this._modal.node().getBoundingClientRect();this._modal.style("top",rect.top+rect.height/2-contentRect.height/2+"px").style("left",rect.left+rect.width/2-contentRect.width/2+"px")}}resize(size){return super.resize(),this._modal&&this.setModalSize(),this}resizeBodySync(width,height){const headerRect=this._modalHeader.node().getBoundingClientRect();return this._modal.style("width",width+"px").style("height",height+headerRect.height+"px").style("min-width",width+"px").style("min-height",height+headerRect.height+"px"),this._modalHeader.style("width",width+"px"),this._modalBody.style("width",width+"px").style("height",height+"px"),this.minWidth(width+"px").minHeight(height+headerRect.height+"px").resize({height:height+headerRect.height,width})}enter(domNode,element){super.enter(domNode,element),this._fade=element.append("div").classed("layout_Modal-fade",!0).classed("layout_Modal-fadeClickable",this.enableClickFadeToClose()).classed("layout_Modal-fade-hidden",!this.showFade());const header_h=this.titleFontSize()*2;this._modal=element.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",header_h+"px"),this._modalBody=this._modal.append("div").classed("layout_Modal-body",!0).style("height",`calc( 100% - ${header_h}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",n2=>{this.enableClickFadeToClose()&&this.closeModal()})}update(domNode,element){super.update(domNode,element),element.style("display",this.show()?null:"none"),this._fade.classed("layout_Modal-fade-hidden",!this.showFade()),this._relativeTarget=this.getRelativeTarget(),this.setModalSize();const rect=this._relativeTarget.getBoundingClientRect();this.setFadePosition(rect),this.setModalPosition(rect),this.show()?(this._widget.target()||this._widget.target(this._modalBody.node()),this._widget.resize().render()):this._widget.target(null).render()}exit(domNode,element){this._widget&&this._widget.target(null),super.exit(domNode,element)}formattedTitle(){const title=this.title_exists()?this.title().trim():"";return title.length>0&&title.slice(0,1)==="("&&title.slice(-1)===")"?title.slice(1,-1):this.title()}}Modal.prototype._class+=" layout_Modal",Modal.prototype.publish("title",null,"string","title"),Modal.prototype.publish("widget",null,"widget","widget"),Modal.prototype.publish("titleFontSize",18,"number","titleFontSize (in pixels)"),Modal.prototype.publish("titleFontColor","#ffffff","html-color","titleFontColor"),Modal.prototype.publish("relativeTargetId",null,"string","relativeTargetId"),Modal.prototype.publish("show",!0,"boolean","show"),Modal.prototype.publish("showFade",!0,"boolean","showFade"),Modal.prototype.publish("enableClickFadeToClose",!0,"boolean","enableClickFadeToClose"),Modal.prototype.publish("minWidth","400px","string","minWidth"),Modal.prototype.publish("minHeight","400px","string","minHeight"),Modal.prototype.publish("maxWidth","800px","string","maxWidth"),Modal.prototype.publish("maxHeight","800px","string","maxHeight"),Modal.prototype.publish("fixedWidth",null,"string","fixedWidth"),Modal.prototype.publish("fixedHeight",null,"string","fixedHeight"),Modal.prototype.publish("fixedTop",null,"string","fixedTop"),Modal.prototype.publish("fixedLeft",null,"string","fixedLeft"),Modal.prototype.publish("overflowX","hidden","string","overflowX"),Modal.prototype.publish("overflowY","scroll","string","overflowY");class ChartPanel extends Border2{constructor(){super(),__publicField2(this,"_legend",new Legend(this).enableOverflow(!0)),__publicField2(this,"_progressBar",new common.ProgressBar),__publicField2(this,"_autoScale",!1),__publicField2(this,"_resolutions",{tiny:{width:100,height:100},small:{width:300,height:300}}),__publicField2(this,"_modal",new Modal),__publicField2(this,"_highlight"),__publicField2(this,"_scale"),__publicField2(this,"_orig_size"),__publicField2(this,"_toggleInfo",new common.ToggleButton().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 common.Text().text(this.description())).show(!0).render();const origCloseFunc=this._modal._close;this._modal._close=()=>{this._toggleInfo.selected(!1).render(),this._modal._close=origCloseFunc}}}).on("mouseMove",()=>{}).on("mouseOut",()=>{})),__publicField2(this,"_toggleData",new common.ToggleButton().faChar("fa-table").tooltip("Data").on("click",()=>{this.dataVisible(this._toggleData.selected()),this.render()})),__publicField2(this,"_buttonDownload",new common.Button().faChar("fa-download").tooltip("Download").on("click",()=>{this.downloadCSV()})),__publicField2(this,"_buttonDownloadImage",new common.Button().faChar("fa-image").tooltip("Download Image").on("click",()=>{this.downloadPNG()})),__publicField2(this,"_toggleLegend",new common.ToggleButton().faChar("fa-list-ul").tooltip("Legend").selected(!1).on("click",()=>{const selected=this._toggleLegend.selected();this.legendPosition()==="bottom"?this.showBottom(selected):this.legendPosition()==="right"&&this.showRight(selected),this.legendVisible(selected),this.render()})),__publicField2(this,"_spacer",new common.Spacer),__publicField2(this,"_titleBar",new common.TitleBar().buttons([this._toggleData,this._buttonDownload,this._buttonDownloadImage,this._spacer,this._toggleLegend])),__publicField2(this,"_carousel",new Carousel),__publicField2(this,"_table",new Table),__publicField2(this,"_widget"),__publicField2(this,"_hideLegendToggleList",["dgrid_Table"]),__publicField2(this,"_prevdataVisible"),__publicField2(this,"_prevlegendVisible"),__publicField2(this,"_prevLegendPosition"),__publicField2(this,"_prevChartDataFamily"),__publicField2(this,"_prevChart"),__publicField2(this,"_prevButtons"),this._tag="div"}fields(_2){return arguments.length?(super.fields(_2),this._legend.fields(_2),this.refreshFields(),this):super.fields()}refreshFields(){return this._widget.fields(this._legend.filteredFields()),this._table.fields(this._legend.filteredFields()),this}columns(_2,asDefault){return arguments.length?(super.columns(_2,asDefault),this._legend.columns(_2,asDefault),this.refreshColumns(),this):super.columns()}refreshColumns(){return this._widget.columns(this._legend.filteredColumns()),this._table.columns(this._legend.filteredColumns()),this}data(_2){return arguments.length?(super.data(_2),this._legend.data(_2),this.refreshData(),this):super.data()}refreshData(){return this._widget.data(this._legend.filteredData()),this._table.data(this._legend.filteredData()),this}highlight(_2){return arguments.length?(this._highlight=_2,this):this._highlight}startProgress(){this._progressBar.start()}finishProgress(){this._progressBar.finish()}buttons(_2){return arguments.length?(this._titleBar.buttons(_2),this):this._titleBar.buttons()}downloadCSV(){const namePrefix=this.downloadTitle()?this.downloadTitle():this.title()?this.title():"data",nameSuffix=this.downloadTimestampSuffix()?"_"+common.Utility.timestamp():"";return common.Utility.downloadString("CSV",this._widget.export("CSV"),namePrefix+nameSuffix),this}downloadPNG(){const widget=this.widget();return widget instanceof common.SVGWidget&&(this.legendVisible()?widget.downloadPNG(this.title(),void 0,this._legend):widget.downloadPNG(this.title())),this}highlightColumn(column){if(column){const cssTag=`series-${this.cssTag(column)}`;this._centerWA.element().selectAll(".series").each(function(){const element=common.select(this),highlight=element.classed(cssTag);element.classed("highlight",highlight).classed("lowlight",!highlight)})}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(domNode,element){super.enter(domNode,element),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(domNode,element),this.setOrigSize()}preUpdateTiny(element){element.selectAll("div.body,div.title-text,div.icon-bar").style("display","none")}preUpdateSmall(element){const scale_x=this._orig_size.width/this._resolutions.small.width,scale_y=this._orig_size.height/this._resolutions.small.height;this._scale=Math.min(scale_x,scale_y);const x_is_smaller=this._scale===scale_x;this.size({width:x_is_smaller?this._resolutions.small.width:this._orig_size.width*(1/this._scale),height:x_is_smaller?this._orig_size.height*(1/this._scale):this._resolutions.small.height}),element.select("div.title-icon").style("position","static"),element.selectAll("lhs").style("display","none"),element.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),element.selectAll("div.data-count").style("visibility","hidden"),element.style("transform",`scale(${this._scale})`)}preUpdateRegular(element){element.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),element.selectAll("div.data-count").style("visibility","hidden"),element.select("div.title-icon").style("position","static"),element.style("transform","translate(0px,0px) scale(1)")}update(domNode,element){if(super.update(domNode,element),this._table&&this.widget_exists()&&this.widget().class().indexOf("chart_XYAxis")>=0){const chart=this.widget();this._table.columns().forEach((column,idx)=>{switch(idx===0?chart.xAxisType():chart.yAxisType()){case"linear":case"log":case"pow":this._table.columnType(column,"number");break;case"time":this._table.columnType(column,"time");break;case"ordinal":default:this._table.columnType(column,"string")}this._table.columnPattern(column,idx===0?chart.xAxisTypeTimePattern():chart.yAxisTypeTimePattern()),this._table.columnFormat(column,idx===0?chart.xAxisTickFormat():chart.yAxisTickFormat())})}}preUpdate(domNode,element){switch(super.preUpdate(domNode,element),this._prevLegendPosition!==this.legendPosition()&&(this._legend.target()!==null&&this._legend.target(null),this._prevLegendPosition!==void 0?this.swap(this._prevLegendPosition,this.legendPosition()):this[this.legendPosition()](this._legend),this.legendPosition()==="right"?(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(this.legendPosition()==="bottom"?"horizontal":"vertical"),this.showLeft(!this.left()),this.getResponsiveMode()){case"tiny":this.preUpdateTiny(element);break;case"small":this.preUpdateSmall(element);break;case"regular":this.preUpdateRegular(element);break}const chart=this._widget.classID()==="composite_MultiChart"?this._widget.chart():this._widget;if(this._legend.dataFamily(chart._dataFamily||"any"),this._prevChartDataFamily!==this._legend.dataFamily())switch(this._prevChartDataFamily=this._legend.dataFamily(),this._prevChartDataFamily){case"any":this._toggleLegend.selected(!1),this._legend.visible(!1);break}if(element.style("box-shadow",this.highlight()?`inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}`:"none"),this._hideLegendToggleList.indexOf(chart.classID())!==-1?(this._spacer.visible(!1),this._toggleLegend.visible(!1)):(this._spacer.visible(!0),this._toggleLegend.visible(!0)),this._prevChart!==chart){this._prevChart=chart;const widgetIconBar=chart?chart._titleBar||chart._iconBar:void 0;if(widgetIconBar&&widgetIconBar instanceof common.IconBar){this._prevButtons=this._prevButtons||[...this.buttons()];const buttons=[...widgetIconBar.buttons(),new common.Spacer,...this._prevButtons];widgetIconBar.buttons([]).render(),this.buttons(buttons)}else this._prevButtons&&this.buttons(this._prevButtons)}const hiddenButtons=[];this.dataButtonVisible()||hiddenButtons.push(this._toggleData),this.downloadButtonVisible()||hiddenButtons.push(this._buttonDownload),this.downloadImageButtonVisible()||hiddenButtons.push(this._buttonDownloadImage),this.legendButtonVisible()||hiddenButtons.push(this._toggleLegend),this._buttonDownloadImage.enabled(this.widget()instanceof common.SVGWidget),this._titleBar.hiddenButtons(hiddenButtons).visible(this.titleVisible()),this.topOverlay(this.titleOverlay()||!this.titleVisible())}postUpdate(domNode,element){switch(super.postUpdate(domNode,element),this.getResponsiveMode()){case"tiny":this.postUpdateTiny(element);break;case"small":this.postUpdateSmall(element);break;case"regular":this.postUpdateRegular(element);break}}postUpdateTiny(element){element.selectAll("div.body,div.title-text,div.icon-bar").style("display","none"),element.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),element.style("transform","translate(0px,0px) scale(1)");const iconDiv=element.selectAll("div.title-icon"),_node=iconDiv.node(),containerRect=element.node().parentElement.getBoundingClientRect();if(_node){const rect=iconDiv.node().getBoundingClientRect(),icon_top=containerRect.height/2;iconDiv.style("position","absolute").style("left",`calc(50% - ${rect.width/2}px)`).style("top",`${icon_top-rect.height/2}px`),element.selectAll("div.data-count").style("position","absolute").style("left",`calc(50% + ${rect.width/2}px)`).style("top",`${icon_top-rect.height/2}px`)}}postUpdateSmall(element){element.selectAll("lhs").style("display","none"),element.selectAll("div.title-icon").style("position","static"),element.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),element.selectAll("div.data-count").style("visibility","hidden");const rect=element.node().getBoundingClientRect(),parentRect=element.node().parentElement.getBoundingClientRect();element.style("transform",`translate(${parentRect.x-rect.x}px, ${parentRect.y-rect.y}px) scale(${this._scale})`)}postUpdateRegular(element){element.selectAll("div.title-icon").style("position","static"),element.selectAll("div.body,div.title-text,div.icon-bar").style("display",""),element.selectAll("div.data-count").style("visibility","hidden")}exit(domNode,element){this._progressBar.exit(domNode,element),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(domNode,element)}click(row2,column,selected){}dblclick(row2,column,selected){}vertex_click(row2,col,sel,more){more&&more.vertex}vertex_dblclick(row2,col,sel,more){more&&more.vertex}edge_click(row2,col,sel,more){more&&more.edge}edge_dblclick(row2,col,sel,more){more&&more.edge}}ChartPanel.prototype._class+=" layout_ChartPanel",ChartPanel.prototype.publishReset(),ChartPanel.prototype.publishProxy("title","_titleBar"),ChartPanel.prototype.publish("titleVisible",!0,"boolean"),ChartPanel.prototype.publish("titleOverlay",!1,"boolean"),ChartPanel.prototype.publishProxy("titleIcon","_titleBar"),ChartPanel.prototype.publishProxy("titleIconFont","_titleBar"),ChartPanel.prototype.publishProxy("titleFont","_titleBar"),ChartPanel.prototype.publishProxy("titleIconFontSize","_titleBar"),ChartPanel.prototype.publishProxy("titleFontSize","_titleBar"),ChartPanel.prototype.publishProxy("description","_titleBar"),ChartPanel.prototype.publishProxy("descriptionFont","_titleBar"),ChartPanel.prototype.publishProxy("descriptionFontSize","_titleBar"),ChartPanel.prototype.publish("dataVisible",!1,"boolean","Show data table"),ChartPanel.prototype.publish("dataButtonVisible",!0,"boolean","Show data table button"),ChartPanel.prototype.publish("downloadButtonVisible",!0,"boolean","Show data download button"),ChartPanel.prototype.publish("downloadImageButtonVisible",!1,"boolean","Show image download button"),ChartPanel.prototype.publish("downloadTitle","","string","File name when downloaded"),ChartPanel.prototype.publish("downloadTimestampSuffix",!0,"boolean","Use timestamp as file name suffix"),ChartPanel.prototype.publish("legendVisible",!1,"boolean","Show legend"),ChartPanel.prototype.publish("legendButtonVisible",!0,"boolean","Show legend button"),ChartPanel.prototype.publish("legendPosition","right","set","Position of legend",["right","bottom"]),ChartPanel.prototype.publishProxy("legend_labelMaxWidth","_legend","labelMaxWidth"),ChartPanel.prototype.publishProxy("legend_showSeriesTotal","_legend","showSeriesTotal"),ChartPanel.prototype.publishProxy("legend_showLegendTotal","_legend","showLegendTotal"),ChartPanel.prototype.publishProxy("legend_itemPadding","_legend","itemPadding"),ChartPanel.prototype.publishProxy("legend_shapeRadius","_legend","shapeRadius"),ChartPanel.prototype.publishProxy("legend_symbolType","_legend","symbolType"),ChartPanel.prototype.publishProxy("legend_labelAlign","_legend","labelAlign"),ChartPanel.prototype.publish("widget",null,"widget","Widget",void 0,{render:!1}),ChartPanel.prototype.publish("enableAutoscaling",!1,"boolean"),ChartPanel.prototype.publish("highlightSize",4,"number"),ChartPanel.prototype.publish("highlightColor","#e67e22","html-color"),ChartPanel.prototype.publishProxy("progress_halfLife","_progressBar","halfLife"),ChartPanel.prototype.publishProxy("progress_decay","_progressBar","decay"),ChartPanel.prototype.publishProxy("progress_size","_progressBar","size"),ChartPanel.prototype.publishProxy("progress_color","_progressBar","color"),ChartPanel.prototype.publishProxy("progress_blurBar","_progressBar","blurBar"),ChartPanel.prototype.publishProxy("progress_blurSize","_progressBar","blurSize"),ChartPanel.prototype.publishProxy("progress_blurColor","_progressBar","blurColor"),ChartPanel.prototype.publishProxy("progress_blurOpacity","_progressBar","blurOpacity"),ChartPanel.prototype.widget=function(_2){if(!arguments.length)return this._widget;this._carousel.widgets([_2,this._table]),this._widget=_2,this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());const context=this,tmpAny=this._widget;return tmpAny.click=function(){context.click.apply(context,arguments)},tmpAny.dblclick=function(){context.dblclick.apply(context,arguments)},tmpAny.vertex_click=function(){context.vertex_click.apply(context,arguments)},tmpAny.vertex_dblclick=function(){context.vertex_dblclick.apply(context,arguments)},tmpAny.edge_click=function(){context.edge_click.apply(context,arguments)},tmpAny.edge_dblclick=function(){context.edge_dblclick.apply(context,arguments)},this};class FlexGrid extends common.HTMLWidget{constructor(){super()}enter(domNode,element){super.enter(domNode,element),common.select(domNode.parentNode).style("height","100%").style("width","100%")}update(domNode,element){super.update(domNode,element);const context=this,cachedSizes=[];this.updateFlexParent(element);const listItems=element.selectAll(".FlexGrid-list-item").data(this.widgets(),w2=>w2.id());listItems.enter().append("div").classed("FlexGrid-list-item",!0).each(function(w2){w2.target(this)}).merge(listItems).style("min-height",this.itemMinHeight()+"px").style("min-width",this.itemMinWidth()+"px").style("flex-basis",(n2,i2)=>{const flexBasis=this.widgetsFlexBasis()[i2];return typeof flexBasis<"u"?flexBasis:this.flexBasis()}).style("flex-grow",(n2,i2)=>{const flexGrow=this.widgetsFlexGrow()[i2];return typeof flexGrow<"u"?flexGrow:this.flexGrow()}).style("border-width",this.borderWidth()+"px").style("border-color",this.itemBorderColor()).each(function(){this.firstChild.style.display="none"}).each(function(){const rect=this.getBoundingClientRect();cachedSizes.push([rect.width,rect.height])}).each(function(w2,i2){this.firstChild.style.display="block",w2.resize({width:cachedSizes[i2][0]-2*context.borderWidth(),height:cachedSizes[i2][1]-2*context.borderWidth()})}),listItems.exit().remove()}exit(domNode,element){super.exit(domNode,element)}updateFlexParent(element){element.style("height","100%").style("flex-direction",this.orientation()==="horizontal"?"row":"column").style("flex-wrap",this.flexWrap()).style("align-items",this.alignItems()).style("align-content",this.alignContent()).style("overflow-x",()=>this.forceXScroll()||this.orientation()==="horizontal"&&this.flexWrap()==="nowrap"&&!this.disableScroll()?"scroll":"hidden").style("overflow-y",()=>this.forceYScroll()||this.orientation()==="vertical"&&this.flexWrap()==="nowrap"&&!this.disableScroll()?"scroll":"hidden")}}FlexGrid.prototype._class+=" layout_FlexGrid",FlexGrid.prototype.publish("itemBorderColor","transparent","html-color","Color of list item borders"),FlexGrid.prototype.publish("borderWidth",0,"number","Width of list item borders (pixels)"),FlexGrid.prototype.publish("orientation","horizontal","set","Controls the flex-direction of the list items",["horizontal","vertical"]),FlexGrid.prototype.publish("flexWrap","wrap","set","Controls the line wrap when overflow occurs",["nowrap","wrap","wrap-reverse"]),FlexGrid.prototype.publish("disableScroll",!1,"boolean","If false, scrollbar will show (when flexWrap is set to 'nowrap')",null,{disable:w2=>w2.flexWrap()!=="nowrap"}),FlexGrid.prototype.publish("forceXScroll",!1,"boolean","If true, horzontal scrollbar will show"),FlexGrid.prototype.publish("forceYScroll",!1,"boolean","If true, vertical scrollbar will show"),FlexGrid.prototype.publish("itemMinHeight",64,"number","Minimum height of a list item (pixels)"),FlexGrid.prototype.publish("itemMinWidth",64,"number","Minimum width of a list item (pixels)"),FlexGrid.prototype.publish("alignItems","stretch","set","Controls normal alignment of items",["flex-start","center","flex-end","stretch"]),FlexGrid.prototype.publish("alignContent","stretch","set","Controls normal alignment of item rows",["flex-start","center","flex-end","stretch","space-between","space-around"]),FlexGrid.prototype.publish("flexGrow",1,"number","Default flex-grow style for all list items"),FlexGrid.prototype.publish("flexBasis","10%","string","Default flex-basis style for all list items"),FlexGrid.prototype.publish("widgetsFlexGrow",[],"array","Array of flex-grow values keyed on the widgets array"),FlexGrid.prototype.publish("widgetsFlexBasis",[],"array","Array of flex-basis values keyed on the widgets array"),FlexGrid.prototype.publish("widgets",[],"widgetArray","Array of widgets to be rendered as list items");function getDefaultExportFromCjs(x2){return x2&&x2.__esModule&&Object.prototype.hasOwnProperty.call(x2,"default")?x2.default:x2}var gridList$2={exports:{}},gridList$1=gridList$2.exports,hasRequiredGridList;function requireGridList(){return hasRequiredGridList||(hasRequiredGridList=1,function(module2,exports3){(function(root2,factory){module2.exports=factory()})(gridList$1,function(){var GridList2=function(items,options){this._options=options;for(var k2 in this.defaults)this._options.hasOwnProperty(k2)||(this._options[k2]=this.defaults[k2]);this.items=items,this._adjustSizeOfItems(),this.generateGrid()};GridList2.cloneItems=function(items,_items){var i2,k2;for(_items===void 0&&(_items=[]),i2=0;i2<items.length;i2++){_items[i2]||(_items[i2]={});for(k2 in items[i2])_items[i2][k2]=items[i2][k2]}return _items},GridList2.prototype={defaults:{lanes:5,direction:"horizontal"},toString:function(){var widthOfGrid=this.grid.length,output=`
4
+ #|`,border=`
5
+ --`,item,i2,j2;for(i2=0;i2<widthOfGrid;i2++)output+=" "+this._padNumber(i2," "),border+="---";for(output+=border,i2=0;i2<this._options.lanes;i2++)for(output+=`
6
+ `+this._padNumber(i2," ")+"|",j2=0;j2<widthOfGrid;j2++)output+=" ",item=this.grid[j2][i2],output+=item?this._padNumber(this.items.indexOf(item),"0"):"--";return output+=`
7
+ `,output},generateGrid:function(){var i2;for(this._resetGrid(),i2=0;i2<this.items.length;i2++)this._markItemPositionToGrid(this.items[i2])},resizeGrid:function(lanes){var currentColumn=0;this._options.lanes=lanes,this._adjustSizeOfItems(),this._sortItemsByPosition(),this._resetGrid();for(var i2=0;i2<this.items.length;i2++){var item=this.items[i2],position=this._getItemPosition(item);this._updateItemPosition(item,this.findPositionForItem(item,{x:currentColumn,y:0})),currentColumn=Math.max(currentColumn,position.x)}this._pullItemsToLeft()},findPositionForItem:function(item,start,fixedRow){var x2,y2,position;for(x2=start.x;x2<this.grid.length;x2++)if(fixedRow!==void 0){if(position=[x2,fixedRow],this._itemFitsAtPosition(item,position))return position}else for(y2=start.y;y2<this._options.lanes;y2++)if(position=[x2,y2],this._itemFitsAtPosition(item,position))return position;var newCol=this.grid.length,newRow=0;return fixedRow!==void 0&&this._itemFitsAtPosition(item,[newCol,fixedRow])&&(newRow=fixedRow),[newCol,newRow]},moveItemToPosition:function(item,newPosition){var position=this._getItemPosition({x:newPosition[0],y:newPosition[1],w:item.w,h:item.h});this._updateItemPosition(item,[position.x,position.y]),this._resolveCollisions(item)},resizeItem:function(item,size){var width=size.w||item.w,height=size.h||item.h;this._updateItemSize(item,width,height),this._resolveCollisions(item),this._pullItemsToLeft()},getChangedItems:function(initialItems,idAttribute){for(var changedItems=[],i2=0;i2<initialItems.length;i2++){var item=this._getItemByAttribute(idAttribute,initialItems[i2][idAttribute]);(item.x!==initialItems[i2].x||item.y!==initialItems[i2].y||item.w!==initialItems[i2].w||item.h!==initialItems[i2].h)&&changedItems.push(item)}return changedItems},_sortItemsByPosition:function(){this.items.sort((function(item1,item2){var position1=this._getItemPosition(item1),position2=this._getItemPosition(item2);return position1.x!=position2.x?position1.x-position2.x:position1.y!=position2.y?position1.y-position2.y:0}).bind(this))},_adjustSizeOfItems:function(){for(var i2=0;i2<this.items.length;i2++){var item=this.items[i2];item.autoSize===void 0&&(item.autoSize=item.w===0||item.h===0),item.autoSize&&(this._options.direction==="horizontal"?item.h=this._options.lanes:item.w=this._options.lanes)}},_resetGrid:function(){this.grid=[]},_itemFitsAtPosition:function(item,newPosition){var position=this._getItemPosition(item),x2,y2;if(newPosition[0]<0||newPosition[1]<0||newPosition[1]+position.h>this._options.lanes)return!1;for(x2=newPosition[0];x2<newPosition[0]+position.w;x2++){var col=this.grid[x2];if(col){for(y2=newPosition[1];y2<newPosition[1]+position.h;y2++)if(col[y2]&&col[y2]!==item)return!1}}return!0},_updateItemPosition:function(item,position){item.x!==null&&item.y!==null&&this._deleteItemPositionFromGrid(item),this._setItemPosition(item,position),this._markItemPositionToGrid(item)},_updateItemSize:function(item,width,height){item.x!==null&&item.y!==null&&this._deleteItemPositionFromGrid(item),item.w=width,item.h=height,this._markItemPositionToGrid(item)},_markItemPositionToGrid:function(item){var position=this._getItemPosition(item),x2,y2;for(this._ensureColumns(position.x+position.w),x2=position.x;x2<position.x+position.w;x2++)for(y2=position.y;y2<position.y+position.h;y2++)this.grid[x2][y2]=item},_deleteItemPositionFromGrid:function(item){var position=this._getItemPosition(item),x2,y2;for(x2=position.x;x2<position.x+position.w;x2++)if(this.grid[x2])for(y2=position.y;y2<position.y+position.h;y2++)this.grid[x2][y2]==item&&(this.grid[x2][y2]=null)},_ensureColumns:function(N2){var i2;for(i2=0;i2<N2;i2++)this.grid[i2]||this.grid.push(new GridCol(this._options.lanes))},_getItemsCollidingWithItem:function(item){for(var collidingItems=[],i2=0;i2<this.items.length;i2++)item!=this.items[i2]&&this._itemsAreColliding(item,this.items[i2])&&collidingItems.push(i2);return collidingItems},_itemsAreColliding:function(item1,item2){var position1=this._getItemPosition(item1),position2=this._getItemPosition(item2);return!(position2.x>=position1.x+position1.w||position2.x+position2.w<=position1.x||position2.y>=position1.y+position1.h||position2.y+position2.h<=position1.y)},_resolveCollisions:function(item){this._tryToResolveCollisionsLocally(item)||this._pullItemsToLeft(item),this._pullItemsToLeft()},_tryToResolveCollisionsLocally:function(item){var collidingItems=this._getItemsCollidingWithItem(item);if(!collidingItems.length)return!0;var _gridList=new GridList2([],this._options),leftOfItem,rightOfItem,aboveOfItem,belowOfItem;GridList2.cloneItems(this.items,_gridList.items),_gridList.generateGrid();for(var i2=0;i2<collidingItems.length;i2++){var collidingItem=_gridList.items[collidingItems[i2]],collidingPosition=this._getItemPosition(collidingItem),position=this._getItemPosition(item);if(leftOfItem=[position.x-collidingPosition.w,collidingPosition.y],rightOfItem=[position.x+position.w,collidingPosition.y],aboveOfItem=[collidingPosition.x,position.y-collidingPosition.h],belowOfItem=[collidingPosition.x,position.y+position.h],_gridList._itemFitsAtPosition(collidingItem,leftOfItem))_gridList._updateItemPosition(collidingItem,leftOfItem);else if(_gridList._itemFitsAtPosition(collidingItem,aboveOfItem))_gridList._updateItemPosition(collidingItem,aboveOfItem);else if(_gridList._itemFitsAtPosition(collidingItem,belowOfItem))_gridList._updateItemPosition(collidingItem,belowOfItem);else if(_gridList._itemFitsAtPosition(collidingItem,rightOfItem))_gridList._updateItemPosition(collidingItem,rightOfItem);else return!1}return GridList2.cloneItems(_gridList.items,this.items),this.generateGrid(),!0},_pullItemsToLeft:function(fixedItem){if(this._sortItemsByPosition(),this._resetGrid(),fixedItem){var fixedPosition=this._getItemPosition(fixedItem);this._updateItemPosition(fixedItem,[fixedPosition.x,fixedPosition.y])}for(var i2=0;i2<this.items.length;i2++){var item=this.items[i2],position=this._getItemPosition(item);if(!(fixedItem&&item==fixedItem)){var x2=this._findLeftMostPositionForItem(item),newPosition=this.findPositionForItem(item,{x:x2,y:0},position.y);this._updateItemPosition(item,newPosition)}}},_findLeftMostPositionForItem:function(item){for(var tail=0,position=this._getItemPosition(item),i2=0;i2<this.grid.length;i2++)for(var j2=position.y;j2<position.y+position.h;j2++){var otherItem=this.grid[i2][j2];if(otherItem){var otherPosition=this._getItemPosition(otherItem);this.items.indexOf(otherItem)<this.items.indexOf(item)&&(tail=otherPosition.x+otherPosition.w)}}return tail},_getItemByAttribute:function(key,value){for(var i2=0;i2<this.items.length;i2++)if(this.items[i2][key]===value)return this.items[i2];return null},_padNumber:function(nr,prefix){return nr>=10?nr:prefix+nr},_getItemPosition:function(item){return this._options.direction==="horizontal"?item:{x:item.y,y:item.x,w:item.h,h:item.w}},_setItemPosition:function(item,position){this._options.direction==="horizontal"?(item.x=position[0],item.y=position[1]):(item.x=position[1],item.y=position[0])}};var GridCol=function(lanes){for(var i2=0;i2<lanes;i2++)this.push(null)};return GridCol.prototype=[],GridList2})}(gridList$2)),gridList$2.exports}var gridListExports=requireGridList();const gridList=getDefaultExportFromCjs(gridListExports),_GridList=_mergeNamespaces$1({__proto__:null,default:gridList},[gridListExports]),GridList=_GridList&&gridList||_GridList;class Grid extends common.HTMLWidget{constructor(){super(),__publicField2(this,"divItems"),__publicField2(this,"gridList"),__publicField2(this,"items"),__publicField2(this,"itemsMap"),__publicField2(this,"origItems"),__publicField2(this,"cellWidth"),__publicField2(this,"cellHeight"),__publicField2(this,"dragItem"),__publicField2(this,"dragItemPos"),__publicField2(this,"_d3Drag"),__publicField2(this,"_d3DragResize"),__publicField2(this,"_selectionBag"),__publicField2(this,"_scrollBarWidth"),this._tag="div",this._selectionBag=new common.Utility.Selection(this),this.content([])}getDimensions(){const size={width:0,height:0};return this.content().forEach(function(cell2){size.width<cell2.gridCol()+cell2.gridColSpan()&&(size.width=cell2.gridCol()+cell2.gridColSpan()),size.height<cell2.gridRow()+cell2.gridRowSpan()&&(size.height=cell2.gridRow()+cell2.gridRowSpan())},this),size}clearContent(widget){this.content(this.content().filter(function(contentWidget){if(!widget)return contentWidget.target(null),!1;let w2=contentWidget;for(;w2;){if(widget===w2)return contentWidget.target(null),!1;w2=w2.widget?w2.widget():null}return!0}))}setContent(row2,col,widget,title,rowSpan,colSpan){if(rowSpan=rowSpan||1,colSpan=colSpan||1,title=title||"",this.content(this.content().filter(function(contentWidget){return contentWidget.gridRow()===row2&&contentWidget.gridCol()===col?(contentWidget.target(null),!1):!0})),widget){const cell2=new Cell().gridRow(row2).gridCol(col).widget(widget).title(title).gridRowSpan(rowSpan).gridColSpan(colSpan);this.content().push(cell2)}return this}sortedContent(){return this.content().sort(function(l2,r2){return l2.gridRow()===r2.gridRow()?l2.gridCol()-r2.gridCol():l2.gridRow()-r2.gridRow()})}getCell(row2,col){let retVal=null;return this.content().some(function(cell2){return row2>=cell2.gridRow()&&row2<cell2.gridRow()+cell2.gridRowSpan()&&col>=cell2.gridCol()&&col<cell2.gridCol()+cell2.gridColSpan()?(retVal=cell2,!0):!1}),retVal}getWidgetCell(id){let retVal=null;return this.content().some(function(cell2){return cell2.widget().id()===id?(retVal=cell2,!0):!1}),retVal}getContent(id){let retVal=null;return this.content().some(function(cell2){return cell2.widget().id()===id?(retVal=cell2.widget(),!0):!1}),retVal}cellToGridItem(cell2){return{x:cell2.gridCol(),y:cell2.gridRow(),w:cell2.gridColSpan(),h:cell2.gridRowSpan(),id:cell2.id(),cell:cell2}}gridItemToCell(item){item.cell.gridCol(item.x).gridRow(item.y).gridColSpan(item.w).gridRowSpan(item.h)}resetItemsPos(){this.origItems.forEach(function(origItem){const item=this.itemsMap[origItem.id];item.x=origItem.x,item.y=origItem.y},this)}initGridList(){this.itemsMap={},this.items=this.content().map(function(cell2){const retVal=this.cellToGridItem(cell2);return this.itemsMap[retVal.id]=retVal,retVal},this),this.origItems=this.content().map(this.cellToGridItem),this.gridList=new GridList(this.items,{direction:this.snapping(),lanes:this.snapping()==="horizontal"?this.snappingRows():this.snappingColumns()})}killGridList(){this.gridList=null,delete this.items,delete this.itemsMap}enter(domNode,element){super.enter(domNode,element),this._scrollBarWidth=common.Platform.getScrollbarWidth();const context=this;this._d3Drag=common.drag().subject(function(_d){const d2=context.cellToGridItem(_d);return{x:d2.x*context.cellWidth,y:d2.y*context.cellHeight}}).on("start",function(_d){if(!context.designMode())return;common.d3Event().sourceEvent.stopPropagation(),context.initGridList();const d2=context.itemsMap[_d.id()];context.dragItem=element.append("div").attr("class","dragging").style("transform",function(){return"translate("+d2.x*context.cellWidth+"px, "+d2.y*context.cellHeight+"px)"}).style("width",function(){return d2.w*context.cellWidth-context.gutter()+"px"}).style("height",function(){return d2.h*context.cellHeight-context.gutter()+"px"}),context.selectionBagClick(_d)}).on("drag",function(_d){if(!context.designMode())return;const event=common.d3Event();event.sourceEvent.stopPropagation();const d2=context.itemsMap[_d.id()];event.x<0&&(event.x=0),event.x+d2.w*context.cellWidth>context.snappingColumns()*context.cellWidth&&(event.x=context.snappingColumns()*context.cellWidth-d2.w*context.cellWidth),event.y<0&&(event.y=0),event.y+d2.h*context.cellWidth>context.snappingRows()*context.cellWidth&&(event.y=context.snappingRows()*context.cellWidth-d2.h*context.cellWidth);const pos=[Math.max(0,Math.floor((event.x+context.cellWidth/2)/context.cellWidth)),Math.max(0,Math.floor((event.y+context.cellHeight/2)/context.cellHeight))];(d2.x!==pos[0]||d2.y!==pos[1])&&(context.snapping()!=="none"?(context.resetItemsPos(),context.gridList.moveItemToPosition(d2,pos)):(d2.x=pos[0],d2.y=pos[1]),(_d.gridCol()!==d2.x||_d.gridRow()!==d2.y)&&(context.items.forEach(context.gridItemToCell),context.updateGrid(!1,100))),context.dragItem.style("transform",function(){return"translate("+event.x+"px, "+event.y+"px)"}).style("width",function(){return d2.w*context.cellWidth+"px"}).style("height",function(){return d2.h*context.cellHeight+"px"})}).on("end",function(){context.designMode()&&(common.d3Event().sourceEvent.stopPropagation(),context.dragItem.remove(),context.dragItem=null,context.killGridList())}),this._d3DragResize=common.drag().subject(function(_d){const d2=context.cellToGridItem(_d);return{x:(d2.x+d2.w-1)*context.cellWidth,y:(d2.y+d2.h-1)*context.cellHeight}}).on("start",function(_d){if(!context.designMode())return;common.d3Event().sourceEvent.stopPropagation(),context.initGridList();const d2=context.itemsMap[_d.id()];context.dragItem=element.append("div").attr("class","resizing").style("transform",function(){return"translate("+d2.x*context.cellWidth+"px, "+d2.y*context.cellHeight+"px)"}).style("width",function(){return d2.w*context.cellWidth-context.gutter()+"px"}).style("height",function(){return d2.h*context.cellHeight-context.gutter()+"px"}),context.dragItemPos={x:d2.x,y:d2.y}}).on("drag",function(_d){if(!context.designMode())return;const event=common.d3Event();event.sourceEvent.stopPropagation();const d2=context.itemsMap[_d.id()],pos=[Math.max(0,Math.round(event.x/context.cellWidth)),Math.max(0,Math.round(event.y/context.cellHeight))],size={w:Math.max(1,pos[0]-d2.x+1),h:Math.max(1,pos[1]-d2.y+1)};(d2.w!==size.w||d2.h!==size.h)&&(context.snapping()!=="none"?(context.resetItemsPos(),context.gridList.resizeItem(d2,size)):(d2.w=size.w,d2.h=size.h),(_d.gridColSpan()!==d2.w||_d.gridRowSpan()!==d2.h)&&(context.items.forEach(context.gridItemToCell),context.updateGrid(d2.id,100))),context.dragItem.style("width",function(){return(-d2.x+1)*context.cellWidth+event.x-context.gutter()+"px"}).style("height",function(){return(-d2.y+1)*context.cellHeight+event.y-context.gutter()+"px"})}).on("end",function(){context.designMode()&&(common.d3Event().sourceEvent.stopPropagation(),context.dragItem.remove(),context.dragItem=null,context.killGridList())})}updateGrid(resize,transitionDuration=0,_noRender=!1){transitionDuration=transitionDuration||0;const context=this;this.divItems.classed("draggable",this.designMode()).transition().duration(transitionDuration).style("left",function(d2){return d2.gridCol()*context.cellWidth+context.gutter()/2+"px"}).style("top",function(d2){return d2.gridRow()*context.cellHeight+context.gutter()/2+"px"}).style("width",function(d2){return d2.gridColSpan()*context.cellWidth-context.gutter()+"px"}).style("height",function(d2){return d2.gridRowSpan()*context.cellHeight-context.gutter()+"px"}).on("end",function(d2){d2.surfaceShadow_default(context.surfaceShadow()).surfacePadding_default(context.surfacePadding()).surfaceBorderWidth_default(context.surfaceBorderWidth()).surfaceBackgroundColor_default(context.surfaceBackgroundColor()),(resize===!0||resize===d2.id())&&d2.resize().lazyRender()})}update(domNode,element2){super.update(domNode,element2),this._placeholderElement.style("overflow-x",this.fitTo()==="width"?"hidden":null),this._placeholderElement.style("overflow-y",this.fitTo()==="width"?"scroll":null);const dimensions=this.getDimensions(),clientWidth=this.width()-(this.fitTo()==="width"?this._scrollBarWidth:0);if(this.cellWidth=clientWidth/dimensions.width,this.cellHeight=this.fitTo()==="all"?this.height()/dimensions.height:this.cellWidth,this.designMode()){const cellLaneRatio=Math.min(this.width()/this.snappingColumns(),this.height()/this.snappingRows()),laneWidth=Math.floor(cellLaneRatio);this.cellWidth=laneWidth,this.cellHeight=this.cellWidth}const context=this,divItems=element2.selectAll("#"+this.id()+" > .ddCell").data(this.content(),function(d2){return d2.id()});this.divItems=divItems.enter().append("div").attr("class","ddCell").each(function(d2){d2.target(this),d2.__grid_watch=d2.monitor(function(key,newVal,oldVal){context._renderCount&&(key==="snapping"||key.indexOf("grid")===0)&&newVal!==oldVal&&(context.gridList||(context.initGridList(),context.snapping()!=="none"&&context.gridList.resizeGrid(context.snapping()==="horizontal"?context.snappingRows():context.snappingColumns()),context.items.forEach(context.gridItemToCell),context.updateGrid(d2.id(),100),context.killGridList()))}),common.select(this).append("div").attr("class","resizeHandle").call(context._d3DragResize).append("div").attr("class","resizeHandleDisplay")}).merge(divItems),this.divItems.each(function(d2){const element=common.select(this);context.designMode()?element.call(context._d3Drag):element.on("mousedown.drag",null).on("touchstart.drag",null)}),this.divItems.select(".resizeHandle").style("display",this.designMode()?null:"none"),this.updateGrid(!0),divItems.exit().each(function(d2){d2.target(null),d2.__grid_watch&&d2.__grid_watch.remove()}).remove();const lanesBackground=element2.selectAll("#"+this.id()+" > .laneBackground").data(this.designMode()?[""]:[]);lanesBackground.enter().insert("div",":first-child").attr("class","laneBackground").style("left","1px").style("top","1px").on("click",function(){context.selectionBagClear()}).merge(lanesBackground).style("width",this.snappingColumns()*this.cellWidth+"px").style("height",this.snappingRows()*this.cellHeight+"px"),lanesBackground.exit().each(function(){context.selectionBagClear()}).remove();const lanes=element2.selectAll("#"+this.id()+" > .lane").data(this.designMode()?[""]:[]);lanes.enter().append("div").attr("class","lane").style("left","1px").style("top","1px"),lanes.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"),lanes.exit().remove()}exit(domNode,element){this.content().forEach(w2=>w2.target(null)),super.exit(domNode,element)}_createSelectionObject(d2){return{_id:d2._id,element:()=>d2._element,widget:d2}}selection(_2){return arguments.length?(this._selectionBag.set(_2.map(function(row2){return this._createSelectionObject(row2)},this)),this):this._selectionBag.get().map(function(d2){return d2._id})}selectionBagClear(){this._selectionBag.isEmpty()||(this._selectionBag.clear(),this.postSelectionChange())}selectionBagClick(d2){if(d2!==null){const selectionObj=this._createSelectionObject(d2);if(common.d3Event().sourceEvent.ctrlKey)this._selectionBag.isSelected(selectionObj)?(this._selectionBag.remove(selectionObj),this.postSelectionChange()):(this._selectionBag.append(selectionObj),this.postSelectionChange());else{const selected=this._selectionBag.get();selected.length===1&&selected[0]._id===selectionObj._id?this.selectionBagClear():this._selectionBag.set([selectionObj]),this.postSelectionChange()}}}postSelectionChange(){}applyLayout(layoutArr){this.divItems.each((d2,i2)=>{if(layoutArr[i2]){const[x2,y2,w2,h2]=layoutArr[i2];d2.gridCol(x2).gridRow(y2).gridColSpan(w2).gridRowSpan(h2)}}),this.updateGrid(!0)}vizActivation(elem){}}Grid.prototype._class+=" layout_Grid",Grid.prototype.publish("designMode",!1,"boolean","Design Mode",null,{tags:["Basic"]}),Grid.prototype.publish("showLanes",!0,"boolean","Show snapping lanes when in design mode",null,{tags:["Basic"],disable:w2=>!w2.designMode()}),Grid.prototype.publish("fitTo","all","set","Sizing Strategy",["all","width"],{tags:["Basic"]}),Grid.prototype.publish("snapping","vertical","set","Snapping Strategy",["vertical","horizontal","none"]),Grid.prototype.publish("snappingColumns",12,"number","Snapping Columns"),Grid.prototype.publish("snappingRows",16,"number","Snapping Rows"),Grid.prototype.publish("gutter",6,"number","Gap Between Widgets",null,{tags:["Basic"]}),Grid.prototype.publish("surfaceShadow",!0,"boolean","3D Shadow"),Grid.prototype.publish("surfacePadding",null,"string","Cell Padding (px)",null,{tags:["Intermediate"]}),Grid.prototype.publish("surfaceBorderWidth",1,"number","Width (px) of Cell Border",null,{tags:["Intermediate"]}),Grid.prototype.publish("surfaceBackgroundColor",null,"html-color","Surface Background Color",null,{tags:["Advanced"]}),Grid.prototype.publish("content",[],"widgetArray","widgets",null,{tags:["Basic"],render:!1});class HorizontalList extends FlexGrid{constructor(){super(),this.orientation_default("horizontal"),this.flexWrap_default("nowrap")}}HorizontalList.prototype._class+=" layout_HorizontalList";class Layered extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_contentContainer"),__publicField2(this,"_widgetPlacements"),__publicField2(this,"_widgetRatios"),this._tag="div",this._widgetPlacements=[],this._widgetRatios=[]}addLayer(widget,placement="default",widthRatio=1,heightRatio=1){const widgets=this.widgets();return widgets.push(widget||new common.Text().text("No widget defined for layer.")),this.widgets(widgets),this._widgetPlacements.push(placement),this._widgetRatios.push([widthRatio,heightRatio]),this}enter(domNode,element){super.enter(domNode,element),this._contentContainer=element.append("div").attr("class","container")}update(domNode,element){super.update(domNode,element);const context=this;element.style("padding",this.surfacePadding()+"px");const content=this._contentContainer.selectAll(".content.id"+this.id()).data(this.widgets(),function(d2){return d2.id()});content.enter().append("div").attr("class","content id"+this.id()).each(function(widget,idx){widget.target(this)}).merge(content).each(function(widget,idx){const clientSize={width:context.clientWidth(),height:context.clientHeight()},widgetSize=context.widgetSize(idx,clientSize),widgetPosition=context.widgetPosition(idx,clientSize,widgetSize);this.style.top=widgetPosition.y+"px",this.style.left=widgetPosition.x+"px",widget.resize(widgetSize).render()}),content.exit().each(function(widget,idx){widget.target(null)}).remove(),content.order()}widgetSize(idx,clientSize){return this._widgetPlacements[idx]==="default"?{width:clientSize.width*this._widgetRatios[idx][0],height:clientSize.height*this._widgetRatios[idx][1]}:{width:clientSize.width*this._widgetRatios[idx][0],height:clientSize.height*this._widgetRatios[idx][1]}}widgetPosition(idx,clientSize,widgetSize){switch(this._widgetPlacements[idx]){default:return{x:0,y:0};case"top":return{x:clientSize.width/2-widgetSize.width/2,y:0};case"bottom":return{x:clientSize.width/2-widgetSize.width/2,y:clientSize.height-widgetSize.height};case"left":return{x:0,y:clientSize.height/2-widgetSize.height/2};case"right":return{x:clientSize.width-widgetSize.width,y:clientSize.height/2-widgetSize.height/2};case"center":return{x:clientSize.width/2-widgetSize.width/2,y:clientSize.height/2-widgetSize.height/2}}}}Layered.prototype._class+=" layout_Layered",Layered.prototype.publish("surfacePadding",0,"number","Padding"),Layered.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});class Popup extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_surfaceButtons"),__publicField2(this,"_originalPosition"),this._tag="div",this._surfaceButtons=[]}updateState(visible){visible=visible||!this.popupState(),this.popupState(visible).render()}enter(domNode,element){super.enter(domNode,element),this.widget().target(domNode),this._originalPosition=this.position()}update(domNode,element){super.update(domNode,element),element.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"),this.widget().size().height===0&&this.widget().resize(this.size())}postUpdate(domNode,element){let left,top;switch(this.centerPopup()){case"container":this._placeholderElement&&(left=parseInt(this._placeholderElement.style("width"))/2-this.widget().width()/2,top=parseInt(this._placeholderElement.style("height"))/2-this.widget().height()/2),this.position("absolute");break;case"window":left=window.innerWidth/2-this.widget().width()/2,top=window.innerHeight/2-this.widget().height()/2,this.position("fixed");break;default:left=0,top=0,this.position(this._originalPosition);break}this.pos({x:left,y:top}),super.postUpdate(domNode,element),element.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(domNode,element){this.widget()&&this.widget().target(null),super.exit(domNode,element)}click(obj){}}Popup.prototype._class+=" layout_Popup",Popup.prototype.publish("popupState",!1,"boolean","State of the popup, visible (true) or hidden (false)",null,{}),Popup.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,{}),Popup.prototype.publish("centerPopup","none","set","Center the widget in its container element (target) or in the window",["none","container","window"],{}),Popup.prototype.publish("top",null,"number","Top position property of popup",null,{}),Popup.prototype.publish("bottom",null,"number","Bottom position property of popup",null,{}),Popup.prototype.publish("left",null,"number","Left position property of popup",null,{}),Popup.prototype.publish("right",null,"number","Right position property of popup",null,{}),Popup.prototype.publish("position","relative","set","Value of the 'position' property",["absolute","relative","fixed","static","initial","inherit"],{tags:["Private"]}),Popup.prototype.publish("widget",null,"widget","Widget",null,{tags:["Private"]});class Tabbed extends common.HTMLWidget{constructor(){super(),__publicField2(this,"_tabContainer"),__publicField2(this,"_contentContainer"),this._tag="div"}clearTabs(){return this.labels([]),this.widgets([]),this}addTab(widget,label,isActive,callback){const widgetSize=widget.size();widgetSize.width===0&&widgetSize.height===0&&widget.size({width:"100%",height:"100%"});const labels=this.labels(),widgets=this.widgets();isActive&&this.activeTabIdx(this.widgets().length),labels.push(label);const surface=new Surface().widget(widget||new common.Text().text("No widget defined for tab"));return widgets.push(surface),this.labels(labels),this.widgets(widgets),callback&&callback(surface),this}widgetSize(widgetDiv){const width=this.clientWidth();let height=this.clientHeight();const tcBox=this._tabContainer.node().getBoundingClientRect();return typeof tcBox.height<"u"&&(height-=tcBox.height),{width,height}}enter(domNode,element){super.enter(domNode,element),this._tabContainer=element.append("div"),this._contentContainer=element.append("div")}update(domNode,element){super.update(domNode,element);const context=this;element.style("padding",this.surfacePadding_exists()?this.surfacePadding()+"px":null);const tabs=this._tabContainer.selectAll(".tab-button.id"+this.id()).data(this.showTabs()?this.labels():[],function(d2){return d2});tabs.enter().append("span").attr("class","tab-button id"+this.id()).style("cursor","pointer").on("click",function(d2,idx){context.click(context.widgets()[idx].widget(),d2,idx),context.activeTabIdx(idx).render()}).merge(tabs).classed("active",function(d2,idx){return context.activeTabIdx()===idx}).text(function(d2){return d2}),tabs.exit().remove();const content=this._contentContainer.selectAll(".tab-content.id"+this.id()).data(this.widgets(),function(d2){return d2.id()});switch(content.enter().append("div").attr("class","tab-content id"+this.id()).each(function(widget,idx){widget.target(this)}).merge(content).classed("active",function(d2,idx){return context.activeTabIdx()===idx}).style("display",function(d2,idx){return context.activeTabIdx()===idx?"block":"none"}).each(function(surface,idx){if(surface.visible(context.activeTabIdx()===idx),context.activeTabIdx()===idx){const wSize=context.widgetSize(common.select(this));surface.surfaceBorderWidth(context.showTabs()?null:0).surfacePadding(context.showTabs()?null:0).resize(wSize)}}),content.exit().each(function(widget,idx){widget.target(null)}).remove(),this.tabLocation()){case"bottom":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");break;default: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");break}}click(widget,column,idx){}}Tabbed.prototype._class+=" layout_Tabbed",Tabbed.prototype.publish("showTabs",!0,"boolean","Show Tabs",null,{}),Tabbed.prototype.publish("surfacePadding",4,"number","Padding"),Tabbed.prototype.publish("activeTabIdx",0,"number","Index of active tab",null,{}),Tabbed.prototype.publish("labels",[],"array","Array of tab labels sharing an index with ",null,{tags:["Private"]}),Tabbed.prototype.publish("tabLocation","top","set","Position the tabs at the bottom of the widget",["top","bottom"],{tags:["Private"]}),Tabbed.prototype.publish("widgets",[],"widgetArray","widgets",null,{tags:["Private"]});class Toolbar extends common.HTMLWidget{constructor(){super(),this._tag="div"}enter(domNode,element){super.enter(domNode,element)}update(domNode,element){super.update(domNode,element);const context=this;element.attr("title",context.title()).style("background-color",this.backgroundColor());const title=element.selectAll("div.toolbar-title").data(this.title()?[this.title()]:[]);title.enter().append("div").classed("toolbar-title",!0).append("span"),title.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(context.title()),title.exit().remove();const childWidgets=element.selectAll("div.toolbar-child").data(this.widgets()!==null?this.widgets():[],function(d2){return d2.id()});childWidgets.enter().insert("div","div.toolbar-title").each(function(d2,i2){const widgetClass=context.widgetClasses()[i2]?context.widgetClasses()[i2]+" toolbar-child":"toolbar-child";common.select(this).classed(widgetClass,!0),d2.target(this)}),childWidgets.exit().each(function(d2){d2.target(null)}).remove(),childWidgets.order()}render(callback){const context=this;return super.render(function(w2){const toolbarBBox=context.element().node().getBoundingClientRect();let minX=toolbarBBox.left+toolbarBBox.width;context.element().selectAll("div.toolbar-child").each(function(d2,i2){const childBBox=this.getBoundingClientRect();minX>childBBox.left&&(minX=childBBox.left)}),context.element().select(".toolbar-title").style("width",minX-toolbarBBox.left-4+"px"),callback&&callback(w2)})}exit(domNode,element){this.widgets().forEach(function(w2){w2.target(null)}),super.exit(domNode,element)}}Toolbar.prototype._class+=" layout_Toolbar",Toolbar.prototype.publish("title","","string","Title",null,{tags:["Intermediate"]}),Toolbar.prototype.publish("fontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),Toolbar.prototype.publish("fontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),Toolbar.prototype.publish("fontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),Toolbar.prototype.publish("fontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),Toolbar.prototype.publish("backgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),Toolbar.prototype.publish("responsive",!0,"boolean","Adapts to pixel width",null,{tags:["Basic"]}),Toolbar.prototype.publish("widgets",[],"widgetArray","Child widgets of the toolbar",null,{tags:["Basic"]}),Toolbar.prototype.publish("widgetClasses",[],"array","Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)",null,{tags:["Basic"]});class VerticalList extends FlexGrid{constructor(){super(),this.orientation_default("vertical"),this.flexWrap_default("nowrap")}}VerticalList.prototype._class+=" layout_VerticalList";function requireWidget(classID){return new Promise(function(resolve,_reject){const parsedClassID=common.Utility.parseClassID(classID);require&&require([parsedClassID.package],function(Package){let Widget=null;Package&&Package[parsedClassID.widgetID]&&(Widget=Package[parsedClassID.widgetID]),resolve(parsedClassID.memberWidgetID?Widget.prototype?Widget.prototype[parsedClassID.memberWidgetID]:Widget[parsedClassID.memberWidgetID]:Widget)})})}function requireWidgets(classIDs){return Promise.all(classIDs.map(requireWidget))}const Utility=Object.freeze(Object.defineProperty({__proto__:null,requireWidget,requireWidgets},Symbol.toStringTag,{value:"Module"}));class MultiChart extends common.HTMLWidget{constructor(){super();__publicField(this,"_allCharts",{});__publicField(this,"_chartTypeDefaults");__publicField(this,"_chartTypeProperties");__publicField(this,"_chartMonitor");__publicField(this,"_switchingTo");api.INDChart.call(this),api.IGraph.call(this),this._tag="div",this._allCharts={},this._allChartTypes.forEach(function(item){const newItem=JSON.parse(JSON.stringify(item));newItem.widget=null,this._allCharts[item.id]=newItem,this._allCharts[item.display]=newItem,this._allCharts[item.widgetClass]=newItem},this),this._chartTypeDefaults={},this._chartTypeProperties={}}fields(_2){const retVal=super.fields.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().fields();this.chart().fields(_2)}return retVal}columns(_2,asDefault){const retVal=common.HTMLWidget.prototype.columns.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().columns();this.chart().columns(_2,asDefault)}return retVal}data(_2){const retVal=common.HTMLWidget.prototype.data.apply(this,arguments);if(this.chart()){if(!arguments.length)return this.chart().data();this.chart().data(_2)}return retVal}hasOverlay(){return this.chart()&&this.chart().hasOverlay()}visible(_2){return arguments.length?(this.chart()&&this.chart().visible(_2),this):this.chart()&&this.chart().visible()}chartTypeDefaults(_2){return arguments.length?(this._chartTypeDefaults=_2,this):this._chartTypeDefaults}chartTypeProperties(_2){return arguments.length?(this._chartTypeProperties=_2,this):this._chartTypeProperties}getChartDataFamily(){return this._allCharts[this.chartType()].family}requireContent(chartType,callback){const classInfo=common.Utility.parseClassID(this._allCharts[chartType].widgetClass);switch(classInfo.package){case"@hpcc-js/chart":import("@hpcc-js/chart").then(mod=>{callback(new mod[classInfo.widgetID])});break;case"@hpcc-js/dgrid":import("@hpcc-js/dgrid").then(mod=>{callback(new mod[classInfo.widgetID])});break;default:requireWidget(this._allCharts[chartType].widgetClass).then(function(WidgetClass){callback(new WidgetClass)})}}switchChart(callback){if(this._switchingTo===this.chartType()){callback&&callback(this);return}else this._switchingTo&&console.warn("Attempting switch to: "+this.chartType()+", before previous switch is complete ("+this._switchingTo+")");this._switchingTo=this.chartType();const oldContent=this.chart(),context=this;this.requireContent(this.chartType(),function(newContent){if(newContent!==oldContent){const size=context.size();newContent.fields(context.fields()).data(context.data()).size(size),context.chart(newContent),oldContent&&oldContent.size({width:1,height:1}).render()}delete context._switchingTo,callback&&callback(this)})}update(domNode,element){super.update(domNode,element);const content=element.selectAll(".multiChart").data(this.chart()?[this.chart()]:[],function(d2){return d2._id});content.enter().append("div").attr("class","multiChart").each(function(d2){d2.target(this)});const currChart=this.chart();if(currChart){for(const key in this._chartTypeDefaults)if(currChart[key+"_default"])try{currChart[key+"_default"](this._chartTypeDefaults[key])}catch{console.warn("Exception Setting Default: "+key)}else console.warn("Unknown Default: "+key);this._chartTypeDefaults={};for(const propKey in this._chartTypeProperties)if(currChart[propKey])try{currChart[propKey](this._chartTypeProperties[propKey])}catch{console.warn("Exception Setting Property: "+propKey)}else console.warn("Unknown Property: "+propKey);this._chartTypeProperties={}}const context=this;content.each(function(d2){d2.resize(context.size())}),content.exit().transition().each(function(d2){d2.target(null)}).remove()}exit(domNode,element){this._chartMonitor&&(this._chartMonitor.remove(),delete this._chartMonitor),this.chart()&&this.chart().target(null),super.exit(domNode,element)}render(_callback){if(this.chartType()&&(!this.chart()||this.chart().classID()!==this._allCharts[this.chartType()].widgetClass)){const context=this,args=arguments;return this.switchChart(function(){common.HTMLWidget.prototype.render.apply(context,args)}),this}return common.HTMLWidget.prototype.render.apply(this,arguments)}}MultiChart.prototype._class+=" composite_MultiChart",MultiChart.prototype.implements(api.INDChart.prototype),MultiChart.prototype.implements(api.IGraph.prototype),MultiChart.prototype._otherChartTypes=[{id:"FORM",display:"Form",widgetClass:"form_FieldForm"}].map(function(item){return item.family="other",item}),MultiChart.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(item){return item.family="GRAPH",item}),MultiChart.prototype._1DChartTypes=[].map(function(item){return item.family="1D",item}),MultiChart.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(item){return item.family="2D",item}),MultiChart.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(item){return item.family="ND",item}),MultiChart.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(item){return item.family="map",item}),MultiChart.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(item){return item.family="any",item}),MultiChart.prototype._allChartTypes=MultiChart.prototype._otherChartTypes.concat(MultiChart.prototype._graphChartTypes.concat(MultiChart.prototype._1DChartTypes.concat(MultiChart.prototype._2DChartTypes.concat(MultiChart.prototype._NDChartTypes.concat(MultiChart.prototype._mapChartTypes.concat(MultiChart.prototype._anyChartTypes)))))),MultiChart.prototype._allMap=common.map(MultiChart.prototype._allChartTypes,function(item){return item.family}),MultiChart.prototype._allFamilies=MultiChart.prototype._allMap.keys(),MultiChart.prototype._allChartTypesMap={},MultiChart.prototype._allChartTypesByClass={},MultiChart.prototype._allChartTypes.forEach(function(item){item.widgetPath=common.Utility.widgetPath(item.widgetClass),MultiChart.prototype._allChartTypesMap[item.id]=item,MultiChart.prototype._allChartTypesByClass[item.widgetClass]=item}),MultiChart.prototype.publishReset(),MultiChart.prototype.publish("hideRowOnLegendClick",!1,"boolean","Enable/Disable hiding row on legend clicks",null,{tags:["Basic"]}),MultiChart.prototype.publish("chartType","BUBBLE","set","Chart Type",MultiChart.prototype._allChartTypes.map(function(item){return item.id}),{tags:["Basic"]}),MultiChart.prototype.publish("chart",null,"widget","Chart",null,{tags:["Basic"]});const _origChart=MultiChart.prototype.chart;MultiChart.prototype.chart=function(_2){const retVal=_origChart.apply(this,arguments);if(arguments.length){const context=this;this._allChartTypesByClass[_2.classID()]?this.chartType(this._allChartTypesByClass[_2.classID()].id):console.warn("Unknown Class ID: "+_2.classID()),_2.click=function(_row,_column,_selected){context.click.apply(context,arguments)},_2.dblclick=function(_row,_column,_selected){context.dblclick.apply(context,arguments)},_2.vertex_click=function(row2,column,selected,more){context.vertex_click.apply(context,arguments)},_2.vertex_dblclick=function(row2,column,selected,more){context.vertex_dblclick.apply(context,arguments)},_2.edge_click=function(row2,column,selected,more){context.edge_click.apply(context,arguments)},_2.edge_dblclick=function(row2,column,selected,more){context.edge_dblclick.apply(context,arguments)},this._chartMonitor&&(this._chartMonitor.remove(),delete this._chartMonitor),this._chartMonitor=_2.monitor(function(key,newVal,oldVal){context.broadcast(key,newVal,oldVal,_2)})}return retVal};class Summary extends common.HTMLWidget{constructor(){super()}enter(domNode,element){super.enter(domNode,element),element.append("p")}update(domNode,element){super.update(domNode,element),element.select("p").text(this.text())}}Summary.prototype.publish("text","","string");class MultiChartPanel extends ChartPanel{constructor(){super(),this.widget(new MultiChart().chartType("COLUMN"))}multiChart(){return this._widget}chartType(_2){return arguments.length?(this._widget.chartType(_2),this):this._widget.chartType()}chart(_2){return arguments.length?(this._widget.chart(_2),this):this._widget.chart()}chartTypeDefaults(_2){return arguments.length?(this._widget.chartTypeDefaults(_2),this):this._widget.chartTypeDefaults()}chartTypeProperties(_2){return arguments.length?(this._widget.chartTypeProperties(_2),this):this._widget.chartTypeProperties()}update(domNode,element){super.update(domNode,element),this._widget instanceof MultiChart&&this._legend.dataFamily(this._widget.getChartDataFamily()),super.update(domNode,element)}}MultiChartPanel.prototype._class+=" composite_MultiChartPanel";class Dermatology extends Border{constructor(){super();__publicField(this,"_toolbar");__publicField(this,"_propEditor");__publicField(this,"_showProperties");__publicField(this,"_propsButton");__publicField(this,"_prevWidget");__publicField(this,"showToolbar");__publicField(this,"showToolbar_exists");__publicField(this,"widget");__publicField(this,"widget_exists");this._toolbar=new Toolbar().title("Dermatology"),this._propEditor=new other.PropertyEditor().show_settings(!0)}showProperties(_2){if(!arguments.length)return this._showProperties;this._showProperties=_2,this.rightPercentage(0).rightSize(this._showProperties?360:0).setContent("right",this._showProperties?this._propEditor:null);const widget=this.widget();return widget&&widget.designMode&&widget.designMode(this._showProperties),this}toggleProperties(){return this.showProperties(!this.showProperties())}enter(domNode,element){super.enter(domNode,element),this.topPercentage(0).topSize(0).setContent("top",this._toolbar),this.getCell("top").surfaceShadow(!0);const context=this;this._propsButton=new form.OnOff().id(this.id()+"_props").value("Properties").on("click",function(){context.toggleProperties().render()}),this._toolbar.widgets([this._propsButton])}update(domNode,element){this.topPercentage(0).topSize(this.showToolbar()?32:0),super.update(domNode,element);const widget=this.widget();element.style("background-color",widget&&widget.surfaceShadow?null:"white")}render(callback){const widget=this.widget();return widget!==this._prevWidget&&(widget&&widget.surfaceShadow&&widget.surfaceBackgroundColor_default("white"),this.setContent("center",widget),this._propEditor.widget(widget),this._prevWidget=widget),super.render(callback)}}Dermatology.prototype._class+=" composite_Dermatology",Dermatology.prototype.publish("showToolbar",!0,"boolean","Show Toolbar"),Dermatology.prototype.publish("widget",null,"widget","Widget");class MegaChart extends Border{constructor(){super();__publicField(this,"_chart",new MultiChart);__publicField(this,"_toolbar",new Toolbar);__publicField(this,"_valueTitle",new common.Text);__publicField(this,"_domainTitle",new common.Text);__publicField(this,"_legend",new other.Legend);__publicField(this,"_csvButton");__publicField(this,"_infoButton");__publicField(this,"_maximizeButton");__publicField(this,"_legendButton");__publicField(this,"_chartTypeSelect");__publicField(this,"_prevLegendPosition");__publicField(this,"_prevShowToolbar");__publicField(this,"_1DChartTypes");__publicField(this,"_2DChartTypes");__publicField(this,"_NDChartTypes");__publicField(this,"_anyChartTypes");__publicField(this,"_allChartTypes");__publicField(this,"_contentClasses");__publicField(this,"_dataCount");__publicField(this,"hideRowOnLegendClick");__publicField(this,"hideRowOnLegendClick_exists");__publicField(this,"showToolbar");__publicField(this,"showToolbar_exists");__publicField(this,"titleFontSize");__publicField(this,"titleFontSize_exists");__publicField(this,"titleFontColor");__publicField(this,"titleFontColor_exists");__publicField(this,"titleFontFamily");__publicField(this,"titleFontFamily_exists");__publicField(this,"titleFontBold");__publicField(this,"titleFontBold_exists");__publicField(this,"titleBackgroundColor");__publicField(this,"titleBackgroundColor_exists");__publicField(this,"maximizedBackgroundColor");__publicField(this,"maximizedBackgroundColor_exists");__publicField(this,"showChartSelect");__publicField(this,"showChartSelect_exists");__publicField(this,"showCSV");__publicField(this,"showCSV_exists");__publicField(this,"showCount");__publicField(this,"showCount_exists");__publicField(this,"showMaximize");__publicField(this,"showMaximize_exists");__publicField(this,"toolbarShowLegend");__publicField(this,"toolbarShowLegend_exists");__publicField(this,"showInfoButton");__publicField(this,"showInfoButton_exists");__publicField(this,"infoIcon");__publicField(this,"infoIcon_exists");__publicField(this,"legendPosition");__publicField(this,"legendPosition_exists");__publicField(this,"title");__publicField(this,"title_exists");__publicField(this,"domainAxisTitle");__publicField(this,"domainAxisTitle_exists");__publicField(this,"valueAxisTitle");__publicField(this,"valueAxisTitle_exists");__publicField(this,"chartType");__publicField(this,"chartType_exists");__publicField(this,"chart");__publicField(this,"chart_exists");this._tag="div";const context=this;this._chart.click=function(){context.click.apply(context,arguments)},this._chart.dblclick=function(){context.dblclick.apply(context,arguments)},this._chart.vertex_click=function(){context.vertex_click.apply(context,arguments)},this._chart.vertex_dblclick=function(){context.vertex_dblclick.apply(context,arguments)},this._chart.edge_click=function(){context.edge_click.apply(context,arguments)},this._chart.edge_dblclick=function(){context.edge_dblclick.apply(context,arguments)}}toolbarWidgets(_2){return arguments.length?(this._toolbar.widgets(_2),this):this._toolbar.widgets()}chartTypeDefaults(_2){return arguments.length?(this._chart.chartTypeDefaults(_2),this):this._chart.chartTypeDefaults()}chartTypeProperties(_2){return arguments.length?(this._chart.chartTypeProperties(_2),this):this._chart.chartTypeProperties()}fields(_2){return arguments.length?(this._chart.fields(_2),this):this._chart.fields()}columns(_2,asDefault){return arguments.length?(this._chart.columns(_2,asDefault),this):this._chart.columns()}data(_2){return arguments.length?(this._chart.data(_2),this):this._chart.data()}downloadCSV(){return common.Utility.downloadString("CSV",this._chart.export("CSV")),this}enter(domNode,element){super.enter(domNode,element);const context=this;this.topShrinkWrap(!1).topPercentage(0).topSize(30),this._dataCount=new other.Html().classed({"composite_MegaChart-dataCount":!0}).id(this.id()+"_dataCount").html('<span class="MegaChart-dataCount-label">Count:</span>&nbsp;<span class="MegaChart-dataCount-value">'+(this.data()?this.data().length:"0")+"</span>").overflowX("visible").overflowY("visible"),this._csvButton=new form.Button().classed({"composite_MegaChart-CSV":!0}).id(this.id()+"_csv").value("CSV"),this._csvButton.click=function(a2){context.downloadCSV()},this._infoButton=new form.Button().classed({"composite_MegaChart-Info":!0}).id(this.id()+"_info").value(this.infoIcon()),this._maximizeButton=new form.Button().classed({"composite_MegaChart-Maximize":!0}).id(this.id()+"_maximize").value(""),this._maximizeButton.click=function(buttonWidget){const target=context.target();let node=target;const isMaximized=common.select(target).classed("__hpccisMaximized"),parentGrid=context.locateAncestor("layout_Grid");parentGrid?node=parentGrid.element().node():node=document.body;const targetElement=common.select(context.target());if(isMaximized){const targetParentBox=target.parentElement.getBoundingClientRect(),targetPaddingTop=parseInt(getComputedStyle(target,null).getPropertyValue("padding-top").replace("px","")),targetPaddingLeft=parseInt(getComputedStyle(target,null).getPropertyValue("padding-left").replace("px","")),targetPaddingRight=parseInt(getComputedStyle(target,null).getPropertyValue("padding-right").replace("px","")),targetPaddingBottom=parseInt(getComputedStyle(target,null).getPropertyValue("padding-bottom").replace("px",""));context.contentDiv.style("opacity",0).transition(100),targetElement.transition().style("top",targetParentBox.top+"px").style("left",targetParentBox.left+"px").style("width",targetParentBox.width-targetPaddingLeft-targetPaddingRight+"px").style("height",targetParentBox.height-targetPaddingTop-targetPaddingBottom+"px").each("end",function(){targetElement.style("position",target.__old_position),targetElement.style("z-index",target.__old_zindex),targetElement.style("background-color",target.__old_backgroundColor),targetElement.style("box-shadow",target.__old_boxshadow),context.resize({width:targetParentBox.width-targetPaddingLeft-targetPaddingRight,height:targetParentBox.height-targetPaddingTop-targetPaddingBottom}).render(function(){context.contentDiv.transition().style("opacity",1)}),buttonWidget.value("").render()})}else{target.__old_position=target.style.position,target.__old_zindex=target.style.zIndex,target.__old_boxshadow=target.style.boxShadow,target.__old_backgroundColor=context.element().style("background-color");const grid=common.select(node).datum(),gridTarget=grid.target(),gridBox=grid?gridTarget.getBoundingClientRect():node.getBoundingClientRect(),gridPaddingTop=parseInt(getComputedStyle(gridTarget,null).getPropertyValue("padding-top").replace("px","")),gridPaddingLeft=parseInt(getComputedStyle(gridTarget,null).getPropertyValue("padding-left").replace("px","")),gridPaddingRight=parseInt(getComputedStyle(gridTarget,null).getPropertyValue("padding-right").replace("px","")),gridPaddingBottom=parseInt(getComputedStyle(gridTarget,null).getPropertyValue("padding-bottom").replace("px",""));context.contentDiv.style("opacity",0).transition(100),targetElement.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",target.__old_backgroundColor).transition().style("top",gridBox.top+gridPaddingTop+"px").style("left",gridBox.left+gridPaddingLeft+"px").style("width",gridBox.width-gridPaddingLeft-gridPaddingRight+"px").style("height",gridBox.height-gridPaddingTop-gridPaddingBottom+"px").each("end",function(){targetElement.style("background-color",context.maximizedBackgroundColor()),context.resize({width:gridBox.width-gridPaddingLeft-gridPaddingRight,height:gridBox.height-gridPaddingTop-gridPaddingBottom}).render(function(){context.contentDiv.transition().style("opacity",1)}),buttonWidget.value("").render()})}common.select(target).classed("__hpccisMaximized",!isMaximized)},this._legendButton=new form.Input().classed({"composite_MegaChart-legend":!0}).id(this.id()+"_legend").type("checkbox").inlineLabel("Legend: "),this._legendButton.click=function(a2){context.render()},this._chartTypeSelect=new form.Select().classed({"composite_MegaChart-chartType":!0}).id(this.id()+"_chartType").selectOptions(this._allChartTypes.map(function(a2){return[a2.id,a2.display]})).value(this.chartType()),this._chartTypeSelect.change=function(a2){context.chartType(a2.value()).render()},this.setContent("center",this._chart),this._legend.targetWidget(this._chart).orientation(["top","bottom"].indexOf(this.legendPosition())!==-1?"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),this.legendPosition()!=="none"&&this.setContent(this.legendPosition(),this._legend)[this.legendPosition()+"ShrinkWrap"](!0)}update(domNode,element){function showHideButton(twArr2,button,show){if(show&&twArr2.indexOf(button)===-1)twArr2.push(button);else if(!show){const idx=twArr2.indexOf(button);idx>=0&&twArr2.splice(idx,1)}}this._chart&&typeof this._chart.hideRowOnLegendClick=="function"&&this._chart.hideRowOnLegendClick(this.hideRowOnLegendClick()),this._dataCount.html('<span class="MegaChart-dataCount-label">Count:</span>&nbsp;<span class="MegaChart-dataCount-value">'+(this.data()?this.data().length:"0")+"</span>"),this._chartTypeSelect.value(this.chartType());const twArr=this.toolbarWidgets();showHideButton(twArr,this._csvButton,this.showCSV()),showHideButton(twArr,this._maximizeButton,this.showMaximize()),showHideButton(twArr,this._legendButton,this.toolbarShowLegend()),showHideButton(twArr,this._chartTypeSelect,this.showChartSelect()),showHideButton(twArr,this._infoButton,this.showInfoButton()),showHideButton(twArr,this._dataCount,this.showCount()),this.toolbarWidgets(twArr),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 legendPosition=this.legendPosition();this.toolbarShowLegend()&&!this._legendButton.checked()&&(legendPosition="none"),this._prevLegendPosition!==legendPosition&&(this._prevLegendPosition!=="none"&&this.clearContent(this._prevLegendPosition),this._prevLegendPosition=legendPosition,legendPosition!=="none"&&(this._legend=new other.Legend().targetWidget(this.getContent("center").fixedSize(!0)),this.setContent(legendPosition,this._legend),this._legend.orientation(["top","bottom"].indexOf(legendPosition)!==-1?"horizontal":"vertical"))),this._contentClasses=this.getContentClasses(),this.valueAxisTitle()&&this._contentClasses.left!=="common_Text"&&legendPosition!=="left"&&this.setContent("left",this._valueTitle.rotation(-90)),this.domainAxisTitle()&&this._contentClasses.bottom!=="common_Text"&&legendPosition!=="bottom"&&this.setContent("bottom",this._domainTitle).bottomShrinkWrap(!0),this._legend.dataFamily(this._chart.getChartDataFamily()),super.update(domNode,element)}exit(domNode,element){super.exit(domNode,element)}getContentClasses(){const obj={},t2=this.getContent("top"),r2=this.getContent("right"),b2=this.getContent("bottom"),l2=this.getContent("left");return obj.top=t2!==null?t2.classID():void 0,obj.right=r2!==null?r2.classID():void 0,obj.bottom=b2!==null?b2.classID():void 0,obj.left=l2!==null?l2.classID():void 0,obj}serializeState(){const state={title:this.title(),data:this.data()},chart=this.chart();return chart&&chart.serializeState&&(state.chart=chart.serializeState(),delete state.chart.data),state}deserializeState(state){if(state){this.title(state.title).data(state.data);const chart=this.chart();chart&&state.chart&&chart.serializeState&&chart.deserializeState(state.chart)}return this}click(row2,column,selected){}dblclick(row2,column,selected){}vertex_click(row2,col,sel,more){more&&more.vertex}vertex_dblclick(row2,col,sel,more){more&&more.vertex}edge_click(row2,col,sel,more){more&&more.edge}edge_dblclick(row2,col,sel,more){more&&more.edge}}MegaChart.prototype._class+=" composite_MegaChart",MegaChart.prototype._1DChartTypes=MultiChart.prototype._1DChartTypes,MegaChart.prototype._2DChartTypes=MultiChart.prototype._2DChartTypes,MegaChart.prototype._NDChartTypes=MultiChart.prototype._NDChartTypes,MegaChart.prototype._anyChartTypes=MultiChart.prototype._anyChartTypes,MegaChart.prototype._allChartTypes=MultiChart.prototype._allChartTypes,MegaChart.prototype.publishReset(),MegaChart.prototype.publish("hideRowOnLegendClick",!1,"boolean","Enable/Disable hiding row on legend clicks",null,{tags:["Basic"]}),MegaChart.prototype.publish("showToolbar",!0,"boolean","Enable/Disable Toolbar widget",null,{tags:["Basic"]}),MegaChart.prototype.publishProxy("title","_toolbar","title"),MegaChart.prototype.publish("ddlParamsFormat","","string","DDL Param Format '{fname}, {lname}'",null,{tags:["Advanced"],optional:!0}),MegaChart.prototype.publish("titleFontSize",null,"number","Title Font Size (px)",null,{tags:["Advanced"],optional:!0}),MegaChart.prototype.publish("titleFontColor",null,"html-color","Title Font Color",null,{tags:["Advanced"],optional:!0}),MegaChart.prototype.publish("titleFontFamily",null,"string","Title Font Family",null,{tags:["Advanced"],optional:!0}),MegaChart.prototype.publish("titleFontBold",!0,"boolean","Enable Bold Title Font",null,{tags:["Advanced"],optional:!0}),MegaChart.prototype.publish("titleBackgroundColor",null,"html-color","Background Color",null,{tags:["Intermediate"],optional:!0}),MegaChart.prototype.publish("maximizedBackgroundColor","#FFFFFF","html-color","Background Color while maximized",null,{tags:["Intermediate"],optional:!0}),MegaChart.prototype.publish("showChartSelect",!0,"boolean","Show/Hide the chartType dropdown in the toolbar",null,{tags:["Basic"]}),MegaChart.prototype.publish("showCSV",!0,"boolean","Show/Hide CSV button",null,{tags:["Basic"]}),MegaChart.prototype.publish("showCount",!1,"boolean","Show/Hide Data Count",null,{tags:["Basic"]}),MegaChart.prototype.publish("showMaximize",!1,"boolean","Show/Hide Maximize button",null,{tags:["Basic"]}),MegaChart.prototype.publish("toolbarShowLegend",!1,"boolean","Show/Hide Legend button",null,{tags:["Basic"]}),MegaChart.prototype.publish("showInfoButton",!1,"boolean","Show/Hide Info button in toolbar",null,{tags:["Basic"]}),MegaChart.prototype.publish("infoIcon","","string","Help Icon",null,{tags:["Basic"]}),MegaChart.prototype.publish("legendPosition","none","set","Position of the Legend widget",["none","top","right","bottom","left"],{tags:["Basic"]}),MegaChart.prototype.publishProxy("legendFormat","_legend","rainbowFormat"),MegaChart.prototype.publishProxy("legendBins","_legend","rainbowBins"),MegaChart.prototype.publishProxy("domainAxisTitle","_domainTitle","text"),MegaChart.prototype.publishProxy("valueAxisTitle","_valueTitle","text"),MegaChart.prototype.publishProxy("chartType","_chart","chartType"),MegaChart.prototype.publishProxy("chart","_chart","chart");function retrofit_114_serialization(state,replacement_version){if(replacement_version=!replacement_version||replacement_version==="1.14.2-dev"?"1.18.0":replacement_version,!state.__version)return state;const state_version_obj=common.Utility.parseVersionString(state.__version),target_version_obj=common.Utility.parseVersionString(replacement_version);if(state_version_obj.major===1&&state_version_obj.minor===14){console.info("Upgrading old persist from "+state.__version+" to "+replacement_version);let _json_str=JSON.stringify(state);_json_str=_json_str.split('"'+state.__version).join('"'+replacement_version);const ret_obj=JSON.parse(_json_str);return ret_obj.__properties&&ret_obj.__properties.content&&ret_obj.__properties.content.forEach(function(n2){JSON.stringify(n2).split("graph_Graph").length>1&&target_version_obj.minor>=16&&(n2.__properties.widget.__id=n2.__properties.widget.__properties.widget.__id,n2.__properties.widget.__class="composite_MegaChart",n2.__properties.widget.__properties.showCSV=!1,n2.__properties.widget.__properties.chartType="GRAPH",n2.__properties.widget.__properties.chart=n2.__properties.widget.__properties.widget,delete n2.__properties.widget.__properties.chart.__id,delete n2.__properties.widget.__properties.widget),typeof n2.__properties.fields>"u"&&(n2.__properties.fields=[])}),ret_obj}else return state}function deserializeFromObject(widget,state){const promises=[];return other.Persist.widgetPropertyWalker(widget,null,(w2,item)=>{if(w2[item.id+"_reset"](),state.__properties[item.id]!==void 0)switch(item.type){case"widget":const widgetKey=item.id;promises.push(create(state.__properties[item.id]).then(w22=>(w22._owner=w2,w2[widgetKey](w22),w22)));break;case"widgetArray":case"propertyArray":const widgetArrayKey=item.id,widgetStateArray=state.__properties[item.id];if(widgetStateArray.length){const arrPromises=[];for(const widgetState of widgetStateArray)arrPromises.push(create(widgetState).then(widgetItem=>(widgetItem._owner=w2,widgetItem)));promises.push(Promise.all(arrPromises).then(widgetArray=>{w2[widgetArrayKey](widgetArray)}))}break;default:w2[item.id](state.__properties[item.id]);break}}),Promise.all(promises).then(widgets=>{if(state.__data){for(const key in state.__data)if(state.__data.HasOwnProperty(key))switch(key){case"data":widget.data(state.__data[key]);break;default:console.warn("Unexpected __data item: "+key),widget[key](state.__data[key]);break}}return state.__state&&(widget.deserializeState?widget.deserializeState(state.__state):state.__state.data&&widget.data&&widget.data(state.__state.data)),widget})}function deserialize(widget,state){typeof state=="string"&&(state=JSON.parse(state)),state.__id&&state.__id.indexOf(widget._idSeed)!==0&&widget._id!==state.__id&&console.warn("Deserialize: IDs do not match - "+widget._id),deserializeFromObject(widget,state)}function create(state){return typeof state=="string"&&(state=JSON.parse(state)),state=retrofit_114_serialization(state,common.Platform.version()),requireWidget(state.__class).then(WidgetClass=>{const widget=new WidgetClass;return state.__id&&state.__id.indexOf(widget._idSeed)!==0&&state.__id.indexOf("_pe")!==0&&(widget._id=state.__id),deserializeFromObject(widget,state)}).catch(function(e2){console.error("Persist.create: ***exception***"),console.error(e2)})}function clone(widget){create(other.Persist.serializeToObject(widget,void 0,!0,!0))}const Persist=Object.freeze(Object.defineProperty({__proto__:null,clone,create,deserialize,deserializeFromObject,retrofit_114_serialization},Symbol.toStringTag,{value:"Module"}));exports2.BUILD_VERSION=BUILD_VERSION,exports2.Dermatology=Dermatology,exports2.MegaChart=MegaChart,exports2.MultiChart=MultiChart,exports2.MultiChartPanel=MultiChartPanel,exports2.PKG_NAME=PKG_NAME,exports2.PKG_VERSION=PKG_VERSION,exports2.Persist=Persist,exports2.Utility=Utility,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
8
+ //# sourceMappingURL=index.umd.cjs.map