@nebula.js/sn-table 4.8.2 → 4.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-table v4.8.2
2
+ * @nebula.js/sn-table v4.8.3
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -137,6 +137,6 @@ function dp(e,t){let n;return n=t?ap(e).withConfig({displayName:t.label,shouldFo
137
137
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138
138
  * See the License for the specific language governing permissions and
139
139
  * limitations under the License.
140
- */!function(e,t){var n;function r(e,t){var n=[],r=0;function o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="direction\\s*:\\s*",a="['\"]?\\s*",s="(^|[^a-zA-Z])",l="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",u="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",c="(?:[_a-z0-9-]|"+n+"|"+u+")",d=o+"(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|"+("-?"+("(?:[_a-z]|"+n+"|"+u+")")+c+"*")+")?",p="((?:-?"+d+")|(?:inherit|auto))",f="(#?"+c+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",h="(?:[!#$%&*-~]|"+n+"|"+u+")*?",m="(?![a-zA-Z])",g="(?!("+c+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+h+a+"\\))",b="(?="+h+a+"\\))",v="(\\s*(?:!important\\s*)?[;}])",x=/`TMP`/g,S=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),w=new RegExp("("+l+g+"[^;}]+;?)","gi"),C=new RegExp("("+l+"[^\\}]*?})","gi"),E=new RegExp("("+i+")ltr","gi"),k=new RegExp("("+i+")rtl","gi"),R=new RegExp(s+"(left)"+m+y+g,"gi"),_=new RegExp(s+"(right)"+m+y+g,"gi"),M=new RegExp(s+"(left)"+b,"gi"),A=new RegExp(s+"(right)"+b,"gi"),D=new RegExp(s+"(ltr)"+b,"gi"),P=new RegExp(s+"(rtl)"+b,"gi"),L=new RegExp(s+"([ns]?)e-resize","gi"),I=new RegExp(s+"([ns]?)w-resize","gi"),q=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+p+"(\\s+)"+p+"(\\s+)"+p+"(\\s+)"+p+v,"gi"),T=new RegExp("((?:-color|border-style)\\s*:\\s*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+v,"gi"),O=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+d+")","gi"),N=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),z=new RegExp("(border-radius\\s*:\\s*)"+p+"(?:(?:\\s+"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?)?(?:(?:(?:\\s*\\/\\s*)"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?(?:\\s+"+p+")?)?"+v,"gi"),F=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+p,"gi"),j=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+f,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+p,"gi"),B=new RegExp("(text-shadow\\s*:\\s*)"+p,"gi"),$=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+p+"(\\s*\\))","gi"),V=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+p+"((?:\\s*,\\s*"+p+"){0,2}\\s*\\))","gi");function W(e,t,n){var r,o;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):n=100-parseFloat(n)+"%"),t+n}function U(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function G(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),o=n.slice(6,10).filter((function(e){return e})),i=n[10]||"";return t+(o.length?U(r)+" / "+U(o):U(r))+i}function Y(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function K(e,t,n){return t+Y(n)}function X(e,t,n,r,o){return t+n+Y(r)+o}function J(e,t,n,r,o){return t+n+r+Y(o)}return{transform:function(n,o){var i=new r(w,"`NOFLIP_SINGLE`"),a=new r(C,"`NOFLIP_CLASS`"),s=new r(S,t);return n=s.tokenize(a.tokenize(i.tokenize(n.replace("`","%60")))),o.transformDirInUrl&&(n=n.replace(D,"$1"+e).replace(P,"$1ltr").replace(x,"rtl")),o.transformEdgeInUrl&&(n=n.replace(M,"$1"+e).replace(A,"$1left").replace(x,"right")),n=n.replace(E,"$1"+e).replace(k,"$1ltr").replace(x,"rtl").replace(R,"$1"+e).replace(_,"$1left").replace(x,"right").replace(L,"$1$2"+e).replace(I,"$1$2e-resize").replace(x,"w-resize").replace(z,G).replace(F,K).replace(j,J).replace(H,J).replace(B,K).replace($,X).replace(V,X).replace(q,"$1$2$3$8$5$6$7$4$9").replace(T,"$1$2$3$8$5$6$7$4$9").replace(O,W).replace(N,W),n=i.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof r&&(o.transformEdgeInUrl=r)),n.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=n)}(tO,tO.exports);var nO=ze(tO.exports),rO="comm",oO="rule",iO="decl",aO=Math.abs,sO=String.fromCharCode;function lO(e){return e.trim()}function uO(e,t,n){return e.replace(t,n)}function cO(e,t,n){return e.indexOf(t,n)}function dO(e,t){return 0|e.charCodeAt(t)}function pO(e,t,n){return e.slice(t,n)}function fO(e){return e.length}function hO(e,t){return t.push(e),e}var mO,gO,yO,bO,vO=1,xO=1,SO=0,wO=0,CO=0,EO="";function kO(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:vO,column:xO,length:a,return:"",siblings:s}}function RO(){return CO=wO>0?dO(EO,--wO):0,xO--,10===CO&&(xO=1,vO--),CO}function _O(){return CO=wO<SO?dO(EO,wO++):0,xO++,10===CO&&(xO=1,vO++),CO}function MO(){return dO(EO,wO)}function AO(){return wO}function DO(e,t){return pO(EO,e,t)}function PO(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LO(e){return lO(DO(wO-1,TO(91===e?e+2:40===e?e+1:e)))}function IO(e){for(;(CO=MO())&&CO<33;)_O();return PO(e)>2||PO(CO)>3?"":" "}function qO(e,t){for(;--t&&_O()&&!(CO<48||CO>102||CO>57&&CO<65||CO>70&&CO<97););return DO(e,AO()+(t<6&&32==MO()&&32==_O()))}function TO(e){for(;_O();)switch(CO){case e:return wO;case 34:case 39:34!==e&&39!==e&&TO(CO);break;case 40:41===e&&TO(e);break;case 92:_O()}return wO}function OO(e,t){for(;_O()&&e+CO!==57&&(e+CO!==84||47!==MO()););return"/*"+DO(t,wO-1)+"*"+sO(47===e?e:_O())}function NO(e){for(;!PO(MO());)_O();return DO(e,wO)}function zO(e){return function(e){return EO="",e}(FO("",null,null,null,[""],e=function(e){return vO=xO=1,SO=fO(EO=e),wO=0,[]}(e),0,[0],e))}function FO(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,y=1,b=0,v="",x=o,S=i,w=r,C=v;g;)switch(h=b,b=_O()){case 40:if(108!=h&&58==dO(C,d-1)){-1!=cO(C+=uO(LO(b),"&","&\f"),"&\f",aO(u?s[u-1]:0))&&(y=-1);break}case 34:case 39:case 91:C+=LO(b);break;case 9:case 10:case 13:case 32:C+=IO(h);break;case 92:C+=qO(AO()-1,7);continue;case 47:switch(MO()){case 42:case 47:hO(HO(OO(_O(),AO()),t,n,l),l),5!=PO(h||1)&&5!=PO(MO()||1)||!fO(C)||" "===pO(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[u++]=fO(C)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:-1==y&&(C=uO(C,/\f/g,"")),f>0&&(fO(C)-d||0===m&&47===h)&&hO(f>32?BO(C+";",r,n,d-1,l):BO(uO(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(hO(w=jO(C,t,n,u,c,o,s,v,x=[],S=[],d,i),i),123===b)if(0===c)FO(C,t,w,w,x,i,d,s,S);else{switch(p){case 99:if(110===dO(C,3))break;case 108:if(97===dO(C,2))break;default:c=0;case 100:case 109:case 115:}c?FO(e,w,w,r&&hO(jO(e,w,w,0,0,o,s,v,o,x=[],d,S),S),o,S,d,s,r?x:S):FO(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=y=1,v=C="",d=a;break;case 58:d=1+fO(C),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==RO())continue;switch(C+=sO(b),b*m){case 38:y=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(fO(C)-1)*y,y=1;break;case 64:45===MO()&&(C+=LO(_O())),p=MO(),c=d=fO(v=C+=NO(AO())),b++;break;case 45:45===h&&2==fO(C)&&(m=0)}}return i}function jO(e,t,n,r,o,i,a,s,l,u,c,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,y=0;m<r;++m)for(var b=0,v=pO(e,p+1,p=aO(g=a[m])),x=e;b<h;++b)(x=lO(g>0?f[b]+" "+v:uO(v,/&\f/g,f[b])))&&(l[y++]=x);return kO(e,t,n,0===o?oO:s,l,u,c,d)}function HO(e,t,n,r){return kO(e,t,n,rO,sO(CO),pO(e,2,-2),0,r)}function BO(e,t,n,r,o){return kO(e,t,n,iO,pO(e,0,r),pO(e,r+1,-1),r,o)}function $O(e,t,n){switch(e.type){case"@import":case iO:case rO:return e.return=e.return||e.value;case oO:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===rO&&(e.children=e.value)}))}var r=function(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}(Array.prototype.concat(e.children),$O);return fO(r)?e.return=e.value+"{"+r+"}":""}function VO(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===oO&&(!e.parent||"@media"===e.parent.type||e.parent.type===oO)){var o=nO.transform($O(e));e.children=o?zO(o)[0].children:[],e.return=""}}Object.defineProperty(VO,"name",{value:"stylisRTLPlugin"}),function(e){e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive"}(mO||(mO={})),function(e){e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows"}(gO||(gO={})),function(e){e.A="ascending",e.D="descending"}(yO||(yO={})),function(e){e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2"}(bO||(bO={}));const WO=[0,0],UO={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF",GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_25:"rgba(0, 0, 0, 0.25)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},GO=12,YO=14,KO=16,XO=24,JO=3,QO=300,ZO=400,eN=600,tN=700,nN={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};var rN='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A';function oN(e){return Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Rl.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function iN(e){return Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Rl.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}var aN=function({fontSize:e="medium",children:t=null,className:n=""}={}){const r="small"===e?"16px":"20px",o="small"===e?"-2px 0":void 0;return Rl.jsx("i",{style:{fontSize:r,margin:o,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})};function sN(e={}){return Rl.jsx(aN,{...e,children:Rl.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Rl.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Rl.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function lN(e={}){return Rl.jsx(aN,{...e,children:Rl.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Rl.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Rl.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Rl.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function uN(e={}){return Rl.jsx(aN,{fontSize:"medium",...e,children:Rl.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Rl.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Rl.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function cN(e={}){return Rl.jsx(aN,{fontSize:"medium",...e,children:Rl.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Rl.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Rl.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function dN({className:e}){return Rl.jsx(aN,{fontSize:"small",className:e,children:Rl.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Rl.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Rl.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Rl.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Rl.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),Rl.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function pN(e={}){return Rl.jsx(aN,{...e,children:Rl.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Rl.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Rl.jsx("rect",{stroke:UO.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}const fN={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:JO,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var hN=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:UO.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:UO.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Rl.jsx(oN,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${UO.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,borderRadius:JO,backgroundColor:UO.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${UO.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:UO.WHITE,color:UO.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:JO},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&.Mui-focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&.Mui-focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:JO,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:UO.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:UO.PURPLE,"&.Mui-focusVisible":{borderColor:UO.PURPLE,boxShadow:`0 0 0 3px ${fh(UO.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:UO.GREEN,"&.Mui-focusVisible":{borderColor:UO.GREEN,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:UO.BLUE,"&.Mui-focusVisible":{borderColor:UO.BLUE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:UO.ORANGE,"&.Mui-focusVisible":{borderColor:UO.ORANGE,boxShadow:`0 0 0 3px ${fh(UO.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:UO.RED,"&.Mui-focusVisible":{borderColor:UO.RED,boxShadow:`0 0 0 3px ${fh(UO.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:UO.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:UO.PURPLE_PALE},"&:active":{backgroundColor:UO.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:UO.PURPLE_PALE,boxShadow:`0 0 0 3px ${fh(UO.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&.Mui-focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&.Mui-focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:UO.ORANGE_PALE},"&:active":{backgroundColor:UO.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:UO.ORANGE_PALE,boxShadow:`0 0 0 3px ${fh(UO.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:UO.RED_PALE},"&:active":{backgroundColor:UO.RED_DARK},"&.Mui-focusVisible":{borderColor:UO.RED_PALE,boxShadow:`0 0 0 3px ${fh(UO.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:UO.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:UO.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:JO,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Rl.jsx(iN,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:GO,borderRadius:JO,color:UO.TEXT_PRIMARY,backgroundColor:UO.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:UO.GREYSCALE_0_05,color:UO.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:UO.GREEN,borderColor:UO.GREEN},"&.MuiChip-outlinedInfo":{color:UO.BLUE,borderColor:UO.BLUE},"&.MuiChip-outlinedWarning":{color:UO.ORANGE,borderColor:UO.ORANGE},"&.MuiChip-outlinedError":{color:UO.RED,borderColor:UO.RED}},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:JO,boxShadow:"none",backgroundColor:UO.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:UO.GREEN,borderColor:UO.GREEN},outlinedSecondary:{color:UO.BLUE,borderColor:UO.BLUE},label:{fontFamily:nN.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Rl.jsx(iN,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Rl.jsx(oN,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:JO},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:JO,fontSize:YO,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:UO.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${UO.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:UO.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:UO.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_05}}},popupIndicator:{borderRadius:JO,border:`solid 1px ${UO.GREYSCALE_0_15}`,color:UO.GREYSCALE_0_60,marginRight:0,width:XO,height:XO},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${UO.GREYSCALE_0_15}`},clearIndicator:{borderRadius:JO,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:UO.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:YO}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:GO,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:UO.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:UO.GREYSCALE_25,fontSize:GO,fontFamily:nN.FONT_FAMILY,fontWeight:eN,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:UO.TEXT_PRIMARY},"&.Mui-error":{color:UO.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:UO.TEXT_SECONDARY,content:"'(optional)'",fontWeight:ZO,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:UO.TEXT_SECONDARY,content:"'(required)'",fontWeight:ZO,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:YO,lineHeight:"16px",backgroundColor:UO.WHITE,borderRadius:JO,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_05}`,borderColor:UO.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.RED}`,boxShadow:`0px 0px 0px 1px ${UO.RED}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_10}`,borderColor:UO.GREYSCALE_0_10,backgroundColor:UO.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:UO.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:UO.GREYSCALE_0_15,borderRadius:JO,boxShadow:`inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Rl.jsx(oN,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:UO.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:UO.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&:focus":{backgroundColor:UO.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:UO.GREYSCALE_0_30,"&:hover":{backgroundColor:UO.GREYSCALE_0_0,borderColor:UO.GREYSCALE_0_15},"& ~svg":{color:UO.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:JO}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:UO.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:YO,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:GO,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:GO,fontWeight:eN,color:UO.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:eN}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Rl.jsx(uN,{}),checkedIcon:Rl.jsx(cN,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:UO.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:UO.GREYSCALE_0_20}},"&.Mui-disabled":{fill:UO.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Rl.jsx(pN,{}),checkedIcon:Rl.jsx(sN,{}),indeterminateIcon:Rl.jsx(lN,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:JO,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:UO.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:UO.GREYSCALE_0_55,color:UO.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:UO.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:UO.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:UO.GREYSCALE_0_55,"&:hover":{color:UO.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:UO.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:UO.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:YO,color:UO.TEXT_PRIMARY,lineHeight:"16px",fontWeight:eN},secondary:{fontSize:GO,color:UO.GREYSCALE_45,fontWeight:ZO,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:YO,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:YO,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:UO.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:GO,borderBottom:`solid 1px ${UO.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:YO,color:UO.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:UO.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:`url('${rN}')`,fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:UO.RED}}},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:UO.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:UO.GREEN,height:"24px","&.Mui-disabled":{color:UO.GREYSCALE_0_15}},rail:{backgroundColor:UO.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO,boxShadow:`inset 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.WHITE,boxShadow:`0px 1px 2px 0px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`,"&:hover":{borderRadius:JO,boxShadow:`0 2px 4px 0 ${UO.GREYSCALE_0_30}, 0 0 0 1px ${UO.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${UO.GREYSCALE_0_15}, 0 0 0 1px ${UO.GREYSCALE_0_06}, 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${UO.GREYSCALE_0_15}, 0 0 0 1px ${UO.GREYSCALE_0_06}, 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:UO.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:UO.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:UO.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:UO.GREYSCALE_0_15},markLabel:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:UO.WHITE,color:UO.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:UO.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:UO.GREYSCALE_0_15,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:YO,fontWeight:eN,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${UO.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,backgroundColor:UO.GREYSCALE_0_03,borderRadius:JO},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:UO.GREYSCALE_25,"&.Mui-selected":{color:UO.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:YO,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:JO,"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${UO.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${UO.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:JO,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:UO.GREYSCALE_0_05},"&:hover":{backgroundColor:UO.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderRight:`1px solid ${UO.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:eN,backgroundColor:UO.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:UO.GREYSCALE_98,borderBottom:`1px solid ${UO.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderTop:`1px solid ${UO.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:UO.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:UO.GREYSCALE_0_05,"&:hover":{backgroundColor:UO.GREYSCALE_0_03}},"&&:hover":{backgroundColor:UO.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Rl.jsx(dN,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${UO.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:YO,borderRadius:JO,padding:"7px 16px",border:`1px solid ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_60,color:UO.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_30}`},"&:hover":{backgroundColor:UO.GREYSCALE_0_03,border:`1px solid ${UO.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:UO.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`,border:`1px solid ${UO.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:UO.GREYSCALE_25,backgroundColor:UO.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:GO,height:24,width:24,padding:7},sizeLarge:{fontSize:KO,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:YO,borderRadius:JO}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:UO.GREYSCALE_20},tooltip:{backgroundColor:UO.GREYSCALE_20,fontSize:GO,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...fN}:{}});var mN=()=>({mode:"light",primary:{ultraLight:UO.GREEN_ULTRA_LIGHT,light:UO.GREEN_PALE,main:UO.GREEN,dark:UO.GREEN_DARK,extraDark:UO.GREEN_EXTRA_DARK,contrastText:UO.WHITE},secondary:{ultraLight:UO.BLUE_ULTRA_LIGHT,light:UO.BLUE_PALE,main:UO.BLUE,dark:UO.BLUE_DARK,extraDark:UO.BLUE_EXTRA_DARK,contrastText:UO.WHITE},error:{ultraLight:UO.RED_ULTRA_LIGHT,light:UO.RED_PALE,main:UO.RED,dark:UO.RED_DARK,extraDark:UO.RED_EXTRA_DARK,contrastText:UO.WHITE},warning:{ultraLight:UO.ORANGE_ULTRA_LIGHT,light:UO.ORANGE_PALE,main:UO.ORANGE,dark:UO.ORANGE_DARK,extraDark:UO.ORANGE_EXTRA_DARK,contrastText:UO.WHITE},success:{ultraLight:UO.GREEN_ULTRA_LIGHT,light:UO.GREEN_PALE,main:UO.GREEN,dark:UO.GREEN_DARK,extraDark:UO.GREEN_EXTRA_DARK,contrastText:UO.WHITE},info:{ultraLight:UO.BLUE_ULTRA_LIGHT,light:UO.BLUE_PALE,main:UO.BLUE,dark:UO.BLUE_DARK,extraDark:UO.BLUE_EXTRA_DARK,contrastText:UO.WHITE},text:{primary:UO.TEXT_PRIMARY,secondary:UO.TEXT_SECONDARY,disabled:UO.GREYSCALE_0_30},action:{hover:UO.GREYSCALE_0_03,hoverOpacity:.03,selected:UO.GREYSCALE_0_05,selectedOpacity:.05,focus:UO.MISC_FOCUS_BORDER},amethyst:{ultraLight:UO.WHITE,main:UO.PURPLE,light:UO.PURPLE_PALE,dark:UO.PURPLE_DARK,extraDark:UO.GREYSCALE_0_0,contrastText:UO.WHITE},background:{paper:UO.WHITE,default:UO.GREYSCALE_95},divider:UO.GREYSCALE_0_15});var gN=e=>mN();var yN=(e,t=!1)=>{const n=((e,t)=>hN(t))(0,t);return{components:n,palette:gN(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:YO,fontWeightLight:QO,fontWeightRegular:ZO,fontWeightMedium:eN,fontWeightBold:tN,htmlFontSize:YO,fontFamily:nN.FONT_FAMILY,button:{fontWeight:eN,fontSize:YO,textTransform:"none"},body1:{fontSize:KO,lineHeight:"24px"},body2:{fontSize:YO,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:XO,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:KO,fontWeight:eN,lineHeight:"16px"},h6:{fontSize:YO,fontWeight:eN,lineHeight:"16px"},caption:{color:UO.TEXT_SECONDARY},subtitle1:{fontSize:YO,color:UO.TEXT_SECONDARY},subtitle2:{fontSize:GO,color:UO.TEXT_SECONDARY}},shape:{borderRadius:JO}}},bN={},vN={exports:{}},xN={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(xN);var SN=xN.exports;!function(e){var t=SN.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=t(e)&&"function"!=typeof e)return{default:e};var o=n(r);if(o&&o.has(e))return o.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(i,s,l):i[s]=e[s]}return i.default=e,o&&o.set(e,i),i},e.exports.__esModule=!0,e.exports.default=e.exports}(vN);var wN=vN.exports,CN={},EN=Fe(Pt);Object.defineProperty(CN,"__esModule",{value:!0}),CN.hexToRgb=_N,CN.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=AN(e),n=t.values;return"#".concat(n.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))},CN.hslToRgb=MN,CN.decomposeColor=AN,CN.recomposeColor=DN,CN.getContrastRatio=function(e,t){var n=PN(e),r=PN(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},CN.getLuminance=PN,CN.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return PN(e)>.5?IN(e,t):qN(e,t)},CN.fade=function(e,t){return LN(e,t)},CN.alpha=LN,CN.darken=IN,CN.lighten=qN;var kN=EN;function RN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function _N(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function MN(e){var t=(e=AN(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),DN({type:s,values:l})}function AN(e){if(e.type)return e;if("#"===e.charAt(0))return AN(_N(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,kN.formatMuiErrorMessage)(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map((function(e){return parseFloat(e)})),{type:n,values:r}}function DN(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function PN(e){var t="hsl"===(e=AN(e)).type?AN(MN(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function LN(e,t){return e=AN(e),t=RN(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,DN(e)}function IN(e,t){if(e=AN(e),t=RN(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return DN(e)}function qN(e,t){if(e=AN(e),t=RN(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return DN(e)}var TN,ON,NN,zN={},FN={exports:{}},jN={exports:{}},HN={exports:{}};function BN(){return TN||(TN=1,function(e){var t=SN.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(HN)),HN.exports}function $N(){return ON||(ON=1,function(e){var t=SN.default,n=BN();e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(jN)),jN.exports}function VN(){return NN||(NN=1,function(e){var t=$N();e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(FN)),FN.exports}var WN,UN={exports:{}};function GN(){return WN||(WN=1,function(e){var t=og();e.exports=function(e,n){if(null==e)return{};var r,o,i=t(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.__esModule=!0,e.exports.default=e.exports}(UN)),UN.exports}var YN,KN={};var XN,JN={};var QN,ZN={},ez={};var tz,nz={};var rz,oz={};var iz,az={};var sz,lz={};var uz,cz={};var dz,pz={};var fz,hz,mz={};function gz(){if(hz)return ZN;hz=1;var e=lm;Object.defineProperty(ZN,"__esModule",{value:!0}),ZN.default=function(e){var g=e.primary,y=void 0===g?{light:a.default[300],main:a.default[500],dark:a.default[700]}:g,b=e.secondary,v=void 0===b?{light:s.default.A200,main:s.default.A400,dark:s.default.A700}:b,x=e.error,S=void 0===x?{light:l.default[300],main:l.default[500],dark:l.default[700]}:x,w=e.warning,C=void 0===w?{light:u.default[300],main:u.default[500],dark:u.default[700]}:w,E=e.info,k=void 0===E?{light:c.default[300],main:c.default[500],dark:c.default[700]}:E,R=e.success,_=void 0===R?{light:d.default[300],main:d.default[500],dark:d.default[700]}:R,M=e.type,A=void 0===M?"light":M,D=e.contrastThreshold,P=void 0===D?3:D,L=e.tonalOffset,I=void 0===L?.2:L,q=(0,n.default)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function T(e){return(0,p.getContrastRatio)(e,h.text.primary)>=P?h.text.primary:f.text.primary}var O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,t.default)({},e)).main&&e[n]&&(e.main=e[n]),!e.main)throw new Error((0,r.formatMuiErrorMessage)(4,n));if("string"!=typeof e.main)throw new Error(_formatMuiErrorMessage(5,JSON.stringify(e.main)));return m(e,"light",o,I),m(e,"dark",i,I),e.contrastText||(e.contrastText=T(e.main)),e},N={dark:h,light:f},z=(0,r.deepmerge)((0,t.default)({common:o.default,type:A,primary:O(y),secondary:O(v,"A400","A200","A700"),error:O(S),warning:O(C),info:O(k),success:O(_),grey:i.default,contrastThreshold:P,getContrastText:T,augmentColor:O,tonalOffset:I},N[A]),q);return z},ZN.dark=ZN.light=void 0;var t=e(tg()),n=e(GN()),r=EN,o=e(function(){if(QN)return ez;QN=1,Object.defineProperty(ez,"__esModule",{value:!0}),ez.default=void 0;var e={black:"#000",white:"#fff"};return ez.default=e,ez}()),i=e(function(){if(tz)return nz;tz=1,Object.defineProperty(nz,"__esModule",{value:!0}),nz.default=void 0;var e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};return nz.default=e,nz}()),a=e(function(){if(rz)return oz;rz=1,Object.defineProperty(oz,"__esModule",{value:!0}),oz.default=void 0;var e={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};return oz.default=e,oz}()),s=e(function(){if(iz)return az;iz=1,Object.defineProperty(az,"__esModule",{value:!0}),az.default=void 0;var e={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};return az.default=e,az}()),l=e(function(){if(sz)return lz;sz=1,Object.defineProperty(lz,"__esModule",{value:!0}),lz.default=void 0;var e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};return lz.default=e,lz}()),u=e(function(){if(uz)return cz;uz=1,Object.defineProperty(cz,"__esModule",{value:!0}),cz.default=void 0;var e={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};return cz.default=e,cz}()),c=e(function(){if(dz)return pz;dz=1,Object.defineProperty(pz,"__esModule",{value:!0}),pz.default=void 0;var e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};return pz.default=e,pz}()),d=e(function(){if(fz)return mz;fz=1,Object.defineProperty(mz,"__esModule",{value:!0}),mz.default=void 0;var e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};return mz.default=e,mz}()),p=CN,f={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:o.default.white,default:i.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}};ZN.light=f;var h={text:{primary:o.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:i.default[800],default:"#303030"},action:{active:o.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function m(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,p.lighten)(e.main,o):"dark"===t&&(e.dark=(0,p.darken)(e.main,i)))}return ZN.dark=h,ZN}var yz,bz={};var vz,xz={};var Sz,wz={};var Cz,Ez={},kz=Fe(br);var Rz,_z={};function Mz(){if(Rz)return _z;Rz=1;var e=lm;Object.defineProperty(_z,"__esModule",{value:!0}),_z.default=_z.duration=_z.easing=void 0;var t=e(GN()),n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};_z.easing=n;var r={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(e){return"".concat(Math.round(e),"ms")}_z.duration=r;var i={easing:n,duration:r,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.duration,s=void 0===a?r.standard:a,l=i.easing,u=void 0===l?n.easeInOut:l,c=i.delay,d=void 0===c?0:c;return(0,t.default)(i,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:o(s)," ").concat(u," ").concat("string"==typeof d?d:o(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};return _z.default=i,_z}var Az,Dz,Pz={};function Lz(){if(Dz)return zN;Dz=1;var e=lm;Object.defineProperty(zN,"__esModule",{value:!0}),zN.createMuiTheme=function(){return p.apply(void 0,arguments)},zN.default=void 0,e(VN());var t=e(GN()),n=EN,r=e(function(){if(YN)return KN;YN=1;var e=lm;Object.defineProperty(KN,"__esModule",{value:!0}),KN.default=function(e){var o=e.values,i=void 0===o?{xs:0,sm:600,md:960,lg:1280,xl:1920}:o,a=e.unit,s=void 0===a?"px":a,l=e.step,u=void 0===l?5:l,c=(0,n.default)(e,["values","unit","step"]);function d(e){var t="number"==typeof i[e]?i[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function p(e,t){var n=r.indexOf(t);return n===r.length-1?d(e):"@media (min-width:".concat("number"==typeof i[e]?i[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==n&&"number"==typeof i[r[n+1]]?i[r[n+1]]:t)-u/100).concat(s,")")}return(0,t.default)({keys:r,values:i,up:d,down:function(e){var t=r.indexOf(e)+1,n=i[r[t]];return t===r.length?d("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-u/100).concat(s,")")},between:p,only:function(e){return p(e,e)},width:function(e){return i[e]}},c)},KN.keys=void 0;var t=e(tg()),n=e(GN()),r=["xs","sm","md","lg","xl"];return KN.keys=r,KN}()),o=e(function(){if(XN)return JN;XN=1;var e=lm;Object.defineProperty(JN,"__esModule",{value:!0}),JN.default=function(e,r,o){var i;return(0,n.default)({gutters:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,n.default)({paddingLeft:r(2),paddingRight:r(2)},o,(0,t.default)({},e.up("sm"),(0,n.default)({paddingLeft:r(3),paddingRight:r(3)},o[e.up("sm")])))},toolbar:(i={minHeight:56},(0,t.default)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,t.default)(i,e.up("sm"),{minHeight:64}),i)},o)};var t=e(VN()),n=e(tg());return JN}()),i=e(gz()),a=e(function(){if(yz)return bz;yz=1;var e=lm;Object.defineProperty(bz,"__esModule",{value:!0}),bz.default=function(e,l){var u="function"==typeof l?l(e):l,c=u.fontFamily,d=void 0===c?s:c,p=u.fontSize,f=void 0===p?14:p,h=u.fontWeightLight,m=void 0===h?300:h,g=u.fontWeightRegular,y=void 0===g?400:g,b=u.fontWeightMedium,v=void 0===b?500:b,x=u.fontWeightBold,S=void 0===x?700:x,w=u.htmlFontSize,C=void 0===w?16:w,E=u.allVariants,k=u.pxToRem,R=(0,n.default)(u,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),_=f/14,M=k||function(e){return"".concat(e/C*_,"rem")},A=function(e,n,r,i,a){return(0,t.default)({fontFamily:d,fontWeight:e,fontSize:M(n),lineHeight:r},d===s?{letterSpacing:"".concat(o(i/n),"em")}:{},a,E)},D={h1:A(m,96,1.167,-1.5),h2:A(m,60,1.2,-.5),h3:A(y,48,1.167,0),h4:A(y,34,1.235,.25),h5:A(y,24,1.334,0),h6:A(v,20,1.6,.15),subtitle1:A(y,16,1.75,.15),subtitle2:A(v,14,1.57,.1),body1:A(y,16,1.5,.15),body2:A(y,14,1.43,.15),button:A(v,14,1.75,.4,a),caption:A(y,12,1.66,.4),overline:A(y,12,2.66,1,a)};return(0,r.deepmerge)((0,t.default)({htmlFontSize:C,pxToRem:M,round:i,fontFamily:d,fontSize:f,fontWeightLight:m,fontWeightRegular:y,fontWeightMedium:v,fontWeightBold:S},D),R,{clone:!1})};var t=e(tg()),n=e(GN()),r=EN;function o(e){return Math.round(1e5*e)/1e5}function i(e){return o(e)}var a={textTransform:"uppercase"},s='"Roboto", "Helvetica", "Arial", sans-serif';return bz}()),s=e(function(){if(vz)return xz;function e(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}vz=1,Object.defineProperty(xz,"__esModule",{value:!0}),xz.default=void 0;var t=["none",e(0,2,1,-1,0,1,1,0,0,1,3,0),e(0,3,1,-2,0,2,2,0,0,1,5,0),e(0,3,3,-2,0,3,4,0,0,1,8,0),e(0,2,4,-1,0,4,5,0,0,1,10,0),e(0,3,5,-1,0,5,8,0,0,1,14,0),e(0,3,5,-1,0,6,10,0,0,1,18,0),e(0,4,5,-2,0,7,10,1,0,2,16,1),e(0,5,5,-3,0,8,10,1,0,3,14,2),e(0,5,6,-3,0,9,12,1,0,3,16,2),e(0,6,6,-3,0,10,14,1,0,4,18,3),e(0,6,7,-4,0,11,15,1,0,4,20,3),e(0,7,8,-4,0,12,17,2,0,5,22,4),e(0,7,8,-4,0,13,19,2,0,5,24,4),e(0,7,9,-4,0,14,21,2,0,5,26,4),e(0,8,9,-5,0,15,22,2,0,6,28,5),e(0,8,10,-5,0,16,24,2,0,6,30,5),e(0,8,11,-5,0,17,26,2,0,6,32,5),e(0,9,11,-5,0,18,28,2,0,7,34,6),e(0,9,12,-6,0,19,29,2,0,7,36,6),e(0,10,13,-6,0,20,31,3,0,8,38,7),e(0,10,13,-6,0,21,33,3,0,8,40,7),e(0,10,14,-6,0,22,35,3,0,8,42,7),e(0,11,14,-7,0,23,36,3,0,9,44,8),e(0,11,15,-7,0,24,38,3,0,9,46,8)];return xz.default=t,xz}()),l=e(function(){if(Sz)return wz;Sz=1,Object.defineProperty(wz,"__esModule",{value:!0}),wz.default=void 0;var e={borderRadius:4};return wz.default=e,wz}()),u=e(function(){if(Cz)return Ez;Cz=1,Object.defineProperty(Ez,"__esModule",{value:!0}),Ez.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var n=(0,e.createUnarySpacing)({spacing:t}),r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?n(1):1===t.length?n(t[0]):t.map((function(e){if("string"==typeof e)return e;var t=n(e);return"number"==typeof t?"".concat(t,"px"):t})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r};var e=kz;return Ez}()),c=e(Mz()),d=e(function(){if(Az)return Pz;Az=1,Object.defineProperty(Pz,"__esModule",{value:!0}),Pz.default=void 0;var e={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};return Pz.default=e,Pz}());function p(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=e.breakpoints,f=void 0===p?{}:p,h=e.mixins,m=void 0===h?{}:h,g=e.palette,y=void 0===g?{}:g,b=e.spacing,v=e.typography,x=void 0===v?{}:v,S=(0,t.default)(e,["breakpoints","mixins","palette","spacing","typography"]),w=(0,i.default)(y),C=(0,r.default)(f),E=(0,u.default)(b),k=(0,n.deepmerge)({breakpoints:C,direction:"ltr",mixins:(0,o.default)(C,E,m),overrides:{},palette:w,props:{},shadows:s.default,typography:(0,a.default)(w,x),spacing:E,shape:l.default,transitions:c.default,zIndex:d.default},S),R=arguments.length,_=new Array(R>1?R-1:0),M=1;M<R;M++)_[M-1]=arguments[M];return k=_.reduce((function(e,t){return(0,n.deepmerge)(e,t)}),k)}var f=p;return zN.default=f,zN}var Iz,qz={};var Tz,Oz={},Nz=Fe(rl);var zz,Fz,jz={},Hz={};function Bz(){if(zz)return Hz;zz=1;var e=lm;Object.defineProperty(Hz,"__esModule",{value:!0}),Hz.default=void 0;var t=(0,e(Lz()).default)();return Hz.default=t,Hz}var $z,Vz,Wz={},Uz={};function Gz(){if(Vz)return Wz;Vz=1;var e=lm;Object.defineProperty(Wz,"__esModule",{value:!0}),Wz.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,u=o.factor,c=void 0===u?2:u,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map((function(e){return f.breakpoints.values[e]}));return p.forEach((function(e){var o=h[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/c,u=o.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}})),f};var t=e(tg()),n=EN,r=function(){if($z)return Uz;$z=1;var e=lm;Object.defineProperty(Uz,"__esModule",{value:!0}),Uz.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},Uz.getUnit=n,Uz.toUnitless=r,Uz.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var a=r(t);if("px"!==i)if("em"===i)a=r(t)*r(e);else if("rem"===i)return a=r(t)*r(e),t;var s=a;if("px"!==o)if("em"===o)s=a/r(e);else{if("rem"!==o)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+o}},Uz.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},Uz.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},Uz.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(o-r)/l[l.length-1];return l.forEach((function(e){var o=r+p*e;null!==c&&(o=c(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(a))})),d};var t=e(VN());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return Uz}();return Wz}var Yz,Kz={};var Xz,Jz={};var Qz,Zz={};var eF,tF={};!function(e){var t=lm,n=wN;Object.defineProperty(e,"__esModule",{value:!0});var r={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return m.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return m.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return m.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return m.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}});var o=CN;Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var i=n(Lz()),a=t(function(){if(Iz)return qz;Iz=1;var e=lm;Object.defineProperty(qz,"__esModule",{value:!0}),qz.default=function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(o))};var t=EN,n=e(Lz());return qz}()),s=t(function(){if(Tz)return Oz;Tz=1,Object.defineProperty(Oz,"__esModule",{value:!0}),Oz.default=function(t){return(0,e.createStyles)(t)};var e=Nz;return Oz}()),l=t(function(){if(Fz)return jz;Fz=1;var e=lm;Object.defineProperty(jz,"__esModule",{value:!0}),jz.default=void 0;var t=e(tg()),n=Nz,r=e(Bz()),o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return jz.default=o,jz}()),u=t(Gz()),c=t(function(){if(Yz)return Kz;Yz=1;var e=lm;Object.defineProperty(Kz,"__esModule",{value:!0}),Kz.default=void 0;var t=e(tg()),n=Nz,r=e(Bz()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return Kz.default=o,Kz}()),d=Mz();Object.keys(d).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))}));var p=t(function(){if(Xz)return Jz;Xz=1;var e=lm;Object.defineProperty(Jz,"__esModule",{value:!0}),Jz.default=function(){return(0,t.useTheme)()||n.default};var t=Nz;e(Ka);var n=e(Bz());return Jz}()),f=t(function(){if(Qz)return Zz;Qz=1;var e=lm;Object.defineProperty(Zz,"__esModule",{value:!0}),Zz.default=void 0;var t=e(tg()),n=Nz,r=e(Bz()),o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return Zz.default=o,Zz}()),h=t(function(){if(eF)return tF;eF=1;var e=lm;Object.defineProperty(tF,"__esModule",{value:!0}),tF.default=void 0;var t=Nz,n=e(Bz()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return tF.default=r,tF}()),m=Nz}(bN);var nF=Object.defineProperty,rF=(e,t)=>{for(var n in t)nF(e,n,{get:t[n],enumerable:!0})};rF({},{light:()=>oF});const oF={root:{backgroundColor:UO.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&$expanded":{margin:"0px"}}};rF({},{light:()=>iF});const iF={root:{backgroundColor:UO.WHITE}};rF({},{light:()=>aF});const aF={root:{padding:"0px 16px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${UO.GREYSCALE_0_15}`,"&$focused":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,borderRadius:JO,backgroundColor:UO.GREYSCALE_0_03},"&$expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis"}};rF({},{light:()=>sF});const sF={root:{flex:"0 0 48px",flexDirection:"row",boxShadow:`inset 0 -1px 0 0 ${UO.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:UO.WHITE,color:UO.TEXT_PRIMARY}};rF({},{light:()=>lF});const lF={inputRoot:{boxSizing:"border-box",borderRadius:JO,"&&":{padding:0},"&&& input":{padding:"8px 4px"},"&&& $endAdornment":{right:4}},listbox:{paddingTop:0,paddingBottom:0},option:{fontSize:YO,height:"32px",'&[data-focus="true"]':{backgroundColor:UO.GREYSCALE_0_03}},endAdornment:{top:"auto",bottom:"4px",position:"absolute"},popupIndicator:{borderRadius:JO,border:`solid 1px ${UO.GREYSCALE_0_15}`,color:UO.GREYSCALE_0_60,marginRight:0,width:XO,height:XO,"& svg":{fontSize:"0.7em"},"& i":{lineHeight:"1 !important"}},paper:{marginTop:"5px",boxShadow:`0px 2px 4px 0px ${UO.GREYSCALE_0_15}`},clearIndicator:{"& svg":{fontSize:"0.5em",position:"absolute"},color:UO.GREYSCALE_25,width:KO,height:XO,borderRadius:JO,backgroundColor:"unset",marginRight:"4px","&&&&:hover":{backgroundColor:bN.alpha(UO.GREYSCALE_0,.05)}},popupIndicatorOpen:{backgroundColor:UO.GREYSCALE_0_10}};rF({},{light:()=>uF});const uF={badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}};rF({},{light:()=>cF});const cF={root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:JO,"& > $label > i:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},containedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&$focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&$focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > $label > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > $label > i:only-child":{marginLeft:"-10px",marginRight:"-10px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}};rF({},{light:()=>dF});const dF={root:{height:32,lineHeight:16,width:32,fontSize:YO,borderRadius:JO,padding:"7px 16px",border:`1px solid ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_60,color:UO.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_30}`},"&:hover":{backgroundColor:UO.GREYSCALE_0_03,border:`1px solid ${UO.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:UO.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`,border:`1px solid ${UO.MISC_FOCUS_BORDER}`,zIndex:2},"&$selected":{color:UO.GREYSCALE_25,backgroundColor:UO.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:GO,height:24,width:24,padding:7},sizeLarge:{fontSize:KO,height:40,width:40,lineHeight:20}};rF({},{light:()=>pF});const pF={root:{height:"32px",lineHeight:"16px",fontSize:YO,borderRadius:JO}};rF({},{light:()=>fF});const fF={root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:JO},groupedText:{padding:"8px 16px","&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},groupedOutlined:{padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&$focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&$focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}}};rF({},{light:()=>hF});const hF={root:{borderWidth:1,"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:3},"&:not($disabled)":{"&:not($checked)":{"&:not($indeterminate)":{"& span":{color:UO.WHITE}}}},"&$disabled":{"& span":{pointerEvents:"auto",cursor:"not-allowed",color:UO.GREYSCALE_0_25}}},colorPrimary:{"&.sprout-focus-visible i":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible i":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}}};rF({},{light:()=>mF});const mF={root:{height:"24px",fontSize:GO,borderRadius:JO,color:UO.TEXT_PRIMARY,backgroundColor:UO.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&$disabled":{backgroundColor:UO.GREYSCALE_0_05,color:UO.GREYSCALE_0_30,border:"none",opacity:1}},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_15,"$clickable&:active ":{boxSizing:"border-box",borderRadius:JO,boxShadow:"none",backgroundColor:UO.GREYSCALE_0_10},"& $deleteIconSmall":{height:13,color:"inherit"}},label:{fontFamily:nN.FONT_FAMILY,lineHeight:"16px"}};rF({},{light:()=>gF});const gF={root:{padding:"8px",backgroundColor:UO.GREYSCALE_98,borderTop:`1px ${UO.GREYSCALE_0_15} solid`}};rF({},{light:()=>yF});const yF={root:{padding:"24px"}};rF({},{light:()=>bF});const bF={root:{marginBottom:0}};rF({},{light:()=>vF});const vF={root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",height:"24px",padding:"12px 8px 12px 24px",fontSize:"16px",lineHeight:"24px",backgroundColor:UO.GREYSCALE_98,borderBottom:`1px ${UO.GREYSCALE_0_15} solid`}};rF({},{light:()=>xF});const xF={middle:{margin:"4px 8px"}};rF({},{light:()=>SF});const SF={root:{marginLeft:"-10px"},label:{fontSize:YO}};rF({},{light:()=>wF});const wF={root:{color:UO.GREYSCALE_25,fontSize:GO,fontFamily:nN.FONT_FAMILY,fontWeight:eN,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&$focused":{color:UO.TEXT_PRIMARY},"&$error":{color:UO.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:UO.TEXT_SECONDARY,position:"absolute",content:"'(optional)'",fontWeight:ZO,marginLeft:"4px"}}},asterisk:{visibility:"hidden",display:"inline-flex","&::after":{visibility:"visible",color:UO.TEXT_SECONDARY,position:"absolute",content:"'(required)'",fontWeight:ZO,marginLeft:"4px"}}};rF({},{light:()=>CF});const CF={root:{fontSize:GO,lineHeight:"16px",margin:"4px 0 0 0","&$error":{color:UO.RED}},contained:{marginLeft:0,marginRight:0}};rF({},{light:()=>EF});const EF={root:{padding:7,borderRadius:JO,border:"1px solid transparent","&.sprout-focus-visible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`},"&&&:hover":{backgroundColor:"transparent"}}};rF({},{light:()=>kF});const kF={root:{padding:"4px 8px",color:UO.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}};rF({},{light:()=>RF});const RF={input:{padding:"8px 12px",lineHeight:"16px"}};rF({},{light:()=>_F});const _F={outlined:{fontSize:`${GO}px`,fontWeight:eN,color:UO.GREYSCALE_25,"&$shrink":{transform:"translate(0px, -8px)",fontWeight:eN}}};rF({},{light:()=>MF});const MF={root:{color:UO.MISC_FOCUS_BORDER}};rF({},{light:()=>AF});const AF={padding:{paddingTop:"0px",paddingBottom:"0px"}};rF({},{light:()=>DF});const DF={root:{minHeight:"32px",fontSize:YO,"&$selected":{backgroundColor:"unset","&:not($disabled)":{"&::after":{content:`url('${rN}')`,fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:UO.RED}}}},gutters:{paddingLeft:"12px",paddingRight:"12px"},button:{"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&:active":{backgroundColor:UO.GREYSCALE_0_05}}};rF({},{light:()=>PF});const PF={root:{color:UO.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}};rF({},{light:()=>LF});const LF={root:{fontSize:"12px"},primary:{fontSize:YO,color:UO.TEXT_PRIMARY,lineHeight:"16px"},secondary:{fontSize:GO,fontWeight:QO,lineHeight:"16px",color:UO.TEXT_SECONDARY}};rF({},{light:()=>IF});const IF={list:{paddingTop:4,paddingBottom:4},paper:{marginTop:4,marginBottom:4,background:UO.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15)",borderRadius:"2px"}};rF({},{light:()=>qF});const qF={root:{fontSize:YO,height:"32px",'[class*="MuiListSubheader-root"] ~ &[role="option"]':{paddingLeft:"20px"},"& div i":{color:UO.GREYSCALE_25}}};rF({},{light:()=>TF});const TF={root:{fontSize:YO,lineHeight:"16px",backgroundColor:UO.WHITE,borderRadius:JO,"&:not($focused):not($error):not($disabled):hover $notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_05}`,borderColor:UO.GREYSCALE_0_30},"&$focused:not($error) $notchedOutline":{border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&$focused$error $notchedOutline":{border:`solid 1px ${UO.RED}`,boxShadow:`0px 0px 0px 1px ${UO.RED}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&$disabled":{backgroundColor:"transparent"},"&$disabled $notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_10}`,borderColor:UO.GREYSCALE_0_10,backgroundColor:UO.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:UO.TEXT_PRIMARY,padding:"8px 12px","&$disabled":{opacity:.45}},notchedOutline:{borderColor:UO.GREYSCALE_0_15,borderRadius:JO,boxShadow:`inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},multiline:{padding:"8px 12px"}};rF({},{light:()=>OF});const OF={day:{"&&&:hover":{backgroundColor:UO.GREYSCALE_0_03}},daySelected:{"&&&:hover":{backgroundColor:UO.GREEN}}};rF({},{light:()=>NF});const NF={paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`}};rF({},{light:()=>zF});const zF={root:{fill:UO.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&$checked":{"&$colorPrimary":{"&.sprout-focus-visible i":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},"&$colorSecondary":{"&.sprout-focus-visible i":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}},"&$disabled":{color:UO.GREYSCALE_0_20}},"&$disabled":{fill:UO.GREYSCALE_0_20,stroke:"none"}}};rF({},{light:()=>FF});const FF={root:{height:"32px",zIndex:1,borderRadius:"3px !important","& em":{color:UO.TEXT_SECONDARY,WebkitFontSmoothing:"antialiased","&::after":{content:""}},"& ~svg":{position:"absolute",top:"unset",right:"12px"},"&[aria-expanded=true]":{backgroundColor:UO.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&:focus":{backgroundColor:UO.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&$disabled":{opacity:"unset",color:UO.GREYSCALE_0_30,"&:hover":{backgroundColor:UO.GREYSCALE_0_0,borderColor:UO.GREYSCALE_0_15},"& ~svg":{color:UO.GREYSCALE_0_30}}},selectMenu:{height:"14px"},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`}};rF({},{light:()=>jF});const jF={root:{color:UO.GREEN,height:"24px","&$disabled":{color:UO.GREYSCALE_0_15}},rail:{backgroundColor:UO.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO,boxShadow:`inset 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.WHITE,boxShadow:`0px 1px 2px 0px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`,"&:hover":{borderRadius:JO,boxShadow:`0 2px 4px 0 ${UO.GREYSCALE_0_30}, 0 0 0 1px ${UO.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${UO.GREYSCALE_0_15}, 0 0 0 1px ${UO.GREYSCALE_0_06}, 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&$disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:UO.GREYSCALE_90},"& .bar":{height:"8px",width:"1px",backgroundColor:UO.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:UO.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:UO.GREYSCALE_0_15},markLabel:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},active:{}};rF({},{light:()=>HF});const HF={root:{backgroundColor:UO.WHITE,color:UO.GREYSCALE_25}};rF({},{light:()=>BF});const BF={root:{padding:"10px",width:"60px",height:"40px"},switchBase:{padding:"11px","&$disabled":{"& $thumb":{backgroundColor:UO.GREYSCALE_100_50}},"&$checked + $track":{opacity:1},"&$disabled + $track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + $track":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + $track":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:UO.GREYSCALE_0_15,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& $thumb":{height:"12px",width:"12px"},"& $switchBase":{padding:"9px 11px"}}};rF({},{light:()=>$F});const $F={root:{fontSize:YO,fontWeight:eN,textTransform:"none",minWidth:"auto",boxSizing:"border-box","&:hover":{borderBottom:`2px solid ${UO.GREYSCALE_80}`,paddingBottom:"4px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,paddingTop:"4px",backgroundColor:UO.GREYSCALE_0_03,borderRadius:JO,minHeight:"44px",paddingBottom:"4px",border:"none"},"&$disabled":{opacity:.3}},textColorPrimary:{color:UO.GREYSCALE_25,"&$selected":{color:UO.GREYSCALE_25}},textColorInherit:{opacity:"unset"},fullWidth:{"&.sprout-focus-visible":{paddingRight:12,paddingLeft:12}},wrapper:{alignItems:"initial"},labelIcon:{minWidth:"40px",minHeight:"48px","&.sprout-focus-visible":{minHeight:"auto",height:"30px",marginTop:9,marginBottom:9,flexDirection:"column",paddingRight:"12px",paddingBottom:"2px"},"& $wrapper":{display:"block"}}};rF({},{light:()=>VF});const VF={scroller:{height:"100%"},flexContainer:{height:"100%",marginLeft:2,marginRight:2},root:{fontSize:YO,fontWeight:"bold"},indicator:{height:2}};rF({},{light:()=>WF});const WF={root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}};rF({},{light:()=>UF});const UF={arrow:{color:UO.GREYSCALE_20},tooltip:{backgroundColor:UO.GREYSCALE_20,fontSize:GO,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}};rF({},{light:()=>GF});const GF={root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderRight:`1px solid ${UO.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:eN,backgroundColor:UO.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&$head":{height:"31px"},"&$paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:UO.GREYSCALE_98,borderBottom:`1px solid ${UO.GREYSCALE_85}`}};rF({},{light:()=>YF});const YF={root:{borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderTop:`1px solid ${UO.GREYSCALE_85}`}};rF({},{light:()=>KF});const KF={root:{backgroundColor:UO.GREYSCALE_98}};rF({},{light:()=>XF});const XF={hover:{"&$selected":{backgroundColor:UO.GREYSCALE_0_05,"&:hover":{backgroundColor:UO.GREYSCALE_0_03}},"&&:hover":{backgroundColor:UO.GREYSCALE_0_03}}};rF({},{light:()=>JF});const JF={root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&$active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}};rF({},{light:()=>QF});const QF={root:{borderLeft:`1px solid ${UO.GREYSCALE_85}`}};rF({},{light:()=>ZF});const ZF={root:{height:"100%","& $focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:UO.GREYSCALE_0_03,"& $focusHighlight":{opacity:0}},"&:active":{backgroundColor:UO.GREYSCALE_95,boxShadow:"none"},"&$focusVisible":{borderRadius:JO,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,"& $focusHighlight":{opacity:0}}}};rF({},{light:()=>ej});const ej={root:{'&[role="option"]':{color:UO.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:GO,borderBottom:`solid 1px ${UO.GREYSCALE_0_15}`,pointerEvents:"none"}}},tj=(e="light",t=!1)=>yN(e,t),nj=(tj().palette.primary.light,mO.Selected,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),rj=4/3,oj="12px",ij="600",aj="Source Sans Pro, sans-serif",sj={height:"auto",fontSize:oj,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},lj={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:ij},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},uj=25e4,cj=(e,t,n)=>{if(!e.length)return[];const r=[],o=[];let i=t;if(e.forEach(((e,a)=>{var s;const{columnWidth:{type:l,pixels:u,percentage:c},label:d,qApprMaxGlyphCount:p,totalInfo:f}=e;let h=0;const m=()=>{r[a]=Math.min(iI.PixelsMax,Math.max(iI.PixelsMin,h)),i-=r[a]};switch(l){case aI.Pixels:h=u||iI.PixelsDefault,m();break;case aI.Percentage:h=(c||iI.PercentageDefault)/100*t,m();break;case aI.FitToContent:(null===(s=e.representation)||void 0===s?void 0:s.type)===HI.Image?o.push(a):(h=n(d,f,p,e.isLocked,e.isActivelySorted,e.isDim),m());break;case aI.Auto:o.push(a);break;default:throw new Error(`${l} is not a valid column width type`)}})),o.length){const e=i/o.length;o.forEach((t=>{r[t]=Math.max(iI.AutoMinTable,e)}))}return r},dj=(e,t,n)=>{const r=n.size,o=r>=t.size;if(r){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},pj=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},fj=e=>e.ctrlKey||e.metaKey,hj=e=>e.shiftKey&&fj(e),mj=e=>[rI.Left,rI.Right,rI.Up,rI.Down].includes(e),gj=e=>e.shiftKey&&mj(e.key),yj=e=>(e=>mj(e)||[rI.Home,rI.End,rI.PageUp,rI.PageDown].includes(e))(e.key)&&!hj(e),bj=(e,t)=>{const{api:n,rows:r,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l=new Map;if(-1===o)null==n||n.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:o}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,o):(e.has(r)?e.delete(r):e.set(r,o),new Map(e))})(l,i,s),dj(a,r,l),l.size?(null==n||n.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(null==n||n.cancel(),{...e,rows:l,colIdx:-1})},vj=(e,t)=>{var n;const{api:r,rows:o,colIdx:i,pageRows:a,firstCell:s}=e,{cell:l,announce:u,evt:c}=t;if(!(s||"key"in c&&gj(c)))return e;-1===i&&(null==r||r.begin(["/qHyperCubeDef"]));const d=((e,t,n,r,o)=>{const i=new Map(t);if("key"in r&&gj(r)){i.set(n.qElemNumber,n.rowIdx);const t=r.key===rI.Down?1:-1,o=e[n.pageRowIdx+t][n.pageColIdx];return i.set(o.qElemNumber,n.rowIdx+t),i}if(!o)return t;const a=Math.min(o.pageRowIdx,n.pageRowIdx),s=Math.max(o.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][o.pageColIdx];i.set(n.qElemNumber,n.rowIdx)}return i})(a,o,l,c,s);return dj(u,o,d),{...e,rows:d,colIdx:null!==(n=null==s?void 0:s.selectionColIdx)&&void 0!==n?n:l.selectionColIdx,isSelectMultiValues:!0}},xj=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&(null==t||t.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]})),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},Sj=(e,t)=>{var n;switch(t.type){case gO.Select:return bj(e,t.payload);case gO.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:n})=>!n||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",n),{...e,firstCell:t,mouseupOutsideCallback:n}))(e,t.payload);case gO.SelectMouseUp:return((e,t)=>xj(e.isSelectMultiValues||e.firstCell!==t.cell?e:bj(e,t)))(e,t.payload);case gO.SelectMultiAdd:return vj(e,t.payload);case gO.SelectMultiEnd:return xj(e);case gO.Reset:return null!==(n=e.api)&&void 0!==n&&n.isModal()?e:{...e,rows:new Map,colIdx:-1};case gO.Clear:return e.rows.size?{...e,rows:new Map}:e;case gO.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},wj=4/3,Cj=e=>!(null==e||!e.color)||"number"==typeof(null==e?void 0:e.index)&&e.index>-1;function Ej(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const kj=(e,t)=>e?{borderBottomColor:_L.DARK_MODE_BORDER,borderRightColor:_L.DARK_MODE_BORDER,borderLeftColor:_L.DARK_MODE_BORDER,borderTopColor:_L.DARK_MODE_BORDER}:{borderLeftColor:_L.BORDER_MEDIUM,borderRightColor:_L.BORDER_MEDIUM,borderTopColor:_L.BORDER_HEAVY,borderBottomColor:t?_L.BORDER_HEAVY:_L.BORDER_LIGHT},Rj=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*wj+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},_j=e=>{var t;return null===(t=e.components)||void 0===t?void 0:t.find((e=>"theme"===e.key))},Mj=(e,t,n,r=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:o,color:Cj(null==n?void 0:n.fontColor)?Ej(_L.TEXT,t,null==n?void 0:n.fontColor):i||_L.TEXT,fontSize:(null==n?void 0:n.fontSize)&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...kj(t.background.isDark,r)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function Aj(e,t,n){var r,o,i;const a=null===(r=_j(e))||void 0===r?void 0:r.header,s=Mj("header",t,a,n);return s.background=(e=>{if(void 0===e)return;const t=f(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),s.hoverBackground=DL(null!==(o=s.background)&&void 0!==o?o:_L.WHITE,sI),s.activeBackground=DL(null!==(i=s.background)&&void 0!==i?i:_L.WHITE,lI),s}const Dj=(e,t)=>{var n;const r=null!==(n=e.toLowerCase().match(/<[^>]+>/g))&&void 0!==n?n:[];return r.forEach((e=>(e=>e in lj)(e)&&Object.assign(t,lj[e]))),t};function Pj(e,t,n){var r;const o={};let i={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return null==t||null===(r=t.qValues)||void 0===r||r.forEach(((e,t)=>{const r=e.qText,a=r&&IL(r);a&&"none"!==a&&(o[n[t]]=a),i=r?Dj(r,i):i})),o.cellBackgroundColor&&!o.cellForegroundColor&&(o.cellForegroundColor=ML(o.cellBackgroundColor)),{...e,...o,color:o.cellForegroundColor||e.color,background:o.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const Lj=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},Ij=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:o}=e.background,i=Lj(e,null==t?void 0:t.background),a=e.getStyle("","",n);return{backgroundColor:i||r||a,backgroundFromStyling:i,sheetColorFromCSS:o}},qj=(e,t,n,r=_L.WHITE)=>{var o;const{backgroundColor:i,backgroundFromStyling:a,sheetColorFromCSS:s}=Ij(e,t,n);return null!==(o=NL(a,i,s,r))&&void 0!==o?o:r},Tj=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return oj}},Oj=e=>null!=e&&e.some((e=>"italic"===e))?"italic":"normal",Nj=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?ij:"normal",zj=e=>!1===e?1:3,Fj=e=>parseInt(null!=e?e:sj.fontSize,10)*rj,jj=e=>null!=e&&e.some((e=>"underline"===e))?"underline":"none",Hj=(e,t,n,r,o)=>{var i,a,s,l,u,c,d,p,f,h,m,g,y,b,v,x,S,w,C,E,k,R,_,M,A,D,P,L,I,q,T,O,N,z,F,j,H,B,$,V,W,U,G,Y,K,X,J,Q,Z,ee,te,ne,re,oe,ie,ae,se,le,ue,ce,de,pe,fe,he,me,ge,ye,be,ve;const{header:xe,dimensionValues:Se,measureValues:we,totalValues:Ce,nullValues:Ee,grid:ke,content:Re}=null!==(i=_j(t))&&void 0!==i?i:{},_e=!0===t.usePagination?_L.WHITE:_L.TRANSPARENT,Me=qj(r,xe,"object.straightTableV2.dimension.label.name.backgroundColor",_e),Ae=null!==(a=null!==(s=null===(l=o.viewState)||void 0===l?void 0:l.maxLineCount)&&void 0!==s?s:null==Re?void 0:Re.rowHeight)&&void 0!==a?a:r.getStyle("object.straightTableV2","grid","lineClamp"),De={header:{fontFamily:null!==(u=null!==(c=null!==(d=null==xe?void 0:xe.fontFamily)&&void 0!==d?d:r.getStyle("object.straightTableV2.dimension","label.name","fontFamily"))&&void 0!==c?c:n.head.fontFamily)&&void 0!==u?u:aj,fontSize:Tj(null!==(p=null!==(f=null==xe?void 0:xe.fontSize)&&void 0!==f?f:r.getStyle("object.straightTableV2.dimension","label.name","fontSize"))&&void 0!==p?p:n.head.fontSize),fontStyle:Oj(null==xe?void 0:xe.fontStyle),fontWeight:Nj(null==xe?void 0:xe.fontStyle,ij),textDecoration:jj(null==xe?void 0:xe.fontStyle),color:null!==(h=null!==(m=null!==(g=Lj(r,null==xe?void 0:xe.fontColor))&&void 0!==g?g:r.getStyle("object.straightTableV2.dimension","label.name","color"))&&void 0!==m?m:n.head.color)&&void 0!==h?h:_L.TEXT,background:Me},headerMenuHoverBackground:DL(Me,sI),headerMenuActiveBackground:DL(Me,lI),dimension:{values:{fontFamily:null!==(y=null!==(b=null!==(v=null==Se?void 0:Se.fontFamily)&&void 0!==v?v:r.getStyle("object.straightTableV2.dimension","label.value","fontFamily"))&&void 0!==b?b:n.body.fontFamily)&&void 0!==y?y:aj,fontSize:Tj(null!==(x=null!==(S=null!==(w=null==Se?void 0:Se.fontSize)&&void 0!==w?w:null==Re?void 0:Re.fontSize)&&void 0!==S?S:r.getStyle("object.straightTableV2.dimension","label.value","fontSize"))&&void 0!==x?x:n.body.fontSize),fontStyle:Oj(null==Se?void 0:Se.fontStyle),fontWeight:Nj(null==Se?void 0:Se.fontStyle,"normal"),textDecoration:jj(null==Se?void 0:Se.fontStyle),color:null!==(C=null!==(E=null!==(k=null!==(R=Lj(r,null==Se?void 0:Se.fontColor))&&void 0!==R?R:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==k?k:r.getStyle("object.straightTableV2.dimension","label.value","color"))&&void 0!==E?E:n.body.color)&&void 0!==C?C:_L.TEXT,background:null!==(_=null!==(M=Ij(r,Se,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor)&&void 0!==M?M:n.body.background)&&void 0!==_?_:_L.TRANSPARENT}},measure:{values:{fontFamily:null!==(A=null!==(D=null!==(P=null==we?void 0:we.fontFamily)&&void 0!==P?P:r.getStyle("object.straightTableV2.measure","label.value","fontFamily"))&&void 0!==D?D:n.body.fontFamily)&&void 0!==A?A:aj,fontSize:Tj(null!==(L=null!==(I=null!==(q=null==we?void 0:we.fontSize)&&void 0!==q?q:null==Re?void 0:Re.fontSize)&&void 0!==I?I:r.getStyle("object.straightTableV2.measure","label.value","fontSize"))&&void 0!==L?L:n.body.fontSize),fontStyle:Oj(null==we?void 0:we.fontStyle),fontWeight:Nj(null==we?void 0:we.fontStyle,"normal"),textDecoration:jj(null==we?void 0:we.fontStyle),color:null!==(T=null!==(O=null!==(N=null!==(z=Lj(r,null==we?void 0:we.fontColor))&&void 0!==z?z:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==N?N:r.getStyle("object.straightTableV2.measure","label.value","color"))&&void 0!==O?O:n.body.color)&&void 0!==T?T:_L.TEXT,background:null!==(F=null!==(j=Ij(r,we,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor)&&void 0!==j?j:n.body.background)&&void 0!==F?F:_L.TRANSPARENT}},totalRow:{fontFamily:null!==(H=null!==(B=null!==($=null==Ce?void 0:Ce.fontFamily)&&void 0!==$?$:r.getStyle("object.straightTableV2.total","label.value","fontFamily"))&&void 0!==B?B:n.totals.fontFamily)&&void 0!==H?H:aj,fontSize:Tj(null!==(V=null!==(W=null!==(U=null==Ce?void 0:Ce.fontSize)&&void 0!==U?U:null==Re?void 0:Re.fontSize)&&void 0!==W?W:r.getStyle("object.straightTableV2.total","label.value","fontSize"))&&void 0!==V?V:n.totals.fontSize),fontStyle:Oj(null==Ce?void 0:Ce.fontStyle),fontWeight:Nj(null==Ce?void 0:Ce.fontStyle,ij),textDecoration:jj(null==Ce?void 0:Ce.fontStyle),color:null!==(G=null!==(Y=null!==(K=null!==(X=Lj(r,null==Ce?void 0:Ce.fontColor))&&void 0!==X?X:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==K?K:r.getStyle("object.straightTableV2.total","label.value","color"))&&void 0!==Y?Y:n.totals.color)&&void 0!==G?G:_L.TEXT,background:qj(r,Ce,"object.straightTableV2.total.label.value.backgroundColor",_e)},nullValues:{fontStyle:Oj(null==Ee?void 0:Ee.fontStyle),fontWeight:Nj(null==Ee?void 0:Ee.fontStyle,"normal"),textDecoration:jj(null==Ee?void 0:Ee.fontStyle),color:null!==(J=null!==(Q=null!==(Z=null!==(ee=Lj(r,null==Ee?void 0:Ee.fontColor))&&void 0!==ee?ee:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==Z?Z:r.getStyle("object.straightTableV2.null","label.value","color"))&&void 0!==Q?Q:n.body.color)&&void 0!==J?J:_L.TEXT,background:null!==(te=null!==(ne=Lj(r,null==Ee?void 0:Ee.background))&&void 0!==ne?ne:r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor"))&&void 0!==te?te:_L.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:null!=Ae?Ae:zj(null===(re=t.multiline)||void 0===re?void 0:re.wrapTextInCells),headerLineClamp:zj(null===(oe=t.multiline)||void 0===oe?void 0:oe.wrapTextInHeaders),border:null!==(ie=null!==(ae=Lj(r,null==ke?void 0:ke.border))&&void 0!==ae?ae:r.getStyle("object.straightTableV2","grid","borderColor"))&&void 0!==ie?ie:r.background.isDark?_L.DARK_MODE_BORDER:_L.BORDER_MEDIUM,divider:null!==(se=null!==(le=Lj(r,null==ke?void 0:ke.divider))&&void 0!==le?le:r.getStyle("object.straightTableV2.grid","","divider.borderColor"))&&void 0!==se?se:_L.BORDER_HEAVY,hoverColors:{color:null!==(ue=null!==(ce=Lj(r,null==Re?void 0:Re.hoverFontColor))&&void 0!==ce?ce:r.getStyle("object.straightTableV2","","grid.hover.color"))&&void 0!==ue?ue:null===(de=n.body.hoverColors)||void 0===de?void 0:de.color,background:null!==(pe=null!==(fe=Lj(r,null==Re?void 0:Re.hoverColor))&&void 0!==fe?fe:r.getStyle("object.straightTableV2","","grid.hover.backgroundColor"))&&void 0!==pe?pe:null===(he=n.body.hoverColors)||void 0===he?void 0:he.background},zebraStripes:{show:!(null==ke||null===(me=ke.zebraStripes)||void 0===me||!me.show),odd:{color:Lj(r,null==ke||null===(ge=ke.zebraStripes)||void 0===ge||null===(ge=ge.color)||void 0===ge?void 0:ge.odd),background:Lj(r,null==ke||null===(ye=ke.zebraStripes)||void 0===ye||null===(ye=ye.background)||void 0===ye?void 0:ye.odd)},even:{color:Lj(r,null==ke||null===(be=ke.zebraStripes)||void 0===be||null===(be=be.color)||void 0===be?void 0:be.even),background:Lj(r,null==ke||null===(ve=ke.zebraStripes)||void 0===ve||null===(ve=ve.background)||void 0===ve?void 0:ve.even)},overrideNullValueBackground:void 0===Lj(r,null==Ee?void 0:Ee.background),overrideNullValueColor:void 0===Lj(r,null==Ee?void 0:Ee.fontColor)},lastRowBottomBorder:n.body.lastRowBottomBorder},selectedColors:AL(r),headerMinRowHeight:0,totalRowLineHeight:0,totalRowMinHeight:0,contentLineHeight:0,contentMinRowHeight:0,contentStaticLineCount:Ae},{headerMinRowHeight:Pe,totalRowLineHeight:Le,totalRowMinHeight:Ie,contentLineHeight:qe,contentMinRowHeight:Te}=(e=>{const t=Math.max(Fj(e.header.fontSize)+8,32),n=Fj(e.totalRow.fontSize),r=Math.max(n+8+1,24),o=Math.max(Fj(e.dimension.values.fontSize),Fj(e.measure.values.fontSize)),i=(e.contentStaticLineCount||1)*o;return{headerMinRowHeight:t,totalRowLineHeight:n,totalRowMinHeight:r,contentLineHeight:o,contentMinRowHeight:Math.max(i+8+1,24)}})(De);return De.headerMinRowHeight=Pe,De.totalRowLineHeight=Le,De.totalRowMinHeight=Ie,De.contentLineHeight=qe,De.contentMinRowHeight=Te,De},Bj=(e,t,n,r)=>{const o=Ka.useMemo((()=>{const o=n.totalsPosition.atTop,i=function(e,t,n,r){var o;const i=null===(o=_j(e))||void 0===o?void 0:o.content,a=Mj("content",t,i);a.background=t.background.color;const s=Rj(a.fontSize,n,r),l=null==i?void 0:i.hoverColor,u=null==i?void 0:i.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),d=t.getStyle("object","","straightTableV2.content.hover.color"),p=Cj(u)||!!d,f=Cj(l)||!!c,h=p||f;let m;m=Cj(l)?Ej(_L.HOVER,t,l):c||(p?"":_L.HOVER);const g=h?Ej(ML(m),t,u):"";return{...a,lastRowBottomBorder:s,hoverColors:{background:m,color:g}}}(e,t,n.rows.length,r),a=Aj(e,t,!o),s=function(e,t,n){var r;const o=null===(r=_j(e))||void 0===r?void 0:r.content,i=Mj("content",t,o),{borderBottomColor:a,borderTopColor:s,background:l}=Aj(e,t,n);return{...i,borderBottomColor:a,background:l,borderTopColor:s}}(e,t,o);return{body:i,head:a,totals:s}}),[e,t,n,r]);return o},$j=new Map;const Vj=Ka.createContext({}),Wj=function(e){const t=Ka.createContext([()=>{},new Set]);return $j.set(e,t),({children:n,value:r})=>{const o=Ka.useRef(r),i=Ka.useRef(new Set);Ka.useEffect((()=>{o.current=r,i.current.forEach((e=>{e(r)}))}),[r]);const a=Ka.useCallback((()=>o.current),[o]),s=Ka.useMemo((()=>[a,i.current]),[a]);return Rl.jsx(e.Provider,{value:r,children:Rl.jsx(t.Provider,{value:s,children:n})})}}(Vj),Uj={rows:[],columns:[],totalsPosition:{}},Gj=({app:e,children:t,tableData:n=Uj,selectionsAPI:r,cellCoordMock:o,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,setPage:m,pageInfo:g,initialDataPages:y,rect:b,viewService:v,downloadService:x,env:S,direction:w})=>{const[C,E]=Ka.useState(0),[k,R]=Ka.useState(o||WO),[_,M]=((e,t)=>{const[n,r]=Ka.useReducer(Sj,{pageRows:e,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1});return[n,r]})(n.rows,r),[A,D]=Ka.useState(-1),P=Bj(i,u,n,d),L=((e,t,n,r,o)=>Ka.useMemo((()=>Hj(0,t,n,r,o)),[t,n,e,r,o]))(S,i,P,u,v),[I,q,T,O]=((e,t,n,r)=>{const o=t.atBottom||t.atTop,i=VL({...r.header,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,a=VL({...r.totalRow,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,{estimateWidth:s}=VL(r.dimension.values,{maxNbrLinesOfText:3}),{estimateWidth:l}=VL(r.measure.values,{maxNbrLinesOfText:3}),u=Ka.useMemo((()=>(e,t,n,r,u,c)=>{let d=25;d+=28,r&&(d+=24),u&&(d+=20);const p=c?s:l;return Math.max(i(e)+d,o?a(t)+24+1:0,p(n))}),[s,l,i,a,o]),[c,d]=Ka.useState(0),[p,f]=Ka.useState((()=>cj(e,n,u)));YL((()=>{f(cj(e,n-c,u))}),[e,n,c,u]);const h=Ka.useMemo((()=>((e,t,n)=>e.length>0&&e.reduce(((e,t)=>e+t))+t<n)(p,c,n)),[p,c,n]);return[p,f,d,h]})(n.columns,n.totalsPosition,b.width,L),N=Ka.useMemo((()=>({app:e,selectionsAPI:r,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,rect:b,viewService:v,styleService:L,direction:w,downloadService:x})),[e,r,i,a,s,l,u,c.active,d,p,f,h,b,v,L,w,x]);return Rl.jsx(Wj,{value:{headRowHeight:C,setHeadRowHeight:E,focusedCellCoord:k,setFocusedCellCoord:R,selectionState:_,selectionDispatch:M,hoverIndex:A,setHoverIndex:D,columnWidths:I,setColumnWidths:q,baseProps:N,tableData:n,setYScrollbarWidth:T,setPage:m,pageInfo:g,initialDataPages:y,showRightBorder:O,env:S},children:t})};function Yj(e,t){const n=function(e){return $j.get(e)}(e),[r,o]=Ka.useContext(n),[,i]=Ka.useReducer((e=>e+1),0),a=Ka.useRef(t),s=Ka.useRef(),l=r();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const u=Ka.useMemo((()=>t(l)),[l,t]);return Ka.useEffect((()=>{a.current=t,s.current=u}),[l,u,t]),Ka.useEffect((()=>{const e=e=>{a.current(e)!==s.current&&i()};return o.add(e),()=>{o.delete(e)}}),[o]),u}function Kj(e){var t;const n=tj();return null!==(t=n.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),Km({...n,direction:e})}const Xj={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Jj={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Qj=Pg("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Xj},"&::-moz-range-track":{...Xj},"&::-ms-track":{...Xj},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Jj},"&::-moz-range-thumb":{...Jj},"&::-ms-thumb":{...Jj},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),Zj=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u,accessibilityRelatedArgs:c,direction:d="ltr"})=>{const p=XL({translator:c.translator}),f=Ka.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!u,g=()=>m?f.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},b=t=>{f.current={initWidth:e,columnWidth:e,initX:null!=t?t:f.current.initX}};YL((()=>{m&&b()}),[e]);const v=e=>{const t=Math.max(e,iI.PixelsMin);f.current.columnWidth=t,i(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:aI.Pixels,pixels:f.current.columnWidth};a(e)}else null==l||l(!1)},S=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;v(t)},w=e=>{TL(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),x()},C=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;v(t)},E=e=>{TL(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),x()},k=!r&&s?e=>{if(e.key===rI.Left||e.key===rI.Right){TL(e);const t=5,n=e.key===rI.Left?t:-5,r="rtl"===d?n:-n;v(f.current.columnWidth+r)}else e.key===rI.Space||e.key===rI.Enter?(TL(e),s(e),x()):e.key===rI.Esc&&(TL(e),s(e),v(f.current.initWidth))}:void 0,R=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return Xa.createElement(Qj,{style:y,key:t,hoverColor:o,isLastColumn:n,className:oI,"data-testid":oI,onMouseDown:e=>{TL(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),null==l||l(!0),b(e.clientX)},onDoubleClick:()=>{a({type:aI.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(TL(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),null==l||l(!0),b(e.touches[0].clientX))},onKeyDown:k,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,max:iI.PixelsMax,"aria-label":R,"aria-valuemin":iI.PixelsMin,"aria-valuemax":iI.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d})},eH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}),tH=Ka.forwardRef(eH);function nH(){return nH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nH.apply(null,arguments)}const rH=Pg(xA,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),oH=Pg(tH,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),iH=Pg(tP)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),aH=Pg(QA)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),sH=Pg(aP)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),lH=Pg(aP,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),uH=Pg("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),cH=Pg("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),dH=Pg(OM)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),pH=Pg(MD,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0}))),fH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),hH=Ka.forwardRef(fH),mH=e=>{const t=e.nextElementSibling;var n;return t?"HR"===t.tagName?mH(t):t:null===(n=e.parentElement)||void 0===n||null===(n=n.children)||void 0===n?void 0:n[0]},gH=e=>{const t=e.previousElementSibling;if(!t){var n,r;const t=null===(n=e.parentElement)||void 0===n||null===(n=n.children)||void 0===n?void 0:n.length;return null===(r=e.parentElement)||void 0===r||null===(r=r.children)||void 0===r?void 0:r[t-1]}return"HR"===t.tagName?gH(t):t},yH=e=>{var t;const{key:n,currentTarget:r}=e,o=null!==(t=document.activeElement)&&void 0!==t?t:r;if(n===rI.Down||n===rI.Up){const t=e=>n===rI.Down?mH(e):gH(e);e.preventDefault(),e.stopPropagation();let r=t(o);for(;r;){if("true"!==r.ariaDisabled){r.focus();break}r=t(r)}}},bH=(e,t)=>e.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach((([,e])=>{e(!1)})),await e(n)}}:{}})))})))));let vH={};const xH=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,direction:u,isPagination:c})=>{const[d,p]=Ka.useState(!1),f=Ka.useRef(null),h=Ka.useCallback((e=>{e.stopPropagation(),p(!1)}),[p]);return Xa.createElement(Xa.Fragment,null,Xa.createElement(lH,{ref:a?f:null,key:t,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),vH={}),null!=a&&a.length&&(p(!0),vH[r]=p))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:yH},l?Xa.createElement(uH,{direction:u,isPagination:c}):null,Xa.createElement(cH,null,Xa.createElement(pH,{direction:u,isPagination:c},Xa.createElement(o,null)),Xa.createElement(dH,{variant:"body2"},r)),null!=a&&a.length?Xa.createElement(hH,null):null),null!=a&&a.length?Xa.createElement(CH,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:bH(a,vH),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:c}):null)},SH=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Xa.createElement(sH,{key:e.groupHeading,disabled:!0,style:{opacity:1}},e.groupHeading),e.items.map((e=>Xa.createElement(xH,nH({key:e.id},e,{isSubMenu:t,direction:n,isPagination:r}))))].filter(Boolean)])),wH={appear:0,enter:0,exit:0},CH=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?Xa.createElement(iH,nH({className:eI,open:t,anchorEl:e,onClose:n,transitionDuration:wH,MenuListProps:{id:tI}},i?{anchorOrigin:i}:{},o?{transformOrigin:o}:{},{dir:s}),(({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((o,i)=>[SH({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?Xa.createElement(aH,{"data-testid":"group-divider",variant:"middle"}):void 0])))({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})):null,EH=(e,t)=>e.some((e=>t[e]>0)),kH={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},RH=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=Ka.useState(null),[a,s]=Ka.useState(kH);return YL((()=>{e||(s(kH),i(null))}),[e]),Ka.useEffect((()=>{if(null==r||!r.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{var e,u,c;const d=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),p=await r.createSessionObject(d),f=await p.getLayout(),{qStateCounts:h}=null!==(e=null===(u=f.qListObject)||void 0===u?void 0:u.qDimensionInfo)&&void 0!==e?e:{};o=null===(c=f.qInfo)||void 0===c?void 0:c.qId,a?l():(i(p),h&&s((e=>({canSelectAll:EH(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:EH(["qSelected"],e),canSelectPossible:EH(["qOption"],e),canSelectAlternative:EH(["qAlternative"],e),canSelectExcluded:EH(["qAlternative","qExcluded"],e)}))(h)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},_H=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}),MH=Ka.forwardRef(_H),AH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})}),DH=Ka.forwardRef(AH),PH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})}),LH=Ka.forwardRef(PH),IH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}),qH=Ka.forwardRef(IH),TH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.454.858v6.484a1 1 0 0 1-.576.906L8.5 14.663V7.17z"})}),OH=Ka.forwardRef(TH),NH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}),zH=Ka.forwardRef(NH),FH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}),jH=Ka.forwardRef(FH),HH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})}),BH=Ka.forwardRef(HH),$H=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}),VH=Ka.forwardRef($H),WH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})}),UH=Ka.forwardRef(WH),GH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),YH=Ka.forwardRef(GH),KH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),XH=Ka.forwardRef(KH),JH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),QH=Ka.forwardRef(JH),ZH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}),eB=Ka.forwardRef(ZH);let tB=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const nB="/qListObjectDef",rB=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[tB.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e,"A")),r(!1)},icon:MH,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e,"D")),r(!1)},icon:qH,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:BH,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:OH,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&null!=i&&i.select){const e=[];n[tB.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:VH,enabled:!0}]}]),n[tB.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:eB,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAll(nB))},icon:UH,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectPossible(nB))},icon:QH,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAlternative(nB))},icon:YH,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectExcluded(nB))},icon:XH,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.clearSelections(nB))},icon:DH,enabled:l.canClearSelections}]}]]}]}]),p&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:jH,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:zH,enabled:!0}]}]),e.length>0&&f.push(...e)}return n[tB.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),null==c||c(u)},icon:LH,enabled:!0}]}]),f},oB=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:u,selectionRelatedArgs:c,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m})=>{var g;const y=XL({translator:o}),{qLibraryId:b,fieldId:v,headTextAlign:x}=r,S=null==c?void 0:c.app,{fieldInstance:w,selectionActionsEnabledStatus:C}=RH({open:e,headerData:r,app:S,qStateName:null==c?void 0:c.qStateName});let E=null;if(f&&"setActiveField"in f&&void 0!==r.dimensionInfoIndex){const e=r.dimensionInfoIndex;E=async t=>{try{await f.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const k=Ka.useCallback((()=>{const e=b?{qLibraryId:b,type:"dimension"}:v;if(null!=u&&u.embed){const{embed:t,listboxRef:n}=u;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===h?"right":"left"},sortCriteria:u.sortCriteria,stateName:null==c?void 0:c.qStateName,direction:h})}}),[b,v,u,null==c?void 0:c.qStateName,h]),R=Ka.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]);return i.active?Xa.createElement(rH,{rightAligned:"right"===x,shouldShowMenuIcon:s,className:ZL},s?Xa.createElement(oH,{height:JL,className:QL,"data-testid":QL,isInteractionsActive:null!==(g=i.active)&&void 0!==g&&g},Xa.createElement(tH,null)):null,Xa.createElement(CH,{open:e,anchorEl:n.current,onClose:R,menuGroups:rB({headerData:r,translator:y,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:k,interactions:i,fieldInstance:w,selectionActionsEnabledStatus:C,anchorRef:n,focusColumnAdjuster:null==d?void 0:d.focusColumnAdjuster,setActiveFieldCallback:E,expandOrCollapseArgs:p}),direction:h,isPagination:m})):null},iB=e=>e.isDark?{background:e.color,borderColor:_L.DARK_MODE_BORDER,color:_L.DARK_MODE_TEXT,disabledColor:_L.DARK_MODE_DISABLED,iconColor:_L.DARK_MODE_TEXT}:{background:e.color,borderColor:_L.BORDER_MEDIUM,color:_L.TEXT,disabledColor:_L.DISABLED},aB=Pg(xA,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),sB=Pg(jP,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),lB=Pg(DA,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),uB=Pg(OM)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),cB=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=Ka.useMemo((()=>iB(r.background)),[r]);if(!n.active)return null;const a=o?Xa.createElement(aB,{footerStyle:i},e):null;return t?U_.createPortal(e,t):a},dB={},pB=Ka.createContext(dB),fB=()=>Ka.useContext(pB),hB=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m})=>{const g=(e=>!e.enabled||e.active)(c)?0:-1,y=Ka.useMemo((()=>iB(p.background)),[p]),b=o?o.getBoundingClientRect().width:h.width,v=XL({translator:d}),x=Ka.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:v,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:g,width:b})),[t,n,r,o,i,a,s,l,u,c,v,p,f,h,m,y,g,b]);return Xa.createElement(pB.Provider,{value:x},e)};let mB=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),gB=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const yB=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}),bB=Ka.forwardRef(yB),vB=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}),xB=Ka.forwardRef(vB),SB=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}),wB=Ka.forwardRef(SB),CB={FirstPage:xB,PreviousPage:bB,NextPage:hH,LastPage:wB,FirstPageRTL:wB,PreviousPageRTL:hH,NextPageRTL:bB,LastPageRTL:xB},EB=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:o,handleChangePage:i,translator:a,interactions:s,tabIndex:l}=fB(),u=n.concat("rtl"===r?"RTL":""),c=CB[u];return{styledProps:{footerStyle:o,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{i(t)}},IconComponent:c}},kB=()=>{const{pageInfo:e,width:t}=fB(),n=0===e.page,{IconComponent:r,styledProps:o}=EB({type:mB.FirstPage,disabledCondition:n,pageNumber:0});return t<=gB.FirstPage?null:Xa.createElement(lB,o,Xa.createElement(r,{height:JL}))},RB=(e,t,n=!1)=>{n&&e.key===rI.Tab&&!e.shiftKey&&(TL(e),qL(e.target,t,!1))},_B=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=fB(),i=e.page>=n-1,{IconComponent:a,styledProps:s}=EB({type:mB.LastPage,disabledCondition:i,pageNumber:n-1}),l=t.enabled?e=>{RB(e,t,r)}:void 0;return o<=gB.LastPage?null:Xa.createElement(lB,nH({},s,{onKeyDown:l}),Xa.createElement(a,{height:JL}))},MB=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=fB(),i=e.page>=n-1,{IconComponent:a,styledProps:s}=EB({type:mB.NextPage,disabledCondition:i,pageNumber:e.page+1}),l=!(o>gB.FirstPage&&o>gB.LastPage)&&t.enabled?e=>{RB(e,t,r)}:void 0;return Xa.createElement(lB,nH({},s,{onKeyDown:l}),Xa.createElement(a,{height:JL}))},AB=()=>{const{pageInfo:e}=fB(),t=0===e.page,{IconComponent:n,styledProps:r}=EB({type:mB.PreviousPage,disabledCondition:t,pageNumber:e.page-1});return Xa.createElement(lB,r,Xa.createElement(n,{height:JL}))},DB=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r}=fB(),{page:o,rowsPerPage:i}=n;if(t<=gB.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,r)}`,r.toString()]);return Xa.createElement(uB,{variant:"caption",dir:"ltr"},a)},PB=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s}=fB(),l=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),c=`${e}-dropdown`,d=`${c}-label-${l}`,p={tabIndex:s,id:`${c}-${l}`,"data-testid":c,"aria-labelledby":d};return Xa.createElement(Xa.Fragment,null,Xa.createElement(uB,{variant:"caption",id:d},u,":"),Xa.createElement(sB,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:p},n))},LB=()=>{var e;const{pageInfo:t,isSelectionMode:n,totalColumnCount:r,width:o,handleChangeRowsPerPage:i}=fB();if(!(!(null===(e=t.rowsPerPageOptions)||void 0===e||!e.length)&&!n&&o>gB.RowsPerPage&&r<=100)||void 0===t.rowsPerPageOptions)return null;const a=Xa.createElement(Xa.Fragment,null,t.rowsPerPageOptions.map((e=>Xa.createElement("option",{key:e,value:e},e))));return Xa.createElement(PB,{name:"RowsPerPage",value:t.rowsPerPage,options:a,handleChange:e=>{null==i||i(+e.target.value)}})},IB=1e3,qB="…",TB=({totalPages:e,page:t})=>{const n=Math.min(e,IB),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-IB):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+i;return Xa.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(Xa.createElement("option",{key:"startMoreOptions",value:qB,disabled:!0},qB)),o<e-1&&a.push(Xa.createElement("option",{key:"endMoreOptions",value:qB,disabled:!0},qB)),Xa.createElement(Xa.Fragment,null,a)},OB=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r}=fB(),{page:o}=e;if(t<=gB.SelectPage)return null;const i=Xa.createElement(TB,{totalPages:n,page:o});return Xa.createElement(PB,{name:"SelectPage",value:o,options:i,handleChange:e=>{r(+e.target.value)}})},NB=e=>Xa.createElement(hB,e,Xa.createElement(LB,null),Xa.createElement(OB,null),Xa.createElement(DB,null),Xa.createElement(kB,null),Xa.createElement(AB,null),Xa.createElement(MB,null),Xa.createElement(_B,null));var zB=Ka.memo(NB);const FB=e=>Xa.createElement(cB,e,Xa.createElement(zB,e)),jB={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},HB=Pg(xA,{shouldForwardProp:e=>"background"!==e})((({background:e})=>({height:"100%",background:e.color}))),BB=Pg("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e})((({lineClamp:e,isHeadCell:t=!1,isPagination:n=!1,isNumeric:r=!1})=>r||1===e&&!t?{...jB,whiteSpace:"nowrap",display:n?"block":void 0}:{...jB,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}));function $B(e,t){const n=Ka.useRef(!1);Ka.useEffect((()=>{n.current?e():n.current=!0}),t)}const VB=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),WB=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:o})=>(e<r?e++:t<o&&(t++,e=n),[t,e]),UB=e=>e.atTop?2:1,GB=(e,t)=>{var n;return null===(n=e.getElementsByClassName("sn-table-row")[t[0]])||void 0===n?void 0:n.getElementsByClassName("sn-table-cell")[t[1]]},YB=e=>null==e?void 0:e.setAttribute("tabIndex","0"),KB=e=>null==e?void 0:e.setAttribute("tabIndex","-1"),XB=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(KB)},JB=e=>{null==e||e.focus(),YB(e)},QB=e=>{setTimeout((()=>{var t;const n=null===(t=e.current)||void 0===t||null===(t=t.closest(".sn-table-cell"))||void 0===t?void 0:t.querySelector(`.${oI}`);JB(n)}),0)},ZB=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:o,direction:i})=>{XB(t);const a=((e,t,n,r,o={top:0,bottom:0})=>{const i=o.top>0,a=o.top,s=t.getElementsByClassName("sn-table-row").length-1-o.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[u,c]=n;switch(e.key){case rI.Down:u<s&&u++;break;case rI.Up:u>a&&u--;break;case rI.Right:if(i)break;[u,c]="rtl"===r?VB({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0}):WB({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case rI.Left:if(i)break;[u,c]="rtl"===r?WB({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):VB({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0});break;case rI.Home:(fj(e)||i)&&(u=a),i||(c=0);break;case rI.End:(fj(e)||i)&&(u=s),i||(c=l);break;case rI.PageDown:u=Math.min(s,u+10);break;case rI.PageUp:u=Math.max(a,u-10)}return[u,c]})(e,t,n,i,o),s=GB(t,a);return JB(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(null==n||!n.scrollTo)return;const[r,o]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],i=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[o];if(!i||!e)return;if(i.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-i.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},e$=(e,t,n,r)=>{var o;(XB(t),n(e),r.enabled&&!r.active)?null===(o=r.focus)||void 0===o||o.call(r):JB(GB(t,e))},t$=(e,t,n)=>{const r=e.currentTarget,o=e.relatedTarget,i=!(null==r||!r.contains(o)),a=null==o?void 0:o.closest(`.${eI}`);var s;!n.enabled||i||a||t.current||!r||((e=>{const t=e.querySelector(`.${bO.First}`),n=e.querySelector(`.${bO.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),null===(s=n.blur)||void 0===s||s.call(n,!1))},n$=()=>{const{downloadService:e}=Yj(Vj,(e=>e.baseProps));Ka.useEffect((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))},r$=(e,t,n)=>{const{rootElement:r,keyboard:o}=Yj(Vj,(e=>e.baseProps)),{totalColumnCount:i,totalRowCount:a,rows:s,totalsPosition:l}=Yj(Vj,(e=>e.tableData)),u=Yj(Vj,(e=>e.focusedCellCoord)),c=Yj(Vj,(e=>e.setFocusedCellCoord)),d=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()}));$B((()=>{const n=((e,t,n=!1)=>{const r=[UB(t),e[1]];return n?r:WO})(u,l,d);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:o,keyboard:i,announce:a})=>{if(XB(t),o(e),!(e=>!e.enabled||e.active)(i))return;const s=GB(t,e);var l;n.current?(JB(s),n.current=!1):YB(s),r&&(a({keys:[null!==(l=null==s?void 0:s.textContent)&&void 0!==l?l:""]}),pj(a,s,r))})({resetCellCoord:n,rootElement:r,shouldRefocus:e,setFocusedCellCoord:c,isSelectionMode:d,keyboard:o,announce:t})}),[s.length,a,i,n])},o$=(e,t,n)=>{Ka.useEffect((()=>{const r=e.current;if(!r)return;const o=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth;let{scrollLeft:o}=n,i=o+e.deltaX;t&&(i=r+i),r>0&&(i<0||i>r+1)&&(e.preventDefault(),o=t?Math.min(0,Math.min(r,i)):Math.max(0,Math.min(r,i)))})(e,"rtl"===t,r)},i=e=>{var t;n.scrollLeft=(null===(t=e.currentTarget)||void 0===t?void 0:t.scrollLeft)||0};return r.addEventListener("wheel",o),r.addEventListener("scroll",i),()=>{r.removeEventListener("wheel",o),r.removeEventListener("scroll",i)}}),[e,t,n])},i$=e=>{TL(e),fj(e)&&pI(e.currentTarget)},a$=e=>{yj(e.evt)&&(TL(e.evt),ZB(e))},s$=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:o}=e;if(!yj(t))return;TL(t);const i=((e,t)=>[e.pageRowIdx+UB(t),e.pageColIdx])(r,n),a=((e,t)=>({top:e?UB(t):0,bottom:e&&t.atBottom?1:0}))(o,n),{nextCell:s,nextCellCoord:l}=ZB({...e,cellCoord:i,allowedRows:a});l[0]!==i[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:o,isSelectionMode:i,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:gO.SelectMultiAdd,payload:{cell:n,evt:e,announce:o}}):pj(o,a,i)})({...e,nextCell:s})},l$=e=>{const{evt:t}=e;hj(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:o,handleChangePage:i})=>{TL(e);const a=Math.ceil(t/n)-1;e.key===rI.Right&&r<a?(o(),i(r+1)):e.key===rI.Left&&r>0&&(o(),i(r-1))})(e):t.key===rI.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{var r;t.enabled&&!n&&(TL(e),null===(r=t.blur)||void 0===r||r.call(t,!0))})(e):mj(t.key)&&TL(t)},u$=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(mO.Disabled))return void TL(t);const r={...e,isSelectionMode:!(null==n||!n.isModal())};switch(t.key){case rI.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:o})=>{TL(e),t.isSelectable&&n&&r({type:gO.Select,payload:{cell:t,evt:e,announce:o}})})(r);break;case rI.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{TL(n),e&&(null==t||t.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case rI.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(TL(n),null==t||t.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case rI.C:i$(t);break;case rI.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const o=e.shiftKey||!r;t.enabled&&n&&o&&(TL(e),qL(e.currentTarget,t,e.shiftKey))})(r);break;default:s$(r)}},c$=e=>{const{layout:t,rect:n,theme:r}=Yj(Vj,(e=>e.baseProps)),[o,i]=Ka.useState(0),[a,s]=Ka.useState(0);return Ka.useLayoutEffect((()=>{if(e.current){const{offsetWidth:t=0,offsetHeight:n=0,clientWidth:r=0,clientHeight:o=0}=e.current,a=n-o;s(t-r),i(a)}}),[e,t,n,r]),{xScrollbarWidth:o,yScrollbarWidth:a}},d$=Pg("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),p$=Pg(lL,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"}))),f$=Pg(UP,{shouldForwardProp:e=>"borderRight"!==e})((({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e}))),h$=()=>Rl.jsxs(Rl.Fragment,{children:[Rl.jsx(d$,{className:bO.First,"data-testid":bO.First,"aria-live":"polite","aria-atomic":"true"}),Rl.jsx(d$,{className:bO.Second,"data-testid":bO.Second,"aria-live":"polite","aria-atomic":"true"})]}),m$=e=>{const t=Ka.useRef(new Map),n=Ka.useRef(null);Ka.useEffect((()=>{n.current=e(t.current),t.current.forEach(((e,t)=>{var r;null===(r=n.current)||void 0===r||r.observe(t)}));const r=t.current,o=n.current;return()=>{o.disconnect(),r.clear()}}),[e,n,t]);const r=Ka.useCallback(((e,r)=>{var o;t.current.set(e,r),null===(o=n.current)||void 0===o||o.observe(e)}),[t,n]),o=Ka.useCallback((e=>{var r;t.current.delete(e),null===(r=n.current)||void 0===r||r.unobserve(e)}),[n,t]);return Ka.useMemo((()=>({addTask:r,removeTask:o})),[r,o])},g$=e=>new ResizeObserver((t=>{t.forEach((t=>{const n=e.get(t.target);null==n||n(t)}))})),y$=()=>m$(g$),b$=({selectionsAPI:e,selectionDispatch:t,updateShouldRefocus:n,keyboard:r,tableWrapperRef:o})=>{Ka.useEffect((()=>{const i=()=>{t({type:gO.Reset})},a=()=>{t({type:gO.Clear})},s=()=>{var e;if(null!==(e=o.current)&&void 0!==e&&e.contains(document.activeElement))n();else if(r.enabled){var t;null===(t=r.blur)||void 0===t||t.call(r,!0)}i()};return null==e||e.on("deactivated",i),null==e||e.on("canceled",i),null==e||e.on("confirmed",s),null==e||e.on("cleared",a),()=>{null==e||e.removeListener("deactivated",i),null==e||e.removeListener("canceled",i),null==e||e.removeListener("confirmed",s),null==e||e.removeListener("cleared",a)}}),[e,r,t,n,o])},v$=e=>{e.stopPropagation()},x$=({href:e,text:t,interactions:n,color:r})=>Xa.createElement(bD,(({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:v$,style:{pointerEvents:n.active?"auto":"none",color:null!=r?r:void 0,opacity:n.active&&n.passive||r?void 0:.4}}))({href:e,text:t,interactions:n,color:r}),t);var S$,w$;const C$=null!==(S$=window.requestIdleCallback)&&void 0!==S$?S$:e=>setTimeout((()=>{e({})}),0),E$=null!==(w$=window.cancelIdleCallback)&&void 0!==w$?w$:e=>{clearTimeout(e)},k$="qDimensionInfo/0",R$="qMeasureInfo/0",_$="x",M$="y";function A$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D$(Object(n),!0).forEach((function(t){A$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L$=Object.prototype.hasOwnProperty,I$=Object.prototype.toString,q$=Object.defineProperty,T$=Object.getOwnPropertyDescriptor,O$=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===I$.call(e)},N$=function(e){if(!e||"[object Object]"!==I$.call(e))return!1;var t,n=L$.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&L$.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||L$.call(e,t)},z$=function(e,t){q$&&"__proto__"===t.name?q$(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},F$=function(e,t){if("__proto__"===t){if(!L$.call(e,t))return;if(T$)return T$(e,t).value}return e[t]},j$=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=F$(s,n),s!==(o=F$(t,n))&&(c&&o&&(N$(o)||(i=O$(o)))?(i?(i=!1,a=r&&O$(r)?r:[]):a=r&&N$(r)?r:{},z$(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&z$(s,{name:n,newValue:o}));return s};function H$(e,t,n,r){if(!e)return-1;const o=n.cache,i=e.origin?e.origin():null;i&&(e=i);let a=o.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<o.wrappedFields.length;t++)if(l=o.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=o.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function B$(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function $$(e){let{cache:t,f:n,mainCell:r,p:o,page:i,rowIdx:a,row:s,sourceKey:l,target:u,targetProp:c,columnOrder:d}=e,p=r;if(o.field&&o.field!==n){const e=H$(o.field,i,{cache:t},d);if(-1===e)return;p=j$({qRow:a},e(s))}u[c]=B$(o,p,{key:l})}function V$(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let e=0;e<o.length;e++)if(void 0!==o[e].field){const a=t.raw(),s=t.key(),l="object"==typeof o[e].field?o[e].field:t.field(o[e].field),{props:u,main:c}=r.normalizeConfig(o[e],t),d=Object.keys(u),p=!!o[e].trackBy,f=typeof o[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const i=H$(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==i)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const b=a.qDataPages[t].qArea.qTop+y,v=j$({qRow:b},i(a.qDataPages[t].qMatrix[y])),x=B$(c,v,{key:s});if(!(c.filter&&!c.filter(v))){for(let e=0;e<d.length;e++){const r=u[d[e]];let o=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let i=0;i<o.length;i++)$$({cache:n,f:l,mainCell:v,p:o[i],prop:d[e],page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?i:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:o[e],itemData:v,obj:x,target:m,tracker:h,trackType:f}),g.push(x)}}}const y=p?r.collect(m,{main:c,propsArr:d,props:u}):g;i=[...i,...y]}return i}function W$(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function U$(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Y$)):void 0===t&&(t=G$);for(var n,r,o,i,a,s=new J$(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new J$(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(X$)}function G$(e){return e.children}function Y$(e){return Array.isArray(e)?e[1]:null}function K$(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function X$(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function J$(e){this.data=e,this.depth=this.height=0,this.parent=null}function Q$(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}J$.prototype=U$.prototype={constructor:J$,count:function(){return this.eachAfter(W$)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return U$(this).eachBefore(K$)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}};var Z$={depth:-1},eV={},tV={};function nV(e){return e.id}function rV(e){return e.parentId}function oV(){var e,t=nV,n=rV;function r(r){var o,i,a,s,l,u,c,d,p=Array.from(r),f=t,h=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;aV(e,t-1)&&!aV(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(iV),o=new Set(t).add("");for(const e of n)o.has(e)||(o.add(e),t.push(e),n.push(iV(e)),p.push(tV));f=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,o=p.length;a<o;++a)i=p[a],u=p[a]=new J$(i),null!=(c=f(i,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?eV:u)),null!=(c=h(i,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<o;++a)if(c=(u=p[a]).parent){if(!(l=m.get(c)))throw new Error("missing: "+c);if(l===eV)throw new Error("ambiguous: "+c);l.children?l.children.push(u):l.children=[u],u.parent=l}else{if(s)throw new Error("multiple roots");s=u}if(!s)throw new Error("no root");if(null!=e){for(;s.data===tV&&1===s.children.length;)s=s.children[0],--o;for(let e=p.length-1;e>=0&&(u=p[e]).data===tV;--e)u.data=null}if(s.parent=Z$,s.eachBefore((function(e){e.depth=e.parent.depth+1,--o})).eachBefore(X$),s.parent=null,o>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Q$(e),r):t},r.parentId=function(e){return arguments.length?(n=Q$(e),r):n},r.path=function(t){return arguments.length?(e=Q$(t),r):e},r}function iV(e){let t=e.length;if(t<2)return"";for(;--t>1&&!aV(e,t););return e.slice(0,t)}function aV(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function sV(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,o=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(o)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++){let n=sV(r,o[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(o)){const t=new Array(o.length);r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++)t[e]=sV(r,o[e]);return t}n[e]in o&&(o=o[n[e]])}return o}function lV(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let o=0;o<e.length;o++)e[o].children&&e[o].children.length&&(r=[...r,...lV(e[o].children,t-1,n)]);return r}function uV(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>lV(e.children,r-1,n)}return!1}const cV=/^qDimensionInfo(?:\/(\d+))?/,dV=/^\/?qMeasureInfo\/(\d+)/,pV=/\/qAttrExprInfo\/(\d+)/,fV=/\/qAttrDimInfo\/(\d+)/;function hV(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t));return t.filter((t=>t<e.qDimensionInfo.length))}function mV(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,f=hV(n);return cV.test(d)&&(o=!0,i=+cV.exec(d)[1],d=r.replace(cV,"")),dV.test(d)&&("K"===n.qMode?u=+dV.exec(d)[1]:p&&-1!==p.indexOf(-1)?(u=+dV.exec(d)[1],c=0):c=+dV.exec(d)[1],d=d.replace(dV,"")),d&&(fV.exec(d)?s=+fV.exec(d)[1]:pV.exec(d)&&(a=+pV.exec(d)[1])),l=o?"S"===n.qMode?f[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:s,attrIdx:a}}function gV(e,t){let n,r,o=uV(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function yV(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function bV(e){let{propsArr:t,props:n,item:r,itemData:o,ret:i,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let u,c;s.fields&&(u=[],c=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,f,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(f=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(h=g.map(p),p=null),f&&(y=g.map(f),f=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=o,y=o)),s.fields){const e=p?p(h):h;u.push(e),c.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const n=p?p(h):h;i[t[e]]={value:n,label:f?f(y):null!=y?y:String(n)},d.field&&(i[t[e]].source={field:d.field.key(),key:a})}}u&&(i[t[e]]={value:"function"==typeof s.value?s.value(u,r):u,label:"function"==typeof s.label?s.label(c,r):c})}}const vV=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=sV(r,e);return i&&i[0]?(t.tree=U$(i[0],n.children||(e=>e[o])),t.tree):null};const xV=e=>{let{propsArr:t,props:n,cube:r,cache:o,itemDepthObject:i,f:a}=e;for(let e=0;e<t.length;e++){const o=n[t[e]],s=o.fields?o.fields:[o];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=gV(i,mV(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function SV(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=t.raw(),i=t.key(),a="S"===o.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),o=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),i=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<o.length;e++){var s;const t=n[o[e]],i="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[i]||(a[i]=P$({__id:i,__parent:r,qValues:[]},t),l=!0),r=i}if(l)for(let e=0;e<i.length;e++){const t=n[i[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),u=oV().id((e=>e.__id)).parentId((e=>e.__parent))(l);return u}(t):vV(o,n,e);if(!a)return null;const s=a.height,l=[];for(let i=0;i<=s;i++){let a=null;if(i>0)if("S"===o.qMode){let e=hV(o)[i-1];a=n.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[i-1];i>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:u}=r.normalizeConfig(P$(P$({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(s);l[i]={propsArr:c,props:s,main:u};const d=a?mV(a,{cube:o}):{fieldDepth:0};xV({propsArr:c,props:s,cube:o,cache:n,itemDepthObject:d,f:a})}const u=a.copy().descendants(),c=a.descendants();for(let e=0;e<c.length;e++){const t=l[c[e].depth].propsArr,n=l[c[e].depth].props,r=l[c[e].depth].main,o=u[e],a=o.data,s=yV(r,a,{key:i});bV({propsArr:t,props:n,item:o,itemData:a,ret:s,sourceKey:i}),c[e].data=s}return a}function wV(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let a=0;a<o.length;a++)if(void 0!==o[a].field){const s=t.raw(),l=t.key();if(!vV(s,n,e))continue;const u="object"==typeof o[a].field?o[a].field:t.field(o[a].field),{props:c,main:d}=r.normalizeConfig(o[a],t),p=Object.keys(c),f=mV(u,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=gV({fieldDepth:0},f);xV({propsArr:p,props:c,cube:s,cache:n,itemDepthObject:f,f:u});const y=!!o[a].trackBy,b=typeof o[a].trackBy,v={},x=[],S=h(n.tree),w=[];for(let e=0;e<S.length;e++){const t=S[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const i=yV(d,n,{key:l});bV({propsArr:p,props:c,item:t,itemData:n,ret:i,sourceKey:l}),y&&r.track({cfg:o[a],itemData:n,obj:i,target:x,tracker:v,trackType:b}),w.push(i)}const C=y?r.collect(x,{main:d,propsArr:p,props:c}):w;i=[...i,...C]}return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var CV=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
140
+ */!function(e,t){var n;function r(e,t){var n=[],r=0;function o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="direction\\s*:\\s*",a="['\"]?\\s*",s="(^|[^a-zA-Z])",l="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",u="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",c="(?:[_a-z0-9-]|"+n+"|"+u+")",d=o+"(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|"+("-?"+("(?:[_a-z]|"+n+"|"+u+")")+c+"*")+")?",p="((?:-?"+d+")|(?:inherit|auto))",f="(#?"+c+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",h="(?:[!#$%&*-~]|"+n+"|"+u+")*?",m="(?![a-zA-Z])",g="(?!("+c+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+h+a+"\\))",b="(?="+h+a+"\\))",v="(\\s*(?:!important\\s*)?[;}])",x=/`TMP`/g,S=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),w=new RegExp("("+l+g+"[^;}]+;?)","gi"),C=new RegExp("("+l+"[^\\}]*?})","gi"),E=new RegExp("("+i+")ltr","gi"),k=new RegExp("("+i+")rtl","gi"),R=new RegExp(s+"(left)"+m+y+g,"gi"),_=new RegExp(s+"(right)"+m+y+g,"gi"),M=new RegExp(s+"(left)"+b,"gi"),A=new RegExp(s+"(right)"+b,"gi"),D=new RegExp(s+"(ltr)"+b,"gi"),P=new RegExp(s+"(rtl)"+b,"gi"),L=new RegExp(s+"([ns]?)e-resize","gi"),I=new RegExp(s+"([ns]?)w-resize","gi"),q=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+p+"(\\s+)"+p+"(\\s+)"+p+"(\\s+)"+p+v,"gi"),T=new RegExp("((?:-color|border-style)\\s*:\\s*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+v,"gi"),O=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+d+")","gi"),N=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),z=new RegExp("(border-radius\\s*:\\s*)"+p+"(?:(?:\\s+"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?)?(?:(?:(?:\\s*\\/\\s*)"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?(?:\\s+"+p+")?)?"+v,"gi"),F=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+p,"gi"),j=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+f,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+p,"gi"),B=new RegExp("(text-shadow\\s*:\\s*)"+p,"gi"),$=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+p+"(\\s*\\))","gi"),V=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+p+"((?:\\s*,\\s*"+p+"){0,2}\\s*\\))","gi");function W(e,t,n){var r,o;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):n=100-parseFloat(n)+"%"),t+n}function U(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function G(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),o=n.slice(6,10).filter((function(e){return e})),i=n[10]||"";return t+(o.length?U(r)+" / "+U(o):U(r))+i}function Y(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function K(e,t,n){return t+Y(n)}function X(e,t,n,r,o){return t+n+Y(r)+o}function J(e,t,n,r,o){return t+n+r+Y(o)}return{transform:function(n,o){var i=new r(w,"`NOFLIP_SINGLE`"),a=new r(C,"`NOFLIP_CLASS`"),s=new r(S,t);return n=s.tokenize(a.tokenize(i.tokenize(n.replace("`","%60")))),o.transformDirInUrl&&(n=n.replace(D,"$1"+e).replace(P,"$1ltr").replace(x,"rtl")),o.transformEdgeInUrl&&(n=n.replace(M,"$1"+e).replace(A,"$1left").replace(x,"right")),n=n.replace(E,"$1"+e).replace(k,"$1ltr").replace(x,"rtl").replace(R,"$1"+e).replace(_,"$1left").replace(x,"right").replace(L,"$1$2"+e).replace(I,"$1$2e-resize").replace(x,"w-resize").replace(z,G).replace(F,K).replace(j,J).replace(H,J).replace(B,K).replace($,X).replace(V,X).replace(q,"$1$2$3$8$5$6$7$4$9").replace(T,"$1$2$3$8$5$6$7$4$9").replace(O,W).replace(N,W),n=i.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof r&&(o.transformEdgeInUrl=r)),n.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=n)}(tO,tO.exports);var nO=ze(tO.exports),rO="comm",oO="rule",iO="decl",aO=Math.abs,sO=String.fromCharCode;function lO(e){return e.trim()}function uO(e,t,n){return e.replace(t,n)}function cO(e,t,n){return e.indexOf(t,n)}function dO(e,t){return 0|e.charCodeAt(t)}function pO(e,t,n){return e.slice(t,n)}function fO(e){return e.length}function hO(e,t){return t.push(e),e}var mO,gO,yO,bO,vO=1,xO=1,SO=0,wO=0,CO=0,EO="";function kO(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:vO,column:xO,length:a,return:"",siblings:s}}function RO(){return CO=wO>0?dO(EO,--wO):0,xO--,10===CO&&(xO=1,vO--),CO}function _O(){return CO=wO<SO?dO(EO,wO++):0,xO++,10===CO&&(xO=1,vO++),CO}function MO(){return dO(EO,wO)}function AO(){return wO}function DO(e,t){return pO(EO,e,t)}function PO(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LO(e){return lO(DO(wO-1,TO(91===e?e+2:40===e?e+1:e)))}function IO(e){for(;(CO=MO())&&CO<33;)_O();return PO(e)>2||PO(CO)>3?"":" "}function qO(e,t){for(;--t&&_O()&&!(CO<48||CO>102||CO>57&&CO<65||CO>70&&CO<97););return DO(e,AO()+(t<6&&32==MO()&&32==_O()))}function TO(e){for(;_O();)switch(CO){case e:return wO;case 34:case 39:34!==e&&39!==e&&TO(CO);break;case 40:41===e&&TO(e);break;case 92:_O()}return wO}function OO(e,t){for(;_O()&&e+CO!==57&&(e+CO!==84||47!==MO()););return"/*"+DO(t,wO-1)+"*"+sO(47===e?e:_O())}function NO(e){for(;!PO(MO());)_O();return DO(e,wO)}function zO(e){return function(e){return EO="",e}(FO("",null,null,null,[""],e=function(e){return vO=xO=1,SO=fO(EO=e),wO=0,[]}(e),0,[0],e))}function FO(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,y=1,b=0,v="",x=o,S=i,w=r,C=v;g;)switch(h=b,b=_O()){case 40:if(108!=h&&58==dO(C,d-1)){-1!=cO(C+=uO(LO(b),"&","&\f"),"&\f",aO(u?s[u-1]:0))&&(y=-1);break}case 34:case 39:case 91:C+=LO(b);break;case 9:case 10:case 13:case 32:C+=IO(h);break;case 92:C+=qO(AO()-1,7);continue;case 47:switch(MO()){case 42:case 47:hO(HO(OO(_O(),AO()),t,n,l),l),5!=PO(h||1)&&5!=PO(MO()||1)||!fO(C)||" "===pO(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[u++]=fO(C)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:-1==y&&(C=uO(C,/\f/g,"")),f>0&&(fO(C)-d||0===m&&47===h)&&hO(f>32?BO(C+";",r,n,d-1,l):BO(uO(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(hO(w=jO(C,t,n,u,c,o,s,v,x=[],S=[],d,i),i),123===b)if(0===c)FO(C,t,w,w,x,i,d,s,S);else{switch(p){case 99:if(110===dO(C,3))break;case 108:if(97===dO(C,2))break;default:c=0;case 100:case 109:case 115:}c?FO(e,w,w,r&&hO(jO(e,w,w,0,0,o,s,v,o,x=[],d,S),S),o,S,d,s,r?x:S):FO(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=y=1,v=C="",d=a;break;case 58:d=1+fO(C),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==RO())continue;switch(C+=sO(b),b*m){case 38:y=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(fO(C)-1)*y,y=1;break;case 64:45===MO()&&(C+=LO(_O())),p=MO(),c=d=fO(v=C+=NO(AO())),b++;break;case 45:45===h&&2==fO(C)&&(m=0)}}return i}function jO(e,t,n,r,o,i,a,s,l,u,c,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,y=0;m<r;++m)for(var b=0,v=pO(e,p+1,p=aO(g=a[m])),x=e;b<h;++b)(x=lO(g>0?f[b]+" "+v:uO(v,/&\f/g,f[b])))&&(l[y++]=x);return kO(e,t,n,0===o?oO:s,l,u,c,d)}function HO(e,t,n,r){return kO(e,t,n,rO,sO(CO),pO(e,2,-2),0,r)}function BO(e,t,n,r,o){return kO(e,t,n,iO,pO(e,0,r),pO(e,r+1,-1),r,o)}function $O(e,t,n){switch(e.type){case"@import":case iO:case rO:return e.return=e.return||e.value;case oO:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===rO&&(e.children=e.value)}))}var r=function(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}(Array.prototype.concat(e.children),$O);return fO(r)?e.return=e.value+"{"+r+"}":""}function VO(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===oO&&(!e.parent||"@media"===e.parent.type||e.parent.type===oO)){var o=nO.transform($O(e));e.children=o?zO(o)[0].children:[],e.return=""}}Object.defineProperty(VO,"name",{value:"stylisRTLPlugin"}),function(e){e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive"}(mO||(mO={})),function(e){e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows"}(gO||(gO={})),function(e){e.A="ascending",e.D="descending"}(yO||(yO={})),function(e){e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2"}(bO||(bO={}));const WO=[0,0],UO={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF",GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_25:"rgba(0, 0, 0, 0.25)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},GO=12,YO=14,KO=16,XO=24,JO=3,QO=300,ZO=400,eN=600,tN=700,nN={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};var rN='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A';function oN(e){return Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Rl.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}var iN=function({fontSize:e="medium",children:t=null,className:n=""}={}){const r="small"===e?"16px":"20px",o="small"===e?"-2px 0":void 0;return Rl.jsx("i",{style:{fontSize:r,margin:o,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})};function aN(e={}){return Rl.jsx(iN,{...e,children:Rl.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Rl.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Rl.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function sN(e={}){return Rl.jsx(iN,{fontSize:"medium",...e,children:Rl.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Rl.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Rl.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function lN(e){return Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Rl.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function uN(e={}){return Rl.jsx(iN,{...e,children:Rl.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Rl.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Rl.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Rl.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function cN(e={}){return Rl.jsx(iN,{fontSize:"medium",...e,children:Rl.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Rl.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Rl.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function dN({className:e}){return Rl.jsx(iN,{fontSize:"small",className:e,children:Rl.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Rl.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Rl.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Rl.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Rl.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),Rl.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function pN(e={}){return Rl.jsx(iN,{...e,children:Rl.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Rl.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Rl.jsx("rect",{stroke:UO.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}const fN={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:JO,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var hN=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:UO.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:UO.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Rl.jsx(oN,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${UO.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,borderRadius:JO,backgroundColor:UO.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${UO.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:UO.WHITE,color:UO.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:JO},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&.Mui-focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&.Mui-focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:JO,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:UO.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:UO.PURPLE,"&.Mui-focusVisible":{borderColor:UO.PURPLE,boxShadow:`0 0 0 3px ${fh(UO.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:UO.GREEN,"&.Mui-focusVisible":{borderColor:UO.GREEN,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:UO.BLUE,"&.Mui-focusVisible":{borderColor:UO.BLUE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:UO.ORANGE,"&.Mui-focusVisible":{borderColor:UO.ORANGE,boxShadow:`0 0 0 3px ${fh(UO.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:UO.RED,"&.Mui-focusVisible":{borderColor:UO.RED,boxShadow:`0 0 0 3px ${fh(UO.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:UO.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:UO.PURPLE_PALE},"&:active":{backgroundColor:UO.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:UO.PURPLE_PALE,boxShadow:`0 0 0 3px ${fh(UO.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&.Mui-focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&.Mui-focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:UO.ORANGE_PALE},"&:active":{backgroundColor:UO.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:UO.ORANGE_PALE,boxShadow:`0 0 0 3px ${fh(UO.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:UO.RED_PALE},"&:active":{backgroundColor:UO.RED_DARK},"&.Mui-focusVisible":{borderColor:UO.RED_PALE,boxShadow:`0 0 0 3px ${fh(UO.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:UO.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:UO.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:JO,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Rl.jsx(lN,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:GO,borderRadius:JO,color:UO.TEXT_PRIMARY,backgroundColor:UO.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:UO.GREYSCALE_0_05,color:UO.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:UO.GREEN,borderColor:UO.GREEN},"&.MuiChip-outlinedInfo":{color:UO.BLUE,borderColor:UO.BLUE},"&.MuiChip-outlinedWarning":{color:UO.ORANGE,borderColor:UO.ORANGE},"&.MuiChip-outlinedError":{color:UO.RED,borderColor:UO.RED}},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:JO,boxShadow:"none",backgroundColor:UO.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:UO.GREEN,borderColor:UO.GREEN},outlinedSecondary:{color:UO.BLUE,borderColor:UO.BLUE},label:{fontFamily:nN.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Rl.jsx(lN,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Rl.jsx(oN,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:JO},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:JO,fontSize:YO,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:UO.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${UO.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:UO.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:UO.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_05}}},popupIndicator:{borderRadius:JO,border:`solid 1px ${UO.GREYSCALE_0_15}`,color:UO.GREYSCALE_0_60,marginRight:0,width:XO,height:XO},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${UO.GREYSCALE_0_15}`},clearIndicator:{borderRadius:JO,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:UO.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:YO}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:GO,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:UO.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:UO.GREYSCALE_25,fontSize:GO,fontFamily:nN.FONT_FAMILY,fontWeight:eN,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:UO.TEXT_PRIMARY},"&.Mui-error":{color:UO.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:UO.TEXT_SECONDARY,content:"'(optional)'",fontWeight:ZO,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:UO.TEXT_SECONDARY,content:"'(required)'",fontWeight:ZO,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:YO,lineHeight:"16px",backgroundColor:UO.WHITE,borderRadius:JO,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_05}`,borderColor:UO.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.RED}`,boxShadow:`0px 0px 0px 1px ${UO.RED}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_10}`,borderColor:UO.GREYSCALE_0_10,backgroundColor:UO.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:UO.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:UO.GREYSCALE_0_15,borderRadius:JO,boxShadow:`inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Rl.jsx(oN,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:UO.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:UO.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&:focus":{backgroundColor:UO.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:UO.GREYSCALE_0_30,"&:hover":{backgroundColor:UO.GREYSCALE_0_0,borderColor:UO.GREYSCALE_0_15},"& ~svg":{color:UO.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:JO}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:UO.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:YO,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:GO,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:GO,fontWeight:eN,color:UO.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:eN}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Rl.jsx(cN,{}),checkedIcon:Rl.jsx(sN,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:UO.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:UO.GREYSCALE_0_20}},"&.Mui-disabled":{fill:UO.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Rl.jsx(pN,{}),checkedIcon:Rl.jsx(aN,{}),indeterminateIcon:Rl.jsx(uN,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:JO,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:UO.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:UO.GREYSCALE_0_55,color:UO.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:UO.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:UO.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:UO.GREYSCALE_0_55,"&:hover":{color:UO.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:UO.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:UO.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:YO,color:UO.TEXT_PRIMARY,lineHeight:"16px",fontWeight:eN},secondary:{fontSize:GO,color:UO.GREYSCALE_45,fontWeight:ZO,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:YO,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:YO,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:UO.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:GO,borderBottom:`solid 1px ${UO.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:YO,color:UO.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:UO.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:`url('${rN}')`,fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:UO.RED}}},"&.Mui-focusVisible":{backgroundColor:UO.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:UO.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:UO.GREEN,height:"24px","&.Mui-disabled":{color:UO.GREYSCALE_0_15}},rail:{backgroundColor:UO.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO,boxShadow:`inset 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.WHITE,boxShadow:`0px 1px 2px 0px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`,"&:hover":{borderRadius:JO,boxShadow:`0 2px 4px 0 ${UO.GREYSCALE_0_30}, 0 0 0 1px ${UO.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${UO.GREYSCALE_0_15}, 0 0 0 1px ${UO.GREYSCALE_0_06}, 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${UO.GREYSCALE_0_15}, 0 0 0 1px ${UO.GREYSCALE_0_06}, 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:UO.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:UO.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:UO.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:UO.GREYSCALE_0_15},markLabel:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:UO.WHITE,color:UO.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:UO.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${fh(UO.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${fh(UO.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:UO.GREYSCALE_0_15,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:YO,fontWeight:eN,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${UO.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,backgroundColor:UO.GREYSCALE_0_03,borderRadius:JO},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:UO.GREYSCALE_25,"&.Mui-selected":{color:UO.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:YO,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:JO,"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${UO.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${UO.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:JO,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:UO.GREYSCALE_0_05},"&:hover":{backgroundColor:UO.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderRight:`1px solid ${UO.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:eN,backgroundColor:UO.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:UO.GREYSCALE_98,borderBottom:`1px solid ${UO.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderTop:`1px solid ${UO.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:UO.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:UO.GREYSCALE_0_05,"&:hover":{backgroundColor:UO.GREYSCALE_0_03}},"&&:hover":{backgroundColor:UO.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Rl.jsx(dN,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${UO.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:YO,borderRadius:JO,padding:"7px 16px",border:`1px solid ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_60,color:UO.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_30}`},"&:hover":{backgroundColor:UO.GREYSCALE_0_03,border:`1px solid ${UO.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:UO.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`,border:`1px solid ${UO.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:UO.GREYSCALE_25,backgroundColor:UO.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:GO,height:24,width:24,padding:7},sizeLarge:{fontSize:KO,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:YO,borderRadius:JO}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:UO.GREYSCALE_20},tooltip:{backgroundColor:UO.GREYSCALE_20,fontSize:GO,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...fN}:{}});var mN=()=>({mode:"light",primary:{ultraLight:UO.GREEN_ULTRA_LIGHT,light:UO.GREEN_PALE,main:UO.GREEN,dark:UO.GREEN_DARK,extraDark:UO.GREEN_EXTRA_DARK,contrastText:UO.WHITE},secondary:{ultraLight:UO.BLUE_ULTRA_LIGHT,light:UO.BLUE_PALE,main:UO.BLUE,dark:UO.BLUE_DARK,extraDark:UO.BLUE_EXTRA_DARK,contrastText:UO.WHITE},error:{ultraLight:UO.RED_ULTRA_LIGHT,light:UO.RED_PALE,main:UO.RED,dark:UO.RED_DARK,extraDark:UO.RED_EXTRA_DARK,contrastText:UO.WHITE},warning:{ultraLight:UO.ORANGE_ULTRA_LIGHT,light:UO.ORANGE_PALE,main:UO.ORANGE,dark:UO.ORANGE_DARK,extraDark:UO.ORANGE_EXTRA_DARK,contrastText:UO.WHITE},success:{ultraLight:UO.GREEN_ULTRA_LIGHT,light:UO.GREEN_PALE,main:UO.GREEN,dark:UO.GREEN_DARK,extraDark:UO.GREEN_EXTRA_DARK,contrastText:UO.WHITE},info:{ultraLight:UO.BLUE_ULTRA_LIGHT,light:UO.BLUE_PALE,main:UO.BLUE,dark:UO.BLUE_DARK,extraDark:UO.BLUE_EXTRA_DARK,contrastText:UO.WHITE},text:{primary:UO.TEXT_PRIMARY,secondary:UO.TEXT_SECONDARY,disabled:UO.GREYSCALE_0_30},action:{hover:UO.GREYSCALE_0_03,hoverOpacity:.03,selected:UO.GREYSCALE_0_05,selectedOpacity:.05,focus:UO.MISC_FOCUS_BORDER},amethyst:{ultraLight:UO.WHITE,main:UO.PURPLE,light:UO.PURPLE_PALE,dark:UO.PURPLE_DARK,extraDark:UO.GREYSCALE_0_0,contrastText:UO.WHITE},background:{paper:UO.WHITE,default:UO.GREYSCALE_95},divider:UO.GREYSCALE_0_15});var gN=e=>mN();var yN=(e,t=!1)=>{const n=((e,t)=>hN(t))(0,t);return{components:n,palette:gN(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:YO,fontWeightLight:QO,fontWeightRegular:ZO,fontWeightMedium:eN,fontWeightBold:tN,htmlFontSize:YO,fontFamily:nN.FONT_FAMILY,button:{fontWeight:eN,fontSize:YO,textTransform:"none"},body1:{fontSize:KO,lineHeight:"24px"},body2:{fontSize:YO,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:XO,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:KO,fontWeight:eN,lineHeight:"16px"},h6:{fontSize:YO,fontWeight:eN,lineHeight:"16px"},caption:{color:UO.TEXT_SECONDARY},subtitle1:{fontSize:YO,color:UO.TEXT_SECONDARY},subtitle2:{fontSize:GO,color:UO.TEXT_SECONDARY}},shape:{borderRadius:JO}}},bN={},vN={exports:{}},xN={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(xN);var SN=xN.exports;!function(e){var t=SN.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=t(e)&&"function"!=typeof e)return{default:e};var o=n(r);if(o&&o.has(e))return o.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(i,s,l):i[s]=e[s]}return i.default=e,o&&o.set(e,i),i},e.exports.__esModule=!0,e.exports.default=e.exports}(vN);var wN=vN.exports,CN={},EN=Fe(Pt);Object.defineProperty(CN,"__esModule",{value:!0}),CN.hexToRgb=_N,CN.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=AN(e),n=t.values;return"#".concat(n.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))},CN.hslToRgb=MN,CN.decomposeColor=AN,CN.recomposeColor=DN,CN.getContrastRatio=function(e,t){var n=PN(e),r=PN(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},CN.getLuminance=PN,CN.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return PN(e)>.5?IN(e,t):qN(e,t)},CN.fade=function(e,t){return LN(e,t)},CN.alpha=LN,CN.darken=IN,CN.lighten=qN;var kN=EN;function RN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function _N(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function MN(e){var t=(e=AN(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),DN({type:s,values:l})}function AN(e){if(e.type)return e;if("#"===e.charAt(0))return AN(_N(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,kN.formatMuiErrorMessage)(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map((function(e){return parseFloat(e)})),{type:n,values:r}}function DN(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function PN(e){var t="hsl"===(e=AN(e)).type?AN(MN(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function LN(e,t){return e=AN(e),t=RN(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,DN(e)}function IN(e,t){if(e=AN(e),t=RN(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return DN(e)}function qN(e,t){if(e=AN(e),t=RN(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return DN(e)}var TN,ON,NN,zN={},FN={exports:{}},jN={exports:{}},HN={exports:{}};function BN(){return TN||(TN=1,function(e){var t=SN.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(HN)),HN.exports}function $N(){return ON||(ON=1,function(e){var t=SN.default,n=BN();e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(jN)),jN.exports}function VN(){return NN||(NN=1,function(e){var t=$N();e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(FN)),FN.exports}var WN,UN={exports:{}};function GN(){return WN||(WN=1,function(e){var t=og();e.exports=function(e,n){if(null==e)return{};var r,o,i=t(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.__esModule=!0,e.exports.default=e.exports}(UN)),UN.exports}var YN,KN={};var XN,JN={};var QN,ZN={},ez={};var tz,nz={};var rz,oz={};var iz,az={};var sz,lz={};var uz,cz={};var dz,pz={};var fz,hz,mz={};function gz(){if(hz)return ZN;hz=1;var e=lm;Object.defineProperty(ZN,"__esModule",{value:!0}),ZN.default=function(e){var g=e.primary,y=void 0===g?{light:a.default[300],main:a.default[500],dark:a.default[700]}:g,b=e.secondary,v=void 0===b?{light:s.default.A200,main:s.default.A400,dark:s.default.A700}:b,x=e.error,S=void 0===x?{light:l.default[300],main:l.default[500],dark:l.default[700]}:x,w=e.warning,C=void 0===w?{light:u.default[300],main:u.default[500],dark:u.default[700]}:w,E=e.info,k=void 0===E?{light:c.default[300],main:c.default[500],dark:c.default[700]}:E,R=e.success,_=void 0===R?{light:d.default[300],main:d.default[500],dark:d.default[700]}:R,M=e.type,A=void 0===M?"light":M,D=e.contrastThreshold,P=void 0===D?3:D,L=e.tonalOffset,I=void 0===L?.2:L,q=(0,n.default)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function T(e){return(0,p.getContrastRatio)(e,h.text.primary)>=P?h.text.primary:f.text.primary}var O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,t.default)({},e)).main&&e[n]&&(e.main=e[n]),!e.main)throw new Error((0,r.formatMuiErrorMessage)(4,n));if("string"!=typeof e.main)throw new Error(_formatMuiErrorMessage(5,JSON.stringify(e.main)));return m(e,"light",o,I),m(e,"dark",i,I),e.contrastText||(e.contrastText=T(e.main)),e},N={dark:h,light:f},z=(0,r.deepmerge)((0,t.default)({common:o.default,type:A,primary:O(y),secondary:O(v,"A400","A200","A700"),error:O(S),warning:O(C),info:O(k),success:O(_),grey:i.default,contrastThreshold:P,getContrastText:T,augmentColor:O,tonalOffset:I},N[A]),q);return z},ZN.dark=ZN.light=void 0;var t=e(tg()),n=e(GN()),r=EN,o=e(function(){if(QN)return ez;QN=1,Object.defineProperty(ez,"__esModule",{value:!0}),ez.default=void 0;var e={black:"#000",white:"#fff"};return ez.default=e,ez}()),i=e(function(){if(tz)return nz;tz=1,Object.defineProperty(nz,"__esModule",{value:!0}),nz.default=void 0;var e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};return nz.default=e,nz}()),a=e(function(){if(rz)return oz;rz=1,Object.defineProperty(oz,"__esModule",{value:!0}),oz.default=void 0;var e={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};return oz.default=e,oz}()),s=e(function(){if(iz)return az;iz=1,Object.defineProperty(az,"__esModule",{value:!0}),az.default=void 0;var e={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};return az.default=e,az}()),l=e(function(){if(sz)return lz;sz=1,Object.defineProperty(lz,"__esModule",{value:!0}),lz.default=void 0;var e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};return lz.default=e,lz}()),u=e(function(){if(uz)return cz;uz=1,Object.defineProperty(cz,"__esModule",{value:!0}),cz.default=void 0;var e={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};return cz.default=e,cz}()),c=e(function(){if(dz)return pz;dz=1,Object.defineProperty(pz,"__esModule",{value:!0}),pz.default=void 0;var e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};return pz.default=e,pz}()),d=e(function(){if(fz)return mz;fz=1,Object.defineProperty(mz,"__esModule",{value:!0}),mz.default=void 0;var e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};return mz.default=e,mz}()),p=CN,f={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:o.default.white,default:i.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}};ZN.light=f;var h={text:{primary:o.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:i.default[800],default:"#303030"},action:{active:o.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function m(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,p.lighten)(e.main,o):"dark"===t&&(e.dark=(0,p.darken)(e.main,i)))}return ZN.dark=h,ZN}var yz,bz={};var vz,xz={};var Sz,wz={};var Cz,Ez={},kz=Fe(br);var Rz,_z={};function Mz(){if(Rz)return _z;Rz=1;var e=lm;Object.defineProperty(_z,"__esModule",{value:!0}),_z.default=_z.duration=_z.easing=void 0;var t=e(GN()),n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};_z.easing=n;var r={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(e){return"".concat(Math.round(e),"ms")}_z.duration=r;var i={easing:n,duration:r,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.duration,s=void 0===a?r.standard:a,l=i.easing,u=void 0===l?n.easeInOut:l,c=i.delay,d=void 0===c?0:c;return(0,t.default)(i,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:o(s)," ").concat(u," ").concat("string"==typeof d?d:o(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};return _z.default=i,_z}var Az,Dz,Pz={};function Lz(){if(Dz)return zN;Dz=1;var e=lm;Object.defineProperty(zN,"__esModule",{value:!0}),zN.createMuiTheme=function(){return p.apply(void 0,arguments)},zN.default=void 0,e(VN());var t=e(GN()),n=EN,r=e(function(){if(YN)return KN;YN=1;var e=lm;Object.defineProperty(KN,"__esModule",{value:!0}),KN.default=function(e){var o=e.values,i=void 0===o?{xs:0,sm:600,md:960,lg:1280,xl:1920}:o,a=e.unit,s=void 0===a?"px":a,l=e.step,u=void 0===l?5:l,c=(0,n.default)(e,["values","unit","step"]);function d(e){var t="number"==typeof i[e]?i[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function p(e,t){var n=r.indexOf(t);return n===r.length-1?d(e):"@media (min-width:".concat("number"==typeof i[e]?i[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==n&&"number"==typeof i[r[n+1]]?i[r[n+1]]:t)-u/100).concat(s,")")}return(0,t.default)({keys:r,values:i,up:d,down:function(e){var t=r.indexOf(e)+1,n=i[r[t]];return t===r.length?d("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-u/100).concat(s,")")},between:p,only:function(e){return p(e,e)},width:function(e){return i[e]}},c)},KN.keys=void 0;var t=e(tg()),n=e(GN()),r=["xs","sm","md","lg","xl"];return KN.keys=r,KN}()),o=e(function(){if(XN)return JN;XN=1;var e=lm;Object.defineProperty(JN,"__esModule",{value:!0}),JN.default=function(e,r,o){var i;return(0,n.default)({gutters:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,n.default)({paddingLeft:r(2),paddingRight:r(2)},o,(0,t.default)({},e.up("sm"),(0,n.default)({paddingLeft:r(3),paddingRight:r(3)},o[e.up("sm")])))},toolbar:(i={minHeight:56},(0,t.default)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,t.default)(i,e.up("sm"),{minHeight:64}),i)},o)};var t=e(VN()),n=e(tg());return JN}()),i=e(gz()),a=e(function(){if(yz)return bz;yz=1;var e=lm;Object.defineProperty(bz,"__esModule",{value:!0}),bz.default=function(e,l){var u="function"==typeof l?l(e):l,c=u.fontFamily,d=void 0===c?s:c,p=u.fontSize,f=void 0===p?14:p,h=u.fontWeightLight,m=void 0===h?300:h,g=u.fontWeightRegular,y=void 0===g?400:g,b=u.fontWeightMedium,v=void 0===b?500:b,x=u.fontWeightBold,S=void 0===x?700:x,w=u.htmlFontSize,C=void 0===w?16:w,E=u.allVariants,k=u.pxToRem,R=(0,n.default)(u,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),_=f/14,M=k||function(e){return"".concat(e/C*_,"rem")},A=function(e,n,r,i,a){return(0,t.default)({fontFamily:d,fontWeight:e,fontSize:M(n),lineHeight:r},d===s?{letterSpacing:"".concat(o(i/n),"em")}:{},a,E)},D={h1:A(m,96,1.167,-1.5),h2:A(m,60,1.2,-.5),h3:A(y,48,1.167,0),h4:A(y,34,1.235,.25),h5:A(y,24,1.334,0),h6:A(v,20,1.6,.15),subtitle1:A(y,16,1.75,.15),subtitle2:A(v,14,1.57,.1),body1:A(y,16,1.5,.15),body2:A(y,14,1.43,.15),button:A(v,14,1.75,.4,a),caption:A(y,12,1.66,.4),overline:A(y,12,2.66,1,a)};return(0,r.deepmerge)((0,t.default)({htmlFontSize:C,pxToRem:M,round:i,fontFamily:d,fontSize:f,fontWeightLight:m,fontWeightRegular:y,fontWeightMedium:v,fontWeightBold:S},D),R,{clone:!1})};var t=e(tg()),n=e(GN()),r=EN;function o(e){return Math.round(1e5*e)/1e5}function i(e){return o(e)}var a={textTransform:"uppercase"},s='"Roboto", "Helvetica", "Arial", sans-serif';return bz}()),s=e(function(){if(vz)return xz;function e(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}vz=1,Object.defineProperty(xz,"__esModule",{value:!0}),xz.default=void 0;var t=["none",e(0,2,1,-1,0,1,1,0,0,1,3,0),e(0,3,1,-2,0,2,2,0,0,1,5,0),e(0,3,3,-2,0,3,4,0,0,1,8,0),e(0,2,4,-1,0,4,5,0,0,1,10,0),e(0,3,5,-1,0,5,8,0,0,1,14,0),e(0,3,5,-1,0,6,10,0,0,1,18,0),e(0,4,5,-2,0,7,10,1,0,2,16,1),e(0,5,5,-3,0,8,10,1,0,3,14,2),e(0,5,6,-3,0,9,12,1,0,3,16,2),e(0,6,6,-3,0,10,14,1,0,4,18,3),e(0,6,7,-4,0,11,15,1,0,4,20,3),e(0,7,8,-4,0,12,17,2,0,5,22,4),e(0,7,8,-4,0,13,19,2,0,5,24,4),e(0,7,9,-4,0,14,21,2,0,5,26,4),e(0,8,9,-5,0,15,22,2,0,6,28,5),e(0,8,10,-5,0,16,24,2,0,6,30,5),e(0,8,11,-5,0,17,26,2,0,6,32,5),e(0,9,11,-5,0,18,28,2,0,7,34,6),e(0,9,12,-6,0,19,29,2,0,7,36,6),e(0,10,13,-6,0,20,31,3,0,8,38,7),e(0,10,13,-6,0,21,33,3,0,8,40,7),e(0,10,14,-6,0,22,35,3,0,8,42,7),e(0,11,14,-7,0,23,36,3,0,9,44,8),e(0,11,15,-7,0,24,38,3,0,9,46,8)];return xz.default=t,xz}()),l=e(function(){if(Sz)return wz;Sz=1,Object.defineProperty(wz,"__esModule",{value:!0}),wz.default=void 0;var e={borderRadius:4};return wz.default=e,wz}()),u=e(function(){if(Cz)return Ez;Cz=1,Object.defineProperty(Ez,"__esModule",{value:!0}),Ez.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var n=(0,e.createUnarySpacing)({spacing:t}),r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?n(1):1===t.length?n(t[0]):t.map((function(e){if("string"==typeof e)return e;var t=n(e);return"number"==typeof t?"".concat(t,"px"):t})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r};var e=kz;return Ez}()),c=e(Mz()),d=e(function(){if(Az)return Pz;Az=1,Object.defineProperty(Pz,"__esModule",{value:!0}),Pz.default=void 0;var e={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};return Pz.default=e,Pz}());function p(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=e.breakpoints,f=void 0===p?{}:p,h=e.mixins,m=void 0===h?{}:h,g=e.palette,y=void 0===g?{}:g,b=e.spacing,v=e.typography,x=void 0===v?{}:v,S=(0,t.default)(e,["breakpoints","mixins","palette","spacing","typography"]),w=(0,i.default)(y),C=(0,r.default)(f),E=(0,u.default)(b),k=(0,n.deepmerge)({breakpoints:C,direction:"ltr",mixins:(0,o.default)(C,E,m),overrides:{},palette:w,props:{},shadows:s.default,typography:(0,a.default)(w,x),spacing:E,shape:l.default,transitions:c.default,zIndex:d.default},S),R=arguments.length,_=new Array(R>1?R-1:0),M=1;M<R;M++)_[M-1]=arguments[M];return k=_.reduce((function(e,t){return(0,n.deepmerge)(e,t)}),k)}var f=p;return zN.default=f,zN}var Iz,qz={};var Tz,Oz={},Nz=Fe(rl);var zz,Fz,jz={},Hz={};function Bz(){if(zz)return Hz;zz=1;var e=lm;Object.defineProperty(Hz,"__esModule",{value:!0}),Hz.default=void 0;var t=(0,e(Lz()).default)();return Hz.default=t,Hz}var $z,Vz,Wz={},Uz={};function Gz(){if(Vz)return Wz;Vz=1;var e=lm;Object.defineProperty(Wz,"__esModule",{value:!0}),Wz.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,u=o.factor,c=void 0===u?2:u,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map((function(e){return f.breakpoints.values[e]}));return p.forEach((function(e){var o=h[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/c,u=o.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}})),f};var t=e(tg()),n=EN,r=function(){if($z)return Uz;$z=1;var e=lm;Object.defineProperty(Uz,"__esModule",{value:!0}),Uz.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},Uz.getUnit=n,Uz.toUnitless=r,Uz.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var a=r(t);if("px"!==i)if("em"===i)a=r(t)*r(e);else if("rem"===i)return a=r(t)*r(e),t;var s=a;if("px"!==o)if("em"===o)s=a/r(e);else{if("rem"!==o)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+o}},Uz.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},Uz.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},Uz.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(o-r)/l[l.length-1];return l.forEach((function(e){var o=r+p*e;null!==c&&(o=c(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(a))})),d};var t=e(VN());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return Uz}();return Wz}var Yz,Kz={};var Xz,Jz={};var Qz,Zz={};var eF,tF={};!function(e){var t=lm,n=wN;Object.defineProperty(e,"__esModule",{value:!0});var r={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return m.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return m.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return m.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return m.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}});var o=CN;Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var i=n(Lz()),a=t(function(){if(Iz)return qz;Iz=1;var e=lm;Object.defineProperty(qz,"__esModule",{value:!0}),qz.default=function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(o))};var t=EN,n=e(Lz());return qz}()),s=t(function(){if(Tz)return Oz;Tz=1,Object.defineProperty(Oz,"__esModule",{value:!0}),Oz.default=function(t){return(0,e.createStyles)(t)};var e=Nz;return Oz}()),l=t(function(){if(Fz)return jz;Fz=1;var e=lm;Object.defineProperty(jz,"__esModule",{value:!0}),jz.default=void 0;var t=e(tg()),n=Nz,r=e(Bz()),o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return jz.default=o,jz}()),u=t(Gz()),c=t(function(){if(Yz)return Kz;Yz=1;var e=lm;Object.defineProperty(Kz,"__esModule",{value:!0}),Kz.default=void 0;var t=e(tg()),n=Nz,r=e(Bz()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return Kz.default=o,Kz}()),d=Mz();Object.keys(d).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))}));var p=t(function(){if(Xz)return Jz;Xz=1;var e=lm;Object.defineProperty(Jz,"__esModule",{value:!0}),Jz.default=function(){return(0,t.useTheme)()||n.default};var t=Nz;e(Ka);var n=e(Bz());return Jz}()),f=t(function(){if(Qz)return Zz;Qz=1;var e=lm;Object.defineProperty(Zz,"__esModule",{value:!0}),Zz.default=void 0;var t=e(tg()),n=Nz,r=e(Bz()),o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return Zz.default=o,Zz}()),h=t(function(){if(eF)return tF;eF=1;var e=lm;Object.defineProperty(tF,"__esModule",{value:!0}),tF.default=void 0;var t=Nz,n=e(Bz()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return tF.default=r,tF}()),m=Nz}(bN);var nF=Object.defineProperty,rF=(e,t)=>{for(var n in t)nF(e,n,{get:t[n],enumerable:!0})};rF({},{light:()=>oF});const oF={root:{backgroundColor:UO.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&$expanded":{margin:"0px"}}};rF({},{light:()=>iF});const iF={root:{backgroundColor:UO.WHITE}};rF({},{light:()=>aF});const aF={root:{padding:"0px 16px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${UO.GREYSCALE_0_15}`,"&$focused":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,borderRadius:JO,backgroundColor:UO.GREYSCALE_0_03},"&$expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis"}};rF({},{light:()=>sF});const sF={root:{flex:"0 0 48px",flexDirection:"row",boxShadow:`inset 0 -1px 0 0 ${UO.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:UO.WHITE,color:UO.TEXT_PRIMARY}};rF({},{light:()=>lF});const lF={inputRoot:{boxSizing:"border-box",borderRadius:JO,"&&":{padding:0},"&&& input":{padding:"8px 4px"},"&&& $endAdornment":{right:4}},listbox:{paddingTop:0,paddingBottom:0},option:{fontSize:YO,height:"32px",'&[data-focus="true"]':{backgroundColor:UO.GREYSCALE_0_03}},endAdornment:{top:"auto",bottom:"4px",position:"absolute"},popupIndicator:{borderRadius:JO,border:`solid 1px ${UO.GREYSCALE_0_15}`,color:UO.GREYSCALE_0_60,marginRight:0,width:XO,height:XO,"& svg":{fontSize:"0.7em"},"& i":{lineHeight:"1 !important"}},paper:{marginTop:"5px",boxShadow:`0px 2px 4px 0px ${UO.GREYSCALE_0_15}`},clearIndicator:{"& svg":{fontSize:"0.5em",position:"absolute"},color:UO.GREYSCALE_25,width:KO,height:XO,borderRadius:JO,backgroundColor:"unset",marginRight:"4px","&&&&:hover":{backgroundColor:bN.alpha(UO.GREYSCALE_0,.05)}},popupIndicatorOpen:{backgroundColor:UO.GREYSCALE_0_10}};rF({},{light:()=>uF});const uF={badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}};rF({},{light:()=>cF});const cF={root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:JO,"& > $label > i:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},containedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&$focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&$focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > $label > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > $label > i:only-child":{marginLeft:"-10px",marginRight:"-10px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}};rF({},{light:()=>dF});const dF={root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:JO},groupedText:{padding:"8px 16px","&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`}},groupedOutlined:{padding:"7px 16px",borderColor:UO.GREYSCALE_0_15,backgroundColor:UO.GREYSCALE_100_60,"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&$focusVisible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:UO.GREEN_PALE},"&:active":{backgroundColor:UO.GREEN_DARK},"&$focusVisible":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:UO.BLUE_PALE},"&:active":{backgroundColor:UO.BLUE_DARK},"&$focusVisible":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}}};rF({},{light:()=>pF});const pF={root:{height:"100%","& $focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:UO.GREYSCALE_0_03,"& $focusHighlight":{opacity:0}},"&:active":{backgroundColor:UO.GREYSCALE_95,boxShadow:"none"},"&$focusVisible":{borderRadius:JO,boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,"& $focusHighlight":{opacity:0}}}};rF({},{light:()=>fF});const fF={root:{borderWidth:1,"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:3},"&:not($disabled)":{"&:not($checked)":{"&:not($indeterminate)":{"& span":{color:UO.WHITE}}}},"&$disabled":{"& span":{pointerEvents:"auto",cursor:"not-allowed",color:UO.GREYSCALE_0_25}}},colorPrimary:{"&.sprout-focus-visible i":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible i":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}}};rF({},{light:()=>hF});const hF={root:{height:"24px",fontSize:GO,borderRadius:JO,color:UO.TEXT_PRIMARY,backgroundColor:UO.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&$disabled":{backgroundColor:UO.GREYSCALE_0_05,color:UO.GREYSCALE_0_30,border:"none",opacity:1}},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_15,"$clickable&:active ":{boxSizing:"border-box",borderRadius:JO,boxShadow:"none",backgroundColor:UO.GREYSCALE_0_10},"& $deleteIconSmall":{height:13,color:"inherit"}},label:{fontFamily:nN.FONT_FAMILY,lineHeight:"16px"}};rF({},{light:()=>mF});const mF={root:{padding:"8px",backgroundColor:UO.GREYSCALE_98,borderTop:`1px ${UO.GREYSCALE_0_15} solid`}};rF({},{light:()=>gF});const gF={root:{padding:"24px"}};rF({},{light:()=>yF});const yF={root:{marginBottom:0}};rF({},{light:()=>bF});const bF={root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",height:"24px",padding:"12px 8px 12px 24px",fontSize:"16px",lineHeight:"24px",backgroundColor:UO.GREYSCALE_98,borderBottom:`1px ${UO.GREYSCALE_0_15} solid`}};rF({},{light:()=>vF});const vF={middle:{margin:"4px 8px"}};rF({},{light:()=>xF});const xF={root:{marginLeft:"-10px"},label:{fontSize:YO}};rF({},{light:()=>SF});const SF={root:{fontSize:GO,lineHeight:"16px",margin:"4px 0 0 0","&$error":{color:UO.RED}},contained:{marginLeft:0,marginRight:0}};rF({},{light:()=>wF});const wF={root:{color:UO.GREYSCALE_25,fontSize:GO,fontFamily:nN.FONT_FAMILY,fontWeight:eN,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&$focused":{color:UO.TEXT_PRIMARY},"&$error":{color:UO.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:UO.TEXT_SECONDARY,position:"absolute",content:"'(optional)'",fontWeight:ZO,marginLeft:"4px"}}},asterisk:{visibility:"hidden",display:"inline-flex","&::after":{visibility:"visible",color:UO.TEXT_SECONDARY,position:"absolute",content:"'(required)'",fontWeight:ZO,marginLeft:"4px"}}};rF({},{light:()=>CF});const CF={root:{padding:7,borderRadius:JO,border:"1px solid transparent","&.sprout-focus-visible":{borderColor:UO.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`},"&&&:hover":{backgroundColor:"transparent"}}};rF({},{light:()=>EF});const EF={root:{padding:"4px 8px",color:UO.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}};rF({},{light:()=>kF});const kF={input:{padding:"8px 12px",lineHeight:"16px"}};rF({},{light:()=>RF});const RF={outlined:{fontSize:`${GO}px`,fontWeight:eN,color:UO.GREYSCALE_25,"&$shrink":{transform:"translate(0px, -8px)",fontWeight:eN}}};rF({},{light:()=>_F});const _F={root:{color:UO.MISC_FOCUS_BORDER}};rF({},{light:()=>MF});const MF={padding:{paddingTop:"0px",paddingBottom:"0px"}};rF({},{light:()=>AF});const AF={root:{minHeight:"32px",fontSize:YO,"&$selected":{backgroundColor:"unset","&:not($disabled)":{"&::after":{content:`url('${rN}')`,fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:UO.RED}}}},gutters:{paddingLeft:"12px",paddingRight:"12px"},button:{"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&:active":{backgroundColor:UO.GREYSCALE_0_05}}};rF({},{light:()=>DF});const DF={root:{color:UO.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}};rF({},{light:()=>PF});const PF={root:{fontSize:"12px"},primary:{fontSize:YO,color:UO.TEXT_PRIMARY,lineHeight:"16px"},secondary:{fontSize:GO,fontWeight:QO,lineHeight:"16px",color:UO.TEXT_SECONDARY}};rF({},{light:()=>LF});const LF={root:{'&[role="option"]':{color:UO.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:GO,borderBottom:`solid 1px ${UO.GREYSCALE_0_15}`,pointerEvents:"none"}}};rF({},{light:()=>IF});const IF={list:{paddingTop:4,paddingBottom:4},paper:{marginTop:4,marginBottom:4,background:UO.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15)",borderRadius:"2px"}};rF({},{light:()=>qF});const qF={root:{fontSize:YO,height:"32px",'[class*="MuiListSubheader-root"] ~ &[role="option"]':{paddingLeft:"20px"},"& div i":{color:UO.GREYSCALE_25}}};rF({},{light:()=>TF});const TF={root:{fontSize:YO,lineHeight:"16px",backgroundColor:UO.WHITE,borderRadius:JO,"&:not($focused):not($error):not($disabled):hover $notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_05}`,borderColor:UO.GREYSCALE_0_30},"&$focused:not($error) $notchedOutline":{border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&$focused$error $notchedOutline":{border:`solid 1px ${UO.RED}`,boxShadow:`0px 0px 0px 1px ${UO.RED}, inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},"&$disabled":{backgroundColor:"transparent"},"&$disabled $notchedOutline":{border:`solid 1px ${UO.GREYSCALE_0_10}`,borderColor:UO.GREYSCALE_0_10,backgroundColor:UO.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:UO.TEXT_PRIMARY,padding:"8px 12px","&$disabled":{opacity:.45}},notchedOutline:{borderColor:UO.GREYSCALE_0_15,borderRadius:JO,boxShadow:`inset 0 2px 0 0 ${UO.GREYSCALE_0_05}`},multiline:{padding:"8px 12px"}};rF({},{light:()=>OF});const OF={day:{"&&&:hover":{backgroundColor:UO.GREYSCALE_0_03}},daySelected:{"&&&:hover":{backgroundColor:UO.GREEN}}};rF({},{light:()=>NF});const NF={paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`}};rF({},{light:()=>zF});const zF={root:{fill:UO.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&$checked":{"&$colorPrimary":{"&.sprout-focus-visible i":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},"&$colorSecondary":{"&.sprout-focus-visible i":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}},"&$disabled":{color:UO.GREYSCALE_0_20}},"&$disabled":{fill:UO.GREYSCALE_0_20,stroke:"none"}}};rF({},{light:()=>FF});const FF={root:{height:"32px",zIndex:1,borderRadius:"3px !important","& em":{color:UO.TEXT_SECONDARY,WebkitFontSmoothing:"antialiased","&::after":{content:""}},"& ~svg":{position:"absolute",top:"unset",right:"12px"},"&[aria-expanded=true]":{backgroundColor:UO.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:UO.GREYSCALE_0_03},"&:active":{backgroundColor:UO.GREYSCALE_0_10},"&:focus":{backgroundColor:UO.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${UO.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${UO.MISC_FOCUS_BORDER}`},"&$disabled":{opacity:"unset",color:UO.GREYSCALE_0_30,"&:hover":{backgroundColor:UO.GREYSCALE_0_0,borderColor:UO.GREYSCALE_0_15},"& ~svg":{color:UO.GREYSCALE_0_30}}},selectMenu:{height:"14px"},outlined:{border:`solid 1px ${UO.GREYSCALE_0_15}`}};rF({},{light:()=>jF});const jF={root:{color:UO.GREEN,height:"24px","&$disabled":{color:UO.GREYSCALE_0_15}},rail:{backgroundColor:UO.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO,boxShadow:`inset 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${UO.GREYSCALE_0_05}`,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.WHITE,boxShadow:`0px 1px 2px 0px ${UO.GREYSCALE_0_15}, 0px 0px 0px 1px ${UO.GREYSCALE_0_05}`,"&:hover":{borderRadius:JO,boxShadow:`0 2px 4px 0 ${UO.GREYSCALE_0_30}, 0 0 0 1px ${UO.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${UO.GREYSCALE_0_15}, 0 0 0 1px ${UO.GREYSCALE_0_06}, 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`},"&$disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:UO.GREYSCALE_90},"& .bar":{height:"8px",width:"1px",backgroundColor:UO.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:UO.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:UO.GREYSCALE_0_15},markLabel:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:UO.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},active:{}};rF({},{light:()=>HF});const HF={root:{backgroundColor:UO.WHITE,color:UO.GREYSCALE_25}};rF({},{light:()=>BF});const BF={root:{padding:"10px",width:"60px",height:"40px"},switchBase:{padding:"11px","&$disabled":{"& $thumb":{backgroundColor:UO.GREYSCALE_100_50}},"&$checked + $track":{opacity:1},"&$disabled + $track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + $track":{borderColor:UO.GREEN_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + $track":{borderColor:UO.BLUE_PALE,boxShadow:`0 0 0 3px ${bN.alpha(UO.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:UO.GREYSCALE_0_15,borderRadius:JO},thumb:{height:"16px",width:"16px",borderRadius:JO,backgroundColor:UO.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& $thumb":{height:"12px",width:"12px"},"& $switchBase":{padding:"9px 11px"}}};rF({},{light:()=>$F});const $F={root:{fontSize:YO,fontWeight:eN,textTransform:"none",minWidth:"auto",boxSizing:"border-box","&:hover":{borderBottom:`2px solid ${UO.GREYSCALE_80}`,paddingBottom:"4px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${UO.MISC_FOCUS_BORDER}`,paddingTop:"4px",backgroundColor:UO.GREYSCALE_0_03,borderRadius:JO,minHeight:"44px",paddingBottom:"4px",border:"none"},"&$disabled":{opacity:.3}},textColorPrimary:{color:UO.GREYSCALE_25,"&$selected":{color:UO.GREYSCALE_25}},textColorInherit:{opacity:"unset"},fullWidth:{"&.sprout-focus-visible":{paddingRight:12,paddingLeft:12}},wrapper:{alignItems:"initial"},labelIcon:{minWidth:"40px",minHeight:"48px","&.sprout-focus-visible":{minHeight:"auto",height:"30px",marginTop:9,marginBottom:9,flexDirection:"column",paddingRight:"12px",paddingBottom:"2px"},"& $wrapper":{display:"block"}}};rF({},{light:()=>VF});const VF={root:{borderLeft:`1px solid ${UO.GREYSCALE_85}`}};rF({},{light:()=>WF});const WF={root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderRight:`1px solid ${UO.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:eN,backgroundColor:UO.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&$head":{height:"31px"},"&$paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:UO.GREYSCALE_98,borderBottom:`1px solid ${UO.GREYSCALE_85}`}};rF({},{light:()=>UF});const UF={root:{borderBottom:`1px solid ${UO.GREYSCALE_85}`,borderTop:`1px solid ${UO.GREYSCALE_85}`}};rF({},{light:()=>GF});const GF={root:{backgroundColor:UO.GREYSCALE_98}};rF({},{light:()=>YF});const YF={hover:{"&$selected":{backgroundColor:UO.GREYSCALE_0_05,"&:hover":{backgroundColor:UO.GREYSCALE_0_03}},"&&:hover":{backgroundColor:UO.GREYSCALE_0_03}}};rF({},{light:()=>KF});const KF={root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&$active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}};rF({},{light:()=>XF});const XF={scroller:{height:"100%"},flexContainer:{height:"100%",marginLeft:2,marginRight:2},root:{fontSize:YO,fontWeight:"bold"},indicator:{height:2}};rF({},{light:()=>JF});const JF={root:{height:32,lineHeight:16,width:32,fontSize:YO,borderRadius:JO,padding:"7px 16px",border:`1px solid ${UO.GREYSCALE_0_15}`,backgroundColor:UO.GREYSCALE_100_60,color:UO.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_30}`},"&:hover":{backgroundColor:UO.GREYSCALE_0_03,border:`1px solid ${UO.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:UO.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${UO.MISC_FOCUS_BORDER}`,border:`1px solid ${UO.MISC_FOCUS_BORDER}`,zIndex:2},"&$selected":{color:UO.GREYSCALE_25,backgroundColor:UO.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:UO.GREYSCALE_0_10,border:`1px solid ${UO.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:GO,height:24,width:24,padding:7},sizeLarge:{fontSize:KO,height:40,width:40,lineHeight:20}};rF({},{light:()=>QF});const QF={root:{height:"32px",lineHeight:"16px",fontSize:YO,borderRadius:JO}};rF({},{light:()=>ZF});const ZF={root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}};rF({},{light:()=>ej});const ej={arrow:{color:UO.GREYSCALE_20},tooltip:{backgroundColor:UO.GREYSCALE_20,fontSize:GO,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}},tj=(e="light",t=!1)=>yN(e,t),nj=(tj().palette.primary.light,mO.Selected,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),rj=4/3,oj="12px",ij="600",aj="Source Sans Pro, sans-serif",sj={height:"auto",fontSize:oj,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},lj={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:ij},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},uj=25e4,cj=(e,t,n)=>{if(!e.length)return[];const r=[],o=[];let i=t;if(e.forEach(((e,a)=>{var s;const{columnWidth:{type:l,pixels:u,percentage:c},label:d,qApprMaxGlyphCount:p,totalInfo:f}=e;let h=0;const m=()=>{r[a]=Math.min(iI.PixelsMax,Math.max(iI.PixelsMin,h)),i-=r[a]};switch(l){case aI.Pixels:h=u||iI.PixelsDefault,m();break;case aI.Percentage:h=(c||iI.PercentageDefault)/100*t,m();break;case aI.FitToContent:(null===(s=e.representation)||void 0===s?void 0:s.type)===HI.Image?o.push(a):(h=n(d,f,p,e.isLocked,e.isActivelySorted,e.isDim),m());break;case aI.Auto:o.push(a);break;default:throw new Error(`${l} is not a valid column width type`)}})),o.length){const e=i/o.length;o.forEach((t=>{r[t]=Math.max(iI.AutoMinTable,e)}))}return r},dj=(e,t,n)=>{const r=n.size,o=r>=t.size;if(r){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},pj=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},fj=e=>e.ctrlKey||e.metaKey,hj=e=>e.shiftKey&&fj(e),mj=e=>[rI.Left,rI.Right,rI.Up,rI.Down].includes(e),gj=e=>e.shiftKey&&mj(e.key),yj=e=>(e=>mj(e)||[rI.Home,rI.End,rI.PageUp,rI.PageDown].includes(e))(e.key)&&!hj(e),bj=(e,t)=>{const{api:n,rows:r,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l=new Map;if(-1===o)null==n||n.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:o}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,o):(e.has(r)?e.delete(r):e.set(r,o),new Map(e))})(l,i,s),dj(a,r,l),l.size?(null==n||n.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(null==n||n.cancel(),{...e,rows:l,colIdx:-1})},vj=(e,t)=>{var n;const{api:r,rows:o,colIdx:i,pageRows:a,firstCell:s}=e,{cell:l,announce:u,evt:c}=t;if(!(s||"key"in c&&gj(c)))return e;-1===i&&(null==r||r.begin(["/qHyperCubeDef"]));const d=((e,t,n,r,o)=>{const i=new Map(t);if("key"in r&&gj(r)){i.set(n.qElemNumber,n.rowIdx);const t=r.key===rI.Down?1:-1,o=e[n.pageRowIdx+t][n.pageColIdx];return i.set(o.qElemNumber,n.rowIdx+t),i}if(!o)return t;const a=Math.min(o.pageRowIdx,n.pageRowIdx),s=Math.max(o.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][o.pageColIdx];i.set(n.qElemNumber,n.rowIdx)}return i})(a,o,l,c,s);return dj(u,o,d),{...e,rows:d,colIdx:null!==(n=null==s?void 0:s.selectionColIdx)&&void 0!==n?n:l.selectionColIdx,isSelectMultiValues:!0}},xj=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&(null==t||t.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]})),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},Sj=(e,t)=>{var n;switch(t.type){case gO.Select:return bj(e,t.payload);case gO.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:n})=>!n||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",n),{...e,firstCell:t,mouseupOutsideCallback:n}))(e,t.payload);case gO.SelectMouseUp:return((e,t)=>xj(e.isSelectMultiValues||e.firstCell!==t.cell?e:bj(e,t)))(e,t.payload);case gO.SelectMultiAdd:return vj(e,t.payload);case gO.SelectMultiEnd:return xj(e);case gO.Reset:return null!==(n=e.api)&&void 0!==n&&n.isModal()?e:{...e,rows:new Map,colIdx:-1};case gO.Clear:return e.rows.size?{...e,rows:new Map}:e;case gO.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},wj=4/3,Cj=e=>!(null==e||!e.color)||"number"==typeof(null==e?void 0:e.index)&&e.index>-1;function Ej(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const kj=(e,t)=>e?{borderBottomColor:_L.DARK_MODE_BORDER,borderRightColor:_L.DARK_MODE_BORDER,borderLeftColor:_L.DARK_MODE_BORDER,borderTopColor:_L.DARK_MODE_BORDER}:{borderLeftColor:_L.BORDER_MEDIUM,borderRightColor:_L.BORDER_MEDIUM,borderTopColor:_L.BORDER_HEAVY,borderBottomColor:t?_L.BORDER_HEAVY:_L.BORDER_LIGHT},Rj=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*wj+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},_j=e=>{var t;return null===(t=e.components)||void 0===t?void 0:t.find((e=>"theme"===e.key))},Mj=(e,t,n,r=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:o,color:Cj(null==n?void 0:n.fontColor)?Ej(_L.TEXT,t,null==n?void 0:n.fontColor):i||_L.TEXT,fontSize:(null==n?void 0:n.fontSize)&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...kj(t.background.isDark,r)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function Aj(e,t,n){var r,o,i;const a=null===(r=_j(e))||void 0===r?void 0:r.header,s=Mj("header",t,a,n);return s.background=(e=>{if(void 0===e)return;const t=f(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),s.hoverBackground=DL(null!==(o=s.background)&&void 0!==o?o:_L.WHITE,sI),s.activeBackground=DL(null!==(i=s.background)&&void 0!==i?i:_L.WHITE,lI),s}const Dj=(e,t)=>{var n;const r=null!==(n=e.toLowerCase().match(/<[^>]+>/g))&&void 0!==n?n:[];return r.forEach((e=>(e=>e in lj)(e)&&Object.assign(t,lj[e]))),t};function Pj(e,t,n){var r;const o={};let i={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return null==t||null===(r=t.qValues)||void 0===r||r.forEach(((e,t)=>{const r=e.qText,a=r&&IL(r);a&&"none"!==a&&(o[n[t]]=a),i=r?Dj(r,i):i})),o.cellBackgroundColor&&!o.cellForegroundColor&&(o.cellForegroundColor=ML(o.cellBackgroundColor)),{...e,...o,color:o.cellForegroundColor||e.color,background:o.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const Lj=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},Ij=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:o}=e.background,i=Lj(e,null==t?void 0:t.background),a=e.getStyle("","",n);return{backgroundColor:i||r||a,backgroundFromStyling:i,sheetColorFromCSS:o}},qj=(e,t,n,r=_L.WHITE)=>{var o;const{backgroundColor:i,backgroundFromStyling:a,sheetColorFromCSS:s}=Ij(e,t,n);return null!==(o=NL(a,i,s,r))&&void 0!==o?o:r},Tj=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return oj}},Oj=e=>null!=e&&e.some((e=>"italic"===e))?"italic":"normal",Nj=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?ij:"normal",zj=e=>!1===e?1:3,Fj=e=>parseInt(null!=e?e:sj.fontSize,10)*rj,jj=e=>null!=e&&e.some((e=>"underline"===e))?"underline":"none",Hj=(e,t,n,r,o)=>{var i,a,s,l,u,c,d,p,f,h,m,g,y,b,v,x,S,w,C,E,k,R,_,M,A,D,P,L,I,q,T,O,N,z,F,j,H,B,$,V,W,U,G,Y,K,X,J,Q,Z,ee,te,ne,re,oe,ie,ae,se,le,ue,ce,de,pe,fe,he,me,ge,ye,be,ve;const{header:xe,dimensionValues:Se,measureValues:we,totalValues:Ce,nullValues:Ee,grid:ke,content:Re}=null!==(i=_j(t))&&void 0!==i?i:{},_e=!0===t.usePagination?_L.WHITE:_L.TRANSPARENT,Me=qj(r,xe,"object.straightTableV2.dimension.label.name.backgroundColor",_e),Ae=null!==(a=null!==(s=null===(l=o.viewState)||void 0===l?void 0:l.maxLineCount)&&void 0!==s?s:null==Re?void 0:Re.rowHeight)&&void 0!==a?a:r.getStyle("object.straightTableV2","grid","lineClamp"),De={header:{fontFamily:null!==(u=null!==(c=null!==(d=null==xe?void 0:xe.fontFamily)&&void 0!==d?d:r.getStyle("object.straightTableV2.dimension","label.name","fontFamily"))&&void 0!==c?c:n.head.fontFamily)&&void 0!==u?u:aj,fontSize:Tj(null!==(p=null!==(f=null==xe?void 0:xe.fontSize)&&void 0!==f?f:r.getStyle("object.straightTableV2.dimension","label.name","fontSize"))&&void 0!==p?p:n.head.fontSize),fontStyle:Oj(null==xe?void 0:xe.fontStyle),fontWeight:Nj(null==xe?void 0:xe.fontStyle,ij),textDecoration:jj(null==xe?void 0:xe.fontStyle),color:null!==(h=null!==(m=null!==(g=Lj(r,null==xe?void 0:xe.fontColor))&&void 0!==g?g:r.getStyle("object.straightTableV2.dimension","label.name","color"))&&void 0!==m?m:n.head.color)&&void 0!==h?h:_L.TEXT,background:Me},headerMenuHoverBackground:DL(Me,sI),headerMenuActiveBackground:DL(Me,lI),dimension:{values:{fontFamily:null!==(y=null!==(b=null!==(v=null==Se?void 0:Se.fontFamily)&&void 0!==v?v:r.getStyle("object.straightTableV2.dimension","label.value","fontFamily"))&&void 0!==b?b:n.body.fontFamily)&&void 0!==y?y:aj,fontSize:Tj(null!==(x=null!==(S=null!==(w=null==Se?void 0:Se.fontSize)&&void 0!==w?w:null==Re?void 0:Re.fontSize)&&void 0!==S?S:r.getStyle("object.straightTableV2.dimension","label.value","fontSize"))&&void 0!==x?x:n.body.fontSize),fontStyle:Oj(null==Se?void 0:Se.fontStyle),fontWeight:Nj(null==Se?void 0:Se.fontStyle,"normal"),textDecoration:jj(null==Se?void 0:Se.fontStyle),color:null!==(C=null!==(E=null!==(k=null!==(R=Lj(r,null==Se?void 0:Se.fontColor))&&void 0!==R?R:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==k?k:r.getStyle("object.straightTableV2.dimension","label.value","color"))&&void 0!==E?E:n.body.color)&&void 0!==C?C:_L.TEXT,background:null!==(_=null!==(M=Ij(r,Se,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor)&&void 0!==M?M:n.body.background)&&void 0!==_?_:_L.TRANSPARENT}},measure:{values:{fontFamily:null!==(A=null!==(D=null!==(P=null==we?void 0:we.fontFamily)&&void 0!==P?P:r.getStyle("object.straightTableV2.measure","label.value","fontFamily"))&&void 0!==D?D:n.body.fontFamily)&&void 0!==A?A:aj,fontSize:Tj(null!==(L=null!==(I=null!==(q=null==we?void 0:we.fontSize)&&void 0!==q?q:null==Re?void 0:Re.fontSize)&&void 0!==I?I:r.getStyle("object.straightTableV2.measure","label.value","fontSize"))&&void 0!==L?L:n.body.fontSize),fontStyle:Oj(null==we?void 0:we.fontStyle),fontWeight:Nj(null==we?void 0:we.fontStyle,"normal"),textDecoration:jj(null==we?void 0:we.fontStyle),color:null!==(T=null!==(O=null!==(N=null!==(z=Lj(r,null==we?void 0:we.fontColor))&&void 0!==z?z:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==N?N:r.getStyle("object.straightTableV2.measure","label.value","color"))&&void 0!==O?O:n.body.color)&&void 0!==T?T:_L.TEXT,background:null!==(F=null!==(j=Ij(r,we,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor)&&void 0!==j?j:n.body.background)&&void 0!==F?F:_L.TRANSPARENT}},totalRow:{fontFamily:null!==(H=null!==(B=null!==($=null==Ce?void 0:Ce.fontFamily)&&void 0!==$?$:r.getStyle("object.straightTableV2.total","label.value","fontFamily"))&&void 0!==B?B:n.totals.fontFamily)&&void 0!==H?H:aj,fontSize:Tj(null!==(V=null!==(W=null!==(U=null==Ce?void 0:Ce.fontSize)&&void 0!==U?U:null==Re?void 0:Re.fontSize)&&void 0!==W?W:r.getStyle("object.straightTableV2.total","label.value","fontSize"))&&void 0!==V?V:n.totals.fontSize),fontStyle:Oj(null==Ce?void 0:Ce.fontStyle),fontWeight:Nj(null==Ce?void 0:Ce.fontStyle,ij),textDecoration:jj(null==Ce?void 0:Ce.fontStyle),color:null!==(G=null!==(Y=null!==(K=null!==(X=Lj(r,null==Ce?void 0:Ce.fontColor))&&void 0!==X?X:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==K?K:r.getStyle("object.straightTableV2.total","label.value","color"))&&void 0!==Y?Y:n.totals.color)&&void 0!==G?G:_L.TEXT,background:qj(r,Ce,"object.straightTableV2.total.label.value.backgroundColor",_e)},nullValues:{fontStyle:Oj(null==Ee?void 0:Ee.fontStyle),fontWeight:Nj(null==Ee?void 0:Ee.fontStyle,"normal"),textDecoration:jj(null==Ee?void 0:Ee.fontStyle),color:null!==(J=null!==(Q=null!==(Z=null!==(ee=Lj(r,null==Ee?void 0:Ee.fontColor))&&void 0!==ee?ee:Lj(r,null==Re?void 0:Re.fontColor))&&void 0!==Z?Z:r.getStyle("object.straightTableV2.null","label.value","color"))&&void 0!==Q?Q:n.body.color)&&void 0!==J?J:_L.TEXT,background:null!==(te=null!==(ne=Lj(r,null==Ee?void 0:Ee.background))&&void 0!==ne?ne:r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor"))&&void 0!==te?te:_L.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:null!=Ae?Ae:zj(null===(re=t.multiline)||void 0===re?void 0:re.wrapTextInCells),headerLineClamp:zj(null===(oe=t.multiline)||void 0===oe?void 0:oe.wrapTextInHeaders),border:null!==(ie=null!==(ae=Lj(r,null==ke?void 0:ke.border))&&void 0!==ae?ae:r.getStyle("object.straightTableV2","grid","borderColor"))&&void 0!==ie?ie:r.background.isDark?_L.DARK_MODE_BORDER:_L.BORDER_MEDIUM,divider:null!==(se=null!==(le=Lj(r,null==ke?void 0:ke.divider))&&void 0!==le?le:r.getStyle("object.straightTableV2.grid","","divider.borderColor"))&&void 0!==se?se:_L.BORDER_HEAVY,hoverColors:{color:null!==(ue=null!==(ce=Lj(r,null==Re?void 0:Re.hoverFontColor))&&void 0!==ce?ce:r.getStyle("object.straightTableV2","","grid.hover.color"))&&void 0!==ue?ue:null===(de=n.body.hoverColors)||void 0===de?void 0:de.color,background:null!==(pe=null!==(fe=Lj(r,null==Re?void 0:Re.hoverColor))&&void 0!==fe?fe:r.getStyle("object.straightTableV2","","grid.hover.backgroundColor"))&&void 0!==pe?pe:null===(he=n.body.hoverColors)||void 0===he?void 0:he.background},zebraStripes:{show:!(null==ke||null===(me=ke.zebraStripes)||void 0===me||!me.show),odd:{color:Lj(r,null==ke||null===(ge=ke.zebraStripes)||void 0===ge||null===(ge=ge.color)||void 0===ge?void 0:ge.odd),background:Lj(r,null==ke||null===(ye=ke.zebraStripes)||void 0===ye||null===(ye=ye.background)||void 0===ye?void 0:ye.odd)},even:{color:Lj(r,null==ke||null===(be=ke.zebraStripes)||void 0===be||null===(be=be.color)||void 0===be?void 0:be.even),background:Lj(r,null==ke||null===(ve=ke.zebraStripes)||void 0===ve||null===(ve=ve.background)||void 0===ve?void 0:ve.even)},overrideNullValueBackground:void 0===Lj(r,null==Ee?void 0:Ee.background),overrideNullValueColor:void 0===Lj(r,null==Ee?void 0:Ee.fontColor)},lastRowBottomBorder:n.body.lastRowBottomBorder},selectedColors:AL(r),headerMinRowHeight:0,totalRowLineHeight:0,totalRowMinHeight:0,contentLineHeight:0,contentMinRowHeight:0,contentStaticLineCount:Ae},{headerMinRowHeight:Pe,totalRowLineHeight:Le,totalRowMinHeight:Ie,contentLineHeight:qe,contentMinRowHeight:Te}=(e=>{const t=Math.max(Fj(e.header.fontSize)+8,32),n=Fj(e.totalRow.fontSize),r=Math.max(n+8+1,24),o=Math.max(Fj(e.dimension.values.fontSize),Fj(e.measure.values.fontSize)),i=(e.contentStaticLineCount||1)*o;return{headerMinRowHeight:t,totalRowLineHeight:n,totalRowMinHeight:r,contentLineHeight:o,contentMinRowHeight:Math.max(i+8+1,24)}})(De);return De.headerMinRowHeight=Pe,De.totalRowLineHeight=Le,De.totalRowMinHeight=Ie,De.contentLineHeight=qe,De.contentMinRowHeight=Te,De},Bj=(e,t,n,r)=>{const o=Ka.useMemo((()=>{const o=n.totalsPosition.atTop,i=function(e,t,n,r){var o;const i=null===(o=_j(e))||void 0===o?void 0:o.content,a=Mj("content",t,i);a.background=t.background.color;const s=Rj(a.fontSize,n,r),l=null==i?void 0:i.hoverColor,u=null==i?void 0:i.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),d=t.getStyle("object","","straightTableV2.content.hover.color"),p=Cj(u)||!!d,f=Cj(l)||!!c,h=p||f;let m;m=Cj(l)?Ej(_L.HOVER,t,l):c||(p?"":_L.HOVER);const g=h?Ej(ML(m),t,u):"";return{...a,lastRowBottomBorder:s,hoverColors:{background:m,color:g}}}(e,t,n.rows.length,r),a=Aj(e,t,!o),s=function(e,t,n){var r;const o=null===(r=_j(e))||void 0===r?void 0:r.content,i=Mj("content",t,o),{borderBottomColor:a,borderTopColor:s,background:l}=Aj(e,t,n);return{...i,borderBottomColor:a,background:l,borderTopColor:s}}(e,t,o);return{body:i,head:a,totals:s}}),[e,t,n,r]);return o},$j=new Map;const Vj=Ka.createContext({}),Wj=function(e){const t=Ka.createContext([()=>{},new Set]);return $j.set(e,t),({children:n,value:r})=>{const o=Ka.useRef(r),i=Ka.useRef(new Set);Ka.useEffect((()=>{o.current=r,i.current.forEach((e=>{e(r)}))}),[r]);const a=Ka.useCallback((()=>o.current),[o]),s=Ka.useMemo((()=>[a,i.current]),[a]);return Rl.jsx(e.Provider,{value:r,children:Rl.jsx(t.Provider,{value:s,children:n})})}}(Vj),Uj={rows:[],columns:[],totalsPosition:{}},Gj=({app:e,children:t,tableData:n=Uj,selectionsAPI:r,cellCoordMock:o,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,setPage:m,pageInfo:g,initialDataPages:y,rect:b,viewService:v,downloadService:x,env:S,direction:w})=>{const[C,E]=Ka.useState(0),[k,R]=Ka.useState(o||WO),[_,M]=((e,t)=>{const[n,r]=Ka.useReducer(Sj,{pageRows:e,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1});return[n,r]})(n.rows,r),[A,D]=Ka.useState(-1),P=Bj(i,u,n,d),L=((e,t,n,r,o)=>Ka.useMemo((()=>Hj(0,t,n,r,o)),[t,n,e,r,o]))(S,i,P,u,v),[I,q,T,O]=((e,t,n,r)=>{const o=t.atBottom||t.atTop,i=VL({...r.header,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,a=VL({...r.totalRow,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,{estimateWidth:s}=VL(r.dimension.values,{maxNbrLinesOfText:3}),{estimateWidth:l}=VL(r.measure.values,{maxNbrLinesOfText:3}),u=Ka.useMemo((()=>(e,t,n,r,u,c)=>{let d=25;d+=28,r&&(d+=24),u&&(d+=20);const p=c?s:l;return Math.max(i(e)+d,o?a(t)+24+1:0,p(n))}),[s,l,i,a,o]),[c,d]=Ka.useState(0),[p,f]=Ka.useState((()=>cj(e,n,u)));YL((()=>{f(cj(e,n-c,u))}),[e,n,c,u]);const h=Ka.useMemo((()=>((e,t,n)=>e.length>0&&e.reduce(((e,t)=>e+t))+t<n)(p,c,n)),[p,c,n]);return[p,f,d,h]})(n.columns,n.totalsPosition,b.width,L),N=Ka.useMemo((()=>({app:e,selectionsAPI:r,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,rect:b,viewService:v,styleService:L,direction:w,downloadService:x})),[e,r,i,a,s,l,u,c.active,d,p,f,h,b,v,L,w,x]);return Rl.jsx(Wj,{value:{headRowHeight:C,setHeadRowHeight:E,focusedCellCoord:k,setFocusedCellCoord:R,selectionState:_,selectionDispatch:M,hoverIndex:A,setHoverIndex:D,columnWidths:I,setColumnWidths:q,baseProps:N,tableData:n,setYScrollbarWidth:T,setPage:m,pageInfo:g,initialDataPages:y,showRightBorder:O,env:S},children:t})};function Yj(e,t){const n=function(e){return $j.get(e)}(e),[r,o]=Ka.useContext(n),[,i]=Ka.useReducer((e=>e+1),0),a=Ka.useRef(t),s=Ka.useRef(),l=r();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const u=Ka.useMemo((()=>t(l)),[l,t]);return Ka.useEffect((()=>{a.current=t,s.current=u}),[l,u,t]),Ka.useEffect((()=>{const e=e=>{a.current(e)!==s.current&&i()};return o.add(e),()=>{o.delete(e)}}),[o]),u}function Kj(e){var t;const n=tj();return null!==(t=n.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),Km({...n,direction:e})}const Xj={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Jj={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Qj=Pg("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Xj},"&::-moz-range-track":{...Xj},"&::-ms-track":{...Xj},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Jj},"&::-moz-range-thumb":{...Jj},"&::-ms-thumb":{...Jj},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),Zj=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u,accessibilityRelatedArgs:c,direction:d="ltr"})=>{const p=XL({translator:c.translator}),f=Ka.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!u,g=()=>m?f.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},b=t=>{f.current={initWidth:e,columnWidth:e,initX:null!=t?t:f.current.initX}};YL((()=>{m&&b()}),[e]);const v=e=>{const t=Math.max(e,iI.PixelsMin);f.current.columnWidth=t,i(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:aI.Pixels,pixels:f.current.columnWidth};a(e)}else null==l||l(!1)},S=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;v(t)},w=e=>{TL(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),x()},C=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;v(t)},E=e=>{TL(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),x()},k=!r&&s?e=>{if(e.key===rI.Left||e.key===rI.Right){TL(e);const t=5,n=e.key===rI.Left?t:-t,r="rtl"===d?n:-n;v(f.current.columnWidth+r)}else e.key===rI.Space||e.key===rI.Enter?(TL(e),s(e),x()):e.key===rI.Esc&&(TL(e),s(e),v(f.current.initWidth))}:void 0,R=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return Xa.createElement(Qj,{style:y,key:t,hoverColor:o,isLastColumn:n,className:oI,"data-testid":oI,onMouseDown:e=>{TL(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),null==l||l(!0),b(e.clientX)},onDoubleClick:()=>{a({type:aI.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(TL(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),null==l||l(!0),b(e.touches[0].clientX))},onKeyDown:k,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,max:iI.PixelsMax,"aria-label":R,"aria-valuemin":iI.PixelsMin,"aria-valuemax":iI.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d})},eH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}),tH=Ka.forwardRef(eH);function nH(){return nH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nH.apply(null,arguments)}const rH=Pg(xA,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),oH=Pg(tH,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),iH=Pg(tP)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),aH=Pg(QA)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),sH=Pg(aP)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),lH=Pg(aP,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),uH=Pg("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),cH=Pg("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),dH=Pg(OM)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),pH=Pg(MD,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0}))),fH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),hH=Ka.forwardRef(fH),mH=e=>{const t=e.nextElementSibling;var n;return t?"HR"===t.tagName?mH(t):t:null===(n=e.parentElement)||void 0===n||null===(n=n.children)||void 0===n?void 0:n[0]},gH=e=>{const t=e.previousElementSibling;if(!t){var n,r;const t=null===(n=e.parentElement)||void 0===n||null===(n=n.children)||void 0===n?void 0:n.length;return null===(r=e.parentElement)||void 0===r||null===(r=r.children)||void 0===r?void 0:r[t-1]}return"HR"===t.tagName?gH(t):t},yH=e=>{var t;const{key:n,currentTarget:r}=e,o=null!==(t=document.activeElement)&&void 0!==t?t:r;if(n===rI.Down||n===rI.Up){const t=e=>n===rI.Down?mH(e):gH(e);e.preventDefault(),e.stopPropagation();let r=t(o);for(;r;){if("true"!==r.ariaDisabled){r.focus();break}r=t(r)}}},bH=(e,t)=>e.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach((([,e])=>{e(!1)})),await e(n)}}:{}})))})))));let vH={};const xH=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,direction:u,isPagination:c})=>{const[d,p]=Ka.useState(!1),f=Ka.useRef(null),h=Ka.useCallback((e=>{e.stopPropagation(),p(!1)}),[p]);return Xa.createElement(Xa.Fragment,null,Xa.createElement(lH,{ref:a?f:null,key:t,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),vH={}),null!=a&&a.length&&(p(!0),vH[r]=p))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:yH},l?Xa.createElement(uH,{direction:u,isPagination:c}):null,Xa.createElement(cH,null,Xa.createElement(pH,{direction:u,isPagination:c},Xa.createElement(o,null)),Xa.createElement(dH,{variant:"body2"},r)),null!=a&&a.length?Xa.createElement(hH,null):null),null!=a&&a.length?Xa.createElement(CH,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:bH(a,vH),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:c}):null)},SH=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Xa.createElement(sH,{key:e.groupHeading,disabled:!0,style:{opacity:1}},e.groupHeading),e.items.map((e=>Xa.createElement(xH,nH({key:e.id},e,{isSubMenu:t,direction:n,isPagination:r}))))].filter(Boolean)])),wH={appear:0,enter:0,exit:0},CH=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?Xa.createElement(iH,nH({className:eI,open:t,anchorEl:e,onClose:n,transitionDuration:wH,MenuListProps:{id:tI}},i?{anchorOrigin:i}:{},o?{transformOrigin:o}:{},{dir:s}),(({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((o,i)=>[SH({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?Xa.createElement(aH,{"data-testid":"group-divider",variant:"middle"}):void 0])))({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})):null,EH=(e,t)=>e.some((e=>t[e]>0)),kH={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},RH=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=Ka.useState(null),[a,s]=Ka.useState(kH);return YL((()=>{e||(s(kH),i(null))}),[e]),Ka.useEffect((()=>{if(null==r||!r.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{var e,u,c;const d=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),p=await r.createSessionObject(d),f=await p.getLayout(),{qStateCounts:h}=null!==(e=null===(u=f.qListObject)||void 0===u?void 0:u.qDimensionInfo)&&void 0!==e?e:{};o=null===(c=f.qInfo)||void 0===c?void 0:c.qId,a?l():(i(p),h&&s((e=>({canSelectAll:EH(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:EH(["qSelected"],e),canSelectPossible:EH(["qOption"],e),canSelectAlternative:EH(["qAlternative"],e),canSelectExcluded:EH(["qAlternative","qExcluded"],e)}))(h)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},_H=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}),MH=Ka.forwardRef(_H),AH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})}),DH=Ka.forwardRef(AH),PH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})}),LH=Ka.forwardRef(PH),IH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}),qH=Ka.forwardRef(IH),TH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.454.858v6.484a1 1 0 0 1-.576.906L8.5 14.663V7.17z"})}),OH=Ka.forwardRef(TH),NH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}),zH=Ka.forwardRef(NH),FH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}),jH=Ka.forwardRef(FH),HH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})}),BH=Ka.forwardRef(HH),$H=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}),VH=Ka.forwardRef($H),WH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})}),UH=Ka.forwardRef(WH),GH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),YH=Ka.forwardRef(GH),KH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),XH=Ka.forwardRef(KH),JH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),QH=Ka.forwardRef(JH),ZH=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}),eB=Ka.forwardRef(ZH);let tB=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const nB="/qListObjectDef",rB=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[tB.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e,"A")),r(!1)},icon:MH,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e,"D")),r(!1)},icon:qH,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:BH,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:OH,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&null!=i&&i.select){const e=[];n[tB.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:VH,enabled:!0}]}]),n[tB.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:eB,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAll(nB))},icon:UH,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectPossible(nB))},icon:QH,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAlternative(nB))},icon:YH,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectExcluded(nB))},icon:XH,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.clearSelections(nB))},icon:DH,enabled:l.canClearSelections}]}]]}]}]),p&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:jH,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:zH,enabled:!0}]}]),e.length>0&&f.push(...e)}return n[tB.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),null==c||c(u)},icon:LH,enabled:!0}]}]),f},oB=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:u,selectionRelatedArgs:c,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m})=>{var g;const y=XL({translator:o}),{qLibraryId:b,fieldId:v,headTextAlign:x}=r,S=null==c?void 0:c.app,{fieldInstance:w,selectionActionsEnabledStatus:C}=RH({open:e,headerData:r,app:S,qStateName:null==c?void 0:c.qStateName});let E=null;if(f&&"setActiveField"in f&&void 0!==r.dimensionInfoIndex){const e=r.dimensionInfoIndex;E=async t=>{try{await f.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const k=Ka.useCallback((()=>{const e=b?{qLibraryId:b,type:"dimension"}:v;if(null!=u&&u.embed){const{embed:t,listboxRef:n}=u;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===h?"right":"left"},sortCriteria:u.sortCriteria,stateName:null==c?void 0:c.qStateName,direction:h})}}),[b,v,u,null==c?void 0:c.qStateName,h]),R=Ka.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]);return i.active?Xa.createElement(rH,{rightAligned:"right"===x,shouldShowMenuIcon:s,className:ZL},s?Xa.createElement(oH,{height:JL,className:QL,"data-testid":QL,isInteractionsActive:null!==(g=i.active)&&void 0!==g&&g},Xa.createElement(tH,null)):null,Xa.createElement(CH,{open:e,anchorEl:n.current,onClose:R,menuGroups:rB({headerData:r,translator:y,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:k,interactions:i,fieldInstance:w,selectionActionsEnabledStatus:C,anchorRef:n,focusColumnAdjuster:null==d?void 0:d.focusColumnAdjuster,setActiveFieldCallback:E,expandOrCollapseArgs:p}),direction:h,isPagination:m})):null},iB=e=>e.isDark?{background:e.color,borderColor:_L.DARK_MODE_BORDER,color:_L.DARK_MODE_TEXT,disabledColor:_L.DARK_MODE_DISABLED,iconColor:_L.DARK_MODE_TEXT}:{background:e.color,borderColor:_L.BORDER_MEDIUM,color:_L.TEXT,disabledColor:_L.DISABLED},aB=Pg(xA,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),sB=Pg(jP,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),lB=Pg(DA,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),uB=Pg(OM)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),cB=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=Ka.useMemo((()=>iB(r.background)),[r]);if(!n.active)return null;const a=o?Xa.createElement(aB,{footerStyle:i},e):null;return t?U_.createPortal(e,t):a},dB={},pB=Ka.createContext(dB),fB=()=>Ka.useContext(pB),hB=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m})=>{const g=(e=>!e.enabled||e.active)(c)?0:-1,y=Ka.useMemo((()=>iB(p.background)),[p]),b=o?o.getBoundingClientRect().width:h.width,v=XL({translator:d}),x=Ka.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:v,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:g,width:b})),[t,n,r,o,i,a,s,l,u,c,v,p,f,h,m,y,g,b]);return Xa.createElement(pB.Provider,{value:x},e)};let mB=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),gB=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const yB=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}),bB=Ka.forwardRef(yB),vB=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}),xB=Ka.forwardRef(vB),SB=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}),wB=Ka.forwardRef(SB),CB={FirstPage:xB,PreviousPage:bB,NextPage:hH,LastPage:wB,FirstPageRTL:wB,PreviousPageRTL:hH,NextPageRTL:bB,LastPageRTL:xB},EB=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:o,handleChangePage:i,translator:a,interactions:s,tabIndex:l}=fB(),u=n.concat("rtl"===r?"RTL":""),c=CB[u];return{styledProps:{footerStyle:o,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{i(t)}},IconComponent:c}},kB=()=>{const{pageInfo:e,width:t}=fB(),n=0===e.page,{IconComponent:r,styledProps:o}=EB({type:mB.FirstPage,disabledCondition:n,pageNumber:0});return t<=gB.FirstPage?null:Xa.createElement(lB,o,Xa.createElement(r,{height:JL}))},RB=(e,t,n=!1)=>{n&&e.key===rI.Tab&&!e.shiftKey&&(TL(e),qL(e.target,t,!1))},_B=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=fB(),i=e.page>=n-1,{IconComponent:a,styledProps:s}=EB({type:mB.LastPage,disabledCondition:i,pageNumber:n-1}),l=t.enabled?e=>{RB(e,t,r)}:void 0;return o<=gB.LastPage?null:Xa.createElement(lB,nH({},s,{onKeyDown:l}),Xa.createElement(a,{height:JL}))},MB=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=fB(),i=e.page>=n-1,{IconComponent:a,styledProps:s}=EB({type:mB.NextPage,disabledCondition:i,pageNumber:e.page+1}),l=!(o>gB.FirstPage&&o>gB.LastPage)&&t.enabled?e=>{RB(e,t,r)}:void 0;return Xa.createElement(lB,nH({},s,{onKeyDown:l}),Xa.createElement(a,{height:JL}))},AB=()=>{const{pageInfo:e}=fB(),t=0===e.page,{IconComponent:n,styledProps:r}=EB({type:mB.PreviousPage,disabledCondition:t,pageNumber:e.page-1});return Xa.createElement(lB,r,Xa.createElement(n,{height:JL}))},DB=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r}=fB(),{page:o,rowsPerPage:i}=n;if(t<=gB.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,r)}`,r.toString()]);return Xa.createElement(uB,{variant:"caption",dir:"ltr"},a)},PB=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s}=fB(),l=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),c=`${e}-dropdown`,d=`${c}-label-${l}`,p={tabIndex:s,id:`${c}-${l}`,"data-testid":c,"aria-labelledby":d};return Xa.createElement(Xa.Fragment,null,Xa.createElement(uB,{variant:"caption",id:d},u,":"),Xa.createElement(sB,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:p},n))},LB=()=>{var e;const{pageInfo:t,isSelectionMode:n,totalColumnCount:r,width:o,handleChangeRowsPerPage:i}=fB();if(!(!(null===(e=t.rowsPerPageOptions)||void 0===e||!e.length)&&!n&&o>gB.RowsPerPage&&r<=100)||void 0===t.rowsPerPageOptions)return null;const a=Xa.createElement(Xa.Fragment,null,t.rowsPerPageOptions.map((e=>Xa.createElement("option",{key:e,value:e},e))));return Xa.createElement(PB,{name:"RowsPerPage",value:t.rowsPerPage,options:a,handleChange:e=>{null==i||i(+e.target.value)}})},IB=1e3,qB="…",TB=({totalPages:e,page:t})=>{const n=Math.min(e,IB),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-IB):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+i;return Xa.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(Xa.createElement("option",{key:"startMoreOptions",value:qB,disabled:!0},qB)),o<e-1&&a.push(Xa.createElement("option",{key:"endMoreOptions",value:qB,disabled:!0},qB)),Xa.createElement(Xa.Fragment,null,a)},OB=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r}=fB(),{page:o}=e;if(t<=gB.SelectPage)return null;const i=Xa.createElement(TB,{totalPages:n,page:o});return Xa.createElement(PB,{name:"SelectPage",value:o,options:i,handleChange:e=>{r(+e.target.value)}})},NB=e=>Xa.createElement(hB,e,Xa.createElement(LB,null),Xa.createElement(OB,null),Xa.createElement(DB,null),Xa.createElement(kB,null),Xa.createElement(AB,null),Xa.createElement(MB,null),Xa.createElement(_B,null));var zB=Ka.memo(NB);const FB=e=>Xa.createElement(cB,e,Xa.createElement(zB,e)),jB={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},HB=Pg(xA,{shouldForwardProp:e=>"background"!==e})((({background:e})=>({height:"100%",background:e.color}))),BB=Pg("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e})((({lineClamp:e,isHeadCell:t=!1,isPagination:n=!1,isNumeric:r=!1})=>r||1===e&&!t?{...jB,whiteSpace:"nowrap",display:n?"block":void 0}:{...jB,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}));function $B(e,t){const n=Ka.useRef(!1);Ka.useEffect((()=>{n.current?e():n.current=!0}),t)}const VB=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),WB=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:o})=>(e<r?e++:t<o&&(t++,e=n),[t,e]),UB=e=>e.atTop?2:1,GB=(e,t)=>{var n;return null===(n=e.getElementsByClassName("sn-table-row")[t[0]])||void 0===n?void 0:n.getElementsByClassName("sn-table-cell")[t[1]]},YB=e=>null==e?void 0:e.setAttribute("tabIndex","0"),KB=e=>null==e?void 0:e.setAttribute("tabIndex","-1"),XB=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(KB)},JB=e=>{null==e||e.focus(),YB(e)},QB=e=>{setTimeout((()=>{var t;const n=null===(t=e.current)||void 0===t||null===(t=t.closest(".sn-table-cell"))||void 0===t?void 0:t.querySelector(`.${oI}`);JB(n)}),0)},ZB=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:o,direction:i})=>{XB(t);const a=((e,t,n,r,o={top:0,bottom:0})=>{const i=o.top>0,a=o.top,s=t.getElementsByClassName("sn-table-row").length-1-o.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[u,c]=n;switch(e.key){case rI.Down:u<s&&u++;break;case rI.Up:u>a&&u--;break;case rI.Right:if(i)break;[u,c]="rtl"===r?VB({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0}):WB({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case rI.Left:if(i)break;[u,c]="rtl"===r?WB({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):VB({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0});break;case rI.Home:(fj(e)||i)&&(u=a),i||(c=0);break;case rI.End:(fj(e)||i)&&(u=s),i||(c=l);break;case rI.PageDown:u=Math.min(s,u+10);break;case rI.PageUp:u=Math.max(a,u-10)}return[u,c]})(e,t,n,i,o),s=GB(t,a);return JB(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(null==n||!n.scrollTo)return;const[r,o]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],i=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[o];if(!i||!e)return;if(i.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-i.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},e$=(e,t,n,r)=>{var o;(XB(t),n(e),r.enabled&&!r.active)?null===(o=r.focus)||void 0===o||o.call(r):JB(GB(t,e))},t$=(e,t,n)=>{const r=e.currentTarget,o=e.relatedTarget,i=!(null==r||!r.contains(o)),a=null==o?void 0:o.closest(`.${eI}`);var s;!n.enabled||i||a||t.current||!r||((e=>{const t=e.querySelector(`.${bO.First}`),n=e.querySelector(`.${bO.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),null===(s=n.blur)||void 0===s||s.call(n,!1))},n$=()=>{const{downloadService:e}=Yj(Vj,(e=>e.baseProps));Ka.useEffect((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))},r$=(e,t,n)=>{const{rootElement:r,keyboard:o}=Yj(Vj,(e=>e.baseProps)),{totalColumnCount:i,totalRowCount:a,rows:s,totalsPosition:l}=Yj(Vj,(e=>e.tableData)),u=Yj(Vj,(e=>e.focusedCellCoord)),c=Yj(Vj,(e=>e.setFocusedCellCoord)),d=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()}));$B((()=>{const n=((e,t,n=!1)=>{const r=[UB(t),e[1]];return n?r:WO})(u,l,d);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:o,keyboard:i,announce:a})=>{if(XB(t),o(e),!(e=>!e.enabled||e.active)(i))return;const s=GB(t,e);var l;n.current?(JB(s),n.current=!1):YB(s),r&&(a({keys:[null!==(l=null==s?void 0:s.textContent)&&void 0!==l?l:""]}),pj(a,s,r))})({resetCellCoord:n,rootElement:r,shouldRefocus:e,setFocusedCellCoord:c,isSelectionMode:d,keyboard:o,announce:t})}),[s.length,a,i,n])},o$=(e,t,n)=>{Ka.useEffect((()=>{const r=e.current;if(!r)return;const o=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth;let{scrollLeft:o}=n,i=o+e.deltaX;t&&(i=r+i),r>0&&(i<0||i>r+1)&&(e.preventDefault(),o=t?Math.min(0,Math.min(r,i)):Math.max(0,Math.min(r,i)))})(e,"rtl"===t,r)},i=e=>{var t;n.scrollLeft=(null===(t=e.currentTarget)||void 0===t?void 0:t.scrollLeft)||0};return r.addEventListener("wheel",o),r.addEventListener("scroll",i),()=>{r.removeEventListener("wheel",o),r.removeEventListener("scroll",i)}}),[e,t,n])},i$=e=>{TL(e),fj(e)&&pI(e.currentTarget)},a$=e=>{yj(e.evt)&&(TL(e.evt),ZB(e))},s$=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:o}=e;if(!yj(t))return;TL(t);const i=((e,t)=>[e.pageRowIdx+UB(t),e.pageColIdx])(r,n),a=((e,t)=>({top:e?UB(t):0,bottom:e&&t.atBottom?1:0}))(o,n),{nextCell:s,nextCellCoord:l}=ZB({...e,cellCoord:i,allowedRows:a});l[0]!==i[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:o,isSelectionMode:i,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:gO.SelectMultiAdd,payload:{cell:n,evt:e,announce:o}}):pj(o,a,i)})({...e,nextCell:s})},l$=e=>{const{evt:t}=e;hj(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:o,handleChangePage:i})=>{TL(e);const a=Math.ceil(t/n)-1;e.key===rI.Right&&r<a?(o(),i(r+1)):e.key===rI.Left&&r>0&&(o(),i(r-1))})(e):t.key===rI.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{var r;t.enabled&&!n&&(TL(e),null===(r=t.blur)||void 0===r||r.call(t,!0))})(e):mj(t.key)&&TL(t)},u$=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(mO.Disabled))return void TL(t);const r={...e,isSelectionMode:!(null==n||!n.isModal())};switch(t.key){case rI.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:o})=>{TL(e),t.isSelectable&&n&&r({type:gO.Select,payload:{cell:t,evt:e,announce:o}})})(r);break;case rI.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{TL(n),e&&(null==t||t.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case rI.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(TL(n),null==t||t.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case rI.C:i$(t);break;case rI.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const o=e.shiftKey||!r;t.enabled&&n&&o&&(TL(e),qL(e.currentTarget,t,e.shiftKey))})(r);break;default:s$(r)}},c$=e=>{const{layout:t,rect:n,theme:r}=Yj(Vj,(e=>e.baseProps)),[o,i]=Ka.useState(0),[a,s]=Ka.useState(0);return Ka.useLayoutEffect((()=>{if(e.current){const{offsetWidth:t=0,offsetHeight:n=0,clientWidth:r=0,clientHeight:o=0}=e.current,a=n-o;s(t-r),i(a)}}),[e,t,n,r]),{xScrollbarWidth:o,yScrollbarWidth:a}},d$=Pg("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),p$=Pg(lL,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"}))),f$=Pg(UP,{shouldForwardProp:e=>"borderRight"!==e})((({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e}))),h$=()=>Rl.jsxs(Rl.Fragment,{children:[Rl.jsx(d$,{className:bO.First,"data-testid":bO.First,"aria-live":"polite","aria-atomic":"true"}),Rl.jsx(d$,{className:bO.Second,"data-testid":bO.Second,"aria-live":"polite","aria-atomic":"true"})]}),m$=e=>{const t=Ka.useRef(new Map),n=Ka.useRef(null);Ka.useEffect((()=>{n.current=e(t.current),t.current.forEach(((e,t)=>{var r;null===(r=n.current)||void 0===r||r.observe(t)}));const r=t.current,o=n.current;return()=>{o.disconnect(),r.clear()}}),[e,n,t]);const r=Ka.useCallback(((e,r)=>{var o;t.current.set(e,r),null===(o=n.current)||void 0===o||o.observe(e)}),[t,n]),o=Ka.useCallback((e=>{var r;t.current.delete(e),null===(r=n.current)||void 0===r||r.unobserve(e)}),[n,t]);return Ka.useMemo((()=>({addTask:r,removeTask:o})),[r,o])},g$=e=>new ResizeObserver((t=>{t.forEach((t=>{const n=e.get(t.target);null==n||n(t)}))})),y$=()=>m$(g$),b$=({selectionsAPI:e,selectionDispatch:t,updateShouldRefocus:n,keyboard:r,tableWrapperRef:o})=>{Ka.useEffect((()=>{const i=()=>{t({type:gO.Reset})},a=()=>{t({type:gO.Clear})},s=()=>{var e;if(null!==(e=o.current)&&void 0!==e&&e.contains(document.activeElement))n();else if(r.enabled){var t;null===(t=r.blur)||void 0===t||t.call(r,!0)}i()};return null==e||e.on("deactivated",i),null==e||e.on("canceled",i),null==e||e.on("confirmed",s),null==e||e.on("cleared",a),()=>{null==e||e.removeListener("deactivated",i),null==e||e.removeListener("canceled",i),null==e||e.removeListener("confirmed",s),null==e||e.removeListener("cleared",a)}}),[e,r,t,n,o])},v$=e=>{e.stopPropagation()},x$=({href:e,text:t,interactions:n,color:r})=>Xa.createElement(bD,(({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:v$,style:{pointerEvents:n.active?"auto":"none",color:null!=r?r:void 0,opacity:n.active&&n.passive||r?void 0:.4}}))({href:e,text:t,interactions:n,color:r}),t);var S$,w$;const C$=null!==(S$=window.requestIdleCallback)&&void 0!==S$?S$:e=>setTimeout((()=>{e({})}),0),E$=null!==(w$=window.cancelIdleCallback)&&void 0!==w$?w$:e=>{clearTimeout(e)},k$="qDimensionInfo/0",R$="qMeasureInfo/0",_$="x",M$="y";function A$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D$(Object(n),!0).forEach((function(t){A$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L$=Object.prototype.hasOwnProperty,I$=Object.prototype.toString,q$=Object.defineProperty,T$=Object.getOwnPropertyDescriptor,O$=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===I$.call(e)},N$=function(e){if(!e||"[object Object]"!==I$.call(e))return!1;var t,n=L$.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&L$.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||L$.call(e,t)},z$=function(e,t){q$&&"__proto__"===t.name?q$(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},F$=function(e,t){if("__proto__"===t){if(!L$.call(e,t))return;if(T$)return T$(e,t).value}return e[t]},j$=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=F$(s,n),s!==(o=F$(t,n))&&(c&&o&&(N$(o)||(i=O$(o)))?(i?(i=!1,a=r&&O$(r)?r:[]):a=r&&N$(r)?r:{},z$(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&z$(s,{name:n,newValue:o}));return s};function H$(e,t,n,r){if(!e)return-1;const o=n.cache,i=e.origin?e.origin():null;i&&(e=i);let a=o.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<o.wrappedFields.length;t++)if(l=o.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=o.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function B$(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function $$(e){let{cache:t,f:n,mainCell:r,p:o,page:i,rowIdx:a,row:s,sourceKey:l,target:u,targetProp:c,columnOrder:d}=e,p=r;if(o.field&&o.field!==n){const e=H$(o.field,i,{cache:t},d);if(-1===e)return;p=j$({qRow:a},e(s))}u[c]=B$(o,p,{key:l})}function V$(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let e=0;e<o.length;e++)if(void 0!==o[e].field){const a=t.raw(),s=t.key(),l="object"==typeof o[e].field?o[e].field:t.field(o[e].field),{props:u,main:c}=r.normalizeConfig(o[e],t),d=Object.keys(u),p=!!o[e].trackBy,f=typeof o[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const i=H$(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==i)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const b=a.qDataPages[t].qArea.qTop+y,v=j$({qRow:b},i(a.qDataPages[t].qMatrix[y])),x=B$(c,v,{key:s});if(!(c.filter&&!c.filter(v))){for(let e=0;e<d.length;e++){const r=u[d[e]];let o=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let i=0;i<o.length;i++)$$({cache:n,f:l,mainCell:v,p:o[i],prop:d[e],page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?i:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:o[e],itemData:v,obj:x,target:m,tracker:h,trackType:f}),g.push(x)}}}const y=p?r.collect(m,{main:c,propsArr:d,props:u}):g;i=[...i,...y]}return i}function W$(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function U$(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Y$)):void 0===t&&(t=G$);for(var n,r,o,i,a,s=new J$(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new J$(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(X$)}function G$(e){return e.children}function Y$(e){return Array.isArray(e)?e[1]:null}function K$(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function X$(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function J$(e){this.data=e,this.depth=this.height=0,this.parent=null}function Q$(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}J$.prototype=U$.prototype={constructor:J$,count:function(){return this.eachAfter(W$)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return U$(this).eachBefore(K$)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}};var Z$={depth:-1},eV={},tV={};function nV(e){return e.id}function rV(e){return e.parentId}function oV(){var e,t=nV,n=rV;function r(r){var o,i,a,s,l,u,c,d,p=Array.from(r),f=t,h=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;aV(e,t-1)&&!aV(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(iV),o=new Set(t).add("");for(const e of n)o.has(e)||(o.add(e),t.push(e),n.push(iV(e)),p.push(tV));f=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,o=p.length;a<o;++a)i=p[a],u=p[a]=new J$(i),null!=(c=f(i,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?eV:u)),null!=(c=h(i,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<o;++a)if(c=(u=p[a]).parent){if(!(l=m.get(c)))throw new Error("missing: "+c);if(l===eV)throw new Error("ambiguous: "+c);l.children?l.children.push(u):l.children=[u],u.parent=l}else{if(s)throw new Error("multiple roots");s=u}if(!s)throw new Error("no root");if(null!=e){for(;s.data===tV&&1===s.children.length;)s=s.children[0],--o;for(let e=p.length-1;e>=0&&(u=p[e]).data===tV;--e)u.data=null}if(s.parent=Z$,s.eachBefore((function(e){e.depth=e.parent.depth+1,--o})).eachBefore(X$),s.parent=null,o>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Q$(e),r):t},r.parentId=function(e){return arguments.length?(n=Q$(e),r):n},r.path=function(t){return arguments.length?(e=Q$(t),r):e},r}function iV(e){let t=e.length;if(t<2)return"";for(;--t>1&&!aV(e,t););return e.slice(0,t)}function aV(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function sV(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,o=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(o)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++){let n=sV(r,o[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(o)){const t=new Array(o.length);r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++)t[e]=sV(r,o[e]);return t}n[e]in o&&(o=o[n[e]])}return o}function lV(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let o=0;o<e.length;o++)e[o].children&&e[o].children.length&&(r=[...r,...lV(e[o].children,t-1,n)]);return r}function uV(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>lV(e.children,r-1,n)}return!1}const cV=/^qDimensionInfo(?:\/(\d+))?/,dV=/^\/?qMeasureInfo\/(\d+)/,pV=/\/qAttrExprInfo\/(\d+)/,fV=/\/qAttrDimInfo\/(\d+)/;function hV(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t));return t.filter((t=>t<e.qDimensionInfo.length))}function mV(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,f=hV(n);return cV.test(d)&&(o=!0,i=+cV.exec(d)[1],d=r.replace(cV,"")),dV.test(d)&&("K"===n.qMode?u=+dV.exec(d)[1]:p&&-1!==p.indexOf(-1)?(u=+dV.exec(d)[1],c=0):c=+dV.exec(d)[1],d=d.replace(dV,"")),d&&(fV.exec(d)?s=+fV.exec(d)[1]:pV.exec(d)&&(a=+pV.exec(d)[1])),l=o?"S"===n.qMode?f[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:s,attrIdx:a}}function gV(e,t){let n,r,o=uV(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function yV(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function bV(e){let{propsArr:t,props:n,item:r,itemData:o,ret:i,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let u,c;s.fields&&(u=[],c=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,f,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(f=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(h=g.map(p),p=null),f&&(y=g.map(f),f=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=o,y=o)),s.fields){const e=p?p(h):h;u.push(e),c.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const n=p?p(h):h;i[t[e]]={value:n,label:f?f(y):null!=y?y:String(n)},d.field&&(i[t[e]].source={field:d.field.key(),key:a})}}u&&(i[t[e]]={value:"function"==typeof s.value?s.value(u,r):u,label:"function"==typeof s.label?s.label(c,r):c})}}const vV=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=sV(r,e);return i&&i[0]?(t.tree=U$(i[0],n.children||(e=>e[o])),t.tree):null};const xV=e=>{let{propsArr:t,props:n,cube:r,cache:o,itemDepthObject:i,f:a}=e;for(let e=0;e<t.length;e++){const o=n[t[e]],s=o.fields?o.fields:[o];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=gV(i,mV(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function SV(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=t.raw(),i=t.key(),a="S"===o.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),o=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),i=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<o.length;e++){var s;const t=n[o[e]],i="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[i]||(a[i]=P$({__id:i,__parent:r,qValues:[]},t),l=!0),r=i}if(l)for(let e=0;e<i.length;e++){const t=n[i[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),u=oV().id((e=>e.__id)).parentId((e=>e.__parent))(l);return u}(t):vV(o,n,e);if(!a)return null;const s=a.height,l=[];for(let i=0;i<=s;i++){let a=null;if(i>0)if("S"===o.qMode){let e=hV(o)[i-1];a=n.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[i-1];i>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:u}=r.normalizeConfig(P$(P$({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(s);l[i]={propsArr:c,props:s,main:u};const d=a?mV(a,{cube:o}):{fieldDepth:0};xV({propsArr:c,props:s,cube:o,cache:n,itemDepthObject:d,f:a})}const u=a.copy().descendants(),c=a.descendants();for(let e=0;e<c.length;e++){const t=l[c[e].depth].propsArr,n=l[c[e].depth].props,r=l[c[e].depth].main,o=u[e],a=o.data,s=yV(r,a,{key:i});bV({propsArr:t,props:n,item:o,itemData:a,ret:s,sourceKey:i}),c[e].data=s}return a}function wV(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let a=0;a<o.length;a++)if(void 0!==o[a].field){const s=t.raw(),l=t.key();if(!vV(s,n,e))continue;const u="object"==typeof o[a].field?o[a].field:t.field(o[a].field),{props:c,main:d}=r.normalizeConfig(o[a],t),p=Object.keys(c),f=mV(u,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=gV({fieldDepth:0},f);xV({propsArr:p,props:c,cube:s,cache:n,itemDepthObject:f,f:u});const y=!!o[a].trackBy,b=typeof o[a].trackBy,v={},x=[],S=h(n.tree),w=[];for(let e=0;e<S.length;e++){const t=S[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const i=yV(d,n,{key:l});bV({propsArr:p,props:c,item:t,itemData:n,ret:i,sourceKey:l}),y&&r.track({cfg:o[a],itemData:n,obj:i,target:x,tracker:v,trackType:b}),w.push(i)}const C=y?r.collect(x,{main:d,propsArr:p,props:c}):w;i=[...i,...C]}return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var CV=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
141
141
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
142
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}}));function EV(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const kV={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},RV=/%\)?$/,_V=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,MV=/^\(oct\)/i,AV=/^\(dec\)/i,DV=/^\(hex\)/i,PV=/^\(bin\)/i,LV=/^\(rom\)/i,IV=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,qV=/#|0/g;function TV(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function OV(e,t,n){let r;return _V.test(t)?e=TV(e,Number(/\d{2}/.exec(t)[0]),t,n):MV.test(t)?e=TV(e,8,t,n):AV.test(t)?e=TV(e,10,t,n):DV.test(t)?e=TV(e,16,t,n):PV.test(t)?e=TV(e,2,t,n):LV.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function NV(e,t,n){const r=EV(e);return n?r:new RegExp(r||"",t)}function zV(e,t,n,r){let o,i,a,s,l,u,c,d,p,f=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=EV(m)),h&&(h=EV(h)),p=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=f.match(p),a=a?a[0]:"",s=a?f.substr(0,f.indexOf(a)):f,l=a?f.substring(f.indexOf(a)+a.length):"",a||(a=f?"#":"##########"),t&&t===n&&(o=a.split(n),i=o.pop(),a=o.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(NV(u,"g"),t)),c=n,n=".",c&&(a=a.replace(NV(c,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=f.split(c);let y;g[1]&&(y=g[1].match(qV)),e.prefix=s||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=RV.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(NV(t,null,!0),"|").concat(NV(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class FV{constructor(e,t,n,r,o){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return kV;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new FV(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],IV.test(e[0])&&(r.positive.isFunctional=!0),e[1]?IV.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?IV.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const o="U"===this.type;r.positive.isFunctional||zV(r.positive,t,n,o),r.negative&&!r.negative.isFunctional&&zV(r.negative,t,n,o),r.zero&&!r.zero.isFunctional&&zV(r.zero,t,n,o)}formatValue(e){let t,n,r,o,i,a,s,l,u,c=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,i=c.d,a=c.t,c.isFunctional)e=OV(e,c.pattern,i);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,o,i=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);i<=n&&s<t.length;)s++,i=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?o=r:(n<0&&r<0||!r)&&(i<0&&i-n<=c.maxPrecision?o=i:r<=n&&!(i>0&&-n<=c.maxPrecision)&&(o=r)),o&&(d=this.abbreviations[o],e/=10**o)}if(r=Math.abs(e),t=c.temp,l=c.numericPattern,u=l.split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=l.split(i)[0];if(n+=i,e=CV(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let o=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=o.length;s<n;s++)o+="0";o&&(e+=i+o)}else 0===t&&(o=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=CV(l,e)}e=e.replace(c.numericRegex,(e=>e===a?c.groupTemp:e===i?c.decTemp:"")),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+p+d+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function jV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:o=e=>e}=t;let i,a,s=Object.create(null),l=Object.create(null),u=0,c=0;return i=r?function(){return a=o(...arguments),i.has(a)?i.get(a):i.set(a,e(...arguments))}:t=>(a=o(t),i.has(a)?i.get(a):i.set(a,e(t))),i.set=(e,t)=>(u>=n&&(delete s[l[c]],delete l[c],u--,c++),s[e]=t,l[u]=e,u++,t),i.get=e=>s[e],i.has=e=>e in s,i.clear=()=>{s=Object.create(null),l=Object.create(null),u=0,c=0},i.size=()=>u,i}function HV(e,t,n,r,o){const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new FV(...t)}(o,e,t,n,r),a=jV(i.formatValue.bind(i),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}const BV="D",$V="T",VV="TS",WV="IV",UV=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],GV=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],YV=["January","February","March","April","May","June","July","August","September","October","November","December"],KV=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function XV(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function JV(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function QV(e,t){let n,r=function(e){const t=e,n=24*JV(t),r=60*JV(n),o=60*JV(r),i=1e3*JV(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:o,h:i,m:a,s:s,f:l,t:c}}class ZV{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:UV,qDayNames:GV,qLongMonthNames:YV,qMonthNames:KV}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[$V]:r.qTimeFmt||"hh:mm:ss",[BV]:r.qDateFmt||"YYYY-MM-DD",[VV]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new ZV(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=QV(e,t));const o=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:XV("".concat(t.year).slice(-2),2),YYY:XV("".concat(t.year).slice(-3),3),def:e=>XV("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:XV("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:XV("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>XV("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>XV("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>XV("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>XV("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),i=[];for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&i.push(e);const a=new RegExp(i.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in o[n])if(t===e||t.toLowerCase()===e){r=o[n][t],void 0===r&&(r=o[n][t.toLowerCase()]);break}return void 0===r&&(r=o[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function eW(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ZV(...t)}function tW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=eW(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=jV(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==WV?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function i(e){return e=o(e),r(e)}return i.format=function(e,t){return r.clear(),t=o(t),n.format(t,e)},i.locale=function(o){return n=eW(o,e,t),r=jV(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},i.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},i}function nW(){let e,{meta:t,id:n,key:r,localeInfo:o,fieldExtractor:i,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return tW(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##"),i="U"),HV(n,r,o,i,t)}(t,o),p="dimension"===s?"first":(e,t)=>d(t),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=i(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return f}function rW(e,t,n,r,o){return(t[e]||[]).map(((t,i)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:nW(j$({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=rW("qAttrDimInfo",t,n,a,j$({},o,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=rW("qAttrExprInfo",t,n,a,j$({},o,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=rW("qMeasureInfo",t,n,a,j$({},o,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function oW(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=t;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const i=oW.util,a={cache:r,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>o,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,i),hierarchy:e=>a.hierarchy(e,s,r,i),_cache:()=>r};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(a.extractor=wV,a.hierarchy=SV,a.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(a.extractor=V$,a.pages=o.qDataPages,a.hierarchy=SV):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,i);const l="S"===o.qMode?e=>e.qElemNumber:void 0,u="S"===o.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...rW("qDimensionInfo",o,e,"",j$({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...rW("qMeasureInfo",o,e,"",j$({},a,{value:u,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const c=e=>{e.forEach((e=>{r.allFields.push(e.instance),c(e.measures),c(e.attrDims),c(e.attrExps)}))};return c(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),o=nW(P$({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,i),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(o)})),r.allFields.push(...r.virtualFields),s}const iW=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],aW=/\/qDimensionInfo(?:\/(\d+))?/,sW=/\/qMeasureInfo\/(\d+)/,lW=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,uW=/\/qAttrExprInfo\/(\d+)/,cW=/\/?qHyperCube/,dW=/\/?qTreeData/,pW=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),fW=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function hW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,o=t.primarySource,i=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,o=-1,i="",a=e=>e;cW.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=pW):dW.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=fW);let s=!0;if(aW.test(e)&&(r=+aW.exec(e)[1]),sW.test(e)&&(o=+sW.exec(e)[1]),lW.test(e)){o=-1,r=0;const e=+lW.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(uW.test(e)){const e=o;if(t){o=0;const a=sV(i,t);o+=(a.qMeasureInfo||[]).length,r>-1?(o=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),o),r=-1):(o=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),o),o=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),o)),o+=+uW.exec(n)[1]}else r>-1?(r=-1,o=+uW.exec(n)[1]):o+=+uW.exec(n)[1]+1}return iW.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,i=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===i||s>=i)&&i>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-i})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,i.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var u;a.rangeSelectHyperCubeValues&&i.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]});return a.selectHyperCubeContinuousRange&&i.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&i.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&i.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&i.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),i}function mW(e){oW.util=e.data("matrix").util,e.data("q",oW),e.formatter("q-number",HV),e.formatter("q-time",tW)}mW.qBrushHelper=hW,mW.selections=hW;var gW=Object.prototype.hasOwnProperty,yW=Object.prototype.toString,bW=Object.defineProperty,vW=Object.getOwnPropertyDescriptor,xW=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===yW.call(e)},SW=function(e){if(!e||"[object Object]"!==yW.call(e))return!1;var t,n=gW.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&gW.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||gW.call(e,t)},wW=function(e,t){bW&&"__proto__"===t.name?bW(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},CW=function(e,t){if("__proto__"===t){if(!gW.call(e,t))return;if(vW)return vW(e,t).value}return e[t]},EW=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=CW(s,n),s!==(o=CW(t,n))&&(c&&o&&(SW(o)||(i=xW(o)))?(i?(i=!1,a=r&&xW(r)?r:[]):a=r&&SW(r)?r:{},wW(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&wW(s,{name:n,newValue:o}));return s},kW="2.8.2";function RW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_W(Object(n),!0).forEach((function(t){RW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AW(e){return!!e.changedTouches}function DW(e){return"number"==typeof e&&!isNaN(e)}function PW(e){return"number"!=typeof e||isNaN(e)}function LW(e){const t=e.length;let n=NaN,r=NaN,o=NaN,i=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),o=isNaN(o)?e[a].y:Math.min(o,e[a].y),i=isNaN(i)?e[a].y:Math.max(i,e[a].y);return[n,o,r,i]}function IW(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function qW(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function TW(e){const[t,n,r,o]=LW(e);return{x:t,y:n,width:r-t,height:o-n}}function OW(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function NW(e){const{x:t,y:n,width:r,height:o,x1:i,x2:a,y1:s,y2:l,cx:u,cy:c,r:d,vertices:p}=e||{};return DW(u)&&DW(c)&&DW(d)?"circle":DW(i)&&DW(a)&&DW(s)&&DW(l)?"line":DW(t)&&DW(n)&&DW(r)&&DW(o)?"rect":DW(t)&&DW(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function zW(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var FW=Math.PI,jW=2*FW,HW=1e-6,BW=jW-HW;function $W(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function VW(){return new $W}function WW(e){return function(){return e}}$W.prototype=VW.prototype={constructor:$W,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var i=this._x1,a=this._y1,s=n-e,l=r-t,u=i-e,c=a-t,d=u*u+c*c;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>HW)if(Math.abs(c*s-l*u)>HW&&o){var p=n-i,f=r-a,h=s*s+l*l,m=p*p+f*f,g=Math.sqrt(h),y=Math.sqrt(d),b=o*Math.tan((FW-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>HW&&(this._+="L"+(e+v*u)+","+(t+v*c)),this._+="A"+o+","+o+",0,0,"+ +(c*p>u*f)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,o,i){e=+e,t=+t,i=!!i;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,u=t+s,c=1^i,d=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>HW||Math.abs(this._y1-u)>HW)&&(this._+="L"+l+","+u),n&&(d<0&&(d=d%jW+jW),d>BW?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):d>HW&&(this._+="A"+n+","+n+",0,"+ +(d>=FW)+","+c+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var UW=Math.abs,GW=Math.atan2,YW=Math.cos,KW=Math.max,XW=Math.min,JW=Math.sin,QW=Math.sqrt,ZW=1e-12,eU=Math.PI,tU=eU/2,nU=2*eU;function rU(e){return e>=1?tU:e<=-1?-tU:Math.asin(e)}function oU(e){return e.innerRadius}function iU(e){return e.outerRadius}function aU(e){return e.startAngle}function sU(e){return e.endAngle}function lU(e){return e&&e.padAngle}function uU(e,t,n,r,o,i,a){var s=e-n,l=t-r,u=(a?i:-i)/QW(s*s+l*l),c=u*l,d=-u*s,p=e+c,f=t+d,h=n+c,m=r+d,g=(p+h)/2,y=(f+m)/2,b=h-p,v=m-f,x=b*b+v*v,S=o-i,w=p*m-h*f,C=(v<0?-1:1)*QW(KW(0,S*S*x-w*w)),E=(w*v-b*C)/x,k=(-w*b-v*C)/x,R=(w*v+b*C)/x,_=(-w*b+v*C)/x,M=E-g,A=k-y,D=R-g,P=_-y;return M*M+A*A>D*D+P*P&&(E=R,k=_),{cx:E,cy:k,x01:-c,y01:-d,x11:E*(o/S-1),y11:k*(o/S-1)}}function cU(){var e=oU,t=iU,n=WW(0),r=null,o=aU,i=sU,a=lU,s=null;function l(){var l,u,c=+e.apply(this,arguments),d=+t.apply(this,arguments),p=o.apply(this,arguments)-tU,f=i.apply(this,arguments)-tU,h=UW(f-p),m=f>p;if(s||(s=l=VW()),d<c&&(u=d,d=c,c=u),d>ZW)if(h>nU-ZW)s.moveTo(d*YW(p),d*JW(p)),s.arc(0,0,d,p,f,!m),c>ZW&&(s.moveTo(c*YW(f),c*JW(f)),s.arc(0,0,c,f,p,m));else{var g,y,b=p,v=f,x=p,S=f,w=h,C=h,E=a.apply(this,arguments)/2,k=E>ZW&&(r?+r.apply(this,arguments):QW(c*c+d*d)),R=XW(UW(d-c)/2,+n.apply(this,arguments)),_=R,M=R;if(k>ZW){var A=rU(k/c*JW(E)),D=rU(k/d*JW(E));(w-=2*A)>ZW?(x+=A*=m?1:-1,S-=A):(w=0,x=S=(p+f)/2),(C-=2*D)>ZW?(b+=D*=m?1:-1,v-=D):(C=0,b=v=(p+f)/2)}var P=d*YW(b),L=d*JW(b),I=c*YW(S),q=c*JW(S);if(R>ZW){var T,O=d*YW(v),N=d*JW(v),z=c*YW(x),F=c*JW(x);if(h<eU&&(T=function(e,t,n,r,o,i,a,s){var l=n-e,u=r-t,c=a-o,d=s-i,p=d*l-c*u;if(!(p*p<ZW))return[e+(p=(c*(t-i)-d*(e-o))/p)*l,t+p*u]}(P,L,z,F,O,N,I,q))){var j=P-T[0],H=L-T[1],B=O-T[0],$=N-T[1],V=1/JW(function(e){return e>1?0:e<-1?eU:Math.acos(e)}((j*B+H*$)/(QW(j*j+H*H)*QW(B*B+$*$)))/2),W=QW(T[0]*T[0]+T[1]*T[1]);_=XW(R,(c-W)/(V-1)),M=XW(R,(d-W)/(V+1))}}C>ZW?M>ZW?(g=uU(z,F,P,L,d,M,m),y=uU(O,N,I,q,d,M,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),M<R?s.arc(g.cx,g.cy,M,GW(g.y01,g.x01),GW(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,M,GW(g.y01,g.x01),GW(g.y11,g.x11),!m),s.arc(0,0,d,GW(g.cy+g.y11,g.cx+g.x11),GW(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,M,GW(y.y11,y.x11),GW(y.y01,y.x01),!m))):(s.moveTo(P,L),s.arc(0,0,d,b,v,!m)):s.moveTo(P,L),c>ZW&&w>ZW?_>ZW?(g=uU(I,q,O,N,c,-_,m),y=uU(P,L,z,F,c,-_,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),_<R?s.arc(g.cx,g.cy,_,GW(g.y01,g.x01),GW(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,GW(g.y01,g.x01),GW(g.y11,g.x11),!m),s.arc(0,0,c,GW(g.cy+g.y11,g.cx+g.x11),GW(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,_,GW(y.y11,y.x11),GW(y.y01,y.x01),!m))):s.arc(0,0,c,S,x,m):s.lineTo(I,q)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-eU/2;return[YW(r)*n,JW(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:WW(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:WW(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:WW(+e),l):r},l.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:WW(+e),l):o},l.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:WW(+e),l):i},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:WW(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function dU(e){this._context=e}function pU(e){return new dU(e)}function fU(e){return e[0]}function hU(e){return e[1]}function mU(){var e=fU,t=null,n=WW(0),r=hU,o=WW(!0),i=null,a=pU,s=null;function l(l){var u,c,d,p,f,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==i&&(s=a(f=VW())),u=0;u<=h;++u){if(!(u<h&&o(p=l[u],u,l))===m)if(m=!m)c=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=u-1;d>=c;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[u]=+e(p,u,l),y[u]=+n(p,u,l),s.point(t?+t(p,u,l):g[u],r?+r(p,u,l):y[u]))}if(f)return s=null,f+""||null}function u(){return function(){var e=fU,t=hU,n=WW(!0),r=null,o=pU,i=null;function a(a){var s,l,u,c=a.length,d=!1;for(null==r&&(i=o(u=VW())),s=0;s<=c;++s)!(s<c&&n(l=a[s],s,a))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(l,s,a),+t(l,s,a));if(u)return i=null,u+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:WW(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:WW(!!e),a):n},a.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),a):o},a.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),a):r},a}().defined(o).curve(a).context(i)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:WW(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:WW(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:WW(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:WW(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:WW(+e),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:WW(!!e),l):o},l.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),l):a},l.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),l):i},l}function gU(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function yU(e){return e}dU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var bU=Array.prototype.slice;function vU(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xU(e){this._context=e}function SU(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function wU(e,t){this._context=e,this._k=(1-t)/6}xU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vU(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vU(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},wU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:SU(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:SU(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var CU=function e(t){function n(e){return new wU(e,t)}return n.tension=function(t){return e(+t)},n}(0);function EU(e,t){this._context=e,this._alpha=t}EU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>ZW){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ZW){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var kU=function e(t){function n(e){return t?new EU(e,t):new wU(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function RU(e){return e<0?-1:1}function _U(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(RU(i)+RU(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function MU(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function AU(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function DU(e){this._context=e}function PU(e){this._context=new LU(e)}function LU(e){this._context=e}function IU(e){this._context=e}function qU(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function TU(e,t){this._context=e,this._t=t}function OU(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function NU(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function zU(e,t){return e[t]}function FU(e){for(var t,n=-1,r=0,o=e.length,i=-1/0;++n<o;)(t=+e[n][1])>i&&(i=t,r=n);return r}function jU(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function HU(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const o={},i=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in o)&&(o[e]=t,!0)}function s(e){return o[e]||i.get(e)}function l(e,o){if(void 0!==o)return a(e,o);const i=s(e);return r&&void 0===i&&r.warn("".concat(e," does not exist in ").concat(n," registry")),i||s(t)}return t=i.default(),l.add=a,l.get=s,l.has=function(e){return!!o[e]||i.has(e)},l.remove=function(e){const t=o[e];return delete o[e],t},l.getKeys=function(){return Object.keys(o)},l.getValues=function(){return Object.keys(o).map((e=>o[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function BU(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function $U(e){return(e=BU(Math.abs(e)))?e[1]:NaN}DU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:AU(this,this._t0,MU(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,AU(this,MU(this,n=_U(this,e,t)),n);break;default:AU(this,this._t0,n=_U(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(PU.prototype=Object.create(DU.prototype)).point=function(e,t){DU.prototype.point.call(this,t,e)},LU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},IU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=qU(e),o=qU(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},TU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var VU,WU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function UU(e){if(!(t=WU.exec(e)))throw new Error("invalid format: "+e);var t;return new GU({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function GU(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function YU(e,t){var n=BU(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}UU.prototype=GU.prototype,GU.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var KU={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>YU(100*e,t),r:YU,s:function(e,t){var n=BU(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(VU=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+BU(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function XU(e){return e}var JU,QU,ZU,eG=Array.prototype.map,tG=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nG(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?XU:(t=eG.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?XU:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(eG.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=UU(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(m=!0,b="g"):KU[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var v="$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?i:/[%p]/.test(b)?l:"",S=KU[b],w=/[defgprs%]/.test(b);function C(e){var o,i,l,p=v,C=x;if("c"===b)C=S(e)+C,e="";else{var E=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&"+"!==d&&(E=!1),p=(E?"("===d?d:u:"-"===d||"("===d?"":d)+p,C=("s"===b?tG[8+VU/3]:"")+C+(E&&"("===d?")":""),w)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?a+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}m&&!f&&(e=r(e,1/0));var k=p.length+e.length+C.length,R=k<h?new Array(h-k+1).join(t):"";switch(m&&f&&(e=r(R+e,R.length?h-C.length:1/0),R=""),n){case"<":e=p+e+C+R;break;case"=":e=p+R+e+C;break;case"^":e=R.slice(0,k=R.length>>1)+p+e+C+R.slice(k);break;default:e=R+p+e+C}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=UU(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor($U(t)/3))),o=Math.pow(10,-r),i=tG[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){JU=nG(e),QU=JU.format,ZU=JU.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const rG=new Date,oG=new Date;function iG(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>iG((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(rG.setTime(+t),oG.setTime(+r),e(rG),e(oG),Math.floor(n(rG,oG))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const aG=6e4,sG=864e5,lG=6048e5,uG=iG((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*aG)/sG),(e=>e.getDate()-1));uG.range;const cG=iG((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sG),(e=>e.getUTCDate()-1));cG.range;const dG=iG((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sG),(e=>Math.floor(e/sG)));function pG(e){return iG((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*aG)/lG))}dG.range;const fG=pG(0),hG=pG(1),mG=pG(2),gG=pG(3),yG=pG(4),bG=pG(5),vG=pG(6);function xG(e){return iG((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/lG))}fG.range,hG.range,mG.range,gG.range,yG.range,bG.range,vG.range;const SG=xG(0),wG=xG(1),CG=xG(2),EG=xG(3),kG=xG(4),RG=xG(5),_G=xG(6);SG.range,wG.range,CG.range,EG.range,kG.range,RG.range,_G.range;const MG=iG((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));MG.every=e=>isFinite(e=Math.floor(e))&&e>0?iG((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,MG.range;const AG=iG((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function DG(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function PG(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function LG(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=DG,n=(t,n)=>DG(e(t),n),r=(t,n)=>e(t)-n):(t=e===DG||e===PG?e:IG,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function IG(){return 0}AG.every=e=>isFinite(e=Math.floor(e))&&e>0?iG((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,AG.range;const qG=LG(DG).right;LG((function(e){return null===e?NaN:+e})).center;var TG=qG;class OG extends Map{constructor(e,t=zG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(NG(this,e))}has(e){return super.has(NG(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function NG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function zG(e){return null!==e&&"object"==typeof e?e.valueOf():e}const FG=Math.sqrt(50),jG=Math.sqrt(10),HG=Math.sqrt(2);function BG(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=FG?10:i>=jG?5:i>=HG?2:1;let s,l,u;return o<0?(u=Math.pow(10,-o)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,o)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?BG(e,t,2*n):[s,l,u]}function $G(e,t,n){return BG(e=+e,t=+t,n=+n)[2]}function VG(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function WG(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function UG(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function GG(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=eY(o),c=tY(o),d=eY(i),p=tY(i),f=eY(a),h=tY(a),m=eY(s),g=tY(s),y=eY(l),b=tY(l),v={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:wY,e:wY,f:_Y,g:zY,G:jY,H:CY,I:EY,j:kY,L:RY,m:MY,M:AY,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:uK,s:cK,S:DY,u:PY,U:LY,V:qY,w:TY,W:OY,x:null,X:null,y:NY,Y:FY,Z:HY,"%":lK},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:BY,e:BY,f:GY,g:oK,G:aK,H:$Y,I:VY,j:WY,L:UY,m:YY,M:KY,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:uK,s:cK,S:XY,u:JY,U:QY,V:eK,w:tK,W:nK,x:null,X:null,y:rK,Y:iK,Z:sK,"%":lK},S={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:pY,e:pY,f:bY,g:lY,G:sY,H:hY,I:hY,j:fY,L:yY,m:dY,M:mY,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:cY,Q:xY,s:SY,S:gY,u:rY,U:oY,V:iY,w:nY,W:aY,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:lY,Y:sY,Z:uY,"%":vY};function w(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=YG[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=UG(1900,void 0,1);if(E(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=WG(UG(i.y,0,1))).getUTCDay(),r=o>4||0===o?wG.ceil(r):wG(r),r=cG.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=VG(UG(i.y,0,1))).getDay(),r=o>4||0===o?hG.ceil(r):hG(r),r=uG.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?WG(UG(i.y,0,1)).getUTCDay():VG(UG(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,WG(i)):VG(i)}}function E(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=S[o in YG?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return v.x=w(n,v),v.X=w(r,v),v.c=w(t,v),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}var YG={"-":"",_:" ",0:"0"},KG=/^\s*\d+/,XG=/^%/,JG=/[\\^$*+?|[\]().{}]/g;function QG(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function ZG(e){return e.replace(JG,"\\$&")}function eY(e){return new RegExp("^(?:"+e.map(ZG).join("|")+")","i")}function tY(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function nY(e,t,n){var r=KG.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function rY(e,t,n){var r=KG.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function oY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function iY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function aY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sY(e,t,n){var r=KG.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function uY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cY(e,t,n){var r=KG.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function dY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function pY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fY(e,t,n){var r=KG.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function hY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function gY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yY(e,t,n){var r=KG.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function bY(e,t,n){var r=KG.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vY(e,t,n){var r=XG.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xY(e,t,n){var r=KG.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function SY(e,t,n){var r=KG.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wY(e,t){return QG(e.getDate(),t,2)}function CY(e,t){return QG(e.getHours(),t,2)}function EY(e,t){return QG(e.getHours()%12||12,t,2)}function kY(e,t){return QG(1+uG.count(MG(e),e),t,3)}function RY(e,t){return QG(e.getMilliseconds(),t,3)}function _Y(e,t){return RY(e,t)+"000"}function MY(e,t){return QG(e.getMonth()+1,t,2)}function AY(e,t){return QG(e.getMinutes(),t,2)}function DY(e,t){return QG(e.getSeconds(),t,2)}function PY(e){var t=e.getDay();return 0===t?7:t}function LY(e,t){return QG(fG.count(MG(e)-1,e),t,2)}function IY(e){var t=e.getDay();return t>=4||0===t?yG(e):yG.ceil(e)}function qY(e,t){return e=IY(e),QG(yG.count(MG(e),e)+(4===MG(e).getDay()),t,2)}function TY(e){return e.getDay()}function OY(e,t){return QG(hG.count(MG(e)-1,e),t,2)}function NY(e,t){return QG(e.getFullYear()%100,t,2)}function zY(e,t){return QG((e=IY(e)).getFullYear()%100,t,2)}function FY(e,t){return QG(e.getFullYear()%1e4,t,4)}function jY(e,t){var n=e.getDay();return QG((e=n>=4||0===n?yG(e):yG.ceil(e)).getFullYear()%1e4,t,4)}function HY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+QG(t/60|0,"0",2)+QG(t%60,"0",2)}function BY(e,t){return QG(e.getUTCDate(),t,2)}function $Y(e,t){return QG(e.getUTCHours(),t,2)}function VY(e,t){return QG(e.getUTCHours()%12||12,t,2)}function WY(e,t){return QG(1+cG.count(AG(e),e),t,3)}function UY(e,t){return QG(e.getUTCMilliseconds(),t,3)}function GY(e,t){return UY(e,t)+"000"}function YY(e,t){return QG(e.getUTCMonth()+1,t,2)}function KY(e,t){return QG(e.getUTCMinutes(),t,2)}function XY(e,t){return QG(e.getUTCSeconds(),t,2)}function JY(e){var t=e.getUTCDay();return 0===t?7:t}function QY(e,t){return QG(SG.count(AG(e)-1,e),t,2)}function ZY(e){var t=e.getUTCDay();return t>=4||0===t?kG(e):kG.ceil(e)}function eK(e,t){return e=ZY(e),QG(kG.count(AG(e),e)+(4===AG(e).getUTCDay()),t,2)}function tK(e){return e.getUTCDay()}function nK(e,t){return QG(wG.count(AG(e)-1,e),t,2)}function rK(e,t){return QG(e.getUTCFullYear()%100,t,2)}function oK(e,t){return QG((e=ZY(e)).getUTCFullYear()%100,t,2)}function iK(e,t){return QG(e.getUTCFullYear()%1e4,t,4)}function aK(e,t){var n=e.getUTCDay();return QG((e=n>=4||0===n?kG(e):kG.ceil(e)).getUTCFullYear()%1e4,t,4)}function sK(){return"+0000"}function lK(){return"%"}function uK(e){return+e}function cK(e){return Math.floor(+e/1e3)}const dK=HU();dK("d3-number",(function(e,t,n){let r,o;function i(e){return o(e)}function a(){i.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return i.locale=function(t){return r=nG(t),o=r.format(e),this},a(),i.format=function(e,o,i,s){return(i||s)&&(t=i,n=s,a()),r.format(e)(o)},i.pattern=function(t){return t&&(e=t,o=r.format(t)),e},i})),dK("d3-time",(function(e){let t=GG({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=GG(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const pK={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return dK(t.type||"d3-number")(t.format||"")})(e)};function fK(e){let{id:t=pK.id,key:n=pK.key,min:r=pK.min,max:o=pK.max,type:i=pK.type,tags:a=pK.tags,title:s=pK.title,values:l=pK.values,value:u=pK.value,label:c=pK.label,formatter:d=pK.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>i(e),min:()=>r(e),max:()=>o(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:u,label:c}}const hK=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),mK=e=>e.reduce(((e,t)=>e+t),0),gK={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=hK(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=hK(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=hK(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=hK(e),n=t.length;return n?mK(t)/n:NaN}};function yK(e,t,n,r){const o={},i=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=o[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=i):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>yK(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):i&&(l.value=i.value,l.label=i.label,l.field=i),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=gK[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?gK[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=gK[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?gK[l.field.reduceLabel]:l.field.reduceLabel))})),o}function bK(e,t){const{main:n}=yK(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:yK(e,t,e.props||{},n),main:n}}function vK(e,t,n,r){const o=Array(e.length),i=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],o[t]=a.value,i[t]=a.label;const s=t.reduce,l=t.reduceLabel,u=s?s(o):o,c={value:u,label:l?l(i,u):n?n(u):String(u)};return r&&e[0][r].source?(c.source=e[0][r].source,c):!r&&e[0].source?(c.source=e[0].source,c):c}function xK(e,t){let{main:n,propsArr:r,props:o}=t,i=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=o[e].field?o[e].field.formatter():e=>e})),i.push(...e.map((e=>{const t=vK(e.items,n,a);return r.forEach((n=>{t[n]=vK(e.items,o[n],s[n],n)})),t}))),i}function SK(e){let{cfg:t,itemData:n,obj:r,target:o,tracker:i,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=i[s];l||(l=i[s]={items:[],id:s},o.push(l)),l.items.push(r)}function wK(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function CK(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const EK={diverging:function(e,t){if((s=e.length)>0)for(var n,r,o,i,a,s,l=0,u=e[t[0]].length;l<u;++l)for(i=a=0,n=0;n<s;++n)(o=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):r[0]=i},none:OU,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}OU(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}OU(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],d=c[a][1]||0,p=(d-(c[a-1][1]||0))/2,f=0;f<s;++f){var h=e[t[f]];p+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,u+=p*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=u/l)}n[a-1][1]+=n[a-1][0]=i,OU(e,t)}}},kK={ascending:function(e){var t=e.map(jU);return NU(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,o=e.map(jU),i=function(e){var t=e.map(FU);return NU(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],u=[];for(t=0;t<r;++t)n=i[t],a<s?(a+=o[n],l.push(n)):(s+=o[n],u.push(n));return u.reverse().concat(l)},none:NU,reverse:function(e){return NU(e).reverse()}};function RK(e,t,n){const r={},o=t.stackKey,i=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",u=t.order||"none",c=t.valueRef||"";let d=0,p={};for(let t=0;t<e.items.length;t++){let n=e.items[t],i=c?n[c]:null;if(i&&i.source){let e="".concat(i.source.key||"","/").concat(i.source.field);p[e]||(p[e]=i.source)}let a=o(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const f=Array.apply(null,{length:d}).map(Number.call,Number),h=Object.keys(r).map((e=>r[e].items)),m=function(){var e=WW([]),t=NU,n=OU,r=zU;function o(o){var i,a,s=e.apply(this,arguments),l=o.length,u=s.length,c=new Array(u);for(i=0;i<u;++i){for(var d,p=s[i],f=c[i]=new Array(l),h=0;h<l;++h)f[h]=d=[0,+r(o[h],p,h,o)],d.data=o[h];f.key=p}for(i=0,a=t(c);i<u;++i)c[a[i]].index=i;return n(c,a),c}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:WW(bU.call(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:WW(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?NU:"function"==typeof e?e:WW(bU.call(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?OU:e,o):n},o}().keys(f).value(((e,t)=>e[t]?i(e[t]):0)).order(kK[u]).offset(EK[l]);let g=m(h),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let b=Object.keys(p).map((e=>{let t=n(p[e].key);return t?t.field(p[e].field):null})).filter((e=>!!e));const v=fK({title:b.map((e=>e.title())).join(", "),min:CK(y),max:wK(y),type:"measure",formatter:b[0]?b[0].formatter:void 0});e.fields.push(v)}function _K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=MW({},t.collection(e.collection));else{const o=t.dataset?t.dataset(e.source):null;let i=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=o.hierarchy?o.hierarchy(e.hierarchy):null,n.fields=o.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:i(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const i=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):o;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&i.push(r.field(e.field)))})),i.length&&(n.fields=i),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&o){const t=o.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(i=t.value||(e=>e),a=t.label||(e=>e),n.value=i),n.items=t.items().map((t=>({value:i(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):o;if(!r)return;let i;i="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),i&&(n.fields||(n.fields=[]),n.fields.push(i))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&RK(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function MK(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_K;if(e.data){const r=o(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function AK(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const DK=Symbol("implicit");function PK(){var e=new OG,t=[],n=[],r=DK;function o(o){let i=e.get(o);if(void 0===i){if(r!==DK)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new OG;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return PK(t,n).unknown(r)},AK.apply(o,arguments),o}function LK(){var e,t,n=PK().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,u=0,c=.5;function d(){var n=r().length,d=a<i,p=d?a:i,f=d?i:a;e=(f-p)/Math.max(1,n-l+2*u),s&&(e=Math.floor(e)),p+=(f-p-e*(n-l))*c,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return p+e*t}));return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(u=+e,d()):u},n.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),d()):c},n.copy=function(){return LK(r(),[i,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},AK.apply(d(),arguments)}function IK(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qK(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function TK(){}var OK=.7,NK=1/OK,zK="\\s*([+-]?\\d+)\\s*",FK="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jK="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HK=/^#([0-9a-f]{3,8})$/,BK=new RegExp(`^rgb\\(${zK},${zK},${zK}\\)$`),$K=new RegExp(`^rgb\\(${jK},${jK},${jK}\\)$`),VK=new RegExp(`^rgba\\(${zK},${zK},${zK},${FK}\\)$`),WK=new RegExp(`^rgba\\(${jK},${jK},${jK},${FK}\\)$`),UK=new RegExp(`^hsl\\(${FK},${jK},${jK}\\)$`),GK=new RegExp(`^hsla\\(${FK},${jK},${jK},${FK}\\)$`),YK={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function KK(){return this.rgb().formatHex()}function XK(){return this.rgb().formatRgb()}function JK(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=HK.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?QK(t):3===n?new tX(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ZK(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ZK(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=BK.exec(e))?new tX(t[1],t[2],t[3],1):(t=$K.exec(e))?new tX(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VK.exec(e))?ZK(t[1],t[2],t[3],t[4]):(t=WK.exec(e))?ZK(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=UK.exec(e))?sX(t[1],t[2]/100,t[3]/100,1):(t=GK.exec(e))?sX(t[1],t[2]/100,t[3]/100,t[4]):YK.hasOwnProperty(e)?QK(YK[e]):"transparent"===e?new tX(NaN,NaN,NaN,0):null}function QK(e){return new tX(e>>16&255,e>>8&255,255&e,1)}function ZK(e,t,n,r){return r<=0&&(e=t=n=NaN),new tX(e,t,n,r)}function eX(e,t,n,r){return 1===arguments.length?function(e){return e instanceof TK||(e=JK(e)),e?new tX((e=e.rgb()).r,e.g,e.b,e.opacity):new tX}(e):new tX(e,t,n,null==r?1:r)}function tX(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function nX(){return`#${aX(this.r)}${aX(this.g)}${aX(this.b)}`}function rX(){const e=oX(this.opacity);return`${1===e?"rgb(":"rgba("}${iX(this.r)}, ${iX(this.g)}, ${iX(this.b)}${1===e?")":`, ${e})`}`}function oX(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function iX(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function aX(e){return((e=iX(e))<16?"0":"")+e.toString(16)}function sX(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new uX(e,t,n,r)}function lX(e){if(e instanceof uX)return new uX(e.h,e.s,e.l,e.opacity);if(e instanceof TK||(e=JK(e)),!e)return new uX;if(e instanceof uX)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new uX(a,s,l,e.opacity)}function uX(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function cX(e){return(e=(e||0)%360)<0?e+360:e}function dX(e){return Math.max(0,Math.min(1,e||0))}function pX(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}IK(TK,JK,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KK,formatHex:KK,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lX(this).formatHsl()},formatRgb:XK,toString:XK}),IK(tX,eX,qK(TK,{brighter(e){return e=null==e?NK:Math.pow(NK,e),new tX(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?OK:Math.pow(OK,e),new tX(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tX(iX(this.r),iX(this.g),iX(this.b),oX(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nX,formatHex:nX,formatHex8:function(){return`#${aX(this.r)}${aX(this.g)}${aX(this.b)}${aX(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:rX,toString:rX})),IK(uX,(function(e,t,n,r){return 1===arguments.length?lX(e):new uX(e,t,n,null==r?1:r)}),qK(TK,{brighter(e){return e=null==e?NK:Math.pow(NK,e),new uX(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?OK:Math.pow(OK,e),new uX(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new tX(pX(e>=240?e-240:e+120,o,r),pX(e,o,r),pX(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new uX(cX(this.h),dX(this.s),dX(this.l),oX(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oX(this.opacity);return`${1===e?"hsl(":"hsla("}${cX(this.h)}, ${100*dX(this.s)}%, ${100*dX(this.l)}%${1===e?")":`, ${e})`}`}}));var fX=e=>()=>e;function hX(e){return 1==(e=+e)?mX:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fX(isNaN(t)?n:t)}}function mX(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fX(isNaN(e)?t:e)}var gX=function e(t){var n=hX(t);function r(e,t){var r=n((e=eX(e)).r,(t=eX(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=mX(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function yX(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function bX(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=kX(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function vX(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function xX(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function SX(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=kX(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var wX=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,CX=new RegExp(wX.source,"g");function EX(e,t){var n,r,o,i=wX.lastIndex=CX.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=wX.exec(e))&&(r=CX.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:xX(n,r)})),i=CX.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function kX(e,t){var n,r=typeof t;return null==t||"boolean"===r?fX(t):("number"===r?xX:"string"===r?(n=JK(t))?(t=n,gX):EX:t instanceof JK?gX:t instanceof Date?vX:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?yX:Array.isArray(t)?bX:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?SX:xX)(e,t)}function RX(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _X(e){return+e}var MX=[0,1];function AX(e){return e}function DX(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function PX(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=DX(o,r),i=n(a,i)):(r=DX(r,o),i=n(i,a)),function(e){return i(r(e))}}function LX(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=DX(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=TG(e,t,1,r)-1;return i[n](o[n](t))}}function IX(){var e,t,n,r,o,i,a=MX,s=MX,l=kX,u=AX;function c(){var e=Math.min(a.length,s.length);return u!==AX&&(u=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?LX:PX,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=r(s,a.map(e),xX)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,_X),c()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=RX,c()},d.clamp=function(e){return arguments.length?(u=!!e||AX,c()):u!==AX},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function qX(e,t,n,r){var o,i=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?$G(t,e,n):$G(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=UU(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($U(t)/3)))-$U(Math.abs(e)))}(i,a))||(r.precision=o),ZU(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$U(t)-$U(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-$U(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return QU(r)}function TX(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,i,a]=r?BG(t,e,n):BG(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return qX(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],u=i[s],c=10;for(u<l&&(o=l,l=u,u=o,o=a,a=s,s=o);c-- >0;){if((o=$G(l,u,n))===r)return i[a]=l,i[s]=u,t(i);if(o>0)l=Math.floor(l/o)*o,u=Math.ceil(u/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,u=Math.floor(u*o)/o}r=o}return e},e}function OX(){var e=IX()(AX,AX);return e.copy=function(){return t=e,OX().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},AK.apply(e,arguments),TX(e)}function NX(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[TG(t,o,0,r)]:e}return o.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),o):t.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return NX().domain(t).range(n).unknown(e)},AK.apply(o,arguments)}function zX(e){return void 0===e?e=>e:t=>e(t)}function FX(e){return Math.max(0,Math.min(1,e))}function jX(e){return"object"==typeof e}function HX(e,t,n){const r=Math.abs(t-n)/(e+1),o=[];for(let i=1;i<=e;i++){const e=i*r;o.push(t<n?t+e:t-e)}return o}function BX(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let o=0;o<e.length;o++){let i=e[o],a=e[o+1];0===o&&i!==n.start()?(r.push(...HX(t,i,a)),i-=a-i,a=e[o],r.push(...HX(t,i,a))):o===e.length-1&&a!==n.end()?(a=i+(i-e[o-1]),r.push(...HX(t,i,a))):r.push(...HX(t,i,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function $X(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=PW(o)||PW(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const u=r>0?BX(l,r,n):l;u.sort(((e,t)=>e-t));const c=u.map(zX(i));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:c[t],value:e,isMinor:-1===l.indexOf(e)}}))}function VX(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=PW(o)||PW(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const u=n.ticks(s),c=r>0?BX(u,r,n):u;c.sort(((e,t)=>e-t));const d=c.map(zX(i));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===u.indexOf(e)}}))}function WX(e){let t,{settings:n,scale:r,distance:o,formatter:i=e=>e}=e;const a=n.minorTicks&&!PW(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!PW(e.value):!PW(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(jX(e)?e.value:e)-(jX(t)?t.value:t))).filter(((e,t,r)=>{const o=jX(e)?e.value:e;return o<=n.max()&&o>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=jX(e),o=t?e.value:e,i=n(o);return{position:i,value:o,label:t&&void 0!==e.label?e.label:r(o),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?FX(n(e.start)):i,end:t&&!isNaN(e.end)?FX(n(e.end)):i}}))}({values:e,scale:r.copy(),formatter:i})}else if(PW(n.ticks.count)){t=(n.ticks.tight?VX:$X)({distance:o,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:i}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),o=t.range();-1===r.indexOf(o[0])?e.splice(0,0,{position:o[0],start:o[0],end:o[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const i=e[e.length-1];-1===r.indexOf(o[1])?e.push({position:o[1],start:o[1],end:o[1],label:n(t.end()),isMinor:!1,value:t.end()}):i&&i.isMinor&&(i.isMinor=!1)}(t,r,i)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:o}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const i=r(e);return{position:i,start:i,end:i,label:o(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:i})}return t}function UX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((o=>{const i=typeof e[o];r[o]="function"===i?e[o](n):"undefined"===i?t[o]:e[o]})),r}const GX={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},YX={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},KX={count:NaN};function XX(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function JX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=OX(),o={instance:null,invert:!1},i={data:t,resources:n},a=UX(e,GX,i);let s;function l(e){return PW(e)?NaN:r(e)}a.ticks=UX(e.ticks,YX,i),a.minorTicks=UX(e.minorTicks,KX,i),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=EW(!0,{},a,e.settings),e.scale=l,s=WX(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),o.instance&&o.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],o=t/2;for(let i=0;i<e;i++){let e=n[n.length-1]||0,i=e+t,a=l(e+o);n.push(i,i),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const o=JX(e,t,n);return o.domain(l.domain()),o.range(l.range()),o.clamp(r.clamp()),o},l.norm=function(e){return XX(o,l),o.instance(e)},l.normInvert=function(e){return XX(o,l),o.instance.invert(e)};const{mini:u,maxi:c}=function(e,t){const n=+e.min,r=+e.max;let o=0,i=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(o=n.length?Math.min(...n):Number.NaN,i=r.length?Math.max(...r):Number.NaN,isNaN(o)||isNaN(i))o=-1,i=1;else if(o===i&&0===o)o=-1,i=1;else if(o===i&&o)o-=Math.abs(.1*o),i+=Math.abs(.1*i);else if(!isNaN(e.expand)){const t=i-o;o-=t*e.expand,i+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));o=Math.min(...t,o),i=Math.max(...t,i)}}return{mini:isNaN(n)?o:n,maxi:isNaN(r)?i:r}}(a,t?t.fields:[]);return l.domain([u,c]),l.range(a.invert?[1,0]:[0,1]),o.invert=a.invert,l}const QX={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function ZX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=UX(e,QX,n),o=t.items||[],i={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>o[i[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,o=t.labels?t.labels():n,i=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+i/2,label:"".concat(o[n]),data:r?r[n]:void 0,start:a,end:a+i}}))}(t,n.trackBy)}}const u=LK();l(u,e),u.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return u;const o=u.domain().length,i=Math.max(1,o-u.paddingInner()+2*u.paddingOuter());if(i*n>=t)return u;const a=u.copy();a.type=u.type,l(a,e);const s=i*n/t,c=(1-s)*u.align();return a.range(r.invert?[s+c,c]:[c,s+c]),a};const c="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<o.length;e++){const t=EW({datum:o[e]},n),r=c(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),i[r]=e)}return u.domain(a),u.range(r.invert?r.range.slice().reverse():r.range),u.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||u.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||u.paddingOuter(r.paddingOuter),u.align(isNaN(r.align)?.5:r.align),u}const eJ={depth:0};function tJ(e,t,n){return e.ancestors().map((e=>t(EW({datum:e.data},n)))).reverse().slice(1).toString()}const nJ=e=>e.min(),rJ=e=>e.max();function oJ(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let o=n?+e.min:0,i=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(nJ).filter(DW);o=e.length?Math.min(...e):o}if(!r){const e=t.map(rJ).filter(DW);i=e.length?Math.max(...e):i}}return[o,i]}const iJ={domain:[],range:[],invert:!1,min:NaN,max:NaN};function aJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=JX(e,t,n).clamp(!0).interpolate(gX),o=UX(e,iJ,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length,s=r;EW(!0,s,r);const[l,u]=oJ(o,t?t.fields:[]),c=i?o.domain.length:-1,d=n.theme?n.theme.palette("sequential",c>0?c:2):[],p=a?o.range:d;return s.range(o.invert?p.slice().reverse():p.slice()),s.domain(i?o.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const o=[],i=(n-t)/(r-1);o.push(t);for(let e=1;e<r-1;e++)o.push(t+i*e);return o.push(n),o}(s.range(),l,u)),s}const sJ={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function lJ(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const uJ={domain:[],range:[]};const cJ={domain:[],range:[],unknown:void 0},dJ={domain:[],range:[],override:!1};const pJ=HU();function fJ(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const o=_K(r,t,n);let i,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(o);return"color"===a&&(a=o.fields&&o.fields[0]&&"dimension"===o.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(i=n.scale.get(a),i=i(e,o,{theme:n.theme,logger:n.logger}),i.type=a),i}pJ("linear",JX),pJ("band",ZX),pJ("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={data:n,resources:r},i=UX(t,QX,o);i.ticks=UX(t.ticks,eJ,o),i.value="function"==typeof t.value?t.value:e=>e.datum.value,i.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=ZX(i);const{values:s,labels:l,items:u,ticks:c}=function(e,t,n){const r=t.ticks.depth,o=t.value,i=t.label,a=[],s=[],l={},u=[];let c=0;if(!e)return{values:a,labels:s,items:l,ticks:u};e.eachAfter((e=>{if(e.depth>0){const t=tJ(e,o,n),d=e.leaves()||[e],p=o(EW({datum:e.data},n)),f=i(EW({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:f,leftEdge:tJ(d[0],o,n),rightEdge:tJ(d[Math.max(d.length-1,0)],o,n),node:e};h?(a.push("SPACER_".concat(c,"_SPACER")),c++):(a.push(t),s.push(f)),(r<=0&&!h||e.depth===r)&&u.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:u}}(n.root,i,o),d=function(e){const t=String(e),n=u[t];return a(n?i.invert?n.rightEdge:n.leftEdge:t)};EW(!0,d,a),d.bandwidth=function(e){const t=u[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=u[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=u[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>c.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),pJ("sequential-color",aJ),pJ("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=NX(),o=UX(e,sJ,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length;function s(e){return PW(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[u,c]=oJ(o,l),d=i?o.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let f=a?o.range:p,h=[];return h=i?o.domain:o.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),o=OX().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return o;const i=Math.max(0,e.length-1);for(;o.length>i;)o[0]-t<=n-o[o.length-1]?o.shift():o.pop();return o}(f,u,c):[u+(c-u)/2],f.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const o=[],i=(n-t)/r;for(let e=1;e<r;e++)o.push(t+i*e);return o}(f,u,c):f.length<h.length+1&&(f=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const o=aJ().domain([n,r]).range(t);return[n,...lJ(e),r].map((e=>o(e)))}(h,f,u,c)),s.data=()=>t,s.range(o.invert?f.slice().reverse():f),s.domain(h),s})),pJ("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=PK(),o={data:t,resources:n},i=UX(e,uJ,o),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],u={},c=[],d=[];for(let e=0;e<l.length;e++){const t=EW({datum:l[e]},o),n=a(t,e);-1===c.indexOf(n)&&(c.push(n),d.push(s(t,e)),u[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[c.indexOf(e)],r.datum=e=>l[u[e]],r.range(i.range),Array.isArray(i.domain)&&i.domain.length?r.domain(i.domain):r.domain(c),r}(e,t,n),o=n.theme,i=UX(e,cJ,{data:t,resources:n});let a;if(i.explicit=UX(e.explicit,dJ,{data:t,resources:n}),a=Array.isArray(i.range)&&0!==i.range.length?i.range.slice():o?o.palette("categorical",r.domain().length).slice():[],i.unknown)r.unknown(i.unknown);else if(o&&o.palette("unknown")){let e=o.palette("unknown");r.unknown(e[0])}if(Array.isArray(i.explicit.domain)&&i.explicit.domain.length){const e=r.domain().slice(),t=i.explicit.domain,n=Array.isArray(i.explicit.range)?i.explicit.range:[],o=Math.floor(e.length/a.length);for(let e=1;e<o+1;e*=2)a=a.concat(a);if(i.explicit.override)for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);o>-1&&(a[o]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var hJ={};function mJ(){mJ.init.call(this)}hJ.isObject=function(e){return"object"==typeof e&&null!==e},hJ.isNumber=function(e){return"number"==typeof e},hJ.isUndefined=function(e){return void 0===e},hJ.isFunction=function(e){return"function"==typeof e};var gJ=mJ;mJ.EventEmitter=mJ,mJ.prototype._events=void 0,mJ.prototype._maxListeners=void 0,mJ.defaultMaxListeners=10,mJ.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},mJ.prototype.setMaxListeners=function(e){if(!hJ.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},mJ.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],hJ.isUndefined(n))return!1;if(hJ.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(hJ.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},mJ.prototype.addListener=function(e,t){var n;if(!hJ.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,hJ.isFunction(t.listener)?t.listener:t),this._events[e]?hJ.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,hJ.isObject(this._events[e])&&!this._events[e].warned)&&((n=hJ.isUndefined(this._maxListeners)?mJ.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,hJ.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),hJ.isFunction(console.trace)&&console.trace()));return this},mJ.prototype.on=mJ.prototype.addListener,mJ.prototype.once=function(e,t){if(!hJ.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},mJ.prototype.removeListener=function(e,t){var n,r,o,i;if(!hJ.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||hJ.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(hJ.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},mJ.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],hJ.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},mJ.prototype.listeners=function(e){return this._events&&this._events[e]?hJ.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},mJ.listenerCount=function(e,t){return e._events&&e._events[t]?hJ.isFunction(e._events[t])?1:e._events[t].length:0};var yJ={mixin:e=>(Object.keys(gJ.prototype).forEach((t=>{e[t]=gJ.prototype[t]})),gJ.init(e),e)};function bJ(){let e=0,t=0,n=0,r=0;n=n||e;const o={move(e){this.moveTo(n+e)},moveTo(i){const a=Math.max(e,Math.min(t-r,i));n!==a&&(n=a,o.emit("update"))},update(i){let a=!1;({min:e=e,max:t=t}=i),void 0!==i.viewSize&&i.viewSize!==r&&(r=i.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&o.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return yJ.mixin(o),o}function vJ(e,t){const n=e.min||0,r=e.max||0,o=e.viewSize||0,i=t||bJ();return i.update({min:n,max:r,viewSize:o}),i}function xJ(e,t){return e<=t}function SJ(e,t){return e<t}function wJ(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function CJ(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function o(){}return o.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:o=!0}=n;e=r?xJ:SJ,t=o?xJ:SJ},o.add=e=>{let{min:t,max:n}=e;const o=wJ(r,t),i=wJ(r,n,!0),a=[o,i-o];o%2==0&&a.push(t),i%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.remove=e=>{let{min:t,max:n}=e;const o=wJ(r,t),i=wJ(r,n,!0),a=[o,i-o];o%2==1&&a.push(t),i%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(o.add):o.add(e);return t!==r.join(",")},o.clear=()=>{const e=r.length>0;return r=[],e},o.containsValue=n=>function(e,t,n,r){const o=e.length;for(let i=1;i<o;i+=2)if(n(e[i-1],t)&&r(t,e[i]))return!0;return!1}(r,n,t,e),o.containsRange=e=>{let{min:t,max:n}=e;const o=wJ(r,t,!0),i=wJ(r,n);return o===i&&i%2==1},o.toggle=e=>o.containsRange(e)?o.remove(e):o.add(e),o.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},o.configure(n),o}function EJ(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const kJ={key:void 0,includeMin:!0,includeMax:!0};function RJ(e){let{items:t,collection:n,vc:r}=e;const o={},i=[];let a,s;for(let e=0,i=t.length;e<i;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(o[a]=o[a]||[],o[a].push(s[e]))}const l=Object.keys(o);for(let e=0,t=l.length;e<t;e++)a=l[e],i.push({id:a,values:o[a]});return i}function _J(e){let{items:t,collection:n}=e;const r={},o=[];let i,a;for(let e=0,o=t.length;e<o;e++)if(i=t[e].key,n[i]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[i].remove(a[e])&&(r[i]=r[i]||[],r[i].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)i=s[e],o.push({id:i,values:r[i]});return o}function MJ(e){const t={};let n,r;for(let o=0,i=e.length;o<i;o++){n=e[o].key,r=e[o].values||[e[o].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function AJ(e){let{key:t,collection:n,obj:r,fn:o,value:i}=e;n[t]||(n[t]=o()),r[t]=r[t]||[],r[t].push(i),n[t].add(i)}function DJ(e,t){const n=[],r=Object.keys(e);let o,i;const a=e=>-1===t[o].indexOf(e);for(let s=0,l=r.length;s<l;s++)o=r[s],t[o]?(i=e[o].filter(a),i.length&&n.push({id:o,values:i})):n.push({id:o,values:e[o]});return n}function PJ(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let o=0;o<n;o++)r[o]=e[o].key in t?EW({},e[o],{key:t[e[o].key]}):e[o];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function LJ(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function IJ(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function qJ(e,t,n){let{ranges:r,interceptors:o,rc:i,aliases:a,rangeConfig:s}=n;const l=PJ(o["".concat(t,"Ranges")],e,a);let u=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=i(s.sources[n]||s.default)),"set"===t)u=r[n][t](e.ranges||e.range)||u;else{const o=e.ranges||[e.range];for(let e=0;e<o.length;e++)u=r[n][t](o[e])||u}})),u}function TJ(){let{vc:e=EJ,rc:t=CJ}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},o={},i={},a={sources:{},default:EW({},kJ)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(o).forEach((t=>{e.values[t]=o[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},u={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},c={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:EW({},kJ)},e.ranges.forEach((e=>{const t={};Object.keys(kJ).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:kJ[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),c.emit("update",[],[]))},link:e=>{if(c===e)throw new Error("Can't link to self");u.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{o[n]&&e.values[n].join(";")===o[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(o).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&c.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&c.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];c.emit("start",...t),u.start()}},end:function(){if(n){n=!1,r={},o={};for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];c.emit("end",...t),u.end()}},isActive:()=>n,clear:()=>{const e=c.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},o={},t&&(c.emit("update",[],e),u.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(o).map((e=>({type:"value",id:e,brush:o[e]})))),e},addValue:(e,t)=>{c.addValues([{key:e,value:t}])},addValues:t=>{const r=PJ(s.addValues,t,i),a=RJ({vc:e,collection:o,items:r});c.emit("add-values",r),a.length&&(n||(n=!0,c.emit("start")),c.emit("update",a,[]),u.updateValues())}};return c.setValues=t=>{const r=PJ(s.setValues,t,i),a=function(e){let{items:t,vCollection:n,vc:r}=e;const o={},i=MJ(t);let a,s=[],l=[];const u={},c=Object.keys(n);for(let e=0,t=c.length;e<t;e++)a=c[e],u[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||AJ({key:a,value:e,collection:n,obj:o,fn:r})},p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)a=p[e],i[a].forEach(d);return l=DJ(u,o),s=DJ(o,u),[s,l]}({items:r,vCollection:o,vc:e});c.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,c.emit("start")),c.emit("update",a[0],a[1]),u.updateValues())},c.removeValue=(e,t)=>{c.removeValues([{key:e,value:t}])},c.removeValues=e=>{const t=PJ(s.removeValues,e,i),n=_J({collection:o,items:t});c.emit("remove-values",t),n.length&&(c.emit("update",[],n),u.updateValues())},c.addAndRemoveValues=(t,r)=>{const a=PJ(s.addValues,t,i),l=PJ(s.removeValues,r,i),d=RJ({vc:e,collection:o,items:a}),p=_J({collection:o,items:l});c.emit("add-values",a),c.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,c.emit("start")),c.emit("update",d,p),u.updateValues())},c.toggleValue=(e,t)=>{c.toggleValues([{key:e,value:t}])},c.toggleValues=t=>{const r=PJ(s.toggleValues,t,i),a=function(e){let{items:t,values:n,vc:r}=e;const o={},i={},a=[],s=[],l=MJ(t);let u,c,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){u=p[e],d=l[u];for(let e=0,t=d.length;e<t;e++)c=d[e],n[u]&&n[u].contains(c)?n[u]&&n[u].contains(c)&&(i[u]=i[u]||[],i[u].push(c),n[u].remove(c)):AJ({key:u,value:c,collection:n,obj:o,fn:r})}const f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)u=f[e],a.push({id:u,values:o[u]});const h=Object.keys(i);for(let e=0,t=h.length;e<t;e++)u=h[e],s.push({id:u,values:i[u]});return[a,s]}({items:r,values:o,vc:e});c.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,c.emit("start")),c.emit("update",a[0],a[1]),u.updateValues())},c.containsValue=(e,t)=>{let n=i[e]||e;return!!o[n]&&o[n].contains(t)},c.addRange=(e,t)=>{c.addRanges([{key:e,range:t}])},c.addRanges=e=>{qJ(e,"add",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.removeRange=(e,t)=>{c.removeRanges([{key:e,range:t}])},c.removeRanges=e=>{qJ(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.setRange=(e,t)=>{c.setRanges([{key:e,range:t}])},c.setRanges=e=>{qJ(e,"set",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.toggleRange=(e,t)=>{c.toggleRanges([{key:e,range:t}])},c.toggleRanges=e=>{qJ(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.containsRangeValue=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsValue(t)},c.containsRange=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsRange(t)},c.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,u,c,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)u=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;u=e[l],a[t]={key:l,i:t,bool:!1}}c=u.source&&u.source.field,void 0!==c&&(void 0!==u.source.key&&(c="".concat(u.source.key,"/").concat(c)),c in i&&(c=i[c]),d=u.value,r[c]?a[t].bool=Array.isArray(d)?r[c].containsRange({min:d[0],max:d[1]}):r[c].containsValue(d):o[c]&&o[c].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},c.intercept=(e,t)=>{const n=LJ(e);s[n]&&s[n].push(t)},c.removeInterceptor=(e,t)=>{const n=LJ(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},c.removeAllInterceptors=e=>{const t=[];if(e){const n=LJ(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:IJ(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>c.removeInterceptor(e.name,t)))}))},c.addKeyAlias=(e,t)=>{i[e]=t},c.removeKeyAlias=e=>{delete i[e]},yJ.mixin(c),c}function OJ(e){return e*e*e}function NJ(e){return--e*e*e+1}function zJ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}HU();const FJ=["stroke","fill","color","backgroundColor","thumbColor"];function jJ(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n);let a;for(a=0;a<r;++a)o[a]=HJ(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(e){for(a=0;a<r;++a)i[a]=o[a](e);return i}}function HJ(e,t,n){const r=typeof t;let o;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?xX:"string"===r?(o=JK(t))&&FJ.includes(n)?(t=o,gX):EX:t instanceof JK?gX:t instanceof Date?vX:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?yX:Array.isArray(t)?jJ:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?BJ:xX)(e,t)}function BJ(e,t){const n={},r={};let o;for(o in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)o in e?n[o]=HJ(e[o],t[o],o):r[o]=t[o];return function(e){for(o in n)r[o]=n[o](e);return r}}function $J(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const VJ={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},WJ=/^\$/;function UJ(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function GJ(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function YJ(e,t){return e.pxScale?e.pxScale(t):e}const KJ={normalizeSettings:function(e,t,n){const r=EW({},e),o=EW({},t);return Object.keys(r).forEach((e=>{o[e]={};const i=r[e],a=typeof i;if("function"==typeof i)o[e].fn=i;else if(UJ(i)){let n=t[e];"string"==typeof n&&WJ.test(n)&&(n=VJ[n]);const r=typeof n;o[e]="undefined"===r||r===a?i:n}else i&&"object"==typeof i&&("function"==typeof i.fn&&(o[e].fn=i.fn),void 0!==i.scale&&(o[e].scale=n.scale(i.scale)),"string"==typeof i.ref&&(o[e].ref=i.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&WJ.test(n)?o[e]=VJ[n]:o[e]=n})),o},resolveForItem:function(e,t,n){const r={},o=Object.keys(t),i=o.length,a=e.datum,s=e.datum;for(let l=0;l<i;l++){const i=o[l],u=t[i],c="object"==typeof s&&void 0!==u,d=c&&"string"==typeof u.ref,p=c&&i in s,f=d?s[u.ref]:p?s[i]:a;UJ(u)?r[i]=u:c&&u.fn?(u.scale&&(e.scale=u.scale),r[i]=u.fn.call(null,e,n)):c&&u.scale&&f?(r[i]=u.scale(f.value),u.scale.bandwidth&&(r[i]+=u.scale.bandwidth()/2)):d&&f?r[i]=f.value:u.fn?r[i]=u.fn.call(null,e,n):r[i]=u}return r},updateScaleSize:GJ};function XJ(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...XJ(t.children)),e):(e.push(t),e)),[])}function JJ(e,t){let{context:n,data:r,style:o,filter:i,mode:a}=t;const s=e.chart.brush(n),l=r,u=o.active||{},c=o.inactive||{},d=[];Object.keys(u).forEach((e=>{d.push(e)})),Object.keys(c).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let f=!1;const h=()=>{let t=XJ(e.nodes);return"function"==typeof i&&(t=t.filter(i)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const o="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,o,a),i=p.indexOf(e[r]);let l=!1;t&&-1===i?(p.push(e[r]),l=!0):t||-1===i||(p.splice(i,1),l=!0),e[r].needToUpdate=l||f,e[r].isActive=t}for(let o=0;o<t;o++)if(n=e[o].data,n){if(e[o].needToUpdate){const t=EW({},e[o],e[o].__style),n=e[o].isActive;d.forEach((r=>{e[o][r]=n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:!n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:e[o].__style[r]})),r=!0}delete e[o].needToUpdate}return f=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),o=r.length;for(let e=0;e<o;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in c&&(r[e][t]="function"==typeof c[t]?c[t].call(null,r[e]):c[t])})));f=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),o=r.length;for(let e=0;e<o;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{p.length=0,f=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function QJ(e){let{nodes:t,action:n,chart:r,trigger:o}=e;const i=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&i.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:o}=e;if(!o)return;const i=o.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&i.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}o.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:i,action:n,chart:r,trigger:o})}function ZJ(e){let{collisions:t,t:n,config:r,action:o}=e,i=[],a=!1;t.length>0&&(i=t,a=!0,"stop"===n.propagation&&(i=[t[t.length-1]]));const s=i.map((e=>e.node));return QJ({nodes:s,action:o,chart:r.chart,data:r.data,trigger:n}),a}function eQ(e,t,n){const r=n.element().getBoundingClientRect();let o=AW(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===o||o.x<0||o.y<0||o.x>r.width||o.y>r.height?[]:(t.touchRadius>0&&AW(e)?o={cx:o.x,cy:o.y,r:t.touchRadius}:t.mouseRadius>0&&!AW(e)&&(o={cx:o.x,cy:o.y,r:t.mouseRadius}),n.itemsAt(o))}function tQ(e,t,n){return e?"function"==typeof e?e(t):e:n}const nQ={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function rQ(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function oQ(e,t,n,r){const o=n/2,i=e-r/2,a=t-r/2,s=e-o,l=t-o;return[{x:i,y:a},{x:i,y:l},{x:i+r,y:l},{x:i+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:i+r,y:a+r},{x:i+r,y:l+n},{x:i,y:l+n},{x:i,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function iQ(e){return-e/180*Math.PI}function aQ(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),o=n*Math.sin(e);return{x1:r<0?1:0,y1:o<0?1:0,x2:r>=0?r:r+1,y2:o>=0?o:o+1}}(iQ(e))}function sQ(e,t){return{x:e.x+t.x,y:e.y+t.y}}function lQ(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uQ(e,t){return{x:e.x*t,y:e.y*t}}function cQ(e,t){return e.x-t.x}function dQ(e,t){return e.y-t.y}function pQ(e,t){return cQ(e,t)**2+dQ(e,t)**2}function fQ(e,t){return Math.sqrt(pQ(e,t))}function hQ(e,t){return e.x*t.x+e.y*t.y}function mQ(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),o=Math.sin(t),i=lQ(e,n);return sQ({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}const gQ={up:0,down:180,left:90,right:-90};function yQ(e){let{x:t,y:n,size:r}=e;const o=r/2;return{type:"rect",x:t-o,y:n-o,width:r,height:r}}const bQ=HU();bQ.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),bQ.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:rQ([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),bQ.add("saltire",(function(e){const t=iQ(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,o=Math.min(r,n);let i=e.size;const a=Math.sin(Math.asin(-t))*(o/2);i+=2*(n/Math.sin(-t)-n),i-=2*a;const s={x:e.x,y:e.y},l=oQ(e.x,e.y,i,o).map((e=>mQ(e,t,s)));return{type:"path",fill:"black",d:rQ(l)}})),bQ.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),bQ.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=gQ[e.direction]||0,o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];const l=iQ(r);return s=s.map((e=>mQ(e,l,n))),{type:"path",fill:"black",d:rQ(s)}})),bQ.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,o=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:o-(t?n:0),x2:r+(t?0:n),y2:o+(t?n:0),collider:yQ(e)}})),bQ.add("star",(function(e){const t=e.size,n=[],r=t/2,o=e.points||5,i=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/o;for(let t=1;t<=o;t++){const o=s*t+a,l=iQ(o),u=iQ(o+s/2),c=Math.sin(l),d=Math.cos(l),p=Math.sin(u),f=Math.cos(u);n.push({x:e.x+d*r,y:e.y+c*r}),n.push({x:e.x+f*i,y:e.y+p*i})}return{type:"path",fill:"black",d:rQ(n)}})),bQ.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),o=360/r,i=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=iQ(o*a+i),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:rQ(t)}})),bQ.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,o=isNaN(e.width)?r/2:e.width,i=Math.min(o,r);return{type:"path",fill:"black",d:rQ(oQ(t,n,e.size,i))}})),bQ.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,o=r/2/2;let i=[{x:t.x-r,y:t.y+o},{x:t.x-r,y:t.y-o},{x:t.x+r,y:t.y-o},{x:t.x+r,y:t.y+o}];if(n){const e=iQ(90);i=i.map((n=>mQ(n,e,t)))}const a=TW(i);return a.type="rect",a.fill="black",a})),bQ.add("rect",(function(e){const{x:t,y:n,size:r}=e,o=void 0===e.width?r:e.width,i=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-o/2,y:n-i/2,width:o,height:i}}));const vQ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bQ;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==nQ[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function xQ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:o=0,preferredSize:i=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:o}=e;return"function"==typeof i?i({inner:n,outer:r,children:o,dock:this.dock()},t):i},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function SQ(e,t,n){const{require:r=[]}=t,o=t.mediator||{},{settings:i,formatter:a,scale:s,data:l,renderer:u,chart:c,dockConfig:d,mediator:p,instance:f,rect:h,style:m,registries:g,resolver:y,update:b,_DO_NOT_USE_getInfo:v,symbol:x,isVisible:S}=n;e.emit=()=>{},S&&(e.isVisible=S),Object.defineProperty(e,"settings",{get:i}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),v&&(e._DO_NOT_USE_getInfo=v),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:u}):"chart"===t?Object.defineProperty(e,"chart",{get:c}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:f}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(o).forEach((t=>{e.mediator.on(t,o[t].bind(e))}))}function wQ(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,o={};return o.displayOrder=r("displayOrder"),o.dock=r("dock"),o.prioOrder=r("prioOrder"),o.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==o.displayOrder?o.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==o.prioOrder?o.prioOrder:e.layout.prioOrder,e.layout.dock=o.dock||e.layout.dock,e.layout.minimumLayoutMode=o.minimumLayoutMode||e.layout.minimumLayoutMode,o.show=e.show,o.preferredSize=t,o}function CQ(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const o=n.on[r].bind(e);e.eventListeners.push({event:r,listener:o}),t.on(r,o)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.emit(e,...r)}}function EQ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:o,container:i,mediator:a,registries:s,theme:l,renderer:u}=t,c=yJ.mixin({});let d,p,f,h,m,g=t.settings||{},y=EW(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:KJ,n={};return{resolve:function(r){let{data:o,settings:i,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(i,a,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const c=[];if(!o||!Array.isArray(o.items)){const e={data:o,resources:u};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,i=o.items.length;r<i;r++){e={datum:o.items[r],data:o,resources:u};let i=t.resolveForItem(e,n.norm,r);i.data=o.items[r],c.push(i)}}return{settings:n.norm,items:c}}}}({chart:o}),x=!1;const S={nodes:[],chart:o,config:y.brush||{},renderer:null},w={tap:[],over:[]},C=[],E={},k=EW({},g);function R(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const o=void 0!==e[t],i=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return o&&("function"==typeof e[t]?a=e[t].call(E,...l):r&&(a=e[t])),i&&("function"==typeof g[t]?a=g[t].call(k,...l):r&&(a=g[t])),o||i||(a=n.call(E,...l)),a}}const _=R("preferredSize",(()=>0),!0),M=R("resize",(e=>{let{inner:t}=e;return t})),A=R("created"),D=R("beforeMount"),P=R("mounted"),L=R("beforeUnmount"),I=R("beforeUpdate"),q=R("updated"),T=R("beforeRender"),O=R("beforeDestroy"),N=R("destroyed"),z=e.render,F=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&C.push(JJ(S,e))}))},j=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?w.over.push(e):w.tap.push(e)}))};Object.defineProperty(S,"data",{get:()=>b});const H=y.renderer||e.renderer,B=H?u||s.renderer(H)():u||s.renderer()();"function"==typeof B.settings&&B.settings(y.rendererSettings),S.renderer=B;const $={resources:o.logger?{logger:o.logger()}:{}};let V=xQ(wQ(y,_,o.logger()),$);const W=e=>{e.key=y.key,e.element=B.element()},U=()=>{};U.dockConfig=()=>V,U.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=EW(!0,{},n,e.settings),V=xQ(wQ(y,_,o.logger()),$),S.config=y.brush||{}),y.scale&&(d=o.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=_K(y.data,{dataset:o.dataset,collection:o.dataCollection},{logger:o.logger()},o.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=o.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},U.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=M({inner:e,outer:t});h=n?B.size(n):B.size(e),k.rect=EW(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=EW(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>k.rect;const G=()=>{const e=B.renderArgs?B.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=b;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&r&&(n=MW(MW({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?S.nodes=[...e||[]]:S.nodes&&(S.nodes=[...S.nodes,...e||[]]):S.nodes=e}U.beforeMount=D,U.beforeRender=()=>{T({size:h})},U.render=()=>{const e=z.call(E,...G());J(e),B.render(e),Y=e,K=k.rect.computed},U.hide=()=>{U.unmount(),B.size({x:0,y:0,width:0,height:0}),B.clear()},U.beforeUpdate=()=>{I({settings:y,data:b})},U.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return B.render(),void(Y=null);const r=z.call(E,...G());J(r),C.forEach((e=>e.cleanUp())),C.length=0,w.tap=[],w.over=[],t&&(F(),j()),C.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:k.rect.computed,previousRect:K}),X=function(e,t,n,r){let o,{old:i,current:a}=e,{renderer:s}=t,l=[],u={nodes:[],ips:[]},c={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],f=null;const h=n.trackBy||$J,m={start(){let e={};if(i.forEach(((t,n)=>{let r=h(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),o=r.map((e=>e.data.major.value)),i=n.filter((e=>o.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>i.includes(e.data.major.value))),s=r.filter((e=>i.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(BJ(EW({},e[r],{points:n.old}),EW({},t,{points:n.current}))),l.push(EW({},e[r],{commonPoints:n.old}))}else d.ips.push(BJ(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else u.nodes.push(t),u.ips.push(BJ(EW({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(c.nodes.push(e[t]),c.ips.push(BJ(e[t],EW({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:OJ,duration:200,tweens:c.ips,nodes:[...l]}),p.push({name:"updating",easing:zJ,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:NJ,duration:200,tweens:u.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,o=e?l.filter(e).length:l.length,{isInit:i,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===i?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===o),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===o)}p.length&&(f=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(o=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,i=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),i.push(...a),i.push(...e.nodes),s.render(i),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}o&&(o=window.requestAnimationFrame(m.tick))},stop(){o&&(window.cancelAnimationFrame(o),o=!1)},inProgress:()=>!!o,get targetScene(){return f}};return m}({old:Y,current:r},{renderer:B},n,o.storage),X.start()):B.render(r),Y=r,K=k.rect.computed,B.setKey&&"string"==typeof g.key&&B.setKey(g.key)},U.updated=q,U.destroy=()=>{U.unmount(),O(f),B.destroy(),N(),f=null};const Q=e=>{S.nodes=e,C.forEach((e=>{e.isActive()&&e.update()})),B.render(e)};return SQ(E,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>V,mediator:()=>a,instance:()=>k,rect:()=>k.rect,style:()=>m,update:()=>Q,registries:()=>s,resolver:()=>v,symbol:()=>vQ(s.symbol)}),SQ(k,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>V,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(E),isVisible:()=>x}),U.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const i=o.brush(e),a=B.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let o=0;o<a.length;o++){const s=a[o];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(W(s),r.push(s),a.splice(o,1),o--)}}))}return r},U.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:B).findShapes(e);for(let e=0,t=n.length;e<t;e++)W(n[e]);return n},U.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=B.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)W(r[e]);return r},U.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];QJ({nodes:e,action:t.action||"toggle",trigger:t,chart:o,data:S.data})},U.mount=()=>{f=B.element&&B.element()?f:B.appendTo(i),B.setKey&&"string"==typeof g.key&&B.setKey(g.key),y.brush&&(F(),j()),CQ(k,c,g),CQ(E,c,e),x=!0},U.mounted=()=>P(f),U.unmount=()=>{[k,E].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,c)})),w.tap=[],w.over=[],C.forEach((e=>{e.cleanUp()})),C.length=0,L(),x=!1},U.onBrushTap=e=>{w.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return ZJ({collisions:eQ(t,n,r.renderer),t:n,config:r,action:tQ(n.action,t,"toggle")})})({e:e,t:t,config:S})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},U.onBrushOver=e=>{w.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return ZJ({collisions:eQ(t,n,r.renderer),t:n,config:r,action:tQ(n.action,t,"set")})})({e:e,t:t,config:S})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},U.def=E,U.ctx=k,U.renderer=()=>B,U.set({settings:g}),A(),U}function kQ(e){const t=EW(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===o[t])return n;o=o[t]}return o}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===i[t]&&(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n?i[o]=n:delete i[o]}(t,e,n)};return n}function RQ(e,t,n){const r=sQ(function(e,t){const n=hQ(e,t)/hQ(t,t)||1;return{x:t.x*n,y:t.y*n}}(lQ(n,e),lQ(t,e)),e);return r}function _Q(e,t,n){return fQ(e,n)+fQ(t,n)-fQ(e,t)<1e-12}function MQ(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function AQ(e){return e.x1===e.x2&&e.y1===e.y2}function DQ(e){return e.width<=0||e.height<=0}function PQ(e){return e.r<=0}function LQ(e){return e.edges.length<=2}function IQ(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=jQ(e,OW(t.edges[r])),!0===n)return!0;return!1}function qQ(e,t){let n=!1;const{numPolygons:r,polygons:o}=t;for(let t=0;t<r;t++){if(n=KQ(e,o[t]),!0===n)return!0}return!1}function TQ(e,t){if(PQ(e))return!1;return pQ({x:e.cx,y:e.cy},t)<=e.r**2}function OQ(e,t){if(DQ(t)||PQ(e))return!1;const n=t.width/2,r=t.height/2,o=t.x+n,i=t.y+r,a=e.r,s=e.cx,l=e.cy,u=Math.abs(s-o),c=Math.abs(l-i);if(u>n+a||c>r+a)return!1;if(u<=n||c<=r)return!0;return(u-n)**2+(c-r)**2<=a**2}function NQ(e,t){if(PQ(e)||AQ(t))return!1;const[n,r]=IW(t);if(TQ(e,n)||TQ(e,r))return!0;const o={x:e.cx,y:e.cy},i=RQ(n,r,o);return pQ(i,o)<=e.r**2&&_Q(n,r,i)}function zQ(e,t){if(LQ(t)||PQ(e))return!1;if(FQ(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(NQ(e,OW(t.edges[r])))return!0}return!1}function FQ(e,t){if(LQ(e)||!VQ(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.vertices;let i,a,s,l,u;for(i=!1,l=-1,a=o.length,s=a-1;++l<a;s=l){if(o[l].x===n&&o[l].y===r)return!0;if(o[l].y===o[s].y&&o[l].y===r&&(n-o[l].x)*(n-o[s].x)<=0)return!0;if(o[l].y<r&&r<=o[s].y||o[s].y<r&&r<=o[l].y){if(u=(o[s].x-o[l].x)*(r-o[l].y)/(o[s].y-o[l].y)+o[l].x,n===u)return!0;n<u&&(i=!i)}}return i}function jQ(e,t){if(LQ(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(UQ(t,OW(e.edges[n])))return!0}const[n,r]=IW(t);return FQ(e,n)||FQ(e,r)}function HQ(e,t){if(LQ(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(WQ(t,OW(e.edges[n])))return!0}const[n,r,o,i]=qW(t);return FQ(e,n)||FQ(e,r)||FQ(e,o)||FQ(e,i)}function BQ(e,t){return!DQ(e)&&!DQ(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function $Q(e,t){if(DQ(e)||DQ(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>VQ(e,t)))}function VQ(e,t){return!DQ(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function WQ(e,t){if(AQ(t)||DQ(e))return!1;const[n,r]=IW(t);if(VQ(e,n)||VQ(e,r))return!0;const o=qW(e);let i=o.length;for(let e=0;e<i;e++){if(UQ(OW([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function UQ(e,t){const[n,r]=IW(e),[o,i]=IW(t),a=cQ(r,n),s=dQ(r,n),l=cQ(i,o),u=dQ(i,o),c=cQ(n,o),d=dQ(n,o);let p=u*a-l*s;const f=l*d-u*c,h=a*d-s*c;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===u)return!1;if(0===p){if(0===f&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=dQ(o,n)/s,g=dQ(i,n)/s}else m=(o.x-n.x)/a,g=(i.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=f/p;return p=h/p,y>=0&&y<=1&&p>=0&&p<=1}function GQ(e,t){if(AQ(e))return!1;const[n,r]=IW(e);return _Q(n,r,t)}function YQ(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!BQ(n,r)&&($Q(n,r)?IQ(e,t):IQ(t,e))}function KQ(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!BQ(n,r)&&($Q(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++)if(n=YQ(t,o[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=QQ(e,OW(t.edges[r])),!0===n)return!0;return!1}(e,t))}function XQ(e,t){if(PQ(e))return!1;if(JQ(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],o=n.edges.length;for(let t=0;t<o;t++){if(NQ(e,OW(n.edges[t])))return!0}}return!1}function JQ(e,t){if(!VQ(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.numPolygons;let i,a,s,l,u,c,d=!1;for(a=0;a<o;a++)for(i=e.vertices[a],u=-1,s=i.length,l=s-1;++u<s;l=u){if(i[u].x===n&&i[u].y===r)return!0;if(i[u].y===i[l].y&&i[u].y===r&&(n-i[u].x)*(n-i[l].x)<=0)return!0;if(i[u].y<r&&r<=i[l].y||i[l].y<r&&r<=i[u].y){if(c=(i[l].x-i[u].x)*(r-i[u].y)/(i[l].y-i[u].y)+i[u].x,n===c)return!0;n<c&&(d=!d)}}return d}function QQ(e,t){const[n,r]=IW(t);if(JQ(e,n)||JQ(e,r))return!0;const{numPolygons:o,polygons:i}=e;for(let e=0;e<o;e++){const n=i[e];for(let e=0,r=n.edges.length;e<r;e++){if(UQ(t,OW(n.edges[e])))return!0}}return!1}function ZQ(e,t){const[n,r,o,i]=qW(t);if(JQ(e,n)||JQ(e,r)||JQ(e,o)||JQ(e,i))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(WQ(t,OW(n.edges[e])))return!0}}return!1}const eZ=/^\$/,tZ="@extend";function nZ(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function rZ(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&nZ(e),eZ.test(r)?(n.push(e),rZ(r,t,n)):r}let r=e;const o=EW(!0,{},t,e),i={};if(e[tZ]){const i=e[tZ];-1!==n.indexOf(i)&&nZ(i);let a=n.slice();a.push(i),r=EW(!0,{},rZ(o[i],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===tZ||eZ.test(e))return;i[e]=r[e];let a=i[e];eZ.test(a)&&a in o?(-1!==n.indexOf(a)&&nZ(a),t.push(a),a=o[a],"object"==typeof a||eZ.test(a)&&a in o?i[e]=rZ(a,o,t):i[e]=a):"object"==typeof a&&(i[e]=rZ(a,o,t))})),i}function oZ(e,t){return rZ(e,t,[])}function iZ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},o={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const o=r.sizes;for(let e=0;e<o.length;e++)if(n<=o[e])return r.colors[e];return r.colors[o.length-1]})(e,n),setPalettes:r,style:e=>oZ(e,n),setStyle:t=>{n=EW({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}function aZ(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function sZ(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return EW(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function lZ(e,t,n,r,o){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(o)?0:o}}function uZ(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let o,i=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(i)?i&&!isNaN(i.size)&&(i.width=i.size,i.height=i.size):i={width:i,height:i},o="top"===r||"bottom"===r?i.height:"right"===r||"left"===r?i.width:Math.max(i.width,i.height),e.cachedSize=Math.ceil(o),e.edgeBleed=i.edgeBleed||0}return e.cachedSize}function cZ(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function dZ(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function pZ(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const o=e.height-(t.y+t.height);o<n.bottom&&(t.height-=n.bottom-o)}function fZ(e,t,n,r,o){const i=EW({},t),a=EW({},n);cZ(i,r),dZ(a,r),pZ(e,i,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),o=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=o}(e,i,o);return!!s&&(cZ(t,r),dZ(n,r),!0)}function hZ(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function mZ(e){return TW([].concat(...e.map(qW)))}function gZ(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:o,translation:i}=e;const a=lZ(r.x,r.y,r.width,r.height),s=lZ(r.x,r.y,r.width,r.height),l={},u=t.slice(),c=u.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?u.indexOf(e)-u.indexOf(t):n})).forEach((e=>{let t={},u={};switch(e.config.dock()){case"top":t.height=u.height=e.cachedSize,t.width=n.width,u.width=a.width,t.x=n.x,u.x=a.x,t.y=u.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,u.x=a.x,t.y=u.y=a.y+a.height,t.width=n.width,u.width=a.width,t.height=u.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=u.x=s.x-e.cachedSize,t.y=n.y,u.y=s.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=u.x=s.x+s.width,t.y=n.y,u.y=s.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=u.x=r.x,t.y=u.y=r.y,t.width=u.width=r.width,t.height=u.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=mZ(n.map((e=>e.outerRect))),u=mZ(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:u,outerRect:t}),function(e,t,n,r){const o={x:r.width/n.width,y:r.height/n.height},i={left:0,top:0};if(n.preserveAspectRatio){const e=o.x<o.y,t=Math.min(o.x,o.y);o.x=t,o.y=t;const a=e?"height":"width",s=(r[a]-n[a]*o.x)*n.align;i.left=e?0:s,i.top=e?s:0}e.scaleRatio=o,e.margin=i,t.scaleRatio=o,t.margin=i,n.scaleRatio=o,n.margin=i}(u,t,n,o),u.edgeBleed=e.edgeBleed,u.computed=hZ(u),t.edgeBleed=e.edgeBleed,t.computed=hZ(t),u.x+=i.x,u.y+=i.y,t.x+=i.x,t.y+=i.y,e.comp.resize(u,t),e.cachedSize=void 0,e.edgeBleed=void 0})),c}function yZ(e,t,n){const r=e.layoutModes||{},o=t.minimumLayoutMode();let i=t.show();return i&&"object"==typeof o?i=r[o.width]&&r[o.height]&&n.width>=r[o.width].width&&n.height>=r[o.height].height:i&&void 0!==o&&(i=r[o]&&n.width>=r[o].width&&n.height>=r[o].height),i}function bZ(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function vZ(e){let t=sZ(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:o}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),aZ(r),aZ(n),{logicalContainerRect:r,containerRect:n}}(e,t),[i,a]=function(e,t,n){const r=[],o=[];for(let i=0;i<e.length;++i){const a=e[i];bZ(a);let s=a.dockConfig;const l=a.key,u=s.dock(),c=/@/.test(u)?u.split(",").map((e=>e.replace(/^\s*@/,""))):[];yZ(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:c}):o.push({comp:a,key:l,config:s,referencedDocks:c})}return[r,o]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:o}=e;const i=lZ(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];uZ(n,i,t),fZ(t,i,a,n,o)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const o=r.referencedDocks.every((e=>t.some((t=>t.key===e))));o&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),pZ(t,i,a),i}({layoutRect:r,visible:i,hidden:a,settings:t}),l=gZ({visible:i,layoutRect:r,reducedRect:s,containerRect:o,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=lZ();e.comp.resize(t,t)})),{visible:i.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=sZ(e)},n}const xZ=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},SZ=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(MW(MW({},n),{},{children:SZ(e.children)}))}})),wZ=(e,t)=>({visible:[],hidden:t,ordered:[]}),CZ=e=>(t,n)=>{var r;const o=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(MW(MW({},t),{},{children:SZ(e.children)}))}})),i=e=>n[e.index],{visible:a=o,hidden:s=[],ordered:l=a}=null!==(r=e(t,o))&&void 0!==r?r:{};return{visible:a.map(i),hidden:s.map(i),ordered:l.map(i)}},EZ=e=>"function"==typeof e?CZ(e):(e=>{const t=vZ(e);return CZ(((e,n)=>t.layout(e,n)))})(e);function kZ(e,t,n){const r=t.left-n.left,o=t.top-n.top,i=NW(e),a=EW(!0,{},e);switch(i){case"circle":a.cx+=r,a.cy+=o;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=o}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=o}}break;case"line":a.x1+=r,a.y1+=o,a.x2+=r,a.y2+=o;break;case"point":case"rect":a.x+=r,a.y+=o}return a}function RZ(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const o=e.children[Math.max(0,n)];if(r===o)return;const i=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==o?(e.insertBefore(r,o),i&&i.forEach((t=>{e.insertBefore(t,r)}))):(i&&i.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function _Z(e,t){let{element:n,data:r=[],settings:o={},on:i={}}=e;const a=t.registries,s=t.logger,l=iZ(t.style,t.palettes),u=[],c=EW({},e),d=function(){const e={};return yJ.mixin(e),e}();let p=[],f=null,h=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const S=function(e){let{createComponent:t}=e;const n={};let r=[],o=[];const i=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>i(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],o=t.find((e=>r.hasKey&&r.key===e.key));o?r.children&&o.components&&s(r.children,o.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:s}=e;return s.map((e=>{const s=xZ(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:o,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),s)):i(e)})).filter((e=>!!e))},u=e=>{let{components:t,hidden:n,layoutFn:r,ordered:o,rect:i,visible:a}=e;const{visible:s,hidden:l,ordered:c}=r(i,t);a.push(...s),n.push(...l),o.push(...c),s.forEach((e=>{if(e.children){var t,r;const i=EZ(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});u({components:e.children,hidden:n,layoutFn:i,ordered:o,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&u({components:e.children,hidden:n,layoutFn:wZ,ordered:o,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],o=[]},n.findComponentByKey=e=>xZ(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],i=[],a=[],s=EZ(t);return u({components:o,hidden:i,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:i,ordered:a}},n.set=e=>{let{components:t}=e;o=t.map((e=>i(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:i,scales:a}=e;s(o,t),o=l({compList:o,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:EQ(a.component(e.type),{settings:e,chart:c,mediator:d,registries:a,theme:l,container:n}),settings:EW(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function w(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let o;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=r?e[t].call(c,...a):n.call(c,...a),o}}const C=()=>{let e;o.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=o.dockLayout):e=o.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return S.layout({layoutSettings:e,rect:t})},E=w("created"),k=w("beforeMount"),R=w("mounted"),_=w("beforeUpdate"),M=w("updated"),A=w("beforeRender"),D=w("beforeDestroy"),P=w("destroyed"),L=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:o={},scroll:i={}}=t;y=function(e,t){let{types:n,logger:r}=t;const o={},i=[];return Array.isArray(e)?i.push(...e):(r.warn('Deprecated: "data-source" configuration"'),i.push(e)),i.forEach(((e,t)=>{let i=n(e.type);if(i){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=i({key:n,data:e.data,config:e.config});o[n]=a}})),e=>e?o[e]:o[Object.keys(o)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_K;const o={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");o[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in o))throw new Error("Unknown data collection: ".concat(t));"function"==typeof o[t]&&(o[t]=o[t]());let r=o[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=EW(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const u={theme:l,logger:s};f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fJ;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"scale"in i&&e[i.scale]&&(a=i.scale),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i,t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(o,{dataset:y,collection:b},MW(MW({},u),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:MK;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"formatter"in i&&e[i.formatter]?a=i.formatter:"object"==typeof i&&"type"in i&&e[i.type]&&(a=i.type),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i||{},t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(r,{dataset:y,collection:b},MW(MW({},u),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=vJ(e[r],t?t[r]:null));return n}(i,m)};function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(c,d,n);return r.set(e),r}))}const q=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,o="clientY"in e?e.clientY:e.y,i={x:r-t.left,y:o-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();VQ(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},i)&&a.push(e)})),a},T=()=>{if(u.length||!n)return;Object.keys(i).forEach((e=>{const t=i[e].bind(c);n.addEventListener(e,t),u.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=q(e)},r=t=>{const n=e.comps||q(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=AW(e),r=n?e.changedTouches[0]:e,o=Date.now()-t.time,i=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&i<=12&&a<=12&&o<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},o=[];o.push({key:"mousedown",listener:t}),o.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(o.push({key:"touchstart",listener:t}),o.push({key:"touchend",listener:r})),o.push({key:"mousemove",listener:e=>{const t=q(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),o.forEach((e=>{n.addEventListener(e.key,e.listener),u.push(e)}))},O=()=>{u.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),u.length=0},N=()=>{n.innerHTML="",(()=>{const{components:e=[]}=o;A(),L(r,o),S.set({components:e});const{visible:t,hidden:i,ordered:a}=C();p=t,i.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),RZ(n,a)})(),T(),I(o.interactions)};return c.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(o=e.settings,I(e.settings.interactions)),_(),L(r,o);const{formatters:n,scales:i,components:a=[]}=o;S.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:i}),S.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),S.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),C()},c.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:i=[]}=e;let a;e.data&&(r=e.data),e.settings&&(o=e.settings,I(e.settings.interactions)),_(),L(r,o,{partialData:t});const{formatters:s,scales:l,components:u=[]}=o;S.update({components:u,data:r,excludeFromUpdate:i,formatters:s,scales:l}),S.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),S.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const c=[],d=[];let f;if(t)S.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&c.push(e)})),f=c;else{const{visible:e,hidden:t,ordered:n}=C();p=e,f=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?c.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),f.forEach((e=>e.instance.beforeRender())),f.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||RZ(n,a),d.forEach((e=>e.instance.mounted())),c.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),M()},c.destroy=()=>{D(),S.destroy(),O(),I(),delete c.update,delete c.destroy,P()},c.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const i=r.instance.getBrushedShapes(e,t,n);o=[...o,...i]})),o},c.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},c.componentsFromPoint=e=>q(e).map((e=>e.instance.ctx)),c.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const o=n.getBoundingClientRect();let i=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));i=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=i.length-1;n>=0;n--){const a=i[n],s=kZ(e,o,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),u=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&u)return r}return r},c.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let o=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(o,t.components[n])}))}},c.scroll=function(){return function(e,t){return t[e]||(t[e]=bJ()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},c.dataset=e=>y(e),c.dataCollection=e=>b(e),c.scales=function(){return f.all()},c.formatters=function(){return h.all()},c.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return v[e]||(v[e]=TJ()),v[e]},c.scale=function(e){return f.get(e)},c.formatter=function(e){return h.get(e)},c.toggleBrushing=function(e){x=void 0!==e?e:!x},c.component=e=>{const t=S.findComponentByKey(e);return null==t?void 0:t.instance.ctx},c.logger=()=>s,c.theme=()=>l,c.storage=kQ({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(c,"interactions",{get:()=>({instances:g,on(){T(),g.forEach((e=>e.on()))},off(){O(),g.forEach((e=>e.off()))}})}),E(),n&&(k(),N(),R(n),c.element=n),c}const MZ=e=>{let t=HU(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var AZ=HU();function DZ(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}const PZ=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const LZ=e=>{let{key:t,data:n,cache:r,config:o}=e;if(!n)return;let i=n;"string"==typeof i&&(i=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),o=r[0],i=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(o){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(o&&i){if(n.test(o)&&n.test(i)&&o.split(n).length===i.split(n).length){a=n;break}}else n.test(o)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:o})),Array.isArray(i)&&function(e){let t,{source:n,data:r,cache:o,config:i}=e,a=r;const s=i&&i.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let u,c=t;c=s&&"function"==typeof s.fields?s.fields(c.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?u=c.map((()=>[])):(u={},c.forEach((e=>{u[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,c):a[e];if(t)if(Array.isArray(t))for(let e=0;e<c.length;e++)u[e].push(t[e]);else for(let e=0;e<c.length;e++)u[c[e].key].push(t[c[e].key])}const d=Array.isArray(u)?e=>u[e]:e=>u[c[e].key];for(let e=0;e<c.length;e++){const t=d(e),r=PZ(t),i=r.length>0,a=i?"measure":"dimension",s=i?Math.min(...r):NaN,l=i?Math.max(...r):NaN;o.fields.push(fK(EW({source:n,key:e,title:c[e].title,values:t,min:s,max:l,type:a},c[e]),{value:c[e].value,label:c[e].label}))}}({data:i,cache:r,source:t,config:o})};function IZ(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},o={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),o=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:i,main:a}=bK(e,t),s=Object.keys(i),l=!!e.trackBy,u=typeof e.trackBy,c={},d=[],p=n.items(),f=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=DZ(a,n,{key:o});s.forEach((e=>{const a=i[e];let s=a.field?a.field.items()[t]:n;r[e]=DZ(a,s,{key:o})})),l&&SK({cfg:e,itemData:n,obj:r,target:d,tracker:c,trackType:u}),f.push(r)}r=l?[...r,...xK(d,{main:a,propsArr:s,props:i})]:[...r,...f]}})),r}(e,o),hierarchy:()=>null};return LZ({key:e,data:t,config:n,cache:r}),o}IZ.util={normalizeConfig:bK,collect:xK,track:SK};const qZ=HU();qZ.default("matrix"),qZ("matrix",IZ),qZ("default",IZ);const TZ=HU();function OZ(e,t,n){return Math.max(e,Math.min(t,n))}function NZ(e){let{item:t,value:n,boxCenter:r,rendWidth:o,rendHeight:i,flipXY:a,symbol:s}=e,l="x",u="y",c=o,d=i,p=n<.5?90:-90;return a&&(l="y",u="x",c=i,d=o,p=n<.5?180:0),s(EW({},t.oob,{[l]:r*c,[u]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function zZ(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:o,rendHeight:i,flipXY:a}=e,s="x",l="y",u="width",c="height",d=o,p=i;a&&(s="y",l="x",u="height",c="width",d=i,p=o);const{actualDiff:f,actualLow:h}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:o=1}=e;const i=Math.max(t,n),a=Math.min(t,n),s=OZ(-.1,1.2,i),l=OZ(-.1,1.2,a),u=s*o-l*o,c=Math.max(r,u),d=(c-u)/2;return{actualDiff:c,startModifier:d,actualLow:l*o-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return EW({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[c]:f,[u]:n*d,data:t.data||{},collider:{type:null}})}function FZ(e){let{item:t,from:n,to:r,boxCenter:o,rendWidth:i,rendHeight:a,flipXY:s}=e,l="x1",u="y1",c="x2",d="y2",p=i,f=a;return s&&(l="y1",u="x1",c="y2",d="x2",p=a,f=i),EW({},t.line,{type:"line",[d]:Math.floor(n*f),[l]:o*p,[u]:Math.floor(r*f),[c]:o*p,data:t.data||{},collider:{type:null}})}function jZ(e){let{item:t,key:n,position:r,width:o,boxCenter:i,rendWidth:a,rendHeight:s,flipXY:l}=e,u="x1",c="y1",d="x2",p="y2",f=a,h=s;l&&(u="y1",c="x1",d="y2",p="x2",f=s,h=a);const m=o/2;return EW({type:"line"},t[n],{[c]:Math.floor(r*h),[u]:(i-m)*f,[p]:Math.floor(r*h),[d]:(i+m)*f,r:m*f,cx:i*f,cy:r*h,width:o*f,data:t.data||{},collider:{type:null}})}function HZ(e,t,n){const{width:r,maxWidthPx:o,minWidthPx:i}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(o)?n:o/n);return s=isNaN(i)?s:Math.max(i/n,s),s*a}TZ("native",(function(e,t,n){let r,o,i={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(i)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(i);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function u(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return o},set(e){!function(e){o=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),u(),s&&l()},off(){s=!1,u()},on(){s=!0,0===a.length&&l()},destroy(){u(),i=null,r=null}}}));const BZ={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},$Z=Object.keys(BZ),VZ={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,o="horizontal"===this.settings.settings.orientation,{style:i,resolver:a,symbol:s}=this,l=$Z.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),u={};l.forEach((e=>u[e]=BZ[e]));const c=function(e){let{keys:t,data:n,defaultSettings:r,style:o,settings:i,width:a,height:s,resolver:l}=e;const u=EW(!0,{},r||{},o||{}),c={major:"horizontal"===i.orientation?s:a,minor:"horizontal"===i.orientation?a:s},d=i.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:EW(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:EW(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):l.resolve({data:n,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{},h={};["start","end","min","max","med"].forEach((e=>{(f[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:f.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:EW(!0,{},h,f)})};for(let e=0,r=t.length;e<r;e++)i[m]&&!1===i[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:u[m],settings:i[m],scaled:c}));return g}({keys:l,data:t,defaultSettings:u,style:i,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=c,f=function(e){let{width:t,height:n,flipXY:r,resolved:o,keys:i,symbol:a}=e;const s=[],l=o.major.items;if(!l.length)return s;const u=t,c=n,d=r?n:t,p=o.major.settings,f=["start","end","min","max","med"].filter((e=>void 0!==o.minor.settings[e])),h=f.length,m=i.filter((e=>"oob"!==e));let g,y,b,v,x,S,w,C,E;const k=i?i.length:0,R=m?m.length:0,_={box:function(){b.box&&DW(b.start)&&DW(b.end)&&g.push(zZ({item:b,boxWidth:v,boxPadding:x,rendWidth:u,rendHeight:c,flipXY:r}))},line:function(){DW(b.min)&&DW(b.start)&&g.push(FZ({item:b,from:b.min,to:b.start,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r})),DW(b.max)&&DW(b.end)&&g.push(FZ({item:b,from:b.max,to:b.end,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r}))},median:function(){b.median&&DW(b.med)&&g.push(jZ({item:b,key:"median",position:b.med,width:v,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;DW(b.min)&&g.push(jZ({item:b,key:"whisker",position:b.min,width:e,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r})),DW(b.max)&&g.push(jZ({item:b,key:"whisker",position:b.max,width:e,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r}))}}};function M(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[f[r]],DW(e)&&(t<e&&(t=e),n>e&&(n=e));w=t<0&&t!==-Number.MAX_VALUE,C=n>1&&n!==Number.MAX_VALUE,E=w||C}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let f=null,h=null;void 0!==p.binStart?(f=t.binStart,h=t.binEnd,y=p.binStart.scale):(y=p.major.scale,f=y?t.major:0);let A=0;y?y.bandwidth?(A=y.bandwidth(),f-=A/2):A=h-f:A=1,b=EW({},{major:f,majorEnd:h},o.minor.items[e]);for(let t=0;t<k;t++)b[i[t]]=o[i[t]].items[e];if(v=HZ(A,b,d),x=(A-v)/2,S=x+b.major+v/2,M(),E)b.oob&&(w?g.push(NZ({item:b,value:0,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})):C&&g.push(NZ({item:b,value:1,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})));else for(let e=0;e<R;e++)b[m[e]]&&!1===b[m[e]].show||_[m[e]]();const D={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(D)}return s}({width:n,height:r,flipXY:o,resolved:c,keys:l,symbol:s});return f}};const WZ={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},UZ=/px$/,GZ={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},YZ={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function KZ(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function XZ(e,t,n,r){let{width:o,height:i}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=UZ.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);PW(a)&&(t=WZ,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=GZ.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),u=MW(MW({},l),{},{type:s,label:e.label,x:e.x*o,y:e.y*i,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(u.width=t.width);const c=r(u);return c.data=e.data,c}))}const JZ={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:EW({},GZ,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:o}=this.rect,i=EW({},YZ,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,o){const i=KZ(e?e.scale:void 0,n),a=KZ(t?t.scale:void 0,r);let s=Math.min(i.value*o[i.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*o[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(i.value*o[i.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*o[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:o.maxPx,minGlobal:o.minPx}}(n.settings.x,n.settings.y,r,o,i);return XZ(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const QZ={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function ZZ(e,t,n,r){let{x:o,y:i,width:a,height:s}=t;const l=cU(),u={x:o+a/2,y:i+s/2},c=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const o=n[t];o.type="path";const i=d*o.outerRadius,a=c*o.innerRadius,s=p*o.cornerRadius;l.innerRadius(a),l.outerRadius(i),l.cornerRadius(s),o.arcDatum=e;const f=l.centroid(e),h=o.offset?function(e,t,n,r){let[o,i]=e;const a=Math.sqrt(o*o+i*i);o/=a,i/=a;const s=n-r;return{x:o*t*s,y:i*t*s}}(f,o.offset,i,a):{x:0,y:0};return o.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(u.x,", ").concat(u.y,")"),o.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:i,cornerRadius:s,offset:{x:u.x+h.x,y:u.y+h.y}}},o}))}function e0(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const t0={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],o=this.settings.settings,{items:i}=this.resolver.resolve({data:t,defaults:EW({},QZ,this.style.slice),settings:o.slice});let a=0;for(let e=0,t=i.length;e<t;e++){const t=e0(o,i[e]);t>0&&i[e].outerRadius>=i[e].innerRadius&&(n.push(t),r.push(i[e]),a+=t)}const s=function(){var e=yU,t=gU,n=null,r=WW(0),o=WW(nU),i=WW(0);function a(a){var s,l,u,c,d,p=a.length,f=0,h=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(nU,Math.max(-nU,o.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,i.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<p;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(f+=d);for(null!=t?h.sort((function(e,n){return t(m[e],m[n])})):null!=n&&h.sort((function(e,t){return n(a[e],a[t])})),s=0,u=f?(y-p*v)/f:0;s<p;++s,g=c)l=h[s],c=g+((d=m[l])>0?d*u:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:c,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:WW(+e),a):r},a.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:WW(+e),a):o},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:WW(+e),a):i},a}().sortValues(null);s.startAngle(o.startAngle),s.endAngle(o.endAngle),s.padAngle(o.padAngle);return ZZ(s(n),EW({},this.rect,{x:0,y:0}),r,a)}};const n0=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),o=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(o>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class r0{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,o=n?this.width:this.height;e=e.fn({width:r,height:o,flipXY:n});const i=Object.keys(e);for(let r=0,o=i.length;r<o;r++){let o=i[r];t[r0.evaluateKey(o,n)]=e[o]}}else{const r=Object.keys(e);for(let o=0,i=r.length;o<i;o++){let i=r[o];const a=r0.evaluateKey(i,n),s=this.transposeCoordinate(a,e[i],n);t[a]=s}}return r&&n0(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function o0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new r0(...t)}function i0(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const a0={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=o0(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,GJ(this,"x",this.rect.width),GJ(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=EW({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=EW({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=i0(this.x,this.rect.width),this.lines.y=i0(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>EW(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),o=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:o,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,o;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(o=n.data)||void 0===o?void 0:o.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function s0(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function l0(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e+=o?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return t+=o?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function u0(e,t,n){return e<t||e>n}function c0(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function d0(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function p0(e){var t,n;let{chart:r,blueprint:o,renderer:i,p:a,settings:s,items:l,slopeLine:u}=e,c=!0,d=!1,p=!1,f=!1,h=!1,m=EW(!0,{},s.style.line,a.line||{}),g=EW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=u?o.processItem({type:"line",x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):o.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==u||!u.slope||0===u.slope)){const e=EW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},u="";t=c0(a,r),!1!==a.label.showValue&&(t?u=" (".concat(t(a.value),")"):a.scale&&(u=" (".concat(a.value,")"))),u&&(n=i.measureText({text:u,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=i.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,b=d0(a.flipXY?e.vAlign:e.align),v=d0(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*o.width,e.maxWidthPx),S=g.height+2*y,w=a.flipXY?S:x,C=a.flipXY?x:S;if(p=o.processItem({fn:t=>{let{width:n,height:r}=t,i=a.position*n-(a.flipXY?S:x)*(1-b);i=a.flipXY?i:Math.max(i,0);return{type:"rect",x:i,y:Math.max(Math.abs(v*r-C*v),0),width:a.flipXY?w:Math.min(w,o.width-i),height:C,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),p.x<-1||p.x+p.width>o.width+1||p.y<-1||p.y+p.height>o.height+1)p=void 0;else{f={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+y,y:p.y+p.height/2+g.height/3,maxWidth:p.width-2*y-n.width,anchor:"start"},u&&(h={type:"text",text:u||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+3+(p.width-(n.width+2*y)),y:f.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?BQ(p,t)&&(c=!1):"line"===t.type&&a.flipXY===t.flipXY&&WQ(p,t)&&(c=!1)}}}if(d&&l.push(d),u&&0!==u.slope&&(!1!==(null===(t=u.label)||void 0===t?void 0:t.show)||!1!==(null===(n=u.label)||void 0===n?void 0:n.showValue))){var y,b,v;let e,t;const n=120;let s=!1!==(null===(y=u.label)||void 0===y?void 0:y.show)?null===(b=u.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(v=u.label)||void 0===v?void 0:v.showValue)){var x;const t=c0(a,r),n=t?t(u.value):u.value;e="(".concat(u.slope,"x + ").concat(n,")"),s+=null!==(x=u.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var S,w,C;const e=i.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=o.max())return!0}else if(t<0&&r.min()*t+n>=o.max())return!0;return!1}(r,u.slope,u.value)?function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});return r((o.max()-n)/t)}(r,u.slope,u.value):void 0,c=void 0===a||u.isRtl?g.padding:3*g.padding,p=void 0!==a||u.slope>0?3*g.padding:g.padding,f=function(e,t,n,r,o,i){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*i.padding:2*i.padding,e.isRtl,n*o.width+a;if(1===n)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding);if(n>.8)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding)}else if(e.slope>0)return t.x2-(r.width+2*i.padding);return e.isRtl?t.x1-(r.width+2*i.padding):t.x1}(u,d,a,e,o,g),h=Math.min(d.y1,d.y2);null!==(S=u.label)&&void 0!==S&&S.stroke&&(t={type:"rect",x:u.isRtl?Math.max(f,c)-2:Math.max(f,c)+2,y:Math.abs(Math.max(h,p)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(w=null===(C=u.label)||void 0===C?void 0:C.stroke)&&void 0!==w?w:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(f,c)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,p)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,o){for(let i=0,a=e.length;i<a;i++){const a=e[i];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+o)return!0}return!1})(l,y,e,c,p)||(t&&l.push(t),l.push(y))}}c&&p&&f&&(l.push(p,f),h&&l.push(h))}function f0(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function h0(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function m0(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function g0(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const y0={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=o0(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(h0).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=m0(t,e.value);return EW(e,{scale:t,position:n})}return EW(e,{position:e.value})})),this.lines.y=this.lines.y.filter(h0).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=m0(t,e.value);return EW(e,{scale:t,position:n,flipXY:!0})}return EW(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(f0(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(f0(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let o;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),i=e.min(),a=e.max(),s=n.min(),l=n.max();o=MW(MW({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const u=i*r.slope+r.value,c=a*r.slope+r.value,d=(s-r.value)/r.slope,p=(l-r.value)/r.slope;let f=[];u0(u,s,l)||(f[0]={x:m0(e,i),y:m0(n,u)}),u0(d,i,a)||(f[1]={x:m0(e,d),y:1}),u0(c,s,l)||(f[2]={x:m0(e,a),y:m0(n,c)}),u0(p,i,a)||(f[3]={x:m0(e,p),y:0});const h=f.filter((e=>!!e)).length;if(h>2&&function(e){g0(e[0],e[1])&&(e[1]=void 0),g0(e[1],e[2])&&(e[2]=void 0),g0(e[2],e[3])&&(e[3]=void 0),g0(e[3],e[0])&&(e[3]=void 0)}(f),f=f.filter((e=>!!e)),f.length<2)return void t["y".concat(u>l?0:1)].push(f0(r));o.x1=f[0].x,o.y1=f[0].y,o.x2=f[1].x,o.y2=f[1].y}else o=void 0;p0({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:o})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:o}=e;const i=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=i.length;e<r;e++){const r=i[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),i=a.padding.x+a.width,l=a.padding.y+a.width,u="bottom";u=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let c=t.processItem({fn:t=>{let{width:r,height:o}=t,c=e*r+("1"===e?-i:i),d=n?l:o-l;return"arc"===a.type?{type:"path",d:s0(n?d:c,n?c:d,a.width,u),x:c,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:c,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=c.cx||c.x,p=c.cy||c.y;const f=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),h=f.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:l0(d,p,a.width,u),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};o.push(c,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function b0(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){EW(e,t.style)}(t,e),t}function v0(e){return"string"==typeof e||"number"==typeof e?e:"-"}function x0(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),o=Math.max(n.stepSize/2,t.boundingRect.height/2),i="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),u=[{x:t.x-o,y:l},{x:t.x+o,y:l}].map((e=>mQ(e,r,{x:t.x,y:t.y}))),c={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[c,d]:[d,c];u.push(...p),t.collider={type:"polygon",vertices:u}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const o=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=o>0?r.width-o:r.width;const i=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=i>0?r.height-i:r.height}(e,t,n)}function S0(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const o=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-o)*n}return r}function w0(e,t){var n,r;const o={type:"text",text:v0(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(o.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+S0(t,!1),o.y="top"===t.align?t.innerRect.height:0,o.anchor=t.stepSize?"start":"middle",o.x+=isNaN(t.style.offset)?0:+t.style.offset):(o.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+S0(t,!0),o.x="left"===t.align?t.innerRect.width:0,o.anchor="left"===t.align?"end":"start",o.baseline=t.stepSize?"text-before-edge":"central",o.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(o,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,o=Math.min(t.maxWidth/2,t.textRect.width/2),i=e.x-o,a=e.x+o;i<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,o=t.maxHeight/2,i=e.y-o,a=e.y+o;i<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(o,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(o,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const o=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+o>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-o<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(o,t),function(e,t){e.boundingRect=t.textBounds(e)}(o,t),x0(e,o,t),o}function C0(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){EW(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function E0(e){return!e.isMinor&&e.position>=0&&e.position<=1}function k0(e){let{rect:t,state:n,majorTicks:r,measure:o,horizontal:i}=e;return i?function(e){let{majorTicks:t,measureText:n,rect:r,state:o}=e;const i="layered"===o.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(i*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:o,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const o=r.height,i=n("M").height;return!(t.length<2)&&o*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:o,rect:t})}function R0(e){let{value:t,maxValue:n,minValue:r,range:o,modifier:i}=e;return isNaN(o)||isNaN(i)||(t=o*i),t>n&&(t=n),t<r&&(t=r),t}function _0(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const u={left:0,top:0,right:0,bottom:0},{maxLengthPx:c,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,f=p?n.inner.width:n.inner.height,h=i.ticks({settings:a,distance:f,formatter:r}).filter(E0),m=e=>{const t=o({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=R0({value:t.width,maxValue:c,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:o,settings:i}=e;const a=i.labels.maxGlyphCount,s="layered"===o.labels.activeMode?2:1,l=i.labels.tiltThreshold?i.labels.tiltThreshold:.7,u=n("…").width,c=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],o=r.label,i=n(o).width*(o.length>1?l:1);if(p=s*c*Math.abs(r.start-r.end),i+u>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*c*e,d=n("M").width*l*a,d+u>p)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&k0({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>R0({value:t.width,maxValue:c,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>R0({value:e.width,maxValue:c,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),o=e=>Math.min(r,e.width)*Math.cos(t)+e.height,i=(t,r)=>{const o=h[r]?h[r].position:0;return e?t-o*n.inner.width:t-(1-o)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(o).map(i),0))+a.paddingEnd;if(u[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:o,angle:i}=e;if(t.length<2)return!1;if(0===i)return!0;const a=Math.abs(i),s=1/(Math.min(r.outer.width-o,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:u}}const M0=(e,t,n)=>e.width*Math.abs(t.position-n.position);function A0(e){let{layered:t,major:n,innerRect:r,outerRect:o,tick:i,index:a}=e;const s=t?2:1,l=n[a-s],u=n[a+s],c=l?M0(r,i,l)/2-2:1/0,d=u?M0(r,i,u)/2-2:1/0;return n.length<2?r.width:l?u?2*Math.min(c,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:o}=e;const i=t.x-n.x,a=n.width-t.width-i,s=t.width-t.width*r.position+a,l=2*Math.min(o,s),u=1===r.position?t.width/2-2:0;return Math.max(o,l,u)})({innerRect:r,outerRect:o,tick:i,prevWidth:c}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:o}=e;const i=t.x-n.x,a=t.width*r.position+i,s=2*Math.min(o,a),l=0===r.position?t.width/2-2:0;return Math.max(o,s,l)})({innerRect:r,outerRect:o,tick:i,nextWidth:d})}function D0(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,o=r+e.style.strokeWidth,i={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:o}},ticks:[]};return function(e,t){EW(e,t.style)}(i,e),i}function P0(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function L0(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i;let u=a-e.position*l;u-=Math.PI/2;const c=P0(r.cx,r.cy,o+s,u),d=P0(r.cx,r.cy,o,u),p={type:"line",x1:c.x,y1:c.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=MW({},t.style);EW(e,n)}(p,t),p}function I0(e){return"string"==typeof e||"number"==typeof e?e:"-"}function q0(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function T0(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i,u=.2;let c,d;c="top"===t.align||"bottom"===t.align?a-e.position*l:i+e.position*l,d=c<-.2&&c>-Math.PI+u?"left":c>.2&&c<Math.PI-u?"right":"center",c-=Math.PI/2;const p=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,o+s+6,c);let f;f="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:I0(e.label),align:d,x:p.x,y:p.y,maxHeight:t.maxHeight,maxWidth:q0(t,d,p),anchor:f,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,o;const i=parseFloat(n.fontSize)||0;r=t.y-i/2,o=e.innerRect.height-(t.y+i/2),(r<0||o<0)&&(n.text="")}(t,p,h),h}function O0(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function N0(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function z0(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=O0(e)+e.labels.margin,t}function F0(e,t){return e.map((e=>C0(e,t)))}function j0(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function H0(e){let{textMetrics:t,settings:n,innerRect:r,scale:o,tilted:i,layered:a,tick:s}=e;const l=t.height,u=j0(o,s),c={width:0,height:l};if("left"===n.align||"right"===n.align)c.width=r.width-z0(n)-n.paddingEnd;else if(a)c.width=u*r.width*2;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);c.width=(r.height-z0(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else c.width=u*r.width;return c.width=R0({value:c.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),c}function B0(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:o,tilted:i,layered:a,tick:s,index:l,major:u}=e;const c=t.height,d={width:0,height:c};if("left"===n.align||"right"===n.align)d.width=r.width-z0(n)-n.paddingEnd;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-z0(n)-n.paddingEnd-c*Math.cos(e))/Math.sin(e)}else d.width=A0({layered:a,major:u,innerRect:r,outerRect:o,tick:s,index:l});return d.width=R0({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function $0(e){let t;function n(){return t=B0,n}function r(){return t=H0,r}function o(e){let{settings:n,scale:r,innerRect:o,outerRect:i,measureText:a,ticks:s,state:l,textBounds:u}=e;const c=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),f={innerRect:o,align:n.align,outerRect:i},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(f.startAngle=n.arc.startAngle,f.endAngle=n.arc.endAngle,f.radius=n.arc.radius),n.line.show&&(f.style=n.line,f.padding=n.paddingStart,n.arc?c.push(D0(f)):c.push(b0(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=O0(n),n.arc?(f.padding=N0(n),g=function(e,t){return e.map((e=>L0(e,t)))}(d,f)):g=F0(d,f)),n.labels.show){const e=z0(n);f.style=n.labels,f.padding=e,f.tilted=h,f.layered=m,f.angle=n.labels.tiltAngle,f.paddingEnd=n.paddingEnd,f.textBounds=u;const s=(e,s)=>{f.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:f.style});const l=t({textMetrics:f.textRect,settings:n,innerRect:o,outerRect:i,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});f.maxWidth=l.width,f.maxHeight=l.height,f.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:o}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*j0(n,o)}({innerRect:o,scale:r,settings:n,tick:e})};let l=[];n.arc?(f.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=N0(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=T0(e,t);return o.data=e.data,o}))}(d,f,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=w0(e,t);return o.data=e.data,o}))}(d,f,s):function(e,t,n,r){const o=t.padding,i=z0(n);return e.map(((e,a)=>{r(e,a);const s=i+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?o:s;const l=w0(e,t);return l.data=e.data,l}))}(d,f,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>BQ(zW(1,e[t].boundingRect),zW(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const o=1/Math.abs(e[n].x-e[r].x),i=Math.sin(t*(Math.PI/180))/o;return e[n].boundingRect.height>i}}for(let n=0;n<=e.length-1;n++)for(let o=n+1;o<=Math.min(n+5,n+(e.length-1));o++)e[n]&&e[o]&&r(n,o)&&(o===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(o,1),t&&t.splice(o,1)),o--,n--)}(l,g,f),c.push(...l)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(f.style=n.minorTicks,f.tickSize=n.minorTicks.tickSize,f.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),c.push(...F0(p,f))),g&&c.push(...g),c}return n.build=o,r.build=o,e?r():n()}const V0={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},W0={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const U0={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const o=EW(!0,{},t.isDiscrete?V0:W0,n),i=EW(!0,{},o,r.settings),a=r.layout.dock||t.defaultDock;i.dock=a,i.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),i.labels.tiltAngle=Math.max(-90,Math.min(i.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=i;return i.paddingStart="function"==typeof s?s.call(null):s,i.paddingEnd="function"==typeof l?l.call(null):l,i}(this),this.state.concreteNodeBuilder=$0(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,o=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=YJ(r,o);const i=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const{size:u,edgeBleed:c,isToLarge:d}=_0({isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s});if(l+=u,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,c[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:c}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return i},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=EW({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),o=n||r;return EW(this.state.innerRect,r),EW(this.state.outerRect,o),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=YJ(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),n0.multiple(t),t}};const G0={render:()=>[]};function Y0(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function K0(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const X0={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=Y0(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:o,measureText:i,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:K0(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};EW(s,a.text);const l=i(s);if("top"===r||"bottom"===r){let e=o.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=o.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?o.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*o.width}else{let e=o.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=o.height-n.paddingStart),s.y=e,s.x="left"===r?o.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*o.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(EW(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=Y0(t,n,this.scale)}};function J0(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,o="top"===n||"bottom"===n,i=o?"width":"height",a=e.rect[i],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[o?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const i=e/a*(n.max-n.min)+n.min;i<n.start?l.startScroll=i:i>n.start+n.viewSize&&(l.startScroll=i-n.viewSize)}return{update:e=>{let t=e[o?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),i=(t-l.startOffset)/a*(n.max-n.min),u=l.startScroll+i;s.moveTo(u)},end:e=>{let t=e[o?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function Q0(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const Z0={require:["chart","renderer"],on:{panStart(e){const t=Q0(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=J0(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=Q0(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=Q0(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=Q0(e,this.renderer);J0(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,o=r?"width":"height",i=this.rect[o],a=this.chart.scroll(this.settings.scroll).getState();let s=i*(a.start-a.min)/(a.max-a.min);const l=i*a.viewSize/(a.max-a.min);return n&&(s=i-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[o]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function e1(e){let{h:t,isVertical:n,value:r,pos:o,align:i,borderHit:a,state:s,idx:l}=e;const u="end"!==i,c=u?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",f="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),f="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),f="".concat(s.rect.height-d,"px")),u||(o-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:o,"px"),top:"".concat(n?o:d,"px"),height:n?"".concat(a,"px"):f,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:EW({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function t1(e){let{h:t,isVertical:n,label:r,otherValue:o,rangeIdx:i,idx:a,pos:s,align:l,state:u,value:c}=e;const d="end"!==l,p="outside"===u.settings.bubbles.placement;let f,h="none";n?(f=d?"left":"right",p&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(f=d?"top":"bottom",p&&(h=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=u.edit&&u.edit.rangeIdx===i&&u.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(u.style.bubble.borderRadius,"px"),border:"".concat(u.style.bubble.strokeWidth,"px solid ").concat(u.style.bubble.stroke),backgroundColor:u.style.bubble.fill,color:u.style.bubble.color,fontFamily:u.style.bubble.fontFamily,fontSize:u.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=u.style.bubble.stroke;const b=m?t("input",{type:"text",value:c,style:MW(MW({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(u.style.bubble.strokeWidth,"px solid ").concat(y)):u.onEditConfirmed(i,t,o)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),u.onEditCanceled())}}):t("div",{"data-key":[u.key,"bubble",i,a].join("-"),"data-other-value":o,"data-idx":i,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[f]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[b])}function n1(e){let{h:t,isVertical:n,top:r,height:o,color:i,on:a,opacity:s}=e;return t("div",EW({style:{backgroundColor:i,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(o,"px"):"100%",width:n?"100%":"".concat(o,"px"),pointerEvents:"auto"}},a),[])}function r1(e){let{borderHit:t,els:n,isVertical:r,state:o,vStart:i,vEnd:a,idx:s}=e,l=0;o.targetRect&&(l=r?o.targetRect.y:o.targetRect.x);const u=!!o.scale,c=u?o.scale.norm(i)*o.size:i,d=u?o.scale.norm(a)*o.size:a,p=Math.abs(c-d),f=Math.min(c,d)+l,h=f+p;if(o.targetRect){const e=o.targetFillRect||o.targetRect,t=r?e.height:e.width,s=u?o.scale.norm(i)*t:i,l=u?o.scale.norm(a)*t:a,c=Math.abs(s-l),d=Math.min(s,l),p={h:o.h,isVertical:r,top:d,height:c,color:o.style.target.fill,opacity:o.style.target.opacity};o.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=o.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=o.style.target.opacity}}),n.push(o.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[n1(p)]))}const m=c<d?i:a,g=c<d?a:i,[y,b]=u?o.scale.domain():[Math.min(i,a),Math.max(i,a)],v=m+1e-5>=y&&m-1e-5<=b,x=g-1e-5<=b&&g+1e-5>=y;v&&n.push(e1({h:o.h,isVertical:r,borderHit:t,value:m,pos:f,align:"start",state:o,idx:s})),x&&n.push(e1({h:o.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:o,idx:s}));const S=o.settings.bubbles;if(S&&S.show){S.fontSize,S.fontFamily,S.fill;const e=[i,a];v&&n.push(t1({h:o.h,isVertical:r,align:S.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(o.format(m,e)),pos:f,state:o})),x&&n.push(t1({h:o.h,isVertical:r,align:S.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(o.format(g,e)),pos:h,state:o}))}}function o1(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function i1(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,o)=>{e.active&&o===e.active.idx||r1({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:o})})),e.active){let r=e.start,o=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),o=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),o=Math.max(e.start,e.current);else{const t=o1(e);r=e.active.start+t,o=e.active.end+t}r1({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:o,idx:e.active.idx})}return t}function a1(e){return{min:e.scale.min(),max:e.scale.max()}}function s1(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function l1(e,t,n){let r,o,i=e.ranges,a=-1;for(r=0;r<i.length;r++){if(i[r].min<=t&&t<=i[r].max){a=r,n.min=r?i[r-1].max:n.min,n.max=r+1<i.length?i[r+1].min:n.max;break}if(t<i[r].min){n.max=i[r].min,n.min=r?i[r-1].max:n.min;break}}-1===a&&i.length&&r>=i.length&&(n.min=i[i.length-1].max),-1!==a&&(o={idx:a,start:i[a].min,end:i[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=o}function u1(e){e.renderer.render(i1(e))}function c1(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}function d1(e,t){let n,r=1/0;const o=t.domain(),i=t.bandwidth()/2;for(let a=0;a<o.length;++a){const s=Math.abs(e-i-t(o[a]));s<r&&(r=s,n=o[a])}return n}function p1(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function f1(e){const t=e.reduce(((e,t)=>(e.push(...qW(t.bounds)),e)),[]);return TW(t)}const h1={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=c1(this.state,this.state.brushInstance),this.state.active=null,u1(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let o=YJ(this.chart.scale(t.scale),r);const i=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),o=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],i=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(o.length>0){const r=f1(o);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=YJ(e.chart.scale(n.scale),t.size),t.targetRect=r,i.length>0){const e=f1(i);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(o=i.scale?i.scale:o,this.state.targetRect=i.targetRect,this.state.targetFillRect=i.targetFillRect,this.state.size=null===i.size?r:i.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let o=e.ranges.map((e=>({min:e.min,max:e.max})));const i=e.scale.min(),a=e.scale.max();o[t]={min:Math.max(i,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=MW({},o[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),o)}))}(this.state,e,t,n),this.emit("bubbleEnd"),u1(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,u1(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:o,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(o,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=o;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=JX(),this.state.scale.data=o.data,this.state.format||(this.state.format=(e,t)=>p1(o.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(d1(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"),this.state.fauxBrushInstance=TJ(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),o=[];return e.forEach((e=>{if(!p1(r,[e.min,e.max]))return;const i=n.indexOf(d1(e.min,t)),a=n.indexOf(d1(e.max,t));o.push.apply(o,n.slice(Math.min(i,a),Math.max(i,a)+1))})),o}(e,o);return this.state.ranges=c1(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[i1(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const u={started:!0};t.offset=EW({},r.element().getBoundingClientRect());const c=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=o(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];u.current=t.scale.normInvert(f/t.size),u.start=t.scale.normInvert(p/t.size);let h=t.ranges;const m=a1(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?h[b-1].max:m.min,m.max=b+1<h.length?h[b+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=u.start&&u.start<=h[g].max){b=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(u.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===b&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==b||t.multi||(u.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:h[b].min,end:h[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))u.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=i?(u.start=y.end,y.mode="modify"):Math.abs(p-n)<=i&&(u.start=y.start,y.mode="modify")}else y={idx:-1,start:u.start,end:u.current,limitLow:m.min,limitHigh:m.max,mode:"current"};u.active=y,"modify"!==y.mode&&t.targetRect&&!VQ(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:c1,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=a1(e);l1(e,e.current,n)}(this.state,c1),u1(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=o1(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=c1(e,e.fauxBrushInstance),o=e.findValues(r),i=e.findValues(t),a=i.filter((e=>-1===o.indexOf(e))),s=o.filter((e=>-1===i.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),u=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,u),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),u1(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const o=n.parentNode;u1(this.state);const i=o.querySelector("input");i.focus(),i.select()}};function m1(e){e.renderer.render(i1(e))}function g1(e){return e.rc.ranges()}function y1(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const b1={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],o=this.renderer.element().getBoundingClientRect(),i=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=i[0]?i.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:i[0].rect.x,y0:i[0].rect.y,x1:i[0].rect.x+i[0].rect.width,y1:i[0].rect.y+i[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=o,this.state.rc=CJ(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),o=Math.max(...n),i={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?o-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:o-r},a=e.chart.shapesAt(i,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,o)=>{const i=n.bounds,a=o.bounds;return t===r?i[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:o:i[e.cssCoord.coord]+i[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:o})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const u={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=o(t);const c=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=f,m=p;u.start=p,u.current=f;let g=t.ranges;const y=s1(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(u.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))u.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(p-e)<=i?(u.start=v.end,v.mode="modify"):Math.abs(p-t)<=i&&(u.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};u.active=v,"modify"!==v.mode&&t.targetRect&&!VQ(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:g1,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=s1(e);l1(e,e.current,n)}(this.state,g1),m1(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=o1(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...y1(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),m1(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function v1(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}(e).map((o=>{const i=e.scale(o.min)*n,a=e.scale(o.max)*n,s=Math.min(i,a),l=Math.abs(i-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function x1(e,t,n,r){function o(){!function(e){e.renderer.render(v1(e))}(e)}function i(){!function(e){e.renderer.render(v1(e))}(e)}function a(){!function(e){e.renderer.render(v1(e))}(e)}e.brush=t,t&&(t.on("start",o),t.on("update",i),t.on("end",a),e.start=o,e.update=i,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function S1(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const w1={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,o=YJ(this.chart.scale(e.scale),r);return S1(this.state),x1(this.state,t,o,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,v1(this.state)},beforeDestroy(){S1(this.state)}};function C1(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function E1(e,t,n){return pQ(e,t.points[0])<n.settings.snapIndicator.threshold**2}function k1(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function R1(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function _1(e,t){e.snapIndicator.visible=t}const M1={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})));const n=C1(this.state.rendererBounds,e);k1(this.state,n),R1({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=C1(this.state.rendererBounds,e);E1(t,this.state,this.settings)?_1(this.state,!0):_1(this.state,!1),k1(this.state,t),R1({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const o=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;_1(this.state,!1);E1(C1(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,o=e.points.map((e=>({x:e.x+n,y:e.y+r}))),i=t.shapesAt({vertices:o},{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function A1(e,t,n,r,o){let i,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);i=o(t[l]),i[n]+i[r]<e[n]?a=l+1:s=l}return a}function D1(e){let{orientation:t,targetNodes:n,labels:r,container:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A1;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",u=e=>e.textBounds,c=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<o[s]||d[s]+d[l]>o[s]+o[l])return!1;for(let e=i(d,a,s,l,u);e<a.length;e++)if(BQ(d,a[e].textBounds))return!1;const f=i(d,n,s,l,c),h=d[s]+d[l];for(let e=f;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(BQ(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const P1=4;function L1(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function I1(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function q1(e){return MW(MW({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function T1(e,t,n){return n?e.width>=t.height:e.width>=t.width}function O1(e,t,n){return n?e.height>=t.width:e.height>=t.height}function N1(e,t,n,r,o){let i,a;return"v"===e?(i=r||o||T1(t,n,!0),a=O1(t,n,!r)):(i=T1(t,n),a=o||O1(t,n,!1)),i&&a}function z1(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function F1(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(!n.overflow&&!function(e,t,n){return T1(e,t,n.rotate)&&O1(e,t,n.rotate)}(e,o,n))return!1;const i=.5*o.height;return n.rotate?(r.x=z1(e.x,e.width,o.height,n.align)+i,r.y=z1(e.y,e.height,o.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(o.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=z1(e.x,e.width,o.width,n.align),r.y=z1(e.y,e.height,o.height,n.justify)+i),r}function j1(e){let{bar:t,view:n,direction:r,position:o,padding:i=P1,measured:a}=e;const s={};if(EW(s,t),o&&"inside"!==o)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),i=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===o&&"up"===r||"opposite"===o&&"down"===r?(s.y=0,s.height=e):("outside"===o&&"down"===r||"opposite"===o&&"up"===r)&&(s.y=i,s.height=n.height-i)}else{const e=Math.max(0,Math.min(t.x,n.width)),i=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===o&&"left"===r||"opposite"===o&&"right"===r?(s.x=0,s.width=e):("outside"===o&&"right"===r||"opposite"===o&&"left"===r)&&(s.x=i,s.width=n.width-i)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),o=Math.max(0,Math.min(e.x,t.width)),i=Math.max(0,Math.min(e.x+e.width,t.width));e.x=o,e.width=i-o,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=P1,bottom:o=P1,left:i=P1,right:a=P1}=n,s="function"==typeof i?i(t):i,l="function"==typeof a?a(t):a,u="function"==typeof r?r(t):r,c="function"==typeof o?o(t):o;e.x+=s,e.width-=s+l,e.y+=u,e.height-=u+c}(s,a,i),s}function H1(e){let t,n,r,o,i,{direction:a,fitsHorizontally:s,measured:l,node:u,orientation:c,placementSettings:d,rect:p}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j1;const h=[],m="h"===c?"width":"height";for(i=0;i<d.length;i++)if(r=d[i],o=f({bar:u.localBounds,view:p,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(o),t=!i||o[m]>t[m]?o:t,N1(c,o,l,s,r.overflow)){n=o;break}return n||(n=t,i=h.indexOf(n)),r=d[i],{bounds:n,placement:r}}function B1(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:i=P1,bottom:a=P1,left:s=P1,right:l=P1}=o,u="function"==typeof s?s(t):s,c="function"==typeof l?l(t):l,d="function"==typeof i?i(t):i,p="function"==typeof a?a(t):a,f=e.x+e.dx,h=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,b=1e-9;return{x:(n?f-y:f)-u-b,y:(n?h:h-y)-d-b,width:g+(u+c)-b,height:m+(d+p)-b}}function $1(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:o,collectiveOrientation:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H1,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:F1,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D1;const u=[],c={container:r,targetNodes:n,labels:[],orientation:i};let d,p,f,h,m,g,y,b,v,x,S,w,C,E;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],f=p.node,C=L1(f,t),v=p.direction,E="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(h=p.texts[t],!I1(h))continue;x=p.labelSettings[t],b=p.measurements[t],w=x.placements;const n=a({direction:v,fitsHorizontally:o,lblStngs:x,measured:b,node:f,orientation:E,placements:w,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,S=n.placement,g&&S){var k;m=S.justify;const t="function"==typeof x.linkData?x.linkData(C,e):void 0,n="function"==typeof S.overflow?S.overflow(C,e):S.overflow;"up"===v&&(m=1-m),"opposite"===S.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===i||o);if(d=s(g,h,{justify:"h"===E?S.align:m,align:"h"===E?m:S.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(k=x.dock)&&void 0!==k?k:"left"}),d){const n=B1(d,b,r,g,S.padding);y="function"==typeof S.fill?S.fill(MW(MW({},C),{},{textBounds:n}),e):S.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof S.background&&(d.backgroundColor="function"==typeof S.background.fill?S.background.fill(MW(MW({},C),{},{textBounds:n}),e):S.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=B1(d,b,r,g,S.background.padding))),u.push(d),c.labels.push({node:f,textBounds:n})}}}}const R=u.filter(l(c)),_=R.filter((e=>void 0!==e.backgroundBounds)).map(q1);return[..._,...R]}function V1(e){const t=2*Math.PI;return(e%t+t)%t}function W1(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function U1(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function G1(e,t,n){let{x:r,y:o}=t;if(r*r+o*o>e*e)return null;let i=Math.sin(n),a=Math.cos(n),s=r*a-o*i,l=e*e-s*s;if(l<0)return null;let u=Math.sqrt(l);return{x:s*a+i*u,y:-s*i+a*u}}function Y1(e){let t,n,{radius:r,size:o,angle:i}=e,{width:a,height:s}=o,l={x:a/2,y:s/2};switch(Math.floor(i/(Math.PI/2))){case 0:if(t=G1(r,l,i),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=G1(r,l,Math.PI-i),!t)return null;n={x:-a,y:-s};break;case 2:if(t=G1(r,l,i-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=G1(r,l,2*Math.PI-i),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function K1(e){let{slice:t,measured:n,padding:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,u=i-o;if(u<Math.PI){let e=(n.height/2+r)/Math.tan(u/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const c=V1((o+i)/2);let d=s-r,p={x:Math.sin(c)*d,y:-Math.cos(c)*d,width:l,height:n.height};return c<Math.PI?(p.angle=c-Math.PI/2,p.anchor="end"):(p.angle=c+Math.PI/2,p.anchor="start"),p}function X1(e){let{context:t,node:n,bounds:r}=e;let{start:o,end:i}=n.desc.slice;const a=V1((o+i)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function J1(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Q1(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function Z1(e){let t,n,{slice:r,direction:o,position:i,padding:a,measured:s,view:l,context:u,store:c}=e,{start:d,end:p,innerRadius:f,offset:h}=r;switch(i){case"into":t="rotate"===o?K1({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t;const l=V1((o+i)/2);let u=Y1({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return u?(u.baseline="top",WQ(u,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||WQ(u,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||OQ({cx:0,cy:0,r:a},u)?null:(W1(u,n),u)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:f},t="rotate"===o?K1({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:o}=e;const{start:i,end:a,outerRadius:s}=t,l=V1((i+a)/2);let u=Y1({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return u?(u.baseline="top",W1(u,n),o.insideLabelBounds.some((e=>BQ(e,u)))?null:(o.insideLabelBounds.push({x:u.x-4,y:u.y,width:u.width+8,height:u.height}),u)):null}({slice:n,measured:s,padding:a,store:c});break;case"outside":t="rotate"===o?function(e){let{slice:t,measured:n,padding:r,view:o}=e,{start:i,end:a,outerRadius:s,offset:l}=t,u=s+r,c=a-i;if(c<Math.PI&&(n.height/2+r)/Math.tan(c/2)>u)return null;const d=V1((i+a)/2);let p=Math.sin(d)*u,f=-Math.cos(d)*u,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=f<0?o.y:o.y+o.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=p<0?o.x:o.x+o.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:p,y:f,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:o,context:i}=e,{start:a,end:s,outerRadius:l,offset:u}=t;const c=V1((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(i,Math.floor(c/(Math.PI/2)),o))return null;let d=l+r+n.height/2,p=Math.sin(c)*d,f=-Math.cos(c)*d,h=n.width+1;if(c<Math.PI){let e=Math.abs(o.x+o.width-(p+u.x));e<h&&(h=e)}else{let e=Math.abs(o.x-(p+u.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:p,y:f,width:h,height:n.height};return c<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:u});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===i&&"rotate"!==o&&function(e,t,n){const{start:r,end:o,offset:i,outerRadius:a}=n,s=V1((r+o)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,u,r)),t}function e2(e){let{context:t,direction:n,measured:r,node:o,placementSettings:i,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z1;for(let e=0;e<i.length;e++){let u=i[e],c=l({context:t,slice:o.desc.slice,view:a,direction:n,position:u.position,measured:r,padding:u.padding,store:s});if(c)return{bounds:c,placement:u}}return{bounds:null,placement:null}}function t2(e,t,n){const r=t.fontFamily,o="".concat(t.fontSize,"px"),i=n.measureText({text:e,fontFamily:r,fontSize:o});return i.minReqWidth=Math.min(i.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:o}).width),i}const n2=/\n+|\r+|\r\n/,r2=/\s/,o2=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function i2(e){return"string"==typeof e?-1!==e.search(n2):-1!==String(e).search(n2)}function a2(e){return-1!==e.search(r2)}function s2(e){return-1!==e.search(o2)}function l2(e,t,n){return Math.max(t,Math.min(n,e))}function u2(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:o=[i2],noBreakAllowedIdentifiers:i=[],suppressIdentifier:a=[a2,i2,e=>""===e],hyphenationIdentifiers:s=[s2]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const u=l.length,c=n?e=>e>=0:e=>e<u;let d=n?u:-1;function p(e){const t=l2(e,0,u-1),n=l[t],c=r(n),d=function(e,t,n,r,o){return r.some((r=>r(e,t,n)))?1:o.some((r=>r(e,t,n)))?0:2}(n,t,l,o,i);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:c.width,height:c.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=l2(e,0,u-1),c(d)?p(d):{done:!0}},peek:p,length:u}}const c2="…",d2=/^\s*\d+(\.\d+)?px\s*$/i;function p2(e){return"string"===typeof e&&d2.test(e)}function f2(e){const t=e["font-size"]||e.fontSize;return p2(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function h2(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=f2(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function m2(e,t){return{lines:[],line:"",width:0,maxLines:h2(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function g2(e){e.lines.push(e.line),e.line="",e.width=0}function y2(e,t){e.line+=t.value,e.width+=t.width}function b2(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let o=1;o<5;o++){const i=n.peek(t.index-1);if(!t.hyphenation||!i.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-o),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function v2(e,t,n){const r=u2({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?b2(e,t,r):t,g2(e),y2(e,t)):y2(e,t)}}function x2(e,t){const n=u2({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=m2(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){g2(r),o=!1;break}1===e.breakOpportunity?g2(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?b2(r,e,n):e,g2(r),y2(r,e)):y2(r,e)}return{lines:r.lines,reduced:o}}function S2(e,t){const n=u2({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=m2(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){g2(r),o=!1;break}1===e.breakOpportunity?g2(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?g2(r):e.width>r.maxWidth?v2(r,e,t):(g2(r),y2(r,e)):y2(r,e)}return{lines:r.lines,reduced:o}}function w2(e){return{"break-all":x2,"break-word":S2}[e.wordBreak]}function C2(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=w2(n);if(!r)return;const o=e(n);if(o.width>n.maxWidth||i2(n.text)){const i=(f2(n)-o.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const o={type:"container",children:[]};void 0!==t.id&&(o.id=t.id);let i=0;return e.lines.forEach(((a,s)=>{const l=EW({},t);l.text=a,l._lineBreak=!0,i+=n,e.reduced&&s===e.lines.length-1?l.text+=c2:delete l.maxWidth,l.dy=isNaN(l.dy)?i:l.dy+i,i+=r,i+=n,o.children.push(l)})),o}(a,n,i,o.height)}}}}function E2(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,o="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:i}=e;if(void 0===i)return o;let a=t({text:o,fontSize:r,fontFamily:n}).width;if(a<=i)return o;let s=0,l=o.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:o.substr(0,e)+c2,fontSize:r,fontFamily:n}).width,a<=i?s=e+1:l=e-1}return o.substr(0,l)+c2}function k2(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const R2={},_2={},M2={fontSize:void 0,fontFamily:void 0};let A2;function D2(e,t){return!e&&!t||e===t}function P2(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;const i="".concat(t," ").concat(n," ").concat(r," ").concat(o);return"number"!=typeof _2[i]&&(A2=A2||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;D2(M2.fontWeight,t)&&D2(M2.fontSize,n)&&D2(M2.fontFamily,r)||(A2.font=[t,n,r].filter((e=>!!e)).join(" "),M2.fontWeight=t,M2.fontSize=n,M2.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:o}),_2[i]=A2.measureText(t).width),_2[i]}function L2(e){return"number"!=typeof R2[e]&&(R2[e]=function(e){if(p2(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),R2[e]}function I2(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;return{width:P2({text:t,fontWeight:n,fontSize:r,fontFamily:o}),height:L2(r)}}function q2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I2;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:r,fontSize:n}),i=Math.min(e.maxWidth||o.width,o.width),a=e.x||0,s=e.y||0,l=e.dx||0,u={x:0,y:s+((e.dy||0)+k2(e))-.75*o.height,width:i,height:o.height},c=e["text-anchor"]||e.anchor;return u.x="middle"===c?a+l-i/2:"end"===c?a+l-i:a+l,u}function T2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I2;const n=w2(e),r=e["font-size"]||e.fontSize,o=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:o,fontSize:r});if(n&&(i.width>e.maxWidth||i2(e.text))){const i=n(e,(e=>t({text:e,fontFamily:o,fontSize:r}))),a=EW({},e);let s=0,l="";for(let e=0,n=i.lines.length;e<n;e++){let a=i.lines[e];a+=e===n-1&&i.reduced?c2:"";const u=t({text:a,fontSize:r,fontFamily:o}).width;u>=s&&(s=u,l=a)}a.text=l;const u=q2(a,t);return u.height=f2(e)*i.lines.length,u}return q2(e,t)}function O2(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function N2(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(e.width<n.fontSize)return!1;const i=Math.max(0,e.width-o.width);return r.x=e.x+n.align*i,r.y=e.y+o.height/1.2,r}function z2(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function F2(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:o,offset:i}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:o;return z2({cx:i.x,cy:i.y,r:a})}(e.desc.slice):"circle"===e.type?z2(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var j2={bar:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$1;const l=EW({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const u=t.labels.map((e=>EW({},l,t,e))),c=t.labels.map((e=>e.placements.map((n=>EW({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:f}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:o,placementSettings:i,settings:a,renderer:s}=e;const l={},u=[];let c,d,p,f,h,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],f=d.localBounds,!BQ(f,n))continue;let v=L1(d,r);c={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<o.length;t++)m=o[t],p="function"==typeof m.label?m.label(v,e):void 0,I1(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,h=s.measureText(l),c.measurements.push(h),c.texts.push(p),c.labelSettings.push(m),c.placementSettings.push(i[t]),c.direction=g,y=y&&h.width<=f.width-2*P1);u.push(c)}return{targetNodes:u,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:i,settings:t,rect:o,labelSettings:u,placementSettings:c}),h=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return f.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:f,stngs:t,rect:o,fitsHorizontally:d,collectiveOrientation:h})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e2,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Q1;const u=EW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);u.fontSize=parseInt(u.fontSize,10);const c=t.labels.map((e=>EW({},u,t,e))),d=t.labels.map((e=>e.placements.map((n=>EW({},u,t,e,n))))),p=[],f={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],o=[];for(let i=0;i<e.length;++i){const{start:a,end:s}=e[i].desc.slice,l=V1((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[i]);break;case 1:n.push(e[i]);break;case 2:r.push(e[i]);break;case 3:o.push(e[i])}}const i=(e,t)=>V1((e.desc.slice.start+e.desc.slice.end)/2)-V1((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>i(t,e);return t.sort(a),n.sort(i),r.sort(a),o.sort(i),t.concat(n,o,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=J1(t,n);for(let n=0;n<c.length;n++){const r=c[n],u="function"==typeof r.label?r.label(a,e):"";if(!u)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=t2(u,r,i),b=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:o,store:f}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){X1({context:h,node:t,bounds:v});if(!MQ(U1(v),o))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,i=l(v,u,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});i&&(void 0!==g&&(i.data=g),p.push(i),v.line&&(v.line.stroke=n,p.push(v.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:o,style:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N2;const s=EW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},i.label);s.fontSize=parseInt(s.fontSize,10);const l=EW({},s,t),u=t.labels.map((e=>EW({},l,e))),c={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=O2(t,n),{type:s,bounds:p}=F2(t);if(!p)continue;let f,h=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(h+=l.padding,f=0;f<u.length;f++){let t=u[f],n="function"==typeof t.label?t.label(i,e):"";c.fontFamily=t.fontFamily,c.fontSize="".concat(t.fontSize,"px"),c.text=n;let r=o.measureText(c);if(h+=r.height+t.padding,h>y)break;g.push(n),m.push(r)}const b=f,v=Math.max(0,y-h);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*v+l.padding,f=0;f<b;f++){let t,n=u[f];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[f].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[f].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[f].height};x+=m[f].height+l.padding;let r="function"==typeof n.fill?n.fill(i,e):n.fill;const c="function"==typeof n.linkData?n.linkData(i,e):void 0;let h=a(t,g[f],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[f]});if(h){if(h.text&&h.text!==c2){const e=E2(h,o.measureText);if(c2===e)continue;h.ellipsed=e}void 0!==c&&(h.data=c),d.push(h)}}}return d}};const H2={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&j2[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:o,renderer:i,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:o.width,height:o.height},renderer:i,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},j2[e.strategy.type]))})),t}};const B2={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function $2(e){let{x:t=0,y:n,item:r,globalMetrics:o,createSymbol:i,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,u=r.symbol.meta;const c="rtl"===a;let d={x:c?t+o.maxLabelBounds.width:t+o.maxSymbolSize+o.spacing,y:n,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),o=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*o}}({x:c?t+o.maxLabelBounds.width+o.spacing:t,y:n,width:o.maxSymbolSize,height:d.height},u.size,{align:void 0===u.align?.5:u.align,justify:void 0===u.justify?.5:u.justify});const f=i(EW({},u,p));return delete f.collider,s.anchor=c?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const o=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const i=Math.max(0,e.height-r.height);t.x=e.x+n.align*o,t.y=e.y+n.justify*i+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[f,s],collider:{type:"rect",x:t,y:n,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function V2(e,t){const n=e.items.length,r=Math.ceil(n/t),o="horizontal"===e.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[o]*r+(r-1)*e.layout.margin[i]}function W2(e,t){let n,r,o,i,{onScroll:a=()=>{}}=t,s=null,l=0;const u={itemize:t=>{n=function(e,t){let n,r,{resolved:o,dock:i}=e,a=[],s=o.items.items,l=o.symbols.items,u=o.labels.items,c=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const o=void 0!==u[e].text?u[e].text:u[e].data.label||"";n=EW({},u[e],{type:"text",fontSize:"".concat(parseInt(u[e].fontSize,10),"px"),text:o,title:o}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),c=Math.max(l[e].size,c),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:c,maxItemBounds:{height:Math.max(c,p),width:c+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==o.layout.item.vertical?o.layout.item.vertical:4,horizontal:void 0!==o.layout.item.horizontal?o.layout.item.horizontal:4},mode:o.layout.item.mode,size:o.layout.item.size,orientation:"top"===i||"bottom"===i?"horizontal":"vertical",direction:o.layout.item.direction,scrollOffset:o.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{o=t.viewRect,l=u.getContentOverflow(o);const a=u.extent();s=Math.max(0,Math.min(s,l)),i=EW({},o);const c="horizontal"===u.orientation()?"x":"y";return i[c]-=s,i["x"===c?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:o,create:i=$2,parallels:a,createSymbol:s}=n;const l=o.layout.direction,u=o.globalMetrics,c=o.items,d="horizontal"===o.layout.orientation;let p=0;const f=[],h=u.maxItemBounds.height,m=u.maxItemBounds.width,g=o.layout.margin.vertical+h,y=o.layout.margin.horizontal+m;let b=t.x,v=t.y,x=r.x-t.x;for(let e=0;e<c.length;e++){let n=i({y:v,x:"rtl"===l?r.x+x+r.width-m-(b-t.x):b,item:c[e],globalMetrics:u,direction:l,createSymbol:s});if((d&&b>=r.x-m||!d&&v>=r.y-h)&&f.push(n.item),p++,p>=a?(p=0,d?(b+=y,v=t.y):(v+=g,b=t.x)):d?v+=g:b+=y,!d&&v>r.y+r.height)break;if(d&&b>r.x+r.width)break}return f}(t,i,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,o="horizontal"===n.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[o]*r+(r-1)*n.layout.margin[i];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",o=n.layout.margin[r]||4,i=Math.floor((t+o)/(o+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,i)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return V2(n,r)>o[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,V2(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===u.orientation()?o.x+o.width<i.x+i.width:o.y+o.height<i.y+i.height,hasPrev:()=>"horizontal"===u.orientation()?i.x<o.x:i.y<o.y,next:()=>{u.scroll(-u.getNextSize())},prev:()=>{u.scroll(u.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>V2(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",o="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[o]}(n,r)};return u}function U2(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const G2={up:"▲",right:"▶",down:"▼",left:"◀"};function Y2(e,t){let{size:n,isActive:r,direction:o,nav:i,attrs:a}=t,s={},l="";const u=a;i&&i.button&&("function"==typeof i.button.class?s=i.button.class({direction:o}):i.button.class&&(s=i.button.class),"function"==typeof i.button.content&&(l=i.button.content(e,{direction:o})),void 0!==i.button.tabIndex&&(u.tabindex=i.button.tabIndex));const c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(c.border="0",c.background="none"),(!r||i&&i.disabled)&&(u.disabled="disabled"),e("button",EW({class:U2(s),style:c},u),[l||e("span",{style:{pointerEvents:"none"}},[G2[o]])])}function K2(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:o,itemRenderer:i}=t;if(!e||!e.renderArgs)return;e.size(o);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===i.direction(),u=i.hasNext(),c=i.hasPrev();if(!c&&!u)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[Y2(a,{size:32,isActive:u,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),Y2(a,{size:32,isActive:c,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function X2(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=EW({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const o=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};o.push(EW({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(o)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function J2(e,t,n,r){let o,i,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:u,isPreliminary:c=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(o={x:p.x,y:p.y,width:p.width,height:u.spread()},"horizontal"===n){o={x:p.x,y:p.y,width:u.extent(),height:u.spread()};const e=p.width-o.width-(o.width?t.spacing:0),n=p.height;s.parallelize(e,c?void 0:n);const r=s.extent()>e?l.extent():0,f=s.spread(),h=r?l.spread():0;i={x:o.x+o.width+(o.width?t.spacing:0),y:p.y+Math.max(0,(h-f)/2),width:p.width-r-o.width-(r?t.spacing:0)-(o.width?t.spacing:0),height:n},a={x:i.x+i.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},o.y=i.y;"rtl"===s.direction()&&(a.x=p.x,i.x=a.x+a.width+(a.width?t.spacing:0),o.x=i.x+i.width+(o.width?t.spacing:0)),d=Math.max(o.height,h,s.spread())}else{const e=p.height-o.height-(o.height?t.spacing:0),n=p.width;s.parallelize(e,c?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},i={x:p.x,y:o.y+o.height+(o.height?t.spacing:0),width:p.width,height:p.height-o.height-(o.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(u.extent(),r?l.spread():0,s.spread())}return i=EW({},e,{x:e.x+i.x,y:e.y+i.y,width:i.width,height:i.height}),a.x+=e.x,a.y+=e.y,o.x+=e.x,o.y+=e.y,{title:EW({},e,o),content:EW({},e,i),navigation:EW({},e,a),orientation:n,preferredSize:d}}function Q2(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const o=e.scale.data().fields[0];let i=e=>String(e);e.settings.formatter?i=e.chart.formatter(e.settings.formatter):o&&(i=o.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(i(t[e])," - < ").concat(i(t[e+1]))};o&&(r.source={field:o.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const o=e.scale.datum?EW({},e.scale.datum(t)):{value:t};return o.value=t,e.scale.label?o.label=e.scale.label(t):r&&(o.label=r[n]),o}))}const o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:EW(!0,{},B2.title,e.style.title),settings:e.settings.settings.title}),i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:B2.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:EW(!0,{},B2.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=EW(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:EW(!0,{},B2.item.shape,e.style.item.shape),settings:s}),u=e.resolver.resolve({data:n,defaults:EW(!0,{},{show:B2.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function c(e,n){let r=e.data.value,o=t[n+1];e.data.value=[r,o]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(u.items.reverse().forEach(c),u.items.reverse()):u.items.forEach(c));return{title:o,labels:a,symbols:l,items:u,layout:i}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function Z2(e){const{rect:t,settings:n,state:r,itemRenderer:o,navigationRenderer:i,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",u=J2(t,r.display,l,{itemRenderer:o,navigationRenderer:i,titleRenderer:a});e.renderer.size(u.content);let c=o.getItemsToRender({viewRect:EW({},u.content,{x:0,y:0})});return i.render({rect:u.navigation,itemRenderer:o}),a.render({rect:u.title}),e.state.views={layout:u},c}const e5={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=Z2(this);this.update(e)},this.itemRenderer=W2(this,{onScroll:this.onScroll}),this.navigationRenderer=K2(this),this.titleRenderer=X2(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Q2(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",o="top"===r||"bottom"===r?"horizontal":"vertical",i=e.state.display,a=J2(t.inner,i,o,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=i.spacing,n+=a.preferredSize,n+=i.spacing,n}(this,e)},beforeUpdate(){Q2(this)},render(){return Z2(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function t5(e,t){let n=0;const r=e.state.isVertical?"justify":"align",o=e.state.isVertical?"y":"x",i=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[i]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[o]+=n}function n5(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function r5(e){return n5(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function o5(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function i5(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),o=e.chart.scale(e.stgns.major),i=function(e,t){const n=t.domain();let r=n,o=e.stgns.tick.label;!o&&e.formatter?o=e.formatter:!o&&t.data().fields&&(o=t.data().fields[0].formatter()),"function"==typeof o&&(r=n.map(o).map(String));const i=n.map(((n,o)=>{const i=r[o];return{value:n,label:i,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:i,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return i}(e,o),a=n5((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=o.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),u=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),c={isVertical:t,nodes:[],title:{anchor:r5(e.settings),textMetrics:l,textBounds:u,requiredWidth:()=>{if(!n.show)return 0;let e=u.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,c.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=u.height;return t&&(e+=n.padding),Math.min(e,c.rect.height)}},ticks:{values:i,anchor:a,length:Math.min(Math.max(...i.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...c.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...i.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:o,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",o=Math.min(c.rect[n],c.rect[n]*e.stgns.length)-c.title[r]();return Math.max(0,Math.min(o,e.stgns.maxLengthPx))}}};return c}const a5={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=o5(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const o=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return o;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return o;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=i5(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=i5(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=o5(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,o="top"===t.ticks.anchor;let i=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(i+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(i+=t.legend.length(),i+=n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(i+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:i,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return t5(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,o=n.rect;let i=o.x,a=o.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?i+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(i+=n.title.requiredWidth());const u={type:"rect",x:i,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return t5(e,u),u}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let o="start";const i={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,u=0,c="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,c=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,i.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,o="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,u-=.25*a.textMetrics.height,o=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,u=.8*a.textMetrics.height,o=0===a.pos?"start":"end",i.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:u,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:o,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:c}}));return{type:"container",id:"legend-seq-ticks",children:[...a,i]}}(this,n),o={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(o)},render(){return this.state.nodes}};const s5={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function l5(e,t){let{generatorType:n,item:r,data:o,major:i,minor:a,layerObj:s,stngs:l}=t,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const c={type:"path",points:e,generatorType:n,major:i,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:u||r.fill,data:o};return r.strokeDasharray&&(c.strokeDasharray=r.strokeDasharray),c}function u5(e){const{metaLayers:t,coordinates:n,layers:r,lines:o,areas:i}=function(e){let{data:t,stngs:n,rect:r,resolver:o,style:i,domain:a}=e;const{width:s,height:l}=r,u=o.resolve({data:t,defaults:s5.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),c=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<u.items.length;e++){let t=u.items[e],n=t.layerId;if(c){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const f=Object.keys(d).map((e=>(d[e].consumableData=MW({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),h={items:f.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:u,metaLayers:f,layers:o.resolve({data:h,defaults:{curve:s5.layers.curve,show:s5.layers.show},settings:{curve:m.curve,show:m.show}}),lines:o.resolve({data:h,defaults:EW({},s5.layers.line,i.line),settings:m.line}),areas:o.resolve({data:h,defaults:EW({},s5.layers.area,i.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const u=[],c=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||u.push(d.minor),l.data.push(d.data)}c.push(d)}const f=u.sort(((e,t)=>e-t))[Math.floor((u.length-1)/2)];a.push({layerObj:l,lineObj:o.items[s],areaObj:i.items[s],median:f,points:c,consumableData:t.consumableData})})),a}const c5={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,i=u5({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=i.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));i.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else i.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:o,stngs:i}=t;const a=[],s=i.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:u,points:c}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===i.orientation){const e=EW(!0,{},p);p=EW(!0,{},d),d=EW(!0,{},e)}s.area&&!1!==u.show&&a.push(l5(c,{data:e.consumableData,item:u,generatorType:"area",major:p,minor:d,layerObj:l,stngs:i})),t&&!1!==t.show&&(a.push(l5(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:i},"none")),!o&&s.area&&!1!==u.show&&!1!==t.showMinor0&&a.push(l5(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:i},"none")))})),a}(i,{width:n,height:r,missingMinor0:o,stngs:this.stngs})}};function d5(e,t){let n,r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const i=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:o?Math.max(0,Math.min(i,e.rect.width)):i,y:o?Math.max(0,Math.min(a,e.rect.height)):a}}function p5(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function f5(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const h5={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=d5(this,e,!1);VQ({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}))),this.state.start=d5(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=d5(this,e),function(e){if(e.state.active){const t=p5(e,e.state.start),n=p5(e,e.state.end),r=e.chart.shapesAt(f5(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([EW({type:"rect"},f5(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function m5(e,t,n){let{renderer:r,style:o,props:i,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(i,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,o,i),u=a("div",{dir:i.direction,class:U2(EW({"pic-tooltip":!0},s.tooltip)),style:EW({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:o.content,class:U2(EW({"pic-tooltip-content":!0},s.content))},l),a("div",{class:U2(EW({"pic-tooltip-arrow":!0},s.arrow)),style:EW({},o.arrow,o["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(u),r.element().children[0]}function g5(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,o=null,i=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,o=null,i=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),i=!0,r=null,a.set("active")}),u),s>0&&(o&&clearTimeout(o),o=setTimeout(l,s+Math.max(u,0)))},s.clear=()=>{i?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),o&&clearTimeout(o),r=null,o=null,i=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function y5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function b5(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function v5(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function x5(e,t,n,r,o,i){const a=t+i.x,s=n+i.y,l=o;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function S5(e){let{area:t,vx:n,vy:r,width:o,height:i,offset:a}=e;const s=n+a.x,l=r+a.y,u=o,c=i;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+u>t.width?-(s+u-t.width):0,p+=l+c>t.height?-(l+c-t.height):0,{x:d,y:p}}function w5(e){let{options:t,pointer:n,width:r,height:o,dockOrder:i,x:a,y:s}=e;const{targetBounds:l}=n,u=y5(t.offset),c=u[t.dock];if(c)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c},computedArrowStyle:v5(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=b5(r,o,t.offset),f=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<i.length;e+=1){const n=i[e],l=S5({area:d,vx:h,vy:m,width:r,height:o,offset:p[n]}),c={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u[n]},g=v5(t.offset)[n];0!==l.x&&(c.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(c.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:c,computedArrowStyle:g,dock:n,rect:{width:r,height:o}};if(0===l.x&&0===l.y)return y;y.offset=l,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function C5(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const o=r.rect;return EW({scaleRatio:o.scaleRatio},o.computedInner)}const E5={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:o,height:i,options:a}=e;const{targetBounds:s}=r,{x:l,y:u,width:c,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:u+d/2},right:{x:l+c,y:u+d/2},top:{x:l+c/2,y:u},bottom:{x:l+c/2,y:u+d},inside:{x:l+c/2,y:u+d/2}},f=y5(a.offset),h=f[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:h},computedArrowStyle:v5(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=b5(o,i,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(x5(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,o,i,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:f[t]},computedArrowStyle:v5(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:o,area:i,width:a}=e;const s="top",l="target"===t.area?n[s].x:o.left+n[s].x,u=("target"===t.area?n[s].y:(o.top,n[s].y),r[s]),c=l+u.x,d=(u.y,a);let p=n.top.x;return c<0&&c+d>i.width||(c<0?p-=c:c+d>i.width&&(p-=c+d-i.width)),p}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:o});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:f.top},computedArrowStyle:v5(a.offset+b-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:o}=e;const{x:i,y:a}=n;return w5({x:i,y:a,pointer:n,width:r,height:o,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:o,nodes:i,resources:a}=e;const s=i[0],{dx:l,dy:u}=n,c=a.getComponentBoundsFromNode(s),d=l+c.x+c.width/2,p=u+c.y+c.height/2,{start:f,end:h,outerRadius:m}=s.desc.slice,g=(f+h)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y;let v=["top","left","right","bottom"];return"auto"===t.dock&&(v=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),w5({x:d+m*c.scaleRatio.x*Math.cos(b),y:p+m*c.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:o,options:t,dockOrder:v})}};function k5(e,t){let{width:n,height:r}=e,{chart:o,state:i,props:a}=t;const s={resources:{formatter:o.formatter,scale:o.scale,component:o.component,getComponentBoundsFromNode:e=>C5(e,i.pointer,o),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=C5(e,t,n),o=e.bounds;return{x:r.x+t.dx+o.x,y:r.y+t.dy+o.y,width:o.width,height:o.height}}(e,i.pointer,o)},nodes:i.activeNodes,pointer:i.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let u={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(u=EW(u,a.placement(s))),"object"===l&&E5[a.placement.type]?u=EW(u,a.placement):"string"===l&&E5[a.placement]&&(u=EW(u,{type:a.placement})),s.options=u;const c=E5[u.type](s);let{x:d,y:p,width:f,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,f+=d,p+=s.pointer.dy,h+=p,c.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(c.computedTooltipStyle.left)),f),"px"),c.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(c.computedTooltipStyle.top)),h),"px"),c}let R5;function _5(){R5=null}const M5={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const A5={require:["chart","renderer"],defaultSettings:{settings:M5,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,o=0,i=0;e.center?(o+=e.center.x,i+=e.center.y):(o+=e.clientX,i+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=o,u=i,c=a.left-s.left,d=a.top-s.top,p=o-a.left,f=i-a.top;return o-=s.left,i-=s.top,{x:o,y:i,dx:c,dy:d,cx:p,cy:f,clientX:l,clientY:u,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=g5({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){R5&&R5!==e&&R5()}(t),R5=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,EW({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,EW({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),R5===t&&(R5=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),_5()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),_5()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:o,h:i}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:i},s=[];return e.forEach((e=>{if("function"==typeof o.extract){const t=EW({node:e},a);s.push(o.extract(t))}})),s}(e,this),n=k5(m5(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=m5(t,n,this)}};const D5={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var P5={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},L5=/([astvzqmhlc])([^astvzqmhlc]*)/gi,I5=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function q5(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(L5,((e,n,r)=>{const o=function(e){const t=e.match(I5);return t?t.map(Number):[]}(r);let i=n.toLowerCase(),a=n;if("m"===i&&o.length>2&&(t.push([a,...o.splice(0,2)]),i="l",a="m"===a?"l":"L"),o.length<P5[i])return"";for(t.push([a,...o.splice(0,P5[i])]);o.length>=P5[i]&&o.length&&P5[i];)t.push([a,...o.splice(0,P5[i])]);return""})),t}const T5=2*Math.PI;function O5(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function N5(e,t,n,r,o){const i=1-e;return i**3*t+3*i**2*e*n+3*i*e**2*r+e**3*o}function z5(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(i<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return o[o.length-1]!==e&&o.push(e),o.push(r),o;const a=O5(e,t),s=O5(t,n),l=O5(n,r),u={x:N5(.5,e.x,t.x,n.x,r.x),y:N5(.5,e.y,t.y,n.y,r.y)},c=O5(a,s),d=O5(s,l);return z5(e,a,c,u,o,i-1),z5(u,d,l,r,o,i-1),o}function F5(e,t,n){const{cp1:r,cp2:o}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return z5(e,r,o,n)}function j5(e,t,n){const r=[],o=!!e[4],i=!!e[5],a=e[3];let s,l,u,c,d=e[6],p=e[7],f=e[1],h=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!f||!h)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:f,ry:h,sweepAngle:u,startAngle:c}=function(e,t,n,r,o,i,a,s,l){let u,c,d,p,f,h;const m=iQ(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-i)/2,v=(l-a)/2,x=g*b+y*v,S=g*v-y*b;h=x**2/(e=Math.abs(e))**2+S**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const w=e*S,C=t*x,E=w**2+C**2,k=(e*t)**2-E;let R=Math.sqrt(Math.max(k/E,0));r===o&&(R=-R);const _=R*(w/t),M=R*(-C/e);p=g*_-y*M+(s+i)/2,f=y*_+g*M+(l+a)/2;const A=(x-_)/e,D=(S-M)/t,P=(-x-_)/e,L=(-S-M)/t;return u=Math.atan2(D,A),u+=u<0?T5:0,c=Math.atan2(L,P),c+=c<0?T5:0,d=c-u,!o&&u<c?d-=T5:o&&c<u&&(d+=T5),d%=T5,{startAngle:u,sweepAngle:d,cx:p,cy:f,rx:e,ry:t}}(f,h,a,o,i,d,p,t,n));const m=Math.abs(u*Math.sqrt((f**2+h**2)/2)),g=Math.ceil(m/10),y=u/g;for(let e=1;e<=g;e++){const t=(c+y*e)%T5,n=Math.cos(t),o=Math.sin(t);r.push({x:s+n*f+-o*n,y:l+o*h+n*o})}return r}function H5(e){const t=q5(e),n=[],r=[];let o=0,i=0,a=null,s=null,l=null,u=null;for(let e=0;e<t.length;++e){const c=t[e],d=c[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,u=null),d){case"m":r.length&&n.push(r.splice(0));case"l":o+=c[1],i+=c[2],r.push({x:o,y:i});break;case"M":r.length&&n.push(r.splice(0));case"L":o=c[1],i=c[2],r.push({x:o,y:i});break;case"H":o=c[1],r.push({x:o,y:i});break;case"h":o+=c[1],r.push({x:o,y:i});break;case"V":i=c[1],r.push({x:o,y:i});break;case"v":i+=c[1],r.push({x:o,y:i});break;case"a":r.push(...j5(c,o,i)),o+=c[6],i+=c[7];break;case"A":r.push(...j5(c,o,i)),o=c[6],i=c[7];break;case"c":r.push(...z5({x:o,y:i},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i},{x:c[5]+o,y:c[6]+i})),a=c[3]+o,s=c[4]+i,o+=c[5],i+=c[6];break;case"C":r.push(...z5({x:o,y:i},{x:c[1],y:c[2]},{x:c[3],y:c[4]},{x:c[5],y:c[6]})),a=c[3],s=c[4],o=c[5],i=c[6];break;case"s":null!==a&&null!==a||(a=o,s=i),r.push(...z5({x:o,y:i},{x:2*o-a,y:2*i-s},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),a=c[1]+o,s=c[2]+i,o+=c[3],i+=c[4];break;case"S":null!==a&&null!==a||(a=o,s=i),r.push(...z5({x:o,y:i},{x:2*o-a,y:2*i-s},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),a=c[1],s=c[2],o=c[3],i=c[4];break;case"Q":r.push(...F5({x:o,y:i},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),l=c[1],u=c[2],o=c[3],i=c[4];break;case"q":r.push(...F5({x:o,y:i},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),l=c[1]+o,u=c[2]+i,o+=c[3],i+=c[4];break;case"T":null!==l&&null!==l||(l=o,u=i),l=2*o-l,u=2*i-u,r.push(...F5({x:o,y:i},{x:l,y:u},{x:c[1],y:c[2]})),o=c[1],i=c[2];break;case"t":null!==l&&null!==l||(l=o,u=i),l=2*o-l,u=2*i-u,r.push(...F5({x:o,y:i},{x:l,y:u},{x:c[1]+o,y:c[2]+i})),o+=c[1],i+=c[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const B5={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{H5(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var $5=[function(e){e.component("box",VZ),e.component("box-marker",VZ)},function(e){e.component("point",JZ),e.component("point-marker",JZ)},function(e){e.component("pie",t0)},function(e){e.component("grid-line",a0)},function(e){e.component("ref-line",y0)},function(e){e.component("axis",U0)},function(e){e.component("container",G0)},function(e){e.component("text",X0)},function(e){e.component("scrollbar",Z0)},function(e){e.component("brush-range",h1),e.component("brush-area-dir",b1)},function(e){e.component("range",w1)},function(e){e.component("brush-lasso",M1)},function(e){e.component("labels",H2)},function(e){e.component("legend-cat",e5)},function(e){e.component("legend-seq",a5)},function(e){e.component("line",c5)},function(e){e.component("brush-area",h5)},function(e){e.component("tooltip",A5)},function(e){e.component("debug-collider",D5)},function(e){e.component("debug-path-to-points",B5)}];class V5{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}}class W5{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:o,minHeight:i})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,o)):(this.x=e+Math.min(n,-o),this.width=-Math.min(n,-o)),r>=0?(this.y=t,this.height=Math.max(r,i)):(this.y=t+Math.min(r,-i),this.height=-Math.min(r,-i))}containsPoint(e){return VQ(this,e)}intersectsLine(e){return WQ(this,OW(e))}intersectsRect(e){return BQ(this,TW(e))}intersectsCircle(e){return OQ(e,this)}intersectsPolygon(e){return HQ(e,this)}intersectsGeoPolygon(e){return ZQ(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class U5{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return TQ(this,e)}intersectsLine(e){return NQ(this,OW(e))}intersectsRect(e){return OQ(this,TW(e))}intersectsCircle(e){return n=e,!PQ(t=this)&&!PQ(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return zQ(this,e)}intersectsGeoPolygon(e){return XQ(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class G5{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:o})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(o)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return NQ({cx:e.x,cy:e.y,r:this.tolerance},this)}return GQ(this,e)}intersectsLine(e){return UQ(this,OW(e))}intersectsRect(e){return WQ(TW(e),this)}intersectsCircle(e){return NQ(e,this)}intersectsPolygon(e){return jQ(e,this)}intersectsGeoPolygon(e){return QQ(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class Y5{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return FQ(this,e)}intersectsCircle(e){return zQ(e,this)}intersectsLine(e){return jQ(this,OW(e))}intersectsRect(e){return HQ(this,TW(e))}intersectsPolygon(e){return YQ(this,e)}intersectsGeoPolygon(e){return KQ(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function K5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Y5(...t)}function X5(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function J5(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class Q5{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)J5(this.vertices[e]),this.vertices[e].length>2&&X5(this.vertices[e]),this.polygons[e]=K5({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return JQ(this,e)}intersectsCircle(e){return XQ(e,this)}intersectsLine(e){return QQ(this,OW(e))}intersectsRect(e){return ZQ(this,TW(e))}intersectsPolygon(e){return KQ(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!BQ(n,r)&&($Q(r,n)?qQ(t,e):qQ(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Z5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Q5(...t)}class e3{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>GQ(t,e)))}intersectsCircle(e){return this.segments.some((t=>NQ(e,t)))}intersectsLine(e){const t=OW(e);return this.segments.some((e=>UQ(e,t)))}intersectsRect(e){const t=TW(e);return this.segments.some((e=>WQ(t,e)))}intersectsPolygon(e){return this.segments.some((t=>jQ(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>QQ(e,t)))}points(){return this._points}}const t3=HU();function n3(e,t){return t3.get(e)(t)}t3.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new W5(...t)})),t3.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new U5(...t)})),t3.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new G5(...t)})),t3.add("polygon",K5),t3.add("geopolygon",Z5),t3.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new e3(...t)}));class r3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=n3(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class o3{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new o3).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,o;if(e instanceof o3&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(o=0;o<3;o++)r[t][n]+=this._elements[t][o]*e[o][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,o,i){return this.multiply([[e,n,o],[t,r,i],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],o=this._elements[1][1],i=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],u=0;return u=e*o*l+t*i*a+n*r*s-n*o*a-t*r*l-e*i*s,u}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],o=this._elements[1][0],i=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],u=this._elements[2][2];return this._elements=[[i*u-a*l,r*l-n*u,n*a-r*i],[a*s-o*u,t*u-r*s,r*o-t*a],[o*l-i*s,s*n-t*l,t*i-n*o]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],o=this._elements,i=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)i[t]+=r[n]*o[t][n];return{x:i[0],y:i[1]}}transformPoints(e){let t,n,r,o,i,a=this._elements,s=[];for(o=0;o<e.length;o++){for(t=[e[o].x,e[o].y,1],i=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)i[n]+=t[r]*a[n][r];s.push({x:i[0],y:i[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const i3=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function a3(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],o=t.args[2];e.translate(r,o),e.rotate(n),e.translate(-r,-o)}else 1===t.args.length&&e.rotate(n)}function s3(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function l3(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function u3(e,t){t.args.length>=6&&e.transform(...t.args)}function c3(e,t){const n=function(e){let t,n=[];for(;null!==(t=i3.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,o=n.length;e<o;e++)r=n[e],"rotate"===r.cmd?a3(t,r):"scale"===r.cmd?s3(t,r):"matrix"===r.cmd?u3(t,r):"translate"===r.cmd&&l3(t,r)}const d3={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},p3={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const o=r.attrs[e];if(!t)return void 0!==o;if(void 0===o)return!1;switch(t){case"=":return n===String(o);case"!=":return n!==String(o);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function f3(e,t){if(!t||!t.length||!e||"function"!=typeof p3[e.type])return[];switch(e.type){case"type":case"tag":return p3[e.type](e.value,t);case"attr":return p3[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return p3[e.type](t);default:return[]}}var h3={find:function(e,t){const n=[],r=[];let o,i;if(t.isBranch){let a;o=function(e){const t=[];let n,r,o,i;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{o=e.match(d3[t]),o&&(i=!0,e=e.slice(o[0].length),r={type:t,value:o[0]},"attr"===t&&(o=o[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=o[1],r.operator=o[2],r.attributeValue=o[3]),n.push(r))};for(;e&&(i=!1,o=e.match(/^\s*([>+~]|\s)\s*/),o&&(i=!0,n.push({type:" ",value:o[0]}),e=e.slice(o[0].length)),Object.keys(d3).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),i););})),t}(e),i=t.descendants;for(let e=0,t=o.length;e<t;e++){a=o[e];const t=[];let n=i.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=i.slice(),void(s=!1);n=f3(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,o=r[e].length;t<o;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function m3(e,t,n){const r=e.type;let o=e.points();n&&(o=o.every((e=>Array.isArray(e)))?o.map((e=>n.transformPoints(e))):n.transformPoints(o)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(o,t);let i=null;if("rect"===r||"bounds"===r)i=TW(o),i.type=r;else if("circle"===r)i=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(o,e.r),i.type=r;else if("line"===r)i=OW(o),i.type=r;else if("polygon"===r||"polyline"===r){i={type:"path",d:rQ(o,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<o.length;t++)e+=rQ(o[t],!0);i={type:"path",d:e}}return i}class g3{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:o,height:i}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:o,height:i}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>m3(e,t,n)))}:m3(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new g3(e))),this._parent=()=>e.parent?new g3(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let o=r.left,i=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();o-=t,i-=n}return n.x+=o,n.y+=i,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function y3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new g3(...t)}class b3{constructor(e){this._node=y3(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function v3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new b3(...t)}function x3(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=v3(n);const e=n.parent;e&&"stage"!==e.type&&x3(e,t.parent)}}function S3(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?Z5(n):K5(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const o=e.descendants[r];if(null!==o.collider&&o.collider[t](n)){const e=v3(o);return x3(o,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=v3(e);return x3(e,t),t}return null}(e,t,r)}function w3(e,t,n,r){const o=e.length;for(let i=0;i<o;i++){const o=e[i],a=S3(o,t,r);a&&n.push(a),!o.children||a||o.collider||w3(o.children,t,n,r)}}function C3(e,t,n){const r=e.length;for(let o=0;o<r;o++){const r=e[o];if(null!==S3(r,t,n))return!0;if(r.children&&!r.collider)return C3(r.children,t,n)}return!1}function E3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(NW(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=qW(e).map((e=>uQ(e,t))),["intersectsRect",n];case"line":return n=IW(e).map((e=>uQ(e,t))),["intersectsLine",n];case"point":return n=uQ(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>uQ(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>uQ(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function k3(e,t){const[n,r]=E3(t,e.dpi),o=[];return n&&(w3([e],n,o,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function R3(e,t){const[n,r]=E3(t,e.dpi);return C3([e],n,r)}class _3 extends V5{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:o,fillReference:i}=e;var a,s;a=this.attrs,s=e,Object.keys(nQ).forEach((e=>{const t=s[e];void 0!==t&&(a[nQ[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=EW(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof o&&(this.strokeReference=o),"string"==typeof i&&(this.fillReference=i)}findShapes(e){return h3.find(e,this).map((e=>y3(e)))}getItemsFrom(e){return k3(this,e)}containsPoint(e){return R3(this,e)}intersectsLine(e){return R3(this,e)}intersectsRect(e){return R3(this,e)}intersectsCircle(e){return R3(this,e)}intersectsPolygon(e){return R3(this,e)}intersectsGeoPolygon(e){return R3(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o3;void 0!==this.attrs.transform&&c3(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o3;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,o=Object.keys(r);if(n.length!==o.length)return!1;for(let e=0;e<n.length;e++){const o=n[e];if(!Object.hasOwnProperty.call(r,o))return!1;if(t[o]!==r[o])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new r3(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=n3("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=n3(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class M3 extends V5{addChild(e){if(!(e&&e instanceof V5))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const A3=M3.prototype;class D3 extends _3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=EW({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,o]=e.bounds(t),{x:i,y:a}=r,{x:s,y:l}=o,u=isNaN(n.width)?s:Math.max(s,n.width+n.x),c=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?i:Math.min(i,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=u-n.x,n.height=c-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=EW({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=A3.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=EW({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=A3.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=EW({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(A3.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=EW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(A3.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=EW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function P3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new D3(...t)}class L3 extends D3{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const I3=M3.prototype,q3=["x1","x2","y1","y2","id","offset","style"];class T3 extends _3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=q3.length;r!==o;r++)n=q3[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return I3.addChild.call(this,e)}addChildren(e){return I3.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return I3.removeChild.call(this,e),this}removeChildren(e){return I3.removeChildren.call(this,e),this}}function O3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new T3(...t)}const N3=M3.prototype,z3=["patternUnits","x","y","width","height","id"];class F3 extends _3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=z3.length;r!==o;r++)n=z3[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return N3.addChild.call(this,e)}addChildren(e){return N3.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return N3.removeChild.call(this,e),this}removeChildren(e){return N3.removeChildren.call(this,e),this}}class j3 extends _3{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:o=0,rx:i=0,ry:a=0,collider:s}=e,l=EW({type:"rect",x:t,y:n,width:r,height:o},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),o>=0?(this.attrs.y=n,this.attrs.height=o):(this.attrs.y=n+o,this.attrs.height=-o),i>0&&(this.attrs.rx=i),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=qW(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,o,i,a]=LW(n);return this.__boundingRect[e]={x:r,y:o,width:i-r,height:a-o},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class H3 extends _3{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:o}=e,i=EW({type:"circle",cx:t,cy:n,r:r},o);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=i,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:o}=this.attrs,i=t-r,a=n-o;let s=2*r,l=2*o,u=[{x:i,y:a},{x:i+s,y:a},{x:i+s,y:a+l},{x:i,y:a+l}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const[t,n,r,o]=LW(u);s=r-t,l=o-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=u;return this.__bounds[e]}}class B3 extends _3{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:o=0,collider:i}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=o;const a={type:"line",x1:t,y1:n,x2:r,y2:o};this.collider=EW(a,i),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=IW(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,o,i]=LW(t),a=n!==o||r!==i;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,o-n):0,height:a?Math.max(1,i-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const $3=Math.PI/2;function V3(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function W3(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const U3={step:function(e){return new TU(e,.5)},stepAfter:function(e){return new TU(e,1)},stepBefore:function(e){return new TU(e,0)},linear:pU,basis:function(e){return new xU(e)},cardinal:CU.tension(0),catmullRom:kU,monotonex:function(e){return new DU(e)},monotoney:function(e){return new PU(e)},natural:function(e){return new IU(e)}};function G3(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class Y3 extends _3{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=cU();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:o,stngs:i,generatorType:a}=e,s=mU(),l=i.coordinates?i.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(U3["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const u=i.connect?o.filter(s.defined()):o,c=("area"===a?s:s[a]())(u);this.attrs.d=c}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=H5(this.attrs.d),this.segments.length>1&&this.segments.every((e=>G3(e))))return void(this.collider=EW({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(G3(t))this.collider=EW({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],o=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const i=e.length-1;for(let n=1;n<i;n++){const a=e[n-1],s=e[n],l=e[n+1],u=V3(s,a),c=V3(s,l),d=(u+c)/2,p=d+Math.PI,f=Math.max(d,p),h=Math.min(d,p),m=u>c;if(1===n){const e=V3(a,s);r.push(W3(a,e-$3,t)),o.unshift(W3(a,e+$3,t))}const g=m?f:h,y=m?h:f;if(r.push(W3(s,g,t)),o.unshift(W3(s,y,t)),n===i-1){const e=V3(l,s);r.push(W3(l,e+$3,t)),o.unshift(W3(l,e-$3,t))}}return{type:"polygon",vertices:[...r,...o]}}(t,n,e.collider)}else this.collider=EW({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:H5(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let o=0;o<r;o++){n=e[o];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,o,i]=LW(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:o-n||0,height:i-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function K3(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class X3 extends _3{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:o=0,textBoundsFn:i,text:a,title:s,collider:l,boundingRect:u,ellipsed:c}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=o,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof u?this._textBoundsFn=()=>u:"function"==typeof i&&(this._textBoundsFn=i),"string"==typeof c&&(this.ellipsed=c),this.collider=EW({type:K3(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=qW(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[o,i,a,s]=LW(r);return this.__boundingRect[t]={x:o,y:i,width:a-o,height:s-i},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const J3=HU();function Q3(e,t){return J3.get(e)(t)}J3.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new j3(...t)})),J3.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new H3(...t)})),J3.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new X3(...t)})),J3.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new B3(...t)})),J3.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Y3(...t)})),J3.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new L3(...t)})),J3.add("container",P3),J3.add("defs",P3),J3.add("linearGradient",O3),J3.add("radialGradient",O3),J3.add("conicGradient",O3),J3.add("stop",O3),J3.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new F3(...t)}));const Z3=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=n(),i={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==o[a]&&(i[a]=o[a]);return EW(i,r),t.push(i),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function e6(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function t6(e,t,n){e.node=n[t],e.index=t}function n6(e,t,n,r){let o=!1;const i={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(t6(i,a,e),e6(i,r.create),o="function"==typeof i.node.disabled?i.node.disabled():i.node.disabled,o)continue;i.node=Z3.save(i.node);const s=Q3(i.node.type,i.node);s&&(i.node.transform&&(n.save(),c3(i.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),i.node.children&&n6(i.node.children,s,n,r),i.node.transform&&n.restore()),Z3.restore()}}function r6(e){let{items:t,stage:n,dpi:r,on:o={}}=e;return n||(n=Q3("stage",r)),n6(t,n,new o3,o),n}function o6(e,t,n){const{orientation:r,degree:o,stops:i=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,o=n.y||0;a=e.createConicGradient(t,r,o)}else{const r=aQ(o);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const i=t.boundingRect();a=e.createLinearGradient(i.x+r.x1*i.width,i.y+r.y1*i.height,i.x+r.x2*i.width,i.y+r.y2*i.height)}for(let e=0,t=i.length;e<t;e++){let t=i[e];a.addColorStop(t.offset,t.color)}return a}function i6(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function a6(){let{x:e,y:t,width:n,height:r,scaleRatio:o,margin:i,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==o&&(s.scaleRatio.x=isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==i&&(s.margin.left=isNaN(i.left)?0:i.left,s.margin.top=isNaN(i.top)?0:i.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function s6(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:I2,textBounds:T2,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function l6(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const u6=200,c6=200;class d6{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:o}=e;t=o?"function"==typeof o?o(n):o:{width:n.computedPhysical.width+2*u6,height:n.computedPhysical.height+2*c6},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const p6=HU();function f6(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function h6(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function m6(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function g6(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=Object.keys(r);for(let o=0,i=n.length;o<i;o++){let i=n[o];const a=i[0],s=i[1],l=i[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=o.length;t<n;t++){const n=o[t];e[n]=r[n]}}function y6(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let i=e[o],a={};t.save(),i.attrs&&(i.attrs.fill||i.attrs.stroke)&&(i.attrs.fill&&"object"==typeof i.attrs.fill&&"gradient"===i.attrs.fill.type?a.fillStyle=o6(t,i,i.attrs.fill):i.attrs.fill&&"object"==typeof i.attrs.fill&&"pattern"===i.attrs.fill.type&&(a.fillStyle=r.patterns.create(i.attrs.fill)),i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"gradient"===i.attrs.stroke.type?a.strokeStyle=o6(t,i,i.attrs.stroke):i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"pattern"===i.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(i.attrs.stroke))),g6(t,i,n,a),i.modelViewMatrix&&m6(i.modelViewMatrix.elements,t),p6.has(i.type)&&p6.get(i.type)(i.attrs,{g:t,doFill:"fill"in i.attrs&&"none"!==i.attrs.fill,doStroke:"stroke"in i.attrs&&0!==i.attrs["stroke-width"],ellipsed:i.ellipsed}),i.children&&y6(i.children,t,n,r),t.restore()}}function b6(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r6;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let o,i=!1,a=a6();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",f6]];let l;const u=s6();return u.element=()=>e,u.root=()=>e,u.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),u.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new d6(e)),n.appendChild(e),e),u.getScene=r=>{const o=h6(t&&t.getContext()||e.getContext("2d")),i=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*o*i,", ").concat(a.edgeBleed.top*o*s,")"):""};return 1===o&&1===i&&1===s||(l.transform+="scale(".concat(o*i,", ").concat(o*s,")")),n({items:[l],dpi:o,on:{create:[C2(u.measureText),l6(u)]}})},u.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const o=e.key;return o?(r[o]=r[o]||i6(e,t,n),r[o]):i6(e,t,n)},clear(){r={}}}}(e.ownerDocument));const c=t&&t.getContext()||e.getContext("2d"),d=h6(c),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;i&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const f=u.getScene(n),h=!o||!f.equals(o);l.clear();const m=i||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||u.clear(),y6(f.children,c,s,{patterns:l})),t&&(e.width=e.width,t.apply()),i=!1,g&&!g.isFirst&&f.children.unshift(...o.children),o=f,m},u.itemsAt=e=>o?o.getItemsFrom(e):[],u.findShapes=e=>o?o.findShapes(e):[],u.clear=()=>(e&&(e.width=e.width),t&&t.clear(),o=null,u),u.size=e=>{if(e){const t=a6(e);JSON.stringify(a)!==JSON.stringify(t)&&(i=!0,a=t)}return a},u.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),o=null},u}function v6(e,t){p6.add(e,t)}function x6(e,t){return Math.max(0,Math.min(e,t))}const S6=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),w6=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),C6=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function E6(e){return S6.test(e)}function k6(e){return w6.test(e)||C6.test(e)}function R6(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],E6(n))return"ltr";if(k6(n))return"rtl"}return"ltr"}const _6={start:"end",end:"start",center:"center",middle:"middle"};function M6(e,t){return"rtl"===t?_6[e]:e}function A6(e,t){const n=[];let r;const o=[],i=[],a=[];let s,l;const u=e=>e.id,c=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(c)),t=t.map(c),s=e.map(u),l=t.map(u);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):i.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?o.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=A6([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=i.length;e<t;e++)i[e].diff=A6(a[e].children||[],i[e].content.children||[]),i[e].object=a[e].object,i[e].children=i[e].diff.items;return r=i.concat(n),n.isTree=!0,o.isTree=!0,i.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:i,updatedOld:a,removed:o,items:r}}function D6(e,t,n){for(let r=0,o=e.length;r<o;r++)e[r].object=n(e[r].content.type,t)}function P6(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function L6(e,t,n,r){let o;for(let i=0,a=e.length;i<a;i++)o=e[i],null!==o.object&&void 0!==o.object&&(n(o.object,o.content),o.diff&&(D6(o.diff.added,o.object,t),P6(o.diff.removed,r),L6(o.diff.items,t,n,r)))}function I6(e,t,n,r,o,i){const a=A6(e,t);return D6(a.added,n,r),P6(a.removed,i),L6(a.items,r,o,i),a.items}v6("rect",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,o,i,a){i=x6(r/2,i>0?i:a),a=x6(o/2,a>0?a:i),e.moveTo(t,n+a),e.lineTo(t,n+o-a),e.quadraticCurveTo(t,n+o,t+i,n+o),e.lineTo(t+r-i,n+o),e.quadraticCurveTo(t+r,n+o,t+r,n+o-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-i,n),e.lineTo(t+i,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),o&&n.stroke()})),v6("circle",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),o&&n.stroke()})),v6("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),v6("path",(function(e,t){let{g:n,doStroke:r,doFill:o}=t;const i=new Path2D(e.d);o&&n.fill(i),r&&n.stroke(i)})),v6("text",(function(e,t){let{g:n,ellipsed:r,doStroke:o}=t;const i=r||E2(e,I2);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=R6(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=M6("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=k2(e);n.fillText(i,e.x+e.dx,e.y+e.dy+l),o&&n.strokeText(i,e.x+e.dx,e.y+e.dy+l)}));const q6="http://www.w3.org/2000/svg",T6=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(q6,"container"===e?"g":e);return t.appendChild(n),n},O6=e=>{e.parentNode&&e.parentNode.removeChild(e)},N6=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||E2(t.attrs,I2);const n=R6(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",M6(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(q6,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let o=0;o="dominant-baseline"===n?k2(t.attrs):t.attrs[n],e.setAttribute("dy",o+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class z6{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function F6(){return new z6(I6,T6,N6,O6)}function j6(e){let t,n,r,o=0;if(0===(e=JSON.stringify(e)).length)return o;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),o=(o<<5)-o+n,o&=o;return o}function H6(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q6,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r6;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:F6)();let r,o,i,a=!1,s=a6();const l={transform:void 0,disableScreenReader:!1},u=s6(),c={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j6,n={},r=Date.now();const o={onCreate(o){let i={};o.node&&"object"==typeof o.node.fill&&"pattern"===o.node.fill.type&&o.node.fill.shapes&&(i.fill=o.node.fill),o.node&&"object"==typeof o.node.stroke&&"pattern"===o.node.stroke.type&&o.node.stroke.shapes&&(i.stroke=o.node.stroke),Object.keys(i).forEach((a=>{let s="";const l=i[a],u=t(l),c="picasso-pattern-".concat(r,"-").concat(u);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[u]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:c,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[u]=!0}o.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(c,"')")}))},clear(){n={}}};return o}(c.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j6,n={},r=Date.now();const o={getOrCreateGradient(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(o[i]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=o[i],u={};void 0===r&&(r=90),"radial"===t?u.type="radialGradient":(u=aQ(r),["x1","x2","y1","y2"].forEach((e=>{e in o[i]&&(u[e]=o[i][e])})),u.type="linearGradient"),u.id=l,u.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(u),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=o.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=o.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return o}(c.children);return u.element=()=>r,u.root=()=>o,u.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),u.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),o=t.ownerDocument.createElementNS(e,"g"),o.style.pointerEvents="auto",r.appendChild(o)),t.appendChild(r),r),u.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,o={type:"container",children:Array.isArray(e)?[...e,c]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(o.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[o],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,C2(u.measureText),l6(u)]}})},u.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return o.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}o.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),c.children.length=0;const f=u.getScene(e),h=!i||!f.equals(i),m=a||h;return m&&(u.clear(),n.render(f.children,o)),a=!1,i=f,m},u.itemsAt=e=>i?i.getItemsFrom(e):[],u.findShapes=e=>i?i.findShapes(e):[],u.clear=()=>{if(!o)return u;i=null;const e=o.cloneNode(!1);return r.replaceChild(e,o),o=e,u},u.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,o=null},u.size=e=>{if(e){const t=a6(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},u}var B6,$6,V6,W6,U6,G6,Y6,K6={},X6=[],J6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Q6(e,t){for(var n in t)e[n]=t[n];return e}function Z6(e){var t=e.parentNode;t&&t.removeChild(e)}function e4(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?B6.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return t4(e,a,r,o,null)}function t4(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++V6:o};return null==o&&null!=$6.vnode&&$6.vnode(i),i}function n4(e){return e.children}function r4(e,t){this.props=e,this.context=t}function o4(e,t){if(null==t)return e.__?o4(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?o4(e):null}function i4(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return i4(e)}}function a4(e){(!e.__d&&(e.__d=!0)&&W6.push(e)&&!s4.__r++||U6!==$6.debounceRendering)&&((U6=$6.debounceRendering)||G6)(s4)}function s4(){var e,t,n,r,o,i,a,s;for(W6.sort(Y6);e=W6.shift();)e.__d&&(t=W6.length,r=void 0,o=void 0,a=(i=(n=e).__v).__e,(s=n.__P)&&(r=[],(o=Q6({},i)).__v=i.__v+1,g4(s,i,o,n.__n,void 0!==s.ownerSVGElement,null!=i.__h?[a]:null,r,null==a?o4(i):a,i.__h),y4(r,i),i.__e!=a&&i4(i)),W6.length>t&&W6.sort(Y6));s4.__r=0}function l4(e,t,n,r,o,i,a,s,l,u){var c,d,p,f,h,m,g,y=r&&r.__k||X6,b=y.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(f=n.__k[c]=null==(f=t[c])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?t4(null,f,null,null,f):Array.isArray(f)?t4(n4,{children:f},null,null,null):f.__b>0?t4(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=y[c])||p&&f.key==p.key&&f.type===p.type)y[c]=void 0;else for(d=0;d<b;d++){if((p=y[d])&&f.key==p.key&&f.type===p.type){y[d]=void 0;break}p=null}g4(e,f,p=p||K6,o,i,a,s,l,u),h=f.__e,(d=f.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,f),g.push(d,f.__c||h,f)),null!=h?(null==m&&(m=h),"function"==typeof f.type&&f.__k===p.__k?f.__d=l=u4(f,l,e):l=c4(e,f,p,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=o4(p))}for(n.__e=m,c=b;c--;)null!=y[c]&&("function"==typeof n.type&&null!=y[c].__e&&y[c].__e==n.__d&&(n.__d=d4(r).nextSibling),x4(y[c],y[c]));if(g)for(c=0;c<g.length;c++)v4(g[c],g[++c],g[++c])}function u4(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?u4(r,t,n):c4(n,r,r,o,r.__e,t));return t}function c4(e,t,n,r,o,i){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function d4(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=d4(n)))return r;return null}function p4(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||J6.test(t)?n:n+"px"}function f4(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||p4(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||p4(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?m4:h4,i):e.removeEventListener(t,i?m4:h4,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function h4(e){return this.l[e.type+!1]($6.event?$6.event(e):e)}function m4(e){return this.l[e.type+!0]($6.event?$6.event(e):e)}function g4(e,t,n,r,o,i,a,s,l){var u,c,d,p,f,h,m,g,y,b,v,x,S,w,C,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(u=$6.__b)&&u(t);try{e:if("function"==typeof E){if(g=t.props,y=(u=E.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(g,b):(t.__c=c=new r4(g,b),c.constructor=E,c.render=S4),y&&y.sub(c),c.props=g,c.state||(c.state={}),c.context=b,c.__n=r,d=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=E.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Q6({},c.__s)),Q6(c.__s,E.getDerivedStateFromProps(g,c.__s))),p=c.props,f=c.state,c.__v=t,d)null==E.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(g,b),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(g,c.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=g,c.state=c.__s,c.__d=!1),c.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<c._sb.length;v++)c.__h.push(c._sb[v]);c._sb=[],c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(g,c.__s,b),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,f,h)}))}if(c.context=b,c.props=g,c.__P=e,x=$6.__r,S=0,"prototype"in E&&E.prototype.render){for(c.state=c.__s,c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),w=0;w<c._sb.length;w++)c.__h.push(c._sb[w]);c._sb=[]}else do{c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++S<25);c.state=c.__s,null!=c.getChildContext&&(r=Q6(Q6({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(p,f)),C=null!=u&&u.type===n4&&null==u.key?u.props.children:u,l4(e,Array.isArray(C)?C:[C],t,n,r,o,i,a,s,l),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),m&&(c.__E=c.__=null),c.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=b4(n.__e,t,n,r,o,i,a,l);(u=$6.diffed)&&u(t)}catch(e){t.__v=null,(l||null!=i)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),$6.__e(e,t,n)}}function y4(e,t){$6.__c&&$6.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){$6.__e(e,t.__v)}}))}function b4(e,t,n,r,o,i,a,s){var l,u,c,d=n.props,p=t.props,f=t.type,h=0;if("svg"===f&&(o=!0),null!=i)for(;h<i.length;h++)if((l=i[h])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,i[h]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),i=null,s=!1}if(null===f)d===p||s&&e.data===p||(e.data=p);else{if(i=i&&B6.call(e.childNodes),u=(d=n.props||K6).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||f4(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||f4(e,i,t[i],n[i],r)}(e,p,d,o,s),c)t.__k=[];else if(h=t.props.children,l4(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==f,i,a,i?i[0]:n.__k&&o4(n,0),s),null!=i)for(h=i.length;h--;)null!=i[h]&&Z6(i[h]);s||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===f&&!h||"option"===f&&h!==d.value)&&f4(e,"value",h,d.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&f4(e,"checked",h,d.checked,!1))}return e}function v4(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){$6.__e(e,n)}}function x4(e,t,n){var r,o;if($6.unmount&&$6.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||v4(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){$6.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&x4(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Z6(e.__e),e.__=e.__e=e.__d=void 0}function S4(e,t,n){return this.constructor(e,n)}function w4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,o=a6();const i={transform:void 0,disableScreenReader:!1},a=s6();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(i).forEach((t=>{void 0!==e[t]&&(i[t]=e[t])})),i),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof i.transform&&i.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:o,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(o,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return i.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(o.computedPhysical.x,"px"),n.style.top="".concat(o.computedPhysical.y,"px"),n.style.width="".concat(o.computedPhysical.width,"px"),n.style.height="".concat(o.computedPhysical.height,"px"),a=Array.isArray(e)?e4("div",null,e):e,r=function(e,t,n){var r,o,i;$6.__&&$6.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],g4(t,e=(!r&&n||t).__k=e4(n4,null,[e]),o||K6,K6,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?B6.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),y4(i,e)}(a,n,r),!0},a.renderArgs=[e4],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(o=a6(e)),o),a}B6=X6.slice,$6={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},V6=0,r4.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Q6({},this.state),"function"==typeof e&&(e=e(Q6({},n),this.props)),e&&Q6(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),a4(this))},r4.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),a4(this))},r4.prototype.render=n4,W6=[],G6="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Y6=function(e,t){return e.__v.__b-t.__v.__b},s4.__r=0;var C4=[function(e){e.renderer("svg",H6)},function(e){e.renderer("canvas",b6)},function(e){e.renderer("dom",w4)}];const E4={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const k4=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=E4.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[E4.OFF]:()=>{},[E4.ERROR]:function(){return t.error(...arguments)},[E4.WARN]:function(){return t.warn(...arguments)},[E4.INFO]:function(){return t.info(...arguments)},[E4.DEBUG]:function(){return t.log(...arguments)}},o=function(e){if(e&&!(n<e)){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];(r[e]||r[E4.DEBUG])(...o)}};return{log:o,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:E4}}(t.logger),o={component:HU(n.component,"component",r),data:HU(n.data,"data",r),formatter:HU(n.formatter,"formatter",r),interaction:HU(n.interaction,"interaction",r),renderer:MZ(n.renderer),scale:HU(n.scale,"scale",r),symbol:HU(n.symbol,"symbol",r),logger:r};function i(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:EW({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},o)}return t.renderer&&t.renderer.prio&&o.renderer.default(t.renderer.prio[0]),i.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o)},i.chart=e=>_Z(e,{registries:o,logger:r,style:t.style,palettes:t.palettes}),i.config=()=>t,Object.keys(o).forEach((e=>{i[e]=o[e]})),i.version=kW,i}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:AZ,data:qZ,formatter:dK,interaction:TZ,renderer:MZ(),scale:pJ,symbol:bQ});$5.forEach(k4.use),C4.forEach(k4.use),[].forEach(k4.use);const R4=e=>({key:"bars",type:"box",data:{extract:{field:k$,props:{start:0,end:{field:R$}}}},settings:{major:{scale:_$},minor:{scale:M$},box:{maxWidthPx:8,fill:{fn:e}}}}),_4=e=>({key:"p",type:"point",data:{extract:{field:k$,props:{y:{field:R$}}}},settings:{x:{scale:_$},y:{scale:M$},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),M4=({qNum:e})=>void 0===e?0:Math.sign(e),A4=(e,t)=>{const{primary:n,nil:r,others:o}=e.getDataColorSpecials(),i=LL(e,null==t?void 0:t.negative,n),a=LL(e,null==t?void 0:t.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:k$,props:{start:0,end:{field:R$,value:M4}}}},settings:{major:{scale:_$},minor:{scale:M$},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?o:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?i:a}}}}},D4=(e,{type:t,showDots:n,colors:r,colorMin:o,colorMax:i})=>{const a=((e,t,n,r)=>{const{primary:o,nil:i,others:a}=e.getDataColorSpecials(),s=LL(e,null==t?void 0:t.main,o),l=LL(e,null==t?void 0:t.max,s),u=LL(e,null==t?void 0:t.min,s),c=LL(e,null==t?void 0:t.first,s),d=LL(e,null==t?void 0:t.last,s);return e=>{const t=M$ in e.datum?M$:"end";return-2===e.datum.value?i:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?u:e.data.items.at(0)===e.datum?c:e.data.items.at(-1)===e.datum?d:s}})(e,r,o,i);switch(t){case"bars":return[R4(a)];case"dots":return[_4(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:k$,props:{v:{field:R$}}}},settings:{coordinates:{major:{scale:_$},minor:{scale:M$,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(LL(e,null==r?void 0:r.main,e.getDataColorSpecials().primary));return n?[t,_4(a)]:[t]}case"posNeg":return[A4(e,r)];default:return[]}},P4=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),L4=(e,t,n,r)=>({y:{data:{field:R$},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:k$}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),I4=k4();I4.use(mW),I4.renderer.prio(["canvas"]);const q4={resolve:()=>{},promise:{}},T4=({chart:e,element:t,requestId:n,theme:r,isSnapshot:o,direction:i,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:u}=(e=>{const t=Ka.useRef(e.isDownloadedAsPDForImage?Ae():q4);return{addChartPromiseToQueue:Ka.useCallback((()=>{e.waitForPromise(t.current.promise)}),[e]),resolveChartPromise:t.current.resolve}})(s),c=Ka.useCallback((()=>{if(null===t.current||null!==e.current)return;u();n.current=C$((()=>{t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:o,direction:i})=>{const{type:a,qMatrix:s,minY:l,maxY:u}=r;return I4.chart({element:e,data:{type:"q",key:"qHyperCube",data:P4(s)},settings:{scales:L4(a,l,u,i),components:D4(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{o()}})})({element:t.current,theme:r,isSnapshot:o,miniChartData:a,direction:i,onChartRendered:l}))}),{timeout:2e3})}),[t,e,u,n,r,o,a,i,l]);return{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:Ka.useCallback((()=>{null!==n.current&&E$(n.current),n.current=null,l()}),[n,l])}},O4=e=>{const t=Ka.useRef(null),n=Ka.useRef(!1);return Ka.useCallback((r=>{var o,i;const a=null!==(o=null===(i=r.contentBoxSize.at(0))||void 0===i?void 0:i.inlineSize)&&void 0!==o?o:0;(e=>{e.current&&(E$(e.current),e.current=null)})(t),n.current?0!==a?null!==e.current&&(t.current=C$((()=>{var t;null===(t=e.current)||void 0===t||t.update()}),{timeout:2e3})):n.current=!1:n.current=!0}),[e])},N4=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:o,downloadService:i,direction:a})=>{const s=Ka.useRef(null),l=Ka.useRef(null),u=Ka.useRef(null),{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:d}=T4({element:s,chart:l,requestId:u,theme:n,isSnapshot:r,direction:a,miniChartData:o,downloadService:i});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:o})=>{const i=Ka.useCallback((e=>{e.isIntersecting?r():n()}),[r,n]);Ka.useEffect((()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,i),()=>{var e;t.removeTask(r),n(),null===(e=o.current)||void 0===e||e.destroy(),o.current=null}}),[o,e,t,n,i])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:c,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{Ka.useEffect((()=>r?()=>{}:(e(),()=>{var e;t(),null===(e=n.current)||void 0===e||e.destroy(),n.current=null})),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:c,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=O4(t);Ka.useEffect((()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}}),[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},z4=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s})=>{const l=N4({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s});return Xa.createElement("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},F4="cell-text",j4=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:o=!1,lineClamp:i})=>{const{styleService:a}=Yj(Vj,(e=>e.baseProps));return o?Rl.jsx(BB,{"data-testid":F4,ref:t,className:"sn-table-cell-text",lineClamp:a.grid.headerLineClamp,isPagination:r,isHeadCell:!0,children:e}):Rl.jsx(BB,{"data-testid":F4,ref:t,className:"sn-table-cell-text",isNumeric:n,lineClamp:null!=i?i:a.grid.contentLineClamp,isPagination:r,children:e})},H4=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),B4=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},$4=(e,t)=>{const n=(e=>e.map((e=>{var t;return null!==(t=e.value)&&void 0!==t?t:e})).sort(((e,t)=>e-t)))(e),r=n.some((e=>!Fq(e)));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!Fq(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},V4=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort(((e,t)=>e.value-t.value));return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:i.gradient?{color:l.color,t:u/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return s&&f(e.localPaletteColors[t].color).blend(f(s.color),s.t)},W4=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort(((e,t)=>e.value-t.value)),e.limits=n.map((e=>({...e,value:H4(t,e.value)})))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map(((e,t)=>({color:B4(r,t,n)})))),r},U4=(e,t,n,r)=>{const o=W4(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=V4(e,a,t);break}r=i}return n})(o,t);return a},G4=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=$4(e,t),o=Math.abs(t);return{min:null!=n?n:t-o,max:null!=r?r:t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!Fq(t))return 0;let a=n&&Fq(n)?Math.min(n,t):0;const s=r.sort(((e,t)=>e.value-t.value)),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},Y4=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=G4(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(null==i||!i.length||!((e,t)=>{var n,r,o;return!(!e||0===e.length||!(null!==(n=null===(r=e[t])||void 0===r?void 0:r.gradient)&&void 0!==n?n:null===(o=e[t-1])||void 0===o?void 0:o.gradient))})(i,n.limitPaletteColorIndex))return B4(o,n.limitPaletteColorIndex,r);const a=H4(n.limitRange,t);return U4(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[(null==i?void 0:i.limitPaletteColorIndex)||0].icon,{indicator:l}=e;let u=(null==l?void 0:l.position)||"right";return"rtl"===n&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},K4=(e,t)=>{var n,r,o,i;return"rtl"===e&&"center"!==(null===(n=t.resolvedImagePosition)||void 0===n?void 0:n.horizontal)?(null===(o=t.resolvedImagePosition)||void 0===o?void 0:o.horizontal)&&(e=>"flex-start"===e?"flex-end":"flex-start")(null===(i=t.resolvedImagePosition)||void 0===i?void 0:i.horizontal):null===(r=t.resolvedImagePosition)||void 0===r?void 0:r.horizontal},X4=(e,t)=>e.representation.type===HI.Image&&"fitHeight"===e.representation.imageSize?K4(t,e.representation):e.align,J4=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",Q4=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},Z4=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,e8=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",t8=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",n8=e=>{let t="center",n="center";return"flex-start"===(null==e?void 0:e.vertical)?t="top":"flex-end"===(null==e?void 0:e.vertical)&&(t="bottom"),"flex-start"===(null==e?void 0:e.horizontal)?n="left":"flex-end"===(null==e?void 0:e.horizontal)&&(n="right"),`${n} ${t}`},r8=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},o8=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const{direction:o}=Yj(Vj,(e=>e.baseProps)),{url:i,text:a,imageSize:s,resolvedImagePosition:l}=e,u="fitHeight"===s,c=Rl.jsx("img",{src:i,alt:a,style:{...t,width:u?"auto":"100%",height:"100%",maxHeight:n,objectFit:r8(s),objectPosition:n8(l),overflow:"hidden"}});return r?Rl.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:u?n:"100%",overflow:"hidden",display:"flex",justifyContent:u?K4(o,e):void 0},children:c}):c},i8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9 7V2H7v5H2v2h5v5h2V9h5V7z"})}),a8=Ka.forwardRef(i8),s8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),l8=Ka.forwardRef(s8),u8=(e,t)=>Rl.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Rl.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Rl.jsx("use",{fillRule:"evenodd"})]}),c8=Ka.forwardRef(u8),d8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})}),p8=Ka.forwardRef(d8),f8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})}),h8=Ka.forwardRef(f8),m8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})}),g8=Ka.forwardRef(m8),y8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M2 7h12v2H2z"})}),b8=Ka.forwardRef(y8),v8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})}),x8=Ka.forwardRef(v8),S8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),w8=Ka.forwardRef(S8),C8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})}),E8=Ka.forwardRef(C8),k8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})}),R8=Ka.forwardRef(k8),_8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}),M8=Ka.forwardRef(_8),A8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})}),D8=Ka.forwardRef(A8),P8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})}),L8=Ka.forwardRef(P8),I8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})}),q8=Ka.forwardRef(I8),T8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})}),O8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})}),N8={m:M8,"ï":E8,R:Ka.forwardRef(T8),S:D8,T:L8,U:q8,P:w8,Q:g8,"è":Ka.forwardRef(O8),"¢":p8,"©":c8,"23F4":h8,2013:R8,"&":x8,add:a8,"minus-2":b8,dot:l8},z8=({size:e,iconKey:t,color:n,pvStyle:r})=>{var o;const i=null!==(o=t&&N8[t])&&void 0!==o?o:N8.dot;return i&&Xa.createElement("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r}},Xa.createElement(i,{style:{height:e}}))},F8=({representation:e,cellValue:t,paginationCellAlign:n})=>{const{styleService:r,theme:o,direction:i}=Yj(Vj,(e=>e.baseProps)),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=null!=s?s:{},c=Y4(e,t,i,o),d=(e=>parseInt(e||oj,10))(r.measure.values.fontSize),{color:p,iconKey:f,position:h}=c||{};return l?Rl.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:null!=n?n:"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:u?p:void 0},children:["left"===h&&z8({size:d,iconKey:f,color:p}),Rl.jsx(j4,{isNumeric:!0,children:a}),"right"===h&&z8({size:d,iconKey:f,color:p})]}):z8({size:d,iconKey:f,color:p})},j8=(e,t)=>e.contentStaticLineCount?e.contentLineHeight*(null!=t?t:e.grid.contentLineClamp):e.contentLineHeight,H8=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:o,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const{interactions:l,styleService:u,theme:c,layout:d,downloadService:p,direction:f}=Yj(Vj,(e=>e.baseProps)),h=Yj(Vj,(e=>{var t;return null===(t=e.selectionState.api)||void 0===t?void 0:t.isActive()}));let m=t.representation.text;if(t.representation.type!==HI.Link||h||(m=Rl.jsx(x$,{href:t.representation.url,text:t.representation.text,interactions:l,color:n.cellForegroundColor})),t.representation.type===HI.Image)return Rl.jsx(o8,{representation:t.representation,textStyle:n,maxImageHeight:j8(u,o),wrapInContainer:!r});const g=(e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN)(t.qIsNull?t.representation.text:t.qNum);return t.representation.type!==HI.Indicator||Number.isNaN(g)?t.representation.type===HI.MiniChart&&t.representation.miniChart&&!t.isNull?Rl.jsx(z4,{height:j8(u,o),intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:c,isSnapshot:!!d.snapshotData,direction:f,downloadService:p}):Rl.jsx(j4,{forwardRef:e,isNumeric:t.isNumeric,lineClamp:o,isPagination:!r,children:m}):Rl.jsx(F8,{representation:t.representation,cellValue:g,paginationCellAlign:r?void 0:s})},B8=(e,t,n,r)=>({handleMouseDown:r=>{null==e||e(r);const o=r.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>{n({type:gO.SelectMultiEnd})};n({type:gO.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:gO.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:gO.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),$8=(e,t)=>{const{paginationNeeded:n,totalsPosition:r}=Yj(Vj,(e=>e.tableData)),{selectionsAPI:o,rootElement:i,keyboard:a,interactions:s,direction:l}=Yj(Vj,(e=>e.baseProps)),u=Yj(Vj,(e=>e.setFocusedCellCoord)),c=Yj(Vj,(e=>e.selectionDispatch)),d=!!s.active&&!!s.select,p=s=>{u$({evt:s,rootElement:i,selectionsAPI:o,cell:e,selectionDispatch:c,isSelectionsEnabled:d,setFocusedCellCoord:u,announce:t,keyboard:a,paginationNeeded:n,totalsPosition:r,direction:l})},f=e=>{((e,t)=>{e.key===rI.Shift&&t({type:gO.SelectMultiEnd})})(e,c)},h=()=>{((e,t,n,r,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;e$([s,a],t,n,r)})(e,i,u,a,r)};if(!d)return{onKeyDown:p,onKeyUp:f,onMouseDown:h};const{handleMouseDown:m,handleMouseOver:g,handleMouseUp:y}=B8(h,e,c,t);return{onKeyDown:p,onKeyUp:f,onMouseDown:m,onMouseUp:y,onMouseOver:g}},V8=(e,t)=>{const{colIdx:n,rows:r,api:o}=t;let i=mO.Inactive;return null!=o&&o.isModal()&&(i=n!==e.selectionColIdx?mO.Disabled:r.has(e.qElemNumber)?mO.Selected:mO.Possible),i},W8=(e,t,n)=>{if(!n.isNull)return e;const r={...e,...t.nullValues};return t.grid.zebraStripes.show?(t.grid.zebraStripes.overrideNullValueColor&&(r.color=e.color),t.grid.zebraStripes.overrideNullValueBackground&&(r.background=e.background),r):r},U8=(e,t,n)=>{const{color:r,background:o}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...o?{background:o}:void 0}},G8=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return U8(t,e,r?"even":"odd")}return e},Y8=(e,t)=>{const{styleService:n}=Yj(Vj,(e=>e.baseProps)),r=Yj(Vj,(t=>V8(e,t.selectionState)));let o=t.isDim?n.dimension.values:n.measure.values;o=G8(o,n,e),o=W8(o,n,e);const i=Pj(o,e.qAttrExps,t.qAttrExprInfoIDs),a=function(e,t,n){return t===mO.Selected?{...e,...n}:t===mO.Disabled?{...e,background:`${nj}, ${e.background}`}:e}(Ka.useMemo((()=>e.isNull?o:Pj(o,e.qAttrExps,t.qAttrExprInfoIDs)),[o,e.qAttrExps,e.isNull,t.qAttrExprInfoIDs]),r,n.selectedColors);return{cellStyle:{...a,borderColor:n.grid.border},representationStyle:i,cellSelectionState:r}},K8=Pg(ZP,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),X8=Pg(xL,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})((({hover:e,hoverColors:t,height:n})=>({height:n,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),J8=Pg(oL,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...sj,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",width:"100%",height:"100%"}))),Q8=Pg(oL,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})((({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...sj,...e,fontWeight:ij,position:"sticky",padding:r.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?n:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",zIndex:t?1:void 0}))),Z8=({cell:e,announce:t,column:n,columnIndex:r,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:i})=>{const{interactions:a,direction:s}=Yj(Vj,(e=>e.baseProps)),{onKeyDown:l,onKeyUp:u,onMouseDown:c,onMouseUp:d,onMouseOver:p}=$8(e,t),{cellStyle:f,representationStyle:h,cellSelectionState:m}=Y8(e,n);return Rl.jsx(J8,{cellStyle:f,scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${m} ${nI}`,title:a.passive?e.representation.text:void 0,onKeyDown:l,onKeyUp:u,onMouseDown:c,onMouseUp:d,onMouseOver:p,children:Rl.jsx(H8,{cell:e,style:h,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:i,paginationCellAlign:Z4(s,e.align)})})},e9=(e,{atTop:t,atBottom:n},r)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!r&&n?e.grid.divider:e.grid.border,borderBottomColor:r&&!t||!r&&t?e.grid.divider:e.grid.border}),t9=()=>{const{columns:e,totalsPosition:t,rows:n}=Yj(Vj,(e=>e.tableData)),{rootElement:r,selectionsAPI:o,keyboard:i,styleService:a,interactions:s,direction:l}=Yj(Vj,(e=>e.baseProps)),u=Yj(Vj,(e=>e.headRowHeight)),c=Yj(Vj,(e=>e.setFocusedCellCoord)),d=!(null==o||!o.isModal()),p=!!s.active;return Rl.jsx(xL,{className:"sn-table-row sn-table-totals-row",children:e.map(((e,o)=>{const f=[t.atTop?1:n.length+1,o];return Rl.jsx(Q8,{totalsStyle:{...a.totalRow,...e9(a,t,!1)},headRowHeight:u,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${nI}`,tabIndex:-1,title:s.passive?e.totalInfo:void 0,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case rI.C:i$(n);break;case rI.Space:n.preventDefault();break;default:a$(e)}else TL(n)})({evt:e,rootElement:r,cellCoord:f,setFocusedCellCoord:c,isSelectionMode:d,isInteractionEnabled:p,direction:l})},onMouseDown:()=>{e$(f,r,c,i)},children:Rl.jsx(j4,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)}))})};var n9=Ka.memo(t9);const r9=({updateShouldRefocus:e,tableWrapperRef:t,announce:n})=>{var r;const{rows:o,columns:i,totalsPosition:a}=Yj(Vj,(e=>e.tableData)),{selectionsAPI:s,keyboard:l,layout:u,styleService:c}=Yj(Vj,(e=>e.baseProps)),d=Yj(Vj,(e=>e.selectionDispatch)),p=!(null===(r=_j(u))||void 0===r||null===(r=r.content)||void 0===r||!r.hoverEffect);b$({keyboard:l,selectionDispatch:d,selectionsAPI:s,updateShouldRefocus:e,tableWrapperRef:t});const f=(e=>{const t=Ka.useCallback((t=>new IntersectionObserver((e=>{e.forEach((e=>{const n=t.get(e.target);null==n||n(e)}))}),{root:e.current})),[e]);return m$(t)})(t),h=y$();return Rl.jsxs(K8,{lastRowBottomBorder:c.grid.lastRowBottomBorder,children:[a.atTop?Rl.jsx(n9,{}):void 0,o.map(((e,t)=>Rl.jsx(X8,{hoverColors:c.grid.hoverColors,hover:p,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:c.contentMinRowHeight,children:i.map(((t,r)=>{const{id:o}=t,i=e[r];return Rl.jsx(Z8,{columnIndex:r,cell:i,column:t,announce:n,intersectionObserverTaskScheduler:f,resizeObserverTaskScheduler:h},o)}))},`row-${t}`))),a.atBottom?Rl.jsx(n9,{}):void 0]})};var o9=Ka.memo(r9);const i9=(e,t)=>{var n;return!(null===(n=e.viewState)||void 0===n||!n.skipHeader)||!!t.hideHeader},a9=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:o,label:i}=e,{applyColumnWidths:a,interactions:s,translator:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>e.columnWidths)),d=Yj(Vj,(e=>e.setColumnWidths));if(!s.active)return null;return Rl.jsx(Zj,{columnWidth:c[o],isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{null==n||n();const t=[...c];t[o]=e,d(t)},confirmWidthCallback:t=>{a(t,e)},handleBlur:e=>{(e=>{KB(e);const t=e.closest(".sn-table-cell");JB(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:l,columnLabel:i},direction:u})},s9=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}),l9=Ka.forwardRef(s9),u9=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}),c9=Ka.forwardRef(u9),d9=(e,t)=>Rl.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Rl.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),Rl.jsx("use",{fillRule:"evenodd"})]}),p9=Ka.forwardRef(d9),f9=Pg("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0}))),h9=Pg(xA,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})((({textAlign:e,theme:t,direction:n,isPagination:r})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===n?J4(e,r):void 0})));Pg("span")({border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1});const m9=Pg(xA,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})((({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let o;switch(n){case"left":o={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;o={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${ZL}`]:{gridColumn:3}};break}case"right":o={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${ZL}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}})),g9=Pg(xA,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})));Pg(xA,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({rightAligned:e})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:"24px",display:"flex"}))),Pg(aP)((({theme:e})=>({borderRadius:"4px",margin:e.spacing(0,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"}}))),Pg("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),Pg(MD)((({theme:e})=>({marginRight:e.spacing(1.5),lineHeight:0}))),Pg("div")((({theme:e})=>({height:"350px",boxSizing:"border-box",background:e.palette.common.white})));const y9=Pg(oL,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:n,background:r})=>({...sj,...e,cursor:t.active?"pointer":"default",background:r,verticalAlign:"bottom","&&:focus-visible, &&:hover":{background:t.active?n:r}})));Pg("div")({display:"flex",alignItems:"center"});const b9=Pg("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})((({align:e,dir:t})=>({minWidth:oj,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),v9=({column:e,isInteractionEnabled:t,open:n,setOpen:r,allColumnsIconVisibilityStatusRef:o,isPagination:i,forwardRef:a})=>{const{translator:s,changeSortOrder:l,interactions:u,embed:c,app:d,styleService:p,layout:f,direction:h}=Yj(Vj,(e=>e.baseProps)),m=Yj(Vj,(t=>t.columnWidths[e.pageColIdx])),g=Yj(Vj,(e=>e.baseProps.model)),y=Ka.useRef(null),b=Ka.useRef(null),v=(({styleService:e,column:t,columnWidth:n})=>{const{measureText:r}=VL({fontSize:e.header.fontSize,fontFamily:e.header.fontFamily,fontWeight:ij});return Ka.useCallback((()=>{let e=!1,o=!1,i=!1;const a=t.isLocked,s=t.isActivelySorted,l=n-25,u=a?20:0,c=s?20:0;let d=r(t.label);return a&&d+u<=l&&(i=!0,d+=u,s&&d+c<=l&&(o=!0,d+=c)),!a&&s&&d+c<=l&&(o=!0,d+=c),d+24<=l&&(e=!0,d+=24),{shouldShowMenuIcon:e,shouldShowSortIcon:o,shouldShowLockIcon:i}}),[t.isLocked,t.label,t.isActivelySorted,n,r])})({styleService:p,column:e,columnWidth:m}),x=v(),{StartIcon:S,EndIcon:w,LockIcon:C}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},o)=>{const i="A"===e?Rl.jsx(l9,{height:oj,"data-testid":"head-cell-sort-ascending-icon"}):Rl.jsx(c9,{height:oj,"data-testid":"head-cell-sort-descending-icon"}),a=n?Rl.jsx(b9,{align:t,dir:o,children:i}):void 0,s=r?Rl.jsx(g9,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Rl.jsx(p9,{height:oj,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(e,x,h);o&&(o.current[e.pageColIdx]=x);return Rl.jsxs(m9,{shouldShowMenuIcon:x.shouldShowMenuIcon,shouldShowLockIcon:x.shouldShowLockIcon,alignment:Q4(e,i,h),children:[C,Rl.jsxs(h9,{className:"sn-table-head-label",textAlign:e.headTextAlign,direction:h,isPagination:i,children:[S,Rl.jsx(j4,{forwardRef:a,isPagination:i,isHeadCell:!0,children:e.label}),w]}),t?Rl.jsxs(Rl.Fragment,{children:[Rl.jsx(oB,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:s,anchorRef:y,menuAvailabilityFlags:{[tB.Sorting]:!0,[tB.Searching]:!0,[tB.Selections]:!0,[tB.AdjusterHeaderSize]:!0},open:n,setOpen:r,interactions:u,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),l(e,n))},searchRelatedArgs:{embed:c,listboxRef:b},selectionRelatedArgs:{app:d,qStateName:f.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:QB},shouldShowMenuIcon:x.shouldShowMenuIcon,model:g,direction:h,isPagination:i}),Rl.jsx(f9,{ref:b,direction:h,isPagination:i}),Rl.jsx(f9,{ref:y,direction:h})]}):null]})},x9=({isInteractionEnabled:e,columnsData:t})=>{const[n,r]=Ka.useState(!1),{isAdjustingWidth:o,setIsAdjustingWidth:i}=(e=>{const[t,n]=Ka.useState(!1);return YL((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}})([t]);return{open:n,setOpen:r,handleOpenMenu:t=>{!e||(e=>{var t;return null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t?void 0:t.includes(oI)})(t)||o||r(!0)},setIsAdjustingWidth:i}},S9=({column:e,columnIndex:t,columnsLength:n})=>{const{interactions:r,rootElement:o,keyboard:i,styleService:a,direction:s}=Yj(Vj,(e=>e.baseProps)),{columns:l,totalsPosition:u}=Yj(Vj,(e=>e.tableData)),c=Yj(Vj,(e=>e.columnWidths[t])),d=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),p=Yj(Vj,(e=>e.setFocusedCellCoord)),f=Yj(Vj,(({focusedCellCoord:[e,n]})=>0===e&&n===t)),h=!!r.active&&!d,{open:m,setOpen:g,handleOpenMenu:y,setIsAdjustingWidth:b}=x9({isInteractionEnabled:h,columnsData:l}),v=e.isActivelySorted?yO[e.sortDirection]:void 0,x=m?tI:void 0,S=m?"true":void 0,w=t===n-1,C=[0,e.pageColIdx],E={width:c-(w?8:9),zIndex:l.length-t},k=f&&0===t&&!i.enabled&&h?0:-1;return Rl.jsxs(y9,{headerStyle:{...a.header,...e9(a,u,!0)},background:m?a.headerMenuActiveBackground:a.header.background,hoverBackground:a.headerMenuHoverBackground,interactions:r,style:E,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${nI}`,tabIndex:k,title:r.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case rI.C:i$(n);break;case rI.Enter:case rI.Space:null==r||r(n);break;default:a$(e)}else TL(n)})({evt:e,rootElement:o,cellCoord:C,setFocusedCellCoord:p,isInteractionEnabled:h,handleOpenMenu:y,direction:s})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:o,isInteractionEnabled:i})=>{e.preventDefault(),i&&e$(n,t,r,o)})({evt:e,rootElement:o,cellCoord:C,setFocusedCellCoord:p,keyboard:i,isInteractionEnabled:h})},onClick:y,"aria-sort":v,"aria-controls":x,"aria-expanded":S,"aria-haspopup":"true",children:[Rl.jsx(v9,{column:e,isInteractionEnabled:h,open:m,setOpen:g,isPagination:!0}),Rl.jsx(a9,{column:e,isLastColumn:w,setIsAdjustingWidth:b})]},e.id)},w9=()=>{const{columns:e}=Yj(Vj,(e=>e.tableData)),{styleService:t,viewService:n,layout:r}=Yj(Vj,(e=>e.baseProps)),o=Yj(Vj,(e=>e.setHeadRowHeight)),i=Yj(Vj,(e=>e.columnWidths)),a=Ka.useRef(null),s=i9(n,r);return Ka.useEffect((()=>{a.current&&o(a.current.getBoundingClientRect().height)}),[t.header.fontSize,i,o,s]),Rl.jsx(hL,{style:{visibility:s?"collapse":void 0},children:Rl.jsx(xL,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map(((t,n)=>Rl.jsx(S9,{column:t,columnIndex:n,columnsLength:e.length},t.id)))})})};var C9=Ka.memo(w9);const E9=e=>{var t,n;const{pageInfo:r,setPageInfo:o,footerContainer:i,announce:a}=e,{page:s,rowsPerPage:l}=r,{totalColumnCount:u,totalRowCount:c,totalPages:d,paginationNeeded:p,rows:f,columns:h}=Yj(Vj,(e=>e.tableData)),{rootElement:m,keyboard:g,translator:y,theme:b,interactions:v,styleService:x,viewService:S,layout:w,rect:C,direction:E}=Yj(Vj,(e=>e.baseProps)),k=Yj(Vj,(e=>e.setYScrollbarWidth)),R=Yj(Vj,(e=>e.showRightBorder)),_=Yj(Vj,(e=>e.selectionDispatch)),M=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),A=Ka.useRef(!1),D=Ka.useRef(null),P=Ka.useRef(null),{yScrollbarWidth:L}=c$(D),I=`${y.get("SNTable.Accessibility.RowsAndColumns",[String(f.length),String(h.length)])} ${y.get("SNTable.Accessibility.NavigationInstructions")}`,q=ZT(w,S),T=q&&null!==(t=S.scrollLeft)&&void 0!==t?t:0,O=q&&null!==(n=S.rowPartialHeight)&&void 0!==n?n:0,N=Ka.useCallback((()=>{A.current=m.getElementsByTagName("table")[0].contains(document.activeElement)}),[m]),z=Ka.useCallback((e=>{o({...r,page:e}),a({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),d.toString()]],politeness:"assertive"})}),[r,o,d,a]),F=Ka.useCallback((e=>{o({...r,page:0,rowsPerPage:e}),a({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[a,r,o]);return o$(D,E,S),((e,t)=>{const{keyboard:n}=Yj(Vj,(e=>e.baseProps));Ka.useEffect((()=>{const r=e.current;if(!r)return;const o=e=>{t$(e,t,n)};return r.addEventListener("focusout",o),()=>{r.removeEventListener("focusout",o)}}),[e,t,n])})(P,A),(()=>{const{rootElement:e,keyboard:t}=Yj(Vj,(e=>e.baseProps)),n=Yj(Vj,(e=>e.focusedCellCoord));YL((()=>{const r=GB(e,n);t.active?JB(r):(null==r||r.blur(),XB(e))}),[t.active,e])})(),r$(A,a,s),Ka.useEffect((()=>{const e=D.current;e&&(e.scrollLeft=T,e.scrollTop=O)}),[r,c,T,O]),$B((()=>{k(L)}),[L]),$B((()=>{_({type:gO.UpdatePageRows,payload:{pageRows:f}})}),[f]),n$(),Rl.jsxs(HB,{ref:P,background:b.background,dir:E,onKeyDown:e=>{l$({evt:e,totalRowCount:c,page:s,rowsPerPage:l,handleChangePage:z,updateShouldRefocus:N,keyboard:g,isSelectionMode:M})},"data-testid":"sn-table",children:[Rl.jsx(h$,{}),Rl.jsx(p$,{ref:D,className:"sn-table-container",fullHeight:!!i||!v.active||!p,interactions:v,tabIndex:-1,role:"application","data-testid":"table-container",children:Rl.jsxs(f$,{stickyHeader:!0,"aria-label":I,borderRight:R?`1px solid ${x.grid.border}`:void 0,children:[Rl.jsx(C9,{}),Rl.jsx(o9,{...e,updateShouldRefocus:N,tableWrapperRef:P})]})}),Rl.jsx(FB,{footerContainer:i,pageInfo:r,paginationNeeded:p,theme:b,totalRowCount:c,totalColumnCount:u,totalPages:d,keyboard:g,translator:y,interactions:v,rect:C,layout:w,handleChangePage:z,handleChangeRowsPerPage:F,isSelectionMode:M,direction:E})]})};var k9=Ka.memo(E9),R9=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function _9(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||R9(r)&&R9(o)))return!1;var r,o;return!0}function M9(e,t){var n;void 0===t&&(t=_9);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var A9="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function D9(e){cancelAnimationFrame(e.id)}function P9(e,t){var n=A9();var r={id:requestAnimationFrame((function o(){A9()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var L9=-1;function I9(e){if(void 0===e&&(e=!1),-1===L9||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),L9=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return L9}var q9=null;function T9(e){if(void 0===e&&(e=!1),null===q9||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?q9="positive-descending":(t.scrollLeft=1,q9=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),q9}return q9}var O9=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function N9(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,c=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Mr(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Mr(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=M9((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=M9((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,u=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:c(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=M9((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,u=i;if("rtl"===t)switch(T9()){case"negative":u=-i;break;case"positive-descending":u=l-o-i}u=Math.max(0,Math.min(u,l-o));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&D9(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=P9(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}_r(t,e),t.getDerivedStateFromProps=function(e,t){return z9(e,t),g(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,c=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=I9();void 0!==r&&(r=Math.max(0,Math.min(r,c-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>f?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,v):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(T9()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&D9(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?O9:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),w=S[0],C=S[1],E=this._getVerticalRangeToRender(),k=E[0],R=E[1],_=[];if(r>0&&g)for(var M=k;M<=R;M++)for(var A=w;A<=C;A++)_.push(Ka.createElement(t,{columnIndex:A,data:d,isScrolling:b?x:void 0,key:f({columnIndex:A,data:d,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,A)}));var D=a(this.props,this._instanceProps),P=s(this.props,this._instanceProps);return Ka.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:qe({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},Ka.createElement(u||c||"div",{children:_,ref:l,style:{height:D,pointerEvents:x?"none":void 0,width:P}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,u,this._instanceProps),h=f(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(Ka.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var z9=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},F9=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},j9=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},H9=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=i(u);o[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},B9=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?$9(e,t,n,i,0,r):V9(e,t,n,Math.max(0,i),r)},$9=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=H9(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},V9=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&H9(e,t,r,n).offset<o;)r+=a,a*=2;return $9(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},W9=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=H9(e,t,n,i),u="column"===e?j9(t,i):F9(t,i),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return o>=d&&o<=c?o:d>c||o<d?d:c}},U9=N9({getColumnOffset:function(e,t,n){return H9("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return B9("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=H9("column",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=H9("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:F9,getEstimatedTotalWidth:j9,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return W9("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return W9("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return H9("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return B9("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=H9("row",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=H9("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),G9=function(e,t){return e};function Y9(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Mr(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Mr(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=M9((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=M9((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=M9((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(T9()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&D9(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=P9(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}_r(t,e),t.getDerivedStateFromProps=function(e,t){return K9(e,t),c(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?I9():0:l.scrollHeight>l.clientHeight?I9():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(T9()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&D9(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?G9:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,b=e.width,v=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),C=w[0],E=w[1],k=[];if(u>0)for(var R=C;R<=E;R++)k.push(Ka.createElement(t,{data:c,key:p(R,c),index:R,isScrolling:y?v:void 0,style:this._getItemStyle(R)}));var _=r(this.props,this._instanceProps);return Ka.createElement(h||m||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:qe({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},Ka.createElement(s||l||"div",{children:k,ref:a,style:{height:x?"100%":_,pointerEvents:v?"none":void 0,width:x?_:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var u=a(this.props,l,this._instanceProps),c=s(this.props,u,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(Ka.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var K9=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},X9=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var u=r(l);o[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return o[t]},J9=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=X9(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},Q9=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&X9(e,n,t).offset<r;)n+=i,i*=2;return J9(e,t,Math.min(n,o-1),Math.floor(n/2),r)},Z9=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},e7=Y9({getItemOffset:function(e,t,n){return X9(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Z9,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=X9(e,t,o),p=Z9(e,o),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+i);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?J9(e,t,o,0,n):Q9(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:i,c=X9(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=X9(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function t7(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var n7=["style"],r7=["style"];function o7(e,t){var n=e.style,r=qt(e,n7),o=t.style,i=qt(t,r7);return!t7(n,o)&&!t7(r,i)}const i7=({style:e})=>Rl.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var a7=Xa.memo(i7,o7);const s7=e=>{var t;return null===(t=e.at(0))||void 0===t||null===(t=t.contentBoxSize.at(0))||void 0===t?void 0:t.blockSize},l7=(e,t,n)=>{Ka.useEffect((()=>{const n=e.current;if(!n)return()=>{};const r=new ResizeObserver(t);return r.observe(n),()=>{r.disconnect()}}),[e,t,n])},u7=()=>{},c7=e=>{e.preventDefault()};const d7=({columnIndex:e,rowIndex:t,style:n,data:r})=>{var o,i;const{rowsInPage:a,columns:s,isHoverEnabled:l,setMeasuredCellHeight:u,lineClamp:c,resizeObserverTaskScheduler:d}=r,p=Yj(Vj,(e=>e.hoverIndex===t)),f=Yj(Vj,(e=>e.setHoverIndex)),{interactions:h,styleService:m,direction:g}=Yj(Vj,(e=>e.baseProps)),y=Yj(Vj,(e=>e.showRightBorder)),b=null===(o=a[t])||void 0===o?void 0:o[e],{handleMouseDown:v,handleMouseOver:x,handleMouseUp:S,cellSelectionState:w}=function(e){const{interactions:t}=Yj(Vj,(e=>e.baseProps)),n=Yj(Vj,(e=>e.selectionDispatch)),r="object"==typeof e,o=Yj(Vj,(t=>r?V8(e,t.selectionState):mO.Inactive)),i=t.active&&t.select;if(r&&i){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i}=B8(c7,e,n,u7);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(b),C=((e,t,n,r)=>{const o=Ka.useRef(null),i=n&&!n.isNumeric,a=Ka.useCallback((n=>{const o=s7(n);o&&i&&r(o,e,t)}),[t,r,e,i]);return l7(o,a),o})(t,e,b,u),E=null!==(i=s[e])&&void 0!==i&&i.isDim?m.dimension.values:m.measure.values;if("object"==typeof b){const r=((e,t,n,r,o,i)=>{let a=G8(o,i,e);a=W8(a,i,e);const s=!e.isNull&&t.qAttrExprInfoIDs.length?Pj(a,e.qAttrExps,t.qAttrExprInfoIDs):a;return r===mO.Selected?{...s,...i.selectedColors}:r===mO.Disabled?{...s,color:n?null===(l=i.grid.hoverColors)||void 0===l?void 0:l.color:s.color,background:`${nj}, ${n?null===(u=i.grid.hoverColors)||void 0===u?void 0:u.background:s.background}`}:n?{...s,...i.grid.hoverColors}:s;var l,u})(b,s[e],l&&p,w,E,m),o={rowindex:t,columnindex:e};return Rl.jsx("div",{className:`sn-table-cell ${w} ${nI}`,style:{...n,...r,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:b.isLastRow?"0px":"1px",borderRightWidth:e8(g,b.isLastColumn,y),borderLeftWidth:t8(g,b.isLastColumn,y),justifyContent:X4(b,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:b.align},onMouseDown:v,onMouseUp:S,onMouseOver:x,onMouseEnter:l?()=>{f(t)}:void 0,onMouseLeave:l?()=>{f(-1)}:void 0,title:h.passive?b.representation.text:void 0,...o,children:Rl.jsx(H8,{forwardRef:m.contentStaticLineCount||1===c?void 0:C,cell:b,style:r,lineClamp:c,virtualizedCell:!0,resizeObserverTaskScheduler:d})})}return Rl.jsx(a7,{style:{...n,...E,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box"}})};var p7=Ka.memo(d7,o7);const f7=e=>{const t=Ka.useRef(e);return t.current=e,t},h7=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,m7=(e,t,n,r,o)=>{const i=e[n];if(!i)return!0;for(let e=t;e<t+r;e++){const t=i[e];if((null==t?void 0:t.rowIdx)!==o)return!0}return!1},g7=(e,t,n,r)=>{const o=e.slice(n,r);return 0===o.length||o.some((e=>!e[t]))},y7=(e,t,n,r,o,i,a,s)=>{e.forEach((e=>{e.qMatrix.forEach(((l,u)=>{const c=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,n,r,o,i,a,s,l,u)=>{var c;const{qSize:d}=a.qHyperCube,p=r.qTop+n,f=o+n,h=null!==(c=e[f])&&void 0!==c?c:[];return t.forEach(((e,t)=>{const n=t+r.qLeft;if(h.at(n))return;const{colIdx:o,isDim:c,isLocked:m,bodyTextAlign:g,selectionColIdx:y,qAttrExprInfoIndex:b,representation:v,conditionalColoring:x,qMiniChart:S}=i[n],w=VT(c,e,a),C=!c&&e.qIsNull,E=C?Hq(w):jq(e);h[n]={id:Nq(),...e,align:JT(E,g,u),rowIdx:p,colIdx:o,isSelectable:c&&!m,pageRowIdx:f,pageColIdx:n,selectionColIdx:y,isLastRow:p===d.qcy-1,isLastColumn:n===d.qcx-1,isNumeric:E,isNull:(!C||!E)&&$T(e,c),representation:BT({cell:e,representationProperties:v,attrExprInfoIndex:b,env:s,conditionalColoring:x,miniChartOnMeasure:S,getText:()=>C?w:e.qText,direction:u,enabledFeatures:{[HI.Image]:s.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES"),[HI.Indicator]:!0,[HI.MiniChart]:!0}})},l(h[n],p,n)})),{row:h,pageRowIdx:f}})(n,l,u,e.qArea,c,r,o,i,a,s);n[p]=d}))}))},b7=({layout:e,model:t,theme:n,initialDataPages:r,pageInfo:o,rowCount:i,visibleRowCount:a,visibleColumnCount:s,columns:l,gridState:u,setEstimatedCellHeight:c})=>{const d=Yj(Vj,(e=>e.env)),{direction:p}=Yj(Vj,(e=>e.baseProps)),f=Ka.useRef([]),h=Ka.useCallback(((t,n)=>{const r=Array.isArray(n)?n.slice(0,i):(e=>Array(e).fill(void 0))(i);return y7(t,o,r,l,e,d,c,p),f.current=r,r}),[i,o,l,e,d,c,p]),[m,g]=Ka.useState((()=>h(null!=r?r:[])));YL((()=>{g(h(null!=r?r:[]))}),[r,p]);const y=((e,t)=>{const n=Ka.useRef(new Set),r=Ka.useRef(new Set),o=Ka.useRef(new Set),i=f7(e),a=f7(t),s=Ka.useMemo((()=>({enqueue:e=>{const t=h7(e);o.current.has(t)||(n.current.add(e),o.current.add(t),1===n.current.size&&setTimeout((async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),r.current.add(e);try{const t=(e=>{const t=[];return e.forEach((e=>{if(t.length>0){const n=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(n,e)?n.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(n,e)?n.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})})),t})(e),n=await i.current(t);r.current.has(e)&&a.current(n)}catch(t){e.forEach((e=>{o.current.delete(h7(e))})),console.error("Failed to fetch pages",t)}finally{r.current.delete(e)}}}),75))},clear:()=>{n.current.clear(),r.current.clear(),o.current.clear()}})),[i,a]);return s})((e=>t&&"getHyperCubeData"in t?t.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([])),(e=>{g((t=>h(e,t)))})),b=Ka.useCallback(((e,t,n,r)=>{for(let o=e;o<e+n;o++)if(g7(f.current,o,t,r)){const e={qLeft:o,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}}),[f,y]),v=Ka.useCallback(((e,t,n,r)=>{for(let i=t;i<t+r;i++){const t=Math.max(0,i-o.page*o.rowsPerPage);if(m7(f.current,e,t,n,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:n};y.enqueue(t)}}}),[f,y,o]);return Ka.useEffect((()=>{const{qcx:t,qcy:n}=e.qHyperCube.qSize,r=u.current.overscanRowStartIndex,i=u.current.overscanColumnStartIndex,l=r+o.page*o.rowsPerPage,c=t-i,d=o.rowsPerPage-r,p=Math.min(100,c,t,s+5),f=Math.min(100,d,n,a+25);return v(i,l,p,f),()=>{y.clear()}}),[e,a,s,o,y,v,u,n]),{rowsInPage:m,loadRows:v,loadColumns:b}},v7=e=>{let t=0;return e.forEach((e=>{e>t&&(t=e)})),t},x7=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,S7=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const o=Yj(Vj,(e=>e.baseProps.styleService)),i=Yj(Vj,(e=>e.columnWidths)),{estimateLineCount:a}=VL(o.dimension.values),s=Fj(o.dimension.values.fontSize),l=e||t||1===n;return Ka.useCallback(((e,t,o)=>{if(l||e.representation.type===HI.Image||e.isNumeric)return;const u=(e=>Math.max(0,e-24-1))(i[o]),c=e.representation.text?a({text:e.representation.text,maxWidth:u,isNumeric:!1}):1,d=Math.min(n,Math.max(1,c));r(d*s,t,o)}),[l,i,a,n,s,r])},w7=({isStaticNbrOfLines:e,minRowHeight:t,state:n,rowCount:r,staticRowHeight:o,viewService:i})=>Ka.useMemo((()=>{const{estimatedRowHeight:a,totalRowHeight:s}=e?{totalRowHeight:r*o,estimatedRowHeight:o}:(e=>{let t=0;e.forEach((e=>{t+=e}));const n=0===e.size?0:t/e.size;return{estimatedRowHeight:Math.ceil(n),totalRowHeight:t}})(n.rowHeights);return i.estimatedRowHeight=Math.max(a,t),Math.max(r*t,s)}),[e,t,r,n,o,i]),C7=({rowCount:e,isSnapshot:t,viewService:n,gridRef:r,pageInfo:o})=>{const{styleService:i}=Yj(Vj,(e=>e.baseProps)),[a,s]=Ka.useState({rowHeights:new Map,cellHeightsInGrid:new Map}),l=i.contentLineHeight,u=i.contentMinRowHeight,c=!!i.contentStaticLineCount,d=Math.max(8e6/e,u)-9,p=d+9,f=Math.max(1,Math.min(i.grid.contentLineClamp,Math.round(d/l))),h=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:f,lineHeight:l,isStaticNbrOfLines:c});(({gridRef:e,setState:t,pageInfo:n})=>{var r,o;const{layout:i}=Yj(Vj,(e=>e.baseProps)),a=Yj(Vj,(e=>e.columnWidths)),s=null===(r=i.multiline)||void 0===r?void 0:r.wrapTextInCells,l=null===(o=i.nullValueRepresentation)||void 0===o?void 0:o.text;YL((()=>{var n;null===(n=e.current)||void 0===n||n.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map})}),[i.qHyperCube.qSize.qcx,i.qHyperCube.qSize.qcy,n.page,s,l]),YL((()=>{var t;null===(t=e.current)||void 0===t||t.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[a])})({gridRef:r,setState:s,pageInfo:o});const m=(({setState:e,maxCellHeight:t,minRowHeight:n,gridRef:r})=>Ka.useCallback(((o,i,a)=>{Ka.startTransition((()=>{e((e=>{var s,l;const u=Math.max(n,o+9),c=Math.min(t,u),d=null!==(s=e.cellHeightsInGrid.get(i))&&void 0!==s?s:e.cellHeightsInGrid.set(i,new Map).get(i);if(!x7(d.get(a),c))return e;const p={...e};return d.set(a,c),p.rowHeights.set(i,v7(d)),null===(l=r.current)||void 0===l||l.resetAfterIndices({columnIndex:a,rowIndex:i,shouldForceUpdate:!1}),p}))}))}),[e,n,t,r]))({maxCellHeight:p,minRowHeight:u,setState:s,gridRef:r}),g=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>Ka.useCallback(((o,i,a)=>{e||t||1===n||r(o,i,a)}),[e,t,n,r]))({isSnapshot:t,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:m});return{setMeasuredCellHeight:g,setEstimatedCellHeight:S7({isSnapshot:t,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:m}),getRowHeight:Ka.useCallback((e=>{var t;return c?h:null!==(t=a.rowHeights.get(e))&&void 0!==t?t:u}),[c,u,a.rowHeights,h]),totalRowHeight:w7({isStaticNbrOfLines:c,minRowHeight:u,state:a,staticRowHeight:h,rowCount:e,viewService:n}),lineClamp:f}},E7=(e,t)=>{Ka.useLayoutEffect((()=>()=>{t(0)}),[e,t]);const n=Ka.useCallback((e=>{const n=s7(e);void 0!==n&&t(n)}),[t]);l7(e,n)};var k7;!function(e){e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None"}(k7||(k7={}));const R7=({layout:e,loadRows:t,loadColumns:n,rowCount:r,pageInfo:o,gridState:i,viewService:a})=>Ka.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:c,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let o=k7.None,i=k7.None;return o=r>t?k7.Down:r<t?k7.Up:k7.None,i=n>e?k7.Right:n<e?k7.Left:k7.None,{verticalScrollDirection:o,horizontalScrollDirection:i}})(i.current,s,u);if(i.current.overscanColumnStartIndex=s,i.current.overscanColumnStopIndex=l,i.current.overscanRowStartIndex=u,i.current.overscanRowStopIndex=c,u>r)return;const y=s,b=u+o.page*o.rowsPerPage,v=l-s+1,x=c-u+1;if(a.visibleLeft=d,a.visibleWidth=p-d+1,a.visibleTop=f+o.page*o.rowsPerPage,a.visibleHeight=h-f+1,a.page=o.page,a.rowsPerPage=o.rowsPerPage,m===k7.Down){const e=x+25;t(y,b,v,u+e>r?r-u:e)}else if(m===k7.Up){const e=x+25,n=o.page*o.rowsPerPage,r=Math.max(n,b-25);t(y,r,v,e)}if(g===k7.Right){const t=e.qHyperCube.qSize.qcx-y,r=v+5,o=Math.min(t,r);n(y,b,o,x)}else if(g===k7.Left){const t=Math.max(0,y-5),r=Math.min(e.qHyperCube.qSize.qcx,v+5);n(t,b,r,x)}}),[i,r,o.page,o.rowsPerPage,a,t,e.qHyperCube.qSize.qcx,n]),_7={enabled:!1},M7=()=>{},A7={current:null};const D7=(e,t,n,r,o)=>{const i=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(i,Math.ceil(n.height/o)),s=Ka.useMemo((()=>r.reduce(((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e),{count:0,width:0})),[n,r]).count;return{rowCount:i,visibleRowCount:a,visibleColumnCount:s}},P7=({columnIndex:e,data:t,rowIndex:n})=>{var r,o;const i=null===(r=t.rowsInPage[n])||void 0===r?void 0:r[e];return null!==(o=null==i?void 0:i.id)&&void 0!==o?o:`${n}-${e}`},L7={overflow:"hidden",willChange:"auto"},I7=Ka.forwardRef(((e,t)=>{var n;const{rect:r,columns:o,pageInfo:i,headerAndTotalsHeight:a,setInnerBodyHeight:s}=e,{layout:l,model:u,theme:c,viewService:d,styleService:p,direction:f}=Yj(Vj,(e=>e.baseProps)),h=Yj(Vj,(e=>e.columnWidths)),m=Yj(Vj,(e=>e.initialDataPages)),g=Ka.useRef(null),y=Ka.useRef(null),b=Ka.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),v=Ka.useRef(0),x=!(null===(n=_j(l))||void 0===n||null===(n=n.content)||void 0===n||!n.hoverEffect),{rowCount:S,visibleRowCount:w,visibleColumnCount:C}=D7(l,i,r,h,p.contentMinRowHeight),{setMeasuredCellHeight:E,setEstimatedCellHeight:k,getRowHeight:R,lineClamp:_,totalRowHeight:M}=C7({rowCount:S,isSnapshot:!!l.snapshotData,viewService:d,gridRef:g,pageInfo:i}),{rowsInPage:A,loadRows:D,loadColumns:P}=b7({layout:l,model:u,theme:c,initialDataPages:m,pageInfo:i,rowCount:S,visibleRowCount:w,visibleColumnCount:C,columns:o,gridState:b,setEstimatedCellHeight:k}),L=R7({layout:l,loadRows:D,loadColumns:P,rowCount:S,pageInfo:i,gridState:b,viewService:d}),I=y$(),q=Ka.useMemo((()=>({rowsInPage:A,columns:o,isHoverEnabled:x,lineClamp:_,setMeasuredCellHeight:E,resizeObserverTaskScheduler:I})),[A,o,x,_,E,I]),T=((e,t,n)=>Math.min(e.height-t,n))(r,a,M);return Ka.useLayoutEffect((()=>{var e;1===v.current&&(null===(e=g.current)||void 0===e||e.scrollToItem({rowIndex:S-1,align:"start"}))})),function(e){const{selectionsAPI:t}=Yj(Vj,(e=>e.baseProps)),n=Yj(Vj,(e=>e.selectionDispatch));Ka.useEffect((()=>{n({type:gO.UpdatePageRows,payload:{pageRows:e}})}),[n,e]),b$({selectionsAPI:t,selectionDispatch:n,updateShouldRefocus:M7,keyboard:_7,tableWrapperRef:A7})}(A),Ka.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{var n,r;const o=(null!==(n=null===(r=y.current)||void 0===r?void 0:r.clientHeight)&&void 0!==n?n:T)-T,i=Math.round(o*e);var a,s,l;(v.current=e,1===v.current)?(null===(a=g.current)||void 0===a||a.scrollToItem({rowIndex:S-1,align:"start"}),null===(s=g.current)||void 0===s||s.scrollTo({scrollLeft:t})):null===(l=g.current)||void 0===l||l.scrollTo({scrollTop:i,scrollLeft:t})}})),[y,T,S]),E7(y,s),Rl.jsx(U9,{"data-key":"body",ref:g,innerRef:y,style:L7,columnCount:l.qHyperCube.qSize.qcx,columnWidth:e=>h[e],height:T,rowCount:S,rowHeight:R,estimatedRowHeight:d.estimatedRowHeight,width:r.width,itemData:q,onItemsRendered:L,itemKey:P7,className:"sn-table-body",direction:f,children:p7})}));var q7=Ka.memo(I7);const T7=({width:e,height:t,children:n})=>Rl.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:n}),O7=(e,t)=>{const n=Ka.useRef(null),r=Yj(Vj,(e=>e.columnWidths));Ka.useLayoutEffect((()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)}),[t,n,e,r.length]);const o=Ka.useCallback((n=>{const r=s7(n);r&&t(r+9,e)}),[e,t]);return l7(n,o),n},N7=Pg("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e})((({interactions:e,hoverBackground:t,background:n,applicableStyle:r})=>({...r,background:n,"&&:hover":{background:e.active?t:void 0}}))),z7=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:o,allColumnsIconVisibilityStatusRef:i,setMeasuredCellHeight:a}=n,{interactions:s,styleService:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),d=Yj(Vj,(e=>e.showRightBorder)),p=Yj(Vj,(e=>e.tableData.totalsPosition)),f=!!s.active&&!c,{open:h,setOpen:m,handleOpenMenu:g,setIsAdjustingWidth:y}=x9({isInteractionEnabled:f,columnsData:r}),b=O7(e,a),v=r[e],x=r.length-1===e;return Rl.jsxs(N7,{className:`sn-table-cell ${nI}`,title:s.passive?v.label:void 0,onClick:g,applicableStyle:{...l.header,...e9(l,p,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:e8(u,x,d),borderLeftWidth:t8(u,x,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:v.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===v.headTextAlign?"row-reverse":"row",userSelect:"none"},interactions:s,hoverBackground:l.headerMenuHoverBackground,background:h?l.headerMenuActiveBackground:l.header.background,children:[Rl.jsx(v9,{forwardRef:b,column:v,isInteractionEnabled:f,open:h,setOpen:m,allColumnsIconVisibilityStatusRef:i}),Rl.jsx(a9,{column:v,isLastColumn:x,onColumnResize:o,setIsAdjustingWidth:y})]})},F7=e=>{const[t,n]=Ka.useState(new Map);YL((()=>{n(new Map)}),[e.length]);const r=Ka.useCallback(((e,t)=>{n((n=>x7(n.get(t),e)?new Map(n).set(t,e):n))}),[]);return{rowHeight:Ka.useMemo((()=>v7(t)),[t]),setMeasuredCellHeight:r}},j7=(e,t)=>{Ka.useImperativeHandle(e,(()=>({scrollTo:e=>{var n;return null===(n=t.current)||void 0===n?void 0:n.scrollTo(e)}})),[t])},H7=(e,t,n,r,o)=>{YL((()=>{var t;null===(t=e.current)||void 0===t||t.resetAfterIndex(0,!1)}),[t,n,e,r,o])},B7={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},$7=Ka.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:o,columResizeHandler:i,allColumnsIconVisibilityStatusRef:a,setHeaderRowHeight:s}=e,l=Ka.useRef(null),u=Ka.useRef(null),{layout:c,theme:d,styleService:p,direction:f,viewService:h}=Yj(Vj,(e=>e.baseProps)),m=Yj(Vj,(e=>e.columnWidths)),{rowHeight:g,setMeasuredCellHeight:y}=F7(r),b=i9(h,c);return j7(t,l),H7(l,c,o,m,d),E7(u,s),Rl.jsx(e7,{ref:l,outerRef:u,layout:"horizontal",style:{...B7,...b?{display:"none"}:void 0},itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>m[e],height:Math.max(g+8,p.headerMinRowHeight),width:n.width,itemData:{columns:r,columResizeHandler:i,allColumnsIconVisibilityStatusRef:a,setMeasuredCellHeight:y},direction:f,children:z7})}));var V7=Ka.memo($7);const W7=Ka.forwardRef(((e,t)=>{const{children:n,width:r,height:o,onScroll:i}=e,{interactions:a,direction:s}=Yj(Vj,(e=>e.baseProps));return Rl.jsx("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.scroll?"auto":"hidden",width:r,height:o},onScroll:i,dir:s,children:n})})),U7=({children:e,rect:t})=>{const{direction:n}=Yj(Vj,(e=>e.baseProps));return Rl.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==n?"0px":void 0,right:"rtl"===n?"0px":void 0,width:t.width,height:t.height},children:e})},G7=({index:e,style:t,data:n})=>{const{columns:r,totals:o,setMeasuredCellHeight:i}=n,{layout:a,interactions:s,styleService:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>e.showRightBorder)),d=O7(e,i),p=r[e].totalInfo,{totalsTextAlign:f,isTotalNumeric:h}=r[e],m=a.qHyperCube.qSize.qcx-1===e;return Rl.jsx("div",{className:`sn-table-cell ${nI}`,title:s.passive?p:void 0,style:{...t,...l.totalRow,...e9(l,o,!1),background:l.totalRow.background,display:"flex",alignItems:o.atTop?"end":"start",borderStyle:"solid",borderRightWidth:e8(u,m,c),borderLeftWidth:t8(u,m,c),borderTopWidth:o.atBottom?"1px":"0px",borderBottomWidth:o.atTop?"1px":"0px",padding:"4px 12px",justifyContent:f,textAlign:f,boxSizing:"border-box",cursor:"default"},children:Rl.jsx(j4,{forwardRef:h?void 0:d,isNumeric:h,children:p})})},Y7=Ka.forwardRef(((e,t)=>{const{rect:n,pageInfo:r,totals:o,columns:i,setTotalsRowHeight:a}=e,s=Ka.useRef(null),l=Ka.useRef(null),{layout:u,theme:c,styleService:d,direction:p}=Yj(Vj,(e=>e.baseProps)),f=Yj(Vj,(e=>e.columnWidths)),{rowHeight:h,setMeasuredCellHeight:m}=F7(i);return j7(t,s),H7(s,u,r,f,c),E7(l,a),Rl.jsx(e7,{ref:s,outerRef:l,layout:"horizontal",style:B7,itemCount:u.qHyperCube.qSize.qcx,itemSize:e=>f[e],height:Math.max(h,d.totalRowMinHeight),width:n.width,itemData:{columns:i,totals:o,setMeasuredCellHeight:m},direction:p,children:G7})}));var K7=Ka.memo(Y7);const X7=(e,t,n,r,o)=>Ka.useCallback((i=>{var a,s,l;const{scrollHeight:u,clientHeight:c,scrollTop:d}=i.currentTarget,p=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(i.currentTarget,o),f=Math.max(0,Math.min(1,d/(u-c)));r.scrollTopRatio=f,r.scrollLeft=p,null===(a=n.current)||void 0===a||a.interpolatedScrollTo(Number.isNaN(f)?0:f,p),null===(s=e.current)||void 0===s||s.scrollTo(p),null===(l=t.current)||void 0===l||l.scrollTo(p)}),[r,n,e,t,o]),J7=e=>{const{pageInfo:t}=e,{totalsPosition:n,columns:r,paginationNeeded:o}=Yj(Vj,(e=>e.tableData)),{layout:i,theme:a,rect:s,viewService:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>e.columnWidths)),d=Yj(Vj,(e=>e.setYScrollbarWidth)),p=Ka.useRef(null),f=Ka.useRef(null),h=Ka.useRef(null),m=Ka.useRef(null),{xScrollbarWidth:g,yScrollbarWidth:y}=c$(p),b=Ka.useRef([]),v=Ka.useMemo((()=>((e,t)=>{const n=e.height-(t?41:0);return{width:e.width,height:n}})(s,o)),[s,o]),x=Ka.useMemo((()=>((e,t,n)=>({width:e.width-n,height:e.height-t}))(v,g,y)),[v,g,y]),{rowCount:S}=D7(i,t,x,c,0),{headerAndTotalsHeight:w,innerBodyHeight:C,setHeaderRowHeight:E,setTotalsRowHeight:k,setInnerBodyHeight:R}=(()=>{const[e,t]=Ka.useState(0),[n,r]=Ka.useState(0),[o,i]=Ka.useState(0);return{headerAndTotalsHeight:e+n,innerBodyHeight:o,setHeaderRowHeight:t,setTotalsRowHeight:r,setInnerBodyHeight:i}})(),{width:_,height:M}=(({innerBodyHeight:e,headerAndTotalsHeight:t,rowCount:n,stickyContainerRect:r,columnWidths:o})=>{const{styleService:i}=Yj(Vj,(e=>e.baseProps)),a=e+t,s=n*i.contentMinRowHeight+t;let l=s;return s<r.height&&a>r.height&&(l=a),{width:o.reduce(((e,t)=>e+t),0),height:l}})({innerBodyHeight:C,headerAndTotalsHeight:w,rowCount:S,stickyContainerRect:x,columnWidths:c}),A=X7(f,h,m,l,u),D=Ka.useCallback((()=>{p.current&&(p.current.scrollTop=0)}),[p]);n$(),Ka.useLayoutEffect((()=>{p.current&&(p.current.scrollLeft=0,p.current.scrollTop=0)}),[r.length]),Ka.useLayoutEffect((()=>{p.current&&(p.current.scrollTop=0)}),[t,S,a]),$B((()=>{d(y)}),[y]);const P=Rl.jsx(K7,{rect:x,pageInfo:t,columns:r,ref:h,totals:n,setTotalsRowHeight:k},"totals");return Rl.jsx(W7,{ref:p,width:v.width,height:v.height,onScroll:A,children:Rl.jsx(T7,{width:_,height:M,children:Rl.jsxs(U7,{rect:x,children:[Rl.jsx(V7,{rect:x,pageInfo:t,columns:r,ref:f,columResizeHandler:D,allColumnsIconVisibilityStatusRef:b,setHeaderRowHeight:E}),n.atTop?P:null,Rl.jsx(q7,{ref:m,rect:x,pageInfo:t,columns:r,headerAndTotalsHeight:w,setInnerBodyHeight:R}),n.atBottom?P:null]})})})};var Q7=Ka.memo(J7);const Z7=()=>{const{theme:e,keyboard:t,translator:n,interactions:r,rect:o,layout:i}=Yj(Vj,(e=>e.baseProps)),{paginationNeeded:a,totalRowCount:s,totalColumnCount:l,totalPages:u}=Yj(Vj,(e=>e.tableData)),c=Yj(Vj,(e=>e.pageInfo)),d=Yj(Vj,(e=>e.setPage));return Rl.jsxs(HB,{"data-testid":"sn-table",background:e.background,children:[Rl.jsx(Q7,{pageInfo:c}),Rl.jsx(FB,{paginationNeeded:a,handleChangePage:e=>{d(e)},pageInfo:c,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:t,translator:n,theme:e,interactions:r,rect:o,layout:i})]})};var eee=Ka.memo(Z7);var tee={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбцов","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const nee=(t,n)=>e.useMemo((()=>(function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(tee).forEach((t=>{e.add(tee[t])}))}(n),((e,t)=>{let n;return({keys:r,politeness:o="polite"})=>{const i=r.map((e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)})).join(" "),a=e.querySelector(`.${bO.First}`),s=e.querySelector(`.${bO.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;n===bO.First?(l=s,n=bO.Second):(l=a,n=bO.First),l.innerHTML=l.innerHTML.endsWith(" ­")?i:`${i} ­`,l.setAttribute("aria-live",o)}})(t,n))),[t,n.language()]),ree={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},oee=t=>{const{app:n,model:r,rootElement:o,layout:i,translator:a,reactRoot:s,isFontLoaded:l,viewService:u,env:c}=t,{direction:d,footerContainer:p}=e.useOptions(),f=eO(i,u),h=nee(o,a),[m,g]=e.useState(((e,t)=>ZT(e,t)?{page:t.page||ree.page,rowsPerPage:t.rowsPerPage||ree.rowsPerPage,rowsPerPageOptions:ree.rowsPerPageOptions}:ree)(i,u)),[y,b]=e.useState(!0);y||b(!0);const[v,x]=HL((async()=>f?async function(e,t,n,r,o,i,a,s){var l,u,c,d;const{page:p,rowsPerPage:f,rowsPerPageOptions:h}=n,m=t.qHyperCube.qSize.qcx,g=t.qHyperCube.qSize.qcy,y=Math.ceil(g/f),b=null!==(l=o.visibleTop)&&void 0!==l?l:p*f,v=null!==(u=o.visibleHeight)&&void 0!==u?u:Math.min(f,g-b);if(p>0&&b>=g)return r({...n,page:0}),null;if(v*m>WT)return r({...n,rowsPerPage:UT(m,h),page:0}),null;const x=g>10,S=GT(t,o),w=QT(t,a,s),C=!!t.snapshotData,E=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),o=null==r?void 0:r.qArea;return r&&(null==o?void 0:o.qLeft)===n.qLeft&&o.qTop===n.qTop&&o.qWidth===n.qWidth&&o.qHeight>=n.qHeight?[{...r,qMatrix:r.qMatrix.slice(0,n.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[n]):[]})(e,t,{qLeft:0,qTop:b,qHeight:v,qWidth:m});C||(o.qTop=b,o.qHeight=v,o.rowsPerPage=n.rowsPerPage,o.page=n.page);const k=null!==(c=null===(d=E.at(0))||void 0===d?void 0:d.qMatrix.map(((e,n)=>{const r=[];return w.forEach(((o,l)=>{const u=e[l],c=VT(o.isDim,u,t),d=!o.isDim&&u.qIsNull,p=d?Hq(c):jq(u);r[l]={id:Nq(),...u,align:JT(p,o.bodyTextAlign,s,a),rowIdx:n+b,colIdx:o.colIdx,pageRowIdx:n,pageColIdx:l,selectionColIdx:o.selectionColIdx,isSelectable:o.isDim&&!o.isLocked,isLastRow:n===v-1,isNumeric:p,isNull:(!d||!p)&&$T(u,o.isDim),representation:BT({cell:u,representationProperties:o.representation,attrExprInfoIndex:o.qAttrExprInfoIndex,env:i,conditionalColoring:o.conditionalColoring,miniChartOnMeasure:o.qMiniChart,getText:()=>d?c:u.qText,direction:s,enabledFeatures:{[HI.Image]:i.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES"),[HI.Indicator]:!0,[HI.MiniChart]:!0}})}})),r})))&&void 0!==c?c:[];return{totalColumnCount:m,totalRowCount:g,totalPages:y,paginationNeeded:x,totalsPosition:S,columns:w,rows:k}}(r,i,m,g,u,c,y,d):null),[i,m,r,f,d]);e.useEffect((()=>{f&&t.model&&t.changeSortOrder&&v&&l&&!x&&function(e,t){const{direction:n,...r}=e,o=Kj(n);t.render(Rl.jsx(Bd,{stylisPlugins:"rtl"===n?[VO]:void 0,children:Rl.jsx(Ig,{theme:o,children:Rl.jsx(Gj,{...e,children:Rl.jsx(k9,{...r})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:v,pageInfo:m,setPageInfo:g,direction:d,footerContainer:p,announce:h},s)}),[h,n,d,p,l,m,s,t,f,v,x])},iee=(t,n)=>e.useMemo((()=>((e,t)=>{if(t)return async(n,r)=>{if(!("getEffectiveProperties"in t))return;const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=n,u=o?i:i-e,c=await t.getEffectiveProperties(),d=c.qHyperCubeDef.qInterColumnSortOrder,p=[],f=r!==s||l;if(!o){var h;const e=null===(h=c.qHyperCubeDef.qMeasures.at(u))||void 0===h?void 0:h.qSortBy;void 0===(null==e?void 0:e.qSortByNumeric)&&p.push({qPath:`/qHyperCubeDef/qMeasures/${u}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}l||(d.splice(d.indexOf(i),1),d.unshift(i),p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),f&&p.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(p,!0)}})(t.qDimensionInfo.length,n)),[t.qDimensionInfo.length,n]);const aee=({model:e,layout:t,shouldRender:n,page:r})=>{const[o,i]=HL((async()=>{if(n&&e)return(async(e,t,n)=>{const{qDataPages:r}=t.qHyperCube;if(0!==n||0===r.length){const r=n*Math.min(uj,t.qHyperCube.qSize.qcy);if(e&&"getHyperCubeData"in e)return e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:r,qWidth:50,qHeight:100}])}return r})(e,t,r)}),[e,t,r]);return{initialDataPages:o,isLoading:i}},see=t=>{const{layout:n,model:r,keyboard:o,interactions:i,reactRoot:a,isFontLoaded:s,viewService:l,direction:u}=t,c=!eO(n,l),[d,p]=e.useState(!1);d&&p(!1);const f=e.useMemo((()=>function(e,t,n,r,o){const i=QT(e,o,r),a=GT(e,n),s=e.qHyperCube.qSize.qcy,l=Math.min(uj,s),u=s>uj&&!!t.active;return{totalsPosition:a,columns:i,rows:[],totalRowCount:s,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(s/l),paginationNeeded:u}}(n,i,l,u,d)),[n,i,l,u,d]),{pageInfo:h,setPage:m}=((t,n)=>{const[r,o]=e.useState(0),i=Math.min(uj,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:r,rowsPerPage:i,rowsPerPageOptions:[]})),[i,r]);if(n){const e=Math.floor(t.qHyperCube.qSize.qcy/uj);e<r&&o(e)}return{pageInfo:a,setPage:o}})(n,c),{initialDataPages:g,isLoading:y}=aee({model:r,layout:n,page:h.page,shouldRender:c});e.useEffect((()=>{var e;c&&o.active&&(null===(e=o.blur)||void 0===e||e.call(o,!1))}),[o,c]),e.useEffect((()=>{c&&t.model&&t.changeSortOrder&&g&&!y&&s&&function(e,t){const{direction:n}=e,r=Kj(n);t.render(Rl.jsx(Xa.StrictMode,{children:Rl.jsx(Ig,{theme:r,children:Rl.jsx(Gj,{...e,children:Rl.jsx(eee,{})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:f,pageInfo:h,setPage:m,initialDataPages:g},a)}),[g,s,y,h,a,t,m,c,f])},lee={version:JSON.stringify("4.8.2"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals",label:"Totals"},usePagination:!1,components:[]};function uee(e,t){var n,r;const o=e.getElementsByClassName("sn-table-container")[0];if(!o)return{};const i=o.getBoundingClientRect(),a=e.getElementsByClassName("sn-table-head-row")[0],s=null!==(n=null==a?void 0:a.getBoundingClientRect())&&void 0!==n?n:{height:0},l=e.getElementsByClassName("sn-table-totals-row")[0],u=null!==(r=null==l?void 0:l.getBoundingClientRect())&&void 0!==r?r:{height:0},c=e.getElementsByClassName("sn-table-data-row"),d={top:i.y+s.height+(t.atTop?u.height:0),bottom:i.y+i.height-(t.atBottom?u.height:0)},p=((e,t)=>{if(!e)return-1;for(let n=0;n<e.length;n++)if(e[n].getBoundingClientRect().bottom>t.top)return n;return-1})(c,d),f=((e,t)=>{if(!e)return-1;for(let n=e.length-1;n>-1;n--){const r=e[n].getBoundingClientRect();if(t.bottom>r.top)return n}return-1})(c,d),h=((e,t,n)=>{if(!e||0===e.length||n<0)return 0;const r=e[n].getBoundingClientRect();return Math.max(t.top-r.top,0)})(c,d,p);return{visibleRowStartIndex:p,visibleRowEndIndex:f,rowPartialHeight:h}}const cee=(e,t)=>{if(t)for(let n=0;n<t.length;n++){const r=t[n].getAttribute("rowindex");if(r&&parseInt(r,10)===e)return t[n]}},dee=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const pee=(e,t,n,r)=>{var o;if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,a=r.rowsPerPage||ree.rowsPerPage,s=null!==(o=r.viewState)&&void 0!==o&&o.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},fee=(e,t,n)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const r=GT(e,t);if(eO(e,t)){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1,rowPartialHeight:a}=uee(n,r);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:pee(i,o,e,t),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}}const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=null==n?void 0:n.getBoundingClientRect(),o=null==n?void 0:n.querySelectorAll(".sn-table-body .sn-table-cell");if(!o||!r)return{};const{scrollTopRatio:i=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:u=0}=t,c=l*u,d=a-c,p=d+s-1,f=cee(d,o),h=null==f?void 0:f.getBoundingClientRect();if(!f||!h)return{};const m=r.y;if(1-i<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+c,visibleRowEndIndex:p+c};const g=r.y+r.height,y=(dee(h,m,g)?d:d+1)+c;let b=p+c;const v=cee(p,o),x=null==v?void 0:v.getBoundingClientRect();return v&&x&&(dee(x,m,g)||(b=p-1+c)),{visibleRowStartIndex:y,visibleRowEndIndex:b}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:o,visibleHeight:pee(i,o,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}},hee=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),mee=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:{properties:{initial:lee},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>qI({...e}),exportProperties:MI,exploration:TI},ext:Aq(t),component(){var n;const r=e.useElement(),o=(t=>{const n=e.useMemo((()=>WL(t)),[t]);return e.useEffect((()=>()=>{n.unmount()}),[n]),n})(r),i=e.useStaleLayout(),a=e.useApp(),s=e.useModel(),l=(t=>{const n=e.useInteractionState();return{...n,select:!!n.active&&!!n.select&&!t,active:!!n.active&&!t,scroll:!!n.active}})(!!i.snapshotData),u=e.useTranslator(),c=e.useSelections(),d=e.useKeyboard(),p=e.useOptions(),{freeResize:f}=p,h=e.useRect(),m=e.useMemo((()=>{var e;return null!==(e=i.snapshotData)&&void 0!==e&&e.content&&!f?{...h,...i.snapshotData.content.size}:h}),[h,f,null===(n=i.snapshotData)||void 0===n?void 0:n.content]),g=(t=>{const{viewState:n}=e.useOptions();return e.useMemo((()=>((e,t)=>{var n,r,o,i,a,s,l,u,c,d,p,f,h,m,g,y,b;return{qTop:0,qHeight:0,rowPartialHeight:null!==(n=null==t||null===(r=t.content)||void 0===r?void 0:r.rowPartialHeight)&&void 0!==n?n:0,visibleTop:null!==(o=null==t||null===(i=t.content)||void 0===i?void 0:i.visibleTop)&&void 0!==o?o:null==e?void 0:e.visibleTop,visibleHeight:null!==(a=null==t||null===(s=t.content)||void 0===s?void 0:s.visibleHeight)&&void 0!==a?a:null==e?void 0:e.visibleHeight,scrollLeft:null!==(l=null!==(u=null==t||null===(c=t.content)||void 0===c?void 0:c.scrollLeft)&&void 0!==u?u:null==e?void 0:e.scrollLeft)&&void 0!==l?l:0,scrollTopRatio:null!==(d=null==t||null===(p=t.content)||void 0===p?void 0:p.scrollTopRatio)&&void 0!==d?d:null==e?void 0:e.scrollTopRatio,rowsPerPage:null!==(f=null==t||null===(h=t.content)||void 0===h?void 0:h.rowsPerPage)&&void 0!==f?f:null==e?void 0:e.rowsPerPage,page:null!==(m=null==t||null===(g=t.content)||void 0===g?void 0:g.page)&&void 0!==m?m:null==e?void 0:e.page,viewState:e,estimatedRowHeight:null!==(y=null==t||null===(b=t.content)||void 0===b?void 0:b.estimatedRowHeight)&&void 0!==y?y:0}})(n,t.snapshotData)),[n,t.snapshotData,t.usePagination])})(i),y=e.useEmbed(),b=jL(i,r,hee,mee),x=t.flags.isEnabled("CLIENT_IM_7150_TABLE_RTL")?p.direction:"ltr",S=iee(i.qHyperCube,s),w=Dq(i.qHyperCube,s),C=((e,t,n)=>{const[,r,o]=HL((async()=>{var t;const r=v(n.flags),o=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),a=e.getStyle("object","label.value","fontFamily"),s=null!==(t=e.getStyle("","","fontFamilies"))&&void 0!==t?t:[];return Promise.all([...r,...s,o,i,a,GL].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(b,i,t),E=Le(),k={app:a,layout:i,model:s,rect:m,theme:b,keyboard:d,translator:u,interactions:l,selectionsAPI:c,changeSortOrder:S,rootElement:r,embed:y,reactRoot:o,applyColumnWidths:w,isFontLoaded:C,downloadService:E,viewService:g,direction:x,env:t};null===e.onContextMenu||void 0===e.onContextMenu||e.onContextMenu(((e,t)=>{const n=t.target,r=null==n?void 0:n.closest(`.${nI}`);null!=r&&r.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{pI(r)}})})),(({layout:t,viewService:n,model:r,rootElement:o,contentRect:i})=>{e.onTakeSnapshot((async e=>{const a=e;if(!a.snapshotData||!r||a.snapshotData.content)return a;if("getHyperCubeData"in r){const{rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h}=fee(t,n,o);a.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:d,qWidth:t.qHyperCube.qSize.qcx,qHeight:p}]),a.snapshotData.content={rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h,size:{width:i.width,height:i.height},estimatedRowHeight:n.estimatedRowHeight}}return a})),e.useImperativeHandle((()=>({getViewState:()=>fee(t,n,o)})),[t,n,o])})({layout:i,viewService:g,model:s,rootElement:r,contentRect:h}),see(k),oee(k)}}}}));
142
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}}));function EV(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const kV={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},RV=/%\)?$/,_V=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,MV=/^\(oct\)/i,AV=/^\(dec\)/i,DV=/^\(hex\)/i,PV=/^\(bin\)/i,LV=/^\(rom\)/i,IV=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,qV=/#|0/g;function TV(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function OV(e,t,n){let r;return _V.test(t)?e=TV(e,Number(/\d{2}/.exec(t)[0]),t,n):MV.test(t)?e=TV(e,8,t,n):AV.test(t)?e=TV(e,10,t,n):DV.test(t)?e=TV(e,16,t,n):PV.test(t)?e=TV(e,2,t,n):LV.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function NV(e,t,n){const r=EV(e);return n?r:new RegExp(r||"",t)}function zV(e,t,n,r){let o,i,a,s,l,u,c,d,p,f=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=EV(m)),h&&(h=EV(h)),p=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=f.match(p),a=a?a[0]:"",s=a?f.substr(0,f.indexOf(a)):f,l=a?f.substring(f.indexOf(a)+a.length):"",a||(a=f?"#":"##########"),t&&t===n&&(o=a.split(n),i=o.pop(),a=o.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(NV(u,"g"),t)),c=n,n=".",c&&(a=a.replace(NV(c,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=f.split(c);let y;g[1]&&(y=g[1].match(qV)),e.prefix=s||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=RV.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(NV(t,null,!0),"|").concat(NV(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class FV{constructor(e,t,n,r,o){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return kV;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new FV(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],IV.test(e[0])&&(r.positive.isFunctional=!0),e[1]?IV.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?IV.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const o="U"===this.type;r.positive.isFunctional||zV(r.positive,t,n,o),r.negative&&!r.negative.isFunctional&&zV(r.negative,t,n,o),r.zero&&!r.zero.isFunctional&&zV(r.zero,t,n,o)}formatValue(e){let t,n,r,o,i,a,s,l,u,c=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,i=c.d,a=c.t,c.isFunctional)e=OV(e,c.pattern,i);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,o,i=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);i<=n&&s<t.length;)s++,i=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?o=r:(n<0&&r<0||!r)&&(i<0&&i-n<=c.maxPrecision?o=i:r<=n&&!(i>0&&-n<=c.maxPrecision)&&(o=r)),o&&(d=this.abbreviations[o],e/=10**o)}if(r=Math.abs(e),t=c.temp,l=c.numericPattern,u=l.split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=l.split(i)[0];if(n+=i,e=CV(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let o=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=o.length;s<n;s++)o+="0";o&&(e+=i+o)}else 0===t&&(o=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=CV(l,e)}e=e.replace(c.numericRegex,(e=>e===a?c.groupTemp:e===i?c.decTemp:"")),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+p+d+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function jV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:o=e=>e}=t;let i,a,s=Object.create(null),l=Object.create(null),u=0,c=0;return i=r?function(){return a=o(...arguments),i.has(a)?i.get(a):i.set(a,e(...arguments))}:t=>(a=o(t),i.has(a)?i.get(a):i.set(a,e(t))),i.set=(e,t)=>(u>=n&&(delete s[l[c]],delete l[c],u--,c++),s[e]=t,l[u]=e,u++,t),i.get=e=>s[e],i.has=e=>e in s,i.clear=()=>{s=Object.create(null),l=Object.create(null),u=0,c=0},i.size=()=>u,i}function HV(e,t,n,r,o){const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new FV(...t)}(o,e,t,n,r),a=jV(i.formatValue.bind(i),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}const BV="D",$V="T",VV="TS",WV="IV",UV=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],GV=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],YV=["January","February","March","April","May","June","July","August","September","October","November","December"],KV=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function XV(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function JV(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function QV(e,t){let n,r=function(e){const t=e,n=24*JV(t),r=60*JV(n),o=60*JV(r),i=1e3*JV(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:o,h:i,m:a,s:s,f:l,t:c}}class ZV{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:UV,qDayNames:GV,qLongMonthNames:YV,qMonthNames:KV}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[$V]:r.qTimeFmt||"hh:mm:ss",[BV]:r.qDateFmt||"YYYY-MM-DD",[VV]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new ZV(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=QV(e,t));const o=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:XV("".concat(t.year).slice(-2),2),YYY:XV("".concat(t.year).slice(-3),3),def:e=>XV("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:XV("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:XV("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>XV("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>XV("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>XV("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>XV("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),i=[];for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&i.push(e);const a=new RegExp(i.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in o[n])if(t===e||t.toLowerCase()===e){r=o[n][t],void 0===r&&(r=o[n][t.toLowerCase()]);break}return void 0===r&&(r=o[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function eW(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ZV(...t)}function tW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=eW(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=jV(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==WV?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function i(e){return e=o(e),r(e)}return i.format=function(e,t){return r.clear(),t=o(t),n.format(t,e)},i.locale=function(o){return n=eW(o,e,t),r=jV(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},i.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},i}function nW(){let e,{meta:t,id:n,key:r,localeInfo:o,fieldExtractor:i,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return tW(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##"),i="U"),HV(n,r,o,i,t)}(t,o),p="dimension"===s?"first":(e,t)=>d(t),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=i(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return f}function rW(e,t,n,r,o){return(t[e]||[]).map(((t,i)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:nW(j$({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=rW("qAttrDimInfo",t,n,a,j$({},o,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=rW("qAttrExprInfo",t,n,a,j$({},o,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=rW("qMeasureInfo",t,n,a,j$({},o,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function oW(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=t;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const i=oW.util,a={cache:r,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>o,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,i),hierarchy:e=>a.hierarchy(e,s,r,i),_cache:()=>r};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(a.extractor=wV,a.hierarchy=SV,a.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(a.extractor=V$,a.pages=o.qDataPages,a.hierarchy=SV):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,i);const l="S"===o.qMode?e=>e.qElemNumber:void 0,u="S"===o.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...rW("qDimensionInfo",o,e,"",j$({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...rW("qMeasureInfo",o,e,"",j$({},a,{value:u,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const c=e=>{e.forEach((e=>{r.allFields.push(e.instance),c(e.measures),c(e.attrDims),c(e.attrExps)}))};return c(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),o=nW(P$({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,i),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(o)})),r.allFields.push(...r.virtualFields),s}const iW=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],aW=/\/qDimensionInfo(?:\/(\d+))?/,sW=/\/qMeasureInfo\/(\d+)/,lW=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,uW=/\/qAttrExprInfo\/(\d+)/,cW=/\/?qHyperCube/,dW=/\/?qTreeData/,pW=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),fW=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function hW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,o=t.primarySource,i=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,o=-1,i="",a=e=>e;cW.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=pW):dW.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=fW);let s=!0;if(aW.test(e)&&(r=+aW.exec(e)[1]),sW.test(e)&&(o=+sW.exec(e)[1]),lW.test(e)){o=-1,r=0;const e=+lW.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(uW.test(e)){const e=o;if(t){o=0;const a=sV(i,t);o+=(a.qMeasureInfo||[]).length,r>-1?(o=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),o),r=-1):(o=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),o),o=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),o)),o+=+uW.exec(n)[1]}else r>-1?(r=-1,o=+uW.exec(n)[1]):o+=+uW.exec(n)[1]+1}return iW.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,i=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===i||s>=i)&&i>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-i})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,i.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var u;a.rangeSelectHyperCubeValues&&i.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]});return a.selectHyperCubeContinuousRange&&i.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&i.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&i.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&i.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),i}function mW(e){oW.util=e.data("matrix").util,e.data("q",oW),e.formatter("q-number",HV),e.formatter("q-time",tW)}mW.qBrushHelper=hW,mW.selections=hW;var gW=Object.prototype.hasOwnProperty,yW=Object.prototype.toString,bW=Object.defineProperty,vW=Object.getOwnPropertyDescriptor,xW=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===yW.call(e)},SW=function(e){if(!e||"[object Object]"!==yW.call(e))return!1;var t,n=gW.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&gW.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||gW.call(e,t)},wW=function(e,t){bW&&"__proto__"===t.name?bW(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},CW=function(e,t){if("__proto__"===t){if(!gW.call(e,t))return;if(vW)return vW(e,t).value}return e[t]},EW=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=CW(s,n),s!==(o=CW(t,n))&&(c&&o&&(SW(o)||(i=xW(o)))?(i?(i=!1,a=r&&xW(r)?r:[]):a=r&&SW(r)?r:{},wW(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&wW(s,{name:n,newValue:o}));return s},kW="2.8.2";function RW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_W(Object(n),!0).forEach((function(t){RW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AW(e){return!!e.changedTouches}function DW(e){return"number"==typeof e&&!isNaN(e)}function PW(e){return"number"!=typeof e||isNaN(e)}function LW(e){const t=e.length;let n=NaN,r=NaN,o=NaN,i=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),o=isNaN(o)?e[a].y:Math.min(o,e[a].y),i=isNaN(i)?e[a].y:Math.max(i,e[a].y);return[n,o,r,i]}function IW(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function qW(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function TW(e){const[t,n,r,o]=LW(e);return{x:t,y:n,width:r-t,height:o-n}}function OW(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function NW(e){const{x:t,y:n,width:r,height:o,x1:i,x2:a,y1:s,y2:l,cx:u,cy:c,r:d,vertices:p}=e||{};return DW(u)&&DW(c)&&DW(d)?"circle":DW(i)&&DW(a)&&DW(s)&&DW(l)?"line":DW(t)&&DW(n)&&DW(r)&&DW(o)?"rect":DW(t)&&DW(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function zW(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var FW=Math.PI,jW=2*FW,HW=1e-6,BW=jW-HW;function $W(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function VW(){return new $W}function WW(e){return function(){return e}}$W.prototype=VW.prototype={constructor:$W,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var i=this._x1,a=this._y1,s=n-e,l=r-t,u=i-e,c=a-t,d=u*u+c*c;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>HW)if(Math.abs(c*s-l*u)>HW&&o){var p=n-i,f=r-a,h=s*s+l*l,m=p*p+f*f,g=Math.sqrt(h),y=Math.sqrt(d),b=o*Math.tan((FW-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>HW&&(this._+="L"+(e+v*u)+","+(t+v*c)),this._+="A"+o+","+o+",0,0,"+ +(c*p>u*f)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,o,i){e=+e,t=+t,i=!!i;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,u=t+s,c=1^i,d=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>HW||Math.abs(this._y1-u)>HW)&&(this._+="L"+l+","+u),n&&(d<0&&(d=d%jW+jW),d>BW?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):d>HW&&(this._+="A"+n+","+n+",0,"+ +(d>=FW)+","+c+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var UW=Math.abs,GW=Math.atan2,YW=Math.cos,KW=Math.max,XW=Math.min,JW=Math.sin,QW=Math.sqrt,ZW=1e-12,eU=Math.PI,tU=eU/2,nU=2*eU;function rU(e){return e>=1?tU:e<=-1?-tU:Math.asin(e)}function oU(e){return e.innerRadius}function iU(e){return e.outerRadius}function aU(e){return e.startAngle}function sU(e){return e.endAngle}function lU(e){return e&&e.padAngle}function uU(e,t,n,r,o,i,a){var s=e-n,l=t-r,u=(a?i:-i)/QW(s*s+l*l),c=u*l,d=-u*s,p=e+c,f=t+d,h=n+c,m=r+d,g=(p+h)/2,y=(f+m)/2,b=h-p,v=m-f,x=b*b+v*v,S=o-i,w=p*m-h*f,C=(v<0?-1:1)*QW(KW(0,S*S*x-w*w)),E=(w*v-b*C)/x,k=(-w*b-v*C)/x,R=(w*v+b*C)/x,_=(-w*b+v*C)/x,M=E-g,A=k-y,D=R-g,P=_-y;return M*M+A*A>D*D+P*P&&(E=R,k=_),{cx:E,cy:k,x01:-c,y01:-d,x11:E*(o/S-1),y11:k*(o/S-1)}}function cU(){var e=oU,t=iU,n=WW(0),r=null,o=aU,i=sU,a=lU,s=null;function l(){var l,u,c=+e.apply(this,arguments),d=+t.apply(this,arguments),p=o.apply(this,arguments)-tU,f=i.apply(this,arguments)-tU,h=UW(f-p),m=f>p;if(s||(s=l=VW()),d<c&&(u=d,d=c,c=u),d>ZW)if(h>nU-ZW)s.moveTo(d*YW(p),d*JW(p)),s.arc(0,0,d,p,f,!m),c>ZW&&(s.moveTo(c*YW(f),c*JW(f)),s.arc(0,0,c,f,p,m));else{var g,y,b=p,v=f,x=p,S=f,w=h,C=h,E=a.apply(this,arguments)/2,k=E>ZW&&(r?+r.apply(this,arguments):QW(c*c+d*d)),R=XW(UW(d-c)/2,+n.apply(this,arguments)),_=R,M=R;if(k>ZW){var A=rU(k/c*JW(E)),D=rU(k/d*JW(E));(w-=2*A)>ZW?(x+=A*=m?1:-1,S-=A):(w=0,x=S=(p+f)/2),(C-=2*D)>ZW?(b+=D*=m?1:-1,v-=D):(C=0,b=v=(p+f)/2)}var P=d*YW(b),L=d*JW(b),I=c*YW(S),q=c*JW(S);if(R>ZW){var T,O=d*YW(v),N=d*JW(v),z=c*YW(x),F=c*JW(x);if(h<eU&&(T=function(e,t,n,r,o,i,a,s){var l=n-e,u=r-t,c=a-o,d=s-i,p=d*l-c*u;if(!(p*p<ZW))return[e+(p=(c*(t-i)-d*(e-o))/p)*l,t+p*u]}(P,L,z,F,O,N,I,q))){var j=P-T[0],H=L-T[1],B=O-T[0],$=N-T[1],V=1/JW(function(e){return e>1?0:e<-1?eU:Math.acos(e)}((j*B+H*$)/(QW(j*j+H*H)*QW(B*B+$*$)))/2),W=QW(T[0]*T[0]+T[1]*T[1]);_=XW(R,(c-W)/(V-1)),M=XW(R,(d-W)/(V+1))}}C>ZW?M>ZW?(g=uU(z,F,P,L,d,M,m),y=uU(O,N,I,q,d,M,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),M<R?s.arc(g.cx,g.cy,M,GW(g.y01,g.x01),GW(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,M,GW(g.y01,g.x01),GW(g.y11,g.x11),!m),s.arc(0,0,d,GW(g.cy+g.y11,g.cx+g.x11),GW(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,M,GW(y.y11,y.x11),GW(y.y01,y.x01),!m))):(s.moveTo(P,L),s.arc(0,0,d,b,v,!m)):s.moveTo(P,L),c>ZW&&w>ZW?_>ZW?(g=uU(I,q,O,N,c,-_,m),y=uU(P,L,z,F,c,-_,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),_<R?s.arc(g.cx,g.cy,_,GW(g.y01,g.x01),GW(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,GW(g.y01,g.x01),GW(g.y11,g.x11),!m),s.arc(0,0,c,GW(g.cy+g.y11,g.cx+g.x11),GW(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,_,GW(y.y11,y.x11),GW(y.y01,y.x01),!m))):s.arc(0,0,c,S,x,m):s.lineTo(I,q)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-eU/2;return[YW(r)*n,JW(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:WW(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:WW(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:WW(+e),l):r},l.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:WW(+e),l):o},l.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:WW(+e),l):i},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:WW(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function dU(e){this._context=e}function pU(e){return new dU(e)}function fU(e){return e[0]}function hU(e){return e[1]}function mU(){var e=fU,t=null,n=WW(0),r=hU,o=WW(!0),i=null,a=pU,s=null;function l(l){var u,c,d,p,f,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==i&&(s=a(f=VW())),u=0;u<=h;++u){if(!(u<h&&o(p=l[u],u,l))===m)if(m=!m)c=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=u-1;d>=c;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[u]=+e(p,u,l),y[u]=+n(p,u,l),s.point(t?+t(p,u,l):g[u],r?+r(p,u,l):y[u]))}if(f)return s=null,f+""||null}function u(){return function(){var e=fU,t=hU,n=WW(!0),r=null,o=pU,i=null;function a(a){var s,l,u,c=a.length,d=!1;for(null==r&&(i=o(u=VW())),s=0;s<=c;++s)!(s<c&&n(l=a[s],s,a))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(l,s,a),+t(l,s,a));if(u)return i=null,u+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:WW(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:WW(!!e),a):n},a.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),a):o},a.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),a):r},a}().defined(o).curve(a).context(i)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:WW(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:WW(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:WW(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:WW(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:WW(+e),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:WW(!!e),l):o},l.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),l):a},l.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),l):i},l}function gU(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function yU(e){return e}dU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var bU=Array.prototype.slice;function vU(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xU(e){this._context=e}function SU(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function wU(e,t){this._context=e,this._k=(1-t)/6}xU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vU(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vU(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},wU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:SU(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:SU(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var CU=function e(t){function n(e){return new wU(e,t)}return n.tension=function(t){return e(+t)},n}(0);function EU(e,t){this._context=e,this._alpha=t}EU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>ZW){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ZW){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var kU=function e(t){function n(e){return t?new EU(e,t):new wU(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function RU(e){return e<0?-1:1}function _U(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(RU(i)+RU(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function MU(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function AU(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function DU(e){this._context=e}function PU(e){this._context=new LU(e)}function LU(e){this._context=e}function IU(e){this._context=e}function qU(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function TU(e,t){this._context=e,this._t=t}function OU(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function NU(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function zU(e,t){return e[t]}function FU(e){for(var t,n=-1,r=0,o=e.length,i=-1/0;++n<o;)(t=+e[n][1])>i&&(i=t,r=n);return r}function jU(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function HU(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const o={},i=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in o)&&(o[e]=t,!0)}function s(e){return o[e]||i.get(e)}function l(e,o){if(void 0!==o)return a(e,o);const i=s(e);return r&&void 0===i&&r.warn("".concat(e," does not exist in ").concat(n," registry")),i||s(t)}return t=i.default(),l.add=a,l.get=s,l.has=function(e){return!!o[e]||i.has(e)},l.remove=function(e){const t=o[e];return delete o[e],t},l.getKeys=function(){return Object.keys(o)},l.getValues=function(){return Object.keys(o).map((e=>o[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function BU(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function $U(e){return(e=BU(Math.abs(e)))?e[1]:NaN}DU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:AU(this,this._t0,MU(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,AU(this,MU(this,n=_U(this,e,t)),n);break;default:AU(this,this._t0,n=_U(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(PU.prototype=Object.create(DU.prototype)).point=function(e,t){DU.prototype.point.call(this,t,e)},LU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},IU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=qU(e),o=qU(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},TU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var VU,WU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function UU(e){if(!(t=WU.exec(e)))throw new Error("invalid format: "+e);var t;return new GU({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function GU(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function YU(e,t){var n=BU(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}UU.prototype=GU.prototype,GU.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var KU={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>YU(100*e,t),r:YU,s:function(e,t){var n=BU(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(VU=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+BU(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function XU(e){return e}var JU,QU,ZU,eG=Array.prototype.map,tG=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nG(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?XU:(t=eG.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?XU:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(eG.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=UU(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(m=!0,b="g"):KU[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var v="$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?i:/[%p]/.test(b)?l:"",S=KU[b],w=/[defgprs%]/.test(b);function C(e){var o,i,l,p=v,C=x;if("c"===b)C=S(e)+C,e="";else{var E=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&"+"!==d&&(E=!1),p=(E?"("===d?d:u:"-"===d||"("===d?"":d)+p,C=("s"===b?tG[8+VU/3]:"")+C+(E&&"("===d?")":""),w)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?a+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}m&&!f&&(e=r(e,1/0));var k=p.length+e.length+C.length,R=k<h?new Array(h-k+1).join(t):"";switch(m&&f&&(e=r(R+e,R.length?h-C.length:1/0),R=""),n){case"<":e=p+e+C+R;break;case"=":e=p+R+e+C;break;case"^":e=R.slice(0,k=R.length>>1)+p+e+C+R.slice(k);break;default:e=R+p+e+C}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=UU(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor($U(t)/3))),o=Math.pow(10,-r),i=tG[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){JU=nG(e),QU=JU.format,ZU=JU.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const rG=new Date,oG=new Date;function iG(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>iG((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(rG.setTime(+t),oG.setTime(+r),e(rG),e(oG),Math.floor(n(rG,oG))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const aG=6e4,sG=864e5,lG=6048e5,uG=iG((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*aG)/sG),(e=>e.getDate()-1));uG.range;const cG=iG((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sG),(e=>e.getUTCDate()-1));cG.range;const dG=iG((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sG),(e=>Math.floor(e/sG)));function pG(e){return iG((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*aG)/lG))}dG.range;const fG=pG(0),hG=pG(1),mG=pG(2),gG=pG(3),yG=pG(4),bG=pG(5),vG=pG(6);function xG(e){return iG((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/lG))}fG.range,hG.range,mG.range,gG.range,yG.range,bG.range,vG.range;const SG=xG(0),wG=xG(1),CG=xG(2),EG=xG(3),kG=xG(4),RG=xG(5),_G=xG(6);SG.range,wG.range,CG.range,EG.range,kG.range,RG.range,_G.range;const MG=iG((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));MG.every=e=>isFinite(e=Math.floor(e))&&e>0?iG((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,MG.range;const AG=iG((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function DG(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function PG(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function LG(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=DG,n=(t,n)=>DG(e(t),n),r=(t,n)=>e(t)-n):(t=e===DG||e===PG?e:IG,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function IG(){return 0}AG.every=e=>isFinite(e=Math.floor(e))&&e>0?iG((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,AG.range;const qG=LG(DG).right;LG((function(e){return null===e?NaN:+e})).center;var TG=qG;class OG extends Map{constructor(e,t=zG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(NG(this,e))}has(e){return super.has(NG(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function NG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function zG(e){return null!==e&&"object"==typeof e?e.valueOf():e}const FG=Math.sqrt(50),jG=Math.sqrt(10),HG=Math.sqrt(2);function BG(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=FG?10:i>=jG?5:i>=HG?2:1;let s,l,u;return o<0?(u=Math.pow(10,-o)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,o)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?BG(e,t,2*n):[s,l,u]}function $G(e,t,n){return BG(e=+e,t=+t,n=+n)[2]}function VG(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function WG(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function UG(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function GG(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=eY(o),c=tY(o),d=eY(i),p=tY(i),f=eY(a),h=tY(a),m=eY(s),g=tY(s),y=eY(l),b=tY(l),v={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:wY,e:wY,f:_Y,g:zY,G:jY,H:CY,I:EY,j:kY,L:RY,m:MY,M:AY,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:uK,s:cK,S:DY,u:PY,U:LY,V:qY,w:TY,W:OY,x:null,X:null,y:NY,Y:FY,Z:HY,"%":lK},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:BY,e:BY,f:GY,g:oK,G:aK,H:$Y,I:VY,j:WY,L:UY,m:YY,M:KY,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:uK,s:cK,S:XY,u:JY,U:QY,V:eK,w:tK,W:nK,x:null,X:null,y:rK,Y:iK,Z:sK,"%":lK},S={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:pY,e:pY,f:bY,g:lY,G:sY,H:hY,I:hY,j:fY,L:yY,m:dY,M:mY,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:cY,Q:xY,s:SY,S:gY,u:rY,U:oY,V:iY,w:nY,W:aY,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:lY,Y:sY,Z:uY,"%":vY};function w(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=YG[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=UG(1900,void 0,1);if(E(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=WG(UG(i.y,0,1))).getUTCDay(),r=o>4||0===o?wG.ceil(r):wG(r),r=cG.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=VG(UG(i.y,0,1))).getDay(),r=o>4||0===o?hG.ceil(r):hG(r),r=uG.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?WG(UG(i.y,0,1)).getUTCDay():VG(UG(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,WG(i)):VG(i)}}function E(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=S[o in YG?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return v.x=w(n,v),v.X=w(r,v),v.c=w(t,v),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}var YG={"-":"",_:" ",0:"0"},KG=/^\s*\d+/,XG=/^%/,JG=/[\\^$*+?|[\]().{}]/g;function QG(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function ZG(e){return e.replace(JG,"\\$&")}function eY(e){return new RegExp("^(?:"+e.map(ZG).join("|")+")","i")}function tY(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function nY(e,t,n){var r=KG.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function rY(e,t,n){var r=KG.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function oY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function iY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function aY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sY(e,t,n){var r=KG.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function uY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cY(e,t,n){var r=KG.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function dY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function pY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fY(e,t,n){var r=KG.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function hY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function gY(e,t,n){var r=KG.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yY(e,t,n){var r=KG.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function bY(e,t,n){var r=KG.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vY(e,t,n){var r=XG.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xY(e,t,n){var r=KG.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function SY(e,t,n){var r=KG.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wY(e,t){return QG(e.getDate(),t,2)}function CY(e,t){return QG(e.getHours(),t,2)}function EY(e,t){return QG(e.getHours()%12||12,t,2)}function kY(e,t){return QG(1+uG.count(MG(e),e),t,3)}function RY(e,t){return QG(e.getMilliseconds(),t,3)}function _Y(e,t){return RY(e,t)+"000"}function MY(e,t){return QG(e.getMonth()+1,t,2)}function AY(e,t){return QG(e.getMinutes(),t,2)}function DY(e,t){return QG(e.getSeconds(),t,2)}function PY(e){var t=e.getDay();return 0===t?7:t}function LY(e,t){return QG(fG.count(MG(e)-1,e),t,2)}function IY(e){var t=e.getDay();return t>=4||0===t?yG(e):yG.ceil(e)}function qY(e,t){return e=IY(e),QG(yG.count(MG(e),e)+(4===MG(e).getDay()),t,2)}function TY(e){return e.getDay()}function OY(e,t){return QG(hG.count(MG(e)-1,e),t,2)}function NY(e,t){return QG(e.getFullYear()%100,t,2)}function zY(e,t){return QG((e=IY(e)).getFullYear()%100,t,2)}function FY(e,t){return QG(e.getFullYear()%1e4,t,4)}function jY(e,t){var n=e.getDay();return QG((e=n>=4||0===n?yG(e):yG.ceil(e)).getFullYear()%1e4,t,4)}function HY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+QG(t/60|0,"0",2)+QG(t%60,"0",2)}function BY(e,t){return QG(e.getUTCDate(),t,2)}function $Y(e,t){return QG(e.getUTCHours(),t,2)}function VY(e,t){return QG(e.getUTCHours()%12||12,t,2)}function WY(e,t){return QG(1+cG.count(AG(e),e),t,3)}function UY(e,t){return QG(e.getUTCMilliseconds(),t,3)}function GY(e,t){return UY(e,t)+"000"}function YY(e,t){return QG(e.getUTCMonth()+1,t,2)}function KY(e,t){return QG(e.getUTCMinutes(),t,2)}function XY(e,t){return QG(e.getUTCSeconds(),t,2)}function JY(e){var t=e.getUTCDay();return 0===t?7:t}function QY(e,t){return QG(SG.count(AG(e)-1,e),t,2)}function ZY(e){var t=e.getUTCDay();return t>=4||0===t?kG(e):kG.ceil(e)}function eK(e,t){return e=ZY(e),QG(kG.count(AG(e),e)+(4===AG(e).getUTCDay()),t,2)}function tK(e){return e.getUTCDay()}function nK(e,t){return QG(wG.count(AG(e)-1,e),t,2)}function rK(e,t){return QG(e.getUTCFullYear()%100,t,2)}function oK(e,t){return QG((e=ZY(e)).getUTCFullYear()%100,t,2)}function iK(e,t){return QG(e.getUTCFullYear()%1e4,t,4)}function aK(e,t){var n=e.getUTCDay();return QG((e=n>=4||0===n?kG(e):kG.ceil(e)).getUTCFullYear()%1e4,t,4)}function sK(){return"+0000"}function lK(){return"%"}function uK(e){return+e}function cK(e){return Math.floor(+e/1e3)}const dK=HU();dK("d3-number",(function(e,t,n){let r,o;function i(e){return o(e)}function a(){i.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return i.locale=function(t){return r=nG(t),o=r.format(e),this},a(),i.format=function(e,o,i,s){return(i||s)&&(t=i,n=s,a()),r.format(e)(o)},i.pattern=function(t){return t&&(e=t,o=r.format(t)),e},i})),dK("d3-time",(function(e){let t=GG({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=GG(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const pK={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return dK(t.type||"d3-number")(t.format||"")})(e)};function fK(e){let{id:t=pK.id,key:n=pK.key,min:r=pK.min,max:o=pK.max,type:i=pK.type,tags:a=pK.tags,title:s=pK.title,values:l=pK.values,value:u=pK.value,label:c=pK.label,formatter:d=pK.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>i(e),min:()=>r(e),max:()=>o(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:u,label:c}}const hK=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),mK=e=>e.reduce(((e,t)=>e+t),0),gK={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=hK(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=hK(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=hK(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=hK(e),n=t.length;return n?mK(t)/n:NaN}};function yK(e,t,n,r){const o={},i=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=o[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=i):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>yK(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):i&&(l.value=i.value,l.label=i.label,l.field=i),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=gK[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?gK[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=gK[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?gK[l.field.reduceLabel]:l.field.reduceLabel))})),o}function bK(e,t){const{main:n}=yK(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:yK(e,t,e.props||{},n),main:n}}function vK(e,t,n,r){const o=Array(e.length),i=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],o[t]=a.value,i[t]=a.label;const s=t.reduce,l=t.reduceLabel,u=s?s(o):o,c={value:u,label:l?l(i,u):n?n(u):String(u)};return r&&e[0][r].source?(c.source=e[0][r].source,c):!r&&e[0].source?(c.source=e[0].source,c):c}function xK(e,t){let{main:n,propsArr:r,props:o}=t,i=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=o[e].field?o[e].field.formatter():e=>e})),i.push(...e.map((e=>{const t=vK(e.items,n,a);return r.forEach((n=>{t[n]=vK(e.items,o[n],s[n],n)})),t}))),i}function SK(e){let{cfg:t,itemData:n,obj:r,target:o,tracker:i,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=i[s];l||(l=i[s]={items:[],id:s},o.push(l)),l.items.push(r)}function wK(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function CK(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const EK={diverging:function(e,t){if((s=e.length)>0)for(var n,r,o,i,a,s,l=0,u=e[t[0]].length;l<u;++l)for(i=a=0,n=0;n<s;++n)(o=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):r[0]=i},none:OU,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}OU(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}OU(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],d=c[a][1]||0,p=(d-(c[a-1][1]||0))/2,f=0;f<s;++f){var h=e[t[f]];p+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,u+=p*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=u/l)}n[a-1][1]+=n[a-1][0]=i,OU(e,t)}}},kK={ascending:function(e){var t=e.map(jU);return NU(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,o=e.map(jU),i=function(e){var t=e.map(FU);return NU(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],u=[];for(t=0;t<r;++t)n=i[t],a<s?(a+=o[n],l.push(n)):(s+=o[n],u.push(n));return u.reverse().concat(l)},none:NU,reverse:function(e){return NU(e).reverse()}};function RK(e,t,n){const r={},o=t.stackKey,i=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",u=t.order||"none",c=t.valueRef||"";let d=0,p={};for(let t=0;t<e.items.length;t++){let n=e.items[t],i=c?n[c]:null;if(i&&i.source){let e="".concat(i.source.key||"","/").concat(i.source.field);p[e]||(p[e]=i.source)}let a=o(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const f=Array.apply(null,{length:d}).map(Number.call,Number),h=Object.keys(r).map((e=>r[e].items)),m=function(){var e=WW([]),t=NU,n=OU,r=zU;function o(o){var i,a,s=e.apply(this,arguments),l=o.length,u=s.length,c=new Array(u);for(i=0;i<u;++i){for(var d,p=s[i],f=c[i]=new Array(l),h=0;h<l;++h)f[h]=d=[0,+r(o[h],p,h,o)],d.data=o[h];f.key=p}for(i=0,a=t(c);i<u;++i)c[a[i]].index=i;return n(c,a),c}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:WW(bU.call(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:WW(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?NU:"function"==typeof e?e:WW(bU.call(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?OU:e,o):n},o}().keys(f).value(((e,t)=>e[t]?i(e[t]):0)).order(kK[u]).offset(EK[l]);let g=m(h),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let b=Object.keys(p).map((e=>{let t=n(p[e].key);return t?t.field(p[e].field):null})).filter((e=>!!e));const v=fK({title:b.map((e=>e.title())).join(", "),min:CK(y),max:wK(y),type:"measure",formatter:b[0]?b[0].formatter:void 0});e.fields.push(v)}function _K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=MW({},t.collection(e.collection));else{const o=t.dataset?t.dataset(e.source):null;let i=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=o.hierarchy?o.hierarchy(e.hierarchy):null,n.fields=o.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:i(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const i=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):o;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&i.push(r.field(e.field)))})),i.length&&(n.fields=i),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&o){const t=o.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(i=t.value||(e=>e),a=t.label||(e=>e),n.value=i),n.items=t.items().map((t=>({value:i(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):o;if(!r)return;let i;i="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),i&&(n.fields||(n.fields=[]),n.fields.push(i))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&RK(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function MK(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_K;if(e.data){const r=o(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function AK(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const DK=Symbol("implicit");function PK(){var e=new OG,t=[],n=[],r=DK;function o(o){let i=e.get(o);if(void 0===i){if(r!==DK)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new OG;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return PK(t,n).unknown(r)},AK.apply(o,arguments),o}function LK(){var e,t,n=PK().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,u=0,c=.5;function d(){var n=r().length,d=a<i,p=d?a:i,f=d?i:a;e=(f-p)/Math.max(1,n-l+2*u),s&&(e=Math.floor(e)),p+=(f-p-e*(n-l))*c,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return p+e*t}));return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(u=+e,d()):u},n.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),d()):c},n.copy=function(){return LK(r(),[i,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},AK.apply(d(),arguments)}function IK(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qK(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function TK(){}var OK=.7,NK=1/OK,zK="\\s*([+-]?\\d+)\\s*",FK="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jK="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HK=/^#([0-9a-f]{3,8})$/,BK=new RegExp(`^rgb\\(${zK},${zK},${zK}\\)$`),$K=new RegExp(`^rgb\\(${jK},${jK},${jK}\\)$`),VK=new RegExp(`^rgba\\(${zK},${zK},${zK},${FK}\\)$`),WK=new RegExp(`^rgba\\(${jK},${jK},${jK},${FK}\\)$`),UK=new RegExp(`^hsl\\(${FK},${jK},${jK}\\)$`),GK=new RegExp(`^hsla\\(${FK},${jK},${jK},${FK}\\)$`),YK={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function KK(){return this.rgb().formatHex()}function XK(){return this.rgb().formatRgb()}function JK(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=HK.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?QK(t):3===n?new tX(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ZK(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ZK(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=BK.exec(e))?new tX(t[1],t[2],t[3],1):(t=$K.exec(e))?new tX(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VK.exec(e))?ZK(t[1],t[2],t[3],t[4]):(t=WK.exec(e))?ZK(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=UK.exec(e))?sX(t[1],t[2]/100,t[3]/100,1):(t=GK.exec(e))?sX(t[1],t[2]/100,t[3]/100,t[4]):YK.hasOwnProperty(e)?QK(YK[e]):"transparent"===e?new tX(NaN,NaN,NaN,0):null}function QK(e){return new tX(e>>16&255,e>>8&255,255&e,1)}function ZK(e,t,n,r){return r<=0&&(e=t=n=NaN),new tX(e,t,n,r)}function eX(e,t,n,r){return 1===arguments.length?function(e){return e instanceof TK||(e=JK(e)),e?new tX((e=e.rgb()).r,e.g,e.b,e.opacity):new tX}(e):new tX(e,t,n,null==r?1:r)}function tX(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function nX(){return`#${aX(this.r)}${aX(this.g)}${aX(this.b)}`}function rX(){const e=oX(this.opacity);return`${1===e?"rgb(":"rgba("}${iX(this.r)}, ${iX(this.g)}, ${iX(this.b)}${1===e?")":`, ${e})`}`}function oX(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function iX(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function aX(e){return((e=iX(e))<16?"0":"")+e.toString(16)}function sX(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new uX(e,t,n,r)}function lX(e){if(e instanceof uX)return new uX(e.h,e.s,e.l,e.opacity);if(e instanceof TK||(e=JK(e)),!e)return new uX;if(e instanceof uX)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new uX(a,s,l,e.opacity)}function uX(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function cX(e){return(e=(e||0)%360)<0?e+360:e}function dX(e){return Math.max(0,Math.min(1,e||0))}function pX(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}IK(TK,JK,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KK,formatHex:KK,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lX(this).formatHsl()},formatRgb:XK,toString:XK}),IK(tX,eX,qK(TK,{brighter(e){return e=null==e?NK:Math.pow(NK,e),new tX(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?OK:Math.pow(OK,e),new tX(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tX(iX(this.r),iX(this.g),iX(this.b),oX(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nX,formatHex:nX,formatHex8:function(){return`#${aX(this.r)}${aX(this.g)}${aX(this.b)}${aX(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:rX,toString:rX})),IK(uX,(function(e,t,n,r){return 1===arguments.length?lX(e):new uX(e,t,n,null==r?1:r)}),qK(TK,{brighter(e){return e=null==e?NK:Math.pow(NK,e),new uX(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?OK:Math.pow(OK,e),new uX(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new tX(pX(e>=240?e-240:e+120,o,r),pX(e,o,r),pX(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new uX(cX(this.h),dX(this.s),dX(this.l),oX(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oX(this.opacity);return`${1===e?"hsl(":"hsla("}${cX(this.h)}, ${100*dX(this.s)}%, ${100*dX(this.l)}%${1===e?")":`, ${e})`}`}}));var fX=e=>()=>e;function hX(e){return 1==(e=+e)?mX:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fX(isNaN(t)?n:t)}}function mX(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fX(isNaN(e)?t:e)}var gX=function e(t){var n=hX(t);function r(e,t){var r=n((e=eX(e)).r,(t=eX(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=mX(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function yX(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function bX(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=kX(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function vX(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function xX(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function SX(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=kX(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var wX=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,CX=new RegExp(wX.source,"g");function EX(e,t){var n,r,o,i=wX.lastIndex=CX.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=wX.exec(e))&&(r=CX.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:xX(n,r)})),i=CX.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function kX(e,t){var n,r=typeof t;return null==t||"boolean"===r?fX(t):("number"===r?xX:"string"===r?(n=JK(t))?(t=n,gX):EX:t instanceof JK?gX:t instanceof Date?vX:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?yX:Array.isArray(t)?bX:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?SX:xX)(e,t)}function RX(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _X(e){return+e}var MX=[0,1];function AX(e){return e}function DX(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function PX(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=DX(o,r),i=n(a,i)):(r=DX(r,o),i=n(i,a)),function(e){return i(r(e))}}function LX(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=DX(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=TG(e,t,1,r)-1;return i[n](o[n](t))}}function IX(){var e,t,n,r,o,i,a=MX,s=MX,l=kX,u=AX;function c(){var e=Math.min(a.length,s.length);return u!==AX&&(u=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?LX:PX,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=r(s,a.map(e),xX)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,_X),c()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=RX,c()},d.clamp=function(e){return arguments.length?(u=!!e||AX,c()):u!==AX},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function qX(e,t,n,r){var o,i=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?$G(t,e,n):$G(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=UU(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($U(t)/3)))-$U(Math.abs(e)))}(i,a))||(r.precision=o),ZU(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$U(t)-$U(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-$U(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return QU(r)}function TX(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,i,a]=r?BG(t,e,n):BG(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return qX(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],u=i[s],c=10;for(u<l&&(o=l,l=u,u=o,o=a,a=s,s=o);c-- >0;){if((o=$G(l,u,n))===r)return i[a]=l,i[s]=u,t(i);if(o>0)l=Math.floor(l/o)*o,u=Math.ceil(u/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,u=Math.floor(u*o)/o}r=o}return e},e}function OX(){var e=IX()(AX,AX);return e.copy=function(){return t=e,OX().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},AK.apply(e,arguments),TX(e)}function NX(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[TG(t,o,0,r)]:e}return o.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),o):t.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return NX().domain(t).range(n).unknown(e)},AK.apply(o,arguments)}function zX(e){return void 0===e?e=>e:t=>e(t)}function FX(e){return Math.max(0,Math.min(1,e))}function jX(e){return"object"==typeof e}function HX(e,t,n){const r=Math.abs(t-n)/(e+1),o=[];for(let i=1;i<=e;i++){const e=i*r;o.push(t<n?t+e:t-e)}return o}function BX(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let o=0;o<e.length;o++){let i=e[o],a=e[o+1];0===o&&i!==n.start()?(r.push(...HX(t,i,a)),i-=a-i,a=e[o],r.push(...HX(t,i,a))):o===e.length-1&&a!==n.end()?(a=i+(i-e[o-1]),r.push(...HX(t,i,a))):r.push(...HX(t,i,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function $X(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=PW(o)||PW(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const u=r>0?BX(l,r,n):l;u.sort(((e,t)=>e-t));const c=u.map(zX(i));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:c[t],value:e,isMinor:-1===l.indexOf(e)}}))}function VX(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=PW(o)||PW(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const u=n.ticks(s),c=r>0?BX(u,r,n):u;c.sort(((e,t)=>e-t));const d=c.map(zX(i));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===u.indexOf(e)}}))}function WX(e){let t,{settings:n,scale:r,distance:o,formatter:i=e=>e}=e;const a=n.minorTicks&&!PW(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!PW(e.value):!PW(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(jX(e)?e.value:e)-(jX(t)?t.value:t))).filter(((e,t,r)=>{const o=jX(e)?e.value:e;return o<=n.max()&&o>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=jX(e),o=t?e.value:e,i=n(o);return{position:i,value:o,label:t&&void 0!==e.label?e.label:r(o),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?FX(n(e.start)):i,end:t&&!isNaN(e.end)?FX(n(e.end)):i}}))}({values:e,scale:r.copy(),formatter:i})}else if(PW(n.ticks.count)){t=(n.ticks.tight?VX:$X)({distance:o,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:i}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),o=t.range();-1===r.indexOf(o[0])?e.splice(0,0,{position:o[0],start:o[0],end:o[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const i=e[e.length-1];-1===r.indexOf(o[1])?e.push({position:o[1],start:o[1],end:o[1],label:n(t.end()),isMinor:!1,value:t.end()}):i&&i.isMinor&&(i.isMinor=!1)}(t,r,i)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:o}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const i=r(e);return{position:i,start:i,end:i,label:o(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:i})}return t}function UX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((o=>{const i=typeof e[o];r[o]="function"===i?e[o](n):"undefined"===i?t[o]:e[o]})),r}const GX={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},YX={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},KX={count:NaN};function XX(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function JX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=OX(),o={instance:null,invert:!1},i={data:t,resources:n},a=UX(e,GX,i);let s;function l(e){return PW(e)?NaN:r(e)}a.ticks=UX(e.ticks,YX,i),a.minorTicks=UX(e.minorTicks,KX,i),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=EW(!0,{},a,e.settings),e.scale=l,s=WX(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),o.instance&&o.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],o=t/2;for(let i=0;i<e;i++){let e=n[n.length-1]||0,i=e+t,a=l(e+o);n.push(i,i),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const o=JX(e,t,n);return o.domain(l.domain()),o.range(l.range()),o.clamp(r.clamp()),o},l.norm=function(e){return XX(o,l),o.instance(e)},l.normInvert=function(e){return XX(o,l),o.instance.invert(e)};const{mini:u,maxi:c}=function(e,t){const n=+e.min,r=+e.max;let o=0,i=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(o=n.length?Math.min(...n):Number.NaN,i=r.length?Math.max(...r):Number.NaN,isNaN(o)||isNaN(i))o=-1,i=1;else if(o===i&&0===o)o=-1,i=1;else if(o===i&&o)o-=Math.abs(.1*o),i+=Math.abs(.1*i);else if(!isNaN(e.expand)){const t=i-o;o-=t*e.expand,i+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));o=Math.min(...t,o),i=Math.max(...t,i)}}return{mini:isNaN(n)?o:n,maxi:isNaN(r)?i:r}}(a,t?t.fields:[]);return l.domain([u,c]),l.range(a.invert?[1,0]:[0,1]),o.invert=a.invert,l}const QX={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function ZX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=UX(e,QX,n),o=t.items||[],i={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>o[i[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,o=t.labels?t.labels():n,i=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+i/2,label:"".concat(o[n]),data:r?r[n]:void 0,start:a,end:a+i}}))}(t,n.trackBy)}}const u=LK();l(u,e),u.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return u;const o=u.domain().length,i=Math.max(1,o-u.paddingInner()+2*u.paddingOuter());if(i*n>=t)return u;const a=u.copy();a.type=u.type,l(a,e);const s=i*n/t,c=(1-s)*u.align();return a.range(r.invert?[s+c,c]:[c,s+c]),a};const c="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<o.length;e++){const t=EW({datum:o[e]},n),r=c(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),i[r]=e)}return u.domain(a),u.range(r.invert?r.range.slice().reverse():r.range),u.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||u.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||u.paddingOuter(r.paddingOuter),u.align(isNaN(r.align)?.5:r.align),u}const eJ={depth:0};function tJ(e,t,n){return e.ancestors().map((e=>t(EW({datum:e.data},n)))).reverse().slice(1).toString()}const nJ=e=>e.min(),rJ=e=>e.max();function oJ(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let o=n?+e.min:0,i=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(nJ).filter(DW);o=e.length?Math.min(...e):o}if(!r){const e=t.map(rJ).filter(DW);i=e.length?Math.max(...e):i}}return[o,i]}const iJ={domain:[],range:[],invert:!1,min:NaN,max:NaN};function aJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=JX(e,t,n).clamp(!0).interpolate(gX),o=UX(e,iJ,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length,s=r;EW(!0,s,r);const[l,u]=oJ(o,t?t.fields:[]),c=i?o.domain.length:-1,d=n.theme?n.theme.palette("sequential",c>0?c:2):[],p=a?o.range:d;return s.range(o.invert?p.slice().reverse():p.slice()),s.domain(i?o.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const o=[],i=(n-t)/(r-1);o.push(t);for(let e=1;e<r-1;e++)o.push(t+i*e);return o.push(n),o}(s.range(),l,u)),s}const sJ={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function lJ(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const uJ={domain:[],range:[]};const cJ={domain:[],range:[],unknown:void 0},dJ={domain:[],range:[],override:!1};const pJ=HU();function fJ(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const o=_K(r,t,n);let i,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(o);return"color"===a&&(a=o.fields&&o.fields[0]&&"dimension"===o.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(i=n.scale.get(a),i=i(e,o,{theme:n.theme,logger:n.logger}),i.type=a),i}pJ("linear",JX),pJ("band",ZX),pJ("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={data:n,resources:r},i=UX(t,QX,o);i.ticks=UX(t.ticks,eJ,o),i.value="function"==typeof t.value?t.value:e=>e.datum.value,i.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=ZX(i);const{values:s,labels:l,items:u,ticks:c}=function(e,t,n){const r=t.ticks.depth,o=t.value,i=t.label,a=[],s=[],l={},u=[];let c=0;if(!e)return{values:a,labels:s,items:l,ticks:u};e.eachAfter((e=>{if(e.depth>0){const t=tJ(e,o,n),d=e.leaves()||[e],p=o(EW({datum:e.data},n)),f=i(EW({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:f,leftEdge:tJ(d[0],o,n),rightEdge:tJ(d[Math.max(d.length-1,0)],o,n),node:e};h?(a.push("SPACER_".concat(c,"_SPACER")),c++):(a.push(t),s.push(f)),(r<=0&&!h||e.depth===r)&&u.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:u}}(n.root,i,o),d=function(e){const t=String(e),n=u[t];return a(n?i.invert?n.rightEdge:n.leftEdge:t)};EW(!0,d,a),d.bandwidth=function(e){const t=u[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=u[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=u[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>c.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),pJ("sequential-color",aJ),pJ("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=NX(),o=UX(e,sJ,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length;function s(e){return PW(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[u,c]=oJ(o,l),d=i?o.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let f=a?o.range:p,h=[];return h=i?o.domain:o.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),o=OX().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return o;const i=Math.max(0,e.length-1);for(;o.length>i;)o[0]-t<=n-o[o.length-1]?o.shift():o.pop();return o}(f,u,c):[u+(c-u)/2],f.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const o=[],i=(n-t)/r;for(let e=1;e<r;e++)o.push(t+i*e);return o}(f,u,c):f.length<h.length+1&&(f=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const o=aJ().domain([n,r]).range(t);return[n,...lJ(e),r].map((e=>o(e)))}(h,f,u,c)),s.data=()=>t,s.range(o.invert?f.slice().reverse():f),s.domain(h),s})),pJ("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=PK(),o={data:t,resources:n},i=UX(e,uJ,o),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],u={},c=[],d=[];for(let e=0;e<l.length;e++){const t=EW({datum:l[e]},o),n=a(t,e);-1===c.indexOf(n)&&(c.push(n),d.push(s(t,e)),u[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[c.indexOf(e)],r.datum=e=>l[u[e]],r.range(i.range),Array.isArray(i.domain)&&i.domain.length?r.domain(i.domain):r.domain(c),r}(e,t,n),o=n.theme,i=UX(e,cJ,{data:t,resources:n});let a;if(i.explicit=UX(e.explicit,dJ,{data:t,resources:n}),a=Array.isArray(i.range)&&0!==i.range.length?i.range.slice():o?o.palette("categorical",r.domain().length).slice():[],i.unknown)r.unknown(i.unknown);else if(o&&o.palette("unknown")){let e=o.palette("unknown");r.unknown(e[0])}if(Array.isArray(i.explicit.domain)&&i.explicit.domain.length){const e=r.domain().slice(),t=i.explicit.domain,n=Array.isArray(i.explicit.range)?i.explicit.range:[],o=Math.floor(e.length/a.length);for(let e=1;e<o+1;e*=2)a=a.concat(a);if(i.explicit.override)for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);o>-1&&(a[o]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var hJ={};function mJ(){mJ.init.call(this)}hJ.isObject=function(e){return"object"==typeof e&&null!==e},hJ.isNumber=function(e){return"number"==typeof e},hJ.isUndefined=function(e){return void 0===e},hJ.isFunction=function(e){return"function"==typeof e};var gJ=mJ;mJ.EventEmitter=mJ,mJ.prototype._events=void 0,mJ.prototype._maxListeners=void 0,mJ.defaultMaxListeners=10,mJ.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},mJ.prototype.setMaxListeners=function(e){if(!hJ.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},mJ.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],hJ.isUndefined(n))return!1;if(hJ.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(hJ.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},mJ.prototype.addListener=function(e,t){var n;if(!hJ.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,hJ.isFunction(t.listener)?t.listener:t),this._events[e]?hJ.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,hJ.isObject(this._events[e])&&!this._events[e].warned)&&((n=hJ.isUndefined(this._maxListeners)?mJ.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,hJ.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),hJ.isFunction(console.trace)&&console.trace()));return this},mJ.prototype.on=mJ.prototype.addListener,mJ.prototype.once=function(e,t){if(!hJ.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},mJ.prototype.removeListener=function(e,t){var n,r,o,i;if(!hJ.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||hJ.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(hJ.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},mJ.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],hJ.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},mJ.prototype.listeners=function(e){return this._events&&this._events[e]?hJ.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},mJ.listenerCount=function(e,t){return e._events&&e._events[t]?hJ.isFunction(e._events[t])?1:e._events[t].length:0};var yJ={mixin:e=>(Object.keys(gJ.prototype).forEach((t=>{e[t]=gJ.prototype[t]})),gJ.init(e),e)};function bJ(){let e=0,t=0,n=0,r=0;n=n||e;const o={move(e){this.moveTo(n+e)},moveTo(i){const a=Math.max(e,Math.min(t-r,i));n!==a&&(n=a,o.emit("update"))},update(i){let a=!1;({min:e=e,max:t=t}=i),void 0!==i.viewSize&&i.viewSize!==r&&(r=i.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&o.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return yJ.mixin(o),o}function vJ(e,t){const n=e.min||0,r=e.max||0,o=e.viewSize||0,i=t||bJ();return i.update({min:n,max:r,viewSize:o}),i}function xJ(e,t){return e<=t}function SJ(e,t){return e<t}function wJ(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function CJ(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function o(){}return o.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:o=!0}=n;e=r?xJ:SJ,t=o?xJ:SJ},o.add=e=>{let{min:t,max:n}=e;const o=wJ(r,t),i=wJ(r,n,!0),a=[o,i-o];o%2==0&&a.push(t),i%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.remove=e=>{let{min:t,max:n}=e;const o=wJ(r,t),i=wJ(r,n,!0),a=[o,i-o];o%2==1&&a.push(t),i%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(o.add):o.add(e);return t!==r.join(",")},o.clear=()=>{const e=r.length>0;return r=[],e},o.containsValue=n=>function(e,t,n,r){const o=e.length;for(let i=1;i<o;i+=2)if(n(e[i-1],t)&&r(t,e[i]))return!0;return!1}(r,n,t,e),o.containsRange=e=>{let{min:t,max:n}=e;const o=wJ(r,t,!0),i=wJ(r,n);return o===i&&i%2==1},o.toggle=e=>o.containsRange(e)?o.remove(e):o.add(e),o.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},o.configure(n),o}function EJ(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const kJ={key:void 0,includeMin:!0,includeMax:!0};function RJ(e){let{items:t,collection:n,vc:r}=e;const o={},i=[];let a,s;for(let e=0,i=t.length;e<i;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(o[a]=o[a]||[],o[a].push(s[e]))}const l=Object.keys(o);for(let e=0,t=l.length;e<t;e++)a=l[e],i.push({id:a,values:o[a]});return i}function _J(e){let{items:t,collection:n}=e;const r={},o=[];let i,a;for(let e=0,o=t.length;e<o;e++)if(i=t[e].key,n[i]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[i].remove(a[e])&&(r[i]=r[i]||[],r[i].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)i=s[e],o.push({id:i,values:r[i]});return o}function MJ(e){const t={};let n,r;for(let o=0,i=e.length;o<i;o++){n=e[o].key,r=e[o].values||[e[o].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function AJ(e){let{key:t,collection:n,obj:r,fn:o,value:i}=e;n[t]||(n[t]=o()),r[t]=r[t]||[],r[t].push(i),n[t].add(i)}function DJ(e,t){const n=[],r=Object.keys(e);let o,i;const a=e=>-1===t[o].indexOf(e);for(let s=0,l=r.length;s<l;s++)o=r[s],t[o]?(i=e[o].filter(a),i.length&&n.push({id:o,values:i})):n.push({id:o,values:e[o]});return n}function PJ(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let o=0;o<n;o++)r[o]=e[o].key in t?EW({},e[o],{key:t[e[o].key]}):e[o];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function LJ(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function IJ(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function qJ(e,t,n){let{ranges:r,interceptors:o,rc:i,aliases:a,rangeConfig:s}=n;const l=PJ(o["".concat(t,"Ranges")],e,a);let u=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=i(s.sources[n]||s.default)),"set"===t)u=r[n][t](e.ranges||e.range)||u;else{const o=e.ranges||[e.range];for(let e=0;e<o.length;e++)u=r[n][t](o[e])||u}})),u}function TJ(){let{vc:e=EJ,rc:t=CJ}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},o={},i={},a={sources:{},default:EW({},kJ)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(o).forEach((t=>{e.values[t]=o[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},u={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},c={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:EW({},kJ)},e.ranges.forEach((e=>{const t={};Object.keys(kJ).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:kJ[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),c.emit("update",[],[]))},link:e=>{if(c===e)throw new Error("Can't link to self");u.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{o[n]&&e.values[n].join(";")===o[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(o).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&c.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&c.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];c.emit("start",...t),u.start()}},end:function(){if(n){n=!1,r={},o={};for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];c.emit("end",...t),u.end()}},isActive:()=>n,clear:()=>{const e=c.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},o={},t&&(c.emit("update",[],e),u.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(o).map((e=>({type:"value",id:e,brush:o[e]})))),e},addValue:(e,t)=>{c.addValues([{key:e,value:t}])},addValues:t=>{const r=PJ(s.addValues,t,i),a=RJ({vc:e,collection:o,items:r});c.emit("add-values",r),a.length&&(n||(n=!0,c.emit("start")),c.emit("update",a,[]),u.updateValues())}};return c.setValues=t=>{const r=PJ(s.setValues,t,i),a=function(e){let{items:t,vCollection:n,vc:r}=e;const o={},i=MJ(t);let a,s=[],l=[];const u={},c=Object.keys(n);for(let e=0,t=c.length;e<t;e++)a=c[e],u[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||AJ({key:a,value:e,collection:n,obj:o,fn:r})},p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)a=p[e],i[a].forEach(d);return l=DJ(u,o),s=DJ(o,u),[s,l]}({items:r,vCollection:o,vc:e});c.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,c.emit("start")),c.emit("update",a[0],a[1]),u.updateValues())},c.removeValue=(e,t)=>{c.removeValues([{key:e,value:t}])},c.removeValues=e=>{const t=PJ(s.removeValues,e,i),n=_J({collection:o,items:t});c.emit("remove-values",t),n.length&&(c.emit("update",[],n),u.updateValues())},c.addAndRemoveValues=(t,r)=>{const a=PJ(s.addValues,t,i),l=PJ(s.removeValues,r,i),d=RJ({vc:e,collection:o,items:a}),p=_J({collection:o,items:l});c.emit("add-values",a),c.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,c.emit("start")),c.emit("update",d,p),u.updateValues())},c.toggleValue=(e,t)=>{c.toggleValues([{key:e,value:t}])},c.toggleValues=t=>{const r=PJ(s.toggleValues,t,i),a=function(e){let{items:t,values:n,vc:r}=e;const o={},i={},a=[],s=[],l=MJ(t);let u,c,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){u=p[e],d=l[u];for(let e=0,t=d.length;e<t;e++)c=d[e],n[u]&&n[u].contains(c)?n[u]&&n[u].contains(c)&&(i[u]=i[u]||[],i[u].push(c),n[u].remove(c)):AJ({key:u,value:c,collection:n,obj:o,fn:r})}const f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)u=f[e],a.push({id:u,values:o[u]});const h=Object.keys(i);for(let e=0,t=h.length;e<t;e++)u=h[e],s.push({id:u,values:i[u]});return[a,s]}({items:r,values:o,vc:e});c.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,c.emit("start")),c.emit("update",a[0],a[1]),u.updateValues())},c.containsValue=(e,t)=>{let n=i[e]||e;return!!o[n]&&o[n].contains(t)},c.addRange=(e,t)=>{c.addRanges([{key:e,range:t}])},c.addRanges=e=>{qJ(e,"add",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.removeRange=(e,t)=>{c.removeRanges([{key:e,range:t}])},c.removeRanges=e=>{qJ(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.setRange=(e,t)=>{c.setRanges([{key:e,range:t}])},c.setRanges=e=>{qJ(e,"set",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.toggleRange=(e,t)=>{c.toggleRanges([{key:e,range:t}])},c.toggleRanges=e=>{qJ(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,c.emit("start")),c.emit("update",[],[]),u.updateRanges())},c.containsRangeValue=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsValue(t)},c.containsRange=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsRange(t)},c.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,u,c,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)u=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;u=e[l],a[t]={key:l,i:t,bool:!1}}c=u.source&&u.source.field,void 0!==c&&(void 0!==u.source.key&&(c="".concat(u.source.key,"/").concat(c)),c in i&&(c=i[c]),d=u.value,r[c]?a[t].bool=Array.isArray(d)?r[c].containsRange({min:d[0],max:d[1]}):r[c].containsValue(d):o[c]&&o[c].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},c.intercept=(e,t)=>{const n=LJ(e);s[n]&&s[n].push(t)},c.removeInterceptor=(e,t)=>{const n=LJ(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},c.removeAllInterceptors=e=>{const t=[];if(e){const n=LJ(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:IJ(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>c.removeInterceptor(e.name,t)))}))},c.addKeyAlias=(e,t)=>{i[e]=t},c.removeKeyAlias=e=>{delete i[e]},yJ.mixin(c),c}function OJ(e){return e*e*e}function NJ(e){return--e*e*e+1}function zJ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}HU();const FJ=["stroke","fill","color","backgroundColor","thumbColor"];function jJ(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n);let a;for(a=0;a<r;++a)o[a]=HJ(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(e){for(a=0;a<r;++a)i[a]=o[a](e);return i}}function HJ(e,t,n){const r=typeof t;let o;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?xX:"string"===r?(o=JK(t))&&FJ.includes(n)?(t=o,gX):EX:t instanceof JK?gX:t instanceof Date?vX:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?yX:Array.isArray(t)?jJ:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?BJ:xX)(e,t)}function BJ(e,t){const n={},r={};let o;for(o in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)o in e?n[o]=HJ(e[o],t[o],o):r[o]=t[o];return function(e){for(o in n)r[o]=n[o](e);return r}}function $J(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const VJ={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},WJ=/^\$/;function UJ(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function GJ(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function YJ(e,t){return e.pxScale?e.pxScale(t):e}const KJ={normalizeSettings:function(e,t,n){const r=EW({},e),o=EW({},t);return Object.keys(r).forEach((e=>{o[e]={};const i=r[e],a=typeof i;if("function"==typeof i)o[e].fn=i;else if(UJ(i)){let n=t[e];"string"==typeof n&&WJ.test(n)&&(n=VJ[n]);const r=typeof n;o[e]="undefined"===r||r===a?i:n}else i&&"object"==typeof i&&("function"==typeof i.fn&&(o[e].fn=i.fn),void 0!==i.scale&&(o[e].scale=n.scale(i.scale)),"string"==typeof i.ref&&(o[e].ref=i.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&WJ.test(n)?o[e]=VJ[n]:o[e]=n})),o},resolveForItem:function(e,t,n){const r={},o=Object.keys(t),i=o.length,a=e.datum,s=e.datum;for(let l=0;l<i;l++){const i=o[l],u=t[i],c="object"==typeof s&&void 0!==u,d=c&&"string"==typeof u.ref,p=c&&i in s,f=d?s[u.ref]:p?s[i]:a;UJ(u)?r[i]=u:c&&u.fn?(u.scale&&(e.scale=u.scale),r[i]=u.fn.call(null,e,n)):c&&u.scale&&f?(r[i]=u.scale(f.value),u.scale.bandwidth&&(r[i]+=u.scale.bandwidth()/2)):d&&f?r[i]=f.value:u.fn?r[i]=u.fn.call(null,e,n):r[i]=u}return r},updateScaleSize:GJ};function XJ(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...XJ(t.children)),e):(e.push(t),e)),[])}function JJ(e,t){let{context:n,data:r,style:o,filter:i,mode:a}=t;const s=e.chart.brush(n),l=r,u=o.active||{},c=o.inactive||{},d=[];Object.keys(u).forEach((e=>{d.push(e)})),Object.keys(c).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let f=!1;const h=()=>{let t=XJ(e.nodes);return"function"==typeof i&&(t=t.filter(i)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const o="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,o,a),i=p.indexOf(e[r]);let l=!1;t&&-1===i?(p.push(e[r]),l=!0):t||-1===i||(p.splice(i,1),l=!0),e[r].needToUpdate=l||f,e[r].isActive=t}for(let o=0;o<t;o++)if(n=e[o].data,n){if(e[o].needToUpdate){const t=EW({},e[o],e[o].__style),n=e[o].isActive;d.forEach((r=>{e[o][r]=n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:!n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:e[o].__style[r]})),r=!0}delete e[o].needToUpdate}return f=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),o=r.length;for(let e=0;e<o;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in c&&(r[e][t]="function"==typeof c[t]?c[t].call(null,r[e]):c[t])})));f=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),o=r.length;for(let e=0;e<o;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{p.length=0,f=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function QJ(e){let{nodes:t,action:n,chart:r,trigger:o}=e;const i=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&i.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:o}=e;if(!o)return;const i=o.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&i.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}o.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:i,action:n,chart:r,trigger:o})}function ZJ(e){let{collisions:t,t:n,config:r,action:o}=e,i=[],a=!1;t.length>0&&(i=t,a=!0,"stop"===n.propagation&&(i=[t[t.length-1]]));const s=i.map((e=>e.node));return QJ({nodes:s,action:o,chart:r.chart,data:r.data,trigger:n}),a}function eQ(e,t,n){const r=n.element().getBoundingClientRect();let o=AW(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===o||o.x<0||o.y<0||o.x>r.width||o.y>r.height?[]:(t.touchRadius>0&&AW(e)?o={cx:o.x,cy:o.y,r:t.touchRadius}:t.mouseRadius>0&&!AW(e)&&(o={cx:o.x,cy:o.y,r:t.mouseRadius}),n.itemsAt(o))}function tQ(e,t,n){return e?"function"==typeof e?e(t):e:n}const nQ={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function rQ(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function oQ(e,t,n,r){const o=n/2,i=e-r/2,a=t-r/2,s=e-o,l=t-o;return[{x:i,y:a},{x:i,y:l},{x:i+r,y:l},{x:i+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:i+r,y:a+r},{x:i+r,y:l+n},{x:i,y:l+n},{x:i,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function iQ(e){return-e/180*Math.PI}function aQ(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),o=n*Math.sin(e);return{x1:r<0?1:0,y1:o<0?1:0,x2:r>=0?r:r+1,y2:o>=0?o:o+1}}(iQ(e))}function sQ(e,t){return{x:e.x+t.x,y:e.y+t.y}}function lQ(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uQ(e,t){return{x:e.x*t,y:e.y*t}}function cQ(e,t){return e.x-t.x}function dQ(e,t){return e.y-t.y}function pQ(e,t){return cQ(e,t)**2+dQ(e,t)**2}function fQ(e,t){return Math.sqrt(pQ(e,t))}function hQ(e,t){return e.x*t.x+e.y*t.y}function mQ(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),o=Math.sin(t),i=lQ(e,n);return sQ({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}const gQ={up:0,down:180,left:90,right:-90};function yQ(e){let{x:t,y:n,size:r}=e;const o=r/2;return{type:"rect",x:t-o,y:n-o,width:r,height:r}}const bQ=HU();bQ.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),bQ.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:rQ([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),bQ.add("saltire",(function(e){const t=iQ(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,o=Math.min(r,n);let i=e.size;const a=Math.sin(Math.asin(-t))*(o/2);i+=2*(n/Math.sin(-t)-n),i-=2*a;const s={x:e.x,y:e.y},l=oQ(e.x,e.y,i,o).map((e=>mQ(e,t,s)));return{type:"path",fill:"black",d:rQ(l)}})),bQ.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),bQ.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=gQ[e.direction]||0,o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];const l=iQ(r);return s=s.map((e=>mQ(e,l,n))),{type:"path",fill:"black",d:rQ(s)}})),bQ.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,o=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:o-(t?n:0),x2:r+(t?0:n),y2:o+(t?n:0),collider:yQ(e)}})),bQ.add("star",(function(e){const t=e.size,n=[],r=t/2,o=e.points||5,i=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/o;for(let t=1;t<=o;t++){const o=s*t+a,l=iQ(o),u=iQ(o+s/2),c=Math.sin(l),d=Math.cos(l),p=Math.sin(u),f=Math.cos(u);n.push({x:e.x+d*r,y:e.y+c*r}),n.push({x:e.x+f*i,y:e.y+p*i})}return{type:"path",fill:"black",d:rQ(n)}})),bQ.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),o=360/r,i=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=iQ(o*a+i),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:rQ(t)}})),bQ.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,o=isNaN(e.width)?r/2:e.width,i=Math.min(o,r);return{type:"path",fill:"black",d:rQ(oQ(t,n,e.size,i))}})),bQ.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,o=r/2/2;let i=[{x:t.x-r,y:t.y+o},{x:t.x-r,y:t.y-o},{x:t.x+r,y:t.y-o},{x:t.x+r,y:t.y+o}];if(n){const e=iQ(90);i=i.map((n=>mQ(n,e,t)))}const a=TW(i);return a.type="rect",a.fill="black",a})),bQ.add("rect",(function(e){const{x:t,y:n,size:r}=e,o=void 0===e.width?r:e.width,i=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-o/2,y:n-i/2,width:o,height:i}}));const vQ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bQ;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==nQ[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function xQ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:o=0,preferredSize:i=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:o}=e;return"function"==typeof i?i({inner:n,outer:r,children:o,dock:this.dock()},t):i},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function SQ(e,t,n){const{require:r=[]}=t,o=t.mediator||{},{settings:i,formatter:a,scale:s,data:l,renderer:u,chart:c,dockConfig:d,mediator:p,instance:f,rect:h,style:m,registries:g,resolver:y,update:b,_DO_NOT_USE_getInfo:v,symbol:x,isVisible:S}=n;e.emit=()=>{},S&&(e.isVisible=S),Object.defineProperty(e,"settings",{get:i}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),v&&(e._DO_NOT_USE_getInfo=v),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:u}):"chart"===t?Object.defineProperty(e,"chart",{get:c}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:f}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(o).forEach((t=>{e.mediator.on(t,o[t].bind(e))}))}function wQ(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,o={};return o.displayOrder=r("displayOrder"),o.dock=r("dock"),o.prioOrder=r("prioOrder"),o.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==o.displayOrder?o.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==o.prioOrder?o.prioOrder:e.layout.prioOrder,e.layout.dock=o.dock||e.layout.dock,e.layout.minimumLayoutMode=o.minimumLayoutMode||e.layout.minimumLayoutMode,o.show=e.show,o.preferredSize=t,o}function CQ(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const o=n.on[r].bind(e);e.eventListeners.push({event:r,listener:o}),t.on(r,o)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.emit(e,...r)}}function EQ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:o,container:i,mediator:a,registries:s,theme:l,renderer:u}=t,c=yJ.mixin({});let d,p,f,h,m,g=t.settings||{},y=EW(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:KJ,n={};return{resolve:function(r){let{data:o,settings:i,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(i,a,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const c=[];if(!o||!Array.isArray(o.items)){const e={data:o,resources:u};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,i=o.items.length;r<i;r++){e={datum:o.items[r],data:o,resources:u};let i=t.resolveForItem(e,n.norm,r);i.data=o.items[r],c.push(i)}}return{settings:n.norm,items:c}}}}({chart:o}),x=!1;const S={nodes:[],chart:o,config:y.brush||{},renderer:null},w={tap:[],over:[]},C=[],E={},k=EW({},g);function R(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const o=void 0!==e[t],i=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return o&&("function"==typeof e[t]?a=e[t].call(E,...l):r&&(a=e[t])),i&&("function"==typeof g[t]?a=g[t].call(k,...l):r&&(a=g[t])),o||i||(a=n.call(E,...l)),a}}const _=R("preferredSize",(()=>0),!0),M=R("resize",(e=>{let{inner:t}=e;return t})),A=R("created"),D=R("beforeMount"),P=R("mounted"),L=R("beforeUnmount"),I=R("beforeUpdate"),q=R("updated"),T=R("beforeRender"),O=R("beforeDestroy"),N=R("destroyed"),z=e.render,F=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&C.push(JJ(S,e))}))},j=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?w.over.push(e):w.tap.push(e)}))};Object.defineProperty(S,"data",{get:()=>b});const H=y.renderer||e.renderer,B=H?u||s.renderer(H)():u||s.renderer()();"function"==typeof B.settings&&B.settings(y.rendererSettings),S.renderer=B;const $={resources:o.logger?{logger:o.logger()}:{}};let V=xQ(wQ(y,_,o.logger()),$);const W=e=>{e.key=y.key,e.element=B.element()},U=()=>{};U.dockConfig=()=>V,U.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=EW(!0,{},n,e.settings),V=xQ(wQ(y,_,o.logger()),$),S.config=y.brush||{}),y.scale&&(d=o.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=_K(y.data,{dataset:o.dataset,collection:o.dataCollection},{logger:o.logger()},o.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=o.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},U.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=M({inner:e,outer:t});h=n?B.size(n):B.size(e),k.rect=EW(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=EW(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>k.rect;const G=()=>{const e=B.renderArgs?B.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=b;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&r&&(n=MW(MW({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?S.nodes=[...e||[]]:S.nodes&&(S.nodes=[...S.nodes,...e||[]]):S.nodes=e}U.beforeMount=D,U.beforeRender=()=>{T({size:h})},U.render=()=>{const e=z.call(E,...G());J(e),B.render(e),Y=e,K=k.rect.computed},U.hide=()=>{U.unmount(),B.size({x:0,y:0,width:0,height:0}),B.clear()},U.beforeUpdate=()=>{I({settings:y,data:b})},U.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return B.render(),void(Y=null);const r=z.call(E,...G());J(r),C.forEach((e=>e.cleanUp())),C.length=0,w.tap=[],w.over=[],t&&(F(),j()),C.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:k.rect.computed,previousRect:K}),X=function(e,t,n,r){let o,{old:i,current:a}=e,{renderer:s}=t,l=[],u={nodes:[],ips:[]},c={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],f=null;const h=n.trackBy||$J,m={start(){let e={};if(i.forEach(((t,n)=>{let r=h(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),o=r.map((e=>e.data.major.value)),i=n.filter((e=>o.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>i.includes(e.data.major.value))),s=r.filter((e=>i.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(BJ(EW({},e[r],{points:n.old}),EW({},t,{points:n.current}))),l.push(EW({},e[r],{commonPoints:n.old}))}else d.ips.push(BJ(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else u.nodes.push(t),u.ips.push(BJ(EW({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(c.nodes.push(e[t]),c.ips.push(BJ(e[t],EW({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:OJ,duration:200,tweens:c.ips,nodes:[...l]}),p.push({name:"updating",easing:zJ,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:NJ,duration:200,tweens:u.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,o=e?l.filter(e).length:l.length,{isInit:i,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===i?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===o),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===o)}p.length&&(f=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(o=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,i=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),i.push(...a),i.push(...e.nodes),s.render(i),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}o&&(o=window.requestAnimationFrame(m.tick))},stop(){o&&(window.cancelAnimationFrame(o),o=!1)},inProgress:()=>!!o,get targetScene(){return f}};return m}({old:Y,current:r},{renderer:B},n,o.storage),X.start()):B.render(r),Y=r,K=k.rect.computed,B.setKey&&"string"==typeof g.key&&B.setKey(g.key)},U.updated=q,U.destroy=()=>{U.unmount(),O(f),B.destroy(),N(),f=null};const Q=e=>{S.nodes=e,C.forEach((e=>{e.isActive()&&e.update()})),B.render(e)};return SQ(E,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>V,mediator:()=>a,instance:()=>k,rect:()=>k.rect,style:()=>m,update:()=>Q,registries:()=>s,resolver:()=>v,symbol:()=>vQ(s.symbol)}),SQ(k,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>V,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(E),isVisible:()=>x}),U.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const i=o.brush(e),a=B.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let o=0;o<a.length;o++){const s=a[o];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(W(s),r.push(s),a.splice(o,1),o--)}}))}return r},U.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:B).findShapes(e);for(let e=0,t=n.length;e<t;e++)W(n[e]);return n},U.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=B.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)W(r[e]);return r},U.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];QJ({nodes:e,action:t.action||"toggle",trigger:t,chart:o,data:S.data})},U.mount=()=>{f=B.element&&B.element()?f:B.appendTo(i),B.setKey&&"string"==typeof g.key&&B.setKey(g.key),y.brush&&(F(),j()),CQ(k,c,g),CQ(E,c,e),x=!0},U.mounted=()=>P(f),U.unmount=()=>{[k,E].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,c)})),w.tap=[],w.over=[],C.forEach((e=>{e.cleanUp()})),C.length=0,L(),x=!1},U.onBrushTap=e=>{w.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return ZJ({collisions:eQ(t,n,r.renderer),t:n,config:r,action:tQ(n.action,t,"toggle")})})({e:e,t:t,config:S})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},U.onBrushOver=e=>{w.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return ZJ({collisions:eQ(t,n,r.renderer),t:n,config:r,action:tQ(n.action,t,"set")})})({e:e,t:t,config:S})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},U.def=E,U.ctx=k,U.renderer=()=>B,U.set({settings:g}),A(),U}function kQ(e){const t=EW(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===o[t])return n;o=o[t]}return o}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===i[t]&&(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n?i[o]=n:delete i[o]}(t,e,n)};return n}function RQ(e,t,n){const r=sQ(function(e,t){const n=hQ(e,t)/hQ(t,t)||1;return{x:t.x*n,y:t.y*n}}(lQ(n,e),lQ(t,e)),e);return r}function _Q(e,t,n){return fQ(e,n)+fQ(t,n)-fQ(e,t)<1e-12}function MQ(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function AQ(e){return e.x1===e.x2&&e.y1===e.y2}function DQ(e){return e.width<=0||e.height<=0}function PQ(e){return e.r<=0}function LQ(e){return e.edges.length<=2}function IQ(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=jQ(e,OW(t.edges[r])),!0===n)return!0;return!1}function qQ(e,t){let n=!1;const{numPolygons:r,polygons:o}=t;for(let t=0;t<r;t++){if(n=KQ(e,o[t]),!0===n)return!0}return!1}function TQ(e,t){if(PQ(e))return!1;return pQ({x:e.cx,y:e.cy},t)<=e.r**2}function OQ(e,t){if(DQ(t)||PQ(e))return!1;const n=t.width/2,r=t.height/2,o=t.x+n,i=t.y+r,a=e.r,s=e.cx,l=e.cy,u=Math.abs(s-o),c=Math.abs(l-i);if(u>n+a||c>r+a)return!1;if(u<=n||c<=r)return!0;return(u-n)**2+(c-r)**2<=a**2}function NQ(e,t){if(PQ(e)||AQ(t))return!1;const[n,r]=IW(t);if(TQ(e,n)||TQ(e,r))return!0;const o={x:e.cx,y:e.cy},i=RQ(n,r,o);return pQ(i,o)<=e.r**2&&_Q(n,r,i)}function zQ(e,t){if(LQ(t)||PQ(e))return!1;if(FQ(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(NQ(e,OW(t.edges[r])))return!0}return!1}function FQ(e,t){if(LQ(e)||!VQ(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.vertices;let i,a,s,l,u;for(i=!1,l=-1,a=o.length,s=a-1;++l<a;s=l){if(o[l].x===n&&o[l].y===r)return!0;if(o[l].y===o[s].y&&o[l].y===r&&(n-o[l].x)*(n-o[s].x)<=0)return!0;if(o[l].y<r&&r<=o[s].y||o[s].y<r&&r<=o[l].y){if(u=(o[s].x-o[l].x)*(r-o[l].y)/(o[s].y-o[l].y)+o[l].x,n===u)return!0;n<u&&(i=!i)}}return i}function jQ(e,t){if(LQ(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(UQ(t,OW(e.edges[n])))return!0}const[n,r]=IW(t);return FQ(e,n)||FQ(e,r)}function HQ(e,t){if(LQ(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(WQ(t,OW(e.edges[n])))return!0}const[n,r,o,i]=qW(t);return FQ(e,n)||FQ(e,r)||FQ(e,o)||FQ(e,i)}function BQ(e,t){return!DQ(e)&&!DQ(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function $Q(e,t){if(DQ(e)||DQ(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>VQ(e,t)))}function VQ(e,t){return!DQ(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function WQ(e,t){if(AQ(t)||DQ(e))return!1;const[n,r]=IW(t);if(VQ(e,n)||VQ(e,r))return!0;const o=qW(e);let i=o.length;for(let e=0;e<i;e++){if(UQ(OW([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function UQ(e,t){const[n,r]=IW(e),[o,i]=IW(t),a=cQ(r,n),s=dQ(r,n),l=cQ(i,o),u=dQ(i,o),c=cQ(n,o),d=dQ(n,o);let p=u*a-l*s;const f=l*d-u*c,h=a*d-s*c;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===u)return!1;if(0===p){if(0===f&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=dQ(o,n)/s,g=dQ(i,n)/s}else m=(o.x-n.x)/a,g=(i.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=f/p;return p=h/p,y>=0&&y<=1&&p>=0&&p<=1}function GQ(e,t){if(AQ(e))return!1;const[n,r]=IW(e);return _Q(n,r,t)}function YQ(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!BQ(n,r)&&($Q(n,r)?IQ(e,t):IQ(t,e))}function KQ(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!BQ(n,r)&&($Q(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++)if(n=YQ(t,o[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=QQ(e,OW(t.edges[r])),!0===n)return!0;return!1}(e,t))}function XQ(e,t){if(PQ(e))return!1;if(JQ(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],o=n.edges.length;for(let t=0;t<o;t++){if(NQ(e,OW(n.edges[t])))return!0}}return!1}function JQ(e,t){if(!VQ(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.numPolygons;let i,a,s,l,u,c,d=!1;for(a=0;a<o;a++)for(i=e.vertices[a],u=-1,s=i.length,l=s-1;++u<s;l=u){if(i[u].x===n&&i[u].y===r)return!0;if(i[u].y===i[l].y&&i[u].y===r&&(n-i[u].x)*(n-i[l].x)<=0)return!0;if(i[u].y<r&&r<=i[l].y||i[l].y<r&&r<=i[u].y){if(c=(i[l].x-i[u].x)*(r-i[u].y)/(i[l].y-i[u].y)+i[u].x,n===c)return!0;n<c&&(d=!d)}}return d}function QQ(e,t){const[n,r]=IW(t);if(JQ(e,n)||JQ(e,r))return!0;const{numPolygons:o,polygons:i}=e;for(let e=0;e<o;e++){const n=i[e];for(let e=0,r=n.edges.length;e<r;e++){if(UQ(t,OW(n.edges[e])))return!0}}return!1}function ZQ(e,t){const[n,r,o,i]=qW(t);if(JQ(e,n)||JQ(e,r)||JQ(e,o)||JQ(e,i))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(WQ(t,OW(n.edges[e])))return!0}}return!1}const eZ=/^\$/,tZ="@extend";function nZ(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function rZ(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&nZ(e),eZ.test(r)?(n.push(e),rZ(r,t,n)):r}let r=e;const o=EW(!0,{},t,e),i={};if(e[tZ]){const i=e[tZ];-1!==n.indexOf(i)&&nZ(i);let a=n.slice();a.push(i),r=EW(!0,{},rZ(o[i],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===tZ||eZ.test(e))return;i[e]=r[e];let a=i[e];eZ.test(a)&&a in o?(-1!==n.indexOf(a)&&nZ(a),t.push(a),a=o[a],"object"==typeof a||eZ.test(a)&&a in o?i[e]=rZ(a,o,t):i[e]=a):"object"==typeof a&&(i[e]=rZ(a,o,t))})),i}function oZ(e,t){return rZ(e,t,[])}function iZ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},o={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const o=r.sizes;for(let e=0;e<o.length;e++)if(n<=o[e])return r.colors[e];return r.colors[o.length-1]})(e,n),setPalettes:r,style:e=>oZ(e,n),setStyle:t=>{n=EW({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}function aZ(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function sZ(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return EW(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function lZ(e,t,n,r,o){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(o)?0:o}}function uZ(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let o,i=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(i)?i&&!isNaN(i.size)&&(i.width=i.size,i.height=i.size):i={width:i,height:i},o="top"===r||"bottom"===r?i.height:"right"===r||"left"===r?i.width:Math.max(i.width,i.height),e.cachedSize=Math.ceil(o),e.edgeBleed=i.edgeBleed||0}return e.cachedSize}function cZ(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function dZ(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function pZ(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const o=e.height-(t.y+t.height);o<n.bottom&&(t.height-=n.bottom-o)}function fZ(e,t,n,r,o){const i=EW({},t),a=EW({},n);cZ(i,r),dZ(a,r),pZ(e,i,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),o=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=o}(e,i,o);return!!s&&(cZ(t,r),dZ(n,r),!0)}function hZ(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function mZ(e){return TW([].concat(...e.map(qW)))}function gZ(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:o,translation:i}=e;const a=lZ(r.x,r.y,r.width,r.height),s=lZ(r.x,r.y,r.width,r.height),l={},u=t.slice(),c=u.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?u.indexOf(e)-u.indexOf(t):n})).forEach((e=>{let t={},u={};switch(e.config.dock()){case"top":t.height=u.height=e.cachedSize,t.width=n.width,u.width=a.width,t.x=n.x,u.x=a.x,t.y=u.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,u.x=a.x,t.y=u.y=a.y+a.height,t.width=n.width,u.width=a.width,t.height=u.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=u.x=s.x-e.cachedSize,t.y=n.y,u.y=s.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=u.x=s.x+s.width,t.y=n.y,u.y=s.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=u.x=r.x,t.y=u.y=r.y,t.width=u.width=r.width,t.height=u.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=mZ(n.map((e=>e.outerRect))),u=mZ(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:u,outerRect:t}),function(e,t,n,r){const o={x:r.width/n.width,y:r.height/n.height},i={left:0,top:0};if(n.preserveAspectRatio){const e=o.x<o.y,t=Math.min(o.x,o.y);o.x=t,o.y=t;const a=e?"height":"width",s=(r[a]-n[a]*o.x)*n.align;i.left=e?0:s,i.top=e?s:0}e.scaleRatio=o,e.margin=i,t.scaleRatio=o,t.margin=i,n.scaleRatio=o,n.margin=i}(u,t,n,o),u.edgeBleed=e.edgeBleed,u.computed=hZ(u),t.edgeBleed=e.edgeBleed,t.computed=hZ(t),u.x+=i.x,u.y+=i.y,t.x+=i.x,t.y+=i.y,e.comp.resize(u,t),e.cachedSize=void 0,e.edgeBleed=void 0})),c}function yZ(e,t,n){const r=e.layoutModes||{},o=t.minimumLayoutMode();let i=t.show();return i&&"object"==typeof o?i=r[o.width]&&r[o.height]&&n.width>=r[o.width].width&&n.height>=r[o.height].height:i&&void 0!==o&&(i=r[o]&&n.width>=r[o].width&&n.height>=r[o].height),i}function bZ(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function vZ(e){let t=sZ(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:o}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),aZ(r),aZ(n),{logicalContainerRect:r,containerRect:n}}(e,t),[i,a]=function(e,t,n){const r=[],o=[];for(let i=0;i<e.length;++i){const a=e[i];bZ(a);let s=a.dockConfig;const l=a.key,u=s.dock(),c=/@/.test(u)?u.split(",").map((e=>e.replace(/^\s*@/,""))):[];yZ(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:c}):o.push({comp:a,key:l,config:s,referencedDocks:c})}return[r,o]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:o}=e;const i=lZ(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];uZ(n,i,t),fZ(t,i,a,n,o)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const o=r.referencedDocks.every((e=>t.some((t=>t.key===e))));o&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),pZ(t,i,a),i}({layoutRect:r,visible:i,hidden:a,settings:t}),l=gZ({visible:i,layoutRect:r,reducedRect:s,containerRect:o,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=lZ();e.comp.resize(t,t)})),{visible:i.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=sZ(e)},n}const xZ=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},SZ=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(MW(MW({},n),{},{children:SZ(e.children)}))}})),wZ=(e,t)=>({visible:[],hidden:t,ordered:[]}),CZ=e=>(t,n)=>{var r;const o=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(MW(MW({},t),{},{children:SZ(e.children)}))}})),i=e=>n[e.index],{visible:a=o,hidden:s=[],ordered:l=a}=null!==(r=e(t,o))&&void 0!==r?r:{};return{visible:a.map(i),hidden:s.map(i),ordered:l.map(i)}},EZ=e=>"function"==typeof e?CZ(e):(e=>{const t=vZ(e);return CZ(((e,n)=>t.layout(e,n)))})(e);function kZ(e,t,n){const r=t.left-n.left,o=t.top-n.top,i=NW(e),a=EW(!0,{},e);switch(i){case"circle":a.cx+=r,a.cy+=o;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=o}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=o}}break;case"line":a.x1+=r,a.y1+=o,a.x2+=r,a.y2+=o;break;case"point":case"rect":a.x+=r,a.y+=o}return a}function RZ(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const o=e.children[Math.max(0,n)];if(r===o)return;const i=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==o?(e.insertBefore(r,o),i&&i.forEach((t=>{e.insertBefore(t,r)}))):(i&&i.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function _Z(e,t){let{element:n,data:r=[],settings:o={},on:i={}}=e;const a=t.registries,s=t.logger,l=iZ(t.style,t.palettes),u=[],c=EW({},e),d=function(){const e={};return yJ.mixin(e),e}();let p=[],f=null,h=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const S=function(e){let{createComponent:t}=e;const n={};let r=[],o=[];const i=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>i(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],o=t.find((e=>r.hasKey&&r.key===e.key));o?r.children&&o.components&&s(r.children,o.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:s}=e;return s.map((e=>{const s=xZ(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:o,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),s)):i(e)})).filter((e=>!!e))},u=e=>{let{components:t,hidden:n,layoutFn:r,ordered:o,rect:i,visible:a}=e;const{visible:s,hidden:l,ordered:c}=r(i,t);a.push(...s),n.push(...l),o.push(...c),s.forEach((e=>{if(e.children){var t,r;const i=EZ(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});u({components:e.children,hidden:n,layoutFn:i,ordered:o,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&u({components:e.children,hidden:n,layoutFn:wZ,ordered:o,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],o=[]},n.findComponentByKey=e=>xZ(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],i=[],a=[],s=EZ(t);return u({components:o,hidden:i,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:i,ordered:a}},n.set=e=>{let{components:t}=e;o=t.map((e=>i(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:i,scales:a}=e;s(o,t),o=l({compList:o,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:EQ(a.component(e.type),{settings:e,chart:c,mediator:d,registries:a,theme:l,container:n}),settings:EW(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function w(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let o;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=r?e[t].call(c,...a):n.call(c,...a),o}}const C=()=>{let e;o.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=o.dockLayout):e=o.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return S.layout({layoutSettings:e,rect:t})},E=w("created"),k=w("beforeMount"),R=w("mounted"),_=w("beforeUpdate"),M=w("updated"),A=w("beforeRender"),D=w("beforeDestroy"),P=w("destroyed"),L=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:o={},scroll:i={}}=t;y=function(e,t){let{types:n,logger:r}=t;const o={},i=[];return Array.isArray(e)?i.push(...e):(r.warn('Deprecated: "data-source" configuration"'),i.push(e)),i.forEach(((e,t)=>{let i=n(e.type);if(i){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=i({key:n,data:e.data,config:e.config});o[n]=a}})),e=>e?o[e]:o[Object.keys(o)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_K;const o={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");o[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in o))throw new Error("Unknown data collection: ".concat(t));"function"==typeof o[t]&&(o[t]=o[t]());let r=o[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=EW(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const u={theme:l,logger:s};f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fJ;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"scale"in i&&e[i.scale]&&(a=i.scale),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i,t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(o,{dataset:y,collection:b},MW(MW({},u),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:MK;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"formatter"in i&&e[i.formatter]?a=i.formatter:"object"==typeof i&&"type"in i&&e[i.type]&&(a=i.type),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i||{},t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(r,{dataset:y,collection:b},MW(MW({},u),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=vJ(e[r],t?t[r]:null));return n}(i,m)};function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(c,d,n);return r.set(e),r}))}const q=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,o="clientY"in e?e.clientY:e.y,i={x:r-t.left,y:o-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();VQ(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},i)&&a.push(e)})),a},T=()=>{if(u.length||!n)return;Object.keys(i).forEach((e=>{const t=i[e].bind(c);n.addEventListener(e,t),u.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=q(e)},r=t=>{const n=e.comps||q(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=AW(e),r=n?e.changedTouches[0]:e,o=Date.now()-t.time,i=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&i<=12&&a<=12&&o<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},o=[];o.push({key:"mousedown",listener:t}),o.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(o.push({key:"touchstart",listener:t}),o.push({key:"touchend",listener:r})),o.push({key:"mousemove",listener:e=>{const t=q(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),o.forEach((e=>{n.addEventListener(e.key,e.listener),u.push(e)}))},O=()=>{u.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),u.length=0},N=()=>{n.innerHTML="",(()=>{const{components:e=[]}=o;A(),L(r,o),S.set({components:e});const{visible:t,hidden:i,ordered:a}=C();p=t,i.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),RZ(n,a)})(),T(),I(o.interactions)};return c.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(o=e.settings,I(e.settings.interactions)),_(),L(r,o);const{formatters:n,scales:i,components:a=[]}=o;S.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:i}),S.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),S.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),C()},c.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:i=[]}=e;let a;e.data&&(r=e.data),e.settings&&(o=e.settings,I(e.settings.interactions)),_(),L(r,o,{partialData:t});const{formatters:s,scales:l,components:u=[]}=o;S.update({components:u,data:r,excludeFromUpdate:i,formatters:s,scales:l}),S.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),S.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const c=[],d=[];let f;if(t)S.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&c.push(e)})),f=c;else{const{visible:e,hidden:t,ordered:n}=C();p=e,f=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?c.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),f.forEach((e=>e.instance.beforeRender())),f.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||RZ(n,a),d.forEach((e=>e.instance.mounted())),c.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),M()},c.destroy=()=>{D(),S.destroy(),O(),I(),delete c.update,delete c.destroy,P()},c.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const i=r.instance.getBrushedShapes(e,t,n);o=[...o,...i]})),o},c.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},c.componentsFromPoint=e=>q(e).map((e=>e.instance.ctx)),c.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const o=n.getBoundingClientRect();let i=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));i=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=i.length-1;n>=0;n--){const a=i[n],s=kZ(e,o,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),u=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&u)return r}return r},c.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let o=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(o,t.components[n])}))}},c.scroll=function(){return function(e,t){return t[e]||(t[e]=bJ()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},c.dataset=e=>y(e),c.dataCollection=e=>b(e),c.scales=function(){return f.all()},c.formatters=function(){return h.all()},c.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return v[e]||(v[e]=TJ()),v[e]},c.scale=function(e){return f.get(e)},c.formatter=function(e){return h.get(e)},c.toggleBrushing=function(e){x=void 0!==e?e:!x},c.component=e=>{const t=S.findComponentByKey(e);return null==t?void 0:t.instance.ctx},c.logger=()=>s,c.theme=()=>l,c.storage=kQ({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(c,"interactions",{get:()=>({instances:g,on(){T(),g.forEach((e=>e.on()))},off(){O(),g.forEach((e=>e.off()))}})}),E(),n&&(k(),N(),R(n),c.element=n),c}const MZ=e=>{let t=HU(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var AZ=HU();function DZ(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}const PZ=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const LZ=e=>{let{key:t,data:n,cache:r,config:o}=e;if(!n)return;let i=n;"string"==typeof i&&(i=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),o=r[0],i=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(o){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(o&&i){if(n.test(o)&&n.test(i)&&o.split(n).length===i.split(n).length){a=n;break}}else n.test(o)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:o})),Array.isArray(i)&&function(e){let t,{source:n,data:r,cache:o,config:i}=e,a=r;const s=i&&i.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let u,c=t;c=s&&"function"==typeof s.fields?s.fields(c.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?u=c.map((()=>[])):(u={},c.forEach((e=>{u[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,c):a[e];if(t)if(Array.isArray(t))for(let e=0;e<c.length;e++)u[e].push(t[e]);else for(let e=0;e<c.length;e++)u[c[e].key].push(t[c[e].key])}const d=Array.isArray(u)?e=>u[e]:e=>u[c[e].key];for(let e=0;e<c.length;e++){const t=d(e),r=PZ(t),i=r.length>0,a=i?"measure":"dimension",s=i?Math.min(...r):NaN,l=i?Math.max(...r):NaN;o.fields.push(fK(EW({source:n,key:e,title:c[e].title,values:t,min:s,max:l,type:a},c[e]),{value:c[e].value,label:c[e].label}))}}({data:i,cache:r,source:t,config:o})};function IZ(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},o={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),o=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:i,main:a}=bK(e,t),s=Object.keys(i),l=!!e.trackBy,u=typeof e.trackBy,c={},d=[],p=n.items(),f=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=DZ(a,n,{key:o});s.forEach((e=>{const a=i[e];let s=a.field?a.field.items()[t]:n;r[e]=DZ(a,s,{key:o})})),l&&SK({cfg:e,itemData:n,obj:r,target:d,tracker:c,trackType:u}),f.push(r)}r=l?[...r,...xK(d,{main:a,propsArr:s,props:i})]:[...r,...f]}})),r}(e,o),hierarchy:()=>null};return LZ({key:e,data:t,config:n,cache:r}),o}IZ.util={normalizeConfig:bK,collect:xK,track:SK};const qZ=HU();qZ.default("matrix"),qZ("matrix",IZ),qZ("default",IZ);const TZ=HU();function OZ(e,t,n){return Math.max(e,Math.min(t,n))}function NZ(e){let{item:t,value:n,boxCenter:r,rendWidth:o,rendHeight:i,flipXY:a,symbol:s}=e,l="x",u="y",c=o,d=i,p=n<.5?90:-90;return a&&(l="y",u="x",c=i,d=o,p=n<.5?180:0),s(EW({},t.oob,{[l]:r*c,[u]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function zZ(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:o,rendHeight:i,flipXY:a}=e,s="x",l="y",u="width",c="height",d=o,p=i;a&&(s="y",l="x",u="height",c="width",d=i,p=o);const{actualDiff:f,actualLow:h}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:o=1}=e;const i=Math.max(t,n),a=Math.min(t,n),s=OZ(-.1,1.2,i),l=OZ(-.1,1.2,a),u=s*o-l*o,c=Math.max(r,u),d=(c-u)/2;return{actualDiff:c,startModifier:d,actualLow:l*o-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return EW({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[c]:f,[u]:n*d,data:t.data||{},collider:{type:null}})}function FZ(e){let{item:t,from:n,to:r,boxCenter:o,rendWidth:i,rendHeight:a,flipXY:s}=e,l="x1",u="y1",c="x2",d="y2",p=i,f=a;return s&&(l="y1",u="x1",c="y2",d="x2",p=a,f=i),EW({},t.line,{type:"line",[d]:Math.floor(n*f),[l]:o*p,[u]:Math.floor(r*f),[c]:o*p,data:t.data||{},collider:{type:null}})}function jZ(e){let{item:t,key:n,position:r,width:o,boxCenter:i,rendWidth:a,rendHeight:s,flipXY:l}=e,u="x1",c="y1",d="x2",p="y2",f=a,h=s;l&&(u="y1",c="x1",d="y2",p="x2",f=s,h=a);const m=o/2;return EW({type:"line"},t[n],{[c]:Math.floor(r*h),[u]:(i-m)*f,[p]:Math.floor(r*h),[d]:(i+m)*f,r:m*f,cx:i*f,cy:r*h,width:o*f,data:t.data||{},collider:{type:null}})}function HZ(e,t,n){const{width:r,maxWidthPx:o,minWidthPx:i}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(o)?n:o/n);return s=isNaN(i)?s:Math.max(i/n,s),s*a}TZ("native",(function(e,t,n){let r,o,i={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(i)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(i);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function u(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return o},set(e){!function(e){o=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),u(),s&&l()},off(){s=!1,u()},on(){s=!0,0===a.length&&l()},destroy(){u(),i=null,r=null}}}));const BZ={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},$Z=Object.keys(BZ),VZ={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,o="horizontal"===this.settings.settings.orientation,{style:i,resolver:a,symbol:s}=this,l=$Z.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),u={};l.forEach((e=>u[e]=BZ[e]));const c=function(e){let{keys:t,data:n,defaultSettings:r,style:o,settings:i,width:a,height:s,resolver:l}=e;const u=EW(!0,{},r||{},o||{}),c={major:"horizontal"===i.orientation?s:a,minor:"horizontal"===i.orientation?a:s},d=i.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:EW(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:EW(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):l.resolve({data:n,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{},h={};["start","end","min","max","med"].forEach((e=>{(f[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:f.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:EW(!0,{},h,f)})};for(let e=0,r=t.length;e<r;e++)i[m]&&!1===i[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:u[m],settings:i[m],scaled:c}));return g}({keys:l,data:t,defaultSettings:u,style:i,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=c,f=function(e){let{width:t,height:n,flipXY:r,resolved:o,keys:i,symbol:a}=e;const s=[],l=o.major.items;if(!l.length)return s;const u=t,c=n,d=r?n:t,p=o.major.settings,f=["start","end","min","max","med"].filter((e=>void 0!==o.minor.settings[e])),h=f.length,m=i.filter((e=>"oob"!==e));let g,y,b,v,x,S,w,C,E;const k=i?i.length:0,R=m?m.length:0,_={box:function(){b.box&&DW(b.start)&&DW(b.end)&&g.push(zZ({item:b,boxWidth:v,boxPadding:x,rendWidth:u,rendHeight:c,flipXY:r}))},line:function(){DW(b.min)&&DW(b.start)&&g.push(FZ({item:b,from:b.min,to:b.start,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r})),DW(b.max)&&DW(b.end)&&g.push(FZ({item:b,from:b.max,to:b.end,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r}))},median:function(){b.median&&DW(b.med)&&g.push(jZ({item:b,key:"median",position:b.med,width:v,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;DW(b.min)&&g.push(jZ({item:b,key:"whisker",position:b.min,width:e,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r})),DW(b.max)&&g.push(jZ({item:b,key:"whisker",position:b.max,width:e,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r}))}}};function M(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[f[r]],DW(e)&&(t<e&&(t=e),n>e&&(n=e));w=t<0&&t!==-Number.MAX_VALUE,C=n>1&&n!==Number.MAX_VALUE,E=w||C}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let f=null,h=null;void 0!==p.binStart?(f=t.binStart,h=t.binEnd,y=p.binStart.scale):(y=p.major.scale,f=y?t.major:0);let A=0;y?y.bandwidth?(A=y.bandwidth(),f-=A/2):A=h-f:A=1,b=EW({},{major:f,majorEnd:h},o.minor.items[e]);for(let t=0;t<k;t++)b[i[t]]=o[i[t]].items[e];if(v=HZ(A,b,d),x=(A-v)/2,S=x+b.major+v/2,M(),E)b.oob&&(w?g.push(NZ({item:b,value:0,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})):C&&g.push(NZ({item:b,value:1,boxCenter:S,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})));else for(let e=0;e<R;e++)b[m[e]]&&!1===b[m[e]].show||_[m[e]]();const D={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(D)}return s}({width:n,height:r,flipXY:o,resolved:c,keys:l,symbol:s});return f}};const WZ={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},UZ=/px$/,GZ={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},YZ={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function KZ(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function XZ(e,t,n,r){let{width:o,height:i}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=UZ.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);PW(a)&&(t=WZ,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=GZ.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),u=MW(MW({},l),{},{type:s,label:e.label,x:e.x*o,y:e.y*i,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(u.width=t.width);const c=r(u);return c.data=e.data,c}))}const JZ={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:EW({},GZ,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:o}=this.rect,i=EW({},YZ,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,o){const i=KZ(e?e.scale:void 0,n),a=KZ(t?t.scale:void 0,r);let s=Math.min(i.value*o[i.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*o[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(i.value*o[i.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*o[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:o.maxPx,minGlobal:o.minPx}}(n.settings.x,n.settings.y,r,o,i);return XZ(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const QZ={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function ZZ(e,t,n,r){let{x:o,y:i,width:a,height:s}=t;const l=cU(),u={x:o+a/2,y:i+s/2},c=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const o=n[t];o.type="path";const i=d*o.outerRadius,a=c*o.innerRadius,s=p*o.cornerRadius;l.innerRadius(a),l.outerRadius(i),l.cornerRadius(s),o.arcDatum=e;const f=l.centroid(e),h=o.offset?function(e,t,n,r){let[o,i]=e;const a=Math.sqrt(o*o+i*i);o/=a,i/=a;const s=n-r;return{x:o*t*s,y:i*t*s}}(f,o.offset,i,a):{x:0,y:0};return o.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(u.x,", ").concat(u.y,")"),o.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:i,cornerRadius:s,offset:{x:u.x+h.x,y:u.y+h.y}}},o}))}function e0(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const t0={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],o=this.settings.settings,{items:i}=this.resolver.resolve({data:t,defaults:EW({},QZ,this.style.slice),settings:o.slice});let a=0;for(let e=0,t=i.length;e<t;e++){const t=e0(o,i[e]);t>0&&i[e].outerRadius>=i[e].innerRadius&&(n.push(t),r.push(i[e]),a+=t)}const s=function(){var e=yU,t=gU,n=null,r=WW(0),o=WW(nU),i=WW(0);function a(a){var s,l,u,c,d,p=a.length,f=0,h=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(nU,Math.max(-nU,o.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,i.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<p;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(f+=d);for(null!=t?h.sort((function(e,n){return t(m[e],m[n])})):null!=n&&h.sort((function(e,t){return n(a[e],a[t])})),s=0,u=f?(y-p*v)/f:0;s<p;++s,g=c)l=h[s],c=g+((d=m[l])>0?d*u:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:c,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:WW(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:WW(+e),a):r},a.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:WW(+e),a):o},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:WW(+e),a):i},a}().sortValues(null);s.startAngle(o.startAngle),s.endAngle(o.endAngle),s.padAngle(o.padAngle);return ZZ(s(n),EW({},this.rect,{x:0,y:0}),r,a)}};const n0=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),o=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(o>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class r0{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,o=n?this.width:this.height;e=e.fn({width:r,height:o,flipXY:n});const i=Object.keys(e);for(let r=0,o=i.length;r<o;r++){let o=i[r];t[r0.evaluateKey(o,n)]=e[o]}}else{const r=Object.keys(e);for(let o=0,i=r.length;o<i;o++){let i=r[o];const a=r0.evaluateKey(i,n),s=this.transposeCoordinate(a,e[i],n);t[a]=s}}return r&&n0(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function o0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new r0(...t)}function i0(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const a0={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=o0(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,GJ(this,"x",this.rect.width),GJ(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=EW({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=EW({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=i0(this.x,this.rect.width),this.lines.y=i0(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>EW(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),o=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:o,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,o;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(o=n.data)||void 0===o?void 0:o.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function s0(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function l0(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e+=o?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return t+=o?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function u0(e,t,n){return e<t||e>n}function c0(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function d0(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function p0(e){var t,n;let{chart:r,blueprint:o,renderer:i,p:a,settings:s,items:l,slopeLine:u}=e,c=!0,d=!1,p=!1,f=!1,h=!1,m=EW(!0,{},s.style.line,a.line||{}),g=EW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=u?o.processItem({type:"line",x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):o.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==u||!u.slope||0===u.slope)){const e=EW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},u="";t=c0(a,r),!1!==a.label.showValue&&(t?u=" (".concat(t(a.value),")"):a.scale&&(u=" (".concat(a.value,")"))),u&&(n=i.measureText({text:u,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=i.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,b=d0(a.flipXY?e.vAlign:e.align),v=d0(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*o.width,e.maxWidthPx),S=g.height+2*y,w=a.flipXY?S:x,C=a.flipXY?x:S;if(p=o.processItem({fn:t=>{let{width:n,height:r}=t,i=a.position*n-(a.flipXY?S:x)*(1-b);i=a.flipXY?i:Math.max(i,0);return{type:"rect",x:i,y:Math.max(Math.abs(v*r-C*v),0),width:a.flipXY?w:Math.min(w,o.width-i),height:C,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),p.x<-1||p.x+p.width>o.width+1||p.y<-1||p.y+p.height>o.height+1)p=void 0;else{f={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+y,y:p.y+p.height/2+g.height/3,maxWidth:p.width-2*y-n.width,anchor:"start"},u&&(h={type:"text",text:u||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+3+(p.width-(n.width+2*y)),y:f.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?BQ(p,t)&&(c=!1):"line"===t.type&&a.flipXY===t.flipXY&&WQ(p,t)&&(c=!1)}}}if(d&&l.push(d),u&&0!==u.slope&&(!1!==(null===(t=u.label)||void 0===t?void 0:t.show)||!1!==(null===(n=u.label)||void 0===n?void 0:n.showValue))){var y,b,v;let e,t;const n=120;let s=!1!==(null===(y=u.label)||void 0===y?void 0:y.show)?null===(b=u.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(v=u.label)||void 0===v?void 0:v.showValue)){var x;const t=c0(a,r),n=t?t(u.value):u.value;e="(".concat(u.slope,"x + ").concat(n,")"),s+=null!==(x=u.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var S,w,C;const e=i.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=o.max())return!0}else if(t<0&&r.min()*t+n>=o.max())return!0;return!1}(r,u.slope,u.value)?function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});return r((o.max()-n)/t)}(r,u.slope,u.value):void 0,c=void 0===a||u.isRtl?g.padding:3*g.padding,p=void 0!==a||u.slope>0?3*g.padding:g.padding,f=function(e,t,n,r,o,i){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*i.padding:2*i.padding,e.isRtl,n*o.width+a;if(1===n)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding);if(n>.8)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding)}else if(e.slope>0)return t.x2-(r.width+2*i.padding);return e.isRtl?t.x1-(r.width+2*i.padding):t.x1}(u,d,a,e,o,g),h=Math.min(d.y1,d.y2);null!==(S=u.label)&&void 0!==S&&S.stroke&&(t={type:"rect",x:u.isRtl?Math.max(f,c)-2:Math.max(f,c)+2,y:Math.abs(Math.max(h,p)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(w=null===(C=u.label)||void 0===C?void 0:C.stroke)&&void 0!==w?w:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(f,c)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,p)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,o){for(let i=0,a=e.length;i<a;i++){const a=e[i];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+o)return!0}return!1})(l,y,e,c,p)||(t&&l.push(t),l.push(y))}}c&&p&&f&&(l.push(p,f),h&&l.push(h))}function f0(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function h0(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function m0(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function g0(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const y0={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=o0(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(h0).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=m0(t,e.value);return EW(e,{scale:t,position:n})}return EW(e,{position:e.value})})),this.lines.y=this.lines.y.filter(h0).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=m0(t,e.value);return EW(e,{scale:t,position:n,flipXY:!0})}return EW(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(f0(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(f0(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let o;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),i=e.min(),a=e.max(),s=n.min(),l=n.max();o=MW(MW({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const u=i*r.slope+r.value,c=a*r.slope+r.value,d=(s-r.value)/r.slope,p=(l-r.value)/r.slope;let f=[];u0(u,s,l)||(f[0]={x:m0(e,i),y:m0(n,u)}),u0(d,i,a)||(f[1]={x:m0(e,d),y:1}),u0(c,s,l)||(f[2]={x:m0(e,a),y:m0(n,c)}),u0(p,i,a)||(f[3]={x:m0(e,p),y:0});const h=f.filter((e=>!!e)).length;if(h>2&&function(e){g0(e[0],e[1])&&(e[1]=void 0),g0(e[1],e[2])&&(e[2]=void 0),g0(e[2],e[3])&&(e[3]=void 0),g0(e[3],e[0])&&(e[3]=void 0)}(f),f=f.filter((e=>!!e)),f.length<2)return void t["y".concat(u>l?0:1)].push(f0(r));o.x1=f[0].x,o.y1=f[0].y,o.x2=f[1].x,o.y2=f[1].y}else o=void 0;p0({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:o})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:o}=e;const i=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=i.length;e<r;e++){const r=i[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),i=a.padding.x+a.width,l=a.padding.y+a.width,u="bottom";u=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let c=t.processItem({fn:t=>{let{width:r,height:o}=t,c=e*r+("1"===e?-i:i),d=n?l:o-l;return"arc"===a.type?{type:"path",d:s0(n?d:c,n?c:d,a.width,u),x:c,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:c,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=c.cx||c.x,p=c.cy||c.y;const f=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),h=f.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:l0(d,p,a.width,u),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};o.push(c,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function b0(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){EW(e,t.style)}(t,e),t}function v0(e){return"string"==typeof e||"number"==typeof e?e:"-"}function x0(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),o=Math.max(n.stepSize/2,t.boundingRect.height/2),i="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),u=[{x:t.x-o,y:l},{x:t.x+o,y:l}].map((e=>mQ(e,r,{x:t.x,y:t.y}))),c={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[c,d]:[d,c];u.push(...p),t.collider={type:"polygon",vertices:u}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const o=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=o>0?r.width-o:r.width;const i=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=i>0?r.height-i:r.height}(e,t,n)}function S0(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const o=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-o)*n}return r}function w0(e,t){var n,r;const o={type:"text",text:v0(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(o.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+S0(t,!1),o.y="top"===t.align?t.innerRect.height:0,o.anchor=t.stepSize?"start":"middle",o.x+=isNaN(t.style.offset)?0:+t.style.offset):(o.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+S0(t,!0),o.x="left"===t.align?t.innerRect.width:0,o.anchor="left"===t.align?"end":"start",o.baseline=t.stepSize?"text-before-edge":"central",o.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(o,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,o=Math.min(t.maxWidth/2,t.textRect.width/2),i=e.x-o,a=e.x+o;i<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,o=t.maxHeight/2,i=e.y-o,a=e.y+o;i<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(o,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(o,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const o=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+o>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-o<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(o,t),function(e,t){e.boundingRect=t.textBounds(e)}(o,t),x0(e,o,t),o}function C0(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){EW(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function E0(e){return!e.isMinor&&e.position>=0&&e.position<=1}function k0(e){let{rect:t,state:n,majorTicks:r,measure:o,horizontal:i}=e;return i?function(e){let{majorTicks:t,measureText:n,rect:r,state:o}=e;const i="layered"===o.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(i*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:o,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const o=r.height,i=n("M").height;return!(t.length<2)&&o*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:o,rect:t})}function R0(e){let{value:t,maxValue:n,minValue:r,range:o,modifier:i}=e;return isNaN(o)||isNaN(i)||(t=o*i),t>n&&(t=n),t<r&&(t=r),t}function _0(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const u={left:0,top:0,right:0,bottom:0},{maxLengthPx:c,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,f=p?n.inner.width:n.inner.height,h=i.ticks({settings:a,distance:f,formatter:r}).filter(E0),m=e=>{const t=o({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=R0({value:t.width,maxValue:c,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:o,settings:i}=e;const a=i.labels.maxGlyphCount,s="layered"===o.labels.activeMode?2:1,l=i.labels.tiltThreshold?i.labels.tiltThreshold:.7,u=n("…").width,c=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],o=r.label,i=n(o).width*(o.length>1?l:1);if(p=s*c*Math.abs(r.start-r.end),i+u>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*c*e,d=n("M").width*l*a,d+u>p)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&k0({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>R0({value:t.width,maxValue:c,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>R0({value:e.width,maxValue:c,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),o=e=>Math.min(r,e.width)*Math.cos(t)+e.height,i=(t,r)=>{const o=h[r]?h[r].position:0;return e?t-o*n.inner.width:t-(1-o)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(o).map(i),0))+a.paddingEnd;if(u[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:o,angle:i}=e;if(t.length<2)return!1;if(0===i)return!0;const a=Math.abs(i),s=1/(Math.min(r.outer.width-o,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:u}}const M0=(e,t,n)=>e.width*Math.abs(t.position-n.position);function A0(e){let{layered:t,major:n,innerRect:r,outerRect:o,tick:i,index:a}=e;const s=t?2:1,l=n[a-s],u=n[a+s],c=l?M0(r,i,l)/2-2:1/0,d=u?M0(r,i,u)/2-2:1/0;return n.length<2?r.width:l?u?2*Math.min(c,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:o}=e;const i=t.x-n.x,a=n.width-t.width-i,s=t.width-t.width*r.position+a,l=2*Math.min(o,s),u=1===r.position?t.width/2-2:0;return Math.max(o,l,u)})({innerRect:r,outerRect:o,tick:i,prevWidth:c}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:o}=e;const i=t.x-n.x,a=t.width*r.position+i,s=2*Math.min(o,a),l=0===r.position?t.width/2-2:0;return Math.max(o,s,l)})({innerRect:r,outerRect:o,tick:i,nextWidth:d})}function D0(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,o=r+e.style.strokeWidth,i={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:o}},ticks:[]};return function(e,t){EW(e,t.style)}(i,e),i}function P0(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function L0(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i;let u=a-e.position*l;u-=Math.PI/2;const c=P0(r.cx,r.cy,o+s,u),d=P0(r.cx,r.cy,o,u),p={type:"line",x1:c.x,y1:c.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=MW({},t.style);EW(e,n)}(p,t),p}function I0(e){return"string"==typeof e||"number"==typeof e?e:"-"}function q0(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function T0(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i,u=.2;let c,d;c="top"===t.align||"bottom"===t.align?a-e.position*l:i+e.position*l,d=c<-.2&&c>-Math.PI+u?"left":c>.2&&c<Math.PI-u?"right":"center",c-=Math.PI/2;const p=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,o+s+6,c);let f;f="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:I0(e.label),align:d,x:p.x,y:p.y,maxHeight:t.maxHeight,maxWidth:q0(t,d,p),anchor:f,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,o;const i=parseFloat(n.fontSize)||0;r=t.y-i/2,o=e.innerRect.height-(t.y+i/2),(r<0||o<0)&&(n.text="")}(t,p,h),h}function O0(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function N0(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function z0(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=O0(e)+e.labels.margin,t}function F0(e,t){return e.map((e=>C0(e,t)))}function j0(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function H0(e){let{textMetrics:t,settings:n,innerRect:r,scale:o,tilted:i,layered:a,tick:s}=e;const l=t.height,u=j0(o,s),c={width:0,height:l};if("left"===n.align||"right"===n.align)c.width=r.width-z0(n)-n.paddingEnd;else if(a)c.width=u*r.width*2;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);c.width=(r.height-z0(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else c.width=u*r.width;return c.width=R0({value:c.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),c}function B0(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:o,tilted:i,layered:a,tick:s,index:l,major:u}=e;const c=t.height,d={width:0,height:c};if("left"===n.align||"right"===n.align)d.width=r.width-z0(n)-n.paddingEnd;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-z0(n)-n.paddingEnd-c*Math.cos(e))/Math.sin(e)}else d.width=A0({layered:a,major:u,innerRect:r,outerRect:o,tick:s,index:l});return d.width=R0({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function $0(e){let t;function n(){return t=B0,n}function r(){return t=H0,r}function o(e){let{settings:n,scale:r,innerRect:o,outerRect:i,measureText:a,ticks:s,state:l,textBounds:u}=e;const c=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),f={innerRect:o,align:n.align,outerRect:i},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(f.startAngle=n.arc.startAngle,f.endAngle=n.arc.endAngle,f.radius=n.arc.radius),n.line.show&&(f.style=n.line,f.padding=n.paddingStart,n.arc?c.push(D0(f)):c.push(b0(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=O0(n),n.arc?(f.padding=N0(n),g=function(e,t){return e.map((e=>L0(e,t)))}(d,f)):g=F0(d,f)),n.labels.show){const e=z0(n);f.style=n.labels,f.padding=e,f.tilted=h,f.layered=m,f.angle=n.labels.tiltAngle,f.paddingEnd=n.paddingEnd,f.textBounds=u;const s=(e,s)=>{f.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:f.style});const l=t({textMetrics:f.textRect,settings:n,innerRect:o,outerRect:i,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});f.maxWidth=l.width,f.maxHeight=l.height,f.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:o}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*j0(n,o)}({innerRect:o,scale:r,settings:n,tick:e})};let l=[];n.arc?(f.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=N0(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=T0(e,t);return o.data=e.data,o}))}(d,f,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=w0(e,t);return o.data=e.data,o}))}(d,f,s):function(e,t,n,r){const o=t.padding,i=z0(n);return e.map(((e,a)=>{r(e,a);const s=i+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?o:s;const l=w0(e,t);return l.data=e.data,l}))}(d,f,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>BQ(zW(1,e[t].boundingRect),zW(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const o=1/Math.abs(e[n].x-e[r].x),i=Math.sin(t*(Math.PI/180))/o;return e[n].boundingRect.height>i}}for(let n=0;n<=e.length-1;n++)for(let o=n+1;o<=Math.min(n+5,n+(e.length-1));o++)e[n]&&e[o]&&r(n,o)&&(o===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(o,1),t&&t.splice(o,1)),o--,n--)}(l,g,f),c.push(...l)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(f.style=n.minorTicks,f.tickSize=n.minorTicks.tickSize,f.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),c.push(...F0(p,f))),g&&c.push(...g),c}return n.build=o,r.build=o,e?r():n()}const V0={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},W0={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const U0={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const o=EW(!0,{},t.isDiscrete?V0:W0,n),i=EW(!0,{},o,r.settings),a=r.layout.dock||t.defaultDock;i.dock=a,i.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),i.labels.tiltAngle=Math.max(-90,Math.min(i.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=i;return i.paddingStart="function"==typeof s?s.call(null):s,i.paddingEnd="function"==typeof l?l.call(null):l,i}(this),this.state.concreteNodeBuilder=$0(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,o=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=YJ(r,o);const i=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const{size:u,edgeBleed:c,isToLarge:d}=_0({isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s});if(l+=u,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,c[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:c}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return i},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=EW({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),o=n||r;return EW(this.state.innerRect,r),EW(this.state.outerRect,o),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=YJ(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),n0.multiple(t),t}};const G0={render:()=>[]};function Y0(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function K0(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const X0={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=Y0(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:o,measureText:i,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:K0(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};EW(s,a.text);const l=i(s);if("top"===r||"bottom"===r){let e=o.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=o.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?o.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*o.width}else{let e=o.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=o.height-n.paddingStart),s.y=e,s.x="left"===r?o.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*o.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(EW(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=Y0(t,n,this.scale)}};function J0(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,o="top"===n||"bottom"===n,i=o?"width":"height",a=e.rect[i],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[o?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const i=e/a*(n.max-n.min)+n.min;i<n.start?l.startScroll=i:i>n.start+n.viewSize&&(l.startScroll=i-n.viewSize)}return{update:e=>{let t=e[o?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),i=(t-l.startOffset)/a*(n.max-n.min),u=l.startScroll+i;s.moveTo(u)},end:e=>{let t=e[o?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function Q0(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const Z0={require:["chart","renderer"],on:{panStart(e){const t=Q0(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=J0(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=Q0(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=Q0(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=Q0(e,this.renderer);J0(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,o=r?"width":"height",i=this.rect[o],a=this.chart.scroll(this.settings.scroll).getState();let s=i*(a.start-a.min)/(a.max-a.min);const l=i*a.viewSize/(a.max-a.min);return n&&(s=i-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[o]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function e1(e){let{h:t,isVertical:n,value:r,pos:o,align:i,borderHit:a,state:s,idx:l}=e;const u="end"!==i,c=u?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",f="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),f="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),f="".concat(s.rect.height-d,"px")),u||(o-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:o,"px"),top:"".concat(n?o:d,"px"),height:n?"".concat(a,"px"):f,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:EW({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function t1(e){let{h:t,isVertical:n,label:r,otherValue:o,rangeIdx:i,idx:a,pos:s,align:l,state:u,value:c}=e;const d="end"!==l,p="outside"===u.settings.bubbles.placement;let f,h="none";n?(f=d?"left":"right",p&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(f=d?"top":"bottom",p&&(h=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=u.edit&&u.edit.rangeIdx===i&&u.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(u.style.bubble.borderRadius,"px"),border:"".concat(u.style.bubble.strokeWidth,"px solid ").concat(u.style.bubble.stroke),backgroundColor:u.style.bubble.fill,color:u.style.bubble.color,fontFamily:u.style.bubble.fontFamily,fontSize:u.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=u.style.bubble.stroke;const b=m?t("input",{type:"text",value:c,style:MW(MW({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(u.style.bubble.strokeWidth,"px solid ").concat(y)):u.onEditConfirmed(i,t,o)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),u.onEditCanceled())}}):t("div",{"data-key":[u.key,"bubble",i,a].join("-"),"data-other-value":o,"data-idx":i,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[f]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[b])}function n1(e){let{h:t,isVertical:n,top:r,height:o,color:i,on:a,opacity:s}=e;return t("div",EW({style:{backgroundColor:i,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(o,"px"):"100%",width:n?"100%":"".concat(o,"px"),pointerEvents:"auto"}},a),[])}function r1(e){let{borderHit:t,els:n,isVertical:r,state:o,vStart:i,vEnd:a,idx:s}=e,l=0;o.targetRect&&(l=r?o.targetRect.y:o.targetRect.x);const u=!!o.scale,c=u?o.scale.norm(i)*o.size:i,d=u?o.scale.norm(a)*o.size:a,p=Math.abs(c-d),f=Math.min(c,d)+l,h=f+p;if(o.targetRect){const e=o.targetFillRect||o.targetRect,t=r?e.height:e.width,s=u?o.scale.norm(i)*t:i,l=u?o.scale.norm(a)*t:a,c=Math.abs(s-l),d=Math.min(s,l),p={h:o.h,isVertical:r,top:d,height:c,color:o.style.target.fill,opacity:o.style.target.opacity};o.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=o.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=o.style.target.opacity}}),n.push(o.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[n1(p)]))}const m=c<d?i:a,g=c<d?a:i,[y,b]=u?o.scale.domain():[Math.min(i,a),Math.max(i,a)],v=m+1e-5>=y&&m-1e-5<=b,x=g-1e-5<=b&&g+1e-5>=y;v&&n.push(e1({h:o.h,isVertical:r,borderHit:t,value:m,pos:f,align:"start",state:o,idx:s})),x&&n.push(e1({h:o.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:o,idx:s}));const S=o.settings.bubbles;if(S&&S.show){S.fontSize,S.fontFamily,S.fill;const e=[i,a];v&&n.push(t1({h:o.h,isVertical:r,align:S.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(o.format(m,e)),pos:f,state:o})),x&&n.push(t1({h:o.h,isVertical:r,align:S.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(o.format(g,e)),pos:h,state:o}))}}function o1(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function i1(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,o)=>{e.active&&o===e.active.idx||r1({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:o})})),e.active){let r=e.start,o=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),o=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),o=Math.max(e.start,e.current);else{const t=o1(e);r=e.active.start+t,o=e.active.end+t}r1({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:o,idx:e.active.idx})}return t}function a1(e){return{min:e.scale.min(),max:e.scale.max()}}function s1(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function l1(e,t,n){let r,o,i=e.ranges,a=-1;for(r=0;r<i.length;r++){if(i[r].min<=t&&t<=i[r].max){a=r,n.min=r?i[r-1].max:n.min,n.max=r+1<i.length?i[r+1].min:n.max;break}if(t<i[r].min){n.max=i[r].min,n.min=r?i[r-1].max:n.min;break}}-1===a&&i.length&&r>=i.length&&(n.min=i[i.length-1].max),-1!==a&&(o={idx:a,start:i[a].min,end:i[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=o}function u1(e){e.renderer.render(i1(e))}function c1(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}function d1(e,t){let n,r=1/0;const o=t.domain(),i=t.bandwidth()/2;for(let a=0;a<o.length;++a){const s=Math.abs(e-i-t(o[a]));s<r&&(r=s,n=o[a])}return n}function p1(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function f1(e){const t=e.reduce(((e,t)=>(e.push(...qW(t.bounds)),e)),[]);return TW(t)}const h1={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=c1(this.state,this.state.brushInstance),this.state.active=null,u1(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let o=YJ(this.chart.scale(t.scale),r);const i=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),o=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],i=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(o.length>0){const r=f1(o);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=YJ(e.chart.scale(n.scale),t.size),t.targetRect=r,i.length>0){const e=f1(i);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(o=i.scale?i.scale:o,this.state.targetRect=i.targetRect,this.state.targetFillRect=i.targetFillRect,this.state.size=null===i.size?r:i.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let o=e.ranges.map((e=>({min:e.min,max:e.max})));const i=e.scale.min(),a=e.scale.max();o[t]={min:Math.max(i,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=MW({},o[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),o)}))}(this.state,e,t,n),this.emit("bubbleEnd"),u1(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,u1(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:o,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(o,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=o;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=JX(),this.state.scale.data=o.data,this.state.format||(this.state.format=(e,t)=>p1(o.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(d1(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"),this.state.fauxBrushInstance=TJ(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),o=[];return e.forEach((e=>{if(!p1(r,[e.min,e.max]))return;const i=n.indexOf(d1(e.min,t)),a=n.indexOf(d1(e.max,t));o.push.apply(o,n.slice(Math.min(i,a),Math.max(i,a)+1))})),o}(e,o);return this.state.ranges=c1(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[i1(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const u={started:!0};t.offset=EW({},r.element().getBoundingClientRect());const c=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=o(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];u.current=t.scale.normInvert(f/t.size),u.start=t.scale.normInvert(p/t.size);let h=t.ranges;const m=a1(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?h[b-1].max:m.min,m.max=b+1<h.length?h[b+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=u.start&&u.start<=h[g].max){b=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(u.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===b&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==b||t.multi||(u.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:h[b].min,end:h[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))u.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=i?(u.start=y.end,y.mode="modify"):Math.abs(p-n)<=i&&(u.start=y.start,y.mode="modify")}else y={idx:-1,start:u.start,end:u.current,limitLow:m.min,limitHigh:m.max,mode:"current"};u.active=y,"modify"!==y.mode&&t.targetRect&&!VQ(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:c1,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=a1(e);l1(e,e.current,n)}(this.state,c1),u1(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=o1(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=c1(e,e.fauxBrushInstance),o=e.findValues(r),i=e.findValues(t),a=i.filter((e=>-1===o.indexOf(e))),s=o.filter((e=>-1===i.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),u=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,u),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),u1(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const o=n.parentNode;u1(this.state);const i=o.querySelector("input");i.focus(),i.select()}};function m1(e){e.renderer.render(i1(e))}function g1(e){return e.rc.ranges()}function y1(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const b1={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],o=this.renderer.element().getBoundingClientRect(),i=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=i[0]?i.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:i[0].rect.x,y0:i[0].rect.y,x1:i[0].rect.x+i[0].rect.width,y1:i[0].rect.y+i[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=o,this.state.rc=CJ(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),o=Math.max(...n),i={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?o-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:o-r},a=e.chart.shapesAt(i,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,o)=>{const i=n.bounds,a=o.bounds;return t===r?i[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:o:i[e.cssCoord.coord]+i[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:o})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const u={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=o(t);const c=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=f,m=p;u.start=p,u.current=f;let g=t.ranges;const y=s1(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(u.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))u.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(p-e)<=i?(u.start=v.end,v.mode="modify"):Math.abs(p-t)<=i&&(u.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};u.active=v,"modify"!==v.mode&&t.targetRect&&!VQ(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:g1,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=s1(e);l1(e,e.current,n)}(this.state,g1),m1(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=o1(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...y1(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),m1(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function v1(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}(e).map((o=>{const i=e.scale(o.min)*n,a=e.scale(o.max)*n,s=Math.min(i,a),l=Math.abs(i-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function x1(e,t,n,r){function o(){!function(e){e.renderer.render(v1(e))}(e)}function i(){!function(e){e.renderer.render(v1(e))}(e)}function a(){!function(e){e.renderer.render(v1(e))}(e)}e.brush=t,t&&(t.on("start",o),t.on("update",i),t.on("end",a),e.start=o,e.update=i,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function S1(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const w1={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,o=YJ(this.chart.scale(e.scale),r);return S1(this.state),x1(this.state,t,o,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,v1(this.state)},beforeDestroy(){S1(this.state)}};function C1(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function E1(e,t,n){return pQ(e,t.points[0])<n.settings.snapIndicator.threshold**2}function k1(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function R1(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function _1(e,t){e.snapIndicator.visible=t}const M1={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})));const n=C1(this.state.rendererBounds,e);k1(this.state,n),R1({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=C1(this.state.rendererBounds,e);E1(t,this.state,this.settings)?_1(this.state,!0):_1(this.state,!1),k1(this.state,t),R1({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const o=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;_1(this.state,!1);E1(C1(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,o=e.points.map((e=>({x:e.x+n,y:e.y+r}))),i=t.shapesAt({vertices:o},{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function A1(e,t,n,r,o){let i,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);i=o(t[l]),i[n]+i[r]<e[n]?a=l+1:s=l}return a}function D1(e){let{orientation:t,targetNodes:n,labels:r,container:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A1;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",u=e=>e.textBounds,c=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<o[s]||d[s]+d[l]>o[s]+o[l])return!1;for(let e=i(d,a,s,l,u);e<a.length;e++)if(BQ(d,a[e].textBounds))return!1;const f=i(d,n,s,l,c),h=d[s]+d[l];for(let e=f;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(BQ(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const P1=4;function L1(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function I1(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function q1(e){return MW(MW({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function T1(e,t,n){return n?e.width>=t.height:e.width>=t.width}function O1(e,t,n){return n?e.height>=t.width:e.height>=t.height}function N1(e,t,n,r,o){let i,a;return"v"===e?(i=r||o||T1(t,n,!0),a=O1(t,n,!r)):(i=T1(t,n),a=o||O1(t,n,!1)),i&&a}function z1(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function F1(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(!n.overflow&&!function(e,t,n){return T1(e,t,n.rotate)&&O1(e,t,n.rotate)}(e,o,n))return!1;const i=.5*o.height;return n.rotate?(r.x=z1(e.x,e.width,o.height,n.align)+i,r.y=z1(e.y,e.height,o.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(o.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=z1(e.x,e.width,o.width,n.align),r.y=z1(e.y,e.height,o.height,n.justify)+i),r}function j1(e){let{bar:t,view:n,direction:r,position:o,padding:i=P1,measured:a}=e;const s={};if(EW(s,t),o&&"inside"!==o)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),i=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===o&&"up"===r||"opposite"===o&&"down"===r?(s.y=0,s.height=e):("outside"===o&&"down"===r||"opposite"===o&&"up"===r)&&(s.y=i,s.height=n.height-i)}else{const e=Math.max(0,Math.min(t.x,n.width)),i=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===o&&"left"===r||"opposite"===o&&"right"===r?(s.x=0,s.width=e):("outside"===o&&"right"===r||"opposite"===o&&"left"===r)&&(s.x=i,s.width=n.width-i)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),o=Math.max(0,Math.min(e.x,t.width)),i=Math.max(0,Math.min(e.x+e.width,t.width));e.x=o,e.width=i-o,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=P1,bottom:o=P1,left:i=P1,right:a=P1}=n,s="function"==typeof i?i(t):i,l="function"==typeof a?a(t):a,u="function"==typeof r?r(t):r,c="function"==typeof o?o(t):o;e.x+=s,e.width-=s+l,e.y+=u,e.height-=u+c}(s,a,i),s}function H1(e){let t,n,r,o,i,{direction:a,fitsHorizontally:s,measured:l,node:u,orientation:c,placementSettings:d,rect:p}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j1;const h=[],m="h"===c?"width":"height";for(i=0;i<d.length;i++)if(r=d[i],o=f({bar:u.localBounds,view:p,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(o),t=!i||o[m]>t[m]?o:t,N1(c,o,l,s,r.overflow)){n=o;break}return n||(n=t,i=h.indexOf(n)),r=d[i],{bounds:n,placement:r}}function B1(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:i=P1,bottom:a=P1,left:s=P1,right:l=P1}=o,u="function"==typeof s?s(t):s,c="function"==typeof l?l(t):l,d="function"==typeof i?i(t):i,p="function"==typeof a?a(t):a,f=e.x+e.dx,h=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,b=1e-9;return{x:(n?f-y:f)-u-b,y:(n?h:h-y)-d-b,width:g+(u+c)-b,height:m+(d+p)-b}}function $1(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:o,collectiveOrientation:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H1,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:F1,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D1;const u=[],c={container:r,targetNodes:n,labels:[],orientation:i};let d,p,f,h,m,g,y,b,v,x,S,w,C,E;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],f=p.node,C=L1(f,t),v=p.direction,E="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(h=p.texts[t],!I1(h))continue;x=p.labelSettings[t],b=p.measurements[t],w=x.placements;const n=a({direction:v,fitsHorizontally:o,lblStngs:x,measured:b,node:f,orientation:E,placements:w,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,S=n.placement,g&&S){var k;m=S.justify;const t="function"==typeof x.linkData?x.linkData(C,e):void 0,n="function"==typeof S.overflow?S.overflow(C,e):S.overflow;"up"===v&&(m=1-m),"opposite"===S.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===i||o);if(d=s(g,h,{justify:"h"===E?S.align:m,align:"h"===E?m:S.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(k=x.dock)&&void 0!==k?k:"left"}),d){const n=B1(d,b,r,g,S.padding);y="function"==typeof S.fill?S.fill(MW(MW({},C),{},{textBounds:n}),e):S.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof S.background&&(d.backgroundColor="function"==typeof S.background.fill?S.background.fill(MW(MW({},C),{},{textBounds:n}),e):S.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=B1(d,b,r,g,S.background.padding))),u.push(d),c.labels.push({node:f,textBounds:n})}}}}const R=u.filter(l(c)),_=R.filter((e=>void 0!==e.backgroundBounds)).map(q1);return[..._,...R]}function V1(e){const t=2*Math.PI;return(e%t+t)%t}function W1(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function U1(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function G1(e,t,n){let{x:r,y:o}=t;if(r*r+o*o>e*e)return null;let i=Math.sin(n),a=Math.cos(n),s=r*a-o*i,l=e*e-s*s;if(l<0)return null;let u=Math.sqrt(l);return{x:s*a+i*u,y:-s*i+a*u}}function Y1(e){let t,n,{radius:r,size:o,angle:i}=e,{width:a,height:s}=o,l={x:a/2,y:s/2};switch(Math.floor(i/(Math.PI/2))){case 0:if(t=G1(r,l,i),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=G1(r,l,Math.PI-i),!t)return null;n={x:-a,y:-s};break;case 2:if(t=G1(r,l,i-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=G1(r,l,2*Math.PI-i),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function K1(e){let{slice:t,measured:n,padding:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,u=i-o;if(u<Math.PI){let e=(n.height/2+r)/Math.tan(u/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const c=V1((o+i)/2);let d=s-r,p={x:Math.sin(c)*d,y:-Math.cos(c)*d,width:l,height:n.height};return c<Math.PI?(p.angle=c-Math.PI/2,p.anchor="end"):(p.angle=c+Math.PI/2,p.anchor="start"),p}function X1(e){let{context:t,node:n,bounds:r}=e;let{start:o,end:i}=n.desc.slice;const a=V1((o+i)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function J1(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Q1(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function Z1(e){let t,n,{slice:r,direction:o,position:i,padding:a,measured:s,view:l,context:u,store:c}=e,{start:d,end:p,innerRadius:f,offset:h}=r;switch(i){case"into":t="rotate"===o?K1({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t;const l=V1((o+i)/2);let u=Y1({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return u?(u.baseline="top",WQ(u,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||WQ(u,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||OQ({cx:0,cy:0,r:a},u)?null:(W1(u,n),u)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:f},t="rotate"===o?K1({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:o}=e;const{start:i,end:a,outerRadius:s}=t,l=V1((i+a)/2);let u=Y1({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return u?(u.baseline="top",W1(u,n),o.insideLabelBounds.some((e=>BQ(e,u)))?null:(o.insideLabelBounds.push({x:u.x-4,y:u.y,width:u.width+8,height:u.height}),u)):null}({slice:n,measured:s,padding:a,store:c});break;case"outside":t="rotate"===o?function(e){let{slice:t,measured:n,padding:r,view:o}=e,{start:i,end:a,outerRadius:s,offset:l}=t,u=s+r,c=a-i;if(c<Math.PI&&(n.height/2+r)/Math.tan(c/2)>u)return null;const d=V1((i+a)/2);let p=Math.sin(d)*u,f=-Math.cos(d)*u,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=f<0?o.y:o.y+o.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=p<0?o.x:o.x+o.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:p,y:f,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:o,context:i}=e,{start:a,end:s,outerRadius:l,offset:u}=t;const c=V1((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(i,Math.floor(c/(Math.PI/2)),o))return null;let d=l+r+n.height/2,p=Math.sin(c)*d,f=-Math.cos(c)*d,h=n.width+1;if(c<Math.PI){let e=Math.abs(o.x+o.width-(p+u.x));e<h&&(h=e)}else{let e=Math.abs(o.x-(p+u.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:p,y:f,width:h,height:n.height};return c<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:u});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===i&&"rotate"!==o&&function(e,t,n){const{start:r,end:o,offset:i,outerRadius:a}=n,s=V1((r+o)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,u,r)),t}function e2(e){let{context:t,direction:n,measured:r,node:o,placementSettings:i,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z1;for(let e=0;e<i.length;e++){let u=i[e],c=l({context:t,slice:o.desc.slice,view:a,direction:n,position:u.position,measured:r,padding:u.padding,store:s});if(c)return{bounds:c,placement:u}}return{bounds:null,placement:null}}function t2(e,t,n){const r=t.fontFamily,o="".concat(t.fontSize,"px"),i=n.measureText({text:e,fontFamily:r,fontSize:o});return i.minReqWidth=Math.min(i.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:o}).width),i}const n2=/\n+|\r+|\r\n/,r2=/\s/,o2=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function i2(e){return"string"==typeof e?-1!==e.search(n2):-1!==String(e).search(n2)}function a2(e){return-1!==e.search(r2)}function s2(e){return-1!==e.search(o2)}function l2(e,t,n){return Math.max(t,Math.min(n,e))}function u2(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:o=[i2],noBreakAllowedIdentifiers:i=[],suppressIdentifier:a=[a2,i2,e=>""===e],hyphenationIdentifiers:s=[s2]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const u=l.length,c=n?e=>e>=0:e=>e<u;let d=n?u:-1;function p(e){const t=l2(e,0,u-1),n=l[t],c=r(n),d=function(e,t,n,r,o){return r.some((r=>r(e,t,n)))?1:o.some((r=>r(e,t,n)))?0:2}(n,t,l,o,i);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:c.width,height:c.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=l2(e,0,u-1),c(d)?p(d):{done:!0}},peek:p,length:u}}const c2="…",d2=/^\s*\d+(\.\d+)?px\s*$/i;function p2(e){return"string"===typeof e&&d2.test(e)}function f2(e){const t=e["font-size"]||e.fontSize;return p2(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function h2(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=f2(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function m2(e,t){return{lines:[],line:"",width:0,maxLines:h2(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function g2(e){e.lines.push(e.line),e.line="",e.width=0}function y2(e,t){e.line+=t.value,e.width+=t.width}function b2(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let o=1;o<5;o++){const i=n.peek(t.index-1);if(!t.hyphenation||!i.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-o),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function v2(e,t,n){const r=u2({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?b2(e,t,r):t,g2(e),y2(e,t)):y2(e,t)}}function x2(e,t){const n=u2({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=m2(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){g2(r),o=!1;break}1===e.breakOpportunity?g2(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?b2(r,e,n):e,g2(r),y2(r,e)):y2(r,e)}return{lines:r.lines,reduced:o}}function S2(e,t){const n=u2({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=m2(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){g2(r),o=!1;break}1===e.breakOpportunity?g2(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?g2(r):e.width>r.maxWidth?v2(r,e,t):(g2(r),y2(r,e)):y2(r,e)}return{lines:r.lines,reduced:o}}function w2(e){return{"break-all":x2,"break-word":S2}[e.wordBreak]}function C2(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=w2(n);if(!r)return;const o=e(n);if(o.width>n.maxWidth||i2(n.text)){const i=(f2(n)-o.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const o={type:"container",children:[]};void 0!==t.id&&(o.id=t.id);let i=0;return e.lines.forEach(((a,s)=>{const l=EW({},t);l.text=a,l._lineBreak=!0,i+=n,e.reduced&&s===e.lines.length-1?l.text+=c2:delete l.maxWidth,l.dy=isNaN(l.dy)?i:l.dy+i,i+=r,i+=n,o.children.push(l)})),o}(a,n,i,o.height)}}}}function E2(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,o="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:i}=e;if(void 0===i)return o;let a=t({text:o,fontSize:r,fontFamily:n}).width;if(a<=i)return o;let s=0,l=o.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:o.substr(0,e)+c2,fontSize:r,fontFamily:n}).width,a<=i?s=e+1:l=e-1}return o.substr(0,l)+c2}function k2(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const R2={},_2={},M2={fontSize:void 0,fontFamily:void 0};let A2;function D2(e,t){return!e&&!t||e===t}function P2(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;const i="".concat(t," ").concat(n," ").concat(r," ").concat(o);return"number"!=typeof _2[i]&&(A2=A2||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;D2(M2.fontWeight,t)&&D2(M2.fontSize,n)&&D2(M2.fontFamily,r)||(A2.font=[t,n,r].filter((e=>!!e)).join(" "),M2.fontWeight=t,M2.fontSize=n,M2.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:o}),_2[i]=A2.measureText(t).width),_2[i]}function L2(e){return"number"!=typeof R2[e]&&(R2[e]=function(e){if(p2(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),R2[e]}function I2(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;return{width:P2({text:t,fontWeight:n,fontSize:r,fontFamily:o}),height:L2(r)}}function q2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I2;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:r,fontSize:n}),i=Math.min(e.maxWidth||o.width,o.width),a=e.x||0,s=e.y||0,l=e.dx||0,u={x:0,y:s+((e.dy||0)+k2(e))-.75*o.height,width:i,height:o.height},c=e["text-anchor"]||e.anchor;return u.x="middle"===c?a+l-i/2:"end"===c?a+l-i:a+l,u}function T2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I2;const n=w2(e),r=e["font-size"]||e.fontSize,o=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:o,fontSize:r});if(n&&(i.width>e.maxWidth||i2(e.text))){const i=n(e,(e=>t({text:e,fontFamily:o,fontSize:r}))),a=EW({},e);let s=0,l="";for(let e=0,n=i.lines.length;e<n;e++){let a=i.lines[e];a+=e===n-1&&i.reduced?c2:"";const u=t({text:a,fontSize:r,fontFamily:o}).width;u>=s&&(s=u,l=a)}a.text=l;const u=q2(a,t);return u.height=f2(e)*i.lines.length,u}return q2(e,t)}function O2(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function N2(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(e.width<n.fontSize)return!1;const i=Math.max(0,e.width-o.width);return r.x=e.x+n.align*i,r.y=e.y+o.height/1.2,r}function z2(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function F2(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:o,offset:i}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:o;return z2({cx:i.x,cy:i.y,r:a})}(e.desc.slice):"circle"===e.type?z2(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var j2={bar:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$1;const l=EW({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const u=t.labels.map((e=>EW({},l,t,e))),c=t.labels.map((e=>e.placements.map((n=>EW({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:f}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:o,placementSettings:i,settings:a,renderer:s}=e;const l={},u=[];let c,d,p,f,h,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],f=d.localBounds,!BQ(f,n))continue;let v=L1(d,r);c={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<o.length;t++)m=o[t],p="function"==typeof m.label?m.label(v,e):void 0,I1(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,h=s.measureText(l),c.measurements.push(h),c.texts.push(p),c.labelSettings.push(m),c.placementSettings.push(i[t]),c.direction=g,y=y&&h.width<=f.width-2*P1);u.push(c)}return{targetNodes:u,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:i,settings:t,rect:o,labelSettings:u,placementSettings:c}),h=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return f.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:f,stngs:t,rect:o,fitsHorizontally:d,collectiveOrientation:h})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e2,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Q1;const u=EW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);u.fontSize=parseInt(u.fontSize,10);const c=t.labels.map((e=>EW({},u,t,e))),d=t.labels.map((e=>e.placements.map((n=>EW({},u,t,e,n))))),p=[],f={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],o=[];for(let i=0;i<e.length;++i){const{start:a,end:s}=e[i].desc.slice,l=V1((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[i]);break;case 1:n.push(e[i]);break;case 2:r.push(e[i]);break;case 3:o.push(e[i])}}const i=(e,t)=>V1((e.desc.slice.start+e.desc.slice.end)/2)-V1((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>i(t,e);return t.sort(a),n.sort(i),r.sort(a),o.sort(i),t.concat(n,o,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=J1(t,n);for(let n=0;n<c.length;n++){const r=c[n],u="function"==typeof r.label?r.label(a,e):"";if(!u)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=t2(u,r,i),b=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:o,store:f}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){X1({context:h,node:t,bounds:v});if(!MQ(U1(v),o))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,i=l(v,u,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});i&&(void 0!==g&&(i.data=g),p.push(i),v.line&&(v.line.stroke=n,p.push(v.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:o,style:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N2;const s=EW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},i.label);s.fontSize=parseInt(s.fontSize,10);const l=EW({},s,t),u=t.labels.map((e=>EW({},l,e))),c={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=O2(t,n),{type:s,bounds:p}=F2(t);if(!p)continue;let f,h=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(h+=l.padding,f=0;f<u.length;f++){let t=u[f],n="function"==typeof t.label?t.label(i,e):"";c.fontFamily=t.fontFamily,c.fontSize="".concat(t.fontSize,"px"),c.text=n;let r=o.measureText(c);if(h+=r.height+t.padding,h>y)break;g.push(n),m.push(r)}const b=f,v=Math.max(0,y-h);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*v+l.padding,f=0;f<b;f++){let t,n=u[f];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[f].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[f].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[f].height};x+=m[f].height+l.padding;let r="function"==typeof n.fill?n.fill(i,e):n.fill;const c="function"==typeof n.linkData?n.linkData(i,e):void 0;let h=a(t,g[f],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[f]});if(h){if(h.text&&h.text!==c2){const e=E2(h,o.measureText);if(c2===e)continue;h.ellipsed=e}void 0!==c&&(h.data=c),d.push(h)}}}return d}};const H2={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&j2[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:o,renderer:i,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:o.width,height:o.height},renderer:i,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},j2[e.strategy.type]))})),t}};const B2={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function $2(e){let{x:t=0,y:n,item:r,globalMetrics:o,createSymbol:i,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,u=r.symbol.meta;const c="rtl"===a;let d={x:c?t+o.maxLabelBounds.width:t+o.maxSymbolSize+o.spacing,y:n,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),o=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*o}}({x:c?t+o.maxLabelBounds.width+o.spacing:t,y:n,width:o.maxSymbolSize,height:d.height},u.size,{align:void 0===u.align?.5:u.align,justify:void 0===u.justify?.5:u.justify});const f=i(EW({},u,p));return delete f.collider,s.anchor=c?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const o=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const i=Math.max(0,e.height-r.height);t.x=e.x+n.align*o,t.y=e.y+n.justify*i+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[f,s],collider:{type:"rect",x:t,y:n,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function V2(e,t){const n=e.items.length,r=Math.ceil(n/t),o="horizontal"===e.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[o]*r+(r-1)*e.layout.margin[i]}function W2(e,t){let n,r,o,i,{onScroll:a=()=>{}}=t,s=null,l=0;const u={itemize:t=>{n=function(e,t){let n,r,{resolved:o,dock:i}=e,a=[],s=o.items.items,l=o.symbols.items,u=o.labels.items,c=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const o=void 0!==u[e].text?u[e].text:u[e].data.label||"";n=EW({},u[e],{type:"text",fontSize:"".concat(parseInt(u[e].fontSize,10),"px"),text:o,title:o}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),c=Math.max(l[e].size,c),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:c,maxItemBounds:{height:Math.max(c,p),width:c+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==o.layout.item.vertical?o.layout.item.vertical:4,horizontal:void 0!==o.layout.item.horizontal?o.layout.item.horizontal:4},mode:o.layout.item.mode,size:o.layout.item.size,orientation:"top"===i||"bottom"===i?"horizontal":"vertical",direction:o.layout.item.direction,scrollOffset:o.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{o=t.viewRect,l=u.getContentOverflow(o);const a=u.extent();s=Math.max(0,Math.min(s,l)),i=EW({},o);const c="horizontal"===u.orientation()?"x":"y";return i[c]-=s,i["x"===c?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:o,create:i=$2,parallels:a,createSymbol:s}=n;const l=o.layout.direction,u=o.globalMetrics,c=o.items,d="horizontal"===o.layout.orientation;let p=0;const f=[],h=u.maxItemBounds.height,m=u.maxItemBounds.width,g=o.layout.margin.vertical+h,y=o.layout.margin.horizontal+m;let b=t.x,v=t.y,x=r.x-t.x;for(let e=0;e<c.length;e++){let n=i({y:v,x:"rtl"===l?r.x+x+r.width-m-(b-t.x):b,item:c[e],globalMetrics:u,direction:l,createSymbol:s});if((d&&b>=r.x-m||!d&&v>=r.y-h)&&f.push(n.item),p++,p>=a?(p=0,d?(b+=y,v=t.y):(v+=g,b=t.x)):d?v+=g:b+=y,!d&&v>r.y+r.height)break;if(d&&b>r.x+r.width)break}return f}(t,i,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,o="horizontal"===n.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[o]*r+(r-1)*n.layout.margin[i];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",o=n.layout.margin[r]||4,i=Math.floor((t+o)/(o+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,i)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return V2(n,r)>o[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,V2(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===u.orientation()?o.x+o.width<i.x+i.width:o.y+o.height<i.y+i.height,hasPrev:()=>"horizontal"===u.orientation()?i.x<o.x:i.y<o.y,next:()=>{u.scroll(-u.getNextSize())},prev:()=>{u.scroll(u.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>V2(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",o="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[o]}(n,r)};return u}function U2(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const G2={up:"▲",right:"▶",down:"▼",left:"◀"};function Y2(e,t){let{size:n,isActive:r,direction:o,nav:i,attrs:a}=t,s={},l="";const u=a;i&&i.button&&("function"==typeof i.button.class?s=i.button.class({direction:o}):i.button.class&&(s=i.button.class),"function"==typeof i.button.content&&(l=i.button.content(e,{direction:o})),void 0!==i.button.tabIndex&&(u.tabindex=i.button.tabIndex));const c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(c.border="0",c.background="none"),(!r||i&&i.disabled)&&(u.disabled="disabled"),e("button",EW({class:U2(s),style:c},u),[l||e("span",{style:{pointerEvents:"none"}},[G2[o]])])}function K2(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:o,itemRenderer:i}=t;if(!e||!e.renderArgs)return;e.size(o);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===i.direction(),u=i.hasNext(),c=i.hasPrev();if(!c&&!u)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[Y2(a,{size:32,isActive:u,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),Y2(a,{size:32,isActive:c,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function X2(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=EW({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const o=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};o.push(EW({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(o)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function J2(e,t,n,r){let o,i,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:u,isPreliminary:c=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(o={x:p.x,y:p.y,width:p.width,height:u.spread()},"horizontal"===n){o={x:p.x,y:p.y,width:u.extent(),height:u.spread()};const e=p.width-o.width-(o.width?t.spacing:0),n=p.height;s.parallelize(e,c?void 0:n);const r=s.extent()>e?l.extent():0,f=s.spread(),h=r?l.spread():0;i={x:o.x+o.width+(o.width?t.spacing:0),y:p.y+Math.max(0,(h-f)/2),width:p.width-r-o.width-(r?t.spacing:0)-(o.width?t.spacing:0),height:n},a={x:i.x+i.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},o.y=i.y;"rtl"===s.direction()&&(a.x=p.x,i.x=a.x+a.width+(a.width?t.spacing:0),o.x=i.x+i.width+(o.width?t.spacing:0)),d=Math.max(o.height,h,s.spread())}else{const e=p.height-o.height-(o.height?t.spacing:0),n=p.width;s.parallelize(e,c?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},i={x:p.x,y:o.y+o.height+(o.height?t.spacing:0),width:p.width,height:p.height-o.height-(o.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(u.extent(),r?l.spread():0,s.spread())}return i=EW({},e,{x:e.x+i.x,y:e.y+i.y,width:i.width,height:i.height}),a.x+=e.x,a.y+=e.y,o.x+=e.x,o.y+=e.y,{title:EW({},e,o),content:EW({},e,i),navigation:EW({},e,a),orientation:n,preferredSize:d}}function Q2(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const o=e.scale.data().fields[0];let i=e=>String(e);e.settings.formatter?i=e.chart.formatter(e.settings.formatter):o&&(i=o.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(i(t[e])," - < ").concat(i(t[e+1]))};o&&(r.source={field:o.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const o=e.scale.datum?EW({},e.scale.datum(t)):{value:t};return o.value=t,e.scale.label?o.label=e.scale.label(t):r&&(o.label=r[n]),o}))}const o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:EW(!0,{},B2.title,e.style.title),settings:e.settings.settings.title}),i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:B2.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:EW(!0,{},B2.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=EW(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:EW(!0,{},B2.item.shape,e.style.item.shape),settings:s}),u=e.resolver.resolve({data:n,defaults:EW(!0,{},{show:B2.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function c(e,n){let r=e.data.value,o=t[n+1];e.data.value=[r,o]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(u.items.reverse().forEach(c),u.items.reverse()):u.items.forEach(c));return{title:o,labels:a,symbols:l,items:u,layout:i}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function Z2(e){const{rect:t,settings:n,state:r,itemRenderer:o,navigationRenderer:i,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",u=J2(t,r.display,l,{itemRenderer:o,navigationRenderer:i,titleRenderer:a});e.renderer.size(u.content);let c=o.getItemsToRender({viewRect:EW({},u.content,{x:0,y:0})});return i.render({rect:u.navigation,itemRenderer:o}),a.render({rect:u.title}),e.state.views={layout:u},c}const e5={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=Z2(this);this.update(e)},this.itemRenderer=W2(this,{onScroll:this.onScroll}),this.navigationRenderer=K2(this),this.titleRenderer=X2(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Q2(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",o="top"===r||"bottom"===r?"horizontal":"vertical",i=e.state.display,a=J2(t.inner,i,o,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=i.spacing,n+=a.preferredSize,n+=i.spacing,n}(this,e)},beforeUpdate(){Q2(this)},render(){return Z2(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function t5(e,t){let n=0;const r=e.state.isVertical?"justify":"align",o=e.state.isVertical?"y":"x",i=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[i]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[o]+=n}function n5(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function r5(e){return n5(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function o5(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function i5(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),o=e.chart.scale(e.stgns.major),i=function(e,t){const n=t.domain();let r=n,o=e.stgns.tick.label;!o&&e.formatter?o=e.formatter:!o&&t.data().fields&&(o=t.data().fields[0].formatter()),"function"==typeof o&&(r=n.map(o).map(String));const i=n.map(((n,o)=>{const i=r[o];return{value:n,label:i,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:i,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return i}(e,o),a=n5((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=o.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),u=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),c={isVertical:t,nodes:[],title:{anchor:r5(e.settings),textMetrics:l,textBounds:u,requiredWidth:()=>{if(!n.show)return 0;let e=u.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,c.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=u.height;return t&&(e+=n.padding),Math.min(e,c.rect.height)}},ticks:{values:i,anchor:a,length:Math.min(Math.max(...i.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...c.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...i.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:o,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",o=Math.min(c.rect[n],c.rect[n]*e.stgns.length)-c.title[r]();return Math.max(0,Math.min(o,e.stgns.maxLengthPx))}}};return c}const a5={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=o5(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const o=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return o;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return o;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=i5(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=i5(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=o5(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,o="top"===t.ticks.anchor;let i=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(i+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(i+=t.legend.length(),i+=n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(i+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:i,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return t5(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,o=n.rect;let i=o.x,a=o.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?i+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(i+=n.title.requiredWidth());const u={type:"rect",x:i,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return t5(e,u),u}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let o="start";const i={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,u=0,c="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,c=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,i.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,o="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,u-=.25*a.textMetrics.height,o=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,u=.8*a.textMetrics.height,o=0===a.pos?"start":"end",i.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:u,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:o,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:c}}));return{type:"container",id:"legend-seq-ticks",children:[...a,i]}}(this,n),o={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(o)},render(){return this.state.nodes}};const s5={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function l5(e,t){let{generatorType:n,item:r,data:o,major:i,minor:a,layerObj:s,stngs:l}=t,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const c={type:"path",points:e,generatorType:n,major:i,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:u||r.fill,data:o};return r.strokeDasharray&&(c.strokeDasharray=r.strokeDasharray),c}function u5(e){const{metaLayers:t,coordinates:n,layers:r,lines:o,areas:i}=function(e){let{data:t,stngs:n,rect:r,resolver:o,style:i,domain:a}=e;const{width:s,height:l}=r,u=o.resolve({data:t,defaults:s5.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),c=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<u.items.length;e++){let t=u.items[e],n=t.layerId;if(c){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const f=Object.keys(d).map((e=>(d[e].consumableData=MW({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),h={items:f.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:u,metaLayers:f,layers:o.resolve({data:h,defaults:{curve:s5.layers.curve,show:s5.layers.show},settings:{curve:m.curve,show:m.show}}),lines:o.resolve({data:h,defaults:EW({},s5.layers.line,i.line),settings:m.line}),areas:o.resolve({data:h,defaults:EW({},s5.layers.area,i.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const u=[],c=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||u.push(d.minor),l.data.push(d.data)}c.push(d)}const f=u.sort(((e,t)=>e-t))[Math.floor((u.length-1)/2)];a.push({layerObj:l,lineObj:o.items[s],areaObj:i.items[s],median:f,points:c,consumableData:t.consumableData})})),a}const c5={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,i=u5({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=i.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));i.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else i.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:o,stngs:i}=t;const a=[],s=i.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:u,points:c}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===i.orientation){const e=EW(!0,{},p);p=EW(!0,{},d),d=EW(!0,{},e)}s.area&&!1!==u.show&&a.push(l5(c,{data:e.consumableData,item:u,generatorType:"area",major:p,minor:d,layerObj:l,stngs:i})),t&&!1!==t.show&&(a.push(l5(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:i},"none")),!o&&s.area&&!1!==u.show&&!1!==t.showMinor0&&a.push(l5(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:i},"none")))})),a}(i,{width:n,height:r,missingMinor0:o,stngs:this.stngs})}};function d5(e,t){let n,r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const i=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:o?Math.max(0,Math.min(i,e.rect.width)):i,y:o?Math.max(0,Math.min(a,e.rect.height)):a}}function p5(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function f5(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const h5={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=d5(this,e,!1);VQ({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}))),this.state.start=d5(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=d5(this,e),function(e){if(e.state.active){const t=p5(e,e.state.start),n=p5(e,e.state.end),r=e.chart.shapesAt(f5(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([EW({type:"rect"},f5(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function m5(e,t,n){let{renderer:r,style:o,props:i,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(i,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,o,i),u=a("div",{dir:i.direction,class:U2(EW({"pic-tooltip":!0},s.tooltip)),style:EW({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:o.content,class:U2(EW({"pic-tooltip-content":!0},s.content))},l),a("div",{class:U2(EW({"pic-tooltip-arrow":!0},s.arrow)),style:EW({},o.arrow,o["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(u),r.element().children[0]}function g5(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,o=null,i=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,o=null,i=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),i=!0,r=null,a.set("active")}),u),s>0&&(o&&clearTimeout(o),o=setTimeout(l,s+Math.max(u,0)))},s.clear=()=>{i?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),o&&clearTimeout(o),r=null,o=null,i=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function y5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function b5(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function v5(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function x5(e,t,n,r,o,i){const a=t+i.x,s=n+i.y,l=o;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function S5(e){let{area:t,vx:n,vy:r,width:o,height:i,offset:a}=e;const s=n+a.x,l=r+a.y,u=o,c=i;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+u>t.width?-(s+u-t.width):0,p+=l+c>t.height?-(l+c-t.height):0,{x:d,y:p}}function w5(e){let{options:t,pointer:n,width:r,height:o,dockOrder:i,x:a,y:s}=e;const{targetBounds:l}=n,u=y5(t.offset),c=u[t.dock];if(c)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c},computedArrowStyle:v5(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=b5(r,o,t.offset),f=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<i.length;e+=1){const n=i[e],l=S5({area:d,vx:h,vy:m,width:r,height:o,offset:p[n]}),c={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u[n]},g=v5(t.offset)[n];0!==l.x&&(c.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(c.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:c,computedArrowStyle:g,dock:n,rect:{width:r,height:o}};if(0===l.x&&0===l.y)return y;y.offset=l,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function C5(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const o=r.rect;return EW({scaleRatio:o.scaleRatio},o.computedInner)}const E5={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:o,height:i,options:a}=e;const{targetBounds:s}=r,{x:l,y:u,width:c,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:u+d/2},right:{x:l+c,y:u+d/2},top:{x:l+c/2,y:u},bottom:{x:l+c/2,y:u+d},inside:{x:l+c/2,y:u+d/2}},f=y5(a.offset),h=f[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:h},computedArrowStyle:v5(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=b5(o,i,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(x5(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,o,i,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:f[t]},computedArrowStyle:v5(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:o,area:i,width:a}=e;const s="top",l="target"===t.area?n[s].x:o.left+n[s].x,u=("target"===t.area?n[s].y:(o.top,n[s].y),r[s]),c=l+u.x,d=(u.y,a);let p=n.top.x;return c<0&&c+d>i.width||(c<0?p-=c:c+d>i.width&&(p-=c+d-i.width)),p}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:o});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:f.top},computedArrowStyle:v5(a.offset+b-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:o}=e;const{x:i,y:a}=n;return w5({x:i,y:a,pointer:n,width:r,height:o,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:o,nodes:i,resources:a}=e;const s=i[0],{dx:l,dy:u}=n,c=a.getComponentBoundsFromNode(s),d=l+c.x+c.width/2,p=u+c.y+c.height/2,{start:f,end:h,outerRadius:m}=s.desc.slice,g=(f+h)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y;let v=["top","left","right","bottom"];return"auto"===t.dock&&(v=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),w5({x:d+m*c.scaleRatio.x*Math.cos(b),y:p+m*c.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:o,options:t,dockOrder:v})}};function k5(e,t){let{width:n,height:r}=e,{chart:o,state:i,props:a}=t;const s={resources:{formatter:o.formatter,scale:o.scale,component:o.component,getComponentBoundsFromNode:e=>C5(e,i.pointer,o),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=C5(e,t,n),o=e.bounds;return{x:r.x+t.dx+o.x,y:r.y+t.dy+o.y,width:o.width,height:o.height}}(e,i.pointer,o)},nodes:i.activeNodes,pointer:i.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let u={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(u=EW(u,a.placement(s))),"object"===l&&E5[a.placement.type]?u=EW(u,a.placement):"string"===l&&E5[a.placement]&&(u=EW(u,{type:a.placement})),s.options=u;const c=E5[u.type](s);let{x:d,y:p,width:f,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,f+=d,p+=s.pointer.dy,h+=p,c.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(c.computedTooltipStyle.left)),f),"px"),c.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(c.computedTooltipStyle.top)),h),"px"),c}let R5;function _5(){R5=null}const M5={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const A5={require:["chart","renderer"],defaultSettings:{settings:M5,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,o=0,i=0;e.center?(o+=e.center.x,i+=e.center.y):(o+=e.clientX,i+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=o,u=i,c=a.left-s.left,d=a.top-s.top,p=o-a.left,f=i-a.top;return o-=s.left,i-=s.top,{x:o,y:i,dx:c,dy:d,cx:p,cy:f,clientX:l,clientY:u,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=g5({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){R5&&R5!==e&&R5()}(t),R5=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,EW({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,EW({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),R5===t&&(R5=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),_5()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),_5()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:o,h:i}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:i},s=[];return e.forEach((e=>{if("function"==typeof o.extract){const t=EW({node:e},a);s.push(o.extract(t))}})),s}(e,this),n=k5(m5(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=m5(t,n,this)}};const D5={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var P5={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},L5=/([astvzqmhlc])([^astvzqmhlc]*)/gi,I5=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function q5(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(L5,((e,n,r)=>{const o=function(e){const t=e.match(I5);return t?t.map(Number):[]}(r);let i=n.toLowerCase(),a=n;if("m"===i&&o.length>2&&(t.push([a,...o.splice(0,2)]),i="l",a="m"===a?"l":"L"),o.length<P5[i])return"";for(t.push([a,...o.splice(0,P5[i])]);o.length>=P5[i]&&o.length&&P5[i];)t.push([a,...o.splice(0,P5[i])]);return""})),t}const T5=2*Math.PI;function O5(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function N5(e,t,n,r,o){const i=1-e;return i**3*t+3*i**2*e*n+3*i*e**2*r+e**3*o}function z5(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(i<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return o[o.length-1]!==e&&o.push(e),o.push(r),o;const a=O5(e,t),s=O5(t,n),l=O5(n,r),u={x:N5(.5,e.x,t.x,n.x,r.x),y:N5(.5,e.y,t.y,n.y,r.y)},c=O5(a,s),d=O5(s,l);return z5(e,a,c,u,o,i-1),z5(u,d,l,r,o,i-1),o}function F5(e,t,n){const{cp1:r,cp2:o}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return z5(e,r,o,n)}function j5(e,t,n){const r=[],o=!!e[4],i=!!e[5],a=e[3];let s,l,u,c,d=e[6],p=e[7],f=e[1],h=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!f||!h)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:f,ry:h,sweepAngle:u,startAngle:c}=function(e,t,n,r,o,i,a,s,l){let u,c,d,p,f,h;const m=iQ(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-i)/2,v=(l-a)/2,x=g*b+y*v,S=g*v-y*b;h=x**2/(e=Math.abs(e))**2+S**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const w=e*S,C=t*x,E=w**2+C**2,k=(e*t)**2-E;let R=Math.sqrt(Math.max(k/E,0));r===o&&(R=-R);const _=R*(w/t),M=R*(-C/e);p=g*_-y*M+(s+i)/2,f=y*_+g*M+(l+a)/2;const A=(x-_)/e,D=(S-M)/t,P=(-x-_)/e,L=(-S-M)/t;return u=Math.atan2(D,A),u+=u<0?T5:0,c=Math.atan2(L,P),c+=c<0?T5:0,d=c-u,!o&&u<c?d-=T5:o&&c<u&&(d+=T5),d%=T5,{startAngle:u,sweepAngle:d,cx:p,cy:f,rx:e,ry:t}}(f,h,a,o,i,d,p,t,n));const m=Math.abs(u*Math.sqrt((f**2+h**2)/2)),g=Math.ceil(m/10),y=u/g;for(let e=1;e<=g;e++){const t=(c+y*e)%T5,n=Math.cos(t),o=Math.sin(t);r.push({x:s+n*f+-o*n,y:l+o*h+n*o})}return r}function H5(e){const t=q5(e),n=[],r=[];let o=0,i=0,a=null,s=null,l=null,u=null;for(let e=0;e<t.length;++e){const c=t[e],d=c[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,u=null),d){case"m":r.length&&n.push(r.splice(0));case"l":o+=c[1],i+=c[2],r.push({x:o,y:i});break;case"M":r.length&&n.push(r.splice(0));case"L":o=c[1],i=c[2],r.push({x:o,y:i});break;case"H":o=c[1],r.push({x:o,y:i});break;case"h":o+=c[1],r.push({x:o,y:i});break;case"V":i=c[1],r.push({x:o,y:i});break;case"v":i+=c[1],r.push({x:o,y:i});break;case"a":r.push(...j5(c,o,i)),o+=c[6],i+=c[7];break;case"A":r.push(...j5(c,o,i)),o=c[6],i=c[7];break;case"c":r.push(...z5({x:o,y:i},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i},{x:c[5]+o,y:c[6]+i})),a=c[3]+o,s=c[4]+i,o+=c[5],i+=c[6];break;case"C":r.push(...z5({x:o,y:i},{x:c[1],y:c[2]},{x:c[3],y:c[4]},{x:c[5],y:c[6]})),a=c[3],s=c[4],o=c[5],i=c[6];break;case"s":null!==a&&null!==a||(a=o,s=i),r.push(...z5({x:o,y:i},{x:2*o-a,y:2*i-s},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),a=c[1]+o,s=c[2]+i,o+=c[3],i+=c[4];break;case"S":null!==a&&null!==a||(a=o,s=i),r.push(...z5({x:o,y:i},{x:2*o-a,y:2*i-s},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),a=c[1],s=c[2],o=c[3],i=c[4];break;case"Q":r.push(...F5({x:o,y:i},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),l=c[1],u=c[2],o=c[3],i=c[4];break;case"q":r.push(...F5({x:o,y:i},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),l=c[1]+o,u=c[2]+i,o+=c[3],i+=c[4];break;case"T":null!==l&&null!==l||(l=o,u=i),l=2*o-l,u=2*i-u,r.push(...F5({x:o,y:i},{x:l,y:u},{x:c[1],y:c[2]})),o=c[1],i=c[2];break;case"t":null!==l&&null!==l||(l=o,u=i),l=2*o-l,u=2*i-u,r.push(...F5({x:o,y:i},{x:l,y:u},{x:c[1]+o,y:c[2]+i})),o+=c[1],i+=c[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const B5={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{H5(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var $5=[function(e){e.component("box",VZ),e.component("box-marker",VZ)},function(e){e.component("point",JZ),e.component("point-marker",JZ)},function(e){e.component("pie",t0)},function(e){e.component("grid-line",a0)},function(e){e.component("ref-line",y0)},function(e){e.component("axis",U0)},function(e){e.component("container",G0)},function(e){e.component("text",X0)},function(e){e.component("scrollbar",Z0)},function(e){e.component("brush-range",h1),e.component("brush-area-dir",b1)},function(e){e.component("range",w1)},function(e){e.component("brush-lasso",M1)},function(e){e.component("labels",H2)},function(e){e.component("legend-cat",e5)},function(e){e.component("legend-seq",a5)},function(e){e.component("line",c5)},function(e){e.component("brush-area",h5)},function(e){e.component("tooltip",A5)},function(e){e.component("debug-collider",D5)},function(e){e.component("debug-path-to-points",B5)}];class V5{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}}class W5{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:o,minHeight:i})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,o)):(this.x=e+Math.min(n,-o),this.width=-Math.min(n,-o)),r>=0?(this.y=t,this.height=Math.max(r,i)):(this.y=t+Math.min(r,-i),this.height=-Math.min(r,-i))}containsPoint(e){return VQ(this,e)}intersectsLine(e){return WQ(this,OW(e))}intersectsRect(e){return BQ(this,TW(e))}intersectsCircle(e){return OQ(e,this)}intersectsPolygon(e){return HQ(e,this)}intersectsGeoPolygon(e){return ZQ(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class U5{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return TQ(this,e)}intersectsLine(e){return NQ(this,OW(e))}intersectsRect(e){return OQ(this,TW(e))}intersectsCircle(e){return n=e,!PQ(t=this)&&!PQ(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return zQ(this,e)}intersectsGeoPolygon(e){return XQ(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class G5{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:o})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(o)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return NQ({cx:e.x,cy:e.y,r:this.tolerance},this)}return GQ(this,e)}intersectsLine(e){return UQ(this,OW(e))}intersectsRect(e){return WQ(TW(e),this)}intersectsCircle(e){return NQ(e,this)}intersectsPolygon(e){return jQ(e,this)}intersectsGeoPolygon(e){return QQ(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class Y5{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return FQ(this,e)}intersectsCircle(e){return zQ(e,this)}intersectsLine(e){return jQ(this,OW(e))}intersectsRect(e){return HQ(this,TW(e))}intersectsPolygon(e){return YQ(this,e)}intersectsGeoPolygon(e){return KQ(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function K5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Y5(...t)}function X5(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function J5(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class Q5{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)J5(this.vertices[e]),this.vertices[e].length>2&&X5(this.vertices[e]),this.polygons[e]=K5({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return JQ(this,e)}intersectsCircle(e){return XQ(e,this)}intersectsLine(e){return QQ(this,OW(e))}intersectsRect(e){return ZQ(this,TW(e))}intersectsPolygon(e){return KQ(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!BQ(n,r)&&($Q(r,n)?qQ(t,e):qQ(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Z5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Q5(...t)}class e3{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>GQ(t,e)))}intersectsCircle(e){return this.segments.some((t=>NQ(e,t)))}intersectsLine(e){const t=OW(e);return this.segments.some((e=>UQ(e,t)))}intersectsRect(e){const t=TW(e);return this.segments.some((e=>WQ(t,e)))}intersectsPolygon(e){return this.segments.some((t=>jQ(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>QQ(e,t)))}points(){return this._points}}const t3=HU();function n3(e,t){return t3.get(e)(t)}t3.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new W5(...t)})),t3.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new U5(...t)})),t3.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new G5(...t)})),t3.add("polygon",K5),t3.add("geopolygon",Z5),t3.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new e3(...t)}));class r3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=n3(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class o3{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new o3).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,o;if(e instanceof o3&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(o=0;o<3;o++)r[t][n]+=this._elements[t][o]*e[o][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,o,i){return this.multiply([[e,n,o],[t,r,i],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],o=this._elements[1][1],i=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],u=0;return u=e*o*l+t*i*a+n*r*s-n*o*a-t*r*l-e*i*s,u}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],o=this._elements[1][0],i=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],u=this._elements[2][2];return this._elements=[[i*u-a*l,r*l-n*u,n*a-r*i],[a*s-o*u,t*u-r*s,r*o-t*a],[o*l-i*s,s*n-t*l,t*i-n*o]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],o=this._elements,i=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)i[t]+=r[n]*o[t][n];return{x:i[0],y:i[1]}}transformPoints(e){let t,n,r,o,i,a=this._elements,s=[];for(o=0;o<e.length;o++){for(t=[e[o].x,e[o].y,1],i=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)i[n]+=t[r]*a[n][r];s.push({x:i[0],y:i[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const i3=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function a3(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],o=t.args[2];e.translate(r,o),e.rotate(n),e.translate(-r,-o)}else 1===t.args.length&&e.rotate(n)}function s3(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function l3(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function u3(e,t){t.args.length>=6&&e.transform(...t.args)}function c3(e,t){const n=function(e){let t,n=[];for(;null!==(t=i3.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,o=n.length;e<o;e++)r=n[e],"rotate"===r.cmd?a3(t,r):"scale"===r.cmd?s3(t,r):"matrix"===r.cmd?u3(t,r):"translate"===r.cmd&&l3(t,r)}const d3={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},p3={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const o=r.attrs[e];if(!t)return void 0!==o;if(void 0===o)return!1;switch(t){case"=":return n===String(o);case"!=":return n!==String(o);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function f3(e,t){if(!t||!t.length||!e||"function"!=typeof p3[e.type])return[];switch(e.type){case"type":case"tag":return p3[e.type](e.value,t);case"attr":return p3[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return p3[e.type](t);default:return[]}}var h3={find:function(e,t){const n=[],r=[];let o,i;if(t.isBranch){let a;o=function(e){const t=[];let n,r,o,i;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{o=e.match(d3[t]),o&&(i=!0,e=e.slice(o[0].length),r={type:t,value:o[0]},"attr"===t&&(o=o[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=o[1],r.operator=o[2],r.attributeValue=o[3]),n.push(r))};for(;e&&(i=!1,o=e.match(/^\s*([>+~]|\s)\s*/),o&&(i=!0,n.push({type:" ",value:o[0]}),e=e.slice(o[0].length)),Object.keys(d3).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),i););})),t}(e),i=t.descendants;for(let e=0,t=o.length;e<t;e++){a=o[e];const t=[];let n=i.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=i.slice(),void(s=!1);n=f3(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,o=r[e].length;t<o;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function m3(e,t,n){const r=e.type;let o=e.points();n&&(o=o.every((e=>Array.isArray(e)))?o.map((e=>n.transformPoints(e))):n.transformPoints(o)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(o,t);let i=null;if("rect"===r||"bounds"===r)i=TW(o),i.type=r;else if("circle"===r)i=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(o,e.r),i.type=r;else if("line"===r)i=OW(o),i.type=r;else if("polygon"===r||"polyline"===r){i={type:"path",d:rQ(o,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<o.length;t++)e+=rQ(o[t],!0);i={type:"path",d:e}}return i}class g3{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:o,height:i}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:o,height:i}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>m3(e,t,n)))}:m3(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new g3(e))),this._parent=()=>e.parent?new g3(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let o=r.left,i=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();o-=t,i-=n}return n.x+=o,n.y+=i,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function y3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new g3(...t)}class b3{constructor(e){this._node=y3(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function v3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new b3(...t)}function x3(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=v3(n);const e=n.parent;e&&"stage"!==e.type&&x3(e,t.parent)}}function S3(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?Z5(n):K5(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const o=e.descendants[r];if(null!==o.collider&&o.collider[t](n)){const e=v3(o);return x3(o,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=v3(e);return x3(e,t),t}return null}(e,t,r)}function w3(e,t,n,r){const o=e.length;for(let i=0;i<o;i++){const o=e[i],a=S3(o,t,r);a&&n.push(a),!o.children||a||o.collider||w3(o.children,t,n,r)}}function C3(e,t,n){const r=e.length;for(let o=0;o<r;o++){const r=e[o];if(null!==S3(r,t,n))return!0;if(r.children&&!r.collider)return C3(r.children,t,n)}return!1}function E3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(NW(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=qW(e).map((e=>uQ(e,t))),["intersectsRect",n];case"line":return n=IW(e).map((e=>uQ(e,t))),["intersectsLine",n];case"point":return n=uQ(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>uQ(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>uQ(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function k3(e,t){const[n,r]=E3(t,e.dpi),o=[];return n&&(w3([e],n,o,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function R3(e,t){const[n,r]=E3(t,e.dpi);return C3([e],n,r)}class _3 extends V5{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:o,fillReference:i}=e;var a,s;a=this.attrs,s=e,Object.keys(nQ).forEach((e=>{const t=s[e];void 0!==t&&(a[nQ[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=EW(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof o&&(this.strokeReference=o),"string"==typeof i&&(this.fillReference=i)}findShapes(e){return h3.find(e,this).map((e=>y3(e)))}getItemsFrom(e){return k3(this,e)}containsPoint(e){return R3(this,e)}intersectsLine(e){return R3(this,e)}intersectsRect(e){return R3(this,e)}intersectsCircle(e){return R3(this,e)}intersectsPolygon(e){return R3(this,e)}intersectsGeoPolygon(e){return R3(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o3;void 0!==this.attrs.transform&&c3(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o3;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,o=Object.keys(r);if(n.length!==o.length)return!1;for(let e=0;e<n.length;e++){const o=n[e];if(!Object.hasOwnProperty.call(r,o))return!1;if(t[o]!==r[o])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new r3(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=n3("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=n3(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class M3 extends V5{addChild(e){if(!(e&&e instanceof V5))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const A3=M3.prototype;class D3 extends _3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=EW({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,o]=e.bounds(t),{x:i,y:a}=r,{x:s,y:l}=o,u=isNaN(n.width)?s:Math.max(s,n.width+n.x),c=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?i:Math.min(i,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=u-n.x,n.height=c-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=EW({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=A3.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=EW({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=A3.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=EW({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(A3.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=EW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(A3.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=EW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function P3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new D3(...t)}class L3 extends D3{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const I3=M3.prototype,q3=["x1","x2","y1","y2","id","offset","style"];class T3 extends _3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=q3.length;r!==o;r++)n=q3[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return I3.addChild.call(this,e)}addChildren(e){return I3.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return I3.removeChild.call(this,e),this}removeChildren(e){return I3.removeChildren.call(this,e),this}}function O3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new T3(...t)}const N3=M3.prototype,z3=["patternUnits","x","y","width","height","id"];class F3 extends _3{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=z3.length;r!==o;r++)n=z3[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return N3.addChild.call(this,e)}addChildren(e){return N3.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return N3.removeChild.call(this,e),this}removeChildren(e){return N3.removeChildren.call(this,e),this}}class j3 extends _3{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:o=0,rx:i=0,ry:a=0,collider:s}=e,l=EW({type:"rect",x:t,y:n,width:r,height:o},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),o>=0?(this.attrs.y=n,this.attrs.height=o):(this.attrs.y=n+o,this.attrs.height=-o),i>0&&(this.attrs.rx=i),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=qW(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,o,i,a]=LW(n);return this.__boundingRect[e]={x:r,y:o,width:i-r,height:a-o},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class H3 extends _3{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:o}=e,i=EW({type:"circle",cx:t,cy:n,r:r},o);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=i,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:o}=this.attrs,i=t-r,a=n-o;let s=2*r,l=2*o,u=[{x:i,y:a},{x:i+s,y:a},{x:i+s,y:a+l},{x:i,y:a+l}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const[t,n,r,o]=LW(u);s=r-t,l=o-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=u;return this.__bounds[e]}}class B3 extends _3{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:o=0,collider:i}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=o;const a={type:"line",x1:t,y1:n,x2:r,y2:o};this.collider=EW(a,i),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=IW(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,o,i]=LW(t),a=n!==o||r!==i;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,o-n):0,height:a?Math.max(1,i-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const $3=Math.PI/2;function V3(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function W3(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const U3={step:function(e){return new TU(e,.5)},stepAfter:function(e){return new TU(e,1)},stepBefore:function(e){return new TU(e,0)},linear:pU,basis:function(e){return new xU(e)},cardinal:CU.tension(0),catmullRom:kU,monotonex:function(e){return new DU(e)},monotoney:function(e){return new PU(e)},natural:function(e){return new IU(e)}};function G3(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class Y3 extends _3{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=cU();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:o,stngs:i,generatorType:a}=e,s=mU(),l=i.coordinates?i.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(U3["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const u=i.connect?o.filter(s.defined()):o,c=("area"===a?s:s[a]())(u);this.attrs.d=c}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=H5(this.attrs.d),this.segments.length>1&&this.segments.every((e=>G3(e))))return void(this.collider=EW({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(G3(t))this.collider=EW({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],o=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const i=e.length-1;for(let n=1;n<i;n++){const a=e[n-1],s=e[n],l=e[n+1],u=V3(s,a),c=V3(s,l),d=(u+c)/2,p=d+Math.PI,f=Math.max(d,p),h=Math.min(d,p),m=u>c;if(1===n){const e=V3(a,s);r.push(W3(a,e-$3,t)),o.unshift(W3(a,e+$3,t))}const g=m?f:h,y=m?h:f;if(r.push(W3(s,g,t)),o.unshift(W3(s,y,t)),n===i-1){const e=V3(l,s);r.push(W3(l,e+$3,t)),o.unshift(W3(l,e-$3,t))}}return{type:"polygon",vertices:[...r,...o]}}(t,n,e.collider)}else this.collider=EW({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:H5(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let o=0;o<r;o++){n=e[o];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,o,i]=LW(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:o-n||0,height:i-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function K3(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class X3 extends _3{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:o=0,textBoundsFn:i,text:a,title:s,collider:l,boundingRect:u,ellipsed:c}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=o,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof u?this._textBoundsFn=()=>u:"function"==typeof i&&(this._textBoundsFn=i),"string"==typeof c&&(this.ellipsed=c),this.collider=EW({type:K3(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=qW(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[o,i,a,s]=LW(r);return this.__boundingRect[t]={x:o,y:i,width:a-o,height:s-i},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const J3=HU();function Q3(e,t){return J3.get(e)(t)}J3.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new j3(...t)})),J3.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new H3(...t)})),J3.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new X3(...t)})),J3.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new B3(...t)})),J3.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Y3(...t)})),J3.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new L3(...t)})),J3.add("container",P3),J3.add("defs",P3),J3.add("linearGradient",O3),J3.add("radialGradient",O3),J3.add("conicGradient",O3),J3.add("stop",O3),J3.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new F3(...t)}));const Z3=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=n(),i={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==o[a]&&(i[a]=o[a]);return EW(i,r),t.push(i),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function e6(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function t6(e,t,n){e.node=n[t],e.index=t}function n6(e,t,n,r){let o=!1;const i={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(t6(i,a,e),e6(i,r.create),o="function"==typeof i.node.disabled?i.node.disabled():i.node.disabled,o)continue;i.node=Z3.save(i.node);const s=Q3(i.node.type,i.node);s&&(i.node.transform&&(n.save(),c3(i.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),i.node.children&&n6(i.node.children,s,n,r),i.node.transform&&n.restore()),Z3.restore()}}function r6(e){let{items:t,stage:n,dpi:r,on:o={}}=e;return n||(n=Q3("stage",r)),n6(t,n,new o3,o),n}function o6(e,t,n){const{orientation:r,degree:o,stops:i=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,o=n.y||0;a=e.createConicGradient(t,r,o)}else{const r=aQ(o);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const i=t.boundingRect();a=e.createLinearGradient(i.x+r.x1*i.width,i.y+r.y1*i.height,i.x+r.x2*i.width,i.y+r.y2*i.height)}for(let e=0,t=i.length;e<t;e++){let t=i[e];a.addColorStop(t.offset,t.color)}return a}function i6(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function a6(){let{x:e,y:t,width:n,height:r,scaleRatio:o,margin:i,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==o&&(s.scaleRatio.x=isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==i&&(s.margin.left=isNaN(i.left)?0:i.left,s.margin.top=isNaN(i.top)?0:i.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function s6(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:I2,textBounds:T2,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function l6(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const u6=200,c6=200;class d6{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:o}=e;t=o?"function"==typeof o?o(n):o:{width:n.computedPhysical.width+2*u6,height:n.computedPhysical.height+2*c6},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const p6=HU();function f6(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function h6(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function m6(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function g6(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=Object.keys(r);for(let o=0,i=n.length;o<i;o++){let i=n[o];const a=i[0],s=i[1],l=i[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=o.length;t<n;t++){const n=o[t];e[n]=r[n]}}function y6(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let i=e[o],a={};t.save(),i.attrs&&(i.attrs.fill||i.attrs.stroke)&&(i.attrs.fill&&"object"==typeof i.attrs.fill&&"gradient"===i.attrs.fill.type?a.fillStyle=o6(t,i,i.attrs.fill):i.attrs.fill&&"object"==typeof i.attrs.fill&&"pattern"===i.attrs.fill.type&&(a.fillStyle=r.patterns.create(i.attrs.fill)),i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"gradient"===i.attrs.stroke.type?a.strokeStyle=o6(t,i,i.attrs.stroke):i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"pattern"===i.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(i.attrs.stroke))),g6(t,i,n,a),i.modelViewMatrix&&m6(i.modelViewMatrix.elements,t),p6.has(i.type)&&p6.get(i.type)(i.attrs,{g:t,doFill:"fill"in i.attrs&&"none"!==i.attrs.fill,doStroke:"stroke"in i.attrs&&0!==i.attrs["stroke-width"],ellipsed:i.ellipsed}),i.children&&y6(i.children,t,n,r),t.restore()}}function b6(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r6;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let o,i=!1,a=a6();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",f6]];let l;const u=s6();return u.element=()=>e,u.root=()=>e,u.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),u.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new d6(e)),n.appendChild(e),e),u.getScene=r=>{const o=h6(t&&t.getContext()||e.getContext("2d")),i=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*o*i,", ").concat(a.edgeBleed.top*o*s,")"):""};return 1===o&&1===i&&1===s||(l.transform+="scale(".concat(o*i,", ").concat(o*s,")")),n({items:[l],dpi:o,on:{create:[C2(u.measureText),l6(u)]}})},u.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const o=e.key;return o?(r[o]=r[o]||i6(e,t,n),r[o]):i6(e,t,n)},clear(){r={}}}}(e.ownerDocument));const c=t&&t.getContext()||e.getContext("2d"),d=h6(c),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;i&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const f=u.getScene(n),h=!o||!f.equals(o);l.clear();const m=i||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||u.clear(),y6(f.children,c,s,{patterns:l})),t&&(e.width=e.width,t.apply()),i=!1,g&&!g.isFirst&&f.children.unshift(...o.children),o=f,m},u.itemsAt=e=>o?o.getItemsFrom(e):[],u.findShapes=e=>o?o.findShapes(e):[],u.clear=()=>(e&&(e.width=e.width),t&&t.clear(),o=null,u),u.size=e=>{if(e){const t=a6(e);JSON.stringify(a)!==JSON.stringify(t)&&(i=!0,a=t)}return a},u.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),o=null},u}function v6(e,t){p6.add(e,t)}function x6(e,t){return Math.max(0,Math.min(e,t))}const S6=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),w6=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),C6=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function E6(e){return S6.test(e)}function k6(e){return w6.test(e)||C6.test(e)}function R6(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],E6(n))return"ltr";if(k6(n))return"rtl"}return"ltr"}const _6={start:"end",end:"start",center:"center",middle:"middle"};function M6(e,t){return"rtl"===t?_6[e]:e}function A6(e,t){const n=[];let r;const o=[],i=[],a=[];let s,l;const u=e=>e.id,c=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(c)),t=t.map(c),s=e.map(u),l=t.map(u);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):i.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?o.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=A6([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=i.length;e<t;e++)i[e].diff=A6(a[e].children||[],i[e].content.children||[]),i[e].object=a[e].object,i[e].children=i[e].diff.items;return r=i.concat(n),n.isTree=!0,o.isTree=!0,i.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:i,updatedOld:a,removed:o,items:r}}function D6(e,t,n){for(let r=0,o=e.length;r<o;r++)e[r].object=n(e[r].content.type,t)}function P6(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function L6(e,t,n,r){let o;for(let i=0,a=e.length;i<a;i++)o=e[i],null!==o.object&&void 0!==o.object&&(n(o.object,o.content),o.diff&&(D6(o.diff.added,o.object,t),P6(o.diff.removed,r),L6(o.diff.items,t,n,r)))}function I6(e,t,n,r,o,i){const a=A6(e,t);return D6(a.added,n,r),P6(a.removed,i),L6(a.items,r,o,i),a.items}v6("rect",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,o,i,a){i=x6(r/2,i>0?i:a),a=x6(o/2,a>0?a:i),e.moveTo(t,n+a),e.lineTo(t,n+o-a),e.quadraticCurveTo(t,n+o,t+i,n+o),e.lineTo(t+r-i,n+o),e.quadraticCurveTo(t+r,n+o,t+r,n+o-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-i,n),e.lineTo(t+i,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),o&&n.stroke()})),v6("circle",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),o&&n.stroke()})),v6("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),v6("path",(function(e,t){let{g:n,doStroke:r,doFill:o}=t;const i=new Path2D(e.d);o&&n.fill(i),r&&n.stroke(i)})),v6("text",(function(e,t){let{g:n,ellipsed:r,doStroke:o}=t;const i=r||E2(e,I2);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=R6(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=M6("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=k2(e);n.fillText(i,e.x+e.dx,e.y+e.dy+l),o&&n.strokeText(i,e.x+e.dx,e.y+e.dy+l)}));const q6="http://www.w3.org/2000/svg",T6=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(q6,"container"===e?"g":e);return t.appendChild(n),n},O6=e=>{e.parentNode&&e.parentNode.removeChild(e)},N6=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||E2(t.attrs,I2);const n=R6(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",M6(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(q6,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let o=0;o="dominant-baseline"===n?k2(t.attrs):t.attrs[n],e.setAttribute("dy",o+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class z6{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function F6(){return new z6(I6,T6,N6,O6)}function j6(e){let t,n,r,o=0;if(0===(e=JSON.stringify(e)).length)return o;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),o=(o<<5)-o+n,o&=o;return o}function H6(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q6,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r6;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:F6)();let r,o,i,a=!1,s=a6();const l={transform:void 0,disableScreenReader:!1},u=s6(),c={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j6,n={},r=Date.now();const o={onCreate(o){let i={};o.node&&"object"==typeof o.node.fill&&"pattern"===o.node.fill.type&&o.node.fill.shapes&&(i.fill=o.node.fill),o.node&&"object"==typeof o.node.stroke&&"pattern"===o.node.stroke.type&&o.node.stroke.shapes&&(i.stroke=o.node.stroke),Object.keys(i).forEach((a=>{let s="";const l=i[a],u=t(l),c="picasso-pattern-".concat(r,"-").concat(u);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[u]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:c,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[u]=!0}o.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(c,"')")}))},clear(){n={}}};return o}(c.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j6,n={},r=Date.now();const o={getOrCreateGradient(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(o[i]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=o[i],u={};void 0===r&&(r=90),"radial"===t?u.type="radialGradient":(u=aQ(r),["x1","x2","y1","y2"].forEach((e=>{e in o[i]&&(u[e]=o[i][e])})),u.type="linearGradient"),u.id=l,u.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(u),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=o.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=o.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return o}(c.children);return u.element=()=>r,u.root=()=>o,u.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),u.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),o=t.ownerDocument.createElementNS(e,"g"),o.style.pointerEvents="auto",r.appendChild(o)),t.appendChild(r),r),u.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,o={type:"container",children:Array.isArray(e)?[...e,c]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(o.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[o],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,C2(u.measureText),l6(u)]}})},u.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return o.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}o.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),c.children.length=0;const f=u.getScene(e),h=!i||!f.equals(i),m=a||h;return m&&(u.clear(),n.render(f.children,o)),a=!1,i=f,m},u.itemsAt=e=>i?i.getItemsFrom(e):[],u.findShapes=e=>i?i.findShapes(e):[],u.clear=()=>{if(!o)return u;i=null;const e=o.cloneNode(!1);return r.replaceChild(e,o),o=e,u},u.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,o=null},u.size=e=>{if(e){const t=a6(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},u}var B6,$6,V6,W6,U6,G6,Y6,K6={},X6=[],J6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Q6(e,t){for(var n in t)e[n]=t[n];return e}function Z6(e){var t=e.parentNode;t&&t.removeChild(e)}function e4(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?B6.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return t4(e,a,r,o,null)}function t4(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++V6:o};return null==o&&null!=$6.vnode&&$6.vnode(i),i}function n4(e){return e.children}function r4(e,t){this.props=e,this.context=t}function o4(e,t){if(null==t)return e.__?o4(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?o4(e):null}function i4(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return i4(e)}}function a4(e){(!e.__d&&(e.__d=!0)&&W6.push(e)&&!s4.__r++||U6!==$6.debounceRendering)&&((U6=$6.debounceRendering)||G6)(s4)}function s4(){var e,t,n,r,o,i,a,s;for(W6.sort(Y6);e=W6.shift();)e.__d&&(t=W6.length,r=void 0,o=void 0,a=(i=(n=e).__v).__e,(s=n.__P)&&(r=[],(o=Q6({},i)).__v=i.__v+1,g4(s,i,o,n.__n,void 0!==s.ownerSVGElement,null!=i.__h?[a]:null,r,null==a?o4(i):a,i.__h),y4(r,i),i.__e!=a&&i4(i)),W6.length>t&&W6.sort(Y6));s4.__r=0}function l4(e,t,n,r,o,i,a,s,l,u){var c,d,p,f,h,m,g,y=r&&r.__k||X6,b=y.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(f=n.__k[c]=null==(f=t[c])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?t4(null,f,null,null,f):Array.isArray(f)?t4(n4,{children:f},null,null,null):f.__b>0?t4(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=y[c])||p&&f.key==p.key&&f.type===p.type)y[c]=void 0;else for(d=0;d<b;d++){if((p=y[d])&&f.key==p.key&&f.type===p.type){y[d]=void 0;break}p=null}g4(e,f,p=p||K6,o,i,a,s,l,u),h=f.__e,(d=f.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,f),g.push(d,f.__c||h,f)),null!=h?(null==m&&(m=h),"function"==typeof f.type&&f.__k===p.__k?f.__d=l=u4(f,l,e):l=c4(e,f,p,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=o4(p))}for(n.__e=m,c=b;c--;)null!=y[c]&&("function"==typeof n.type&&null!=y[c].__e&&y[c].__e==n.__d&&(n.__d=d4(r).nextSibling),x4(y[c],y[c]));if(g)for(c=0;c<g.length;c++)v4(g[c],g[++c],g[++c])}function u4(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?u4(r,t,n):c4(n,r,r,o,r.__e,t));return t}function c4(e,t,n,r,o,i){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function d4(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=d4(n)))return r;return null}function p4(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||J6.test(t)?n:n+"px"}function f4(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||p4(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||p4(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?m4:h4,i):e.removeEventListener(t,i?m4:h4,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function h4(e){return this.l[e.type+!1]($6.event?$6.event(e):e)}function m4(e){return this.l[e.type+!0]($6.event?$6.event(e):e)}function g4(e,t,n,r,o,i,a,s,l){var u,c,d,p,f,h,m,g,y,b,v,x,S,w,C,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(u=$6.__b)&&u(t);try{e:if("function"==typeof E){if(g=t.props,y=(u=E.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(g,b):(t.__c=c=new r4(g,b),c.constructor=E,c.render=S4),y&&y.sub(c),c.props=g,c.state||(c.state={}),c.context=b,c.__n=r,d=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=E.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Q6({},c.__s)),Q6(c.__s,E.getDerivedStateFromProps(g,c.__s))),p=c.props,f=c.state,c.__v=t,d)null==E.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(g,b),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(g,c.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=g,c.state=c.__s,c.__d=!1),c.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<c._sb.length;v++)c.__h.push(c._sb[v]);c._sb=[],c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(g,c.__s,b),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,f,h)}))}if(c.context=b,c.props=g,c.__P=e,x=$6.__r,S=0,"prototype"in E&&E.prototype.render){for(c.state=c.__s,c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),w=0;w<c._sb.length;w++)c.__h.push(c._sb[w]);c._sb=[]}else do{c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++S<25);c.state=c.__s,null!=c.getChildContext&&(r=Q6(Q6({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(p,f)),C=null!=u&&u.type===n4&&null==u.key?u.props.children:u,l4(e,Array.isArray(C)?C:[C],t,n,r,o,i,a,s,l),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),m&&(c.__E=c.__=null),c.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=b4(n.__e,t,n,r,o,i,a,l);(u=$6.diffed)&&u(t)}catch(e){t.__v=null,(l||null!=i)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),$6.__e(e,t,n)}}function y4(e,t){$6.__c&&$6.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){$6.__e(e,t.__v)}}))}function b4(e,t,n,r,o,i,a,s){var l,u,c,d=n.props,p=t.props,f=t.type,h=0;if("svg"===f&&(o=!0),null!=i)for(;h<i.length;h++)if((l=i[h])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,i[h]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),i=null,s=!1}if(null===f)d===p||s&&e.data===p||(e.data=p);else{if(i=i&&B6.call(e.childNodes),u=(d=n.props||K6).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||f4(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||f4(e,i,t[i],n[i],r)}(e,p,d,o,s),c)t.__k=[];else if(h=t.props.children,l4(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==f,i,a,i?i[0]:n.__k&&o4(n,0),s),null!=i)for(h=i.length;h--;)null!=i[h]&&Z6(i[h]);s||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===f&&!h||"option"===f&&h!==d.value)&&f4(e,"value",h,d.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&f4(e,"checked",h,d.checked,!1))}return e}function v4(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){$6.__e(e,n)}}function x4(e,t,n){var r,o;if($6.unmount&&$6.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||v4(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){$6.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&x4(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Z6(e.__e),e.__=e.__e=e.__d=void 0}function S4(e,t,n){return this.constructor(e,n)}function w4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,o=a6();const i={transform:void 0,disableScreenReader:!1},a=s6();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(i).forEach((t=>{void 0!==e[t]&&(i[t]=e[t])})),i),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof i.transform&&i.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:o,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(o,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return i.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(o.computedPhysical.x,"px"),n.style.top="".concat(o.computedPhysical.y,"px"),n.style.width="".concat(o.computedPhysical.width,"px"),n.style.height="".concat(o.computedPhysical.height,"px"),a=Array.isArray(e)?e4("div",null,e):e,r=function(e,t,n){var r,o,i;$6.__&&$6.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],g4(t,e=(!r&&n||t).__k=e4(n4,null,[e]),o||K6,K6,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?B6.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),y4(i,e)}(a,n,r),!0},a.renderArgs=[e4],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(o=a6(e)),o),a}B6=X6.slice,$6={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},V6=0,r4.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Q6({},this.state),"function"==typeof e&&(e=e(Q6({},n),this.props)),e&&Q6(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),a4(this))},r4.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),a4(this))},r4.prototype.render=n4,W6=[],G6="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Y6=function(e,t){return e.__v.__b-t.__v.__b},s4.__r=0;var C4=[function(e){e.renderer("svg",H6)},function(e){e.renderer("canvas",b6)},function(e){e.renderer("dom",w4)}];const E4={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const k4=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=E4.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[E4.OFF]:()=>{},[E4.ERROR]:function(){return t.error(...arguments)},[E4.WARN]:function(){return t.warn(...arguments)},[E4.INFO]:function(){return t.info(...arguments)},[E4.DEBUG]:function(){return t.log(...arguments)}},o=function(e){if(e&&!(n<e)){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];(r[e]||r[E4.DEBUG])(...o)}};return{log:o,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(E4.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:E4}}(t.logger),o={component:HU(n.component,"component",r),data:HU(n.data,"data",r),formatter:HU(n.formatter,"formatter",r),interaction:HU(n.interaction,"interaction",r),renderer:MZ(n.renderer),scale:HU(n.scale,"scale",r),symbol:HU(n.symbol,"symbol",r),logger:r};function i(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:EW({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},o)}return t.renderer&&t.renderer.prio&&o.renderer.default(t.renderer.prio[0]),i.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o)},i.chart=e=>_Z(e,{registries:o,logger:r,style:t.style,palettes:t.palettes}),i.config=()=>t,Object.keys(o).forEach((e=>{i[e]=o[e]})),i.version=kW,i}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:AZ,data:qZ,formatter:dK,interaction:TZ,renderer:MZ(),scale:pJ,symbol:bQ});$5.forEach(k4.use),C4.forEach(k4.use),[].forEach(k4.use);const R4=e=>({key:"bars",type:"box",data:{extract:{field:k$,props:{start:0,end:{field:R$}}}},settings:{major:{scale:_$},minor:{scale:M$},box:{maxWidthPx:8,fill:{fn:e}}}}),_4=e=>({key:"p",type:"point",data:{extract:{field:k$,props:{y:{field:R$}}}},settings:{x:{scale:_$},y:{scale:M$},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),M4=({qNum:e})=>void 0===e?0:Math.sign(e),A4=(e,t)=>{const{primary:n,nil:r,others:o}=e.getDataColorSpecials(),i=LL(e,null==t?void 0:t.negative,n),a=LL(e,null==t?void 0:t.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:k$,props:{start:0,end:{field:R$,value:M4}}}},settings:{major:{scale:_$},minor:{scale:M$},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?o:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?i:a}}}}},D4=(e,{type:t,showDots:n,colors:r,colorMin:o,colorMax:i})=>{const a=((e,t,n,r)=>{const{primary:o,nil:i,others:a}=e.getDataColorSpecials(),s=LL(e,null==t?void 0:t.main,o),l=LL(e,null==t?void 0:t.max,s),u=LL(e,null==t?void 0:t.min,s),c=LL(e,null==t?void 0:t.first,s),d=LL(e,null==t?void 0:t.last,s);return e=>{const t=M$ in e.datum?M$:"end";return-2===e.datum.value?i:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?u:e.data.items.at(0)===e.datum?c:e.data.items.at(-1)===e.datum?d:s}})(e,r,o,i);switch(t){case"bars":return[R4(a)];case"dots":return[_4(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:k$,props:{v:{field:R$}}}},settings:{coordinates:{major:{scale:_$},minor:{scale:M$,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(LL(e,null==r?void 0:r.main,e.getDataColorSpecials().primary));return n?[t,_4(a)]:[t]}case"posNeg":return[A4(e,r)];default:return[]}},P4=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),L4=(e,t,n,r)=>({y:{data:{field:R$},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:k$}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),I4=k4();I4.use(mW),I4.renderer.prio(["canvas"]);const q4={resolve:()=>{},promise:{}},T4=({chart:e,element:t,requestId:n,theme:r,isSnapshot:o,direction:i,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:u}=(e=>{const t=Ka.useRef(e.isDownloadedAsPDForImage?Ae():q4);return{addChartPromiseToQueue:Ka.useCallback((()=>{e.waitForPromise(t.current.promise)}),[e]),resolveChartPromise:t.current.resolve}})(s),c=Ka.useCallback((()=>{if(null===t.current||null!==e.current)return;u();n.current=C$((()=>{t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:o,direction:i})=>{const{type:a,qMatrix:s,minY:l,maxY:u}=r;return I4.chart({element:e,data:{type:"q",key:"qHyperCube",data:P4(s)},settings:{scales:L4(a,l,u,i),components:D4(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{o()}})})({element:t.current,theme:r,isSnapshot:o,miniChartData:a,direction:i,onChartRendered:l}))}),{timeout:2e3})}),[t,e,u,n,r,o,a,i,l]);return{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:Ka.useCallback((()=>{null!==n.current&&E$(n.current),n.current=null,l()}),[n,l])}},O4=e=>{const t=Ka.useRef(null),n=Ka.useRef(!1);return Ka.useCallback((r=>{var o,i;const a=null!==(o=null===(i=r.contentBoxSize.at(0))||void 0===i?void 0:i.inlineSize)&&void 0!==o?o:0;(e=>{e.current&&(E$(e.current),e.current=null)})(t),n.current?0!==a?null!==e.current&&(t.current=C$((()=>{var t;null===(t=e.current)||void 0===t||t.update()}),{timeout:2e3})):n.current=!1:n.current=!0}),[e])},N4=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:o,downloadService:i,direction:a})=>{const s=Ka.useRef(null),l=Ka.useRef(null),u=Ka.useRef(null),{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:d}=T4({element:s,chart:l,requestId:u,theme:n,isSnapshot:r,direction:a,miniChartData:o,downloadService:i});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:o})=>{const i=Ka.useCallback((e=>{e.isIntersecting?r():n()}),[r,n]);Ka.useEffect((()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,i),()=>{var e;t.removeTask(r),n(),null===(e=o.current)||void 0===e||e.destroy(),o.current=null}}),[o,e,t,n,i])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:c,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{Ka.useEffect((()=>r?()=>{}:(e(),()=>{var e;t(),null===(e=n.current)||void 0===e||e.destroy(),n.current=null})),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:c,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=O4(t);Ka.useEffect((()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}}),[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},z4=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s})=>{const l=N4({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s});return Xa.createElement("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},F4="cell-text",j4=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:o=!1,lineClamp:i})=>{const{styleService:a}=Yj(Vj,(e=>e.baseProps));return o?Rl.jsx(BB,{"data-testid":F4,ref:t,className:"sn-table-cell-text",lineClamp:a.grid.headerLineClamp,isPagination:r,isHeadCell:!0,children:e}):Rl.jsx(BB,{"data-testid":F4,ref:t,className:"sn-table-cell-text",isNumeric:n,lineClamp:null!=i?i:a.grid.contentLineClamp,isPagination:r,children:e})},H4=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),B4=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},$4=(e,t)=>{const n=(e=>e.map((e=>{var t;return null!==(t=e.value)&&void 0!==t?t:e})).sort(((e,t)=>e-t)))(e),r=n.some((e=>!Fq(e)));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!Fq(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},V4=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort(((e,t)=>e.value-t.value));return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:i.gradient?{color:l.color,t:u/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return s&&f(e.localPaletteColors[t].color).blend(f(s.color),s.t)},W4=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort(((e,t)=>e.value-t.value)),e.limits=n.map((e=>({...e,value:H4(t,e.value)})))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map(((e,t)=>({color:B4(r,t,n)})))),r},U4=(e,t,n,r)=>{const o=W4(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=V4(e,a,t);break}r=i}return n})(o,t);return a},G4=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=$4(e,t),o=Math.abs(t);return{min:null!=n?n:t-o,max:null!=r?r:t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!Fq(t))return 0;let a=n&&Fq(n)?Math.min(n,t):0;const s=r.sort(((e,t)=>e.value-t.value)),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},Y4=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=G4(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(null==i||!i.length||!((e,t)=>{var n,r,o;return!(!e||0===e.length||!(null!==(n=null===(r=e[t])||void 0===r?void 0:r.gradient)&&void 0!==n?n:null===(o=e[t-1])||void 0===o?void 0:o.gradient))})(i,n.limitPaletteColorIndex))return B4(o,n.limitPaletteColorIndex,r);const a=H4(n.limitRange,t);return U4(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[(null==i?void 0:i.limitPaletteColorIndex)||0].icon,{indicator:l}=e;let u=(null==l?void 0:l.position)||"right";return"rtl"===n&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},K4=(e,t)=>{var n,r,o,i;return"rtl"===e&&"center"!==(null===(n=t.resolvedImagePosition)||void 0===n?void 0:n.horizontal)?(null===(o=t.resolvedImagePosition)||void 0===o?void 0:o.horizontal)&&(e=>"flex-start"===e?"flex-end":"flex-start")(null===(i=t.resolvedImagePosition)||void 0===i?void 0:i.horizontal):null===(r=t.resolvedImagePosition)||void 0===r?void 0:r.horizontal},X4=(e,t)=>e.representation.type===HI.Image&&"fitHeight"===e.representation.imageSize?K4(t,e.representation):e.align,J4=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",Q4=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},Z4=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,e8=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",t8=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",n8=e=>{let t="center",n="center";return"flex-start"===(null==e?void 0:e.vertical)?t="top":"flex-end"===(null==e?void 0:e.vertical)&&(t="bottom"),"flex-start"===(null==e?void 0:e.horizontal)?n="left":"flex-end"===(null==e?void 0:e.horizontal)&&(n="right"),`${n} ${t}`},r8=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},o8=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const{direction:o}=Yj(Vj,(e=>e.baseProps)),{url:i,text:a,imageSize:s,resolvedImagePosition:l}=e,u="fitHeight"===s,c=Rl.jsx("img",{src:i,alt:a,style:{...t,width:u?"auto":"100%",height:"100%",maxHeight:n,objectFit:r8(s),objectPosition:n8(l),overflow:"hidden"}});return r?Rl.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:u?n:"100%",overflow:"hidden",display:"flex",justifyContent:u?K4(o,e):void 0},children:c}):c},i8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9 7V2H7v5H2v2h5v5h2V9h5V7z"})}),a8=Ka.forwardRef(i8),s8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),l8=Ka.forwardRef(s8),u8=(e,t)=>Rl.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Rl.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Rl.jsx("use",{fillRule:"evenodd"})]}),c8=Ka.forwardRef(u8),d8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})}),p8=Ka.forwardRef(d8),f8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})}),h8=Ka.forwardRef(f8),m8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})}),g8=Ka.forwardRef(m8),y8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M2 7h12v2H2z"})}),b8=Ka.forwardRef(y8),v8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})}),x8=Ka.forwardRef(v8),S8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),w8=Ka.forwardRef(S8),C8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})}),E8=Ka.forwardRef(C8),k8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})}),R8=Ka.forwardRef(k8),_8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}),M8=Ka.forwardRef(_8),A8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})}),D8=Ka.forwardRef(A8),P8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})}),L8=Ka.forwardRef(P8),I8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})}),q8=Ka.forwardRef(I8),T8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})}),O8=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})}),N8={m:M8,"ï":E8,R:Ka.forwardRef(T8),S:D8,T:L8,U:q8,P:w8,Q:g8,"è":Ka.forwardRef(O8),"¢":p8,"©":c8,"23F4":h8,2013:R8,"&":x8,add:a8,"minus-2":b8,dot:l8},z8=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&N8[t];return o&&Xa.createElement("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r}},Xa.createElement(o,{style:{height:e}}))},F8=({representation:e,cellValue:t,paginationCellAlign:n})=>{const{styleService:r,theme:o,direction:i}=Yj(Vj,(e=>e.baseProps)),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=null!=s?s:{},c=Y4(e,t,i,o),d=(e=>parseInt(e||oj,10))(r.measure.values.fontSize),{color:p,iconKey:f,position:h}=c||{};return l?Rl.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:null!=n?n:"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:u?p:void 0},children:["left"===h&&z8({size:d,iconKey:f,color:p}),Rl.jsx(j4,{isNumeric:!0,children:a}),"right"===h&&z8({size:d,iconKey:f,color:p})]}):z8({size:d,iconKey:f,color:p})},j8=(e,t)=>e.contentStaticLineCount?e.contentLineHeight*(null!=t?t:e.grid.contentLineClamp):e.contentLineHeight,H8=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:o,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const{interactions:l,styleService:u,theme:c,layout:d,downloadService:p,direction:f}=Yj(Vj,(e=>e.baseProps)),h=Yj(Vj,(e=>{var t;return null===(t=e.selectionState.api)||void 0===t?void 0:t.isActive()}));let m=t.representation.text;if(t.representation.type!==HI.Link||h||(m=Rl.jsx(x$,{href:t.representation.url,text:t.representation.text,interactions:l,color:n.cellForegroundColor})),t.representation.type===HI.Image)return Rl.jsx(o8,{representation:t.representation,textStyle:n,maxImageHeight:j8(u,o),wrapInContainer:!r});const g=(e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN)(t.qIsNull?t.representation.text:t.qNum);return t.representation.type!==HI.Indicator||Number.isNaN(g)?t.representation.type===HI.MiniChart&&t.representation.miniChart&&!t.isNull?Rl.jsx(z4,{height:j8(u,o),intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:c,isSnapshot:!!d.snapshotData,direction:f,downloadService:p}):Rl.jsx(j4,{forwardRef:e,isNumeric:t.isNumeric,lineClamp:o,isPagination:!r,children:m}):Rl.jsx(F8,{representation:t.representation,cellValue:g,paginationCellAlign:r?void 0:s})},B8=(e,t,n,r)=>({handleMouseDown:r=>{null==e||e(r);const o=r.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>{n({type:gO.SelectMultiEnd})};n({type:gO.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:gO.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:gO.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),$8=(e,t)=>{const{paginationNeeded:n,totalsPosition:r}=Yj(Vj,(e=>e.tableData)),{selectionsAPI:o,rootElement:i,keyboard:a,interactions:s,direction:l}=Yj(Vj,(e=>e.baseProps)),u=Yj(Vj,(e=>e.setFocusedCellCoord)),c=Yj(Vj,(e=>e.selectionDispatch)),d=!!s.active&&!!s.select,p=s=>{u$({evt:s,rootElement:i,selectionsAPI:o,cell:e,selectionDispatch:c,isSelectionsEnabled:d,setFocusedCellCoord:u,announce:t,keyboard:a,paginationNeeded:n,totalsPosition:r,direction:l})},f=e=>{((e,t)=>{e.key===rI.Shift&&t({type:gO.SelectMultiEnd})})(e,c)},h=()=>{((e,t,n,r,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;e$([s,a],t,n,r)})(e,i,u,a,r)};if(!d)return{onKeyDown:p,onKeyUp:f,onMouseDown:h};const{handleMouseDown:m,handleMouseOver:g,handleMouseUp:y}=B8(h,e,c,t);return{onKeyDown:p,onKeyUp:f,onMouseDown:m,onMouseUp:y,onMouseOver:g}},V8=(e,t)=>{const{colIdx:n,rows:r,api:o}=t;let i=mO.Inactive;return null!=o&&o.isModal()&&(i=n!==e.selectionColIdx?mO.Disabled:r.has(e.qElemNumber)?mO.Selected:mO.Possible),i},W8=(e,t,n)=>{if(!n.isNull)return e;const r={...e,...t.nullValues};return t.grid.zebraStripes.show?(t.grid.zebraStripes.overrideNullValueColor&&(r.color=e.color),t.grid.zebraStripes.overrideNullValueBackground&&(r.background=e.background),r):r},U8=(e,t,n)=>{const{color:r,background:o}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...o?{background:o}:void 0}},G8=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return U8(t,e,r?"even":"odd")}return e},Y8=(e,t)=>{const{styleService:n}=Yj(Vj,(e=>e.baseProps)),r=Yj(Vj,(t=>V8(e,t.selectionState)));let o=t.isDim?n.dimension.values:n.measure.values;o=G8(o,n,e),o=W8(o,n,e);const i=Pj(o,e.qAttrExps,t.qAttrExprInfoIDs),a=function(e,t,n){return t===mO.Selected?{...e,...n}:t===mO.Disabled?{...e,background:`${nj}, ${e.background}`}:e}(Ka.useMemo((()=>e.isNull?o:Pj(o,e.qAttrExps,t.qAttrExprInfoIDs)),[o,e.qAttrExps,e.isNull,t.qAttrExprInfoIDs]),r,n.selectedColors);return{cellStyle:{...a,borderColor:n.grid.border},representationStyle:i,cellSelectionState:r}},K8=Pg(ZP,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),X8=Pg(xL,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})((({hover:e,hoverColors:t,height:n})=>({height:n,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),J8=Pg(oL,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...sj,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",width:"100%",height:"100%"}))),Q8=Pg(oL,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})((({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...sj,...e,fontWeight:ij,position:"sticky",padding:r.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?n:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",zIndex:t?1:void 0}))),Z8=({cell:e,announce:t,column:n,columnIndex:r,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:i})=>{const{interactions:a,direction:s}=Yj(Vj,(e=>e.baseProps)),{onKeyDown:l,onKeyUp:u,onMouseDown:c,onMouseUp:d,onMouseOver:p}=$8(e,t),{cellStyle:f,representationStyle:h,cellSelectionState:m}=Y8(e,n);return Rl.jsx(J8,{cellStyle:f,scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${m} ${nI}`,title:a.passive?e.representation.text:void 0,onKeyDown:l,onKeyUp:u,onMouseDown:c,onMouseUp:d,onMouseOver:p,children:Rl.jsx(H8,{cell:e,style:h,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:i,paginationCellAlign:Z4(s,e.align)})})},e9=(e,{atTop:t,atBottom:n},r)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!r&&n?e.grid.divider:e.grid.border,borderBottomColor:r&&!t||!r&&t?e.grid.divider:e.grid.border}),t9=()=>{const{columns:e,totalsPosition:t,rows:n}=Yj(Vj,(e=>e.tableData)),{rootElement:r,selectionsAPI:o,keyboard:i,styleService:a,interactions:s,direction:l}=Yj(Vj,(e=>e.baseProps)),u=Yj(Vj,(e=>e.headRowHeight)),c=Yj(Vj,(e=>e.setFocusedCellCoord)),d=!(null==o||!o.isModal()),p=!!s.active;return Rl.jsx(xL,{className:"sn-table-row sn-table-totals-row",children:e.map(((e,o)=>{const f=[t.atTop?1:n.length+1,o];return Rl.jsx(Q8,{totalsStyle:{...a.totalRow,...e9(a,t,!1)},headRowHeight:u,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${nI}`,tabIndex:-1,title:s.passive?e.totalInfo:void 0,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case rI.C:i$(n);break;case rI.Space:n.preventDefault();break;default:a$(e)}else TL(n)})({evt:e,rootElement:r,cellCoord:f,setFocusedCellCoord:c,isSelectionMode:d,isInteractionEnabled:p,direction:l})},onMouseDown:()=>{e$(f,r,c,i)},children:Rl.jsx(j4,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)}))})};var n9=Ka.memo(t9);const r9=({updateShouldRefocus:e,tableWrapperRef:t,announce:n})=>{var r;const{rows:o,columns:i,totalsPosition:a}=Yj(Vj,(e=>e.tableData)),{selectionsAPI:s,keyboard:l,layout:u,styleService:c}=Yj(Vj,(e=>e.baseProps)),d=Yj(Vj,(e=>e.selectionDispatch)),p=!(null===(r=_j(u))||void 0===r||null===(r=r.content)||void 0===r||!r.hoverEffect);b$({keyboard:l,selectionDispatch:d,selectionsAPI:s,updateShouldRefocus:e,tableWrapperRef:t});const f=(e=>{const t=Ka.useCallback((t=>new IntersectionObserver((e=>{e.forEach((e=>{const n=t.get(e.target);null==n||n(e)}))}),{root:e.current})),[e]);return m$(t)})(t),h=y$();return Rl.jsxs(K8,{lastRowBottomBorder:c.grid.lastRowBottomBorder,children:[a.atTop?Rl.jsx(n9,{}):void 0,o.map(((e,t)=>Rl.jsx(X8,{hoverColors:c.grid.hoverColors,hover:p,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:c.contentMinRowHeight,children:i.map(((t,r)=>{const{id:o}=t,i=e[r];return Rl.jsx(Z8,{columnIndex:r,cell:i,column:t,announce:n,intersectionObserverTaskScheduler:f,resizeObserverTaskScheduler:h},o)}))},`row-${t}`))),a.atBottom?Rl.jsx(n9,{}):void 0]})};var o9=Ka.memo(r9);const i9=(e,t)=>{var n;return!(null===(n=e.viewState)||void 0===n||!n.skipHeader)||!!t.hideHeader},a9=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:o,label:i}=e,{applyColumnWidths:a,interactions:s,translator:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>e.columnWidths)),d=Yj(Vj,(e=>e.setColumnWidths));if(!s.active)return null;return Rl.jsx(Zj,{columnWidth:c[o],isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{null==n||n();const t=[...c];t[o]=e,d(t)},confirmWidthCallback:t=>{a(t,e)},handleBlur:e=>{(e=>{KB(e);const t=e.closest(".sn-table-cell");JB(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:l,columnLabel:i},direction:u})},s9=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}),l9=Ka.forwardRef(s9),u9=(e,t)=>Rl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Rl.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}),c9=Ka.forwardRef(u9),d9=(e,t)=>Rl.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Rl.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),Rl.jsx("use",{fillRule:"evenodd"})]}),p9=Ka.forwardRef(d9),f9=Pg("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0}))),h9=Pg(xA,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})((({textAlign:e,theme:t,direction:n,isPagination:r})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===n?J4(e,r):void 0})));Pg("span")({border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1});const m9=Pg(xA,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})((({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let o;switch(n){case"left":o={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;o={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${ZL}`]:{gridColumn:3}};break}case"right":o={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${ZL}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}})),g9=Pg(xA,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})));Pg(xA,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({rightAligned:e})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:"24px",display:"flex"}))),Pg(aP)((({theme:e})=>({borderRadius:"4px",margin:e.spacing(0,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"}}))),Pg("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),Pg(MD)((({theme:e})=>({marginRight:e.spacing(1.5),lineHeight:0}))),Pg("div")((({theme:e})=>({height:"350px",boxSizing:"border-box",background:e.palette.common.white})));const y9=Pg(oL,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:n,background:r})=>({...sj,...e,cursor:t.active?"pointer":"default",background:r,verticalAlign:"bottom","&&:focus-visible, &&:hover":{background:t.active?n:r}})));Pg("div")({display:"flex",alignItems:"center"});const b9=Pg("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})((({align:e,dir:t})=>({minWidth:oj,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),v9=({column:e,isInteractionEnabled:t,open:n,setOpen:r,allColumnsIconVisibilityStatusRef:o,isPagination:i,forwardRef:a})=>{const{translator:s,changeSortOrder:l,interactions:u,embed:c,app:d,styleService:p,layout:f,direction:h}=Yj(Vj,(e=>e.baseProps)),m=Yj(Vj,(t=>t.columnWidths[e.pageColIdx])),g=Yj(Vj,(e=>e.baseProps.model)),y=Ka.useRef(null),b=Ka.useRef(null),v=(({styleService:e,column:t,columnWidth:n})=>{const{measureText:r}=VL({fontSize:e.header.fontSize,fontFamily:e.header.fontFamily,fontWeight:ij});return Ka.useCallback((()=>{let e=!1,o=!1,i=!1;const a=t.isLocked,s=t.isActivelySorted,l=n-25,u=a?20:0,c=s?20:0;let d=r(t.label);return a&&d+u<=l&&(i=!0,d+=u,s&&d+c<=l&&(o=!0,d+=c)),!a&&s&&d+c<=l&&(o=!0,d+=c),d+24<=l&&(e=!0,d+=24),{shouldShowMenuIcon:e,shouldShowSortIcon:o,shouldShowLockIcon:i}}),[t.isLocked,t.label,t.isActivelySorted,n,r])})({styleService:p,column:e,columnWidth:m}),x=v(),{StartIcon:S,EndIcon:w,LockIcon:C}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},o)=>{const i="A"===e?Rl.jsx(l9,{height:oj,"data-testid":"head-cell-sort-ascending-icon"}):Rl.jsx(c9,{height:oj,"data-testid":"head-cell-sort-descending-icon"}),a=n?Rl.jsx(b9,{align:t,dir:o,children:i}):void 0,s=r?Rl.jsx(g9,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Rl.jsx(p9,{height:oj,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(e,x,h);o&&(o.current[e.pageColIdx]=x);return Rl.jsxs(m9,{shouldShowMenuIcon:x.shouldShowMenuIcon,shouldShowLockIcon:x.shouldShowLockIcon,alignment:Q4(e,i,h),children:[C,Rl.jsxs(h9,{className:"sn-table-head-label",textAlign:e.headTextAlign,direction:h,isPagination:i,children:[S,Rl.jsx(j4,{forwardRef:a,isPagination:i,isHeadCell:!0,children:e.label}),w]}),t?Rl.jsxs(Rl.Fragment,{children:[Rl.jsx(oB,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:s,anchorRef:y,menuAvailabilityFlags:{[tB.Sorting]:!0,[tB.Searching]:!0,[tB.Selections]:!0,[tB.AdjusterHeaderSize]:!0},open:n,setOpen:r,interactions:u,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),l(e,n))},searchRelatedArgs:{embed:c,listboxRef:b},selectionRelatedArgs:{app:d,qStateName:f.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:QB},shouldShowMenuIcon:x.shouldShowMenuIcon,model:g,direction:h,isPagination:i}),Rl.jsx(f9,{ref:b,direction:h,isPagination:i}),Rl.jsx(f9,{ref:y,direction:h})]}):null]})},x9=({isInteractionEnabled:e,columnsData:t})=>{const[n,r]=Ka.useState(!1),{isAdjustingWidth:o,setIsAdjustingWidth:i}=(e=>{const[t,n]=Ka.useState(!1);return YL((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}})([t]);return{open:n,setOpen:r,handleOpenMenu:t=>{!e||(e=>{var t;return null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t?void 0:t.includes(oI)})(t)||o||r(!0)},setIsAdjustingWidth:i}},S9=({column:e,columnIndex:t,columnsLength:n})=>{const{interactions:r,rootElement:o,keyboard:i,styleService:a,direction:s}=Yj(Vj,(e=>e.baseProps)),{columns:l,totalsPosition:u}=Yj(Vj,(e=>e.tableData)),c=Yj(Vj,(e=>e.columnWidths[t])),d=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),p=Yj(Vj,(e=>e.setFocusedCellCoord)),f=Yj(Vj,(({focusedCellCoord:[e,n]})=>0===e&&n===t)),h=!!r.active&&!d,{open:m,setOpen:g,handleOpenMenu:y,setIsAdjustingWidth:b}=x9({isInteractionEnabled:h,columnsData:l}),v=e.isActivelySorted?yO[e.sortDirection]:void 0,x=m?tI:void 0,S=m?"true":void 0,w=t===n-1,C=[0,e.pageColIdx],E={width:c-(w?8:9),zIndex:l.length-t},k=f&&0===t&&!i.enabled&&h?0:-1;return Rl.jsxs(y9,{headerStyle:{...a.header,...e9(a,u,!0)},background:m?a.headerMenuActiveBackground:a.header.background,hoverBackground:a.headerMenuHoverBackground,interactions:r,style:E,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${nI}`,tabIndex:k,title:r.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case rI.C:i$(n);break;case rI.Enter:case rI.Space:null==r||r(n);break;default:a$(e)}else TL(n)})({evt:e,rootElement:o,cellCoord:C,setFocusedCellCoord:p,isInteractionEnabled:h,handleOpenMenu:y,direction:s})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:o,isInteractionEnabled:i})=>{e.preventDefault(),i&&e$(n,t,r,o)})({evt:e,rootElement:o,cellCoord:C,setFocusedCellCoord:p,keyboard:i,isInteractionEnabled:h})},onClick:y,"aria-sort":v,"aria-controls":x,"aria-expanded":S,"aria-haspopup":"true",children:[Rl.jsx(v9,{column:e,isInteractionEnabled:h,open:m,setOpen:g,isPagination:!0}),Rl.jsx(a9,{column:e,isLastColumn:w,setIsAdjustingWidth:b})]},e.id)},w9=()=>{const{columns:e}=Yj(Vj,(e=>e.tableData)),{styleService:t,viewService:n,layout:r}=Yj(Vj,(e=>e.baseProps)),o=Yj(Vj,(e=>e.setHeadRowHeight)),i=Yj(Vj,(e=>e.columnWidths)),a=Ka.useRef(null),s=i9(n,r);return Ka.useEffect((()=>{a.current&&o(a.current.getBoundingClientRect().height)}),[t.header.fontSize,i,o,s]),Rl.jsx(hL,{style:{visibility:s?"collapse":void 0},children:Rl.jsx(xL,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map(((t,n)=>Rl.jsx(S9,{column:t,columnIndex:n,columnsLength:e.length},t.id)))})})};var C9=Ka.memo(w9);const E9=e=>{var t,n;const{pageInfo:r,setPageInfo:o,footerContainer:i,announce:a}=e,{page:s,rowsPerPage:l}=r,{totalColumnCount:u,totalRowCount:c,totalPages:d,paginationNeeded:p,rows:f,columns:h}=Yj(Vj,(e=>e.tableData)),{rootElement:m,keyboard:g,translator:y,theme:b,interactions:v,styleService:x,viewService:S,layout:w,rect:C,direction:E}=Yj(Vj,(e=>e.baseProps)),k=Yj(Vj,(e=>e.setYScrollbarWidth)),R=Yj(Vj,(e=>e.showRightBorder)),_=Yj(Vj,(e=>e.selectionDispatch)),M=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),A=Ka.useRef(!1),D=Ka.useRef(null),P=Ka.useRef(null),{yScrollbarWidth:L}=c$(D),I=`${y.get("SNTable.Accessibility.RowsAndColumns",[String(f.length),String(h.length)])} ${y.get("SNTable.Accessibility.NavigationInstructions")}`,q=ZT(w,S),T=q&&null!==(t=S.scrollLeft)&&void 0!==t?t:0,O=q&&null!==(n=S.rowPartialHeight)&&void 0!==n?n:0,N=Ka.useCallback((()=>{A.current=m.getElementsByTagName("table")[0].contains(document.activeElement)}),[m]),z=Ka.useCallback((e=>{o({...r,page:e}),a({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),d.toString()]],politeness:"assertive"})}),[r,o,d,a]),F=Ka.useCallback((e=>{o({...r,page:0,rowsPerPage:e}),a({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[a,r,o]);return o$(D,E,S),((e,t)=>{const{keyboard:n}=Yj(Vj,(e=>e.baseProps));Ka.useEffect((()=>{const r=e.current;if(!r)return;const o=e=>{t$(e,t,n)};return r.addEventListener("focusout",o),()=>{r.removeEventListener("focusout",o)}}),[e,t,n])})(P,A),(()=>{const{rootElement:e,keyboard:t}=Yj(Vj,(e=>e.baseProps)),n=Yj(Vj,(e=>e.focusedCellCoord));YL((()=>{const r=GB(e,n);t.active?JB(r):(null==r||r.blur(),XB(e))}),[t.active,e])})(),r$(A,a,s),Ka.useEffect((()=>{const e=D.current;e&&(e.scrollLeft=T,e.scrollTop=O)}),[r,c,T,O]),$B((()=>{k(L)}),[L]),$B((()=>{_({type:gO.UpdatePageRows,payload:{pageRows:f}})}),[f]),n$(),Rl.jsxs(HB,{ref:P,background:b.background,dir:E,onKeyDown:e=>{l$({evt:e,totalRowCount:c,page:s,rowsPerPage:l,handleChangePage:z,updateShouldRefocus:N,keyboard:g,isSelectionMode:M})},"data-testid":"sn-table",children:[Rl.jsx(h$,{}),Rl.jsx(p$,{ref:D,className:"sn-table-container",fullHeight:!!i||!v.active||!p,interactions:v,tabIndex:-1,role:"application","data-testid":"table-container",children:Rl.jsxs(f$,{stickyHeader:!0,"aria-label":I,borderRight:R?`1px solid ${x.grid.border}`:void 0,children:[Rl.jsx(C9,{}),Rl.jsx(o9,{...e,updateShouldRefocus:N,tableWrapperRef:P})]})}),Rl.jsx(FB,{footerContainer:i,pageInfo:r,paginationNeeded:p,theme:b,totalRowCount:c,totalColumnCount:u,totalPages:d,keyboard:g,translator:y,interactions:v,rect:C,layout:w,handleChangePage:z,handleChangeRowsPerPage:F,isSelectionMode:M,direction:E})]})};var k9=Ka.memo(E9),R9=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function _9(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||R9(r)&&R9(o)))return!1;var r,o;return!0}function M9(e,t){var n;void 0===t&&(t=_9);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var A9="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function D9(e){cancelAnimationFrame(e.id)}function P9(e,t){var n=A9();var r={id:requestAnimationFrame((function o(){A9()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var L9=-1;function I9(e){if(void 0===e&&(e=!1),-1===L9||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),L9=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return L9}var q9=null;function T9(e){if(void 0===e&&(e=!1),null===q9||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?q9="positive-descending":(t.scrollLeft=1,q9=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),q9}return q9}var O9=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function N9(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,c=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Mr(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Mr(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=M9((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=M9((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,u=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:c(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=M9((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,u=i;if("rtl"===t)switch(T9()){case"negative":u=-i;break;case"positive-descending":u=l-o-i}u=Math.max(0,Math.min(u,l-o));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&D9(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=P9(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}_r(t,e),t.getDerivedStateFromProps=function(e,t){return z9(e,t),g(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,c=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=I9();void 0!==r&&(r=Math.max(0,Math.min(r,c-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>f?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,v):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(T9()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&D9(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?O9:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),w=S[0],C=S[1],E=this._getVerticalRangeToRender(),k=E[0],R=E[1],_=[];if(r>0&&g)for(var M=k;M<=R;M++)for(var A=w;A<=C;A++)_.push(Ka.createElement(t,{columnIndex:A,data:d,isScrolling:b?x:void 0,key:f({columnIndex:A,data:d,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,A)}));var D=a(this.props,this._instanceProps),P=s(this.props,this._instanceProps);return Ka.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:qe({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},Ka.createElement(u||c||"div",{children:_,ref:l,style:{height:D,pointerEvents:x?"none":void 0,width:P}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,u,this._instanceProps),h=f(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(Ka.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var z9=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},F9=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},j9=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},H9=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=i(u);o[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},B9=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?$9(e,t,n,i,0,r):V9(e,t,n,Math.max(0,i),r)},$9=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=H9(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},V9=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&H9(e,t,r,n).offset<o;)r+=a,a*=2;return $9(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},W9=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=H9(e,t,n,i),u="column"===e?j9(t,i):F9(t,i),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return o>=d&&o<=c?o:d>c||o<d?d:c}},U9=N9({getColumnOffset:function(e,t,n){return H9("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return B9("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=H9("column",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=H9("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:F9,getEstimatedTotalWidth:j9,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return W9("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return W9("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return H9("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return B9("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=H9("row",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=H9("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),G9=function(e,t){return e};function Y9(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Mr(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Mr(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=M9((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=M9((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=M9((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(T9()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&D9(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=P9(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}_r(t,e),t.getDerivedStateFromProps=function(e,t){return K9(e,t),c(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?I9():0:l.scrollHeight>l.clientHeight?I9():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(T9()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&D9(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?G9:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,b=e.width,v=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),C=w[0],E=w[1],k=[];if(u>0)for(var R=C;R<=E;R++)k.push(Ka.createElement(t,{data:c,key:p(R,c),index:R,isScrolling:y?v:void 0,style:this._getItemStyle(R)}));var _=r(this.props,this._instanceProps);return Ka.createElement(h||m||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:qe({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},Ka.createElement(s||l||"div",{children:k,ref:a,style:{height:x?"100%":_,pointerEvents:v?"none":void 0,width:x?_:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var u=a(this.props,l,this._instanceProps),c=s(this.props,u,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(Ka.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var K9=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},X9=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var u=r(l);o[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return o[t]},J9=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=X9(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},Q9=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&X9(e,n,t).offset<r;)n+=i,i*=2;return J9(e,t,Math.min(n,o-1),Math.floor(n/2),r)},Z9=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},e7=Y9({getItemOffset:function(e,t,n){return X9(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Z9,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=X9(e,t,o),p=Z9(e,o),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+i);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?J9(e,t,o,0,n):Q9(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:i,c=X9(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=X9(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function t7(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var n7=["style"],r7=["style"];function o7(e,t){var n=e.style,r=qt(e,n7),o=t.style,i=qt(t,r7);return!t7(n,o)&&!t7(r,i)}const i7=({style:e})=>Rl.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var a7=Xa.memo(i7,o7);const s7=e=>{var t;return null===(t=e.at(0))||void 0===t||null===(t=t.contentBoxSize.at(0))||void 0===t?void 0:t.blockSize},l7=(e,t,n)=>{Ka.useEffect((()=>{const n=e.current;if(!n)return()=>{};const r=new ResizeObserver(t);return r.observe(n),()=>{r.disconnect()}}),[e,t,n])},u7=()=>{},c7=e=>{e.preventDefault()};const d7=({columnIndex:e,rowIndex:t,style:n,data:r})=>{var o,i;const{rowsInPage:a,columns:s,isHoverEnabled:l,setMeasuredCellHeight:u,lineClamp:c,resizeObserverTaskScheduler:d}=r,p=Yj(Vj,(e=>e.hoverIndex===t)),f=Yj(Vj,(e=>e.setHoverIndex)),{interactions:h,styleService:m,direction:g}=Yj(Vj,(e=>e.baseProps)),y=Yj(Vj,(e=>e.showRightBorder)),b=null===(o=a[t])||void 0===o?void 0:o[e],{handleMouseDown:v,handleMouseOver:x,handleMouseUp:S,cellSelectionState:w}=function(e){const{interactions:t}=Yj(Vj,(e=>e.baseProps)),n=Yj(Vj,(e=>e.selectionDispatch)),r="object"==typeof e,o=Yj(Vj,(t=>r?V8(e,t.selectionState):mO.Inactive)),i=t.active&&t.select;if(r&&i){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i}=B8(c7,e,n,u7);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(b),C=((e,t,n,r)=>{const o=Ka.useRef(null),i=n&&!n.isNumeric,a=Ka.useCallback((n=>{const o=s7(n);o&&i&&r(o,e,t)}),[t,r,e,i]);return l7(o,a),o})(t,e,b,u),E=null!==(i=s[e])&&void 0!==i&&i.isDim?m.dimension.values:m.measure.values;if("object"==typeof b){const r=((e,t,n,r,o,i)=>{let a=G8(o,i,e);a=W8(a,i,e);const s=!e.isNull&&t.qAttrExprInfoIDs.length?Pj(a,e.qAttrExps,t.qAttrExprInfoIDs):a;return r===mO.Selected?{...s,...i.selectedColors}:r===mO.Disabled?{...s,color:n?null===(l=i.grid.hoverColors)||void 0===l?void 0:l.color:s.color,background:`${nj}, ${n?null===(u=i.grid.hoverColors)||void 0===u?void 0:u.background:s.background}`}:n?{...s,...i.grid.hoverColors}:s;var l,u})(b,s[e],l&&p,w,E,m),o={rowindex:t,columnindex:e};return Rl.jsx("div",{className:`sn-table-cell ${w} ${nI}`,style:{...n,...r,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:b.isLastRow?"0px":"1px",borderRightWidth:e8(g,b.isLastColumn,y),borderLeftWidth:t8(g,b.isLastColumn,y),justifyContent:X4(b,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:b.align},onMouseDown:v,onMouseUp:S,onMouseOver:x,onMouseEnter:l?()=>{f(t)}:void 0,onMouseLeave:l?()=>{f(-1)}:void 0,title:h.passive?b.representation.text:void 0,...o,children:Rl.jsx(H8,{forwardRef:m.contentStaticLineCount||1===c?void 0:C,cell:b,style:r,lineClamp:c,virtualizedCell:!0,resizeObserverTaskScheduler:d})})}return Rl.jsx(a7,{style:{...n,...E,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box"}})};var p7=Ka.memo(d7,o7);const f7=e=>{const t=Ka.useRef(e);return t.current=e,t},h7=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,m7=(e,t,n,r,o)=>{const i=e[n];if(!i)return!0;for(let e=t;e<t+r;e++){const t=i[e];if((null==t?void 0:t.rowIdx)!==o)return!0}return!1},g7=(e,t,n,r)=>{const o=e.slice(n,r);return 0===o.length||o.some((e=>!e[t]))},y7=(e,t,n,r,o,i,a,s)=>{e.forEach((e=>{e.qMatrix.forEach(((l,u)=>{const c=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,n,r,o,i,a,s,l,u)=>{var c;const{qSize:d}=a.qHyperCube,p=r.qTop+n,f=o+n,h=null!==(c=e[f])&&void 0!==c?c:[];return t.forEach(((e,t)=>{const n=t+r.qLeft;if(h.at(n))return;const{colIdx:o,isDim:c,isLocked:m,bodyTextAlign:g,selectionColIdx:y,qAttrExprInfoIndex:b,representation:v,conditionalColoring:x,qMiniChart:S}=i[n],w=VT(c,e,a),C=!c&&e.qIsNull,E=C?Hq(w):jq(e);h[n]={id:Nq(),...e,align:JT(E,g,u),rowIdx:p,colIdx:o,isSelectable:c&&!m,pageRowIdx:f,pageColIdx:n,selectionColIdx:y,isLastRow:p===d.qcy-1,isLastColumn:n===d.qcx-1,isNumeric:E,isNull:(!C||!E)&&$T(e,c),representation:BT({cell:e,representationProperties:v,attrExprInfoIndex:b,env:s,conditionalColoring:x,miniChartOnMeasure:S,getText:()=>C?w:e.qText,direction:u,enabledFeatures:{[HI.Image]:s.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES"),[HI.Indicator]:!0,[HI.MiniChart]:!0}})},l(h[n],p,n)})),{row:h,pageRowIdx:f}})(n,l,u,e.qArea,c,r,o,i,a,s);n[p]=d}))}))},b7=({layout:e,model:t,theme:n,initialDataPages:r,pageInfo:o,rowCount:i,visibleRowCount:a,visibleColumnCount:s,columns:l,gridState:u,setEstimatedCellHeight:c})=>{const d=Yj(Vj,(e=>e.env)),{direction:p}=Yj(Vj,(e=>e.baseProps)),f=Ka.useRef([]),h=Ka.useCallback(((t,n)=>{const r=Array.isArray(n)?n.slice(0,i):(e=>Array(e).fill(void 0))(i);return y7(t,o,r,l,e,d,c,p),f.current=r,r}),[i,o,l,e,d,c,p]),[m,g]=Ka.useState((()=>h(null!=r?r:[])));YL((()=>{g(h(null!=r?r:[]))}),[r,p]);const y=((e,t)=>{const n=Ka.useRef(new Set),r=Ka.useRef(new Set),o=Ka.useRef(new Set),i=f7(e),a=f7(t),s=Ka.useMemo((()=>({enqueue:e=>{const t=h7(e);o.current.has(t)||(n.current.add(e),o.current.add(t),1===n.current.size&&setTimeout((async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),r.current.add(e);try{const t=(e=>{const t=[];return e.forEach((e=>{if(t.length>0){const n=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(n,e)?n.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(n,e)?n.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})})),t})(e),n=await i.current(t);r.current.has(e)&&a.current(n)}catch(t){e.forEach((e=>{o.current.delete(h7(e))})),console.error("Failed to fetch pages",t)}finally{r.current.delete(e)}}}),75))},clear:()=>{n.current.clear(),r.current.clear(),o.current.clear()}})),[i,a]);return s})((e=>t&&"getHyperCubeData"in t?t.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([])),(e=>{g((t=>h(e,t)))})),b=Ka.useCallback(((e,t,n,r)=>{for(let o=e;o<e+n;o++)if(g7(f.current,o,t,r)){const e={qLeft:o,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}}),[f,y]),v=Ka.useCallback(((e,t,n,r)=>{for(let i=t;i<t+r;i++){const t=Math.max(0,i-o.page*o.rowsPerPage);if(m7(f.current,e,t,n,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:n};y.enqueue(t)}}}),[f,y,o]);return Ka.useEffect((()=>{const{qcx:t,qcy:n}=e.qHyperCube.qSize,r=u.current.overscanRowStartIndex,i=u.current.overscanColumnStartIndex,l=r+o.page*o.rowsPerPage,c=t-i,d=o.rowsPerPage-r,p=Math.min(100,c,t,s+5),f=Math.min(100,d,n,a+25);return v(i,l,p,f),()=>{y.clear()}}),[e,a,s,o,y,v,u,n]),{rowsInPage:m,loadRows:v,loadColumns:b}},v7=e=>{let t=0;return e.forEach((e=>{e>t&&(t=e)})),t},x7=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,S7=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const o=Yj(Vj,(e=>e.baseProps.styleService)),i=Yj(Vj,(e=>e.columnWidths)),{estimateLineCount:a}=VL(o.dimension.values),s=Fj(o.dimension.values.fontSize),l=e||t||1===n;return Ka.useCallback(((e,t,o)=>{if(l||e.representation.type===HI.Image||e.isNumeric)return;const u=(e=>Math.max(0,e-24-1))(i[o]),c=e.representation.text?a({text:e.representation.text,maxWidth:u,isNumeric:!1}):1,d=Math.min(n,Math.max(1,c));r(d*s,t,o)}),[l,i,a,n,s,r])},w7=({isStaticNbrOfLines:e,minRowHeight:t,state:n,rowCount:r,staticRowHeight:o,viewService:i})=>Ka.useMemo((()=>{const{estimatedRowHeight:a,totalRowHeight:s}=e?{totalRowHeight:r*o,estimatedRowHeight:o}:(e=>{let t=0;e.forEach((e=>{t+=e}));const n=0===e.size?0:t/e.size;return{estimatedRowHeight:Math.ceil(n),totalRowHeight:t}})(n.rowHeights);return i.estimatedRowHeight=Math.max(a,t),Math.max(r*t,s)}),[e,t,r,n,o,i]),C7=({rowCount:e,isSnapshot:t,viewService:n,gridRef:r,pageInfo:o})=>{const{styleService:i}=Yj(Vj,(e=>e.baseProps)),[a,s]=Ka.useState({rowHeights:new Map,cellHeightsInGrid:new Map}),l=i.contentLineHeight,u=i.contentMinRowHeight,c=!!i.contentStaticLineCount,d=Math.max(8e6/e,u)-9,p=d+9,f=Math.max(1,Math.min(i.grid.contentLineClamp,Math.round(d/l))),h=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:f,lineHeight:l,isStaticNbrOfLines:c});(({gridRef:e,setState:t,pageInfo:n})=>{var r,o;const{layout:i}=Yj(Vj,(e=>e.baseProps)),a=Yj(Vj,(e=>e.columnWidths)),s=null===(r=i.multiline)||void 0===r?void 0:r.wrapTextInCells,l=null===(o=i.nullValueRepresentation)||void 0===o?void 0:o.text;YL((()=>{var n;null===(n=e.current)||void 0===n||n.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map})}),[i.qHyperCube.qSize.qcx,i.qHyperCube.qSize.qcy,n.page,s,l]),YL((()=>{var t;null===(t=e.current)||void 0===t||t.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[a])})({gridRef:r,setState:s,pageInfo:o});const m=(({setState:e,maxCellHeight:t,minRowHeight:n,gridRef:r})=>Ka.useCallback(((o,i,a)=>{Ka.startTransition((()=>{e((e=>{var s,l;const u=Math.max(n,o+9),c=Math.min(t,u),d=null!==(s=e.cellHeightsInGrid.get(i))&&void 0!==s?s:e.cellHeightsInGrid.set(i,new Map).get(i);if(!x7(d.get(a),c))return e;const p={...e};return d.set(a,c),p.rowHeights.set(i,v7(d)),null===(l=r.current)||void 0===l||l.resetAfterIndices({columnIndex:a,rowIndex:i,shouldForceUpdate:!1}),p}))}))}),[e,n,t,r]))({maxCellHeight:p,minRowHeight:u,setState:s,gridRef:r}),g=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>Ka.useCallback(((o,i,a)=>{e||t||1===n||r(o,i,a)}),[e,t,n,r]))({isSnapshot:t,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:m});return{setMeasuredCellHeight:g,setEstimatedCellHeight:S7({isSnapshot:t,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:m}),getRowHeight:Ka.useCallback((e=>{var t;return c?h:null!==(t=a.rowHeights.get(e))&&void 0!==t?t:u}),[c,u,a.rowHeights,h]),totalRowHeight:w7({isStaticNbrOfLines:c,minRowHeight:u,state:a,staticRowHeight:h,rowCount:e,viewService:n}),lineClamp:f}},E7=(e,t)=>{Ka.useLayoutEffect((()=>()=>{t(0)}),[e,t]);const n=Ka.useCallback((e=>{const n=s7(e);void 0!==n&&t(n)}),[t]);l7(e,n)};var k7;!function(e){e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None"}(k7||(k7={}));const R7=({layout:e,loadRows:t,loadColumns:n,rowCount:r,pageInfo:o,gridState:i,viewService:a})=>Ka.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:c,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let o=k7.None,i=k7.None;return o=r>t?k7.Down:r<t?k7.Up:k7.None,i=n>e?k7.Right:n<e?k7.Left:k7.None,{verticalScrollDirection:o,horizontalScrollDirection:i}})(i.current,s,u);if(i.current.overscanColumnStartIndex=s,i.current.overscanColumnStopIndex=l,i.current.overscanRowStartIndex=u,i.current.overscanRowStopIndex=c,u>r)return;const y=s,b=u+o.page*o.rowsPerPage,v=l-s+1,x=c-u+1;if(a.visibleLeft=d,a.visibleWidth=p-d+1,a.visibleTop=f+o.page*o.rowsPerPage,a.visibleHeight=h-f+1,a.page=o.page,a.rowsPerPage=o.rowsPerPage,m===k7.Down){const e=x+25;t(y,b,v,u+e>r?r-u:e)}else if(m===k7.Up){const e=x+25,n=o.page*o.rowsPerPage,r=Math.max(n,b-25);t(y,r,v,e)}if(g===k7.Right){const t=e.qHyperCube.qSize.qcx-y,r=v+5,o=Math.min(t,r);n(y,b,o,x)}else if(g===k7.Left){const t=Math.max(0,y-5),r=Math.min(e.qHyperCube.qSize.qcx,v+5);n(t,b,r,x)}}),[i,r,o.page,o.rowsPerPage,a,t,e.qHyperCube.qSize.qcx,n]),_7={enabled:!1},M7=()=>{},A7={current:null};const D7=(e,t,n,r,o)=>{const i=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(i,Math.ceil(n.height/o)),s=Ka.useMemo((()=>r.reduce(((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e),{count:0,width:0})),[n,r]).count;return{rowCount:i,visibleRowCount:a,visibleColumnCount:s}},P7=({columnIndex:e,data:t,rowIndex:n})=>{var r,o;const i=null===(r=t.rowsInPage[n])||void 0===r?void 0:r[e];return null!==(o=null==i?void 0:i.id)&&void 0!==o?o:`${n}-${e}`},L7={overflow:"hidden",willChange:"auto"},I7=Ka.forwardRef(((e,t)=>{var n;const{rect:r,columns:o,pageInfo:i,headerAndTotalsHeight:a,setInnerBodyHeight:s}=e,{layout:l,model:u,theme:c,viewService:d,styleService:p,direction:f}=Yj(Vj,(e=>e.baseProps)),h=Yj(Vj,(e=>e.columnWidths)),m=Yj(Vj,(e=>e.initialDataPages)),g=Ka.useRef(null),y=Ka.useRef(null),b=Ka.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),v=Ka.useRef(0),x=!(null===(n=_j(l))||void 0===n||null===(n=n.content)||void 0===n||!n.hoverEffect),{rowCount:S,visibleRowCount:w,visibleColumnCount:C}=D7(l,i,r,h,p.contentMinRowHeight),{setMeasuredCellHeight:E,setEstimatedCellHeight:k,getRowHeight:R,lineClamp:_,totalRowHeight:M}=C7({rowCount:S,isSnapshot:!!l.snapshotData,viewService:d,gridRef:g,pageInfo:i}),{rowsInPage:A,loadRows:D,loadColumns:P}=b7({layout:l,model:u,theme:c,initialDataPages:m,pageInfo:i,rowCount:S,visibleRowCount:w,visibleColumnCount:C,columns:o,gridState:b,setEstimatedCellHeight:k}),L=R7({layout:l,loadRows:D,loadColumns:P,rowCount:S,pageInfo:i,gridState:b,viewService:d}),I=y$(),q=Ka.useMemo((()=>({rowsInPage:A,columns:o,isHoverEnabled:x,lineClamp:_,setMeasuredCellHeight:E,resizeObserverTaskScheduler:I})),[A,o,x,_,E,I]),T=((e,t,n)=>Math.min(e.height-t,n))(r,a,M);return Ka.useLayoutEffect((()=>{var e;1===v.current&&(null===(e=g.current)||void 0===e||e.scrollToItem({rowIndex:S-1,align:"start"}))})),function(e){const{selectionsAPI:t}=Yj(Vj,(e=>e.baseProps)),n=Yj(Vj,(e=>e.selectionDispatch));Ka.useEffect((()=>{n({type:gO.UpdatePageRows,payload:{pageRows:e}})}),[n,e]),b$({selectionsAPI:t,selectionDispatch:n,updateShouldRefocus:M7,keyboard:_7,tableWrapperRef:A7})}(A),Ka.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{var n,r;const o=(null!==(n=null===(r=y.current)||void 0===r?void 0:r.clientHeight)&&void 0!==n?n:T)-T,i=Math.round(o*e);var a,s,l;(v.current=e,1===v.current)?(null===(a=g.current)||void 0===a||a.scrollToItem({rowIndex:S-1,align:"start"}),null===(s=g.current)||void 0===s||s.scrollTo({scrollLeft:t})):null===(l=g.current)||void 0===l||l.scrollTo({scrollTop:i,scrollLeft:t})}})),[y,T,S]),E7(y,s),Rl.jsx(U9,{"data-key":"body",ref:g,innerRef:y,style:L7,columnCount:l.qHyperCube.qSize.qcx,columnWidth:e=>h[e],height:T,rowCount:S,rowHeight:R,estimatedRowHeight:d.estimatedRowHeight,width:r.width,itemData:q,onItemsRendered:L,itemKey:P7,className:"sn-table-body",direction:f,children:p7})}));var q7=Ka.memo(I7);const T7=({width:e,height:t,children:n})=>Rl.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:n}),O7=(e,t)=>{const n=Ka.useRef(null),r=Yj(Vj,(e=>e.columnWidths));Ka.useLayoutEffect((()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)}),[t,n,e,r.length]);const o=Ka.useCallback((n=>{const r=s7(n);r&&t(r+9,e)}),[e,t]);return l7(n,o),n},N7=Pg("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e})((({interactions:e,hoverBackground:t,background:n,applicableStyle:r})=>({...r,background:n,"&&:hover":{background:e.active?t:void 0}}))),z7=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:o,allColumnsIconVisibilityStatusRef:i,setMeasuredCellHeight:a}=n,{interactions:s,styleService:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),d=Yj(Vj,(e=>e.showRightBorder)),p=Yj(Vj,(e=>e.tableData.totalsPosition)),f=!!s.active&&!c,{open:h,setOpen:m,handleOpenMenu:g,setIsAdjustingWidth:y}=x9({isInteractionEnabled:f,columnsData:r}),b=O7(e,a),v=r[e],x=r.length-1===e;return Rl.jsxs(N7,{className:`sn-table-cell ${nI}`,title:s.passive?v.label:void 0,onClick:g,applicableStyle:{...l.header,...e9(l,p,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:e8(u,x,d),borderLeftWidth:t8(u,x,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:v.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===v.headTextAlign?"row-reverse":"row",userSelect:"none"},interactions:s,hoverBackground:l.headerMenuHoverBackground,background:h?l.headerMenuActiveBackground:l.header.background,children:[Rl.jsx(v9,{forwardRef:b,column:v,isInteractionEnabled:f,open:h,setOpen:m,allColumnsIconVisibilityStatusRef:i}),Rl.jsx(a9,{column:v,isLastColumn:x,onColumnResize:o,setIsAdjustingWidth:y})]})},F7=e=>{const[t,n]=Ka.useState(new Map);YL((()=>{n(new Map)}),[e.length]);const r=Ka.useCallback(((e,t)=>{n((n=>x7(n.get(t),e)?new Map(n).set(t,e):n))}),[]);return{rowHeight:Ka.useMemo((()=>v7(t)),[t]),setMeasuredCellHeight:r}},j7=(e,t)=>{Ka.useImperativeHandle(e,(()=>({scrollTo:e=>{var n;return null===(n=t.current)||void 0===n?void 0:n.scrollTo(e)}})),[t])},H7=(e,t,n,r,o)=>{YL((()=>{var t;null===(t=e.current)||void 0===t||t.resetAfterIndex(0,!1)}),[t,n,e,r,o])},B7={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},$7=Ka.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:o,columResizeHandler:i,allColumnsIconVisibilityStatusRef:a,setHeaderRowHeight:s}=e,l=Ka.useRef(null),u=Ka.useRef(null),{layout:c,theme:d,styleService:p,direction:f,viewService:h}=Yj(Vj,(e=>e.baseProps)),m=Yj(Vj,(e=>e.columnWidths)),{rowHeight:g,setMeasuredCellHeight:y}=F7(r),b=i9(h,c);return j7(t,l),H7(l,c,o,m,d),E7(u,s),Rl.jsx(e7,{ref:l,outerRef:u,layout:"horizontal",style:{...B7,...b?{display:"none"}:void 0},itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>m[e],height:Math.max(g+8,p.headerMinRowHeight),width:n.width,itemData:{columns:r,columResizeHandler:i,allColumnsIconVisibilityStatusRef:a,setMeasuredCellHeight:y},direction:f,children:z7})}));var V7=Ka.memo($7);const W7=Ka.forwardRef(((e,t)=>{const{children:n,width:r,height:o,onScroll:i}=e,{interactions:a,direction:s}=Yj(Vj,(e=>e.baseProps));return Rl.jsx("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.scroll?"auto":"hidden",width:r,height:o},onScroll:i,dir:s,children:n})})),U7=({children:e,rect:t})=>{const{direction:n}=Yj(Vj,(e=>e.baseProps));return Rl.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==n?"0px":void 0,right:"rtl"===n?"0px":void 0,width:t.width,height:t.height},children:e})},G7=({index:e,style:t,data:n})=>{const{columns:r,totals:o,setMeasuredCellHeight:i}=n,{layout:a,interactions:s,styleService:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>e.showRightBorder)),d=O7(e,i),p=r[e].totalInfo,{totalsTextAlign:f,isTotalNumeric:h}=r[e],m=a.qHyperCube.qSize.qcx-1===e;return Rl.jsx("div",{className:`sn-table-cell ${nI}`,title:s.passive?p:void 0,style:{...t,...l.totalRow,...e9(l,o,!1),background:l.totalRow.background,display:"flex",alignItems:o.atTop?"end":"start",borderStyle:"solid",borderRightWidth:e8(u,m,c),borderLeftWidth:t8(u,m,c),borderTopWidth:o.atBottom?"1px":"0px",borderBottomWidth:o.atTop?"1px":"0px",padding:"4px 12px",justifyContent:f,textAlign:f,boxSizing:"border-box",cursor:"default"},children:Rl.jsx(j4,{forwardRef:h?void 0:d,isNumeric:h,children:p})})},Y7=Ka.forwardRef(((e,t)=>{const{rect:n,pageInfo:r,totals:o,columns:i,setTotalsRowHeight:a}=e,s=Ka.useRef(null),l=Ka.useRef(null),{layout:u,theme:c,styleService:d,direction:p}=Yj(Vj,(e=>e.baseProps)),f=Yj(Vj,(e=>e.columnWidths)),{rowHeight:h,setMeasuredCellHeight:m}=F7(i);return j7(t,s),H7(s,u,r,f,c),E7(l,a),Rl.jsx(e7,{ref:s,outerRef:l,layout:"horizontal",style:B7,itemCount:u.qHyperCube.qSize.qcx,itemSize:e=>f[e],height:Math.max(h,d.totalRowMinHeight),width:n.width,itemData:{columns:i,totals:o,setMeasuredCellHeight:m},direction:p,children:G7})}));var K7=Ka.memo(Y7);const X7=(e,t,n,r,o)=>Ka.useCallback((i=>{var a,s,l;const{scrollHeight:u,clientHeight:c,scrollTop:d}=i.currentTarget,p=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(i.currentTarget,o),f=Math.max(0,Math.min(1,d/(u-c)));r.scrollTopRatio=f,r.scrollLeft=p,null===(a=n.current)||void 0===a||a.interpolatedScrollTo(Number.isNaN(f)?0:f,p),null===(s=e.current)||void 0===s||s.scrollTo(p),null===(l=t.current)||void 0===l||l.scrollTo(p)}),[r,n,e,t,o]),J7=e=>{const{pageInfo:t}=e,{totalsPosition:n,columns:r,paginationNeeded:o}=Yj(Vj,(e=>e.tableData)),{layout:i,theme:a,rect:s,viewService:l,direction:u}=Yj(Vj,(e=>e.baseProps)),c=Yj(Vj,(e=>e.columnWidths)),d=Yj(Vj,(e=>e.setYScrollbarWidth)),p=Ka.useRef(null),f=Ka.useRef(null),h=Ka.useRef(null),m=Ka.useRef(null),{xScrollbarWidth:g,yScrollbarWidth:y}=c$(p),b=Ka.useRef([]),v=Ka.useMemo((()=>((e,t)=>{const n=e.height-(t?41:0);return{width:e.width,height:n}})(s,o)),[s,o]),x=Ka.useMemo((()=>((e,t,n)=>({width:e.width-n,height:e.height-t}))(v,g,y)),[v,g,y]),{rowCount:S}=D7(i,t,x,c,0),{headerAndTotalsHeight:w,innerBodyHeight:C,setHeaderRowHeight:E,setTotalsRowHeight:k,setInnerBodyHeight:R}=(()=>{const[e,t]=Ka.useState(0),[n,r]=Ka.useState(0),[o,i]=Ka.useState(0);return{headerAndTotalsHeight:e+n,innerBodyHeight:o,setHeaderRowHeight:t,setTotalsRowHeight:r,setInnerBodyHeight:i}})(),{width:_,height:M}=(({innerBodyHeight:e,headerAndTotalsHeight:t,rowCount:n,stickyContainerRect:r,columnWidths:o})=>{const{styleService:i}=Yj(Vj,(e=>e.baseProps)),a=e+t,s=n*i.contentMinRowHeight+t;let l=s;return s<r.height&&a>r.height&&(l=a),{width:o.reduce(((e,t)=>e+t),0),height:l}})({innerBodyHeight:C,headerAndTotalsHeight:w,rowCount:S,stickyContainerRect:x,columnWidths:c}),A=X7(f,h,m,l,u),D=Ka.useCallback((()=>{p.current&&(p.current.scrollTop=0)}),[p]);n$(),Ka.useLayoutEffect((()=>{p.current&&(p.current.scrollLeft=0,p.current.scrollTop=0)}),[r.length]),Ka.useLayoutEffect((()=>{p.current&&(p.current.scrollTop=0)}),[t,S,a]),$B((()=>{d(y)}),[y]);const P=Rl.jsx(K7,{rect:x,pageInfo:t,columns:r,ref:h,totals:n,setTotalsRowHeight:k},"totals");return Rl.jsx(W7,{ref:p,width:v.width,height:v.height,onScroll:A,children:Rl.jsx(T7,{width:_,height:M,children:Rl.jsxs(U7,{rect:x,children:[Rl.jsx(V7,{rect:x,pageInfo:t,columns:r,ref:f,columResizeHandler:D,allColumnsIconVisibilityStatusRef:b,setHeaderRowHeight:E}),n.atTop?P:null,Rl.jsx(q7,{ref:m,rect:x,pageInfo:t,columns:r,headerAndTotalsHeight:w,setInnerBodyHeight:R}),n.atBottom?P:null]})})})};var Q7=Ka.memo(J7);const Z7=()=>{const{theme:e,keyboard:t,translator:n,interactions:r,rect:o,layout:i}=Yj(Vj,(e=>e.baseProps)),{paginationNeeded:a,totalRowCount:s,totalColumnCount:l,totalPages:u}=Yj(Vj,(e=>e.tableData)),c=Yj(Vj,(e=>e.pageInfo)),d=Yj(Vj,(e=>e.setPage));return Rl.jsxs(HB,{"data-testid":"sn-table",background:e.background,children:[Rl.jsx(Q7,{pageInfo:c}),Rl.jsx(FB,{paginationNeeded:a,handleChangePage:e=>{d(e)},pageInfo:c,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:t,translator:n,theme:e,interactions:r,rect:o,layout:i})]})};var eee=Ka.memo(Z7);var tee={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбцов","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const nee=(t,n)=>e.useMemo((()=>(function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(tee).forEach((t=>{e.add(tee[t])}))}(n),((e,t)=>{let n;return({keys:r,politeness:o="polite"})=>{const i=r.map((e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)})).join(" "),a=e.querySelector(`.${bO.First}`),s=e.querySelector(`.${bO.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;n===bO.First?(l=s,n=bO.Second):(l=a,n=bO.First),l.innerHTML=l.innerHTML.endsWith(" ­")?i:`${i} ­`,l.setAttribute("aria-live",o)}})(t,n))),[t,n.language()]),ree={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},oee=t=>{const{app:n,model:r,rootElement:o,layout:i,translator:a,reactRoot:s,isFontLoaded:l,viewService:u,env:c}=t,{direction:d,footerContainer:p}=e.useOptions(),f=eO(i,u),h=nee(o,a),[m,g]=e.useState(((e,t)=>ZT(e,t)?{page:t.page||ree.page,rowsPerPage:t.rowsPerPage||ree.rowsPerPage,rowsPerPageOptions:ree.rowsPerPageOptions}:ree)(i,u)),[y,b]=e.useState(!0);y||b(!0);const[v,x]=HL((async()=>f?async function(e,t,n,r,o,i,a,s){var l,u,c,d;const{page:p,rowsPerPage:f,rowsPerPageOptions:h}=n,m=t.qHyperCube.qSize.qcx,g=t.qHyperCube.qSize.qcy,y=Math.ceil(g/f),b=null!==(l=o.visibleTop)&&void 0!==l?l:p*f,v=null!==(u=o.visibleHeight)&&void 0!==u?u:Math.min(f,g-b);if(p>0&&b>=g)return r({...n,page:0}),null;if(v*m>WT)return r({...n,rowsPerPage:UT(m,h),page:0}),null;const x=g>10,S=GT(t,o),w=QT(t,a,s),C=!!t.snapshotData,E=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),o=null==r?void 0:r.qArea;return r&&(null==o?void 0:o.qLeft)===n.qLeft&&o.qTop===n.qTop&&o.qWidth===n.qWidth&&o.qHeight>=n.qHeight?[{...r,qMatrix:r.qMatrix.slice(0,n.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[n]):[]})(e,t,{qLeft:0,qTop:b,qHeight:v,qWidth:m});C||(o.qTop=b,o.qHeight=v,o.rowsPerPage=n.rowsPerPage,o.page=n.page);const k=null!==(c=null===(d=E.at(0))||void 0===d?void 0:d.qMatrix.map(((e,n)=>{const r=[];return w.forEach(((o,l)=>{const u=e[l],c=VT(o.isDim,u,t),d=!o.isDim&&u.qIsNull,p=d?Hq(c):jq(u);r[l]={id:Nq(),...u,align:JT(p,o.bodyTextAlign,s,a),rowIdx:n+b,colIdx:o.colIdx,pageRowIdx:n,pageColIdx:l,selectionColIdx:o.selectionColIdx,isSelectable:o.isDim&&!o.isLocked,isLastRow:n===v-1,isNumeric:p,isNull:(!d||!p)&&$T(u,o.isDim),representation:BT({cell:u,representationProperties:o.representation,attrExprInfoIndex:o.qAttrExprInfoIndex,env:i,conditionalColoring:o.conditionalColoring,miniChartOnMeasure:o.qMiniChart,getText:()=>d?c:u.qText,direction:s,enabledFeatures:{[HI.Image]:i.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES"),[HI.Indicator]:!0,[HI.MiniChart]:!0}})}})),r})))&&void 0!==c?c:[];return{totalColumnCount:m,totalRowCount:g,totalPages:y,paginationNeeded:x,totalsPosition:S,columns:w,rows:k}}(r,i,m,g,u,c,y,d):null),[i,m,r,f,d]);e.useEffect((()=>{f&&t.model&&t.changeSortOrder&&v&&l&&!x&&function(e,t){const{direction:n,...r}=e,o=Kj(n);t.render(Rl.jsx(Bd,{stylisPlugins:"rtl"===n?[VO]:void 0,children:Rl.jsx(Ig,{theme:o,children:Rl.jsx(Gj,{...e,children:Rl.jsx(k9,{...r})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:v,pageInfo:m,setPageInfo:g,direction:d,footerContainer:p,announce:h},s)}),[h,n,d,p,l,m,s,t,f,v,x])},iee=(t,n)=>e.useMemo((()=>((e,t)=>{if(t)return async(n,r)=>{if(!("getEffectiveProperties"in t))return;const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=n,u=o?i:i-e,c=await t.getEffectiveProperties(),d=c.qHyperCubeDef.qInterColumnSortOrder,p=[],f=r!==s||l;if(!o){var h;const e=null===(h=c.qHyperCubeDef.qMeasures.at(u))||void 0===h?void 0:h.qSortBy;void 0===(null==e?void 0:e.qSortByNumeric)&&p.push({qPath:`/qHyperCubeDef/qMeasures/${u}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}l||(d.splice(d.indexOf(i),1),d.unshift(i),p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),f&&p.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(p,!0)}})(t.qDimensionInfo.length,n)),[t.qDimensionInfo.length,n]);const aee=({model:e,layout:t,shouldRender:n,page:r})=>{const[o,i]=HL((async()=>{if(n&&e)return(async(e,t,n)=>{const{qDataPages:r}=t.qHyperCube;if(0!==n||0===r.length){const r=n*Math.min(uj,t.qHyperCube.qSize.qcy);if(e&&"getHyperCubeData"in e)return e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:r,qWidth:50,qHeight:100}])}return r})(e,t,r)}),[e,t,r]);return{initialDataPages:o,isLoading:i}},see=t=>{const{layout:n,model:r,keyboard:o,interactions:i,reactRoot:a,isFontLoaded:s,viewService:l,direction:u}=t,c=!eO(n,l),[d,p]=e.useState(!1);d&&p(!1);const f=e.useMemo((()=>function(e,t,n,r,o){const i=QT(e,o,r),a=GT(e,n),s=e.qHyperCube.qSize.qcy,l=Math.min(uj,s),u=s>uj&&!!t.active;return{totalsPosition:a,columns:i,rows:[],totalRowCount:s,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(s/l),paginationNeeded:u}}(n,i,l,u,d)),[n,i,l,u,d]),{pageInfo:h,setPage:m}=((t,n)=>{const[r,o]=e.useState(0),i=Math.min(uj,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:r,rowsPerPage:i,rowsPerPageOptions:[]})),[i,r]);if(n){const e=Math.floor(t.qHyperCube.qSize.qcy/uj);e<r&&o(e)}return{pageInfo:a,setPage:o}})(n,c),{initialDataPages:g,isLoading:y}=aee({model:r,layout:n,page:h.page,shouldRender:c});e.useEffect((()=>{var e;c&&o.active&&(null===(e=o.blur)||void 0===e||e.call(o,!1))}),[o,c]),e.useEffect((()=>{c&&t.model&&t.changeSortOrder&&g&&!y&&s&&function(e,t){const{direction:n}=e,r=Kj(n);t.render(Rl.jsx(Xa.StrictMode,{children:Rl.jsx(Ig,{theme:r,children:Rl.jsx(Gj,{...e,children:Rl.jsx(eee,{})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:f,pageInfo:h,setPage:m,initialDataPages:g},a)}),[g,s,y,h,a,t,m,c,f])},lee={version:JSON.stringify("4.8.3"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals",label:"Totals"},usePagination:!1,components:[]};function uee(e,t){var n,r;const o=e.getElementsByClassName("sn-table-container")[0];if(!o)return{};const i=o.getBoundingClientRect(),a=e.getElementsByClassName("sn-table-head-row")[0],s=null!==(n=null==a?void 0:a.getBoundingClientRect())&&void 0!==n?n:{height:0},l=e.getElementsByClassName("sn-table-totals-row")[0],u=null!==(r=null==l?void 0:l.getBoundingClientRect())&&void 0!==r?r:{height:0},c=e.getElementsByClassName("sn-table-data-row"),d={top:i.y+s.height+(t.atTop?u.height:0),bottom:i.y+i.height-(t.atBottom?u.height:0)},p=((e,t)=>{if(!e)return-1;for(let n=0;n<e.length;n++)if(e[n].getBoundingClientRect().bottom>t.top)return n;return-1})(c,d),f=((e,t)=>{if(!e)return-1;for(let n=e.length-1;n>-1;n--){const r=e[n].getBoundingClientRect();if(t.bottom>r.top)return n}return-1})(c,d),h=((e,t,n)=>{if(!e||0===e.length||n<0)return 0;const r=e[n].getBoundingClientRect();return Math.max(t.top-r.top,0)})(c,d,p);return{visibleRowStartIndex:p,visibleRowEndIndex:f,rowPartialHeight:h}}const cee=(e,t)=>{if(t)for(let n=0;n<t.length;n++){const r=t[n].getAttribute("rowindex");if(r&&parseInt(r,10)===e)return t[n]}},dee=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const pee=(e,t,n,r)=>{var o;if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,a=r.rowsPerPage||ree.rowsPerPage,s=null!==(o=r.viewState)&&void 0!==o&&o.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},fee=(e,t,n)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const r=GT(e,t);if(eO(e,t)){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1,rowPartialHeight:a}=uee(n,r);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:pee(i,o,e,t),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}}const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=null==n?void 0:n.getBoundingClientRect(),o=null==n?void 0:n.querySelectorAll(".sn-table-body .sn-table-cell");if(!o||!r)return{};const{scrollTopRatio:i=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:u=0}=t,c=l*u,d=a-c,p=d+s-1,f=cee(d,o),h=null==f?void 0:f.getBoundingClientRect();if(!f||!h)return{};const m=r.y;if(1-i<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+c,visibleRowEndIndex:p+c};const g=r.y+r.height,y=(dee(h,m,g)?d:d+1)+c;let b=p+c;const v=cee(p,o),x=null==v?void 0:v.getBoundingClientRect();return v&&x&&(dee(x,m,g)||(b=p-1+c)),{visibleRowStartIndex:y,visibleRowEndIndex:b}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:o,visibleHeight:pee(i,o,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}},hee=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),mee=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:{properties:{initial:lee},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>qI({...e}),exportProperties:MI,exploration:TI},ext:Aq(t),component(){var n;const r=e.useElement(),o=(t=>{const n=e.useMemo((()=>WL(t)),[t]);return e.useEffect((()=>()=>{n.unmount()}),[n]),n})(r),i=e.useStaleLayout(),a=e.useApp(),s=e.useModel(),l=(t=>{const n=e.useInteractionState();return{...n,select:!!n.active&&!!n.select&&!t,active:!!n.active&&!t,scroll:!!n.active}})(!!i.snapshotData),u=e.useTranslator(),c=e.useSelections(),d=e.useKeyboard(),p=e.useOptions(),{freeResize:f}=p,h=e.useRect(),m=e.useMemo((()=>{var e;return null!==(e=i.snapshotData)&&void 0!==e&&e.content&&!f?{...h,...i.snapshotData.content.size}:h}),[h,f,null===(n=i.snapshotData)||void 0===n?void 0:n.content]),g=(t=>{const{viewState:n}=e.useOptions();return e.useMemo((()=>((e,t)=>{var n,r,o,i,a,s,l,u,c,d,p,f,h,m,g,y,b;return{qTop:0,qHeight:0,rowPartialHeight:null!==(n=null==t||null===(r=t.content)||void 0===r?void 0:r.rowPartialHeight)&&void 0!==n?n:0,visibleTop:null!==(o=null==t||null===(i=t.content)||void 0===i?void 0:i.visibleTop)&&void 0!==o?o:null==e?void 0:e.visibleTop,visibleHeight:null!==(a=null==t||null===(s=t.content)||void 0===s?void 0:s.visibleHeight)&&void 0!==a?a:null==e?void 0:e.visibleHeight,scrollLeft:null!==(l=null!==(u=null==t||null===(c=t.content)||void 0===c?void 0:c.scrollLeft)&&void 0!==u?u:null==e?void 0:e.scrollLeft)&&void 0!==l?l:0,scrollTopRatio:null!==(d=null==t||null===(p=t.content)||void 0===p?void 0:p.scrollTopRatio)&&void 0!==d?d:null==e?void 0:e.scrollTopRatio,rowsPerPage:null!==(f=null==t||null===(h=t.content)||void 0===h?void 0:h.rowsPerPage)&&void 0!==f?f:null==e?void 0:e.rowsPerPage,page:null!==(m=null==t||null===(g=t.content)||void 0===g?void 0:g.page)&&void 0!==m?m:null==e?void 0:e.page,viewState:e,estimatedRowHeight:null!==(y=null==t||null===(b=t.content)||void 0===b?void 0:b.estimatedRowHeight)&&void 0!==y?y:0}})(n,t.snapshotData)),[n,t.snapshotData,t.usePagination])})(i),y=e.useEmbed(),b=jL(i,r,hee,mee),x=t.flags.isEnabled("CLIENT_IM_7150_TABLE_RTL")?p.direction:"ltr",S=iee(i.qHyperCube,s),w=Dq(i.qHyperCube,s),C=((e,t,n)=>{const[,r,o]=HL((async()=>{var t;const r=v(n.flags),o=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),a=e.getStyle("object","label.value","fontFamily"),s=null!==(t=e.getStyle("","","fontFamilies"))&&void 0!==t?t:[];return Promise.all([...r,...s,o,i,a,GL].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(b,i,t),E=Le(),k={app:a,layout:i,model:s,rect:m,theme:b,keyboard:d,translator:u,interactions:l,selectionsAPI:c,changeSortOrder:S,rootElement:r,embed:y,reactRoot:o,applyColumnWidths:w,isFontLoaded:C,downloadService:E,viewService:g,direction:x,env:t};null===e.onContextMenu||void 0===e.onContextMenu||e.onContextMenu(((e,t)=>{const n=t.target,r=null==n?void 0:n.closest(`.${nI}`);null!=r&&r.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{pI(r)}})})),(({layout:t,viewService:n,model:r,rootElement:o,contentRect:i})=>{e.onTakeSnapshot((async e=>{const a=e;if(!a.snapshotData||!r||a.snapshotData.content)return a;if("getHyperCubeData"in r){const{rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h}=fee(t,n,o);a.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:d,qWidth:t.qHyperCube.qSize.qcx,qHeight:p}]),a.snapshotData.content={rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h,size:{width:i.width,height:i.height},estimatedRowHeight:n.estimatedRowHeight}}return a})),e.useImperativeHandle((()=>({getViewState:()=>fee(t,n,o)})),[t,n,o])})({layout:i,viewService:g,model:s,rootElement:r,contentRect:h}),see(k),oee(k)}}}}));