@nebula.js/sn-pivot-table 4.0.0 → 4.0.1

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-pivot-table v4.0.0
2
+ * @nebula.js/sn-pivot-table v4.0.1
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -117,7 +117,7 @@ function Ki(e,t){let n;return n=t?Wi(e).withConfig({displayName:t.label,shouldFo
117
117
  }
118
118
  `),tS.rippleVisible,sS,550,(({theme:e})=>e.transitions.easing.easeInOut),tS.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),tS.child,tS.childLeaving,uS,550,(({theme:e})=>e.transitions.easing.easeInOut),tS.childPulsate,cS,(({theme:e})=>e.transitions.easing.easeInOut)),fS=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=ar(n,nS),[l,s]=Sn.useState([]),u=Sn.useRef(0),c=Sn.useRef(null);Sn.useEffect((()=>{c.current&&(c.current(),c.current=null)}),[l]);const d=Sn.useRef(!1),p=Sn.useRef(0),f=Sn.useRef(null),h=Sn.useRef(null);Sn.useEffect((()=>()=>{p.current&&clearTimeout(p.current)}),[]);const m=Sn.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;s((e=>[...e,Ms.jsx(pS,{classes:{ripple:Ju(o.ripple,tS.ripple),rippleVisible:Ju(o.rippleVisible,tS.rippleVisible),ripplePulsate:Ju(o.ripplePulsate,tS.ripplePulsate),child:Ju(o.child,tS.child),childLeaving:Ju(o.childLeaving,tS.childLeaving),childPulsate:Ju(o.childPulsate,tS.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,c.current=a}),[o]),g=Sn.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const l=a?null:h.current,s=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(s.width/2),c=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-s.left),c=Math.round(n-s.top)}if(i)g=Math.sqrt((2*s.width**2+s.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-c),c)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{m({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:n})},p.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):m({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:n})}),[r,m]),y=Sn.useCallback((()=>{g({},{pulsate:!0})}),[g]),b=Sn.useCallback(((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(p.current=setTimeout((()=>{b(e,t)})));f.current=null,s((e=>e.length>0?e.slice(1):e)),c.current=t}),[]);return Sn.useImperativeHandle(t,(()=>({pulsate:y,start:g,stop:b})),[y,g,b]),Ms.jsx(dS,ir({className:Ju(tS.root,o.root,i),ref:h},a,{children:Ms.jsx($w,{component:null,exit:!0,children:l})}))}));var hS=fS;function mS(e){return xu("MuiButtonBase",e)}var gS=wu("MuiButtonBase",["root","disabled","focusVisible"]);const yS=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bS=Ku("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${gS.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),vS=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:s=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:h,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:b,onKeyDown:v,onKeyUp:x,onMouseDown:w,onMouseLeave:S,onMouseUp:E,onTouchEnd:C,onTouchMove:k,onTouchStart:_,tabIndex:M=0,TouchRippleProps:R,touchRippleRef:A,type:L}=n,I=ar(n,yS),D=Sn.useRef(null),P=Sn.useRef(null),T=iu(P,A),{isFocusVisibleRef:O,onFocus:N,onBlur:q,ref:F}=mu(),[z,j]=Sn.useState(!1);s&&z&&j(!1),Sn.useImperativeHandle(r,(()=>({focusVisible:()=>{j(!0),D.current.focus()}})),[]);const[B,$]=Sn.useState(!1);Sn.useEffect((()=>{$(!0)}),[]);const W=B&&!u&&!s;function H(e,t,n=c){return ou((r=>{t&&t(r);return!n&&P.current&&P.current[e](r),!0}))}Sn.useEffect((()=>{z&&d&&!u&&B&&P.current.pulsate()}),[u,d,z,B]);const V=H("start",w),G=H("stop",m),U=H("stop",g),Y=H("stop",E),K=H("stop",(e=>{z&&e.preventDefault(),S&&S(e)})),X=H("start",_),Q=H("stop",C),J=H("stop",k),Z=H("stop",(e=>{q(e),!1===O.current&&j(!1),f&&f(e)}),!1),ee=ou((e=>{D.current||(D.current=e.currentTarget),N(e),!0===O.current&&(j(!0),b&&b(e)),y&&y(e)})),te=()=>{const e=D.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},ne=Sn.useRef(!1),re=ou((e=>{d&&!ne.current&&z&&P.current&&" "===e.key&&(ne.current=!0,P.current.stop(e,(()=>{P.current.start(e)}))),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),v&&v(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!s&&(e.preventDefault(),h&&h(e))})),oe=ou((e=>{d&&" "===e.key&&P.current&&z&&!e.defaultPrevented&&(ne.current=!1,P.current.stop(e,(()=>{P.current.pulsate(e)}))),x&&x(e),h&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&h(e)}));let ie=l;"button"===ie&&(I.href||I.to)&&(ie=p);const ae={};"button"===ie?(ae.type=void 0===L?"button":L,ae.disabled=s):(I.href||I.to||(ae.role="button"),s&&(ae["aria-disabled"]=s));const le=iu(t,F,D),se=ir({},n,{centerRipple:o,component:l,disabled:s,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:M,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Qa({root:["root",t&&"disabled",n&&"focusVisible"]},mS,o);return n&&r&&(i.root+=` ${r}`),i})(se);return Ms.jsxs(bS,ir({as:ie,className:Ju(ue.root,a),ownerState:se,onBlur:Z,onClick:h,onContextMenu:G,onFocus:ee,onKeyDown:re,onKeyUp:oe,onMouseDown:V,onMouseLeave:K,onMouseUp:Y,onDragLeave:U,onTouchEnd:Q,onTouchMove:J,onTouchStart:X,ref:le,tabIndex:s?-1:M,type:L},ae,I,{children:[i,W?Ms.jsx(hS,ir({ref:T,center:o},R)):null]}))}));var xS=vS;function wS(e){return xu("MuiTypography",e)}wu("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const SS=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ES=Ku("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Xs(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>ir({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),CS={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},kS={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_S=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiTypography"}),r=(e=>kS[e]||e)(n.color),o=Ls(ir({},n,{color:r})),{align:i="inherit",className:a,component:l,gutterBottom:s=!1,noWrap:u=!1,paragraph:c=!1,variant:d="body1",variantMapping:p=CS}=o,f=ar(o,SS),h=ir({},o,{align:i,color:r,className:a,component:l,gutterBottom:s,noWrap:u,paragraph:c,variant:d,variantMapping:p}),m=l||(c?"p":p[d]||CS[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Qa({root:["root",i,"inherit"!==e.align&&`align${Xs(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},wS,a)})(h);return Ms.jsx(ES,ir({as:m,ref:t,ownerState:h,className:Ju(g.root,a)},f))}));var MS=_S;const RS=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function AS(e){const t=[],n=[];return Array.from(e.querySelectorAll(RS)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function LS(){return!0}function IS(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=AS,isEnabled:a=LS,open:l}=e,s=Sn.useRef(!1),u=Sn.useRef(null),c=Sn.useRef(null),d=Sn.useRef(null),p=Sn.useRef(null),f=Sn.useRef(!1),h=Sn.useRef(null),m=Oa(t.ref,h),g=Sn.useRef(null);Sn.useEffect((()=>{l&&h.current&&(f.current=!n)}),[n,l]),Sn.useEffect((()=>{if(!l||!h.current)return;const e=La(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(s.current=!0,d.current.focus()),d.current=null)}}),[l]),Sn.useEffect((()=>{if(!l||!h.current)return;const e=La(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(s.current=!0,c.current&&c.current.focus())},n=()=>{const t=h.current;if(null===t)return;if(!e.hasFocus()||!a()||s.current)return void(s.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==c.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==c.current||(n=i(h.current)),n.length>0){var o,l;const e=Boolean((null==(o=g.current)?void 0:o.shiftKey)&&"Tab"===(null==(l=g.current)?void 0:l.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,l,i]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return Ms.jsxs(Sn.Fragment,{children:[Ms.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),Sn.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),Ms.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}const DS=Sn.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=Sn.useState(null),l=Oa(Sn.isValidElement(n)?n.ref:null,t);if(Pa((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),Pa((()=>{if(i&&!o)return Da(t,i),()=>{Da(t,null)}}),[t,i,o]),o){if(Sn.isValidElement(n)){const e={ref:l};return Sn.cloneElement(n,e)}return Ms.jsx(Sn.Fragment,{children:n})}return Ms.jsx(Sn.Fragment,{children:i?kw.createPortal(n,i):i})}));function PS(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function TS(e){return parseInt(Ia(e).getComputedStyle(e).paddingRight,10)||0}function OS(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&PS(e,o)}))}function NS(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function qS(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=La(e);return t.body===e?Ia(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Ka(La(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${TS(r)+e}px`;const t=La(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${TS(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=La(r).body;else{const t=r.parentElement,n=Ia(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const FS=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&PS(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);OS(t,e.mount,e.modalRef,r,!0);const o=NS(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=NS(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=qS(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=NS(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&PS(e.modalRef,t),OS(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&PS(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function zS(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=FS,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:s,onClose:u,open:c,rootRef:d}=e,p=Sn.useRef({}),f=Sn.useRef(null),h=Sn.useRef(null),m=Oa(h,d),[g,y]=Sn.useState(!c),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let v=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(v=!1);const x=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),w=()=>{o.mount(x(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},S=Ta((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||La(f.current).body;o.add(x(),e),h.current&&w()})),E=Sn.useCallback((()=>o.isTopModal(x())),[o]),C=Ta((e=>{f.current=e,e&&(c&&E()?w():h.current&&PS(h.current,v))})),k=Sn.useCallback((()=>{o.remove(x(),v)}),[v,o]);Sn.useEffect((()=>()=>{k()}),[k]),Sn.useEffect((()=>{c?S():b&&i||k()}),[c,k,b,i,S]);const _=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&E()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},M=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Qw(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=Rt({},n,t);return Rt({role:"presentation"},r,{onKeyDown:_(r),ref:m})},getBackdropProps:(e={})=>Rt({"aria-hidden":!0},e,{onClick:M(e),open:c}),getTransitionProps:()=>({onEnter:Ra((()=>{y(!1),a&&a()}),null==s?void 0:s.props.onEnter),onExited:Ra((()=>{y(!0),l&&l(),i&&k()}),null==s?void 0:s.props.onExited)}),rootRef:m,portalRef:C,isTopModal:E,exited:g,hasTransition:b}}const jS=["onChange","maxRows","minRows","style","value"];function BS(e){return parseInt(e,10)||0}const $S={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function WS(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflow}const HS=Sn.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a}=e,l=Ot(e,jS),{current:s}=Sn.useRef(null!=a),u=Sn.useRef(null),c=Oa(t,u),d=Sn.useRef(null),p=Sn.useRef(0),[f,h]=Sn.useState({outerHeightStyle:0}),m=Sn.useCallback((()=>{const t=u.current,n=Ia(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0};const i=d.current;i.style.width=n.width,i.value=t.value||e.placeholder||"x","\n"===i.value.slice(-1)&&(i.value+=" ");const a=n.boxSizing,l=BS(n.paddingBottom)+BS(n.paddingTop),s=BS(n.borderBottomWidth)+BS(n.borderTopWidth),c=i.scrollHeight;i.value="x";const p=i.scrollHeight;let f=c;o&&(f=Math.max(Number(o)*p,f)),r&&(f=Math.min(Number(r)*p,f)),f=Math.max(f,p);return{outerHeightStyle:f+("border-box"===a?l+s:0),overflow:Math.abs(f-c)<=1}}),[r,o,e.placeholder]),g=(e,t)=>{const{outerHeightStyle:n,overflow:r}=t;return p.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==r)?(p.current+=1,{overflow:r,outerHeightStyle:n}):e},y=Sn.useCallback((()=>{const e=m();WS(e)||h((t=>g(t,e)))}),[m]);Pa((()=>{const e=()=>{p.current=0,(()=>{const e=m();WS(e)||kw.flushSync((()=>{h((t=>g(t,e)))}))})()};const t=Aa(e),n=u.current,r=Ia(n);let o;return r.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(e),o.observe(n)),()=>{t.clear(),cancelAnimationFrame(undefined),r.removeEventListener("resize",t),o&&o.disconnect()}}),[m]),Pa((()=>{y()})),Sn.useEffect((()=>{p.current=0}),[a]);return Ms.jsxs(Sn.Fragment,{children:[Ms.jsx("textarea",Rt({value:a,onChange:e=>{p.current=0,s||y(),n&&n(e)},ref:c,rows:o,style:Rt({height:f.outerHeightStyle,overflow:f.overflow?"hidden":void 0},i)},l)),Ms.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:d,tabIndex:-1,style:Rt({},$S,i,{paddingTop:0,paddingBottom:0})})]})}));function VS({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}var GS=Sn.createContext(void 0);function US(){return Sn.useContext(GS)}function YS(e){return Ms.jsx(Rs,ir({},e,{defaultTheme:Wu,themeId:or}))}function KS(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function XS(e,t=!1){return e&&(KS(e.value)&&""!==e.value||t&&KS(e.defaultValue)&&""!==e.defaultValue)}function QS(e){return xu("MuiInputBase",e)}var JS=wu("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);const ZS=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],eE=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Xs(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},tE=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},nE=Ku("div",{name:"MuiInputBase",slot:"Root",overridesResolver:eE})((({theme:e,ownerState:t})=>ir({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${JS.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&ir({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),rE=Ku("input",{name:"MuiInputBase",slot:"Input",overridesResolver:tE})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=ir({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return ir({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${JS.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${JS.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),oE=Ms.jsx(YS,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),iE=Sn.forwardRef((function(e,t){var n;const r=Vu({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,components:s={},componentsProps:u={},defaultValue:c,disabled:d,disableInjectingGlobalStyles:p,endAdornment:f,fullWidth:h=!1,id:m,inputComponent:g="input",inputProps:y={},inputRef:b,maxRows:v,minRows:x,multiline:w=!1,name:S,onBlur:E,onChange:C,onClick:k,onFocus:_,onKeyDown:M,onKeyUp:R,placeholder:A,readOnly:L,renderSuffix:I,rows:D,slotProps:P={},slots:T={},startAdornment:O,type:N="text",value:q}=r,F=ar(r,ZS),z=null!=y.value?y.value:q,{current:j}=Sn.useRef(null!=z),B=Sn.useRef(),$=Sn.useCallback((e=>{}),[]),W=iu(B,b,y.ref,$),[H,V]=Sn.useState(!1),G=US(),U=VS({props:r,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});U.focused=G?G.focused:H,Sn.useEffect((()=>{!G&&d&&H&&(V(!1),E&&E())}),[G,d,H,E]);const Y=G&&G.onFilled,K=G&&G.onEmpty,X=Sn.useCallback((e=>{XS(e)?Y&&Y():K&&K()}),[Y,K]);Zs((()=>{j&&X({value:z})}),[z,X,j]);Sn.useEffect((()=>{X(B.current)}),[]);let Q=g,J=y;w&&"input"===Q&&(J=ir(D?{type:void 0,minRows:D,maxRows:D}:{type:void 0,maxRows:v,minRows:x},J),Q=HS);Sn.useEffect((()=>{G&&G.setAdornedStart(Boolean(O))}),[G,O]);const Z=ir({},r,{color:U.color||"primary",disabled:U.disabled,endAdornment:f,error:U.error,focused:U.focused,formControl:G,fullWidth:h,hiddenLabel:U.hiddenLabel,multiline:w,size:U.size,startAdornment:O,type:N}),ee=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:s,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:f,type:h}=e;return Qa({root:["root",`color${Xs(n)}`,r&&"disabled",o&&"error",s&&"fullWidth",a&&"focused",l&&"formControl",p&&"medium"!==p&&`size${Xs(p)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},QS,t)})(Z),te=T.root||s.Root||nE,ne=P.root||u.root||{},re=T.input||s.Input||rE;return J=ir({},J,null!=(n=P.input)?n:u.input),Ms.jsxs(Sn.Fragment,{children:[!p&&oE,Ms.jsxs(te,ir({},ne,!Xw(te)&&{ownerState:ir({},Z,ne.ownerState)},{ref:t,onClick:e=>{B.current&&e.currentTarget===e.target&&B.current.focus(),k&&k(e)}},F,{className:Ju(ee.root,ne.className,l,L&&"MuiInputBase-readOnly"),children:[O,Ms.jsx(GS.Provider,{value:null,children:Ms.jsx(re,ir({ownerState:Z,"aria-invalid":U.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:c,disabled:U.disabled,id:m,onAnimationStart:e=>{X("mui-auto-fill-cancel"===e.animationName?B.current:{value:"x"})},name:S,placeholder:A,readOnly:L,required:U.required,rows:D,value:z,onKeyDown:M,onKeyUp:R,type:N},J,!Xw(re)&&{as:Q,ownerState:ir({},Z,J.ownerState)},{ref:W,className:Ju(ee.input,J.className,L&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),y.onBlur&&y.onBlur(e),G&&G.onBlur?G.onBlur(e):V(!1)},onChange:(e,...t)=>{if(!j){const t=e.target||B.current;if(null==t)throw new Error(rr(1));X({value:t.value})}y.onChange&&y.onChange(e,...t),C&&C(e,...t)},onFocus:e=>{U.disabled?e.stopPropagation():(_&&_(e),y.onFocus&&y.onFocus(e),G&&G.onFocus?G.onFocus(e):V(!0))}}))}),f,I?I(ir({},U,{startAdornment:O})):null]}))]})}));var aE=iE;function lE(e){return xu("MuiInput",e)}var sE=ir({},JS,wu("MuiInput",["root","underline","input"]));function uE(e){return xu("MuiOutlinedInput",e)}var cE=ir({},JS,wu("MuiOutlinedInput",["root","notchedOutline","input"]));function dE(e){return xu("MuiFilledInput",e)}var pE=ir({},JS,wu("MuiFilledInput",["root","underline","input"])),fE=function(e,t){function n(n,r){return Ms.jsx(rc,ir({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=rc.muiName,Sn.memo(Sn.forwardRef(n))}(Ms.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const hE=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],mE={entering:{opacity:1},entered:{opacity:1}},gE=Sn.forwardRef((function(e,t){const n=Hu(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:s,onEnter:u,onEntered:c,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:y=Nw}=e,b=ar(e,hE),v=Sn.useRef(null),x=iu(v,a.ref,t),w=e=>t=>{if(e){const n=v.current;void 0===t?e(n):e(n,t)}},S=w(d),E=w(((e,t)=>{Ww(e);const r=Hw({style:m,timeout:g,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),C=w(c),k=w(h),_=w((e=>{const t=Hw({style:m,timeout:g,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),M=w(f);return Ms.jsx(y,ir({appear:i,in:s,nodeRef:v,onEnter:E,onEntered:C,onEntering:S,onExit:_,onExited:M,onExiting:k,addEndListener:e=>{o&&o(v.current,e)},timeout:g},b,{children:(e,t)=>Sn.cloneElement(a,ir({style:ir({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},mE[e],m,a.props.style),ref:x},t))}))}));var yE=gE;function bE(e){return xu("MuiBackdrop",e)}wu("MuiBackdrop",["root","invisible"]);const vE=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],xE=Ku("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>ir({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),wE=Sn.forwardRef((function(e,t){var n,r,o;const i=Vu({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:s="div",components:u={},componentsProps:c={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=yE,transitionDuration:g}=i,y=ar(i,vE),b=ir({},i,{component:s,invisible:d}),v=(e=>{const{classes:t,invisible:n}=e;return Qa({root:["root",n&&"invisible"]},bE,t)})(b),x=null!=(n=f.root)?n:c.root;return Ms.jsx(m,ir({in:p,timeout:g},y,{children:Ms.jsx(xE,ir({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:u.Root)?r:s,className:Ju(v.root,l,null==x?void 0:x.className),ownerState:ir({},b,null==x?void 0:x.ownerState),classes:v,ref:t,children:a}))}))}));var SE=wE;var EE=wu("MuiBox",["root"]);const CE=$u(),kE=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Ki("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(ds),a=Sn.forwardRef((function(e,a){const l=ys(n),s=Ls(e),{className:u,component:c="div"}=s,d=Ot(s,Is);return Ms.jsx(i,Rt({as:c,ref:a,className:ll(u,o?o(r):r),theme:t&&l[t]||l},d))}));return a}({themeId:or,defaultTheme:CE,defaultClassName:EE.root,generateClassName:bu.generate});var _E=kE;function ME(e){return xu("MuiButton",e)}var RE=wu("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var AE=Sn.createContext({});var LE=Sn.createContext(void 0);const IE=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],DE=e=>ir({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),PE=Ku(xS,{shouldForwardProp:e=>Gu(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Xs(n.color)}`],t[`size${Xs(n.size)}`],t[`${n.variant}Size${Xs(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return ir({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":ir({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Gs(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Gs(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Gs(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":ir({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${RE.focusVisible}`]:ir({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${RE.disabled}`]:ir({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Gs(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${RE.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${RE.disabled}`]:{boxShadow:"none"}})),TE=Ku("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Xs(n.size)}`]]}})((({ownerState:e})=>ir({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},DE(e)))),OE=Ku("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Xs(n.size)}`]]}})((({ownerState:e})=>ir({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},DE(e)))),NE=Sn.forwardRef((function(e,t){const n=Sn.useContext(AE),r=Sn.useContext(LE),o=Vu({props:gu(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:l="button",className:s,disabled:u=!1,disableElevation:c=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:f,fullWidth:h=!1,size:m="medium",startIcon:g,type:y,variant:b="text"}=o,v=ar(o,IE),x=ir({},o,{color:a,component:l,disabled:u,disableElevation:c,disableFocusRipple:d,fullWidth:h,size:m,type:y,variant:b}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return ir({},a,Qa({root:["root",i,`${i}${Xs(t)}`,`size${Xs(o)}`,`${i}Size${Xs(o)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Xs(o)}`],endIcon:["endIcon",`iconSize${Xs(o)}`]},ME,a))})(x),S=g&&Ms.jsx(TE,{className:w.startIcon,ownerState:x,children:g}),E=p&&Ms.jsx(OE,{className:w.endIcon,ownerState:x,children:p}),C=r||"";return Ms.jsxs(PE,ir({ownerState:x,className:Ju(n.className,w.root,s,C),component:l,disabled:u,focusRipple:!d,focusVisibleClassName:Ju(w.focusVisible,f),ref:t,type:y},v,{classes:w,children:[S,i,E]}))}));var qE=NE;function FE(e){return xu("MuiModal",e)}wu("MuiModal",["root","hidden","backdrop"]);const zE=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],jE=Ku("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>ir({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),BE=Ku(SE,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),$E=Sn.forwardRef((function(e,t){var n,r,o,i,a,l;const s=Vu({name:"MuiModal",props:e}),{BackdropComponent:u=BE,BackdropProps:c,className:d,closeAfterTransition:p=!1,children:f,container:h,component:m,components:g={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:S=!1,disableScrollLock:E=!1,hideBackdrop:C=!1,keepMounted:k=!1,onBackdropClick:_,open:M,slotProps:R,slots:A}=s,L=ar(s,zE),I=ir({},s,{closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:v,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:S,disableScrollLock:E,hideBackdrop:C,keepMounted:k}),{getRootProps:D,getBackdropProps:P,getTransitionProps:T,portalRef:O,isTopModal:N,exited:q,hasTransition:F}=zS(ir({},I,{rootRef:t})),z=ir({},I,{exited:q}),j=(e=>{const{open:t,exited:n,classes:r}=e;return Qa({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},FE,r)})(z),B={};if(void 0===f.props.tabIndex&&(B.tabIndex="-1"),F){const{onEnter:e,onExited:t}=T();B.onEnter=e,B.onExited=t}const $=null!=(n=null!=(r=null==A?void 0:A.root)?r:g.Root)?n:jE,W=null!=(o=null!=(i=null==A?void 0:A.backdrop)?i:g.Backdrop)?o:u,H=null!=(a=null==R?void 0:R.root)?a:y.root,V=null!=(l=null==R?void 0:R.backdrop)?l:y.backdrop,G=eS({elementType:$,externalSlotProps:H,externalForwardedProps:L,getSlotProps:D,additionalProps:{ref:t,as:m},ownerState:z,className:Ju(d,null==H?void 0:H.className,null==j?void 0:j.root,!z.open&&z.exited&&(null==j?void 0:j.hidden))}),U=eS({elementType:W,externalSlotProps:V,additionalProps:c,getSlotProps:e=>P(ir({},e,{onClick:t=>{_&&_(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ju(null==V?void 0:V.className,null==c?void 0:c.className,null==j?void 0:j.backdrop),ownerState:z});return k||M||F&&!q?Ms.jsx(DS,{ref:O,container:h,disablePortal:w,children:Ms.jsxs($,ir({},G,{children:[!C&&u?Ms.jsx(W,ir({},U)):null,Ms.jsx(IS,{disableEnforceFocus:v,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:N,open:M,children:Sn.cloneElement(f,B)})]}))}):null}));var WE=$E;function HE(e){return xu("MuiDivider",e)}var VE=wu("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const GE=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],UE=Ku("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>ir({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Gs(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>ir({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>ir({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>ir({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>ir({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),YE=Ku("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>ir({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),KE=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:l=!1,light:s=!1,orientation:u="horizontal",role:c=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=ar(n,GE),h=ir({},n,{absolute:r,component:a,flexItem:l,light:s,orientation:u,role:c,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:l,variant:s}=e;return Qa({root:["root",t&&"absolute",s,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===l&&"vertical"!==a&&"textAlignRight","left"===l&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},HE,r)})(h);return Ms.jsx(UE,ir({as:a,className:Ju(m.root,i),role:c,ref:t,ownerState:h},f,{children:o?Ms.jsx(YE,{className:m.wrapper,ownerState:h,children:o}):null}))}));KE.muiSkipListHighlight=!0;var XE=KE;const QE=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],JE=Ku(nE,{shouldForwardProp:e=>Gu(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...eE(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return ir({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${pE.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${pE.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pE.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pE.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pE.disabled}, .${pE.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pE.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&ir({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))})),ZE=Ku(rE,{name:"MuiFilledInput",slot:"Input",overridesResolver:tE})((({theme:e,ownerState:t})=>ir({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),eC=Sn.forwardRef((function(e,t){var n,r,o,i;const a=Vu({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:s,fullWidth:u=!1,inputComponent:c="input",multiline:d=!1,slotProps:p,slots:f={},type:h="text"}=a,m=ar(a,QE),g=ir({},a,{fullWidth:u,inputComponent:c,multiline:d,type:h}),y=(e=>{const{classes:t,disableUnderline:n}=e;return ir({},t,Qa({root:["root",!n&&"underline"],input:["input"]},dE,t))})(a),b={root:{ownerState:g},input:{ownerState:g}},v=(null!=p?p:s)?Ks(b,null!=p?p:s):b,x=null!=(n=null!=(r=f.root)?r:l.Root)?n:JE,w=null!=(o=null!=(i=f.input)?i:l.Input)?o:ZE;return Ms.jsx(aE,ir({slots:{root:x,input:w},componentsProps:v,fullWidth:u,inputComponent:c,multiline:d,ref:t,type:h},m,{classes:y}))}));eC.muiName="Input";var tC=eC;const nC=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function rC(e){return`scale(${e}, ${e**2})`}const oC={entering:{opacity:1,transform:rC(1)},entered:{opacity:1,transform:"none"}},iC="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),aC=Sn.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:s,onEntering:u,onExit:c,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=Nw}=e,g=ar(e,nC),y=Sn.useRef(),b=Sn.useRef(),v=Hu(),x=Sn.useRef(null),w=iu(x,o.ref,t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(u),C=S(((e,t)=>{Ww(e);const{duration:n,delay:r,easing:o}=Hw({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[v.transitions.create("opacity",{duration:a,delay:r}),v.transitions.create("transform",{duration:iC?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)})),k=S(s),_=S(p),M=S((e=>{const{duration:t,delay:n,easing:r}=Hw({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[v.transitions.create("opacity",{duration:o,delay:n}),v.transitions.create("transform",{duration:iC?o:.666*o,delay:iC?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=rC(.75),c&&c(e)})),R=S(d);return Sn.useEffect((()=>()=>{clearTimeout(y.current)}),[]),Ms.jsx(m,ir({appear:r,in:a,nodeRef:x,onEnter:C,onEntered:k,onEntering:E,onExit:M,onExited:R,onExiting:_,addEndListener:e=>{"auto"===h&&(y.current=setTimeout(e,b.current||0)),n&&n(x.current,e)},timeout:"auto"===h?null:h},g,{children:(e,t)=>Sn.cloneElement(o,ir({style:ir({opacity:0,transform:rC(.75),visibility:"exited"!==e||a?void 0:"hidden"},oC[e],f,o.props.style),ref:w},t))}))}));aC.muiSupportAuto=!0;var lC=aC;const sC=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],uC=Ku(nE,{shouldForwardProp:e=>Gu(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...eE(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),ir({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${sE.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${sE.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${sE.disabled}, .${sE.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${sE.disabled}:before`]:{borderBottomStyle:"dotted"}})})),cC=Ku(rE,{name:"MuiInput",slot:"Input",overridesResolver:tE})({}),dC=Sn.forwardRef((function(e,t){var n,r,o,i;const a=Vu({props:e,name:"MuiInput"}),{disableUnderline:l,components:s={},componentsProps:u,fullWidth:c=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:m="text"}=a,g=ar(a,sC),y=(e=>{const{classes:t,disableUnderline:n}=e;return ir({},t,Qa({root:["root",!n&&"underline"],input:["input"]},lE,t))})(a),b={root:{ownerState:{disableUnderline:l}}},v=(null!=f?f:u)?Ks(null!=f?f:u,b):b,x=null!=(n=null!=(r=h.root)?r:s.Root)?n:uC,w=null!=(o=null!=(i=h.input)?i:s.Input)?o:cC;return Ms.jsx(aE,ir({slots:{root:x,input:w},slotProps:v,fullWidth:c,inputComponent:d,multiline:p,ref:t,type:m},g,{classes:y}))}));dC.muiName="Input";var pC=dC;function fC(e){return xu("MuiLink",e)}var hC=wu("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);const mC={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var gC=({theme:e,ownerState:t})=>{const n=(e=>mC[e]||e)(t.color),r=vl(e,`palette.${n}`,!1)||t.color,o=vl(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Gs(r,.4)};const yC=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],bC=Ku(MS,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${Xs(n.underline)}`],"button"===n.component&&t.button]}})((({theme:e,ownerState:t})=>ir({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&ir({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:gC({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${hC.focusVisible}`]:{outline:"auto"}}))),vC=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiLink"}),{className:r,color:o="primary",component:i="a",onBlur:a,onFocus:l,TypographyClasses:s,underline:u="always",variant:c="inherit",sx:d}=n,p=ar(n,yC),{isFocusVisibleRef:f,onBlur:h,onFocus:m,ref:g}=mu(),[y,b]=Sn.useState(!1),v=iu(t,g),x=ir({},n,{color:o,component:i,focusVisible:y,underline:u,variant:c}),w=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e;return Qa({root:["root",`underline${Xs(o)}`,"button"===n&&"button",r&&"focusVisible"]},fC,t)})(x);return Ms.jsx(bC,ir({color:o,className:Ju(w.root,r),classes:s,component:i,onBlur:e=>{h(e),!1===f.current&&b(!1),a&&a(e)},onFocus:e=>{m(e),!0===f.current&&b(!0),l&&l(e)},ref:v,ownerState:x,variant:c,sx:[...Object.keys(mC).includes(o)?[]:[{color:o}],...Array.isArray(d)?d:[d]]},p))}));var xC=vC;var wC=Sn.createContext({});function SC(e){return xu("MuiList",e)}wu("MuiList",["root","padding","dense","subheader"]);const EC=["children","className","component","dense","disablePadding","subheader"],CC=Ku("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>ir({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),kC=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:l=!1,subheader:s}=n,u=ar(n,EC),c=Sn.useMemo((()=>({dense:a})),[a]),d=ir({},n,{component:i,dense:a,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Qa({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},SC,t)})(d);return Ms.jsx(wC.Provider,{value:c,children:Ms.jsxs(CC,ir({as:i,className:Ju(p.root,o),ref:t,ownerState:d},u,{children:[s,r]}))})}));var _C=kC;function MC(e){return xu("MuiListItemIcon",e)}var RC=wu("MuiListItemIcon",["root","alignItemsFlexStart"]);const AC=["className"],LC=Ku("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>ir({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})));var IC=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=ar(n,AC),i=ir({},n,{alignItems:Sn.useContext(wC).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return Qa({root:["root","flex-start"===t&&"alignItemsFlexStart"]},MC,n)})(i);return Ms.jsx(LC,ir({className:Ju(a.root,r),ownerState:i,ref:t},o))}));var DC=wu("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const PC=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function TC(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function OC(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function NC(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function qC(e,t,n,r,o,i){let a=!1,l=o(e,t,!!t&&n);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const t=!r&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&NC(l,i)&&!t)return l.focus(),!0;l=o(e,l,n)}return!1}const FC=Sn.forwardRef((function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:l=!1,disableListWrap:s=!1,onKeyDown:u,variant:c="selectedMenu"}=e,d=ar(e,PC),p=Sn.useRef(null),f=Sn.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Zs((()=>{r&&p.current.focus()}),[r]),Sn.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(Qs(e))}px`;p.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}})),[]);const h=iu(p,t);let m=-1;Sn.Children.forEach(i,((e,t)=>{Sn.isValidElement(e)?(e.props.disabled||("selectedMenu"===c&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1))):m===t&&(m+=1,m>=i.length&&(m=-1))}));const g=Sn.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===c&&(t.tabIndex=0),Sn.cloneElement(e,t)}return e}));return Ms.jsx(_C,ir({role:"menu",ref:h,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=Qs(t).activeElement;if("ArrowDown"===n)e.preventDefault(),qC(t,r,s,l,TC);else if("ArrowUp"===n)e.preventDefault(),qC(t,r,s,l,OC);else if("Home"===n)e.preventDefault(),qC(t,null,s,l,TC);else if("End"===n)e.preventDefault(),qC(t,null,s,l,OC);else if(1===n.length){const o=f.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&NC(r,o);o.previousKeyMatched&&(s||qC(t,r,!1,l,TC,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},d,{children:g}))}));var zC=FC;function jC(e){return xu("MuiPopover",e)}wu("MuiPopover",["root","paper"]);const BC=["onEntering"],$C=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],WC=["slotProps"];function HC(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function VC(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function GC(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function UC(e){return"function"==typeof e?e():e}const YC=Ku(WE,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),KC=Ku(Kw,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),XC=Sn.forwardRef((function(e,t){var n,r,o;const i=Vu({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:d,className:p,container:f,elevation:h=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:b,slotProps:v,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=lC,transitionDuration:S="auto",TransitionProps:{onEntering:E}={},disableScrollLock:C=!1}=i,k=ar(i.TransitionProps,BC),_=ar(i,$C),M=null!=(n=null==v?void 0:v.paper)?n:y,R=Sn.useRef(),A=iu(R,M.ref),L=ir({},i,{anchorOrigin:s,anchorReference:c,elevation:h,marginThreshold:m,externalPaperSlotProps:M,transformOrigin:x,TransitionComponent:w,transitionDuration:S,TransitionProps:k}),I=(e=>{const{classes:t}=e;return Qa({root:["root"],paper:["paper"]},jC,t)})(L),D=Sn.useCallback((()=>{if("anchorPosition"===c)return u;const e=UC(l),t=(e&&1===e.nodeType?e:Qs(R.current).body).getBoundingClientRect();return{top:t.top+HC(t,s.vertical),left:t.left+VC(t,s.horizontal)}}),[l,s.horizontal,s.vertical,u,c]),P=Sn.useCallback((e=>({vertical:HC(e,x.vertical),horizontal:VC(e,x.horizontal)})),[x.horizontal,x.vertical]),T=Sn.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===c)return{top:null,left:null,transformOrigin:GC(n)};const r=D();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,u=Js(UC(l)),d=u.innerHeight-m,p=u.innerWidth-m;if(null!==m&&o<m){const e=o-m;o-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;o-=e,n.vertical+=e}if(null!==m&&i<m){const e=i-m;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:GC(n)}}),[l,c,D,P,m]),[O,N]=Sn.useState(g),q=Sn.useCallback((()=>{const e=R.current;if(!e)return;const t=T(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,N(!0)}),[T]);Sn.useEffect((()=>(C&&window.addEventListener("scroll",q),()=>window.removeEventListener("scroll",q))),[l,C,q]);Sn.useEffect((()=>{g&&q()})),Sn.useImperativeHandle(a,(()=>g?{updatePosition:()=>{q()}}:null),[g,q]),Sn.useEffect((()=>{if(!g)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}((()=>{q()})),t=Js(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,g,q]);let F=S;"auto"!==S||w.muiSupportAuto||(F=void 0);const z=f||(l?Qs(UC(l)).body:void 0),j=null!=(r=null==b?void 0:b.root)?r:YC,B=null!=(o=null==b?void 0:b.paper)?o:KC,$=eS({elementType:B,externalSlotProps:ir({},M,{style:O?M.style:ir({},M.style,{opacity:0})}),additionalProps:{elevation:h,ref:A},ownerState:L,className:Ju(I.paper,null==M?void 0:M.className)}),W=eS({elementType:j,externalSlotProps:(null==v?void 0:v.root)||{},externalForwardedProps:_,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:z,open:g},ownerState:L,className:Ju(I.root,p)}),{slotProps:H}=W,V=ar(W,WC);return Ms.jsx(j,ir({},V,!Xw(j)&&{slotProps:H,disableScrollLock:C},{children:Ms.jsx(w,ir({appear:!0,in:g,onEntering:(e,t)=>{E&&E(e,t),q()},onExited:()=>{N(!1)},timeout:F},k,{children:Ms.jsx(B,ir({},$,{children:d}))}))}))}));var QC=XC;function JC(e){return xu("MuiMenu",e)}wu("MuiMenu",["root","paper","list"]);const ZC=["onEntering"],ek=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],tk={vertical:"top",horizontal:"right"},nk={vertical:"top",horizontal:"left"},rk=Ku(QC,{shouldForwardProp:e=>Gu(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ok=Ku(KC,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ik=Ku(zC,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ak=Sn.forwardRef((function(e,t){var n,r;const o=Vu({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:l,disableAutoFocusItem:s=!1,MenuListProps:u={},onClose:c,open:d,PaperProps:p={},PopoverClasses:f,transitionDuration:h="auto",TransitionProps:{onEntering:m}={},variant:g="selectedMenu",slots:y={},slotProps:b={}}=o,v=ar(o.TransitionProps,ZC),x=ar(o,ek),w=Hu(),S="rtl"===w.direction,E=ir({},o,{autoFocus:i,disableAutoFocusItem:s,MenuListProps:u,onEntering:m,PaperProps:p,transitionDuration:h,TransitionProps:v,variant:g}),C=(e=>{const{classes:t}=e;return Qa({root:["root"],paper:["paper"],list:["list"]},JC,t)})(E),k=i&&!s&&d,_=Sn.useRef(null);let M=-1;Sn.Children.map(a,((e,t)=>{Sn.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===M)&&(M=t))}));const R=null!=(n=y.paper)?n:ok,A=null!=(r=b.paper)?r:p,L=eS({elementType:y.root,externalSlotProps:b.root,ownerState:E,className:[C.root,l]}),I=eS({elementType:R,externalSlotProps:A,ownerState:E,className:C.paper});return Ms.jsx(rk,ir({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?tk:nk,slots:{paper:R,root:y.root},slotProps:{root:L,paper:I},open:d,ref:t,transitionDuration:h,TransitionProps:ir({onEntering:(e,t)=>{_.current&&_.current.adjustStyleForScrollbar(e,w),m&&m(e,t)}},v),ownerState:E},x,{classes:f,children:Ms.jsx(ik,ir({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))},actions:_,autoFocus:i&&(-1===M||s),autoFocusItem:k,variant:g},u,{className:Ju(C.list,u.className),children:a}))}))}));var lk=ak;function sk(e){return xu("MuiMenuItem",e)}var uk=wu("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const ck=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],dk=Ku(xS,{shouldForwardProp:e=>Gu(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>ir({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${uk.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Gs(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${uk.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Gs(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${uk.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Gs(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Gs(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${uk.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${uk.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${VE.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${VE.inset}`]:{marginLeft:52},[`& .${DC.root}`]:{marginTop:0,marginBottom:0},[`& .${DC.inset}`]:{paddingLeft:36},[`& .${RC.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&ir({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${RC.root} svg`]:{fontSize:"1.25rem"}})))),pk=Sn.forwardRef((function(e,t){const n=Vu({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:s,role:u="menuitem",tabIndex:c,className:d}=n,p=ar(n,ck),f=Sn.useContext(wC),h=Sn.useMemo((()=>({dense:i||f.dense||!1,disableGutters:l})),[f.dense,i,l]),m=Sn.useRef(null);Zs((()=>{r&&m.current&&m.current.focus()}),[r]);const g=ir({},n,{dense:h.dense,divider:a,disableGutters:l}),y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return ir({},a,Qa({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},sk,a))})(n),b=iu(m,t);let v;return n.disabled||(v=void 0!==c?c:-1),Ms.jsx(wC.Provider,{value:h,children:Ms.jsx(dk,ir({ref:b,role:u,tabIndex:v,component:o,focusVisibleClassName:Ju(y.focusVisible,s),className:Ju(y.root,d)},p,{ownerState:g,classes:y}))})}));var fk=pk;function hk(e){return xu("MuiNativeSelect",e)}var mk=wu("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const gk=["className","disabled","error","IconComponent","inputRef","variant"],yk=({ownerState:e,theme:t})=>ir({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":ir({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${mk.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),bk=Ku("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Gu,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${mk.multiple}`]:t.multiple}]}})(yk),vk=({ownerState:e,theme:t})=>ir({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${mk.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),xk=Ku("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Xs(n.variant)}`],n.open&&t.iconOpen]}})(vk),wk=Sn.forwardRef((function(e,t){const{className:n,disabled:r,error:o,IconComponent:i,inputRef:a,variant:l="standard"}=e,s=ar(e,gk),u=ir({},e,{disabled:r,variant:l,error:o}),c=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Qa({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Xs(n)}`,i&&"iconOpen",r&&"disabled"]},hk,t)})(u);return Ms.jsxs(Sn.Fragment,{children:[Ms.jsx(bk,ir({ownerState:u,className:Ju(c.select,n),disabled:r,ref:a||t},s)),e.multiple?null:Ms.jsx(xk,{as:i,ownerState:u,className:c.icon})]})}));var Sk,Ek=wk;const Ck=["children","classes","className","label","notched"],kk=Ku("fieldset",{shouldForwardProp:Gu})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),_k=Ku("legend",{shouldForwardProp:Gu})((({ownerState:e,theme:t})=>ir({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&ir({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));const Mk=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Rk=Ku(nE,{shouldForwardProp:e=>Gu(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:eE})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return ir({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${cE.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${cE.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${cE.focused} .${cE.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${cE.error} .${cE.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${cE.disabled} .${cE.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&ir({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),Ak=Ku((function(e){const{className:t,label:n,notched:r}=e,o=ar(e,Ck),i=null!=n&&""!==n,a=ir({},e,{notched:r,withLabel:i});return Ms.jsx(kk,ir({"aria-hidden":!0,className:t,ownerState:a},o,{children:Ms.jsx(_k,{ownerState:a,children:i?Ms.jsx("span",{children:n}):Sk||(Sk=Ms.jsx("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),Lk=Ku(rE,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:tE})((({theme:e,ownerState:t})=>ir({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),Ik=Sn.forwardRef((function(e,t){var n,r,o,i,a;const l=Vu({props:e,name:"MuiOutlinedInput"}),{components:s={},fullWidth:u=!1,inputComponent:c="input",label:d,multiline:p=!1,notched:f,slots:h={},type:m="text"}=l,g=ar(l,Mk),y=(e=>{const{classes:t}=e;return ir({},t,Qa({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},uE,t))})(l),b=US(),v=VS({props:l,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x=ir({},l,{color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:b,fullWidth:u,hiddenLabel:v.hiddenLabel,multiline:p,size:v.size,type:m}),w=null!=(n=null!=(r=h.root)?r:s.Root)?n:Rk,S=null!=(o=null!=(i=h.input)?i:s.Input)?o:Lk;return Ms.jsx(aE,ir({slots:{root:w,input:S},renderSuffix:e=>Ms.jsx(Ak,{ownerState:x,className:y.notchedOutline,label:null!=d&&""!==d&&v.required?a||(a=Ms.jsxs(Sn.Fragment,{children:[d," ","*"]})):d,notched:void 0!==f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:c,multiline:p,ref:t,type:m},g,{classes:ir({},y,{notchedOutline:null})}))}));Ik.muiName="Input";var Dk=Ik;function Pk(e){return xu("MuiSelect",e)}var Tk,Ok=wu("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const Nk=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],qk=Ku("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ok.select}`]:t.select},{[`&.${Ok.select}`]:t[n.variant]},{[`&.${Ok.error}`]:t.error},{[`&.${Ok.multiple}`]:t.multiple}]}})(yk,{[`&.${Ok.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Fk=Ku("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Xs(n.variant)}`],n.open&&t.iconOpen]}})(vk),zk=Ku("input",{shouldForwardProp:e=>Uu(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function jk(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function Bk(e){return null==e||"string"==typeof e&&!e.trim()}const $k=Sn.forwardRef((function(e,t){var n;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:l,className:s,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:p,error:f=!1,IconComponent:h,inputRef:m,labelId:g,MenuProps:y={},multiple:b,name:v,onBlur:x,onChange:w,onClose:S,onFocus:E,onOpen:C,open:k,readOnly:_,renderValue:M,SelectDisplayProps:R={},tabIndex:A,value:L,variant:I="standard"}=e,D=ar(e,Nk),[P,T]=ru({controlled:L,default:c,name:"Select"}),[O,N]=ru({controlled:k,default:u,name:"Select"}),q=Sn.useRef(null),F=Sn.useRef(null),[z,j]=Sn.useState(null),{current:B}=Sn.useRef(null!=k),[$,W]=Sn.useState(),H=iu(t,m),V=Sn.useCallback((e=>{F.current=e,e&&j(e)}),[]),G=null==z?void 0:z.parentNode;Sn.useImperativeHandle(H,(()=>({focus:()=>{F.current.focus()},node:q.current,value:P})),[P]),Sn.useEffect((()=>{u&&O&&z&&!B&&(W(a?null:G.clientWidth),F.current.focus())}),[z,a]),Sn.useEffect((()=>{i&&F.current.focus()}),[i]),Sn.useEffect((()=>{if(!g)return;const e=Qs(F.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[g]);const U=(e,t)=>{e?C&&C(t):S&&S(t),B||(W(a?null:G.clientWidth),N(e))},Y=Sn.Children.toArray(l),K=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(b){n=Array.isArray(P)?P.slice():[];const t=P.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),P!==n&&(T(n),w)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:v}}),w(o,e)}b||U(!1,t)}},X=null!==z&&O;let Q,J;delete D["aria-invalid"];const Z=[];let ee=!1;(XS({value:P})||p)&&(M?Q=M(P):ee=!0);const te=Y.map((e=>{if(!Sn.isValidElement(e))return null;let t;if(b){if(!Array.isArray(P))throw new Error(rr(2));t=P.some((t=>jk(t,e.props.value))),t&&ee&&Z.push(e.props.children)}else t=jk(P,e.props.value),t&&ee&&(J=e.props.children);return Sn.cloneElement(e,{"aria-selected":t?"true":"false",onClick:K(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ee&&(Q=b?0===Z.length?null:Z.reduce(((e,t,n)=>(e.push(t),n<Z.length-1&&e.push(", "),e)),[]):J);let ne,re=$;!a&&B&&z&&(re=G.clientWidth),ne=void 0!==A?A:d?null:0;const oe=R.id||(v?`mui-component-select-${v}`:void 0),ie=ir({},e,{variant:I,value:P,open:X,error:f}),ae=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Qa({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Xs(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Pk,t)})(ie),le=ir({},y.PaperProps,null==(n=y.slotProps)?void 0:n.paper),se=nu();return Ms.jsxs(Sn.Fragment,{children:[Ms.jsx(qk,ir({ref:V,tabIndex:ne,role:"combobox","aria-controls":se,"aria-disabled":d?"true":void 0,"aria-expanded":X?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[g,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!_){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),U(!0,e))}},onMouseDown:d||_?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),U(!0,e))},onBlur:e=>{!X&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:P,name:v}}),x(e))},onFocus:E},R,{ownerState:ie,className:Ju(R.className,ae.select,s),id:oe,children:Bk(Q)?Tk||(Tk=Ms.jsx("span",{className:"notranslate",children:"​"})):Q})),Ms.jsx(zk,ir({"aria-invalid":f,value:Array.isArray(P)?P.join(","):P,name:v,ref:q,"aria-hidden":!0,onChange:e=>{const t=Y.find((t=>t.props.value===e.target.value));void 0!==t&&(T(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:d,className:ae.nativeInput,autoFocus:i,ownerState:ie},D)),Ms.jsx(Fk,{as:h,className:ae.icon,ownerState:ie}),Ms.jsx(lk,ir({id:`menu-${v||""}`,anchorEl:G,open:X,onClose:e=>{U(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:ir({"aria-labelledby":g,role:"listbox","aria-multiselectable":b?"true":void 0,disableListWrap:!0,id:se},y.MenuListProps),slotProps:ir({},y.slotProps,{paper:ir({},le,{style:ir({minWidth:re},null!=le?le.style:null)})}),children:te}))]})}));var Wk=$k;const Hk=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Vk=["root"],Gk={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Gu(e)&&"variant"!==e,slot:"Root"},Uk=Ku(pC,Gk)(""),Yk=Ku(Dk,Gk)(""),Kk=Ku(tC,Gk)(""),Xk=Sn.forwardRef((function(e,t){const n=Vu({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:i={},className:a,defaultOpen:l=!1,displayEmpty:s=!1,IconComponent:u=fE,id:c,input:d,inputProps:p,label:f,labelId:h,MenuProps:m,multiple:g=!1,native:y=!1,onClose:b,onOpen:v,open:x,renderValue:w,SelectDisplayProps:S,variant:E="outlined"}=n,C=ar(n,Hk),k=y?Ek:Wk,_=VS({props:n,muiFormControl:US(),states:["variant","error"]}),M=_.variant||E,R=ir({},n,{variant:M,classes:i}),A=(e=>{const{classes:t}=e;return t})(R),L=ar(A,Vk),I=d||{standard:Ms.jsx(Uk,{ownerState:R}),outlined:Ms.jsx(Yk,{label:f,ownerState:R}),filled:Ms.jsx(Kk,{ownerState:R})}[M],D=iu(t,I.ref);return Ms.jsx(Sn.Fragment,{children:Sn.cloneElement(I,ir({inputComponent:k,inputProps:ir({children:o,error:_.error,IconComponent:u,variant:M,type:void 0,multiple:g},y?{id:c}:{autoWidth:r,defaultOpen:l,displayEmpty:s,labelId:h,MenuProps:m,onClose:b,onOpen:v,open:x,renderValue:w,SelectDisplayProps:ir({id:c},S)},p,{classes:p?Ks(L,p.classes):L},d?d.props.inputProps:{})},g&&y&&"outlined"===M?{notched:!0}:{},{ref:D,className:Ju(I.props.className,a,A.root)},!d&&{variant:M},C))})}));Xk.muiName="Select";var Qk=Xk,Jk=(e={})=>En.createElement(Wn,{...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("rect",{stroke:_n.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"}))));const Zk={MuiAccordion:{styleOverrides:{root:{backgroundColor:_n.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:_n.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:En.createElement(jn,{"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 ${_n.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:_n.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${_n.MISC_FOCUS_BORDER}`,borderRadius:In,backgroundColor:_n.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 ${_n.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:_n.WHITE,color:_n.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:In},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${_n.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:_n.GREYSCALE_0_15,backgroundColor:_n.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:_n.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${_n.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:_n.GREEN_PALE},"&:active":{backgroundColor:_n.GREEN_DARK},"&.Mui-focusVisible":{borderColor:_n.GREEN_PALE,boxShadow:`0 0 0 3px ${Gs(_n.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:_n.BLUE_PALE},"&:active":{backgroundColor:_n.BLUE_DARK},"&.Mui-focusVisible":{borderColor:_n.BLUE_PALE,boxShadow:`0 0 0 3px ${Gs(_n.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:In,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:_n.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${_n.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:_n.GREYSCALE_0_15,backgroundColor:_n.GREYSCALE_100_60,"&:active":{backgroundColor:_n.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:_n.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${_n.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:_n.PURPLE,"&.Mui-focusVisible":{borderColor:_n.PURPLE,boxShadow:`0 0 0 3px ${Gs(_n.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:_n.GREEN,"&.Mui-focusVisible":{borderColor:_n.GREEN,boxShadow:`0 0 0 3px ${Gs(_n.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:_n.BLUE,"&.Mui-focusVisible":{borderColor:_n.BLUE,boxShadow:`0 0 0 3px ${Gs(_n.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:_n.ORANGE,"&.Mui-focusVisible":{borderColor:_n.ORANGE,boxShadow:`0 0 0 3px ${Gs(_n.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:_n.RED,"&.Mui-focusVisible":{borderColor:_n.RED,boxShadow:`0 0 0 3px ${Gs(_n.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:_n.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:_n.PURPLE_PALE},"&:active":{backgroundColor:_n.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:_n.PURPLE_PALE,boxShadow:`0 0 0 3px ${Gs(_n.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:_n.GREEN_PALE},"&:active":{backgroundColor:_n.GREEN_DARK},"&.Mui-focusVisible":{borderColor:_n.GREEN_PALE,boxShadow:`0 0 0 3px ${Gs(_n.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:_n.BLUE_PALE},"&:active":{backgroundColor:_n.BLUE_DARK},"&.Mui-focusVisible":{borderColor:_n.BLUE_PALE,boxShadow:`0 0 0 3px ${Gs(_n.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:_n.ORANGE_PALE},"&:active":{backgroundColor:_n.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:_n.ORANGE_PALE,boxShadow:`0 0 0 3px ${Gs(_n.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:_n.RED_PALE},"&:active":{backgroundColor:_n.RED_DARK},"&.Mui-focusVisible":{borderColor:_n.RED_PALE,boxShadow:`0 0 0 3px ${Gs(_n.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:_n.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:_n.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:In,boxShadow:`inset 0 0 0 2px ${_n.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:En.createElement($n,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:Mn,borderRadius:In,color:_n.TEXT_PRIMARY,backgroundColor:_n.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:_n.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${_n.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:_n.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:_n.GREYSCALE_0_05,color:_n.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:_n.GREEN,borderColor:_n.GREEN},"&.MuiChip-outlinedInfo":{color:_n.BLUE,borderColor:_n.BLUE},"&.MuiChip-outlinedWarning":{color:_n.ORANGE,borderColor:_n.ORANGE},"&.MuiChip-outlinedError":{color:_n.RED,borderColor:_n.RED}},outlined:{border:`solid 1px ${_n.GREYSCALE_0_15}`,backgroundColor:_n.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:In,boxShadow:"none",backgroundColor:_n.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:_n.GREEN,borderColor:_n.GREEN},outlinedSecondary:{color:_n.BLUE,borderColor:_n.BLUE},label:{fontFamily:Nn.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:En.createElement($n,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:En.createElement(jn,{"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:In},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:In,fontSize:Rn,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:_n.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${_n.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:_n.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:_n.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:_n.GREYSCALE_0_05}}},popupIndicator:{borderRadius:In,border:`solid 1px ${_n.GREYSCALE_0_15}`,color:_n.GREYSCALE_0_60,marginRight:0,width:Ln,height:Ln},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${_n.GREYSCALE_0_15}`},clearIndicator:{borderRadius:In,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:_n.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:Rn}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:Mn,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:_n.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:_n.GREYSCALE_25,fontSize:Mn,fontFamily:Nn.FONT_FAMILY,fontWeight:Tn,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:_n.TEXT_PRIMARY},"&.Mui-error":{color:_n.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:_n.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Pn,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:_n.TEXT_SECONDARY,content:"'(required)'",fontWeight:Pn,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:Rn,lineHeight:"16px",backgroundColor:_n.WHITE,borderRadius:In,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${_n.GREYSCALE_0_05}`,borderColor:_n.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${_n.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${_n.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${_n.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${_n.RED}`,boxShadow:`0px 0px 0px 1px ${_n.RED}, inset 0 2px 0 0 ${_n.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${_n.GREYSCALE_0_10}`,borderColor:_n.GREYSCALE_0_10,backgroundColor:_n.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:_n.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:_n.GREYSCALE_0_15,borderRadius:In,boxShadow:`inset 0 2px 0 0 ${_n.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>En.createElement(jn,{...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:_n.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:_n.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:_n.GREYSCALE_0_03},"&:active":{backgroundColor:_n.GREYSCALE_0_10},"&:focus":{backgroundColor:_n.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${_n.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${_n.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:_n.GREYSCALE_0_30,"&:hover":{backgroundColor:_n.GREYSCALE_0_0,borderColor:_n.GREYSCALE_0_15},"& ~svg":{color:_n.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${_n.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:In}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:_n.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${_n.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:_n.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:Rn,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:Mn,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:Mn,fontWeight:Tn,color:_n.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Tn}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${_n.GREYSCALE_0_15}, 0px 0px 0px 1px ${_n.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:En.createElement(Gn,null),checkedIcon:En.createElement(Un,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:_n.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${_n.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:_n.GREEN_PALE,boxShadow:`0 0 0 3px ${Gs(_n.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:_n.BLUE_PALE,boxShadow:`0 0 0 3px ${Gs(_n.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:_n.GREYSCALE_0_20}},"&.Mui-disabled":{fill:_n.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:En.createElement(Jk,null),checkedIcon:En.createElement(Hn,null),indeterminateIcon:En.createElement(Vn,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:In,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:_n.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:_n.GREYSCALE_0_55,color:_n.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:_n.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:_n.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:_n.GREYSCALE_0_55,"&:hover":{color:_n.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:_n.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:_n.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:Rn,color:_n.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Tn},secondary:{fontSize:Mn,color:_n.GREYSCALE_45,fontWeight:Pn,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:Rn,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:Rn,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:_n.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:Mn,borderBottom:`solid 1px ${_n.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:Rn,color:_n.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:_n.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:_n.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:_n.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:_n.RED}}},"&.Mui-focusVisible":{backgroundColor:_n.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:_n.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:_n.GREEN,height:"24px","&.Mui-disabled":{color:_n.GREYSCALE_0_15}},rail:{backgroundColor:_n.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${_n.GREYSCALE_0_05}`,borderRadius:In,boxShadow:`inset 0px 0px 0px 1px ${_n.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${_n.GREYSCALE_0_05}`,borderRadius:In},thumb:{height:"16px",width:"16px",borderRadius:In,backgroundColor:_n.WHITE,boxShadow:`0px 1px 2px 0px ${_n.GREYSCALE_0_15}, 0px 0px 0px 1px ${_n.GREYSCALE_0_05}`,"&:hover":{borderRadius:In,boxShadow:`0 2px 4px 0 ${_n.GREYSCALE_0_30}, 0 0 0 1px ${_n.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${_n.GREYSCALE_0_15}, 0 0 0 1px ${_n.GREYSCALE_0_06}, 0 0 0 2px ${_n.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${_n.GREYSCALE_0_15}, 0 0 0 1px ${_n.GREYSCALE_0_06}, 0 0 0 2px ${_n.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:_n.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:_n.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:_n.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:_n.GREYSCALE_0_15},markLabel:{color:_n.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:_n.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:_n.WHITE,color:_n.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:_n.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:_n.GREEN_PALE,boxShadow:`0 0 0 3px ${Gs(_n.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:_n.BLUE_PALE,boxShadow:`0 0 0 3px ${Gs(_n.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:_n.GREYSCALE_0_15,borderRadius:In},thumb:{height:"16px",width:"16px",borderRadius:In,backgroundColor:_n.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:Rn,fontWeight:Tn,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${_n.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${_n.MISC_FOCUS_BORDER}`,backgroundColor:_n.GREYSCALE_0_03,borderRadius:In},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:_n.GREYSCALE_25,"&.Mui-selected":{color:_n.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:Rn,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:In,"&:hover":{backgroundColor:`${_n.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 ${_n.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${_n.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:In,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:_n.GREYSCALE_0_05},"&:hover":{backgroundColor:`${_n.GREYSCALE_0_03}`,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${_n.GREYSCALE_85}`,borderRight:`1px solid ${_n.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Tn,backgroundColor:_n.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:_n.GREYSCALE_98,borderBottom:`1px solid ${_n.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${_n.GREYSCALE_85}`,borderTop:`1px solid ${_n.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:_n.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:_n.GREYSCALE_0_05,"&:hover":{backgroundColor:_n.GREYSCALE_0_03}},"&&:hover":{backgroundColor:_n.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>En.createElement(Yn,{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 ${_n.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:Rn,borderRadius:In,padding:"7px 16px",border:`1px solid ${_n.GREYSCALE_0_15}`,backgroundColor:_n.GREYSCALE_100_60,color:_n.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:_n.GREYSCALE_0_10,border:`1px solid ${_n.GREYSCALE_0_30}`},"&:hover":{backgroundColor:_n.GREYSCALE_0_03,border:`1px solid ${_n.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:_n.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${_n.MISC_FOCUS_BORDER}`,border:`1px solid ${_n.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:_n.GREYSCALE_25,backgroundColor:_n.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:_n.GREYSCALE_0_10,border:`1px solid ${_n.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:Mn,height:24,width:24,padding:7},sizeLarge:{fontSize:An,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:Rn,borderRadius:In}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:_n.GREYSCALE_20},tooltip:{backgroundColor:_n.GREYSCALE_20,fontSize:Mn,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};const e_={mode:"light",primary:{ultraLight:_n.GREEN_ULTRA_LIGHT,light:_n.GREEN_PALE,main:_n.GREEN,dark:_n.GREEN_DARK,extraDark:_n.GREEN_EXTRA_DARK,contrastText:_n.WHITE},secondary:{ultraLight:_n.BLUE_ULTRA_LIGHT,light:_n.BLUE_PALE,main:_n.BLUE,dark:_n.BLUE_DARK,extraDark:_n.BLUE_EXTRA_DARK,contrastText:_n.WHITE},error:{ultraLight:_n.RED_ULTRA_LIGHT,light:_n.RED_PALE,main:_n.RED,dark:_n.RED_DARK,extraDark:_n.RED_EXTRA_DARK,contrastText:_n.WHITE},warning:{ultraLight:_n.ORANGE_ULTRA_LIGHT,light:_n.ORANGE_PALE,main:_n.ORANGE,dark:_n.ORANGE_DARK,extraDark:_n.ORANGE_EXTRA_DARK,contrastText:_n.WHITE},success:{ultraLight:_n.GREEN_ULTRA_LIGHT,light:_n.GREEN_PALE,main:_n.GREEN,dark:_n.GREEN_DARK,extraDark:_n.GREEN_EXTRA_DARK,contrastText:_n.WHITE},info:{ultraLight:_n.BLUE_ULTRA_LIGHT,light:_n.BLUE_PALE,main:_n.BLUE,dark:_n.BLUE_DARK,extraDark:_n.BLUE_EXTRA_DARK,contrastText:_n.WHITE},text:{primary:_n.TEXT_PRIMARY,secondary:_n.TEXT_SECONDARY,disabled:_n.GREYSCALE_0_30},action:{hover:_n.GREYSCALE_0_03,hoverOpacity:.03,selected:_n.GREYSCALE_0_05,selectedOpacity:.05,focus:_n.MISC_FOCUS_BORDER},amethyst:{ultraLight:_n.WHITE,main:_n.PURPLE,light:_n.PURPLE_PALE,dark:_n.PURPLE_DARK,extraDark:_n.GREYSCALE_0_0,contrastText:_n.WHITE},background:{paper:_n.WHITE,default:_n.GREYSCALE_95},divider:_n.GREYSCALE_0_15},t_=e=>({components:Zk,palette: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:Rn,fontWeightLight:Dn,fontWeightRegular:Pn,fontWeightMedium:Tn,fontWeightBold:On,htmlFontSize:Rn,fontFamily:Nn.FONT_FAMILY,button:{fontWeight:Tn,fontSize:Rn,textTransform:"none"},body1:{fontSize:An,lineHeight:"24px"},body2:{fontSize:Rn,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:Ln,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:An,fontWeight:Tn,lineHeight:"16px"},h6:{fontSize:Rn,fontWeight:Tn,lineHeight:"16px"},caption:{color:_n.TEXT_SECONDARY},subtitle1:{fontSize:Rn,color:_n.TEXT_SECONDARY},subtitle2:{fontSize:Mn,color:_n.TEXT_SECONDARY}},shape:{borderRadius:In}}),n_={...kn,MISC_FOCUS_BORDER:_n.MISC_FOCUS_BORDER},r_=t_().palette,o_={TEXT:r_.text.primary,DISABLED:r_.text.disabled,HOVER:r_.action.hover,WHITE:n_.GREYSCALE_100,BORDER_LIGHT:n_.GREYSCALE_90,BORDER_MEDIUM:n_.GREYSCALE_85,BORDER_HEAVY:n_.GREYSCALE_50,DARK_MODE_TEXT:n_.GREYSCALE_95,DARK_MODE_BORDER:n_.GREYSCALE_95,DARK_MODE_DISABLED:n_.GREYSCALE_70,DARK_MODE_BACKGROUND:n_.GREYSCALE_20,TRANSPARENT:"transparent",NULL_VALUE_BACKGROUND:n_.GREYSCALE_95,SELECTED:r_.primary.main};function i_(e){return"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b&&"number"==typeof e.a}function a_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length&&i_(t[0]))return(t[0].r<<16)+(t[0].g<<8)+t[0].b;var r=0,o=0,i=0;if(1===t.length&&"string"==typeof t[0]){var a,l=t[0];(a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(l))?(r=parseInt(a[1],10),o=parseInt(a[2],10),i=parseInt(a[3],10)):(a=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(l))?(r=parseInt(a[1],16),o=parseInt(a[2],16),i=parseInt(a[3],16)):(a=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(l))&&(r=parseInt(a[1]+a[1],16),o=parseInt(a[2]+a[2],16),i=parseInt(a[3]+a[3],16))}return(r<<16)+(o<<8)+i}function l_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);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 s_(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}var u_={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},c_="qcm-color";function d_(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i,a,l,s,u,c,d,p,f={type:c_,r:0,g:0,b:0,a:1,l:void 0,invalid:!1,spaces:{}},h=0,m=0,g=0,y=1;if((null===(e=n[0])||void 0===e?void 0:e.type)===c_){var b=n[0];h=b.r,m=b.g,g=b.b,y=b.a,f.invalid=n[0].invalid,f.spaces=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s_(Object(n),!0).forEach((function(t){l_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n[0].spaces)}else if(n.length<3)if("string"==typeof n[0]){var v,x=n[0];if(v=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(x))h=parseInt(v[1],10),m=parseInt(v[2],10),g=parseInt(v[3],10);else if(v=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(x))h=parseInt(v[1],10),m=parseInt(v[2],10),g=parseInt(v[3],10),y=parseFloat(v[4]);else if(v=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(x))y=parseInt(v[1],10)/255,h=parseInt(v[2],10),m=parseInt(v[3],10),g=parseInt(v[4],10);else if(v=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(x))h=parseInt(v[1],16),m=parseInt(v[2],16),g=parseInt(v[3],16),y=1;else if(v=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(x))h=parseInt(v[1]+v[1],16),m=parseInt(v[2]+v[2],16),g=parseInt(v[3]+v[3],16),y=1;else if(v=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(x)){o=parseFloat(v[1]),i=parseFloat(v[3]),l=parseFloat(v[5]),i=(i/=100)<0?0:i>1?1:i,c=(o=(o%=360)<0?0:o>360?360:o)/60,d=(u=(l=(l/=100)<0?0:l>1?1:l)<=.5?2*l*i:(2-2*l)*i)*(1-Math.abs(c%2-1));var w=[];switch(c=Math.floor(c)){case 0:w=[u,d,0];break;case 1:w=[d,u,0];break;case 2:w=[0,u,d];break;case 3:w=[0,d,u];break;case 4:w=[d,0,u];break;case 5:w=[u,0,d];break;default:w=[0,0,0]}p=l-.5*u,h=w[0]+p,m=w[1]+p,g=w[2]+p,h=Math.round(255*h),m=Math.round(255*m),g=Math.round(255*g),y=1}else if(v=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(x)){o=parseFloat(v[1]),i=parseFloat(v[3]),l=parseFloat(v[5]),y=parseFloat(v[7]),i=(i/=100)<0?0:i>1?1:i,c=(o=(o%=360)<0?0:o>360?360:o)/60,d=(u=(l=(l/=100)<0?0:l>1?1:l)<=.5?2*l*i:(2-2*l)*i)*(1-Math.abs(c%2-1));var S=[];switch(c=Math.floor(c)){case 0:S=[u,d,0];break;case 1:S=[d,u,0];break;case 2:S=[0,u,d];break;case 3:S=[0,d,u];break;case 4:S=[d,0,u];break;case 5:S=[u,0,d];break;default:S=[0,0,0]}p=l-.5*u,h=S[0]+p,m=S[1]+p,g=S[2]+p,h=Math.round(255*h),m=Math.round(255*m),g=Math.round(255*g)}else if(v=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(x)){o=parseFloat(v[1]),i=parseFloat(v[3]),s=parseFloat(v[5]),c=(o=(o%=360)<0?0:o>360?360:o)/60,d=(u=(s=(s/=100)<0?0:s>1?1:s)*(i=(i/=100)<0?0:i>1?1:i))*(1-Math.abs(c%2-1));var E=[];switch(c=Math.floor(c)){case 0:E=[u,d,0];break;case 1:E=[d,u,0];break;case 2:E=[0,u,d];break;case 3:E=[0,d,u];break;case 4:E=[d,0,u];break;case 5:E=[u,0,d];break;default:E=[0,0,0]}p=s-u,h=E[0]+p,m=E[1]+p,g=E[2]+p,h=Math.round(255*h),m=Math.round(255*m),g=Math.round(255*g),y=1}else if(u_[x.toLowerCase()]){a=x.toLowerCase();var C=u_[a];h=C.r,m=C.g,g=C.b,y="number"==typeof u_[a].a?u_[a].a:1}else f.invalid=!0}else"number"==typeof n[0]&&n[0]>=0&&"argb"===n[1]?(y=(4278190080&n[0])>>>24,y/=255,h=(16711680&n[0])>>16,m=(65280&n[0])>>8,g=255&n[0]):"number"==typeof n[0]&&n[0]>=0?(h=(16711680&n[0])>>16,m=(65280&n[0])>>8,g=255&n[0]):f.invalid=!0;else n.length>=3&&n.length<=4?(h=n[0],m=n[1],g=n[2],y=arguments.length>=4?n[3]:1):f.invalid=!0;return Number.isNaN(+h+m+g+y)&&(f.invalid=!0),f.r=Math.floor(h),f.g=Math.floor(m),f.b=Math.floor(g),f.a=y,f.l=l,f}function p_(e){var t,n,r;if(i_(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""));var o="string"==typeof e?a_(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r)}function f_(e){var t,n,r=0,o="string"==typeof e?d_(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=Math.max(i,a,l),u=Math.min(i,a,l),c=s;if(s===u)t=0,r=0;else{switch(t=0==(n=s-u)?0:n/c,s){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*c}}function h_(e){if(i_(e))return"rgb(".concat([e.r,e.g,e.b].join(", "),")");var t="string"==typeof e?a_(e):e,n=(65280&t)>>8,r=255&t;return"rgb(".concat((16711680&t)>>16,", ").concat(n,", ").concat(r,")")}function m_(e,t){return i_(e)?"rgba(".concat([e.r,e.g,e.b,void 0!==t?t:e.a].join(", "),")"):m_(d_(e),t)}function g_(e){return i_(e)?1===e.a?h_(e):m_(e):g_(d_(e))}var y_=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)};function b_(e){return.2126*y_(e.r)+.7152*y_(e.g)+.0722*y_(e.b)}function v_(){var e=d_.apply(void 0,arguments),t={type:e.type,r:e.r,g:e.g,b:e.b,a:e.a,invalid:e.invalid,spaces:e.spaces},n=function(){return t.spaces.hsla||(t.spaces.hsla=function(e){var t,n,r=0,o="string"==typeof e?d_(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=o.a,u=Math.max(i,a,l),c=Math.min(i,a,l),d=(u+c)/2;if(u===c)t=0,r=0;else{switch(n=u-c,t=d>.5?n/(2-u-c):n/(u+c),u){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return"hsla(".concat(360*r,", ").concat(100*t,", ").concat(100*d,", ").concat(s,")")}(t)),t.spaces.hsla},r=function(e){var t=n(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),o=parseFloat(r[1]),i=parseFloat(r[3]),a=parseFloat(r[7]),l=parseFloat(r[5]),s=Math.max(0,Math.min(l+e,100));return"hsla(".concat(o,", ").concat(i,", ").concat(s,", ").concat(a,")")};return{get type(){return t.type},isInvalid:function(){return t.invalid},get r(){return t.r},get g(){return t.g},get b(){return t.b},get a(){return t.a},getR:function(){return t.r},getG:function(){return t.g},getB:function(){return t.b},getAlpha:function(){return t.a},setAlpha:function(e){t.a=e,t.spaces={}},isEqualTo:function(e){var n=e.type===t.type?e:d_(e);return n.r===t.r&&n.g===t.g&&n.b===t.b&&n.a===t.a},isDark:function(){return function(){var e=d_.apply(void 0,arguments);return e.invalid||b_(e)<.4}(t)},getRGB:function(){return t.spaces.rgb||(t.spaces.rgb=h_(t)),t.spaces.rgb},getRGBA:function(){return t.spaces.rgba||(t.spaces.rgba=m_(t)),t.spaces.rgba},getString:function(){return t.spaces.string||(t.spaces.string=g_(t)),t.spaces.string},getHex:function(){return t.spaces.hex||(t.spaces.hex=p_(t)),t.spaces.hex},getHSL:function(){return t.spaces.hsl||(t.spaces.hsl=function(e){var t,n,r=0,o="string"==typeof e?d_(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=Math.max(i,a,l),u=Math.min(i,a,l),c=(s+u)/2;if(s===u)t=0,r=0;else{switch(n=s-u,t=c>.5?n/(2-s-u):n/(s+u),s){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return"hsl(".concat(360*r,", ").concat(100*t,", ").concat(100*c,")")}(t)),t.spaces.hsl},getHSLA:n,getShiftedHSLA:r,getHSV:function(){return t.spaces.hsv||(t.spaces.hsv=function(e){var t=f_(e),n=t.h,r=t.s,o=t.v;return"hsv(".concat(n,", ").concat(r,", ").concat(o,")")}(t)),t.spaces.hsv},getHSVObject:function(){return t.spaces.hsvObject||(t.spaces.hsvObject=f_(t)),t.spaces.hsvObject},blend:function(e,n){var r=Math.floor(t.r+(e.r-t.r)*n),o=Math.floor(t.g+(e.g-t.g)*n),i=Math.floor(t.b+(e.b-t.b)*n),a=Math.floor(t.a+(e.getAlpha()-t.a)*n);return"rgba(".concat([r,o,i,a].join(", "),")")},getBrightenedColor:function(){return v_(r(18*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)))},getDarkenedColor:function(){return v_(r(18*-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)))}}}function x_(e,t){if(e&&t){var n=b_(e),r=b_(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}}var w_,S_,E_=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],C_=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function k_(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?C_:E_}var __=function(){if(S_)return w_;S_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return w_=function e(){var t,n,r,s,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(i(s)||(u=o(s)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},w_}();function M_(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function R_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function A_(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(__);var L_=1/.7,I_="\\s*([+-]?\\d+)\\s*",D_="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",P_="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",T_=/^#([0-9a-f]{3,8})$/,O_=new RegExp(`^rgb\\(${I_},${I_},${I_}\\)$`),N_=new RegExp(`^rgb\\(${P_},${P_},${P_}\\)$`),q_=new RegExp(`^rgba\\(${I_},${I_},${I_},${D_}\\)$`),F_=new RegExp(`^rgba\\(${P_},${P_},${P_},${D_}\\)$`),z_=new RegExp(`^hsl\\(${D_},${P_},${P_}\\)$`),j_=new RegExp(`^hsla\\(${D_},${P_},${P_},${D_}\\)$`),B_={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 $_(){return this.rgb().formatHex()}function W_(){return this.rgb().formatRgb()}function H_(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=T_.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?V_(t):3===n?new K_(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?G_(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?G_(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=O_.exec(e))?new K_(t[1],t[2],t[3],1):(t=N_.exec(e))?new K_(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=q_.exec(e))?G_(t[1],t[2],t[3],t[4]):(t=F_.exec(e))?G_(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=z_.exec(e))?tM(t[1],t[2]/100,t[3]/100,1):(t=j_.exec(e))?tM(t[1],t[2]/100,t[3]/100,t[4]):B_.hasOwnProperty(e)?V_(B_[e]):"transparent"===e?new K_(NaN,NaN,NaN,0):null}function V_(e){return new K_(e>>16&255,e>>8&255,255&e,1)}function G_(e,t,n,r){return r<=0&&(e=t=n=NaN),new K_(e,t,n,r)}function U_(e){return e instanceof A_||(e=H_(e)),e?new K_((e=e.rgb()).r,e.g,e.b,e.opacity):new K_}function Y_(e,t,n,r){return 1===arguments.length?U_(e):new K_(e,t,n,null==r?1:r)}function K_(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function X_(){return`#${eM(this.r)}${eM(this.g)}${eM(this.b)}`}function Q_(){const e=J_(this.opacity);return`${1===e?"rgb(":"rgba("}${Z_(this.r)}, ${Z_(this.g)}, ${Z_(this.b)}${1===e?")":`, ${e})`}`}function J_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Z_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function eM(e){return((e=Z_(e))<16?"0":"")+e.toString(16)}function tM(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rM(e,t,n,r)}function nM(e){if(e instanceof rM)return new rM(e.h,e.s,e.l,e.opacity);if(e instanceof A_||(e=H_(e)),!e)return new rM;if(e instanceof rM)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new rM(a,l,s,e.opacity)}function rM(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function oM(e){return(e=(e||0)%360)<0?e+360:e}function iM(e){return Math.max(0,Math.min(1,e||0))}function aM(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}M_(A_,H_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$_,formatHex:$_,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return nM(this).formatHsl()},formatRgb:W_,toString:W_}),M_(K_,Y_,R_(A_,{brighter(e){return e=null==e?L_:Math.pow(L_,e),new K_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new K_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new K_(Z_(this.r),Z_(this.g),Z_(this.b),J_(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:X_,formatHex:X_,formatHex8:function(){return`#${eM(this.r)}${eM(this.g)}${eM(this.b)}${eM(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Q_,toString:Q_})),M_(rM,(function(e,t,n,r){return 1===arguments.length?nM(e):new rM(e,t,n,null==r?1:r)}),R_(A_,{brighter(e){return e=null==e?L_:Math.pow(L_,e),new rM(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new rM(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 K_(aM(e>=240?e-240:e+120,o,r),aM(e,o,r),aM(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new rM(oM(this.h),iM(this.s),iM(this.l),J_(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=J_(this.opacity);return`${1===e?"hsl(":"hsla("}${oM(this.h)}, ${100*iM(this.s)}%, ${100*iM(this.l)}%${1===e?")":`, ${e})`}`}}));const lM=Math.PI/180,sM=180/Math.PI,uM=4/29,cM=6/29,dM=3*cM*cM;function pM(e){if(e instanceof fM)return new fM(e.l,e.a,e.b,e.opacity);if(e instanceof bM)return vM(e);e instanceof K_||(e=U_(e));var t,n,r=yM(e.r),o=yM(e.g),i=yM(e.b),a=hM((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=hM((.4360747*r+.3850649*o+.1430804*i)/.96422),n=hM((.0139322*r+.0971045*o+.7141733*i)/.82521)),new fM(116*a-16,500*(t-a),200*(a-n),e.opacity)}function fM(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function hM(e){return e>.008856451679035631?Math.pow(e,1/3):e/dM+uM}function mM(e){return e>cM?e*e*e:dM*(e-uM)}function gM(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yM(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bM(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function vM(e){if(isNaN(e.h))return new fM(e.l,0,0,e.opacity);var t=e.h*lM;return new fM(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}M_(fM,(function(e,t,n,r){return 1===arguments.length?pM(e):new fM(e,t,n,null==r?1:r)}),R_(A_,{brighter(e){return new fM(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new fM(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new K_(gM(3.1338561*(t=.96422*mM(t))-1.6168667*(e=1*mM(e))-.4906146*(n=.82521*mM(n))),gM(-.9787684*t+1.9161415*e+.033454*n),gM(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),M_(bM,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof bM)return new bM(e.h,e.c,e.l,e.opacity);if(e instanceof fM||(e=pM(e)),0===e.a&&0===e.b)return new bM(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*sM;return new bM(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new bM(e,t,n,null==r?1:r)}),R_(A_,{brighter(e){return new bM(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new bM(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return vM(this).rgb()}}));var xM=e=>()=>e;function wM(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xM(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?wM: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):xM(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Y_(e)).r,(t=Y_(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=wM(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);var SM,EM="center",CM="bottom";function kM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var o=t(r);return n.has(o)?n.get(o):n.set(o,e(r))}}function _M(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 MM(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=AM)):void 0===t&&(t=RM);for(var n,r,o,i,a,l=new DM(e),s=[l];n=s.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)s.push(r=o[i]=new DM(o[i])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(IM)}function RM(e){return e.children}function AM(e){return Array.isArray(e)?e[1]:null}function LM(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function IM(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function DM(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:EM,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:EM,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:EM,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:EM},{key:"DataRangeIncludingZero",alignment:CM},{key:"LimitedData",alignment:CM},{key:"NegativeOrZeroValues",alignment:CM}].reduce((function(e,t){return e[t.key]=t,e}),{}),DM.prototype=MM.prototype={constructor:DM,count:function(){return this.eachAfter(_M)},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],l=[],s=-1;i=a.pop();)if(l.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=l.pop();)e.call(t,i,++s,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;for(e=n.pop(),t=r.pop();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 MM(this).eachBefore(LM)},[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)}},SM=function(e){
119
119
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
120
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,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))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+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],s=c[1]&&c[c.length-1].length){for(m="",y=(d=t[0]).length%s,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%s)&&v<p-s&&(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}},SM({exports:{}});const PM=(e,t=o_.TEXT,n=o_.WHITE)=>{const r=v_(e),o=v_(t),i=v_(n);return r.isInvalid()?t:function(e,t,n){return x_(e,t)>x_(e,n)?t:n}(r,i,o).getRGB()},TM={background:o_.SELECTED,color:o_.WHITE},OM=({theme:e,flags:t})=>{if(!t.isEnabled("PS_22149_THEME_SELECTION_COLORS"))return TM;const n=e.getStyle("","","dataColors.selected")||TM.background,r=function(e,t){var n=v_("#FFFFFF"),r=v_(e),o=v_(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;var i=x_(n,r),a=x_(o,r),l=i>a||i>4.5;return!l&&a>3?t:l?"#FFFFFF":"#000000"}(n,o_.TEXT);return{background:n,color:r}},NM=(e,t)=>{const n=v_(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},qM=e=>!!e&&0===v_(e).a,FM=e=>{const t=v_(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},zM=e=>{e.stopPropagation(),e.preventDefault()},jM=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:null!=r&&r,defaultValue(e,t,o){var i;const a=null!==(i=null==r?void 0:r(e,t,o))&&void 0!==i&&i,l=o.theme.current(),s=n(l,a);return{color:"transparent"===s?"none":s}}}),BM=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},$M=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{var o,i;const a=null!==(o=t.fontFamily)&&void 0!==o?o:"Source Sans Pro, sans-serif",l=null!==(i=t.fontFamilies)&&void 0!==i?i:[],s=Array.from(new Set([e,a,...l])),u=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...s.sort().map((e=>BM(e,!0)))],c=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...k_(r).filter((e=>!s.includes(e))).map((e=>BM(e,!0)))];return[...u,...c.length>1?c:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),WM=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],HM=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{var r;const o=t.fontSize,i=null!==(r=t.fontSizes)&&void 0!==r?r:[],a=Array.from(new Set([e,o,...i])),l=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort(((e,t)=>parseInt(e,10)-parseInt(t,10))).map((e=>BM(e,!1)))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...WM.filter((e=>!a.includes(e))).map((e=>BM(e,!1)))];return[...l,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),VM=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:null!=i?i:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:$M({ref:`${e}.fontFamily`,themeAccessor:t=>{var n;return null!==(n=o(t,e,"fontFamily"))&&void 0!==n?n:t.fontFamily},translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontSize:HM({ref:`${e}.fontSize`,themeAccessor:t=>{var n;return null!==(n=o(t,e,"fontSize"))&&void 0!==n?n:t.fontSize},translator:n}),fontColor:jM(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=o(t,e,"color"))&&void 0!==n?n:t.color}))}},background:jM(`${e}.background`,"properties.background",((t,n)=>{var r;const i=n?o_.WHITE:o_.TRANSPARENT;return null!==(r=o(t,e,"backgroundColor"))&&void 0!==r?r:i}),a)}}}}),GM=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontColor:jM(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=r(t,e,"color"))&&void 0!==n?n:t.color}))}},background:jM(`${e}.background`,"properties.background",(t=>{var o,i;return null!==(o=null!==(i=r(t,e,"backgroundColor"))&&void 0!==i?i:n)&&void 0!==o?o:"transparent"}))}}}}),UM=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map((e=>({value:e+1,translation:e+1}))),defaultValue:1}),YM="12px",KM="Source Sans Pro, sans-serif",XM="600",QM=15e3,JM=4/3;var ZM,eR;!function(e){e.Transparent="transparent",e.FontPrimary="#404040",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2"}(ZM||(ZM={})),function(e){e.Solid="solid",e.None="none"}(eR||(eR={}));const tR={display:"flex",justifyContent:"center",alignItems:"center"},nR={borderStyle:"solid"},rR={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},oR={lineHeight:JM,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},iR=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),aR=(e,t)=>e>0?`${e}px ${eR.Solid} ${t}`:eR.None,lR=(e,t,n,r)=>{const o=Number(!t||(null==r?void 0:r.right)),i=Number(!e||(null==r?void 0:r.bottom));return{borderRight:aR(o,n),borderBottom:aR(i,n),borderLeft:eR.None,borderTop:eR.None}},sR=(e,t,n,r,o,i)=>{const a=lR(t,r,o,i);return e.isLeftDimension||(e.isLastDimension&&!t&&(a.borderBottom=aR(2,o)),n||(a.borderLeft=aR(1,o))),a},uR=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=aR(1,n)),t&&(r.borderRight=aR(1,n)),r},cR=e=>({translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:UM("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:e.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?UM("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"):void 0,border:jM("grid.border","properties.border",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:ZM.DividerLight})),divider:jM("grid.divider","properties.pivot.divider",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n||null===(n=n.divider)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:ZM.DividerDark})),background:jM("grid.background","properties.background",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:ZM.Transparent}))}}}}),dR=(e,t,n)=>{var r,o,i,a,l,s;switch(t){case"header":return null==e||null===(r=e.object)||void 0===r||null===(r=r.pivotTableV2)||void 0===r||null===(r=r.dimension)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r[n];case"dimensionValues":return null==e||null===(o=e.object)||void 0===o||null===(o=o.pivotTableV2)||void 0===o||null===(o=o.dimension)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o[n];case"measureLabels":return null==e||null===(i=e.object)||void 0===i||null===(i=i.pivotTableV2)||void 0===i||null===(i=i.measure)||void 0===i||null===(i=i.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i[n];case"measureValues":return null==e||null===(a=e.object)||void 0===a||null===(a=a.pivotTableV2)||void 0===a||null===(a=a.measure)||void 0===a||null===(a=a.label)||void 0===a||null===(a=a.value)||void 0===a?void 0:a[n];case"totalValues":return null==e||null===(l=e.object)||void 0===l||null===(l=l.pivotTableV2)||void 0===l||null===(l=l.total)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l?void 0:l[n];case"nullValues":return null==e||null===(s=e.object)||void 0===s||null===(s=s.pivotTableV2)||void 0===s||null===(s=s.null)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s[n];default:return}},pR=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,defaultValue:[],items:{headerSection:VM({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:dR}),dimensionValueSection:VM({section:"dimensionValues",translator:e,flags:t,getThemeValue:dR}),measureValueSection:VM({section:"measureValues",translator:e,flags:t,getThemeValue:dR}),measureLabelSection:GM({section:"measureLabels",getThemeValue:dR}),totalValuesSection:GM({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:dR}),nullValuesSection:GM({section:"nullValues",fallbackBackground:ZM.NullValueBackground,getThemeValue:dR}),gridSection:cR(t)}}]}),fR=e=>({type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},...e.isEnabled("CLIENT_IM_5975_INDENT_MODE")&&{indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:ht.Auto,translation:"Common.Auto"},{value:ht.Pixels,translation:"Object.Table.Column.Pixels"},{value:ht.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ht.Auto,show:e=>{var t;return!(null===(t=e.qHyperCubeDef)||void 0===t||!t.qIndentMode)}},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:ft.PixelsDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===ht.Pixels},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.pixels)&&(n.indentModeColumnWidth.pixels=Math.max(ft.PixelsMin,Math.min(ft.PixelsMax,n.indentModeColumnWidth.pixels)))}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:ft.PercentageDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===ht.Percentage},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.percentage)&&(n.indentModeColumnWidth.percentage=Math.max(ft.PercentageMin,Math.min(ft.PercentageMaxInIndentMode,n.indentModeColumnWidth.percentage)))}}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(t){var n,r;const{qIndentMode:o}=null!==(n=t.qHyperCubeDef)&&void 0!==n?n:{};return(!o||o&&!e.isEnabled("CLIENT_IM_5975_INDENT_MODE"))&&!(null===(r=t.qHyperCubeDef)||void 0===r||null===(r=r.qDimensions)||void 0===r||!r.some((e=>{var t;return"TOTAL_EXPR"===(null===(t=e.qOtherTotalSpec)||void 0===t?void 0:t.qTotalMode)})))}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled(e){var t;return!(null===(t=e.qHyperCubeDef)||void 0===t||!t.qAlwaysFullyExpanded)},action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),hR=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[pR(e,t),fR(t)]}}}),mR="auto",gR={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>t("integer",e?-1:0)},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>{var t;return!(null==e||null===(t=e.qHyperCubeDef)||void 0===t||!t.qSortbyYValue)}}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:mR,translation:"Object.Table.SortingInSearch",options:[{value:mR,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function yR(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:Mt(e),sorting:gR,addons:Ye,settings:hR(t,n)}}}function bR(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:yR(e),importProperties:Ge(e),exportProperties:Ue}}const vR=()=>{let e;const t=new Promise((t=>{e=t}));return{promise:t,resolve:e}};function xR(t,n){return e.useMemo((()=>t),n)}const wR={},SR=t=>{const n=e.useMemo((()=>({current:wR})),[]);return n.current=n.current===wR?t:n.current,n},ER=()=>{const{viewState:t}=e.useOptions(),n=SR(new Set),r=void 0!==t,{promise:o,resolve:i}=e.useMemo((()=>vR()),[]),a=xR((e=>{r&&n.current.add(e)}),[n]),l=xR(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}((async()=>{await Promise.all(n.current),n.current.clear(),i()}),1e3),[i,n]);return e.usePromise((async()=>{r&&await o}),[o,r]),e.useMemo((()=>({viewState:t,isDownloadedAsPDForImage:r,notifyIsDoneRendering:l,waitForPromise:a})),[l,r,t,a])},CR="#grid",kR=(e,t)=>{const n=null==t?void 0:t.closest(e);return n&&window.getComputedStyle(n).backgroundColor},_R=(e,t,n,r,o)=>{const i=kR(".qv-object .qv-inner-object",n),a=kR(".qv-panel-sheet",n),l=kR(CR,n),s=null!=l?l:a,u=(e=>{var t,n,r,o,i,a;const l=null===(t=e.components)||void 0===t?void 0:t.find((e=>"general"===e.key)),s=null==l||null===(n=l.bgColor)||void 0===n?void 0:n.colorExpression,u=null==l||null===(r=l.bgColor)||void 0===r||null===(r=r.color)||void 0===r?void 0:r.color;if((null==l||null===(o=l.bgColor)||void 0===o?void 0:o.useColorExpression)&&s)return FM(s);if("none"===u)return"transparent";if(void 0===u)return;const c=v_(u);return c.setAlpha(null!==(i=null==l||null===(a=l.bgColor)||void 0===a||null===(a=a.color)||void 0===a?void 0:a.alpha)&&void 0!==i?i:c.a),c.getRGBA()})(e),c=null==r?void 0:r(t),d=null==o?void 0:o(t),p=c||i||d,f=qM(p),h=PM(f?s:p,o_.TEXT,o_.DARK_MODE_TEXT)===h_(o_.DARK_MODE_TEXT);const m=((e,t,n,r=o_.WHITE)=>e&&!qM(e)?e:qM(t)?n&&!qM(n)?n:r:t)(u,p,s);return{color:p,headerColor:m,isDark:h}},MR=(t,n,r,o)=>{const i=e.useTheme(),a=((t,n={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[r,o]=e.useState([]);return e.useEffect((()=>{let e;return t&&(e=new MutationObserver((e=>{o(e)})),e.observe(t,n)),()=>{var t;null===(t=e)||void 0===t||t.disconnect()}}),[t,n]),r})(null==n?void 0:n.closest(CR),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter((({oldValue:e})=>null==e?void 0:e.includes("background"))).map((({oldValue:e})=>e)).join(",");return e.useMemo((()=>({...i,background:_R(t,i,n,r,o)})),[i.name(),n,r,o,t,a])};function RR(t,n){const r=e.useMemo((()=>({isLoading:!0})),n),[o,i]=e.usePromise((async()=>{try{return await t()}finally{r.isLoading=!1}}),n);return[o,r.isLoading,i]}const AR=3;function LR(e,t,n){let r=0,o=e.length;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),l=e.slice(0,i-1),s=n(a),u=n(l);if(s>t&&u<=t)return e.slice(i-1)||null;if(s===t)return e.slice(i)||null;s<t?r=i+1:o=i}return null}function IR({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=AR}=null!=o?o:{},{estimateWidth:a,measureText:l,estimateLineCount:s}=Sn.useMemo((()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const a=kM(o.measureText.bind(o)),l=e=>+a(e).width.toFixed(2),s=kM((({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;let r=0,o=e;do{r+=1,o=LR(o,t,l)}while(null!==o&&r<i);return r}),(({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:s}}),[n,r,e,t,i]);return{estimateWidth:a,measureText:l,estimateLineCount:s}}var DR,PR=kw;DR=PR.createRoot,PR.hydrateRoot;function TR(e,t){const[n,r]=Sn.useState(t),o=n.some(((e,n)=>e!==t[n]));o&&(r(t),e())}var OR={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.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":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen 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":"Geselecteerde waarden 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":"清除選項"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.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":"欄選項"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.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":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.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":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.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":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.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":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.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":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.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":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier 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":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier 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":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.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":"{0}/{1}","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}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.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":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.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":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.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":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.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":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.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":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.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":"選取頁面"}}};const NR=({translator:e})=>(Sn.useMemo((()=>function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(OR).forEach((t=>{e.add(OR[t])}))}}(e)),[e]),e),qR=document.createElement("textarea");function FR(e){qR.value=e,document.body.appendChild(qR),qR.select(),qR.setSelectionRange(0,qR.value.length),document.execCommand("copy"),document.body.removeChild(qR)}qR.style.position="absolute",qR.style.left="-9999px",qR.setAttribute("readonly","");function zR(){null===e.onContextMenu||void 0===e.onContextMenu||e.onContextMenu(((e,t)=>{const n=t.target,r=null==n?void 0:n.closest(`.${ct}`);null!=r&&r.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{(e=>{var t;const n=e.title;n&&(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText?navigator.clipboard.writeText(n).catch((()=>FR(n))):FR(n))})(r)}})}))}var jR="$$material";const BR=["values","unit","step"];function $R(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=Ot(e,BR),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Rt({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(i);function l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return Rt({keys:a,values:i,up:l,down:s,between:u,only:function(e){return a.indexOf(e)+1<a.length?u(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):u(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}var WR={borderRadius:4};function HR(e,t){return t?ea(e,t,{clone:!1}):e}const VR={xs:0,sm:600,md:900,lg:1200,xl:1536},GR={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${VR[e]}px)`};function UR(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||GR;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||GR;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||VR).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function YR(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function KR(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:YR(e,n)||r,t&&(o=t(o,r,e)),o}function XR(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=YR(e.theme,r)||{};return UR(e,i,(e=>{let r=KR(a,o,e);return e===r&&"string"==typeof e&&(r=KR(a,o,`${t}${"default"===e?"":_a(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const QR={m:"margin",p:"padding"},JR={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ZR={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},eA=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!ZR[e])return[e];e=ZR[e]}const[t,n]=e.split(""),r=QR[t],o=JR[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),tA=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],nA=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function rA(e,t,n,r){var o;const i=null!=(o=YR(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function oA(e){return rA(e,"spacing",8)}function iA(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function aA(e,t,n,r){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=iA(t,n),e)),{})}(eA(n),r);return UR(e,e[n],o)}function lA(e,t){const n=oA(e.theme);return Object.keys(e).map((r=>aA(e,t,r,n))).reduce(HR,{})}function sA(e){return lA(e,tA)}function uA(e){return lA(e,nA)}function cA(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?HR(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function dA(e){return"number"!=typeof e?e:`${e}px solid`}function pA(e,t){return XR({prop:e,themeKey:"borders",transform:t})}sA.propTypes={},sA.filterProps=tA,uA.propTypes={},uA.filterProps=nA;const fA=pA("border",dA),hA=pA("borderTop",dA),mA=pA("borderRight",dA),gA=pA("borderBottom",dA),yA=pA("borderLeft",dA),bA=pA("borderColor"),vA=pA("borderTopColor"),xA=pA("borderRightColor"),wA=pA("borderBottomColor"),SA=pA("borderLeftColor"),EA=pA("outline",dA),CA=pA("outlineColor"),kA=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=rA(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:iA(t,e)});return UR(e,e.borderRadius,n)}return null};kA.propTypes={},kA.filterProps=["borderRadius"],cA(fA,hA,mA,gA,yA,bA,vA,xA,wA,SA,kA,EA,CA);const _A=e=>{if(void 0!==e.gap&&null!==e.gap){const t=rA(e.theme,"spacing",8),n=e=>({gap:iA(t,e)});return UR(e,e.gap,n)}return null};_A.propTypes={},_A.filterProps=["gap"];const MA=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=rA(e.theme,"spacing",8),n=e=>({columnGap:iA(t,e)});return UR(e,e.columnGap,n)}return null};MA.propTypes={},MA.filterProps=["columnGap"];const RA=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=rA(e.theme,"spacing",8),n=e=>({rowGap:iA(t,e)});return UR(e,e.rowGap,n)}return null};RA.propTypes={},RA.filterProps=["rowGap"];function AA(e,t){return"grey"===t?t:e}cA(_A,MA,RA,XR({prop:"gridColumn"}),XR({prop:"gridRow"}),XR({prop:"gridAutoFlow"}),XR({prop:"gridAutoColumns"}),XR({prop:"gridAutoRows"}),XR({prop:"gridTemplateColumns"}),XR({prop:"gridTemplateRows"}),XR({prop:"gridTemplateAreas"}),XR({prop:"gridArea"}));function LA(e){return e<=1&&0!==e?100*e+"%":e}cA(XR({prop:"color",themeKey:"palette",transform:AA}),XR({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:AA}),XR({prop:"backgroundColor",themeKey:"palette",transform:AA}));const IA=XR({prop:"width",transform:LA}),DA=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||VR[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:LA(t)}};return UR(e,e.maxWidth,t)}return null};DA.filterProps=["maxWidth"];const PA=XR({prop:"minWidth",transform:LA}),TA=XR({prop:"height",transform:LA}),OA=XR({prop:"maxHeight",transform:LA}),NA=XR({prop:"minHeight",transform:LA});XR({prop:"size",cssProperty:"width",transform:LA}),XR({prop:"size",cssProperty:"height",transform:LA});cA(IA,DA,PA,TA,OA,NA,XR({prop:"boxSizing"}));const qA={border:{themeKey:"borders",transform:dA},borderTop:{themeKey:"borders",transform:dA},borderRight:{themeKey:"borders",transform:dA},borderBottom:{themeKey:"borders",transform:dA},borderLeft:{themeKey:"borders",transform:dA},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:dA},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kA},color:{themeKey:"palette",transform:AA},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:AA},backgroundColor:{themeKey:"palette",transform:AA},p:{style:uA},pt:{style:uA},pr:{style:uA},pb:{style:uA},pl:{style:uA},px:{style:uA},py:{style:uA},padding:{style:uA},paddingTop:{style:uA},paddingRight:{style:uA},paddingBottom:{style:uA},paddingLeft:{style:uA},paddingX:{style:uA},paddingY:{style:uA},paddingInline:{style:uA},paddingInlineStart:{style:uA},paddingInlineEnd:{style:uA},paddingBlock:{style:uA},paddingBlockStart:{style:uA},paddingBlockEnd:{style:uA},m:{style:sA},mt:{style:sA},mr:{style:sA},mb:{style:sA},ml:{style:sA},mx:{style:sA},my:{style:sA},margin:{style:sA},marginTop:{style:sA},marginRight:{style:sA},marginBottom:{style:sA},marginLeft:{style:sA},marginX:{style:sA},marginY:{style:sA},marginInline:{style:sA},marginInlineStart:{style:sA},marginInlineEnd:{style:sA},marginBlock:{style:sA},marginBlockStart:{style:sA},marginBlockEnd:{style:sA},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_A},rowGap:{style:RA},columnGap:{style:MA},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:LA},maxWidth:{style:DA},minWidth:{transform:LA},height:{transform:LA},maxHeight:{transform:LA},minHeight:{transform:LA},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var FA=qA;function zA(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:l,transform:s,style:u}=i;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const c=YR(n,l)||{};if(u)return u(o);return UR(o,t,(t=>{let n=KR(c,s,t);return t===n&&"string"==typeof t&&(n=KR(c,s,`${e}${"default"===t?"":_a(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:FA;function l(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),l=Object.keys(o);let s=o;return Object.keys(r).forEach((n=>{const o=(l=r[n],u=i,"function"==typeof l?l(u):l);var l,u;if(null!=o)if("object"==typeof o)if(a[n])s=HR(s,e(n,o,i,a));else{const e=UR({theme:i},o,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,o)?s=HR(s,e):s[n]=t({sx:o,theme:i})}else s=HR(s,e(n,o,i,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(l,s)}return Array.isArray(o)?o.map(l):l(o)}}const jA=zA();jA.filterProps=["sx"];var BA=jA;function $A(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}const WA=["breakpoints","palette","spacing","shape"];function HA(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=Ot(e,WA),l=$R(n),s=function(e=8){if(e.mui)return e;const t=oA({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(o);let u=ea({breakpoints:l,direction:"ltr",components:{},palette:Rt({mode:"light"},r),spacing:s,shape:Rt({},WR,i)},a);return u.applyStyles=$A,u=t.reduce(((e,t)=>ea(e,t)),u),u.unstable_sxConfig=Rt({},FA,null==a?void 0:a.unstable_sxConfig),u.unstable_sx=function(e){return BA({sx:e,theme:this})},u}var VA=Object.freeze({__proto__:null,default:HA,private_createBreakpoints:$R,unstable_applyStyles:$A});function GA(e=null){const t=Sn.useContext(Oi);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const UA=HA();function YA(e=UA){return GA(e)}const KA=["sx"];function XA(e){const{sx:t}=e,n=Ot(e,KA),{systemProps:r,otherProps:o}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:FA;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Ji(n)?Rt({},r,n):r}:Rt({},r,t),Rt({},o,{sx:i})}var QA=Object.freeze({__proto__:null,default:BA,extendSxProp:XA,unstable_createStyleFunctionSx:zA,unstable_defaultSxConfig:FA});const JA=["className","component"];function ZA(e){if(e.type)return e;if("#"===e.charAt(0))return ZA(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(lr(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(lr(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}function eL(e,t){return e=ZA(e),t=function(e,t=0,n=1){return rl(e,t,n)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}var tL=Sn.createContext(null);function nL(){return Sn.useContext(tL)}var rL="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function oL(e){const{children:t,theme:n}=e,r=nL(),o=Sn.useMemo((()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return Rt({},e,t)}(r,n);return null!=e&&(e[rL]=null!==r),e}),[n,r]);return Ms.jsx(tL.Provider,{value:o,children:t})}const iL=["value"],aL=Sn.createContext();function lL(e){let{value:t}=e,n=Ot(e,iL);return Ms.jsx(aL.Provider,Rt({value:null==t||t},n))}const sL=Sn.createContext(void 0);function uL({value:e,children:t}){return Ms.jsx(sL.Provider,{value:e,children:t})}function cL({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Xa(o.defaultProps,r):o.styleOverrides||o.variants?r:Xa(o,r)}({props:e,name:t,theme:{components:Sn.useContext(sL)}})}const dL={};function pL(e,t,n,r=!1){return Sn.useMemo((()=>{const o=e&&t[e]||t;if("function"==typeof n){const i=n(o),a=e?Rt({},t,{[e]:i}):i;return r?()=>a:a}return Rt({},t,e?{[e]:n}:n)}),[e,t,n,r])}function fL(e){const{children:t,theme:n,themeId:r}=e,o=GA(dL),i=nL()||dL,a=pL(r,o,n),l=pL(r,i,n,!0),s="rtl"===a.direction;return Ms.jsx(oL,{theme:l,children:Ms.jsx(Oi.Provider,{value:a,children:Ms.jsx(lL,{value:s,children:Ms.jsx(uL,{value:null==a?void 0:a.components,children:t})})})})}var hL={},mL={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(mL);var gL=mL.exports,yL=r(sr),bL=r(ol),vL=gL;Object.defineProperty(hL,"__esModule",{value:!0});var xL=hL.alpha=PL;hL.blend=function(e,t,n,r=1){const o=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),i=RL(e),a=RL(t),l=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return LL({type:"rgb",values:l})},hL.colorChannel=void 0;var wL=hL.darken=TL;hL.decomposeColor=RL,hL.emphasize=NL;var SL=hL.getContrastRatio=function(e,t){const n=DL(e),r=DL(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};hL.getLuminance=DL,hL.hexToRgb=ML,hL.hslToRgb=IL;var EL=hL.lighten=OL;hL.private_safeAlpha=function(e,t,n){try{return PL(e,t)}catch(t){return e}},hL.private_safeColorChannel=void 0,hL.private_safeDarken=function(e,t,n){try{return TL(e,t)}catch(t){return e}},hL.private_safeEmphasize=function(e,t,n){try{return NL(e,t)}catch(t){return e}},hL.private_safeLighten=function(e,t,n){try{return OL(e,t)}catch(t){return e}},hL.recomposeColor=LL,hL.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=RL(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`};var CL=vL(yL),kL=vL(bL);function _L(e,t=0,n=1){return(0,kL.default)(e,t,n)}function ML(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function RL(e){if(e.type)return e;if("#"===e.charAt(0))return RL(ML(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,CL.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,CL.default)(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const AL=e=>{const t=RL(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};hL.colorChannel=AL;function LL(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function IL(e){e=RL(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let l="rgb";const s=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",s.push(t[3])),LL({type:l,values:s})}function DL(e){let t="hsl"===(e=RL(e)).type||"hsla"===e.type?RL(IL(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function PL(e,t){return e=RL(e),t=_L(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,LL(e)}function TL(e,t){if(e=RL(e),t=_L(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return LL(e)}function OL(e,t){if(e=RL(e),t=_L(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return LL(e)}function NL(e,t=.15){return DL(e)>.5?TL(e,t):OL(e,t)}hL.private_safeColorChannel=(e,t)=>{try{return AL(e)}catch(t){return e}};var qL={black:"#000",white:"#fff"};var FL={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var zL={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var jL={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"};var BL={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"};var $L={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"};var WL={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var HL={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"};const VL=["mode","contrastThreshold","tonalOffset"],GL={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:qL.white,default:qL.white},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}},UL={text:{primary:qL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:qL.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 YL(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=EL(e.main,o):"dark"===t&&(e.dark=wL(e.main,i)))}function KL(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=Ot(e,VL),i=e.primary||function(e="light"){return"dark"===e?{main:$L[200],light:$L[50],dark:$L[400]}:{main:$L[700],light:$L[400],dark:$L[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:zL[200],light:zL[50],dark:zL[400]}:{main:zL[500],light:zL[300],dark:zL[700]}}(t),l=e.error||function(e="light"){return"dark"===e?{main:jL[500],light:jL[300],dark:jL[700]}:{main:jL[700],light:jL[400],dark:jL[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:WL[400],light:WL[300],dark:WL[700]}:{main:WL[700],light:WL[500],dark:WL[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:HL[400],light:HL[300],dark:HL[700]}:{main:HL[800],light:HL[500],dark:HL[900]}}(t),c=e.warning||function(e="light"){return"dark"===e?{main:BL[400],light:BL[300],dark:BL[700]}:{main:"#ed6c02",light:BL[500],dark:BL[900]}}(t);function d(e){return SL(e,UL.text.primary)>=n?UL.text.primary:GL.text.primary}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=Rt({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(lr(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(lr(12,t?` (${t})`:"",JSON.stringify(e.main)));return YL(e,"light",o,r),YL(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},f={dark:UL,light:GL};return ea(Rt({common:Rt({},qL),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:c,name:"warning"}),info:p({color:s,name:"info"}),success:p({color:u,name:"success"}),grey:FL,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},f[t]),o)}const XL=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function QL(e){return Math.round(1e5*e)/1e5}const JL={textTransform:"uppercase"},ZL='"Roboto", "Helvetica", "Arial", sans-serif';function eI(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=ZL,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:l=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,p=Ot(n,XL),f=o/14,h=d||(e=>e/u*f+"rem"),m=(e,t,n,o,i)=>Rt({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===ZL?{letterSpacing:`${QL(o/t)}em`}:{},i,c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(l,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(l,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(l,14,1.75,.4,JL),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,JL),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ea(Rt({htmlFontSize:u,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:l,fontWeightBold:s},g),p,{clone:!1})}function tI(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var nI=["none",tI(0,2,1,-1,0,1,1,0,0,1,3,0),tI(0,3,1,-2,0,2,2,0,0,1,5,0),tI(0,3,3,-2,0,3,4,0,0,1,8,0),tI(0,2,4,-1,0,4,5,0,0,1,10,0),tI(0,3,5,-1,0,5,8,0,0,1,14,0),tI(0,3,5,-1,0,6,10,0,0,1,18,0),tI(0,4,5,-2,0,7,10,1,0,2,16,1),tI(0,5,5,-3,0,8,10,1,0,3,14,2),tI(0,5,6,-3,0,9,12,1,0,3,16,2),tI(0,6,6,-3,0,10,14,1,0,4,18,3),tI(0,6,7,-4,0,11,15,1,0,4,20,3),tI(0,7,8,-4,0,12,17,2,0,5,22,4),tI(0,7,8,-4,0,13,19,2,0,5,24,4),tI(0,7,9,-4,0,14,21,2,0,5,26,4),tI(0,8,9,-5,0,15,22,2,0,6,28,5),tI(0,8,10,-5,0,16,24,2,0,6,30,5),tI(0,8,11,-5,0,17,26,2,0,6,32,5),tI(0,9,11,-5,0,18,28,2,0,7,34,6),tI(0,9,12,-6,0,19,29,2,0,7,36,6),tI(0,10,13,-6,0,20,31,3,0,8,38,7),tI(0,10,13,-6,0,21,33,3,0,8,40,7),tI(0,10,14,-6,0,22,35,3,0,8,42,7),tI(0,11,14,-7,0,23,36,3,0,9,44,8),tI(0,11,15,-7,0,24,38,3,0,9,46,8)];const rI=["duration","easing","delay"],oI={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)"},iI={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function aI(e){return`${Math.round(e)}ms`}function lI(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function sI(e){const t=Rt({},oI,e.easing),n=Rt({},iI,e.duration);return Rt({getAutoHeightDuration:lI,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;return Ot(r,rI),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:aI(o)} ${i} ${"string"==typeof a?a:aI(a)}`)).join(",")}},e,{easing:t,duration:n})}var uI={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const cI=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function dI(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=Ot(e,cI);if(e.vars)throw new Error(lr(18));const l=KL(r),s=HA(e);let u=ea(s,{mixins:(c=s.breakpoints,d=n,Rt({toolbar:{minHeight:56,[c.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[c.up("sm")]:{minHeight:64}}},d)),palette:l,shadows:nI.slice(),typography:eI(l,i),transitions:sI(o),zIndex:Rt({},uI)});var c,d;return u=ea(u,a),u=t.reduce(((e,t)=>ea(e,t)),u),u.unstable_sxConfig=Rt({},FA,null==a?void 0:a.unstable_sxConfig),u.unstable_sx=function(e){return BA({sx:e,theme:this})},u}var pI=dI();function fI(){const e=YA(pI);return e[jR]||e}var hI,mI={},gI={exports:{}};var yI,bI={exports:{}};var vI=r(Qi),xI=r(na),wI=r(Ma),SI=r(ka),EI=r(VA),CI=r(QA),kI=gL;Object.defineProperty(mI,"__esModule",{value:!0});var _I=mI.default=function(e={}){const{themeId:t,defaultTheme:n=FI,rootShouldForwardProp:r=qI,slotShouldForwardProp:o=qI}=e,i=e=>(0,DI.default)((0,MI.default)({},e,{theme:jI((0,MI.default)({},e,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(e,a={})=>{(0,AI.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:l,slot:s,skipVariantsResolver:u,skipSx:c,overridesResolver:d=BI(zI(s))}=a,p=(0,RI.default)(a,OI),f=void 0!==u?u:s&&"Root"!==s&&"root"!==s||!1,h=c||!1;let m=qI;"Root"===s||"root"===s?m=r:s?m=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const g=(0,AI.default)(e,(0,MI.default)({shouldForwardProp:m,label:undefined},p)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,LI.isPlainObject)(e)?r=>$I(e,(0,MI.default)({},r,{theme:jI({theme:r.theme,defaultTheme:n,themeId:t})})):e,b=(r,...o)=>{let a=y(r);const s=o?o.map(y):[];l&&d&&s.push((e=>{const r=jI((0,MI.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[l]||!r.components[l].styleOverrides)return null;const o=r.components[l].styleOverrides,i={};return Object.entries(o).forEach((([t,n])=>{i[t]=$I(n,(0,MI.default)({},e,{theme:r}))})),d(e,i)})),l&&!f&&s.push((e=>{var r;const o=jI((0,MI.default)({},e,{defaultTheme:n,themeId:t}));return $I({variants:null==o||null==(r=o.components)||null==(r=r[l])?void 0:r.variants},(0,MI.default)({},e,{theme:o}))})),h||s.push(i);const u=s.length-o.length;if(Array.isArray(r)&&u>0){const e=new Array(u).fill("");a=[...r,...e],a.raw=[...r.raw,...e]}const c=g(a,...s);return e.muiName&&(c.muiName=e.muiName),c};return g.withConfig&&(b.withConfig=g.withConfig),b}};mI.shouldForwardProp=qI,mI.systemDefaultTheme=void 0;var MI=kI((hI||(hI=1,function(e){function t(){return e.exports=t=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},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(gI)),gI.exports)),RI=kI((yI||(yI=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(bI)),bI.exports)),AI=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=NI(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(vI),LI=xI;kI(wI),kI(SI);var II=kI(EI),DI=kI(CI);const PI=["ownerState"],TI=["variants"],OI=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function NI(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(NI=function(e){return e?n:t})(e)}function qI(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const FI=mI.systemDefaultTheme=(0,II.default)(),zI=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function jI({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function BI(e){return e?(t,n)=>n[e]:null}function $I(e,t){let{ownerState:n}=t,r=(0,RI.default)(t,PI);const o="function"==typeof e?e((0,MI.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>$I(e,(0,MI.default)({ownerState:n},r))));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,RI.default)(o,TI);return e.forEach((e=>{let o=!0;"function"==typeof e.props?o=e.props((0,MI.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,MI.default)({ownerState:n},r,n)):e.style))})),t}return o}var WI=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e;var HI=_I({themeId:jR,defaultTheme:pI,rootShouldForwardProp:WI});const VI=["theme"];function GI(e){let{theme:t}=e,n=Ot(e,VI);const r=t[jR];return Ms.jsx(fL,Rt({},n,{themeId:r?jR:void 0,theme:r||t}))}var UI=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};const YI={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},KI={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},XI=Ku("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",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":{...YI},"&::-moz-range-track":{...YI},"&::-ms-track":{...YI},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...KI},"&::-moz-range-thumb":{...KI},"&::-ms-thumb":{...KI},"&: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"}}))),QI=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:l,setIsAdjustingWidth:s,isLeftColumn:u,accessibilityRelatedArgs:c})=>{const d=NR({translator:c.translator}),p=Sn.useRef({initWidth:e,columnWidth:e,initX:0}),f=n?0:1,h=r&&!u,m={left:h?p.current.columnWidth-f:"100%"},g=t=>{p.current={initWidth:e,columnWidth:e,initX:null!=t?t:p.current.initX}};TR((()=>h&&g()),[e]);const y=e=>{const t=Math.max(e,ft.PixelsMin);p.current.columnWidth=t,i(t)},b=()=>{if(p.current.columnWidth!==p.current.initWidth){const e={type:ht.Pixels,pixels:p.current.columnWidth};a(e)}else null==s||s(!1)},v=e=>{const t=p.current.initWidth+e.clientX-p.current.initX;y(t)},x=e=>{zM(e),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",x),b()},w=e=>{const t=p.current.initWidth+e.touches[0].clientX-p.current.initX;y(t)},S=e=>{zM(e),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",S),b()},E=!r&&l?e=>{if(e.key===dt.Left||e.key===dt.Right){zM(e);const t=5,n=e.key===dt.Left?-t:t;y(p.current.columnWidth+n)}else e.key===dt.Space||e.key===dt.Enter?(zM(e),l(e),b()):e.key===dt.Esc&&(zM(e),l(e),y(p.current.initWidth))}:void 0,C=d.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return En.createElement(XI,{style:m,key:t,hoverColor:o,isLastColumn:n,className:pt,"data-testid":pt,onMouseDown:e=>{e.stopPropagation(),document.addEventListener("mousemove",v),document.addEventListener("mouseup",x),null==s||s(!0),g(e.clientX)},onDoubleClick:()=>a({type:ht.FitToContent}),onTouchStart:e=>{1===e.touches.length&&(e.stopPropagation(),document.addEventListener("touchmove",w),document.addEventListener("touchend",S),null==s||s(!0),g(e.touches[0].clientX))},onKeyDown:E,onBlur:l,onFocus:()=>g(),type:"range",tabIndex:"-1",max:ft.PixelsMax,"aria-label":C,"aria-valuemin":ft.PixelsMin,"aria-valuemax":ft.PixelsMax,"aria-valuenow":Number(e.toFixed(1))})};function JI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ZI=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){JI(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})),eD=Sn.forwardRef(ZI);function tD(){return tD=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},tD.apply(null,arguments)}const nD=Ku(_E,{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"}))),rD=Ku(eD,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),oD=Ku(lk)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),iD=Ku(XE)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),aD=Ku(fk)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),lD=Ku(fk,{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")}))),sD=Ku("div")((({theme:e})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),uD=Ku("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),cD=Ku(MS)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px"}))),dD=Ku(IC)((({theme:e})=>({width:16,minWidth:"unset !important",marginRight:e.spacing(1.5),lineHeight:0})));function pD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})),hD=Sn.forwardRef(fD);let mD={};const gD=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:l,isActive:s,handleHeadCellMenuKeyDown:u})=>{const[c,d]=Sn.useState(!1),p=Sn.useRef(null),f=Sn.useCallback((e=>{e.stopPropagation(),d(!1)}),[d]);return En.createElement(En.Fragment,null,En.createElement(lD,{ref:a?p: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),mD={}),null!=a&&a.length&&(d(!0),mD[r]=d))},disabled:!i,autoFocus:e,isSubMenu:!!l,isActive:!!s,onKeyDown:u},s&&En.createElement(sD,null),En.createElement(uD,null,En.createElement(dD,null,En.createElement(o,null)),En.createElement(cD,{variant:"body2"},r)),null!=a&&a.length?En.createElement(hD,null):null),(null==a?void 0:a.length)&&En.createElement(vD,{isSubMenu:!0,open:c,anchorEl:p.current,onClose:f,menuGroups:(h=a,m=mD,h.map((e=>e.map((e=>{var t;return{...e.groupHeading?{groupHeading:e.groupHeading}:{},items:null===(t=e.items)||void 0===t?void 0:t.map((({onClick:e,...t})=>({...t,...e?{onClick:async t=>{Object.entries(m).map((([,e])=>e(!1))),await e(t)}}:{}})))}}))))),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},handleHeadCellMenuKeyDown:u}));var h,m},yD=({menuGroup:e,isSubMenu:t,handleHeadCellMenuKeyDown:n})=>e.map((e=>{var r;return[[e.groupHeading&&En.createElement(aD,{key:e.groupHeading,disabled:!0,style:{opacity:1}},e.groupHeading),null===(r=e.items)||void 0===r?void 0:r.map((e=>En.createElement(gD,tD({key:e.id},e,{isSubMenu:t,handleHeadCellMenuKeyDown:n}))))].filter(Boolean)]})),bD={appear:200,enter:200,exit:100},vD=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,handleHeadCellMenuKeyDown:l})=>r.length?En.createElement(oD,tD({className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:bD,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"}},i?{anchorOrigin:i}:{},o?{transformOrigin:o}:{}),(({itemGroups:e,isSubMenu:t,handleHeadCellMenuKeyDown:n})=>e.map(((r,o)=>[yD({menuGroup:r,isSubMenu:t,handleHeadCellMenuKeyDown:n}),o<e.length-1?En.createElement(iD,{"data-testid":"group-divider",variant:"middle",key:"divider"}):void 0])))({itemGroups:r,isSubMenu:a,handleHeadCellMenuKeyDown:l})):null,xD=(e,t)=>e.some((e=>t[e]>0)),wD={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},SD=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=Sn.useState(null),[a,l]=Sn.useState(wD);return TR((()=>{e||(l(wD),i(null))}),[e]),Sn.useEffect((()=>{if(null==r||!r.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const s=()=>{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?s():(i(p),h&&l((e=>({canSelectAll:xD(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:xD(["qSelected"],e),canSelectPossible:xD(["qOption"],e),canSelectAlternative:xD(["qAlternative"],e),canSelectExcluded:xD(["qAlternative","qExcluded"],e)}))(h)))}catch(e){console.error(e)}})(),()=>{a=!0,s()}}),[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}};function ED(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const CD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ED(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),kD=Sn.forwardRef(CD);function _D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const MD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_D(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),RD=Sn.forwardRef(MD);function AD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const LD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){AD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),ID=Sn.forwardRef(LD);function DD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const PD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){DD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),TD=Sn.forwardRef(PD);function OD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ND=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){OD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),qD=Sn.forwardRef(ND);function FD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const zD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){FD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),jD=Sn.forwardRef(zD);function BD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const $D=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){BD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),WD=Sn.forwardRef($D);function HD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const VD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){HD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),GD=Sn.forwardRef(VD);function UD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const YD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){UD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),KD=Sn.forwardRef(YD);function XD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const QD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),JD=Sn.forwardRef(QD);function ZD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const eP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ZD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),tP=Sn.forwardRef(eP);function nP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),oP=Sn.forwardRef(rP);let iP=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const aP="/qListObjectDef",lP=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:l,selectionActionsEnabledStatus:s,anchorRef:u,setFocusOnColumnAdjuster:c,setActiveFieldCallback:d})=>{const p=[];if(n[iP.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:l}=(({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);p.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:kD,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:TD,enabled:l,isActive:!!n&&"D"===i,autoFocus:!a&&l}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:jD,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:qD,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&p.push(...t)}if(e.isDim&&null!=i&&i.select){const e=[];n[iP.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:WD,enabled:!0}]}]),n[iP.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:oP,enabled:!!l,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectAll(aP))},icon:GD,enabled:s.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectPossible(aP))},icon:tP,enabled:s.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectAlternative(aP))},icon:KD,enabled:s.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectExcluded(aP))},icon:JD,enabled:s.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.clearSelections(aP))},icon:RD,enabled:s.canClearSelections}]}]]}]}]),e.length>0&&p.push(...e)}return n[iP.AdjusterHeaderSize]&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),null==c||c(u)},icon:ID,enabled:!0}]}]),p},sP=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,handleHeadCellMenuKeyDown:a,menuAvailabilityFlags:l,shouldShowMenuIcon:s=!0,sortRelatedArgs:u,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,env:f,model:h})=>{var m;const g=NR({translator:o}),{headTextAlign:y,qLibraryId:b,fieldId:v}=r,x=null==d?void 0:d.app,{fieldInstance:w,selectionActionsEnabledStatus:S}=SD({open:e,headerData:r,app:x,qStateName:null==d?void 0:d.qStateName});let E=null;f.flags.isEnabled("CLIENT_IM_7107_TABLE_MENU_CYCLIC_DIM")&&h&&"setActiveField"in h&&(E=async e=>{try{await h.setActiveField("/qHyperCubeDef",r.colIdx,e)}catch(e){console.error(e)}});const C=Sn.useCallback((()=>{const e=b?{qLibraryId:b,type:"dimension"}:v;if(null!=c&&c.embed&&c.listboxRef){const{embed:t,listboxRef:n}=c;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sortCriteria:c.sortCriteria,stateName:null==d?void 0:d.qStateName})}}),[b,v,c,null==d?void 0:d.qStateName]),k=Sn.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]);return i.active?En.createElement(nD,{rightAligned:"right"===y,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper"},s&&En.createElement(rD,{height:st,className:ut,"data-testid":ut,isInteractionsActive:null!==(m=i.active)&&void 0!==m&&m},En.createElement(eD,null)),En.createElement(vD,{open:e,anchorEl:n.current,onClose:k,menuGroups:lP({headerData:r,translator:g,menuAvailabilityFlags:l,setOpen:t,...u,embedListbox:C,interactions:i,fieldInstance:w,selectionActionsEnabledStatus:S,anchorRef:n,setFocusOnColumnAdjuster:null==p?void 0:p.setFocusOnColumnAdjuster,setActiveFieldCallback:E}),handleHeadCellMenuKeyDown:a})):null},uP=e=>e.isDark?{background:e.color,borderColor:o_.DARK_MODE_BORDER,color:o_.DARK_MODE_TEXT,disabledColor:o_.DARK_MODE_DISABLED,iconColor:o_.DARK_MODE_TEXT}:{background:e.color,borderColor:o_.BORDER_MEDIUM,color:o_.TEXT,disabledColor:o_.DISABLED},cP=Ku(_E,{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}`}))),dP=Ku(Qk,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),pP=Ku(qE,{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)}))),fP=Ku(MS)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),hP=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=Sn.useMemo((()=>uP(r.background)),[r]);if(!n.active)return null;const a=o?En.createElement(cP,{footerStyle:i},e):null;return t?_w.createPortal(e,t):a},mP={},gP=Sn.createContext(mP),yP=()=>Sn.useContext(gP),bP=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:l,totalColumnCount:s,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=Sn.useMemo((()=>uP(p.background)),[p]),b=o?o.getBoundingClientRect().width:h.width,v=NR({translator:d}),x=Sn.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:l,totalColumnCount:s,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,l,s,u,c,v,p,f,h,m,y,g,b]);return En.createElement(gP.Provider,{value:x},e)};let vP=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),xP=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}({});function wP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const SP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){wP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),EP=Sn.forwardRef(SP);function CP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){CP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})),_P=Sn.forwardRef(kP);function MP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const RP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){MP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})),AP=Sn.forwardRef(RP),LP={FirstPage:_P,PreviousPage:EP,NextPage:hD,LastPage:AP,FirstPageRTL:AP,PreviousPageRTL:hD,NextPageRTL:EP,LastPageRTL:_P},IP=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:o,handleChangePage:i,translator:a,interactions:l,tabIndex:s}=yP(),u=LP[`${n}${"rtl"===r?"RTL":""}`];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:l.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?null:()=>i(t)},IconComponent:u}},DP=()=>{const{pageInfo:e,width:t}=yP(),n=0===e.page,{IconComponent:r,styledProps:o}=IP({type:vP.FirstPage,disabledCondition:n,pageNumber:0});return t<=xP.FirstPage?null:En.createElement(pP,o,En.createElement(r,{height:st}))},PP=(e,t,n=!1)=>{n&&e.key===dt.Tab&&!e.shiftKey&&(zM(e),((e,t,n)=>{var r,o,i,a;const l=null!==(r=null===(o=e.closest(".qv-object-wrapper"))||void 0===o||null===(o=o.querySelector(".sel-toolbar-confirm"))||void 0===o?void 0:o.parentElement)&&void 0!==r?r:null===(i=document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm"))||void 0===i?void 0:i.parentElement;l?l.focus():null===(a=t.focusSelection)||void 0===a||a.call(t,n)})(e.target,t,!1))},TP=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=yP(),i=e.page>=n-1,{IconComponent:a,styledProps:l}=IP({type:vP.LastPage,disabledCondition:i,pageNumber:n-1}),s=t.enabled?e=>PP(e,t,r):null;return o<=xP.LastPage?null:En.createElement(pP,tD({},l,{onKeyDown:s}),En.createElement(a,{height:st}))},OP=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=yP(),i=e.page>=n-1,{IconComponent:a,styledProps:l}=IP({type:vP.NextPage,disabledCondition:i,pageNumber:e.page+1}),s=!(o>xP.FirstPage&&o>xP.LastPage)&&t.enabled?e=>PP(e,t,r):null;return En.createElement(pP,tD({},l,{onKeyDown:s}),En.createElement(a,{height:st}))},NP=()=>{const{pageInfo:e}=yP(),t=0===e.page,{IconComponent:n,styledProps:r}=IP({type:vP.PreviousPage,disabledCondition:t,pageNumber:e.page-1});return En.createElement(pP,r,En.createElement(n,{height:st}))},qP=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r}=yP(),{page:o,rowsPerPage:i}=n;if(t<=xP.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,r)}`,r.toString()]);return En.createElement(fP,{variant:"caption"},a)},FP=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:l}=yP(),s=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),c=`${e}-dropdown`,d=`${c}-label-${s}`,p={tabIndex:l,id:`${c}-${s}`,"data-testid":c,"aria-labelledby":d};return En.createElement(En.Fragment,null,En.createElement(fP,{variant:"caption",id:d},u,":"),En.createElement(dP,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:p},n))},zP=()=>{var e;const{pageInfo:t,isSelectionMode:n,totalColumnCount:r,width:o,handleChangeRowsPerPage:i}=yP();if(!(!(null===(e=t.rowsPerPageOptions)||void 0===e||!e.length)&&!n&&o>xP.RowsPerPage&&r<=100)||void 0===t.rowsPerPageOptions)return null;const a=En.createElement(En.Fragment,null,t.rowsPerPageOptions.map((e=>En.createElement("option",{key:e,value:e},e))));return En.createElement(FP,{name:"RowsPerPage",value:t.rowsPerPage,options:a,handleChange:e=>{null==i||i(+e.target.value)}})},jP=1e3,BP="…",$P=({totalPages:e,page:t})=>{const n=Math.min(e,jP),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-jP):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+i;return En.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(En.createElement("option",{key:"startMoreOptions",value:BP,disabled:!0},BP)),o<e-1&&a.push(En.createElement("option",{key:"endMoreOptions",value:BP,disabled:!0},BP)),En.createElement(En.Fragment,null,a)},WP=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r}=yP(),{page:o}=e;if(t<=xP.SelectPage)return null;const i=En.createElement($P,{totalPages:n,page:o});return En.createElement(FP,{name:"SelectPage",value:o,options:i,handleChange:e=>r(+e.target.value)})},HP=e=>En.createElement(bP,e,En.createElement(zP,null),En.createElement(WP,null),En.createElement(qP,null),En.createElement(DP,null),En.createElement(NP,null),En.createElement(OP,null),En.createElement(TP,null));var VP=Sn.memo(HP);const GP=e=>En.createElement(hP,e,En.createElement(VP,e)),UP={},YP=Sn.createContext(UP),KP=()=>Sn.useContext(YP),XP=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,children:o})=>{const i=Sn.useMemo((()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r})),[e,t,n,r]);return Ms.jsx(YP.Provider,{value:i,children:o})},QP=Sn.createContext({}),JP=()=>Sn.useContext(QP),ZP=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:l,children:s})=>{const u=Sn.useMemo((()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:l,translator:i})),[e,a,t,r,n,o,l,i]);return Ms.jsx(QP.Provider,{value:u,children:s})},eT=Sn.createContext({}),tT=()=>Sn.useContext(eT),nT=({children:e,...t})=>Ms.jsx(eT.Provider,{value:t,children:e}),rT=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{var e;const{theme:t,translator:n}=JP(),{layoutService:r}=tT(),o=null!==(e=t.getStyle("","","fontFamily"))&&void 0!==e?e:KM;return r.hasData?r.hasLimitedData?{text:n.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:o,alignItems:"center",height:"22px"}:{}:{text:n.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:o,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Ms.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:Ms.jsx("span",{style:{...oR,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},oT="/qHyperCubeDef",iT=-1,aT="PSEUDO-DIM",lT=[];for(let e=0;e<256;++e)lT.push((e+256).toString(16).slice(1));let sT;const uT=new Uint8Array(16);function cT(){if(!sT){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sT=crypto.getRandomValues.bind(crypto)}return sT(uT)}var dT={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pT(e,t,n){if(dT.randomUUID&&!t&&!e)return dT.randomUUID();const r=(e=e||{}).random||(e.rng||cT)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(lT[e[t+0]]+lT[e[t+1]]+lT[e[t+2]]+lT[e[t+3]]+"-"+lT[e[t+4]]+lT[e[t+5]]+"-"+lT[e[t+6]]+lT[e[t+7]]+"-"+lT[e[t+8]]+lT[e[t+9]]+"-"+lT[e[t+10]]+lT[e[t+11]]+lT[e[t+12]]+lT[e[t+13]]+lT[e[t+14]]+lT[e[t+15]]).toLowerCase()}(r)}const fT=()=>{var e,t,n;return null!==(e=null===(t=crypto)||void 0===t||null===(n=t.randomUUID)||void 0===n?void 0:n.call(t))&&void 0!==e?e:pT()},hT=e=>e===iT?aT:(({qLibraryId:e,cId:t})=>{var n;return null!==(n=null!=e?e:t)&&void 0!==n?n:fT()})(e),mT=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===iT?n.columnWidthLocation=ot.Measures:n.isLeftDimension?n.columnWidthLocation=ot.Dimension:t.at(-1)===iT?n.columnWidthLocation=ot.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=ot.Pivot))},gT=(e,t,n)=>{var r;const o=hT(t),i=e.getDimensionInfoIndex(t),a=e.isLeftDimension(i);return t===iT?{id:o,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:n,columnWidthLocation:ot.Measures,isPivot:!0}:{id:o,colIdx:0,label:t.qFallbackTitle,qReverseSort:t.qReverseSort,sortDirection:t.qSortIndicator&&"N"!==t.qSortIndicator?t.qSortIndicator:"A",qLibraryId:t.qLibraryId,fieldId:t.qGroupFieldDefs[t.qGroupPos],isLocked:null!==(r=t.qLocked)&&void 0!==r&&r,columnWidth:t.columnWidth,qApprMaxGlyphCount:t.qApprMaxGlyphCount,isDim:!0,isCyclic:t.qGrouping===yt.Cyclic,groupDimensionPos:t.qGroupPos,groupDimensionLabels:t.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:n,columnWidthLocation:ot.Dimension,isPivot:!0,isSortedByFirstMeasure:e.isSortedByFirstMeasure}},yT=({layoutService:e,lastRow:t,lastCol:n})=>{let r=n;var o;t.length>0&&(r=(o=n).at(-1)===iT?o.slice(0,-1):o);const i=r.length+(t.length?1:0),a=Math.max(1,t.length),l=((e,t)=>Array(e).fill(null).map((()=>Array.from({length:t},(()=>null)))))(i,a);return t.forEach(((t,n,r)=>{const o=n===r.length-1;l[i-1][n]=gT(e,t,o)})),r.forEach(((t,n,r)=>{const o=n===r.length-1;l[n][a-1]=gT(e,t,o)})),l},bT=(e,t,n)=>{var r,o;const i=((e,t,n)=>{let r;var o;return r=0===t.length||t.includes(iT)?yT({layoutService:e,lastRow:n,lastCol:t}):(e=>e[0].map(((t,n)=>e.map((e=>e[n])))))(yT({layoutService:e,lastRow:t,lastCol:n})),e.isIndentModeEnabled&&r[r.length-1].length>1&&(r[r.length-1]=[r.at(-1),...new Array(r[0]?r[0].length-1:0).fill(null)]),r.length&&(null===(o=r.at(-1))||void 0===o||o.forEach(((t,r)=>{if(Array.isArray(t)){const r=t;for(let t=0;t<r.length;t++)mT({layoutService:e,visibleLeftDimensionInfos:n,cell:r[t],colIdx:t})}else mT({layoutService:e,visibleLeftDimensionInfos:n,cell:t,colIdx:r})}))),r})(e,t,n);return{data:i,size:{x:null!==(r=null===(o=i[0])||void 0===o?void 0:o.length)&&void 0!==r?r:0,y:i.length}}};function vT(e){return vT="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},vT(e)}function xT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"==typeof i?i:String(i)),r)}var o,i}function ST(e,t,n){return t&&wT(e.prototype,t),n&&wT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ET(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kT(e,t)}function CT(e){return CT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CT(e)}function kT(e,t){return kT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kT(e,t)}function _T(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function MT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CT(e);if(t){var o=CT(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _T(this,n)}}function RT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return AT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AT(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var LT={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),o="",i=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),i=!0),t.push(function(e,t,n){return{key:IT(e),value:IT(t),useEqualSign:n}}(n,o,i))}})),t}};function IT(e){try{return decodeURIComponent(e)}catch(t){return e}}function DT(e){if(!(this instanceof DT))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return LT.fromSearchString(t.search)}}})}function PT(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}DT.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},DT.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=PT((t=e[r]).key),t.value?n+="=".concat(PT(t.value)):n+=t.useEqualSign?"=":"";return n};var TT,OT=function(){function e(t){xT(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}return ST(e,[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}]),e}(),NT=function(){function e(){xT(this,e)}return ST(e,[{key:"decode",value:function(e){for(var t,n="",r=new OT(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}]),e}(),qT=function(e){return e>=0&&e<=1114111},FT=function(e){return e.match(/[\s]/)},zT=function(e){ET(n,e);var t=MT(n);function n(){return xT(this,n),t.apply(this,arguments)}return ST(n,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(t=i,n=0;n<5&&(null!=(r=e.next())&&!FT(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var a=parseInt(t,16);return qT(a)?String.fromCharCode(a):"�"}}]),n}(NT),jT=function(){function e(t,n){xT(this,e),this._key=t,this._value=n}return ST(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}]),e}(),BT=function(){function e(){xT(this,e)}return ST(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var o,i;if(t.length===n)return i=this._value,this.setValue(r),i;var a=t.charAt(n);return this._nextMap?(o=this._nextMap[a])||(o=new e,this._nextMap[a]=o):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return jT.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return jT.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||jT.newInstanceIfNeeded(e,t,this._value)}}]),e}(),$T=function(){function e(){xT(this,e),this.clear()}return ST(e,[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new BT);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}]),e}(),WT=function(){var e,t,n,r=[],o=[],i=new $T;for(e in r["&quot"]="34",r["&amp"]="38",r["&lt"]="60",r["&gt"]="62",r["&nbsp"]="160",r["&iexcl"]="161",r["&cent"]="162",r["&pound"]="163",r["&curren"]="164",r["&yen"]="165",r["&brvbar"]="166",r["&sect"]="167",r["&uml"]="168",r["&copy"]="169",r["&ordf"]="170",r["&laquo"]="171",r["&not"]="172",r["&shy"]="173",r["&reg"]="174",r["&macr"]="175",r["&deg"]="176",r["&plusmn"]="177",r["&sup2"]="178",r["&sup3"]="179",r["&acute"]="180",r["&micro"]="181",r["&para"]="182",r["&middot"]="183",r["&cedil"]="184",r["&sup1"]="185",r["&ordm"]="186",r["&raquo"]="187",r["&frac14"]="188",r["&frac12"]="189",r["&frac34"]="190",r["&iquest"]="191",r["&Agrave"]="192",r["&Aacute"]="193",r["&Acirc"]="194",r["&Atilde"]="195",r["&Auml"]="196",r["&Aring"]="197",r["&AElig"]="198",r["&Ccedil"]="199",r["&Egrave"]="200",r["&Eacute"]="201",r["&Ecirc"]="202",r["&Euml"]="203",r["&Igrave"]="204",r["&Iacute"]="205",r["&Icirc"]="206",r["&Iuml"]="207",r["&ETH"]="208",r["&Ntilde"]="209",r["&Ograve"]="210",r["&Oacute"]="211",r["&Ocirc"]="212",r["&Otilde"]="213",r["&Ouml"]="214",r["&times"]="215",r["&Oslash"]="216",r["&Ugrave"]="217",r["&Uacute"]="218",r["&Ucirc"]="219",r["&Uuml"]="220",r["&Yacute"]="221",r["&THORN"]="222",r["&szlig"]="223",r["&agrave"]="224",r["&aacute"]="225",r["&acirc"]="226",r["&atilde"]="227",r["&auml"]="228",r["&aring"]="229",r["&aelig"]="230",r["&ccedil"]="231",r["&egrave"]="232",r["&eacute"]="233",r["&ecirc"]="234",r["&euml"]="235",r["&igrave"]="236",r["&iacute"]="237",r["&icirc"]="238",r["&iuml"]="239",r["&eth"]="240",r["&ntilde"]="241",r["&ograve"]="242",r["&oacute"]="243",r["&ocirc"]="244",r["&otilde"]="245",r["&ouml"]="246",r["&divide"]="247",r["&oslash"]="248",r["&ugrave"]="249",r["&uacute"]="250",r["&ucirc"]="251",r["&uuml"]="252",r["&yacute"]="253",r["&thorn"]="254",r["&yuml"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["&notin"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(o[r[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(n=o[t].toLowerCase().substr(1),i.put(n,String.fromCharCode(t)));return i}(),HT=function(e){ET(n,e);var t=MT(n);function n(){return xT(this,n),t.apply(this,arguments)}return ST(n,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,o="";for(t=Math.min(e.remainder().length,WT.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();var i=WT.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&qT(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&qT(r)?String.fromCharCode(r):null}}]),n}(NT),VT=function(e){ET(n,e);var t=MT(n);function n(){return xT(this,n),t.apply(this,arguments)}return ST(n,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o,i=e.next();if(null==i)return e.reset(),null;if("%"!==i)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(o=parseInt(t,16),qT(o))?String.fromCharCode(o):(e.reset(),null)}}]),n}(NT),GT=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(TT=document.createElement("div"));var UT=Array.prototype.indexOf,YT=[",",".","_"," "],KT=[",",".","-","_"," "],XT={width:["%"],height:["%"]},QT={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},JT={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":QT.image,"background-color":QT.color,"border-color":QT.color,"border-image":QT.image,color:QT.color,icon:QT.image,"list-style-image":QT.image,"outline-color":QT.color},ZT={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function eO(e,t,n){var r;if(t){if(UT)return UT.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function tO(e){if(null==e)return"";var t,n=document.createTextNode(e);return TT.appendChild(n),t=TT.innerHTML,TT.removeChild(n),t}function nO(e,t,n){var r,o,i,a,l,s,u,c,d;if(e=oO(e).toLowerCase(),t=oO(t),eO(e,ZT.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(i=0;i<ZT.attr_val;i++)if(t.toLowerCase().match(ZT.attr_val[i]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=XT[e])||(r=KT),o="",!n){for(a=0;a<e.length;a++){if(!(l=e.charAt(a)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=l}o+='="'}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&eO(u,r)<0?(d=c.toString(16),o+="&#x".concat(d,";")):o+=u;return n||(o+='"'),o}function rO(e,t,n){var r,o,i,a,l,s,u,c,d,p;if(e=oO(e).toLowerCase(),t=oO(t),eO(e,ZT.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<ZT.css_val.length;r++)if(t.toLowerCase().indexOf(ZT.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=JT[e])||(o=QT.default),i="",!n){for(a=0;a<e.length;a++){if(!(l=e.charAt(a)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=l}i+=": "}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&eO(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+="\\".concat(p).concat(d)):i+=u;return i}function oO(e,t){var n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;for(var l=[new HT,new VT,new zT];!a;){r=n;for(var s=0;s<l.length;s++)(i=l[s].decode(n))!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var iO=[],aO=0;aO<255;aO++)iO[aO]=aO>=48&&aO<=57||aO>=65&&aO<=90||aO>=97&&aO<=122?null:aO.toString(16);var lO=function(e){return tO(e.unsafe)},sO=function(e){var t,n=[],r=[],o={},i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=rO(t,n[t],!0),i+=rO(t,n[t],!0),o[t]=r[t]);return e.map?o:i},uO=function(e){var t=[],n=[],r={},o="";for(var i in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(n[i]=nO(i,t[i],!0),o+=nO(i,t[i],!0),r[i]=n[i]);return e.map?r:o};function cO(e,t){throw new Error(t)}var dO={canonicalize:oO,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===vT(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},o=1,i=arguments.length;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?lO(e):"css"===e.context?(null!=e.map&&"object"!==vT(e.map)&&cO(this,"Invalid parameter type"),sO(e)):"attr"===e.context?(null!=e.map&&"object"!==vT(e.map)&&cO(this,"Invalid parameter type"),uO(e)):void cO(this,"Invalid parameter type")},encodeForAttr:nO,encodeForAttr2:function(e){return nO("nonsens",e,!0)},encodeForCSS:rO,encodeForHref:function(e){oO(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new DT(e),n=DT.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,o=(e=n+DT.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,o,i,a,l;for(t||(t=YT),l="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),eO(o,t)>=0||null==iO[i]?l+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),l+="\\x".concat(a).concat(r.toUpperCase())):(a="0000".substr(r.length),l+="\\u".concat(a).concat(r.toUpperCase())));return l},encodeForHTML:tO,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=oO(t).toLowerCase():cO(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,o=void 0===r?5e5:r,i=n.maxByteSizeImage,a=void 0===i?5e6:i,l=function(e){var t,n=RT(null!==(t=GT.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),s=l.mimeType,u=l.encoding,c=l.data;if(!c)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(s,u,c);return"image/svg+xml"===s?d<=o:d<=a}};const pO=(e,t)=>{var n;const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps;return null==r||null===(n=r.qValues)||void 0===n?void 0:n[e]},fO=e=>{switch(e){case"topLeft":default:return{horizontal:"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"flex-end",vertical:"center"};case"topRight":return{horizontal:"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"flex-end",vertical:"flex-end"}}},hO=({text:e,url:t,imageSize:n,imagePosition:r})=>r&&t&&!t.toLowerCase().includes("javascript:")&&dO.isSafeDataURL(t)?{type:Ke.Image,url:t,text:e,imageSize:n,resolvedImagePosition:fO(r)}:{type:Ke.Text,url:void 0,text:e},mO=(e,t,n)=>{if(!e.qMiniChart||null==t||!t.miniChart||!n)return{type:Ke.Text,text:e.qText};const{minY:r,maxY:o}=((e,t,n)=>{var r,o;const i="global"===(null===(r=t.yAxis)||void 0===r?void 0:r.scale),a="zeroCenter"===(null===(o=t.yAxis)||void 0===o?void 0:o.position),l=i?n.qYMin:e.qMiniChart.qMin,s=i?n.qYMax:e.qMiniChart.qMax;if(a){const e=Math.max(Math.abs(l),Math.abs(s));return{minY:-e,maxY:e}}return(e=>{var t,n;return"zeroBaseline"===(null===(t=e.yAxis)||void 0===t?void 0:t.position)||"bars"===e.type&&"auto"===(null===(n=e.yAxis)||void 0===n?void 0:n.position)})(t)?{minY:Math.min(0,l),maxY:Math.max(0,s)}:{minY:l,maxY:s}})(e,t.miniChart,n),i={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:r,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:Ke.MiniChart,text:e.qText,miniChart:i}},gO=(e,t,n)=>{var r;const o=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=null==o||null===(r=o.qValues)||void 0===r?void 0:r[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return(null==n?void 0:n.urlPosition)===Xe.Attribute||null==n?void 0:n.urlLabel},yO=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:Ke.Link,url:dO.encodeForHref(n),text:t,labelStructure:e}}catch(n){return{type:Ke.Text,url:void 0,text:t,labelStructure:e}}},bO=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a})=>{var l,s,u,c,d,p;const f=Qe(t);return f!==Ke.Image||!r.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")||null!==(l=r.anything.sense)&&void 0!==l&&null!==(s=l.isUnsupportedFeature)&&void 0!==s&&s.call(l,"tableImages")?f===Ke.Link?((e,t,n,r)=>{const{urlPosition:o}=null!=t?t:{};if(o===Xe.Attribute){var i;const o=gO(null!==(i=n.url)&&void 0!==i?i:-1,e,t),a=e.qText||o||"";return yO({labelStructure:r,text:a,url:o})}if(o===Xe.Dimension){var a,l;const o=gO(null!==(a=n.urlLabel)&&void 0!==a?a:-1,e,t)||e.qText;return r&&(r.maskedValue=o),yO({text:o,labelStructure:r,url:null!==(l=null==r?void 0:r.originalValue)&&void 0!==l?l:e.qText})}return{type:Ke.Text,url:void 0,text:e.qText,labelStructure:r}})(e,t,n,a):f!==Ke.Indicator||!r.flags.isEnabled("CLIENT_IM_6696_INDICATORS")||null!==(u=r.anything.sense)&&void 0!==u&&null!==(c=u.isUnsupportedFeature)&&void 0!==c&&c.call(u,"tableIndicators")?f!==Ke.MiniChart||!r.flags.isEnabled("CLIENT_IM_7110_TABLE_MINI_CHART")||null!==(d=r.anything.sense)&&void 0!==d&&null!==(p=d.isUnsupportedFeature)&&void 0!==p&&p.call(d,"qMiniChartDef")?{type:Ke.Text,url:void 0,text:e.qText,labelStructure:a}:mO(e,t,i):((e,t,n)=>{const{indicator:r}=null!=t?t:{};return{type:Ke.Indicator,url:void 0,text:e.qText,indicator:{applySegmentColors:null==r?void 0:r.applySegmentColors,position:null==r?void 0:r.position,showTextValues:null==r?void 0:r.showTextValues},indicatorConditionalColoring:n}})(e,t,o):((e,t,n)=>{const{imageSize:r,imagePosition:o,imageSetting:i,imageLabel:a}=null!=t?t:{};if("url"===i){var l,s;const t=e.qText,i=null===(l=pO(null!==(s=n.imageUrl)&&void 0!==s?s:-1,e))||void 0===l?void 0:l.qText;return hO({text:t,url:i,imageSize:r,imagePosition:o})}if("label"===i){var u,c,d;const t=e.qText;if(-1===n.imageLabel)return hO({text:a||t||"",url:t,imageSize:r,imagePosition:o});const i=null!==(u=null===(c=pO(null!==(d=n.imageLabel)&&void 0!==d?d:-1,e))||void 0===c?void 0:c.qText)&&void 0!==u?u:e.qText;return hO({text:i,url:t,imageSize:r,imagePosition:o})}return{type:Ke.Text,url:void 0,text:e.qText}})(e,t,n)},vO=(e,t)=>{var n,r,o,i;const a=t.qAttrExps,l=null==a||null===(n=a.qValues)||void 0===n||null===(n=n[null!==(r=null==e?void 0:e.cellForegroundColor)&&void 0!==r?r:-1])||void 0===n?void 0:n.qText,s=null==a||null===(o=a.qValues)||void 0===o||null===(o=o[null!==(i=null==e?void 0:e.cellBackgroundColor)&&void 0!==i?i:-1])||void 0===o?void 0:o.qText,u=s?FM(s):null,c=l?FM(l):null,d=((e,t)=>e||!t?null:PM(t))(c,u);return{color:null!=d?d:c,background:u}},xO=(e,t)=>t.qSubNodes.reduce(((e,t)=>0===t.qSubNodes.length?e+1:xO(e,t)),e),wO=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:QM-r;let l=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;l=e.qDown+n}return Math.min(a,xO(l,e))},SO=(e,t,n)=>{if(e!==iT){if(t){const t=Qe(e.representation)===Ke.Link;return null!=n&&n.isLinksSupported&&t?e.representation:{type:Ke.Text}}return e.representation}},EO=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:l,attrExprInfoIndex:s,isLeftColumn:u=!0,isIndentModeEnabled:c=!1,indentModeFeatures:d,indentLevel:p,labelStructure:f,env:h,pageInfo:m})=>{const g=(!c||!u)&&"P"===e.qType;let y=e.qText;if(u&&c&&f){const{originalValue:e,delimeter:t,suffix:n}=f;y=`${e} ${!n||!e&&n?"":t} ${n}`.trim()}const b={id:fT(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:u?i:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:wO(e,o,i,r,u,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof l||!l.qLocked),isTotal:"T"===e.qType||!(null==t||!t.isTotal),isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:vO(s,e),selectionCellType:u?bt.Left:bt.Top,dimensionInfoIndex:a.getDimensionInfoIndex(l),canBeResized:0===e.qSubNodes.length&&!u,visibleMeasureInfoIndex:g?e.qElemNo:null==t?void 0:t.visibleMeasureInfoIndex,representation:bO({cell:{...e,qText:y},representationProperties:SO(l,c,d),attrExprInfoIndex:s,env:h,labelStructure:f}),...void 0!==p&&{indentLevel:p}};return t&&(t.children[b.mainAxisPageCoord-t.mainAxisPageCoord]=b),b},CO=(e,t,n,r,o,i,a,l)=>{const{isIndentModeEnabled:s,indentModeFeatures:u}=o;if(!t.length)return e;let c=0;return function t(d,p,f,h=0,m=-1){e[h]||(e[h]={}),s&&m++;const g=o.leftDimensionInfoIndexes.indexOf(iT);f.forEach(((f,y)=>{var b,v;const x={originalValue:null!==(b=f.qText)&&void 0!==b?b:"",maskedValue:"",delimeter:"-",suffix:""};c+=0===y?0:1;const w=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,w+c-f.qUp),E=n.qTop+c-f.qUp;var C,k;if(s&&(o.hasPseudoDimOnLeft&&m<=g))if(x.originalValue=null!==(C=f.qText)&&void 0!==C?C:"",x.maskedValue=null!==(k=f.qText)&&void 0!==k?k:"","N"===f.qType||"U"===f.qType||"T"===f.qType)m<g&&(x.suffix=`${o.visibleMeasureInfo[0].qFallbackTitle}`);else if("P"===f.qType){var _,M,R,A,L,I,D,P;x.originalValue=null!==(_=null===(M=p||d)||void 0===M||null===(M=M.representation)||void 0===M||null===(M=M.labelStructure)||void 0===M?void 0:M.originalValue)&&void 0!==_?_:"",x.maskedValue=null!==(R=null===(A=p||d)||void 0===A||null===(A=A.representation)||void 0===A||null===(A=A.labelStructure)||void 0===A?void 0:A.originalValue)&&void 0!==R?R:"",x.suffix=null!==(L=f.qText)&&void 0!==L?L:"";const e=f.qSubNodes;f={...null===(I=p||d)||void 0===I?void 0:I.ref,...f.qText?{qText:f.qText}:{},qSubNodes:e},m=null!==(D=null===(P=p||d)||void 0===P?void 0:P.indentLevel)&&void 0!==D?D:0}let T=h;s&&(T=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===f.qSubNodes.length&&(T=0));const O=s&&void 0===(null===(v=e[h][S])||void 0===v?void 0:v.ref.qText)||!e[h][S]?EO({node:f,parent:p,root:d,x:T,y:E,pageY:S,layoutService:o,dimensionInfo:i[T],attrExprInfoIndex:a[T],isLeftColumn:!0,...s&&{isIndentModeEnabled:s,indentModeFeatures:u,indentLevel:m},env:l,pageInfo:r,labelStructure:x}):e[h][S];if(e[h][S]=O,f.qSubNodes.length){const e=s?0:h+1;t(d||O,O,f.qSubNodes,e,m)}}))}(null,null,t,0,-1),e},kO=(e,t)=>{e.slice(0,-1).forEach((e=>{Object.values(e).forEach(((e,n,r)=>{const o=r[n+1];e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)}))}))},_O=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=null!=t&&t.isIndentModeEnabled&&null!=t&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=null==n?void 0:n[o],a=r.at(-1);return null!=i&&i.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:null!=a&&a.isTotal?a.mainAxisPageCoord-1:-1},MO=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a})=>{const{qLeft:l,qArea:s}=t;if(!l.length)return e;const u=CO(e.grid,l,s,n,r,o,i,a);kO(u,n.rowsOnCurrentPage);const c=_O(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:c}},RO=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach(((t,n)=>{t.forEach(((t,i)=>{var a;const l=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[l])||(o[l]=[]);const u="U"===t.qType;o[l][s]=null!==(a=o[l][s])&&void 0!==a?a:{id:fT(),ref:t,isNull:u}}))})),o},AO=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return null!=r&&r.length?RO({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},LO=(e,t,n,r,o,i,a,l,s)=>{const{isIndentModeEnabled:u,indentModeFeatures:c}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach(((f,m)=>{var g;d+=0===m?0:1;const y=n.qLeft+d-f.qUp,b=null!==(g=e[h][y])&&void 0!==g?g:EO({node:f,parent:p,root:a,x:y,y:h,pageY:h,layoutService:r,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u,indentModeFeatures:c},env:l,pageInfo:s});e[h][y]=b,f.qSubNodes.length&&t(a||b,b,f.qSubNodes,h+1)}))}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},IO=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:l})=>{const{qTop:s,qArea:u}=t;if(!s.length)return e;const c=LO(e.grid,s,u,n,r,o,i,a,l);kO(c,n.size.x);const d=_O(c);return{...e,grid:c,rowCount:c.length,totalDividerIndex:d}},DO=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},n)=>(e[t]=n,e)),{}),PO=(e,t)=>{const{env:n}=JP(),{layoutService:r}=tT(),{qPivotDataPages:o,pageInfo:i}=KP(),[a,l]=Sn.useState(null),s=((e,t,n)=>Sn.useMemo((()=>({left:e.map(DO),top:t.map(DO),measures:n.map(DO)})),[n,e,t]))(e,t,r.visibleMeasureInfo),u=Sn.useMemo((()=>bT(r,t,e)),[r,t,e]),c=Sn.useCallback((()=>o.slice(1).reduce(((e,t)=>AO({prevData:e,dataPage:t,pageInfo:i})),((e,t)=>{const{qData:n,qArea:r}=e;return RO({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(o[0],i))),[o,i]),d=Sn.useCallback((()=>o.slice(1).reduce(((e,o)=>IO({prevData:e,nextDataPage:o,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:s.top,headerRows:u.size.y,env:n,pageInfo:i})),((e,t,n,r,o,i,a)=>{const{qArea:l,qTop:s}=e,u=LO([],s,l,t,n,r,o,i,a);kO(u,t.size.x);const c=_O(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(o[0],r,t,s.top,u.size.y,n,i))),[o,r,t,s.top,u.size.y,n,i]),p=Sn.useCallback((()=>o.slice(1).reduce(((t,o)=>MO({prevData:t,nextDataPage:o,pageInfo:i,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:s.left,env:n})),((e,t,n,r,o,i)=>{const{qArea:a,qLeft:l}=e,s=CO([],l,a,n,t,r,o,i);kO(s,n.rowsOnCurrentPage);const u=_O(s,t);return{grid:s,columnCount:s.length,layoutSize:t.size,totalDividerIndex:u}})(o[0],r,i,e,s.left,n))),[o,r,i,e,s,n]),[f,h]=Sn.useState((()=>c())),[m,g]=Sn.useState((()=>d())),[y,b]=Sn.useState((()=>p()));TR((()=>{h(c())}),[c]),TR((()=>{g(d())}),[d]),TR((()=>{b(p())}),[p]),TR((()=>{a&&a.forEach((o=>{h((e=>AO({prevData:e,dataPage:o,pageInfo:i}))),g((e=>IO({prevData:e,nextDataPage:o,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:s.top,headerRows:u.size.y,env:n,pageInfo:i}))),b((t=>MO({prevData:t,nextDataPage:o,pageInfo:i,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:s.left,env:n})))}))}),[a]);const v=Sn.useCallback((e=>{l(e)}),[]);return{headersData:u,measureData:f,topDimensionData:m,leftDimensionData:y,attrExprInfoIndexes:s,nextPageHandler:v}},TO=Math.sqrt(1e4),OO=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/ft.PixelsMin)}),NO=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/TO),r=Math.ceil(e.qHeight/TO);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*TO,qTop:e.qTop+n*TO,qWidth:Math.min(TO,e.qWidth-o*TO),qHeight:Math.min(TO,e.qHeight-n*TO)});return t};function qO({nextPageHandler:e}){const{model:t}=JP(),{pageInfo:n}=KP(),{layoutService:r}=tT(),o=(e=>{const t=Sn.useRef(e);return t.current=e,t})(n.page),i=t,a=Sn.useCallback((async(e,t)=>{var n;await(null==i||null===(n=i.collapseLeft)||void 0===n?void 0:n.call(i,oT,e,t,!1))}),[i]),l=Sn.useCallback((async(e,t)=>{await(null==i?void 0:i.collapseTop(oT,e,t,!1))}),[i]),s=Sn.useCallback((async(e,t)=>{await(null==i?void 0:i.expandLeft(oT,e,t,!1))}),[i]),u=Sn.useCallback((async(e,t)=>{await(null==i?void 0:i.expandTop(oT,e,t,!1))}),[i]),c=Sn.useCallback((async t=>{if(null!=i&&i.getHyperCubePivotData&&0!==t.length)try{const r=await i.getHyperCubePivotData(oT,t.reduce(((e,t)=>[...e,...NO(t)]),[]));o.current===n.page&&e(r)}catch(e){console.error(e)}}),[i,e,n,o]),d=Sn.useCallback(((e,{dimensionInfoIndex:n,isLeftColumn:o,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:l,qDimensionInfo:s,topHeadersColumnWidth:u}=r.layout.qHyperCube;let c=[];switch(a){case ot.Dimension:c=[{qPath:`${oT}/qDimensions/${n}/qDef/columnWidth`,oldValue:s[n].columnWidth}];break;case ot.Measures:if(o)c=l.map(((e,t)=>({qPath:`${oT}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth})));else{const e=r.getMeasureInfoIndexFromCellIndex(i);c=[{qPath:`${oT}/qMeasures/${e}/qDef/columnWidth`,oldValue:l[e].columnWidth}]}break;case ot.Pivot:c=[{qPath:`${oT}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map((t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}}));null==t||t.applyPatches(d,!0)}),[t,r]),p=Sn.useCallback((async e=>{var t;await(null==i?void 0:i.applyPatches([{qPath:`${oT}/indentModeColumnWidth`,qOp:null!==(t=r.layout.qHyperCube)&&void 0!==t&&t.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))}),[i,r]);return Sn.useMemo((()=>({collapseLeft:a,collapseTop:l,expandLeft:s,expandTop:u,applyColumnWidth:d,applyIndentModeColumnWidth:p,fetchPages:c})),[a,l,s,u,d,p,c])}const FO=(e,t,n)=>(r,o)=>{if("P"===r)return iT;const i=t[n+o];return e[i]},zO=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach((e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)}))};return n(e),t},jO=Sn.createContext({}),BO=()=>Sn.useContext(jO),$O=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=tT(),{qPivotDataPages:r}=KP();return Sn.useMemo((()=>{var o,i,a,l;const s=zO(null!==(o=null===(i=r[0])||void 0===i?void 0:i.qLeft)&&void 0!==o?o:[]),u=zO(null!==(a=null===(l=r[0])||void 0===l?void 0:l.qTop)&&void 0!==a?a:[]);return{visibleLeftDimensionInfo:s.map(FO(n,t,0)),visibleTopDimensionInfo:u.map(FO(n,t,e))}}),[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:l,nextPageHandler:s}=PO(t,n),u=qO({nextPageHandler:s}),c=Sn.useMemo((()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:l,dataModel:u})),[t,n,r,o,i,a,l,u]);return Ms.jsx(jO.Provider,{value:c,children:e})},WO=18,HO=.75,VO=e=>{var t;return-1!==e&&(null==e||null===(t=e.representation)||void 0===t?void 0:t.type)===Ke.Image},GO=e=>void 0===e?XM:e,UO=(e,t)=>e&&"number"==typeof e&&!Number.isNaN(e)?e:t,YO=e=>UO(e,ft.PixelsDefault),KO=(e,t)=>UO(e,ft.PercentageDefault)*t/100,XO=(e,t,n)=>{switch(null==t?void 0:t.type){case ht.Pixels:return YO(t.pixels);case ht.Percentage:return KO(t.percentage,e);case ht.FitToContent:case ht.Auto:default:return n}},QO=({headers:e,layoutService:t,estimateWidthForDimensionValue:n,shouldConsiderCombinatedLength:r,measureTextForHeader:o,longestMeasureValuePossible:i})=>e.reduce(((e,a,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:s}},isFullyExpanded:u}=t,{id:c,colIdx:d,qApprMaxGlyphCount:p,isLeftDimension:f}=a;if(!f)return e+0;if(c===aT)return e+0;const h=n(p),m=!u&&f&&d<s-1?21:0;let g=0;if(r&&o&&i){g=o("-")+i}return Math.max(e,24*l+WO+m+h+g)}),0),JO=(e,t,n)=>e.reduce(((e,r)=>{const o=(n?0:1)*WO;return Math.max(e,o+t(r.qFallbackTitle))}),0),ZO=(e,t,n,r)=>{const o=100*e/t,i=r*HO*(o/100),a=n*(o/100);return Math.min(a,i)},eN=(e,t,n,r)=>r*(n/100)*(100*e/t/100),tN=(e,t)=>e.some((e=>e>=t*HO)),nN=({layoutService:e,headersData:t,columnWidths:n,tableWidth:r,widthOverride:o,measureTextForHeader:i,estimateWidthForDimensionValue:a,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:s})=>{let u=[];const c=r*HO,d=t.data[t.data.length-1][0],p=Math.min(c,n.at(-1)),f=Math.min(c,QO({headers:d,layoutService:e,estimateWidthForDimensionValue:a})),h=Math.min(c,JO(e.visibleMeasureInfo,i));let m=0;const g=d.findIndex((e=>e.id===aT)),y=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===ht.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+WO+16:24})({layoutService:e,measureTextForHeader:i,translator:s,headersData:t});if(e.hasPseudoDimOnLeft)if(0===g){const e=Math.max(p,f,h);u=[Math.max(y,e-p),p]}else{const t=Math.min(c,JO(e.visibleMeasureInfo,l,!0));m=Math.min(c,QO({headers:d.slice(0,g),layoutService:e,estimateWidthForDimensionValue:a,shouldConsiderCombinatedLength:!0,measureTextForHeader:i,longestMeasureValuePossible:t}));const n=Math.max(p,f,m);u=[Math.max(y,n-p),p]}else u=[Math.max(y,f-p),p];const b=Math.min(c,u.reduce(((e,t)=>e+t),0)),{indentModeColumnWidth:v}=e;o&&o<=c&&(v.type=ht.Pixels,v.pixels=o);return[ht.Pixels,ht.Percentage].includes(v.type)||tN(u,r)?((e,t,n,r)=>{let o=e[0],i=e[1],a=[];const l=e.reduce(((e,t)=>e+t),0),{type:s,pixels:u,percentage:c}=t,d=tN(e,n);s===ht.Auto&&d&&(o>i?o-=i:i-=o),s===ht.Pixels&&u&&(o=ZO(e[0],l,u,n),i=ZO(e[1],l,u,n)),s===ht.Percentage&&c&&(o=eN(e[0],l,c,n),i=eN(e[1],l,c,n));let p=0;i<=r&&(p=o-5,p>0&&(o-=p,i+=p)),p=i-r,p>0&&(o+=p,i-=p),a=[o,i];const f=a.reduce(((e,t)=>e+t),0);return{leftGridColumnWidths:a,leftGridWidth:f,leftGridFullWidth:f}})(u,v,r,p):{leftGridWidth:b,leftGridColumnWidths:u,leftGridFullWidth:b}};function rN({tableWidth:e}){const t=e*HO,{styleService:n,layoutService:r}=tT(),{translator:o}=JP(),{gridSectionsData:{headersData:i}}=BO(),{measureText:a}=IR(n.header),{estimateWidth:l,measureText:s}=IR({...n.dimensionValues,fontWeight:GO(n.dimensionValues.fontWeight)}),{measureText:u}=IR({...n.dimensionValues,...n.measureLabels}),c=Sn.useCallback(((n,c)=>{const{layout:{qHyperCube:{qNoOfLeftDims:d,topHeadersColumnWidth:p}},visibleMeasureInfo:f,isFullyExpanded:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,y=(t=0)=>f.reduce(((n,{qFallbackTitle:r,columnWidth:o})=>{const i=u(r)+WO,a=Math.max(i,t);return Math.max(n,m?a:XO(e,o,a))}),0),b=e=>i.data.reduce(((t,n)=>{const r=n[e];if(!r)return t;if(r.id===aT)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?20:0;return WO+a(t)+20+r})(r);return Math.max(o,t)}),0);let v=0,x=i.data.at(-1);m&&i.size.x>1&&x&&x[0]&&(x=x[0]);const w=x.map(((o,a)=>{let s=WO;if((!m||m&&1===i.size.x)&&n&&void 0!==c&&c===o.colIdx)s=m?Math.min(t,n):n;else{let t;o.columnWidthLocation===ot.Pivot?t=m?void 0:p:o.columnWidthLocation===ot.Dimension&&({columnWidth:t}=o);let n=0;if(o.isLeftDimension)if(o.id===aT)n=y();else{const e=b(a),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:i}=e,a=r.getDimensionInfo(i);if(VO(a))return ft.PixelsDefault;const s=!h&&o&&t<d-1?21:0;return WO+l(n)+s})(o,a);n=Math.max(e,t),m&&!g&&a+1===d&&o.columnWidthLocation===ot.Dimension&&i.size.x>1&&(n=e)}else o.isLeftDimension||(n=b(a),o.columnWidthLocation===ot.Measures&&(n=y(n)));m&&1===i.size.x&&(t=r.indentModeColumnWidth),s=m&&!g&&i.size.x>1?n:XO(e,t,n)}return v+=s,s}));return m&&i.size.x>1?nN({layoutService:r,headersData:i,columnWidths:w,tableWidth:e,widthOverride:n,measureTextForHeader:a,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:s,translator:o}):{leftGridWidth:Math.min(t,v),leftGridColumnWidths:w,leftGridFullWidth:v}}),[e,i,r,t,a,u,l,s,o]),[d,p]=Sn.useState(c);TR((()=>{p(c())}),[c]);const f=Sn.useCallback(((e,t)=>{p(c(e,t))}),[c]);return{...d,overrideLeftGridWidth:f}}function oN({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=tT(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=BO(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:l}},size:s,visibleMeasureInfo:u}=o,{estimateWidth:c,measureText:d}=IR(r.measureValues),{estimateWidth:p}=IR({...r.dimensionValues,fontWeight:GO(r.dimensionValues.fontWeight)}),f=e-n-1,h=i.at(-1),m=h===iT,g=l.length-a>i.length?21:0,y=Sn.useMemo((()=>{const e=m?u:[h],t=s.x/e.length,n=[],r=[];let o=f;const i=(e,r)=>{n[e]=Math.min(ft.PixelsMax,Math.max(ft.PixelsMin,r)),o-=n[e]*t};if(e.forEach(((e,t)=>{if(null!=e&&e.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:l,qFallbackTitle:s}=e;switch(n){case ht.Pixels:i(t,YO(o));break;case ht.Percentage:i(t,KO(a,f));break;case ht.FitToContent:i(t,((e,t,n)=>n?ft.PixelsDefault:WO+(m?Math.max(c(e),d(t)):Math.max(Math.max(...u.map((e=>c(e.qApprMaxGlyphCount)))),p(e)+g)))(l,s,VO(e)));break;case ht.Auto:default:r.push(t)}}else r.push(t)})),r.length){const e=r.length*t,i=o/e;r.forEach((e=>{n[e]=Math.max(ft.AutoMinPivot,i)}))}return n}),[m,u,h,s.x,f,c,d,p,g]),b=Sn.useMemo((()=>{if(m){const e=u.reduce(((e,t,n)=>e+y[n]),0);return e/u.length}return y[0]}),[m,y,u]),v=parseFloat((t/o.size.x).toFixed(12)),x=Sn.useCallback((e=>(m&&void 0!==e?y[o.getMeasureInfoIndexFromCellIndex(e,!0)]:b)-v),[m,y,o,b,v]),w=s.x*b;return{rightGridFullWidth:w,rightGridWidth:Math.min(w,f),getRightGridColumnWidth:x}}const iN=`scrollable-container--${at.TopGrid}`,aN=`scrollable-container--${at.LeftGrid}`,lN=`scrollable-container--${at.DataGrid}`,sN=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},uN=(e,t)=>e>t?lt.Forward:e<t?lt.Backward:lt.None,cN=()=>{const{layoutService:e}=tT(),t=Sn.useRef(null),n=Sn.useRef(null),r=Sn.useRef(null),o=Sn.useRef(null),i=Sn.useRef([]),a=Sn.useRef([]),l=Sn.useRef(null),{scrollbarsDimensions:{verticalScrollbarWidth:s,horizontalScrollbarHeight:u},resetHorizontalScrollbarHeight:c}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const[r,o]=Sn.useState(0),[i,a]=Sn.useState(0);return Sn.useLayoutEffect((()=>{(e.current||n.current)&&o(Math.max(sN(e.current).width,sN(n.current).width))})),Sn.useLayoutEffect((()=>{(t.current||n.current)&&a(Math.max(sN(t.current).height,sN(n.current).height))})),{scrollbarsDimensions:{verticalScrollbarWidth:r,horizontalScrollbarHeight:i},resetHorizontalScrollbarHeight:()=>a(0)}})({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:l}=KP(),{downloadService:s,viewService:u,layoutService:c}=tT(),d=Sn.useCallback((()=>{var o,i,a,l;const s={left:0,top:0};null===(o=e.current)||void 0===o||o.scrollTo(s),null===(i=t.current)||void 0===i||i.scrollTo(s),null===(a=n.current)||void 0===a||a.scrollTo(s),null===(l=r.current)||void 0===l||l.scrollTo(s)}),[e,t,n,r]);Sn.useLayoutEffect((()=>{d()}),[l.page,d]),Sn.useLayoutEffect((()=>{c.triggerdByExpandOrCollapse||d()}),[c,d]),Sn.useLayoutEffect((()=>{if(c.triggerdByExpandOrCollapse){var e,t,n,l,s,u,d;const c=null!==(e=null===(t=r.current)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0,p=null!==(n=null===(l=r.current)||void 0===l?void 0:l.scrollTop)&&void 0!==n?n:0;null===(s=i.current)||void 0===s||s.forEach((e=>null==e?void 0:e.scrollTo(p))),null===(u=o.current)||void 0===u||u.forEach((e=>null==e?void 0:e.scrollTo(c))),null===(d=a.current)||void 0===d||d.scrollTo({scrollTop:p,scrollLeft:c})}}),[c,r,a,i,o]),Sn.useLayoutEffect((()=>{(s.isDownloadedAsPDForImage||c.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=u.scrollTop,r.current.scrollLeft=u.scrollLeft,n.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)}),[u,s,c,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l}});const{trackScrollDirection:d,scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:f}}=(()=>{const e=Sn.useRef(lt.None),t=Sn.useRef(lt.None),n=Sn.useRef({prevScrollTop:0,prevScrollLeft:0});return{trackScrollDirection:Sn.useCallback((r=>{if(r instanceof WheelEvent&&(e.current=uN(r.deltaY,0),t.current=uN(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=uN(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=uN(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}}),[e,t,n]),scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),h=(()=>{const{viewService:e}=tT();return Sn.useCallback((t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===aN&&(e.leftGridScrollLeft=r.scrollLeft),o===lN&&(e.scrollLeft=r.scrollLeft),o===iN&&(e.topGridScrollTop=r.scrollTop),o!==aN&&o!==lN||(e.scrollTop=r.scrollTop)}),[e])})(),m={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},getWrapperElements:Sn.useCallback((()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current})),[t,n,r,o]),updateViewService:h,trackScrollDirection:d,isSnapshotMode:e.isSnapshot};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,isSnapshotMode:a})=>{Sn.useEffect((()=>{const{headerGridWrapperElement:o,topGridWrapperElement:l,leftGridWrapperElement:s,dataGridWrapperElement:u}=r(),c=e=>{o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,s.scrollLeft=o.scrollLeft,l.scrollTop=o.scrollTop,i(e)},d=e=>{var r,a;s.scrollTop+=e.deltaY,null===(r=t.current)||void 0===r||r.forEach((e=>null==e?void 0:e.scrollTo(s.scrollTop))),o.scrollLeft+=e.deltaX,s.scrollLeft=o.scrollLeft,u.scrollTop=s.scrollTop,null===(a=n.current)||void 0===a||a.scrollTo({scrollTop:s.scrollTop}),i(e)},p=t=>{var r,a;l.scrollLeft+=t.deltaX,null===(r=e.current)||void 0===r||r.forEach((e=>null==e?void 0:e.scrollTo(l.scrollLeft))),o.scrollTop+=t.deltaY,l.scrollTop=o.scrollTop,u.scrollLeft=l.scrollLeft,null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:l.scrollLeft}),i(t)},f=r=>{var o,a,c;u.scrollLeft+=r.deltaX,u.scrollTop+=r.deltaY,null===(o=n.current)||void 0===o||o.scrollTo({scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}),l.scrollLeft=u.scrollLeft,null===(a=e.current)||void 0===a||a.forEach((e=>null==e?void 0:e.scrollTo(u.scrollLeft))),s.scrollTop=u.scrollTop,null===(c=t.current)||void 0===c||c.forEach((e=>null==e?void 0:e.scrollTo(u.scrollTop))),i(r)};return o.addEventListener("wheel",c),s.addEventListener("wheel",d),l.addEventListener("wheel",p),u.addEventListener("wheel",f),a&&setTimeout((()=>{o.removeEventListener("wheel",c),s.removeEventListener("wheel",d),l.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}),0),()=>{o.removeEventListener("wheel",c),s.removeEventListener("wheel",d),l.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}}),[i,o,a,e,t,n,r])})(m),(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,isSnapshotMode:a})=>{Sn.useEffect((()=>{const{headerGridWrapperElement:l,topGridWrapperElement:s,leftGridWrapperElement:u,dataGridWrapperElement:c}=r(),d=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),null==o||o(e)},p=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),null==o||o(e)},f=r=>{var a,l,d;const p=r.target;null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:p.scrollLeft,scrollTop:p.scrollTop}),s.scrollLeft=c.scrollLeft,null===(l=e.current)||void 0===l||l.forEach((e=>null==e?void 0:e.scrollTo(p.scrollLeft))),u.scrollTop=c.scrollTop,null===(d=t.current)||void 0===d||d.forEach((e=>null==e?void 0:e.scrollTo(p.scrollTop))),i(r),null==o||o(r)};return u.addEventListener("scroll",d),s.addEventListener("scroll",p),c.addEventListener("scroll",f),a&&setTimeout((()=>{u.removeEventListener("scroll",d),s.removeEventListener("scroll",p),c.removeEventListener("scroll",f)}),0),()=>{u.removeEventListener("scroll",d),s.removeEventListener("scroll",p),c.removeEventListener("scroll",f)}}),[i,o,a,e,t,n,r])})(m),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:f},scrollbarsDimensions:{verticalScrollbarWidth:s,horizontalScrollbarHeight:u,resetHorizontalScrollbarHeight:c}}},dN=()=>{const{layoutService:e}=tT(),{rect:t,pageInfo:n}=KP();return Sn.useMemo((()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}}),[t,e,n.shouldShowPagination])},pN=({children:e,style:t})=>Ms.jsx("div",{"data-testid":"fullSize",style:t,children:e}),fN=({children:e,style:t})=>Ms.jsx("div",{"data-section-id":"GRID",style:{display:"grid",...t},children:e}),hN=e=>e&&`scrollable-container--${e}`,mN=({children:e,style:t,origin:n},r)=>{const{interactions:o}=JP(),i=o.active?t:{overflow:"hidden"};return Ms.jsx("div",{"data-testid":"scrollable","data-key":hN(n),style:i,ref:r,children:e})};var gN=En.forwardRef(mN);const yN=({children:e,style:t})=>Ms.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,left:0,...t},children:e});var bN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function vN(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||bN(r)&&bN(o)))return!1;var r,o;return!0}function xN(e,t){var n;void 0===t&&(t=vN);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var wN="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function SN(e){cancelAnimationFrame(e.id)}function EN(e,t){var n=wN();var r={id:requestAnimationFrame((function o(){wN()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var CN=-1;function kN(e){if(void 0===e&&(e=!1),-1===CN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),CN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return CN}var _N=null;function MN(e){if(void 0===e&&(e=!1),null===_N||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?_N="positive-descending":(t.scrollLeft=1,_N=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),_N}return _N}var RN=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function AN(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=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,Ft(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Ft(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=xN((function(e,t,n,o,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),r._callOnScroll=void 0,r._callOnScroll=xN((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,l=a.columnWidth,s=a.direction,u=a.rowHeight,p=r._getItemStyleCache(m&&l,m&&s,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===s;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=xN((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,l=t.scrollHeight,s=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(MN()){case"negative":u=-i;break;case"positive-descending":u=s-o-i}u=Math.max(0,Math.min(u,s-o));var c=Math.max(0,Math.min(a,l-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&&SN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=EN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}qt(t,e),t.getDerivedStateFromProps=function(e,t){return LN(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=kN();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=l(this.props,this._instanceProps)>f?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?s(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(MN()){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&&SN(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?RN:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],E=w[1],C=this._getVerticalRangeToRender(),k=C[0],_=C[1],M=[];if(r>0&&g)for(var R=k;R<=_;R++)for(var A=S;A<=E;A++)M.push(Sn.createElement(t,{columnIndex:A,data:d,isScrolling:b?x:void 0,key:f({columnIndex:A,data:d,rowIndex:R}),rowIndex:R,style:this._getItemStyle(R,A)}));var L=a(this.props,this._instanceProps),I=l(this.props,this._instanceProps);return Sn.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Rt({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},Sn.createElement(u||c||"div",{children:M,ref:s,style:{height:L,pointerEvents:x?"none":void 0,width:I}}))},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],l=i[1],s=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,l,d,p,s,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,l=e.rowCount,s=this.state,u=s.horizontalScrollDirection,c=s.isScrolling,d=s.scrollLeft,p=n||i||a||1;if(0===t||0===l)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,l=a.isScrolling,s=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=l&&"backward"!==s?1:Math.max(1,c),g=l&&"forward"!==s?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(Sn.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var LN=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},IN=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 l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},DN=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 l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},PN=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 l=0;if(a>=0){var s=o[a];l=s.offset+s.size}for(var u=a+1;u<=n;u++){var c=i(u);o[u]={offset:l,size:c},l+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},TN=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?ON(e,t,n,i,0,r):NN(e,t,n,Math.max(0,i),r)},ON=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),l=PN(e,t,a,n).offset;if(l===i)return a;l<i?o=a+1:l>i&&(r=a-1)}return o>0?o-1:0},NN=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&PN(e,t,r,n).offset<o;)r+=a,a*=2;return ON(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},qN=function(e,t,n,r,o,i,a){var l="column"===e?t.width:t.height,s=PN(e,t,n,i),u="column"===e?DN(t,i):IN(t,i),c=Math.max(0,Math.min(u-l,s.offset)),d=Math.max(0,s.offset-l+a+s.size);switch("smart"===r&&(r=o>=d-l&&o<=c+l?"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}},FN=AN({getColumnOffset:function(e,t,n){return PN("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return TN("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=PN("column",e,t,r),l=n+i,s=a.offset+a.size,u=t;u<o-1&&s<l;)u++,s+=PN("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:IN,getEstimatedTotalWidth:DN,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return qN("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return qN("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return PN("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return TN("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=PN("row",e,t,r),l=n+i,s=a.offset+a.size,u=t;u<o-1&&s<l;)u++,s+=PN("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}}),zN=function(e,t){return e};function jN(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=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=s(r.props,Ft(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ft(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=xN((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=xN((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,l=i.itemSize,s=i.layout,c=r._getItemStyleCache(u&&l,u&&s,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"===s,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=xN((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(MN()){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&&SN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=EN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}qt(t,e),t.getDerivedStateFromProps=function(e,t){return BN(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 l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?kN():0:s.scrollHeight>s.clientHeight?kN():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},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(MN()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&SN(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?zN: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,w=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),E=S[0],C=S[1],k=[];if(u>0)for(var _=E;_<=C;_++)k.push(Sn.createElement(t,{data:c,key:p(_,c),index:_,isScrolling:y?v:void 0,style:this._getItemStyle(_)}));var M=r(this.props,this._instanceProps);return Sn.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Rt({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},Sn.createElement(l||s||"div",{children:k,ref:a,style:{height:x?"100%":M,pointerEvents:v?"none":void 0,width:x?M:"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,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var u=a(this.props,s,this._instanceProps),c=l(this.props,u,s,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}(Sn.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var BN=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},$N=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var l=o[i];a=l.offset+l.size}for(var s=i+1;s<=t;s++){var u=r(s);o[s]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return o[t]},WN=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=$N(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},HN=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&$N(e,n,t).offset<r;)n+=i,i*=2;return WN(e,t,Math.min(n,o-1),Math.floor(n/2),r)},VN=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 l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},GN=jN({getItemOffset:function(e,t,n){return $N(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:VN,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,l=e.height,s=e.layout,u=e.width,c="horizontal"===a||"horizontal"===s?u:l,d=$N(e,t,o),p=VN(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?WN(e,t,o,0,n):HN(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,l=e.layout,s=e.width,u="horizontal"===o||"horizontal"===l?s:i,c=$N(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=$N(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 UN(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 YN=["style"],KN=["style"];function XN(e,t){var n=e.style,r=Ot(e,YN),o=t.style,i=Ot(t,KN);return!UN(n,o)&&!UN(r,i)}const QN=10,JN=(e,t)=>e.current===lt.Backward?t:0,ZN=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e[o];if(void 0===n||void 0===n[t])return!0}return!1},eq=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,tq=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],l=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(ZN(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+l,qWidth:1,qHeight:r};void 0!==t&&eq(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},nq=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:l,gridHeight:s}=r,u=n.current===lt.Backward?Math.max(0,o-25):i,c=Math.min(u+25,a);return tq({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:l,qHeight:s})},rq=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:l,qHeight:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,l=e.size.x,s=JN(n,QN),u=Math.max(r-s,0);return{startLeft:u,endLeft:u+Math.min(i+QN,l-u),pageTop:o,qHeight:a}})(r,o,n),u=tq({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:l,qHeight:s});return u.length>0?[...u,...nq({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:u},oq=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},iq=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,aq=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],l=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(oq(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+l,qWidth:r,qHeight:1};void 0!==e&&iq(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},lq=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,l=JN(n,QN),s=Math.max(o-l,0);return{startTop:s,endTop:s+Math.min(a+QN,e.rowsOnCurrentPage-s),qLeft:r,qWidth:i}})(e,r,n),s=aq({startTop:o,endTop:i,qLeft:a,qWidth:l,measureData:t,pageInfo:e});if(s.length>0){const r=n.current===lt.Backward?Math.max(0,o-25):i,u=Math.min(r+25,e.rowsOnCurrentPage),c=aq({startTop:r,endTop:u,qLeft:a,qWidth:l,measureData:t,pageInfo:e});return[...s,...c]}return s},sq=async(e,t,n,r,o,i,a,l)=>{const{gridColumnStartIndex:s,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=o;let p=[],f=[];i.current!==lt.None&&(p=lq({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==lt.None&&(f=rq({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===lt.None&&a.current===lt.None&&(p=aq({measureData:n,pageInfo:r,qLeft:s,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);l.isDownloadedAsPDForImage&&l.waitForPromise(h)},uq=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];n=l;var u=Date.now()-i,c=function(){i=Date.now(),r=0,e.apply(t,n)};r||(u>=o?c():r=setTimeout(c,o-u))}}(sq,100),cq=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}(sq,75),dq=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),pq=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{styleService:{grid:{border:l,divider:s}}}=tT();return Ms.jsx("div",{style:{...e,...rR,...lR(n,r,l,o),...uR({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:s})},"data-testid":"empty-cell","data-index":t})},fq=({children:e,verticalAlign:t,width:n,right:r})=>Ms.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",overflow:"hidden",flexDirection:"row",alignItems:t,width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,alignSelf:t},children:e}),hq=e=>{const{type:t,imageSize:n}=e;return t!==Ke.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"};function mq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gq=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){mq(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),yq=Sn.forwardRef(gq);function bq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vq=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bq(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),xq=Sn.forwardRef(vq),wq=e=>{var t;return null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t?void 0:t.includes(pt)},Sq=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===(null==n?void 0:n.ref.qType)&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}};const Eq={createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1},Cq=Sn.createContext(Eq),kq=()=>Sn.useContext(Cq),_q=({children:e,selections:t})=>{const n=function(e){var t,n,r;const{env:o}=JP(),{updatePageInfo:i}=KP(),a=e.isActive(),[l,s]=Sn.useReducer(Sq,{engineSelectedCells:null,selectedField:null,activeSelection:null});Sn.useEffect((()=>{const t=()=>{s({type:"clearSelections"})},n=()=>{t(),i({page:0})};return e.on("deactivated",t),e.on("canceled",t),e.on("confirmed",n),e.on("cleared",t),()=>{e.removeListener("deactivated",t),e.removeListener("canceled",t),e.removeListener("confirmed",n),e.removeListener("cleared",t)}}),[e,i]);const u=Sn.useCallback((async()=>{var t,n,r;if(!l.activeSelection)return;1===l.activeSelection.clientSelectedCells.size&&(n=l.engineSelectedCells,(r=l.activeSelection).clientSelectedCells.forEach(((e,t)=>{null!=n&&n.has(t)&&(r.clientSelectedCells.delete(t),n.delete(t))})));const o=new Map([...null!==(t=l.engineSelectedCells)&&void 0!==t?t:new Map,...l.activeSelection.clientSelectedCells]);try{s({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[oT,Array.from(o,(([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x})))]})}catch(e){console.error(e),s({type:"mouseup",payload:{engineSelectedCells:l.engineSelectedCells}})}}),[l,e]);Sn.useEffect((()=>{if(l.activeSelection)return document.addEventListener("mouseup",u),()=>{document.removeEventListener("mouseup",u)}}),[u,l.activeSelection]);const c=Sn.useCallback(((e,t)=>n=>{const r=t(e);wq(n)||(e=>{var t;return null!==(null===(t=e.target)||void 0===t?void 0:t.closest("[data-prevent-selection]"))})(n)||(e=>{var t;return"A"===(null===(t=e.target)||void 0===t?void 0:t.tagName)})(n)||!(e=>1===e.buttons)(n)||!r||s({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(r.ref.qElemNo,r)},selectedField:{selectionCellType:r.selectionCellType,index:r.selectionCellType===bt.Left?r.x:r.y}}})}),[]),d=Sn.useCallback((t=>o.flags.isEnabled("CLIENT_IM_6223_PIVOT_RANGE_SELECTION")?async()=>{l.activeSelection&&(e.isActive()||await e.begin([oT]),s({type:"mouseover",payload:{index:t}}))}:void 0),[l.activeSelection,e,o]),p=Sn.useCallback((e=>{var t,n;return!(!(null!==(t=l.engineSelectedCells)&&void 0!==t&&t.size||null!==(n=l.activeSelection)&&void 0!==n&&n.clientSelectedCells.size)||!l.selectedField||e.selectionCellType===l.selectedField.selectionCellType&&(e.selectionCellType===bt.Left?l.selectedField.index===e.x:l.selectedField.index===e.y))}),[null===(t=l.activeSelection)||void 0===t?void 0:t.clientSelectedCells.size,null===(n=l.engineSelectedCells)||void 0===n?void 0:n.size,l.selectedField]),f=Sn.useCallback((e=>{var t,n;return!p(e)&&((null===(t=l.engineSelectedCells)||void 0===t?void 0:t.has(e.ref.qElemNo))||!(null===(n=l.activeSelection)||void 0===n||!n.clientSelectedCells.has(e.ref.qElemNo)))}),[p,null===(r=l.activeSelection)||void 0===r?void 0:r.clientSelectedCells,l.engineSelectedCells]);return Sn.useMemo((()=>({isSelected:f,isActive:a,isLocked:p,createMouseDownHandler:c,createMouseOverHandler:d})),[f,a,p,c,d])}(t);return Ms.jsx(Cq.Provider,{value:n,children:e})};var Mq;!function(e){e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration"}(Mq||(Mq={}));const Rq={brighter:.5,darker:.3,opacity:.03},Aq=(e,{cell:t,styleService:n})=>{if(e===Mq.Background||e===Mq.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},Lq=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=Aq(Mq.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?Aq(Mq.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${NM(i=o,Rq)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},Iq=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:Aq(Mq.Color,{cell:e,styleService:t}),Dq=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=Aq(Mq.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?XM:o},Pq=({cell:e,styleService:t})=>Aq(Mq.FontStyle,{cell:e,styleService:t}),Tq=({cell:e,styleService:t})=>Aq(Mq.TextDecoration,{cell:e,styleService:t}),Oq=e=>e?"pointer":"default",Nq=({expandOrCollapse:e,cell:t})=>n=>{null==e||e(t.y,t.x),n.stopPropagation()},qq=(e,t)=>{if(!e.isLeftColumn||e.representation.type===Ke.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},Fq=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r}=tT(),{interactions:o}=JP(),{isActive:i}=kq(),{dataModel:a}=BO();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||i||!a,s=Iq({cell:e,styleService:r,isCellSelected:n}),u=i?.4:1,c=e.ref.qCanExpand?xq:yq;let d;return d=e.ref.qCanExpand?t?null==a?void 0:a.expandLeft:null==a?void 0:a.expandTop:t?null==a?void 0:a.collapseLeft:null==a?void 0:a.collapseTop,Ms.jsx(c,{opacity:u,color:s,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",...qq(e,r)},onClick:l?void 0:Nq({cell:e,expandOrCollapse:d})})},zq=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},jq=e=>{switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";default:return"100%"}},Bq=({representation:e,styleService:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o})=>{const i=`calc(100% - ${n?21:0}px)`,a=o?t.contentCellHeight:t.headerCellHeight,l=o&&void 0!==r?a*Math.max(r,1):a;switch(e.imageSize){case"originalSize":return{maxWidth:i,maxHeight:l};case"fitWidth":return{width:i,maxHeight:l};case"fitHeight":return{height:l,maxWidth:i};case"fill":return{height:l,width:i};default:return{width:i,height:a}}},$q=(e,t)=>{if("alwaysFit"===e)switch(null==t?void 0:t.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},Wq=e=>{if("alwaysFit"===e)return"contain"},Hq=({representation:e,styleService:t,textStyle:n,canExpandOrCollapse:r,leafCount:o,isLeftColumn:i})=>{const{imageRef:a,onLoad:l}=(()=>{const{downloadService:e}=tT(),t=Sn.useRef(null),{promise:n,resolve:r}=Sn.useMemo((()=>vR()),[]);return Sn.useEffect((()=>{var o;return e.isDownloadedAsPDForImage&&(e.waitForPromise(n),null!==(o=t.current)&&void 0!==o&&o.complete&&r()),()=>r()}),[t,e,n,r]),{onLoad:Sn.useCallback((()=>{r()}),[r]),imageRef:t}})(),{url:s,text:u,imageSize:c,resolvedImagePosition:d}=e,{overflow:p,...f}=n;return Ms.jsx("div",{"data-key":"image-container",style:{display:"flex",flexDirection:"column",justifyContent:null==d?void 0:d.vertical,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...Bq({representation:e,styleService:t,canExpandOrCollapse:r,leafCount:o,isLeftColumn:i})},children:Ms.jsx("img",{src:s,alt:u,style:{width:jq(c),height:zq(c),objectFit:Wq(c),objectPosition:$q(c,d),...f},onLoad:l,ref:a})})},Vq=(e,t)=>{if(null!=e&&e.auto)return t;switch(null==e?void 0:e.align){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end";default:return t}},Gq={display:"flex",flexDirection:"row",alignItems:"center"},Uq={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},Yq=(e,t,n,r)=>t?{...Uq,...e.nullValues}:n?{...Gq,color:e.totalValues.color,background:null!=r?r:e.totalValues.background}:{...Gq,color:e.measureValues.color,background:null!=r?r:e.measureValues.background},Kq=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,l={...oR,...!n&&iR(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...l,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...l,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:s,fontStyle:u,textDecoration:c}=e.measureValues;return{...l,fontWeight:void 0===s?XM:s,fontStyle:u,textDecoration:c}},Xq=(e,t,n,r)=>{const{textAlign:o}=t,i=r?"flex-end":"center";var a,l;return e.isNull||n.type!==Ke.Image?Vq(o,i):null!==(a=null===(l=n.resolvedImagePosition)||void 0===l?void 0:l.horizontal)&&void 0!==a?a:"center"},Qq=({cell:e,representation:t,color:n,isNumeric:r,isTotalValueCell:o})=>{const{layoutService:i,styleService:a}=tT(),l=e.isNull?i.getNullValueText():t.text,s=Kq(a,n,r,o,e.isNull);return t.type!==Ke.Image||e.isNull?Ms.jsx("span",{style:{padding:4,...s},children:l}):Ms.jsx(Hq,{representation:t,styleService:a,textStyle:s,isLeftColumn:!0})},Jq=(e,t)=>{var n,r;return null!==(n=null==e||null===(r=e[t])||void 0===r?void 0:r.visibleMeasureInfoIndex)&&void 0!==n?n:0},Zq="flex-start",eF=(e,t)=>{return e.isNull?Zq:t.type===Ke.Image&&"fill"!==t.imageSize?null===(n=t.resolvedImagePosition)||void 0===n?void 0:n.vertical:Zq;var n},tF=({columnIndex:e,rowIndex:t,style:n,data:r})=>{var o;const{env:i}=JP(),{pageInfo:a}=KP(),{styleService:l,layoutService:s}=tT(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:h}}=BO(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=tT(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=BO(),i=r.length,a=o.length;return Sn.useCallback(((r,o)=>{var l,s;return!!(null!==(l=n.grid.at(a-1))&&void 0!==l&&null!==(l=l[r])&&void 0!==l&&l.isTotal||null!==(s=t.grid.at(e?0:i-1))&&void 0!==s&&null!==(s=s[o])&&void 0!==s&&s.isTotal)}),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=BO(),n=t.length;return Sn.useCallback((t=>{var r;const o=null===(r=e.grid.at(n-1))||void 0===r?void 0:r[t];return dq(o,e.totalDividerIndex)}),[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=tT(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=BO(),r=n.length;return Sn.useCallback((n=>{var o;const i=e?0:r-1,a=null===(o=t.grid.at(i))||void 0===o?void 0:o[n];return dq(a,t.totalDividerIndex,e)}),[t,e,r])})(),{showLastBorder:b}=r,v=p.grid.at(h.length-1),x=d.grid.at(f.length-1),{background:w}=l.measureValues,S=null===(o=c[t])||void 0===o?void 0:o[e],E=t===a.rowsOnCurrentPage-1,C=e===s.size.x-1;if(!S)return Ms.jsx(pq,{style:{...n,background:w},isLastRow:E,isLastColumn:C,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const k=s.hasPseudoDimOnLeft?Jq(x,t):Jq(v,e),_=s.visibleMeasureInfo[k],M=bO({cell:S.ref,representationProperties:s.isIndentModeEnabled?{type:Ke.Text}:_.representation,attrExprInfoIndex:u.measures[k],env:i}),R=!S.isNull&&m(e,t),A=S.isNull?s.getNullValueText():M.text,L=!S.isNull||!Number.isNaN(+A),I=vO(u.measures[k],S.ref),D={...Yq(l,S.isNull,R,I.background),...lR(E,C,l.grid.border,b),...uR({bottomDivider:y(t),rightDivider:g(e),borderColor:l.grid.divider}),...rR,padding:"0px 4px",display:"flex",justifyContent:Xq(S,_,M,L)};return Ms.jsx("div",{className:ct,title:A,style:{...D,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Ms.jsx(fq,{width:hq(M),verticalAlign:eF(S,M),children:Ms.jsx(Qq,{cell:S,representation:M,isNumeric:L,isTotalValueCell:R,color:I.color})})})};var nF=En.memo(tF,XN);const rF=(e,t)=>{var n,r;return null!==(n=null===(r=t.list[e])||void 0===r?void 0:r.id)&&void 0!==n?n:e.toString()},oF=({columnIndex:e,rowIndex:t,data:n})=>{var r,o;return null!==(r=null===(o=n.grid[t])||void 0===o||null===(o=o[e])||void 0===o?void 0:o.id)&&void 0!==r?r:`${t}-${e}`},iF={...nR,overflow:"hidden",boxSizing:"content-box",borderWidth:"1px 0px 0px 1px"},aF=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:l})=>{const{pageInfo:s}=KP(),{layoutService:u,styleService:{grid:{divider:c},contentCellHeight:d}}=tT(),{dataModel:p,gridSectionsData:{measureData:f}}=BO(),h={...iF,borderColor:c,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},m=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=KP(),{downloadService:r,viewService:o,layoutService:i}=tT(),{dataModel:a,gridSectionsData:{leftDimensionData:l,topDimensionData:s,measureData:u}}=BO(),c=l.columnCount,d=s.rowCount;return Sn.useCallback((async({overscanColumnStartIndex:l,overscanColumnStopIndex:s,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=l,o.gridRowStartIndex=p,o.gridWidth=s-l+1,o.gridHeight=f-p+1;const h=o.gridWidth+c+(t.current===lt.None?0:QN),m=o.gridHeight+d+(e.current===lt.None?0:QN);let g=uq;m*h>1500&&(g=cq),g(a,i,u,n,o,e,t,r)}),[o,i,a,u,e,t,n,c,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:l});return TR((()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)}),[e,p,f]),Sn.useLayoutEffect((()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})}),[r,t,e,d]),0===u.size.x?null:Ms.jsx(FN,{"data-section-id":"DATA_GRID",ref:e,style:h,columnCount:u.size.x,columnWidth:i,height:t,rowCount:s.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:f},onItemsRendered:m,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:oF,children:nF})};var lF=Sn.memo(aF);function sF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const uF=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sF(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"}),En.createElement("use",{fillRule:"evenodd"})),cF=Sn.forwardRef(uF),dF=e=>{const[t,n]=Sn.useState(!1);return TR((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},pF=()=>{const[e,t]=Sn.useState(!1),{dataModel:n}=BO(),{interactions:r}=JP(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=dF([n]);return{open:e,setOpen:t,handleOpenMenu:e=>r.active&&!wq(e)&&!o&&t(!0),setIsAdjustingWidth:i}};function fF(e,t){var n,r;const o=null!==(n=null===(r=t.expressionColor)||void 0===r?void 0:r.background)&&void 0!==n?n:e.dimensionValues.background,i=t.isLeftColumn?e.header.background:o,a=i===ZM.Transparent?o_.WHITE:i,l=I(e.grid.border),s=I(a);return s.isInvalid()||l.isInvalid()||1===l.a?e.grid.border:function(e,t,n){return I(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(s,l,l.a).getRGB()}const hF=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{var l;const{interactions:s,translator:u}=JP(),{isActive:c}=kq(),{dataModel:d}=BO(),{styleService:p}=tT(),[,f]=Sn.useState({});if(!(e.canBeResized&&!!s.active&&!c))return null;const h=fF(p,e);return Ms.jsx(QI,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{var n;i?null==d||d.applyIndentModeColumnWidth({...t,pixels:Math.min((null!=a?a:0)*HO,null!==(n=t.pixels)&&void 0!==n?n:0)}):null==d||d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:null!==(l=e.label)&&void 0!==l?l:""}})};function mF(e){return cL(e)}const gF=e=>e.scrollTop;function yF(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}function bF(e){return tl("MuiPaper",e)}nl("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const vF=["className","component","elevation","square","variant"],xF=HI("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return Rt({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&Rt({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${xL("#fff",UI(t.elevation))}, ${xL("#fff",UI(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),wF=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:l="elevation"}=n,s=Ot(n,vF),u=Rt({},n,{component:o,elevation:i,square:a,variant:l}),c=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Qa({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},bF,o)})(u);return Ms.jsx(xF,Rt({as:o,ownerState:u,className:ll(c.root,r),ref:t},s))}));var SF=wF;var EF=nl("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const CF=["center","classes","className"];let kF,_F,MF,RF,AF=e=>e;const LF=Vi(kF||(kF=AF`
120
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,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))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+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],s=c[1]&&c[c.length-1].length){for(m="",y=(d=t[0]).length%s,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%s)&&v<p-s&&(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}},SM({exports:{}});const PM=(e,t=o_.TEXT,n=o_.WHITE)=>{const r=v_(e),o=v_(t),i=v_(n);return r.isInvalid()?t:function(e,t,n){return x_(e,t)>x_(e,n)?t:n}(r,i,o).getRGB()},TM={background:o_.SELECTED,color:o_.WHITE},OM=({theme:e,flags:t})=>{if(!t.isEnabled("PS_22149_THEME_SELECTION_COLORS"))return TM;const n=e.getStyle("","","dataColors.selected")||TM.background,r=function(e,t){var n=v_("#FFFFFF"),r=v_(e),o=v_(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;var i=x_(n,r),a=x_(o,r),l=i>a||i>4.5;return!l&&a>3?t:l?"#FFFFFF":"#000000"}(n,o_.TEXT);return{background:n,color:r}},NM=(e,t)=>{const n=v_(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},qM=e=>!!e&&0===v_(e).a,FM=e=>{const t=v_(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},zM=e=>{e.stopPropagation(),e.preventDefault()},jM=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:null!=r&&r,defaultValue(e,t,o){var i;const a=null!==(i=null==r?void 0:r(e,t,o))&&void 0!==i&&i,l=o.theme.current(),s=n(l,a);return{color:"transparent"===s?"none":s}}}),BM=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},$M=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{var o,i;const a=null!==(o=t.fontFamily)&&void 0!==o?o:"Source Sans Pro, sans-serif",l=null!==(i=t.fontFamilies)&&void 0!==i?i:[],s=Array.from(new Set([e,a,...l])),u=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...s.sort().map((e=>BM(e,!0)))],c=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...k_(r).filter((e=>!s.includes(e))).map((e=>BM(e,!0)))];return[...u,...c.length>1?c:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),WM=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],HM=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{var r;const o=t.fontSize,i=null!==(r=t.fontSizes)&&void 0!==r?r:[],a=Array.from(new Set([e,o,...i])),l=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort(((e,t)=>parseInt(e,10)-parseInt(t,10))).map((e=>BM(e,!1)))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...WM.filter((e=>!a.includes(e))).map((e=>BM(e,!1)))];return[...l,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),VM=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:null!=i?i:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:$M({ref:`${e}.fontFamily`,themeAccessor:t=>{var n;return null!==(n=o(t,e,"fontFamily"))&&void 0!==n?n:t.fontFamily},translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontSize:HM({ref:`${e}.fontSize`,themeAccessor:t=>{var n;return null!==(n=o(t,e,"fontSize"))&&void 0!==n?n:t.fontSize},translator:n}),fontColor:jM(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=o(t,e,"color"))&&void 0!==n?n:t.color}))}},background:jM(`${e}.background`,"properties.background",((t,n)=>{var r;const i=n?o_.WHITE:o_.TRANSPARENT;return null!==(r=o(t,e,"backgroundColor"))&&void 0!==r?r:i}),a)}}}}),GM=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontColor:jM(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=r(t,e,"color"))&&void 0!==n?n:t.color}))}},background:jM(`${e}.background`,"properties.background",(t=>{var o,i;return null!==(o=null!==(i=r(t,e,"backgroundColor"))&&void 0!==i?i:n)&&void 0!==o?o:"transparent"}))}}}}),UM=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map((e=>({value:e+1,translation:e+1}))),defaultValue:1}),YM="12px",KM="Source Sans Pro, sans-serif",XM="600",QM=15e3,JM=4/3;var ZM,eR;!function(e){e.Transparent="transparent",e.FontPrimary="#404040",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2"}(ZM||(ZM={})),function(e){e.Solid="solid",e.None="none"}(eR||(eR={}));const tR={display:"flex",justifyContent:"center",alignItems:"center"},nR={borderStyle:"solid"},rR={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},oR={lineHeight:JM,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},iR=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),aR=(e,t)=>e>0?`${e}px ${eR.Solid} ${t}`:eR.None,lR=(e,t,n,r)=>{const o=Number(!t||(null==r?void 0:r.right)),i=Number(!e||(null==r?void 0:r.bottom));return{borderRight:aR(o,n),borderBottom:aR(i,n),borderLeft:eR.None,borderTop:eR.None}},sR=(e,t,n,r,o,i)=>{const a=lR(t,r,o,i);return e.isLeftDimension||(e.isLastDimension&&!t&&(a.borderBottom=aR(2,o)),n||(a.borderLeft=aR(1,o))),a},uR=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=aR(1,n)),t&&(r.borderRight=aR(1,n)),r},cR=e=>({translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:UM("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:e.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?UM("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"):void 0,border:jM("grid.border","properties.border",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:ZM.DividerLight})),divider:jM("grid.divider","properties.pivot.divider",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n||null===(n=n.divider)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:ZM.DividerDark})),background:jM("grid.background","properties.background",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:ZM.Transparent}))}}}}),dR=(e,t,n)=>{var r,o,i,a,l,s;switch(t){case"header":return null==e||null===(r=e.object)||void 0===r||null===(r=r.pivotTableV2)||void 0===r||null===(r=r.dimension)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r[n];case"dimensionValues":return null==e||null===(o=e.object)||void 0===o||null===(o=o.pivotTableV2)||void 0===o||null===(o=o.dimension)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o[n];case"measureLabels":return null==e||null===(i=e.object)||void 0===i||null===(i=i.pivotTableV2)||void 0===i||null===(i=i.measure)||void 0===i||null===(i=i.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i[n];case"measureValues":return null==e||null===(a=e.object)||void 0===a||null===(a=a.pivotTableV2)||void 0===a||null===(a=a.measure)||void 0===a||null===(a=a.label)||void 0===a||null===(a=a.value)||void 0===a?void 0:a[n];case"totalValues":return null==e||null===(l=e.object)||void 0===l||null===(l=l.pivotTableV2)||void 0===l||null===(l=l.total)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l?void 0:l[n];case"nullValues":return null==e||null===(s=e.object)||void 0===s||null===(s=s.pivotTableV2)||void 0===s||null===(s=s.null)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s[n];default:return}},pR=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,defaultValue:[],items:{headerSection:VM({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:dR}),dimensionValueSection:VM({section:"dimensionValues",translator:e,flags:t,getThemeValue:dR}),measureValueSection:VM({section:"measureValues",translator:e,flags:t,getThemeValue:dR}),measureLabelSection:GM({section:"measureLabels",getThemeValue:dR}),totalValuesSection:GM({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:dR}),nullValuesSection:GM({section:"nullValues",fallbackBackground:ZM.NullValueBackground,getThemeValue:dR}),gridSection:cR(t)}}]}),fR=e=>({type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},...e.isEnabled("CLIENT_IM_5975_INDENT_MODE")&&{indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:ht.Auto,translation:"Common.Auto"},{value:ht.Pixels,translation:"Object.Table.Column.Pixels"},{value:ht.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ht.Auto,show:e=>{var t;return!(null===(t=e.qHyperCubeDef)||void 0===t||!t.qIndentMode)}},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:ft.PixelsDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===ht.Pixels},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.pixels)&&(n.indentModeColumnWidth.pixels=Math.max(ft.PixelsMin,Math.min(ft.PixelsMax,n.indentModeColumnWidth.pixels)))}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:ft.PercentageDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===ht.Percentage},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.percentage)&&(n.indentModeColumnWidth.percentage=Math.max(ft.PercentageMin,Math.min(ft.PercentageMaxInIndentMode,n.indentModeColumnWidth.percentage)))}}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(t){var n,r;const{qIndentMode:o}=null!==(n=t.qHyperCubeDef)&&void 0!==n?n:{};return(!o||o&&!e.isEnabled("CLIENT_IM_5975_INDENT_MODE"))&&!(null===(r=t.qHyperCubeDef)||void 0===r||null===(r=r.qDimensions)||void 0===r||!r.some((e=>{var t;return"TOTAL_EXPR"===(null===(t=e.qOtherTotalSpec)||void 0===t?void 0:t.qTotalMode)})))}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled(e){var t;return!(null===(t=e.qHyperCubeDef)||void 0===t||!t.qAlwaysFullyExpanded)},action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),hR=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[pR(e,t),fR(t)]}}}),mR="auto",gR={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>t("integer",e?-1:0)},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>{var t;return!(null==e||null===(t=e.qHyperCubeDef)||void 0===t||!t.qSortbyYValue)}}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:mR,translation:"Object.Table.SortingInSearch",options:[{value:mR,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function yR(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:Mt(e),sorting:gR,addons:Ye,settings:hR(t,n)}}}function bR(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:yR(e),importProperties:Ge(e),exportProperties:Ue}}const vR=()=>{let e;const t=new Promise((t=>{e=t}));return{promise:t,resolve:e}};function xR(t,n){return e.useMemo((()=>t),n)}const wR={},SR=t=>{const n=e.useMemo((()=>({current:wR})),[]);return n.current=n.current===wR?t:n.current,n},ER=()=>{const{viewState:t}=e.useOptions(),n=SR(new Set),r=void 0!==t,{promise:o,resolve:i}=e.useMemo((()=>vR()),[]),a=xR((e=>{r&&n.current.add(e)}),[n]),l=xR(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}((async()=>{await Promise.all(n.current),n.current.clear(),i()}),1e3),[i,n]);return e.usePromise((async()=>{r&&await o}),[o,r]),e.useMemo((()=>({viewState:t,isDownloadedAsPDForImage:r,notifyIsDoneRendering:l,waitForPromise:a})),[l,r,t,a])},CR="#grid",kR=(e,t)=>{const n=null==t?void 0:t.closest(e);return n&&window.getComputedStyle(n).backgroundColor},_R=(e,t,n,r,o)=>{const i=kR(".qv-object .qv-inner-object",n),a=kR(".qv-panel-sheet",n),l=kR(CR,n),s=null!=l?l:a,u=(e=>{var t,n,r,o,i,a;const l=null===(t=e.components)||void 0===t?void 0:t.find((e=>"general"===e.key)),s=null==l||null===(n=l.bgColor)||void 0===n?void 0:n.colorExpression,u=null==l||null===(r=l.bgColor)||void 0===r||null===(r=r.color)||void 0===r?void 0:r.color;if((null==l||null===(o=l.bgColor)||void 0===o?void 0:o.useColorExpression)&&s)return FM(s);if("none"===u)return"transparent";if(void 0===u)return;const c=v_(u);return c.setAlpha(null!==(i=null==l||null===(a=l.bgColor)||void 0===a||null===(a=a.color)||void 0===a?void 0:a.alpha)&&void 0!==i?i:c.a),c.getRGBA()})(e),c=null==r?void 0:r(t),d=null==o?void 0:o(t),p=c||i||d,f=qM(p),h=PM(f?s:p,o_.TEXT,o_.DARK_MODE_TEXT)===h_(o_.DARK_MODE_TEXT);const m=((e,t,n,r=o_.WHITE)=>e&&!qM(e)?e:qM(t)?n&&!qM(n)?n:r:t)(u,p,s);return{color:p,headerColor:m,isDark:h}},MR=(t,n,r,o)=>{const i=e.useTheme(),a=((t,n={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[r,o]=e.useState([]);return e.useEffect((()=>{let e;return t&&(e=new MutationObserver((e=>{o(e)})),e.observe(t,n)),()=>{var t;null===(t=e)||void 0===t||t.disconnect()}}),[t,n]),r})(null==n?void 0:n.closest(CR),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter((({oldValue:e})=>null==e?void 0:e.includes("background"))).map((({oldValue:e})=>e)).join(",");return e.useMemo((()=>({...i,background:_R(t,i,n,r,o)})),[i.name(),n,r,o,t,a])};function RR(t,n){const r=e.useMemo((()=>({isLoading:!0})),n),[o,i]=e.usePromise((async()=>{try{return await t()}finally{r.isLoading=!1}}),n);return[o,r.isLoading,i]}const AR=3;function LR(e,t,n){let r=0,o=e.length;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),l=e.slice(0,i-1),s=n(a),u=n(l);if(s>t&&u<=t)return e.slice(i-1)||null;if(s===t)return e.slice(i)||null;s<t?r=i+1:o=i}return null}function IR({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=AR}=null!=o?o:{},{estimateWidth:a,measureText:l,estimateLineCount:s}=Sn.useMemo((()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const a=kM(o.measureText.bind(o)),l=e=>+a(e).width.toFixed(2),s=kM((({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;let r=0,o=e;do{r+=1,o=LR(o,t,l)}while(null!==o&&r<i);return r}),(({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:s}}),[n,r,e,t,i]);return{estimateWidth:a,measureText:l,estimateLineCount:s}}var DR,PR=kw;DR=PR.createRoot,PR.hydrateRoot;function TR(e,t){const[n,r]=Sn.useState(t),o=n.some(((e,n)=>e!==t[n]));o&&(r(t),e())}var OR={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.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":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen 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":"Geselecteerde waarden 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":"清除選項"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.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":"欄選項"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.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":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.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":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.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":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.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":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.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":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.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":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier 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":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier 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":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.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":"{0}/{1}","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}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.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":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.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":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.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":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.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":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.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":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.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":"選取頁面"}}};const NR=({translator:e})=>(Sn.useMemo((()=>function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(OR).forEach((t=>{e.add(OR[t])}))}}(e)),[e]),e),qR=document.createElement("textarea");function FR(e){qR.value=e,document.body.appendChild(qR),qR.select(),qR.setSelectionRange(0,qR.value.length),document.execCommand("copy"),document.body.removeChild(qR)}qR.style.position="absolute",qR.style.left="-9999px",qR.setAttribute("readonly","");function zR(){null===e.onContextMenu||void 0===e.onContextMenu||e.onContextMenu(((e,t)=>{const n=t.target,r=null==n?void 0:n.closest(`.${ct}`);null!=r&&r.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{(e=>{var t;const n=e.title;n&&(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText?navigator.clipboard.writeText(n).catch((()=>FR(n))):FR(n))})(r)}})}))}var jR="$$material";const BR=["values","unit","step"];function $R(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=Ot(e,BR),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Rt({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(i);function l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return Rt({keys:a,values:i,up:l,down:s,between:u,only:function(e){return a.indexOf(e)+1<a.length?u(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):u(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}var WR={borderRadius:4};function HR(e,t){return t?ea(e,t,{clone:!1}):e}const VR={xs:0,sm:600,md:900,lg:1200,xl:1536},GR={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${VR[e]}px)`};function UR(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||GR;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||GR;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||VR).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function YR(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function KR(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:YR(e,n)||r,t&&(o=t(o,r,e)),o}function XR(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=YR(e.theme,r)||{};return UR(e,i,(e=>{let r=KR(a,o,e);return e===r&&"string"==typeof e&&(r=KR(a,o,`${t}${"default"===e?"":_a(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const QR={m:"margin",p:"padding"},JR={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ZR={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},eA=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!ZR[e])return[e];e=ZR[e]}const[t,n]=e.split(""),r=QR[t],o=JR[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),tA=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],nA=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function rA(e,t,n,r){var o;const i=null!=(o=YR(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function oA(e){return rA(e,"spacing",8)}function iA(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function aA(e,t,n,r){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=iA(t,n),e)),{})}(eA(n),r);return UR(e,e[n],o)}function lA(e,t){const n=oA(e.theme);return Object.keys(e).map((r=>aA(e,t,r,n))).reduce(HR,{})}function sA(e){return lA(e,tA)}function uA(e){return lA(e,nA)}function cA(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?HR(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function dA(e){return"number"!=typeof e?e:`${e}px solid`}function pA(e,t){return XR({prop:e,themeKey:"borders",transform:t})}sA.propTypes={},sA.filterProps=tA,uA.propTypes={},uA.filterProps=nA;const fA=pA("border",dA),hA=pA("borderTop",dA),mA=pA("borderRight",dA),gA=pA("borderBottom",dA),yA=pA("borderLeft",dA),bA=pA("borderColor"),vA=pA("borderTopColor"),xA=pA("borderRightColor"),wA=pA("borderBottomColor"),SA=pA("borderLeftColor"),EA=pA("outline",dA),CA=pA("outlineColor"),kA=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=rA(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:iA(t,e)});return UR(e,e.borderRadius,n)}return null};kA.propTypes={},kA.filterProps=["borderRadius"],cA(fA,hA,mA,gA,yA,bA,vA,xA,wA,SA,kA,EA,CA);const _A=e=>{if(void 0!==e.gap&&null!==e.gap){const t=rA(e.theme,"spacing",8),n=e=>({gap:iA(t,e)});return UR(e,e.gap,n)}return null};_A.propTypes={},_A.filterProps=["gap"];const MA=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=rA(e.theme,"spacing",8),n=e=>({columnGap:iA(t,e)});return UR(e,e.columnGap,n)}return null};MA.propTypes={},MA.filterProps=["columnGap"];const RA=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=rA(e.theme,"spacing",8),n=e=>({rowGap:iA(t,e)});return UR(e,e.rowGap,n)}return null};RA.propTypes={},RA.filterProps=["rowGap"];function AA(e,t){return"grey"===t?t:e}cA(_A,MA,RA,XR({prop:"gridColumn"}),XR({prop:"gridRow"}),XR({prop:"gridAutoFlow"}),XR({prop:"gridAutoColumns"}),XR({prop:"gridAutoRows"}),XR({prop:"gridTemplateColumns"}),XR({prop:"gridTemplateRows"}),XR({prop:"gridTemplateAreas"}),XR({prop:"gridArea"}));function LA(e){return e<=1&&0!==e?100*e+"%":e}cA(XR({prop:"color",themeKey:"palette",transform:AA}),XR({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:AA}),XR({prop:"backgroundColor",themeKey:"palette",transform:AA}));const IA=XR({prop:"width",transform:LA}),DA=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||VR[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:LA(t)}};return UR(e,e.maxWidth,t)}return null};DA.filterProps=["maxWidth"];const PA=XR({prop:"minWidth",transform:LA}),TA=XR({prop:"height",transform:LA}),OA=XR({prop:"maxHeight",transform:LA}),NA=XR({prop:"minHeight",transform:LA});XR({prop:"size",cssProperty:"width",transform:LA}),XR({prop:"size",cssProperty:"height",transform:LA});cA(IA,DA,PA,TA,OA,NA,XR({prop:"boxSizing"}));const qA={border:{themeKey:"borders",transform:dA},borderTop:{themeKey:"borders",transform:dA},borderRight:{themeKey:"borders",transform:dA},borderBottom:{themeKey:"borders",transform:dA},borderLeft:{themeKey:"borders",transform:dA},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:dA},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kA},color:{themeKey:"palette",transform:AA},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:AA},backgroundColor:{themeKey:"palette",transform:AA},p:{style:uA},pt:{style:uA},pr:{style:uA},pb:{style:uA},pl:{style:uA},px:{style:uA},py:{style:uA},padding:{style:uA},paddingTop:{style:uA},paddingRight:{style:uA},paddingBottom:{style:uA},paddingLeft:{style:uA},paddingX:{style:uA},paddingY:{style:uA},paddingInline:{style:uA},paddingInlineStart:{style:uA},paddingInlineEnd:{style:uA},paddingBlock:{style:uA},paddingBlockStart:{style:uA},paddingBlockEnd:{style:uA},m:{style:sA},mt:{style:sA},mr:{style:sA},mb:{style:sA},ml:{style:sA},mx:{style:sA},my:{style:sA},margin:{style:sA},marginTop:{style:sA},marginRight:{style:sA},marginBottom:{style:sA},marginLeft:{style:sA},marginX:{style:sA},marginY:{style:sA},marginInline:{style:sA},marginInlineStart:{style:sA},marginInlineEnd:{style:sA},marginBlock:{style:sA},marginBlockStart:{style:sA},marginBlockEnd:{style:sA},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_A},rowGap:{style:RA},columnGap:{style:MA},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:LA},maxWidth:{style:DA},minWidth:{transform:LA},height:{transform:LA},maxHeight:{transform:LA},minHeight:{transform:LA},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var FA=qA;function zA(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:l,transform:s,style:u}=i;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const c=YR(n,l)||{};if(u)return u(o);return UR(o,t,(t=>{let n=KR(c,s,t);return t===n&&"string"==typeof t&&(n=KR(c,s,`${e}${"default"===t?"":_a(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:FA;function l(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),l=Object.keys(o);let s=o;return Object.keys(r).forEach((n=>{const o=(l=r[n],u=i,"function"==typeof l?l(u):l);var l,u;if(null!=o)if("object"==typeof o)if(a[n])s=HR(s,e(n,o,i,a));else{const e=UR({theme:i},o,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,o)?s=HR(s,e):s[n]=t({sx:o,theme:i})}else s=HR(s,e(n,o,i,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(l,s)}return Array.isArray(o)?o.map(l):l(o)}}const jA=zA();jA.filterProps=["sx"];var BA=jA;function $A(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}const WA=["breakpoints","palette","spacing","shape"];function HA(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=Ot(e,WA),l=$R(n),s=function(e=8){if(e.mui)return e;const t=oA({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(o);let u=ea({breakpoints:l,direction:"ltr",components:{},palette:Rt({mode:"light"},r),spacing:s,shape:Rt({},WR,i)},a);return u.applyStyles=$A,u=t.reduce(((e,t)=>ea(e,t)),u),u.unstable_sxConfig=Rt({},FA,null==a?void 0:a.unstable_sxConfig),u.unstable_sx=function(e){return BA({sx:e,theme:this})},u}var VA=Object.freeze({__proto__:null,default:HA,private_createBreakpoints:$R,unstable_applyStyles:$A});function GA(e=null){const t=Sn.useContext(Oi);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const UA=HA();function YA(e=UA){return GA(e)}const KA=["sx"];function XA(e){const{sx:t}=e,n=Ot(e,KA),{systemProps:r,otherProps:o}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:FA;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Ji(n)?Rt({},r,n):r}:Rt({},r,t),Rt({},o,{sx:i})}var QA=Object.freeze({__proto__:null,default:BA,extendSxProp:XA,unstable_createStyleFunctionSx:zA,unstable_defaultSxConfig:FA});const JA=["className","component"];function ZA(e){if(e.type)return e;if("#"===e.charAt(0))return ZA(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(lr(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(lr(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}function eL(e,t){return e=ZA(e),t=function(e,t=0,n=1){return rl(e,t,n)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}var tL=Sn.createContext(null);function nL(){return Sn.useContext(tL)}var rL="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function oL(e){const{children:t,theme:n}=e,r=nL(),o=Sn.useMemo((()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return Rt({},e,t)}(r,n);return null!=e&&(e[rL]=null!==r),e}),[n,r]);return Ms.jsx(tL.Provider,{value:o,children:t})}const iL=["value"],aL=Sn.createContext();function lL(e){let{value:t}=e,n=Ot(e,iL);return Ms.jsx(aL.Provider,Rt({value:null==t||t},n))}const sL=Sn.createContext(void 0);function uL({value:e,children:t}){return Ms.jsx(sL.Provider,{value:e,children:t})}function cL({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Xa(o.defaultProps,r):o.styleOverrides||o.variants?r:Xa(o,r)}({props:e,name:t,theme:{components:Sn.useContext(sL)}})}const dL={};function pL(e,t,n,r=!1){return Sn.useMemo((()=>{const o=e&&t[e]||t;if("function"==typeof n){const i=n(o),a=e?Rt({},t,{[e]:i}):i;return r?()=>a:a}return Rt({},t,e?{[e]:n}:n)}),[e,t,n,r])}function fL(e){const{children:t,theme:n,themeId:r}=e,o=GA(dL),i=nL()||dL,a=pL(r,o,n),l=pL(r,i,n,!0),s="rtl"===a.direction;return Ms.jsx(oL,{theme:l,children:Ms.jsx(Oi.Provider,{value:a,children:Ms.jsx(lL,{value:s,children:Ms.jsx(uL,{value:null==a?void 0:a.components,children:t})})})})}var hL={},mL={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(mL);var gL=mL.exports,yL=r(sr),bL=r(ol),vL=gL;Object.defineProperty(hL,"__esModule",{value:!0});var xL=hL.alpha=PL;hL.blend=function(e,t,n,r=1){const o=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),i=RL(e),a=RL(t),l=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return LL({type:"rgb",values:l})},hL.colorChannel=void 0;var wL=hL.darken=TL;hL.decomposeColor=RL,hL.emphasize=NL;var SL=hL.getContrastRatio=function(e,t){const n=DL(e),r=DL(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};hL.getLuminance=DL,hL.hexToRgb=ML,hL.hslToRgb=IL;var EL=hL.lighten=OL;hL.private_safeAlpha=function(e,t,n){try{return PL(e,t)}catch(t){return e}},hL.private_safeColorChannel=void 0,hL.private_safeDarken=function(e,t,n){try{return TL(e,t)}catch(t){return e}},hL.private_safeEmphasize=function(e,t,n){try{return NL(e,t)}catch(t){return e}},hL.private_safeLighten=function(e,t,n){try{return OL(e,t)}catch(t){return e}},hL.recomposeColor=LL,hL.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=RL(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`};var CL=vL(yL),kL=vL(bL);function _L(e,t=0,n=1){return(0,kL.default)(e,t,n)}function ML(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function RL(e){if(e.type)return e;if("#"===e.charAt(0))return RL(ML(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,CL.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,CL.default)(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const AL=e=>{const t=RL(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};hL.colorChannel=AL;function LL(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function IL(e){e=RL(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let l="rgb";const s=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",s.push(t[3])),LL({type:l,values:s})}function DL(e){let t="hsl"===(e=RL(e)).type||"hsla"===e.type?RL(IL(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function PL(e,t){return e=RL(e),t=_L(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,LL(e)}function TL(e,t){if(e=RL(e),t=_L(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return LL(e)}function OL(e,t){if(e=RL(e),t=_L(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return LL(e)}function NL(e,t=.15){return DL(e)>.5?TL(e,t):OL(e,t)}hL.private_safeColorChannel=(e,t)=>{try{return AL(e)}catch(t){return e}};var qL={black:"#000",white:"#fff"};var FL={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var zL={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var jL={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"};var BL={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"};var $L={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"};var WL={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var HL={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"};const VL=["mode","contrastThreshold","tonalOffset"],GL={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:qL.white,default:qL.white},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}},UL={text:{primary:qL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:qL.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 YL(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=EL(e.main,o):"dark"===t&&(e.dark=wL(e.main,i)))}function KL(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=Ot(e,VL),i=e.primary||function(e="light"){return"dark"===e?{main:$L[200],light:$L[50],dark:$L[400]}:{main:$L[700],light:$L[400],dark:$L[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:zL[200],light:zL[50],dark:zL[400]}:{main:zL[500],light:zL[300],dark:zL[700]}}(t),l=e.error||function(e="light"){return"dark"===e?{main:jL[500],light:jL[300],dark:jL[700]}:{main:jL[700],light:jL[400],dark:jL[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:WL[400],light:WL[300],dark:WL[700]}:{main:WL[700],light:WL[500],dark:WL[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:HL[400],light:HL[300],dark:HL[700]}:{main:HL[800],light:HL[500],dark:HL[900]}}(t),c=e.warning||function(e="light"){return"dark"===e?{main:BL[400],light:BL[300],dark:BL[700]}:{main:"#ed6c02",light:BL[500],dark:BL[900]}}(t);function d(e){return SL(e,UL.text.primary)>=n?UL.text.primary:GL.text.primary}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=Rt({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(lr(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(lr(12,t?` (${t})`:"",JSON.stringify(e.main)));return YL(e,"light",o,r),YL(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},f={dark:UL,light:GL};return ea(Rt({common:Rt({},qL),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:c,name:"warning"}),info:p({color:s,name:"info"}),success:p({color:u,name:"success"}),grey:FL,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},f[t]),o)}const XL=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function QL(e){return Math.round(1e5*e)/1e5}const JL={textTransform:"uppercase"},ZL='"Roboto", "Helvetica", "Arial", sans-serif';function eI(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=ZL,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:l=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,p=Ot(n,XL),f=o/14,h=d||(e=>e/u*f+"rem"),m=(e,t,n,o,i)=>Rt({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===ZL?{letterSpacing:`${QL(o/t)}em`}:{},i,c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(l,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(l,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(l,14,1.75,.4,JL),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,JL),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ea(Rt({htmlFontSize:u,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:l,fontWeightBold:s},g),p,{clone:!1})}function tI(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var nI=["none",tI(0,2,1,-1,0,1,1,0,0,1,3,0),tI(0,3,1,-2,0,2,2,0,0,1,5,0),tI(0,3,3,-2,0,3,4,0,0,1,8,0),tI(0,2,4,-1,0,4,5,0,0,1,10,0),tI(0,3,5,-1,0,5,8,0,0,1,14,0),tI(0,3,5,-1,0,6,10,0,0,1,18,0),tI(0,4,5,-2,0,7,10,1,0,2,16,1),tI(0,5,5,-3,0,8,10,1,0,3,14,2),tI(0,5,6,-3,0,9,12,1,0,3,16,2),tI(0,6,6,-3,0,10,14,1,0,4,18,3),tI(0,6,7,-4,0,11,15,1,0,4,20,3),tI(0,7,8,-4,0,12,17,2,0,5,22,4),tI(0,7,8,-4,0,13,19,2,0,5,24,4),tI(0,7,9,-4,0,14,21,2,0,5,26,4),tI(0,8,9,-5,0,15,22,2,0,6,28,5),tI(0,8,10,-5,0,16,24,2,0,6,30,5),tI(0,8,11,-5,0,17,26,2,0,6,32,5),tI(0,9,11,-5,0,18,28,2,0,7,34,6),tI(0,9,12,-6,0,19,29,2,0,7,36,6),tI(0,10,13,-6,0,20,31,3,0,8,38,7),tI(0,10,13,-6,0,21,33,3,0,8,40,7),tI(0,10,14,-6,0,22,35,3,0,8,42,7),tI(0,11,14,-7,0,23,36,3,0,9,44,8),tI(0,11,15,-7,0,24,38,3,0,9,46,8)];const rI=["duration","easing","delay"],oI={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)"},iI={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function aI(e){return`${Math.round(e)}ms`}function lI(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function sI(e){const t=Rt({},oI,e.easing),n=Rt({},iI,e.duration);return Rt({getAutoHeightDuration:lI,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;return Ot(r,rI),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:aI(o)} ${i} ${"string"==typeof a?a:aI(a)}`)).join(",")}},e,{easing:t,duration:n})}var uI={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const cI=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function dI(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=Ot(e,cI);if(e.vars)throw new Error(lr(18));const l=KL(r),s=HA(e);let u=ea(s,{mixins:(c=s.breakpoints,d=n,Rt({toolbar:{minHeight:56,[c.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[c.up("sm")]:{minHeight:64}}},d)),palette:l,shadows:nI.slice(),typography:eI(l,i),transitions:sI(o),zIndex:Rt({},uI)});var c,d;return u=ea(u,a),u=t.reduce(((e,t)=>ea(e,t)),u),u.unstable_sxConfig=Rt({},FA,null==a?void 0:a.unstable_sxConfig),u.unstable_sx=function(e){return BA({sx:e,theme:this})},u}var pI=dI();function fI(){const e=YA(pI);return e[jR]||e}var hI,mI={},gI={exports:{}};var yI,bI={exports:{}};var vI=r(Qi),xI=r(na),wI=r(Ma),SI=r(ka),EI=r(VA),CI=r(QA),kI=gL;Object.defineProperty(mI,"__esModule",{value:!0});var _I=mI.default=function(e={}){const{themeId:t,defaultTheme:n=FI,rootShouldForwardProp:r=qI,slotShouldForwardProp:o=qI}=e,i=e=>(0,DI.default)((0,MI.default)({},e,{theme:jI((0,MI.default)({},e,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(e,a={})=>{(0,AI.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:l,slot:s,skipVariantsResolver:u,skipSx:c,overridesResolver:d=BI(zI(s))}=a,p=(0,RI.default)(a,OI),f=void 0!==u?u:s&&"Root"!==s&&"root"!==s||!1,h=c||!1;let m=qI;"Root"===s||"root"===s?m=r:s?m=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const g=(0,AI.default)(e,(0,MI.default)({shouldForwardProp:m,label:undefined},p)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,LI.isPlainObject)(e)?r=>$I(e,(0,MI.default)({},r,{theme:jI({theme:r.theme,defaultTheme:n,themeId:t})})):e,b=(r,...o)=>{let a=y(r);const s=o?o.map(y):[];l&&d&&s.push((e=>{const r=jI((0,MI.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[l]||!r.components[l].styleOverrides)return null;const o=r.components[l].styleOverrides,i={};return Object.entries(o).forEach((([t,n])=>{i[t]=$I(n,(0,MI.default)({},e,{theme:r}))})),d(e,i)})),l&&!f&&s.push((e=>{var r;const o=jI((0,MI.default)({},e,{defaultTheme:n,themeId:t}));return $I({variants:null==o||null==(r=o.components)||null==(r=r[l])?void 0:r.variants},(0,MI.default)({},e,{theme:o}))})),h||s.push(i);const u=s.length-o.length;if(Array.isArray(r)&&u>0){const e=new Array(u).fill("");a=[...r,...e],a.raw=[...r.raw,...e]}const c=g(a,...s);return e.muiName&&(c.muiName=e.muiName),c};return g.withConfig&&(b.withConfig=g.withConfig),b}};mI.shouldForwardProp=qI,mI.systemDefaultTheme=void 0;var MI=kI((hI||(hI=1,function(e){function t(){return e.exports=t=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},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(gI)),gI.exports)),RI=kI((yI||(yI=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(bI)),bI.exports)),AI=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=NI(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(vI),LI=xI;kI(wI),kI(SI);var II=kI(EI),DI=kI(CI);const PI=["ownerState"],TI=["variants"],OI=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function NI(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(NI=function(e){return e?n:t})(e)}function qI(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const FI=mI.systemDefaultTheme=(0,II.default)(),zI=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function jI({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function BI(e){return e?(t,n)=>n[e]:null}function $I(e,t){let{ownerState:n}=t,r=(0,RI.default)(t,PI);const o="function"==typeof e?e((0,MI.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>$I(e,(0,MI.default)({ownerState:n},r))));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,RI.default)(o,TI);return e.forEach((e=>{let o=!0;"function"==typeof e.props?o=e.props((0,MI.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,MI.default)({ownerState:n},r,n)):e.style))})),t}return o}var WI=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e;var HI=_I({themeId:jR,defaultTheme:pI,rootShouldForwardProp:WI});const VI=["theme"];function GI(e){let{theme:t}=e,n=Ot(e,VI);const r=t[jR];return Ms.jsx(fL,Rt({},n,{themeId:r?jR:void 0,theme:r||t}))}var UI=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};const YI={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},KI={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},XI=Ku("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",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":{...YI},"&::-moz-range-track":{...YI},"&::-ms-track":{...YI},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...KI},"&::-moz-range-thumb":{...KI},"&::-ms-thumb":{...KI},"&: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"}}))),QI=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:l,setIsAdjustingWidth:s,isLeftColumn:u,accessibilityRelatedArgs:c})=>{const d=NR({translator:c.translator}),p=Sn.useRef({initWidth:e,columnWidth:e,initX:0}),f=n?0:1,h=r&&!u,m={left:h?p.current.columnWidth-f:"100%"},g=t=>{p.current={initWidth:e,columnWidth:e,initX:null!=t?t:p.current.initX}};TR((()=>h&&g()),[e]);const y=e=>{const t=Math.max(e,ft.PixelsMin);p.current.columnWidth=t,i(t)},b=()=>{if(p.current.columnWidth!==p.current.initWidth){const e={type:ht.Pixels,pixels:p.current.columnWidth};a(e)}else null==s||s(!1)},v=e=>{const t=p.current.initWidth+e.clientX-p.current.initX;y(t)},x=e=>{zM(e),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",x),b()},w=e=>{const t=p.current.initWidth+e.touches[0].clientX-p.current.initX;y(t)},S=e=>{zM(e),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",S),b()},E=!r&&l?e=>{if(e.key===dt.Left||e.key===dt.Right){zM(e);const t=5,n=e.key===dt.Left?-t:t;y(p.current.columnWidth+n)}else e.key===dt.Space||e.key===dt.Enter?(zM(e),l(e),b()):e.key===dt.Esc&&(zM(e),l(e),y(p.current.initWidth))}:void 0,C=d.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return En.createElement(XI,{style:m,key:t,hoverColor:o,isLastColumn:n,className:pt,"data-testid":pt,onMouseDown:e=>{e.stopPropagation(),document.addEventListener("mousemove",v),document.addEventListener("mouseup",x),null==s||s(!0),g(e.clientX)},onDoubleClick:()=>a({type:ht.FitToContent}),onTouchStart:e=>{1===e.touches.length&&(e.stopPropagation(),document.addEventListener("touchmove",w),document.addEventListener("touchend",S),null==s||s(!0),g(e.touches[0].clientX))},onKeyDown:E,onBlur:l,onFocus:()=>g(),type:"range",tabIndex:"-1",max:ft.PixelsMax,"aria-label":C,"aria-valuemin":ft.PixelsMin,"aria-valuemax":ft.PixelsMax,"aria-valuenow":Number(e.toFixed(1))})};function JI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ZI=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){JI(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})),eD=Sn.forwardRef(ZI);function tD(){return tD=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},tD.apply(null,arguments)}const nD=Ku(_E,{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"}))),rD=Ku(eD,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),oD=Ku(lk)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),iD=Ku(XE)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),aD=Ku(fk)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),lD=Ku(fk,{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")}))),sD=Ku("div")((({theme:e})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),uD=Ku("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),cD=Ku(MS)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px"}))),dD=Ku(IC)((({theme:e})=>({width:16,minWidth:"unset !important",marginRight:e.spacing(1.5),lineHeight:0})));function pD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})),hD=Sn.forwardRef(fD);let mD={};const gD=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:l,isActive:s,handleHeadCellMenuKeyDown:u})=>{const[c,d]=Sn.useState(!1),p=Sn.useRef(null),f=Sn.useCallback((e=>{e.stopPropagation(),d(!1)}),[d]);return En.createElement(En.Fragment,null,En.createElement(lD,{ref:a?p: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),mD={}),null!=a&&a.length&&(d(!0),mD[r]=d))},disabled:!i,autoFocus:e,isSubMenu:!!l,isActive:!!s,onKeyDown:u},s&&En.createElement(sD,null),En.createElement(uD,null,En.createElement(dD,null,En.createElement(o,null)),En.createElement(cD,{variant:"body2"},r)),null!=a&&a.length?En.createElement(hD,null):null),(null==a?void 0:a.length)&&En.createElement(vD,{isSubMenu:!0,open:c,anchorEl:p.current,onClose:f,menuGroups:(h=a,m=mD,h.map((e=>e.map((e=>{var t;return{...e.groupHeading?{groupHeading:e.groupHeading}:{},items:null===(t=e.items)||void 0===t?void 0:t.map((({onClick:e,...t})=>({...t,...e?{onClick:async t=>{Object.entries(m).map((([,e])=>e(!1))),await e(t)}}:{}})))}}))))),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},handleHeadCellMenuKeyDown:u}));var h,m},yD=({menuGroup:e,isSubMenu:t,handleHeadCellMenuKeyDown:n})=>e.map((e=>{var r;return[[e.groupHeading&&En.createElement(aD,{key:e.groupHeading,disabled:!0,style:{opacity:1}},e.groupHeading),null===(r=e.items)||void 0===r?void 0:r.map((e=>En.createElement(gD,tD({key:e.id},e,{isSubMenu:t,handleHeadCellMenuKeyDown:n}))))].filter(Boolean)]})),bD={appear:200,enter:200,exit:100},vD=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,handleHeadCellMenuKeyDown:l})=>r.length?En.createElement(oD,tD({className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:bD,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"}},i?{anchorOrigin:i}:{},o?{transformOrigin:o}:{}),(({itemGroups:e,isSubMenu:t,handleHeadCellMenuKeyDown:n})=>e.map(((r,o)=>[yD({menuGroup:r,isSubMenu:t,handleHeadCellMenuKeyDown:n}),o<e.length-1?En.createElement(iD,{"data-testid":"group-divider",variant:"middle",key:"divider"}):void 0])))({itemGroups:r,isSubMenu:a,handleHeadCellMenuKeyDown:l})):null,xD=(e,t)=>e.some((e=>t[e]>0)),wD={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},SD=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=Sn.useState(null),[a,l]=Sn.useState(wD);return TR((()=>{e||(l(wD),i(null))}),[e]),Sn.useEffect((()=>{if(null==r||!r.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const s=()=>{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?s():(i(p),h&&l((e=>({canSelectAll:xD(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:xD(["qSelected"],e),canSelectPossible:xD(["qOption"],e),canSelectAlternative:xD(["qAlternative"],e),canSelectExcluded:xD(["qAlternative","qExcluded"],e)}))(h)))}catch(e){console.error(e)}})(),()=>{a=!0,s()}}),[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}};function ED(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const CD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ED(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),kD=Sn.forwardRef(CD);function _D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const MD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_D(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),RD=Sn.forwardRef(MD);function AD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const LD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){AD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),ID=Sn.forwardRef(LD);function DD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const PD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){DD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),TD=Sn.forwardRef(PD);function OD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ND=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){OD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),qD=Sn.forwardRef(ND);function FD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const zD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){FD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),jD=Sn.forwardRef(zD);function BD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const $D=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){BD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),WD=Sn.forwardRef($D);function HD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const VD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){HD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),GD=Sn.forwardRef(VD);function UD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const YD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){UD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),KD=Sn.forwardRef(YD);function XD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const QD=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),JD=Sn.forwardRef(QD);function ZD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const eP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ZD(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),tP=Sn.forwardRef(eP);function nP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),oP=Sn.forwardRef(rP);let iP=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const aP="/qListObjectDef",lP=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:l,selectionActionsEnabledStatus:s,anchorRef:u,setFocusOnColumnAdjuster:c,setActiveFieldCallback:d})=>{const p=[];if(n[iP.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:l}=(({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);p.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:kD,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:TD,enabled:l,isActive:!!n&&"D"===i,autoFocus:!a&&l}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:jD,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:qD,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&p.push(...t)}if(e.isDim&&null!=i&&i.select){const e=[];n[iP.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:WD,enabled:!0}]}]),n[iP.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:oP,enabled:!!l,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectAll(aP))},icon:GD,enabled:s.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectPossible(aP))},icon:tP,enabled:s.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectAlternative(aP))},icon:KD,enabled:s.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.selectListObjectExcluded(aP))},icon:JD,enabled:s.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==l?void 0:l.clearSelections(aP))},icon:RD,enabled:s.canClearSelections}]}]]}]}]),e.length>0&&p.push(...e)}return n[iP.AdjusterHeaderSize]&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),null==c||c(u)},icon:ID,enabled:!0}]}]),p},sP=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,handleHeadCellMenuKeyDown:a,menuAvailabilityFlags:l,shouldShowMenuIcon:s=!0,sortRelatedArgs:u,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,env:f,model:h})=>{var m;const g=NR({translator:o}),{headTextAlign:y,qLibraryId:b,fieldId:v}=r,x=null==d?void 0:d.app,{fieldInstance:w,selectionActionsEnabledStatus:S}=SD({open:e,headerData:r,app:x,qStateName:null==d?void 0:d.qStateName});let E=null;if(f.flags.isEnabled("CLIENT_IM_7107_TABLE_MENU_CYCLIC_DIM")&&h&&"setActiveField"in h&&void 0!==r.dimensionInfoIndex){const e=r.dimensionInfoIndex;E=async t=>{try{await h.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const C=Sn.useCallback((()=>{const e=b?{qLibraryId:b,type:"dimension"}:v;if(null!=c&&c.embed&&c.listboxRef){const{embed:t,listboxRef:n}=c;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sortCriteria:c.sortCriteria,stateName:null==d?void 0:d.qStateName})}}),[b,v,c,null==d?void 0:d.qStateName]),k=Sn.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]);return i.active?En.createElement(nD,{rightAligned:"right"===y,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper"},s&&En.createElement(rD,{height:st,className:ut,"data-testid":ut,isInteractionsActive:null!==(m=i.active)&&void 0!==m&&m},En.createElement(eD,null)),En.createElement(vD,{open:e,anchorEl:n.current,onClose:k,menuGroups:lP({headerData:r,translator:g,menuAvailabilityFlags:l,setOpen:t,...u,embedListbox:C,interactions:i,fieldInstance:w,selectionActionsEnabledStatus:S,anchorRef:n,setFocusOnColumnAdjuster:null==p?void 0:p.setFocusOnColumnAdjuster,setActiveFieldCallback:E}),handleHeadCellMenuKeyDown:a})):null},uP=e=>e.isDark?{background:e.color,borderColor:o_.DARK_MODE_BORDER,color:o_.DARK_MODE_TEXT,disabledColor:o_.DARK_MODE_DISABLED,iconColor:o_.DARK_MODE_TEXT}:{background:e.color,borderColor:o_.BORDER_MEDIUM,color:o_.TEXT,disabledColor:o_.DISABLED},cP=Ku(_E,{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}`}))),dP=Ku(Qk,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),pP=Ku(qE,{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)}))),fP=Ku(MS)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),hP=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=Sn.useMemo((()=>uP(r.background)),[r]);if(!n.active)return null;const a=o?En.createElement(cP,{footerStyle:i},e):null;return t?_w.createPortal(e,t):a},mP={},gP=Sn.createContext(mP),yP=()=>Sn.useContext(gP),bP=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:l,totalColumnCount:s,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=Sn.useMemo((()=>uP(p.background)),[p]),b=o?o.getBoundingClientRect().width:h.width,v=NR({translator:d}),x=Sn.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:l,totalColumnCount:s,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,l,s,u,c,v,p,f,h,m,y,g,b]);return En.createElement(gP.Provider,{value:x},e)};let vP=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),xP=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}({});function wP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const SP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){wP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),EP=Sn.forwardRef(SP);function CP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){CP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})),_P=Sn.forwardRef(kP);function MP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const RP=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){MP(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})),AP=Sn.forwardRef(RP),LP={FirstPage:_P,PreviousPage:EP,NextPage:hD,LastPage:AP,FirstPageRTL:AP,PreviousPageRTL:hD,NextPageRTL:EP,LastPageRTL:_P},IP=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:o,handleChangePage:i,translator:a,interactions:l,tabIndex:s}=yP(),u=LP[`${n}${"rtl"===r?"RTL":""}`];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:l.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?null:()=>i(t)},IconComponent:u}},DP=()=>{const{pageInfo:e,width:t}=yP(),n=0===e.page,{IconComponent:r,styledProps:o}=IP({type:vP.FirstPage,disabledCondition:n,pageNumber:0});return t<=xP.FirstPage?null:En.createElement(pP,o,En.createElement(r,{height:st}))},PP=(e,t,n=!1)=>{n&&e.key===dt.Tab&&!e.shiftKey&&(zM(e),((e,t,n)=>{var r,o,i,a;const l=null!==(r=null===(o=e.closest(".qv-object-wrapper"))||void 0===o||null===(o=o.querySelector(".sel-toolbar-confirm"))||void 0===o?void 0:o.parentElement)&&void 0!==r?r:null===(i=document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm"))||void 0===i?void 0:i.parentElement;l?l.focus():null===(a=t.focusSelection)||void 0===a||a.call(t,n)})(e.target,t,!1))},TP=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=yP(),i=e.page>=n-1,{IconComponent:a,styledProps:l}=IP({type:vP.LastPage,disabledCondition:i,pageNumber:n-1}),s=t.enabled?e=>PP(e,t,r):null;return o<=xP.LastPage?null:En.createElement(pP,tD({},l,{onKeyDown:s}),En.createElement(a,{height:st}))},OP=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o}=yP(),i=e.page>=n-1,{IconComponent:a,styledProps:l}=IP({type:vP.NextPage,disabledCondition:i,pageNumber:e.page+1}),s=!(o>xP.FirstPage&&o>xP.LastPage)&&t.enabled?e=>PP(e,t,r):null;return En.createElement(pP,tD({},l,{onKeyDown:s}),En.createElement(a,{height:st}))},NP=()=>{const{pageInfo:e}=yP(),t=0===e.page,{IconComponent:n,styledProps:r}=IP({type:vP.PreviousPage,disabledCondition:t,pageNumber:e.page-1});return En.createElement(pP,r,En.createElement(n,{height:st}))},qP=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r}=yP(),{page:o,rowsPerPage:i}=n;if(t<=xP.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,r)}`,r.toString()]);return En.createElement(fP,{variant:"caption"},a)},FP=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:l}=yP(),s=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),c=`${e}-dropdown`,d=`${c}-label-${s}`,p={tabIndex:l,id:`${c}-${s}`,"data-testid":c,"aria-labelledby":d};return En.createElement(En.Fragment,null,En.createElement(fP,{variant:"caption",id:d},u,":"),En.createElement(dP,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:p},n))},zP=()=>{var e;const{pageInfo:t,isSelectionMode:n,totalColumnCount:r,width:o,handleChangeRowsPerPage:i}=yP();if(!(!(null===(e=t.rowsPerPageOptions)||void 0===e||!e.length)&&!n&&o>xP.RowsPerPage&&r<=100)||void 0===t.rowsPerPageOptions)return null;const a=En.createElement(En.Fragment,null,t.rowsPerPageOptions.map((e=>En.createElement("option",{key:e,value:e},e))));return En.createElement(FP,{name:"RowsPerPage",value:t.rowsPerPage,options:a,handleChange:e=>{null==i||i(+e.target.value)}})},jP=1e3,BP="…",$P=({totalPages:e,page:t})=>{const n=Math.min(e,jP),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-jP):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+i;return En.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(En.createElement("option",{key:"startMoreOptions",value:BP,disabled:!0},BP)),o<e-1&&a.push(En.createElement("option",{key:"endMoreOptions",value:BP,disabled:!0},BP)),En.createElement(En.Fragment,null,a)},WP=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r}=yP(),{page:o}=e;if(t<=xP.SelectPage)return null;const i=En.createElement($P,{totalPages:n,page:o});return En.createElement(FP,{name:"SelectPage",value:o,options:i,handleChange:e=>r(+e.target.value)})},HP=e=>En.createElement(bP,e,En.createElement(zP,null),En.createElement(WP,null),En.createElement(qP,null),En.createElement(DP,null),En.createElement(NP,null),En.createElement(OP,null),En.createElement(TP,null));var VP=Sn.memo(HP);const GP=e=>En.createElement(hP,e,En.createElement(VP,e)),UP={},YP=Sn.createContext(UP),KP=()=>Sn.useContext(YP),XP=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,children:o})=>{const i=Sn.useMemo((()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r})),[e,t,n,r]);return Ms.jsx(YP.Provider,{value:i,children:o})},QP=Sn.createContext({}),JP=()=>Sn.useContext(QP),ZP=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:l,children:s})=>{const u=Sn.useMemo((()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:l,translator:i})),[e,a,t,r,n,o,l,i]);return Ms.jsx(QP.Provider,{value:u,children:s})},eT=Sn.createContext({}),tT=()=>Sn.useContext(eT),nT=({children:e,...t})=>Ms.jsx(eT.Provider,{value:t,children:e}),rT=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{var e;const{theme:t,translator:n}=JP(),{layoutService:r}=tT(),o=null!==(e=t.getStyle("","","fontFamily"))&&void 0!==e?e:KM;return r.hasData?r.hasLimitedData?{text:n.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:o,alignItems:"center",height:"22px"}:{}:{text:n.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:o,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Ms.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:Ms.jsx("span",{style:{...oR,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},oT="/qHyperCubeDef",iT=-1,aT="PSEUDO-DIM",lT=[];for(let e=0;e<256;++e)lT.push((e+256).toString(16).slice(1));let sT;const uT=new Uint8Array(16);function cT(){if(!sT){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sT=crypto.getRandomValues.bind(crypto)}return sT(uT)}var dT={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pT(e,t,n){if(dT.randomUUID&&!t&&!e)return dT.randomUUID();const r=(e=e||{}).random||(e.rng||cT)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(lT[e[t+0]]+lT[e[t+1]]+lT[e[t+2]]+lT[e[t+3]]+"-"+lT[e[t+4]]+lT[e[t+5]]+"-"+lT[e[t+6]]+lT[e[t+7]]+"-"+lT[e[t+8]]+lT[e[t+9]]+"-"+lT[e[t+10]]+lT[e[t+11]]+lT[e[t+12]]+lT[e[t+13]]+lT[e[t+14]]+lT[e[t+15]]).toLowerCase()}(r)}const fT=()=>{var e,t,n;return null!==(e=null===(t=crypto)||void 0===t||null===(n=t.randomUUID)||void 0===n?void 0:n.call(t))&&void 0!==e?e:pT()},hT=e=>e===iT?aT:(({qLibraryId:e,cId:t})=>{var n;return null!==(n=null!=e?e:t)&&void 0!==n?n:fT()})(e),mT=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===iT?n.columnWidthLocation=ot.Measures:n.isLeftDimension?n.columnWidthLocation=ot.Dimension:t.at(-1)===iT?n.columnWidthLocation=ot.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=ot.Pivot))},gT=(e,t,n)=>{var r;const o=hT(t),i=e.getDimensionInfoIndex(t),a=e.isLeftDimension(i);return t===iT?{id:o,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:n,columnWidthLocation:ot.Measures,isPivot:!0}:{id:o,colIdx:0,label:t.qFallbackTitle,qReverseSort:t.qReverseSort,sortDirection:t.qSortIndicator&&"N"!==t.qSortIndicator?t.qSortIndicator:"A",qLibraryId:t.qLibraryId,fieldId:t.qGroupFieldDefs[t.qGroupPos],isLocked:null!==(r=t.qLocked)&&void 0!==r&&r,columnWidth:t.columnWidth,qApprMaxGlyphCount:t.qApprMaxGlyphCount,isDim:!0,isCyclic:t.qGrouping===yt.Cyclic,groupDimensionPos:t.qGroupPos,groupDimensionLabels:t.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:n,columnWidthLocation:ot.Dimension,isPivot:!0,isSortedByFirstMeasure:e.isSortedByFirstMeasure}},yT=({layoutService:e,lastRow:t,lastCol:n})=>{let r=n;var o;t.length>0&&(r=(o=n).at(-1)===iT?o.slice(0,-1):o);const i=r.length+(t.length?1:0),a=Math.max(1,t.length),l=((e,t)=>Array(e).fill(null).map((()=>Array.from({length:t},(()=>null)))))(i,a);return t.forEach(((t,n,r)=>{const o=n===r.length-1;l[i-1][n]=gT(e,t,o)})),r.forEach(((t,n,r)=>{const o=n===r.length-1;l[n][a-1]=gT(e,t,o)})),l},bT=(e,t,n)=>{var r,o;const i=((e,t,n)=>{let r;var o;return r=0===t.length||t.includes(iT)?yT({layoutService:e,lastRow:n,lastCol:t}):(e=>e[0].map(((t,n)=>e.map((e=>e[n])))))(yT({layoutService:e,lastRow:t,lastCol:n})),e.isIndentModeEnabled&&r[r.length-1].length>1&&(r[r.length-1]=[r.at(-1),...new Array(r[0]?r[0].length-1:0).fill(null)]),r.length&&(null===(o=r.at(-1))||void 0===o||o.forEach(((t,r)=>{if(Array.isArray(t)){const r=t;for(let t=0;t<r.length;t++)mT({layoutService:e,visibleLeftDimensionInfos:n,cell:r[t],colIdx:t})}else mT({layoutService:e,visibleLeftDimensionInfos:n,cell:t,colIdx:r})}))),r})(e,t,n);return{data:i,size:{x:null!==(r=null===(o=i[0])||void 0===o?void 0:o.length)&&void 0!==r?r:0,y:i.length}}};function vT(e){return vT="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},vT(e)}function xT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"==typeof i?i:String(i)),r)}var o,i}function ST(e,t,n){return t&&wT(e.prototype,t),n&&wT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ET(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kT(e,t)}function CT(e){return CT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CT(e)}function kT(e,t){return kT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kT(e,t)}function _T(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function MT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CT(e);if(t){var o=CT(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _T(this,n)}}function RT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return AT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AT(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var LT={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),o="",i=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),i=!0),t.push(function(e,t,n){return{key:IT(e),value:IT(t),useEqualSign:n}}(n,o,i))}})),t}};function IT(e){try{return decodeURIComponent(e)}catch(t){return e}}function DT(e){if(!(this instanceof DT))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return LT.fromSearchString(t.search)}}})}function PT(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}DT.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},DT.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=PT((t=e[r]).key),t.value?n+="=".concat(PT(t.value)):n+=t.useEqualSign?"=":"";return n};var TT,OT=function(){function e(t){xT(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}return ST(e,[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}]),e}(),NT=function(){function e(){xT(this,e)}return ST(e,[{key:"decode",value:function(e){for(var t,n="",r=new OT(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}]),e}(),qT=function(e){return e>=0&&e<=1114111},FT=function(e){return e.match(/[\s]/)},zT=function(e){ET(n,e);var t=MT(n);function n(){return xT(this,n),t.apply(this,arguments)}return ST(n,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(t=i,n=0;n<5&&(null!=(r=e.next())&&!FT(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var a=parseInt(t,16);return qT(a)?String.fromCharCode(a):"�"}}]),n}(NT),jT=function(){function e(t,n){xT(this,e),this._key=t,this._value=n}return ST(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}]),e}(),BT=function(){function e(){xT(this,e)}return ST(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var o,i;if(t.length===n)return i=this._value,this.setValue(r),i;var a=t.charAt(n);return this._nextMap?(o=this._nextMap[a])||(o=new e,this._nextMap[a]=o):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return jT.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return jT.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||jT.newInstanceIfNeeded(e,t,this._value)}}]),e}(),$T=function(){function e(){xT(this,e),this.clear()}return ST(e,[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new BT);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}]),e}(),WT=function(){var e,t,n,r=[],o=[],i=new $T;for(e in r["&quot"]="34",r["&amp"]="38",r["&lt"]="60",r["&gt"]="62",r["&nbsp"]="160",r["&iexcl"]="161",r["&cent"]="162",r["&pound"]="163",r["&curren"]="164",r["&yen"]="165",r["&brvbar"]="166",r["&sect"]="167",r["&uml"]="168",r["&copy"]="169",r["&ordf"]="170",r["&laquo"]="171",r["&not"]="172",r["&shy"]="173",r["&reg"]="174",r["&macr"]="175",r["&deg"]="176",r["&plusmn"]="177",r["&sup2"]="178",r["&sup3"]="179",r["&acute"]="180",r["&micro"]="181",r["&para"]="182",r["&middot"]="183",r["&cedil"]="184",r["&sup1"]="185",r["&ordm"]="186",r["&raquo"]="187",r["&frac14"]="188",r["&frac12"]="189",r["&frac34"]="190",r["&iquest"]="191",r["&Agrave"]="192",r["&Aacute"]="193",r["&Acirc"]="194",r["&Atilde"]="195",r["&Auml"]="196",r["&Aring"]="197",r["&AElig"]="198",r["&Ccedil"]="199",r["&Egrave"]="200",r["&Eacute"]="201",r["&Ecirc"]="202",r["&Euml"]="203",r["&Igrave"]="204",r["&Iacute"]="205",r["&Icirc"]="206",r["&Iuml"]="207",r["&ETH"]="208",r["&Ntilde"]="209",r["&Ograve"]="210",r["&Oacute"]="211",r["&Ocirc"]="212",r["&Otilde"]="213",r["&Ouml"]="214",r["&times"]="215",r["&Oslash"]="216",r["&Ugrave"]="217",r["&Uacute"]="218",r["&Ucirc"]="219",r["&Uuml"]="220",r["&Yacute"]="221",r["&THORN"]="222",r["&szlig"]="223",r["&agrave"]="224",r["&aacute"]="225",r["&acirc"]="226",r["&atilde"]="227",r["&auml"]="228",r["&aring"]="229",r["&aelig"]="230",r["&ccedil"]="231",r["&egrave"]="232",r["&eacute"]="233",r["&ecirc"]="234",r["&euml"]="235",r["&igrave"]="236",r["&iacute"]="237",r["&icirc"]="238",r["&iuml"]="239",r["&eth"]="240",r["&ntilde"]="241",r["&ograve"]="242",r["&oacute"]="243",r["&ocirc"]="244",r["&otilde"]="245",r["&ouml"]="246",r["&divide"]="247",r["&oslash"]="248",r["&ugrave"]="249",r["&uacute"]="250",r["&ucirc"]="251",r["&uuml"]="252",r["&yacute"]="253",r["&thorn"]="254",r["&yuml"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["&notin"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(o[r[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(n=o[t].toLowerCase().substr(1),i.put(n,String.fromCharCode(t)));return i}(),HT=function(e){ET(n,e);var t=MT(n);function n(){return xT(this,n),t.apply(this,arguments)}return ST(n,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,o="";for(t=Math.min(e.remainder().length,WT.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();var i=WT.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&qT(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&qT(r)?String.fromCharCode(r):null}}]),n}(NT),VT=function(e){ET(n,e);var t=MT(n);function n(){return xT(this,n),t.apply(this,arguments)}return ST(n,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o,i=e.next();if(null==i)return e.reset(),null;if("%"!==i)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(o=parseInt(t,16),qT(o))?String.fromCharCode(o):(e.reset(),null)}}]),n}(NT),GT=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(TT=document.createElement("div"));var UT=Array.prototype.indexOf,YT=[",",".","_"," "],KT=[",",".","-","_"," "],XT={width:["%"],height:["%"]},QT={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},JT={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":QT.image,"background-color":QT.color,"border-color":QT.color,"border-image":QT.image,color:QT.color,icon:QT.image,"list-style-image":QT.image,"outline-color":QT.color},ZT={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function eO(e,t,n){var r;if(t){if(UT)return UT.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function tO(e){if(null==e)return"";var t,n=document.createTextNode(e);return TT.appendChild(n),t=TT.innerHTML,TT.removeChild(n),t}function nO(e,t,n){var r,o,i,a,l,s,u,c,d;if(e=oO(e).toLowerCase(),t=oO(t),eO(e,ZT.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(i=0;i<ZT.attr_val;i++)if(t.toLowerCase().match(ZT.attr_val[i]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=XT[e])||(r=KT),o="",!n){for(a=0;a<e.length;a++){if(!(l=e.charAt(a)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=l}o+='="'}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&eO(u,r)<0?(d=c.toString(16),o+="&#x".concat(d,";")):o+=u;return n||(o+='"'),o}function rO(e,t,n){var r,o,i,a,l,s,u,c,d,p;if(e=oO(e).toLowerCase(),t=oO(t),eO(e,ZT.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<ZT.css_val.length;r++)if(t.toLowerCase().indexOf(ZT.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=JT[e])||(o=QT.default),i="",!n){for(a=0;a<e.length;a++){if(!(l=e.charAt(a)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=l}i+=": "}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&eO(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+="\\".concat(p).concat(d)):i+=u;return i}function oO(e,t){var n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;for(var l=[new HT,new VT,new zT];!a;){r=n;for(var s=0;s<l.length;s++)(i=l[s].decode(n))!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var iO=[],aO=0;aO<255;aO++)iO[aO]=aO>=48&&aO<=57||aO>=65&&aO<=90||aO>=97&&aO<=122?null:aO.toString(16);var lO=function(e){return tO(e.unsafe)},sO=function(e){var t,n=[],r=[],o={},i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=rO(t,n[t],!0),i+=rO(t,n[t],!0),o[t]=r[t]);return e.map?o:i},uO=function(e){var t=[],n=[],r={},o="";for(var i in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(n[i]=nO(i,t[i],!0),o+=nO(i,t[i],!0),r[i]=n[i]);return e.map?r:o};function cO(e,t){throw new Error(t)}var dO={canonicalize:oO,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===vT(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},o=1,i=arguments.length;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?lO(e):"css"===e.context?(null!=e.map&&"object"!==vT(e.map)&&cO(this,"Invalid parameter type"),sO(e)):"attr"===e.context?(null!=e.map&&"object"!==vT(e.map)&&cO(this,"Invalid parameter type"),uO(e)):void cO(this,"Invalid parameter type")},encodeForAttr:nO,encodeForAttr2:function(e){return nO("nonsens",e,!0)},encodeForCSS:rO,encodeForHref:function(e){oO(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new DT(e),n=DT.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,o=(e=n+DT.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,o,i,a,l;for(t||(t=YT),l="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),eO(o,t)>=0||null==iO[i]?l+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),l+="\\x".concat(a).concat(r.toUpperCase())):(a="0000".substr(r.length),l+="\\u".concat(a).concat(r.toUpperCase())));return l},encodeForHTML:tO,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=oO(t).toLowerCase():cO(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,o=void 0===r?5e5:r,i=n.maxByteSizeImage,a=void 0===i?5e6:i,l=function(e){var t,n=RT(null!==(t=GT.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),s=l.mimeType,u=l.encoding,c=l.data;if(!c)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(s,u,c);return"image/svg+xml"===s?d<=o:d<=a}};const pO=(e,t)=>{var n;const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps;return null==r||null===(n=r.qValues)||void 0===n?void 0:n[e]},fO=e=>{switch(e){case"topLeft":default:return{horizontal:"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"flex-end",vertical:"center"};case"topRight":return{horizontal:"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"flex-end",vertical:"flex-end"}}},hO=({text:e,url:t,imageSize:n,imagePosition:r})=>r&&t&&!t.toLowerCase().includes("javascript:")&&dO.isSafeDataURL(t)?{type:Ke.Image,url:t,text:e,imageSize:n,resolvedImagePosition:fO(r)}:{type:Ke.Text,url:void 0,text:e},mO=(e,t,n)=>{if(!e.qMiniChart||null==t||!t.miniChart||!n)return{type:Ke.Text,text:e.qText};const{minY:r,maxY:o}=((e,t,n)=>{var r,o;const i="global"===(null===(r=t.yAxis)||void 0===r?void 0:r.scale),a="zeroCenter"===(null===(o=t.yAxis)||void 0===o?void 0:o.position),l=i?n.qYMin:e.qMiniChart.qMin,s=i?n.qYMax:e.qMiniChart.qMax;if(a){const e=Math.max(Math.abs(l),Math.abs(s));return{minY:-e,maxY:e}}return(e=>{var t,n;return"zeroBaseline"===(null===(t=e.yAxis)||void 0===t?void 0:t.position)||"bars"===e.type&&"auto"===(null===(n=e.yAxis)||void 0===n?void 0:n.position)})(t)?{minY:Math.min(0,l),maxY:Math.max(0,s)}:{minY:l,maxY:s}})(e,t.miniChart,n),i={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:r,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:Ke.MiniChart,text:e.qText,miniChart:i}},gO=(e,t,n)=>{var r;const o=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=null==o||null===(r=o.qValues)||void 0===r?void 0:r[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return(null==n?void 0:n.urlPosition)===Xe.Attribute||null==n?void 0:n.urlLabel},yO=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:Ke.Link,url:dO.encodeForHref(n),text:t,labelStructure:e}}catch(n){return{type:Ke.Text,url:void 0,text:t,labelStructure:e}}},bO=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a})=>{var l,s,u,c,d,p;const f=Qe(t);return f!==Ke.Image||!r.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")||null!==(l=r.anything.sense)&&void 0!==l&&null!==(s=l.isUnsupportedFeature)&&void 0!==s&&s.call(l,"tableImages")?f===Ke.Link?((e,t,n,r)=>{const{urlPosition:o}=null!=t?t:{};if(o===Xe.Attribute){var i;const o=gO(null!==(i=n.url)&&void 0!==i?i:-1,e,t),a=e.qText||o||"";return yO({labelStructure:r,text:a,url:o})}if(o===Xe.Dimension){var a,l;const o=gO(null!==(a=n.urlLabel)&&void 0!==a?a:-1,e,t)||e.qText;return r&&(r.maskedValue=o),yO({text:o,labelStructure:r,url:null!==(l=null==r?void 0:r.originalValue)&&void 0!==l?l:e.qText})}return{type:Ke.Text,url:void 0,text:e.qText,labelStructure:r}})(e,t,n,a):f!==Ke.Indicator||!r.flags.isEnabled("CLIENT_IM_6696_INDICATORS")||null!==(u=r.anything.sense)&&void 0!==u&&null!==(c=u.isUnsupportedFeature)&&void 0!==c&&c.call(u,"tableIndicators")?f!==Ke.MiniChart||!r.flags.isEnabled("CLIENT_IM_7110_TABLE_MINI_CHART")||null!==(d=r.anything.sense)&&void 0!==d&&null!==(p=d.isUnsupportedFeature)&&void 0!==p&&p.call(d,"qMiniChartDef")?{type:Ke.Text,url:void 0,text:e.qText,labelStructure:a}:mO(e,t,i):((e,t,n)=>{const{indicator:r}=null!=t?t:{};return{type:Ke.Indicator,url:void 0,text:e.qText,indicator:{applySegmentColors:null==r?void 0:r.applySegmentColors,position:null==r?void 0:r.position,showTextValues:null==r?void 0:r.showTextValues},indicatorConditionalColoring:n}})(e,t,o):((e,t,n)=>{const{imageSize:r,imagePosition:o,imageSetting:i,imageLabel:a}=null!=t?t:{};if("url"===i){var l,s;const t=e.qText,i=null===(l=pO(null!==(s=n.imageUrl)&&void 0!==s?s:-1,e))||void 0===l?void 0:l.qText;return hO({text:t,url:i,imageSize:r,imagePosition:o})}if("label"===i){var u,c,d;const t=e.qText;if(-1===n.imageLabel)return hO({text:a||t||"",url:t,imageSize:r,imagePosition:o});const i=null!==(u=null===(c=pO(null!==(d=n.imageLabel)&&void 0!==d?d:-1,e))||void 0===c?void 0:c.qText)&&void 0!==u?u:e.qText;return hO({text:i,url:t,imageSize:r,imagePosition:o})}return{type:Ke.Text,url:void 0,text:e.qText}})(e,t,n)},vO=(e,t)=>{var n,r,o,i;const a=t.qAttrExps,l=null==a||null===(n=a.qValues)||void 0===n||null===(n=n[null!==(r=null==e?void 0:e.cellForegroundColor)&&void 0!==r?r:-1])||void 0===n?void 0:n.qText,s=null==a||null===(o=a.qValues)||void 0===o||null===(o=o[null!==(i=null==e?void 0:e.cellBackgroundColor)&&void 0!==i?i:-1])||void 0===o?void 0:o.qText,u=s?FM(s):null,c=l?FM(l):null,d=((e,t)=>e||!t?null:PM(t))(c,u);return{color:null!=d?d:c,background:u}},xO=(e,t)=>t.qSubNodes.reduce(((e,t)=>0===t.qSubNodes.length?e+1:xO(e,t)),e),wO=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:QM-r;let l=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;l=e.qDown+n}return Math.min(a,xO(l,e))},SO=(e,t,n)=>{if(e!==iT){if(t){const t=Qe(e.representation)===Ke.Link;return null!=n&&n.isLinksSupported&&t?e.representation:{type:Ke.Text}}return e.representation}},EO=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:l,attrExprInfoIndex:s,isLeftColumn:u=!0,isIndentModeEnabled:c=!1,indentModeFeatures:d,indentLevel:p,labelStructure:f,env:h,pageInfo:m})=>{const g=(!c||!u)&&"P"===e.qType;let y=e.qText;if(u&&c&&f){const{originalValue:e,delimeter:t,suffix:n}=f;y=`${e} ${!n||!e&&n?"":t} ${n}`.trim()}const b={id:fT(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:u?i:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:wO(e,o,i,r,u,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof l||!l.qLocked),isTotal:"T"===e.qType||!(null==t||!t.isTotal),isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:vO(s,e),selectionCellType:u?bt.Left:bt.Top,dimensionInfoIndex:a.getDimensionInfoIndex(l),canBeResized:0===e.qSubNodes.length&&!u,visibleMeasureInfoIndex:g?e.qElemNo:null==t?void 0:t.visibleMeasureInfoIndex,representation:bO({cell:{...e,qText:y},representationProperties:SO(l,c,d),attrExprInfoIndex:s,env:h,labelStructure:f}),...void 0!==p&&{indentLevel:p}};return t&&(t.children[b.mainAxisPageCoord-t.mainAxisPageCoord]=b),b},CO=(e,t,n,r,o,i,a,l)=>{const{isIndentModeEnabled:s,indentModeFeatures:u}=o;if(!t.length)return e;let c=0;return function t(d,p,f,h=0,m=-1){e[h]||(e[h]={}),s&&m++;const g=o.leftDimensionInfoIndexes.indexOf(iT);f.forEach(((f,y)=>{var b,v;const x={originalValue:null!==(b=f.qText)&&void 0!==b?b:"",maskedValue:"",delimeter:"-",suffix:""};c+=0===y?0:1;const w=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,w+c-f.qUp),E=n.qTop+c-f.qUp;var C,k;if(s&&(o.hasPseudoDimOnLeft&&m<=g))if(x.originalValue=null!==(C=f.qText)&&void 0!==C?C:"",x.maskedValue=null!==(k=f.qText)&&void 0!==k?k:"","N"===f.qType||"U"===f.qType||"T"===f.qType)m<g&&(x.suffix=`${o.visibleMeasureInfo[0].qFallbackTitle}`);else if("P"===f.qType){var _,M,R,A,L,I,D,P;x.originalValue=null!==(_=null===(M=p||d)||void 0===M||null===(M=M.representation)||void 0===M||null===(M=M.labelStructure)||void 0===M?void 0:M.originalValue)&&void 0!==_?_:"",x.maskedValue=null!==(R=null===(A=p||d)||void 0===A||null===(A=A.representation)||void 0===A||null===(A=A.labelStructure)||void 0===A?void 0:A.originalValue)&&void 0!==R?R:"",x.suffix=null!==(L=f.qText)&&void 0!==L?L:"";const e=f.qSubNodes;f={...null===(I=p||d)||void 0===I?void 0:I.ref,...f.qText?{qText:f.qText}:{},qSubNodes:e},m=null!==(D=null===(P=p||d)||void 0===P?void 0:P.indentLevel)&&void 0!==D?D:0}let T=h;s&&(T=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===f.qSubNodes.length&&(T=0));const O=s&&void 0===(null===(v=e[h][S])||void 0===v?void 0:v.ref.qText)||!e[h][S]?EO({node:f,parent:p,root:d,x:T,y:E,pageY:S,layoutService:o,dimensionInfo:i[T],attrExprInfoIndex:a[T],isLeftColumn:!0,...s&&{isIndentModeEnabled:s,indentModeFeatures:u,indentLevel:m},env:l,pageInfo:r,labelStructure:x}):e[h][S];if(e[h][S]=O,f.qSubNodes.length){const e=s?0:h+1;t(d||O,O,f.qSubNodes,e,m)}}))}(null,null,t,0,-1),e},kO=(e,t)=>{e.slice(0,-1).forEach((e=>{Object.values(e).forEach(((e,n,r)=>{const o=r[n+1];e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)}))}))},_O=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=null!=t&&t.isIndentModeEnabled&&null!=t&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=null==n?void 0:n[o],a=r.at(-1);return null!=i&&i.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:null!=a&&a.isTotal?a.mainAxisPageCoord-1:-1},MO=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a})=>{const{qLeft:l,qArea:s}=t;if(!l.length)return e;const u=CO(e.grid,l,s,n,r,o,i,a);kO(u,n.rowsOnCurrentPage);const c=_O(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:c}},RO=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach(((t,n)=>{t.forEach(((t,i)=>{var a;const l=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[l])||(o[l]=[]);const u="U"===t.qType;o[l][s]=null!==(a=o[l][s])&&void 0!==a?a:{id:fT(),ref:t,isNull:u}}))})),o},AO=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return null!=r&&r.length?RO({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},LO=(e,t,n,r,o,i,a,l,s)=>{const{isIndentModeEnabled:u,indentModeFeatures:c}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach(((f,m)=>{var g;d+=0===m?0:1;const y=n.qLeft+d-f.qUp,b=null!==(g=e[h][y])&&void 0!==g?g:EO({node:f,parent:p,root:a,x:y,y:h,pageY:h,layoutService:r,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u,indentModeFeatures:c},env:l,pageInfo:s});e[h][y]=b,f.qSubNodes.length&&t(a||b,b,f.qSubNodes,h+1)}))}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},IO=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:l})=>{const{qTop:s,qArea:u}=t;if(!s.length)return e;const c=LO(e.grid,s,u,n,r,o,i,a,l);kO(c,n.size.x);const d=_O(c);return{...e,grid:c,rowCount:c.length,totalDividerIndex:d}},DO=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},n)=>(e[t]=n,e)),{}),PO=(e,t)=>{const{env:n}=JP(),{layoutService:r}=tT(),{qPivotDataPages:o,pageInfo:i}=KP(),[a,l]=Sn.useState(null),s=((e,t,n)=>Sn.useMemo((()=>({left:e.map(DO),top:t.map(DO),measures:n.map(DO)})),[n,e,t]))(e,t,r.visibleMeasureInfo),u=Sn.useMemo((()=>bT(r,t,e)),[r,t,e]),c=Sn.useCallback((()=>o.slice(1).reduce(((e,t)=>AO({prevData:e,dataPage:t,pageInfo:i})),((e,t)=>{const{qData:n,qArea:r}=e;return RO({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(o[0],i))),[o,i]),d=Sn.useCallback((()=>o.slice(1).reduce(((e,o)=>IO({prevData:e,nextDataPage:o,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:s.top,headerRows:u.size.y,env:n,pageInfo:i})),((e,t,n,r,o,i,a)=>{const{qArea:l,qTop:s}=e,u=LO([],s,l,t,n,r,o,i,a);kO(u,t.size.x);const c=_O(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(o[0],r,t,s.top,u.size.y,n,i))),[o,r,t,s.top,u.size.y,n,i]),p=Sn.useCallback((()=>o.slice(1).reduce(((t,o)=>MO({prevData:t,nextDataPage:o,pageInfo:i,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:s.left,env:n})),((e,t,n,r,o,i)=>{const{qArea:a,qLeft:l}=e,s=CO([],l,a,n,t,r,o,i);kO(s,n.rowsOnCurrentPage);const u=_O(s,t);return{grid:s,columnCount:s.length,layoutSize:t.size,totalDividerIndex:u}})(o[0],r,i,e,s.left,n))),[o,r,i,e,s,n]),[f,h]=Sn.useState((()=>c())),[m,g]=Sn.useState((()=>d())),[y,b]=Sn.useState((()=>p()));TR((()=>{h(c())}),[c]),TR((()=>{g(d())}),[d]),TR((()=>{b(p())}),[p]),TR((()=>{a&&a.forEach((o=>{h((e=>AO({prevData:e,dataPage:o,pageInfo:i}))),g((e=>IO({prevData:e,nextDataPage:o,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:s.top,headerRows:u.size.y,env:n,pageInfo:i}))),b((t=>MO({prevData:t,nextDataPage:o,pageInfo:i,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:s.left,env:n})))}))}),[a]);const v=Sn.useCallback((e=>{l(e)}),[]);return{headersData:u,measureData:f,topDimensionData:m,leftDimensionData:y,attrExprInfoIndexes:s,nextPageHandler:v}},TO=Math.sqrt(1e4),OO=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/ft.PixelsMin)}),NO=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/TO),r=Math.ceil(e.qHeight/TO);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*TO,qTop:e.qTop+n*TO,qWidth:Math.min(TO,e.qWidth-o*TO),qHeight:Math.min(TO,e.qHeight-n*TO)});return t};function qO({nextPageHandler:e}){const{model:t}=JP(),{pageInfo:n}=KP(),{layoutService:r}=tT(),o=(e=>{const t=Sn.useRef(e);return t.current=e,t})(n.page),i=t,a=Sn.useCallback((async(e,t)=>{var n;await(null==i||null===(n=i.collapseLeft)||void 0===n?void 0:n.call(i,oT,e,t,!1))}),[i]),l=Sn.useCallback((async(e,t)=>{await(null==i?void 0:i.collapseTop(oT,e,t,!1))}),[i]),s=Sn.useCallback((async(e,t)=>{await(null==i?void 0:i.expandLeft(oT,e,t,!1))}),[i]),u=Sn.useCallback((async(e,t)=>{await(null==i?void 0:i.expandTop(oT,e,t,!1))}),[i]),c=Sn.useCallback((async t=>{if(null!=i&&i.getHyperCubePivotData&&0!==t.length)try{const r=await i.getHyperCubePivotData(oT,t.reduce(((e,t)=>[...e,...NO(t)]),[]));o.current===n.page&&e(r)}catch(e){console.error(e)}}),[i,e,n,o]),d=Sn.useCallback(((e,{dimensionInfoIndex:n,isLeftColumn:o,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:l,qDimensionInfo:s,topHeadersColumnWidth:u}=r.layout.qHyperCube;let c=[];switch(a){case ot.Dimension:c=[{qPath:`${oT}/qDimensions/${n}/qDef/columnWidth`,oldValue:s[n].columnWidth}];break;case ot.Measures:if(o)c=l.map(((e,t)=>({qPath:`${oT}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth})));else{const e=r.getMeasureInfoIndexFromCellIndex(i);c=[{qPath:`${oT}/qMeasures/${e}/qDef/columnWidth`,oldValue:l[e].columnWidth}]}break;case ot.Pivot:c=[{qPath:`${oT}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map((t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}}));null==t||t.applyPatches(d,!0)}),[t,r]),p=Sn.useCallback((async e=>{var t;await(null==i?void 0:i.applyPatches([{qPath:`${oT}/indentModeColumnWidth`,qOp:null!==(t=r.layout.qHyperCube)&&void 0!==t&&t.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))}),[i,r]);return Sn.useMemo((()=>({collapseLeft:a,collapseTop:l,expandLeft:s,expandTop:u,applyColumnWidth:d,applyIndentModeColumnWidth:p,fetchPages:c})),[a,l,s,u,d,p,c])}const FO=(e,t,n)=>(r,o)=>{if("P"===r)return iT;const i=t[n+o];return e[i]},zO=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach((e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)}))};return n(e),t},jO=Sn.createContext({}),BO=()=>Sn.useContext(jO),$O=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=tT(),{qPivotDataPages:r}=KP();return Sn.useMemo((()=>{var o,i,a,l;const s=zO(null!==(o=null===(i=r[0])||void 0===i?void 0:i.qLeft)&&void 0!==o?o:[]),u=zO(null!==(a=null===(l=r[0])||void 0===l?void 0:l.qTop)&&void 0!==a?a:[]);return{visibleLeftDimensionInfo:s.map(FO(n,t,0)),visibleTopDimensionInfo:u.map(FO(n,t,e))}}),[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:l,nextPageHandler:s}=PO(t,n),u=qO({nextPageHandler:s}),c=Sn.useMemo((()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:l,dataModel:u})),[t,n,r,o,i,a,l,u]);return Ms.jsx(jO.Provider,{value:c,children:e})},WO=18,HO=.75,VO=e=>{var t;return-1!==e&&(null==e||null===(t=e.representation)||void 0===t?void 0:t.type)===Ke.Image},GO=e=>void 0===e?XM:e,UO=(e,t)=>e&&"number"==typeof e&&!Number.isNaN(e)?e:t,YO=e=>UO(e,ft.PixelsDefault),KO=(e,t)=>UO(e,ft.PercentageDefault)*t/100,XO=(e,t,n)=>{switch(null==t?void 0:t.type){case ht.Pixels:return YO(t.pixels);case ht.Percentage:return KO(t.percentage,e);case ht.FitToContent:case ht.Auto:default:return n}},QO=({headers:e,layoutService:t,estimateWidthForDimensionValue:n,shouldConsiderCombinatedLength:r,measureTextForHeader:o,longestMeasureValuePossible:i})=>e.reduce(((e,a,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:s}},isFullyExpanded:u}=t,{id:c,colIdx:d,qApprMaxGlyphCount:p,isLeftDimension:f}=a;if(!f)return e+0;if(c===aT)return e+0;const h=n(p),m=!u&&f&&d<s-1?21:0;let g=0;if(r&&o&&i){g=o("-")+i}return Math.max(e,24*l+WO+m+h+g)}),0),JO=(e,t,n)=>e.reduce(((e,r)=>{const o=(n?0:1)*WO;return Math.max(e,o+t(r.qFallbackTitle))}),0),ZO=(e,t,n,r)=>{const o=100*e/t,i=r*HO*(o/100),a=n*(o/100);return Math.min(a,i)},eN=(e,t,n,r)=>r*(n/100)*(100*e/t/100),tN=(e,t)=>e.some((e=>e>=t*HO)),nN=({layoutService:e,headersData:t,columnWidths:n,tableWidth:r,widthOverride:o,measureTextForHeader:i,estimateWidthForDimensionValue:a,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:s})=>{let u=[];const c=r*HO,d=t.data[t.data.length-1][0],p=Math.min(c,n.at(-1)),f=Math.min(c,QO({headers:d,layoutService:e,estimateWidthForDimensionValue:a})),h=Math.min(c,JO(e.visibleMeasureInfo,i));let m=0;const g=d.findIndex((e=>e.id===aT)),y=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===ht.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+WO+16:24})({layoutService:e,measureTextForHeader:i,translator:s,headersData:t});if(e.hasPseudoDimOnLeft)if(0===g){const e=Math.max(p,f,h);u=[Math.max(y,e-p),p]}else{const t=Math.min(c,JO(e.visibleMeasureInfo,l,!0));m=Math.min(c,QO({headers:d.slice(0,g),layoutService:e,estimateWidthForDimensionValue:a,shouldConsiderCombinatedLength:!0,measureTextForHeader:i,longestMeasureValuePossible:t}));const n=Math.max(p,f,m);u=[Math.max(y,n-p),p]}else u=[Math.max(y,f-p),p];const b=Math.min(c,u.reduce(((e,t)=>e+t),0)),{indentModeColumnWidth:v}=e;o&&o<=c&&(v.type=ht.Pixels,v.pixels=o);return[ht.Pixels,ht.Percentage].includes(v.type)||tN(u,r)?((e,t,n,r)=>{let o=e[0],i=e[1],a=[];const l=e.reduce(((e,t)=>e+t),0),{type:s,pixels:u,percentage:c}=t,d=tN(e,n);s===ht.Auto&&d&&(o>i?o-=i:i-=o),s===ht.Pixels&&u&&(o=ZO(e[0],l,u,n),i=ZO(e[1],l,u,n)),s===ht.Percentage&&c&&(o=eN(e[0],l,c,n),i=eN(e[1],l,c,n));let p=0;i<=r&&(p=o-5,p>0&&(o-=p,i+=p)),p=i-r,p>0&&(o+=p,i-=p),a=[o,i];const f=a.reduce(((e,t)=>e+t),0);return{leftGridColumnWidths:a,leftGridWidth:f,leftGridFullWidth:f}})(u,v,r,p):{leftGridWidth:b,leftGridColumnWidths:u,leftGridFullWidth:b}};function rN({tableWidth:e}){const t=e*HO,{styleService:n,layoutService:r}=tT(),{translator:o}=JP(),{gridSectionsData:{headersData:i}}=BO(),{measureText:a}=IR(n.header),{estimateWidth:l,measureText:s}=IR({...n.dimensionValues,fontWeight:GO(n.dimensionValues.fontWeight)}),{measureText:u}=IR({...n.dimensionValues,...n.measureLabels}),c=Sn.useCallback(((n,c)=>{const{layout:{qHyperCube:{qNoOfLeftDims:d,topHeadersColumnWidth:p}},visibleMeasureInfo:f,isFullyExpanded:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,y=(t=0)=>f.reduce(((n,{qFallbackTitle:r,columnWidth:o})=>{const i=u(r)+WO,a=Math.max(i,t);return Math.max(n,m?a:XO(e,o,a))}),0),b=e=>i.data.reduce(((t,n)=>{const r=n[e];if(!r)return t;if(r.id===aT)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?20:0;return WO+a(t)+20+r})(r);return Math.max(o,t)}),0);let v=0,x=i.data.at(-1);m&&i.size.x>1&&x&&x[0]&&(x=x[0]);const w=x.map(((o,a)=>{let s=WO;if((!m||m&&1===i.size.x)&&n&&void 0!==c&&c===o.colIdx)s=m?Math.min(t,n):n;else{let t;o.columnWidthLocation===ot.Pivot?t=m?void 0:p:o.columnWidthLocation===ot.Dimension&&({columnWidth:t}=o);let n=0;if(o.isLeftDimension)if(o.id===aT)n=y();else{const e=b(a),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:i}=e,a=r.getDimensionInfo(i);if(VO(a))return ft.PixelsDefault;const s=!h&&o&&t<d-1?21:0;return WO+l(n)+s})(o,a);n=Math.max(e,t),m&&!g&&a+1===d&&o.columnWidthLocation===ot.Dimension&&i.size.x>1&&(n=e)}else o.isLeftDimension||(n=b(a),o.columnWidthLocation===ot.Measures&&(n=y(n)));m&&1===i.size.x&&(t=r.indentModeColumnWidth),s=m&&!g&&i.size.x>1?n:XO(e,t,n)}return v+=s,s}));return m&&i.size.x>1?nN({layoutService:r,headersData:i,columnWidths:w,tableWidth:e,widthOverride:n,measureTextForHeader:a,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:s,translator:o}):{leftGridWidth:Math.min(t,v),leftGridColumnWidths:w,leftGridFullWidth:v}}),[e,i,r,t,a,u,l,s,o]),[d,p]=Sn.useState(c);TR((()=>{p(c())}),[c]);const f=Sn.useCallback(((e,t)=>{p(c(e,t))}),[c]);return{...d,overrideLeftGridWidth:f}}function oN({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=tT(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=BO(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:l}},size:s,visibleMeasureInfo:u}=o,{estimateWidth:c,measureText:d}=IR(r.measureValues),{estimateWidth:p}=IR({...r.dimensionValues,fontWeight:GO(r.dimensionValues.fontWeight)}),f=e-n-1,h=i.at(-1),m=h===iT,g=l.length-a>i.length?21:0,y=Sn.useMemo((()=>{const e=m?u:[h],t=s.x/e.length,n=[],r=[];let o=f;const i=(e,r)=>{n[e]=Math.min(ft.PixelsMax,Math.max(ft.PixelsMin,r)),o-=n[e]*t};if(e.forEach(((e,t)=>{if(null!=e&&e.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:l,qFallbackTitle:s}=e;switch(n){case ht.Pixels:i(t,YO(o));break;case ht.Percentage:i(t,KO(a,f));break;case ht.FitToContent:i(t,((e,t,n)=>n?ft.PixelsDefault:WO+(m?Math.max(c(e),d(t)):Math.max(Math.max(...u.map((e=>c(e.qApprMaxGlyphCount)))),p(e)+g)))(l,s,VO(e)));break;case ht.Auto:default:r.push(t)}}else r.push(t)})),r.length){const e=r.length*t,i=o/e;r.forEach((e=>{n[e]=Math.max(ft.AutoMinPivot,i)}))}return n}),[m,u,h,s.x,f,c,d,p,g]),b=Sn.useMemo((()=>{if(m){const e=u.reduce(((e,t,n)=>e+y[n]),0);return e/u.length}return y[0]}),[m,y,u]),v=parseFloat((t/o.size.x).toFixed(12)),x=Sn.useCallback((e=>(m&&void 0!==e?y[o.getMeasureInfoIndexFromCellIndex(e,!0)]:b)-v),[m,y,o,b,v]),w=s.x*b;return{rightGridFullWidth:w,rightGridWidth:Math.min(w,f),getRightGridColumnWidth:x}}const iN=`scrollable-container--${at.TopGrid}`,aN=`scrollable-container--${at.LeftGrid}`,lN=`scrollable-container--${at.DataGrid}`,sN=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},uN=(e,t)=>e>t?lt.Forward:e<t?lt.Backward:lt.None,cN=()=>{const{layoutService:e}=tT(),t=Sn.useRef(null),n=Sn.useRef(null),r=Sn.useRef(null),o=Sn.useRef(null),i=Sn.useRef([]),a=Sn.useRef([]),l=Sn.useRef(null),{scrollbarsDimensions:{verticalScrollbarWidth:s,horizontalScrollbarHeight:u},resetHorizontalScrollbarHeight:c}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const[r,o]=Sn.useState(0),[i,a]=Sn.useState(0);return Sn.useLayoutEffect((()=>{(e.current||n.current)&&o(Math.max(sN(e.current).width,sN(n.current).width))})),Sn.useLayoutEffect((()=>{(t.current||n.current)&&a(Math.max(sN(t.current).height,sN(n.current).height))})),{scrollbarsDimensions:{verticalScrollbarWidth:r,horizontalScrollbarHeight:i},resetHorizontalScrollbarHeight:()=>a(0)}})({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:l}=KP(),{downloadService:s,viewService:u,layoutService:c}=tT(),d=Sn.useCallback((()=>{var o,i,a,l;const s={left:0,top:0};null===(o=e.current)||void 0===o||o.scrollTo(s),null===(i=t.current)||void 0===i||i.scrollTo(s),null===(a=n.current)||void 0===a||a.scrollTo(s),null===(l=r.current)||void 0===l||l.scrollTo(s)}),[e,t,n,r]);Sn.useLayoutEffect((()=>{d()}),[l.page,d]),Sn.useLayoutEffect((()=>{c.triggerdByExpandOrCollapse||d()}),[c,d]),Sn.useLayoutEffect((()=>{if(c.triggerdByExpandOrCollapse){var e,t,n,l,s,u,d;const c=null!==(e=null===(t=r.current)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0,p=null!==(n=null===(l=r.current)||void 0===l?void 0:l.scrollTop)&&void 0!==n?n:0;null===(s=i.current)||void 0===s||s.forEach((e=>null==e?void 0:e.scrollTo(p))),null===(u=o.current)||void 0===u||u.forEach((e=>null==e?void 0:e.scrollTo(c))),null===(d=a.current)||void 0===d||d.scrollTo({scrollTop:p,scrollLeft:c})}}),[c,r,a,i,o]),Sn.useLayoutEffect((()=>{(s.isDownloadedAsPDForImage||c.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=u.scrollTop,r.current.scrollLeft=u.scrollLeft,n.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)}),[u,s,c,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l}});const{trackScrollDirection:d,scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:f}}=(()=>{const e=Sn.useRef(lt.None),t=Sn.useRef(lt.None),n=Sn.useRef({prevScrollTop:0,prevScrollLeft:0});return{trackScrollDirection:Sn.useCallback((r=>{if(r instanceof WheelEvent&&(e.current=uN(r.deltaY,0),t.current=uN(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=uN(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=uN(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}}),[e,t,n]),scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),h=(()=>{const{viewService:e}=tT();return Sn.useCallback((t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===aN&&(e.leftGridScrollLeft=r.scrollLeft),o===lN&&(e.scrollLeft=r.scrollLeft),o===iN&&(e.topGridScrollTop=r.scrollTop),o!==aN&&o!==lN||(e.scrollTop=r.scrollTop)}),[e])})(),m={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},getWrapperElements:Sn.useCallback((()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current})),[t,n,r,o]),updateViewService:h,trackScrollDirection:d,isSnapshotMode:e.isSnapshot};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,isSnapshotMode:a})=>{Sn.useEffect((()=>{const{headerGridWrapperElement:o,topGridWrapperElement:l,leftGridWrapperElement:s,dataGridWrapperElement:u}=r(),c=e=>{o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,s.scrollLeft=o.scrollLeft,l.scrollTop=o.scrollTop,i(e)},d=e=>{var r,a;s.scrollTop+=e.deltaY,null===(r=t.current)||void 0===r||r.forEach((e=>null==e?void 0:e.scrollTo(s.scrollTop))),o.scrollLeft+=e.deltaX,s.scrollLeft=o.scrollLeft,u.scrollTop=s.scrollTop,null===(a=n.current)||void 0===a||a.scrollTo({scrollTop:s.scrollTop}),i(e)},p=t=>{var r,a;l.scrollLeft+=t.deltaX,null===(r=e.current)||void 0===r||r.forEach((e=>null==e?void 0:e.scrollTo(l.scrollLeft))),o.scrollTop+=t.deltaY,l.scrollTop=o.scrollTop,u.scrollLeft=l.scrollLeft,null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:l.scrollLeft}),i(t)},f=r=>{var o,a,c;u.scrollLeft+=r.deltaX,u.scrollTop+=r.deltaY,null===(o=n.current)||void 0===o||o.scrollTo({scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}),l.scrollLeft=u.scrollLeft,null===(a=e.current)||void 0===a||a.forEach((e=>null==e?void 0:e.scrollTo(u.scrollLeft))),s.scrollTop=u.scrollTop,null===(c=t.current)||void 0===c||c.forEach((e=>null==e?void 0:e.scrollTo(u.scrollTop))),i(r)};return o.addEventListener("wheel",c),s.addEventListener("wheel",d),l.addEventListener("wheel",p),u.addEventListener("wheel",f),a&&setTimeout((()=>{o.removeEventListener("wheel",c),s.removeEventListener("wheel",d),l.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}),0),()=>{o.removeEventListener("wheel",c),s.removeEventListener("wheel",d),l.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}}),[i,o,a,e,t,n,r])})(m),(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,isSnapshotMode:a})=>{Sn.useEffect((()=>{const{headerGridWrapperElement:l,topGridWrapperElement:s,leftGridWrapperElement:u,dataGridWrapperElement:c}=r(),d=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),null==o||o(e)},p=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),null==o||o(e)},f=r=>{var a,l,d;const p=r.target;null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:p.scrollLeft,scrollTop:p.scrollTop}),s.scrollLeft=c.scrollLeft,null===(l=e.current)||void 0===l||l.forEach((e=>null==e?void 0:e.scrollTo(p.scrollLeft))),u.scrollTop=c.scrollTop,null===(d=t.current)||void 0===d||d.forEach((e=>null==e?void 0:e.scrollTo(p.scrollTop))),i(r),null==o||o(r)};return u.addEventListener("scroll",d),s.addEventListener("scroll",p),c.addEventListener("scroll",f),a&&setTimeout((()=>{u.removeEventListener("scroll",d),s.removeEventListener("scroll",p),c.removeEventListener("scroll",f)}),0),()=>{u.removeEventListener("scroll",d),s.removeEventListener("scroll",p),c.removeEventListener("scroll",f)}}),[i,o,a,e,t,n,r])})(m),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:f},scrollbarsDimensions:{verticalScrollbarWidth:s,horizontalScrollbarHeight:u,resetHorizontalScrollbarHeight:c}}},dN=()=>{const{layoutService:e}=tT(),{rect:t,pageInfo:n}=KP();return Sn.useMemo((()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}}),[t,e,n.shouldShowPagination])},pN=({children:e,style:t})=>Ms.jsx("div",{"data-testid":"fullSize",style:t,children:e}),fN=({children:e,style:t})=>Ms.jsx("div",{"data-section-id":"GRID",style:{display:"grid",...t},children:e}),hN=e=>e&&`scrollable-container--${e}`,mN=({children:e,style:t,origin:n},r)=>{const{interactions:o}=JP(),i=o.active?t:{overflow:"hidden"};return Ms.jsx("div",{"data-testid":"scrollable","data-key":hN(n),style:i,ref:r,children:e})};var gN=En.forwardRef(mN);const yN=({children:e,style:t})=>Ms.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,left:0,...t},children:e});var bN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function vN(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||bN(r)&&bN(o)))return!1;var r,o;return!0}function xN(e,t){var n;void 0===t&&(t=vN);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var wN="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function SN(e){cancelAnimationFrame(e.id)}function EN(e,t){var n=wN();var r={id:requestAnimationFrame((function o(){wN()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var CN=-1;function kN(e){if(void 0===e&&(e=!1),-1===CN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),CN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return CN}var _N=null;function MN(e){if(void 0===e&&(e=!1),null===_N||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?_N="positive-descending":(t.scrollLeft=1,_N=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),_N}return _N}var RN=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function AN(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=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,Ft(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Ft(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=xN((function(e,t,n,o,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),r._callOnScroll=void 0,r._callOnScroll=xN((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,l=a.columnWidth,s=a.direction,u=a.rowHeight,p=r._getItemStyleCache(m&&l,m&&s,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===s;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=xN((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,l=t.scrollHeight,s=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(MN()){case"negative":u=-i;break;case"positive-descending":u=s-o-i}u=Math.max(0,Math.min(u,s-o));var c=Math.max(0,Math.min(a,l-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&&SN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=EN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}qt(t,e),t.getDerivedStateFromProps=function(e,t){return LN(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=kN();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=l(this.props,this._instanceProps)>f?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?s(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(MN()){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&&SN(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?RN:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],E=w[1],C=this._getVerticalRangeToRender(),k=C[0],_=C[1],M=[];if(r>0&&g)for(var R=k;R<=_;R++)for(var A=S;A<=E;A++)M.push(Sn.createElement(t,{columnIndex:A,data:d,isScrolling:b?x:void 0,key:f({columnIndex:A,data:d,rowIndex:R}),rowIndex:R,style:this._getItemStyle(R,A)}));var L=a(this.props,this._instanceProps),I=l(this.props,this._instanceProps);return Sn.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Rt({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},Sn.createElement(u||c||"div",{children:M,ref:s,style:{height:L,pointerEvents:x?"none":void 0,width:I}}))},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],l=i[1],s=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,l,d,p,s,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,l=e.rowCount,s=this.state,u=s.horizontalScrollDirection,c=s.isScrolling,d=s.scrollLeft,p=n||i||a||1;if(0===t||0===l)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,l=a.isScrolling,s=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=l&&"backward"!==s?1:Math.max(1,c),g=l&&"forward"!==s?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(Sn.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var LN=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},IN=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 l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},DN=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 l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},PN=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 l=0;if(a>=0){var s=o[a];l=s.offset+s.size}for(var u=a+1;u<=n;u++){var c=i(u);o[u]={offset:l,size:c},l+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},TN=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?ON(e,t,n,i,0,r):NN(e,t,n,Math.max(0,i),r)},ON=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),l=PN(e,t,a,n).offset;if(l===i)return a;l<i?o=a+1:l>i&&(r=a-1)}return o>0?o-1:0},NN=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&PN(e,t,r,n).offset<o;)r+=a,a*=2;return ON(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},qN=function(e,t,n,r,o,i,a){var l="column"===e?t.width:t.height,s=PN(e,t,n,i),u="column"===e?DN(t,i):IN(t,i),c=Math.max(0,Math.min(u-l,s.offset)),d=Math.max(0,s.offset-l+a+s.size);switch("smart"===r&&(r=o>=d-l&&o<=c+l?"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}},FN=AN({getColumnOffset:function(e,t,n){return PN("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return TN("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=PN("column",e,t,r),l=n+i,s=a.offset+a.size,u=t;u<o-1&&s<l;)u++,s+=PN("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:IN,getEstimatedTotalWidth:DN,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return qN("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return qN("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return PN("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return TN("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=PN("row",e,t,r),l=n+i,s=a.offset+a.size,u=t;u<o-1&&s<l;)u++,s+=PN("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}}),zN=function(e,t){return e};function jN(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=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=s(r.props,Ft(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ft(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=xN((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=xN((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,l=i.itemSize,s=i.layout,c=r._getItemStyleCache(u&&l,u&&s,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"===s,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=xN((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(MN()){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&&SN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=EN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}qt(t,e),t.getDerivedStateFromProps=function(e,t){return BN(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 l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?kN():0:s.scrollHeight>s.clientHeight?kN():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},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(MN()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&SN(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?zN: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,w=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),E=S[0],C=S[1],k=[];if(u>0)for(var _=E;_<=C;_++)k.push(Sn.createElement(t,{data:c,key:p(_,c),index:_,isScrolling:y?v:void 0,style:this._getItemStyle(_)}));var M=r(this.props,this._instanceProps);return Sn.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Rt({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},Sn.createElement(l||s||"div",{children:k,ref:a,style:{height:x?"100%":M,pointerEvents:v?"none":void 0,width:x?M:"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,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var u=a(this.props,s,this._instanceProps),c=l(this.props,u,s,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}(Sn.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var BN=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},$N=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var l=o[i];a=l.offset+l.size}for(var s=i+1;s<=t;s++){var u=r(s);o[s]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return o[t]},WN=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=$N(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},HN=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&$N(e,n,t).offset<r;)n+=i,i*=2;return WN(e,t,Math.min(n,o-1),Math.floor(n/2),r)},VN=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 l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},GN=jN({getItemOffset:function(e,t,n){return $N(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:VN,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,l=e.height,s=e.layout,u=e.width,c="horizontal"===a||"horizontal"===s?u:l,d=$N(e,t,o),p=VN(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?WN(e,t,o,0,n):HN(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,l=e.layout,s=e.width,u="horizontal"===o||"horizontal"===l?s:i,c=$N(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=$N(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 UN(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 YN=["style"],KN=["style"];function XN(e,t){var n=e.style,r=Ot(e,YN),o=t.style,i=Ot(t,KN);return!UN(n,o)&&!UN(r,i)}const QN=10,JN=(e,t)=>e.current===lt.Backward?t:0,ZN=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e[o];if(void 0===n||void 0===n[t])return!0}return!1},eq=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,tq=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],l=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(ZN(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+l,qWidth:1,qHeight:r};void 0!==t&&eq(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},nq=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:l,gridHeight:s}=r,u=n.current===lt.Backward?Math.max(0,o-25):i,c=Math.min(u+25,a);return tq({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:l,qHeight:s})},rq=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:l,qHeight:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,l=e.size.x,s=JN(n,QN),u=Math.max(r-s,0);return{startLeft:u,endLeft:u+Math.min(i+QN,l-u),pageTop:o,qHeight:a}})(r,o,n),u=tq({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:l,qHeight:s});return u.length>0?[...u,...nq({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:u},oq=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},iq=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,aq=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],l=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(oq(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+l,qWidth:r,qHeight:1};void 0!==e&&iq(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},lq=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,l=JN(n,QN),s=Math.max(o-l,0);return{startTop:s,endTop:s+Math.min(a+QN,e.rowsOnCurrentPage-s),qLeft:r,qWidth:i}})(e,r,n),s=aq({startTop:o,endTop:i,qLeft:a,qWidth:l,measureData:t,pageInfo:e});if(s.length>0){const r=n.current===lt.Backward?Math.max(0,o-25):i,u=Math.min(r+25,e.rowsOnCurrentPage),c=aq({startTop:r,endTop:u,qLeft:a,qWidth:l,measureData:t,pageInfo:e});return[...s,...c]}return s},sq=async(e,t,n,r,o,i,a,l)=>{const{gridColumnStartIndex:s,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=o;let p=[],f=[];i.current!==lt.None&&(p=lq({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==lt.None&&(f=rq({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===lt.None&&a.current===lt.None&&(p=aq({measureData:n,pageInfo:r,qLeft:s,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);l.isDownloadedAsPDForImage&&l.waitForPromise(h)},uq=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];n=l;var u=Date.now()-i,c=function(){i=Date.now(),r=0,e.apply(t,n)};r||(u>=o?c():r=setTimeout(c,o-u))}}(sq,100),cq=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}(sq,75),dq=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),pq=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{styleService:{grid:{border:l,divider:s}}}=tT();return Ms.jsx("div",{style:{...e,...rR,...lR(n,r,l,o),...uR({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:s})},"data-testid":"empty-cell","data-index":t})},fq=({children:e,verticalAlign:t,width:n,right:r})=>Ms.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",overflow:"hidden",flexDirection:"row",alignItems:t,width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,alignSelf:t},children:e}),hq=e=>{const{type:t,imageSize:n}=e;return t!==Ke.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"};function mq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gq=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){mq(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),yq=Sn.forwardRef(gq);function bq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vq=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bq(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"})),xq=Sn.forwardRef(vq),wq=e=>{var t;return null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t?void 0:t.includes(pt)},Sq=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===(null==n?void 0:n.ref.qType)&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}};const Eq={createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1},Cq=Sn.createContext(Eq),kq=()=>Sn.useContext(Cq),_q=({children:e,selections:t})=>{const n=function(e){var t,n,r;const{env:o}=JP(),{updatePageInfo:i}=KP(),a=e.isActive(),[l,s]=Sn.useReducer(Sq,{engineSelectedCells:null,selectedField:null,activeSelection:null});Sn.useEffect((()=>{const t=()=>{s({type:"clearSelections"})},n=()=>{t(),i({page:0})};return e.on("deactivated",t),e.on("canceled",t),e.on("confirmed",n),e.on("cleared",t),()=>{e.removeListener("deactivated",t),e.removeListener("canceled",t),e.removeListener("confirmed",n),e.removeListener("cleared",t)}}),[e,i]);const u=Sn.useCallback((async()=>{var t,n,r;if(!l.activeSelection)return;1===l.activeSelection.clientSelectedCells.size&&(n=l.engineSelectedCells,(r=l.activeSelection).clientSelectedCells.forEach(((e,t)=>{null!=n&&n.has(t)&&(r.clientSelectedCells.delete(t),n.delete(t))})));const o=new Map([...null!==(t=l.engineSelectedCells)&&void 0!==t?t:new Map,...l.activeSelection.clientSelectedCells]);try{s({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[oT,Array.from(o,(([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x})))]})}catch(e){console.error(e),s({type:"mouseup",payload:{engineSelectedCells:l.engineSelectedCells}})}}),[l,e]);Sn.useEffect((()=>{if(l.activeSelection)return document.addEventListener("mouseup",u),()=>{document.removeEventListener("mouseup",u)}}),[u,l.activeSelection]);const c=Sn.useCallback(((e,t)=>n=>{const r=t(e);wq(n)||(e=>{var t;return null!==(null===(t=e.target)||void 0===t?void 0:t.closest("[data-prevent-selection]"))})(n)||(e=>{var t;return"A"===(null===(t=e.target)||void 0===t?void 0:t.tagName)})(n)||!(e=>1===e.buttons)(n)||!r||s({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(r.ref.qElemNo,r)},selectedField:{selectionCellType:r.selectionCellType,index:r.selectionCellType===bt.Left?r.x:r.y}}})}),[]),d=Sn.useCallback((t=>o.flags.isEnabled("CLIENT_IM_6223_PIVOT_RANGE_SELECTION")?async()=>{l.activeSelection&&(e.isActive()||await e.begin([oT]),s({type:"mouseover",payload:{index:t}}))}:void 0),[l.activeSelection,e,o]),p=Sn.useCallback((e=>{var t,n;return!(!(null!==(t=l.engineSelectedCells)&&void 0!==t&&t.size||null!==(n=l.activeSelection)&&void 0!==n&&n.clientSelectedCells.size)||!l.selectedField||e.selectionCellType===l.selectedField.selectionCellType&&(e.selectionCellType===bt.Left?l.selectedField.index===e.x:l.selectedField.index===e.y))}),[null===(t=l.activeSelection)||void 0===t?void 0:t.clientSelectedCells.size,null===(n=l.engineSelectedCells)||void 0===n?void 0:n.size,l.selectedField]),f=Sn.useCallback((e=>{var t,n;return!p(e)&&((null===(t=l.engineSelectedCells)||void 0===t?void 0:t.has(e.ref.qElemNo))||!(null===(n=l.activeSelection)||void 0===n||!n.clientSelectedCells.has(e.ref.qElemNo)))}),[p,null===(r=l.activeSelection)||void 0===r?void 0:r.clientSelectedCells,l.engineSelectedCells]);return Sn.useMemo((()=>({isSelected:f,isActive:a,isLocked:p,createMouseDownHandler:c,createMouseOverHandler:d})),[f,a,p,c,d])}(t);return Ms.jsx(Cq.Provider,{value:n,children:e})};var Mq;!function(e){e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration"}(Mq||(Mq={}));const Rq={brighter:.5,darker:.3,opacity:.03},Aq=(e,{cell:t,styleService:n})=>{if(e===Mq.Background||e===Mq.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},Lq=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=Aq(Mq.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?Aq(Mq.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${NM(i=o,Rq)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},Iq=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:Aq(Mq.Color,{cell:e,styleService:t}),Dq=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=Aq(Mq.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?XM:o},Pq=({cell:e,styleService:t})=>Aq(Mq.FontStyle,{cell:e,styleService:t}),Tq=({cell:e,styleService:t})=>Aq(Mq.TextDecoration,{cell:e,styleService:t}),Oq=e=>e?"pointer":"default",Nq=({expandOrCollapse:e,cell:t})=>n=>{null==e||e(t.y,t.x),n.stopPropagation()},qq=(e,t)=>{if(!e.isLeftColumn||e.representation.type===Ke.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},Fq=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r}=tT(),{interactions:o}=JP(),{isActive:i}=kq(),{dataModel:a}=BO();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||i||!a,s=Iq({cell:e,styleService:r,isCellSelected:n}),u=i?.4:1,c=e.ref.qCanExpand?xq:yq;let d;return d=e.ref.qCanExpand?t?null==a?void 0:a.expandLeft:null==a?void 0:a.expandTop:t?null==a?void 0:a.collapseLeft:null==a?void 0:a.collapseTop,Ms.jsx(c,{opacity:u,color:s,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",...qq(e,r)},onClick:l?void 0:Nq({cell:e,expandOrCollapse:d})})},zq=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},jq=e=>{switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";default:return"100%"}},Bq=({representation:e,styleService:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o})=>{const i=`calc(100% - ${n?21:0}px)`,a=o?t.contentCellHeight:t.headerCellHeight,l=o&&void 0!==r?a*Math.max(r,1):a;switch(e.imageSize){case"originalSize":return{maxWidth:i,maxHeight:l};case"fitWidth":return{width:i,maxHeight:l};case"fitHeight":return{height:l,maxWidth:i};case"fill":return{height:l,width:i};default:return{width:i,height:a}}},$q=(e,t)=>{if("alwaysFit"===e)switch(null==t?void 0:t.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},Wq=e=>{if("alwaysFit"===e)return"contain"},Hq=({representation:e,styleService:t,textStyle:n,canExpandOrCollapse:r,leafCount:o,isLeftColumn:i})=>{const{imageRef:a,onLoad:l}=(()=>{const{downloadService:e}=tT(),t=Sn.useRef(null),{promise:n,resolve:r}=Sn.useMemo((()=>vR()),[]);return Sn.useEffect((()=>{var o;return e.isDownloadedAsPDForImage&&(e.waitForPromise(n),null!==(o=t.current)&&void 0!==o&&o.complete&&r()),()=>r()}),[t,e,n,r]),{onLoad:Sn.useCallback((()=>{r()}),[r]),imageRef:t}})(),{url:s,text:u,imageSize:c,resolvedImagePosition:d}=e,{overflow:p,...f}=n;return Ms.jsx("div",{"data-key":"image-container",style:{display:"flex",flexDirection:"column",justifyContent:null==d?void 0:d.vertical,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...Bq({representation:e,styleService:t,canExpandOrCollapse:r,leafCount:o,isLeftColumn:i})},children:Ms.jsx("img",{src:s,alt:u,style:{width:jq(c),height:zq(c),objectFit:Wq(c),objectPosition:$q(c,d),...f},onLoad:l,ref:a})})},Vq=(e,t)=>{if(null!=e&&e.auto)return t;switch(null==e?void 0:e.align){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end";default:return t}},Gq={display:"flex",flexDirection:"row",alignItems:"center"},Uq={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},Yq=(e,t,n,r)=>t?{...Uq,...e.nullValues}:n?{...Gq,color:e.totalValues.color,background:null!=r?r:e.totalValues.background}:{...Gq,color:e.measureValues.color,background:null!=r?r:e.measureValues.background},Kq=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,l={...oR,...!n&&iR(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...l,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...l,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:s,fontStyle:u,textDecoration:c}=e.measureValues;return{...l,fontWeight:void 0===s?XM:s,fontStyle:u,textDecoration:c}},Xq=(e,t,n,r)=>{const{textAlign:o}=t,i=r?"flex-end":"center";var a,l;return e.isNull||n.type!==Ke.Image?Vq(o,i):null!==(a=null===(l=n.resolvedImagePosition)||void 0===l?void 0:l.horizontal)&&void 0!==a?a:"center"},Qq=({cell:e,representation:t,color:n,isNumeric:r,isTotalValueCell:o})=>{const{layoutService:i,styleService:a}=tT(),l=e.isNull?i.getNullValueText():t.text,s=Kq(a,n,r,o,e.isNull);return t.type!==Ke.Image||e.isNull?Ms.jsx("span",{style:{padding:4,...s},children:l}):Ms.jsx(Hq,{representation:t,styleService:a,textStyle:s,isLeftColumn:!0})},Jq=(e,t)=>{var n,r;return null!==(n=null==e||null===(r=e[t])||void 0===r?void 0:r.visibleMeasureInfoIndex)&&void 0!==n?n:0},Zq="flex-start",eF=(e,t)=>{return e.isNull?Zq:t.type===Ke.Image&&"fill"!==t.imageSize?null===(n=t.resolvedImagePosition)||void 0===n?void 0:n.vertical:Zq;var n},tF=({columnIndex:e,rowIndex:t,style:n,data:r})=>{var o;const{env:i}=JP(),{pageInfo:a}=KP(),{styleService:l,layoutService:s}=tT(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:h}}=BO(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=tT(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=BO(),i=r.length,a=o.length;return Sn.useCallback(((r,o)=>{var l,s;return!!(null!==(l=n.grid.at(a-1))&&void 0!==l&&null!==(l=l[r])&&void 0!==l&&l.isTotal||null!==(s=t.grid.at(e?0:i-1))&&void 0!==s&&null!==(s=s[o])&&void 0!==s&&s.isTotal)}),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=BO(),n=t.length;return Sn.useCallback((t=>{var r;const o=null===(r=e.grid.at(n-1))||void 0===r?void 0:r[t];return dq(o,e.totalDividerIndex)}),[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=tT(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=BO(),r=n.length;return Sn.useCallback((n=>{var o;const i=e?0:r-1,a=null===(o=t.grid.at(i))||void 0===o?void 0:o[n];return dq(a,t.totalDividerIndex,e)}),[t,e,r])})(),{showLastBorder:b}=r,v=p.grid.at(h.length-1),x=d.grid.at(f.length-1),{background:w}=l.measureValues,S=null===(o=c[t])||void 0===o?void 0:o[e],E=t===a.rowsOnCurrentPage-1,C=e===s.size.x-1;if(!S)return Ms.jsx(pq,{style:{...n,background:w},isLastRow:E,isLastColumn:C,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const k=s.hasPseudoDimOnLeft?Jq(x,t):Jq(v,e),_=s.visibleMeasureInfo[k],M=bO({cell:S.ref,representationProperties:s.isIndentModeEnabled?{type:Ke.Text}:_.representation,attrExprInfoIndex:u.measures[k],env:i}),R=!S.isNull&&m(e,t),A=S.isNull?s.getNullValueText():M.text,L=!S.isNull||!Number.isNaN(+A),I=vO(u.measures[k],S.ref),D={...Yq(l,S.isNull,R,I.background),...lR(E,C,l.grid.border,b),...uR({bottomDivider:y(t),rightDivider:g(e),borderColor:l.grid.divider}),...rR,padding:"0px 4px",display:"flex",justifyContent:Xq(S,_,M,L)};return Ms.jsx("div",{className:ct,title:A,style:{...D,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Ms.jsx(fq,{width:hq(M),verticalAlign:eF(S,M),children:Ms.jsx(Qq,{cell:S,representation:M,isNumeric:L,isTotalValueCell:R,color:I.color})})})};var nF=En.memo(tF,XN);const rF=(e,t)=>{var n,r;return null!==(n=null===(r=t.list[e])||void 0===r?void 0:r.id)&&void 0!==n?n:e.toString()},oF=({columnIndex:e,rowIndex:t,data:n})=>{var r,o;return null!==(r=null===(o=n.grid[t])||void 0===o||null===(o=o[e])||void 0===o?void 0:o.id)&&void 0!==r?r:`${t}-${e}`},iF={...nR,overflow:"hidden",boxSizing:"content-box",borderWidth:"1px 0px 0px 1px"},aF=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:l})=>{const{pageInfo:s}=KP(),{layoutService:u,styleService:{grid:{divider:c},contentCellHeight:d}}=tT(),{dataModel:p,gridSectionsData:{measureData:f}}=BO(),h={...iF,borderColor:c,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},m=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=KP(),{downloadService:r,viewService:o,layoutService:i}=tT(),{dataModel:a,gridSectionsData:{leftDimensionData:l,topDimensionData:s,measureData:u}}=BO(),c=l.columnCount,d=s.rowCount;return Sn.useCallback((async({overscanColumnStartIndex:l,overscanColumnStopIndex:s,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=l,o.gridRowStartIndex=p,o.gridWidth=s-l+1,o.gridHeight=f-p+1;const h=o.gridWidth+c+(t.current===lt.None?0:QN),m=o.gridHeight+d+(e.current===lt.None?0:QN);let g=uq;m*h>1500&&(g=cq),g(a,i,u,n,o,e,t,r)}),[o,i,a,u,e,t,n,c,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:l});return TR((()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)}),[e,p,f]),Sn.useLayoutEffect((()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})}),[r,t,e,d]),0===u.size.x?null:Ms.jsx(FN,{"data-section-id":"DATA_GRID",ref:e,style:h,columnCount:u.size.x,columnWidth:i,height:t,rowCount:s.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:f},onItemsRendered:m,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:oF,children:nF})};var lF=Sn.memo(aF);function sF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const uF=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sF(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("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"}),En.createElement("use",{fillRule:"evenodd"})),cF=Sn.forwardRef(uF),dF=e=>{const[t,n]=Sn.useState(!1);return TR((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},pF=()=>{const[e,t]=Sn.useState(!1),{dataModel:n}=BO(),{interactions:r}=JP(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=dF([n]);return{open:e,setOpen:t,handleOpenMenu:e=>r.active&&!wq(e)&&!o&&t(!0),setIsAdjustingWidth:i}};function fF(e,t){var n,r;const o=null!==(n=null===(r=t.expressionColor)||void 0===r?void 0:r.background)&&void 0!==n?n:e.dimensionValues.background,i=t.isLeftColumn?e.header.background:o,a=i===ZM.Transparent?o_.WHITE:i,l=I(e.grid.border),s=I(a);return s.isInvalid()||l.isInvalid()||1===l.a?e.grid.border:function(e,t,n){return I(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(s,l,l.a).getRGB()}const hF=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{var l;const{interactions:s,translator:u}=JP(),{isActive:c}=kq(),{dataModel:d}=BO(),{styleService:p}=tT(),[,f]=Sn.useState({});if(!(e.canBeResized&&!!s.active&&!c))return null;const h=fF(p,e);return Ms.jsx(QI,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{var n;i?null==d||d.applyIndentModeColumnWidth({...t,pixels:Math.min((null!=a?a:0)*HO,null!==(n=t.pixels)&&void 0!==n?n:0)}):null==d||d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:null!==(l=e.label)&&void 0!==l?l:""}})};function mF(e){return cL(e)}const gF=e=>e.scrollTop;function yF(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}function bF(e){return tl("MuiPaper",e)}nl("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const vF=["className","component","elevation","square","variant"],xF=HI("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return Rt({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&Rt({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${xL("#fff",UI(t.elevation))}, ${xL("#fff",UI(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),wF=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:l="elevation"}=n,s=Ot(n,vF),u=Rt({},n,{component:o,elevation:i,square:a,variant:l}),c=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Qa({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},bF,o)})(u);return Ms.jsx(xF,Rt({as:o,ownerState:u,className:ll(c.root,r),ref:t},s))}));var SF=wF;var EF=nl("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const CF=["center","classes","className"];let kF,_F,MF,RF,AF=e=>e;const LF=Vi(kF||(kF=AF`
121
121
  0% {
122
122
  transform: scale(0);
123
123
  opacity: 0.1;
@@ -192,4 +192,4 @@ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,u,c,d,p=e.le
192
192
  }
193
193
  `),EF.rippleVisible,LF,550,(({theme:e})=>e.transitions.easing.easeInOut),EF.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),EF.child,EF.childLeaving,IF,550,(({theme:e})=>e.transitions.easing.easeInOut),EF.childPulsate,DF,(({theme:e})=>e.transitions.easing.easeInOut)),OF=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=Ot(n,CF),[l,s]=Sn.useState([]),u=Sn.useRef(0),c=Sn.useRef(null);Sn.useEffect((()=>{c.current&&(c.current(),c.current=null)}),[l]);const d=Sn.useRef(!1),p=za(),f=Sn.useRef(null),h=Sn.useRef(null),m=Sn.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;s((e=>[...e,Ms.jsx(TF,{classes:{ripple:ll(o.ripple,EF.ripple),rippleVisible:ll(o.rippleVisible,EF.rippleVisible),ripplePulsate:ll(o.ripplePulsate,EF.ripplePulsate),child:ll(o.child,EF.child),childLeaving:ll(o.childLeaving,EF.childLeaving),childPulsate:ll(o.childPulsate,EF.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,c.current=a}),[o]),g=Sn.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const l=a?null:h.current,s=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(s.width/2),c=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-s.left),c=Math.round(n-s.top)}if(i)g=Math.sqrt((2*s.width**2+s.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-c),c)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{m({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:n})},p.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):m({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:n})}),[r,m,p]),y=Sn.useCallback((()=>{g({},{pulsate:!0})}),[g]),b=Sn.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void p.start(0,(()=>{b(e,t)}));f.current=null,s((e=>e.length>0?e.slice(1):e)),c.current=t}),[p]);return Sn.useImperativeHandle(t,(()=>({pulsate:y,start:g,stop:b})),[y,g,b]),Ms.jsx(PF,Rt({className:ll(EF.root,o.root,i),ref:h},a,{children:Ms.jsx($w,{component:null,exit:!0,children:l})}))}));var NF=OF;function qF(e){return tl("MuiButtonBase",e)}var FF=nl("MuiButtonBase",["root","disabled","focusVisible"]);const zF=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],jF=HI("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${FF.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),BF=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:s=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:h,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:b,onKeyDown:v,onKeyUp:x,onMouseDown:w,onMouseLeave:S,onMouseUp:E,onTouchEnd:C,onTouchMove:k,onTouchStart:_,tabIndex:M=0,TouchRippleProps:R,touchRippleRef:A,type:L}=n,I=Ot(n,zF),D=Sn.useRef(null),P=Sn.useRef(null),T=Oa(P,A),{isFocusVisibleRef:O,onFocus:N,onBlur:q,ref:F}=Ya(),[z,j]=Sn.useState(!1);s&&z&&j(!1),Sn.useImperativeHandle(r,(()=>({focusVisible:()=>{j(!0),D.current.focus()}})),[]);const[B,$]=Sn.useState(!1);Sn.useEffect((()=>{$(!0)}),[]);const W=B&&!u&&!s;function H(e,t,n=c){return Ta((r=>{t&&t(r);return!n&&P.current&&P.current[e](r),!0}))}Sn.useEffect((()=>{z&&d&&!u&&B&&P.current.pulsate()}),[u,d,z,B]);const V=H("start",w),G=H("stop",m),U=H("stop",g),Y=H("stop",E),K=H("stop",(e=>{z&&e.preventDefault(),S&&S(e)})),X=H("start",_),Q=H("stop",C),J=H("stop",k),Z=H("stop",(e=>{q(e),!1===O.current&&j(!1),f&&f(e)}),!1),ee=Ta((e=>{D.current||(D.current=e.currentTarget),N(e),!0===O.current&&(j(!0),b&&b(e)),y&&y(e)})),te=()=>{const e=D.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},ne=Sn.useRef(!1),re=Ta((e=>{d&&!ne.current&&z&&P.current&&" "===e.key&&(ne.current=!0,P.current.stop(e,(()=>{P.current.start(e)}))),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),v&&v(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!s&&(e.preventDefault(),h&&h(e))})),oe=Ta((e=>{d&&" "===e.key&&P.current&&z&&!e.defaultPrevented&&(ne.current=!1,P.current.stop(e,(()=>{P.current.pulsate(e)}))),x&&x(e),h&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&h(e)}));let ie=l;"button"===ie&&(I.href||I.to)&&(ie=p);const ae={};"button"===ie?(ae.type=void 0===L?"button":L,ae.disabled=s):(I.href||I.to||(ae.role="button"),s&&(ae["aria-disabled"]=s));const le=Oa(t,F,D),se=Rt({},n,{centerRipple:o,component:l,disabled:s,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:M,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Qa({root:["root",t&&"disabled",n&&"focusVisible"]},qF,o);return n&&r&&(i.root+=` ${r}`),i})(se);return Ms.jsxs(jF,Rt({as:ie,className:ll(ue.root,a),ownerState:se,onBlur:Z,onClick:h,onContextMenu:G,onFocus:ee,onKeyDown:re,onKeyUp:oe,onMouseDown:V,onMouseLeave:K,onMouseUp:Y,onDragLeave:U,onTouchEnd:Q,onTouchMove:J,onTouchStart:X,ref:le,tabIndex:s?-1:M,type:L},ae,I,{children:[i,W?Ms.jsx(NF,Rt({ref:T,center:o},R)):null]}))}));var $F=BF;function WF(e){return tl("MuiTypography",e)}nl("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const HF=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],VF=HI("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${_a(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>Rt({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),GF={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},UF={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},YF=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiTypography"}),r=(e=>UF[e]||e)(n.color),o=XA(Rt({},n,{color:r})),{align:i="inherit",className:a,component:l,gutterBottom:s=!1,noWrap:u=!1,paragraph:c=!1,variant:d="body1",variantMapping:p=GF}=o,f=Ot(o,HF),h=Rt({},o,{align:i,color:r,className:a,component:l,gutterBottom:s,noWrap:u,paragraph:c,variant:d,variantMapping:p}),m=l||(c?"p":p[d]||GF[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Qa({root:["root",i,"inherit"!==e.align&&`align${_a(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},WF,a)})(h);return Ms.jsx(VF,Rt({as:m,ref:t,ownerState:h,className:ll(g.root,a)},f))}));var KF=YF;const XF=Sn.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=Sn.useState(null),l=Oa(Sn.isValidElement(n)?n.ref:null,t);if(Pa((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),Pa((()=>{if(i&&!o)return Da(t,i),()=>{Da(t,null)}}),[t,i,o]),o){if(Sn.isValidElement(n)){const e={ref:l};return Sn.cloneElement(n,e)}return Ms.jsx(Sn.Fragment,{children:n})}return Ms.jsx(Sn.Fragment,{children:i?kw.createPortal(n,i):i})}));var QF=XF;const JF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ZF={entering:{opacity:1},entered:{opacity:1}},ez=Sn.forwardRef((function(e,t){const n=fI(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:s,onEnter:u,onEntered:c,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:y=Nw}=e,b=Ot(e,JF),v=Sn.useRef(null),x=Oa(v,a.ref,t),w=e=>t=>{if(e){const n=v.current;void 0===t?e(n):e(n,t)}},S=w(d),E=w(((e,t)=>{gF(e);const r=yF({style:m,timeout:g,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),C=w(c),k=w(h),_=w((e=>{const t=yF({style:m,timeout:g,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),M=w(f);return Ms.jsx(y,Rt({appear:i,in:s,nodeRef:v,onEnter:E,onEntered:C,onEntering:S,onExit:_,onExited:M,onExiting:k,addEndListener:e=>{o&&o(v.current,e)},timeout:g},b,{children:(e,t)=>Sn.cloneElement(a,Rt({style:Rt({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},ZF[e],m,a.props.style),ref:x},t))}))}));var tz=ez;function nz(e){return tl("MuiBackdrop",e)}nl("MuiBackdrop",["root","invisible"]);const rz=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],oz=HI("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>Rt({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),iz=Sn.forwardRef((function(e,t){var n,r,o;const i=mF({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:s="div",components:u={},componentsProps:c={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=tz,transitionDuration:g}=i,y=Ot(i,rz),b=Rt({},i,{component:s,invisible:d}),v=(e=>{const{classes:t,invisible:n}=e;return Qa({root:["root",n&&"invisible"]},nz,t)})(b),x=null!=(n=f.root)?n:c.root;return Ms.jsx(m,Rt({in:p,timeout:g},y,{children:Ms.jsx(oz,Rt({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:u.Root)?r:s,className:ll(v.root,l,null==x?void 0:x.className),ownerState:Rt({},b,null==x?void 0:x.ownerState),classes:v,ref:t,children:a}))}))}));var az=iz;var lz=nl("MuiBox",["root"]);const sz=dI(),uz=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Ki("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(BA),a=Sn.forwardRef((function(e,a){const l=YA(n),s=XA(e),{className:u,component:c="div"}=s,d=Ot(s,JA);return Ms.jsx(i,Rt({as:c,ref:a,className:ll(u,o?o(r):r),theme:t&&l[t]||l},d))}));return a}({themeId:jR,defaultTheme:sz,defaultClassName:lz.root,generateClassName:Za.generate});var cz=uz;function dz(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function pz(e){return parseInt(Ia(e).getComputedStyle(e).paddingRight,10)||0}function fz(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&dz(e,o)}))}function hz(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function mz(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=La(e);return t.body===e?Ia(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Ka(La(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${pz(r)+e}px`;const t=La(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${pz(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=La(r).body;else{const t=r.parentElement,n=Ia(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const gz=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function yz(e){const t=[],n=[];return Array.from(e.querySelectorAll(gz)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function bz(){return!0}function vz(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=yz,isEnabled:a=bz,open:l}=e,s=Sn.useRef(!1),u=Sn.useRef(null),c=Sn.useRef(null),d=Sn.useRef(null),p=Sn.useRef(null),f=Sn.useRef(!1),h=Sn.useRef(null),m=Oa(t.ref,h),g=Sn.useRef(null);Sn.useEffect((()=>{l&&h.current&&(f.current=!n)}),[n,l]),Sn.useEffect((()=>{if(!l||!h.current)return;const e=La(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(s.current=!0,d.current.focus()),d.current=null)}}),[l]),Sn.useEffect((()=>{if(!l||!h.current)return;const e=La(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(s.current=!0,c.current&&c.current.focus())},n=()=>{const t=h.current;if(null===t)return;if(!e.hasFocus()||!a()||s.current)return void(s.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==c.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==c.current||(n=i(h.current)),n.length>0){var o,l;const e=Boolean((null==(o=g.current)?void 0:o.shiftKey)&&"Tab"===(null==(l=g.current)?void 0:l.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,l,i]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return Ms.jsxs(Sn.Fragment,{children:[Ms.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),Sn.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),Ms.jsx("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})}const xz=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&dz(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);fz(t,e.mount,e.modalRef,r,!0);const o=hz(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=hz(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=mz(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=hz(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&dz(e.modalRef,t),fz(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&dz(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function wz(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=xz,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:s,onClose:u,open:c,rootRef:d}=e,p=Sn.useRef({}),f=Sn.useRef(null),h=Sn.useRef(null),m=Oa(h,d),[g,y]=Sn.useState(!c),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let v=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(v=!1);const x=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),w=()=>{o.mount(x(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},S=Ta((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||La(f.current).body;o.add(x(),e),h.current&&w()})),E=Sn.useCallback((()=>o.isTopModal(x())),[o]),C=Ta((e=>{f.current=e,e&&(c&&E()?w():h.current&&dz(h.current,v))})),k=Sn.useCallback((()=>{o.remove(x(),v)}),[v,o]);Sn.useEffect((()=>()=>{k()}),[k]),Sn.useEffect((()=>{c?S():b&&i||k()}),[c,k,b,i,S]);const _=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&E()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},M=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=sl(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=Rt({},n,t);return Rt({role:"presentation"},r,{onKeyDown:_(r),ref:m})},getBackdropProps:(e={})=>Rt({"aria-hidden":!0},e,{onClick:M(e),open:c}),getTransitionProps:()=>({onEnter:Ra((()=>{y(!1),a&&a()}),null==s?void 0:s.props.onEnter),onExited:Ra((()=>{y(!0),l&&l(),i&&k()}),null==s?void 0:s.props.onExited)}),rootRef:m,portalRef:C,isTopModal:E,exited:g,hasTransition:b}}function Sz(e){return tl("MuiModal",e)}nl("MuiModal",["root","hidden","backdrop"]);const Ez=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Cz=HI("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>Rt({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),kz=HI(az,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),_z=Sn.forwardRef((function(e,t){var n,r,o,i,a,l;const s=mF({name:"MuiModal",props:e}),{BackdropComponent:u=kz,BackdropProps:c,className:d,closeAfterTransition:p=!1,children:f,container:h,component:m,components:g={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:S=!1,disableScrollLock:E=!1,hideBackdrop:C=!1,keepMounted:k=!1,onBackdropClick:_,open:M,slotProps:R,slots:A}=s,L=Ot(s,Ez),I=Rt({},s,{closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:v,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:S,disableScrollLock:E,hideBackdrop:C,keepMounted:k}),{getRootProps:D,getBackdropProps:P,getTransitionProps:T,portalRef:O,isTopModal:N,exited:q,hasTransition:F}=wz(Rt({},I,{rootRef:t})),z=Rt({},I,{exited:q}),j=(e=>{const{open:t,exited:n,classes:r}=e;return Qa({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Sz,r)})(z),B={};if(void 0===f.props.tabIndex&&(B.tabIndex="-1"),F){const{onEnter:e,onExited:t}=T();B.onEnter=e,B.onExited=t}const $=null!=(n=null!=(r=null==A?void 0:A.root)?r:g.Root)?n:Cz,W=null!=(o=null!=(i=null==A?void 0:A.backdrop)?i:g.Backdrop)?o:u,H=null!=(a=null==R?void 0:R.root)?a:y.root,V=null!=(l=null==R?void 0:R.backdrop)?l:y.backdrop,G=dl({elementType:$,externalSlotProps:H,externalForwardedProps:L,getSlotProps:D,additionalProps:{ref:t,as:m},ownerState:z,className:ll(d,null==H?void 0:H.className,null==j?void 0:j.root,!z.open&&z.exited&&(null==j?void 0:j.hidden))}),U=dl({elementType:W,externalSlotProps:V,additionalProps:c,getSlotProps:e=>P(Rt({},e,{onClick:t=>{_&&_(t),null!=e&&e.onClick&&e.onClick(t)}})),className:ll(null==V?void 0:V.className,null==c?void 0:c.className,null==j?void 0:j.backdrop),ownerState:z});return k||M||F&&!q?Ms.jsx(QF,{ref:O,container:h,disablePortal:w,children:Ms.jsxs($,Rt({},G,{children:[!C&&u?Ms.jsx(W,Rt({},U)):null,Ms.jsx(vz,{disableEnforceFocus:v,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:N,open:M,children:Sn.cloneElement(f,B)})]}))}):null}));var Mz=_z;var Rz=nl("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const Az=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Lz(e){return`scale(${e}, ${e**2})`}const Iz={entering:{opacity:1,transform:Lz(1)},entered:{opacity:1,transform:"none"}},Dz="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Pz=Sn.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:s,onEntering:u,onExit:c,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=Nw}=e,g=Ot(e,Az),y=za(),b=Sn.useRef(),v=fI(),x=Sn.useRef(null),w=Oa(x,o.ref,t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(u),C=S(((e,t)=>{gF(e);const{duration:n,delay:r,easing:o}=yF({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[v.transitions.create("opacity",{duration:a,delay:r}),v.transitions.create("transform",{duration:Dz?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)})),k=S(s),_=S(p),M=S((e=>{const{duration:t,delay:n,easing:r}=yF({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[v.transitions.create("opacity",{duration:o,delay:n}),v.transitions.create("transform",{duration:Dz?o:.666*o,delay:Dz?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=Lz(.75),c&&c(e)})),R=S(d);return Ms.jsx(m,Rt({appear:r,in:a,nodeRef:x,onEnter:C,onEntered:k,onEntering:E,onExit:M,onExited:R,onExiting:_,addEndListener:e=>{"auto"===h&&y.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===h?null:h},g,{children:(e,t)=>Sn.cloneElement(o,Rt({style:Rt({opacity:0,transform:Lz(.75),visibility:"exited"!==e||a?void 0:"hidden"},Iz[e],f,o.props.style),ref:w},t))}))}));Pz.muiSupportAuto=!0;var Tz=Pz;function Oz(e){return tl("MuiLink",e)}var Nz=nl("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);const qz={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Fz=({theme:e,ownerState:t})=>{const n=(e=>qz[e]||e)(t.color),r=YR(e,`palette.${n}`,!1)||t.color,o=YR(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:xL(r,.4)};const zz=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],jz=HI(KF,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${_a(n.underline)}`],"button"===n.component&&t.button]}})((({theme:e,ownerState:t})=>Rt({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&Rt({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:Fz({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Nz.focusVisible}`]:{outline:"auto"}}))),Bz=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiLink"}),{className:r,color:o="primary",component:i="a",onBlur:a,onFocus:l,TypographyClasses:s,underline:u="always",variant:c="inherit",sx:d}=n,p=Ot(n,zz),{isFocusVisibleRef:f,onBlur:h,onFocus:m,ref:g}=Ya(),[y,b]=Sn.useState(!1),v=Oa(t,g),x=Rt({},n,{color:o,component:i,focusVisible:y,underline:u,variant:c}),w=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e;return Qa({root:["root",`underline${_a(o)}`,"button"===n&&"button",r&&"focusVisible"]},Oz,t)})(x);return Ms.jsx(jz,Rt({color:o,className:ll(w.root,r),classes:s,component:i,onBlur:e=>{h(e),!1===f.current&&b(!1),a&&a(e)},onFocus:e=>{m(e),!0===f.current&&b(!0),l&&l(e)},ref:v,ownerState:x,variant:c,sx:[...Object.keys(qz).includes(o)?[]:[{color:o}],...Array.isArray(d)?d:[d]]},p))}));var $z=Bz;var Wz=Sn.createContext({});function Hz(e){return tl("MuiList",e)}nl("MuiList",["root","padding","dense","subheader"]);const Vz=["children","className","component","dense","disablePadding","subheader"],Gz=HI("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>Rt({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),Uz=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:l=!1,subheader:s}=n,u=Ot(n,Vz),c=Sn.useMemo((()=>({dense:a})),[a]),d=Rt({},n,{component:i,dense:a,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Qa({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Hz,t)})(d);return Ms.jsx(Wz.Provider,{value:c,children:Ms.jsxs(Gz,Rt({as:i,className:ll(p.root,o),ref:t,ownerState:d},u,{children:[s,r]}))})}));var Yz=Uz;var Kz=nl("MuiListItemIcon",["root","alignItemsFlexStart"]);var Xz=nl("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const Qz=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Jz(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Zz(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ej(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function tj(e,t,n,r,o,i){let a=!1,l=o(e,t,!!t&&n);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const t=!r&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&ej(l,i)&&!t)return l.focus(),!0;l=o(e,l,n)}return!1}const nj=Sn.forwardRef((function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:l=!1,disableListWrap:s=!1,onKeyDown:u,variant:c="selectedMenu"}=e,d=Ot(e,Qz),p=Sn.useRef(null),f=Sn.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Pa((()=>{r&&p.current.focus()}),[r]),Sn.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${Ka(La(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}})),[]);const h=Oa(p,t);let m=-1;Sn.Children.forEach(i,((e,t)=>{Sn.isValidElement(e)?(e.props.disabled||("selectedMenu"===c&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1))):m===t&&(m+=1,m>=i.length&&(m=-1))}));const g=Sn.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===c&&(t.tabIndex=0),Sn.cloneElement(e,t)}return e}));return Ms.jsx(Yz,Rt({role:"menu",ref:h,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=La(t).activeElement;if("ArrowDown"===n)e.preventDefault(),tj(t,r,s,l,Jz);else if("ArrowUp"===n)e.preventDefault(),tj(t,r,s,l,Zz);else if("Home"===n)e.preventDefault(),tj(t,null,s,l,Jz);else if("End"===n)e.preventDefault(),tj(t,null,s,l,Zz);else if(1===n.length){const o=f.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&ej(r,o);o.previousKeyMatched&&(s||tj(t,r,!1,l,Jz,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},d,{children:g}))}));var rj=nj;function oj(e){return tl("MuiPopover",e)}nl("MuiPopover",["root","paper"]);const ij=["onEntering"],aj=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],lj=["slotProps"];function sj(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function uj(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function cj(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function dj(e){return"function"==typeof e?e():e}const pj=HI(Mz,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fj=HI(SF,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),hj=Sn.forwardRef((function(e,t){var n,r,o;const i=mF({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:d,className:p,container:f,elevation:h=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:b,slotProps:v,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=Tz,transitionDuration:S="auto",TransitionProps:{onEntering:E}={},disableScrollLock:C=!1}=i,k=Ot(i.TransitionProps,ij),_=Ot(i,aj),M=null!=(n=null==v?void 0:v.paper)?n:y,R=Sn.useRef(),A=Oa(R,M.ref),L=Rt({},i,{anchorOrigin:s,anchorReference:c,elevation:h,marginThreshold:m,externalPaperSlotProps:M,transformOrigin:x,TransitionComponent:w,transitionDuration:S,TransitionProps:k}),I=(e=>{const{classes:t}=e;return Qa({root:["root"],paper:["paper"]},oj,t)})(L),D=Sn.useCallback((()=>{if("anchorPosition"===c)return u;const e=dj(l),t=(e&&1===e.nodeType?e:La(R.current).body).getBoundingClientRect();return{top:t.top+sj(t,s.vertical),left:t.left+uj(t,s.horizontal)}}),[l,s.horizontal,s.vertical,u,c]),P=Sn.useCallback((e=>({vertical:sj(e,x.vertical),horizontal:uj(e,x.horizontal)})),[x.horizontal,x.vertical]),T=Sn.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===c)return{top:null,left:null,transformOrigin:cj(n)};const r=D();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,u=Ia(dj(l)),d=u.innerHeight-m,p=u.innerWidth-m;if(null!==m&&o<m){const e=o-m;o-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;o-=e,n.vertical+=e}if(null!==m&&i<m){const e=i-m;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:cj(n)}}),[l,c,D,P,m]),[O,N]=Sn.useState(g),q=Sn.useCallback((()=>{const e=R.current;if(!e)return;const t=T(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,N(!0)}),[T]);Sn.useEffect((()=>(C&&window.addEventListener("scroll",q),()=>window.removeEventListener("scroll",q))),[l,C,q]);Sn.useEffect((()=>{g&&q()})),Sn.useImperativeHandle(a,(()=>g?{updatePosition:()=>{q()}}:null),[g,q]),Sn.useEffect((()=>{if(!g)return;const e=Aa((()=>{q()})),t=Ia(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,g,q]);let F=S;"auto"!==S||w.muiSupportAuto||(F=void 0);const z=f||(l?La(dj(l)).body:void 0),j=null!=(r=null==b?void 0:b.root)?r:pj,B=null!=(o=null==b?void 0:b.paper)?o:fj,$=dl({elementType:B,externalSlotProps:Rt({},M,{style:O?M.style:Rt({},M.style,{opacity:0})}),additionalProps:{elevation:h,ref:A},ownerState:L,className:ll(I.paper,null==M?void 0:M.className)}),W=dl({elementType:j,externalSlotProps:(null==v?void 0:v.root)||{},externalForwardedProps:_,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:z,open:g},ownerState:L,className:ll(I.root,p)}),{slotProps:H}=W,V=Ot(W,lj);return Ms.jsx(j,Rt({},V,!il(j)&&{slotProps:H,disableScrollLock:C},{children:Ms.jsx(w,Rt({appear:!0,in:g,onEntering:(e,t)=>{E&&E(e,t),q()},onExited:()=>{N(!1)},timeout:F},k,{children:Ms.jsx(B,Rt({},$,{children:d}))}))}))}));var mj=hj;function gj(e){return tl("MuiMenu",e)}nl("MuiMenu",["root","paper","list"]);const yj=["onEntering"],bj=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],vj={vertical:"top",horizontal:"right"},xj={vertical:"top",horizontal:"left"},wj=HI(mj,{shouldForwardProp:e=>WI(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Sj=HI(fj,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ej=HI(rj,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Cj=Sn.forwardRef((function(e,t){var n,r;const o=mF({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:l,disableAutoFocusItem:s=!1,MenuListProps:u={},onClose:c,open:d,PaperProps:p={},PopoverClasses:f,transitionDuration:h="auto",TransitionProps:{onEntering:m}={},variant:g="selectedMenu",slots:y={},slotProps:b={}}=o,v=Ot(o.TransitionProps,yj),x=Ot(o,bj),w=(()=>{const e=Sn.useContext(aL);return null!=e&&e})(),S=Rt({},o,{autoFocus:i,disableAutoFocusItem:s,MenuListProps:u,onEntering:m,PaperProps:p,transitionDuration:h,TransitionProps:v,variant:g}),E=(e=>{const{classes:t}=e;return Qa({root:["root"],paper:["paper"],list:["list"]},gj,t)})(S),C=i&&!s&&d,k=Sn.useRef(null);let _=-1;Sn.Children.map(a,((e,t)=>{Sn.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===_)&&(_=t))}));const M=null!=(n=y.paper)?n:Sj,R=null!=(r=b.paper)?r:p,A=dl({elementType:y.root,externalSlotProps:b.root,ownerState:S,className:[E.root,l]}),L=dl({elementType:M,externalSlotProps:R,ownerState:S,className:E.paper});return Ms.jsx(wj,Rt({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?vj:xj,slots:{paper:M,root:y.root},slotProps:{root:A,paper:L},open:d,ref:t,transitionDuration:h,TransitionProps:Rt({onEntering:(e,t)=>{k.current&&k.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),m&&m(e,t)}},v),ownerState:S},x,{classes:f,children:Ms.jsx(Ej,Rt({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))},actions:k,autoFocus:i&&(-1===_||s),autoFocusItem:C,variant:g},u,{className:ll(E.list,u.className),children:a}))}))}));var kj=Cj;function _j(e){return tl("MuiMenuItem",e)}var Mj=nl("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const Rj=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Aj=HI($F,{shouldForwardProp:e=>WI(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>Rt({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Mj.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xL(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mj.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xL(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mj.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xL(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xL(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Mj.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mj.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Rz.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Rz.inset}`]:{marginLeft:52},[`& .${Xz.root}`]:{marginTop:0,marginBottom:0},[`& .${Xz.inset}`]:{paddingLeft:36},[`& .${Kz.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&Rt({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Kz.root} svg`]:{fontSize:"1.25rem"}})))),Lj=Sn.forwardRef((function(e,t){const n=mF({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:s,role:u="menuitem",tabIndex:c,className:d}=n,p=Ot(n,Rj),f=Sn.useContext(Wz),h=Sn.useMemo((()=>({dense:i||f.dense||!1,disableGutters:l})),[f.dense,i,l]),m=Sn.useRef(null);Pa((()=>{r&&m.current&&m.current.focus()}),[r]);const g=Rt({},n,{dense:h.dense,divider:a,disableGutters:l}),y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return Rt({},a,Qa({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},_j,a))})(n),b=Oa(m,t);let v;return n.disabled||(v=void 0!==c?c:-1),Ms.jsx(Wz.Provider,{value:h,children:Ms.jsx(Aj,Rt({ref:b,role:u,tabIndex:v,component:o,focusVisibleClassName:ll(y.focusVisible,s),className:ll(y.root,d)},p,{ownerState:g,classes:y}))})}));var Ij=Lj;const Dj=HI(cz,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})((({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}}))),Pj=HI("div")({position:"absolute",left:0,bottom:0}),Tj=HI("div",{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({...tR,justifyContent:null!=e?e:tR.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8}))),Oj=HI("div")((()=>({...tR}))),Nj=HI("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})((({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o}))),qj=HI(kj)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),Fj=HI(Ij,{shouldForwardProp:e=>!["isActive"].includes(e)})((({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:`${e.spacing(.5)}`,margin:`${e.spacing(.25,.5)}`,padding:`${e.spacing(1,1.5)}`,display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:""+(t?"rgba(0, 0, 0, 0.05)":"transparent"),"&:hover":{".indent-mode-dropdown-more":{opacity:1}}}))),zj=HI("span")({textOverflow:"ellipsis",overflow:"hidden"}),jj=HI("div",{shouldForwardProp:e=>"visible"!==e})((({visible:e})=>({opacity:e?1:0,width:20,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"}))),Bj={[iP.Sorting]:!0,[iP.Selections]:!0,[iP.Searching]:!0},$j=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:l,overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:u,tableWidth:c})=>{var d;const p=Sn.useRef(null),{styleService:f,layoutService:h}=tT(),{app:m,interactions:g,embed:y,translator:b,env:v,model:x}=JP(),{fontSize:w,fontFamily:S,fontStyle:E,fontWeight:C,textDecoration:k,color:_,background:M,hoverBackground:R,activeBackground:A}=f.header,L=Sn.useRef(null),{shouldShowLockIcon:I,shouldShowMenuIcon:D}=a,{open:P,setOpen:T,handleOpenMenu:O,setIsAdjustingWidth:N}=pF(),q={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},F={embed:y,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?h.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},z={app:m,qStateName:h.layout.qStateName},{labelTextAlign:j}=null!==(d=h.getDimensionInfo(e.dimensionInfoIndex))&&void 0!==d?d:{},B=Vq(j,"flex-start");return Ms.jsxs(Dj,{className:ct,title:e.label,interactions:g,background:P?A:M,hoverBackground:R,shouldShowMenuIcon:D,isDimension:e.isDim,style:{...t,...rR,...sR(e,o,n,r,f.grid.border),color:_},"data-testid":"title-cell",onClick:O,children:[Ms.jsxs(Tj,{children:[I&&Ms.jsx(Oj,{children:Ms.jsx(cF,{height:12})}),Ms.jsx(Nj,{fontFamily:S,fontSize:w,fontStyle:E,fontWeight:C,textDecoration:k,justifyContent:B,children:Ms.jsx("span",{style:oR,children:e.label})})]}),e.isDim&&Ms.jsxs(Ms.Fragment,{children:[Ms.jsx(sP,{headerData:e,translator:b,anchorRef:L,open:P,setOpen:T,interactions:g,menuAvailabilityFlags:Bj,sortRelatedArgs:q,searchRelatedArgs:F,selectionRelatedArgs:z,shouldShowMenuIcon:D,env:v,model:x&&"setActiveField"in x?x:void 0}),Ms.jsx(Pj,{ref:p}),Ms.jsx(Pj,{ref:L})]}),Ms.jsx(hF,{cellInfo:{...e,isLeftColumn:!0},columnWidth:l,isLastColumn:r,overrideLeftGridWidth:s,setIsAdjustingWidth:N,shouldApplyIndentModeColumnWidth:u,tableWidth:c})]})},Wj=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=tT();return e>0&&t>0?Ms.jsx("div",{style:{...nR,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null};function Hj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Vj=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Hj(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})),Gj=Sn.forwardRef(Vj);function Uj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Yj=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Uj(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),En.createElement("use",{fillRule:"evenodd"})),Kj=Sn.forwardRef(Yj),Xj=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{styleService:r}=tT(),{interactions:o,translator:i}=JP(),{isActive:a}=kq(),{dataModel:l}=BO(),{setIsAdjustingWidth:s}=dF([l]);if(!(!!o.active&&!a))return null;const u=fF(r,{isLeftColumn:!0});return Ms.jsx(QI,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*HO))},confirmWidthCallback:r=>{var o;if(r.type===ht.FitToContent)return void l.applyIndentModeColumnWidth({type:ht.Auto});const i=Math.min(null!==(o=r.pixels)&&void 0!==o?o:t,e*HO);n(i),l.applyIndentModeColumnWidth({type:ht.Pixels,pixels:i})},setIsAdjustingWidth:s,accessibilityRelatedArgs:{translator:i,columnLabel:i.get("SNPivotTable.IndentMode.Rows")}})};function Qj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Jj=(e,t)=>En.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Qj(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),En.createElement("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})),Zj=Sn.forwardRef(Jj),eB=({cell:e,changeSortOrder:t})=>{const n=Sn.useRef(null),r=Sn.useRef(null),{app:o,interactions:i,embed:a,translator:l,env:s,model:u}=JP(),{layoutService:c}=tT(),{open:d,setOpen:p,handleOpenMenu:f}=pF();return Ms.jsxs(Fj,{component:"div",onClick:f,isActive:d,children:[Ms.jsx(zj,{children:e.label}),Ms.jsxs(jj,{className:"indent-mode-dropdown-more",visible:d,children:[Ms.jsx(Zj,{}),e.isDim&&Ms.jsxs(Ms.Fragment,{children:[Ms.jsx(sP,{headerData:e,translator:l,anchorRef:n,open:d,setOpen:p,interactions:i,menuAvailabilityFlags:Bj,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:c.layout.qStateName},shouldShowMenuIcon:!1,env:s,model:u&&"setActiveField"in u?u:void 0}),Ms.jsx(Pj,{ref:r}),Ms.jsx(Pj,{ref:n})]})]})]})},tB=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{var o,i;const a=(null===(o=n.at(-1))||void 0===o?void 0:o.id)===aT,l=e+1<n.length&&(null===(i=n[e+1])||void 0===i?void 0:i.id)===aT;return!(r&&a&&l)&&((null==t?void 0:t.id)!==aT&&e<n.length-1)},nB=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=tT(),{interactions:a,translator:l}=JP(),{dataModel:s,gridSectionsData:{headersData:u}}=BO(),[c,d]=Sn.useState(!1),p=Sn.useRef(null),{headerCellHeight:f}=i,{color:h,background:m,hoverBackground:g,activeBackground:y,fontFamily:b,fontSize:v,fontStyle:x,fontWeight:w,textDecoration:S}=i.header,{isAdjustingWidth:E}=dF([s]),C=e=>e.stopPropagation(),k={height:f,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return Ms.jsxs(Dj,{isDimension:!0,background:c?y:m,interactions:a,hoverBackground:g,style:{...k,...rR,color:h},onClick:e=>a.active&&!wq(e)&&!E&&d(!c),"data-testid":"indentModeHeaderCellWrapper",children:[Ms.jsxs(Tj,{justifyContent:"flex-start",children:[Ms.jsx(Nj,{fontFamily:b,fontSize:v,fontStyle:x,fontWeight:w,textDecoration:S,justifyContent:"flex-start",children:Ms.jsx("span",{style:oR,children:l.get("SNPivotTable.IndentMode.Rows")})}),c?Ms.jsx(Kj,{}):Ms.jsx(Gj,{}),Ms.jsx(Pj,{ref:p})]}),Ms.jsx(qj,{open:c,anchorEl:p.current,children:e.map(((n,r)=>[n&&(null==n?void 0:n.id)!==aT&&Ms.jsx("li",{role:"presentation",onClick:C,onKeyDown:C,children:Ms.jsx(eB,{cell:n,changeSortOrder:t})}),tB({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&Ms.jsx(iD,{"data-testid":"group-divider",variant:"middle"},"divider")]))}),Ms.jsx(Xj,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},rB={display:"grid",width:"fit-content"},oB=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:l})=>{const{layoutService:s}=tT(),{gridSectionsData:{headersData:u}}=BO();return Ms.jsxs("div",{"data-testid":"HEADER_GRID",style:{...rB,gridTemplateColumns:n.map((e=>`${e}px`)).join(" "),gridTemplateRows:u.data.map((()=>`${r}px`)).join(" "),height:a},children:[u.size.y>1&&Ms.jsx(Wj,{columnSpan:u.size.x-1,rowSpan:u.size.y-1}),u.data.map(((a,c)=>{let d=[];if(s.isIndentModeEnabled&&u.size.x>1&&c+1===u.size.y){const n=u.data.at(-1);return d.push(Ms.jsx(nB,{menuItems:n[0],changeSortOrder:o,overrideLeftGridWidth:l,leftGridWidth:t,tableWidth:e},n[0][0].id)),d}return d=a.reduce(((t,a,d)=>{if(a){const p=i(d,a.isLocked,a.label),f=s.isIndentModeEnabled&&1===u.size.x;t.push(Ms.jsx($j,{style:{width:n[d],height:r,gridColumn:s.isIndentModeEnabled&&u.size.x>1?2:d+1,gridRow:c+1,zIndex:u.size.x-d},isLastRow:c===u.size.y-1,isFirstColumn:0===d,isLastColumn:d===u.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:l,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t}),[]),d}))]})};var iB=Sn.memo(oB);const aB=(e,t,n,r)=>{const{layoutService:o}=tT();Sn.useLayoutEffect((()=>{var t;null===(t=e.current)||void 0===t||t.forEach((e=>null==e?void 0:e.resetAfterIndex(0,!0)))}),[e,t,n,r,o])},lB=(e,t)=>{TR((()=>{var t;null===(t=e.current)||void 0===t||t.forEach((e=>null==e?void 0:e.resetAfterIndex(0,!1)))}),[e,t])},sB=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},uB=(e,t,n)=>{var r;const o=n?"flex-start":"center";var i,a;if(e.representation.type===Ke.Image)return null!==(i=null===(a=e.representation.resolvedImagePosition)||void 0===a?void 0:a.horizontal)&&void 0!==i?i:o;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){var l;const{labelTextAlign:n}=null!==(l=t.visibleMeasureInfo[e.visibleMeasureInfoIndex])&&void 0!==l?l:{};return Vq(n,o)}const{textAlign:s}=null!==(r=t.getDimensionInfo(e.dimensionInfoIndex))&&void 0!==r?r:{};return Vq(s,o)},cB=()=>{},dB=({children:e,text:t,reactWindowStyle:n,cell:r,data:o,showTotalCellDivider:i,isLastRow:a,isLastColumn:l,isLeftColumn:s,isCellSelected:u,isAdjustingWidth:c,index:d})=>{var p;const{styleService:f,layoutService:h}=tT(),{interactions:m}=JP(),{isLocked:g,createMouseDownHandler:y,createMouseOverHandler:b}=kq(),{showLastBorder:v}=o,x=g(r)||r.isLockedByDimension,w=!(x||!m.active||!m.select||r.isEmpty||r.isNull||r.isPseudoDimension||r.isTotal||c),S=w?y(d,(e=>sB(e,o))):void 0,E=w?b(d):void 0;return Ms.jsx("div",{className:ct,title:m.passive?t:void 0,style:{...n,...lR(a,l,f.grid.border,v),...uR({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:f.grid.divider}),...rR,padding:"0px 4px",cursor:Oq(w),background:Lq({styleService:f,isCellSelected:u,cell:r,isCellLocked:x}),zIndex:s?void 0:h.size.x-r.x,justifyContent:uB(r,h,s),display:"flex",...h.isIndentModeEnabled&&s&&{paddingLeft:Math.max(4,24*(null!==(p=r.indentLevel)&&void 0!==p?p:0))}},"aria-hidden":"true",onMouseDown:S,onMouseOver:E,onKeyUp:cB,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":r.x,"data-page-x":r.pageX,"data-y":r.y,"data-page-y":r.pageY,"data-cell-type":r.ref.qType,children:e})},pB=e=>e.stopPropagation(),fB=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:pB,style:{pointerEvents:n.active?"auto":"none",color:null!=r?r:void 0,opacity:n.active&&n.passive||r?void 0:.4}}),hB=({href:e,text:t,interactions:n,color:r})=>En.createElement(xC,fB({href:e,text:t,interactions:n,color:r}),t);function mB(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||"default");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 gB(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 yB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gB(Object(n),!0).forEach((function(t){mB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bB=Object.prototype.hasOwnProperty,vB=Object.prototype.toString,xB=Object.defineProperty,wB=Object.getOwnPropertyDescriptor,SB=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===vB.call(e)},EB=function(e){if(!e||"[object Object]"!==vB.call(e))return!1;var t,n=bB.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&bB.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||bB.call(e,t)},CB=function(e,t){xB&&"__proto__"===t.name?xB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},kB=function(e,t){if("__proto__"===t){if(!bB.call(e,t))return;if(wB)return wB(e,t).value}return e[t]},_B=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=kB(l,n),l!==(o=kB(t,n))&&(c&&o&&(EB(o)||(i=SB(o)))?(i?(i=!1,a=r&&SB(r)?r:[]):a=r&&EB(r)?r:{},CB(l,{name:n,newValue:e(c,a,o)})):void 0!==o&&CB(l,{name:n,newValue:o}));return l};function MB(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),l=-1,s=-1;if(-1===a)for(let t=0;t<o.wrappedFields.length;t++)if(s=o.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),l=o.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==s||-1!==l){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:s>=0?e=>e[a].qAttrDims.qValues[s]:l>=0?e=>e[a].qAttrExps.qValues[l]:e=>e[a]}function RB(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 AB(e){let{cache:t,f:n,mainCell:r,p:o,prop:i,page:a,rowIdx:l,row:s,sourceKey:u,target:c,targetProp:d,columnOrder:p}=e,f=r;if(o.field&&o.field!==n){const e=MB(o.field,a,{cache:t},p);if(-1===e)return;f=_B({qRow:l},e(s))}c[d]=RB(o,f,{key:u})}function LB(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(),l=t.key(),s="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=MB(s,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=_B({qRow:b},i(a.qDataPages[t].qMatrix[y])),x=RB(c,v,{key:l});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++)AB({cache:n,f:s,mainCell:v,p:o[i],prop:d[e],props:u,page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:l,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 IB(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 DB(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=TB)):void 0===t&&(t=PB);for(var n,r,o,i,a,l=new qB(e),s=[l];n=s.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)s.push(r=o[i]=new qB(o[i])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(NB)}function PB(e){return e.children}function TB(e){return Array.isArray(e)?e[1]:null}function OB(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function NB(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function qB(e){this.data=e,this.depth=this.height=0,this.parent=null}function FB(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}qB.prototype=DB.prototype={constructor:qB,count:function(){return this.eachAfter(IB)},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],l=[],s=-1;i=a.pop();)if(l.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=l.pop();)e.call(t,i,++s,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 DB(this).eachBefore(OB)},[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 zB={depth:-1},jB={},BB={};function $B(e){return e.id}function WB(e){return e.parentId}function HB(){var e,t=$B,n=WB;function r(r){var o,i,a,l,s,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;GB(e,t-1)&&!GB(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(VB),o=new Set(t).add("");for(const e of n)o.has(e)||(o.add(e),t.push(e),n.push(VB(e)),p.push(BB));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 qB(i),null!=(c=f(i,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?jB:u)),null!=(c=h(i,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<o;++a)if(c=(u=p[a]).parent){if(!(s=m.get(c)))throw new Error("missing: "+c);if(s===jB)throw new Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw new Error("multiple roots");l=u}if(!l)throw new Error("no root");if(null!=e){for(;l.data===BB&&1===l.children.length;)l=l.children[0],--o;for(let e=p.length-1;e>=0&&(u=p[e]).data===BB;--e)u.data=null}if(l.parent=zB,l.eachBefore((function(e){e.depth=e.parent.depth+1,--o})).eachBefore(NB),l.parent=null,o>0)throw new Error("cycle");return l}return r.id=function(e){return arguments.length?(t=FB(e),r):t},r.parentId=function(e){return arguments.length?(n=FB(e),r):n},r.path=function(t){return arguments.length?(e=FB(t),r):e},r}function VB(e){let t=e.length;if(t<2)return"";for(;--t>1&&!GB(e,t););return e.slice(0,t)}function GB(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function UB(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=UB(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]=UB(r,o[e]);return t}n[e]in o&&(o=o[n[e]])}return o}function YB(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,...YB(e[o].children,t-1,n)]);return r}function KB(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=>YB(e.children,r-1,n)}return!1}const XB=/^qDimensionInfo(?:\/(\d+))?/,QB=/^\/?qMeasureInfo\/(\d+)/,JB=/\/qAttrExprInfo\/(\d+)/,ZB=/\/qAttrDimInfo\/(\d+)/;function e$(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 t$(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,l=-1,s=-1,u=-1,c=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,f=e$(n);return XB.test(d)&&(o=!0,i=+XB.exec(d)[1],d=r.replace(XB,"")),QB.test(d)&&("K"===n.qMode?u=+QB.exec(d)[1]:p&&-1!==p.indexOf(-1)?(u=+QB.exec(d)[1],c=0):c=+QB.exec(d)[1],d=d.replace(QB,"")),d&&(ZB.exec(d)?l=+ZB.exec(d)[1]:JB.exec(d)&&(a=+JB.exec(d)[1])),s=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:s+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:l,attrIdx:a}}function n$(e,t){let n,r,o=KB(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 r$(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 o$(e){let{propsArr:t,props:n,item:r,itemData:o,ret:i,sourceKey:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields||[l];let u,c;l.fields&&(u=[],c=[]);for(let n=0;n<s.length;n++){const d=s[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)),l.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 l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(c,r):c})}}const i$=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=UB(r,e);return i&&i[0]?(t.tree=DB(i[0],n.children||(e=>e[o])),t.tree):null};const a$=e=>{let{propsArr:t,props:n,cube:r,cache:o,itemDepthObject:i,f:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields?l.fields:[l];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=n$(i,t$(t.field,{cube:r,cache:o}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function l$(){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",s=!1;for(let e=0;e<o.length;e++){var l;const t=n[o[e]],i="".concat(r,"__").concat(null!==(l=t.qElemNumber)&&void 0!==l?l:t.qElemNo);a[i]||(a[i]=yB({__id:i,__parent:r,qValues:[]},t),s=!0),r=i}if(s)for(let e=0;e<i.length;e++){const t=n[i[e]];a[r].qValues.push(t)}}const s=Object.keys(a).map((e=>a[e])),u=HB().id((e=>e.__id)).parentId((e=>e.__parent))(s);return u}(t):i$(o,n,e);if(!a)return null;const l=a.height,s=[];for(let i=0;i<=l;i++){let a=null;if(i>0)if("S"===o.qMode){let e=e$(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:l,main:u}=r.normalizeConfig(yB(yB({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(l);s[i]={propsArr:c,props:l,main:u};const d=a?t$(a,{cube:o,cache:n}):{fieldDepth:0};a$({propsArr:c,props:l,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=s[c[e].depth].propsArr,n=s[c[e].depth].props,r=s[c[e].depth].main,o=u[e],a=o.data,l=r$(r,a,{key:i});o$({propsArr:t,props:n,item:o,itemData:a,ret:l,sourceKey:i,isTree:!0}),c[e].data=l}return a}function s$(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 l=t.raw(),s=t.key();if(!i$(l,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=t$(u,{cube:l,cache:n}),{nodeFn:h,attrFn:m,valueFn:g}=n$({fieldDepth:0},f);a$({propsArr:p,props:c,cube:l,cache:n,itemDepthObject:f,f:u});const y=!!o[a].trackBy,b=typeof o[a].trackBy,v={},x=[],w=h(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const i=r$(d,n,{key:s});o$({propsArr:p,props:c,item:t,itemData:n,ret:i,sourceKey:s}),y&&r.track({cfg:o[a],itemData:n,obj:i,target:x,tracker:v,trackType:b}),S.push(i)}const E=y?r.collect(x,{main:d,propsArr:p,props:c}):S;i=[...i,...E]}return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var u$=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
194
194
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
195
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,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))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+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],s=c[1]&&c[c.length-1].length){for(m="",y=(d=t[0]).length%s,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%s)&&v<p-s&&(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 c$(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const d$={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"},p$=/%\)?$/,f$=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,h$=/^\(oct\)/i,m$=/^\(dec\)/i,g$=/^\(hex\)/i,y$=/^\(bin\)/i,b$=/^\(rom\)/i,v$=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,x$=/#|0/g;function w$(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 S$(e,t,n){let r;return f$.test(t)?e=w$(e,Number(/\d{2}/.exec(t)[0]),t,n):h$.test(t)?e=w$(e,8,t,n):m$.test(t)?e=w$(e,10,t,n):g$.test(t)?e=w$(e,16,t,n):y$.test(t)?e=w$(e,2,t,n):b$.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(),l=["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+=l[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 E$(e,t,n){const r=c$(e);return n?r:new RegExp(r||"",t)}function C$(e,t,n,r){let o,i,a,l,s,u,c,d,p,f=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=c$(m)),h&&(h=c$(h)),p=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=f.match(p),a=a?a[0]:"",l=a?f.substr(0,f.indexOf(a)):f,s=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(E$(u,"g"),t)),c=n,n=".",c&&(a=a.replace(E$(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(x$)),e.prefix=l||"",e.postfix=s||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=p$.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(E$(t,null,!0),"|").concat(E$(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class k${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 d$;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 k$(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],v$.test(e[0])&&(r.positive.isFunctional=!0),e[1]?v$.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?v$.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const o="U"===this.type;r.positive.isFunctional||C$(r.positive,t,n,o),r.negative&&!r.negative.isFunctional&&C$(r.negative,t,n,o),r.zero&&!r.zero.isFunctional&&C$(r.zero,t,n,o)}formatValue(e){let t,n,r,o,i,a,l,s,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=S$(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(l=0,n=Number(Number(e).toExponential().split("e")[1]);i<=n&&l<t.length;)l++,i=t[l];l>0&&(r=t[l-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,s=c.numericPattern,u=s.split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==s.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=s.split(i)[0];if(n+=i,e=u$(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(l=o.length;l<n;l++)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(s+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),l=0;l<t;l++)s+="#";e=u$(s,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 _$(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,l=Object.create(null),s=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 l[s[c]],delete s[c],u--,c++),l[e]=t,s[u]=e,u++,t),i.get=e=>l[e],i.has=e=>e in l,i.clear=()=>{l=Object.create(null),s=Object.create(null),u=0,c=0},i.size=()=>u,i}function M$(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 k$(...t)}(o,e,t,n,r),a=_$(i.formatValue.bind(i),{toKey:e=>isNaN(e)?e:+e});function l(e){return a(e)}return l.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},l.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},l}const R$="D",A$="T",L$="TS",I$="IV",D$=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],P$=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],T$=["January","February","March","April","May","June","July","August","September","October","November","December"],O$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N$(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function q$(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function F$(e,t){let n,r=function(e){const t=e,n=24*q$(t),r=60*q$(n),o=60*q$(r),i=1e3*q$(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,l=r.s,s=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)||(l+=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:l,f:s,t:c}}class z${constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:D$,qDayNames:P$,qLongMonthNames:T$,qMonthNames:O$}),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={[A$]:r.qTimeFmt||"hh:mm:ss",[R$]:r.qDateFmt||"YYYY-MM-DD",[L$]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new z$(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=F$(e,t));const o=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:N$("".concat(t.year).slice(-2),2),YYY:N$("".concat(t.year).slice(-3),3),def:e=>N$("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:N$("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:N$("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>N$("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>N$("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>N$("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>N$("".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"),l=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 l}}function j$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new z$(...t)}function B$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=j$(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=_$(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==I$?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=j$(o,e,t),r=_$(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 $$(){let e,{meta:t,id:n,key:r,localeInfo:o,fieldExtractor:i,value:a,type:l,sourceField:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===l?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return B$(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"),M$(n,r,o,i,t)}(t,o),p="dimension"===l?"first":(e,t)=>d(t),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>l,origin:()=>s,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 W$(e,t,n,r,o){return(t[e]||[]).map(((t,i)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),l={instance:$$(_B({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return l.attrDims=W$("qAttrDimInfo",t,n,a,_B({},o,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),l.attrExps=W$("qAttrExprInfo",t,n,a,_B({},o,{value:e=>null==e?void 0:e.qNum,type:"measure"})),l.measures=W$("qMeasureInfo",t,n,a,_B({},o,{value:e=>null==e?void 0:e.qValue,type:"measure"})),l}))}function H$(){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=H$.util,a={cache:r,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={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,l,r,i),hierarchy:e=>a.hierarchy(e,l,r,i),_cache:()=>r};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(a.extractor=s$,a.hierarchy=l$,a.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(a.extractor=LB,a.pages=o.qDataPages,a.hierarchy=l$):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},l,r,i);const s="S"===o.qMode?e=>e.qElemNumber:void 0,u="S"===o.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...W$("qDimensionInfo",o,e,"",_B({},a,{value:s,type:"dimension"}))),r.wrappedFields.push(...W$("qMeasureInfo",o,e,"",_B({},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=l.field(t.from),o=$$(yB({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},l,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),l}const V$=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],G$=/\/qDimensionInfo(?:\/(\d+))?/,U$=/\/qMeasureInfo\/(\d+)/,Y$=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,K$=/\/qAttrExprInfo\/(\d+)/,X$=/\/?qHyperCube/,Q$=/\/?qTreeData/,J$=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Z$=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function eW(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={},l=e.isActive();let s=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,o=-1,i="",a=e=>e;X$.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=J$):Q$.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Z$);let l=!0;if(G$.test(e)&&(r=+G$.exec(e)[1]),U$.test(e)&&(o=+U$.exec(e)[1]),Y$.test(e)){o=-1,r=0;const e=+Y$.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),l=!1}if(K$.test(e)){const e=o;if(t){o=0;const a=UB(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+=+K$.exec(n)[1]}else r>-1?(r=-1,o=+K$.exec(n)[1]):o+=+K$.exec(n)[1]+1}return V$.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),l&&(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&&(s=!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&&(s=!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&&(s=!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,l=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||l>=i)&&i>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:l-i})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),s=!!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))),s=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));s=!!n.length,i.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!s&&l)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 tW(e){H$.util=e.data("matrix").util,e.data("q",H$),e.formatter("q-number",M$),e.formatter("q-time",B$)}tW.qBrushHelper=eW,tW.selections=eW;var nW=Object.prototype.hasOwnProperty,rW=Object.prototype.toString,oW=Object.defineProperty,iW=Object.getOwnPropertyDescriptor,aW=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===rW.call(e)},lW=function(e){if(!e||"[object Object]"!==rW.call(e))return!1;var t,n=nW.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&nW.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||nW.call(e,t)},sW=function(e,t){oW&&"__proto__"===t.name?oW(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},uW=function(e,t){if("__proto__"===t){if(!nW.call(e,t))return;if(iW)return iW(e,t).value}return e[t]},cW=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=uW(l,n),l!==(o=uW(t,n))&&(c&&o&&(lW(o)||(i=aW(o)))?(i?(i=!1,a=r&&aW(r)?r:[]):a=r&&lW(r)?r:{},sW(l,{name:n,newValue:e(c,a,o)})):void 0!==o&&sW(l,{name:n,newValue:o}));return l},dW="2.3.0";function pW(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||"default");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 fW(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 hW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fW(Object(n),!0).forEach((function(t){pW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mW(e){return!!e.changedTouches}function gW(e){return"number"==typeof e&&!isNaN(e)}function yW(e){return"number"!=typeof e||isNaN(e)}function bW(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 vW(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function xW(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 wW(e){const[t,n,r,o]=bW(e);return{x:t,y:n,width:r-t,height:o-n}}function SW(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function EW(e){const{x:t,y:n,width:r,height:o,x1:i,x2:a,y1:l,y2:s,cx:u,cy:c,r:d,vertices:p}=e||{};return gW(u)&&gW(c)&&gW(d)?"circle":gW(i)&&gW(a)&&gW(l)&&gW(s)?"line":gW(t)&&gW(n)&&gW(r)&&gW(o)?"rect":gW(t)&&gW(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function CW(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var kW=Math.PI,_W=2*kW,MW=1e-6,RW=_W-MW;function AW(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function LW(){return new AW}function IW(e){return function(){return e}}AW.prototype=LW.prototype={constructor:AW,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,l=n-e,s=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>MW)if(Math.abs(c*l-s*u)>MW&&o){var p=n-i,f=r-a,h=l*l+s*s,m=p*p+f*f,g=Math.sqrt(h),y=Math.sqrt(d),b=o*Math.tan((kW-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>MW&&(this._+="L"+(e+v*u)+","+(t+v*c)),this._+="A"+o+","+o+",0,0,"+ +(c*p>u*f)+","+(this._x1=e+x*l)+","+(this._y1=t+x*s)}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),l=n*Math.sin(r),s=e+a,u=t+l,c=1^i,d=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>MW||Math.abs(this._y1-u)>MW)&&(this._+="L"+s+","+u),n&&(d<0&&(d=d%_W+_W),d>RW?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):d>MW&&(this._+="A"+n+","+n+",0,"+ +(d>=kW)+","+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 DW=Math.abs,PW=Math.atan2,TW=Math.cos,OW=Math.max,NW=Math.min,qW=Math.sin,FW=Math.sqrt,zW=1e-12,jW=Math.PI,BW=jW/2,$W=2*jW;function WW(e){return e>=1?BW:e<=-1?-BW:Math.asin(e)}function HW(e){return e.innerRadius}function VW(e){return e.outerRadius}function GW(e){return e.startAngle}function UW(e){return e.endAngle}function YW(e){return e&&e.padAngle}function KW(e,t,n,r,o,i,a){var l=e-n,s=t-r,u=(a?i:-i)/FW(l*l+s*s),c=u*s,d=-u*l,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,w=o-i,S=p*m-h*f,E=(v<0?-1:1)*FW(OW(0,w*w*x-S*S)),C=(S*v-b*E)/x,k=(-S*b-v*E)/x,_=(S*v+b*E)/x,M=(-S*b+v*E)/x,R=C-g,A=k-y,L=_-g,I=M-y;return R*R+A*A>L*L+I*I&&(C=_,k=M),{cx:C,cy:k,x01:-c,y01:-d,x11:C*(o/w-1),y11:k*(o/w-1)}}function XW(){var e=HW,t=VW,n=IW(0),r=null,o=GW,i=UW,a=YW,l=null;function s(){var s,u,c=+e.apply(this,arguments),d=+t.apply(this,arguments),p=o.apply(this,arguments)-BW,f=i.apply(this,arguments)-BW,h=DW(f-p),m=f>p;if(l||(l=s=LW()),d<c&&(u=d,d=c,c=u),d>zW)if(h>$W-zW)l.moveTo(d*TW(p),d*qW(p)),l.arc(0,0,d,p,f,!m),c>zW&&(l.moveTo(c*TW(f),c*qW(f)),l.arc(0,0,c,f,p,m));else{var g,y,b=p,v=f,x=p,w=f,S=h,E=h,C=a.apply(this,arguments)/2,k=C>zW&&(r?+r.apply(this,arguments):FW(c*c+d*d)),_=NW(DW(d-c)/2,+n.apply(this,arguments)),M=_,R=_;if(k>zW){var A=WW(k/c*qW(C)),L=WW(k/d*qW(C));(S-=2*A)>zW?(x+=A*=m?1:-1,w-=A):(S=0,x=w=(p+f)/2),(E-=2*L)>zW?(b+=L*=m?1:-1,v-=L):(E=0,b=v=(p+f)/2)}var I=d*TW(b),D=d*qW(b),P=c*TW(w),T=c*qW(w);if(_>zW){var O,N=d*TW(v),q=d*qW(v),F=c*TW(x),z=c*qW(x);if(h<jW&&(O=function(e,t,n,r,o,i,a,l){var s=n-e,u=r-t,c=a-o,d=l-i,p=d*s-c*u;if(!(p*p<zW))return[e+(p=(c*(t-i)-d*(e-o))/p)*s,t+p*u]}(I,D,F,z,N,q,P,T))){var j=I-O[0],B=D-O[1],$=N-O[0],W=q-O[1],H=1/qW(function(e){return e>1?0:e<-1?jW:Math.acos(e)}((j*$+B*W)/(FW(j*j+B*B)*FW($*$+W*W)))/2),V=FW(O[0]*O[0]+O[1]*O[1]);M=NW(_,(c-V)/(H-1)),R=NW(_,(d-V)/(H+1))}}E>zW?R>zW?(g=KW(F,z,I,D,d,R,m),y=KW(N,q,P,T,d,R,m),l.moveTo(g.cx+g.x01,g.cy+g.y01),R<_?l.arc(g.cx,g.cy,R,PW(g.y01,g.x01),PW(y.y01,y.x01),!m):(l.arc(g.cx,g.cy,R,PW(g.y01,g.x01),PW(g.y11,g.x11),!m),l.arc(0,0,d,PW(g.cy+g.y11,g.cx+g.x11),PW(y.cy+y.y11,y.cx+y.x11),!m),l.arc(y.cx,y.cy,R,PW(y.y11,y.x11),PW(y.y01,y.x01),!m))):(l.moveTo(I,D),l.arc(0,0,d,b,v,!m)):l.moveTo(I,D),c>zW&&S>zW?M>zW?(g=KW(P,T,N,q,c,-M,m),y=KW(I,D,F,z,c,-M,m),l.lineTo(g.cx+g.x01,g.cy+g.y01),M<_?l.arc(g.cx,g.cy,M,PW(g.y01,g.x01),PW(y.y01,y.x01),!m):(l.arc(g.cx,g.cy,M,PW(g.y01,g.x01),PW(g.y11,g.x11),!m),l.arc(0,0,c,PW(g.cy+g.y11,g.cx+g.x11),PW(y.cy+y.y11,y.cx+y.x11),m),l.arc(y.cx,y.cy,M,PW(y.y11,y.x11),PW(y.y01,y.x01),!m))):l.arc(0,0,c,w,x,m):l.lineTo(P,T)}else l.moveTo(0,0);if(l.closePath(),s)return l=null,s+""||null}return s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-jW/2;return[TW(r)*n,qW(r)*n]},s.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:IW(+t),s):e},s.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:IW(+e),s):t},s.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:IW(+e),s):n},s.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:IW(+e),s):r},s.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:IW(+e),s):o},s.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:IW(+e),s):i},s.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:IW(+e),s):a},s.context=function(e){return arguments.length?(l=null==e?null:e,s):l},s}function QW(e){this._context=e}function JW(e){return new QW(e)}function ZW(e){return e[0]}function eH(e){return e[1]}function tH(){var e=ZW,t=null,n=IW(0),r=eH,o=IW(!0),i=null,a=JW,l=null;function s(s){var u,c,d,p,f,h=s.length,m=!1,g=new Array(h),y=new Array(h);for(null==i&&(l=a(f=LW())),u=0;u<=h;++u){if(!(u<h&&o(p=s[u],u,s))===m)if(m=!m)c=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),d=u-1;d>=c;--d)l.point(g[d],y[d]);l.lineEnd(),l.areaEnd()}m&&(g[u]=+e(p,u,s),y[u]=+n(p,u,s),l.point(t?+t(p,u,s):g[u],r?+r(p,u,s):y[u]))}if(f)return l=null,f+""||null}function u(){return function(){var e=ZW,t=eH,n=IW(!0),r=null,o=JW,i=null;function a(a){var l,s,u,c=a.length,d=!1;for(null==r&&(i=o(u=LW())),l=0;l<=c;++l)!(l<c&&n(s=a[l],l,a))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(s,l,a),+t(s,l,a));if(u)return i=null,u+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:IW(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:IW(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:IW(!!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 s.x=function(n){return arguments.length?(e="function"==typeof n?n:IW(+n),t=null,s):e},s.x0=function(t){return arguments.length?(e="function"==typeof t?t:IW(+t),s):e},s.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:IW(+e),s):t},s.y=function(e){return arguments.length?(n="function"==typeof e?e:IW(+e),r=null,s):n},s.y0=function(e){return arguments.length?(n="function"==typeof e?e:IW(+e),s):n},s.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:IW(+e),s):r},s.lineX0=s.lineY0=function(){return u().x(e).y(n)},s.lineY1=function(){return u().x(e).y(r)},s.lineX1=function(){return u().x(t).y(n)},s.defined=function(e){return arguments.length?(o="function"==typeof e?e:IW(!!e),s):o},s.curve=function(e){return arguments.length?(a=e,null!=i&&(l=a(i)),s):a},s.context=function(e){return arguments.length?(null==e?i=l=null:l=a(i=e),s):i},s}function nH(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function rH(e){return e}QW.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 oH=Array.prototype.slice;function iH(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 aH(e){this._context=e}function lH(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 sH(e,t){this._context=e,this._k=(1-t)/6}aH.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:iH(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:iH(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},sH.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:lH(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:lH(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 uH=function e(t){function n(e){return new sH(e,t)}return n.tension=function(t){return e(+t)},n}(0);function cH(e,t){this._context=e,this._alpha=t}cH.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 l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,s=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/s,o=(o*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/s}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 dH=function e(t){function n(e){return t?new cH(e,t):new sH(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function pH(e){return e<0?-1:1}function fH(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),l=(i*o+a*r)/(r+o);return(pH(i)+pH(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(l))||0}function hH(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mH(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,o+l*t,i-l,a-l*n,i,a)}function gH(e){this._context=e}function yH(e){this._context=new bH(e)}function bH(e){this._context=e}function vH(e){this._context=e}function xH(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 wH(e,t){this._context=e,this._t=t}function SH(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],l=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function EH(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function CH(e,t){return e[t]}function kH(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 _H(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function MH(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 l(e){return o[e]||i.get(e)}function s(e,o){if(void 0!==o)return a(e,o);const i=l(e);return r&&void 0===i&&r.warn("".concat(e," does not exist in ").concat(n," registry")),i||l(t)}return t=i.default(),s.add=a,s.get=l,s.has=function(e){return!!o[e]||i.has(e)},s.remove=function(e){const t=o[e];return delete o[e],t},s.getKeys=function(){return Object.keys(o)},s.getValues=function(){return Object.keys(o).map((e=>o[e]))},s.default=function(e){return void 0!==e&&(t=e),t},s.register=a,s}function RH(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 AH(e){return(e=RH(Math.abs(e)))?e[1]:NaN}gH.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:mH(this,this._t0,hH(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,mH(this,hH(this,n=fH(this,e,t)),n);break;default:mH(this,this._t0,n=fH(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(yH.prototype=Object.create(gH.prototype)).point=function(e,t){gH.prototype.point.call(this,t,e)},bH.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)}},vH.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=xH(e),o=xH(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)}},wH.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 LH,IH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function DH(e){if(!(t=IH.exec(e)))throw new Error("invalid format: "+e);var t;return new PH({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 PH(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 TH(e,t){var n=RH(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")}DH.prototype=PH.prototype,PH.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 OH={"%":(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)=>TH(100*e,t),r:TH,s:function(e,t){var n=RH(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(LH=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")+RH(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function NH(e){return e}var qH,FH,zH,jH=Array.prototype.map,BH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $H(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?NH:(t=jH.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,l=t[0],s=0;o>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),i.push(e.substring(o-=l,o+l)),!((s+=l+1)>r));)l=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+"",l=void 0===e.numerals?NH:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(jH.call(e.numerals,String)),s=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=DH(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"):OH[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)?s:"",w=OH[b],S=/[defgprs%]/.test(b);function E(e){var o,i,s,p=v,E=x;if("c"===b)E=w(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:w(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)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:u:"-"===d||"("===d?"":d)+p,E=("s"===b?BH[8+LH/3]:"")+E+(C&&"("===d?")":""),S)for(o=-1,i=e.length;++o<i;)if(48>(s=e.charCodeAt(o))||s>57){E=(46===s?a+e.slice(o+1):e.slice(o))+E,e=e.slice(0,o);break}}m&&!f&&(e=r(e,1/0));var k=p.length+e.length+E.length,_=k<h?new Array(h-k+1).join(t):"";switch(m&&f&&(e=r(_+e,_.length?h-E.length:1/0),_=""),n){case"<":e=p+e+E+_;break;case"=":e=p+_+e+E;break;case"^":e=_.slice(0,k=_.length>>1)+p+e+E+_.slice(k);break;default:e=_+p+e+E}return l(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return e+""},E}return{format:d,formatPrefix:function(e,t){var n=d(((e=DH(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(AH(t)/3))),o=Math.pow(10,-r),i=BH[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){qH=$H(e),FH=qH.format,zH=qH.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const WH=new Date,HH=new Date;function VH(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 l;do{a.push(l=new Date(+n)),t(n,i),e(n)}while(l<n&&n<r);return a},o.filter=n=>VH((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)=>(WH.setTime(+t),HH.setTime(+r),e(WH),e(HH),Math.floor(n(WH,HH))),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 GH=6e4,UH=864e5,YH=6048e5,KH=VH((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*GH)/UH),(e=>e.getDate()-1));KH.range;const XH=VH((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/UH),(e=>e.getUTCDate()-1));XH.range;const QH=VH((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/UH),(e=>Math.floor(e/UH)));function JH(e){return VH((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())*GH)/YH))}QH.range;const ZH=JH(0),eV=JH(1),tV=JH(2),nV=JH(3),rV=JH(4),oV=JH(5),iV=JH(6);function aV(e){return VH((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)/YH))}ZH.range,eV.range,tV.range,nV.range,rV.range,oV.range,iV.range;const lV=aV(0),sV=aV(1),uV=aV(2),cV=aV(3),dV=aV(4),pV=aV(5),fV=aV(6);lV.range,sV.range,uV.range,cV.range,dV.range,pV.range,fV.range;const hV=VH((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()));hV.every=e=>isFinite(e=Math.floor(e))&&e>0?VH((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,hV.range;const mV=VH((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 gV(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yV(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bV(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=gV,n=(t,n)=>gV(e(t),n),r=(t,n)=>e(t)-n):(t=e===gV||e===yV?e:vV,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 vV(){return 0}mV.every=e=>isFinite(e=Math.floor(e))&&e>0?VH((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,mV.range;const xV=bV(gV).right;bV((function(e){return null===e?NaN:+e})).center;var wV=xV;class SV extends Map{constructor(e,t=CV){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(EV(this,e))}has(e){return super.has(EV(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 EV({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function CV(e){return null!==e&&"object"==typeof e?e.valueOf():e}const kV=Math.sqrt(50),_V=Math.sqrt(10),MV=Math.sqrt(2);function RV(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>=kV?10:i>=_V?5:i>=MV?2:1;let l,s,u;return o<0?(u=Math.pow(10,-o)/a,l=Math.round(e*u),s=Math.round(t*u),l/u<e&&++l,s/u>t&&--s,u=-u):(u=Math.pow(10,o)*a,l=Math.round(e/u),s=Math.round(t/u),l*u<e&&++l,s*u>t&&--s),s<l&&.5<=n&&n<2?RV(e,t,2*n):[l,s,u]}function AV(e,t,n){return RV(e=+e,t=+t,n=+n)[2]}function LV(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 IV(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 DV(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function PV(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,l=e.months,s=e.shortMonths,u=jV(o),c=BV(o),d=jV(i),p=BV(i),f=jV(a),h=BV(a),m=jV(l),g=BV(l),y=jV(s),b=BV(s),v={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:null,d:sG,e:sG,f:fG,g:CG,G:_G,H:uG,I:cG,j:dG,L:pG,m:hG,M:mG,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:KG,s:XG,S:gG,u:yG,U:bG,V:xG,w:wG,W:SG,x:null,X:null,y:EG,Y:kG,Z:MG,"%":YG},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return l[e.getUTCMonth()]},c:null,d:RG,e:RG,f:PG,g:HG,G:GG,H:AG,I:LG,j:IG,L:DG,m:TG,M:OG,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:KG,s:XG,S:NG,u:qG,U:FG,V:jG,w:BG,W:$G,x:null,X:null,y:WG,Y:VG,Z:UG,"%":YG},w={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 C(e,t,n,r)},d:JV,e:JV,f:oG,g:YV,G:UV,H:eG,I:eG,j:ZV,L:rG,m:QV,M:tG,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:XV,Q:aG,s:lG,S:nG,u:WV,U:HV,V:VV,w:$V,W:GV,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:YV,Y:UV,Z:KV,"%":iG};function S(e,t){return function(n){var r,o,i,a=[],l=-1,s=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++l<u;)37===e.charCodeAt(l)&&(a.push(e.slice(s,l)),null!=(o=TV[r=e.charAt(++l)])?r=e.charAt(++l):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),s=l+1);return a.push(e.slice(s,l)),a.join("")}}function E(e,t){return function(n){var r,o,i=DV(1900,void 0,1);if(C(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=IV(DV(i.y,0,1))).getUTCDay(),r=o>4||0===o?sV.ceil(r):sV(r),r=XH.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=LV(DV(i.y,0,1))).getDay(),r=o>4||0===o?eV.ceil(r):eV(r),r=KH.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?IV(DV(i.y,0,1)).getUTCDay():LV(DV(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,IV(i)):LV(i)}}function C(e,t,n,r){for(var o,i,a=0,l=t.length,s=n.length;a<l;){if(r>=s)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in TV?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=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}var TV={"-":"",_:" ",0:"0"},OV=/^\s*\d+/,NV=/^%/,qV=/[\\^$*+?|[\]().{}]/g;function FV(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 zV(e){return e.replace(qV,"\\$&")}function jV(e){return new RegExp("^(?:"+e.map(zV).join("|")+")","i")}function BV(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function $V(e,t,n){var r=OV.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WV(e,t,n){var r=OV.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function HV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function VV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function GV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function UV(e,t,n){var r=OV.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function YV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function KV(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 XV(e,t,n){var r=OV.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function QV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function JV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ZV(e,t,n){var r=OV.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eG(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tG(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nG(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rG(e,t,n){var r=OV.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function oG(e,t,n){var r=OV.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iG(e,t,n){var r=NV.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aG(e,t,n){var r=OV.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function lG(e,t,n){var r=OV.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sG(e,t){return FV(e.getDate(),t,2)}function uG(e,t){return FV(e.getHours(),t,2)}function cG(e,t){return FV(e.getHours()%12||12,t,2)}function dG(e,t){return FV(1+KH.count(hV(e),e),t,3)}function pG(e,t){return FV(e.getMilliseconds(),t,3)}function fG(e,t){return pG(e,t)+"000"}function hG(e,t){return FV(e.getMonth()+1,t,2)}function mG(e,t){return FV(e.getMinutes(),t,2)}function gG(e,t){return FV(e.getSeconds(),t,2)}function yG(e){var t=e.getDay();return 0===t?7:t}function bG(e,t){return FV(ZH.count(hV(e)-1,e),t,2)}function vG(e){var t=e.getDay();return t>=4||0===t?rV(e):rV.ceil(e)}function xG(e,t){return e=vG(e),FV(rV.count(hV(e),e)+(4===hV(e).getDay()),t,2)}function wG(e){return e.getDay()}function SG(e,t){return FV(eV.count(hV(e)-1,e),t,2)}function EG(e,t){return FV(e.getFullYear()%100,t,2)}function CG(e,t){return FV((e=vG(e)).getFullYear()%100,t,2)}function kG(e,t){return FV(e.getFullYear()%1e4,t,4)}function _G(e,t){var n=e.getDay();return FV((e=n>=4||0===n?rV(e):rV.ceil(e)).getFullYear()%1e4,t,4)}function MG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+FV(t/60|0,"0",2)+FV(t%60,"0",2)}function RG(e,t){return FV(e.getUTCDate(),t,2)}function AG(e,t){return FV(e.getUTCHours(),t,2)}function LG(e,t){return FV(e.getUTCHours()%12||12,t,2)}function IG(e,t){return FV(1+XH.count(mV(e),e),t,3)}function DG(e,t){return FV(e.getUTCMilliseconds(),t,3)}function PG(e,t){return DG(e,t)+"000"}function TG(e,t){return FV(e.getUTCMonth()+1,t,2)}function OG(e,t){return FV(e.getUTCMinutes(),t,2)}function NG(e,t){return FV(e.getUTCSeconds(),t,2)}function qG(e){var t=e.getUTCDay();return 0===t?7:t}function FG(e,t){return FV(lV.count(mV(e)-1,e),t,2)}function zG(e){var t=e.getUTCDay();return t>=4||0===t?dV(e):dV.ceil(e)}function jG(e,t){return e=zG(e),FV(dV.count(mV(e),e)+(4===mV(e).getUTCDay()),t,2)}function BG(e){return e.getUTCDay()}function $G(e,t){return FV(sV.count(mV(e)-1,e),t,2)}function WG(e,t){return FV(e.getUTCFullYear()%100,t,2)}function HG(e,t){return FV((e=zG(e)).getUTCFullYear()%100,t,2)}function VG(e,t){return FV(e.getUTCFullYear()%1e4,t,4)}function GG(e,t){var n=e.getUTCDay();return FV((e=n>=4||0===n?dV(e):dV.ceil(e)).getUTCFullYear()%1e4,t,4)}function UG(){return"+0000"}function YG(){return"%"}function KG(e){return+e}function XG(e){return Math.floor(+e/1e3)}const QG=MH();QG("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=$H(t),o=r.format(e),this},a(),i.format=function(e,o,i,l){return(i||l)&&(t=i,n=l,a()),r.format(e)(o)},i.pattern=function(t){return t&&(e=t,o=r.format(t)),e},i})),QG("d3-time",(function(e){let t=PV({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=PV(...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 JG={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 QG(t.type||"d3-number")(t.format||"")})(e)};function ZG(e){let{id:t=JG.id,key:n=JG.key,min:r=JG.min,max:o=JG.max,type:i=JG.type,tags:a=JG.tags,title:l=JG.title,values:s=JG.values,value:u=JG.value,label:c=JG.label,formatter:d=JG.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:()=>l(e),items:()=>s(e),formatter:()=>d(e),value:u,label:c}}const eU=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),tU=e=>e.reduce(((e,t)=>e+t),0),nU={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=eU(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=eU(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=eU(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=eU(e),n=t.length;return n?tU(t)/n:NaN}};function rU(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 l=n[a],s=o[a]={};-1!==["number","string","boolean"].indexOf(typeof l)?(s.type="primitive",s.value=l):"function"==typeof l?(s.type="function",s.value=l,s.label=l,s.field=i):"object"==typeof l&&(l.fields?s.fields=l.fields.map((n=>rU(e,t,{main:n},r).main)):void 0!==l.field?(s.type="field",s.field=t.field(l.field),s.value=s.field.value,s.label=s.field.label):i&&(s.value=i.value,s.label=i.label,s.field=i),"function"==typeof l.filter&&(s.filter=l.filter),void 0!==l.value&&(s.value=l.value),void 0!==l.label&&(s.label=l.label),"function"==typeof l.reduce?s.reduce=l.reduce:l.reduce?s.reduce=nU[l.reduce]:s.field&&s.field.reduce&&(s.reduce="string"==typeof s.field.reduce?nU[s.field.reduce]:s.field.reduce),"function"==typeof l.reduceLabel?s.reduceLabel=l.reduceLabel:l.reduceLabel?s.reduceLabel=nU[l.reduceLabel]:s.field&&s.field.reduceLabel&&(s.reduceLabel="string"==typeof s.field.reduceLabel?nU[s.field.reduceLabel]:s.field.reduceLabel))})),o}function oU(e,t){const{main:n}=rU(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:rU(e,t,e.props||{},n),main:n}}function iU(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 l=t.reduce,s=t.reduceLabel,u=l?l(o):o,c={value:u,label:s?s(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 aU(e,t){let{main:n,propsArr:r,props:o}=t,i=[];const a=n.field.formatter(),l={};return r.forEach((e=>{l[e]=o[e].field?o[e].field.formatter():e=>e})),i.push(...e.map((e=>{const t=iU(e.items,n,a);return r.forEach((n=>{t[n]=iU(e.items,o[n],l[n],n)})),t}))),i}function lU(e){let{cfg:t,itemData:n,obj:r,target:o,tracker:i,trackType:a}=e;const l="function"===a?t.trackBy(n):n[t.trackBy];let s=i[l];s||(s=i[l]={items:[],id:l},o.push(s)),s.items.push(r)}function sU(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 uU(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 cU={diverging:function(e,t){if((l=e.length)>0)for(var n,r,o,i,a,l,s=0,u=e[t[0]].length;s<u;++s)for(i=a=0,n=0;n<l;++n)(o=(r=e[t[n]][s])[1]-r[0])>=0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):r[0]=i},none:SH,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,l=0;a<n;++a)l+=e[a][r][1]||0;o[r][1]+=o[r][0]=-l/2}SH(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}SH(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 l=0,s=0,u=0;l<o;++l){for(var c=e[t[l]],d=c[a][1]||0,p=(d-(c[a-1][1]||0))/2,f=0;f<l;++f){var h=e[t[f]];p+=(h[a][1]||0)-(h[a-1][1]||0)}s+=d,u+=p*d}n[a-1][1]+=n[a-1][0]=i,s&&(i-=u/s)}n[a-1][1]+=n[a-1][0]=i,SH(e,t)}}},dU={ascending:function(e){var t=e.map(_H);return EH(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,o=e.map(_H),i=function(e){var t=e.map(kH);return EH(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,l=0,s=[],u=[];for(t=0;t<r;++t)n=i[t],a<l?(a+=o[n],s.push(n)):(l+=o[n],u.push(n));return u.reverse().concat(s)},none:EH,reverse:function(e){return EH(e).reverse()}};function pU(e,t,n){const r={},o=t.stackKey,i=t.value,a=t.startProp||"start",l=t.endProp||"end",s=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=IW([]),t=EH,n=SH,r=CH;function o(o){var i,a,l=e.apply(this,arguments),s=o.length,u=l.length,c=new Array(u);for(i=0;i<u;++i){for(var d,p=l[i],f=c[i]=new Array(s),h=0;h<s;++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:IW(oH.call(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:IW(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?EH:"function"==typeof e?e:IW(oH.call(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?SH:e,o):n},o}().keys(f).value(((e,t)=>e[t]?i(e[t]):0)).order(dU[u]).offset(cU[s]);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[l]={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=ZG({title:b.map((e=>e.title())).join(", "),min:uU(y),max:sU(y),type:"measure",formatter:b[0]?b[0].formatter:void 0});e.fields.push(v)}function fU(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=hW({},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.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&&pU(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 hU(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fU;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 mU(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const gU=Symbol("implicit");function yU(){var e=new SV,t=[],n=[],r=gU;function o(o){let i=e.get(o);if(void 0===i){if(r!==gU)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 SV;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 yU(t,n).unknown(r)},mU.apply(o,arguments),o}function bU(){var e,t,n=yU().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,l=!1,s=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-s+2*u),l&&(e=Math.floor(e)),p+=(f-p-e*(n-s))*c,t=e*(1-s),l&&(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,l=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(l=!!e,d()):l},n.padding=function(e){return arguments.length?(s=Math.min(1,u=+e),d()):s},n.paddingInner=function(e){return arguments.length?(s=Math.min(1,e),d()):s},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 bU(r(),[i,a]).round(l).paddingInner(s).paddingOuter(u).align(c)},mU.apply(d(),arguments)}function vU(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xU(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wU(){}var SU=.7,EU=1/SU,CU="\\s*([+-]?\\d+)\\s*",kU="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_U="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",MU=/^#([0-9a-f]{3,8})$/,RU=new RegExp(`^rgb\\(${CU},${CU},${CU}\\)$`),AU=new RegExp(`^rgb\\(${_U},${_U},${_U}\\)$`),LU=new RegExp(`^rgba\\(${CU},${CU},${CU},${kU}\\)$`),IU=new RegExp(`^rgba\\(${_U},${_U},${_U},${kU}\\)$`),DU=new RegExp(`^hsl\\(${kU},${_U},${_U}\\)$`),PU=new RegExp(`^hsla\\(${kU},${_U},${_U},${kU}\\)$`),TU={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 OU(){return this.rgb().formatHex()}function NU(){return this.rgb().formatRgb()}function qU(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=MU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?FU(t):3===n?new BU(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?zU(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?zU(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=RU.exec(e))?new BU(t[1],t[2],t[3],1):(t=AU.exec(e))?new BU(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=LU.exec(e))?zU(t[1],t[2],t[3],t[4]):(t=IU.exec(e))?zU(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=DU.exec(e))?UU(t[1],t[2]/100,t[3]/100,1):(t=PU.exec(e))?UU(t[1],t[2]/100,t[3]/100,t[4]):TU.hasOwnProperty(e)?FU(TU[e]):"transparent"===e?new BU(NaN,NaN,NaN,0):null}function FU(e){return new BU(e>>16&255,e>>8&255,255&e,1)}function zU(e,t,n,r){return r<=0&&(e=t=n=NaN),new BU(e,t,n,r)}function jU(e,t,n,r){return 1===arguments.length?function(e){return e instanceof wU||(e=qU(e)),e?new BU((e=e.rgb()).r,e.g,e.b,e.opacity):new BU}(e):new BU(e,t,n,null==r?1:r)}function BU(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $U(){return`#${GU(this.r)}${GU(this.g)}${GU(this.b)}`}function WU(){const e=HU(this.opacity);return`${1===e?"rgb(":"rgba("}${VU(this.r)}, ${VU(this.g)}, ${VU(this.b)}${1===e?")":`, ${e})`}`}function HU(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function VU(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function GU(e){return((e=VU(e))<16?"0":"")+e.toString(16)}function UU(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new KU(e,t,n,r)}function YU(e){if(e instanceof KU)return new KU(e.h,e.s,e.l,e.opacity);if(e instanceof wU||(e=qU(e)),!e)return new KU;if(e instanceof KU)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new KU(a,l,s,e.opacity)}function KU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function XU(e){return(e=(e||0)%360)<0?e+360:e}function QU(e){return Math.max(0,Math.min(1,e||0))}function JU(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}vU(wU,qU,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:OU,formatHex:OU,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return YU(this).formatHsl()},formatRgb:NU,toString:NU}),vU(BU,jU,xU(wU,{brighter(e){return e=null==e?EU:Math.pow(EU,e),new BU(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?SU:Math.pow(SU,e),new BU(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new BU(VU(this.r),VU(this.g),VU(this.b),HU(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:$U,formatHex:$U,formatHex8:function(){return`#${GU(this.r)}${GU(this.g)}${GU(this.b)}${GU(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:WU,toString:WU})),vU(KU,(function(e,t,n,r){return 1===arguments.length?YU(e):new KU(e,t,n,null==r?1:r)}),xU(wU,{brighter(e){return e=null==e?EU:Math.pow(EU,e),new KU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?SU:Math.pow(SU,e),new KU(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 BU(JU(e>=240?e-240:e+120,o,r),JU(e,o,r),JU(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new KU(XU(this.h),QU(this.s),QU(this.l),HU(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=HU(this.opacity);return`${1===e?"hsl(":"hsla("}${XU(this.h)}, ${100*QU(this.s)}%, ${100*QU(this.l)}%${1===e?")":`, ${e})`}`}}));var ZU=e=>()=>e;function eY(e){return 1==(e=+e)?tY: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):ZU(isNaN(t)?n:t)}}function tY(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ZU(isNaN(e)?t:e)}var nY=function e(t){var n=eY(t);function r(e,t){var r=n((e=jU(e)).r,(t=jU(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=tY(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 rY(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 oY(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]=dY(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 iY(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function aY(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function lY(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]=dY(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var sY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uY=new RegExp(sY.source,"g");function cY(e,t){var n,r,o,i=sY.lastIndex=uY.lastIndex=0,a=-1,l=[],s=[];for(e+="",t+="";(n=sY.exec(e))&&(r=uY.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:aY(n,r)})),i=uY.lastIndex;return i<t.length&&(o=t.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)l[(n=s[r]).i]=n.x(e);return l.join("")})}function dY(e,t){var n,r=typeof t;return null==t||"boolean"===r?ZU(t):("number"===r?aY:"string"===r?(n=qU(t))?(t=n,nY):cY:t instanceof qU?nY:t instanceof Date?iY:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?rY:Array.isArray(t)?oY:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?lY:aY)(e,t)}function pY(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function fY(e){return+e}var hY=[0,1];function mY(e){return e}function gY(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function yY(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=gY(o,r),i=n(a,i)):(r=gY(r,o),i=n(i,a)),function(e){return i(r(e))}}function bY(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]=gY(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=wV(e,t,1,r)-1;return i[n](o[n](t))}}function vY(){var e,t,n,r,o,i,a=hY,l=hY,s=dY,u=mY;function c(){var e=Math.min(a.length,l.length);return u!==mY&&(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?bY:yY,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),l,s)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=r(l,a.map(e),aY)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,fY),c()):a.slice()},d.range=function(e){return arguments.length?(l=Array.from(e),c()):l.slice()},d.rangeRound=function(e){return l=Array.from(e),s=pY,c()},d.clamp=function(e){return arguments.length?(u=!!e||mY,c()):u!==mY},d.interpolate=function(e){return arguments.length?(s=e,c()):s},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function xY(e,t,n,r){var o,i=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?AV(t,e,n):AV(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=DH(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(AH(t)/3)))-AH(Math.abs(e)))}(i,a))||(r.precision=o),zH(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,AH(t)-AH(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,-AH(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return FH(r)}function wY(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?RV(t,e,n):RV(e,t,n);if(!(i>=o))return[];const l=i-o+1,s=new Array(l);if(r)if(a<0)for(let e=0;e<l;++e)s[e]=(i-e)/-a;else for(let e=0;e<l;++e)s[e]=(i-e)*a;else if(a<0)for(let e=0;e<l;++e)s[e]=(o+e)/-a;else for(let e=0;e<l;++e)s[e]=(o+e)*a;return s}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return xY(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,l=i.length-1,s=i[a],u=i[l],c=10;for(u<s&&(o=s,s=u,u=o,o=a,a=l,l=o);c-- >0;){if((o=AV(s,u,n))===r)return i[a]=s,i[l]=u,t(i);if(o>0)s=Math.floor(s/o)*o,u=Math.ceil(u/o)*o;else{if(!(o<0))break;s=Math.ceil(s*o)/o,u=Math.floor(u*o)/o}r=o}return e},e}function SY(){var e=vY()(mY,mY);return e.copy=function(){return t=e,SY().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},mU.apply(e,arguments),wY(e)}function EY(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[wV(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 EY().domain(t).range(n).unknown(e)},mU.apply(o,arguments)}function CY(e){return void 0===e?e=>e:t=>e(t)}function kY(e){return Math.max(0,Math.min(1,e))}function _Y(e){return"object"==typeof e}function MY(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 RY(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(...MY(t,i,a)),i-=a-i,a=e[o],r.push(...MY(t,i,a))):o===e.length-1&&a!==n.end()?(a=i+(i-e[o-1]),r.push(...MY(t,i,a))):r.push(...MY(t,i,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function AY(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=yW(o)||yW(t)?2:Math.max(t/o,2),l=Math.min(1e3,Math.round(a));let s=n.ticks(l);s.length<=1&&(s=n.ticks(l+1));const u=r>0?RY(s,r,n):s;u.sort(((e,t)=>e-t));const c=u.map(CY(i));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:c[t],value:e,isMinor:-1===s.indexOf(e)}}))}function LY(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=yW(o)||yW(t)?2:Math.max(t/o,2),l=Math.min(1e3,Math.round(a)),s=l>10?10:l;n.nice(s);const u=n.ticks(l),c=r>0?RY(u,r,n):u;c.sort(((e,t)=>e-t));const d=c.map(CY(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 IY(e){let t,{settings:n,scale:r,distance:o,formatter:i=e=>e}=e;const a=n.minorTicks&&!yW(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?!yW(e.value):!yW(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(_Y(e)?e.value:e)-(_Y(t)?t.value:t))).filter(((e,t,r)=>{const o=_Y(e)?e.value:e;return o<=n.max()&&o>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=_Y(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)?kY(n(e.start)):i,end:t&&!isNaN(e.end)?kY(n(e.end)):i}}))}({values:e,scale:r.copy(),formatter:i})}else if(yW(n.ticks.count)){t=(n.ticks.tight?LY:AY)({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 DY(){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 PY={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},TY={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},OY={count:NaN};function NY(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 qY(){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=SY(),o={instance:null,invert:!1},i={data:t,resources:n},a=DY(e,PY,i);let l;function s(e){return yW(e)?NaN:r(e)}a.ticks=DY(e.ticks,TY,i),a.minorTicks=DY(e.minorTicks,OY,i),s.data=()=>t,s.invert=function(e){return r.invert(e)},s.rangeRound=function(e){return r.rangeRound(e),s},s.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),s},s.cachedTicks=function(){return l},s.clearTicksCache=function(){return l=void 0,this},s.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=cW(!0,{},a,e.settings),e.scale=s,l=IY(e),l):(l=r.ticks(e),l)},s.nice=function(e){return r.nice(e),s},s.tickFormat=function(e,t){return r.tickFormat(e,t)},s.interpolate=function(e){return r.interpolate(e),s},s.domain=function(e){return arguments.length?(r.domain(e),o.instance&&o.instance.domain([s.start(),s.end()]),s):r.domain()},s.range=function(e){return arguments.length?(r.range(e),s):r.range()},s.start=function(){return s.domain()[0]},s.end=function(){return s.domain()[this.domain().length-1]},s.min=function(){return Math.min(this.start(),this.end())},s.max=function(){return Math.max(this.start(),this.end())},s.classify=function(e){let t=(s.start()-s.end())/e,n=[s.end()],r=[],o=t/2;for(let i=0;i<e;i++){let e=n[n.length-1]||0,i=e+t,a=s(e+o);n.push(i,i),r.push(a,a)}return n.pop(),s.domain(n),s.range(r),s},s.copy=function(){const o=qY(e,t,n);return o.domain(s.domain()),o.range(s.range()),o.clamp(r.clamp()),o},s.norm=function(e){return NY(o,s),o.instance(e)},s.normInvert=function(e){return NY(o,s),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 s.domain([u,c]),s.range(a.invert?[1,0]:[0,1]),o.invert=a.invert,s}const FY={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function zY(){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=DY(e,FY,n),o=t.items||[],i={},a=[],l=[];function s(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=()=>l,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=bU();s(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,s(a,e);const l=i*n/t,c=(1-l)*u.align();return a.range(r.invert?[l+c,c]:[c,l+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=cW({datum:o[e]},n),r=c(t,e);-1===a.indexOf(r)&&(a.push(r),l.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 jY={depth:0};function BY(e,t,n){return e.ancestors().map((e=>t(cW({datum:e.data},n)))).reverse().slice(1).toString()}const $Y=e=>e.min(),WY=e=>e.max();function HY(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($Y).filter(gW);o=e.length?Math.min(...e):o}if(!r){const e=t.map(WY).filter(gW);i=e.length?Math.max(...e):i}}return[o,i]}const VY={domain:[],range:[],invert:!1,min:NaN,max:NaN};function GY(){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=qY(e,t,n).clamp(!0).interpolate(nY),o=DY(e,VY,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length,l=r;cW(!0,l,r);const[s,u]=HY(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 l.range(o.invert?p.slice().reverse():p.slice()),l.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}(l.range(),s,u)),l}const UY={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function YY(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const KY={domain:[],range:[]};const XY={domain:[],range:[],unknown:void 0},QY={domain:[],range:[],override:!1};const JY=MH();function ZY(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=fU(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}JY("linear",qY),JY("band",zY),JY("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=DY(t,FY,o);i.ticks=DY(t.ticks,jY,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=zY(i);const{values:l,labels:s,items:u,ticks:c}=function(e,t,n){const r=t.ticks.depth,o=t.value,i=t.label,a=[],l=[],s={},u=[];let c=0;if(!e)return{values:a,labels:l,items:s,ticks:u};e.eachAfter((e=>{if(e.depth>0){const t=BY(e,o,n),d=e.leaves()||[e],p=o(cW({datum:e.data},n)),f=i(cW({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:f,leftEdge:BY(d[0],o,n),rightEdge:BY(d[Math.max(d.length-1,0)],o,n),node:e};h?(a.push("SPACER_".concat(c,"_SPACER")),c++):(a.push(t),l.push(f)),(r<=0&&!h||e.depth===r)&&u.push(m),s[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:l,items:s,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)};cW(!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=()=>s,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(l),d})),JY("sequential-color",GY),JY("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=EY(),o=DY(e,UY,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length;function l(e){return yW(e)?NaN:r(e)}Object.keys(r).forEach((e=>l[e]=r[e]));const s=t.fields,[u,c]=HY(o,s),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=SY().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=GY().domain([n,r]).range(t);return[n,...YY(e),r].map((e=>o(e)))}(h,f,u,c)),l.data=()=>t,l.range(o.invert?f.slice().reverse():f),l.domain(h),l})),JY("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=yU(),o={data:t,resources:n},i=DY(e,KY,o),a="function"==typeof e.value?e.value:e=>e.datum.value,l="function"==typeof e.label?e.label:e=>e.datum.label,s=t.items||[],u={},c=[],d=[];for(let e=0;e<s.length;e++){const t=cW({datum:s[e]},o),n=a(t,e);-1===c.indexOf(n)&&(c.push(n),d.push(l(t,e)),u[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[c.indexOf(e)],r.datum=e=>s[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=DY(e,XY,{data:t,resources:n});let a;if(i.explicit=DY(e.explicit,QY,{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 eK={};function tK(){tK.init.call(this)}eK.isObject=function(e){return"object"==typeof e&&null!==e},eK.isNumber=function(e){return"number"==typeof e},eK.isUndefined=function(e){return void 0===e},eK.isFunction=function(e){return"function"==typeof e};var nK=tK;tK.EventEmitter=tK,tK.prototype._events=void 0,tK.prototype._maxListeners=void 0,tK.defaultMaxListeners=10,tK.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},tK.prototype.setMaxListeners=function(e){if(!eK.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},tK.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],eK.isUndefined(n))return!1;if(eK.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(eK.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},tK.prototype.addListener=function(e,t){var n;if(!eK.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,eK.isFunction(t.listener)?t.listener:t),this._events[e]?eK.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,eK.isObject(this._events[e])&&!this._events[e].warned)&&((n=eK.isUndefined(this._maxListeners)?tK.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,eK.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),eK.isFunction(console.trace)&&console.trace()));return this},tK.prototype.on=tK.prototype.addListener,tK.prototype.once=function(e,t){if(!eK.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},tK.prototype.removeListener=function(e,t){var n,r,o,i;if(!eK.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||eK.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(eK.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},tK.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],eK.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},tK.prototype.listeners=function(e){return this._events&&this._events[e]?eK.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},tK.listenerCount=function(e,t){return e._events&&e._events[t]?eK.isFunction(e._events[t])?1:e._events[t].length:0};var rK={mixin:e=>(Object.keys(nK.prototype).forEach((t=>{e[t]=nK.prototype[t]})),nK.init(e),e)};function oK(){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 l=Math.max(e,Math.min(t-r,n));n!==l&&(n=l,a=!0),a&&o.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return rK.mixin(o),o}function iK(e,t){const n=e.min||0,r=e.max||0,o=e.viewSize||0,i=t||oK();return i.update({min:n,max:r,viewSize:o}),i}function aK(e,t){return e<=t}function lK(e,t){return e<t}function sK(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function uK(){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?aK:lK,t=o?aK:lK},o.add=e=>{let{min:t,max:n}=e;const o=sK(r,t),i=sK(r,n,!0),a=[o,i-o];o%2==0&&a.push(t),i%2==0&&a.push(n);const l=r.join(",");r.splice(...a);return l!==r.join(",")},o.remove=e=>{let{min:t,max:n}=e;const o=sK(r,t),i=sK(r,n,!0),a=[o,i-o];o%2==1&&a.push(t),i%2==1&&a.push(n);const l=r.join(",");r.splice(...a);return l!==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=sK(r,t,!0),i=sK(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 cK(){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 dK={key:void 0,includeMin:!0,includeMax:!0};function pK(e){let{items:t,collection:n,vc:r}=e;const o={},i=[];let a,l;for(let e=0,i=t.length;e<i;e++){a=t[e].key,n[a]||(n[a]=r()),l=t[e].values||[t[e].value];for(let e=0;e<l.length;e++)n[a].add(l[e])&&(o[a]=o[a]||[],o[a].push(l[e]))}const s=Object.keys(o);for(let e=0,t=s.length;e<t;e++)a=s[e],i.push({id:a,values:o[a]});return i}function fK(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 l=Object.keys(r);for(let e=0,t=l.length;e<t;e++)i=l[e],o.push({id:i,values:r[i]});return o}function hK(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 mK(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 gK(e,t){const n=[],r=Object.keys(e);let o,i;const a=e=>-1===t[o].indexOf(e);for(let l=0,s=r.length;l<s;l++)o=r[l],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 yK(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?cW({},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 bK(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function vK(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function xK(e,t,n){let{ranges:r,interceptors:o,rc:i,aliases:a,rangeConfig:l}=n;const s=yK(o["".concat(t,"Ranges")],e,a);let u=!1;return s.forEach((e=>{const n=e.key;if(r[n]||(r[n]=i(l.sources[n]||l.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 wK(){let{vc:e=cK,rc:t=uK}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},o={},i={},a={sources:{},default:cW({},dK)};const l={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},s=()=>{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=s();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=s();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=s();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:cW({},dK)},e.ranges.forEach((e=>{const t={};Object.keys(dK).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:dK[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(s())},_state:e=>{if(!e)return s();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=yK(l.addValues,t,i),a=pK({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=yK(l.setValues,t,i),a=function(e){let{items:t,vCollection:n,vc:r}=e;const o={},i=hK(t);let a,l=[],s=[];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)||mK({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 s=gK(u,o),l=gK(o,u),[l,s]}({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=yK(l.removeValues,e,i),n=fK({collection:o,items:t});c.emit("remove-values",t),n.length&&(c.emit("update",[],n),u.updateValues())},c.addAndRemoveValues=(t,r)=>{const a=yK(l.addValues,t,i),s=yK(l.removeValues,r,i),d=pK({vc:e,collection:o,items:a}),p=fK({collection:o,items:s});c.emit("add-values",a),c.emit("remove-values",s),(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=yK(l.toggleValues,t,i),a=function(e){let{items:t,values:n,vc:r}=e;const o={},i={},a=[],l=[],s=hK(t);let u,c,d;const p=Object.keys(s);for(let e=0,t=p.length;e<t;e++){u=p[e],d=s[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)):mK({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],l.push({id:u,values:i[u]});return[a,l]}({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=>{xK(e,"add",{ranges:r,rc:t,interceptors:l,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=>{xK(e,"remove",{ranges:r,rc:t,interceptors:l,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=>{xK(e,"set",{ranges:r,rc:t,interceptors:l,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=>{xK(e,"toggle",{ranges:r,rc:t,interceptors:l,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 l=Object.keys(e);let s,u,c,d;for(let t=0,n=l.length;t<n;t++){if(s=l[t],"value"===s)u=e,a[t]={key:"",i:t,bool:!1};else{if("source"===s)continue;u=e[s],a[t]={key:s,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=bK(e);l[n]&&l[n].push(t)},c.removeInterceptor=(e,t)=>{const n=bK(e);if(!l[n])return;const r=l[n].indexOf(t);-1!==r&&l[n].splice(r,1)},c.removeAllInterceptors=e=>{const t=[];if(e){const n=bK(e);l[n]&&l[n].length&&t.push({name:e,handlers:l[n]})}else Object.keys(l).forEach((e=>{l[e].length&&t.push({name:vK(e),handlers:l[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]},rK.mixin(c),c}function SK(e){return e*e*e}function EK(e){return--e*e*e+1}function CK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}MH();const kK=["stroke","fill","color","backgroundColor","thumbColor"];function _K(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]=MK(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 MK(e,t,n){const r=typeof t;let o;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?aY:"string"===r?(o=qU(t))&&kK.includes(n)?(t=o,nY):cY:t instanceof qU?nY:t instanceof Date?iY:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?rY:Array.isArray(t)?_K:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?RK:aY)(e,t)}function RK(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]=MK(e[o],t[o],o):r[o]=t[o];return function(e){for(o in n)r[o]=n[o](e);return r}}function AK(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const LK={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},IK=/^\$/;function DK(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function PK(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 TK(e,t){return e.pxScale?e.pxScale(t):e}const OK={normalizeSettings:function(e,t,n){const r=cW({},e),o=cW({},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(DK(i)){let n=t[e];"string"==typeof n&&IK.test(n)&&(n=LK[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&&IK.test(n)?o[e]=LK[n]:o[e]=n})),o},resolveForItem:function(e,t,n){const r={},o=Object.keys(t),i=o.length,a=e.datum,l=e.datum;for(let s=0;s<i;s++){const i=o[s],u=t[i],c="object"==typeof l&&void 0!==u,d=c&&"string"==typeof u.ref,p=c&&i in l,f=d?l[u.ref]:p?l[i]:a;DK(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:PK};function NK(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...NK(t.children)),e):(e.push(t),e)),[])}function qK(e,t){let{context:n,data:r,style:o,filter:i,mode:a}=t;const l=e.chart.brush(n),s=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=NK(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 s?s({brush:l}):s;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=l.containsMappedData(n,o,a),i=p.indexOf(e[r]);let s=!1;t&&-1===i?(p.push(e[r]),s=!0):t||-1===i||(p.splice(i,1),s=!0),e[r].needToUpdate=s||f,e[r].isActive=t}for(let o=0;o<t;o++)if(n=e[o].data,n){if(e[o].needToUpdate){const t=cW({},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 l.on("start",g),l.on("end",y),l.on("update",b),{isActive:()=>l.isActive(),update:()=>{p.length=0,f=!0,m()},cleanUp:function(){l.removeListener("start",g),l.removeListener("end",y),l.removeListener("update",b)}}}function FK(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"},l={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),l.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,l.items.push(e))}}))}o.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[l.actionFn](l.items)}))}({dataPoints:i,action:n,chart:r,trigger:o})}function zK(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 l=i.map((e=>e.node));return FK({nodes:l,action:o,chart:r.chart,data:r.data,trigger:n}),a}function jK(e,t,n){const r=n.element().getBoundingClientRect();let o=mW(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&&mW(e)?o={cx:o.x,cy:o.y,r:t.touchRadius}:t.mouseRadius>0&&!mW(e)&&(o={cx:o.x,cy:o.y,r:t.mouseRadius}),n.itemsAt(o))}function BK(e,t,n){return e?"function"==typeof e?e(t):e:n}const $K={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",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 WK(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 HK(e,t,n,r){const o=n/2,i=e-r/2,a=t-r/2,l=e-o,s=t-o;return[{x:i,y:a},{x:i,y:s},{x:i+r,y:s},{x:i+r,y:a},{x:l+n,y:a},{x:l+n,y:a+r},{x:i+r,y:a+r},{x:i+r,y:s+n},{x:i,y:s+n},{x:i,y:a+r},{x:l,y:a+r},{x:l,y:a}]}function VK(e){return-e/180*Math.PI}function GK(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}}(VK(e))}function UK(e,t){return{x:e.x+t.x,y:e.y+t.y}}function YK(e,t){return{x:e.x-t.x,y:e.y-t.y}}function KK(e,t){return{x:e.x*t,y:e.y*t}}function XK(e,t){return e.x-t.x}function QK(e,t){return e.y-t.y}function JK(e,t){return XK(e,t)**2+QK(e,t)**2}function ZK(e,t){return Math.sqrt(JK(e,t))}function eX(e,t){return e.x*t.x+e.y*t.y}function tX(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=YK(e,n);return UK({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}const nX={up:0,down:180,left:90,right:-90};function rX(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 oX=MH();oX.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),oX.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:WK([{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}])}})),oX.add("saltire",(function(e){const t=VK(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 l={x:e.x,y:e.y},s=HK(e.x,e.y,i,o).map((e=>tX(e,t,l)));return{type:"path",fill:"black",d:WK(s)}})),oX.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}})),oX.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=nX[e.direction]||0,o=t/2,i=e.x-o,a=e.y-o;let l=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];const s=VK(r);return l=l.map((e=>tX(e,s,n))),{type:"path",fill:"black",d:WK(l)}})),oX.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:rX(e)}})),oX.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,l=360/o;for(let t=1;t<=o;t++){const o=l*t+a,s=VK(o),u=VK(o+l/2),c=Math.sin(s),d=Math.cos(s),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:WK(n)}})),oX.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=VK(o*a+i),l=Math.sin(r),s=Math.cos(r);t.push({x:e.x+s*n,y:e.y+l*n})}return{type:"path",fill:"black",d:WK(t)}})),oX.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:WK(HK(t,n,e.size,i))}})),oX.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=VK(90);i=i.map((n=>tX(n,e,t)))}const a=wW(i);return a.type="rect",a.fill="black",a})),oX.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 iX=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oX;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!==$K[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function aX(){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:l=!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?(l=e,this):"function"==typeof l?l(t):l}}}function lX(e,t,n){const{require:r=[]}=t,o=t.mediator||{},{settings:i,formatter:a,scale:l,data:s,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:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:i}),Object.defineProperty(e,"data",{get:s}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:l}),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 sX(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 uX(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 cX(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:l,theme:s,renderer:u}=t,c=rK.mixin({});let d,p,f,h,m,g=t.settings||{},y=cW(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OK,n={};return{resolve:function(r){let{data:o,settings:i,defaults:a={},scaled:l}=r;const s=n.norm=t.normalizeSettings(i,a,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};l&&Object.keys(l).forEach((e=>{s[e]&&t.updateScaleSize(s,e,l[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 w={nodes:[],chart:o,config:y.brush||{},renderer:null},S={tap:[],over:[]},E=[],C={},k=cW({},g);function _(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 l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return o&&("function"==typeof e[t]?a=e[t].call(C,...s):r&&(a=e[t])),i&&("function"==typeof g[t]?a=g[t].call(k,...s):r&&(a=g[t])),o||i||(a=n.call(C,...s)),a}}const M=_("preferredSize",(()=>0),!0),R=_("resize",(e=>{let{inner:t}=e;return t})),A=_("created"),L=_("beforeMount"),I=_("mounted"),D=_("beforeUnmount"),P=_("beforeUpdate"),T=_("updated"),O=_("beforeRender"),N=_("beforeDestroy"),q=_("destroyed"),F=e.render,z=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&E.push(qK(w,e))}))},j=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(w,"data",{get:()=>b});const B=y.renderer||e.renderer,$=B?u||l.renderer(B)():u||l.renderer()();"function"==typeof $.settings&&$.settings(y.rendererSettings),w.renderer=$;const W={resources:o.logger?{logger:o.logger()}:{}};let H=aX(sX(y,M,o.logger()),W);const V=e=>{e.key=y.key,e.element=$.element()},G=()=>{};G.dockConfig=()=>H,G.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=cW(!0,{},n,e.settings),H=aX(sX(y,M,o.logger()),W),w.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=fU(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=s.style(y.style||{})},G.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=R({inner:e,outer:t});h=n?$.size(n):$.size(e),k.rect=cW(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=cW(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},G.getRect=()=>k.rect;const U=()=>{const e=$.renderArgs?$.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=hW(hW({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function Q(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}G.beforeMount=L,G.beforeRender=()=>{O({size:h})},G.render=()=>{const e=F.call(C,...U());Q(e),$.render(e),Y=e,K=k.rect.computed},G.hide=()=>{G.unmount(),$.size({x:0,y:0,width:0,height:0}),$.clear()},G.beforeUpdate=()=>{P({settings:y,data:b})},G.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return $.render(),void(Y=null);const r=F.call(C,...U());Q(r),E.forEach((e=>e.cleanUp())),E.length=0,S.tap=[],S.over=[],t&&(z(),j()),E.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:l}=t,s=[],u={nodes:[],ips:[]},c={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],f=null;const h=n.trackBy||AK,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))),l=r.filter((e=>i.includes(e.data.major.value)));return{old:a,current:l}}(e[r],t);d.ips.push(RK(cW({},e[r],{points:n.old}),cW({},t,{points:n.current}))),s.push(cW({},e[r],{commonPoints:n.old}))}else d.ips.push(RK(e[r],t)),s.push(e[r]);d.nodes.push(t),e[r]=!1}else u.nodes.push(t),u.ips.push(RK(cW({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(c.nodes.push(e[t]),c.ips.push(RK(e[t],cW({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:SK,duration:200,tweens:c.ips,nodes:[...s]}),p.push({name:"updating",easing:CK,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:EK,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?s.filter(e).length:s.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=l.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,n=[],i=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));if(n.push(...i),n.push(...e.nodes),l.render(n),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:$},n,o.storage),X.start()):$.render(r),Y=r,K=k.rect.computed,$.setKey&&"string"==typeof g.key&&$.setKey(g.key)},G.updated=T,G.destroy=()=>{G.unmount(),N(f),$.destroy(),q(),f=null};const J=e=>{w.nodes=e,E.forEach((e=>{e.isActive()&&e.update()})),$.render(e)};return lX(C,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>$,chart:()=>o,dockConfig:()=>H,mediator:()=>a,instance:()=>k,rect:()=>k.rect,style:()=>m,update:()=>J,registries:()=>l,resolver:()=>v,symbol:()=>iX(l.symbol)}),lX(k,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>$,chart:()=>o,dockConfig:()=>H,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),G.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const i=o.brush(e),a=$.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let o=0;o<a.length;o++){const l=a[o];l.data&&i.containsMappedData(l.data,n||e.data,t)&&(V(l),r.push(l),a.splice(o,1),o--)}}))}return r},G.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:$).findShapes(e);for(let e=0,t=n.length;e<t;e++)V(n[e]);return n},G.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=$.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++)V(r[e]);return r},G.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];FK({nodes:e,action:t.action||"toggle",trigger:t,chart:o,data:w.data})},G.mount=()=>{f=$.element&&$.element()?f:$.appendTo(i),$.setKey&&"string"==typeof g.key&&$.setKey(g.key),y.brush&&(z(),j()),uX(k,c,g),uX(C,c,e),x=!0},G.mounted=()=>I(f),G.unmount=()=>{[k,C].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)})),S.tap=[],S.over=[],E.forEach((e=>{e.cleanUp()})),E.length=0,D(),x=!1},G.onBrushTap=e=>{S.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return zK({collisions:jK(t,n,r.renderer),t:n,config:r,action:BK(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.onBrushOver=e=>{S.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return zK({collisions:jK(t,n,r.renderer),t:n,config:r,action:BK(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.def=C,G.ctx=k,G.renderer=()=>$,G.set({settings:g}),A(),G}function dX(e){const t=cW(!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 pX(e,t,n){const r=UK(function(e,t){const n=eX(e,t)/eX(t,t)||1;return{x:t.x*n,y:t.y*n}}(YK(n,e),YK(t,e)),e);return r}function fX(e,t,n){return ZK(e,n)+ZK(t,n)-ZK(e,t)<1e-12}function hX(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 mX(e){return e.x1===e.x2&&e.y1===e.y2}function gX(e){return e.width<=0||e.height<=0}function yX(e){return e.r<=0}function bX(e){return e.edges.length<=2}function vX(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=_X(e,SW(t.edges[r])),!0===n)return!0;return!1}function xX(e,t){let n=!1;const{numPolygons:r,polygons:o}=t;for(let t=0;t<r;t++){if(n=OX(e,o[t]),!0===n)return!0}return!1}function wX(e,t){if(yX(e))return!1;return JK({x:e.cx,y:e.cy},t)<=e.r**2}function SX(e,t){if(gX(t)||yX(e))return!1;const n=t.width/2,r=t.height/2,o=t.x+n,i=t.y+r,a=e.r,l=e.cx,s=e.cy,u=Math.abs(l-o),c=Math.abs(s-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 EX(e,t){if(yX(e)||mX(t))return!1;const[n,r]=vW(t);if(wX(e,n)||wX(e,r))return!0;const o={x:e.cx,y:e.cy},i=pX(n,r,o);return JK(i,o)<=e.r**2&&fX(n,r,i)}function CX(e,t){if(bX(t)||yX(e))return!1;if(kX(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(EX(e,SW(t.edges[r])))return!0}return!1}function kX(e,t){if(bX(e)||!LX(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.vertices;let i,a,l,s,u;for(i=!1,s=-1,a=o.length,l=a-1;++s<a;l=s){if(o[s].x===n&&o[s].y===r)return!0;if(o[s].y===o[l].y&&o[s].y===r&&(n-o[s].x)*(n-o[l].x)<=0)return!0;if(o[s].y<r&&r<=o[l].y||o[l].y<r&&r<=o[s].y){if(u=(o[l].x-o[s].x)*(r-o[s].y)/(o[l].y-o[s].y)+o[s].x,n===u)return!0;n<u&&(i=!i)}}return i}function _X(e,t){if(bX(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(DX(t,SW(e.edges[n])))return!0}const[n,r]=vW(t);return kX(e,n)||kX(e,r)}function MX(e,t){if(bX(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(IX(t,SW(e.edges[n])))return!0}const[n,r,o,i]=xW(t);return kX(e,n)||kX(e,r)||kX(e,o)||kX(e,i)}function RX(e,t){return!gX(e)&&!gX(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 AX(e,t){if(gX(e)||gX(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=>LX(e,t)))}function LX(e,t){return!gX(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function IX(e,t){if(mX(t)||gX(e))return!1;const[n,r]=vW(t);if(LX(e,n)||LX(e,r))return!0;const o=xW(e);let i=o.length;for(let e=0;e<i;e++){if(DX(SW([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function DX(e,t){const[n,r]=vW(e),[o,i]=vW(t),a=XK(r,n),l=QK(r,n),s=XK(i,o),u=QK(i,o),c=XK(n,o),d=QK(n,o);let p=u*a-s*l;const f=s*d-u*c,h=a*d-l*c;let m,g;if(0===a&&0===l)return!1;if(0===s&&0===u)return!1;if(0===p){if(0===f&&0===h){if(0===a){if(0===l)return n.x===r.x&&n.y===r.y;m=QK(o,n)/l,g=QK(i,n)/l}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 PX(e,t){if(mX(e))return!1;const[n,r]=vW(e);return fX(n,r,t)}function TX(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!RX(n,r)&&(AX(n,r)?vX(e,t):vX(t,e))}function OX(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!RX(n,r)&&(AX(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++)if(n=TX(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=FX(e,SW(t.edges[r])),!0===n)return!0;return!1}(e,t))}function NX(e,t){if(yX(e))return!1;if(qX(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(EX(e,SW(n.edges[t])))return!0}}return!1}function qX(e,t){if(!LX(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.numPolygons;let i,a,l,s,u,c,d=!1;for(a=0;a<o;a++)for(i=e.vertices[a],u=-1,l=i.length,s=l-1;++u<l;s=u){if(i[u].x===n&&i[u].y===r)return!0;if(i[u].y===i[s].y&&i[u].y===r&&(n-i[u].x)*(n-i[s].x)<=0)return!0;if(i[u].y<r&&r<=i[s].y||i[s].y<r&&r<=i[u].y){if(c=(i[s].x-i[u].x)*(r-i[u].y)/(i[s].y-i[u].y)+i[u].x,n===c)return!0;n<c&&(d=!d)}}return d}function FX(e,t){const[n,r]=vW(t);if(qX(e,n)||qX(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(DX(t,SW(n.edges[e])))return!0}}return!1}function zX(e,t){const[n,r,o,i]=xW(t);if(qX(e,n)||qX(e,r)||qX(e,o)||qX(e,i))return!0;const{numPolygons:a,polygons:l}=e;for(let e=0;e<a;e++){const n=l[e];for(let e=0,r=n.edges.length;e<r;e++){if(IX(t,SW(n.edges[e])))return!0}}return!1}const jX=/^\$/,BX="@extend";function $X(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function WX(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&$X(e),jX.test(r)?(n.push(e),WX(r,t,n)):r}let r=e;const o=cW(!0,{},t,e),i={};if(e[BX]){const i=e[BX];-1!==n.indexOf(i)&&$X(i);let a=n.slice();a.push(i),r=cW(!0,{},WX(o[i],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===BX||jX.test(e))return;i[e]=r[e];let a=i[e];jX.test(a)&&a in o?(-1!==n.indexOf(a)&&$X(a),t.push(a),a=o[a],"object"==typeof a||jX.test(a)&&a in o?i[e]=WX(a,o,t):i[e]=a):"object"==typeof a&&(i[e]=WX(a,o,t))})),i}function HX(e,t){return WX(e,t,[])}function VX(){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=>HX(e,n),setStyle:t=>{n=cW({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}function GX(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 UX(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return cW(!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 YX(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 KX(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 XX(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 QX(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 JX(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 ZX(e,t,n,r,o){const i=cW({},t),a=cW({},n);XX(i,r),QX(a,r),JX(e,i,a);const l=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!!l&&(XX(t,r),QX(n,r),!0)}function eQ(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 tQ(e){return wW([].concat(...e.map(xW)))}function nQ(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:o,translation:i}=e;const a=YX(r.x,r.y,r.width,r.height),l=YX(r.x,r.y,r.width,r.height),s={},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=l.x-e.cachedSize,t.y=n.y,u.y=l.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=l.height,l.x-=e.cachedSize,l.width+=e.cachedSize;break;case"right":t.x=u.x=l.x+l.width,t.y=n.y,u.y=l.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=l.height,l.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=>s[e])).filter((e=>!!e));n.length>0&&(t=tQ(n.map((e=>e.outerRect))),u=tQ(n.map((e=>e.r))))}}e.key&&(s[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",l=(r[a]-n[a]*o.x)*n.align;i.left=e?0:l,i.top=e?l: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=eQ(u),t.edgeBleed=e.edgeBleed,t.computed=eQ(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 rQ(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 oQ(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 iQ(e){let t=UX(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),GX(r),GX(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];oQ(a);let l=a.dockConfig;const s=a.key,u=l.dock(),c=/@/.test(u)?u.split(",").map((e=>e.replace(/^\s*@/,""))):[];rQ(t,l,n)?r.push({comp:a,key:s,config:l,referencedDocks:c}):o.push({comp:a,key:s,config:l,referencedDocks:c})}return[r,o]}(n,t,r),l=function(e){let{layoutRect:t,visible:n,hidden:r,settings:o}=e;const i=YX(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},l=n.slice();l.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<l.length;++e){const n=l[e];KX(n,i,t),ZX(t,i,a,n,o)||(r.push(l.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 s=n.filter((e=>-1!==l.indexOf(e)));return n.length=0,n.push(...s),JX(t,i,a),i}({layoutRect:r,visible:i,hidden:a,settings:t}),s=nQ({visible:i,layoutRect:r,reducedRect:l,containerRect:o,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=YX();e.comp.resize(t,t)})),{visible:i.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:s.map((e=>e.comp))}},n.settings=function(e){t=UX(e)},n}const aQ=(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},lQ=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(hW(hW({},n),{},{children:lQ(e.children)}))}})),sQ=(e,t)=>({visible:[],hidden:t,ordered:[]}),uQ=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(hW(hW({},t),{},{children:lQ(e.children)}))}})),i=e=>n[e.index],{visible:a=o,hidden:l=[],ordered:s=a}=null!==(r=e(t,o))&&void 0!==r?r:{};return{visible:a.map(i),hidden:l.map(i),ordered:s.map(i)}},cQ=e=>"function"==typeof e?uQ(e):(e=>{const t=iQ(e);return uQ(((e,n)=>t.layout(e,n)))})(e);function dQ(e,t,n){const r=t.left-n.left,o=t.top-n.top,i=EW(e),a=cW(!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 pQ(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 fQ(e,t){let{element:n,data:r=[],settings:o={},on:i={}}=e;const a=t.registries,l=t.logger,s=VX(t.style,t.palettes),u=[],c=cW({},e),d=function(){const e={};return rK.mixin(e),e}();let p=[],f=null,h=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const w=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)},l=(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&&l(r.children,o.components):(e.splice(n,1),a(r),r.children&&l(r.children,[]),r.instance.destroy())}},s=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:l}=e;return l.map((e=>{const l=aQ(t,e.key);return r.indexOf(e.key)>-1?(delete l.updateWith,l):l?(e.rendererSettings&&"function"==typeof l.instance.renderer().settings&&l.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(l.applyTransform=!0,l):(l.updateWith={formatters:o,scales:a,data:n,settings:e},e.components&&(l.children=s({compList:l.children||[],data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),l)):i(e)})).filter((e=>!!e))},u=e=>{let{components:t,hidden:n,layoutFn:r,ordered:o,rect:i,visible:a}=e;const{visible:l,hidden:s,ordered:c}=r(i,t);a.push(...l),n.push(...s),o.push(...c),l.forEach((e=>{if(e.children){var t,r;const i=cQ(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})}})),s.forEach((e=>{e.children&&u({components:e.children,hidden:n,layoutFn:sQ,ordered:o,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],o=[]},n.findComponentByKey=e=>aQ(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],i=[],a=[],l=cQ(t);return u({components:o,hidden:i,layoutFn:l,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;l(o,t),o=s({compList:o,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return l.warn("Unknown component: ".concat(e.type)),!1;return{instance:cX(a.component(e.type),{settings:e,chart:c,mediator:d,registries:a,theme:s,container:n}),settings:cW(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(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),l=0;l<i;l++)a[l]=arguments[l];return o=r?e[t].call(c,...a):n.call(c,...a),o}}const E=()=>{let e;o.dockLayout?(l.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 w.layout({layoutSettings:e,rect:t})},C=S("created"),k=S("beforeMount"),_=S("mounted"),M=S("beforeUpdate"),R=S("updated"),A=S("beforeRender"),L=S("beforeDestroy"),I=S("destroyed"),D=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:l,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&s.setPalettes(t.palettes),t.style&&s.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fU;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=cW(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:l});const u={theme:s,logger:l};f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ZY;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},hW(hW({},u),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:hU;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},hW(hW({},u),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=iK(e[r],t?t[r]:null));return n}(i,m)};function P(){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 T=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();LX(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},O=()=>{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=T(e)},r=t=>{const n=e.comps||T(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=mW(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=T(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)}))},N=()=>{u.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),u.length=0},q=()=>{n.innerHTML="",(()=>{const{components:e=[]}=o;A(),D(r,o),w.set({components:e});const{visible:t,hidden:i,ordered:a}=E();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})),pQ(n,a)})(),O(),P(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,P(e.settings.interactions)),M(),D(r,o);const{formatters:n,scales:i,components:a=[]}=o;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:i}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),E()},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,P(e.settings.interactions)),M(),D(r,o,{partialData:t});const{formatters:l,scales:s,components:u=[]}=o;w.update({components:u,data:r,excludeFromUpdate:i,formatters:l,scales:s}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const c=[],d=[];let f;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&c.push(e)})),f=c;else{const{visible:e,hidden:t,ordered:n}=E();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||pQ(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})),R()},c.destroy=()=>{L(),w.destroy(),N(),P(),delete c.update,delete c.destroy,I()},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=>T(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],l=dQ(e,o,a.instance.renderer().element().getBoundingClientRect()),s=a.instance.shapesAt(l,a.opts),u=s.length>0&&"stop"===t.propagation;if(r=[...r,...s],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]=oK()),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]=wK()),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=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},c.logger=()=>l,c.theme=()=>s,c.storage=dX({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(c,"interactions",{get:()=>({instances:g,on(){O(),g.forEach((e=>e.on()))},off(){N(),g.forEach((e=>e.off()))}})}),C(),n&&(k(),q(),_(n),c.element=n),c}const hQ=e=>{let t=MH(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var mQ=MH();function gQ(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 yQ=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const bQ=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 l=i&&i.parse;Array.isArray(r[0])?l&&!1===l.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const s=!!l&&"function"==typeof l.row&&l.row;let u,c=t;c=l&&"function"==typeof l.fields?l.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=s?s(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=yQ(t),i=r.length>0,a=i?"measure":"dimension",l=i?Math.min(...r):NaN,s=i?Math.max(...r):NaN;o.fields.push(ZG(cW({source:n,key:e,title:c[e].title,values:t,min:l,max:s,type:a},c[e]),{value:c[e].value,label:c[e].label}))}}({data:i,cache:r,source:t,config:o})};function vQ(){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,matrix:t}),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}=oU(e,t),l=Object.keys(i),s=!!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=gQ(a,n,{key:o});l.forEach((e=>{const a=i[e];let l=a.field?a.field.items()[t]:n;r[e]=gQ(a,l,{key:o})})),s&&lU({cfg:e,itemData:n,obj:r,target:d,tracker:c,trackType:u}),f.push(r)}r=s?[...r,...aU(d,{main:a,propsArr:l,props:i})]:[...r,...f]}})),r}(e,o),hierarchy:()=>null};return bQ({key:e,data:t,config:n,cache:r}),o}vQ.util={normalizeConfig:oU,collect:aU,track:lU};const xQ=MH();xQ.default("matrix"),xQ("matrix",vQ),xQ("default",vQ);const wQ=MH();function SQ(e,t,n){return Math.max(e,Math.min(t,n))}function EQ(e){let{item:t,value:n,boxCenter:r,rendWidth:o,rendHeight:i,flipXY:a,symbol:l}=e,s="x",u="y",c=o,d=i,p=n<.5?90:-90;return a&&(s="y",u="x",c=i,d=o,p=n<.5?180:0),l(cW({},t.oob,{[s]:r*c,[u]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function CQ(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:o,rendHeight:i,flipXY:a}=e,l="x",s="y",u="width",c="height",d=o,p=i;a&&(l="y",s="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),l=SQ(-.1,1.2,i),s=SQ(-.1,1.2,a),u=l*o-s*o,c=Math.max(r,u),d=(c-u)/2;return{actualDiff:c,startModifier:d,actualLow:s*o-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return cW({},t.box,{type:"rect",[l]:(r+t.major)*d,[s]:h,[c]:f,[u]:n*d,data:t.data||{},collider:{type:null}})}function kQ(e){let{item:t,from:n,to:r,boxCenter:o,rendWidth:i,rendHeight:a,flipXY:l}=e,s="x1",u="y1",c="x2",d="y2",p=i,f=a;return l&&(s="y1",u="x1",c="y2",d="x2",p=a,f=i),cW({},t.line,{type:"line",[d]:Math.floor(n*f),[s]:o*p,[u]:Math.floor(r*f),[c]:o*p,data:t.data||{},collider:{type:null}})}function _Q(e){let{item:t,key:n,position:r,width:o,boxCenter:i,rendWidth:a,rendHeight:l,flipXY:s}=e,u="x1",c="y1",d="x2",p="y2",f=a,h=l;s&&(u="y1",c="x1",d="y2",p="x2",f=l,h=a);const m=o/2;return cW({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 MQ(e,t,n){const{width:r,maxWidthPx:o,minWidthPx:i}=t.box,a=e>=0?1:-1;let l=Math.min(a*e*r,isNaN(o)?n:o/n);return l=isNaN(i)?l:Math.max(i/n,l),l*a}wQ("native",(function(e,t,n){let r,o,i={chart:e,mediator:t,element:n},a=[],l=!0;function s(){"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(),l&&s()},off(){l=!1,u()},on(){l=!0,0===a.length&&s()},destroy(){u(),i=null,r=null}}}));const RQ={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}},AQ=Object.keys(RQ),LQ={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:l}=this,s=AQ.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),u={};s.forEach((e=>u[e]=RQ[e]));const c=function(e){let{keys:t,data:n,defaultSettings:r,style:o,settings:i,width:a,height:l,resolver:s}=e;const u=cW(!0,{},r||{},o||{}),c={major:"horizontal"===i.orientation?l:a,minor:"horizontal"===i.orientation?a:l},d=i.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?s.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:cW(!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?s.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:cW(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.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:s.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:cW(!0,{},h,f)})};for(let e=0,r=t.length;e<r;e++)i[m]&&!1===i[m].show||(m=t[e],g[m]=s.resolve({data:n,defaults:u[m],settings:i[m],scaled:c}));return g}({keys:s,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 l=[],s=o.major.items;if(!s.length)return l;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,w,S,E,C;const k=i?i.length:0,_=m?m.length:0,M={box:function(){b.box&&gW(b.start)&&gW(b.end)&&g.push(CQ({item:b,boxWidth:v,boxPadding:x,rendWidth:u,rendHeight:c,flipXY:r}))},line:function(){gW(b.min)&&gW(b.start)&&g.push(kQ({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r})),gW(b.max)&&gW(b.end)&&g.push(kQ({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r}))},median:function(){b.median&&gW(b.med)&&g.push(_Q({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;gW(b.min)&&g.push(_Q({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r})),gW(b.max)&&g.push(_Q({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[f[r]],gW(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,E=n>1&&n!==Number.MAX_VALUE,C=S||E}for(let e=0,t=s.length;e<t;e++){g=[],y=null;const t=s[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=cW({},{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=MQ(A,b,d),x=(A-v)/2,w=x+b.major+v/2,R(),C)b.oob&&(S?g.push(EQ({item:b,value:0,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})):E&&g.push(EQ({item:b,value:1,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})));else for(let e=0;e<_;e++)b[m[e]]&&!1===b[m[e]].show||M[m[e]]();const L={type:"container",data:n,collider:{type:"bounds"},children:g};l.push(L)}return l}({items:p,settings:d,width:n,height:r,flipXY:o,resolved:c,keys:s,symbol:l});return f}};const IQ={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},DQ=/px$/,PQ={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},TQ={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function OQ(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 NQ(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=DQ.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);yW(a)&&(t=IQ,a=n.min+t.size*(n.max-n.min));const[l,s]=function(e){let t=PQ.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=hW(hW({},s),{},{type:l,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 qQ={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:cW({},PQ,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:o}=this.rect,i=cW({},TQ,this.settings.settings.sizeLimits),a=n.items,l=function(e,t,n,r,o){const i=OQ(e?e.scale:void 0,n),a=OQ(t?t.scale:void 0,r);let l=Math.min(i.value*o[i.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*o[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),s=Math.min(i.value*o[i.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*o[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(s)),max:Math.max(1,Math.floor(l)),maxGlobal:o.maxPx,minGlobal:o.minPx}}(n.settings.x,n.settings.y,r,o,i);return NQ(a,this.rect,l,this.settings.shapeFn||this.symbol)}};Math.PI;const FQ={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function zQ(e,t,n,r){let{x:o,y:i,width:a,height:l}=t;const s=XW(),u={x:o+a/2,y:i+l/2},c=Math.min(a,l)/2,d=Math.min(a,l)/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,l=p*o.cornerRadius;s.innerRadius(a),s.outerRadius(i),s.cornerRadius(l),o.arcDatum=e;const f=s.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 l=n-r;return{x:o*t*l,y:i*t*l}}(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:l,offset:{x:u.x+h.x,y:u.y+h.y}}},o}))}function jQ(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const BQ={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:cW({},FQ,this.style.slice),settings:o.slice});let a=0;for(let e=0,t=i.length;e<t;e++){const t=jQ(o,i[e]);t>0&&i[e].outerRadius>=i[e].innerRadius&&(n.push(t),r.push(i[e]),a+=t)}const l=function(){var e=rH,t=nH,n=null,r=IW(0),o=IW($W),i=IW(0);function a(a){var l,s,u,c,d,p=a.length,f=0,h=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min($W,Math.max(-$W,o.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,i.apply(this,arguments)),v=b*(y<0?-1:1);for(l=0;l<p;++l)(d=m[h[l]=l]=+e(a[l],l,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])})),l=0,u=f?(y-p*v)/f:0;l<p;++l,g=c)s=h[l],c=g+((d=m[s])>0?d*u:0)+v,m[s]={data:a[s],index:l,value:d,startAngle:g,endAngle:c,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:IW(+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:IW(+e),a):r},a.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:IW(+e),a):o},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:IW(+e),a):i},a}().sortValues(null);l.startAngle(o.startAngle),l.endAngle(o.endAngle),l.padAngle(o.padAngle);return zQ(l(n),cW({},this.rect,{x:0,y:0}),r,a)}};const $Q=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 WQ{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[WQ.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=WQ.evaluateKey(i,n),l=this.transposeCoordinate(a,e[i],n);t[a]=l}}return r&&$Q(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 HQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new WQ(...t)}function VQ(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const GQ={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=HQ(),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,PK(this,"x",this.rect.width),PK(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=cW({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=cW({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=VQ(this.x,this.rect.width),this.lines.y=VQ(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>cW(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 UQ(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 YQ(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 KQ(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 XQ(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 QQ(e){let{chart:t,blueprint:n,renderer:r,p:o,settings:i,items:a,slopeLine:l}=e,s=!0,u=!1,c=!1,d=!1,p=!1,f=cW(!0,{},i.style.line,o.line||{}),h=cW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},i.style.label||{},{fill:f.stroke});if(u=l?n.processItem({type:"line",x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,stroke:f.stroke||"black",strokeWidth:f.strokeWidth||1,strokeDasharray:f.strokeDasharray,flipXY:!1,value:o.valueInfo?o.valueInfo.id:o.value}):n.processItem({type:"line",x1:o.position,y1:0,x2:o.position,y2:1,stroke:f.stroke||"black",strokeWidth:f.strokeWidth||1,strokeDasharray:f.strokeDasharray,flipXY:o.flipXY||!1,value:o.valueInfo?o.valueInfo.id:o.value}),o.label){const e=cW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},i.style.label||{},{fill:f.stroke},o.label);let l,u={width:0,height:0},h="";l=KQ(o,t),!1!==o.label.showValue&&(l?h=" (".concat(l(o.value),")"):o.scale&&(h=" (".concat(o.value,")"))),h&&(u=r.measureText({text:h,fontFamily:e.fontFamily,fontSize:e.fontSize}));let m=r.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:m.width+u.width,height:Math.max(m.height,u.height)},y=e.padding,b=XQ(o.flipXY?e.vAlign:e.align),v=XQ(o.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*n.width,e.maxWidthPx),w=g.height+2*y,S=o.flipXY?w:x,E=o.flipXY?x:w;if(c=n.processItem({fn:t=>{let{width:r,height:i}=t,a=o.position*r-(o.flipXY?w:x)*(1-b);a=o.flipXY?a:Math.max(a,0);return{type:"rect",x:a,y:Math.max(Math.abs(v*i-E*v),0),width:o.flipXY?S:Math.min(S,n.width-a),height:E,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:o.flipXY||!1}),c.x<-1||c.x+c.width>n.width+1||c.y<-1||c.y+c.height>n.height+1)c=void 0;else{d={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:c.x+y,y:c.y+c.height/2+g.height/3,maxWidth:c.width-2*y-u.width,anchor:"start"},h&&(p={type:"text",text:h||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:d.x+3+(c.width-(u.width+2*y)),y:d.y});for(let e=0,t=a.length;e<t;e++){let t=a[e];"rect"===t.type?RX(c,t)&&(s=!1):"line"===t.type&&o.flipXY===t.flipXY&&IX(c,t)&&(s=!1)}}}if(a.push(u),0!==(null==l?void 0:l.slope)&&(null!=l&&l.showLabel||null!=l&&l.showValue)){let e,i;const s=120;let c=l.showLabel?l.refLineLabel:"";if(l.showValue){const n=KQ(o,t),r=n?n(l.value):l.value;e="(".concat(l.slope,"x + ").concat(r,")"),c+=l.refLineLabel?" ".concat(e):e}if(c.length>1){var m;const e=r.measureText({text:c,fontFamily:h.fontFamily,fontSize:h.fontSize});e.width=e.width>s?s:e.width;const o=l.slope>0&&!l.isRtl?4*h.padding:h.padding/2,d=l.slope>0?3*h.padding:h.padding,p=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.max()*t+n<=o.min())return!0;return!1}(t,l.slope,l.value)?function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});return r(t<0?(o.min()-n)/t:(o.max()-n)/t)}(t,l.slope,l.value):void 0,g=void 0===p?Math.abs(u.y2):1,y=function(e,t,n,r,o,i){return e.slope>0?n<.8?e.isRtl?n*o.width-(r.width+i.padding):n*o.width:n>.8?e.isRtl?n*o.width+(r.width+2*i.padding):n*o.width-(r.width+6*i.padding):1===n?e.isRtl?n*o.width+(r.width+3*i.padding):n*o.width-(r.width+6*i.padding):t.x2-(r.width+2*i.padding):e.isRtl?t.x1-(r.width+2*i.padding):t.x1}(l,u,p,e,n,h),b=l.slope>0?g:u.y1;l.labelStroke&&(i={type:"rect",x:l.isRtl?Math.max(y,o)-2:Math.max(y,o)+2,y:Math.abs(Math.max(b,d)-e.height),rx:3,ry:3,width:e.width+h.padding,height:e.height-2,stroke:f.stroke,fill:f.stroke});const v={type:"text",text:c,fill:null!==(m=l.labelStroke)&&void 0!==m?m:f.stroke,opacity:h.opacity,fontFamily:h.fontFamily,fontSize:h.fontSize,x:i?i.x+2:Math.max(y,o)+2,y:i?i.y+e.height-h.padding:Math.abs(Math.max(b,d)-h.padding/2),anchor:"start",title:c,maxWidth:s,width:e.width};(function(e,t,n,r,o,i,a){for(let l=0,s=e.length;l<s;l++){const s=e[l];if("text"===(null==s?void 0:s.type))if(n>0&&void 0!==o){if(Math.abs(s.x-t.x)<s.width+i&&Math.abs(s.y-t.y)<r.height+a)return!0}else if(Math.abs(s.y-t.y)<r.height+a)return!0}return!1})(a,v,l.slope,e,p,o,d)||(i&&a.push(i),a.push(v))}}s&&c&&d&&(a.push(c,d),p&&a.push(p))}function JQ(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function ZQ(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function eJ(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)}const tJ={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=HQ(),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(ZQ).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=eJ(t,e.value);return cW(e,{scale:t,position:n})}return cW(e,{position:e.value})})),this.lines.y=this.lines.y.filter(ZQ).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=eJ(t,e.value);return cW(e,{scale:t,position:n,flipXY:!0})}return cW(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(JQ(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(JQ(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();o=hW({},r),o.x1=eJ(e,i),o.x2=eJ(e,a);const l=i*r.slope+r.value,s=a*r.slope+r.value;if(o.y1=eJ(n,l),o.y2=eJ(n,s),o.y1>1&&o.y2>1)return r.slope,void t["y".concat(o.y1>1?1:0)].push(JQ(r));if(o.y1<0)return void t["y".concat(o.y1>1?1:0)].push(JQ(r))}else o=void 0;QQ({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],l=n[r];if(l.length>0){let e=r.charAt(1),n="y"===r.charAt(0),i=a.padding.x+a.width,s=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?s:o-s;return"arc"===a.type?{type:"path",d:UQ(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:l}},flipXY:n}),d=c.cx||c.x,p=c.cy||c.y,f={type:"text",text:l.length||"",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},h={type:"path",d:YQ(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,f,h)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function nJ(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){cW(e,t.style)}(t,e),t}function rJ(e){return"string"==typeof e||"number"==typeof e?e:"-"}function oJ(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,l="start"===t.anchor&&r>=0,s=t.boundingRect.y+(l||a?t.boundingRect.height:0),u=[{x:t.x-o,y:s},{x:t.x+o,y:s}].map((e=>tX(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 iJ(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 aJ(e,t){var n,r;const o={type:"text",text:rJ(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)+iJ(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)+iJ(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),oJ(e,o,t),o}function lJ(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){cW(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 sJ(e){return!e.isMinor&&e.position>=0&&e.position<=1}function uJ(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,l=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)<l[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,state:n})}function cJ(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 dJ(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:l}=e,s=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(sJ),m=e=>{const t=o({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=cJ({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,l="layered"===o.labels.activeMode?2:1,s=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?s:1);if(p=l*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=l*c*e,d=n("M").width*s*a,d+u>p)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:l,settings:a})?l.labels.activeMode="horizontal":l.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==l.labels.activeMode&&uJ({rect:n.inner,state:l,majorTicks:h,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===l.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>cJ({value:t.width,maxValue:c,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>cJ({value:e.width,maxValue:c,minValue:d});if(p&&"tilted"!==l.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(s+=x,s+=a.labels.margin,"layered"===l.labels.activeMode&&(s*=2),"tilted"===l.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},l=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(o).map(i),0))+a.paddingEnd;if(u[e?"left":"right"]=l,!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),l=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))/l}({majorTicks:h,measureText:m,rect:n,bleedSize:l,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:s,edgeBleed:u}}const pJ=(e,t,n)=>e.width*Math.abs(t.position-n.position);function fJ(e){let{layered:t,major:n,innerRect:r,outerRect:o,tick:i,index:a}=e;const l=t?2:1,s=n[a-l],u=n[a+l],c=s?pJ(r,i,s)/2-2:1/0,d=u?pJ(r,i,u)/2-2:1/0;return n.length<2?r.width:s?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,l=t.width-t.width*r.position+a,s=2*Math.min(o,l),u=1===r.position?t.width/2-2:0;return Math.max(o,s,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,l=2*Math.min(o,a),s=0===r.position?t.width/2-2:0;return Math.max(o,l,s)})({innerRect:r,outerRect:o,tick:i,nextWidth:d})}function hJ(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 mJ(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=hJ(e)+e.labels.margin,t}function gJ(e,t){return e.map((e=>lJ(e,t)))}function yJ(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function bJ(e){let{textMetrics:t,settings:n,innerRect:r,scale:o,tilted:i,layered:a,tick:l}=e;const s=t.height,u=yJ(o,l),c={width:0,height:s};if("left"===n.align||"right"===n.align)c.width=r.width-mJ(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-mJ(n)-n.paddingEnd-s*Math.cos(e))/Math.sin(e)}else c.width=u*r.width;return c.width=cJ({value:c.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),c}function vJ(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:o,tilted:i,layered:a,tick:l,index:s,major:u}=e;const c=t.height,d={width:0,height:c};if("left"===n.align||"right"===n.align)d.width=r.width-mJ(n)-n.paddingEnd;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-mJ(n)-n.paddingEnd-c*Math.cos(e))/Math.sin(e)}else d.width=fJ({layered:a,major:u,innerRect:r,outerRect:o,tick:l,index:s});return d.width=cJ({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function xJ(e){let t;function n(){return t=vJ,n}function r(){return t=bJ,r}function o(e){let{settings:n,scale:r,innerRect:o,outerRect:i,measureText:a,ticks:l,state:s,textBounds:u}=e;const c=[],d=function(e){return e.filter((e=>!e.isMinor))}(l),p=function(e){return e.filter((e=>e.isMinor))}(l),f={innerRect:o,align:n.align,outerRect:i},h="tilted"===s.labels.activeMode,m="layered"===s.labels.activeMode;let g;if(n.line.show&&(f.style=n.line,f.padding=n.paddingStart,c.push(nJ(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=hJ(n),g=gJ(d,f)),n.labels.show){const e=mJ(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 u=t({textMetrics:f.textRect,settings:n,innerRect:o,outerRect:i,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});f.maxWidth=u.width,f.maxHeight=u.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)*yJ(n,o)}({innerRect:o,scale:r,ticks:l,settings:n,tick:e})};let p=[];p=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=aJ(e,t);return o.data=e.data,o}))}(d,f,s):function(e,t,n,r){const o=t.padding,i=mJ(n);return e.map(((e,a)=>{r(e,a);const l=i+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?o:l;const s=aJ(e,t);return s.data=e.data,s}))}(d,f,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>RX(CW(1,e[t].boundingRect),CW(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--)}(p,g,f),c.push(...p)}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(...gJ(p,f))),g&&c.push(...g),c}return n.build=o,r.build=o,e?r():n()}const wJ={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"},SJ={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 EJ={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=cW(!0,{},t.isDiscrete?wJ:SJ,n),i=cW(!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:l,paddingEnd:s}=i;return i.paddingStart="function"==typeof l?l.call(null):l,i.paddingEnd="function"==typeof s?s.call(null):s,i}(this),this.state.concreteNodeBuilder=xJ(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=TK(r,o);const i=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:l}=e,s=0;const{size:u,edgeBleed:c,isToLarge:d}=dJ({isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:l});if(s+=u,d)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>s&&(s=e)}if(a.line.show){const e=a.line.strokeWidth/2;s+=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 s+=a.paddingStart,s+=a.paddingEnd,{size:s,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=cW({},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 cW(this.state.innerRect,r),cW(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=TK(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})),$Q.multiple(t),t}};const CJ={render:()=>[]};function kJ(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 _J(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 MJ={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=kJ(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 l={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:_J(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};cW(l,a.text);const s=i(l);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)),l.x=e,l.y="top"===r?o.height-n.paddingStart:n.paddingStart+s.height,l.dy="top"===r?-s.height/6:-s.height/3,l.maxWidth=.8*o.width}else{let e=o.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=o.height-n.paddingStart),l.y=e,l.x="left"===r?o.width-n.paddingStart:n.paddingStart,l.dx="left"===r?-s.height/3:s.height/3;const t="left"===r?270:90;l.transform="rotate(".concat(t,", ").concat(l.x+l.dx,", ").concat(l.y+l.dy,")"),l.maxWidth=.8*o.height}return isNaN(n.maxLengthPx)||(l.maxWidth=Math.min(l.maxWidth,n.maxLengthPx)),l}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(cW(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=kJ(t,n,this.scale)}};function RJ(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],l=e.chart.scroll(e.settings.scroll);let s;{let e=t[o?"x":"y"];r&&(e=a-e);const n=l.getState();s={startOffset:e,startScroll:n.start,swipe:!1};const i=e/a*(n.max-n.min)+n.min;i<n.start?s.startScroll=i:i>n.start+n.viewSize&&(s.startScroll=i-n.viewSize)}return{update:e=>{let t=e[o?"x":"y"];if(r&&(t=a-t),!s.swipe){if(Math.abs(s.startOffset-t)<=1)return;s.swipe=!0}const n=l.getState(),i=(t-s.startOffset)/a*(n.max-n.min),u=s.startScroll+i;l.moveTo(u)},end:e=>{let t=e[o?"x":"y"];r&&(t=a-t);const n=l.getState();if(s.swipe){const e=(t-s.startOffset)/a*(n.max-n.min),r=s.startScroll+e;l.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;l.moveTo(e)}}}}function AJ(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const LJ={require:["chart","renderer"],on:{panStart(e){const t=AJ(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=RJ(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=AJ(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=AJ(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=AJ(e,this.renderer);RJ(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 l=i*(a.start-a.min)/(a.max-a.min);const s=i*a.viewSize/(a.max-a.min);return n&&(l=i-l-s),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(l,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[o]:"".concat(Math.max(1,s),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function IJ(e){let{h:t,isVertical:n,value:r,pos:o,align:i,borderHit:a,state:l,idx:s}=e;const u="end"!==i,c=u?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",f="100%";return l.targetRect&&"start"===l.settings.bubbles.align?(p="".concat(l.targetRect.x+l.targetRect.width,"px"),f="".concat(l.targetRect.y+l.targetRect.height,"px")):l.targetRect&&"end"===l.settings.bubbles.align&&(d=n?l.targetRect.x:l.targetRect.y,p="".concat(l.rect.width-d,"px"),f="".concat(l.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=l.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[l.key,"edge",s].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:cW({backgroundColor:l.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function DJ(e){let{h:t,isVertical:n,label:r,otherValue:o,rangeIdx:i,idx:a,pos:l,align:s,state:u,value:c}=e;const d="end"!==s,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:hW(hW({},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(l,"px"),transform:h}},[b])}function PJ(e){let{h:t,isVertical:n,top:r,height:o,color:i,on:a,opacity:l}=e;return t("div",cW({style:{backgroundColor:i,opacity:l,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 TJ(e){let{borderHit:t,els:n,isVertical:r,state:o,vStart:i,vEnd:a,idx:l}=e,s=0;o.targetRect&&(s=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)+s,h=f+p;if(o.targetRect){const e=o.targetFillRect||o.targetRect,t=r?e.height:e.width,l=u?o.scale.norm(i)*t:i,s=u?o.scale.norm(a)*t:a,c=Math.abs(l-s),d=Math.min(l,s),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")}},[PJ(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(IJ({h:o.h,isVertical:r,borderHit:t,value:m,pos:f,align:"start",state:o,idx:l})),x&&n.push(IJ({h:o.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:o,idx:l}));const w=o.settings.bubbles;if(w&&w.show){const e={fontSize:w.fontSize,fontFamily:w.fontFamily,color:w.fill},t=[i,a];v&&n.push(DJ({h:o.h,isVertical:r,align:w.align,style:e,rangeIdx:l,idx:0,otherValue:g,value:m,label:"".concat(o.format(m,t)),pos:f,state:o})),x&&n.push(DJ({h:o.h,isVertical:r,align:w.align,style:e,rangeIdx:l,idx:1,otherValue:m,value:g,label:"".concat(o.format(g,t)),pos:h,state:o}))}}function OJ(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 NJ(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,o)=>{e.active&&o===e.active.idx||TJ({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=OJ(e);r=e.active.start+t,o=e.active.end+t}TJ({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:o,idx:e.active.idx})}return t}function qJ(e){return{min:e.scale.min(),max:e.scale.max()}}function FJ(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function zJ(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 jJ(e){e.renderer.render(NJ(e))}function BJ(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 $J(e,t){let n,r=1/0;const o=t.domain(),i=t.bandwidth()/2;for(let a=0;a<o.length;++a){const l=Math.abs(e-i-t(o[a]));l<r&&(r=l,n=o[a])}return n}function WJ(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function HJ(e){const t=e.reduce(((e,t)=>(e.push(...xW(t.bounds)),e)),[]);return wW(t)}const VJ={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=BJ(this.state,this.state.brushInstance),this.state.active=null,jJ(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=TK(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=HJ(o);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=TK(e.chart.scale(n.scale),t.size),t.targetRect=r,i.length>0){const e=HJ(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]=hW({},o[t]);const l=e.scale.data();l&&l.fields&&l.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),o)}))}(this.state,e,t,n),this.emit("bubbleEnd"),jJ(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,jJ(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=qY(),this.state.scale.data=o.data,this.state.format||(this.state.format=(e,t)=>WJ(o.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf($J(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"),this.state.fauxBrushInstance=wK(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),o=[];return e.forEach((e=>{if(!WJ(r,[e.min,e.max]))return;const i=n.indexOf($J(e.min,t)),a=n.indexOf($J(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=BJ(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[NJ(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,l=n.center.y-n.deltaY;let s=document.elementFromPoint(a,l);r.element().contains(s)||(s=null);const u={started:!0};t.offset=cW({},r.element().getBoundingClientRect());const c=a-t.offset.left,d=l-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=qJ(t);let g,y,b=-1;if(s&&s.hasAttribute("data-idx"))b=parseInt(s.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"},s&&s.hasAttribute("data-other-value"))u.start=parseFloat(s.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&&!LX(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:BJ,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=qJ(e);zJ(e,e.current,n)}(this.state,BJ),jJ(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=OJ(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=BJ(e,e.fauxBrushInstance),o=e.findValues(r),i=e.findValues(t),a=i.filter((e=>-1===o.indexOf(e))),l=o.filter((e=>-1===i.indexOf(e))),s=a.map((e=>({key:n.id(),value:e}))),u=l.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(s,u),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),jJ(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;jJ(this.state);const i=o.querySelector("input");i.focus(),i.select()}};function GJ(e){e.renderer.render(NJ(e))}function UJ(e){return e.rc.ranges()}function YJ(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 KJ={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=uK(),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 l=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})),s=e.settings.brush.components.reduce(((e,t)=>e.key===l.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(l.data):Array.isArray(s.data)&&s.data.length?l.data[s.data[0]].label:l.data&&l.data.label?l.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,l=n.center.y-n.deltaY;let s=document.elementFromPoint(a,l);r.element().contains(s)||(s=null);const u={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=o(t);const c=a-t.offset.left,d=l-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=FJ(t);let b,v,x=-1;if(s&&s.hasAttribute("data-idx"))x=parseInt(s.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"},s&&s.hasAttribute("data-other-value"))u.start=parseFloat(s.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&&!LX(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:UJ,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=FJ(e);zJ(e,e.current,n)}(this.state,UJ),GJ(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=OJ(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,...YJ(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),GJ(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function XJ(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,l=Math.min(i,a),s=Math.abs(i-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:l,width:t?r:s,y:t?l:0,height:t?s:r}}))}function QJ(e,t,n,r){function o(){!function(e){e.renderer.render(XJ(e))}(e)}function i(){!function(e){e.renderer.render(XJ(e))}(e)}function a(){!function(e){e.renderer.render(XJ(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 JJ(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 ZJ={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=TK(this.chart.scale(e.scale),r);return JJ(this.state),QJ(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,XJ(this.state)},beforeDestroy(){JJ(this.state)}};function eZ(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function tZ(e,t,n){return JK(e,t.points[0])<n.settings.snapIndicator.threshold**2}function nZ(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 rZ(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 oZ(e,t){e.snapIndicator.visible=t}const iZ={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=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})))}(this.settings);const n=eZ(this.state.rendererBounds,e);nZ(this.state,n),rZ({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=eZ(this.state.rendererBounds,e);tZ(t,this.state,this.settings)?oZ(this.state,!0):oZ(this.state,!1),nZ(this.state,t),rZ({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;oZ(this.state,!1);tZ(eZ(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 aZ(e,t,n,r,o){let i,a=0,l=t.length-1;for(;a<l;){let s=Math.floor((a+l)/2);i=o(t[s]),i[n]+i[r]<e[n]?a=s+1:l=s}return a}function lZ(e){let{orientation:t,targetNodes:n,labels:r,container:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aZ;const a=[],l="v"===t?"x":"y",s="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[l]<o[l]||d[l]+d[s]>o[l]+o[s])return!1;for(let e=i(d,a,l,s,u);e<a.length;e++)if(RX(d,a[e].textBounds))return!1;const f=i(d,n,l,s,c),h=d[l]+d[s];for(let e=f;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[l])break;if(RX(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const sZ=4;function uZ(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function cZ(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function dZ(e){return hW(hW({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 pZ(e,t,n){return n?e.width>=t.height:e.width>=t.width}function fZ(e,t,n){return n?e.height>=t.width:e.height>=t.height}function hZ(e,t,n,r,o){let i,a;return"v"===e?(i=r||o||pZ(t,n,!0),a=fZ(t,n,!r)):(i=pZ(t,n),a=o||fZ(t,n,!1)),i&&a}function mZ(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function gZ(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 pZ(e,t,n.rotate)&&fZ(e,t,n.rotate)}(e,o,n))return!1;const i=.5*o.height;return n.rotate?(r.x=mZ(e.x,e.width,o.height,n.align)+i,r.y=mZ(e.y,e.height,o.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=mZ(e.x,e.width,o.width,n.align),r.y=mZ(e.y,e.height,o.height,n.justify)+i),r}function yZ(e){let{bar:t,view:n,direction:r,position:o,padding:i=sZ}=e;const a={};if(cW(a,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?(a.y=0,a.height=e):("outside"===o&&"down"===r||"opposite"===o&&"up"===r)&&(a.y=i,a.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?(a.x=0,a.width=e):("outside"===o&&"right"===r||"opposite"===o&&"left"===r)&&(a.x=i,a.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}(a,n),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{top:n=sZ,bottom:r=sZ,left:o=sZ,right:i=sZ}=t;e.x+=o,e.width-=o+i,e.y+=n,e.height-=n+r}(a,i),a}function bZ(e){let t,n,r,o,i,{direction:a,fitsHorizontally:l,measured:s,node:u,orientation:c,placementSettings:d,rect:p}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yZ;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}),h.push(o),t=!i||o[m]>t[m]?o:t,hZ(c,o,s,l,r.overflow)){n=o;break}return n||(n=t,i=h.indexOf(n)),r=d[i],{bounds:n,placement:r}}function vZ(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:i=sZ,bottom:a=sZ,left:l=sZ,right:s=sZ}=o,u=e.x+e.dx,c=e.y+e.dy,d=n?Math.min(t.width,r.height):Math.min(t.height,r.width),p=n?Math.min(t.height,r.height):Math.min(t.width,r.width),f=.5*t.height,h=1e-9;return{x:(n?u-f:u)-l-h,y:(n?c:c-f)-i-h,width:p+(l+s)-h,height:d+(i+a)-h}}function xZ(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:o,collectiveOrientation:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bZ,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gZ,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:lZ;const u=[],c={container:r,targetNodes:n,labels:[],orientation:i};let d,p,f,h,m,g,y,b,v,x,w,S,E,C;for(let e=0,s=n.length;e<s;e++){g=null,p=n[e],f=p.node,E=uZ(f,t),v=p.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(h=p.texts[t],!cZ(h))continue;x=p.labelSettings[t],b=p.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:o,lblStngs:x,measured:b,node:f,orientation:C,placements:S,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){m=w.justify;const t="function"==typeof x.linkData?x.linkData(E,e):void 0,n="function"==typeof w.overflow?w.overflow(E,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===i||o);if(d=l(g,h,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n}),d){const n=vZ(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(hW(hW({},E),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(hW(hW({},E),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=vZ(d,b,r,g,w.background.padding))),u.push(d),c.labels.push({node:f,textBounds:n})}}}}const k=u.filter(s(c)),_=k.filter((e=>void 0!==e.backgroundBounds)).map(dZ);return[..._,...k]}function wZ(e){const t=2*Math.PI;return(e%t+t)%t}function SZ(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function EZ(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function CZ(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),l=r*a-o*i,s=e*e-l*l;if(s<0)return null;let u=Math.sqrt(s);return{x:l*a+i*u,y:-l*i+a*u}}function kZ(e){let t,n,{radius:r,size:o,angle:i}=e,{width:a,height:l}=o,s={x:a/2,y:l/2};switch(Math.floor(i/(Math.PI/2))){case 0:if(t=CZ(r,s,i),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=CZ(r,s,Math.PI-i),!t)return null;n={x:-a,y:-l};break;case 2:if(t=CZ(r,s,i-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-l};break;case 3:if(t=CZ(r,s,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:l}}function _Z(e){let{slice:t,measured:n,padding:r}=e,{start:o,end:i,innerRadius:a,outerRadius:l}=t,s=l-a-2*r,u=i-o;if(u<Math.PI){let e=(n.height/2+r)/Math.tan(u/2);e>a&&(s=l-e-2*r)}if(s<0||s<n.minReqWidth)return null;const c=wZ((o+i)/2);let d=l-r,p={x:Math.sin(c)*d,y:-Math.cos(c)*d,width:s,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 MZ(e){let{context:t,node:n,bounds:r}=e;let{start:o,end:i}=n.desc.slice;const a=wZ((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 RZ(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function AZ(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 LZ(e){let t,n,{slice:r,direction:o,position:i,padding:a,measured:l,view:s,context:u,store:c}=e,{start:d,end:p,innerRadius:f,offset:h}=r;switch(i){case"into":t="rotate"===o?_Z({slice:r,measured:l,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:o,end:i,innerRadius:a,outerRadius:l}=t;const s=wZ((o+i)/2);let u=kZ({radius:l,size:{width:r.width+2*n+1,height:r.height+2*n},angle:s});return u?(u.baseline="top",IX(u,{x1:0,y1:0,x2:Math.sin(o)*l,y2:-Math.cos(o)*l})||IX(u,{x1:0,y1:0,x2:Math.sin(i)*l,y2:-Math.cos(i)*l})||SX({cx:0,cy:0,r:a},u)?null:(SZ(u,n),u)):null}({slice:r,measured:l,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:f},t="rotate"===o?_Z({slice:n,measured:l,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:o}=e;const{start:i,end:a,outerRadius:l}=t,s=wZ((i+a)/2);let u=kZ({radius:l,size:{width:r.width+2*n+1,height:r.height+2*n},angle:s});return u?(u.baseline="top",SZ(u,n),o.insideLabelBounds.some((e=>RX(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:l,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:l,offset:s}=t,u=l+r,c=a-i;if(c<Math.PI&&(n.height/2+r)/Math.tan(c/2)>u)return null;const d=wZ((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-s.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-l;t<h&&(h=t)}if(Math.sin(m)>.001){let e=p<0?o.x:o.x+o.width,t=Math.abs(e-s.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-l;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:l,padding:a,view:s}):function(e){let{slice:t,measured:n,padding:r,view:o,context:i}=e,{start:a,end:l,outerRadius:s,offset:u}=t;const c=wZ((a+l)/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=s+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:l,padding:a,view:s,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,l=wZ((r+o)/2);switch(Math.floor(l/(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(l)*t,y2:i.y-Math.cos(l)*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(l)*t,y2:i.y-Math.cos(l)*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(l)*t,y2:i.y-Math.cos(l)*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(l)*t,y2:i.y-Math.cos(l)*t,strokeWidth:1}}}}}(t,u,r)),t}function IZ(e){let{context:t,direction:n,measured:r,node:o,placementSettings:i,rect:a,store:l}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:LZ;for(let e=0;e<i.length;e++){let u=i[e],c=s({context:t,slice:o.desc.slice,view:a,direction:n,position:u.position,measured:r,padding:u.padding,store:l});if(c)return{bounds:c,placement:u}}return{bounds:null,placement:null}}function DZ(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 PZ=/\n+|\r+|\r\n/,TZ=/\s/,OZ=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function NZ(e){return"string"==typeof e?-1!==e.search(PZ):-1!==String(e).search(PZ)}function qZ(e){return-1!==e.search(TZ)}function FZ(e){return-1!==e.search(OZ)}function zZ(e,t,n){return Math.max(t,Math.min(n,e))}function jZ(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:o=[NZ],noBreakAllowedIdentifiers:i=[],suppressIdentifier:a=[qZ,NZ,e=>""===e],hyphenationIdentifiers:l=[FZ]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(s);const u=s.length,c=n?e=>e>=0:e=>e<u;let d=n?u:-1;function p(e){const t=zZ(e,0,u-1),n=s[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,s,o,i);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,s))),hyphenation:l.some((e=>e(n,t,s))),width:c.width,height:c.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=zZ(e,0,u-1),c(d)?p(d):{done:!0}},peek:p,length:u}}const BZ="…",$Z=/^\s*\d+(\.\d+)?px\s*$/i;function WZ(e){return"string"===typeof e&&$Z.test(e)}function HZ(e){const t=e["font-size"]||e.fontSize;return WZ(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function VZ(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=HZ(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function GZ(e,t){return{lines:[],line:"",width:0,maxLines:VZ(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function UZ(e){e.lines.push(e.line),e.line="",e.width=0}function YZ(e,t){e.line+=t.value,e.width+=t.width}function KZ(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 XZ(e,t,n){const r=jZ({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?KZ(e,t,r):t,UZ(e),YZ(e,t)):YZ(e,t)}}function QZ(e,t){const n=jZ({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=GZ(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){UZ(r),o=!1;break}1===e.breakOpportunity?UZ(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?KZ(r,e,n):e,UZ(r),YZ(r,e)):YZ(r,e)}return{lines:r.lines,reduced:o}}function JZ(e,t){const n=jZ({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=GZ(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){UZ(r),o=!1;break}1===e.breakOpportunity?UZ(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?UZ(r):e.width>r.maxWidth?XZ(r,e,t):(UZ(r),YZ(r,e)):YZ(r,e)}return{lines:r.lines,reduced:o}}function ZZ(e){return{"break-all":QZ,"break-word":JZ}[e.wordBreak]}function e0(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=ZZ(n);if(!r)return;const o=e(n);if(o.width>n.maxWidth||NZ(n.text)){const i=(HZ(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,l)=>{const s=cW({},t);s.text=a,s._lineBreak=!0,i+=n,e.reduced&&l===e.lines.length-1?s.text+=BZ:delete s.maxWidth,s.dy=isNaN(s.dy)?i:s.dy+i,i+=r,i+=n,o.children.push(s)})),o}(a,n,i,o.height)}}}}function t0(e,t){let{text:n,"font-size":r,"font-family":o,maxWidth:i}=e;if(n="string"==typeof n?n:"".concat(n),void 0===i)return n;let a=t({text:n,fontSize:r,fontFamily:o}).width;if(a<=i)return n;let l=0,s=n.length-1;for(;l<=s;){let e=Math.floor((l+s)/2);a=t({text:n.substr(0,e)+BZ,fontSize:r,fontFamily:o}).width,a<=i?l=e+1:s=e-1}return n.substr(0,s)+BZ}function n0(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 r0={},o0={},i0={fontSize:void 0,fontFamily:void 0};let a0;function l0(e,t,n){const r=e+t+n;return"number"!=typeof o0[r]&&(a0=a0||document.createElement("canvas").getContext("2d"),function(e,t){i0.fontSize===e&&i0.fontFamily===t||(a0.font=e+" "+t,i0.fontSize=e,i0.fontFamily=t)}(t,n),o0[r]=a0.measureText(e).width),o0[r]}function s0(e){return"number"!=typeof r0[e]&&(r0[e]=function(e){if(WZ(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),r0[e]}function u0(e){let{text:t,fontSize:n,fontFamily:r}=e;return{width:l0(t,n,r),height:s0(n)}}function c0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u0;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,l=e.y||0,s=e.dx||0,u={x:0,y:l+((e.dy||0)+n0(e))-.75*o.height,width:i,height:o.height},c=e["text-anchor"]||e.anchor;return u.x="middle"===c?a+s-i/2:"end"===c?a+s-i:a+s,u}function d0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u0;const n=ZZ(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||NZ(e.text))){const i=n(e,(e=>t({text:e,fontFamily:o,fontSize:r}))),a=cW({},e);let l=0,s="";for(let e=0,n=i.lines.length;e<n;e++){let a=i.lines[e];a+=e===n-1&&i.reduced?BZ:"";const u=t({text:a,fontSize:r,fontFamily:o}).width;u>=l&&(l=u,s=a)}a.text=s;const u=c0(a,t);return u.height=HZ(e)*i.lines.length,u}return c0(e,t)}function p0(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function f0(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 h0(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function m0(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 h0({cx:i.x,cy:i.y,r:a})}(e.desc.slice):"circle"===e.type?h0(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var g0={bar:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xZ;const s=cW({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);s.fontSize=parseInt(s.fontSize,10);const u=t.labels.map((e=>cW({},s,t,e))),c=t.labels.map((e=>e.placements.map((n=>cW({},s,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:l}=e;const s={},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,!RX(f,n))continue;let v=uZ(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,cZ(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,s.fontFamily=m.fontFamily,s.fontSize="".concat(m.fontSize,"px"),s.text=p,h=l.measureText(s),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*sZ);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]))),l({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,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:IZ,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:AZ;const u=cW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);u.fontSize=parseInt(u.fontSize,10);const c=t.labels.map((e=>cW({},u,t,e))),d=t.labels.map((e=>e.placements.map((n=>cW({},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:l}=e[i].desc.slice,s=wZ((a+l)/2);switch(Math.floor(s/(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)=>wZ((e.desc.slice.start+e.desc.slice.end)/2)-wZ((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=RZ(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=DZ(u,r,i),b=l({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){MZ({context:h,node:t,bounds:v});if(!hX(EZ(v),o))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,i=s(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]:f0;const l=cW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},i.label);l.fontSize=parseInt(l.fontSize,10);const s=cW({},l,t),u=t.labels.map((e=>cW({},s,e))),c={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=p0(t,n),{type:l,bounds:p}=m0(t);if(!p)continue;let f,h=0,m=[],g=[],y="circle"===l?2*p.r*.9:p.height;for(h+=s.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"===l?p.cy-.9*p.r:p.y,x+=s.justify*v+s.padding,f=0;f<b;f++){let t,n=u[f];if("circle"===l){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+s.padding,y:x,width:2*n-2*s.padding,height:m[f].height}}else t={x:p.x+s.padding,y:x,width:p.width-2*s.padding,height:m[f].height};x+=m[f].height+s.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!==BZ){const e=t0(h,o.measureText);if(BZ===e)continue;h.ellipsed=e}void 0!==c&&(h.data=c),d.push(h)}}}return d}};const y0={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&g0[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 l=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:l,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},g0[e.strategy.type]))})),t}};const b0={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,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},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function v0(e){let{x:t=0,y:n,item:r,globalMetrics:o,createSymbol:i,direction:a="ltr"}=e,l=r.label.displayObject,s=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(cW({},u,p));return delete f.collider,l.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,l,{textMetrics:s,fontSize:parseInt(l.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[f,l],collider:{type:"rect",x:t,y:n,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function x0(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 w0(e,t){let n,r,o,i,{onScroll:a=()=>{}}=t,l=null,s=0;const u={itemize:t=>{n=function(e,t){let n,r,{resolved:o,dock:i}=e,a=[],l=o.items.items,s=o.symbols.items,u=o.labels.items,c=0,d=0,p=0;for(let e=0;e<l.length;e++){if(!1===l[e].show)continue;const o=void 0!==u[e].text?u[e].text:u[e].data.label||"";n=cW({},u[e],{type:"text",fontSize:"".concat(parseInt(u[e].fontSize,10),"px"),text:o,title:o}),r={symbol:{meta:s[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),c=Math.max(s[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),l=isNaN(n.layout.scrollOffset)?l:n.layout.scrollOffset},getItemsToRender:t=>{o=t.viewRect,s=u.getContentOverflow(o);const a=u.extent();l=Math.max(0,Math.min(l,s)),i=cW({},o);const c="horizontal"===u.orientation()?"x":"y";return i[c]-=l,i["x"===c?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:o,create:i=v0,parallels:a,createSymbol:l}=n;const s=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"===s?r.x+x+r.width-m-(b-t.x):b,item:c[e],globalMetrics:u,direction:s,createSymbol:l});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 l=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]));l=Math.min(l,i)}const s=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(l,s))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return x0(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,x0(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(s,l-e));t!==l&&(l=t,a())},offset:()=>l,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>x0(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 S0(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const E0={up:"▲",right:"▶",down:"▼",left:"◀"};function C0(e,t){let{size:n,isActive:r,direction:o,nav:i,attrs:a}=t,l={},s="";const u=a;i&&i.button&&("function"==typeof i.button.class?l=i.button.class({direction:o}):i.button.class&&(l=i.button.class),"function"==typeof i.button.content&&(s=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(l).length||(c.border="0",c.background="none"),(!r||i&&i.disabled)&&(u.disabled="disabled"),e("button",cW({class:S0(l),style:c},u),[s||e("span",{style:{pointerEvents:"none"}},[E0[o]])])}function k0(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],l="vertical"===n.layout.orientation,s="rtl"===i.direction(),u=i.hasNext(),c=i.hasPrev();if(!c&&!u)return void e.render([]);const d=l?["right","left"]:["down","up"];s&&l&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":l?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:s&&!l?"rtl":"ltr"},[C0(a,{size:32,isActive:u,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),C0(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 _0(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=cW({},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(cW({},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 M0(e,t,n,r){let o,i,a,{itemRenderer:l,navigationRenderer:s,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;l.parallelize(e,c?void 0:n);const r=l.extent()>e?s.extent():0,f=l.spread(),h=r?s.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"===l.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,l.spread())}else{const e=p.height-o.height-(o.height?t.spacing:0),n=p.width;l.parallelize(e,c?void 0:n);const r=l.extent()>e?s.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?s.spread():0,l.spread())}return i=cW({},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:cW({},e,o),content:cW({},e,i),navigation:cW({},e,a),orientation:n,preferredSize:d}}function R0(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?cW({},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:cW(!0,{},b0.title,e.style.title),settings:e.settings.settings.title}),i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:b0.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:cW(!0,{},b0.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),l=cW(!0,{},(e.settings.settings.item||{}).shape);void 0===l.fill&&e.settings.scale&&(l.fill={scale:e.settings.scale});const s=e.resolver.resolve({data:n,defaults:cW(!0,{},b0.item.shape,e.style.item.shape),settings:l}),u=e.resolver.resolve({data:n,defaults:cW(!0,{},{show:b0.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:s,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 A0(e){const{rect:t,settings:n,state:r,itemRenderer:o,navigationRenderer:i,titleRenderer:a}=e,l=n.layout.dock,s="top"===l||"bottom"===l?"horizontal":"vertical",u=M0(t,r.display,s,{itemRenderer:o,navigationRenderer:i,titleRenderer:a});e.renderer.size(u.content);let c=o.getItemsToRender({viewRect:cW({},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 L0={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=A0(this);this.update(e)},this.itemRenderer=w0(this,{onScroll:this.onScroll}),this.navigationRenderer=k0(this),this.titleRenderer=_0(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),R0(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=M0(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(){R0(this)},render(){return A0(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 I0(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 D0(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function P0(e){return D0(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 T0(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 O0(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=function(e){return D0(e.layout.dock,e.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"})}(e.settings);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}),s=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}),u={isVertical:t,nodes:[],title:{anchor:P0(e.settings),textMetrics:l,textBounds:s,requiredWidth:()=>{if(!n.show)return 0;let e=s.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=s.height;return t&&(e+=n.padding),Math.min(e,u.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(...u.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(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(o,e.stgns.maxLengthPx))}}};return u}const N0={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=T0(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=O0(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=O0(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=T0(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,l="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,l="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,l=r?"end":"start");const s={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:l,title:n.title.text};return I0(e,s),s}(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,l=n.isVertical?r.size:n.legend.length(),s=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:l,height:s,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return I0(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 l=0,s=0,u=0,c="alphabetical";return n.isVertical?(s=t.y+t.height*a.pos,c=0===a.pos?"text-before-edge":"text-after-edge"):l=t.x+t.width*a.pos,"right"===n.ticks.anchor?(l=t.x+r.size+r.tick.padding,i.x=t.x+t.width):"left"===n.ticks.anchor?(l=t.x-r.tick.padding,o="end"):"top"===n.ticks.anchor?(s=t.y-r.tick.padding,u-=.25*a.textMetrics.height,o=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(s=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:l,y:s,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 q0={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 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 F0(e,t){let{generatorType:n,item:r,data:o,major:i,minor:a,layerObj:l,stngs:s}=t,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const c={type:"path",points:e,generatorType:n,major:i,minor:a,layerObj:l,stngs:s,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 z0(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:l,height:s}=r,u=o.resolve({data:t,defaults:q0.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?s:l,minor:"vertical"===n.orientation?l:s}}),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=hW({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:q0.layers.curve,show:q0.layers.show},settings:{curve:m.curve,show:m.show}}),lines:o.resolve({data:h,defaults:cW({},q0.layers.line,i.line),settings:m.line}),areas:o.resolve({data:h,defaults:cW({},q0.layers.area,i.area),settings:m.area})}}(e),a=[];return t.forEach(((t,l)=>{const s=r.items[l];if(!1===s.show)return;s.datum=s.data,s.data=[],s.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),s.data.push(d.data)}c.push(d)}const f=u.sort(((e,t)=>e-t))[Math.floor((u.length-1)/2)];a.push({layerObj:s,lineObj:o.items[l],areaObj:i.items[l],median:f,points:c,consumableData:t.consumableData})})),a}const j0={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=z0({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=[],l=i.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:s,areaObj:u,points:c}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===i.orientation){const e=cW(!0,{},p);p=cW(!0,{},d),d=cW(!0,{},e)}l.area&&!1!==u.show&&a.push(F0(c,{data:e.consumableData,item:u,generatorType:"area",major:p,minor:d,layerObj:s,stngs:i})),t&&!1!==t.show&&(a.push(F0(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:s,stngs:i},"none")),!o&&l.area&&!1!==u.show&&!1!==t.showMinor0&&a.push(F0(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:s,stngs:i},"none")))})),a}(i,{width:n,height:r,missingMinor0:o,stngs:this.stngs})}};function B0(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 $0(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function W0(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 H0={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=B0(this,e,!1);LX({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})))}(this.settings),this.state.start=B0(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=B0(this,e),function(e){if(e.state.active){const t=$0(e,e.state.start),n=$0(e,e.state.end),r=e.chart.shapesAt(W0(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([cW({type:"rect"},W0(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 V0(e,t,n){let{renderer:r,style:o,props:i,h:a}=n;const l=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),s=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:S0(cW({"pic-tooltip":!0},l.tooltip)),style:cW({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:o.content,class:S0(cW({"pic-tooltip-content":!0},l.content))},s),a("div",{class:S0(cW({"pic-tooltip-arrow":!0},l.arrow)),style:cW({},o.arrow,o["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(u),r.element().children[0]}function G0(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}(),l=function(){},s=()=>{r=null,o=null,i=!1,a.set("fulfilled")};return l.invoke=function(e){let l=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),l>0&&(o&&clearTimeout(o),o=setTimeout(s,l+Math.max(u,0)))},l.clear=()=>{i?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),o&&clearTimeout(o),r=null,o=null,i=!1},l.on=(e,t)=>{a.on(e,t)},l.destroy=()=>{l.clear(),a.destroy()},l}function U0(){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 Y0(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 K0(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 X0(e,t,n,r,o,i){const a=t+i.x,l=n+i.y,s=o;return!(a<0||l<0)&&!(a+r>e.width||l+s>e.height)}function Q0(e){let{area:t,vx:n,vy:r,width:o,height:i,offset:a}=e;const l=n+a.x,s=r+a.y,u=o,c=i;let d=l<0?-l:0,p=s<0?-s:0;return d+=l+u>t.width?-(l+u-t.width):0,p+=s+c>t.height?-(s+c-t.height):0,{x:d,y:p}}function J0(e){let{options:t,pointer:n,width:r,height:o,dockOrder:i,x:a,y:l}=e;const{targetBounds:s}=n,u=U0(t.offset),c=u[t.dock];if(c)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(l,"px"),transform:c},computedArrowStyle:K0(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?s.width:window.innerWidth,height:"target"===t.area?s.height:window.innerHeight},p=Y0(r,o,t.offset),f=[],h="target"===t.area?a:s.left+a,m="target"===t.area?l:s.top+l;for(let e=0;e<i.length;e+=1){const n=i[e],s=Q0({area:d,vx:h,vy:m,width:r,height:o,offset:p[n]}),c={left:"".concat(a,"px"),top:"".concat(l,"px"),transform:u[n]},g=K0(t.offset)[n];0!==s.x&&(c.width="".concat(r-20-Math.abs(s.x),"px"),"top"!==n&&"bottom"!==n||(c.left="".concat(a+s.x,"px"),g.left="calc(50% ".concat(s.x>0?"-":"+"," ").concat(Math.abs(s.x),"px)")));const y={computedTooltipStyle:c,computedArrowStyle:g,dock:n,rect:{width:r,height:o}};if(0===s.x&&0===s.y)return y;y.offset=s,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function Z0(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 cW({scaleRatio:o.scaleRatio},o.computedInner)}const e1={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:o,height:i,options:a}=e;const{targetBounds:l}=r,{x:s,y:u,width:c,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:s,y:u+d/2},right:{x:s+c,y:u+d/2},top:{x:s+c/2,y:u},bottom:{x:s+c/2,y:u+d},inside:{x:s+c/2,y:u+d/2}},f=U0(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:K0(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?l.width:window.innerWidth,height:"target"===a.area?l.height:window.innerHeight},g=Y0(o,i,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(X0(m,"target"===a.area?p[t].x:l.left+p[t].x,"target"===a.area?p[t].y:l.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:K0(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:o,area:i,width:a,height:l}=e;const s="top",u="target"===t.area?n[s].x:o.left+n[s].x,c=("target"===t.area?n[s].y:(o.top,n[s].y),r[s]),d=u+c.x,p=(c.y,a);let f=n.top.x;return d<0&&d+p>i.width||(d<0?f-=d:d+p>i.width&&(f-=d+p-i.width)),f}({options:a,docks:p,dockOffsets:g,targetBounds:l,area:m,width:o,height:i});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:f.top},computedArrowStyle:K0(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 J0({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 l=i[0],{dx:s,dy:u}=n,c=a.getComponentBoundsFromNode(l),d=s+c.x+c.width/2,p=u+c.y+c.height/2,{start:f,end:h,outerRadius:m}=l.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"]),J0({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 t1(e,t){let{width:n,height:r}=e,{chart:o,state:i,props:a}=t;const l={resources:{formatter:o.formatter,scale:o.scale,component:o.component,getComponentBoundsFromNode:e=>Z0(e,i.pointer,o),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Z0(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},s=typeof a.placement;if("object"===s&&"function"==typeof a.placement.fn)return a.placement.fn(l);let u={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===s&&(u=cW(u,a.placement(l))),"object"===s&&e1[a.placement.type]?u=cW(u,a.placement):"string"===s&&e1[a.placement]&&(u=cW(u,{type:a.placement})),l.options=u;const c=e1[u.type](l);let{x:d,y:p,width:f,height:h}=l.resources.getComponentBoundsFromNode(l.nodes[0]);return d+=l.pointer.dx,f+=d,p+=l.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 n1;function r1(){n1=null}const o1={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 i1={require:["chart","renderer"],defaultSettings:{settings:o1,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(),l=r.targetElement.getBoundingClientRect(),s=o,u=i,c=a.left-l.left,d=a.top-l.top,p=o-a.left,f=i-a.top;return o-=l.left,i-=l.top,{x:o,y:i,dx:c,dy:d,cx:p,cy:f,clientX:s,clientY:u,targetBounds:l,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=G0({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){n1&&n1!==e&&n1()}(t),n1=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,cW({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,cW({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),n1===t&&(n1=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(),r1()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),r1()},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},l=[];return e.forEach((e=>{if("function"==typeof o.extract){const t=cW({node:e},a);l.push(o.extract(t))}})),l}(e,this),n=t1(V0(t,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=V0(t,n,this)}};const a1={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 l1={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},s1=/([astvzqmhlc])([^astvzqmhlc]*)/gi,u1=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function c1(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(s1,((e,n,r)=>{const o=function(e){const t=e.match(u1);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<l1[i])return"";for(t.push([a,...o.splice(0,l1[i])]);o.length>=l1[i]&&o.length&&l1[i];)t.push([a,...o.splice(0,l1[i])]);return""})),t}const d1=2*Math.PI;function p1(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function f1(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 h1(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=p1(e,t),l=p1(t,n),s=p1(n,r),u={x:f1(.5,e.x,t.x,n.x,r.x),y:f1(.5,e.y,t.y,n.y,r.y)},c=p1(a,l),d=p1(l,s);return h1(e,a,c,u,o,i-1),h1(u,d,s,r,o,i-1),o}function m1(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 h1(e,r,o,n)}function g1(e,t,n){const r=[],o=!!e[4],i=!!e[5],a=e[3];let l,s,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:l,cy:s,rx:f,ry:h,sweepAngle:u,startAngle:c}=function(e,t,n,r,o,i,a,l,s){let u,c,d,p,f,h;const m=VK(n%360),g=Math.cos(m),y=Math.sin(m),b=(l-i)/2,v=(s-a)/2,x=g*b+y*v,w=g*v-y*b;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,E=t*x,C=S**2+E**2,k=(e*t)**2-C;let _=Math.sqrt(Math.max(k/C,0));r===o&&(_=-_);const M=_*(S/t),R=_*(-E/e);p=g*M-y*R+(l+i)/2,f=y*M+g*R+(s+a)/2;const A=(x-M)/e,L=(w-R)/t,I=(-x-M)/e,D=(-w-R)/t;return u=Math.atan2(L,A),u+=u<0?d1:0,c=Math.atan2(D,I),c+=c<0?d1:0,d=c-u,!o&&u<c?d-=d1:o&&c<u&&(d+=d1),d%=d1,{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)%d1,n=Math.cos(t),o=Math.sin(t);r.push({x:l+n*f+-o*n,y:s+o*h+n*o})}return r}function y1(e){const t=c1(e),n=[],r=[];let o=0,i=0,a=null,l=null,s=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,l=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(s=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(...g1(c,o,i)),o+=c[6],i+=c[7];break;case"A":r.push(...g1(c,o,i)),o=c[6],i=c[7];break;case"c":r.push(...h1({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,l=c[4]+i,o+=c[5],i+=c[6];break;case"C":r.push(...h1({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],l=c[4],o=c[5],i=c[6];break;case"s":null!==a&&null!==a||(a=o,l=i),r.push(...h1({x:o,y:i},{x:2*o-a,y:2*i-l},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),a=c[1]+o,l=c[2]+i,o+=c[3],i+=c[4];break;case"S":null!==a&&null!==a||(a=o,l=i),r.push(...h1({x:o,y:i},{x:2*o-a,y:2*i-l},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),a=c[1],l=c[2],o=c[3],i=c[4];break;case"Q":r.push(...m1({x:o,y:i},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),s=c[1],u=c[2],o=c[3],i=c[4];break;case"q":r.push(...m1({x:o,y:i},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),s=c[1]+o,u=c[2]+i,o+=c[3],i+=c[4];break;case"T":null!==s&&null!==s||(s=o,u=i),s=2*o-s,u=2*i-u,r.push(...m1({x:o,y:i},{x:s,y:u},{x:c[1],y:c[2]})),o=c[1],i=c[2];break;case"t":null!==s&&null!==s||(s=o,u=i),s=2*o-s,u=2*i-u,r.push(...m1({x:o,y:i},{x:s,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 b1={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=>{y1(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 v1=[function(e){e.component("box",LQ),e.component("box-marker",LQ)},function(e){e.component("point",qQ),e.component("point-marker",qQ)},function(e){e.component("pie",BQ)},function(e){e.component("grid-line",GQ)},function(e){e.component("ref-line",tJ)},function(e){e.component("axis",EJ)},function(e){e.component("container",CJ)},function(e){e.component("text",MJ)},function(e){e.component("scrollbar",LJ)},function(e){e.component("brush-range",VJ),e.component("brush-area-dir",KJ)},function(e){e.component("range",ZJ)},function(e){e.component("brush-lasso",iZ)},function(e){e.component("labels",y0)},function(e){e.component("legend-cat",L0)},function(e){e.component("legend-seq",N0)},function(e){e.component("line",j0)},function(e){e.component("brush-area",H0)},function(e){e.component("tooltip",i1)},function(e){e.component("debug-collider",a1)},function(e){e.component("debug-path-to-points",b1)}];class x1{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 w1{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 LX(this,e)}intersectsLine(e){return IX(this,SW(e))}intersectsRect(e){return RX(this,wW(e))}intersectsCircle(e){return SX(e,this)}intersectsPolygon(e){return MX(e,this)}intersectsGeoPolygon(e){return zX(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 S1{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 wX(this,e)}intersectsLine(e){return EX(this,SW(e))}intersectsRect(e){return SX(this,wW(e))}intersectsCircle(e){return n=e,!yX(t=this)&&!yX(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return CX(this,e)}intersectsGeoPolygon(e){return NX(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class E1{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 EX({cx:e.x,cy:e.y,r:this.tolerance},this)}return PX(this,e)}intersectsLine(e){return DX(this,SW(e))}intersectsRect(e){return IX(wW(e),this)}intersectsCircle(e){return EX(e,this)}intersectsPolygon(e){return _X(e,this)}intersectsGeoPolygon(e){return FX(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class C1{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 kX(this,e)}intersectsCircle(e){return CX(e,this)}intersectsLine(e){return _X(this,SW(e))}intersectsRect(e){return MX(this,wW(e))}intersectsPolygon(e){return TX(this,e)}intersectsGeoPolygon(e){return OX(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 k1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new C1(...t)}function _1(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function M1(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 R1{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++)M1(this.vertices[e]),this.vertices[e].length>2&&_1(this.vertices[e]),this.polygons[e]=k1({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 qX(this,e)}intersectsCircle(e){return NX(e,this)}intersectsLine(e){return FX(this,SW(e))}intersectsRect(e){return zX(this,wW(e))}intersectsPolygon(e){return OX(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!RX(n,r)&&(AX(r,n)?xX(t,e):xX(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 A1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new R1(...t)}class L1{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=>PX(t,e)))}intersectsCircle(e){return this.segments.some((t=>EX(e,t)))}intersectsLine(e){const t=SW(e);return this.segments.some((e=>DX(e,t)))}intersectsRect(e){const t=wW(e);return this.segments.some((e=>IX(t,e)))}intersectsPolygon(e){return this.segments.some((t=>_X(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>FX(e,t)))}points(){return this._points}}const I1=MH();function D1(e,t){return I1.get(e)(t)}I1.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new w1(...t)})),I1.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new S1(...t)})),I1.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new E1(...t)})),I1.add("polygon",k1),I1.add("geopolygon",A1),I1.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new L1(...t)}));class P1{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=D1(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 T1{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new T1).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 T1&&(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],l=this._elements[2][1],s=this._elements[2][2],u=0;return u=e*o*s+t*i*a+n*r*l-n*o*a-t*r*s-e*i*l,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],l=this._elements[2][0],s=this._elements[2][1],u=this._elements[2][2];return this._elements=[[i*u-a*s,r*s-n*u,n*a-r*i],[a*l-o*u,t*u-r*l,r*o-t*a],[o*s-i*l,l*n-t*s,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,l=[];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];l.push({x:i[0],y:i[1]})}return l}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 O1=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function N1(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 q1(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function F1(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function z1(e,t){t.args.length>=6&&e.transform(...t.args)}function j1(e,t){const n=function(e){let t,n=[];for(;null!==(t=O1.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?N1(t,r):"scale"===r.cmd?q1(t,r):"matrix"===r.cmd?z1(t,r):"translate"===r.cmd&&F1(t,r)}const B1={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},$1={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 W1(e,t){if(!t||!t.length||!e||"function"!=typeof $1[e.type])return[];switch(e.type){case"type":case"tag":return $1[e.type](e.value,t);case"attr":return $1[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return $1[e.type](t);default:return[]}}var H1={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(B1[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(B1).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(),l=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=i.slice(),void(l=!1);n=W1(e,n),l=!0})),l&&t.push(n);const s=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(s)}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 V1(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=wW(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=SW(o),i.type=r;else if("polygon"===r||"polyline"===r){i={type:"path",d:WK(o,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<o.length;t++)e+=WK(o[t],!0);i={type:"path",d:e}}return i}class G1{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=>V1(e,t,n)))}:V1(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new G1(e))),this._parent=()=>e.parent?new G1(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 U1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new G1(...t)}class Y1{constructor(e){this._node=U1(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 K1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Y1(...t)}function X1(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=K1(n);const e=n.parent;e&&"stage"!==e.type&&X1(e,t.parent)}}function Q1(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)))?A1(n):k1(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=K1(o);return X1(o,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=K1(e);return X1(e,t),t}return null}(e,t,r)}function J1(e,t,n,r){const o=e.length;for(let i=0;i<o;i++){const o=e[i],a=Q1(o,t,r);a&&n.push(a),!o.children||a||o.collider||J1(o.children,t,n,r)}}function Z1(e,t,n){const r=e.length;for(let o=0;o<r;o++){const r=e[o];if(null!==Q1(r,t,n))return!0;if(r.children&&!r.collider)return Z1(r.children,t,n)}return!1}function e2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(EW(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=xW(e).map((e=>KK(e,t))),["intersectsRect",n];case"line":return n=vW(e).map((e=>KK(e,t))),["intersectsLine",n];case"point":return n=KK(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>KK(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>KK(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function t2(e,t){const[n,r]=e2(t,e.dpi),o=[];return n&&(J1([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 n2(e,t){const[n,r]=e2(t,e.dpi);return Z1([e],n,r)}class r2 extends x1{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,l;a=this.attrs,l=e,Object.keys($K).forEach((e=>{const t=l[e];void 0!==t&&(a[$K[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=cW(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof o&&(this.strokeReference=o),"string"==typeof i&&(this.fillReference=i)}findShapes(e){return H1.find(e,this).map((e=>U1(e)))}getItemsFrom(e){return t2(this,e)}containsPoint(e){return n2(this,e)}intersectsLine(e){return n2(this,e)}intersectsRect(e){return n2(this,e)}intersectsCircle(e){return n2(this,e)}intersectsPolygon(e){return n2(this,e)}intersectsGeoPolygon(e){return n2(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new T1;void 0!==this.attrs.transform&&j1(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new T1;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 P1(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=D1("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=D1(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class o2 extends x1{addChild(e){if(!(e&&e instanceof x1))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 i2=o2.prototype;class a2 extends r2{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=cW({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:l,y:s}=o,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),c=isNaN(n.height)?s:Math.max(s,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]=cW({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=i2.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=cW({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=i2.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=cW({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(i2.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=cW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(i2.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=cW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function l2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new a2(...t)}class s2 extends a2{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const u2=o2.prototype,c2=["x1","x2","y1","y2","id","offset","style"];class d2 extends r2{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=c2.length;r!==o;r++)n=c2[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return u2.addChild.call(this,e)}addChildren(e){return u2.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 u2.removeChild.call(this,e),this}removeChildren(e){return u2.removeChildren.call(this,e),this}}function p2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new d2(...t)}const f2=o2.prototype,h2=["patternUnits","x","y","width","height","id"];class m2 extends r2{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=h2.length;r!==o;r++)n=h2[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return f2.addChild.call(this,e)}addChildren(e){return f2.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 f2.removeChild.call(this,e),this}removeChildren(e){return f2.removeChildren.call(this,e),this}}class g2 extends r2{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:l}=e,s=cW({type:"rect",x:t,y:n,width:r,height:o},l);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=s,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=xW(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,o,i,a]=bW(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 y2 extends r2{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=cW({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 l=2*r,s=2*o,u=[{x:i,y:a},{x:i+l,y:a},{x:i+l,y:a+s},{x:i,y:a+s}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const[t,n,r,o]=bW(u);l=r-t,s=o-n,this.__bounds[e]=[{x:t,y:n},{x:t+l,y:n},{x:t+l,y:n+s},{x:t,y:n+s}]}else this.__bounds[e]=u;return this.__bounds[e]}}class b2 extends r2{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=cW(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=vW(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,o,i]=bW(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 v2=Math.PI/2;function x2(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function w2(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const S2={step:function(e){return new wH(e,.5)},stepAfter:function(e){return new wH(e,1)},stepBefore:function(e){return new wH(e,0)},linear:JW,basis:function(e){return new aH(e)},cardinal:uH.tension(0),catmullRom:dH,monotonex:function(e){return new gH(e)},monotoney:function(e){return new yH(e)},natural:function(e){return new vH(e)}};function E2(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 C2 extends r2{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=XW();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,l=tH(),s=i.coordinates?i.coordinates.defined:null;l[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(S2["monotone"===r.curve?"monotone".concat(t.p):r.curve]),s?l.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):l.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const u=i.connect?o.filter(l.defined()):o,c=("area"===a?l:l[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=y1(this.attrs.d),this.segments.length>1&&this.segments.every((e=>E2(e))))return void(this.collider=cW({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(E2(t))this.collider=cW({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],l=e[n],s=e[n+1],u=x2(l,a),c=x2(l,s),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=x2(a,l);r.push(w2(a,e-v2,t)),o.unshift(w2(a,e+v2,t))}const g=m?f:h,y=m?h:f;if(r.push(w2(l,g,t)),o.unshift(w2(l,y,t)),n===i-1){const e=x2(s,l);r.push(w2(s,e+v2,t)),o.unshift(w2(s,e-v2,t))}}return{type:"polygon",vertices:[...r,...o]}}(t,n,e.collider)}else this.collider=cW({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:y1(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]=bW(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 k2(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}let _2=class extends r2{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:l,collider:s,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!==l&&(this.attrs.title=String(l)),"object"==typeof u?this._textBoundsFn=()=>u:"function"==typeof i&&(this._textBoundsFn=i),"string"==typeof c&&(this.ellipsed=c),this.collider=cW({type:k2(this)?"bounds":null},s),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=xW(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[o,i,a,l]=bW(r);return this.__boundingRect[t]={x:o,y:i,width:a-o,height:l-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 M2=MH();function R2(e,t){return M2.get(e)(t)}M2.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new g2(...t)})),M2.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new y2(...t)})),M2.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _2(...t)})),M2.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new b2(...t)})),M2.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new C2(...t)})),M2.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new s2(...t)})),M2.add("container",l2),M2.add("defs",l2),M2.add("linearGradient",p2),M2.add("radialGradient",p2),M2.add("stop",p2),M2.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new m2(...t)}));const A2=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 cW(i,r),t.push(i),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function L2(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function I2(e,t,n){e.node=n[t],e.index=t}function D2(e,t,n,r){let o=!1;const i={siblings:e,node:null,index:0};for(let a=0,l=e.length;a<l;a++){if(I2(i,a,e),L2(i,r.create),o="function"==typeof i.node.disabled?i.node.disabled():i.node.disabled,o)continue;i.node=A2.save(i.node);const l=R2(i.node.type,i.node);l&&(i.node.transform&&(n.save(),j1(i.node.transform,n)),n.isIdentity()||(l.modelViewMatrix=n.clone()),t.addChild(l),i.node.children&&D2(i.node.children,l,n,r),i.node.transform&&n.restore()),A2.restore()}}function P2(e){let{items:t,stage:n,dpi:r,on:o={}}=e;return n||(n=R2("stage",r)),D2(t,n,new T1,o),n}function T2(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{const r=GK(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 O2(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 N2(){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 l={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 l.x=isNaN(e)?l.x:e,l.y=isNaN(t)?l.y:t,l.width=isNaN(n)?l.width:n,l.height=isNaN(r)?l.height:r,void 0!==o&&(l.scaleRatio.x=isNaN(o.x)?l.scaleRatio.x:o.x,l.scaleRatio.y=isNaN(o.y)?l.scaleRatio.y:o.y),void 0!==i&&(l.margin.left=isNaN(i.left)?0:i.left,l.margin.top=isNaN(i.top)?0:i.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(l.edgeBleed[e]=a[e],l.edgeBleed.bool=!0)})),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function q2(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:u0,textBounds:d0,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function F2(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const z2=200,j2=200;class B2{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*z2,height:n.computedPhysical.height+2*j2},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 $2=MH();function W2(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function H2(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function V2(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function G2(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],l=i[1],s=i[2];if(a in t.attrs&&!(l in r)&&e[l]!==t.attrs[a]){const n=s?s(t.attrs[a]):t.attrs[a];"function"==typeof e[l]?e[l](n):e[l]=n}}for(let t=0,n=o.length;t<n;t++){const n=o[t];e[n]=r[n]}}function U2(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=T2(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=T2(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))),G2(t,i,n,a),i.modelViewMatrix&&V2(i.modelViewMatrix.elements,t),$2.has(i.type)&&$2.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&&U2(i.children,t,n,r),t.restore()}}function Y2(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P2;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let o,i=!1,a=N2();const l=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",W2]];let s;const u=q2();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 B2(e)),n.appendChild(e),e),u.getScene=r=>{const o=H2(t&&t.getContext()||e.getContext("2d")),i=a.scaleRatio.x,l=a.scaleRatio.y,s={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*o*i,", ").concat(a.edgeBleed.top*o*l,")"):""};return 1===o&&1===i&&1===l||(s.transform+="scale(".concat(o*i,", ").concat(o*l,")")),n({items:[s],dpi:o,on:{create:[e0(u.measureText),F2(u)]}})},u.render=n=>{if(!e)return!1;s||(s=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]||O2(e,t,n),r[o]):O2(e,t,n)},clear(){r={}}}}(e.ownerDocument));const c=t&&t.getContext()||e.getContext("2d"),d=H2(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);s.clear();const m=i||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||u.clear(),U2(f.children,c,l,{patterns:s})),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=N2(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 K2(e,t){$2.add(e,t)}function X2(e,t){return Math.max(0,Math.min(e,t))}const Q2=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),J2=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Z2=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function e5(e){return Q2.test(e)}function t5(e){return J2.test(e)||Z2.test(e)}function n5(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],e5(n))return"ltr";if(t5(n))return"rtl"}return"ltr"}const r5={start:"end",end:"start",center:"center",middle:"middle"};function o5(e,t){return"rtl"===t?r5[e]:e}function i5(e,t){const n=[];let r;const o=[],i=[],a=[];let l,s;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),l=e.map(u),s=t.map(u);for(let e=0,r=t.length;e<r;e++){-1===l.indexOf(t[e].id)?n.push(t[e]):i.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===s.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=i5([],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=i5(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 a5(e,t,n){for(let r=0,o=e.length;r<o;r++)e[r].object=n(e[r].content.type,t)}function l5(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 s5(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&&(a5(o.diff.added,o.object,t),l5(o.diff.removed,r),s5(o.diff.items,t,n,r)))}function u5(e,t,n,r,o,i){const a=i5(e,t);return a5(a.added,n,r),l5(a.removed,i),s5(a.items,r,o,i),a.items}K2("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=X2(r/2,i>0?i:a),a=X2(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()})),K2("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()})),K2("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()})),K2("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)})),K2("text",(function(e,t){let{g:n,ellipsed:r,doStroke:o}=t;const i=r||t0(e,u0);e["font-weight"]?n.font="".concat(e["font-weight"]," ").concat(e["font-size"]," ").concat(e["font-family"]):n.font="".concat(e["font-size"]," ").concat(e["font-family"]);const a=n5(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const l=o5("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);l&&n.textAlign!==l&&(n.textAlign=l);const s=n0(e);n.fillText(i,e.x+e.dx,e.y+e.dy+s),o&&n.strokeText(i,e.x+e.dx,e.y+e.dy+s)}));const c5="http://www.w3.org/2000/svg",d5=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(c5,"container"===e?"g":e);return t.appendChild(n),n},p5=e=>{e.parentNode&&e.parentNode.removeChild(e)},f5=(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||t0(t.attrs,u0);const n=n5(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",o5(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(c5,"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?n0(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 h5{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 m5(){return new h5(u5,d5,f5,p5)}function g5(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 y5(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c5,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P2;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:m5)();let r,o,i,a=!1,l=N2();const s={transform:void 0},u=q2(),c={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g5,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 l="";const s=i[a],u=t(s),c="picasso-pattern-".concat(r,"-").concat(u);if("undefined"!=typeof window&&(l=window.location.href.split("#")[0]),!n[u]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:s.width,height:s.height,type:"pattern",id:c,children:[],fill:s.fill};s.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[u]=!0}o.node["".concat(a,"Reference")]="url('".concat(l,"#").concat(c,"')")}))},clear(){n={}}};return o}(c.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g5,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]:"",l=t(o[i]),s="picasso-gradient-".concat(r,"-").concat(l);if(!n[l]){let{orientation:t,degree:r,stops:a=[]}=o[i],u={};void 0===r&&(r=90),"radial"===t?u.type="radialGradient":(u=GK(r),["x1","x2","y1","y2"].forEach((e=>{e in o[i]&&(u[e]=o[i][e])})),u.type="linearGradient"),u.id=s,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[l]=s}return"url('".concat(a,"#").concat(s,"')")},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(s).forEach((t=>{void 0!==e[t]&&(s[t]=e[t])})),s),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=l.scaleRatio.x,r=l.scaleRatio.y,o={type:"container",children:Array.isArray(e)?[...e,c]:e,transform:l.edgeBleed.bool?"translate(".concat(l.edgeBleed.left*n,", ").concat(l.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,e0(u.measureText),F2(u)]}})},u.render=e=>{if(!r)return!1;const t="function"==typeof s.transform&&s.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:i,horizontalMoving:a,verticalMoving:l}=t;return o.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(i,", ").concat(a,", ").concat(l,")"),!0}o.style.transform="",a&&(r.style.left="".concat(l.computedPhysical.x,"px"),r.style.top="".concat(l.computedPhysical.y,"px"),r.setAttribute("width",l.computedPhysical.width),r.setAttribute("height",l.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=N2(e);JSON.stringify(l)!==JSON.stringify(t)&&(a=!0,l=t)}return l},u}var b5,v5,x5,w5,S5,E5,C5,k5={},_5=[],M5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function R5(e,t){for(var n in t)e[n]=t[n];return e}function A5(e){var t=e.parentNode;t&&t.removeChild(e)}function L5(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?b5.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 I5(e,a,r,o,null)}function I5(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?++x5:o};return null==o&&null!=v5.vnode&&v5.vnode(i),i}function D5(e){return e.children}function P5(e,t){this.props=e,this.context=t}function T5(e,t){if(null==t)return e.__?T5(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?T5(e):null}function O5(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 O5(e)}}function N5(e){(!e.__d&&(e.__d=!0)&&w5.push(e)&&!q5.__r++||S5!==v5.debounceRendering)&&((S5=v5.debounceRendering)||E5)(q5)}function q5(){var e,t,n,r,o,i,a,l;for(w5.sort(C5);e=w5.shift();)e.__d&&(t=w5.length,r=void 0,o=void 0,a=(i=(n=e).__v).__e,(l=n.__P)&&(r=[],(o=R5({},i)).__v=i.__v+1,G5(l,i,o,n.__n,void 0!==l.ownerSVGElement,null!=i.__h?[a]:null,r,null==a?T5(i):a,i.__h),U5(r,i),i.__e!=a&&O5(i)),w5.length>t&&w5.sort(C5));q5.__r=0}function F5(e,t,n,r,o,i,a,l,s,u){var c,d,p,f,h,m,g,y=r&&r.__k||_5,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?I5(null,f,null,null,f):Array.isArray(f)?I5(D5,{children:f},null,null,null):f.__b>0?I5(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}G5(e,f,p=p||k5,o,i,a,l,s,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=s=z5(f,s,e):s=j5(e,f,p,y,h,s),"function"==typeof n.type&&(n.__d=s)):s&&p.__e==s&&s.parentNode!=e&&(s=T5(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=B5(r).nextSibling),X5(y[c],y[c]));if(g)for(c=0;c<g.length;c++)K5(g[c],g[++c],g[++c])}function z5(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?z5(r,t,n):j5(n,r,r,o,r.__e,t));return t}function j5(e,t,n,r,o,i){var a,l,s;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(l=i,s=0;(l=l.nextSibling)&&s<r.length;s+=1)if(l==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function B5(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=B5(n)))return r;return null}function $5(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||M5.test(t)?n:n+"px"}function W5(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||$5(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||$5(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?V5:H5,i):e.removeEventListener(t,i?V5:H5,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 H5(e){return this.l[e.type+!1](v5.event?v5.event(e):e)}function V5(e){return this.l[e.type+!0](v5.event?v5.event(e):e)}function G5(e,t,n,r,o,i,a,l,s){var u,c,d,p,f,h,m,g,y,b,v,x,w,S,E,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(s=n.__h,l=t.__e=n.__e,t.__h=null,i=[l]),(u=v5.__b)&&u(t);try{e:if("function"==typeof C){if(g=t.props,y=(u=C.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in C&&C.prototype.render?t.__c=c=new C(g,b):(t.__c=c=new P5(g,b),c.constructor=C,c.render=Q5),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!=C.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=R5({},c.__s)),R5(c.__s,C.getDerivedStateFromProps(g,c.__s))),p=c.props,f=c.state,c.__v=t,d)null==C.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==C.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=v5.__r,w=0,"prototype"in C&&C.prototype.render){for(c.state=c.__s,c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);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&&++w<25);c.state=c.__s,null!=c.getChildContext&&(r=R5(R5({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(p,f)),E=null!=u&&u.type===D5&&null==u.key?u.props.children:u,F5(e,Array.isArray(E)?E:[E],t,n,r,o,i,a,l,s),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=Y5(n.__e,t,n,r,o,i,a,s);(u=v5.diffed)&&u(t)}catch(e){t.__v=null,(s||null!=i)&&(t.__e=l,t.__h=!!s,i[i.indexOf(l)]=null),v5.__e(e,t,n)}}function U5(e,t){v5.__c&&v5.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){v5.__e(e,t.__v)}}))}function Y5(e,t,n,r,o,i,a,l){var s,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((s=i[h])&&"setAttribute"in s==!!f&&(f?s.localName===f:3===s.nodeType)){e=s,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,l=!1}if(null===f)d===p||l&&e.data===p||(e.data=p);else{if(i=i&&b5.call(e.childNodes),u=(d=n.props||k5).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!l){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||W5(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]||W5(e,i,t[i],n[i],r)}(e,p,d,o,l),c)t.__k=[];else if(h=t.props.children,F5(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==f,i,a,i?i[0]:n.__k&&T5(n,0),l),null!=i)for(h=i.length;h--;)null!=i[h]&&A5(i[h]);l||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===f&&!h||"option"===f&&h!==d.value)&&W5(e,"value",h,d.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&W5(e,"checked",h,d.checked,!1))}return e}function K5(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){v5.__e(e,n)}}function X5(e,t,n){var r,o;if(v5.unmount&&v5.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||K5(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){v5.__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]&&X5(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||A5(e.__e),e.__=e.__e=e.__d=void 0}function Q5(e,t,n){return this.constructor(e,n)}function J5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,o=N2();const i={transform:void 0},a=q2();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:l}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(o,", ").concat(i,", ").concat(a,", ").concat(l,")"),!0}let a;return n.style.transform="",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)?L5("div",null,e):e,r=function(e,t,n){var r,o,i;v5.__&&v5.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],G5(t,e=(!r&&n||t).__k=L5(D5,null,[e]),o||k5,k5,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?b5.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),U5(i,e)}(a,n,r),!0},a.renderArgs=[L5],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=N2(e)),o),a}b5=_5.slice,v5={__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}},x5=0,P5.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=R5({},this.state),"function"==typeof e&&(e=e(R5({},n),this.props)),e&&R5(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),N5(this))},P5.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N5(this))},P5.prototype.render=D5,w5=[],E5="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C5=function(e,t){return e.__v.__b-t.__v.__b},q5.__r=0;var Z5=[function(e){e.renderer("svg",y5)},function(e){e.renderer("canvas",Y2)},function(e){e.renderer("dom",J5)}];const e3={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const t3=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=e3.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[e3.OFF]:()=>{},[e3.ERROR]:function(){return t.error(...arguments)},[e3.WARN]:function(){return t.warn(...arguments)},[e3.INFO]:function(){return t.info(...arguments)},[e3.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[e3.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(e3.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(e3.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(e3.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(e3.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:e3}}(t.logger),o={component:MH(n.component,"component",r),data:MH(n.data,"data",r),formatter:MH(n.formatter,"formatter",r),interaction:MH(n.interaction,"interaction",r),renderer:hQ(n.renderer),scale:MH(n.scale,"scale",r),symbol:MH(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:cW({},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=>fQ(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=dW,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:mQ,data:xQ,formatter:QG,interaction:wQ,renderer:hQ(),scale:JY,symbol:oX});v1.forEach(t3.use),Z5.forEach(t3.use),[].forEach(t3.use);const n3=null==t3?void 0:t3();null==n3||n3.use(tW),null==n3||n3.renderer.prio(["canvas"]);const r3=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,o3=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>Ms.jsxs("span",{children:[Ms.jsx($z,{...fB({href:e,text:t,interactions:r,color:o}),children:null!=n&&n.maskedValue?null==n?void 0:n.maskedValue:null==n?void 0:n.originalValue}),!!n&&r3(n)]}),i3=({children:e,textStyle:t})=>Ms.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box"},children:e}),a3=({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>{const{isActive:o}=kq(),{interactions:i}=JP();let a=r?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const l=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>({...oR,...iR(r?Math.max(t.grid.lineClamp,e.leafCount*t.grid.lineClamp):t.grid.columnLineClamp),color:Iq({cell:e,styleService:t,isCellSelected:n}),fontWeight:Dq({cell:e,styleService:t}),fontStyle:Pq({cell:e,styleService:t}),textDecoration:Tq({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r});if(e.representation.type===Ke.Image&&!e.isTotal)return Ms.jsx(Hq,{representation:e.representation,isLeftColumn:r,styleService:t,textStyle:l,leafCount:e.leafCount,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand});if(e.representation.type===Ke.Link&&!o&&!e.isTotal){const t=r&&e.representation.labelStructure?o3:hB;a=Ms.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:i,color:e.expressionColor.color})}return Ms.jsx(i3,{textStyle:l,children:a})},l3=e=>{const t=e.isLeftColumn?"flex-start":"center";var n;return e.representation.type!==Ke.Image||(e=>"fill"===e.representation.imageSize)(e)?t:null===(n=e.representation.resolvedImagePosition)||void 0===n?void 0:n.vertical},s3=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=tT(),{isSelected:i}=kq(),{isLeftColumn:a=!1,showLastBorder:l,itemCount:s,isLast:u,totalDividerIndex:c}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=dF([n]),f=sB(e,n),h=a?e===s-1:u,m=a?u:e===s-1,g=dq(f,c,o.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return Ms.jsx(pq,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:l,isLeftColumn:a,showTotalCellDivider:g})}const y=i(f);return Ms.jsxs(dB,{text:f.representation.text,reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:y,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[Ms.jsxs(fq,{verticalAlign:l3(f),width:hq(f.representation),right:f.isLeftColumn?void 0:4,children:[Ms.jsx(Fq,{isLeftColumn:a,isCellSelected:y,cell:f}),Ms.jsx(a3,{isLeftColumn:a,isCellSelected:y,cell:f,styleService:r})]}),Ms.jsx(hF,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?ot.Measures:ot.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var u3=En.memo(s3,XN);const c3=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{var i;const a=n?e[o]:t[o];return 0===o&&(null==a?void 0:a.x)>0?(a.leafCount+a.x+a.distanceToNextCell)*r():n||void 0===a?r(null!==(i=null==a?void 0:a.x)&&void 0!==i?i:o):(a.leafCount+a.distanceToNextCell)*r()},d3=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},p3=(e,t)=>n=>{e.current&&(e.current[t]=n)},f3={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...nR},h3={overflow:"hidden",willChange:"auto",flexShrink:0},m3=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i}=KP(),{layoutService:a,styleService:{contentCellHeight:l,grid:{divider:s}}}=tT(),{qSize:u}=a.layout.qHyperCube,{gridSectionsData:{leftDimensionData:c},visibleDimensionsInfo:{visibleLeftDimensionInfo:d}}=BO();lB(e,c),aB(e,t,n,l);const p=i.rowsOnCurrentPage*l,f={...f3,borderColor:s,width:r.reduce(((e,t)=>e+t),0)};return Ms.jsx("div",{style:f,"data-section-id":"LEFT_GRID",children:c.grid.map(((t,s)=>{const f=s===c.columnCount-1,h=hT(d[s]),{itemCount:m,estimatedItemSize:g,listValues:y}=d3(t,p,i.rowsOnCurrentPage,f),b=a.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t[i];if(0===i&&(null==a?void 0:a.pageY)>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if((null==a?void 0:a.leafCount)>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,l,f,u.qcy);return Ms.jsx(GN,{ref:p3(e,s),style:{...h3,flexGrow:f?1:0},height:n,width:r[s],itemCount:m,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:f,itemCount:m,showLastBorder:o,listValues:y,totalDividerIndex:c.totalDividerIndex},itemKey:rF,estimatedItemSize:g,children:u3},h)}))})};var g3=Sn.memo(m3);const y3={overflow:"hidden",willChange:"auto"},b3={...nR,borderWidth:"0px 0px 0px 1px"},v3=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{layoutService:a,styleService:{grid:{divider:l},headerCellHeight:s}}=tT(),{gridSectionsData:{headersData:u,topDimensionData:c}}=BO(),d={...b3,borderColor:l,height:r};lB(e,c),aB(e,n,r,s);const p=a.size.x*i();return 0===c.rowCount?Ms.jsx("div",{style:{width:n,height:r,...b3}}):Ms.jsx("div",{style:d,"data-section-id":"TOP_GRID",children:c.grid.map(((r,l)=>{const s=l===c.rowCount-1,{itemCount:d,estimatedItemSize:f,listValues:h}=d3(r,p,a.size.x,s),m=(({layoutService:e,headersData:t,topRowIndex:n})=>{var r;const o=t.data[n],i=t.size.x-1,a=e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y?null===(r=o[0][i])||void 0===r?void 0:r.dimensionInfoIndex:null==o?void 0:o[i].dimensionInfoIndex;return void 0!==a?e.getDimensionInfo(a):void 0})({layoutService:a,headersData:u,topRowIndex:l}),g=m?hT(m):`empty ${l}`;return Ms.jsx(GN,{ref:p3(e,l),style:y3,height:t(),width:n,itemCount:d,itemSize:c3({list:r,listValues:h,isLastRow:s,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:s,itemCount:d,showLastBorder:o,listValues:h,totalDividerIndex:c.totalDividerIndex},itemKey:rF,estimatedItemSize:f,children:u3},g)}))})};var x3=Sn.memo(v3);const w3=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=tT(),n=dN(),r=(()=>{const{model:e}=JP(),t=Sn.useCallback((async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:o,sortDirection:i}=t,a=[];if(n===i)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${o}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}}),[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:l},gridRefs:{topGridRef:s,leftGridRef:u,dataGridRef:c},scrollDirectionRefs:{verticalScrollDirection:d,horizontalScrollDirection:p},scrollbarsDimensions:{verticalScrollbarWidth:f,horizontalScrollbarHeight:h,resetHorizontalScrollbarHeight:m}}=cN(),{leftGridWidth:g,leftGridFullWidth:y,leftGridColumnWidths:b,rightGridFullWidth:v,showLastRightBorder:x,getRightGridColumnWidth:w,getHeaderCellsIconsVisibilityStatus:S,overrideLeftGridWidth:E}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=tT(),{gridSectionsData:{headersData:i}}=BO(),{measureText:a}=IR(o.header),l=rN({tableWidth:e}),s=oN({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:l.leftGridWidth}),u=l.leftGridWidth+s.rightGridFullWidth+1<e,c=Sn.useCallback(((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const s=l.leftGridColumnWidths[o];let u=!1,c=!1,d=a(n)+WO;return t&&d+20<=s&&(c=!0,d+=20),d+20<=s&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}}),[l.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return Sn.useEffect((()=>{const e=l.leftGridWidth===l.leftGridFullWidth,t=s.rightGridWidth===s.rightGridFullWidth;e&&t&&n()}),[n,l.leftGridWidth,l.leftGridFullWidth,s.rightGridWidth,s.rightGridFullWidth]),{...l,...s,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:n.width,verticalScrollbarWidth:f,resetHorizontalScrollbarHeight:m}),{gridScaffoldDimensions:C,headerGridDims:k,topGridDims:_,leftGridDims:M,dataGridDims:R,metadata:{everyThingFitsInTableRectHeight:A,scrollbarsVisibilityStatus:L}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const l=dN(),{pageInfo:s}=KP(),{gridSectionsData:{headersData:u,topDimensionData:c}}=BO(),d=Math.min(l.height*HO,Math.max(l.height*HO-25,l.height-t-a)),p=l.width*HO,f=s.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,y=Math.min(p,n),b=l.width-p,v=Math.max(b,l.width-y),x=Math.min(d,m,g),{availableHeight:w,everyThingFitsInTableRectHeight:S,everyThingFitsInTableRectWidth:E}=((e,t,n)=>{const r=t+1+n+i<=l.width,o=e+1+f+a,s=o-l.height<a||o<=l.height;return{availableHeight:s?o:l.height,everyThingFitsInTableRectHeight:s,everyThingFitsInTableRectWidth:r}})(x,y,v),C=w-d,k=Math.max(C,w-x),_=Math.min(k,f),M=Math.min(k,f),R=m+1+f,{visibilityStatus:A,metadata:{hasLeftGridOverflowX:L,hasDataGridOverflowX:I}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:l,bottomSectionFullHeight:s}}}=e,u=l>r,c=i>t,d=a>n,p=s>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:u?"scroll":"hidden"},leftGrid:{overflowX:c?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:u,hasLeftGridOverflowX:c,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:y,rightSectionWidth:v},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:k}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:l.width,height:l.height,gridTemplateColumns:`${y}px ${v}px`,gridTemplateRows:`${x}px ${k}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(I?i:0),height:g},stickyWrapper:{width:v-1-i,height:-1},self:{width:Math.min(o,v)-(E?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:y,height:R-g+(!L&&I?a:0)},stickyWrapper:{width:y,height:k-1-a},self:{width:y,height:Math.max(t,_-(S?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(I?i:0),height:R-g+(!I&&L?a:0)},stickyWrapper:{width:v-1-i,height:k-1-a},self:{width:Math.min(o,v)-(E?1:0)-i,height:Math.max(t,M-(S?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:S,scrollbarsVisibilityStatus:A}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:g,leftGridOriginalWidth:y,rightGridOriginalWidth:v},scrollBarsDimensions:{verticalScrollbarWidth:f,horizontalScrollbarHeight:h}}),I=Sn.useCallback((()=>e),[e]),D=Sn.useCallback((()=>t),[t]);return(()=>{const{downloadService:e}=tT();Sn.useEffect((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))})(),Ms.jsxs(fN,{style:C,children:[Ms.jsx("div",{style:{overflow:"hidden"},ref:o,children:Ms.jsx(iB,{tableWidth:n.width,leftGridWidth:g,columnWidths:b,getHeaderCellsIconsVisibilityStatus:S,rowHight:e,height:k.height,changeSortOrder:r,overrideLeftGridWidth:E})}),Ms.jsx(gN,{style:L.topGrid,origin:at.TopGrid,ref:i,children:Ms.jsx(pN,{style:_.fullSizeWrapper,children:Ms.jsx(yN,{style:_.stickyWrapper,children:Ms.jsx(x3,{topGridRef:s,rowHightCallback:I,..._.self,showLastBorder:{right:x,bottom:!1},getRightGridColumnWidth:w})})})}),Ms.jsx(gN,{style:L.leftGrid,origin:at.LeftGrid,ref:a,children:Ms.jsx(pN,{style:M.fullSizeWrapper,children:Ms.jsx(yN,{style:M.stickyWrapper,children:Ms.jsx(g3,{leftGridRef:u,...M.self,columnWidths:b,showLastBorder:{right:!1,bottom:A}})})})}),Ms.jsx(gN,{style:L.dataGrid,origin:at.DataGrid,ref:l,children:Ms.jsx(pN,{style:R.fullSizeWrapper,children:Ms.jsx(yN,{style:R.stickyWrapper,children:Ms.jsx(lF,{dataGridRef:c,rowHightCallback:D,...R.self,showLastBorder:{right:x,bottom:A},getRightGridColumnWidth:w,verticalScrollDirection:d,horizontalScrollDirection:p})})})})]})},S3=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=JP(),{pageInfo:o,updatePageInfo:i,rect:a}=KP(),{layoutService:l}=tT(),{layout:s,hasData:u}=l;return Ms.jsxs(Ms.Fragment,{children:[u&&Ms.jsx(w3,{}),Ms.jsx(rT,{}),Ms.jsx(GP,{paginationNeeded:o.shouldShowPagination,handleChangePage:e=>i({page:e}),pageInfo:o,totalRowCount:o.totalRowCount,totalColumnCount:0,totalPages:o.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:s})]})},E3={WHITE:"#FFFFFF",GREY:"#999999",GREY_PALE:"#B2B2B2",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_0_65:"rgba(0, 0, 0, 0.65)",GREYSCALE_100_05:"rgba(255, 255, 255, 0.05)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_25:"rgba(255, 255, 255, 0.25)",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)"},C3=12,k3=14,_3=16,M3=24,R3=3,A3=300,L3=400,I3=600,D3=700,P3={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};Tt(E3.GREYSCALE_0,.05),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5);var T3;function O3(){return O3=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},O3.apply(null,arguments)}Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5);var N3,q3=function(e){return Sn.createElement("svg",O3({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),T3||(T3=Sn.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})))};function F3(){return F3=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},F3.apply(null,arguments)}var z3=function(e){return Sn.createElement("svg",F3({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),N3||(N3=Sn.createElement("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.345z"})))};function j3({fontSize:e="medium",children:t=null,className:n=""}={}){const r="small"===e?"16px":"20px",o="small"===e?"-2px 0":void 0;return En.createElement("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},t)}var B3=(e={})=>En.createElement(j3,{...e},En.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"},En.createElement("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),En.createElement("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"}))),$3=(e={})=>En.createElement(j3,{...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),En.createElement("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})))),W3=(e={})=>En.createElement(j3,{fontSize:"medium",...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212"},En.createElement("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})))),H3=(e={})=>En.createElement(j3,{fontSize:"medium",...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},En.createElement("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),En.createElement("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"}))),V3=({className:e})=>En.createElement(j3,{fontSize:"small",className:e},En.createElement("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero"},En.createElement("g",{transform:"translate(4.324187, 1.300372)"},En.createElement("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"}),En.createElement("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"})))))),G3=(e={})=>En.createElement(j3,{...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("rect",{stroke:E3.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"}))));const U3={MuiAccordion:{styleOverrides:{root:{backgroundColor:E3.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:E3.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:En.createElement(q3,{"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 ${E3.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`,borderRadius:R3,backgroundColor:E3.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 ${E3.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:E3.WHITE,color:E3.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:R3},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:E3.GREYSCALE_0_15,backgroundColor:E3.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${E3.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:E3.GREEN_PALE},"&:active":{backgroundColor:E3.GREEN_DARK},"&.Mui-focusVisible":{borderColor:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:E3.BLUE_PALE},"&:active":{backgroundColor:E3.BLUE_DARK},"&.Mui-focusVisible":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.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:R3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:E3.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:E3.GREYSCALE_0_15,backgroundColor:E3.GREYSCALE_100_60,"&:active":{backgroundColor:E3.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${E3.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:E3.PURPLE,"&.Mui-focusVisible":{borderColor:E3.PURPLE,boxShadow:`0 0 0 3px ${eL(E3.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:E3.GREEN,"&.Mui-focusVisible":{borderColor:E3.GREEN,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:E3.BLUE,"&.Mui-focusVisible":{borderColor:E3.BLUE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:E3.ORANGE,"&.Mui-focusVisible":{borderColor:E3.ORANGE,boxShadow:`0 0 0 3px ${eL(E3.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:E3.RED,"&.Mui-focusVisible":{borderColor:E3.RED,boxShadow:`0 0 0 3px ${eL(E3.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:E3.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:E3.PURPLE_PALE},"&:active":{backgroundColor:E3.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:E3.PURPLE_PALE,boxShadow:`0 0 0 3px ${eL(E3.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:E3.GREEN_PALE},"&:active":{backgroundColor:E3.GREEN_DARK},"&.Mui-focusVisible":{borderColor:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:E3.BLUE_PALE},"&:active":{backgroundColor:E3.BLUE_DARK},"&.Mui-focusVisible":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:E3.ORANGE_PALE},"&:active":{backgroundColor:E3.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:E3.ORANGE_PALE,boxShadow:`0 0 0 3px ${eL(E3.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:E3.RED_PALE},"&:active":{backgroundColor:E3.RED_DARK},"&.Mui-focusVisible":{borderColor:E3.RED_PALE,boxShadow:`0 0 0 3px ${eL(E3.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:E3.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:E3.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:R3,boxShadow:`inset 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:En.createElement(z3,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:C3,borderRadius:R3,color:E3.TEXT_PRIMARY,backgroundColor:E3.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:E3.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:E3.GREYSCALE_0_05,color:E3.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:E3.GREEN,borderColor:E3.GREEN},"&.MuiChip-outlinedInfo":{color:E3.BLUE,borderColor:E3.BLUE},"&.MuiChip-outlinedWarning":{color:E3.ORANGE,borderColor:E3.ORANGE},"&.MuiChip-outlinedError":{color:E3.RED,borderColor:E3.RED}},outlined:{border:`solid 1px ${E3.GREYSCALE_0_15}`,backgroundColor:E3.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:R3,boxShadow:"none",backgroundColor:E3.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:E3.GREEN,borderColor:E3.GREEN},outlinedSecondary:{color:E3.BLUE,borderColor:E3.BLUE},label:{fontFamily:P3.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:En.createElement(z3,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:En.createElement(q3,{"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:R3},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:R3,fontSize:k3,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:E3.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${E3.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:E3.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:E3.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:E3.GREYSCALE_0_05}}},popupIndicator:{borderRadius:R3,border:`solid 1px ${E3.GREYSCALE_0_15}`,color:E3.GREYSCALE_0_60,marginRight:0,width:M3,height:M3},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${E3.GREYSCALE_0_15}`},clearIndicator:{borderRadius:R3,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:E3.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:k3}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:C3,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:E3.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:E3.GREYSCALE_25,fontSize:C3,fontFamily:P3.FONT_FAMILY,fontWeight:I3,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:E3.TEXT_PRIMARY},"&.Mui-error":{color:E3.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:E3.TEXT_SECONDARY,content:"'(optional)'",fontWeight:L3,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:E3.TEXT_SECONDARY,content:"'(required)'",fontWeight:L3,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:k3,lineHeight:"16px",backgroundColor:E3.WHITE,borderRadius:R3,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.GREYSCALE_0_05}`,borderColor:E3.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${E3.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${E3.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.RED}`,boxShadow:`0px 0px 0px 1px ${E3.RED}, inset 0 2px 0 0 ${E3.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.GREYSCALE_0_10}`,borderColor:E3.GREYSCALE_0_10,backgroundColor:E3.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:E3.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:E3.GREYSCALE_0_15,borderRadius:R3,boxShadow:`inset 0 2px 0 0 ${E3.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>En.createElement(q3,{...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:E3.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:E3.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:E3.GREYSCALE_0_03},"&:active":{backgroundColor:E3.GREYSCALE_0_10},"&:focus":{backgroundColor:E3.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${E3.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:E3.GREYSCALE_0_30,"&:hover":{backgroundColor:E3.GREYSCALE_0_0,borderColor:E3.GREYSCALE_0_15},"& ~svg":{color:E3.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${E3.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:R3}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:E3.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:k3,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:C3,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:C3,fontWeight:I3,color:E3.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:I3}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${E3.GREYSCALE_0_15}, 0px 0px 0px 1px ${E3.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:En.createElement(W3,null),checkedIcon:En.createElement(H3,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:E3.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:E3.GREYSCALE_0_20}},"&.Mui-disabled":{fill:E3.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:En.createElement(G3,null),checkedIcon:En.createElement(B3,null),indeterminateIcon:En.createElement($3,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:R3,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:E3.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:E3.GREYSCALE_0_55,color:E3.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:E3.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:E3.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:E3.GREYSCALE_0_55,"&:hover":{color:E3.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:E3.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:E3.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:k3,color:E3.TEXT_PRIMARY,lineHeight:"16px",fontWeight:I3},secondary:{fontSize:C3,color:E3.GREYSCALE_45,fontWeight:L3,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:k3,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:k3,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:E3.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:C3,borderBottom:`solid 1px ${E3.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:k3,color:E3.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:E3.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:E3.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:E3.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:E3.RED}}},"&.Mui-focusVisible":{backgroundColor:E3.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:E3.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:E3.GREEN,height:"24px","&.Mui-disabled":{color:E3.GREYSCALE_0_15}},rail:{backgroundColor:E3.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${E3.GREYSCALE_0_05}`,borderRadius:R3,boxShadow:`inset 0px 0px 0px 1px ${E3.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${E3.GREYSCALE_0_05}`,borderRadius:R3},thumb:{height:"16px",width:"16px",borderRadius:R3,backgroundColor:E3.WHITE,boxShadow:`0px 1px 2px 0px ${E3.GREYSCALE_0_15}, 0px 0px 0px 1px ${E3.GREYSCALE_0_05}`,"&:hover":{borderRadius:R3,boxShadow:`0 2px 4px 0 ${E3.GREYSCALE_0_30}, 0 0 0 1px ${E3.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${E3.GREYSCALE_0_15}, 0 0 0 1px ${E3.GREYSCALE_0_06}, 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${E3.GREYSCALE_0_15}, 0 0 0 1px ${E3.GREYSCALE_0_06}, 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:E3.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:E3.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:E3.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:E3.GREYSCALE_0_15},markLabel:{color:E3.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:E3.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:E3.WHITE,color:E3.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:E3.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:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:E3.GREYSCALE_0_15,borderRadius:R3},thumb:{height:"16px",width:"16px",borderRadius:R3,backgroundColor:E3.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:k3,fontWeight:I3,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${E3.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`,backgroundColor:E3.GREYSCALE_0_03,borderRadius:R3},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:E3.GREYSCALE_25,"&.Mui-selected":{color:E3.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:k3,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:R3,"&:hover":{backgroundColor:`${E3.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 ${E3.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${E3.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:R3,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:E3.GREYSCALE_0_05},"&:hover":{backgroundColor:`${E3.GREYSCALE_0_03}`,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${E3.GREYSCALE_85}`,borderRight:`1px solid ${E3.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:I3,backgroundColor:E3.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:E3.GREYSCALE_98,borderBottom:`1px solid ${E3.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${E3.GREYSCALE_85}`,borderTop:`1px solid ${E3.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:E3.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:E3.GREYSCALE_0_05,"&:hover":{backgroundColor:E3.GREYSCALE_0_03}},"&&:hover":{backgroundColor:E3.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>En.createElement(V3,{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 ${E3.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:k3,borderRadius:R3,padding:"7px 16px",border:`1px solid ${E3.GREYSCALE_0_15}`,backgroundColor:E3.GREYSCALE_100_60,color:E3.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:E3.GREYSCALE_0_10,border:`1px solid ${E3.GREYSCALE_0_30}`},"&:hover":{backgroundColor:E3.GREYSCALE_0_03,border:`1px solid ${E3.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:E3.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${E3.MISC_FOCUS_BORDER}`,border:`1px solid ${E3.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:E3.GREYSCALE_25,backgroundColor:E3.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:E3.GREYSCALE_0_10,border:`1px solid ${E3.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:C3,height:24,width:24,padding:7},sizeLarge:{fontSize:_3,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:k3,borderRadius:R3}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:E3.GREYSCALE_20},tooltip:{backgroundColor:E3.GREYSCALE_20,fontSize:C3,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};var Y3=e=>U3;const K3={mode:"light",primary:{ultraLight:E3.GREEN_ULTRA_LIGHT,light:E3.GREEN_PALE,main:E3.GREEN,dark:E3.GREEN_DARK,extraDark:E3.GREEN_EXTRA_DARK,contrastText:E3.WHITE},secondary:{ultraLight:E3.BLUE_ULTRA_LIGHT,light:E3.BLUE_PALE,main:E3.BLUE,dark:E3.BLUE_DARK,extraDark:E3.BLUE_EXTRA_DARK,contrastText:E3.WHITE},error:{ultraLight:E3.RED_ULTRA_LIGHT,light:E3.RED_PALE,main:E3.RED,dark:E3.RED_DARK,extraDark:E3.RED_EXTRA_DARK,contrastText:E3.WHITE},warning:{ultraLight:E3.ORANGE_ULTRA_LIGHT,light:E3.ORANGE_PALE,main:E3.ORANGE,dark:E3.ORANGE_DARK,extraDark:E3.ORANGE_EXTRA_DARK,contrastText:E3.WHITE},success:{ultraLight:E3.GREEN_ULTRA_LIGHT,light:E3.GREEN_PALE,main:E3.GREEN,dark:E3.GREEN_DARK,extraDark:E3.GREEN_EXTRA_DARK,contrastText:E3.WHITE},info:{ultraLight:E3.BLUE_ULTRA_LIGHT,light:E3.BLUE_PALE,main:E3.BLUE,dark:E3.BLUE_DARK,extraDark:E3.BLUE_EXTRA_DARK,contrastText:E3.WHITE},text:{primary:E3.TEXT_PRIMARY,secondary:E3.TEXT_SECONDARY,disabled:E3.GREYSCALE_0_30},action:{hover:E3.GREYSCALE_0_03,hoverOpacity:.03,selected:E3.GREYSCALE_0_05,selectedOpacity:.05,focus:E3.MISC_FOCUS_BORDER},amethyst:{ultraLight:E3.WHITE,main:E3.PURPLE,light:E3.PURPLE_PALE,dark:E3.PURPLE_DARK,extraDark:E3.GREYSCALE_0_0,contrastText:E3.WHITE},background:{paper:E3.WHITE,default:E3.GREYSCALE_95},divider:E3.GREYSCALE_0_15},X3=e=>K3,Q3=(e="light")=>({components:Y3(),palette:X3(),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:k3,fontWeightLight:A3,fontWeightRegular:L3,fontWeightMedium:I3,fontWeightBold:D3,htmlFontSize:k3,fontFamily:P3.FONT_FAMILY,button:{fontWeight:I3,fontSize:k3,textTransform:"none"},body1:{fontSize:_3,lineHeight:"24px"},body2:{fontSize:k3,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:M3,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:_3,fontWeight:I3,lineHeight:"16px"},h6:{fontSize:k3,fontWeight:I3,lineHeight:"16px"},caption:{color:E3.TEXT_SECONDARY},subtitle1:{fontSize:k3,color:E3.TEXT_SECONDARY},subtitle2:{fontSize:C3,color:E3.TEXT_SECONDARY}},shape:{borderRadius:R3}});const J3=(e,{selections:t,baseObjects:n,coreServices:r,nebulaObjects:o})=>{const i=function(e){var t;const n=Q3();return null!=n&&null!==(t=n.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),dI({...n,direction:e})}("ltr");e.render(Ms.jsx(En.StrictMode,{children:Ms.jsx(GI,{theme:i,children:Ms.jsx(ZP,{...o,children:Ms.jsx(XP,{...n,children:Ms.jsx(_q,{selections:t,children:Ms.jsx(nT,{...r,children:Ms.jsx($O,{children:Ms.jsx(S3,{})})})})})})})}))};var Z3,e6,t6,n6;!function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider"}(Z3||(Z3={})),function(e){e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2"}(e6||(e6={})),function(e){e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value"}(t6||(t6={})),function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor"}(n6||(n6={}));const r6=e=>e?`${parseInt(e,10)}px`:void 0,o6=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?ZM.Transparent:n}},i6=(e,t)=>+(parseInt(e,10)*JM*t+8).toFixed(2),a6=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?XM:"normal",l6=e=>null!=e&&e.some((e=>"italic"===e))?"italic":"normal",s6=e=>null!=e&&e.some((e=>"underline"===e))?"underline":"none",u6=({fontStyle:e,fontWeight:t,fontSize:n,fontFamily:r})=>t?`${e} ${t} ${n} ${r}`:`${e} ${n} ${r}`,c6=(t,n,r)=>{var o,i,a,l,s;const u=null!==(o=null==r||null===(i=r.qHyperCubeDef)||void 0===i?void 0:i.qShowTotalsAbove)&&void 0!==o&&o,c=null!==(a=null==r||null===(l=r.qHyperCubeDef)||void 0===l?void 0:l.qAlwaysFullyExpanded)&&void 0!==a&&a,d=void 0!==(null==r||null===(s=r.qHyperCubeDef)||void 0===s?void 0:s.qSortbyYValue)&&1===Math.abs(null==r?void 0:r.qHyperCubeDef.qSortbyYValue),p=e.useMemo((()=>{var e;return null==r||null===(e=r.qHyperCubeDef)||void 0===e||null===(e=e.qDimensions)||void 0===e?void 0:e.map((e=>{var t;return null===(t=e.qDef)||void 0===t?void 0:t.qSortCriterias}))}),[r]);return e.useMemo((()=>(({layout:e,flags:t,qShowTotalsAbove:n,qAlwaysFullyExpanded:r,isSortedByFirstMeasure:o,qSortCriterias:i})=>{var a,l,s,u;const{qHyperCube:c,nullValueRepresentation:d,snapshotData:p}=e,{qNoOfLeftDims:f,qEffectiveInterColumnSortOrder:h,qMeasureInfo:m,qDimensionInfo:g}=c,y=!!p,b=null!==(a=null==p||null===(l=p.content)||void 0===l?void 0:l.rowsPerPage)&&void 0!==a?a:15e3,v={x:Math.min(e.qHyperCube.qSize.qcx,QM),y:Math.min(e.qHyperCube.qSize.qcy,b)},x=h.slice(0,f),w=e=>x.some((t=>t===e)),S=w(iT),E=new Map(h.map((e=>{var t;return[null!==(t=g[e])&&void 0!==t?t:iT,e]}))),C=m.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return{layout:e,getNullValueText:()=>{var e;return null!==(e=null==d?void 0:d.text)&&void 0!==e?e:"-"},getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(S)return 0;const n=e%C.length;return t?n:m.findIndex((e=>e===C[n]))},getDimensionInfo:e=>e===iT?iT:g[e],getDimensionInfoIndex:e=>{var t;return null!==(t=E.get(e))&&void 0!==t?t:-1},getSortCriteriaForDimension:e=>null==i?void 0:i[e],size:v,isSnapshot:y,hasLimitedData:!y&&v.x<e.qHyperCube.qSize.qcx,hasData:v.x>0&&v.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,showTotalsAbove:n,hasPseudoDimOnLeft:S,leftDimensionInfoIndexes:x,isLeftDimension:w,isFullyExpanded:r,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:C,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode)&&t.isEnabled("CLIENT_IM_5975_INDENT_MODE"),indentModeFeatures:{isLinksSupported:t.isEnabled("CLIENT_IM_5975_INDENT_MODE_LINKS")},indentModeColumnWidth:null!==(s=e.qHyperCube.indentModeColumnWidth)&&void 0!==s?s:{type:ht.Auto,pixels:ft.PixelsDefault,percentage:ft.PercentageDefault},isSortedByFirstMeasure:o,searchSortFromDimension:"inherit"===(null===(u=e.search)||void 0===u?void 0:u.sorting)}})({layout:t,flags:n,qShowTotalsAbove:u,qAlwaysFullyExpanded:c,isSortedByFirstMeasure:d,qSortCriterias:p})),[t,u,c,d,n,p])},d6=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:l}=t,s=(e=>{const t=SR(e);return t.current=e,t})(OO(o));return RR((async()=>{var t;const{qHyperCube:o}=i,{maxNumberOfVisibleRows:u,maxNumberOfVisibleColumns:c}=s.current;var d,p;if(a)return null!==(d=null===(p=i.snapshotData)||void 0===p||null===(p=p.content)||void 0===p?void 0:p.qPivotDataPages)&&void 0!==d?d:[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(l,n,u,c)||((e,t,n,r)=>{var o,i;const{qHyperCube:{qPivotDataPages:a,qSize:l}}=e,{qTop:s,qWidth:u,qHeight:c}=null!==(o=null===(i=a[0])||void 0===i?void 0:i.qArea)&&void 0!==o?o:{qTop:0,qWidth:0,qHeight:0};return s<t.page*t.rowsPerPage||u<Math.min(r,l.qcx)||c<Math.min(n,l.qcy)})(i,r,u,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,l=Math.min(a+r.rowsPerPage,n.qcy),s=Math.min(QM,n.qcx);if(n.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>l&&(c=Math.max(0,l-o)),n>s&&(u=Math.max(0,s-i))}return{qLeft:u,qTop:c,qWidth:Math.min(s-u,i),qHeight:Math.min(l-c,o)}})(l,n,i.qHyperCube.qSize,r,u,c);return t?e.getHyperCubePivotData(oT,NO(t)):[]}return null!==(t=o.qPivotDataPages)&&void 0!==t?t:[]}),[i,a,e,n,r.page,r.rowsPerPage,s,l])},p6=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),f6=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:p6({rowsPerPage:n,totalRowCount:e,page:t})}),h6=15,m6=({layoutService:t,viewService:n,rect:r,model:o,pageInfo:i})=>{var a;return e.onTakeSnapshot((async e=>{const t=e;if(!t.snapshotData||!o||t.snapshotData.content)return t;if(null!=o&&o.getHyperCubePivotData){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:l,topGridScrollTop:s}=n,u=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,l=t.page*t.rowsPerPage,s=Math.max(r-h6,0),u=Math.max(l+o-h6,l,0),c=QM-s,d=l+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=OO(n);return{qLeft:s,qTop:u,qWidth:Math.min(c,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:s,qTop:u,qWidth:Math.min(c,i+30),qHeight:Math.min(d,a+30)}})(n,i,r),c=NO(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};t.snapshotData.content={qPivotDataPages:await o.getHyperCubePivotData(oT,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:l,topGridScrollTop:s,page:i.page,rowsPerPage:i.rowsPerPage},t.snapshotData.object.size.w=r.width,t.snapshotData.object.size.h=r.height}return t})),e.useImperativeHandle((()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(n,i)})),[n]),null!==(a=t.layout.snapshotData)&&void 0!==a&&a.content?{left:r.left,top:r.top,width:t.layout.snapshotData.object.size.w,height:t.layout.snapshotData.object.size.h}:r};var g6={SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const y6=()=>{const t=e.useTranslator(),n=t.language();return e.useMemo((()=>function(e){if(e.get&&e.add){const t="SNPivotTable_LimitedData";if(e.get(t)!==t)return;Object.keys(g6).forEach((t=>{e.add(g6[t])}))}}(t)),[t]),{translator:t,language:n}},b6=t=>{const{flags:n}=t,r=e.useElement(),o=(t=>{const n=e.useMemo((()=>DR(t)),[t]);return e.useEffect((()=>()=>n.unmount()),[n]),n})(r),i=e.useStaleLayout(),a=e.useModel(),l=e.useApp(),s=e.useEmbed(),u=e.useKeyboard(),c=e.useInteractionState(),d=ER(),[p,f]=((e,t)=>RR((async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return e.getEffectiveProperties()}),[e,t]))(a,i),h=c6(i,n,p),m=e.useSelections(),g=MR(i,r),{translator:y,language:b}=y6(),{pageInfo:v,updatePageInfo:x}=((t,n)=>{const{size:r,layout:{qHyperCube:{qSize:o}}}=t,i=n.isDownloadedAsPDForImage||t.isSnapshot,a=(e=>{var t;return null===(t=e.layout.snapshotData)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.rowsPerPage})(t),[l,s]=e.useState((()=>{const e=((e,t)=>{var n,r,o,i;return t.isDownloadedAsPDForImage?null!==(n=null===(r=t.viewState)||void 0===r?void 0:r.renderPage)&&void 0!==n?n:0:e.isSnapshot&&null!==(o=null===(i=e.layout.snapshotData)||void 0===i||null===(i=i.content)||void 0===i?void 0:i.page)&&void 0!==o?o:0})(t,n);return{page:e,shouldShowPagination:o.qcy>r.y&&!i,...f6(o.qcy,e,a)}})),u=t.layout.qHyperCube.qSize.qcy;return e.useEffect((()=>{s((e=>({...e,...f6(u,e.page,a),shouldShowPagination:u>t.size.y&&!i})))}),[u,t.size.y,s,i,a]),e.useEffect((()=>{const{page:e,totalPages:t}=l;if(e+1>t){const e=t-1,n=p6({...l,page:e});s({...l,page:e,rowsOnCurrentPage:n})}}),[l]),{pageInfo:l,updatePageInfo:e=>s({...l,...e,rowsOnCurrentPage:p6({...l,...e})})}})(h,d),w=((t,n,r)=>e.useMemo((()=>((e,t)=>{var n,r,o,i,a,l,s,u;if(e.isDownloadedAsPDForImage){var c,d,p,f;const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(c=null==t?void 0:t.scrollTop)&&void 0!==c?c:0,scrollLeft:null!==(d=null==t?void 0:t.scrollLeft)&&void 0!==d?d:0,leftGridScrollLeft:null!==(p=null==t?void 0:t.leftGridScrollLeft)&&void 0!==p?p:0,topGridScrollTop:null!==(f=null==t?void 0:t.topGridScrollTop)&&void 0!==f?f:0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(n=null==t||null===(r=t.content)||void 0===r?void 0:r.scrollTop)&&void 0!==n?n:0,scrollLeft:null!==(o=null==t||null===(i=t.content)||void 0===i?void 0:i.scrollLeft)&&void 0!==o?o:0,leftGridScrollLeft:null!==(a=null==t||null===(l=t.content)||void 0===l?void 0:l.leftGridScrollLeft)&&void 0!==a?a:0,topGridScrollTop:null!==(s=null==t||null===(u=t.content)||void 0===u?void 0:u.topGridScrollTop)&&void 0!==s?s:0}})(r,n.snapshotData)),[r,t.page,n.snapshotData]))(v,i,d),S=m6({rect:e.useRect(),layoutService:h,viewService:w,model:a,pageInfo:v}),[E,C]=d6({model:a,layoutService:h,viewService:w,pageInfo:v,rect:S}),k=e.useMemo((()=>((e,t,n)=>{var r,o,i,a,l,s,u,c,d,p,f,h,m,g,y,b,v,x,w,S,E,C,k,_,M,R,A,L,I,D,P,T,O,N,q,F,z,j,B,$,W,H,V,G,U,Y,K;const X=null===(r=t.layout.components)||void 0===r?void 0:r.find((e=>"theme"===e.key)),Q=null==X?void 0:X.header,J=null==X?void 0:X.dimensionValues,Z=null==X?void 0:X.measureValues,ee=null==X?void 0:X.measureLabels,te=null==X?void 0:X.totalValues,ne=null==X?void 0:X.nullValues,re=null==X?void 0:X.grid,oe=(t,n,r)=>e.getStyle(t,n,r),ie=+(null!==(o=null!==(i=null==re?void 0:re[Z3.LineClamp])&&void 0!==i?i:oe(e6.Grid,t6.Grid,n6.LineClamp))&&void 0!==o?o:1),ae=n.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?+(null!==(a=null!==(l=null==re?void 0:re[Z3.ColumnLineClamp])&&void 0!==l?l:oe(e6.Grid,t6.Grid,n6.ColumnLineClamp))&&void 0!==a?a:1):1,le=null!==(s=null!==(u=o6(e,null==Q?void 0:Q[Z3.Background]))&&void 0!==u?u:oe(e6.Dimension,t6.LabelName,n6.BackgroundColor))&&void 0!==s?s:ZM.Transparent,se={header:{fontSize:null!==(c=null!==(d=r6(null==Q?void 0:Q[Z3.FontSize]))&&void 0!==d?d:oe(e6.Dimension,t6.LabelName,n6.FontSize))&&void 0!==c?c:YM,fontFamily:null!==(p=null!==(f=null==Q?void 0:Q[Z3.FontFamily])&&void 0!==f?f:oe(e6.Dimension,t6.LabelName,n6.FontFamily))&&void 0!==p?p:KM,fontWeight:a6(null==Q?void 0:Q[Z3.FontStyle],XM),fontStyle:l6(null==Q?void 0:Q[Z3.FontStyle]),textDecoration:s6(null==Q?void 0:Q[Z3.FontStyle]),color:null!==(h=null!==(m=o6(e,null==Q?void 0:Q[Z3.FontColor]))&&void 0!==m?m:oe(e6.Dimension,t6.LabelName,n6.FontColor))&&void 0!==h?h:o_.TEXT,background:le,hoverBackground:NM(le,mt),activeBackground:NM(le,gt)},dimensionValues:{fontSize:null!==(g=null!==(y=r6(null==J?void 0:J[Z3.FontSize]))&&void 0!==y?y:oe(e6.Dimension,t6.LabelValue,n6.FontSize))&&void 0!==g?g:YM,fontFamily:null!==(b=null!==(v=null==J?void 0:J[Z3.FontFamily])&&void 0!==v?v:oe(e6.Dimension,t6.LabelValue,n6.FontFamily))&&void 0!==b?b:KM,fontWeight:a6(null==J?void 0:J[Z3.FontStyle],void 0),fontStyle:l6(null==J?void 0:J[Z3.FontStyle]),textDecoration:s6(null==J?void 0:J[Z3.FontStyle]),color:null!==(x=null!==(w=o6(e,null==J?void 0:J[Z3.FontColor]))&&void 0!==w?w:oe(e6.Dimension,t6.LabelValue,n6.FontColor))&&void 0!==x?x:o_.TEXT,background:null!==(S=null!==(E=o6(e,null==J?void 0:J[Z3.Background]))&&void 0!==E?E:oe(e6.Dimension,t6.LabelValue,n6.BackgroundColor))&&void 0!==S?S:ZM.Transparent},measureValues:{fontSize:null!==(C=null!==(k=r6(null==Z?void 0:Z[Z3.FontSize]))&&void 0!==k?k:oe(e6.Measure,t6.LabelValue,n6.FontSize))&&void 0!==C?C:YM,fontFamily:null!==(_=null!==(M=null==Z?void 0:Z[Z3.FontFamily])&&void 0!==M?M:oe(e6.Measure,t6.LabelValue,n6.FontFamily))&&void 0!==_?_:KM,fontWeight:a6(null==Z?void 0:Z[Z3.FontStyle],"normal"),fontStyle:l6(null==Z?void 0:Z[Z3.FontStyle]),textDecoration:s6(null==Z?void 0:Z[Z3.FontStyle]),color:null!==(R=null!==(A=o6(e,null==Z?void 0:Z[Z3.FontColor]))&&void 0!==A?A:oe(e6.Measure,t6.LabelValue,n6.FontColor))&&void 0!==R?R:ZM.FontSecondary,background:null!==(L=null!==(I=o6(e,null==Z?void 0:Z[Z3.Background]))&&void 0!==I?I:oe(e6.Measure,t6.LabelValue,n6.BackgroundColor))&&void 0!==L?L:ZM.Transparent},measureLabels:{fontWeight:a6(null==ee?void 0:ee[Z3.FontStyle],"normal"),fontStyle:l6(null==ee?void 0:ee[Z3.FontStyle]),textDecoration:s6(null==ee?void 0:ee[Z3.FontStyle]),color:null!==(D=null!==(P=o6(e,null==ee?void 0:ee[Z3.FontColor]))&&void 0!==P?P:oe(e6.Measure,t6.LabelName,n6.FontColor))&&void 0!==D?D:ZM.FontSecondary,background:null!==(T=null!==(O=o6(e,null==ee?void 0:ee[Z3.Background]))&&void 0!==O?O:oe(e6.Measure,t6.LabelName,n6.BackgroundColor))&&void 0!==T?T:ZM.Transparent},totalValues:{fontWeight:a6(null==te?void 0:te[Z3.FontStyle],XM),fontStyle:l6(null==te?void 0:te[Z3.FontStyle]),textDecoration:s6(null==te?void 0:te[Z3.FontStyle]),color:null!==(N=null!==(q=o6(e,null==te?void 0:te[Z3.FontColor]))&&void 0!==q?q:oe(e6.Total,t6.LabelValue,n6.FontColor))&&void 0!==N?N:o_.TEXT,background:null!==(F=null!==(z=o6(e,null==te?void 0:te[Z3.Background]))&&void 0!==z?z:oe(e6.Total,t6.LabelValue,n6.BackgroundColor))&&void 0!==F?F:ZM.Transparent},nullValues:{fontWeight:a6(null==ne?void 0:ne[Z3.FontStyle],"normal"),fontStyle:l6(null==ne?void 0:ne[Z3.FontStyle]),textDecoration:s6(null==ne?void 0:ne[Z3.FontStyle]),color:null!==(j=null!==(B=o6(e,null==ne?void 0:ne[Z3.FontColor]))&&void 0!==B?B:oe(e6.Null,t6.LabelValue,n6.FontColor))&&void 0!==j?j:o_.TEXT,background:null!==($=null!==(W=o6(e,null==ne?void 0:ne[Z3.Background]))&&void 0!==W?W:oe(e6.Null,t6.LabelValue,n6.BackgroundColor))&&void 0!==$?$:ZM.NullValueBackground},grid:{columnLineClamp:ae,lineClamp:ie,border:null!==(H=null!==(V=o6(e,null==re?void 0:re[Z3.Border]))&&void 0!==V?V:oe(e6.Grid,t6.Grid,n6.BorderColor))&&void 0!==H?H:ZM.DividerLight,divider:null!==(G=null!==(U=o6(e,null==re?void 0:re[Z3.Divider]))&&void 0!==U?U:oe(e6.Grid,t6.Divider,n6.BorderColor))&&void 0!==G?G:ZM.DividerDark,background:null!==(Y=null!==(K=o6(e,null==re?void 0:re[Z3.Background]))&&void 0!==K?K:oe(e6.Grid,t6.Grid,n6.BackgroundColor))&&void 0!==Y?Y:ZM.Transparent}};return se.headerCellHeight=Math.max(i6(se.header.fontSize,ae),i6(se.dimensionValues.fontSize,ae),32),se.contentCellHeight=Math.max(i6(se.measureValues.fontSize,ie),i6(se.dimensionValues.fontSize,ie),24),se.dimensionValueTextHeight=i6(se.dimensionValues.fontSize,1),se.selectedColors=OM({desiredColor:se.dimensionValues.color,theme:e,flags:n}),se})(g,h,n)),[g,h,n]),_=(t=>e.useMemo((()=>[...new Set([u6(t.header),u6(t.dimensionValues),u6({...t.dimensionValues,...t.measureLabels}),u6({...t.dimensionValues,...t.nullValues}),u6({...t.dimensionValues,...t.totalValues}),u6(t.measureValues),u6({...t.measureValues,...t.nullValues}),u6({...t.measureValues,...t.totalValues})])]),[t]))(k),M=(t=>{const[n,r]=e.usePromise((()=>Promise.all(t.map((e=>document.fonts.load(e))))),[t]);return r?(console.warn("Failed to load font:",r),!0):!!n})(_);zR(),e.useEffect((()=>{!C&&a&&S&&m&&w&&h&&k&&!!E&&!f&&M&&J3(o,{selections:m,baseObjects:{rect:S,pageInfo:v,qPivotDataPages:E,updatePageInfo:x},nebulaObjects:{env:t,app:l,model:a,embed:s,theme:g,keyboard:u,translator:y,interactions:c},coreServices:{styleService:k,viewService:w,layoutService:h,downloadService:d}})}),[a,l,S,c,m,w,h,d,C,E,k,o,M,y,b,v,x,p,f,s,u,g,t])},v6={version:"4.0.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]};return function(e){return{qae:{properties:{initial:{...v6,qHyperCubeDef:{...v6.qHyperCubeDef,qIndentMode:!1}}},data:je(e)},ext:bR(e),component(){b6(e)}}}}));
195
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,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))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+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],s=c[1]&&c[c.length-1].length){for(m="",y=(d=t[0]).length%s,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%s)&&v<p-s&&(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 c$(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const d$={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"},p$=/%\)?$/,f$=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,h$=/^\(oct\)/i,m$=/^\(dec\)/i,g$=/^\(hex\)/i,y$=/^\(bin\)/i,b$=/^\(rom\)/i,v$=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,x$=/#|0/g;function w$(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 S$(e,t,n){let r;return f$.test(t)?e=w$(e,Number(/\d{2}/.exec(t)[0]),t,n):h$.test(t)?e=w$(e,8,t,n):m$.test(t)?e=w$(e,10,t,n):g$.test(t)?e=w$(e,16,t,n):y$.test(t)?e=w$(e,2,t,n):b$.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(),l=["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+=l[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 E$(e,t,n){const r=c$(e);return n?r:new RegExp(r||"",t)}function C$(e,t,n,r){let o,i,a,l,s,u,c,d,p,f=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=c$(m)),h&&(h=c$(h)),p=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=f.match(p),a=a?a[0]:"",l=a?f.substr(0,f.indexOf(a)):f,s=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(E$(u,"g"),t)),c=n,n=".",c&&(a=a.replace(E$(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(x$)),e.prefix=l||"",e.postfix=s||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=p$.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(E$(t,null,!0),"|").concat(E$(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class k${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 d$;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 k$(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],v$.test(e[0])&&(r.positive.isFunctional=!0),e[1]?v$.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?v$.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const o="U"===this.type;r.positive.isFunctional||C$(r.positive,t,n,o),r.negative&&!r.negative.isFunctional&&C$(r.negative,t,n,o),r.zero&&!r.zero.isFunctional&&C$(r.zero,t,n,o)}formatValue(e){let t,n,r,o,i,a,l,s,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=S$(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(l=0,n=Number(Number(e).toExponential().split("e")[1]);i<=n&&l<t.length;)l++,i=t[l];l>0&&(r=t[l-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,s=c.numericPattern,u=s.split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==s.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=s.split(i)[0];if(n+=i,e=u$(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(l=o.length;l<n;l++)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(s+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),l=0;l<t;l++)s+="#";e=u$(s,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 _$(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,l=Object.create(null),s=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 l[s[c]],delete s[c],u--,c++),l[e]=t,s[u]=e,u++,t),i.get=e=>l[e],i.has=e=>e in l,i.clear=()=>{l=Object.create(null),s=Object.create(null),u=0,c=0},i.size=()=>u,i}function M$(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 k$(...t)}(o,e,t,n,r),a=_$(i.formatValue.bind(i),{toKey:e=>isNaN(e)?e:+e});function l(e){return a(e)}return l.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},l.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},l}const R$="D",A$="T",L$="TS",I$="IV",D$=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],P$=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],T$=["January","February","March","April","May","June","July","August","September","October","November","December"],O$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N$(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function q$(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function F$(e,t){let n,r=function(e){const t=e,n=24*q$(t),r=60*q$(n),o=60*q$(r),i=1e3*q$(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,l=r.s,s=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)||(l+=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:l,f:s,t:c}}class z${constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:D$,qDayNames:P$,qLongMonthNames:T$,qMonthNames:O$}),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={[A$]:r.qTimeFmt||"hh:mm:ss",[R$]:r.qDateFmt||"YYYY-MM-DD",[L$]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new z$(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=F$(e,t));const o=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:N$("".concat(t.year).slice(-2),2),YYY:N$("".concat(t.year).slice(-3),3),def:e=>N$("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:N$("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:N$("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>N$("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>N$("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>N$("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>N$("".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"),l=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 l}}function j$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new z$(...t)}function B$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=j$(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=_$(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==I$?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=j$(o,e,t),r=_$(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 $$(){let e,{meta:t,id:n,key:r,localeInfo:o,fieldExtractor:i,value:a,type:l,sourceField:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===l?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return B$(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"),M$(n,r,o,i,t)}(t,o),p="dimension"===l?"first":(e,t)=>d(t),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>l,origin:()=>s,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 W$(e,t,n,r,o){return(t[e]||[]).map(((t,i)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),l={instance:$$(_B({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return l.attrDims=W$("qAttrDimInfo",t,n,a,_B({},o,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),l.attrExps=W$("qAttrExprInfo",t,n,a,_B({},o,{value:e=>null==e?void 0:e.qNum,type:"measure"})),l.measures=W$("qMeasureInfo",t,n,a,_B({},o,{value:e=>null==e?void 0:e.qValue,type:"measure"})),l}))}function H$(){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=H$.util,a={cache:r,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={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,l,r,i),hierarchy:e=>a.hierarchy(e,l,r,i),_cache:()=>r};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(a.extractor=s$,a.hierarchy=l$,a.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(a.extractor=LB,a.pages=o.qDataPages,a.hierarchy=l$):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},l,r,i);const s="S"===o.qMode?e=>e.qElemNumber:void 0,u="S"===o.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...W$("qDimensionInfo",o,e,"",_B({},a,{value:s,type:"dimension"}))),r.wrappedFields.push(...W$("qMeasureInfo",o,e,"",_B({},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=l.field(t.from),o=$$(yB({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},l,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),l}const V$=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],G$=/\/qDimensionInfo(?:\/(\d+))?/,U$=/\/qMeasureInfo\/(\d+)/,Y$=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,K$=/\/qAttrExprInfo\/(\d+)/,X$=/\/?qHyperCube/,Q$=/\/?qTreeData/,J$=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Z$=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function eW(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={},l=e.isActive();let s=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,o=-1,i="",a=e=>e;X$.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=J$):Q$.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Z$);let l=!0;if(G$.test(e)&&(r=+G$.exec(e)[1]),U$.test(e)&&(o=+U$.exec(e)[1]),Y$.test(e)){o=-1,r=0;const e=+Y$.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),l=!1}if(K$.test(e)){const e=o;if(t){o=0;const a=UB(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+=+K$.exec(n)[1]}else r>-1?(r=-1,o=+K$.exec(n)[1]):o+=+K$.exec(n)[1]+1}return V$.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),l&&(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&&(s=!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&&(s=!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&&(s=!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,l=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||l>=i)&&i>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:l-i})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),s=!!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))),s=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));s=!!n.length,i.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!s&&l)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 tW(e){H$.util=e.data("matrix").util,e.data("q",H$),e.formatter("q-number",M$),e.formatter("q-time",B$)}tW.qBrushHelper=eW,tW.selections=eW;var nW=Object.prototype.hasOwnProperty,rW=Object.prototype.toString,oW=Object.defineProperty,iW=Object.getOwnPropertyDescriptor,aW=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===rW.call(e)},lW=function(e){if(!e||"[object Object]"!==rW.call(e))return!1;var t,n=nW.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&nW.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||nW.call(e,t)},sW=function(e,t){oW&&"__proto__"===t.name?oW(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},uW=function(e,t){if("__proto__"===t){if(!nW.call(e,t))return;if(iW)return iW(e,t).value}return e[t]},cW=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=uW(l,n),l!==(o=uW(t,n))&&(c&&o&&(lW(o)||(i=aW(o)))?(i?(i=!1,a=r&&aW(r)?r:[]):a=r&&lW(r)?r:{},sW(l,{name:n,newValue:e(c,a,o)})):void 0!==o&&sW(l,{name:n,newValue:o}));return l},dW="2.3.0";function pW(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||"default");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 fW(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 hW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fW(Object(n),!0).forEach((function(t){pW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mW(e){return!!e.changedTouches}function gW(e){return"number"==typeof e&&!isNaN(e)}function yW(e){return"number"!=typeof e||isNaN(e)}function bW(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 vW(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function xW(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 wW(e){const[t,n,r,o]=bW(e);return{x:t,y:n,width:r-t,height:o-n}}function SW(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function EW(e){const{x:t,y:n,width:r,height:o,x1:i,x2:a,y1:l,y2:s,cx:u,cy:c,r:d,vertices:p}=e||{};return gW(u)&&gW(c)&&gW(d)?"circle":gW(i)&&gW(a)&&gW(l)&&gW(s)?"line":gW(t)&&gW(n)&&gW(r)&&gW(o)?"rect":gW(t)&&gW(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function CW(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var kW=Math.PI,_W=2*kW,MW=1e-6,RW=_W-MW;function AW(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function LW(){return new AW}function IW(e){return function(){return e}}AW.prototype=LW.prototype={constructor:AW,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,l=n-e,s=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>MW)if(Math.abs(c*l-s*u)>MW&&o){var p=n-i,f=r-a,h=l*l+s*s,m=p*p+f*f,g=Math.sqrt(h),y=Math.sqrt(d),b=o*Math.tan((kW-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>MW&&(this._+="L"+(e+v*u)+","+(t+v*c)),this._+="A"+o+","+o+",0,0,"+ +(c*p>u*f)+","+(this._x1=e+x*l)+","+(this._y1=t+x*s)}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),l=n*Math.sin(r),s=e+a,u=t+l,c=1^i,d=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>MW||Math.abs(this._y1-u)>MW)&&(this._+="L"+s+","+u),n&&(d<0&&(d=d%_W+_W),d>RW?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):d>MW&&(this._+="A"+n+","+n+",0,"+ +(d>=kW)+","+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 DW=Math.abs,PW=Math.atan2,TW=Math.cos,OW=Math.max,NW=Math.min,qW=Math.sin,FW=Math.sqrt,zW=1e-12,jW=Math.PI,BW=jW/2,$W=2*jW;function WW(e){return e>=1?BW:e<=-1?-BW:Math.asin(e)}function HW(e){return e.innerRadius}function VW(e){return e.outerRadius}function GW(e){return e.startAngle}function UW(e){return e.endAngle}function YW(e){return e&&e.padAngle}function KW(e,t,n,r,o,i,a){var l=e-n,s=t-r,u=(a?i:-i)/FW(l*l+s*s),c=u*s,d=-u*l,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,w=o-i,S=p*m-h*f,E=(v<0?-1:1)*FW(OW(0,w*w*x-S*S)),C=(S*v-b*E)/x,k=(-S*b-v*E)/x,_=(S*v+b*E)/x,M=(-S*b+v*E)/x,R=C-g,A=k-y,L=_-g,I=M-y;return R*R+A*A>L*L+I*I&&(C=_,k=M),{cx:C,cy:k,x01:-c,y01:-d,x11:C*(o/w-1),y11:k*(o/w-1)}}function XW(){var e=HW,t=VW,n=IW(0),r=null,o=GW,i=UW,a=YW,l=null;function s(){var s,u,c=+e.apply(this,arguments),d=+t.apply(this,arguments),p=o.apply(this,arguments)-BW,f=i.apply(this,arguments)-BW,h=DW(f-p),m=f>p;if(l||(l=s=LW()),d<c&&(u=d,d=c,c=u),d>zW)if(h>$W-zW)l.moveTo(d*TW(p),d*qW(p)),l.arc(0,0,d,p,f,!m),c>zW&&(l.moveTo(c*TW(f),c*qW(f)),l.arc(0,0,c,f,p,m));else{var g,y,b=p,v=f,x=p,w=f,S=h,E=h,C=a.apply(this,arguments)/2,k=C>zW&&(r?+r.apply(this,arguments):FW(c*c+d*d)),_=NW(DW(d-c)/2,+n.apply(this,arguments)),M=_,R=_;if(k>zW){var A=WW(k/c*qW(C)),L=WW(k/d*qW(C));(S-=2*A)>zW?(x+=A*=m?1:-1,w-=A):(S=0,x=w=(p+f)/2),(E-=2*L)>zW?(b+=L*=m?1:-1,v-=L):(E=0,b=v=(p+f)/2)}var I=d*TW(b),D=d*qW(b),P=c*TW(w),T=c*qW(w);if(_>zW){var O,N=d*TW(v),q=d*qW(v),F=c*TW(x),z=c*qW(x);if(h<jW&&(O=function(e,t,n,r,o,i,a,l){var s=n-e,u=r-t,c=a-o,d=l-i,p=d*s-c*u;if(!(p*p<zW))return[e+(p=(c*(t-i)-d*(e-o))/p)*s,t+p*u]}(I,D,F,z,N,q,P,T))){var j=I-O[0],B=D-O[1],$=N-O[0],W=q-O[1],H=1/qW(function(e){return e>1?0:e<-1?jW:Math.acos(e)}((j*$+B*W)/(FW(j*j+B*B)*FW($*$+W*W)))/2),V=FW(O[0]*O[0]+O[1]*O[1]);M=NW(_,(c-V)/(H-1)),R=NW(_,(d-V)/(H+1))}}E>zW?R>zW?(g=KW(F,z,I,D,d,R,m),y=KW(N,q,P,T,d,R,m),l.moveTo(g.cx+g.x01,g.cy+g.y01),R<_?l.arc(g.cx,g.cy,R,PW(g.y01,g.x01),PW(y.y01,y.x01),!m):(l.arc(g.cx,g.cy,R,PW(g.y01,g.x01),PW(g.y11,g.x11),!m),l.arc(0,0,d,PW(g.cy+g.y11,g.cx+g.x11),PW(y.cy+y.y11,y.cx+y.x11),!m),l.arc(y.cx,y.cy,R,PW(y.y11,y.x11),PW(y.y01,y.x01),!m))):(l.moveTo(I,D),l.arc(0,0,d,b,v,!m)):l.moveTo(I,D),c>zW&&S>zW?M>zW?(g=KW(P,T,N,q,c,-M,m),y=KW(I,D,F,z,c,-M,m),l.lineTo(g.cx+g.x01,g.cy+g.y01),M<_?l.arc(g.cx,g.cy,M,PW(g.y01,g.x01),PW(y.y01,y.x01),!m):(l.arc(g.cx,g.cy,M,PW(g.y01,g.x01),PW(g.y11,g.x11),!m),l.arc(0,0,c,PW(g.cy+g.y11,g.cx+g.x11),PW(y.cy+y.y11,y.cx+y.x11),m),l.arc(y.cx,y.cy,M,PW(y.y11,y.x11),PW(y.y01,y.x01),!m))):l.arc(0,0,c,w,x,m):l.lineTo(P,T)}else l.moveTo(0,0);if(l.closePath(),s)return l=null,s+""||null}return s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-jW/2;return[TW(r)*n,qW(r)*n]},s.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:IW(+t),s):e},s.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:IW(+e),s):t},s.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:IW(+e),s):n},s.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:IW(+e),s):r},s.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:IW(+e),s):o},s.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:IW(+e),s):i},s.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:IW(+e),s):a},s.context=function(e){return arguments.length?(l=null==e?null:e,s):l},s}function QW(e){this._context=e}function JW(e){return new QW(e)}function ZW(e){return e[0]}function eH(e){return e[1]}function tH(){var e=ZW,t=null,n=IW(0),r=eH,o=IW(!0),i=null,a=JW,l=null;function s(s){var u,c,d,p,f,h=s.length,m=!1,g=new Array(h),y=new Array(h);for(null==i&&(l=a(f=LW())),u=0;u<=h;++u){if(!(u<h&&o(p=s[u],u,s))===m)if(m=!m)c=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),d=u-1;d>=c;--d)l.point(g[d],y[d]);l.lineEnd(),l.areaEnd()}m&&(g[u]=+e(p,u,s),y[u]=+n(p,u,s),l.point(t?+t(p,u,s):g[u],r?+r(p,u,s):y[u]))}if(f)return l=null,f+""||null}function u(){return function(){var e=ZW,t=eH,n=IW(!0),r=null,o=JW,i=null;function a(a){var l,s,u,c=a.length,d=!1;for(null==r&&(i=o(u=LW())),l=0;l<=c;++l)!(l<c&&n(s=a[l],l,a))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(s,l,a),+t(s,l,a));if(u)return i=null,u+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:IW(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:IW(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:IW(!!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 s.x=function(n){return arguments.length?(e="function"==typeof n?n:IW(+n),t=null,s):e},s.x0=function(t){return arguments.length?(e="function"==typeof t?t:IW(+t),s):e},s.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:IW(+e),s):t},s.y=function(e){return arguments.length?(n="function"==typeof e?e:IW(+e),r=null,s):n},s.y0=function(e){return arguments.length?(n="function"==typeof e?e:IW(+e),s):n},s.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:IW(+e),s):r},s.lineX0=s.lineY0=function(){return u().x(e).y(n)},s.lineY1=function(){return u().x(e).y(r)},s.lineX1=function(){return u().x(t).y(n)},s.defined=function(e){return arguments.length?(o="function"==typeof e?e:IW(!!e),s):o},s.curve=function(e){return arguments.length?(a=e,null!=i&&(l=a(i)),s):a},s.context=function(e){return arguments.length?(null==e?i=l=null:l=a(i=e),s):i},s}function nH(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function rH(e){return e}QW.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 oH=Array.prototype.slice;function iH(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 aH(e){this._context=e}function lH(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 sH(e,t){this._context=e,this._k=(1-t)/6}aH.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:iH(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:iH(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},sH.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:lH(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:lH(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 uH=function e(t){function n(e){return new sH(e,t)}return n.tension=function(t){return e(+t)},n}(0);function cH(e,t){this._context=e,this._alpha=t}cH.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 l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,s=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/s,o=(o*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/s}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 dH=function e(t){function n(e){return t?new cH(e,t):new sH(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function pH(e){return e<0?-1:1}function fH(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),l=(i*o+a*r)/(r+o);return(pH(i)+pH(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(l))||0}function hH(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mH(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,o+l*t,i-l,a-l*n,i,a)}function gH(e){this._context=e}function yH(e){this._context=new bH(e)}function bH(e){this._context=e}function vH(e){this._context=e}function xH(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 wH(e,t){this._context=e,this._t=t}function SH(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],l=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function EH(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function CH(e,t){return e[t]}function kH(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 _H(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function MH(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 l(e){return o[e]||i.get(e)}function s(e,o){if(void 0!==o)return a(e,o);const i=l(e);return r&&void 0===i&&r.warn("".concat(e," does not exist in ").concat(n," registry")),i||l(t)}return t=i.default(),s.add=a,s.get=l,s.has=function(e){return!!o[e]||i.has(e)},s.remove=function(e){const t=o[e];return delete o[e],t},s.getKeys=function(){return Object.keys(o)},s.getValues=function(){return Object.keys(o).map((e=>o[e]))},s.default=function(e){return void 0!==e&&(t=e),t},s.register=a,s}function RH(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 AH(e){return(e=RH(Math.abs(e)))?e[1]:NaN}gH.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:mH(this,this._t0,hH(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,mH(this,hH(this,n=fH(this,e,t)),n);break;default:mH(this,this._t0,n=fH(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(yH.prototype=Object.create(gH.prototype)).point=function(e,t){gH.prototype.point.call(this,t,e)},bH.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)}},vH.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=xH(e),o=xH(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)}},wH.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 LH,IH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function DH(e){if(!(t=IH.exec(e)))throw new Error("invalid format: "+e);var t;return new PH({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 PH(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 TH(e,t){var n=RH(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")}DH.prototype=PH.prototype,PH.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 OH={"%":(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)=>TH(100*e,t),r:TH,s:function(e,t){var n=RH(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(LH=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")+RH(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function NH(e){return e}var qH,FH,zH,jH=Array.prototype.map,BH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $H(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?NH:(t=jH.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,l=t[0],s=0;o>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),i.push(e.substring(o-=l,o+l)),!((s+=l+1)>r));)l=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+"",l=void 0===e.numerals?NH:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(jH.call(e.numerals,String)),s=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=DH(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"):OH[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)?s:"",w=OH[b],S=/[defgprs%]/.test(b);function E(e){var o,i,s,p=v,E=x;if("c"===b)E=w(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:w(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)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:u:"-"===d||"("===d?"":d)+p,E=("s"===b?BH[8+LH/3]:"")+E+(C&&"("===d?")":""),S)for(o=-1,i=e.length;++o<i;)if(48>(s=e.charCodeAt(o))||s>57){E=(46===s?a+e.slice(o+1):e.slice(o))+E,e=e.slice(0,o);break}}m&&!f&&(e=r(e,1/0));var k=p.length+e.length+E.length,_=k<h?new Array(h-k+1).join(t):"";switch(m&&f&&(e=r(_+e,_.length?h-E.length:1/0),_=""),n){case"<":e=p+e+E+_;break;case"=":e=p+_+e+E;break;case"^":e=_.slice(0,k=_.length>>1)+p+e+E+_.slice(k);break;default:e=_+p+e+E}return l(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return e+""},E}return{format:d,formatPrefix:function(e,t){var n=d(((e=DH(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(AH(t)/3))),o=Math.pow(10,-r),i=BH[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){qH=$H(e),FH=qH.format,zH=qH.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const WH=new Date,HH=new Date;function VH(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 l;do{a.push(l=new Date(+n)),t(n,i),e(n)}while(l<n&&n<r);return a},o.filter=n=>VH((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)=>(WH.setTime(+t),HH.setTime(+r),e(WH),e(HH),Math.floor(n(WH,HH))),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 GH=6e4,UH=864e5,YH=6048e5,KH=VH((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*GH)/UH),(e=>e.getDate()-1));KH.range;const XH=VH((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/UH),(e=>e.getUTCDate()-1));XH.range;const QH=VH((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/UH),(e=>Math.floor(e/UH)));function JH(e){return VH((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())*GH)/YH))}QH.range;const ZH=JH(0),eV=JH(1),tV=JH(2),nV=JH(3),rV=JH(4),oV=JH(5),iV=JH(6);function aV(e){return VH((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)/YH))}ZH.range,eV.range,tV.range,nV.range,rV.range,oV.range,iV.range;const lV=aV(0),sV=aV(1),uV=aV(2),cV=aV(3),dV=aV(4),pV=aV(5),fV=aV(6);lV.range,sV.range,uV.range,cV.range,dV.range,pV.range,fV.range;const hV=VH((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()));hV.every=e=>isFinite(e=Math.floor(e))&&e>0?VH((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,hV.range;const mV=VH((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 gV(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yV(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bV(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=gV,n=(t,n)=>gV(e(t),n),r=(t,n)=>e(t)-n):(t=e===gV||e===yV?e:vV,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 vV(){return 0}mV.every=e=>isFinite(e=Math.floor(e))&&e>0?VH((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,mV.range;const xV=bV(gV).right;bV((function(e){return null===e?NaN:+e})).center;var wV=xV;class SV extends Map{constructor(e,t=CV){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(EV(this,e))}has(e){return super.has(EV(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 EV({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function CV(e){return null!==e&&"object"==typeof e?e.valueOf():e}const kV=Math.sqrt(50),_V=Math.sqrt(10),MV=Math.sqrt(2);function RV(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>=kV?10:i>=_V?5:i>=MV?2:1;let l,s,u;return o<0?(u=Math.pow(10,-o)/a,l=Math.round(e*u),s=Math.round(t*u),l/u<e&&++l,s/u>t&&--s,u=-u):(u=Math.pow(10,o)*a,l=Math.round(e/u),s=Math.round(t/u),l*u<e&&++l,s*u>t&&--s),s<l&&.5<=n&&n<2?RV(e,t,2*n):[l,s,u]}function AV(e,t,n){return RV(e=+e,t=+t,n=+n)[2]}function LV(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 IV(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 DV(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function PV(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,l=e.months,s=e.shortMonths,u=jV(o),c=BV(o),d=jV(i),p=BV(i),f=jV(a),h=BV(a),m=jV(l),g=BV(l),y=jV(s),b=BV(s),v={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:null,d:sG,e:sG,f:fG,g:CG,G:_G,H:uG,I:cG,j:dG,L:pG,m:hG,M:mG,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:KG,s:XG,S:gG,u:yG,U:bG,V:xG,w:wG,W:SG,x:null,X:null,y:EG,Y:kG,Z:MG,"%":YG},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return l[e.getUTCMonth()]},c:null,d:RG,e:RG,f:PG,g:HG,G:GG,H:AG,I:LG,j:IG,L:DG,m:TG,M:OG,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:KG,s:XG,S:NG,u:qG,U:FG,V:jG,w:BG,W:$G,x:null,X:null,y:WG,Y:VG,Z:UG,"%":YG},w={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 C(e,t,n,r)},d:JV,e:JV,f:oG,g:YV,G:UV,H:eG,I:eG,j:ZV,L:rG,m:QV,M:tG,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:XV,Q:aG,s:lG,S:nG,u:WV,U:HV,V:VV,w:$V,W:GV,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:YV,Y:UV,Z:KV,"%":iG};function S(e,t){return function(n){var r,o,i,a=[],l=-1,s=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++l<u;)37===e.charCodeAt(l)&&(a.push(e.slice(s,l)),null!=(o=TV[r=e.charAt(++l)])?r=e.charAt(++l):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),s=l+1);return a.push(e.slice(s,l)),a.join("")}}function E(e,t){return function(n){var r,o,i=DV(1900,void 0,1);if(C(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=IV(DV(i.y,0,1))).getUTCDay(),r=o>4||0===o?sV.ceil(r):sV(r),r=XH.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=LV(DV(i.y,0,1))).getDay(),r=o>4||0===o?eV.ceil(r):eV(r),r=KH.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?IV(DV(i.y,0,1)).getUTCDay():LV(DV(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,IV(i)):LV(i)}}function C(e,t,n,r){for(var o,i,a=0,l=t.length,s=n.length;a<l;){if(r>=s)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in TV?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=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}var TV={"-":"",_:" ",0:"0"},OV=/^\s*\d+/,NV=/^%/,qV=/[\\^$*+?|[\]().{}]/g;function FV(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 zV(e){return e.replace(qV,"\\$&")}function jV(e){return new RegExp("^(?:"+e.map(zV).join("|")+")","i")}function BV(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function $V(e,t,n){var r=OV.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WV(e,t,n){var r=OV.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function HV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function VV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function GV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function UV(e,t,n){var r=OV.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function YV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function KV(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 XV(e,t,n){var r=OV.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function QV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function JV(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ZV(e,t,n){var r=OV.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eG(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tG(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nG(e,t,n){var r=OV.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rG(e,t,n){var r=OV.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function oG(e,t,n){var r=OV.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iG(e,t,n){var r=NV.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aG(e,t,n){var r=OV.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function lG(e,t,n){var r=OV.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sG(e,t){return FV(e.getDate(),t,2)}function uG(e,t){return FV(e.getHours(),t,2)}function cG(e,t){return FV(e.getHours()%12||12,t,2)}function dG(e,t){return FV(1+KH.count(hV(e),e),t,3)}function pG(e,t){return FV(e.getMilliseconds(),t,3)}function fG(e,t){return pG(e,t)+"000"}function hG(e,t){return FV(e.getMonth()+1,t,2)}function mG(e,t){return FV(e.getMinutes(),t,2)}function gG(e,t){return FV(e.getSeconds(),t,2)}function yG(e){var t=e.getDay();return 0===t?7:t}function bG(e,t){return FV(ZH.count(hV(e)-1,e),t,2)}function vG(e){var t=e.getDay();return t>=4||0===t?rV(e):rV.ceil(e)}function xG(e,t){return e=vG(e),FV(rV.count(hV(e),e)+(4===hV(e).getDay()),t,2)}function wG(e){return e.getDay()}function SG(e,t){return FV(eV.count(hV(e)-1,e),t,2)}function EG(e,t){return FV(e.getFullYear()%100,t,2)}function CG(e,t){return FV((e=vG(e)).getFullYear()%100,t,2)}function kG(e,t){return FV(e.getFullYear()%1e4,t,4)}function _G(e,t){var n=e.getDay();return FV((e=n>=4||0===n?rV(e):rV.ceil(e)).getFullYear()%1e4,t,4)}function MG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+FV(t/60|0,"0",2)+FV(t%60,"0",2)}function RG(e,t){return FV(e.getUTCDate(),t,2)}function AG(e,t){return FV(e.getUTCHours(),t,2)}function LG(e,t){return FV(e.getUTCHours()%12||12,t,2)}function IG(e,t){return FV(1+XH.count(mV(e),e),t,3)}function DG(e,t){return FV(e.getUTCMilliseconds(),t,3)}function PG(e,t){return DG(e,t)+"000"}function TG(e,t){return FV(e.getUTCMonth()+1,t,2)}function OG(e,t){return FV(e.getUTCMinutes(),t,2)}function NG(e,t){return FV(e.getUTCSeconds(),t,2)}function qG(e){var t=e.getUTCDay();return 0===t?7:t}function FG(e,t){return FV(lV.count(mV(e)-1,e),t,2)}function zG(e){var t=e.getUTCDay();return t>=4||0===t?dV(e):dV.ceil(e)}function jG(e,t){return e=zG(e),FV(dV.count(mV(e),e)+(4===mV(e).getUTCDay()),t,2)}function BG(e){return e.getUTCDay()}function $G(e,t){return FV(sV.count(mV(e)-1,e),t,2)}function WG(e,t){return FV(e.getUTCFullYear()%100,t,2)}function HG(e,t){return FV((e=zG(e)).getUTCFullYear()%100,t,2)}function VG(e,t){return FV(e.getUTCFullYear()%1e4,t,4)}function GG(e,t){var n=e.getUTCDay();return FV((e=n>=4||0===n?dV(e):dV.ceil(e)).getUTCFullYear()%1e4,t,4)}function UG(){return"+0000"}function YG(){return"%"}function KG(e){return+e}function XG(e){return Math.floor(+e/1e3)}const QG=MH();QG("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=$H(t),o=r.format(e),this},a(),i.format=function(e,o,i,l){return(i||l)&&(t=i,n=l,a()),r.format(e)(o)},i.pattern=function(t){return t&&(e=t,o=r.format(t)),e},i})),QG("d3-time",(function(e){let t=PV({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=PV(...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 JG={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 QG(t.type||"d3-number")(t.format||"")})(e)};function ZG(e){let{id:t=JG.id,key:n=JG.key,min:r=JG.min,max:o=JG.max,type:i=JG.type,tags:a=JG.tags,title:l=JG.title,values:s=JG.values,value:u=JG.value,label:c=JG.label,formatter:d=JG.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:()=>l(e),items:()=>s(e),formatter:()=>d(e),value:u,label:c}}const eU=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),tU=e=>e.reduce(((e,t)=>e+t),0),nU={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=eU(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=eU(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=eU(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=eU(e),n=t.length;return n?tU(t)/n:NaN}};function rU(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 l=n[a],s=o[a]={};-1!==["number","string","boolean"].indexOf(typeof l)?(s.type="primitive",s.value=l):"function"==typeof l?(s.type="function",s.value=l,s.label=l,s.field=i):"object"==typeof l&&(l.fields?s.fields=l.fields.map((n=>rU(e,t,{main:n},r).main)):void 0!==l.field?(s.type="field",s.field=t.field(l.field),s.value=s.field.value,s.label=s.field.label):i&&(s.value=i.value,s.label=i.label,s.field=i),"function"==typeof l.filter&&(s.filter=l.filter),void 0!==l.value&&(s.value=l.value),void 0!==l.label&&(s.label=l.label),"function"==typeof l.reduce?s.reduce=l.reduce:l.reduce?s.reduce=nU[l.reduce]:s.field&&s.field.reduce&&(s.reduce="string"==typeof s.field.reduce?nU[s.field.reduce]:s.field.reduce),"function"==typeof l.reduceLabel?s.reduceLabel=l.reduceLabel:l.reduceLabel?s.reduceLabel=nU[l.reduceLabel]:s.field&&s.field.reduceLabel&&(s.reduceLabel="string"==typeof s.field.reduceLabel?nU[s.field.reduceLabel]:s.field.reduceLabel))})),o}function oU(e,t){const{main:n}=rU(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:rU(e,t,e.props||{},n),main:n}}function iU(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 l=t.reduce,s=t.reduceLabel,u=l?l(o):o,c={value:u,label:s?s(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 aU(e,t){let{main:n,propsArr:r,props:o}=t,i=[];const a=n.field.formatter(),l={};return r.forEach((e=>{l[e]=o[e].field?o[e].field.formatter():e=>e})),i.push(...e.map((e=>{const t=iU(e.items,n,a);return r.forEach((n=>{t[n]=iU(e.items,o[n],l[n],n)})),t}))),i}function lU(e){let{cfg:t,itemData:n,obj:r,target:o,tracker:i,trackType:a}=e;const l="function"===a?t.trackBy(n):n[t.trackBy];let s=i[l];s||(s=i[l]={items:[],id:l},o.push(s)),s.items.push(r)}function sU(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 uU(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 cU={diverging:function(e,t){if((l=e.length)>0)for(var n,r,o,i,a,l,s=0,u=e[t[0]].length;s<u;++s)for(i=a=0,n=0;n<l;++n)(o=(r=e[t[n]][s])[1]-r[0])>=0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):r[0]=i},none:SH,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,l=0;a<n;++a)l+=e[a][r][1]||0;o[r][1]+=o[r][0]=-l/2}SH(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}SH(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 l=0,s=0,u=0;l<o;++l){for(var c=e[t[l]],d=c[a][1]||0,p=(d-(c[a-1][1]||0))/2,f=0;f<l;++f){var h=e[t[f]];p+=(h[a][1]||0)-(h[a-1][1]||0)}s+=d,u+=p*d}n[a-1][1]+=n[a-1][0]=i,s&&(i-=u/s)}n[a-1][1]+=n[a-1][0]=i,SH(e,t)}}},dU={ascending:function(e){var t=e.map(_H);return EH(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,o=e.map(_H),i=function(e){var t=e.map(kH);return EH(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,l=0,s=[],u=[];for(t=0;t<r;++t)n=i[t],a<l?(a+=o[n],s.push(n)):(l+=o[n],u.push(n));return u.reverse().concat(s)},none:EH,reverse:function(e){return EH(e).reverse()}};function pU(e,t,n){const r={},o=t.stackKey,i=t.value,a=t.startProp||"start",l=t.endProp||"end",s=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=IW([]),t=EH,n=SH,r=CH;function o(o){var i,a,l=e.apply(this,arguments),s=o.length,u=l.length,c=new Array(u);for(i=0;i<u;++i){for(var d,p=l[i],f=c[i]=new Array(s),h=0;h<s;++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:IW(oH.call(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:IW(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?EH:"function"==typeof e?e:IW(oH.call(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?SH:e,o):n},o}().keys(f).value(((e,t)=>e[t]?i(e[t]):0)).order(dU[u]).offset(cU[s]);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[l]={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=ZG({title:b.map((e=>e.title())).join(", "),min:uU(y),max:sU(y),type:"measure",formatter:b[0]?b[0].formatter:void 0});e.fields.push(v)}function fU(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=hW({},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.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&&pU(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 hU(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fU;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 mU(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const gU=Symbol("implicit");function yU(){var e=new SV,t=[],n=[],r=gU;function o(o){let i=e.get(o);if(void 0===i){if(r!==gU)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 SV;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 yU(t,n).unknown(r)},mU.apply(o,arguments),o}function bU(){var e,t,n=yU().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,l=!1,s=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-s+2*u),l&&(e=Math.floor(e)),p+=(f-p-e*(n-s))*c,t=e*(1-s),l&&(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,l=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(l=!!e,d()):l},n.padding=function(e){return arguments.length?(s=Math.min(1,u=+e),d()):s},n.paddingInner=function(e){return arguments.length?(s=Math.min(1,e),d()):s},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 bU(r(),[i,a]).round(l).paddingInner(s).paddingOuter(u).align(c)},mU.apply(d(),arguments)}function vU(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xU(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wU(){}var SU=.7,EU=1/SU,CU="\\s*([+-]?\\d+)\\s*",kU="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_U="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",MU=/^#([0-9a-f]{3,8})$/,RU=new RegExp(`^rgb\\(${CU},${CU},${CU}\\)$`),AU=new RegExp(`^rgb\\(${_U},${_U},${_U}\\)$`),LU=new RegExp(`^rgba\\(${CU},${CU},${CU},${kU}\\)$`),IU=new RegExp(`^rgba\\(${_U},${_U},${_U},${kU}\\)$`),DU=new RegExp(`^hsl\\(${kU},${_U},${_U}\\)$`),PU=new RegExp(`^hsla\\(${kU},${_U},${_U},${kU}\\)$`),TU={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 OU(){return this.rgb().formatHex()}function NU(){return this.rgb().formatRgb()}function qU(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=MU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?FU(t):3===n?new BU(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?zU(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?zU(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=RU.exec(e))?new BU(t[1],t[2],t[3],1):(t=AU.exec(e))?new BU(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=LU.exec(e))?zU(t[1],t[2],t[3],t[4]):(t=IU.exec(e))?zU(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=DU.exec(e))?UU(t[1],t[2]/100,t[3]/100,1):(t=PU.exec(e))?UU(t[1],t[2]/100,t[3]/100,t[4]):TU.hasOwnProperty(e)?FU(TU[e]):"transparent"===e?new BU(NaN,NaN,NaN,0):null}function FU(e){return new BU(e>>16&255,e>>8&255,255&e,1)}function zU(e,t,n,r){return r<=0&&(e=t=n=NaN),new BU(e,t,n,r)}function jU(e,t,n,r){return 1===arguments.length?function(e){return e instanceof wU||(e=qU(e)),e?new BU((e=e.rgb()).r,e.g,e.b,e.opacity):new BU}(e):new BU(e,t,n,null==r?1:r)}function BU(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $U(){return`#${GU(this.r)}${GU(this.g)}${GU(this.b)}`}function WU(){const e=HU(this.opacity);return`${1===e?"rgb(":"rgba("}${VU(this.r)}, ${VU(this.g)}, ${VU(this.b)}${1===e?")":`, ${e})`}`}function HU(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function VU(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function GU(e){return((e=VU(e))<16?"0":"")+e.toString(16)}function UU(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new KU(e,t,n,r)}function YU(e){if(e instanceof KU)return new KU(e.h,e.s,e.l,e.opacity);if(e instanceof wU||(e=qU(e)),!e)return new KU;if(e instanceof KU)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new KU(a,l,s,e.opacity)}function KU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function XU(e){return(e=(e||0)%360)<0?e+360:e}function QU(e){return Math.max(0,Math.min(1,e||0))}function JU(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}vU(wU,qU,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:OU,formatHex:OU,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return YU(this).formatHsl()},formatRgb:NU,toString:NU}),vU(BU,jU,xU(wU,{brighter(e){return e=null==e?EU:Math.pow(EU,e),new BU(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?SU:Math.pow(SU,e),new BU(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new BU(VU(this.r),VU(this.g),VU(this.b),HU(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:$U,formatHex:$U,formatHex8:function(){return`#${GU(this.r)}${GU(this.g)}${GU(this.b)}${GU(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:WU,toString:WU})),vU(KU,(function(e,t,n,r){return 1===arguments.length?YU(e):new KU(e,t,n,null==r?1:r)}),xU(wU,{brighter(e){return e=null==e?EU:Math.pow(EU,e),new KU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?SU:Math.pow(SU,e),new KU(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 BU(JU(e>=240?e-240:e+120,o,r),JU(e,o,r),JU(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new KU(XU(this.h),QU(this.s),QU(this.l),HU(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=HU(this.opacity);return`${1===e?"hsl(":"hsla("}${XU(this.h)}, ${100*QU(this.s)}%, ${100*QU(this.l)}%${1===e?")":`, ${e})`}`}}));var ZU=e=>()=>e;function eY(e){return 1==(e=+e)?tY: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):ZU(isNaN(t)?n:t)}}function tY(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ZU(isNaN(e)?t:e)}var nY=function e(t){var n=eY(t);function r(e,t){var r=n((e=jU(e)).r,(t=jU(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=tY(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 rY(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 oY(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]=dY(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 iY(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function aY(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function lY(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]=dY(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var sY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uY=new RegExp(sY.source,"g");function cY(e,t){var n,r,o,i=sY.lastIndex=uY.lastIndex=0,a=-1,l=[],s=[];for(e+="",t+="";(n=sY.exec(e))&&(r=uY.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:aY(n,r)})),i=uY.lastIndex;return i<t.length&&(o=t.slice(i),l[a]?l[a]+=o:l[++a]=o),l.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)l[(n=s[r]).i]=n.x(e);return l.join("")})}function dY(e,t){var n,r=typeof t;return null==t||"boolean"===r?ZU(t):("number"===r?aY:"string"===r?(n=qU(t))?(t=n,nY):cY:t instanceof qU?nY:t instanceof Date?iY:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?rY:Array.isArray(t)?oY:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?lY:aY)(e,t)}function pY(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function fY(e){return+e}var hY=[0,1];function mY(e){return e}function gY(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function yY(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=gY(o,r),i=n(a,i)):(r=gY(r,o),i=n(i,a)),function(e){return i(r(e))}}function bY(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]=gY(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=wV(e,t,1,r)-1;return i[n](o[n](t))}}function vY(){var e,t,n,r,o,i,a=hY,l=hY,s=dY,u=mY;function c(){var e=Math.min(a.length,l.length);return u!==mY&&(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?bY:yY,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),l,s)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=r(l,a.map(e),aY)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,fY),c()):a.slice()},d.range=function(e){return arguments.length?(l=Array.from(e),c()):l.slice()},d.rangeRound=function(e){return l=Array.from(e),s=pY,c()},d.clamp=function(e){return arguments.length?(u=!!e||mY,c()):u!==mY},d.interpolate=function(e){return arguments.length?(s=e,c()):s},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function xY(e,t,n,r){var o,i=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?AV(t,e,n):AV(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=DH(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(AH(t)/3)))-AH(Math.abs(e)))}(i,a))||(r.precision=o),zH(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,AH(t)-AH(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,-AH(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return FH(r)}function wY(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?RV(t,e,n):RV(e,t,n);if(!(i>=o))return[];const l=i-o+1,s=new Array(l);if(r)if(a<0)for(let e=0;e<l;++e)s[e]=(i-e)/-a;else for(let e=0;e<l;++e)s[e]=(i-e)*a;else if(a<0)for(let e=0;e<l;++e)s[e]=(o+e)/-a;else for(let e=0;e<l;++e)s[e]=(o+e)*a;return s}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return xY(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,l=i.length-1,s=i[a],u=i[l],c=10;for(u<s&&(o=s,s=u,u=o,o=a,a=l,l=o);c-- >0;){if((o=AV(s,u,n))===r)return i[a]=s,i[l]=u,t(i);if(o>0)s=Math.floor(s/o)*o,u=Math.ceil(u/o)*o;else{if(!(o<0))break;s=Math.ceil(s*o)/o,u=Math.floor(u*o)/o}r=o}return e},e}function SY(){var e=vY()(mY,mY);return e.copy=function(){return t=e,SY().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},mU.apply(e,arguments),wY(e)}function EY(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[wV(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 EY().domain(t).range(n).unknown(e)},mU.apply(o,arguments)}function CY(e){return void 0===e?e=>e:t=>e(t)}function kY(e){return Math.max(0,Math.min(1,e))}function _Y(e){return"object"==typeof e}function MY(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 RY(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(...MY(t,i,a)),i-=a-i,a=e[o],r.push(...MY(t,i,a))):o===e.length-1&&a!==n.end()?(a=i+(i-e[o-1]),r.push(...MY(t,i,a))):r.push(...MY(t,i,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function AY(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=yW(o)||yW(t)?2:Math.max(t/o,2),l=Math.min(1e3,Math.round(a));let s=n.ticks(l);s.length<=1&&(s=n.ticks(l+1));const u=r>0?RY(s,r,n):s;u.sort(((e,t)=>e-t));const c=u.map(CY(i));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:c[t],value:e,isMinor:-1===s.indexOf(e)}}))}function LY(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=yW(o)||yW(t)?2:Math.max(t/o,2),l=Math.min(1e3,Math.round(a)),s=l>10?10:l;n.nice(s);const u=n.ticks(l),c=r>0?RY(u,r,n):u;c.sort(((e,t)=>e-t));const d=c.map(CY(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 IY(e){let t,{settings:n,scale:r,distance:o,formatter:i=e=>e}=e;const a=n.minorTicks&&!yW(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?!yW(e.value):!yW(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(_Y(e)?e.value:e)-(_Y(t)?t.value:t))).filter(((e,t,r)=>{const o=_Y(e)?e.value:e;return o<=n.max()&&o>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=_Y(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)?kY(n(e.start)):i,end:t&&!isNaN(e.end)?kY(n(e.end)):i}}))}({values:e,scale:r.copy(),formatter:i})}else if(yW(n.ticks.count)){t=(n.ticks.tight?LY:AY)({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 DY(){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 PY={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},TY={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},OY={count:NaN};function NY(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 qY(){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=SY(),o={instance:null,invert:!1},i={data:t,resources:n},a=DY(e,PY,i);let l;function s(e){return yW(e)?NaN:r(e)}a.ticks=DY(e.ticks,TY,i),a.minorTicks=DY(e.minorTicks,OY,i),s.data=()=>t,s.invert=function(e){return r.invert(e)},s.rangeRound=function(e){return r.rangeRound(e),s},s.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),s},s.cachedTicks=function(){return l},s.clearTicksCache=function(){return l=void 0,this},s.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=cW(!0,{},a,e.settings),e.scale=s,l=IY(e),l):(l=r.ticks(e),l)},s.nice=function(e){return r.nice(e),s},s.tickFormat=function(e,t){return r.tickFormat(e,t)},s.interpolate=function(e){return r.interpolate(e),s},s.domain=function(e){return arguments.length?(r.domain(e),o.instance&&o.instance.domain([s.start(),s.end()]),s):r.domain()},s.range=function(e){return arguments.length?(r.range(e),s):r.range()},s.start=function(){return s.domain()[0]},s.end=function(){return s.domain()[this.domain().length-1]},s.min=function(){return Math.min(this.start(),this.end())},s.max=function(){return Math.max(this.start(),this.end())},s.classify=function(e){let t=(s.start()-s.end())/e,n=[s.end()],r=[],o=t/2;for(let i=0;i<e;i++){let e=n[n.length-1]||0,i=e+t,a=s(e+o);n.push(i,i),r.push(a,a)}return n.pop(),s.domain(n),s.range(r),s},s.copy=function(){const o=qY(e,t,n);return o.domain(s.domain()),o.range(s.range()),o.clamp(r.clamp()),o},s.norm=function(e){return NY(o,s),o.instance(e)},s.normInvert=function(e){return NY(o,s),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 s.domain([u,c]),s.range(a.invert?[1,0]:[0,1]),o.invert=a.invert,s}const FY={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function zY(){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=DY(e,FY,n),o=t.items||[],i={},a=[],l=[];function s(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=()=>l,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=bU();s(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,s(a,e);const l=i*n/t,c=(1-l)*u.align();return a.range(r.invert?[l+c,c]:[c,l+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=cW({datum:o[e]},n),r=c(t,e);-1===a.indexOf(r)&&(a.push(r),l.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 jY={depth:0};function BY(e,t,n){return e.ancestors().map((e=>t(cW({datum:e.data},n)))).reverse().slice(1).toString()}const $Y=e=>e.min(),WY=e=>e.max();function HY(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($Y).filter(gW);o=e.length?Math.min(...e):o}if(!r){const e=t.map(WY).filter(gW);i=e.length?Math.max(...e):i}}return[o,i]}const VY={domain:[],range:[],invert:!1,min:NaN,max:NaN};function GY(){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=qY(e,t,n).clamp(!0).interpolate(nY),o=DY(e,VY,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length,l=r;cW(!0,l,r);const[s,u]=HY(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 l.range(o.invert?p.slice().reverse():p.slice()),l.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}(l.range(),s,u)),l}const UY={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function YY(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const KY={domain:[],range:[]};const XY={domain:[],range:[],unknown:void 0},QY={domain:[],range:[],override:!1};const JY=MH();function ZY(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=fU(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}JY("linear",qY),JY("band",zY),JY("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=DY(t,FY,o);i.ticks=DY(t.ticks,jY,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=zY(i);const{values:l,labels:s,items:u,ticks:c}=function(e,t,n){const r=t.ticks.depth,o=t.value,i=t.label,a=[],l=[],s={},u=[];let c=0;if(!e)return{values:a,labels:l,items:s,ticks:u};e.eachAfter((e=>{if(e.depth>0){const t=BY(e,o,n),d=e.leaves()||[e],p=o(cW({datum:e.data},n)),f=i(cW({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:f,leftEdge:BY(d[0],o,n),rightEdge:BY(d[Math.max(d.length-1,0)],o,n),node:e};h?(a.push("SPACER_".concat(c,"_SPACER")),c++):(a.push(t),l.push(f)),(r<=0&&!h||e.depth===r)&&u.push(m),s[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:l,items:s,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)};cW(!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=()=>s,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(l),d})),JY("sequential-color",GY),JY("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=EY(),o=DY(e,UY,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length;function l(e){return yW(e)?NaN:r(e)}Object.keys(r).forEach((e=>l[e]=r[e]));const s=t.fields,[u,c]=HY(o,s),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=SY().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=GY().domain([n,r]).range(t);return[n,...YY(e),r].map((e=>o(e)))}(h,f,u,c)),l.data=()=>t,l.range(o.invert?f.slice().reverse():f),l.domain(h),l})),JY("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=yU(),o={data:t,resources:n},i=DY(e,KY,o),a="function"==typeof e.value?e.value:e=>e.datum.value,l="function"==typeof e.label?e.label:e=>e.datum.label,s=t.items||[],u={},c=[],d=[];for(let e=0;e<s.length;e++){const t=cW({datum:s[e]},o),n=a(t,e);-1===c.indexOf(n)&&(c.push(n),d.push(l(t,e)),u[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[c.indexOf(e)],r.datum=e=>s[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=DY(e,XY,{data:t,resources:n});let a;if(i.explicit=DY(e.explicit,QY,{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 eK={};function tK(){tK.init.call(this)}eK.isObject=function(e){return"object"==typeof e&&null!==e},eK.isNumber=function(e){return"number"==typeof e},eK.isUndefined=function(e){return void 0===e},eK.isFunction=function(e){return"function"==typeof e};var nK=tK;tK.EventEmitter=tK,tK.prototype._events=void 0,tK.prototype._maxListeners=void 0,tK.defaultMaxListeners=10,tK.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},tK.prototype.setMaxListeners=function(e){if(!eK.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},tK.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],eK.isUndefined(n))return!1;if(eK.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(eK.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},tK.prototype.addListener=function(e,t){var n;if(!eK.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,eK.isFunction(t.listener)?t.listener:t),this._events[e]?eK.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,eK.isObject(this._events[e])&&!this._events[e].warned)&&((n=eK.isUndefined(this._maxListeners)?tK.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,eK.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),eK.isFunction(console.trace)&&console.trace()));return this},tK.prototype.on=tK.prototype.addListener,tK.prototype.once=function(e,t){if(!eK.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},tK.prototype.removeListener=function(e,t){var n,r,o,i;if(!eK.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||eK.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(eK.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},tK.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],eK.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},tK.prototype.listeners=function(e){return this._events&&this._events[e]?eK.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},tK.listenerCount=function(e,t){return e._events&&e._events[t]?eK.isFunction(e._events[t])?1:e._events[t].length:0};var rK={mixin:e=>(Object.keys(nK.prototype).forEach((t=>{e[t]=nK.prototype[t]})),nK.init(e),e)};function oK(){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 l=Math.max(e,Math.min(t-r,n));n!==l&&(n=l,a=!0),a&&o.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return rK.mixin(o),o}function iK(e,t){const n=e.min||0,r=e.max||0,o=e.viewSize||0,i=t||oK();return i.update({min:n,max:r,viewSize:o}),i}function aK(e,t){return e<=t}function lK(e,t){return e<t}function sK(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function uK(){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?aK:lK,t=o?aK:lK},o.add=e=>{let{min:t,max:n}=e;const o=sK(r,t),i=sK(r,n,!0),a=[o,i-o];o%2==0&&a.push(t),i%2==0&&a.push(n);const l=r.join(",");r.splice(...a);return l!==r.join(",")},o.remove=e=>{let{min:t,max:n}=e;const o=sK(r,t),i=sK(r,n,!0),a=[o,i-o];o%2==1&&a.push(t),i%2==1&&a.push(n);const l=r.join(",");r.splice(...a);return l!==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=sK(r,t,!0),i=sK(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 cK(){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 dK={key:void 0,includeMin:!0,includeMax:!0};function pK(e){let{items:t,collection:n,vc:r}=e;const o={},i=[];let a,l;for(let e=0,i=t.length;e<i;e++){a=t[e].key,n[a]||(n[a]=r()),l=t[e].values||[t[e].value];for(let e=0;e<l.length;e++)n[a].add(l[e])&&(o[a]=o[a]||[],o[a].push(l[e]))}const s=Object.keys(o);for(let e=0,t=s.length;e<t;e++)a=s[e],i.push({id:a,values:o[a]});return i}function fK(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 l=Object.keys(r);for(let e=0,t=l.length;e<t;e++)i=l[e],o.push({id:i,values:r[i]});return o}function hK(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 mK(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 gK(e,t){const n=[],r=Object.keys(e);let o,i;const a=e=>-1===t[o].indexOf(e);for(let l=0,s=r.length;l<s;l++)o=r[l],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 yK(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?cW({},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 bK(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function vK(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function xK(e,t,n){let{ranges:r,interceptors:o,rc:i,aliases:a,rangeConfig:l}=n;const s=yK(o["".concat(t,"Ranges")],e,a);let u=!1;return s.forEach((e=>{const n=e.key;if(r[n]||(r[n]=i(l.sources[n]||l.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 wK(){let{vc:e=cK,rc:t=uK}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},o={},i={},a={sources:{},default:cW({},dK)};const l={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},s=()=>{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=s();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=s();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=s();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:cW({},dK)},e.ranges.forEach((e=>{const t={};Object.keys(dK).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:dK[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(s())},_state:e=>{if(!e)return s();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=yK(l.addValues,t,i),a=pK({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=yK(l.setValues,t,i),a=function(e){let{items:t,vCollection:n,vc:r}=e;const o={},i=hK(t);let a,l=[],s=[];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)||mK({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 s=gK(u,o),l=gK(o,u),[l,s]}({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=yK(l.removeValues,e,i),n=fK({collection:o,items:t});c.emit("remove-values",t),n.length&&(c.emit("update",[],n),u.updateValues())},c.addAndRemoveValues=(t,r)=>{const a=yK(l.addValues,t,i),s=yK(l.removeValues,r,i),d=pK({vc:e,collection:o,items:a}),p=fK({collection:o,items:s});c.emit("add-values",a),c.emit("remove-values",s),(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=yK(l.toggleValues,t,i),a=function(e){let{items:t,values:n,vc:r}=e;const o={},i={},a=[],l=[],s=hK(t);let u,c,d;const p=Object.keys(s);for(let e=0,t=p.length;e<t;e++){u=p[e],d=s[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)):mK({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],l.push({id:u,values:i[u]});return[a,l]}({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=>{xK(e,"add",{ranges:r,rc:t,interceptors:l,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=>{xK(e,"remove",{ranges:r,rc:t,interceptors:l,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=>{xK(e,"set",{ranges:r,rc:t,interceptors:l,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=>{xK(e,"toggle",{ranges:r,rc:t,interceptors:l,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 l=Object.keys(e);let s,u,c,d;for(let t=0,n=l.length;t<n;t++){if(s=l[t],"value"===s)u=e,a[t]={key:"",i:t,bool:!1};else{if("source"===s)continue;u=e[s],a[t]={key:s,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=bK(e);l[n]&&l[n].push(t)},c.removeInterceptor=(e,t)=>{const n=bK(e);if(!l[n])return;const r=l[n].indexOf(t);-1!==r&&l[n].splice(r,1)},c.removeAllInterceptors=e=>{const t=[];if(e){const n=bK(e);l[n]&&l[n].length&&t.push({name:e,handlers:l[n]})}else Object.keys(l).forEach((e=>{l[e].length&&t.push({name:vK(e),handlers:l[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]},rK.mixin(c),c}function SK(e){return e*e*e}function EK(e){return--e*e*e+1}function CK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}MH();const kK=["stroke","fill","color","backgroundColor","thumbColor"];function _K(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]=MK(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 MK(e,t,n){const r=typeof t;let o;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?aY:"string"===r?(o=qU(t))&&kK.includes(n)?(t=o,nY):cY:t instanceof qU?nY:t instanceof Date?iY:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?rY:Array.isArray(t)?_K:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?RK:aY)(e,t)}function RK(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]=MK(e[o],t[o],o):r[o]=t[o];return function(e){for(o in n)r[o]=n[o](e);return r}}function AK(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const LK={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},IK=/^\$/;function DK(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function PK(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 TK(e,t){return e.pxScale?e.pxScale(t):e}const OK={normalizeSettings:function(e,t,n){const r=cW({},e),o=cW({},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(DK(i)){let n=t[e];"string"==typeof n&&IK.test(n)&&(n=LK[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&&IK.test(n)?o[e]=LK[n]:o[e]=n})),o},resolveForItem:function(e,t,n){const r={},o=Object.keys(t),i=o.length,a=e.datum,l=e.datum;for(let s=0;s<i;s++){const i=o[s],u=t[i],c="object"==typeof l&&void 0!==u,d=c&&"string"==typeof u.ref,p=c&&i in l,f=d?l[u.ref]:p?l[i]:a;DK(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:PK};function NK(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...NK(t.children)),e):(e.push(t),e)),[])}function qK(e,t){let{context:n,data:r,style:o,filter:i,mode:a}=t;const l=e.chart.brush(n),s=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=NK(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 s?s({brush:l}):s;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=l.containsMappedData(n,o,a),i=p.indexOf(e[r]);let s=!1;t&&-1===i?(p.push(e[r]),s=!0):t||-1===i||(p.splice(i,1),s=!0),e[r].needToUpdate=s||f,e[r].isActive=t}for(let o=0;o<t;o++)if(n=e[o].data,n){if(e[o].needToUpdate){const t=cW({},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 l.on("start",g),l.on("end",y),l.on("update",b),{isActive:()=>l.isActive(),update:()=>{p.length=0,f=!0,m()},cleanUp:function(){l.removeListener("start",g),l.removeListener("end",y),l.removeListener("update",b)}}}function FK(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"},l={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),l.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,l.items.push(e))}}))}o.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[l.actionFn](l.items)}))}({dataPoints:i,action:n,chart:r,trigger:o})}function zK(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 l=i.map((e=>e.node));return FK({nodes:l,action:o,chart:r.chart,data:r.data,trigger:n}),a}function jK(e,t,n){const r=n.element().getBoundingClientRect();let o=mW(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&&mW(e)?o={cx:o.x,cy:o.y,r:t.touchRadius}:t.mouseRadius>0&&!mW(e)&&(o={cx:o.x,cy:o.y,r:t.mouseRadius}),n.itemsAt(o))}function BK(e,t,n){return e?"function"==typeof e?e(t):e:n}const $K={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",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 WK(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 HK(e,t,n,r){const o=n/2,i=e-r/2,a=t-r/2,l=e-o,s=t-o;return[{x:i,y:a},{x:i,y:s},{x:i+r,y:s},{x:i+r,y:a},{x:l+n,y:a},{x:l+n,y:a+r},{x:i+r,y:a+r},{x:i+r,y:s+n},{x:i,y:s+n},{x:i,y:a+r},{x:l,y:a+r},{x:l,y:a}]}function VK(e){return-e/180*Math.PI}function GK(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}}(VK(e))}function UK(e,t){return{x:e.x+t.x,y:e.y+t.y}}function YK(e,t){return{x:e.x-t.x,y:e.y-t.y}}function KK(e,t){return{x:e.x*t,y:e.y*t}}function XK(e,t){return e.x-t.x}function QK(e,t){return e.y-t.y}function JK(e,t){return XK(e,t)**2+QK(e,t)**2}function ZK(e,t){return Math.sqrt(JK(e,t))}function eX(e,t){return e.x*t.x+e.y*t.y}function tX(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=YK(e,n);return UK({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}const nX={up:0,down:180,left:90,right:-90};function rX(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 oX=MH();oX.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),oX.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:WK([{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}])}})),oX.add("saltire",(function(e){const t=VK(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 l={x:e.x,y:e.y},s=HK(e.x,e.y,i,o).map((e=>tX(e,t,l)));return{type:"path",fill:"black",d:WK(s)}})),oX.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}})),oX.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=nX[e.direction]||0,o=t/2,i=e.x-o,a=e.y-o;let l=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];const s=VK(r);return l=l.map((e=>tX(e,s,n))),{type:"path",fill:"black",d:WK(l)}})),oX.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:rX(e)}})),oX.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,l=360/o;for(let t=1;t<=o;t++){const o=l*t+a,s=VK(o),u=VK(o+l/2),c=Math.sin(s),d=Math.cos(s),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:WK(n)}})),oX.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=VK(o*a+i),l=Math.sin(r),s=Math.cos(r);t.push({x:e.x+s*n,y:e.y+l*n})}return{type:"path",fill:"black",d:WK(t)}})),oX.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:WK(HK(t,n,e.size,i))}})),oX.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=VK(90);i=i.map((n=>tX(n,e,t)))}const a=wW(i);return a.type="rect",a.fill="black",a})),oX.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 iX=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oX;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!==$K[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function aX(){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:l=!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?(l=e,this):"function"==typeof l?l(t):l}}}function lX(e,t,n){const{require:r=[]}=t,o=t.mediator||{},{settings:i,formatter:a,scale:l,data:s,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:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:i}),Object.defineProperty(e,"data",{get:s}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:l}),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 sX(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 uX(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 cX(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:l,theme:s,renderer:u}=t,c=rK.mixin({});let d,p,f,h,m,g=t.settings||{},y=cW(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OK,n={};return{resolve:function(r){let{data:o,settings:i,defaults:a={},scaled:l}=r;const s=n.norm=t.normalizeSettings(i,a,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};l&&Object.keys(l).forEach((e=>{s[e]&&t.updateScaleSize(s,e,l[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 w={nodes:[],chart:o,config:y.brush||{},renderer:null},S={tap:[],over:[]},E=[],C={},k=cW({},g);function _(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 l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return o&&("function"==typeof e[t]?a=e[t].call(C,...s):r&&(a=e[t])),i&&("function"==typeof g[t]?a=g[t].call(k,...s):r&&(a=g[t])),o||i||(a=n.call(C,...s)),a}}const M=_("preferredSize",(()=>0),!0),R=_("resize",(e=>{let{inner:t}=e;return t})),A=_("created"),L=_("beforeMount"),I=_("mounted"),D=_("beforeUnmount"),P=_("beforeUpdate"),T=_("updated"),O=_("beforeRender"),N=_("beforeDestroy"),q=_("destroyed"),F=e.render,z=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&E.push(qK(w,e))}))},j=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(w,"data",{get:()=>b});const B=y.renderer||e.renderer,$=B?u||l.renderer(B)():u||l.renderer()();"function"==typeof $.settings&&$.settings(y.rendererSettings),w.renderer=$;const W={resources:o.logger?{logger:o.logger()}:{}};let H=aX(sX(y,M,o.logger()),W);const V=e=>{e.key=y.key,e.element=$.element()},G=()=>{};G.dockConfig=()=>H,G.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=cW(!0,{},n,e.settings),H=aX(sX(y,M,o.logger()),W),w.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=fU(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=s.style(y.style||{})},G.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=R({inner:e,outer:t});h=n?$.size(n):$.size(e),k.rect=cW(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=cW(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},G.getRect=()=>k.rect;const U=()=>{const e=$.renderArgs?$.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=hW(hW({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function Q(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}G.beforeMount=L,G.beforeRender=()=>{O({size:h})},G.render=()=>{const e=F.call(C,...U());Q(e),$.render(e),Y=e,K=k.rect.computed},G.hide=()=>{G.unmount(),$.size({x:0,y:0,width:0,height:0}),$.clear()},G.beforeUpdate=()=>{P({settings:y,data:b})},G.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return $.render(),void(Y=null);const r=F.call(C,...U());Q(r),E.forEach((e=>e.cleanUp())),E.length=0,S.tap=[],S.over=[],t&&(z(),j()),E.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:l}=t,s=[],u={nodes:[],ips:[]},c={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],f=null;const h=n.trackBy||AK,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))),l=r.filter((e=>i.includes(e.data.major.value)));return{old:a,current:l}}(e[r],t);d.ips.push(RK(cW({},e[r],{points:n.old}),cW({},t,{points:n.current}))),s.push(cW({},e[r],{commonPoints:n.old}))}else d.ips.push(RK(e[r],t)),s.push(e[r]);d.nodes.push(t),e[r]=!1}else u.nodes.push(t),u.ips.push(RK(cW({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(c.nodes.push(e[t]),c.ips.push(RK(e[t],cW({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:SK,duration:200,tweens:c.ips,nodes:[...s]}),p.push({name:"updating",easing:CK,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:EK,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?s.filter(e).length:s.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=l.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,n=[],i=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));if(n.push(...i),n.push(...e.nodes),l.render(n),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:$},n,o.storage),X.start()):$.render(r),Y=r,K=k.rect.computed,$.setKey&&"string"==typeof g.key&&$.setKey(g.key)},G.updated=T,G.destroy=()=>{G.unmount(),N(f),$.destroy(),q(),f=null};const J=e=>{w.nodes=e,E.forEach((e=>{e.isActive()&&e.update()})),$.render(e)};return lX(C,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>$,chart:()=>o,dockConfig:()=>H,mediator:()=>a,instance:()=>k,rect:()=>k.rect,style:()=>m,update:()=>J,registries:()=>l,resolver:()=>v,symbol:()=>iX(l.symbol)}),lX(k,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>$,chart:()=>o,dockConfig:()=>H,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),G.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const i=o.brush(e),a=$.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let o=0;o<a.length;o++){const l=a[o];l.data&&i.containsMappedData(l.data,n||e.data,t)&&(V(l),r.push(l),a.splice(o,1),o--)}}))}return r},G.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:$).findShapes(e);for(let e=0,t=n.length;e<t;e++)V(n[e]);return n},G.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=$.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++)V(r[e]);return r},G.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];FK({nodes:e,action:t.action||"toggle",trigger:t,chart:o,data:w.data})},G.mount=()=>{f=$.element&&$.element()?f:$.appendTo(i),$.setKey&&"string"==typeof g.key&&$.setKey(g.key),y.brush&&(z(),j()),uX(k,c,g),uX(C,c,e),x=!0},G.mounted=()=>I(f),G.unmount=()=>{[k,C].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)})),S.tap=[],S.over=[],E.forEach((e=>{e.cleanUp()})),E.length=0,D(),x=!1},G.onBrushTap=e=>{S.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return zK({collisions:jK(t,n,r.renderer),t:n,config:r,action:BK(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.onBrushOver=e=>{S.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return zK({collisions:jK(t,n,r.renderer),t:n,config:r,action:BK(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.def=C,G.ctx=k,G.renderer=()=>$,G.set({settings:g}),A(),G}function dX(e){const t=cW(!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 pX(e,t,n){const r=UK(function(e,t){const n=eX(e,t)/eX(t,t)||1;return{x:t.x*n,y:t.y*n}}(YK(n,e),YK(t,e)),e);return r}function fX(e,t,n){return ZK(e,n)+ZK(t,n)-ZK(e,t)<1e-12}function hX(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 mX(e){return e.x1===e.x2&&e.y1===e.y2}function gX(e){return e.width<=0||e.height<=0}function yX(e){return e.r<=0}function bX(e){return e.edges.length<=2}function vX(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=_X(e,SW(t.edges[r])),!0===n)return!0;return!1}function xX(e,t){let n=!1;const{numPolygons:r,polygons:o}=t;for(let t=0;t<r;t++){if(n=OX(e,o[t]),!0===n)return!0}return!1}function wX(e,t){if(yX(e))return!1;return JK({x:e.cx,y:e.cy},t)<=e.r**2}function SX(e,t){if(gX(t)||yX(e))return!1;const n=t.width/2,r=t.height/2,o=t.x+n,i=t.y+r,a=e.r,l=e.cx,s=e.cy,u=Math.abs(l-o),c=Math.abs(s-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 EX(e,t){if(yX(e)||mX(t))return!1;const[n,r]=vW(t);if(wX(e,n)||wX(e,r))return!0;const o={x:e.cx,y:e.cy},i=pX(n,r,o);return JK(i,o)<=e.r**2&&fX(n,r,i)}function CX(e,t){if(bX(t)||yX(e))return!1;if(kX(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(EX(e,SW(t.edges[r])))return!0}return!1}function kX(e,t){if(bX(e)||!LX(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.vertices;let i,a,l,s,u;for(i=!1,s=-1,a=o.length,l=a-1;++s<a;l=s){if(o[s].x===n&&o[s].y===r)return!0;if(o[s].y===o[l].y&&o[s].y===r&&(n-o[s].x)*(n-o[l].x)<=0)return!0;if(o[s].y<r&&r<=o[l].y||o[l].y<r&&r<=o[s].y){if(u=(o[l].x-o[s].x)*(r-o[s].y)/(o[l].y-o[s].y)+o[s].x,n===u)return!0;n<u&&(i=!i)}}return i}function _X(e,t){if(bX(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(DX(t,SW(e.edges[n])))return!0}const[n,r]=vW(t);return kX(e,n)||kX(e,r)}function MX(e,t){if(bX(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(IX(t,SW(e.edges[n])))return!0}const[n,r,o,i]=xW(t);return kX(e,n)||kX(e,r)||kX(e,o)||kX(e,i)}function RX(e,t){return!gX(e)&&!gX(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 AX(e,t){if(gX(e)||gX(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=>LX(e,t)))}function LX(e,t){return!gX(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function IX(e,t){if(mX(t)||gX(e))return!1;const[n,r]=vW(t);if(LX(e,n)||LX(e,r))return!0;const o=xW(e);let i=o.length;for(let e=0;e<i;e++){if(DX(SW([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function DX(e,t){const[n,r]=vW(e),[o,i]=vW(t),a=XK(r,n),l=QK(r,n),s=XK(i,o),u=QK(i,o),c=XK(n,o),d=QK(n,o);let p=u*a-s*l;const f=s*d-u*c,h=a*d-l*c;let m,g;if(0===a&&0===l)return!1;if(0===s&&0===u)return!1;if(0===p){if(0===f&&0===h){if(0===a){if(0===l)return n.x===r.x&&n.y===r.y;m=QK(o,n)/l,g=QK(i,n)/l}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 PX(e,t){if(mX(e))return!1;const[n,r]=vW(e);return fX(n,r,t)}function TX(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!RX(n,r)&&(AX(n,r)?vX(e,t):vX(t,e))}function OX(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!RX(n,r)&&(AX(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++)if(n=TX(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=FX(e,SW(t.edges[r])),!0===n)return!0;return!1}(e,t))}function NX(e,t){if(yX(e))return!1;if(qX(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(EX(e,SW(n.edges[t])))return!0}}return!1}function qX(e,t){if(!LX(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.numPolygons;let i,a,l,s,u,c,d=!1;for(a=0;a<o;a++)for(i=e.vertices[a],u=-1,l=i.length,s=l-1;++u<l;s=u){if(i[u].x===n&&i[u].y===r)return!0;if(i[u].y===i[s].y&&i[u].y===r&&(n-i[u].x)*(n-i[s].x)<=0)return!0;if(i[u].y<r&&r<=i[s].y||i[s].y<r&&r<=i[u].y){if(c=(i[s].x-i[u].x)*(r-i[u].y)/(i[s].y-i[u].y)+i[u].x,n===c)return!0;n<c&&(d=!d)}}return d}function FX(e,t){const[n,r]=vW(t);if(qX(e,n)||qX(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(DX(t,SW(n.edges[e])))return!0}}return!1}function zX(e,t){const[n,r,o,i]=xW(t);if(qX(e,n)||qX(e,r)||qX(e,o)||qX(e,i))return!0;const{numPolygons:a,polygons:l}=e;for(let e=0;e<a;e++){const n=l[e];for(let e=0,r=n.edges.length;e<r;e++){if(IX(t,SW(n.edges[e])))return!0}}return!1}const jX=/^\$/,BX="@extend";function $X(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function WX(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&$X(e),jX.test(r)?(n.push(e),WX(r,t,n)):r}let r=e;const o=cW(!0,{},t,e),i={};if(e[BX]){const i=e[BX];-1!==n.indexOf(i)&&$X(i);let a=n.slice();a.push(i),r=cW(!0,{},WX(o[i],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===BX||jX.test(e))return;i[e]=r[e];let a=i[e];jX.test(a)&&a in o?(-1!==n.indexOf(a)&&$X(a),t.push(a),a=o[a],"object"==typeof a||jX.test(a)&&a in o?i[e]=WX(a,o,t):i[e]=a):"object"==typeof a&&(i[e]=WX(a,o,t))})),i}function HX(e,t){return WX(e,t,[])}function VX(){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=>HX(e,n),setStyle:t=>{n=cW({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}function GX(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 UX(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return cW(!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 YX(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 KX(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 XX(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 QX(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 JX(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 ZX(e,t,n,r,o){const i=cW({},t),a=cW({},n);XX(i,r),QX(a,r),JX(e,i,a);const l=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!!l&&(XX(t,r),QX(n,r),!0)}function eQ(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 tQ(e){return wW([].concat(...e.map(xW)))}function nQ(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:o,translation:i}=e;const a=YX(r.x,r.y,r.width,r.height),l=YX(r.x,r.y,r.width,r.height),s={},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=l.x-e.cachedSize,t.y=n.y,u.y=l.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=l.height,l.x-=e.cachedSize,l.width+=e.cachedSize;break;case"right":t.x=u.x=l.x+l.width,t.y=n.y,u.y=l.y,t.width=u.width=e.cachedSize,t.height=n.height,u.height=l.height,l.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=>s[e])).filter((e=>!!e));n.length>0&&(t=tQ(n.map((e=>e.outerRect))),u=tQ(n.map((e=>e.r))))}}e.key&&(s[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",l=(r[a]-n[a]*o.x)*n.align;i.left=e?0:l,i.top=e?l: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=eQ(u),t.edgeBleed=e.edgeBleed,t.computed=eQ(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 rQ(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 oQ(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 iQ(e){let t=UX(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),GX(r),GX(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];oQ(a);let l=a.dockConfig;const s=a.key,u=l.dock(),c=/@/.test(u)?u.split(",").map((e=>e.replace(/^\s*@/,""))):[];rQ(t,l,n)?r.push({comp:a,key:s,config:l,referencedDocks:c}):o.push({comp:a,key:s,config:l,referencedDocks:c})}return[r,o]}(n,t,r),l=function(e){let{layoutRect:t,visible:n,hidden:r,settings:o}=e;const i=YX(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},l=n.slice();l.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<l.length;++e){const n=l[e];KX(n,i,t),ZX(t,i,a,n,o)||(r.push(l.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 s=n.filter((e=>-1!==l.indexOf(e)));return n.length=0,n.push(...s),JX(t,i,a),i}({layoutRect:r,visible:i,hidden:a,settings:t}),s=nQ({visible:i,layoutRect:r,reducedRect:l,containerRect:o,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=YX();e.comp.resize(t,t)})),{visible:i.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:s.map((e=>e.comp))}},n.settings=function(e){t=UX(e)},n}const aQ=(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},lQ=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(hW(hW({},n),{},{children:lQ(e.children)}))}})),sQ=(e,t)=>({visible:[],hidden:t,ordered:[]}),uQ=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(hW(hW({},t),{},{children:lQ(e.children)}))}})),i=e=>n[e.index],{visible:a=o,hidden:l=[],ordered:s=a}=null!==(r=e(t,o))&&void 0!==r?r:{};return{visible:a.map(i),hidden:l.map(i),ordered:s.map(i)}},cQ=e=>"function"==typeof e?uQ(e):(e=>{const t=iQ(e);return uQ(((e,n)=>t.layout(e,n)))})(e);function dQ(e,t,n){const r=t.left-n.left,o=t.top-n.top,i=EW(e),a=cW(!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 pQ(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 fQ(e,t){let{element:n,data:r=[],settings:o={},on:i={}}=e;const a=t.registries,l=t.logger,s=VX(t.style,t.palettes),u=[],c=cW({},e),d=function(){const e={};return rK.mixin(e),e}();let p=[],f=null,h=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const w=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)},l=(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&&l(r.children,o.components):(e.splice(n,1),a(r),r.children&&l(r.children,[]),r.instance.destroy())}},s=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:l}=e;return l.map((e=>{const l=aQ(t,e.key);return r.indexOf(e.key)>-1?(delete l.updateWith,l):l?(e.rendererSettings&&"function"==typeof l.instance.renderer().settings&&l.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(l.applyTransform=!0,l):(l.updateWith={formatters:o,scales:a,data:n,settings:e},e.components&&(l.children=s({compList:l.children||[],data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),l)):i(e)})).filter((e=>!!e))},u=e=>{let{components:t,hidden:n,layoutFn:r,ordered:o,rect:i,visible:a}=e;const{visible:l,hidden:s,ordered:c}=r(i,t);a.push(...l),n.push(...s),o.push(...c),l.forEach((e=>{if(e.children){var t,r;const i=cQ(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})}})),s.forEach((e=>{e.children&&u({components:e.children,hidden:n,layoutFn:sQ,ordered:o,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],o=[]},n.findComponentByKey=e=>aQ(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],i=[],a=[],l=cQ(t);return u({components:o,hidden:i,layoutFn:l,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;l(o,t),o=s({compList:o,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return l.warn("Unknown component: ".concat(e.type)),!1;return{instance:cX(a.component(e.type),{settings:e,chart:c,mediator:d,registries:a,theme:s,container:n}),settings:cW(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(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),l=0;l<i;l++)a[l]=arguments[l];return o=r?e[t].call(c,...a):n.call(c,...a),o}}const E=()=>{let e;o.dockLayout?(l.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 w.layout({layoutSettings:e,rect:t})},C=S("created"),k=S("beforeMount"),_=S("mounted"),M=S("beforeUpdate"),R=S("updated"),A=S("beforeRender"),L=S("beforeDestroy"),I=S("destroyed"),D=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:l,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&s.setPalettes(t.palettes),t.style&&s.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fU;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=cW(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:l});const u={theme:s,logger:l};f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ZY;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},hW(hW({},u),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:hU;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},hW(hW({},u),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=iK(e[r],t?t[r]:null));return n}(i,m)};function P(){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 T=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();LX(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},O=()=>{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=T(e)},r=t=>{const n=e.comps||T(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=mW(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=T(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)}))},N=()=>{u.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),u.length=0},q=()=>{n.innerHTML="",(()=>{const{components:e=[]}=o;A(),D(r,o),w.set({components:e});const{visible:t,hidden:i,ordered:a}=E();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})),pQ(n,a)})(),O(),P(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,P(e.settings.interactions)),M(),D(r,o);const{formatters:n,scales:i,components:a=[]}=o;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:i}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),E()},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,P(e.settings.interactions)),M(),D(r,o,{partialData:t});const{formatters:l,scales:s,components:u=[]}=o;w.update({components:u,data:r,excludeFromUpdate:i,formatters:l,scales:s}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const c=[],d=[];let f;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&c.push(e)})),f=c;else{const{visible:e,hidden:t,ordered:n}=E();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||pQ(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})),R()},c.destroy=()=>{L(),w.destroy(),N(),P(),delete c.update,delete c.destroy,I()},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=>T(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],l=dQ(e,o,a.instance.renderer().element().getBoundingClientRect()),s=a.instance.shapesAt(l,a.opts),u=s.length>0&&"stop"===t.propagation;if(r=[...r,...s],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]=oK()),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]=wK()),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=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},c.logger=()=>l,c.theme=()=>s,c.storage=dX({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(c,"interactions",{get:()=>({instances:g,on(){O(),g.forEach((e=>e.on()))},off(){N(),g.forEach((e=>e.off()))}})}),C(),n&&(k(),q(),_(n),c.element=n),c}const hQ=e=>{let t=MH(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var mQ=MH();function gQ(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 yQ=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const bQ=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 l=i&&i.parse;Array.isArray(r[0])?l&&!1===l.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const s=!!l&&"function"==typeof l.row&&l.row;let u,c=t;c=l&&"function"==typeof l.fields?l.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=s?s(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=yQ(t),i=r.length>0,a=i?"measure":"dimension",l=i?Math.min(...r):NaN,s=i?Math.max(...r):NaN;o.fields.push(ZG(cW({source:n,key:e,title:c[e].title,values:t,min:l,max:s,type:a},c[e]),{value:c[e].value,label:c[e].label}))}}({data:i,cache:r,source:t,config:o})};function vQ(){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,matrix:t}),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}=oU(e,t),l=Object.keys(i),s=!!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=gQ(a,n,{key:o});l.forEach((e=>{const a=i[e];let l=a.field?a.field.items()[t]:n;r[e]=gQ(a,l,{key:o})})),s&&lU({cfg:e,itemData:n,obj:r,target:d,tracker:c,trackType:u}),f.push(r)}r=s?[...r,...aU(d,{main:a,propsArr:l,props:i})]:[...r,...f]}})),r}(e,o),hierarchy:()=>null};return bQ({key:e,data:t,config:n,cache:r}),o}vQ.util={normalizeConfig:oU,collect:aU,track:lU};const xQ=MH();xQ.default("matrix"),xQ("matrix",vQ),xQ("default",vQ);const wQ=MH();function SQ(e,t,n){return Math.max(e,Math.min(t,n))}function EQ(e){let{item:t,value:n,boxCenter:r,rendWidth:o,rendHeight:i,flipXY:a,symbol:l}=e,s="x",u="y",c=o,d=i,p=n<.5?90:-90;return a&&(s="y",u="x",c=i,d=o,p=n<.5?180:0),l(cW({},t.oob,{[s]:r*c,[u]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function CQ(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:o,rendHeight:i,flipXY:a}=e,l="x",s="y",u="width",c="height",d=o,p=i;a&&(l="y",s="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),l=SQ(-.1,1.2,i),s=SQ(-.1,1.2,a),u=l*o-s*o,c=Math.max(r,u),d=(c-u)/2;return{actualDiff:c,startModifier:d,actualLow:s*o-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return cW({},t.box,{type:"rect",[l]:(r+t.major)*d,[s]:h,[c]:f,[u]:n*d,data:t.data||{},collider:{type:null}})}function kQ(e){let{item:t,from:n,to:r,boxCenter:o,rendWidth:i,rendHeight:a,flipXY:l}=e,s="x1",u="y1",c="x2",d="y2",p=i,f=a;return l&&(s="y1",u="x1",c="y2",d="x2",p=a,f=i),cW({},t.line,{type:"line",[d]:Math.floor(n*f),[s]:o*p,[u]:Math.floor(r*f),[c]:o*p,data:t.data||{},collider:{type:null}})}function _Q(e){let{item:t,key:n,position:r,width:o,boxCenter:i,rendWidth:a,rendHeight:l,flipXY:s}=e,u="x1",c="y1",d="x2",p="y2",f=a,h=l;s&&(u="y1",c="x1",d="y2",p="x2",f=l,h=a);const m=o/2;return cW({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 MQ(e,t,n){const{width:r,maxWidthPx:o,minWidthPx:i}=t.box,a=e>=0?1:-1;let l=Math.min(a*e*r,isNaN(o)?n:o/n);return l=isNaN(i)?l:Math.max(i/n,l),l*a}wQ("native",(function(e,t,n){let r,o,i={chart:e,mediator:t,element:n},a=[],l=!0;function s(){"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(),l&&s()},off(){l=!1,u()},on(){l=!0,0===a.length&&s()},destroy(){u(),i=null,r=null}}}));const RQ={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}},AQ=Object.keys(RQ),LQ={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:l}=this,s=AQ.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),u={};s.forEach((e=>u[e]=RQ[e]));const c=function(e){let{keys:t,data:n,defaultSettings:r,style:o,settings:i,width:a,height:l,resolver:s}=e;const u=cW(!0,{},r||{},o||{}),c={major:"horizontal"===i.orientation?l:a,minor:"horizontal"===i.orientation?a:l},d=i.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?s.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:cW(!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?s.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:cW(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.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:s.resolve({data:n,defaults:{start:0,end:1},scaled:c,settings:cW(!0,{},h,f)})};for(let e=0,r=t.length;e<r;e++)i[m]&&!1===i[m].show||(m=t[e],g[m]=s.resolve({data:n,defaults:u[m],settings:i[m],scaled:c}));return g}({keys:s,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 l=[],s=o.major.items;if(!s.length)return l;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,w,S,E,C;const k=i?i.length:0,_=m?m.length:0,M={box:function(){b.box&&gW(b.start)&&gW(b.end)&&g.push(CQ({item:b,boxWidth:v,boxPadding:x,rendWidth:u,rendHeight:c,flipXY:r}))},line:function(){gW(b.min)&&gW(b.start)&&g.push(kQ({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r})),gW(b.max)&&gW(b.end)&&g.push(kQ({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r}))},median:function(){b.median&&gW(b.med)&&g.push(_Q({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;gW(b.min)&&g.push(_Q({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r})),gW(b.max)&&g.push(_Q({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[f[r]],gW(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,E=n>1&&n!==Number.MAX_VALUE,C=S||E}for(let e=0,t=s.length;e<t;e++){g=[],y=null;const t=s[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=cW({},{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=MQ(A,b,d),x=(A-v)/2,w=x+b.major+v/2,R(),C)b.oob&&(S?g.push(EQ({item:b,value:0,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})):E&&g.push(EQ({item:b,value:1,boxCenter:w,rendWidth:u,rendHeight:c,flipXY:r,symbol:a})));else for(let e=0;e<_;e++)b[m[e]]&&!1===b[m[e]].show||M[m[e]]();const L={type:"container",data:n,collider:{type:"bounds"},children:g};l.push(L)}return l}({items:p,settings:d,width:n,height:r,flipXY:o,resolved:c,keys:s,symbol:l});return f}};const IQ={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},DQ=/px$/,PQ={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},TQ={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function OQ(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 NQ(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=DQ.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);yW(a)&&(t=IQ,a=n.min+t.size*(n.max-n.min));const[l,s]=function(e){let t=PQ.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=hW(hW({},s),{},{type:l,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 qQ={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:cW({},PQ,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:o}=this.rect,i=cW({},TQ,this.settings.settings.sizeLimits),a=n.items,l=function(e,t,n,r,o){const i=OQ(e?e.scale:void 0,n),a=OQ(t?t.scale:void 0,r);let l=Math.min(i.value*o[i.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*o[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),s=Math.min(i.value*o[i.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*o[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(s)),max:Math.max(1,Math.floor(l)),maxGlobal:o.maxPx,minGlobal:o.minPx}}(n.settings.x,n.settings.y,r,o,i);return NQ(a,this.rect,l,this.settings.shapeFn||this.symbol)}};Math.PI;const FQ={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function zQ(e,t,n,r){let{x:o,y:i,width:a,height:l}=t;const s=XW(),u={x:o+a/2,y:i+l/2},c=Math.min(a,l)/2,d=Math.min(a,l)/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,l=p*o.cornerRadius;s.innerRadius(a),s.outerRadius(i),s.cornerRadius(l),o.arcDatum=e;const f=s.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 l=n-r;return{x:o*t*l,y:i*t*l}}(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:l,offset:{x:u.x+h.x,y:u.y+h.y}}},o}))}function jQ(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const BQ={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:cW({},FQ,this.style.slice),settings:o.slice});let a=0;for(let e=0,t=i.length;e<t;e++){const t=jQ(o,i[e]);t>0&&i[e].outerRadius>=i[e].innerRadius&&(n.push(t),r.push(i[e]),a+=t)}const l=function(){var e=rH,t=nH,n=null,r=IW(0),o=IW($W),i=IW(0);function a(a){var l,s,u,c,d,p=a.length,f=0,h=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min($W,Math.max(-$W,o.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,i.apply(this,arguments)),v=b*(y<0?-1:1);for(l=0;l<p;++l)(d=m[h[l]=l]=+e(a[l],l,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])})),l=0,u=f?(y-p*v)/f:0;l<p;++l,g=c)s=h[l],c=g+((d=m[s])>0?d*u:0)+v,m[s]={data:a[s],index:l,value:d,startAngle:g,endAngle:c,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:IW(+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:IW(+e),a):r},a.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:IW(+e),a):o},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:IW(+e),a):i},a}().sortValues(null);l.startAngle(o.startAngle),l.endAngle(o.endAngle),l.padAngle(o.padAngle);return zQ(l(n),cW({},this.rect,{x:0,y:0}),r,a)}};const $Q=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 WQ{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[WQ.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=WQ.evaluateKey(i,n),l=this.transposeCoordinate(a,e[i],n);t[a]=l}}return r&&$Q(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 HQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new WQ(...t)}function VQ(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const GQ={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=HQ(),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,PK(this,"x",this.rect.width),PK(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=cW({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=cW({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=VQ(this.x,this.rect.width),this.lines.y=VQ(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>cW(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 UQ(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 YQ(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 KQ(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 XQ(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 QQ(e){let{chart:t,blueprint:n,renderer:r,p:o,settings:i,items:a,slopeLine:l}=e,s=!0,u=!1,c=!1,d=!1,p=!1,f=cW(!0,{},i.style.line,o.line||{}),h=cW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},i.style.label||{},{fill:f.stroke});if(u=l?n.processItem({type:"line",x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,stroke:f.stroke||"black",strokeWidth:f.strokeWidth||1,strokeDasharray:f.strokeDasharray,flipXY:!1,value:o.valueInfo?o.valueInfo.id:o.value}):n.processItem({type:"line",x1:o.position,y1:0,x2:o.position,y2:1,stroke:f.stroke||"black",strokeWidth:f.strokeWidth||1,strokeDasharray:f.strokeDasharray,flipXY:o.flipXY||!1,value:o.valueInfo?o.valueInfo.id:o.value}),o.label){const e=cW(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},i.style.label||{},{fill:f.stroke},o.label);let l,u={width:0,height:0},h="";l=KQ(o,t),!1!==o.label.showValue&&(l?h=" (".concat(l(o.value),")"):o.scale&&(h=" (".concat(o.value,")"))),h&&(u=r.measureText({text:h,fontFamily:e.fontFamily,fontSize:e.fontSize}));let m=r.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:m.width+u.width,height:Math.max(m.height,u.height)},y=e.padding,b=XQ(o.flipXY?e.vAlign:e.align),v=XQ(o.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*n.width,e.maxWidthPx),w=g.height+2*y,S=o.flipXY?w:x,E=o.flipXY?x:w;if(c=n.processItem({fn:t=>{let{width:r,height:i}=t,a=o.position*r-(o.flipXY?w:x)*(1-b);a=o.flipXY?a:Math.max(a,0);return{type:"rect",x:a,y:Math.max(Math.abs(v*i-E*v),0),width:o.flipXY?S:Math.min(S,n.width-a),height:E,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:o.flipXY||!1}),c.x<-1||c.x+c.width>n.width+1||c.y<-1||c.y+c.height>n.height+1)c=void 0;else{d={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:c.x+y,y:c.y+c.height/2+g.height/3,maxWidth:c.width-2*y-u.width,anchor:"start"},h&&(p={type:"text",text:h||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:d.x+3+(c.width-(u.width+2*y)),y:d.y});for(let e=0,t=a.length;e<t;e++){let t=a[e];"rect"===t.type?RX(c,t)&&(s=!1):"line"===t.type&&o.flipXY===t.flipXY&&IX(c,t)&&(s=!1)}}}if(a.push(u),0!==(null==l?void 0:l.slope)&&(null!=l&&l.showLabel||null!=l&&l.showValue)){let e,i;const s=120;let c=l.showLabel?l.refLineLabel:"";if(l.showValue){const n=KQ(o,t),r=n?n(l.value):l.value;e="(".concat(l.slope,"x + ").concat(r,")"),c+=l.refLineLabel?" ".concat(e):e}if(c.length>1){var m;const e=r.measureText({text:c,fontFamily:h.fontFamily,fontSize:h.fontSize});e.width=e.width>s?s:e.width;const o=l.slope>0&&!l.isRtl?4*h.padding:h.padding/2,d=l.slope>0?3*h.padding:h.padding,p=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.max()*t+n<=o.min())return!0;return!1}(t,l.slope,l.value)?function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});return r(t<0?(o.min()-n)/t:(o.max()-n)/t)}(t,l.slope,l.value):void 0,g=void 0===p?Math.abs(u.y2):1,y=function(e,t,n,r,o,i){return e.slope>0?n<.8?e.isRtl?n*o.width-(r.width+i.padding):n*o.width:n>.8?e.isRtl?n*o.width+(r.width+2*i.padding):n*o.width-(r.width+6*i.padding):1===n?e.isRtl?n*o.width+(r.width+3*i.padding):n*o.width-(r.width+6*i.padding):t.x2-(r.width+2*i.padding):e.isRtl?t.x1-(r.width+2*i.padding):t.x1}(l,u,p,e,n,h),b=l.slope>0?g:u.y1;l.labelStroke&&(i={type:"rect",x:l.isRtl?Math.max(y,o)-2:Math.max(y,o)+2,y:Math.abs(Math.max(b,d)-e.height),rx:3,ry:3,width:e.width+h.padding,height:e.height-2,stroke:f.stroke,fill:f.stroke});const v={type:"text",text:c,fill:null!==(m=l.labelStroke)&&void 0!==m?m:f.stroke,opacity:h.opacity,fontFamily:h.fontFamily,fontSize:h.fontSize,x:i?i.x+2:Math.max(y,o)+2,y:i?i.y+e.height-h.padding:Math.abs(Math.max(b,d)-h.padding/2),anchor:"start",title:c,maxWidth:s,width:e.width};(function(e,t,n,r,o,i,a){for(let l=0,s=e.length;l<s;l++){const s=e[l];if("text"===(null==s?void 0:s.type))if(n>0&&void 0!==o){if(Math.abs(s.x-t.x)<s.width+i&&Math.abs(s.y-t.y)<r.height+a)return!0}else if(Math.abs(s.y-t.y)<r.height+a)return!0}return!1})(a,v,l.slope,e,p,o,d)||(i&&a.push(i),a.push(v))}}s&&c&&d&&(a.push(c,d),p&&a.push(p))}function JQ(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function ZQ(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function eJ(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)}const tJ={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=HQ(),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(ZQ).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=eJ(t,e.value);return cW(e,{scale:t,position:n})}return cW(e,{position:e.value})})),this.lines.y=this.lines.y.filter(ZQ).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=eJ(t,e.value);return cW(e,{scale:t,position:n,flipXY:!0})}return cW(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(JQ(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(JQ(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();o=hW({},r),o.x1=eJ(e,i),o.x2=eJ(e,a);const l=i*r.slope+r.value,s=a*r.slope+r.value;if(o.y1=eJ(n,l),o.y2=eJ(n,s),o.y1>1&&o.y2>1)return r.slope,void t["y".concat(o.y1>1?1:0)].push(JQ(r));if(o.y1<0)return void t["y".concat(o.y1>1?1:0)].push(JQ(r))}else o=void 0;QQ({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],l=n[r];if(l.length>0){let e=r.charAt(1),n="y"===r.charAt(0),i=a.padding.x+a.width,s=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?s:o-s;return"arc"===a.type?{type:"path",d:UQ(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:l}},flipXY:n}),d=c.cx||c.x,p=c.cy||c.y,f={type:"text",text:l.length||"",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},h={type:"path",d:YQ(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,f,h)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function nJ(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){cW(e,t.style)}(t,e),t}function rJ(e){return"string"==typeof e||"number"==typeof e?e:"-"}function oJ(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,l="start"===t.anchor&&r>=0,s=t.boundingRect.y+(l||a?t.boundingRect.height:0),u=[{x:t.x-o,y:s},{x:t.x+o,y:s}].map((e=>tX(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 iJ(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 aJ(e,t){var n,r;const o={type:"text",text:rJ(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)+iJ(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)+iJ(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),oJ(e,o,t),o}function lJ(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){cW(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 sJ(e){return!e.isMinor&&e.position>=0&&e.position<=1}function uJ(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,l=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)<l[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,state:n})}function cJ(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 dJ(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:l}=e,s=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(sJ),m=e=>{const t=o({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=cJ({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,l="layered"===o.labels.activeMode?2:1,s=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?s:1);if(p=l*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=l*c*e,d=n("M").width*s*a,d+u>p)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:l,settings:a})?l.labels.activeMode="horizontal":l.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==l.labels.activeMode&&uJ({rect:n.inner,state:l,majorTicks:h,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===l.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>cJ({value:t.width,maxValue:c,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>cJ({value:e.width,maxValue:c,minValue:d});if(p&&"tilted"!==l.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(s+=x,s+=a.labels.margin,"layered"===l.labels.activeMode&&(s*=2),"tilted"===l.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},l=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(o).map(i),0))+a.paddingEnd;if(u[e?"left":"right"]=l,!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),l=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))/l}({majorTicks:h,measureText:m,rect:n,bleedSize:l,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:s,edgeBleed:u}}const pJ=(e,t,n)=>e.width*Math.abs(t.position-n.position);function fJ(e){let{layered:t,major:n,innerRect:r,outerRect:o,tick:i,index:a}=e;const l=t?2:1,s=n[a-l],u=n[a+l],c=s?pJ(r,i,s)/2-2:1/0,d=u?pJ(r,i,u)/2-2:1/0;return n.length<2?r.width:s?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,l=t.width-t.width*r.position+a,s=2*Math.min(o,l),u=1===r.position?t.width/2-2:0;return Math.max(o,s,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,l=2*Math.min(o,a),s=0===r.position?t.width/2-2:0;return Math.max(o,l,s)})({innerRect:r,outerRect:o,tick:i,nextWidth:d})}function hJ(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 mJ(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=hJ(e)+e.labels.margin,t}function gJ(e,t){return e.map((e=>lJ(e,t)))}function yJ(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function bJ(e){let{textMetrics:t,settings:n,innerRect:r,scale:o,tilted:i,layered:a,tick:l}=e;const s=t.height,u=yJ(o,l),c={width:0,height:s};if("left"===n.align||"right"===n.align)c.width=r.width-mJ(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-mJ(n)-n.paddingEnd-s*Math.cos(e))/Math.sin(e)}else c.width=u*r.width;return c.width=cJ({value:c.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),c}function vJ(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:o,tilted:i,layered:a,tick:l,index:s,major:u}=e;const c=t.height,d={width:0,height:c};if("left"===n.align||"right"===n.align)d.width=r.width-mJ(n)-n.paddingEnd;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-mJ(n)-n.paddingEnd-c*Math.cos(e))/Math.sin(e)}else d.width=fJ({layered:a,major:u,innerRect:r,outerRect:o,tick:l,index:s});return d.width=cJ({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function xJ(e){let t;function n(){return t=vJ,n}function r(){return t=bJ,r}function o(e){let{settings:n,scale:r,innerRect:o,outerRect:i,measureText:a,ticks:l,state:s,textBounds:u}=e;const c=[],d=function(e){return e.filter((e=>!e.isMinor))}(l),p=function(e){return e.filter((e=>e.isMinor))}(l),f={innerRect:o,align:n.align,outerRect:i},h="tilted"===s.labels.activeMode,m="layered"===s.labels.activeMode;let g;if(n.line.show&&(f.style=n.line,f.padding=n.paddingStart,c.push(nJ(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=hJ(n),g=gJ(d,f)),n.labels.show){const e=mJ(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 u=t({textMetrics:f.textRect,settings:n,innerRect:o,outerRect:i,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});f.maxWidth=u.width,f.maxHeight=u.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)*yJ(n,o)}({innerRect:o,scale:r,ticks:l,settings:n,tick:e})};let p=[];p=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=aJ(e,t);return o.data=e.data,o}))}(d,f,s):function(e,t,n,r){const o=t.padding,i=mJ(n);return e.map(((e,a)=>{r(e,a);const l=i+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?o:l;const s=aJ(e,t);return s.data=e.data,s}))}(d,f,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>RX(CW(1,e[t].boundingRect),CW(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--)}(p,g,f),c.push(...p)}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(...gJ(p,f))),g&&c.push(...g),c}return n.build=o,r.build=o,e?r():n()}const wJ={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"},SJ={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 EJ={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=cW(!0,{},t.isDiscrete?wJ:SJ,n),i=cW(!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:l,paddingEnd:s}=i;return i.paddingStart="function"==typeof l?l.call(null):l,i.paddingEnd="function"==typeof s?s.call(null):s,i}(this),this.state.concreteNodeBuilder=xJ(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=TK(r,o);const i=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:l}=e,s=0;const{size:u,edgeBleed:c,isToLarge:d}=dJ({isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:l});if(s+=u,d)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>s&&(s=e)}if(a.line.show){const e=a.line.strokeWidth/2;s+=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 s+=a.paddingStart,s+=a.paddingEnd,{size:s,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=cW({},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 cW(this.state.innerRect,r),cW(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=TK(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})),$Q.multiple(t),t}};const CJ={render:()=>[]};function kJ(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 _J(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 MJ={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=kJ(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 l={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:_J(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};cW(l,a.text);const s=i(l);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)),l.x=e,l.y="top"===r?o.height-n.paddingStart:n.paddingStart+s.height,l.dy="top"===r?-s.height/6:-s.height/3,l.maxWidth=.8*o.width}else{let e=o.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=o.height-n.paddingStart),l.y=e,l.x="left"===r?o.width-n.paddingStart:n.paddingStart,l.dx="left"===r?-s.height/3:s.height/3;const t="left"===r?270:90;l.transform="rotate(".concat(t,", ").concat(l.x+l.dx,", ").concat(l.y+l.dy,")"),l.maxWidth=.8*o.height}return isNaN(n.maxLengthPx)||(l.maxWidth=Math.min(l.maxWidth,n.maxLengthPx)),l}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(cW(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=kJ(t,n,this.scale)}};function RJ(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],l=e.chart.scroll(e.settings.scroll);let s;{let e=t[o?"x":"y"];r&&(e=a-e);const n=l.getState();s={startOffset:e,startScroll:n.start,swipe:!1};const i=e/a*(n.max-n.min)+n.min;i<n.start?s.startScroll=i:i>n.start+n.viewSize&&(s.startScroll=i-n.viewSize)}return{update:e=>{let t=e[o?"x":"y"];if(r&&(t=a-t),!s.swipe){if(Math.abs(s.startOffset-t)<=1)return;s.swipe=!0}const n=l.getState(),i=(t-s.startOffset)/a*(n.max-n.min),u=s.startScroll+i;l.moveTo(u)},end:e=>{let t=e[o?"x":"y"];r&&(t=a-t);const n=l.getState();if(s.swipe){const e=(t-s.startOffset)/a*(n.max-n.min),r=s.startScroll+e;l.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;l.moveTo(e)}}}}function AJ(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const LJ={require:["chart","renderer"],on:{panStart(e){const t=AJ(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=RJ(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=AJ(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=AJ(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=AJ(e,this.renderer);RJ(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 l=i*(a.start-a.min)/(a.max-a.min);const s=i*a.viewSize/(a.max-a.min);return n&&(l=i-l-s),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(l,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[o]:"".concat(Math.max(1,s),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function IJ(e){let{h:t,isVertical:n,value:r,pos:o,align:i,borderHit:a,state:l,idx:s}=e;const u="end"!==i,c=u?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",f="100%";return l.targetRect&&"start"===l.settings.bubbles.align?(p="".concat(l.targetRect.x+l.targetRect.width,"px"),f="".concat(l.targetRect.y+l.targetRect.height,"px")):l.targetRect&&"end"===l.settings.bubbles.align&&(d=n?l.targetRect.x:l.targetRect.y,p="".concat(l.rect.width-d,"px"),f="".concat(l.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=l.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[l.key,"edge",s].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:cW({backgroundColor:l.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function DJ(e){let{h:t,isVertical:n,label:r,otherValue:o,rangeIdx:i,idx:a,pos:l,align:s,state:u,value:c}=e;const d="end"!==s,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:hW(hW({},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(l,"px"),transform:h}},[b])}function PJ(e){let{h:t,isVertical:n,top:r,height:o,color:i,on:a,opacity:l}=e;return t("div",cW({style:{backgroundColor:i,opacity:l,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 TJ(e){let{borderHit:t,els:n,isVertical:r,state:o,vStart:i,vEnd:a,idx:l}=e,s=0;o.targetRect&&(s=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)+s,h=f+p;if(o.targetRect){const e=o.targetFillRect||o.targetRect,t=r?e.height:e.width,l=u?o.scale.norm(i)*t:i,s=u?o.scale.norm(a)*t:a,c=Math.abs(l-s),d=Math.min(l,s),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")}},[PJ(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(IJ({h:o.h,isVertical:r,borderHit:t,value:m,pos:f,align:"start",state:o,idx:l})),x&&n.push(IJ({h:o.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:o,idx:l}));const w=o.settings.bubbles;if(w&&w.show){const e={fontSize:w.fontSize,fontFamily:w.fontFamily,color:w.fill},t=[i,a];v&&n.push(DJ({h:o.h,isVertical:r,align:w.align,style:e,rangeIdx:l,idx:0,otherValue:g,value:m,label:"".concat(o.format(m,t)),pos:f,state:o})),x&&n.push(DJ({h:o.h,isVertical:r,align:w.align,style:e,rangeIdx:l,idx:1,otherValue:m,value:g,label:"".concat(o.format(g,t)),pos:h,state:o}))}}function OJ(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 NJ(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,o)=>{e.active&&o===e.active.idx||TJ({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=OJ(e);r=e.active.start+t,o=e.active.end+t}TJ({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:o,idx:e.active.idx})}return t}function qJ(e){return{min:e.scale.min(),max:e.scale.max()}}function FJ(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function zJ(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 jJ(e){e.renderer.render(NJ(e))}function BJ(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 $J(e,t){let n,r=1/0;const o=t.domain(),i=t.bandwidth()/2;for(let a=0;a<o.length;++a){const l=Math.abs(e-i-t(o[a]));l<r&&(r=l,n=o[a])}return n}function WJ(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function HJ(e){const t=e.reduce(((e,t)=>(e.push(...xW(t.bounds)),e)),[]);return wW(t)}const VJ={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=BJ(this.state,this.state.brushInstance),this.state.active=null,jJ(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=TK(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=HJ(o);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=TK(e.chart.scale(n.scale),t.size),t.targetRect=r,i.length>0){const e=HJ(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]=hW({},o[t]);const l=e.scale.data();l&&l.fields&&l.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),o)}))}(this.state,e,t,n),this.emit("bubbleEnd"),jJ(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,jJ(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=qY(),this.state.scale.data=o.data,this.state.format||(this.state.format=(e,t)=>WJ(o.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf($J(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"),this.state.fauxBrushInstance=wK(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),o=[];return e.forEach((e=>{if(!WJ(r,[e.min,e.max]))return;const i=n.indexOf($J(e.min,t)),a=n.indexOf($J(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=BJ(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[NJ(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,l=n.center.y-n.deltaY;let s=document.elementFromPoint(a,l);r.element().contains(s)||(s=null);const u={started:!0};t.offset=cW({},r.element().getBoundingClientRect());const c=a-t.offset.left,d=l-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=qJ(t);let g,y,b=-1;if(s&&s.hasAttribute("data-idx"))b=parseInt(s.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"},s&&s.hasAttribute("data-other-value"))u.start=parseFloat(s.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&&!LX(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:BJ,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=qJ(e);zJ(e,e.current,n)}(this.state,BJ),jJ(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=OJ(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=BJ(e,e.fauxBrushInstance),o=e.findValues(r),i=e.findValues(t),a=i.filter((e=>-1===o.indexOf(e))),l=o.filter((e=>-1===i.indexOf(e))),s=a.map((e=>({key:n.id(),value:e}))),u=l.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(s,u),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),jJ(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;jJ(this.state);const i=o.querySelector("input");i.focus(),i.select()}};function GJ(e){e.renderer.render(NJ(e))}function UJ(e){return e.rc.ranges()}function YJ(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 KJ={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=uK(),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 l=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})),s=e.settings.brush.components.reduce(((e,t)=>e.key===l.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(l.data):Array.isArray(s.data)&&s.data.length?l.data[s.data[0]].label:l.data&&l.data.label?l.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,l=n.center.y-n.deltaY;let s=document.elementFromPoint(a,l);r.element().contains(s)||(s=null);const u={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=o(t);const c=a-t.offset.left,d=l-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=FJ(t);let b,v,x=-1;if(s&&s.hasAttribute("data-idx"))x=parseInt(s.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"},s&&s.hasAttribute("data-other-value"))u.start=parseFloat(s.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&&!LX(t.targetRect,{x:c,y:d})||Object.keys(u).forEach((e=>t[e]=u[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:UJ,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=FJ(e);zJ(e,e.current,n)}(this.state,UJ),GJ(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=OJ(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,...YJ(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),GJ(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function XJ(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,l=Math.min(i,a),s=Math.abs(i-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:l,width:t?r:s,y:t?l:0,height:t?s:r}}))}function QJ(e,t,n,r){function o(){!function(e){e.renderer.render(XJ(e))}(e)}function i(){!function(e){e.renderer.render(XJ(e))}(e)}function a(){!function(e){e.renderer.render(XJ(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 JJ(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 ZJ={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=TK(this.chart.scale(e.scale),r);return JJ(this.state),QJ(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,XJ(this.state)},beforeDestroy(){JJ(this.state)}};function eZ(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function tZ(e,t,n){return JK(e,t.points[0])<n.settings.snapIndicator.threshold**2}function nZ(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 rZ(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 oZ(e,t){e.snapIndicator.visible=t}const iZ={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=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})))}(this.settings);const n=eZ(this.state.rendererBounds,e);nZ(this.state,n),rZ({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=eZ(this.state.rendererBounds,e);tZ(t,this.state,this.settings)?oZ(this.state,!0):oZ(this.state,!1),nZ(this.state,t),rZ({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;oZ(this.state,!1);tZ(eZ(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 aZ(e,t,n,r,o){let i,a=0,l=t.length-1;for(;a<l;){let s=Math.floor((a+l)/2);i=o(t[s]),i[n]+i[r]<e[n]?a=s+1:l=s}return a}function lZ(e){let{orientation:t,targetNodes:n,labels:r,container:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aZ;const a=[],l="v"===t?"x":"y",s="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[l]<o[l]||d[l]+d[s]>o[l]+o[s])return!1;for(let e=i(d,a,l,s,u);e<a.length;e++)if(RX(d,a[e].textBounds))return!1;const f=i(d,n,l,s,c),h=d[l]+d[s];for(let e=f;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[l])break;if(RX(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const sZ=4;function uZ(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function cZ(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function dZ(e){return hW(hW({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 pZ(e,t,n){return n?e.width>=t.height:e.width>=t.width}function fZ(e,t,n){return n?e.height>=t.width:e.height>=t.height}function hZ(e,t,n,r,o){let i,a;return"v"===e?(i=r||o||pZ(t,n,!0),a=fZ(t,n,!r)):(i=pZ(t,n),a=o||fZ(t,n,!1)),i&&a}function mZ(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function gZ(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 pZ(e,t,n.rotate)&&fZ(e,t,n.rotate)}(e,o,n))return!1;const i=.5*o.height;return n.rotate?(r.x=mZ(e.x,e.width,o.height,n.align)+i,r.y=mZ(e.y,e.height,o.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=mZ(e.x,e.width,o.width,n.align),r.y=mZ(e.y,e.height,o.height,n.justify)+i),r}function yZ(e){let{bar:t,view:n,direction:r,position:o,padding:i=sZ}=e;const a={};if(cW(a,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?(a.y=0,a.height=e):("outside"===o&&"down"===r||"opposite"===o&&"up"===r)&&(a.y=i,a.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?(a.x=0,a.width=e):("outside"===o&&"right"===r||"opposite"===o&&"left"===r)&&(a.x=i,a.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}(a,n),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{top:n=sZ,bottom:r=sZ,left:o=sZ,right:i=sZ}=t;e.x+=o,e.width-=o+i,e.y+=n,e.height-=n+r}(a,i),a}function bZ(e){let t,n,r,o,i,{direction:a,fitsHorizontally:l,measured:s,node:u,orientation:c,placementSettings:d,rect:p}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yZ;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}),h.push(o),t=!i||o[m]>t[m]?o:t,hZ(c,o,s,l,r.overflow)){n=o;break}return n||(n=t,i=h.indexOf(n)),r=d[i],{bounds:n,placement:r}}function vZ(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:i=sZ,bottom:a=sZ,left:l=sZ,right:s=sZ}=o,u=e.x+e.dx,c=e.y+e.dy,d=n?Math.min(t.width,r.height):Math.min(t.height,r.width),p=n?Math.min(t.height,r.height):Math.min(t.width,r.width),f=.5*t.height,h=1e-9;return{x:(n?u-f:u)-l-h,y:(n?c:c-f)-i-h,width:p+(l+s)-h,height:d+(i+a)-h}}function xZ(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:o,collectiveOrientation:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bZ,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gZ,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:lZ;const u=[],c={container:r,targetNodes:n,labels:[],orientation:i};let d,p,f,h,m,g,y,b,v,x,w,S,E,C;for(let e=0,s=n.length;e<s;e++){g=null,p=n[e],f=p.node,E=uZ(f,t),v=p.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(h=p.texts[t],!cZ(h))continue;x=p.labelSettings[t],b=p.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:o,lblStngs:x,measured:b,node:f,orientation:C,placements:S,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){m=w.justify;const t="function"==typeof x.linkData?x.linkData(E,e):void 0,n="function"==typeof w.overflow?w.overflow(E,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===i||o);if(d=l(g,h,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n}),d){const n=vZ(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(hW(hW({},E),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(hW(hW({},E),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=vZ(d,b,r,g,w.background.padding))),u.push(d),c.labels.push({node:f,textBounds:n})}}}}const k=u.filter(s(c)),_=k.filter((e=>void 0!==e.backgroundBounds)).map(dZ);return[..._,...k]}function wZ(e){const t=2*Math.PI;return(e%t+t)%t}function SZ(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function EZ(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function CZ(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),l=r*a-o*i,s=e*e-l*l;if(s<0)return null;let u=Math.sqrt(s);return{x:l*a+i*u,y:-l*i+a*u}}function kZ(e){let t,n,{radius:r,size:o,angle:i}=e,{width:a,height:l}=o,s={x:a/2,y:l/2};switch(Math.floor(i/(Math.PI/2))){case 0:if(t=CZ(r,s,i),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=CZ(r,s,Math.PI-i),!t)return null;n={x:-a,y:-l};break;case 2:if(t=CZ(r,s,i-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-l};break;case 3:if(t=CZ(r,s,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:l}}function _Z(e){let{slice:t,measured:n,padding:r}=e,{start:o,end:i,innerRadius:a,outerRadius:l}=t,s=l-a-2*r,u=i-o;if(u<Math.PI){let e=(n.height/2+r)/Math.tan(u/2);e>a&&(s=l-e-2*r)}if(s<0||s<n.minReqWidth)return null;const c=wZ((o+i)/2);let d=l-r,p={x:Math.sin(c)*d,y:-Math.cos(c)*d,width:s,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 MZ(e){let{context:t,node:n,bounds:r}=e;let{start:o,end:i}=n.desc.slice;const a=wZ((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 RZ(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function AZ(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 LZ(e){let t,n,{slice:r,direction:o,position:i,padding:a,measured:l,view:s,context:u,store:c}=e,{start:d,end:p,innerRadius:f,offset:h}=r;switch(i){case"into":t="rotate"===o?_Z({slice:r,measured:l,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:o,end:i,innerRadius:a,outerRadius:l}=t;const s=wZ((o+i)/2);let u=kZ({radius:l,size:{width:r.width+2*n+1,height:r.height+2*n},angle:s});return u?(u.baseline="top",IX(u,{x1:0,y1:0,x2:Math.sin(o)*l,y2:-Math.cos(o)*l})||IX(u,{x1:0,y1:0,x2:Math.sin(i)*l,y2:-Math.cos(i)*l})||SX({cx:0,cy:0,r:a},u)?null:(SZ(u,n),u)):null}({slice:r,measured:l,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:f},t="rotate"===o?_Z({slice:n,measured:l,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:o}=e;const{start:i,end:a,outerRadius:l}=t,s=wZ((i+a)/2);let u=kZ({radius:l,size:{width:r.width+2*n+1,height:r.height+2*n},angle:s});return u?(u.baseline="top",SZ(u,n),o.insideLabelBounds.some((e=>RX(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:l,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:l,offset:s}=t,u=l+r,c=a-i;if(c<Math.PI&&(n.height/2+r)/Math.tan(c/2)>u)return null;const d=wZ((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-s.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-l;t<h&&(h=t)}if(Math.sin(m)>.001){let e=p<0?o.x:o.x+o.width,t=Math.abs(e-s.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-l;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:l,padding:a,view:s}):function(e){let{slice:t,measured:n,padding:r,view:o,context:i}=e,{start:a,end:l,outerRadius:s,offset:u}=t;const c=wZ((a+l)/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=s+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:l,padding:a,view:s,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,l=wZ((r+o)/2);switch(Math.floor(l/(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(l)*t,y2:i.y-Math.cos(l)*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(l)*t,y2:i.y-Math.cos(l)*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(l)*t,y2:i.y-Math.cos(l)*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(l)*t,y2:i.y-Math.cos(l)*t,strokeWidth:1}}}}}(t,u,r)),t}function IZ(e){let{context:t,direction:n,measured:r,node:o,placementSettings:i,rect:a,store:l}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:LZ;for(let e=0;e<i.length;e++){let u=i[e],c=s({context:t,slice:o.desc.slice,view:a,direction:n,position:u.position,measured:r,padding:u.padding,store:l});if(c)return{bounds:c,placement:u}}return{bounds:null,placement:null}}function DZ(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 PZ=/\n+|\r+|\r\n/,TZ=/\s/,OZ=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function NZ(e){return"string"==typeof e?-1!==e.search(PZ):-1!==String(e).search(PZ)}function qZ(e){return-1!==e.search(TZ)}function FZ(e){return-1!==e.search(OZ)}function zZ(e,t,n){return Math.max(t,Math.min(n,e))}function jZ(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:o=[NZ],noBreakAllowedIdentifiers:i=[],suppressIdentifier:a=[qZ,NZ,e=>""===e],hyphenationIdentifiers:l=[FZ]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(s);const u=s.length,c=n?e=>e>=0:e=>e<u;let d=n?u:-1;function p(e){const t=zZ(e,0,u-1),n=s[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,s,o,i);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,s))),hyphenation:l.some((e=>e(n,t,s))),width:c.width,height:c.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=zZ(e,0,u-1),c(d)?p(d):{done:!0}},peek:p,length:u}}const BZ="…",$Z=/^\s*\d+(\.\d+)?px\s*$/i;function WZ(e){return"string"===typeof e&&$Z.test(e)}function HZ(e){const t=e["font-size"]||e.fontSize;return WZ(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function VZ(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=HZ(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function GZ(e,t){return{lines:[],line:"",width:0,maxLines:VZ(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function UZ(e){e.lines.push(e.line),e.line="",e.width=0}function YZ(e,t){e.line+=t.value,e.width+=t.width}function KZ(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 XZ(e,t,n){const r=jZ({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?KZ(e,t,r):t,UZ(e),YZ(e,t)):YZ(e,t)}}function QZ(e,t){const n=jZ({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=GZ(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){UZ(r),o=!1;break}1===e.breakOpportunity?UZ(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?KZ(r,e,n):e,UZ(r),YZ(r,e)):YZ(r,e)}return{lines:r.lines,reduced:o}}function JZ(e,t){const n=jZ({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=GZ(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){UZ(r),o=!1;break}1===e.breakOpportunity?UZ(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?UZ(r):e.width>r.maxWidth?XZ(r,e,t):(UZ(r),YZ(r,e)):YZ(r,e)}return{lines:r.lines,reduced:o}}function ZZ(e){return{"break-all":QZ,"break-word":JZ}[e.wordBreak]}function e0(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=ZZ(n);if(!r)return;const o=e(n);if(o.width>n.maxWidth||NZ(n.text)){const i=(HZ(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,l)=>{const s=cW({},t);s.text=a,s._lineBreak=!0,i+=n,e.reduced&&l===e.lines.length-1?s.text+=BZ:delete s.maxWidth,s.dy=isNaN(s.dy)?i:s.dy+i,i+=r,i+=n,o.children.push(s)})),o}(a,n,i,o.height)}}}}function t0(e,t){let{text:n,"font-size":r,"font-family":o,maxWidth:i}=e;if(n="string"==typeof n?n:"".concat(n),void 0===i)return n;let a=t({text:n,fontSize:r,fontFamily:o}).width;if(a<=i)return n;let l=0,s=n.length-1;for(;l<=s;){let e=Math.floor((l+s)/2);a=t({text:n.substr(0,e)+BZ,fontSize:r,fontFamily:o}).width,a<=i?l=e+1:s=e-1}return n.substr(0,s)+BZ}function n0(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 r0={},o0={},i0={fontSize:void 0,fontFamily:void 0};let a0;function l0(e,t,n){const r=e+t+n;return"number"!=typeof o0[r]&&(a0=a0||document.createElement("canvas").getContext("2d"),function(e,t){i0.fontSize===e&&i0.fontFamily===t||(a0.font=e+" "+t,i0.fontSize=e,i0.fontFamily=t)}(t,n),o0[r]=a0.measureText(e).width),o0[r]}function s0(e){return"number"!=typeof r0[e]&&(r0[e]=function(e){if(WZ(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),r0[e]}function u0(e){let{text:t,fontSize:n,fontFamily:r}=e;return{width:l0(t,n,r),height:s0(n)}}function c0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u0;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,l=e.y||0,s=e.dx||0,u={x:0,y:l+((e.dy||0)+n0(e))-.75*o.height,width:i,height:o.height},c=e["text-anchor"]||e.anchor;return u.x="middle"===c?a+s-i/2:"end"===c?a+s-i:a+s,u}function d0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u0;const n=ZZ(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||NZ(e.text))){const i=n(e,(e=>t({text:e,fontFamily:o,fontSize:r}))),a=cW({},e);let l=0,s="";for(let e=0,n=i.lines.length;e<n;e++){let a=i.lines[e];a+=e===n-1&&i.reduced?BZ:"";const u=t({text:a,fontSize:r,fontFamily:o}).width;u>=l&&(l=u,s=a)}a.text=s;const u=c0(a,t);return u.height=HZ(e)*i.lines.length,u}return c0(e,t)}function p0(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function f0(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 h0(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function m0(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 h0({cx:i.x,cy:i.y,r:a})}(e.desc.slice):"circle"===e.type?h0(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var g0={bar:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xZ;const s=cW({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);s.fontSize=parseInt(s.fontSize,10);const u=t.labels.map((e=>cW({},s,t,e))),c=t.labels.map((e=>e.placements.map((n=>cW({},s,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:l}=e;const s={},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,!RX(f,n))continue;let v=uZ(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,cZ(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,s.fontFamily=m.fontFamily,s.fontSize="".concat(m.fontSize,"px"),s.text=p,h=l.measureText(s),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*sZ);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]))),l({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,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:IZ,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:AZ;const u=cW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);u.fontSize=parseInt(u.fontSize,10);const c=t.labels.map((e=>cW({},u,t,e))),d=t.labels.map((e=>e.placements.map((n=>cW({},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:l}=e[i].desc.slice,s=wZ((a+l)/2);switch(Math.floor(s/(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)=>wZ((e.desc.slice.start+e.desc.slice.end)/2)-wZ((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=RZ(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=DZ(u,r,i),b=l({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){MZ({context:h,node:t,bounds:v});if(!hX(EZ(v),o))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,i=s(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]:f0;const l=cW({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},i.label);l.fontSize=parseInt(l.fontSize,10);const s=cW({},l,t),u=t.labels.map((e=>cW({},s,e))),c={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=p0(t,n),{type:l,bounds:p}=m0(t);if(!p)continue;let f,h=0,m=[],g=[],y="circle"===l?2*p.r*.9:p.height;for(h+=s.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"===l?p.cy-.9*p.r:p.y,x+=s.justify*v+s.padding,f=0;f<b;f++){let t,n=u[f];if("circle"===l){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+s.padding,y:x,width:2*n-2*s.padding,height:m[f].height}}else t={x:p.x+s.padding,y:x,width:p.width-2*s.padding,height:m[f].height};x+=m[f].height+s.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!==BZ){const e=t0(h,o.measureText);if(BZ===e)continue;h.ellipsed=e}void 0!==c&&(h.data=c),d.push(h)}}}return d}};const y0={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&g0[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 l=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:l,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},g0[e.strategy.type]))})),t}};const b0={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,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},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function v0(e){let{x:t=0,y:n,item:r,globalMetrics:o,createSymbol:i,direction:a="ltr"}=e,l=r.label.displayObject,s=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(cW({},u,p));return delete f.collider,l.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,l,{textMetrics:s,fontSize:parseInt(l.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[f,l],collider:{type:"rect",x:t,y:n,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function x0(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 w0(e,t){let n,r,o,i,{onScroll:a=()=>{}}=t,l=null,s=0;const u={itemize:t=>{n=function(e,t){let n,r,{resolved:o,dock:i}=e,a=[],l=o.items.items,s=o.symbols.items,u=o.labels.items,c=0,d=0,p=0;for(let e=0;e<l.length;e++){if(!1===l[e].show)continue;const o=void 0!==u[e].text?u[e].text:u[e].data.label||"";n=cW({},u[e],{type:"text",fontSize:"".concat(parseInt(u[e].fontSize,10),"px"),text:o,title:o}),r={symbol:{meta:s[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),c=Math.max(s[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),l=isNaN(n.layout.scrollOffset)?l:n.layout.scrollOffset},getItemsToRender:t=>{o=t.viewRect,s=u.getContentOverflow(o);const a=u.extent();l=Math.max(0,Math.min(l,s)),i=cW({},o);const c="horizontal"===u.orientation()?"x":"y";return i[c]-=l,i["x"===c?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:o,create:i=v0,parallels:a,createSymbol:l}=n;const s=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"===s?r.x+x+r.width-m-(b-t.x):b,item:c[e],globalMetrics:u,direction:s,createSymbol:l});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 l=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]));l=Math.min(l,i)}const s=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(l,s))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return x0(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,x0(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(s,l-e));t!==l&&(l=t,a())},offset:()=>l,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>x0(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 S0(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const E0={up:"▲",right:"▶",down:"▼",left:"◀"};function C0(e,t){let{size:n,isActive:r,direction:o,nav:i,attrs:a}=t,l={},s="";const u=a;i&&i.button&&("function"==typeof i.button.class?l=i.button.class({direction:o}):i.button.class&&(l=i.button.class),"function"==typeof i.button.content&&(s=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(l).length||(c.border="0",c.background="none"),(!r||i&&i.disabled)&&(u.disabled="disabled"),e("button",cW({class:S0(l),style:c},u),[s||e("span",{style:{pointerEvents:"none"}},[E0[o]])])}function k0(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],l="vertical"===n.layout.orientation,s="rtl"===i.direction(),u=i.hasNext(),c=i.hasPrev();if(!c&&!u)return void e.render([]);const d=l?["right","left"]:["down","up"];s&&l&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":l?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:s&&!l?"rtl":"ltr"},[C0(a,{size:32,isActive:u,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),C0(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 _0(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=cW({},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(cW({},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 M0(e,t,n,r){let o,i,a,{itemRenderer:l,navigationRenderer:s,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;l.parallelize(e,c?void 0:n);const r=l.extent()>e?s.extent():0,f=l.spread(),h=r?s.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"===l.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,l.spread())}else{const e=p.height-o.height-(o.height?t.spacing:0),n=p.width;l.parallelize(e,c?void 0:n);const r=l.extent()>e?s.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?s.spread():0,l.spread())}return i=cW({},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:cW({},e,o),content:cW({},e,i),navigation:cW({},e,a),orientation:n,preferredSize:d}}function R0(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?cW({},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:cW(!0,{},b0.title,e.style.title),settings:e.settings.settings.title}),i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:b0.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:cW(!0,{},b0.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),l=cW(!0,{},(e.settings.settings.item||{}).shape);void 0===l.fill&&e.settings.scale&&(l.fill={scale:e.settings.scale});const s=e.resolver.resolve({data:n,defaults:cW(!0,{},b0.item.shape,e.style.item.shape),settings:l}),u=e.resolver.resolve({data:n,defaults:cW(!0,{},{show:b0.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:s,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 A0(e){const{rect:t,settings:n,state:r,itemRenderer:o,navigationRenderer:i,titleRenderer:a}=e,l=n.layout.dock,s="top"===l||"bottom"===l?"horizontal":"vertical",u=M0(t,r.display,s,{itemRenderer:o,navigationRenderer:i,titleRenderer:a});e.renderer.size(u.content);let c=o.getItemsToRender({viewRect:cW({},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 L0={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=A0(this);this.update(e)},this.itemRenderer=w0(this,{onScroll:this.onScroll}),this.navigationRenderer=k0(this),this.titleRenderer=_0(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),R0(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=M0(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(){R0(this)},render(){return A0(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 I0(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 D0(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function P0(e){return D0(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 T0(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 O0(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=function(e){return D0(e.layout.dock,e.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"})}(e.settings);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}),s=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}),u={isVertical:t,nodes:[],title:{anchor:P0(e.settings),textMetrics:l,textBounds:s,requiredWidth:()=>{if(!n.show)return 0;let e=s.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=s.height;return t&&(e+=n.padding),Math.min(e,u.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(...u.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(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(o,e.stgns.maxLengthPx))}}};return u}const N0={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=T0(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=O0(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=O0(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=T0(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,l="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,l="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,l=r?"end":"start");const s={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:l,title:n.title.text};return I0(e,s),s}(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,l=n.isVertical?r.size:n.legend.length(),s=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:l,height:s,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return I0(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 l=0,s=0,u=0,c="alphabetical";return n.isVertical?(s=t.y+t.height*a.pos,c=0===a.pos?"text-before-edge":"text-after-edge"):l=t.x+t.width*a.pos,"right"===n.ticks.anchor?(l=t.x+r.size+r.tick.padding,i.x=t.x+t.width):"left"===n.ticks.anchor?(l=t.x-r.tick.padding,o="end"):"top"===n.ticks.anchor?(s=t.y-r.tick.padding,u-=.25*a.textMetrics.height,o=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(s=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:l,y:s,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 q0={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 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 F0(e,t){let{generatorType:n,item:r,data:o,major:i,minor:a,layerObj:l,stngs:s}=t,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const c={type:"path",points:e,generatorType:n,major:i,minor:a,layerObj:l,stngs:s,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 z0(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:l,height:s}=r,u=o.resolve({data:t,defaults:q0.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?s:l,minor:"vertical"===n.orientation?l:s}}),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=hW({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:q0.layers.curve,show:q0.layers.show},settings:{curve:m.curve,show:m.show}}),lines:o.resolve({data:h,defaults:cW({},q0.layers.line,i.line),settings:m.line}),areas:o.resolve({data:h,defaults:cW({},q0.layers.area,i.area),settings:m.area})}}(e),a=[];return t.forEach(((t,l)=>{const s=r.items[l];if(!1===s.show)return;s.datum=s.data,s.data=[],s.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),s.data.push(d.data)}c.push(d)}const f=u.sort(((e,t)=>e-t))[Math.floor((u.length-1)/2)];a.push({layerObj:s,lineObj:o.items[l],areaObj:i.items[l],median:f,points:c,consumableData:t.consumableData})})),a}const j0={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=z0({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=[],l=i.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:s,areaObj:u,points:c}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===i.orientation){const e=cW(!0,{},p);p=cW(!0,{},d),d=cW(!0,{},e)}l.area&&!1!==u.show&&a.push(F0(c,{data:e.consumableData,item:u,generatorType:"area",major:p,minor:d,layerObj:s,stngs:i})),t&&!1!==t.show&&(a.push(F0(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:s,stngs:i},"none")),!o&&l.area&&!1!==u.show&&!1!==t.showMinor0&&a.push(F0(c,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:s,stngs:i},"none")))})),a}(i,{width:n,height:r,missingMinor0:o,stngs:this.stngs})}};function B0(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 $0(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function W0(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 H0={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=B0(this,e,!1);LX({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})))}(this.settings),this.state.start=B0(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=B0(this,e),function(e){if(e.state.active){const t=$0(e,e.state.start),n=$0(e,e.state.end),r=e.chart.shapesAt(W0(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([cW({type:"rect"},W0(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 V0(e,t,n){let{renderer:r,style:o,props:i,h:a}=n;const l=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),s=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:S0(cW({"pic-tooltip":!0},l.tooltip)),style:cW({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:o.content,class:S0(cW({"pic-tooltip-content":!0},l.content))},s),a("div",{class:S0(cW({"pic-tooltip-arrow":!0},l.arrow)),style:cW({},o.arrow,o["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(u),r.element().children[0]}function G0(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}(),l=function(){},s=()=>{r=null,o=null,i=!1,a.set("fulfilled")};return l.invoke=function(e){let l=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),l>0&&(o&&clearTimeout(o),o=setTimeout(s,l+Math.max(u,0)))},l.clear=()=>{i?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),o&&clearTimeout(o),r=null,o=null,i=!1},l.on=(e,t)=>{a.on(e,t)},l.destroy=()=>{l.clear(),a.destroy()},l}function U0(){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 Y0(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 K0(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 X0(e,t,n,r,o,i){const a=t+i.x,l=n+i.y,s=o;return!(a<0||l<0)&&!(a+r>e.width||l+s>e.height)}function Q0(e){let{area:t,vx:n,vy:r,width:o,height:i,offset:a}=e;const l=n+a.x,s=r+a.y,u=o,c=i;let d=l<0?-l:0,p=s<0?-s:0;return d+=l+u>t.width?-(l+u-t.width):0,p+=s+c>t.height?-(s+c-t.height):0,{x:d,y:p}}function J0(e){let{options:t,pointer:n,width:r,height:o,dockOrder:i,x:a,y:l}=e;const{targetBounds:s}=n,u=U0(t.offset),c=u[t.dock];if(c)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(l,"px"),transform:c},computedArrowStyle:K0(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?s.width:window.innerWidth,height:"target"===t.area?s.height:window.innerHeight},p=Y0(r,o,t.offset),f=[],h="target"===t.area?a:s.left+a,m="target"===t.area?l:s.top+l;for(let e=0;e<i.length;e+=1){const n=i[e],s=Q0({area:d,vx:h,vy:m,width:r,height:o,offset:p[n]}),c={left:"".concat(a,"px"),top:"".concat(l,"px"),transform:u[n]},g=K0(t.offset)[n];0!==s.x&&(c.width="".concat(r-20-Math.abs(s.x),"px"),"top"!==n&&"bottom"!==n||(c.left="".concat(a+s.x,"px"),g.left="calc(50% ".concat(s.x>0?"-":"+"," ").concat(Math.abs(s.x),"px)")));const y={computedTooltipStyle:c,computedArrowStyle:g,dock:n,rect:{width:r,height:o}};if(0===s.x&&0===s.y)return y;y.offset=s,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function Z0(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 cW({scaleRatio:o.scaleRatio},o.computedInner)}const e1={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:o,height:i,options:a}=e;const{targetBounds:l}=r,{x:s,y:u,width:c,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:s,y:u+d/2},right:{x:s+c,y:u+d/2},top:{x:s+c/2,y:u},bottom:{x:s+c/2,y:u+d},inside:{x:s+c/2,y:u+d/2}},f=U0(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:K0(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?l.width:window.innerWidth,height:"target"===a.area?l.height:window.innerHeight},g=Y0(o,i,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(X0(m,"target"===a.area?p[t].x:l.left+p[t].x,"target"===a.area?p[t].y:l.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:K0(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:o,area:i,width:a,height:l}=e;const s="top",u="target"===t.area?n[s].x:o.left+n[s].x,c=("target"===t.area?n[s].y:(o.top,n[s].y),r[s]),d=u+c.x,p=(c.y,a);let f=n.top.x;return d<0&&d+p>i.width||(d<0?f-=d:d+p>i.width&&(f-=d+p-i.width)),f}({options:a,docks:p,dockOffsets:g,targetBounds:l,area:m,width:o,height:i});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:f.top},computedArrowStyle:K0(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 J0({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 l=i[0],{dx:s,dy:u}=n,c=a.getComponentBoundsFromNode(l),d=s+c.x+c.width/2,p=u+c.y+c.height/2,{start:f,end:h,outerRadius:m}=l.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"]),J0({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 t1(e,t){let{width:n,height:r}=e,{chart:o,state:i,props:a}=t;const l={resources:{formatter:o.formatter,scale:o.scale,component:o.component,getComponentBoundsFromNode:e=>Z0(e,i.pointer,o),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Z0(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},s=typeof a.placement;if("object"===s&&"function"==typeof a.placement.fn)return a.placement.fn(l);let u={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===s&&(u=cW(u,a.placement(l))),"object"===s&&e1[a.placement.type]?u=cW(u,a.placement):"string"===s&&e1[a.placement]&&(u=cW(u,{type:a.placement})),l.options=u;const c=e1[u.type](l);let{x:d,y:p,width:f,height:h}=l.resources.getComponentBoundsFromNode(l.nodes[0]);return d+=l.pointer.dx,f+=d,p+=l.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 n1;function r1(){n1=null}const o1={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 i1={require:["chart","renderer"],defaultSettings:{settings:o1,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(),l=r.targetElement.getBoundingClientRect(),s=o,u=i,c=a.left-l.left,d=a.top-l.top,p=o-a.left,f=i-a.top;return o-=l.left,i-=l.top,{x:o,y:i,dx:c,dy:d,cx:p,cy:f,clientX:s,clientY:u,targetBounds:l,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=G0({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){n1&&n1!==e&&n1()}(t),n1=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,cW({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,cW({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),n1===t&&(n1=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(),r1()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),r1()},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},l=[];return e.forEach((e=>{if("function"==typeof o.extract){const t=cW({node:e},a);l.push(o.extract(t))}})),l}(e,this),n=t1(V0(t,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=V0(t,n,this)}};const a1={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 l1={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},s1=/([astvzqmhlc])([^astvzqmhlc]*)/gi,u1=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function c1(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(s1,((e,n,r)=>{const o=function(e){const t=e.match(u1);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<l1[i])return"";for(t.push([a,...o.splice(0,l1[i])]);o.length>=l1[i]&&o.length&&l1[i];)t.push([a,...o.splice(0,l1[i])]);return""})),t}const d1=2*Math.PI;function p1(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function f1(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 h1(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=p1(e,t),l=p1(t,n),s=p1(n,r),u={x:f1(.5,e.x,t.x,n.x,r.x),y:f1(.5,e.y,t.y,n.y,r.y)},c=p1(a,l),d=p1(l,s);return h1(e,a,c,u,o,i-1),h1(u,d,s,r,o,i-1),o}function m1(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 h1(e,r,o,n)}function g1(e,t,n){const r=[],o=!!e[4],i=!!e[5],a=e[3];let l,s,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:l,cy:s,rx:f,ry:h,sweepAngle:u,startAngle:c}=function(e,t,n,r,o,i,a,l,s){let u,c,d,p,f,h;const m=VK(n%360),g=Math.cos(m),y=Math.sin(m),b=(l-i)/2,v=(s-a)/2,x=g*b+y*v,w=g*v-y*b;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,E=t*x,C=S**2+E**2,k=(e*t)**2-C;let _=Math.sqrt(Math.max(k/C,0));r===o&&(_=-_);const M=_*(S/t),R=_*(-E/e);p=g*M-y*R+(l+i)/2,f=y*M+g*R+(s+a)/2;const A=(x-M)/e,L=(w-R)/t,I=(-x-M)/e,D=(-w-R)/t;return u=Math.atan2(L,A),u+=u<0?d1:0,c=Math.atan2(D,I),c+=c<0?d1:0,d=c-u,!o&&u<c?d-=d1:o&&c<u&&(d+=d1),d%=d1,{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)%d1,n=Math.cos(t),o=Math.sin(t);r.push({x:l+n*f+-o*n,y:s+o*h+n*o})}return r}function y1(e){const t=c1(e),n=[],r=[];let o=0,i=0,a=null,l=null,s=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,l=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(s=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(...g1(c,o,i)),o+=c[6],i+=c[7];break;case"A":r.push(...g1(c,o,i)),o=c[6],i=c[7];break;case"c":r.push(...h1({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,l=c[4]+i,o+=c[5],i+=c[6];break;case"C":r.push(...h1({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],l=c[4],o=c[5],i=c[6];break;case"s":null!==a&&null!==a||(a=o,l=i),r.push(...h1({x:o,y:i},{x:2*o-a,y:2*i-l},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),a=c[1]+o,l=c[2]+i,o+=c[3],i+=c[4];break;case"S":null!==a&&null!==a||(a=o,l=i),r.push(...h1({x:o,y:i},{x:2*o-a,y:2*i-l},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),a=c[1],l=c[2],o=c[3],i=c[4];break;case"Q":r.push(...m1({x:o,y:i},{x:c[1],y:c[2]},{x:c[3],y:c[4]})),s=c[1],u=c[2],o=c[3],i=c[4];break;case"q":r.push(...m1({x:o,y:i},{x:c[1]+o,y:c[2]+i},{x:c[3]+o,y:c[4]+i})),s=c[1]+o,u=c[2]+i,o+=c[3],i+=c[4];break;case"T":null!==s&&null!==s||(s=o,u=i),s=2*o-s,u=2*i-u,r.push(...m1({x:o,y:i},{x:s,y:u},{x:c[1],y:c[2]})),o=c[1],i=c[2];break;case"t":null!==s&&null!==s||(s=o,u=i),s=2*o-s,u=2*i-u,r.push(...m1({x:o,y:i},{x:s,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 b1={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=>{y1(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 v1=[function(e){e.component("box",LQ),e.component("box-marker",LQ)},function(e){e.component("point",qQ),e.component("point-marker",qQ)},function(e){e.component("pie",BQ)},function(e){e.component("grid-line",GQ)},function(e){e.component("ref-line",tJ)},function(e){e.component("axis",EJ)},function(e){e.component("container",CJ)},function(e){e.component("text",MJ)},function(e){e.component("scrollbar",LJ)},function(e){e.component("brush-range",VJ),e.component("brush-area-dir",KJ)},function(e){e.component("range",ZJ)},function(e){e.component("brush-lasso",iZ)},function(e){e.component("labels",y0)},function(e){e.component("legend-cat",L0)},function(e){e.component("legend-seq",N0)},function(e){e.component("line",j0)},function(e){e.component("brush-area",H0)},function(e){e.component("tooltip",i1)},function(e){e.component("debug-collider",a1)},function(e){e.component("debug-path-to-points",b1)}];class x1{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 w1{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 LX(this,e)}intersectsLine(e){return IX(this,SW(e))}intersectsRect(e){return RX(this,wW(e))}intersectsCircle(e){return SX(e,this)}intersectsPolygon(e){return MX(e,this)}intersectsGeoPolygon(e){return zX(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 S1{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 wX(this,e)}intersectsLine(e){return EX(this,SW(e))}intersectsRect(e){return SX(this,wW(e))}intersectsCircle(e){return n=e,!yX(t=this)&&!yX(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return CX(this,e)}intersectsGeoPolygon(e){return NX(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class E1{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 EX({cx:e.x,cy:e.y,r:this.tolerance},this)}return PX(this,e)}intersectsLine(e){return DX(this,SW(e))}intersectsRect(e){return IX(wW(e),this)}intersectsCircle(e){return EX(e,this)}intersectsPolygon(e){return _X(e,this)}intersectsGeoPolygon(e){return FX(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class C1{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 kX(this,e)}intersectsCircle(e){return CX(e,this)}intersectsLine(e){return _X(this,SW(e))}intersectsRect(e){return MX(this,wW(e))}intersectsPolygon(e){return TX(this,e)}intersectsGeoPolygon(e){return OX(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 k1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new C1(...t)}function _1(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function M1(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 R1{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++)M1(this.vertices[e]),this.vertices[e].length>2&&_1(this.vertices[e]),this.polygons[e]=k1({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 qX(this,e)}intersectsCircle(e){return NX(e,this)}intersectsLine(e){return FX(this,SW(e))}intersectsRect(e){return zX(this,wW(e))}intersectsPolygon(e){return OX(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!RX(n,r)&&(AX(r,n)?xX(t,e):xX(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 A1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new R1(...t)}class L1{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=>PX(t,e)))}intersectsCircle(e){return this.segments.some((t=>EX(e,t)))}intersectsLine(e){const t=SW(e);return this.segments.some((e=>DX(e,t)))}intersectsRect(e){const t=wW(e);return this.segments.some((e=>IX(t,e)))}intersectsPolygon(e){return this.segments.some((t=>_X(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>FX(e,t)))}points(){return this._points}}const I1=MH();function D1(e,t){return I1.get(e)(t)}I1.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new w1(...t)})),I1.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new S1(...t)})),I1.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new E1(...t)})),I1.add("polygon",k1),I1.add("geopolygon",A1),I1.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new L1(...t)}));class P1{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=D1(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 T1{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new T1).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 T1&&(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],l=this._elements[2][1],s=this._elements[2][2],u=0;return u=e*o*s+t*i*a+n*r*l-n*o*a-t*r*s-e*i*l,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],l=this._elements[2][0],s=this._elements[2][1],u=this._elements[2][2];return this._elements=[[i*u-a*s,r*s-n*u,n*a-r*i],[a*l-o*u,t*u-r*l,r*o-t*a],[o*s-i*l,l*n-t*s,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,l=[];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];l.push({x:i[0],y:i[1]})}return l}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 O1=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function N1(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 q1(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function F1(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function z1(e,t){t.args.length>=6&&e.transform(...t.args)}function j1(e,t){const n=function(e){let t,n=[];for(;null!==(t=O1.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?N1(t,r):"scale"===r.cmd?q1(t,r):"matrix"===r.cmd?z1(t,r):"translate"===r.cmd&&F1(t,r)}const B1={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},$1={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 W1(e,t){if(!t||!t.length||!e||"function"!=typeof $1[e.type])return[];switch(e.type){case"type":case"tag":return $1[e.type](e.value,t);case"attr":return $1[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return $1[e.type](t);default:return[]}}var H1={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(B1[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(B1).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(),l=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=i.slice(),void(l=!1);n=W1(e,n),l=!0})),l&&t.push(n);const s=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(s)}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 V1(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=wW(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=SW(o),i.type=r;else if("polygon"===r||"polyline"===r){i={type:"path",d:WK(o,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<o.length;t++)e+=WK(o[t],!0);i={type:"path",d:e}}return i}class G1{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=>V1(e,t,n)))}:V1(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new G1(e))),this._parent=()=>e.parent?new G1(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 U1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new G1(...t)}class Y1{constructor(e){this._node=U1(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 K1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Y1(...t)}function X1(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=K1(n);const e=n.parent;e&&"stage"!==e.type&&X1(e,t.parent)}}function Q1(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)))?A1(n):k1(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=K1(o);return X1(o,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=K1(e);return X1(e,t),t}return null}(e,t,r)}function J1(e,t,n,r){const o=e.length;for(let i=0;i<o;i++){const o=e[i],a=Q1(o,t,r);a&&n.push(a),!o.children||a||o.collider||J1(o.children,t,n,r)}}function Z1(e,t,n){const r=e.length;for(let o=0;o<r;o++){const r=e[o];if(null!==Q1(r,t,n))return!0;if(r.children&&!r.collider)return Z1(r.children,t,n)}return!1}function e2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(EW(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=xW(e).map((e=>KK(e,t))),["intersectsRect",n];case"line":return n=vW(e).map((e=>KK(e,t))),["intersectsLine",n];case"point":return n=KK(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>KK(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>KK(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function t2(e,t){const[n,r]=e2(t,e.dpi),o=[];return n&&(J1([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 n2(e,t){const[n,r]=e2(t,e.dpi);return Z1([e],n,r)}class r2 extends x1{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,l;a=this.attrs,l=e,Object.keys($K).forEach((e=>{const t=l[e];void 0!==t&&(a[$K[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=cW(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof o&&(this.strokeReference=o),"string"==typeof i&&(this.fillReference=i)}findShapes(e){return H1.find(e,this).map((e=>U1(e)))}getItemsFrom(e){return t2(this,e)}containsPoint(e){return n2(this,e)}intersectsLine(e){return n2(this,e)}intersectsRect(e){return n2(this,e)}intersectsCircle(e){return n2(this,e)}intersectsPolygon(e){return n2(this,e)}intersectsGeoPolygon(e){return n2(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new T1;void 0!==this.attrs.transform&&j1(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new T1;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 P1(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=D1("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=D1(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class o2 extends x1{addChild(e){if(!(e&&e instanceof x1))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 i2=o2.prototype;class a2 extends r2{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=cW({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:l,y:s}=o,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),c=isNaN(n.height)?s:Math.max(s,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]=cW({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=i2.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=cW({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=i2.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=cW({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(i2.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=cW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(i2.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=cW(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function l2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new a2(...t)}class s2 extends a2{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const u2=o2.prototype,c2=["x1","x2","y1","y2","id","offset","style"];class d2 extends r2{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=c2.length;r!==o;r++)n=c2[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return u2.addChild.call(this,e)}addChildren(e){return u2.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 u2.removeChild.call(this,e),this}removeChildren(e){return u2.removeChildren.call(this,e),this}}function p2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new d2(...t)}const f2=o2.prototype,h2=["patternUnits","x","y","width","height","id"];class m2 extends r2{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=h2.length;r!==o;r++)n=h2[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return f2.addChild.call(this,e)}addChildren(e){return f2.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 f2.removeChild.call(this,e),this}removeChildren(e){return f2.removeChildren.call(this,e),this}}class g2 extends r2{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:l}=e,s=cW({type:"rect",x:t,y:n,width:r,height:o},l);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=s,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=xW(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,o,i,a]=bW(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 y2 extends r2{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=cW({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 l=2*r,s=2*o,u=[{x:i,y:a},{x:i+l,y:a},{x:i+l,y:a+s},{x:i,y:a+s}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const[t,n,r,o]=bW(u);l=r-t,s=o-n,this.__bounds[e]=[{x:t,y:n},{x:t+l,y:n},{x:t+l,y:n+s},{x:t,y:n+s}]}else this.__bounds[e]=u;return this.__bounds[e]}}class b2 extends r2{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=cW(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=vW(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,o,i]=bW(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 v2=Math.PI/2;function x2(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function w2(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const S2={step:function(e){return new wH(e,.5)},stepAfter:function(e){return new wH(e,1)},stepBefore:function(e){return new wH(e,0)},linear:JW,basis:function(e){return new aH(e)},cardinal:uH.tension(0),catmullRom:dH,monotonex:function(e){return new gH(e)},monotoney:function(e){return new yH(e)},natural:function(e){return new vH(e)}};function E2(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 C2 extends r2{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=XW();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,l=tH(),s=i.coordinates?i.coordinates.defined:null;l[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(S2["monotone"===r.curve?"monotone".concat(t.p):r.curve]),s?l.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):l.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const u=i.connect?o.filter(l.defined()):o,c=("area"===a?l:l[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=y1(this.attrs.d),this.segments.length>1&&this.segments.every((e=>E2(e))))return void(this.collider=cW({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(E2(t))this.collider=cW({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],l=e[n],s=e[n+1],u=x2(l,a),c=x2(l,s),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=x2(a,l);r.push(w2(a,e-v2,t)),o.unshift(w2(a,e+v2,t))}const g=m?f:h,y=m?h:f;if(r.push(w2(l,g,t)),o.unshift(w2(l,y,t)),n===i-1){const e=x2(s,l);r.push(w2(s,e+v2,t)),o.unshift(w2(s,e-v2,t))}}return{type:"polygon",vertices:[...r,...o]}}(t,n,e.collider)}else this.collider=cW({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:y1(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]=bW(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 k2(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}let _2=class extends r2{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:l,collider:s,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!==l&&(this.attrs.title=String(l)),"object"==typeof u?this._textBoundsFn=()=>u:"function"==typeof i&&(this._textBoundsFn=i),"string"==typeof c&&(this.ellipsed=c),this.collider=cW({type:k2(this)?"bounds":null},s),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=xW(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[o,i,a,l]=bW(r);return this.__boundingRect[t]={x:o,y:i,width:a-o,height:l-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 M2=MH();function R2(e,t){return M2.get(e)(t)}M2.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new g2(...t)})),M2.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new y2(...t)})),M2.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _2(...t)})),M2.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new b2(...t)})),M2.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new C2(...t)})),M2.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new s2(...t)})),M2.add("container",l2),M2.add("defs",l2),M2.add("linearGradient",p2),M2.add("radialGradient",p2),M2.add("stop",p2),M2.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new m2(...t)}));const A2=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 cW(i,r),t.push(i),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function L2(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function I2(e,t,n){e.node=n[t],e.index=t}function D2(e,t,n,r){let o=!1;const i={siblings:e,node:null,index:0};for(let a=0,l=e.length;a<l;a++){if(I2(i,a,e),L2(i,r.create),o="function"==typeof i.node.disabled?i.node.disabled():i.node.disabled,o)continue;i.node=A2.save(i.node);const l=R2(i.node.type,i.node);l&&(i.node.transform&&(n.save(),j1(i.node.transform,n)),n.isIdentity()||(l.modelViewMatrix=n.clone()),t.addChild(l),i.node.children&&D2(i.node.children,l,n,r),i.node.transform&&n.restore()),A2.restore()}}function P2(e){let{items:t,stage:n,dpi:r,on:o={}}=e;return n||(n=R2("stage",r)),D2(t,n,new T1,o),n}function T2(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{const r=GK(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 O2(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 N2(){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 l={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 l.x=isNaN(e)?l.x:e,l.y=isNaN(t)?l.y:t,l.width=isNaN(n)?l.width:n,l.height=isNaN(r)?l.height:r,void 0!==o&&(l.scaleRatio.x=isNaN(o.x)?l.scaleRatio.x:o.x,l.scaleRatio.y=isNaN(o.y)?l.scaleRatio.y:o.y),void 0!==i&&(l.margin.left=isNaN(i.left)?0:i.left,l.margin.top=isNaN(i.top)?0:i.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(l.edgeBleed[e]=a[e],l.edgeBleed.bool=!0)})),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function q2(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:u0,textBounds:d0,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function F2(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const z2=200,j2=200;class B2{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*z2,height:n.computedPhysical.height+2*j2},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 $2=MH();function W2(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function H2(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function V2(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function G2(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],l=i[1],s=i[2];if(a in t.attrs&&!(l in r)&&e[l]!==t.attrs[a]){const n=s?s(t.attrs[a]):t.attrs[a];"function"==typeof e[l]?e[l](n):e[l]=n}}for(let t=0,n=o.length;t<n;t++){const n=o[t];e[n]=r[n]}}function U2(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=T2(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=T2(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))),G2(t,i,n,a),i.modelViewMatrix&&V2(i.modelViewMatrix.elements,t),$2.has(i.type)&&$2.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&&U2(i.children,t,n,r),t.restore()}}function Y2(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P2;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let o,i=!1,a=N2();const l=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",W2]];let s;const u=q2();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 B2(e)),n.appendChild(e),e),u.getScene=r=>{const o=H2(t&&t.getContext()||e.getContext("2d")),i=a.scaleRatio.x,l=a.scaleRatio.y,s={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*o*i,", ").concat(a.edgeBleed.top*o*l,")"):""};return 1===o&&1===i&&1===l||(s.transform+="scale(".concat(o*i,", ").concat(o*l,")")),n({items:[s],dpi:o,on:{create:[e0(u.measureText),F2(u)]}})},u.render=n=>{if(!e)return!1;s||(s=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]||O2(e,t,n),r[o]):O2(e,t,n)},clear(){r={}}}}(e.ownerDocument));const c=t&&t.getContext()||e.getContext("2d"),d=H2(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);s.clear();const m=i||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||u.clear(),U2(f.children,c,l,{patterns:s})),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=N2(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 K2(e,t){$2.add(e,t)}function X2(e,t){return Math.max(0,Math.min(e,t))}const Q2=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),J2=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Z2=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function e5(e){return Q2.test(e)}function t5(e){return J2.test(e)||Z2.test(e)}function n5(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],e5(n))return"ltr";if(t5(n))return"rtl"}return"ltr"}const r5={start:"end",end:"start",center:"center",middle:"middle"};function o5(e,t){return"rtl"===t?r5[e]:e}function i5(e,t){const n=[];let r;const o=[],i=[],a=[];let l,s;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),l=e.map(u),s=t.map(u);for(let e=0,r=t.length;e<r;e++){-1===l.indexOf(t[e].id)?n.push(t[e]):i.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===s.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=i5([],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=i5(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 a5(e,t,n){for(let r=0,o=e.length;r<o;r++)e[r].object=n(e[r].content.type,t)}function l5(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 s5(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&&(a5(o.diff.added,o.object,t),l5(o.diff.removed,r),s5(o.diff.items,t,n,r)))}function u5(e,t,n,r,o,i){const a=i5(e,t);return a5(a.added,n,r),l5(a.removed,i),s5(a.items,r,o,i),a.items}K2("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=X2(r/2,i>0?i:a),a=X2(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()})),K2("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()})),K2("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()})),K2("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)})),K2("text",(function(e,t){let{g:n,ellipsed:r,doStroke:o}=t;const i=r||t0(e,u0);e["font-weight"]?n.font="".concat(e["font-weight"]," ").concat(e["font-size"]," ").concat(e["font-family"]):n.font="".concat(e["font-size"]," ").concat(e["font-family"]);const a=n5(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const l=o5("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);l&&n.textAlign!==l&&(n.textAlign=l);const s=n0(e);n.fillText(i,e.x+e.dx,e.y+e.dy+s),o&&n.strokeText(i,e.x+e.dx,e.y+e.dy+s)}));const c5="http://www.w3.org/2000/svg",d5=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(c5,"container"===e?"g":e);return t.appendChild(n),n},p5=e=>{e.parentNode&&e.parentNode.removeChild(e)},f5=(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||t0(t.attrs,u0);const n=n5(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",o5(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(c5,"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?n0(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 h5{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 m5(){return new h5(u5,d5,f5,p5)}function g5(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 y5(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c5,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P2;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:m5)();let r,o,i,a=!1,l=N2();const s={transform:void 0},u=q2(),c={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g5,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 l="";const s=i[a],u=t(s),c="picasso-pattern-".concat(r,"-").concat(u);if("undefined"!=typeof window&&(l=window.location.href.split("#")[0]),!n[u]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:s.width,height:s.height,type:"pattern",id:c,children:[],fill:s.fill};s.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[u]=!0}o.node["".concat(a,"Reference")]="url('".concat(l,"#").concat(c,"')")}))},clear(){n={}}};return o}(c.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g5,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]:"",l=t(o[i]),s="picasso-gradient-".concat(r,"-").concat(l);if(!n[l]){let{orientation:t,degree:r,stops:a=[]}=o[i],u={};void 0===r&&(r=90),"radial"===t?u.type="radialGradient":(u=GK(r),["x1","x2","y1","y2"].forEach((e=>{e in o[i]&&(u[e]=o[i][e])})),u.type="linearGradient"),u.id=s,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[l]=s}return"url('".concat(a,"#").concat(s,"')")},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(s).forEach((t=>{void 0!==e[t]&&(s[t]=e[t])})),s),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=l.scaleRatio.x,r=l.scaleRatio.y,o={type:"container",children:Array.isArray(e)?[...e,c]:e,transform:l.edgeBleed.bool?"translate(".concat(l.edgeBleed.left*n,", ").concat(l.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,e0(u.measureText),F2(u)]}})},u.render=e=>{if(!r)return!1;const t="function"==typeof s.transform&&s.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:i,horizontalMoving:a,verticalMoving:l}=t;return o.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(i,", ").concat(a,", ").concat(l,")"),!0}o.style.transform="",a&&(r.style.left="".concat(l.computedPhysical.x,"px"),r.style.top="".concat(l.computedPhysical.y,"px"),r.setAttribute("width",l.computedPhysical.width),r.setAttribute("height",l.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=N2(e);JSON.stringify(l)!==JSON.stringify(t)&&(a=!0,l=t)}return l},u}var b5,v5,x5,w5,S5,E5,C5,k5={},_5=[],M5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function R5(e,t){for(var n in t)e[n]=t[n];return e}function A5(e){var t=e.parentNode;t&&t.removeChild(e)}function L5(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?b5.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 I5(e,a,r,o,null)}function I5(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?++x5:o};return null==o&&null!=v5.vnode&&v5.vnode(i),i}function D5(e){return e.children}function P5(e,t){this.props=e,this.context=t}function T5(e,t){if(null==t)return e.__?T5(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?T5(e):null}function O5(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 O5(e)}}function N5(e){(!e.__d&&(e.__d=!0)&&w5.push(e)&&!q5.__r++||S5!==v5.debounceRendering)&&((S5=v5.debounceRendering)||E5)(q5)}function q5(){var e,t,n,r,o,i,a,l;for(w5.sort(C5);e=w5.shift();)e.__d&&(t=w5.length,r=void 0,o=void 0,a=(i=(n=e).__v).__e,(l=n.__P)&&(r=[],(o=R5({},i)).__v=i.__v+1,G5(l,i,o,n.__n,void 0!==l.ownerSVGElement,null!=i.__h?[a]:null,r,null==a?T5(i):a,i.__h),U5(r,i),i.__e!=a&&O5(i)),w5.length>t&&w5.sort(C5));q5.__r=0}function F5(e,t,n,r,o,i,a,l,s,u){var c,d,p,f,h,m,g,y=r&&r.__k||_5,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?I5(null,f,null,null,f):Array.isArray(f)?I5(D5,{children:f},null,null,null):f.__b>0?I5(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}G5(e,f,p=p||k5,o,i,a,l,s,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=s=z5(f,s,e):s=j5(e,f,p,y,h,s),"function"==typeof n.type&&(n.__d=s)):s&&p.__e==s&&s.parentNode!=e&&(s=T5(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=B5(r).nextSibling),X5(y[c],y[c]));if(g)for(c=0;c<g.length;c++)K5(g[c],g[++c],g[++c])}function z5(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?z5(r,t,n):j5(n,r,r,o,r.__e,t));return t}function j5(e,t,n,r,o,i){var a,l,s;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(l=i,s=0;(l=l.nextSibling)&&s<r.length;s+=1)if(l==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function B5(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=B5(n)))return r;return null}function $5(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||M5.test(t)?n:n+"px"}function W5(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||$5(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||$5(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?V5:H5,i):e.removeEventListener(t,i?V5:H5,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 H5(e){return this.l[e.type+!1](v5.event?v5.event(e):e)}function V5(e){return this.l[e.type+!0](v5.event?v5.event(e):e)}function G5(e,t,n,r,o,i,a,l,s){var u,c,d,p,f,h,m,g,y,b,v,x,w,S,E,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(s=n.__h,l=t.__e=n.__e,t.__h=null,i=[l]),(u=v5.__b)&&u(t);try{e:if("function"==typeof C){if(g=t.props,y=(u=C.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in C&&C.prototype.render?t.__c=c=new C(g,b):(t.__c=c=new P5(g,b),c.constructor=C,c.render=Q5),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!=C.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=R5({},c.__s)),R5(c.__s,C.getDerivedStateFromProps(g,c.__s))),p=c.props,f=c.state,c.__v=t,d)null==C.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==C.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=v5.__r,w=0,"prototype"in C&&C.prototype.render){for(c.state=c.__s,c.__d=!1,x&&x(t),u=c.render(c.props,c.state,c.context),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);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&&++w<25);c.state=c.__s,null!=c.getChildContext&&(r=R5(R5({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(p,f)),E=null!=u&&u.type===D5&&null==u.key?u.props.children:u,F5(e,Array.isArray(E)?E:[E],t,n,r,o,i,a,l,s),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=Y5(n.__e,t,n,r,o,i,a,s);(u=v5.diffed)&&u(t)}catch(e){t.__v=null,(s||null!=i)&&(t.__e=l,t.__h=!!s,i[i.indexOf(l)]=null),v5.__e(e,t,n)}}function U5(e,t){v5.__c&&v5.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){v5.__e(e,t.__v)}}))}function Y5(e,t,n,r,o,i,a,l){var s,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((s=i[h])&&"setAttribute"in s==!!f&&(f?s.localName===f:3===s.nodeType)){e=s,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,l=!1}if(null===f)d===p||l&&e.data===p||(e.data=p);else{if(i=i&&b5.call(e.childNodes),u=(d=n.props||k5).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!l){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||W5(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]||W5(e,i,t[i],n[i],r)}(e,p,d,o,l),c)t.__k=[];else if(h=t.props.children,F5(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==f,i,a,i?i[0]:n.__k&&T5(n,0),l),null!=i)for(h=i.length;h--;)null!=i[h]&&A5(i[h]);l||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===f&&!h||"option"===f&&h!==d.value)&&W5(e,"value",h,d.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&W5(e,"checked",h,d.checked,!1))}return e}function K5(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){v5.__e(e,n)}}function X5(e,t,n){var r,o;if(v5.unmount&&v5.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||K5(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){v5.__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]&&X5(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||A5(e.__e),e.__=e.__e=e.__d=void 0}function Q5(e,t,n){return this.constructor(e,n)}function J5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,o=N2();const i={transform:void 0},a=q2();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:l}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(o,", ").concat(i,", ").concat(a,", ").concat(l,")"),!0}let a;return n.style.transform="",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)?L5("div",null,e):e,r=function(e,t,n){var r,o,i;v5.__&&v5.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],G5(t,e=(!r&&n||t).__k=L5(D5,null,[e]),o||k5,k5,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?b5.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),U5(i,e)}(a,n,r),!0},a.renderArgs=[L5],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=N2(e)),o),a}b5=_5.slice,v5={__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}},x5=0,P5.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=R5({},this.state),"function"==typeof e&&(e=e(R5({},n),this.props)),e&&R5(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),N5(this))},P5.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N5(this))},P5.prototype.render=D5,w5=[],E5="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C5=function(e,t){return e.__v.__b-t.__v.__b},q5.__r=0;var Z5=[function(e){e.renderer("svg",y5)},function(e){e.renderer("canvas",Y2)},function(e){e.renderer("dom",J5)}];const e3={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const t3=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=e3.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[e3.OFF]:()=>{},[e3.ERROR]:function(){return t.error(...arguments)},[e3.WARN]:function(){return t.warn(...arguments)},[e3.INFO]:function(){return t.info(...arguments)},[e3.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[e3.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(e3.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(e3.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(e3.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(e3.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:e3}}(t.logger),o={component:MH(n.component,"component",r),data:MH(n.data,"data",r),formatter:MH(n.formatter,"formatter",r),interaction:MH(n.interaction,"interaction",r),renderer:hQ(n.renderer),scale:MH(n.scale,"scale",r),symbol:MH(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:cW({},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=>fQ(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=dW,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:mQ,data:xQ,formatter:QG,interaction:wQ,renderer:hQ(),scale:JY,symbol:oX});v1.forEach(t3.use),Z5.forEach(t3.use),[].forEach(t3.use);const n3=null==t3?void 0:t3();null==n3||n3.use(tW),null==n3||n3.renderer.prio(["canvas"]);const r3=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,o3=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>Ms.jsxs("span",{children:[Ms.jsx($z,{...fB({href:e,text:t,interactions:r,color:o}),children:null!=n&&n.maskedValue?null==n?void 0:n.maskedValue:null==n?void 0:n.originalValue}),!!n&&r3(n)]}),i3=({children:e,textStyle:t})=>Ms.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box"},children:e}),a3=({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>{const{isActive:o}=kq(),{interactions:i}=JP();let a=r?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const l=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>({...oR,...iR(r?Math.max(t.grid.lineClamp,e.leafCount*t.grid.lineClamp):t.grid.columnLineClamp),color:Iq({cell:e,styleService:t,isCellSelected:n}),fontWeight:Dq({cell:e,styleService:t}),fontStyle:Pq({cell:e,styleService:t}),textDecoration:Tq({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r});if(e.representation.type===Ke.Image&&!e.isTotal)return Ms.jsx(Hq,{representation:e.representation,isLeftColumn:r,styleService:t,textStyle:l,leafCount:e.leafCount,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand});if(e.representation.type===Ke.Link&&!o&&!e.isTotal){const t=r&&e.representation.labelStructure?o3:hB;a=Ms.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:i,color:e.expressionColor.color})}return Ms.jsx(i3,{textStyle:l,children:a})},l3=e=>{const t=e.isLeftColumn?"flex-start":"center";var n;return e.representation.type!==Ke.Image||(e=>"fill"===e.representation.imageSize)(e)?t:null===(n=e.representation.resolvedImagePosition)||void 0===n?void 0:n.vertical},s3=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=tT(),{isSelected:i}=kq(),{isLeftColumn:a=!1,showLastBorder:l,itemCount:s,isLast:u,totalDividerIndex:c}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=dF([n]),f=sB(e,n),h=a?e===s-1:u,m=a?u:e===s-1,g=dq(f,c,o.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return Ms.jsx(pq,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:l,isLeftColumn:a,showTotalCellDivider:g})}const y=i(f);return Ms.jsxs(dB,{text:f.representation.text,reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:y,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[Ms.jsxs(fq,{verticalAlign:l3(f),width:hq(f.representation),right:f.isLeftColumn?void 0:4,children:[Ms.jsx(Fq,{isLeftColumn:a,isCellSelected:y,cell:f}),Ms.jsx(a3,{isLeftColumn:a,isCellSelected:y,cell:f,styleService:r})]}),Ms.jsx(hF,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?ot.Measures:ot.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var u3=En.memo(s3,XN);const c3=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{var i;const a=n?e[o]:t[o];return 0===o&&(null==a?void 0:a.x)>0?(a.leafCount+a.x+a.distanceToNextCell)*r():n||void 0===a?r(null!==(i=null==a?void 0:a.x)&&void 0!==i?i:o):(a.leafCount+a.distanceToNextCell)*r()},d3=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},p3=(e,t)=>n=>{e.current&&(e.current[t]=n)},f3={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...nR},h3={overflow:"hidden",willChange:"auto",flexShrink:0},m3=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i}=KP(),{layoutService:a,styleService:{contentCellHeight:l,grid:{divider:s}}}=tT(),{qSize:u}=a.layout.qHyperCube,{gridSectionsData:{leftDimensionData:c},visibleDimensionsInfo:{visibleLeftDimensionInfo:d}}=BO();lB(e,c),aB(e,t,n,l);const p=i.rowsOnCurrentPage*l,f={...f3,borderColor:s,width:r.reduce(((e,t)=>e+t),0)};return Ms.jsx("div",{style:f,"data-section-id":"LEFT_GRID",children:c.grid.map(((t,s)=>{const f=s===c.columnCount-1,h=hT(d[s]),{itemCount:m,estimatedItemSize:g,listValues:y}=d3(t,p,i.rowsOnCurrentPage,f),b=a.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t[i];if(0===i&&(null==a?void 0:a.pageY)>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if((null==a?void 0:a.leafCount)>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,l,f,u.qcy);return Ms.jsx(GN,{ref:p3(e,s),style:{...h3,flexGrow:f?1:0},height:n,width:r[s],itemCount:m,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:f,itemCount:m,showLastBorder:o,listValues:y,totalDividerIndex:c.totalDividerIndex},itemKey:rF,estimatedItemSize:g,children:u3},h)}))})};var g3=Sn.memo(m3);const y3={overflow:"hidden",willChange:"auto"},b3={...nR,borderWidth:"0px 0px 0px 1px"},v3=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{layoutService:a,styleService:{grid:{divider:l},headerCellHeight:s}}=tT(),{gridSectionsData:{headersData:u,topDimensionData:c}}=BO(),d={...b3,borderColor:l,height:r};lB(e,c),aB(e,n,r,s);const p=a.size.x*i();return 0===c.rowCount?Ms.jsx("div",{style:{width:n,height:r,...b3}}):Ms.jsx("div",{style:d,"data-section-id":"TOP_GRID",children:c.grid.map(((r,l)=>{const s=l===c.rowCount-1,{itemCount:d,estimatedItemSize:f,listValues:h}=d3(r,p,a.size.x,s),m=(({layoutService:e,headersData:t,topRowIndex:n})=>{var r;const o=t.data[n],i=t.size.x-1,a=e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y?null===(r=o[0][i])||void 0===r?void 0:r.dimensionInfoIndex:null==o?void 0:o[i].dimensionInfoIndex;return void 0!==a?e.getDimensionInfo(a):void 0})({layoutService:a,headersData:u,topRowIndex:l}),g=m?hT(m):`empty ${l}`;return Ms.jsx(GN,{ref:p3(e,l),style:y3,height:t(),width:n,itemCount:d,itemSize:c3({list:r,listValues:h,isLastRow:s,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:s,itemCount:d,showLastBorder:o,listValues:h,totalDividerIndex:c.totalDividerIndex},itemKey:rF,estimatedItemSize:f,children:u3},g)}))})};var x3=Sn.memo(v3);const w3=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=tT(),n=dN(),r=(()=>{const{model:e}=JP(),t=Sn.useCallback((async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:o,sortDirection:i}=t,a=[];if(n===i)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${o}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}}),[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:l},gridRefs:{topGridRef:s,leftGridRef:u,dataGridRef:c},scrollDirectionRefs:{verticalScrollDirection:d,horizontalScrollDirection:p},scrollbarsDimensions:{verticalScrollbarWidth:f,horizontalScrollbarHeight:h,resetHorizontalScrollbarHeight:m}}=cN(),{leftGridWidth:g,leftGridFullWidth:y,leftGridColumnWidths:b,rightGridFullWidth:v,showLastRightBorder:x,getRightGridColumnWidth:w,getHeaderCellsIconsVisibilityStatus:S,overrideLeftGridWidth:E}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=tT(),{gridSectionsData:{headersData:i}}=BO(),{measureText:a}=IR(o.header),l=rN({tableWidth:e}),s=oN({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:l.leftGridWidth}),u=l.leftGridWidth+s.rightGridFullWidth+1<e,c=Sn.useCallback(((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const s=l.leftGridColumnWidths[o];let u=!1,c=!1,d=a(n)+WO;return t&&d+20<=s&&(c=!0,d+=20),d+20<=s&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}}),[l.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return Sn.useEffect((()=>{const e=l.leftGridWidth===l.leftGridFullWidth,t=s.rightGridWidth===s.rightGridFullWidth;e&&t&&n()}),[n,l.leftGridWidth,l.leftGridFullWidth,s.rightGridWidth,s.rightGridFullWidth]),{...l,...s,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:n.width,verticalScrollbarWidth:f,resetHorizontalScrollbarHeight:m}),{gridScaffoldDimensions:C,headerGridDims:k,topGridDims:_,leftGridDims:M,dataGridDims:R,metadata:{everyThingFitsInTableRectHeight:A,scrollbarsVisibilityStatus:L}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const l=dN(),{pageInfo:s}=KP(),{gridSectionsData:{headersData:u,topDimensionData:c}}=BO(),d=Math.min(l.height*HO,Math.max(l.height*HO-25,l.height-t-a)),p=l.width*HO,f=s.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,y=Math.min(p,n),b=l.width-p,v=Math.max(b,l.width-y),x=Math.min(d,m,g),{availableHeight:w,everyThingFitsInTableRectHeight:S,everyThingFitsInTableRectWidth:E}=((e,t,n)=>{const r=t+1+n+i<=l.width,o=e+1+f+a,s=o-l.height<a||o<=l.height;return{availableHeight:s?o:l.height,everyThingFitsInTableRectHeight:s,everyThingFitsInTableRectWidth:r}})(x,y,v),C=w-d,k=Math.max(C,w-x),_=Math.min(k,f),M=Math.min(k,f),R=m+1+f,{visibilityStatus:A,metadata:{hasLeftGridOverflowX:L,hasDataGridOverflowX:I}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:l,bottomSectionFullHeight:s}}}=e,u=l>r,c=i>t,d=a>n,p=s>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:u?"scroll":"hidden"},leftGrid:{overflowX:c?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:u,hasLeftGridOverflowX:c,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:y,rightSectionWidth:v},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:k}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:l.width,height:l.height,gridTemplateColumns:`${y}px ${v}px`,gridTemplateRows:`${x}px ${k}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(I?i:0),height:g},stickyWrapper:{width:v-1-i,height:-1},self:{width:Math.min(o,v)-(E?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:y,height:R-g+(!L&&I?a:0)},stickyWrapper:{width:y,height:k-1-a},self:{width:y,height:Math.max(t,_-(S?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(I?i:0),height:R-g+(!I&&L?a:0)},stickyWrapper:{width:v-1-i,height:k-1-a},self:{width:Math.min(o,v)-(E?1:0)-i,height:Math.max(t,M-(S?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:S,scrollbarsVisibilityStatus:A}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:g,leftGridOriginalWidth:y,rightGridOriginalWidth:v},scrollBarsDimensions:{verticalScrollbarWidth:f,horizontalScrollbarHeight:h}}),I=Sn.useCallback((()=>e),[e]),D=Sn.useCallback((()=>t),[t]);return(()=>{const{downloadService:e}=tT();Sn.useEffect((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))})(),Ms.jsxs(fN,{style:C,children:[Ms.jsx("div",{style:{overflow:"hidden"},ref:o,children:Ms.jsx(iB,{tableWidth:n.width,leftGridWidth:g,columnWidths:b,getHeaderCellsIconsVisibilityStatus:S,rowHight:e,height:k.height,changeSortOrder:r,overrideLeftGridWidth:E})}),Ms.jsx(gN,{style:L.topGrid,origin:at.TopGrid,ref:i,children:Ms.jsx(pN,{style:_.fullSizeWrapper,children:Ms.jsx(yN,{style:_.stickyWrapper,children:Ms.jsx(x3,{topGridRef:s,rowHightCallback:I,..._.self,showLastBorder:{right:x,bottom:!1},getRightGridColumnWidth:w})})})}),Ms.jsx(gN,{style:L.leftGrid,origin:at.LeftGrid,ref:a,children:Ms.jsx(pN,{style:M.fullSizeWrapper,children:Ms.jsx(yN,{style:M.stickyWrapper,children:Ms.jsx(g3,{leftGridRef:u,...M.self,columnWidths:b,showLastBorder:{right:!1,bottom:A}})})})}),Ms.jsx(gN,{style:L.dataGrid,origin:at.DataGrid,ref:l,children:Ms.jsx(pN,{style:R.fullSizeWrapper,children:Ms.jsx(yN,{style:R.stickyWrapper,children:Ms.jsx(lF,{dataGridRef:c,rowHightCallback:D,...R.self,showLastBorder:{right:x,bottom:A},getRightGridColumnWidth:w,verticalScrollDirection:d,horizontalScrollDirection:p})})})})]})},S3=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=JP(),{pageInfo:o,updatePageInfo:i,rect:a}=KP(),{layoutService:l}=tT(),{layout:s,hasData:u}=l;return Ms.jsxs(Ms.Fragment,{children:[u&&Ms.jsx(w3,{}),Ms.jsx(rT,{}),Ms.jsx(GP,{paginationNeeded:o.shouldShowPagination,handleChangePage:e=>i({page:e}),pageInfo:o,totalRowCount:o.totalRowCount,totalColumnCount:0,totalPages:o.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:s})]})},E3={WHITE:"#FFFFFF",GREY:"#999999",GREY_PALE:"#B2B2B2",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_0_65:"rgba(0, 0, 0, 0.65)",GREYSCALE_100_05:"rgba(255, 255, 255, 0.05)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_25:"rgba(255, 255, 255, 0.25)",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)"},C3=12,k3=14,_3=16,M3=24,R3=3,A3=300,L3=400,I3=600,D3=700,P3={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};Tt(E3.GREYSCALE_0,.05),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5);var T3;function O3(){return O3=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},O3.apply(null,arguments)}Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5),Tt(E3.GREEN_PALE,.5),Tt(E3.BLUE_PALE,.5);var N3,q3=function(e){return Sn.createElement("svg",O3({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),T3||(T3=Sn.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})))};function F3(){return F3=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},F3.apply(null,arguments)}var z3=function(e){return Sn.createElement("svg",F3({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},e),N3||(N3=Sn.createElement("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.345z"})))};function j3({fontSize:e="medium",children:t=null,className:n=""}={}){const r="small"===e?"16px":"20px",o="small"===e?"-2px 0":void 0;return En.createElement("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},t)}var B3=(e={})=>En.createElement(j3,{...e},En.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"},En.createElement("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),En.createElement("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"}))),$3=(e={})=>En.createElement(j3,{...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),En.createElement("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})))),W3=(e={})=>En.createElement(j3,{fontSize:"medium",...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212"},En.createElement("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})))),H3=(e={})=>En.createElement(j3,{fontSize:"medium",...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},En.createElement("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),En.createElement("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"}))),V3=({className:e})=>En.createElement(j3,{fontSize:"small",className:e},En.createElement("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero"},En.createElement("g",{transform:"translate(4.324187, 1.300372)"},En.createElement("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"}),En.createElement("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"})))))),G3=(e={})=>En.createElement(j3,{...e},En.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},En.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},En.createElement("rect",{stroke:E3.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"}))));const U3={MuiAccordion:{styleOverrides:{root:{backgroundColor:E3.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:E3.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:En.createElement(q3,{"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 ${E3.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`,borderRadius:R3,backgroundColor:E3.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 ${E3.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:E3.WHITE,color:E3.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:R3},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:E3.GREYSCALE_0_15,backgroundColor:E3.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${E3.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:E3.GREEN_PALE},"&:active":{backgroundColor:E3.GREEN_DARK},"&.Mui-focusVisible":{borderColor:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:E3.BLUE_PALE},"&:active":{backgroundColor:E3.BLUE_DARK},"&.Mui-focusVisible":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.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:R3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:E3.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:E3.GREYSCALE_0_15,backgroundColor:E3.GREYSCALE_100_60,"&:active":{backgroundColor:E3.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${E3.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:E3.PURPLE,"&.Mui-focusVisible":{borderColor:E3.PURPLE,boxShadow:`0 0 0 3px ${eL(E3.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:E3.GREEN,"&.Mui-focusVisible":{borderColor:E3.GREEN,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:E3.BLUE,"&.Mui-focusVisible":{borderColor:E3.BLUE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:E3.ORANGE,"&.Mui-focusVisible":{borderColor:E3.ORANGE,boxShadow:`0 0 0 3px ${eL(E3.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:E3.RED,"&.Mui-focusVisible":{borderColor:E3.RED,boxShadow:`0 0 0 3px ${eL(E3.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:E3.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:E3.PURPLE_PALE},"&:active":{backgroundColor:E3.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:E3.PURPLE_PALE,boxShadow:`0 0 0 3px ${eL(E3.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:E3.GREEN_PALE},"&:active":{backgroundColor:E3.GREEN_DARK},"&.Mui-focusVisible":{borderColor:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:E3.BLUE_PALE},"&:active":{backgroundColor:E3.BLUE_DARK},"&.Mui-focusVisible":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:E3.ORANGE_PALE},"&:active":{backgroundColor:E3.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:E3.ORANGE_PALE,boxShadow:`0 0 0 3px ${eL(E3.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:E3.RED_PALE},"&:active":{backgroundColor:E3.RED_DARK},"&.Mui-focusVisible":{borderColor:E3.RED_PALE,boxShadow:`0 0 0 3px ${eL(E3.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:E3.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:E3.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:R3,boxShadow:`inset 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:En.createElement(z3,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:C3,borderRadius:R3,color:E3.TEXT_PRIMARY,backgroundColor:E3.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:E3.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:E3.GREYSCALE_0_05,color:E3.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:E3.GREEN,borderColor:E3.GREEN},"&.MuiChip-outlinedInfo":{color:E3.BLUE,borderColor:E3.BLUE},"&.MuiChip-outlinedWarning":{color:E3.ORANGE,borderColor:E3.ORANGE},"&.MuiChip-outlinedError":{color:E3.RED,borderColor:E3.RED}},outlined:{border:`solid 1px ${E3.GREYSCALE_0_15}`,backgroundColor:E3.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:R3,boxShadow:"none",backgroundColor:E3.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:E3.GREEN,borderColor:E3.GREEN},outlinedSecondary:{color:E3.BLUE,borderColor:E3.BLUE},label:{fontFamily:P3.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:En.createElement(z3,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:En.createElement(q3,{"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:R3},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:R3,fontSize:k3,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:E3.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${E3.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:E3.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:E3.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:E3.GREYSCALE_0_05}}},popupIndicator:{borderRadius:R3,border:`solid 1px ${E3.GREYSCALE_0_15}`,color:E3.GREYSCALE_0_60,marginRight:0,width:M3,height:M3},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${E3.GREYSCALE_0_15}`},clearIndicator:{borderRadius:R3,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:E3.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:k3}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:C3,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:E3.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:E3.GREYSCALE_25,fontSize:C3,fontFamily:P3.FONT_FAMILY,fontWeight:I3,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:E3.TEXT_PRIMARY},"&.Mui-error":{color:E3.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:E3.TEXT_SECONDARY,content:"'(optional)'",fontWeight:L3,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:E3.TEXT_SECONDARY,content:"'(required)'",fontWeight:L3,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:k3,lineHeight:"16px",backgroundColor:E3.WHITE,borderRadius:R3,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.GREYSCALE_0_05}`,borderColor:E3.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${E3.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${E3.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.RED}`,boxShadow:`0px 0px 0px 1px ${E3.RED}, inset 0 2px 0 0 ${E3.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${E3.GREYSCALE_0_10}`,borderColor:E3.GREYSCALE_0_10,backgroundColor:E3.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:E3.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:E3.GREYSCALE_0_15,borderRadius:R3,boxShadow:`inset 0 2px 0 0 ${E3.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>En.createElement(q3,{...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:E3.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:E3.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:E3.GREYSCALE_0_03},"&:active":{backgroundColor:E3.GREYSCALE_0_10},"&:focus":{backgroundColor:E3.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${E3.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:E3.GREYSCALE_0_30,"&:hover":{backgroundColor:E3.GREYSCALE_0_0,borderColor:E3.GREYSCALE_0_15},"& ~svg":{color:E3.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${E3.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:R3}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:E3.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:E3.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:k3,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:C3,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:C3,fontWeight:I3,color:E3.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:I3}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${E3.GREYSCALE_0_15}, 0px 0px 0px 1px ${E3.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:En.createElement(W3,null),checkedIcon:En.createElement(H3,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:E3.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:E3.GREYSCALE_0_20}},"&.Mui-disabled":{fill:E3.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:En.createElement(G3,null),checkedIcon:En.createElement(B3,null),indeterminateIcon:En.createElement($3,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:R3,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:E3.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:E3.GREYSCALE_0_55,color:E3.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:E3.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:E3.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:E3.GREYSCALE_0_55,"&:hover":{color:E3.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:E3.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:E3.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:k3,color:E3.TEXT_PRIMARY,lineHeight:"16px",fontWeight:I3},secondary:{fontSize:C3,color:E3.GREYSCALE_45,fontWeight:L3,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:k3,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:k3,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:E3.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:C3,borderBottom:`solid 1px ${E3.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:k3,color:E3.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:E3.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:E3.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:E3.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:E3.RED}}},"&.Mui-focusVisible":{backgroundColor:E3.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:E3.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:E3.GREEN,height:"24px","&.Mui-disabled":{color:E3.GREYSCALE_0_15}},rail:{backgroundColor:E3.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${E3.GREYSCALE_0_05}`,borderRadius:R3,boxShadow:`inset 0px 0px 0px 1px ${E3.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${E3.GREYSCALE_0_05}`,borderRadius:R3},thumb:{height:"16px",width:"16px",borderRadius:R3,backgroundColor:E3.WHITE,boxShadow:`0px 1px 2px 0px ${E3.GREYSCALE_0_15}, 0px 0px 0px 1px ${E3.GREYSCALE_0_05}`,"&:hover":{borderRadius:R3,boxShadow:`0 2px 4px 0 ${E3.GREYSCALE_0_30}, 0 0 0 1px ${E3.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${E3.GREYSCALE_0_15}, 0 0 0 1px ${E3.GREYSCALE_0_06}, 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${E3.GREYSCALE_0_15}, 0 0 0 1px ${E3.GREYSCALE_0_06}, 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:E3.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:E3.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:E3.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:E3.GREYSCALE_0_15},markLabel:{color:E3.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:E3.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:E3.WHITE,color:E3.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:E3.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:E3.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(E3.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:E3.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(E3.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:E3.GREYSCALE_0_15,borderRadius:R3},thumb:{height:"16px",width:"16px",borderRadius:R3,backgroundColor:E3.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:k3,fontWeight:I3,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${E3.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${E3.MISC_FOCUS_BORDER}`,backgroundColor:E3.GREYSCALE_0_03,borderRadius:R3},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:E3.GREYSCALE_25,"&.Mui-selected":{color:E3.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:k3,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:R3,"&:hover":{backgroundColor:`${E3.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 ${E3.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${E3.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:R3,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:E3.GREYSCALE_0_05},"&:hover":{backgroundColor:`${E3.GREYSCALE_0_03}`,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${E3.GREYSCALE_85}`,borderRight:`1px solid ${E3.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:I3,backgroundColor:E3.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:E3.GREYSCALE_98,borderBottom:`1px solid ${E3.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${E3.GREYSCALE_85}`,borderTop:`1px solid ${E3.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:E3.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:E3.GREYSCALE_0_05,"&:hover":{backgroundColor:E3.GREYSCALE_0_03}},"&&:hover":{backgroundColor:E3.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>En.createElement(V3,{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 ${E3.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:k3,borderRadius:R3,padding:"7px 16px",border:`1px solid ${E3.GREYSCALE_0_15}`,backgroundColor:E3.GREYSCALE_100_60,color:E3.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:E3.GREYSCALE_0_10,border:`1px solid ${E3.GREYSCALE_0_30}`},"&:hover":{backgroundColor:E3.GREYSCALE_0_03,border:`1px solid ${E3.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:E3.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${E3.MISC_FOCUS_BORDER}`,border:`1px solid ${E3.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:E3.GREYSCALE_25,backgroundColor:E3.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:E3.GREYSCALE_0_10,border:`1px solid ${E3.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:C3,height:24,width:24,padding:7},sizeLarge:{fontSize:_3,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:k3,borderRadius:R3}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:E3.GREYSCALE_20},tooltip:{backgroundColor:E3.GREYSCALE_20,fontSize:C3,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};var Y3=e=>U3;const K3={mode:"light",primary:{ultraLight:E3.GREEN_ULTRA_LIGHT,light:E3.GREEN_PALE,main:E3.GREEN,dark:E3.GREEN_DARK,extraDark:E3.GREEN_EXTRA_DARK,contrastText:E3.WHITE},secondary:{ultraLight:E3.BLUE_ULTRA_LIGHT,light:E3.BLUE_PALE,main:E3.BLUE,dark:E3.BLUE_DARK,extraDark:E3.BLUE_EXTRA_DARK,contrastText:E3.WHITE},error:{ultraLight:E3.RED_ULTRA_LIGHT,light:E3.RED_PALE,main:E3.RED,dark:E3.RED_DARK,extraDark:E3.RED_EXTRA_DARK,contrastText:E3.WHITE},warning:{ultraLight:E3.ORANGE_ULTRA_LIGHT,light:E3.ORANGE_PALE,main:E3.ORANGE,dark:E3.ORANGE_DARK,extraDark:E3.ORANGE_EXTRA_DARK,contrastText:E3.WHITE},success:{ultraLight:E3.GREEN_ULTRA_LIGHT,light:E3.GREEN_PALE,main:E3.GREEN,dark:E3.GREEN_DARK,extraDark:E3.GREEN_EXTRA_DARK,contrastText:E3.WHITE},info:{ultraLight:E3.BLUE_ULTRA_LIGHT,light:E3.BLUE_PALE,main:E3.BLUE,dark:E3.BLUE_DARK,extraDark:E3.BLUE_EXTRA_DARK,contrastText:E3.WHITE},text:{primary:E3.TEXT_PRIMARY,secondary:E3.TEXT_SECONDARY,disabled:E3.GREYSCALE_0_30},action:{hover:E3.GREYSCALE_0_03,hoverOpacity:.03,selected:E3.GREYSCALE_0_05,selectedOpacity:.05,focus:E3.MISC_FOCUS_BORDER},amethyst:{ultraLight:E3.WHITE,main:E3.PURPLE,light:E3.PURPLE_PALE,dark:E3.PURPLE_DARK,extraDark:E3.GREYSCALE_0_0,contrastText:E3.WHITE},background:{paper:E3.WHITE,default:E3.GREYSCALE_95},divider:E3.GREYSCALE_0_15},X3=e=>K3,Q3=(e="light")=>({components:Y3(),palette:X3(),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:k3,fontWeightLight:A3,fontWeightRegular:L3,fontWeightMedium:I3,fontWeightBold:D3,htmlFontSize:k3,fontFamily:P3.FONT_FAMILY,button:{fontWeight:I3,fontSize:k3,textTransform:"none"},body1:{fontSize:_3,lineHeight:"24px"},body2:{fontSize:k3,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:M3,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:_3,fontWeight:I3,lineHeight:"16px"},h6:{fontSize:k3,fontWeight:I3,lineHeight:"16px"},caption:{color:E3.TEXT_SECONDARY},subtitle1:{fontSize:k3,color:E3.TEXT_SECONDARY},subtitle2:{fontSize:C3,color:E3.TEXT_SECONDARY}},shape:{borderRadius:R3}});const J3=(e,{selections:t,baseObjects:n,coreServices:r,nebulaObjects:o})=>{const i=function(e){var t;const n=Q3();return null!=n&&null!==(t=n.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),dI({...n,direction:e})}("ltr");e.render(Ms.jsx(En.StrictMode,{children:Ms.jsx(GI,{theme:i,children:Ms.jsx(ZP,{...o,children:Ms.jsx(XP,{...n,children:Ms.jsx(_q,{selections:t,children:Ms.jsx(nT,{...r,children:Ms.jsx($O,{children:Ms.jsx(S3,{})})})})})})})}))};var Z3,e6,t6,n6;!function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider"}(Z3||(Z3={})),function(e){e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2"}(e6||(e6={})),function(e){e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value"}(t6||(t6={})),function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor"}(n6||(n6={}));const r6=e=>e?`${parseInt(e,10)}px`:void 0,o6=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?ZM.Transparent:n}},i6=(e,t)=>+(parseInt(e,10)*JM*t+8).toFixed(2),a6=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?XM:"normal",l6=e=>null!=e&&e.some((e=>"italic"===e))?"italic":"normal",s6=e=>null!=e&&e.some((e=>"underline"===e))?"underline":"none",u6=({fontStyle:e,fontWeight:t,fontSize:n,fontFamily:r})=>t?`${e} ${t} ${n} ${r}`:`${e} ${n} ${r}`,c6=(t,n,r)=>{var o,i,a,l,s;const u=null!==(o=null==r||null===(i=r.qHyperCubeDef)||void 0===i?void 0:i.qShowTotalsAbove)&&void 0!==o&&o,c=null!==(a=null==r||null===(l=r.qHyperCubeDef)||void 0===l?void 0:l.qAlwaysFullyExpanded)&&void 0!==a&&a,d=void 0!==(null==r||null===(s=r.qHyperCubeDef)||void 0===s?void 0:s.qSortbyYValue)&&1===Math.abs(null==r?void 0:r.qHyperCubeDef.qSortbyYValue),p=e.useMemo((()=>{var e;return null==r||null===(e=r.qHyperCubeDef)||void 0===e||null===(e=e.qDimensions)||void 0===e?void 0:e.map((e=>{var t;return null===(t=e.qDef)||void 0===t?void 0:t.qSortCriterias}))}),[r]);return e.useMemo((()=>(({layout:e,flags:t,qShowTotalsAbove:n,qAlwaysFullyExpanded:r,isSortedByFirstMeasure:o,qSortCriterias:i})=>{var a,l,s,u;const{qHyperCube:c,nullValueRepresentation:d,snapshotData:p}=e,{qNoOfLeftDims:f,qEffectiveInterColumnSortOrder:h,qMeasureInfo:m,qDimensionInfo:g}=c,y=!!p,b=null!==(a=null==p||null===(l=p.content)||void 0===l?void 0:l.rowsPerPage)&&void 0!==a?a:15e3,v={x:Math.min(e.qHyperCube.qSize.qcx,QM),y:Math.min(e.qHyperCube.qSize.qcy,b)},x=h.slice(0,f),w=e=>x.some((t=>t===e)),S=w(iT),E=new Map(h.map((e=>{var t;return[null!==(t=g[e])&&void 0!==t?t:iT,e]}))),C=m.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return{layout:e,getNullValueText:()=>{var e;return null!==(e=null==d?void 0:d.text)&&void 0!==e?e:"-"},getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(S)return 0;const n=e%C.length;return t?n:m.findIndex((e=>e===C[n]))},getDimensionInfo:e=>e===iT?iT:g[e],getDimensionInfoIndex:e=>{var t;return null!==(t=E.get(e))&&void 0!==t?t:-1},getSortCriteriaForDimension:e=>null==i?void 0:i[e],size:v,isSnapshot:y,hasLimitedData:!y&&v.x<e.qHyperCube.qSize.qcx,hasData:v.x>0&&v.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,showTotalsAbove:n,hasPseudoDimOnLeft:S,leftDimensionInfoIndexes:x,isLeftDimension:w,isFullyExpanded:r,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:C,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode)&&t.isEnabled("CLIENT_IM_5975_INDENT_MODE"),indentModeFeatures:{isLinksSupported:t.isEnabled("CLIENT_IM_5975_INDENT_MODE_LINKS")},indentModeColumnWidth:null!==(s=e.qHyperCube.indentModeColumnWidth)&&void 0!==s?s:{type:ht.Auto,pixels:ft.PixelsDefault,percentage:ft.PercentageDefault},isSortedByFirstMeasure:o,searchSortFromDimension:"inherit"===(null===(u=e.search)||void 0===u?void 0:u.sorting)}})({layout:t,flags:n,qShowTotalsAbove:u,qAlwaysFullyExpanded:c,isSortedByFirstMeasure:d,qSortCriterias:p})),[t,u,c,d,n,p])},d6=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:l}=t,s=(e=>{const t=SR(e);return t.current=e,t})(OO(o));return RR((async()=>{var t;const{qHyperCube:o}=i,{maxNumberOfVisibleRows:u,maxNumberOfVisibleColumns:c}=s.current;var d,p;if(a)return null!==(d=null===(p=i.snapshotData)||void 0===p||null===(p=p.content)||void 0===p?void 0:p.qPivotDataPages)&&void 0!==d?d:[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(l,n,u,c)||((e,t,n,r)=>{var o,i;const{qHyperCube:{qPivotDataPages:a,qSize:l}}=e,{qTop:s,qWidth:u,qHeight:c}=null!==(o=null===(i=a[0])||void 0===i?void 0:i.qArea)&&void 0!==o?o:{qTop:0,qWidth:0,qHeight:0};return s<t.page*t.rowsPerPage||u<Math.min(r,l.qcx)||c<Math.min(n,l.qcy)})(i,r,u,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,l=Math.min(a+r.rowsPerPage,n.qcy),s=Math.min(QM,n.qcx);if(n.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>l&&(c=Math.max(0,l-o)),n>s&&(u=Math.max(0,s-i))}return{qLeft:u,qTop:c,qWidth:Math.min(s-u,i),qHeight:Math.min(l-c,o)}})(l,n,i.qHyperCube.qSize,r,u,c);return t?e.getHyperCubePivotData(oT,NO(t)):[]}return null!==(t=o.qPivotDataPages)&&void 0!==t?t:[]}),[i,a,e,n,r.page,r.rowsPerPage,s,l])},p6=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),f6=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:p6({rowsPerPage:n,totalRowCount:e,page:t})}),h6=15,m6=({layoutService:t,viewService:n,rect:r,model:o,pageInfo:i})=>{var a;return e.onTakeSnapshot((async e=>{const t=e;if(!t.snapshotData||!o||t.snapshotData.content)return t;if(null!=o&&o.getHyperCubePivotData){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:l,topGridScrollTop:s}=n,u=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,l=t.page*t.rowsPerPage,s=Math.max(r-h6,0),u=Math.max(l+o-h6,l,0),c=QM-s,d=l+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=OO(n);return{qLeft:s,qTop:u,qWidth:Math.min(c,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:s,qTop:u,qWidth:Math.min(c,i+30),qHeight:Math.min(d,a+30)}})(n,i,r),c=NO(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};t.snapshotData.content={qPivotDataPages:await o.getHyperCubePivotData(oT,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:l,topGridScrollTop:s,page:i.page,rowsPerPage:i.rowsPerPage},t.snapshotData.object.size.w=r.width,t.snapshotData.object.size.h=r.height}return t})),e.useImperativeHandle((()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(n,i)})),[n]),null!==(a=t.layout.snapshotData)&&void 0!==a&&a.content?{left:r.left,top:r.top,width:t.layout.snapshotData.object.size.w,height:t.layout.snapshotData.object.size.h}:r};var g6={SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const y6=()=>{const t=e.useTranslator(),n=t.language();return e.useMemo((()=>function(e){if(e.get&&e.add){const t="SNPivotTable_LimitedData";if(e.get(t)!==t)return;Object.keys(g6).forEach((t=>{e.add(g6[t])}))}}(t)),[t]),{translator:t,language:n}},b6=t=>{const{flags:n}=t,r=e.useElement(),o=(t=>{const n=e.useMemo((()=>DR(t)),[t]);return e.useEffect((()=>()=>n.unmount()),[n]),n})(r),i=e.useStaleLayout(),a=e.useModel(),l=e.useApp(),s=e.useEmbed(),u=e.useKeyboard(),c=e.useInteractionState(),d=ER(),[p,f]=((e,t)=>RR((async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return e.getEffectiveProperties()}),[e,t]))(a,i),h=c6(i,n,p),m=e.useSelections(),g=MR(i,r),{translator:y,language:b}=y6(),{pageInfo:v,updatePageInfo:x}=((t,n)=>{const{size:r,layout:{qHyperCube:{qSize:o}}}=t,i=n.isDownloadedAsPDForImage||t.isSnapshot,a=(e=>{var t;return null===(t=e.layout.snapshotData)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.rowsPerPage})(t),[l,s]=e.useState((()=>{const e=((e,t)=>{var n,r,o,i;return t.isDownloadedAsPDForImage?null!==(n=null===(r=t.viewState)||void 0===r?void 0:r.renderPage)&&void 0!==n?n:0:e.isSnapshot&&null!==(o=null===(i=e.layout.snapshotData)||void 0===i||null===(i=i.content)||void 0===i?void 0:i.page)&&void 0!==o?o:0})(t,n);return{page:e,shouldShowPagination:o.qcy>r.y&&!i,...f6(o.qcy,e,a)}})),u=t.layout.qHyperCube.qSize.qcy;return e.useEffect((()=>{s((e=>({...e,...f6(u,e.page,a),shouldShowPagination:u>t.size.y&&!i})))}),[u,t.size.y,s,i,a]),e.useEffect((()=>{const{page:e,totalPages:t}=l;if(e+1>t){const e=t-1,n=p6({...l,page:e});s({...l,page:e,rowsOnCurrentPage:n})}}),[l]),{pageInfo:l,updatePageInfo:e=>s({...l,...e,rowsOnCurrentPage:p6({...l,...e})})}})(h,d),w=((t,n,r)=>e.useMemo((()=>((e,t)=>{var n,r,o,i,a,l,s,u;if(e.isDownloadedAsPDForImage){var c,d,p,f;const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(c=null==t?void 0:t.scrollTop)&&void 0!==c?c:0,scrollLeft:null!==(d=null==t?void 0:t.scrollLeft)&&void 0!==d?d:0,leftGridScrollLeft:null!==(p=null==t?void 0:t.leftGridScrollLeft)&&void 0!==p?p:0,topGridScrollTop:null!==(f=null==t?void 0:t.topGridScrollTop)&&void 0!==f?f:0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(n=null==t||null===(r=t.content)||void 0===r?void 0:r.scrollTop)&&void 0!==n?n:0,scrollLeft:null!==(o=null==t||null===(i=t.content)||void 0===i?void 0:i.scrollLeft)&&void 0!==o?o:0,leftGridScrollLeft:null!==(a=null==t||null===(l=t.content)||void 0===l?void 0:l.leftGridScrollLeft)&&void 0!==a?a:0,topGridScrollTop:null!==(s=null==t||null===(u=t.content)||void 0===u?void 0:u.topGridScrollTop)&&void 0!==s?s:0}})(r,n.snapshotData)),[r,t.page,n.snapshotData]))(v,i,d),S=m6({rect:e.useRect(),layoutService:h,viewService:w,model:a,pageInfo:v}),[E,C]=d6({model:a,layoutService:h,viewService:w,pageInfo:v,rect:S}),k=e.useMemo((()=>((e,t,n)=>{var r,o,i,a,l,s,u,c,d,p,f,h,m,g,y,b,v,x,w,S,E,C,k,_,M,R,A,L,I,D,P,T,O,N,q,F,z,j,B,$,W,H,V,G,U,Y,K;const X=null===(r=t.layout.components)||void 0===r?void 0:r.find((e=>"theme"===e.key)),Q=null==X?void 0:X.header,J=null==X?void 0:X.dimensionValues,Z=null==X?void 0:X.measureValues,ee=null==X?void 0:X.measureLabels,te=null==X?void 0:X.totalValues,ne=null==X?void 0:X.nullValues,re=null==X?void 0:X.grid,oe=(t,n,r)=>e.getStyle(t,n,r),ie=+(null!==(o=null!==(i=null==re?void 0:re[Z3.LineClamp])&&void 0!==i?i:oe(e6.Grid,t6.Grid,n6.LineClamp))&&void 0!==o?o:1),ae=n.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?+(null!==(a=null!==(l=null==re?void 0:re[Z3.ColumnLineClamp])&&void 0!==l?l:oe(e6.Grid,t6.Grid,n6.ColumnLineClamp))&&void 0!==a?a:1):1,le=null!==(s=null!==(u=o6(e,null==Q?void 0:Q[Z3.Background]))&&void 0!==u?u:oe(e6.Dimension,t6.LabelName,n6.BackgroundColor))&&void 0!==s?s:ZM.Transparent,se={header:{fontSize:null!==(c=null!==(d=r6(null==Q?void 0:Q[Z3.FontSize]))&&void 0!==d?d:oe(e6.Dimension,t6.LabelName,n6.FontSize))&&void 0!==c?c:YM,fontFamily:null!==(p=null!==(f=null==Q?void 0:Q[Z3.FontFamily])&&void 0!==f?f:oe(e6.Dimension,t6.LabelName,n6.FontFamily))&&void 0!==p?p:KM,fontWeight:a6(null==Q?void 0:Q[Z3.FontStyle],XM),fontStyle:l6(null==Q?void 0:Q[Z3.FontStyle]),textDecoration:s6(null==Q?void 0:Q[Z3.FontStyle]),color:null!==(h=null!==(m=o6(e,null==Q?void 0:Q[Z3.FontColor]))&&void 0!==m?m:oe(e6.Dimension,t6.LabelName,n6.FontColor))&&void 0!==h?h:o_.TEXT,background:le,hoverBackground:NM(le,mt),activeBackground:NM(le,gt)},dimensionValues:{fontSize:null!==(g=null!==(y=r6(null==J?void 0:J[Z3.FontSize]))&&void 0!==y?y:oe(e6.Dimension,t6.LabelValue,n6.FontSize))&&void 0!==g?g:YM,fontFamily:null!==(b=null!==(v=null==J?void 0:J[Z3.FontFamily])&&void 0!==v?v:oe(e6.Dimension,t6.LabelValue,n6.FontFamily))&&void 0!==b?b:KM,fontWeight:a6(null==J?void 0:J[Z3.FontStyle],void 0),fontStyle:l6(null==J?void 0:J[Z3.FontStyle]),textDecoration:s6(null==J?void 0:J[Z3.FontStyle]),color:null!==(x=null!==(w=o6(e,null==J?void 0:J[Z3.FontColor]))&&void 0!==w?w:oe(e6.Dimension,t6.LabelValue,n6.FontColor))&&void 0!==x?x:o_.TEXT,background:null!==(S=null!==(E=o6(e,null==J?void 0:J[Z3.Background]))&&void 0!==E?E:oe(e6.Dimension,t6.LabelValue,n6.BackgroundColor))&&void 0!==S?S:ZM.Transparent},measureValues:{fontSize:null!==(C=null!==(k=r6(null==Z?void 0:Z[Z3.FontSize]))&&void 0!==k?k:oe(e6.Measure,t6.LabelValue,n6.FontSize))&&void 0!==C?C:YM,fontFamily:null!==(_=null!==(M=null==Z?void 0:Z[Z3.FontFamily])&&void 0!==M?M:oe(e6.Measure,t6.LabelValue,n6.FontFamily))&&void 0!==_?_:KM,fontWeight:a6(null==Z?void 0:Z[Z3.FontStyle],"normal"),fontStyle:l6(null==Z?void 0:Z[Z3.FontStyle]),textDecoration:s6(null==Z?void 0:Z[Z3.FontStyle]),color:null!==(R=null!==(A=o6(e,null==Z?void 0:Z[Z3.FontColor]))&&void 0!==A?A:oe(e6.Measure,t6.LabelValue,n6.FontColor))&&void 0!==R?R:ZM.FontSecondary,background:null!==(L=null!==(I=o6(e,null==Z?void 0:Z[Z3.Background]))&&void 0!==I?I:oe(e6.Measure,t6.LabelValue,n6.BackgroundColor))&&void 0!==L?L:ZM.Transparent},measureLabels:{fontWeight:a6(null==ee?void 0:ee[Z3.FontStyle],"normal"),fontStyle:l6(null==ee?void 0:ee[Z3.FontStyle]),textDecoration:s6(null==ee?void 0:ee[Z3.FontStyle]),color:null!==(D=null!==(P=o6(e,null==ee?void 0:ee[Z3.FontColor]))&&void 0!==P?P:oe(e6.Measure,t6.LabelName,n6.FontColor))&&void 0!==D?D:ZM.FontSecondary,background:null!==(T=null!==(O=o6(e,null==ee?void 0:ee[Z3.Background]))&&void 0!==O?O:oe(e6.Measure,t6.LabelName,n6.BackgroundColor))&&void 0!==T?T:ZM.Transparent},totalValues:{fontWeight:a6(null==te?void 0:te[Z3.FontStyle],XM),fontStyle:l6(null==te?void 0:te[Z3.FontStyle]),textDecoration:s6(null==te?void 0:te[Z3.FontStyle]),color:null!==(N=null!==(q=o6(e,null==te?void 0:te[Z3.FontColor]))&&void 0!==q?q:oe(e6.Total,t6.LabelValue,n6.FontColor))&&void 0!==N?N:o_.TEXT,background:null!==(F=null!==(z=o6(e,null==te?void 0:te[Z3.Background]))&&void 0!==z?z:oe(e6.Total,t6.LabelValue,n6.BackgroundColor))&&void 0!==F?F:ZM.Transparent},nullValues:{fontWeight:a6(null==ne?void 0:ne[Z3.FontStyle],"normal"),fontStyle:l6(null==ne?void 0:ne[Z3.FontStyle]),textDecoration:s6(null==ne?void 0:ne[Z3.FontStyle]),color:null!==(j=null!==(B=o6(e,null==ne?void 0:ne[Z3.FontColor]))&&void 0!==B?B:oe(e6.Null,t6.LabelValue,n6.FontColor))&&void 0!==j?j:o_.TEXT,background:null!==($=null!==(W=o6(e,null==ne?void 0:ne[Z3.Background]))&&void 0!==W?W:oe(e6.Null,t6.LabelValue,n6.BackgroundColor))&&void 0!==$?$:ZM.NullValueBackground},grid:{columnLineClamp:ae,lineClamp:ie,border:null!==(H=null!==(V=o6(e,null==re?void 0:re[Z3.Border]))&&void 0!==V?V:oe(e6.Grid,t6.Grid,n6.BorderColor))&&void 0!==H?H:ZM.DividerLight,divider:null!==(G=null!==(U=o6(e,null==re?void 0:re[Z3.Divider]))&&void 0!==U?U:oe(e6.Grid,t6.Divider,n6.BorderColor))&&void 0!==G?G:ZM.DividerDark,background:null!==(Y=null!==(K=o6(e,null==re?void 0:re[Z3.Background]))&&void 0!==K?K:oe(e6.Grid,t6.Grid,n6.BackgroundColor))&&void 0!==Y?Y:ZM.Transparent}};return se.headerCellHeight=Math.max(i6(se.header.fontSize,ae),i6(se.dimensionValues.fontSize,ae),32),se.contentCellHeight=Math.max(i6(se.measureValues.fontSize,ie),i6(se.dimensionValues.fontSize,ie),24),se.dimensionValueTextHeight=i6(se.dimensionValues.fontSize,1),se.selectedColors=OM({desiredColor:se.dimensionValues.color,theme:e,flags:n}),se})(g,h,n)),[g,h,n]),_=(t=>e.useMemo((()=>[...new Set([u6(t.header),u6(t.dimensionValues),u6({...t.dimensionValues,...t.measureLabels}),u6({...t.dimensionValues,...t.nullValues}),u6({...t.dimensionValues,...t.totalValues}),u6(t.measureValues),u6({...t.measureValues,...t.nullValues}),u6({...t.measureValues,...t.totalValues})])]),[t]))(k),M=(t=>{const[n,r]=e.usePromise((()=>Promise.all(t.map((e=>document.fonts.load(e))))),[t]);return r?(console.warn("Failed to load font:",r),!0):!!n})(_);zR(),e.useEffect((()=>{!C&&a&&S&&m&&w&&h&&k&&!!E&&!f&&M&&J3(o,{selections:m,baseObjects:{rect:S,pageInfo:v,qPivotDataPages:E,updatePageInfo:x},nebulaObjects:{env:t,app:l,model:a,embed:s,theme:g,keyboard:u,translator:y,interactions:c},coreServices:{styleService:k,viewService:w,layoutService:h,downloadService:d}})}),[a,l,S,c,m,w,h,d,C,E,k,o,M,y,b,v,x,p,f,s,u,g,t])},v6={version:"4.0.1",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]};return function(e){return{qae:{properties:{initial:{...v6,qHyperCubeDef:{...v6.qHyperCubeDef,qIndentMode:!1}}},data:je(e)},ext:bR(e),component(){b6(e)}}}}));