@fluentui/react-charting 5.25.10 → 5.25.11

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 +1 @@
1
- var FluentUIReactCharting;!function(){"use strict";var t={40:function(t,n,i){i.d(n,{nr:function(){return s}});var e,r=i(823),o=i(638),u="__stylesheet__",a="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),l={};try{l=window||{}}catch(t){}var s=function(){function t(t,n){var i,e,o,u,a,l;this._rules=[],this._preservedRules=[],this._counter=0,this._keyToClassName={},this._onInsertRuleCallbacks=[],this._onResetCallbacks=[],this._classNameToArgs={},this._config=(0,r.Cl)({injectionMode:"undefined"==typeof document?0:1,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=null!==(i=null==n?void 0:n.classNameToArgs)&&void 0!==i?i:this._classNameToArgs,this._counter=null!==(e=null==n?void 0:n.counter)&&void 0!==e?e:this._counter,this._keyToClassName=null!==(u=null!==(o=this._config.classNameCache)&&void 0!==o?o:null==n?void 0:n.keyToClassName)&&void 0!==u?u:this._keyToClassName,this._preservedRules=null!==(a=null==n?void 0:n.preservedRules)&&void 0!==a?a:this._preservedRules,this._rules=null!==(l=null==n?void 0:n.rules)&&void 0!==l?l:this._rules}return t.getInstance=function(n){if(e=l[u],l[o.Se])return l[o.Se].getInstance(n);if(!e||e._lastStyleElement&&e._lastStyleElement.ownerDocument!==document){var i=(null==l?void 0:l.FabricConfig)||{},r=new t(i.mergeStyles,i.serializedStylesheet);e=r,l[u]=r}return e},t.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},t.prototype.setConfig=function(t){this._config=(0,r.Cl)((0,r.Cl)({},this._config),t)},t.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter((function(n){return n!==t}))}},t.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter((function(n){return n!==t}))}},t.prototype.getClassName=function(t){var n=this._config.namespace,i=t||this._config.defaultPrefix;return"".concat(n?n+"-":"").concat(i,"-").concat(this._counter++)},t.prototype.cacheClassName=function(t,n,i,e){this._keyToClassName[this._getCacheKey(n)]=t,this._classNameToArgs[t]={args:i,rules:e}},t.prototype.classNameFromKey=function(t){return this._keyToClassName[this._getCacheKey(t)]},t.prototype.getClassNameCache=function(){return this._keyToClassName},t.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},t.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},t.prototype.insertRule=function(t,n,i){void 0===i&&(i=o.P6);var e=this._config.injectionMode,r=0!==e?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),r)switch(e){case 1:this._insertRuleIntoSheet(r.sheet,t);break;case 2:r.appendChild(document.createTextNode(t))}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach((function(n){return n({key:i,sheet:r?r.sheet:void 0,rule:t})}))},t.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},t.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(t){return t()}))},t.prototype.resetKeys=function(){this._keyToClassName={}},t.prototype._createStyleElement=function(){var t,n=(null===(t=this._config.window)||void 0===t?void 0:t.document)||document,i=n.head,e=n.createElement("style"),r=null;e.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&e.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var u=this._findPlaceholderStyleTag();r=u?u.nextElementSibling:i.childNodes[0]}return i.insertBefore(e,i.contains(r)?r:null),this._lastStyleElement=e,e},t.prototype._insertRuleIntoSheet=function(t,n){if(!t)return!1;try{return t.insertRule(n,t.cssRules.length),!0}catch(t){}return!1},t.prototype._getCacheKey=function(t){return t},t.prototype._getStyleElement=function(){var t=this;return this._styleElement||(this._styleElement=this._createStyleElement(),a||(this._config.window||window).requestAnimationFrame((function(){t._styleElement=void 0}))),this._styleElement},t.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},t}()},41:function(t,n,i){var e,r,o,u,a;i.d(n,{BO:function(){return u},Dn:function(){return e},bi:function(){return r},s:function(){return o}}),function(t){t.Arabic="Segoe UI Web (Arabic)",t.Cyrillic="Segoe UI Web (Cyrillic)",t.EastEuropean="Segoe UI Web (East European)",t.Greek="Segoe UI Web (Greek)",t.Hebrew="Segoe UI Web (Hebrew)",t.Thai="Leelawadee UI Web",t.Vietnamese="Segoe UI Web (Vietnamese)",t.WestEuropean="Segoe UI Web (West European)",t.Selawik="Selawik Web",t.Armenian="Segoe UI Web (Armenian)",t.Georgian="Segoe UI Web (Georgian)"}(e||(e={})),function(t){t.Arabic="'".concat(e.Arabic,"'"),t.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",t.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",t.Cyrillic="'".concat(e.Cyrillic,"'"),t.EastEuropean="'".concat(e.EastEuropean,"'"),t.Greek="'".concat(e.Greek,"'"),t.Hebrew="'".concat(e.Hebrew,"'"),t.Hindi="'Nirmala UI'",t.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",t.Korean="'Malgun Gothic', Gulim",t.Selawik="'".concat(e.Selawik,"'"),t.Thai="'Leelawadee UI Web', 'Kmer UI'",t.Vietnamese="'".concat(e.Vietnamese,"'"),t.WestEuropean="'".concat(e.WestEuropean,"'"),t.Armenian="'".concat(e.Armenian,"'"),t.Georgian="'".concat(e.Georgian,"'")}(r||(r={})),function(t){t.size10="10px",t.size12="12px",t.size14="14px",t.size16="16px",t.size18="18px",t.size20="20px",t.size24="24px",t.size28="28px",t.size32="32px",t.size42="42px",t.size68="68px",t.mini="10px",t.xSmall="10px",t.small="12px",t.smallPlus="12px",t.medium="14px",t.mediumPlus="16px",t.icon="16px",t.large="18px",t.xLarge="20px",t.xLargePlus="24px",t.xxLarge="28px",t.xxLargePlus="32px",t.superLarge="42px",t.mega="68px"}(o||(o={})),function(t){t.light=100,t.semilight=300,t.regular=400,t.semibold=600,t.bold=700}(u||(u={})),function(t){t.xSmall="10px",t.small="12px",t.medium="16px",t.large="20px"}(a||(a={}))},61:function(t,n,i){function e(t){const n=Math.round(t);return Math.abs(t-n)<1e-6?n:t}i.d(n,{Di:function(){return e},Yn:function(){return u},c$:function(){return r},c2:function(){return a}});const r=(t,n,i)=>{if(null==t||""===t||Number.isNaN(t))return t;if(n=n||void 0,"number"==typeof t){const i=Math.abs(t)>=1e4;return e(t).toLocaleString(n,{useGrouping:i})}if("string"==typeof t&&!window.isNaN(Number(t))){const i=Number(t),r=Math.abs(i)>=1e4;return e(i).toLocaleString(n,{useGrouping:r})}return t instanceof Date?u(t,n,!!i):t},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u=(t,n,i,e=!0,r)=>(n=n||void 0,r=r||o,i&&(r={...r,timeZone:"UTC"}),e&&(r={...r,timeZoneName:"short"}),t.toLocaleString(n,r));function a(t,n){const i={second:"2-digit"},e={minute:"2-digit",second:"2-digit"},r={hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u={weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},a={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},l={hour:"2-digit",minute:"2-digit",hour12:!0},s={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},c={month:"short",day:"2-digit",hour:"2-digit",hour12:!0},d={month:"short",day:"2-digit"},f={year:"numeric",month:"2-digit",day:"2-digit"},v=[[i,i,e,r,u,a,a,o],[o,i,e,r,u,a,a,o],[o,o,l,l,{weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},s,s,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}],[o,o,o,{hour:"2-digit",hour12:!0},{weekday:"short",day:"2-digit",hour:"2-digit",hour12:!0},c,c,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hour12:!0}],[o,o,o,o,{weekday:"short",day:"2-digit"},d,d,f],[o,o,o,o,o,d,d,f],[o,o,o,o,o,o,{month:"long"},{month:"short",year:"numeric"}],[o,o,o,o,o,o,o,{year:"numeric"}]];return void 0===t||t<0||t>=v.length?o:void 0===n||n<t?v[t][t]:n>=v[t].length?v[t][v[t].length-1]:v[t][n]}},143:function(t,n,i){i.d(n,{a:function(){return D}});var e,r=i(302);!function(t){t.depth0="0 0 0 0 transparent",t.depth4="0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",t.depth8="0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",t.depth16="0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",t.depth64="0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)"}(e||(e={}));var o={elevation4:e.depth4,elevation8:e.depth8,elevation16:e.depth16,elevation64:e.depth64,roundedCorner2:"2px",roundedCorner4:"4px",roundedCorner6:"6px"},u=i(800),a=i(40),l=i(289),s=i(41),c="'Segoe UI', '".concat(s.Dn.WestEuropean,"'"),d={ar:s.bi.Arabic,bg:s.bi.Cyrillic,cs:s.bi.EastEuropean,el:s.bi.Greek,et:s.bi.EastEuropean,he:s.bi.Hebrew,hi:s.bi.Hindi,hr:s.bi.EastEuropean,hu:s.bi.EastEuropean,ja:s.bi.Japanese,kk:s.bi.EastEuropean,ko:s.bi.Korean,lt:s.bi.EastEuropean,lv:s.bi.EastEuropean,pl:s.bi.EastEuropean,ru:s.bi.Cyrillic,sk:s.bi.EastEuropean,"sr-latn":s.bi.EastEuropean,th:s.bi.Thai,tr:s.bi.EastEuropean,uk:s.bi.Cyrillic,vi:s.bi.Vietnamese,"zh-hans":s.bi.ChineseSimplified,"zh-hant":s.bi.ChineseTraditional,hy:s.bi.Armenian,ka:s.bi.Georgian};function f(t,n,i){return{fontFamily:i,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:t,fontWeight:n}}var v,h,p,g=i(543),y=i(338),m=i(468),b="language",x=(h=function(t){for(var n in d)if(d.hasOwnProperty(n)&&t&&0===n.indexOf(t))return d[n];return c}(function(t){if(void 0===t&&(t="sessionStorage"),void 0===v){var n=(0,g.Y)(),i="localStorage"===t?function(t){var n=null;try{var i=(0,y.z)();n=i?i.localStorage.getItem(t):null}catch(t){}return n}(b):"sessionStorage"===t?m.G(b):void 0;i&&(v=i),void 0===v&&n&&(v=n.documentElement.getAttribute("lang")),void 0===v&&(v="en")}return v}()),p="".concat(h,", ").concat("'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif"),{tiny:f(s.s.mini,s.BO.regular,p),xSmall:f(s.s.xSmall,s.BO.regular,p),small:f(s.s.small,s.BO.regular,p),smallPlus:f(s.s.smallPlus,s.BO.regular,p),medium:f(s.s.medium,s.BO.regular,p),mediumPlus:f(s.s.mediumPlus,s.BO.regular,p),large:f(s.s.large,s.BO.regular,p),xLarge:f(s.s.xLarge,s.BO.semibold,p),xLargePlus:f(s.s.xLargePlus,s.BO.semibold,p),xxLarge:f(s.s.xxLarge,s.BO.semibold,p),xxLargePlus:f(s.s.xxLargePlus,s.BO.semibold,p),superLarge:f(s.s.superLarge,s.BO.semibold,p),mega:f(s.s.mega,s.BO.semibold,p)});function w(t,n,i,e){!function(t){var n=a.nr.getInstance(),i=(0,l.bz)((0,u.Iy)(),t);if(!n.classNameFromKey(i)){var e=n.getClassName();n.insertRule("@font-face{".concat(i,"}"),!0),n.cacheClassName(e,i,[],["font-face",i])}}({fontFamily:t="'".concat(t,"'"),src:(void 0!==e?"local('".concat(e,"'),"):"")+"url('".concat(n,".woff2') format('woff2'),")+"url('".concat(n,".woff') format('woff')"),fontWeight:i,fontStyle:"normal",fontDisplay:"swap"})}function M(t,n,i,e,r){void 0===e&&(e="segoeui");var o="".concat(t,"/").concat(i,"/").concat(e);w(n,o+"-light",s.BO.light,r&&r+" Light"),w(n,o+"-semilight",s.BO.semilight,r&&r+" SemiLight"),w(n,o+"-regular",s.BO.regular,r),w(n,o+"-semibold",s.BO.semibold,r&&r+" SemiBold"),w(n,o+"-bold",s.BO.bold,r&&r+" Bold")}function C(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=0,r=n;e<r.length;e++)k(t||{},r[e]);return t}function k(t,n,i){for(var e in void 0===i&&(i=[]),i.push(n),n)if(n.hasOwnProperty(e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var r=n[e];if("object"!=typeof r||null===r||Array.isArray(r))t[e]=r;else{var o=i.indexOf(r)>-1;t[e]=o?r:k(t[e]||{},r,i)}}return i.pop(),t}!function(t){if(t){var n="".concat(t,"/fonts");M(n,s.Dn.Thai,"leelawadeeui-thai","leelawadeeui"),M(n,s.Dn.Arabic,"segoeui-arabic"),M(n,s.Dn.Cyrillic,"segoeui-cyrillic"),M(n,s.Dn.EastEuropean,"segoeui-easteuropean"),M(n,s.Dn.Greek,"segoeui-greek"),M(n,s.Dn.Hebrew,"segoeui-hebrew"),M(n,s.Dn.Vietnamese,"segoeui-vietnamese"),M(n,s.Dn.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),M(n,s.bi.Selawik,"selawik","selawik"),M(n,s.Dn.Armenian,"segoeui-armenian"),M(n,s.Dn.Georgian,"segoeui-georgian"),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-semilight"),s.BO.light),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-bold"),s.BO.semibold)}}(function(){var t,n,i=null===(t=(0,y.z)())||void 0===t?void 0:t.FabricConfig;return null!==(n=null==i?void 0:i.fontBaseUrl)&&void 0!==n?n:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var A=i(823);function S(t,n,i,e,r){return void 0===r&&(r=!1),function(t,n){var i="";return!0===n&&(i=" /* @deprecated */"),t.listTextColor=t.listText+i,t.menuItemBackgroundChecked+=i,t.warningHighlight+=i,t.warningText=t.messageText+i,t.successText+=i,t}(L(t,n,(0,A.Cl)({primaryButtonBorder:"transparent",errorText:e?"#F1707B":"#a4262c",messageText:e?"#F3F2F1":"#323130",messageLink:e?"#6CB8F6":"#005A9E",messageLinkHovered:e?"#82C7FF":"#004578",infoIcon:e?"#C8C6C4":"#605e5c",errorIcon:e?"#F1707B":"#A80000",blockingIcon:e?"#442726":"#FDE7E9",warningIcon:e?"#C8C6C4":"#797775",severeWarningIcon:e?"#FCE100":"#D83B01",successIcon:e?"#92C353":"#107C10",infoBackground:e?"#323130":"#f3f2f1",errorBackground:e?"#442726":"#FDE7E9",blockingBackground:e?"#442726":"#FDE7E9",warningBackground:e?"#433519":"#FFF4CE",severeWarningBackground:e?"#4F2A0F":"#FED9CC",successBackground:e?"#393D1B":"#DFF6DD",warningHighlight:e?"#fff100":"#ffb900",successText:e?"#92c353":"#107C10"},i),e),r)}function L(t,n,i,e,r){void 0===r&&(r=!1);var o={},u=t||{},a=u.white,l=u.black,s=u.themePrimary,c=u.themeDark,d=u.themeDarker,f=u.themeDarkAlt,v=u.themeLighter,h=u.neutralLight,p=u.neutralLighter,g=u.neutralDark,y=u.neutralQuaternary,m=u.neutralQuaternaryAlt,b=u.neutralPrimary,x=u.neutralSecondary,w=u.neutralSecondaryAlt,M=u.neutralTertiary,C=u.neutralTertiaryAlt,k=u.neutralLighterAlt,S=u.accent;return a&&(o.bodyBackground=a,o.bodyFrameBackground=a,o.accentButtonText=a,o.buttonBackground=a,o.primaryButtonText=a,o.primaryButtonTextHovered=a,o.primaryButtonTextPressed=a,o.inputBackground=a,o.inputForegroundChecked=a,o.listBackground=a,o.menuBackground=a,o.cardStandoutBackground=a),l&&(o.bodyTextChecked=l,o.buttonTextCheckedHovered=l),s&&(o.link=s,o.primaryButtonBackground=s,o.inputBackgroundChecked=s,o.inputIcon=s,o.inputFocusBorderAlt=s,o.menuIcon=s,o.menuHeader=s,o.accentButtonBackground=s),c&&(o.primaryButtonBackgroundPressed=c,o.inputBackgroundCheckedHovered=c,o.inputIconHovered=c),d&&(o.linkHovered=d),f&&(o.primaryButtonBackgroundHovered=f),v&&(o.inputPlaceholderBackgroundChecked=v),h&&(o.bodyBackgroundChecked=h,o.bodyFrameDivider=h,o.bodyDivider=h,o.variantBorder=h,o.buttonBackgroundCheckedHovered=h,o.buttonBackgroundPressed=h,o.listItemBackgroundChecked=h,o.listHeaderBackgroundPressed=h,o.menuItemBackgroundPressed=h,o.menuItemBackgroundChecked=h),p&&(o.bodyBackgroundHovered=p,o.buttonBackgroundHovered=p,o.buttonBackgroundDisabled=p,o.buttonBorderDisabled=p,o.primaryButtonBackgroundDisabled=p,o.disabledBackground=p,o.listItemBackgroundHovered=p,o.listHeaderBackgroundHovered=p,o.menuItemBackgroundHovered=p),y&&(o.primaryButtonTextDisabled=y,o.disabledSubtext=y),m&&(o.listItemBackgroundCheckedHovered=m),M&&(o.disabledBodyText=M,o.variantBorderHovered=(null==i?void 0:i.variantBorderHovered)||M,o.buttonTextDisabled=M,o.inputIconDisabled=M,o.disabledText=M),b&&(o.bodyText=b,o.actionLink=b,o.buttonText=b,o.inputBorderHovered=b,o.inputText=b,o.listText=b,o.menuItemText=b),k&&(o.bodyStandoutBackground=k,o.defaultStateBackground=k),g&&(o.actionLinkHovered=g,o.buttonTextHovered=g,o.buttonTextChecked=g,o.buttonTextPressed=g,o.inputTextHovered=g,o.menuItemTextHovered=g),x&&(o.bodySubtext=x,o.focusBorder=x,o.inputBorder=x,o.smallInputBorder=x,o.inputPlaceholderText=x),w&&(o.buttonBorder=w),C&&(o.disabledBodySubtext=C,o.disabledBorder=C,o.buttonBackgroundChecked=C,o.menuDivider=C),S&&(o.accentButtonBackground=S),(null==n?void 0:n.elevation4)&&(o.cardShadow=n.elevation4),!e&&(null==n?void 0:n.elevation8)?o.cardShadowHovered=n.elevation8:o.variantBorderHovered&&(o.cardShadowHovered="0 0 1px "+o.variantBorderHovered),(0,A.Cl)((0,A.Cl)({},o),i)}var V={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function D(t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var i=!!t.isInverted;return function(t,n){var i,e,r;void 0===n&&(n={});var o=C({},t,n,{semanticColors:L(n.palette,n.effects,n.semanticColors,void 0===n.isInverted?t.isInverted:n.isInverted)});if((null===(i=n.palette)||void 0===i?void 0:i.themePrimary)&&!(null===(e=n.palette)||void 0===e?void 0:e.accent)&&(o.palette.accent=n.palette.themePrimary),n.defaultFontStyle)for(var u=0,a=Object.keys(o.fonts);u<a.length;u++){var l=a[u];o.fonts[l]=C(o.fonts[l],n.defaultFontStyle,null===(r=null==n?void 0:n.fonts)||void 0===r?void 0:r[l])}return o}({palette:r.b,effects:o,fonts:x,spacing:V,isInverted:i,disableGlobalClassNames:!1,semanticColors:S(r.b,o,void 0,i,n),rtl:void 0},t)}},259:function(t,n,i){i.d(n,{jI:function(){return l}});var e,r=i(543),o=i(468),u=i(800),a="isRTL";function l(t){if(void 0===t&&(t={}),void 0!==t.rtl)return t.rtl;if(void 0===e){var n=(0,o.G)(a);null!==n&&function(t,n){void 0===n&&(n=!1);var i=(0,r.Y)();i&&i.documentElement.setAttribute("dir",t?"rtl":"ltr"),n&&(0,o.S)(a,t?"1":"0"),e=t,(0,u.DU)(e)}(e="1"===n);var i=(0,r.Y)();void 0===e&&i&&(e="rtl"===(i.body&&i.body.getAttribute("dir")||i.documentElement.getAttribute("dir")),(0,u.DU)(e))}return!!e}},263:function(t,n,i){i.d(n,{J:function(){return r}});var e=i(419),r=function(t){var n,i,r,o=t.color,u=t.XValue,a=t.theme,l=t.isRatioPresent,s=void 0!==l&&l;return{calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:a.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[a.fonts.small,{lineHeight:"16px",opacity:"0.85",color:a.semanticColors.bodySubtext}],calloutBlockContainer:[a.fonts.xxLarge,{marginTop:u?"13px":"unset",paddingLeft:"8px",lineHeight:"22px",color:a.semanticColors.bodyText,borderLeft:"4px solid ".concat(o),selectors:(n={},n[e.up]={forcedColorAdjust:"none"},n)}],calloutlegendText:[a.fonts.small,{lineHeight:"16px",color:a.semanticColors.bodyText,selectors:(i={},i[e.up]={color:"CanvasText"},i)}],calloutContentY:[a.fonts.xxLarge,{color:o||a.semanticColors.bodyText,fontWeight:"bold",lineHeight:"36px",selectors:(r={},r[e.up]={color:"CanvasText"},r)}],calloutInfoContainer:[s&&{display:"flex",alignItems:"flex-end"}],ratio:[a.fonts.small,{marginLeft:"6px",color:a.semanticColors.bodyText}],numerator:{fontWeight:e.BO.bold},denominator:{fontWeight:e.BO.semibold},descriptionMessage:[a.fonts.small,{color:a.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(a.semanticColors.menuDivider)}]}}},289:function(t,n,i){i.d(n,{Ae:function(){return L},bz:function(){return A},kG:function(){return V},GJ:function(){return S}});var e,r=i(823),o=i(40),u={},a={"user-select":1};function l(t,n){var i=function(){var t;if(!e){var n="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,r=null===(t=null==i?void 0:i.userAgent)||void 0===t?void 0:t.toLowerCase();e=n?{isWebkit:!(!n||!("WebkitAppearance"in n.documentElement.style)),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!i||!/rv:11.0/i.test(i.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return e}(),r=t[n];if(a[r]){var o=t[n+1];a[r]&&(i.isWebkit&&t.push("-webkit-"+r,o),i.isMoz&&t.push("-moz-"+r,o),i.isMs&&t.push("-ms-"+r,o),i.isOpera&&t.push("-o-"+r,o))}}var s,c=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(t,n){var i=t[n],e=t[n+1];if("number"==typeof e){var r=c.indexOf(i)>-1,o=i.indexOf("--")>-1,u=r||o?"":"px";t[n+1]="".concat(e).concat(u)}}var f="left",v="right",h="@noflip",p=((s={})[f]=v,s[v]=f,s),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function y(t,n,i){if(t.rtl){var e=n[i];if(!e)return;var r=n[i+1];if("string"==typeof r&&r.indexOf(h)>=0)n[i+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(e.indexOf(f)>=0)n[i]=e.replace(f,v);else if(e.indexOf(v)>=0)n[i]=e.replace(v,f);else if(String(r).indexOf(f)>=0)n[i+1]=r.replace(f,v);else if(String(r).indexOf(v)>=0)n[i+1]=r.replace(v,f);else if(p[e])n[i]=p[e];else if(g[r])n[i+1]=g[r];else switch(e){case"margin":case"padding":n[i+1]=function(t){if("string"==typeof t){var n=t.split(" ");if(4===n.length)return"".concat(n[0]," ").concat(n[3]," ").concat(n[2]," ").concat(n[1])}return t}(r);break;case"box-shadow":n[i+1]=function(t){var n=t.split(" "),i=parseInt(n[0],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r)}}}var m="displayName",b=/\:global\((.+?)\)/g;function x(t,n){return t.indexOf(":global(")>=0?t.replace(b,"$1"):0===t.indexOf(":host(")?t:0===t.indexOf(":")?n+t:t.indexOf("&")<0?n+" "+t:t}function w(t,n,i,e,r){void 0===n&&(n={__order:[]}),0===i.indexOf("@")?M([e],n,i=i+"{"+t,r):i.indexOf(",")>-1?function(t){if(!b.test(t))return t;for(var n=[],i=/\:global\((.+?)\)/g,e=null;e=i.exec(t);)e[1].indexOf(",")>-1&&n.push([e.index,e.index+e[0].length,e[1].split(",").map((function(t){return":global(".concat(t.trim(),")")})).join(", ")]);return n.reverse().reduce((function(t,n){var i=n[0],e=n[1],r=n[2];return t.slice(0,i)+r+t.slice(e)}),t)}(i).split(",").map((function(t){return t.trim()})).forEach((function(i){return M([e],n,x(i,t),r)})):M([e],n,x(i,t),r)}function M(t,n,i,e){void 0===n&&(n={__order:[]}),void 0===i&&(i="&");var r,o=n[i];o||(o={},n[i]=o,n.__order.push(i));for(var u=0,a=t;u<a.length;u++){var l=a[u];if("string"==typeof l){var s=e.argsFromClassName(l);s&&M(s,n,i,e)}else if(Array.isArray(l))M(l,n,i,e);else for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];if("selectors"===c){var f=l.selectors;for(var v in f)f.hasOwnProperty(v)&&w(i,n,v,f[v],e)}else"object"==typeof d||(r=c).indexOf(":global(")>=0||0===r.indexOf(":")?null!=d&&w(i,n,c,d,e):void 0!==d&&("margin"===c||"padding"===c?C(o,c,d):o[c]=d)}}return n}function C(t,n,i){var e="string"==typeof i?function(t){for(var n=[],i=0,e=0,r=0;r<t.length;r++)switch(t[r]){case"(":e++;break;case")":e&&e--;break;case"\t":case" ":e||(r>i&&n.push(t.substring(i,r)),i=r+1)}return i<t.length&&n.push(t.substring(i)),n}(i):[i];0===e.length&&e.push(i),"!important"===e[e.length-1]&&(e=e.slice(0,-1).map((function(t){return t+" !important"}))),t[n+"Top"]=e[0],t[n+"Right"]=e[1]||e[0],t[n+"Bottom"]=e[2]||e[0],t[n+"Left"]=e[3]||e[1]||e[0]}function k(t,n){return n<=0?"":1===n?t:t+k(t,n-1)}function A(t,n){if(!n)return"";var i,e,r,o=[];for(var a in n)n.hasOwnProperty(a)&&a!==m&&void 0!==n[a]&&o.push(a,n[a]);for(var s=0;s<o.length;s+=2)r=void 0,"-"!==(r=(i=o)[e=s]).charAt(0)&&(i[e]=u[r]=u[r]||r.replace(/([A-Z])/g,"-$1").toLowerCase()),d(o,s),y(t,o,s),l(o,s);for(s=1;s<o.length;s+=4)o.splice(s,1,":",o[s],";");return o.join("")}function S(t){for(var n,i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var r=null!==(n=t.stylesheet)&&void 0!==n?n:o.nr.getInstance(t.shadowConfig),u=M(i,void 0,void 0,r),a=function(t,n){for(var i=[t.rtl?"rtl":"ltr"],e=!1,r=0,o=n.__order;r<o.length;r++){var u=o[r];i.push(u);var a=n[u];for(var l in a)a.hasOwnProperty(l)&&void 0!==a[l]&&(e=!0,i.push(l,a[l]))}return e?i.join(""):void 0}(t,u);if(a){var l={className:r.classNameFromKey(a),key:a,args:i};if(!l.className){l.className=r.getClassName(function(t){var n=t&&t["&"];return n?n.displayName:void 0}(u));for(var s=[],c=0,d=u.__order;c<d.length;c++){var f=d[c];s.push(f,A(t,u[f]))}l.rulesToInsert=s}return l}}function L(t,n,i,e){void 0===n&&(n=1);var r=null!=e?e:o.nr.getInstance(i),u=t.className,a=t.key,l=t.args,s=t.rulesToInsert;if(s){for(var c=0;c<s.length;c+=2){var d=s[c+1];if(d){var f=s[c];f=f.replace(/&/g,k(".".concat(t.className),n));var v="".concat(f,"{").concat(d,"}").concat(0===f.indexOf("@")?"}":"");r.insertRule(v)}}r.cacheClassName(u,a,l,s)}}function V(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=S.apply(void 0,(0,r.fX)([t],n,!1));return e?(L(e,t.specificityMultiplier,t.shadowConfig,t.stylesheet),e.className):""}},302:function(t,n,i){i.d(n,{b:function(){return e}});var e={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"}},338:function(t,n,i){i.d(n,{z:function(){return o}});var e=i(921),r=void 0;try{r=window}catch(t){}function o(t){if((0,e.S)()&&void 0!==r){var n=t;return n&&n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView:r}}},357:function(t,n,i){i.r(n),i.d(n,{ChartHoverCard:function(){return d}});var e=i(566),r=i(823),o=i(594),u=i(873),a=i(61),l=(0,u.Z)(),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.color,i=t.Legend,e=t.XValue,r=t.YValue,u=t.styles,s=t.theme,c=t.ratio,d=t.descriptionMessage,f=t.culture;return this._classNames=l(u,{theme:s,color:n,XValue:e,isRatioPresent:!!c}),o.createElement("div",{className:this._classNames.calloutContentRoot},o.createElement("div",{className:this._classNames.calloutDateTimeContainer},o.createElement("div",{className:this._classNames.calloutContentX},e," ")),o.createElement("div",{className:this._classNames.calloutInfoContainer},o.createElement("div",{className:this._classNames.calloutBlockContainer},o.createElement("div",{className:this._classNames.calloutlegendText},(0,a.c$)(i,f)),o.createElement("div",{className:this._classNames.calloutContentY},(0,a.c$)(r,f))),!!c&&o.createElement("div",{className:this._classNames.ratio},o.createElement(o.Fragment,null,o.createElement("span",{className:this._classNames.numerator},(0,a.c$)(c[0],f)),"/",o.createElement("span",{className:this._classNames.denominator},(0,a.c$)(c[1],f))))),!!d&&o.createElement("div",{className:this._classNames.descriptionMessage},d))},n}(o.Component),c=i(263),d=(0,e.I)(s,c.J)},419:function(t,n,i){i.d(n,{lw:function(){return K},bp:function(){return Ct.b},s:function(){return kt.s},BO:function(){return kt.BO},up:function(){return it},nA:function(){return nt},QN:function(){return ot},gm:function(){return rt},Km:function(){return tt},O4:function(){return Mt},dX:function(){return J},Zq:function(){return e.Z}});var e=i(916),r=i(800),o=i(40),u=i(289);function a(t){var n=o.nr.getInstance(),i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e,"{",(0,u.bz)((0,r.Iy)(),t[e]),"}");var a=i.join(""),l=n.classNameFromKey(a);if(l)return l;var s=n.getClassName();return n.insertRule("@keyframes ".concat(s,"{").concat(a,"}"),!0),n.cacheClassName(s,a,[],["keyframes",a]),s}var l="cubic-bezier(.1,.9,.2,1)",s="cubic-bezier(.1,.25,.75,.9)",c="0.167s",d="0.267s",f="0.367s",v="0.467s",h=a({from:{opacity:0},to:{opacity:1}}),p=a({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),g=G(-10),y=G(-20),m=G(-40),b=G(-400),x=G(10),w=G(20),M=G(40),C=G(400),k=U(10),A=U(20),S=U(-10),L=U(-20),V=q(10),D=q(20),N=q(40),O=q(400),T=q(-10),E=q(-20),F=q(-40),B=q(-400),P=Z(-10),_=Z(-20),H=Z(10),I=Z(20),W=a({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),R=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),z=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),j=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),$=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),Y=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}});function X(t,n,i){return{animationName:t,animationDuration:n,animationTimingFunction:i,animationFillMode:"both"}}function G(t){return a({from:{transform:"translate3d(".concat(t,"px,0,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function U(t){return a({from:{transform:"translate3d(0,".concat(t,"px,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function q(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(".concat(t,"px,0,0)")}})}function Z(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,".concat(t,"px,0)")}})}var K=function(t){var n={},i=function(i){var r;t.hasOwnProperty(i)&&Object.defineProperty(n,i,{get:function(){return void 0===r&&(r=(0,e.Z)(t[i]).toString()),r},enumerable:!0,configurable:!0})};for(var r in t)i(r);return n}({slideRightIn10:X("".concat(h,",").concat(g),f,l),slideRightIn20:X("".concat(h,",").concat(y),f,l),slideRightIn40:X("".concat(h,",").concat(m),f,l),slideRightIn400:X("".concat(h,",").concat(b),f,l),slideLeftIn10:X("".concat(h,",").concat(x),f,l),slideLeftIn20:X("".concat(h,",").concat(w),f,l),slideLeftIn40:X("".concat(h,",").concat(M),f,l),slideLeftIn400:X("".concat(h,",").concat(C),f,l),slideUpIn10:X("".concat(h,",").concat(k),f,l),slideUpIn20:X("".concat(h,",").concat(A),f,l),slideDownIn10:X("".concat(h,",").concat(S),f,l),slideDownIn20:X("".concat(h,",").concat(L),f,l),slideRightOut10:X("".concat(p,",").concat(V),f,l),slideRightOut20:X("".concat(p,",").concat(D),f,l),slideRightOut40:X("".concat(p,",").concat(N),f,l),slideRightOut400:X("".concat(p,",").concat(O),f,l),slideLeftOut10:X("".concat(p,",").concat(T),f,l),slideLeftOut20:X("".concat(p,",").concat(E),f,l),slideLeftOut40:X("".concat(p,",").concat(F),f,l),slideLeftOut400:X("".concat(p,",").concat(B),f,l),slideUpOut10:X("".concat(p,",").concat(P),f,l),slideUpOut20:X("".concat(p,",").concat(_),f,l),slideDownOut10:X("".concat(p,",").concat(H),f,l),slideDownOut20:X("".concat(p,",").concat(I),f,l),scaleUpIn100:X("".concat(h,",").concat(W),f,l),scaleDownIn100:X("".concat(h,",").concat(z),f,l),scaleUpOut103:X("".concat(p,",").concat(j),c,s),scaleDownOut98:X("".concat(p,",").concat(R),c,s),fadeIn100:X(h,c,s),fadeIn200:X(h,d,s),fadeIn400:X(h,f,s),fadeIn500:X(h,v,s),fadeOut100:X(p,c,s),fadeOut200:X(p,d,s),fadeOut400:X(p,f,s),fadeOut500:X(p,v,s),rotate90deg:X($,"0.1s",s),rotateN90deg:X(Y,"0.1s",s)}),J={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",whiteSpace:"nowrap"},Q=(0,i(753).J9)((function(t,n){var i=o.nr.getInstance();return n?Object.keys(t).reduce((function(n,e){return n[e]=i.getClassName(t[e]),n}),{}):t}));function tt(t,n,i){return Q(t,void 0!==i?i:n.disableGlobalClassNames)}var nt,it="@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)",et=i(517);function rt(t,n,i,e,r,o,u,a){return function(t,n){var i,e;void 0===n&&(n={});var r=n.borderRadius,o=n.inset,u=void 0===o?0:o,a=n.width,l=void 0===a?1:a,s=n.position,c=void 0===s?"relative":s,d=n.highContrastStyle,f=n.borderColor,v=void 0===f?t.palette.white:f,h=n.outlineColor,p=void 0===h?t.palette.neutralSecondary:h,g=n.isFocusedOnly,y=void 0===g||g,m=n.pointerEvents;return{outline:"transparent",position:c,selectors:(i={"::-moz-focus-inner":{border:"0"}},i[".".concat(et.Y2," &").concat(y?":focus":"",":after, :host(.").concat(et.Y2,") &").concat(y?":focus":"",":after")]={content:'""',position:"absolute",pointerEvents:m,left:u+1,top:u+1,bottom:u+1,right:u+1,border:"".concat(l,"px solid ").concat(v),outline:"".concat(l,"px solid ").concat(p),zIndex:nt.FocusStyle,borderRadius:r,selectors:(e={},e[it]=d,e)},i)}}(t,"number"!=typeof n&&n?n:{inset:n,position:i,highContrastStyle:e,borderColor:r,outlineColor:o,isFocusedOnly:u,borderRadius:a})}function ot(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(t){t.Nav=1,t.ScrollablePane=1,t.FocusStyle=1,t.Coachmark=1e3,t.Layer=1e6,t.KeytipLayer=1000001}(nt||(nt={}));var ut,at=i(823),lt=i(338),st=i(540),ct=function(){return ct=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},ct.apply(this,arguments)},dt="undefined"==typeof window?i.g:window,ft=dt&&dt.CSPSettings&&dt.CSPSettings.nonce,vt=((ut=dt.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(ut=ct({},ut,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),ut.registeredThemableStyles||(ut=ct({},ut,{registeredThemableStyles:[]})),dt.__themeState__=ut,ut);function ht(t){vt.theme=t,function(){if(vt.theme){for(var t=[],n=0,i=vt.registeredThemableStyles;n<i.length;n++){var e=i[n];t.push(e.themableStyle)}t.length>0&&(void 0===(o=1)&&(o=3),3!==o&&2!==o||(pt(vt.registeredStyles),vt.registeredStyles=[]),3!==o&&1!==o||(pt(vt.registeredThemableStyles),vt.registeredThemableStyles=[]),r=[].concat.apply([],t),vt.loadStyles?vt.loadStyles(gt(r).styleString,r):function(t){if("undefined"!=typeof document){var n=document.getElementsByTagName("head")[0],i=document.createElement("style"),e=gt(t),r=e.styleString,o=e.themable;i.setAttribute("data-load-themed-styles","true"),i.type="text/css",ft&&i.setAttribute("nonce",ft),i.appendChild(document.createTextNode(r)),vt.perf.count++,n.appendChild(i);var u=document.createEvent("HTMLEvents");u.initEvent("styleinsert",!0,!1),u.args={newStyle:i},document.dispatchEvent(u);var a={styleElement:i,themableStyle:t};o?vt.registeredThemableStyles.push(a):vt.registeredStyles.push(a)}}(r))}var r,o}()}function pt(t){t.forEach((function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)}))}function gt(t){var n=vt.theme,i=!1;return{styleString:(t||[]).map((function(t){var e=t.theme;if(e){i=!0;var r=n?n[e]:void 0,o=t.defaultValue||"inherit";return n&&!r&&console&&!(e in n)&&"undefined"!=typeof DEBUG&&DEBUG&&console.warn('Theming value not provided for "'+e+'". Falling back to "'+o+'".'),r||o}return t.rawString})).join(""),themable:i}}var yt=i(143),mt=(0,yt.a)({}),bt=[],xt="theme";function wt(){var t,n,i,e=(0,lt.z)();(null===(n=null==e?void 0:e.FabricConfig)||void 0===n?void 0:n.legacyTheme)?function(t,n){var i;void 0===n&&(n=!1),mt=(0,yt.a)(t,n),ht((0,at.Cl)((0,at.Cl)((0,at.Cl)((0,at.Cl)({},mt.palette),mt.semanticColors),mt.effects),function(t){for(var n={},i=0,e=Object.keys(t.fonts);i<e.length;i++)for(var r=e[i],o=t.fonts[r],u=0,a=Object.keys(o);u<a.length;u++){var l=a[u],s=r+l.charAt(0).toUpperCase()+l.slice(1),c=o[l];"fontSize"===l&&"number"==typeof c&&(c+="px"),n[s]=c}return n}(mt))),st.X.applySettings(((i={})[xt]=mt,i)),bt.forEach((function(t){try{t(mt)}catch(t){}}))}(e.FabricConfig.legacyTheme):st.X.getSettings([xt]).theme||((null===(i=null==e?void 0:e.FabricConfig)||void 0===i?void 0:i.theme)&&(mt=(0,yt.a)(e.FabricConfig.theme)),st.X.applySettings(((t={})[xt]=mt,t)))}function Mt(t){return void 0===t&&(t=!1),!0===t&&(mt=(0,yt.a)({},t)),mt}wt();var Ct=i(302),kt=i(41);(0,i(887).v)("@fluentui/style-utilities","8.15.1"),wt()},468:function(t,n,i){i.d(n,{G:function(){return r},S:function(){return o}});var e=i(338);function r(t){var n=null;try{var i=(0,e.z)();n=i?i.sessionStorage.getItem(t):null}catch(t){}return n}function o(t,n){var i;try{null===(i=(0,e.z)())||void 0===i||i.sessionStorage.setItem(t,n)}catch(t){}}},506:function(t,n,i){i.d(n,{T:function(){return o}});var e=i(823),r=i(638);function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t&&1===t.length&&t[0]&&!t[0].subComponentStyles&&!(0,r.db)(t[0]))return t[0];for(var i={},u={},a=0,l=t;a<l.length;a++){var s=l[a];if(s&&!(0,r.db)(s))for(var c in s)if(s.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==s.subComponentStyles){var d=s.subComponentStyles;for(var f in d)d.hasOwnProperty(f)&&(u.hasOwnProperty(f)?u[f].push(d[f]):u[f]=[d[f]]);continue}var v=i[c],h=s[c];i[c]=void 0===v?h:(0,e.fX)((0,e.fX)([],Array.isArray(v)?v:[v],!0),Array.isArray(h)?h:[h],!0)}}if(Object.keys(u).length>0){i.subComponentStyles={};var p=i.subComponentStyles,g=function(t){if(u.hasOwnProperty(t)){var n=u[t];p[t]=function(t){return o.apply(void 0,n.map((function(n){return"function"==typeof n?n(t):n})))}}};for(var f in u)g(f)}return i}},517:function(t,n,i){i.d(n,{Y2:function(){return e}});var e="ms-Fabric--isFocusVisible"},540:function(t,n,i){i.d(n,{X:function(){return h}});var e=i(823),r=i(338),o="__globalSettings__",u="__callbacks__",a=0,l=function(){function t(){}return t.getValue=function(t,n){var i=s();return void 0===i[t]&&(i[t]="function"==typeof n?n():n),i[t]},t.setValue=function(t,n){var i=s(),e=i[u],r=i[t];if(n!==r){i[t]=n;var o={oldValue:r,value:n,key:t};for(var a in e)e.hasOwnProperty(a)&&e[a](o)}return n},t.addChangeListener=function(t){var n=t.__id__,i=c();n||(n=t.__id__=String(a++)),i[n]=t},t.removeChangeListener=function(t){delete c()[t.__id__]},t}();function s(){var t,n=(0,r.z)()||{};return n[o]||(n[o]=((t={})[u]={},t)),n[o]}function c(){return s()[u]}var d={settings:{},scopedSettings:{},inCustomizerContext:!1},f=l.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),v=[],h=function(){function t(){}return t.reset=function(){f.settings={},f.scopedSettings={}},t.applySettings=function(n){f.settings=(0,e.Cl)((0,e.Cl)({},f.settings),n),t._raiseChange()},t.applyScopedSettings=function(n,i){f.scopedSettings[n]=(0,e.Cl)((0,e.Cl)({},f.scopedSettings[n]),i),t._raiseChange()},t.getSettings=function(t,n,i){void 0===i&&(i=d);for(var e={},r=n&&i.scopedSettings[n]||{},o=n&&f.scopedSettings[n]||{},u=0,a=t;u<a.length;u++){var l=a[u];e[l]=r[l]||i.settings[l]||o[l]||f.settings[l]}return e},t.applyBatchedUpdates=function(n,i){t._suppressUpdates=!0;try{n()}catch(t){}t._suppressUpdates=!1,i||t._raiseChange()},t.observe=function(t){v.push(t)},t.unobserve=function(t){v=v.filter((function(n){return n!==t}))},t._raiseChange=function(){t._suppressUpdates||v.forEach((function(t){return t()}))},t}()},543:function(t,n,i){i.d(n,{Y:function(){return r}});var e=i(921);function r(t){if((0,e.S)()&&"undefined"!=typeof document){var n=t;return n&&n.ownerDocument?n.ownerDocument:document}}},566:function(t,n,i){i.d(n,{I:function(){return v}});var e=i(823),r=i(594),o=i(506),u=i(638),a=function(){return!1},l=function(){},s=r.createContext({stylesheets:new Map,useAdoptedStylesheetEx:a,useAdoptedStylesheet:a,useShadowConfig:function(){return u.ou},useMergeStylesShadowRootContext:l,useHasMergeStylesShadowRootContext:a,useMergeStylesRootStylesheets:function(){return new Map},useWindow:l,useStyled:l}),c=function(){var t=r.useContext(s);return{useAdoptedStylesheet:t.useAdoptedStylesheet,useAdoptedStylesheetEx:t.useAdoptedStylesheetEx,useShadowConfig:t.useShadowConfig,useMergeStylesShadowRootContext:t.useMergeStylesShadowRootContext,useHasMergeStylesShadowRootContext:t.useHasMergeStylesShadowRootContext,useMergeStylesRootStylesheets:t.useMergeStylesRootStylesheets,useWindow:t.useWindow,useStyled:t.useStyled}},d=i(927),f=["theme","styles"];function v(t,n,i,u,a){var l=(u=u||{scope:"",fields:void 0}).scope,s=u.fields,v=void 0===s?f:s,h=r.forwardRef((function(u,a){var s=r.useRef(void 0),f=(0,d.m)(v,l),h=f.styles,p=(f.dir,(0,e.Tt)(f,["styles","dir"])),g=i?i(u):void 0,y=c().useStyled,m=s.current&&s.current.__cachedInputs__||[],b=u.styles;if(!s.current||h!==m[1]||b!==m[2]){var x=function(t){return function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=[],r=0,u=n;r<u.length;r++){var a=u[r];a&&e.push("function"==typeof a?a(t):a)}return 1===e.length?e[0]:e.length?o.T.apply(void 0,e):{}}(t,n,h,b)};x.__cachedInputs__=[n,h,b],x.__noStyleOverride__=!h&&!b,s.current=x}return s.current.__shadowConfig__=y(l),r.createElement(t,(0,e.Cl)({ref:a},p,g,u,{styles:s.current}))}));h.displayName="Styled".concat(t.displayName||t.name);var p=a?r.memo(h):h;return h.displayName&&(p.displayName=h.displayName),p}},594:function(t){t.exports=React},638:function(t,n,i){i.d(n,{P6:function(){return e},Se:function(){return r},db:function(){return u},ou:function(){return o}});var e="__global__",r="__shadow_dom_stylesheet__",o={stylesheetKey:e,inShadow:!1,window:void 0,__isShadowConfig__:!0},u=function(t){return!(!t||!function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}(t))&&!0===t.__isShadowConfig__}},753:function(t,n,i){i.d(n,{J5:function(){return d},J9:function(){return c}});var e=i(40),r=!1,o=0,u={empty:!0},a={},l="undefined"==typeof WeakMap?null:WeakMap;function s(){o++}function c(t,n,i){if(void 0===n&&(n=100),void 0===i&&(i=!1),!l)return t;if(!r){var c=e.nr.getInstance();c&&c.onReset&&e.nr.getInstance().onReset(s),r=!0}var d,v=0,h=o;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var l,s=d;(void 0===d||h!==o||n>0&&v>n)&&(d=f(),v=0,h=o),s=d;for(var c=0;c<e.length;c++){var p=(l=e[c])?"object"==typeof l||"function"==typeof l?l:(a[l]||(a[l]={val:l}),a[l]):u;s.map.has(p)||s.map.set(p,f()),s=s.map.get(p)}return s.hasOwnProperty("value")||(s.value=t.apply(void 0,e),v++),!i||null!==s.value&&void 0!==s.value||(s.value=t.apply(void 0,e)),s.value}}function d(t){if(!l)return t;var n=new l;return function(i){if(!i||"function"!=typeof i&&"object"!=typeof i)return t(i);if(n.has(i))return n.get(i);var e=t(i);return n.set(i,e),e}}function f(){return{map:l?new l:null}}},770:function(t,n,i){i.d(n,{z:function(){return e}});var e=i(594).createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},800:function(t,n,i){i.d(n,{DU:function(){return o},Iy:function(){return a}});var e,r=i(638);function o(t){e!==t&&(e=t)}function u(){return void 0===e&&(e="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),e}function a(){return{rtl:u(),shadowConfig:r.ou}}e=u()},823:function(t,n,i){i.d(n,{C6:function(){return r},Cl:function(){return o},Tt:function(){return u},YH:function(){return l},fX:function(){return s},sH:function(){return a}});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var o=function(){return o=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},o.apply(this,arguments)};function u(t,n){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(i[e[r]]=t[e[r]])}return i}function a(t,n,i,e){return new(i||(i=Promise))((function(r,o){function u(t){try{l(e.next(t))}catch(t){o(t)}}function a(t){try{l(e.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):function(t){return t instanceof i?t:new i((function(n){n(t)}))}(t.value).then(u,a)}l((e=e.apply(t,n||[])).next())}))}function l(t,n){var i,e,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(o=0)),o;)try{if(i=1,e&&(r=2&a[0]?e.return:a[0]?e.throw||((r=e.return)&&r.call(e),0):e.next)&&!(r=r.call(e,a[1])).done)return r;switch(e=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,e=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(t,o)}catch(t){a=[6,t],e=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function s(t,n,i){if(i||2===arguments.length)for(var e,r=0,o=n.length;r<o;r++)!e&&r in n||(e||(e=Array.prototype.slice.call(n,0,r)),e[r]=n[r]);return t.concat(e||Array.prototype.slice.call(n))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},873:function(t,n,i){i.d(n,{Z:function(){return g}});var e=i(40),r=i(823),o=i(506),u=i(962),a=i(289),l=i(638);var s=i(259),c=i(338),d=50,f=5,v=0,h=e.nr.getInstance();h&&h.onReset&&h.onReset((function(){return v++}));var p="__retval__";function g(t){void 0===t&&(t={});var n=new Map,i=0,h=0,g=v;return function(y,b){var x;if(void 0===b&&(b={}),t.useStaticStyles&&"function"==typeof y&&y.__noStyleOverride__)return y(b);h++;var w=y?y.__shadowConfig__:void 0,M=w&&w.window?w.window:"__default__";n.has(M)||n.set(M,new Map);var C=n.get(M),k=b.theme,A=k&&void 0!==k.rtl?k.rtl:(0,s.jI)(),S=t.disableCaching;if(g!==v&&(g=v,n.set(M,new Map),C=n.get(M),i=0),t.disableCaching||(C=m(n.get(M),y),C=m(C,b)),!S&&C[p]||(C[p]=void 0===y?{}:function(t,n){var i,s={subComponentStyles:{}},c=void 0;(0,l.db)(t[0])?(c=t[0],i=t[1]):i=t[0],null!=c||(c=null==n?void 0:n.shadowConfig);var d=(0,r.Cl)((0,r.Cl)({},n),{shadowConfig:c});if(!i&&t.length<=1)return{subComponentStyles:{}};var f=e.nr.getInstance(c);d.stylesheet=f;var v=o.T.apply(void 0,t),h=[];for(var p in v)if(v.hasOwnProperty(p)){if("subComponentStyles"===p){s.subComponentStyles=v.subComponentStyles||{};continue}if("__shadowConfig__"===p)continue;var g=v[p],y=(0,u.h)(f,g),m=y.classes,b=y.objects;(null==b?void 0:b.length)?(M=(0,a.GJ)(d||{},{displayName:p},b))&&(h.push(M),s[p]=m.concat([M.className]).join(" ")):s[p]=m.join(" ")}for(var x=0,w=h;x<w.length;x++){var M;(M=w[x])&&(0,a.Ae)(M,null==n?void 0:n.specificityMultiplier,c)}return s}(["function"==typeof y?y(b):y],{shadowConfig:y.__shadowConfig__,rtl:!!A,specificityMultiplier:t.useStaticStyles?f:void 0}),S||i++),i>(t.cacheSize||d)){var L=(0,c.z)();(null===(x=null==L?void 0:L.FabricConfig)||void 0===x?void 0:x.enableClassNameCacheFullWarning)&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(i,"/").concat(h,".")),console.trace()),n.get(M).clear(),i=0,t.disableCaching=!0}return C[p]}}function y(t,n){return n=function(t){switch(t){case void 0:return"__undefined__";case null:return"__null__";default:return t}}(n),t.has(n)||t.set(n,new Map),t.get(n)}function m(t,n){if("function"==typeof n)if(n.__cachedInputs__)for(var i=0,e=n.__cachedInputs__;i<e.length;i++)t=y(t,e[i]);else t=y(t,n);else if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&(t=y(t,n[r]));return t}},887:function(t,n,i){i.d(n,{v:function(){return o}});var e={},r=void 0;try{r=window}catch(t){}function o(t,n){if(void 0!==r){var i=r.__packages__=r.__packages__||{};i[t]&&e[t]||(e[t]=n,(i[t]=i[t]||[]).push(n))}}o("@fluentui/set-version","6.0.0")},916:function(t,n,i){i.d(n,{Z:function(){return l}});var e=i(962),r=i(638),o=i(800),u=i(40),a=i(289);function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(t,n){var i=t instanceof Array?t:[t],o=n||{};(0,r.db)(i[0])&&(o.shadowConfig=i[0]),o.stylesheet=u.nr.getInstance(o.shadowConfig);var l=(0,e.h)(o.stylesheet,i),s=l.classes,c=l.objects;return c.length&&s.push((0,a.kG)(o,c)),s.join(" ")}(t,(0,o.Iy)())}},921:function(t,n,i){function e(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}i.d(n,{S:function(){return e}})},927:function(t,n,i){i.d(n,{m:function(){return u}});var e=i(594),r=i(540),o=i(770);function u(t,n){var i,u=(i=e.useState(0)[1],function(){return i((function(t){return++t}))}),a=e.useContext(o.z).customizations,l=a.inCustomizerContext;return e.useEffect((function(){return l||r.X.observe(u),function(){l||r.X.unobserve(u)}}),[l]),r.X.getSettings(t,n,a)}},962:function(t,n,i){i.d(n,{h:function(){return r}});var e=i(638);function r(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=[],o=[],u=t;return function t(n){for(var i=0,a=n;i<a.length;i++){var l=a[i];if(l&&!(0,e.db)(l))if("string"==typeof l)if(l.indexOf(" ")>=0)t(l.split(" "));else{var s=u.argsFromClassName(l);s?t(s):-1===r.indexOf(l)&&r.push(l)}else Array.isArray(l)?t(l):"object"==typeof l&&o.push(l)}}(n),{classes:r,objects:o}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,{a:n}),n},i.d=function(t,n){for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};i.r(e),i.d(e,{AnnotationOnlyChart:function(){return Tg},AreaChart:function(){return Dh},CartesianChart:function(){return jv},ChartHoverCard:function(){return Cc.ChartHoverCard},ChartTable:function(){return vg},DataVizGradientPalette:function(){return kc},DataVizPalette:function(){return es},DeclarativeChart:function(){return qm},DonutChart:function(){return bv},FunnelChart:function(){return Mg},GanttChart:function(){return hm},GaugeChart:function(){return Vg},GaugeChartVariant:function(){return wg},GaugeValueFormat:function(){return xg},GroupedVerticalBarChart:function(){return ap},HeatMapChart:function(){return dp},HorizontalBarChart:function(){return pd},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return gg},Legends:function(){return bf},LineChart:function(){return ch},MultiStackedBarChart:function(){return zh},MultiStackedBarChartVariant:function(){return Fh},NodesComposition:function(){return Hp},PieChart:function(){return Hh},PolarChart:function(){return Tm},ResponsiveContainer:function(){return dm},SankeyChart:function(){return zp},ScatterChart:function(){return vh},Shape:function(){return of},Sparkline:function(){return sg},StackedBarChart:function(){return Yh},Textbox:function(){return ih},TreeChart:function(){return og},TreeTraverse:function(){return Ip},VerticalBarChart:function(){return tp},VerticalStackedBarChart:function(){return ep},getChartHoverCardStyles:function(){return lp.J},getColorFromToken:function(){return cs},getGradientFromToken:function(){return Oc},getNextColor:function(){return ss},getNextGradient:function(){return Nc},withResponsiveContainer:function(){return fm}});var r=i(566),o=i(823),u=i(594),a=i(873),l=i(259),s=i(338),c=i(40),d="__currentId__",f=(0,s.z)()||{};void 0===f[d]&&(f[d]=0);var v,h=!1;function p(t){if(!h){var n=c.nr.getInstance();n&&n.onReset&&n.onReset(g),h=!0}return(void 0===t?"id__":t)+f[d]++}function g(t){void 0===t&&(t=0),f[d]=t}function y(t,n,i){void 0===i&&(i=0);for(var e=-1,r=i;t&&r<t.length;r++)if(n(t[r],r)){e=r;break}return e}function m(t,n){var i=y(t,n);if(!(i<0))return t[i]}!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(v||(v={}));function b(t,n){var i,e;if(void 0===n&&(n=!0),!t)return null;var r=n&&function(t){var n,i;return t&&(i=t)&&i._virtual&&(n=t._virtual.parent),n}(t);return r||("function"!=typeof t.assignedElements&&(null===(i=t.assignedSlot)||void 0===i?void 0:i.parentNode)?t.assignedSlot:11===(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)?t.parentNode.host:t.parentNode)}function x(t,n,i){return null!=i||(i=document),!t||t===i.body||t instanceof Document?null:n(t)?t:x(b(t),n)}function w(t,n,i){void 0===i&&(i=!0);var e=!1;if(t&&n)if(i)if(t===n)e=!0;else for(e=!1;n;){var r=b(n);if(r===t){e=!0;break}n=r}else t.contains&&(e=t.contains(n));return e}var M=i(543);function C(t,n,i){var e=A(t,t,!0,!1,!1,!0,void 0,void 0,n,i);return!!e&&(T(e),!0)}function k(t,n,i,e,r,o,u,a,l){var s;if(!n||!u&&n===t)return null;var c=S(n);if(r&&c&&(o||!D(n)&&!N(n))){var d=k(t,n.lastElementChild||l&&(null===(s=n.shadowRoot)||void 0===s?void 0:s.lastElementChild),!0,!0,!0,o,u,a,l);if(d){if(a&&V(d,!0,l)||!a)return d;var f=k(t,d.previousElementSibling,!0,!0,!0,o,u,a,l);if(f)return f;for(var v=d.parentElement;v&&v!==n;){var h=k(t,v.previousElementSibling,!0,!0,!0,o,u,a,l);if(h)return h;v=v.parentElement}}}return i&&c&&V(n,a,l)?n:k(t,n.previousElementSibling,!0,!0,!0,o,u,a,l)||(e?null:k(t,n.parentElement,!0,!1,!1,o,u,a,l))}function A(t,n,i,e,r,o,u,a,l,s){var c;if(!n||n===t&&r&&!u)return null;var d=(l?L:S)(n);if(i&&d&&V(n,a,s))return n;if(!r&&d&&(o||!D(n)&&!N(n))){var f=A(t,n.firstElementChild||s&&(null===(c=n.shadowRoot)||void 0===c?void 0:c.firstElementChild),!0,!0,!1,o,u,a,l,s);if(f)return f}return n===t?null:A(t,n.nextElementSibling,!0,!0,!1,o,u,a,l,s)||(e?null:A(t,n.parentElement,!1,!1,!0,o,u,a,l,s))}function S(t){if(!t||!t.getAttribute)return!1;var n=t.getAttribute("data-is-visible");return null!=n?"true"===n:0!==t.offsetHeight||null!==t.offsetParent||!0===t.isVisible}function L(t,n){var i=null!=n?n:(0,s.z)();return!!t&&S(t)&&!t.hidden&&"hidden"!==i.getComputedStyle(t).visibility}function V(t,n,i){if(void 0===i&&(i=!0),!t||t.disabled)return!1;var e=0,r=null;t&&t.getAttribute&&(r=t.getAttribute("tabIndex"))&&(e=parseInt(r,10));var o=t.getAttribute?t.getAttribute("data-is-focusable"):null,u=null!==r&&e>=0,a=!(!i||!t.shadowRoot||!t.shadowRoot.delegatesFocus),l=!!t&&"false"!==o&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||"true"===o||u||a);return n?-1!==e&&l:l}function D(t){return!!(t&&t.getAttribute&&t.getAttribute("data-focuszone-id"))}function N(t){return!(!t||!t.getAttribute||"true"!==t.getAttribute("data-is-sub-focuszone"))}var O=void 0;function T(t){if(t){var n=(0,s.z)(t);n&&(void 0!==O&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame((function(){t&&t.focus(),O=void 0})))}}function E(t,n,i,e){return t.addEventListener(n,i,e),function(){return t.removeEventListener(n,i,e)}}function F(t,n){for(var i=(0,o.Cl)({},n),e=0,r=Object.keys(t);e<r.length;e++){var u=r[e];void 0===i[u]&&(i[u]=t[u])}return i}var B=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i={},e=0,r=t;e<r.length;e++)for(var o=r[e],u=0,a=Array.isArray(o)?o:Object.keys(o);u<a.length;u++)i[a[u]]=1;return i},P=B(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),_=B(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),H=B(_,P),I=(B(H,["form"]),B(H,["height","loop","muted","preload","src","width"])),W=(B(I,["poster"]),B(H,["start"]),B(H,["value"]),B(H,["download","href","hrefLang","media","rel","target","type"]),B(H,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"])),R=(B(W,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),B(W,["autoCapitalize","cols","dirname","form","maxLength","minLength","placeholder","readOnly","required","rows","wrap"]),B(W,["form","multiple","required"]),B(H,["selected","value"]),B(H,["cellPadding","cellSpacing"]),B(H,["rowSpan","scope"]),B(H,["colSpan","headers","rowSpan","scope"]),B(H,["span"]),B(H,["span"]),B(H,["acceptCharset","action","encType","encType","method","noValidate","target"]),B(H,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),B(H,["alt","crossOrigin","height","src","srcSet","useMap","width"]),H);function z(t,n,i){for(var e=Array.isArray(n),r={},o=0,u=Object.keys(t);o<u.length;o++){var a=u[o];!(!e&&n[a]||e&&n.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||i&&-1!==(null==i?void 0:i.indexOf(a))||(r[a]=t[a])}return r}function j(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=[],e=0,r=t;e<r.length;e++){var o=r[e];if(o)if("string"==typeof o)i.push(o);else if(o.hasOwnProperty("toString")&&"function"==typeof o.toString)i.push(o.toString());else for(var u in o)o[u]&&i.push(u)}return i.join(" ")}function $(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return Y.apply(this,[null,t].concat(n))}function Y(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];n=n||{};for(var r=0,o=i;r<o.length;r++){var u=o[r];if(u)for(var a in u)!u.hasOwnProperty(a)||t&&!t(a)||(n[a]=u[a])}return n}var X,G,U,q=i(916),Z=((0,q.Z)({overflow:"hidden !important"}),"data-is-scrollable");function K(t){for(var n=t,i=(0,M.Y)(t);n&&n!==i.body;){if("true"===n.getAttribute(Z))return n;n=n.parentElement}for(n=t;n&&n!==i.body;){if("false"!==n.getAttribute(Z)){var e=getComputedStyle(n),r=e?e.getPropertyValue("overflow-y"):"";if(r&&("scroll"===r||"auto"===r))return n}n=n.parentElement}return n&&n!==i.body||(n=(0,s.z)(t)),n}!function(t){t[t.top=1]="top",t[t.bottom=-1]="bottom",t[t.left=2]="left",t[t.right=-2]="right"}(G||(G={})),function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.start=2]="start",t[t.end=3]="end"}(U||(U={}));var J,Q=function(){function t(t,n,i,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=0),this.top=i,this.bottom=e,this.left=t,this.right=n}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return parseFloat(this.top.toFixed(4))===parseFloat(t.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(t.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(t.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(t.right.toFixed(4))},t}();function tt(t,n,i){return{targetEdge:t,alignmentEdge:n,isAuto:i}}var nt=((J={})[0]=tt(G.top,G.left),J[1]=tt(G.top),J[2]=tt(G.top,G.right),J[3]=tt(G.top,void 0,!0),J[4]=tt(G.bottom,G.left),J[5]=tt(G.bottom),J[6]=tt(G.bottom,G.right),J[7]=tt(G.bottom,void 0,!0),J[8]=tt(G.left,G.top),J[9]=tt(G.left),J[10]=tt(G.left,G.bottom),J[11]=tt(G.right,G.top),J[12]=tt(G.right),J[13]=tt(G.right,G.bottom),J);function it(t,n){return!(t.top<n.top||t.bottom>n.bottom||t.left<n.left||t.right>n.right)}function et(t,n){var i=[];return t.top<n.top&&i.push(G.top),t.bottom>n.bottom&&i.push(G.bottom),t.left<n.left&&i.push(G.left),t.right>n.right&&i.push(G.right),i}function rt(t,n){return t[G[n]]}function ot(t,n,i){return t[G[n]]=i,t}function ut(t,n){var i=mt(n);return(rt(t,i.positiveEdge)+rt(t,i.negativeEdge))/2}function at(t,n){return t>0?n:-1*n}function lt(t,n){return at(t,rt(n,t))}function st(t,n,i){return at(i,rt(t,i)-rt(n,i))}function ct(t,n,i,e){void 0===e&&(e=!0);var r=rt(t,n)-i,o=ot(t,n,i);return e&&(o=ot(t,-1*n,rt(t,-1*n)-r)),o}function dt(t,n,i,e){return void 0===e&&(e=0),ct(t,i,rt(n,i)+at(i,e))}function ft(t,n,i){return lt(i,t)>lt(i,n)}function vt(t,n){for(var i=0,e=0,r=et(t,n);e<r.length;e++){var o=r[e];i+=Math.pow(st(t,n,o),2)}return i}function ht(t,n,i,e){return void 0===e&&(e=200),(i===G.bottom||i===G.top)&&st(t,n,i)>=e}function pt(t,n,i,e){for(var r=0,o=t;r<o.length;r++){var u=o[r],a=void 0;e&&e===-1*u?(a=ct(n.elementRectangle,u,rt(i,u),!1),n.forcedInBounds=!0):ft(a=dt(n.elementRectangle,i,u),i,-1*u)||(a=ct(a,-1*u,rt(i,-1*u),!1),n.forcedInBounds=!0),n.elementRectangle=a}return n}function gt(t,n,i){var e=mt(n).positiveEdge;return ct(t,e,i-(ut(t,n)-rt(t,e)))}function yt(t,n,i,e,r){void 0===e&&(e=0);var o=new Q(t.left,t.right,t.top,t.bottom),u=i.alignmentEdge,a=i.targetEdge,l=r?a:-1*a;return o=r?dt(o,n,a,e):function(t,n,i,e){void 0===e&&(e=0);var r=at(-1*i,e);return ct(t,-1*i,rt(n,i)+r)}(o,n,a,e),o=u?dt(o,n,u):gt(o,l,ut(n,a))}function mt(t){return t===G.top||t===G.bottom?{positiveEdge:G.left,negativeEdge:G.right}:{positiveEdge:G.top,negativeEdge:G.bottom}}function bt(t,n,i){return i&&Math.abs(st(t,i,n))>Math.abs(st(t,i,-1*n))?-1*n:n}function xt(t,n,i,e,r,o,u,a){var l,s={},c=Ct(n),d=o?i:-1*i,f=r||mt(i).positiveEdge;return u&&!function(t,n,i){return void 0!==i&&rt(t,n)===rt(i,n)}(t,(l=f,-1*l),e)||(f=bt(t,f,e)),s[G[d]]=st(t,c,d),s[G[f]]=st(t,c,f),a&&(s[G[-1*d]]=st(t,c,-1*d),s[G[-1*f]]=st(t,c,-1*f)),s}function wt(t,n,i){var e=ut(n,t),r=ut(i,t),o=mt(t),u=o.positiveEdge,a=o.negativeEdge;return e<=r?u:a}function Mt(t,n,i,e,r,o,u,a,s){void 0===o&&(o=!1);var c=yt(t,n,e,r,s);return it(c,i)?{elementRectangle:c,targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}:function(t,n,i,e,r,o,u,a,s){void 0===r&&(r=!1),void 0===u&&(u=0);var c=e.alignmentEdge,d=e.alignTargetEdge,f={elementRectangle:t,targetEdge:e.targetEdge,alignmentEdge:c};a||s||(f=function(t,n,i,e,r,o,u){void 0===r&&(r=!1),void 0===u&&(u=0);var a=[G.left,G.right,G.bottom,G.top];(0,l.jI)()&&(a[0]*=-1,a[1]*=-1);for(var s,c=t,d=e.targetEdge,f=e.alignmentEdge,v=d,h=f,p=0;p<4;p++){if(ft(c,i,d))return{elementRectangle:c,targetEdge:d,alignmentEdge:f};if(r&&ht(n,i,d,o)){switch(d){case G.bottom:c.bottom=i.bottom;break;case G.top:c.top=i.top}return{elementRectangle:c,targetEdge:d,alignmentEdge:f,forcedInBounds:!0}}var g=vt(c,i);(!s||g<s)&&(s=g,v=d,h=f),a.splice(a.indexOf(d),1),a.length>0&&(a.indexOf(-1*d)>-1?d*=-1:(f=d,d=a.slice(-1)[0]),c=yt(t,n,{targetEdge:d,alignmentEdge:f},u))}return{elementRectangle:c=yt(t,n,{targetEdge:v,alignmentEdge:h},u),targetEdge:v,alignmentEdge:h}}(t,n,i,e,r,o,u));var v=et(f.elementRectangle,i),h=a?-f.targetEdge:void 0;if(v.length>0)if(d)if(f.alignmentEdge&&v.indexOf(-1*f.alignmentEdge)>-1){var p=function(t,n,i,e){var r=t.alignmentEdge,o=t.targetEdge,u=-1*r;return{elementRectangle:yt(t.elementRectangle,n,{targetEdge:o,alignmentEdge:u},i,e),targetEdge:o,alignmentEdge:u}}(f,n,u,s);if(it(p.elementRectangle,i))return p;f=pt(et(p.elementRectangle,i),f,i,h)}else f=pt(v,f,i,h);else f=pt(v,f,i,h);return f}(c,n,i,e,o,u,r,a,s)}function Ct(t){var n=t.getBoundingClientRect();return new Q(n.left,n.right,n.top,n.bottom)}function kt(t,n,i,e,r,u){void 0===r&&(r=!1);var a=t.gapSpace?t.gapSpace:0,s=function(t,n){var i;if(n){if(n.preventDefault){var e=n;i=new Q(e.clientX,e.clientX,e.clientY,e.clientY)}else if(n.getBoundingClientRect)i=Ct(n);else{var r=n,o=r.left||r.x,u=r.top||r.y,a=r.right||o,l=r.bottom||u;i=new Q(o,a,u,l)}if(!it(i,t))for(var s=0,c=et(i,t);s<c.length;s++){var d=c[s];i[G[d]]=t[G[d]]}}else i=new Q(0,0,0,0);return i}(i,t.target),c=function(t,n,i,e,r){return t.isAuto&&(t.alignmentEdge=wt(t.targetEdge,n,i)),t.alignTargetEdge=r,t}(function(t,n,i){if(void 0===t&&(t=7),i)return{alignmentEdge:i.alignmentEdge,isAuto:i.isAuto,targetEdge:i.targetEdge};var e=(0,o.Cl)({},nt[t]);return(0,l.jI)()?(e.alignmentEdge&&e.alignmentEdge%2==0&&(e.alignmentEdge=-1*e.alignmentEdge),void 0!==n?nt[n]:e):e}(t.directionalHint,t.directionalHintForRTL,e),s,i,t.coverTarget,t.alignTargetEdge),d=Mt(Ct(n),s,i,c,a,r,u,t.directionalHintFixed,t.coverTarget);return(0,o.Cl)((0,o.Cl)({},d),{targetRectangle:s})}function At(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=0),function(t){return Math.sqrt(t*t*2)}(t?n:0)/2+i}function St(t,n,i,e,r,u,a,l){void 0===r&&(r=!1);var c=null!=l?l:(0,s.z)(),d=t.isBeakVisible&&t.beakWidth||0,f=At(t.isBeakVisible,t.beakWidth,t.gapSpace),v=t;v.gapSpace=f;var h,p,g,y,m,b,x,w,C,k=t.bounds?(C=t.bounds,new Q(C.left,C.right,C.top,C.bottom)):new Q(0,c.innerWidth-function(){if(void 0===X){var t=(0,M.Y)(),n=t.createElement("div");n.style.setProperty("width","100px"),n.style.setProperty("height","100px"),n.style.setProperty("overflow","scroll"),n.style.setProperty("position","absolute"),n.style.setProperty("top","-9999px"),t.body.appendChild(n),X=n.offsetWidth-n.clientWidth,t.body.removeChild(n)}return X}(),0,c.innerHeight),A=kt(v,i,k,e,r,u),S=(h=A,p=function(t,n){var i=n.targetRectangle,e=mt(n.targetEdge),r=e.positiveEdge,o=e.negativeEdge,u=ut(i,n.targetEdge),a=new Q(t/2,n.elementRectangle.width-t/2,t/2,n.elementRectangle.height-t/2),l=new Q(0,t,0,t);return ft(l=gt(l=ct(l,-1*n.targetEdge,-t/2),-1*n.targetEdge,u-lt(r,n.elementRectangle)),a,r)?ft(l,a,o)||(l=dt(l,a,o)):l=dt(l,a,r),l}(d,A),g=k,y=-1*h.targetEdge,m=new Q(0,h.elementRectangle.width,0,h.elementRectangle.height),b={},x=bt(h.elementRectangle,h.alignmentEdge?h.alignmentEdge:mt(y).positiveEdge,g),w=st(h.elementRectangle,h.targetRectangle,y)>Math.abs(rt(p,y)),b[G[y]]=rt(p,y),b[G[x]]=st(p,m,x),{elementPosition:(0,o.Cl)({},b),closestEdge:wt(h.targetEdge,p,m),targetEdge:y,hideBeak:!w});return(0,o.Cl)((0,o.Cl)({},function(t,n,i,e,r){return{elementPosition:xt(t.elementRectangle,n,t.targetEdge,i,t.alignmentEdge,e,r,t.forcedInBounds),targetEdge:t.targetEdge,alignmentEdge:t.alignmentEdge}}(A,n,k,t.coverTarget,a)),{beakPosition:S})}var Lt=["TEMPLATE","STYLE","SCRIPT"];function Vt(t){var n=(0,M.Y)(t);if(!n)return function(){};for(var i=[];t!==n.body&&t.parentElement;){for(var e=0,r=t.parentElement.children;e<r.length;e++){var o=r[e],u=o.getAttribute("aria-hidden");o!==t&&"true"!==(null==u?void 0:u.toLowerCase())&&-1===Lt.indexOf(o.tagName)&&i.push([o,u])}t=t.parentElement}return i.forEach((function(t){t[0].setAttribute("aria-hidden","true")})),function(){!function(t){t.forEach((function(t){var n=t[0],i=t[1];i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}))}(i),i=[]}}var Dt=27,Nt=function(){function t(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return t.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},t.prototype.setTimeout=function(t,n){var i=this,e=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),e=setTimeout((function(){try{i._timeoutIds&&delete i._timeoutIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._timeoutIds[e]=!0),e},t.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},t.prototype.setImmediate=function(t,n){var i=this,e=0,r=(0,s.z)(n);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),e=r.setTimeout((function(){try{i._immediateIds&&delete i._immediateIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),0),this._immediateIds[e]=!0),e},t.prototype.clearImmediate=function(t,n){var i=(0,s.z)(n);this._immediateIds&&this._immediateIds[t]&&(i.clearTimeout(t),delete this._immediateIds[t])},t.prototype.setInterval=function(t,n){var i=this,e=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),e=setInterval((function(){try{t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._intervalIds[e]=!0),e},t.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},t.prototype.throttle=function(t,n,i){var e=this;if(this._isDisposed)return this._noop;var r,o,u=n||0,a=!0,l=!0,s=0,c=null;i&&"boolean"==typeof i.leading&&(a=i.leading),i&&"boolean"==typeof i.trailing&&(l=i.trailing);var d=function(n){var i=Date.now(),f=i-s,v=a?u-f:u;return f>=u&&(!n||a)?(s=i,c&&(e.clearTimeout(c),c=null),r=t.apply(e._parent,o)):null===c&&l&&(c=e.setTimeout(d,v)),r};return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o=t,d(!0)}},t.prototype.debounce=function(t,n,i){var e=this;if(this._isDisposed){var r=function(){};return r.cancel=function(){},r.flush=function(){return null},r.pending=function(){return!1},r}var o,u,a=n||0,l=!1,s=!0,c=null,d=0,f=Date.now(),v=null;i&&"boolean"==typeof i.leading&&(l=i.leading),i&&"boolean"==typeof i.trailing&&(s=i.trailing),i&&"number"==typeof i.maxWait&&!isNaN(i.maxWait)&&(c=i.maxWait);var h=function(t){v&&(e.clearTimeout(v),v=null),f=t},p=function(n){h(n),o=t.apply(e._parent,u)},g=function(t){var n=Date.now(),i=!1;t&&(l&&n-d>=a&&(i=!0),d=n);var r=n-d,u=a-r,h=n-f,y=!1;return null!==c&&(h>=c&&v?y=!0:u=Math.min(u,c-h)),r>=a||y||i?p(n):null!==v&&t||!s||(v=e.setTimeout(g,u)),o},y=function(){return!!v},m=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return u=t,g(!0)};return m.cancel=function(){y()&&h(Date.now())},m.flush=function(){return y()&&p(Date.now()),o},m.pending=y,m},t.prototype.requestAnimationFrame=function(t,n){var i=this,e=0,r=(0,s.z)(n);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{i._animationFrameIds&&delete i._animationFrameIds[e],t.apply(i._parent)}catch(t){i._logError(t)}};e=r.requestAnimationFrame?r.requestAnimationFrame(o):r.setTimeout(o,0),this._animationFrameIds[e]=!0}return e},t.prototype.cancelAnimationFrame=function(t,n){var i=(0,s.z)(n);this._animationFrameIds&&this._animationFrameIds[t]&&(i.cancelAnimationFrame?i.cancelAnimationFrame(t):i.clearTimeout(t),delete this._animationFrameIds[t])},t.prototype._logError=function(t){this._onErrorHandler&&this._onErrorHandler(t)},t}();function Ot(){var t=u.useRef(void 0);return t.current||(t.current=new Nt),u.useEffect((function(){return function(){var n;null===(n=t.current)||void 0===n||n.dispose(),t.current=void 0}}),[]),t.current}function Tt(t,n,i,e){var r=u.useRef(i);r.current=i,u.useEffect((function(){var i=t&&"current"in t?t.current:t;if(i&&i.addEventListener)return E(i,n,(function(t){return r.current(t)}),e)}),[t,n,e])}function Et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=u.useCallback((function(n){i.current=n;for(var e=0,r=t;e<r.length;e++){var o=r[e];"function"==typeof o?o(n):o&&(o.current=n)}}),(0,o.fX)([],t,!0));return i}var Ft=u.createContext({window:"object"==typeof window?window:void 0}),Bt=function(){return u.useContext(Ft).window},Pt=function(){var t;return null===(t=u.useContext(Ft).window)||void 0===t?void 0:t.document};function _t(t){var n=t.originalElement,i=t.containsFocus;n&&i&&n!==(0,s.z)()&&setTimeout((function(){var t;null===(t=n.focus)||void 0===t||t.call(n)}),0)}var Ht=u.forwardRef((function(t,n){var i=F({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},t),e=u.useRef(void 0),r=Et(e,n);!function(t,n){var i="true"===String(t["aria-modal"]).toLowerCase()&&t.enableAriaHiddenSiblings;u.useEffect((function(){if(i&&n.current)return Vt(n.current)}),[n,i])}(i,e),function(t,n){var i=t.onRestoreFocus,e=void 0===i?_t:i,r=u.useRef(void 0),o=u.useRef(!1);u.useEffect((function(){var t,i,u;return r.current=(0,M.Y)().activeElement,t=n.current,(u=(i=(0,M.Y)(t))&&i.activeElement)&&w(t,u)&&(o.current=!0),function(){var t;null==e||e({originalElement:r.current,containsFocus:o.current,documentContainsFocus:(null===(t=(0,M.Y)())||void 0===t?void 0:t.hasFocus())||!1}),r.current=void 0}}),[]),Tt(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Tt(n,"blur",u.useCallback((function(t){n.current&&t.relatedTarget&&!n.current.contains(t.relatedTarget)&&(o.current=!1)}),[]),!0)}(i,e);var a=i.role,l=i.className,s=i.ariaLabel,c=i.ariaLabelledBy,d=i.ariaDescribedBy,f=i.style,v=i.children,h=i.onDismiss,p=function(t,n){var i=Ot(),e=u.useState(!1),r=e[0],o=e[1];return u.useEffect((function(){return i.requestAnimationFrame((function(){var i;if(!t.style||!t.style.overflowY){var e=!1;if(n&&n.current&&(null===(i=n.current)||void 0===i?void 0:i.firstElementChild)){var u=n.current.clientHeight,a=n.current.firstElementChild.clientHeight;u>0&&a>u&&(e=a-u>1)}r!==e&&o(e)}})),function(){return i.dispose()}})),r}(i,e),g=u.useCallback((function(t){t.which===Dt&&h&&(h(t),t.preventDefault(),t.stopPropagation())}),[h]);return Tt(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},z(i,R),{className:l,role:a,"aria-label":s,"aria-labelledby":c,"aria-describedby":d,onKeyDown:g,style:(0,o.Cl)({overflowY:p?"scroll":void 0,outline:"none"},f)}),v)}));Ht.displayName="Popup";var It=i(419);function Wt(t){var n=u.useRef(void 0);return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,zt=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},jt=function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.window)||void 0===n?void 0:n.document)&&void 0!==i?i:"undefined"!=typeof document?document:void 0},$t=((Rt={})[G.top]=It.lw.slideUpIn10,Rt[G.bottom]=It.lw.slideDownIn10,Rt[G.left]=It.lw.slideLeftIn10,Rt[G.right]=It.lw.slideRightIn10,Rt),Yt={opacity:0,filter:"opacity(0)",pointerEvents:"none"},Xt=["role","aria-roledescription"],Gt={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:7},Ut=(0,a.Z)({disableCaching:!0});function qt(t,n,i,e){var r,o=t.calloutMaxHeight,a=t.finalHeight,l=t.directionalHint,s=t.directionalHintFixed,c=t.hidden,d=t.gapSpace,f=t.beakWidth,v=t.isBeakVisible,h=t.coverTarget,p=u.useState(),g=p[0],y=p[1],m=null!==(r=null==e?void 0:e.elementPosition)&&void 0!==r?r:{},b=m.top,x=m.bottom,w=(null==i?void 0:i.current)?function(t){var n,i,e,r,o=t,u=t,a=t,l=null!==(n=a.left)&&void 0!==n?n:a.x,s=null!==(i=a.top)&&void 0!==i?i:a.y,c=null!==(e=a.right)&&void 0!==e?e:l,d=null!==(r=a.bottom)&&void 0!==r?r:s;return o.stopPropagation?new Q(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==l&&void 0!==s?new Q(l,c,s,d):Ct(u)}(i.current):void 0;return u.useEffect((function(){var t,i,r=null!==(t=n())&&void 0!==t?t:{},u=r.top,a=r.bottom;(null==e?void 0:e.targetEdge)===G.top&&(null==w?void 0:w.top)&&!h&&(a=w.top-function(t,n,i){return At(t,n,i)}(v,f,d)),"number"==typeof b&&a?i=a-b:"number"==typeof x&&"number"==typeof u&&a&&(i=a-u-x),y(!o&&!c||o&&i&&o>i?i:o||void 0)}),[x,o,a,l,s,n,c,e,b,d,f,v,w,h]),g}function Zt(t,n,i,e,r,a){var l,c=u.useState(),d=c[0],f=c[1],v=u.useRef(0),h=u.useRef(void 0),p=Ot(),g=t.hidden,y=t.target,m=t.finalHeight,b=t.calloutMaxHeight,x=t.onPositioned,w=t.directionalHint,M=t.hideOverflow,C=t.preferScrollResizePositioning,k=zt(),A=u.useRef(void 0);A.current!==a.current&&(A.current=a.current,l=a.current?null==k?void 0:k.getComputedStyle(a.current):void 0);var S=null==l?void 0:l.overflowY;return u.useEffect((function(){if(!g){var u=p.requestAnimationFrame((function(){var u,a,l,c;if(n.current&&i){var p=(0,o.Cl)((0,o.Cl)({},t),{target:e.current,bounds:r()}),g=i.cloneNode(!0);g.style.maxHeight=b?"".concat(b):"",g.style.visibility="hidden",null===(u=i.parentElement)||void 0===u||u.appendChild(g);var w=h.current===y?d:void 0,A=C&&!(M||"clip"===S||"hidden"===S),L=m?function(t,n,i,e,r){return function(t,n,i,e,r){return St(t,n,i,e,!1,void 0,!0,null!=r?r:(0,s.z)())}(t,n,i,e,r)}(p,n.current,g,w,k):function(t,n,i,e,r,o,u){return St(t,n,i,e,r,void 0,void 0,u)}(p,n.current,g,w,A,0,k);null===(a=i.parentElement)||void 0===a||a.removeChild(g),!d&&L||d&&L&&(c=L,!Qt((l=d).elementPosition,c.elementPosition)||!Qt(l.beakPosition.elementPosition,c.beakPosition.elementPosition))&&v.current<5?(v.current++,f(L)):v.current>0&&(v.current=0,null==x||x(d))}}),i);return h.current=y,function(){p.cancelAnimationFrame(u),h.current=void 0}}f(void 0),v.current=0}),[g,w,p,i,b,n,e,m,r,x,d,t,y,M,C,S,k]),d}var Kt=u.memo(u.forwardRef((function(t,n){var i=F(Gt,t),e=i.styles,r=i.style,a=i.ariaLabel,l=i.ariaDescribedBy,s=i.ariaLabelledBy,c=i.className,d=i.isBeakVisible,f=i.children,v=i.beakWidth,h=i.calloutWidth,p=i.calloutMaxWidth,g=i.calloutMinWidth,y=i.doNotLayer,m=i.finalHeight,b=i.hideOverflow,x=void 0===b?!!m:b,k=i.backgroundColor,A=i.calloutMaxHeight,S=i.onScroll,L=i.shouldRestoreFocus,V=void 0===L||L,D=i.target,N=i.hidden,O=i.onLayerMounted,T=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==T?void 0:T.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),$=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(void 0),a=u.useRef(null),l=Bt();if(!t||t!==o.current||"string"==typeof t){var s=null==n?void 0:n.current;if(t)if("string"==typeof t)if(null===(i=null==s?void 0:s.getRootNode())||void 0===i?void 0:i.host)a.current=null!==(r=null===(e=null==s?void 0:s.getRootNode())||void 0===e?void 0:e.querySelector(t))&&void 0!==r?r:null;else{var c=(0,M.Y)(s);a.current=c?c.querySelector(t):null}else a.current="stopPropagation"in t||"getBoundingClientRect"in t?t:"current"in t?t.current:t;o.current=t}return[a,l]}(i.target,{current:H}),X=Y[0],G=Y[1],U=function(t,n,i){var e=t.bounds,r=t.minPagePadding,o=void 0===r?Gt.minPagePadding:r,a=t.target,l=u.useState(!1),s=l[0],c=l[1],d=u.useRef(void 0),f=u.useCallback((function(){if(!d.current||s){var t="function"==typeof e?i?e(a,i):void 0:e;!t&&i&&(t=function(t,n){return function(t,n){var i=void 0;if(n.getWindowSegments&&(i=n.getWindowSegments()),void 0===i||i.length<=1)return{top:0,left:0,right:n.innerWidth,bottom:n.innerHeight,width:n.innerWidth,height:n.innerHeight};var e=0,r=0;if(null!==t&&t.getBoundingClientRect){var o=t.getBoundingClientRect();e=(o.left+o.right)/2,r=(o.top+o.bottom)/2}else null!==t&&(e=t.left||t.x,r=t.top||t.y);for(var u={top:0,left:0,right:0,bottom:0,width:0,height:0},a=0,l=i;a<l.length;a++){var s=l[a];e&&s.left<=e&&s.right>=e&&r&&s.top<=r&&s.bottom>=r&&(u={top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})}return u}(t,n)}(n.current,i),t={top:t.top+o,left:t.left+o,right:t.right-o,bottom:t.bottom-o,width:t.width-2*o,height:t.height-2*o}),d.current=t,s&&c(!1)}return d.current}),[e,o,a,n,i,s]),v=Ot();return Tt(i,"resize",v.debounce((function(){c(!0)}),500,{leading:!0})),f}(i,X,G),q=Zt(i,B,H,X,U,P),Z=qt(i,U,X,q),K=function(t,n,i,e,r){var o=t.hidden,a=t.onDismiss,l=t.preventDismissOnScroll,s=t.preventDismissOnResize,c=t.preventDismissOnLostFocus,d=t.dismissOnTargetClick,f=t.shouldDismissOnWindowFocus,v=t.preventDismissOnEvent,h=u.useRef(!1),p=Ot(),g=Wt([function(){h.current=!0},function(){h.current=!1}]),y=!!n;return u.useEffect((function(){var t=function(t){y&&!l&&g(t)},n=function(t){s||v&&v(t)||null==a||a(t)},u=function(t){c||g(t)},g=function(t){var n=t.composedPath?t.composedPath():[],o=n.length>0?n[0]:t.target,u=i.current&&!w(i.current,o);if(u&&h.current)h.current=!1;else if(!e.current&&u||t.target!==r&&u&&(!e.current||"stopPropagation"in e.current||d||o!==e.current&&!w(e.current,o))){if(v&&v(t))return;null==a||a(t)}},m=function(t){f&&((!v||v(t))&&(v||c)||(null==r?void 0:r.document.hasFocus())||null!==t.relatedTarget||null==a||a(t))},b=new Promise((function(i){p.setTimeout((function(){if(!o&&r){var e=[E(r,"scroll",t,!0),E(r,"resize",n,!0),E(r.document.documentElement,"focus",u,!0),E(r.document.documentElement,"click",u,!0),E(r,"blur",m,!0)];i((function(){e.forEach((function(t){return t()}))}))}}),0)}));return function(){b.then((function(t){return t()}))}}),[o,p,i,e,r,a,f,d,c,s,l,y,v]),g}(i,q,B,X,G),J=K[0],Q=K[1],tt=(null==q?void 0:q.elementPosition.top)&&(null==q?void 0:q.elementPosition.bottom),nt=(0,o.Cl)((0,o.Cl)({},null==q?void 0:q.elementPosition),{maxHeight:Z});if(tt&&(nt.bottom=void 0),function(t,n,i){var e=t.hidden,r=t.setInitialFocus,o=Ot(),a=!!n;u.useEffect((function(){if(!e&&r&&a&&i){var t=o.requestAnimationFrame((function(){return C(i)}),i);return function(){return o.cancelAnimationFrame(t)}}}),[e,a,o,i,r])}(i,q,H),u.useEffect((function(){N||null==O||O()}),[N]),!G)return null;var it=x,et=d&&!!D,rt=Ut(e,{theme:i.theme,className:c,overflowYHidden:it,calloutWidth:h,positions:q,beakWidth:v,backgroundColor:k,calloutMaxWidth:p,calloutMinWidth:g,doNotLayer:y}),ot=(0,o.Cl)((0,o.Cl)({maxHeight:A||"100%"},r),it&&{overflowY:"hidden"}),ut=i.hidden?{visibility:"hidden"}:void 0;return u.createElement("div",{ref:$,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},z(i,R,Xt),{className:j(rt.root,q&&q.targetEdge&&$t[q.targetEdge]),style:q?(0,o.Cl)({},nt):Yt,tabIndex:-1,ref:W}),et&&u.createElement("div",{className:rt.beak,style:Jt(q)}),et&&u.createElement("div",{className:rt.beakCurtain}),u.createElement(Ht,(0,o.Cl)({role:i.role,"aria-roledescription":i["aria-roledescription"],ariaDescribedBy:l,ariaLabel:a,ariaLabelledBy:s,className:rt.calloutMain,onDismiss:i.onDismiss,onMouseDown:J,onMouseUp:Q,onRestoreFocus:i.onRestoreFocus,onScroll:S,shouldRestoreFocus:V,style:ot},T,{ref:P}),f)))})),(function(t,n){return!(n.shouldUpdateWhenHidden||!t.hidden||!n.hidden)||function(t,n){if(!t||!n)return!t&&!n;for(var i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0}(t,n)}));function Jt(t){var n,i,e=(0,o.Cl)((0,o.Cl)({},null===(n=null==t?void 0:t.beakPosition)||void 0===n?void 0:n.elementPosition),{display:(null===(i=null==t?void 0:t.beakPosition)||void 0===i?void 0:i.hideBeak)?"none":void 0});return e.top||e.bottom||e.left||e.right||(e.left=0,e.top=0),e}function Qt(t,n){for(var i in n)if(n.hasOwnProperty(i)){var e=t[i],r=n[i];if(void 0===e||void 0===r)return!1;if(e.toFixed(2)!==r.toFixed(2))return!1}return!0}function tn(t){return{height:t,width:t}}Kt.displayName="CalloutContentBase";var nn={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},en=(0,r.I)(Kt,(function(t){var n,i=t.theme,e=t.className,r=t.overflowYHidden,o=t.calloutWidth,u=t.beakWidth,a=t.backgroundColor,l=t.calloutMaxWidth,s=t.calloutMinWidth,c=t.doNotLayer,d=(0,It.Km)(nn,i),f=i.semanticColors,v=i.effects;return{container:[d.container,{position:"relative"}],root:[d.root,i.fonts.medium,{position:"absolute",display:"flex",zIndex:c?It.nA.Layer:void 0,boxSizing:"border-box",borderRadius:v.roundedCorner2,boxShadow:v.elevation16,selectors:(n={},n[It.up]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},n)},(0,It.QN)(),e,!!o&&{width:o},!!l&&{maxWidth:l},!!s&&{minWidth:s}],beak:[d.beak,{position:"absolute",backgroundColor:f.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},tn(u),a&&{backgroundColor:a}],beakCurtain:[d.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:f.menuBackground,borderRadius:v.roundedCorner2}],calloutMain:[d.calloutMain,{backgroundColor:f.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:v.roundedCorner2},r&&{overflowY:"hidden"},a&&{backgroundColor:a}]}}),void 0,{scope:"CalloutContent"}),rn=u.createContext(void 0),on=function(){return function(){}};rn.Provider;var un=ReactDOM,an=i(753);new WeakMap,new WeakMap;var ln=u.createContext(void 0),sn=function(t){var n=t.providerRef,i=t.layerRoot,e=u.useState([])[0],r=u.useContext(ln),o=void 0!==r&&!i,a=u.useMemo((function(){return o?void 0:{providerRef:n,registeredProviders:e,registerProvider:function(t){e.push(t),null==r||r.registerProvider(t)},unregisterProvider:function(t){null==r||r.unregisterProvider(t);var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}),[n,e,r,o]);return u.useEffect((function(){if(a)return a.registerProvider(a.providerRef),function(){return a.unregisterProvider(a.providerRef)}}),[a]),a?u.createElement(ln.Provider,{value:a},t.children):u.createElement(u.Fragment,null,t.children)},cn=i(540),dn=i(770);function fn(t,n){void 0===t&&(t={});var i=vn(n)?n:function(t){return function(n){return t?(0,o.Cl)((0,o.Cl)({},n),t):n}}(n);return i(t)}function vn(t){return"function"==typeof t}var hn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onCustomizationChange=function(){return n.forceUpdate()},n}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){cn.X.observe(this._onCustomizationChange)},n.prototype.componentWillUnmount=function(){cn.X.unobserve(this._onCustomizationChange)},n.prototype.render=function(){var t=this,n=this.props.contextTransform;return u.createElement(dn.z.Consumer,null,(function(i){var e=function(t,n){var i,e,r,u=(n||{}).customizations,a=void 0===u?{settings:{},scopedSettings:{}}:u;return{customizations:{settings:fn(a.settings,t.settings),scopedSettings:(i=a.scopedSettings,e=t.scopedSettings,void 0===i&&(i={}),(vn(e)?e:(void 0===(r=e)&&(r={}),function(t){var n=(0,o.Cl)({},t);for(var i in r)r.hasOwnProperty(i)&&(n[i]=(0,o.Cl)((0,o.Cl)({},t[i]),r[i]));return n}))(i)),inCustomizerContext:!0}}}(t.props,i);return n&&(e=n(e)),u.createElement(dn.z.Provider,{value:e},t.props.children)}))},n}(u.Component),pn=i(143),gn=(0,a.Z)(),yn=(0,an.J9)((function(t,n){return(0,pn.a)((0,o.Cl)((0,o.Cl)({},t),{rtl:n}))})),mn=u.forwardRef((function(t,n){var i=t.className,e=t.theme,r=t.applyTheme,a=t.applyThemeToBody,s=t.styles,c=gn(s,{theme:e,applyTheme:r,className:i}),d=u.useRef(null);return function(t,n,i){var e=n.bodyThemed;u.useEffect((function(){if(t){var n=(0,M.Y)(i.current);if(n)return n.body.classList.add(e),function(){n.body.classList.remove(e)}}}),[e,t,i])}(a,c,d),u.createElement(u.Fragment,null,function(t,n,i,e){var r=n.root,a=t.as,s=void 0===a?"div":a,c=t.dir,d=t.theme,f=z(t,R,["dir"]),v=function(t){var n=t.theme,i=t.dir,e=(0,l.jI)(n)?"rtl":"ltr",r=(0,l.jI)()?"rtl":"ltr",o=i||e;return{rootDir:o!==e||o!==r?o:i,needsTheme:o!==e}}(t),h=v.rootDir,p=v.needsTheme,g=u.createElement(sn,{providerRef:i},u.createElement(s,(0,o.Cl)({dir:h},f,{className:r,ref:Et(i,e)})));return p&&(g=u.createElement(hn,{settings:{theme:yn(d,"rtl"===c)}},g)),g}(t,c,d,n))}));mn.displayName="FabricBase";var bn,xn={fontFamily:"inherit"},wn={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},Mn=(0,r.I)(mn,(function(t){var n=t.applyTheme,i=t.className,e=t.preventBlanketFontInheritance,r=t.theme;return{root:[(0,It.Km)(wn,r).root,r.fonts.medium,{color:r.palette.neutralPrimary},!e&&{"& button":xn,"& input":xn,"& textarea":xn},n&&{color:r.semanticColors.bodyText,backgroundColor:r.semanticColors.bodyBackground},i],bodyThemed:[{backgroundColor:r.semanticColors.bodyBackground}]}}),void 0,{scope:"Fabric"}),Cn=i(517),kn="data-portal-element",An={},Sn={},Ln="fluent-default-layer-host",Vn="#".concat(Ln),Dn=i(921),Nn=(0,Dn.S)()?u.useLayoutEffect:u.useEffect;function On(t){console&&console.warn&&console.warn(t)}function Tn(t,n,i,e,r){if(!0===r)for(var o=0,u=i;o<u.length;o++){var a=u[o];a in n||On("".concat(t," property '").concat(a,"' is required when '").concat(e,"' is used.'"))}}function En(t,n,i){for(var e in i)if(n&&e in n){var r="".concat(t," property '").concat(e,"' was used but has been deprecated."),o=i[e];o&&(r+=" Use '".concat(o,"' instead.")),On(r)}}function Fn(t,n){return void 0!==t[n]&&null!==t[n]}function Bn(t){var n=u.useRef(void 0);return u.useEffect((function(){n.current=t})),n.current}bn={valueOnChange:{},valueDefaultValue:{},controlledToUncontrolled:{},uncontrolledToControlled:{}};var Pn=0;function _n(t){var n=t.name,i=t.props,e=t.other,r=void 0===e?[]:e,a=t.conditionallyRequired,l=t.deprecations,s=t.mutuallyExclusive,c=t.controlledUsage,d=u.useRef(!1),f=Wt((function(){return"useWarnings_".concat(Pn++)})),v=Bn(i);if(!d.current){d.current=!0;for(var h=0,p=r;h<p.length;h++)On(p[h]);if(a)for(var g=0,y=a;g<y.length;g++){var m=y[g];Tn(n,i,m.requiredProps,m.conditionalPropName,m.condition)}l&&En(n,i,l),s&&function(t,n,i){for(var e in i)if(n&&void 0!==n[e]){var r=i[e];r&&void 0!==n[r]&&On("".concat(t," property '").concat(e,"' is mutually exclusive with '").concat(i[e],"'. ")+"Use one or the other.")}}(n,i,s)}c&&function(t){var n=t.componentId,i=t.componentName,e=t.defaultValueProp,r=t.props,o=t.oldProps,u=t.onChangeProp,a=t.readOnlyProp,l=t.valueProp,s=o?Fn(o,l):void 0,c=Fn(r,l);if(c){var d=!!r[u],f=!(!a||!r[a]);d||f||bn.valueOnChange[n]||(bn.valueOnChange[n]=!0,On("Warning: You provided a '".concat(String(l),"' prop to a ").concat(String(i)," without an '").concat(String(u),"' handler. ")+"This will render a read-only field. If the field should be mutable use '".concat(String(e),"'. ")+"Otherwise, set '".concat(String(u),"'").concat(a?" or '".concat(String(a),"'"):"","."))),null==r[e]||bn.valueDefaultValue[n]||(bn.valueDefaultValue[n]=!0,On("Warning: You provided both '".concat(String(l),"' and '").concat(String(e),"' to a ").concat(i,". ")+"Form fields must be either controlled or uncontrolled (specify either the '".concat(String(l),"' prop, ")+"or the '".concat(String(e),"' prop, but not both). Decide between using a controlled or uncontrolled ")+"".concat(i," and remove one of these props. More info: https://fb.me/react-controlled-components")))}if(o&&c!==s){var v=s?"a controlled":"an uncontrolled",h=s?"uncontrolled":"controlled",p=s?bn.controlledToUncontrolled:bn.uncontrolledToControlled;p[n]||(p[n]=!0,On("Warning: A component is changing ".concat(v," ").concat(i," to be ").concat(h,". ")+"".concat(i,"s should not switch from controlled to uncontrolled (or vice versa). ")+"Decide between using controlled or uncontrolled for the lifetime of the component. More info: https://fb.me/react-controlled-components"))}}((0,o.Cl)((0,o.Cl)({},c),{componentId:f,props:i,componentName:n,oldProps:v}))}var Hn,In=(0,a.Z)(),Wn=u.forwardRef((function(t,n){var i,e=null!==(i=u.useContext(rn))&&void 0!==i?i:on,r=u.useRef(null),a=Et(r,n),l=u.useRef(void 0),s=u.useRef(null),c=u.useContext(ln),d=u.useState(!1),f=d[0],v=d[1],h=u.useCallback((function(t){var n,i=!!(null==(n=null==c?void 0:c.providerRef)?void 0:n.current)&&n.current.classList.contains(Cn.Y2);t&&i&&t.classList.add(Cn.Y2)}),[c]),p=t.children,g=t.className,y=t.eventBubblingEnabled,m=t.fabricProps,b=t.hostId,x=t.insertFirst,w=t.onLayerDidMount,C=void 0===w?function(){}:w,k=t.onLayerMounted,A=void 0===k?function(){}:k,S=t.onLayerWillUnmount,L=t.styles,V=t.theme,D=Et(s,null==m?void 0:m.ref,h),N=In(L,{theme:V,className:g,isNotHost:!b}),O=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},T=function(){var t,n,i,e,o=(0,M.Y)(r.current),u=(null===(n=null===(t=r.current)||void 0===t?void 0:t.getRootNode())||void 0===n?void 0:n.host)?null===(i=null==r?void 0:r.current)||void 0===i?void 0:i.getRootNode():void 0;if(o&&(o||u)){var a=function(t,n){var i,e;void 0===n&&(n=null);var r=null!=n?n:t;if(b){var o=function(t){var n=Sn[t];return n&&n[0]||void 0}(b);return o?null!==(i=o.rootRef.current)&&void 0!==i?i:null:null!==(e=r.getElementById(b))&&void 0!==e?e:null}var u=Vn,a=u?r.querySelector(u):null;return a||(a=function(t,n){void 0===n&&(n=null);var i=t.createElement("div");return i.setAttribute("id",Ln),i.style.cssText="position:fixed;z-index:1000000",n?n.appendChild(i):null==t||t.body.appendChild(i),i}(t,n)),a}(o,u);if(a){a.__tabsterElementFlags||(a.__tabsterElementFlags={}),a.__tabsterElementFlags.noDirectAriaHidden=!0,O();var s=(null!==(e=a.ownerDocument)&&void 0!==e?e:o).createElement("div");s.className=N.root,s.setAttribute(kn,"true"),function(t,n){var i=t,e=n;i._virtual||(i._virtual={children:[]});var r=i._virtual.parent;if(r&&r!==n){var o=r._virtual.children.indexOf(i);o>-1&&r._virtual.children.splice(o,1)}i._virtual.parent=e||void 0,e&&(e._virtual||(e._virtual={children:[]}),e._virtual.children.push(i))}(s,r.current),x?a.insertBefore(s,a.firstChild):a.appendChild(s),l.current=s,v(!0)}}};return Nn((function(){T(),b&&function(t,n){An[t]||(An[t]=[]),An[t].push(n);var i=Sn[t];if(i)for(var e=0,r=i;e<r.length;e++)r[e].notifyLayersChanged()}(b,T);var t=l.current?e(l.current):void 0;return function(){t&&t(),O(),b&&function(t,n){var i=An[t];if(i){var e=i.indexOf(n);e>=0&&(i.splice(e,1),0===i.length&&delete An[t])}var r=Sn[t];if(r)for(var o=0,u=r;o<u.length;o++)u[o].notifyLayersChanged()}(b,T)}}),[b]),u.useEffect((function(){l.current&&f&&(null==A||A(),null==C||C(),v(!1))}),[f,A,C]),function(t){_n({name:"Layer",props:t,deprecations:{onLayerMounted:"onLayerDidMount"}})}(t),u.createElement("span",{className:"ms-layer",ref:a},l.current&&un.createPortal(u.createElement(sn,{layerRoot:!0,providerRef:D},u.createElement(Mn,(0,o.Cl)({},!y&&(Hn||(Hn={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(t){return Hn[t]=Rn}))),Hn),m,{className:j(N.content,null==m?void 0:m.className),ref:D}),p)),l.current))}));Wn.displayName="LayerBase";var Rn=function(t){t.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==t.type&&"mouseleave"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&t.stopPropagation()},zn={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},jn=(0,r.I)(Wn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)(zn,e);return{root:[r.root,e.fonts.medium,i&&[r.rootNoHost,{position:"fixed",zIndex:It.nA.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],n],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]}),$n=u.forwardRef((function(t,n){var i=t.layerProps,e=t.doNotLayer,r=(0,o.Tt)(t,["layerProps","doNotLayer"]),a=u.createElement(en,(0,o.Cl)({},r,{doNotLayer:e,ref:n}));return e?a:u.createElement(jn,(0,o.Cl)({},i),a)}));$n.displayName="Callout";var Yn=i(61);function Xn(t){return t}var Gn=1e-6;function Un(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Zn(t){return n=>+t(n)}function Kn(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),i=>+t(i)+n}function Jn(){return!this.__axis}function Qn(t,n){var i=[],e=null,r=null,o=6,u=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",d=1===t||3===t?Un:qn;function f(f){var v=null==e?n.ticks?n.ticks.apply(n,i):n.domain():e,h=null==r?n.tickFormat?n.tickFormat.apply(n,i):Xn:r,p=Math.max(o,0)+a,g=n.range(),y=+g[0]+l,m=+g[g.length-1]+l,b=(n.bandwidth?Kn:Zn)(n.copy(),l),x=f.selection?f.selection():f,w=x.selectAll(".domain").data([null]),M=x.selectAll(".tick").data(v,n).order(),C=M.exit(),k=M.enter().append("g").attr("class","tick"),A=M.select("line"),S=M.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(w=w.transition(f),M=M.transition(f),A=A.transition(f),S=S.transition(f),C=C.transition(f).attr("opacity",Gn).attr("transform",(function(t){return isFinite(t=b(t))?d(t+l):this.getAttribute("transform")})),k.attr("opacity",Gn).attr("transform",(function(t){var n=this.parentNode.__axis;return d((n&&isFinite(n=n(t))?n:b(t))+l)}))),C.remove(),w.attr("d",4===t||2===t?u?"M"+s*u+","+y+"H"+l+"V"+m+"H"+s*u:"M"+l+","+y+"V"+m:u?"M"+y+","+s*u+"V"+l+"H"+m+"V"+s*u:"M"+y+","+l+"H"+m),M.attr("opacity",1).attr("transform",(function(t){return d(b(t)+l)})),A.attr(c+"2",s*o),S.attr(c,s*p).text(h),x.filter(Jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return i=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),f):i.slice()},f.tickValues=function(t){return arguments.length?(e=null==t?null:Array.from(t),f):e&&e.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=u=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(u=+t,f):u},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function ti(t){return Qn(2,t)}function ni(t){return Qn(3,t)}function ii(t){return Qn(4,t)}const ei=Math.sqrt(50),ri=Math.sqrt(10),oi=Math.sqrt(2);function ui(t,n,i){const e=(n-t)/Math.max(0,i),r=Math.floor(Math.log10(e)),o=e/Math.pow(10,r),u=o>=ei?10:o>=ri?5:o>=oi?2:1;let a,l,s;return r<0?(s=Math.pow(10,-r)/u,a=Math.round(t*s),l=Math.round(n*s),a/s<t&&++a,l/s>n&&--l,s=-s):(s=Math.pow(10,r)*u,a=Math.round(t/s),l=Math.round(n/s),a*s<t&&++a,l*s>n&&--l),l<a&&.5<=i&&i<2?ui(t,n,2*i):[a,l,s]}function ai(t,n,i){if(!((i=+i)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[r,o,u]=e?ui(n,t,i):ui(t,n,i);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(e)if(u<0)for(let t=0;t<a;++t)l[t]=(o-t)/-u;else for(let t=0;t<a;++t)l[t]=(o-t)*u;else if(u<0)for(let t=0;t<a;++t)l[t]=(r+t)/-u;else for(let t=0;t<a;++t)l[t]=(r+t)*u;return l}function li(t,n,i){return ui(t=+t,n=+n,i=+i)[2]}function si(t,n,i){i=+i;const e=(n=+n)<(t=+t),r=e?li(n,t,i):li(t,n,i);return(e?-1:1)*(r<0?1/-r:r)}function ci(t,n,i){let e;for(;;){const r=li(t,n,i);if(r===e||0===r||!isFinite(r))return[t,n];r>0?(t=Math.floor(t/r)*r,n=Math.ceil(n/r)*r):r<0&&(t=Math.ceil(t*r)/r,n=Math.floor(n*r)/r),e=r}}function di(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}function fi(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function vi(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function hi(t,n){let i=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++i,e+=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++i,e+=o)}if(i)return e/i}function pi(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function gi(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function yi(t,n,i=0,e=1/0,r){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),e=Math.floor(Math.min(t.length-1,e)),!(i<=n&&n<=e))return t;for(r=void 0===r?gi:function(t=pi){if(t===pi)return gi;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,i)=>{const e=t(n,i);return e||0===e?e:(0===t(i,i))-(0===t(n,n))}}(r);e>i;){if(e-i>600){const o=e-i+1,u=n-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o)*(u-o/2<0?-1:1);yi(t,n,Math.max(i,Math.floor(n-u*l/o+s)),Math.min(e,Math.floor(n+(o-u)*l/o+s)),r)}const o=t[n];let u=i,a=e;for(mi(t,i,n),r(t[e],o)>0&&mi(t,i,e);u<a;){for(mi(t,u,a),++u,--a;r(t[u],o)<0;)++u;for(;r(t[a],o)>0;)--a}0===r(t[i],o)?mi(t,i,a):(++a,mi(t,a,e)),a<=n&&(i=a+1),n<=a&&(e=a-1)}return t}function mi(t,n,i){const e=t[n];t[n]=t[i],t[i]=e}function bi(t,n){return function(t,n,i){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let i=-1;for(let e of t)null!=(e=n(e,++i,t))&&(e=+e)>=e&&(yield e)}}(t,i)),(e=t.length)&&!isNaN(n=+n)){if(n<=0||e<2)return di(t);if(n>=1)return fi(t);var e,r=(e-1)*n,o=Math.floor(r),u=fi(yi(t,o).subarray(0,o+1));return u+(di(t.subarray(o+1))-u)*(r-o)}}(t,.5,n)}function xi(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function wi(t){let n,i,e;function r(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length?(n=pi,i=(n,i)=>pi(t(n),i),e=(n,i)=>t(n)-i):(n=t===pi||t===xi?t:Mi,i=t,e=t),{left:r,center:function(t,n,i=0,o=t.length){const u=r(t,n,i,o-1);return u>i&&e(t[u-1],n)>-e(t[u],n)?u-1:u},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}function Mi(){return 0}const Ci=1e3,ki=6e4,Ai=36e5,Si=864e5,Li=6048e5,Vi=31536e6,Di=new Date,Ni=new Date;function Oi(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=i=>(t(i=new Date(i-1)),n(i,1),t(i),i),r.round=t=>{const n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=(t,i)=>(n(t=new Date(+t),null==i?1:Math.floor(i)),t),r.range=(i,e,o)=>{const u=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return u;let a;do{u.push(a=new Date(+i)),n(i,o),t(i)}while(a<i&&i<e);return u},r.filter=i=>Oi((n=>{if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),((t,e)=>{if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););})),i&&(r.count=(n,e)=>(Di.setTime(+n),Ni.setTime(+e),t(Di),t(Ni),Math.floor(i(Di,Ni))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?n=>e(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const Ti=Oi((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Ti.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Oi((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):Ti:null),Ti.range;const Ei=Oi((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Ci)}),((t,n)=>(n-t)/Ci),(t=>t.getUTCSeconds())),Fi=(Ei.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getMinutes()))),Bi=(Fi.range,Oi((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getUTCMinutes()))),Pi=(Bi.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci-t.getMinutes()*ki)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getHours()))),_i=(Pi.range,Oi((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getUTCHours()))),Hi=(_i.range,Oi((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Si),(t=>t.getDate()-1))),Ii=(Hi.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>t.getUTCDate()-1))),Wi=(Ii.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>Math.floor(t/Si))));function Ri(t){return Oi((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Li))}Wi.range;const zi=Ri(0),ji=Ri(1),$i=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),Ui=Ri(6);function qi(t){return Oi((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/Li))}zi.range,ji.range,$i.range,Yi.range,Xi.range,Gi.range,Ui.range;const Zi=qi(0),Ki=qi(1),Ji=qi(2),Qi=qi(3),te=qi(4),ne=qi(5),ie=qi(6),ee=(Zi.range,Ki.range,Ji.range,Qi.range,te.range,ne.range,ie.range,Oi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),re=(ee.range,Oi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),oe=(re.range,Oi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));oe.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,i)=>{n.setFullYear(n.getFullYear()+i*t)})):null,oe.range;const ue=Oi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function ae(t,n,i,e,r,o){const u=[[Ei,1,Ci],[Ei,5,5e3],[Ei,15,15e3],[Ei,30,3e4],[o,1,ki],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,Ai],[r,3,108e5],[r,6,216e5],[r,12,432e5],[e,1,Si],[e,2,1728e5],[i,1,Li],[n,1,2592e6],[n,3,7776e6],[t,1,Vi]];function a(n,i,e){const r=Math.abs(i-n)/e,o=wi((([,,t])=>t)).right(u,r);if(o===u.length)return t.every(si(n/Vi,i/Vi,e));if(0===o)return Ti.every(Math.max(si(n,i,e),1));const[a,l]=u[r/u[o-1][2]<u[o][2]/r?o-1:o];return a.every(l)}return[function(t,n,i){const e=n<t;e&&([t,n]=[n,t]);const r=i&&"function"==typeof i.range?i:a(t,n,i),o=r?r.range(t,+n+1):[];return e?o.reverse():o},a]}ue.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null,ue.range;const[le,se]=ae(ue,re,Zi,Wi,_i,Bi),[ce,de]=ae(oe,ee,zi,Hi,Pi,Fi);var fe=new Date,ve=new Date;function he(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=function(n){return t(n=new Date(+n)),n},r.ceil=function(i){return t(i=new Date(i-1)),n(i,1),t(i),i},r.round=function(t){var n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=function(t,i){return n(t=new Date(+t),null==i?1:Math.floor(i)),t},r.range=function(i,e,o){var u,a=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return a;do{a.push(u=new Date(+i)),n(i,o),t(i)}while(u<i&&i<e);return a},r.filter=function(i){return he((function(n){if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););}))},i&&(r.count=function(n,e){return fe.setTime(+n),ve.setTime(+e),t(fe),t(ve),Math.floor(i(fe,ve))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?function(n){return e(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}const pe=864e5,ge=6048e5;function ye(t){return he((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/ge}))}var me=ye(0),be=ye(1),xe=ye(2),we=ye(3),Me=ye(4),Ce=ye(5),ke=ye(6),Ae=(me.range,be.range,xe.range,we.range,Me.range,Ce.range,ke.range,he((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/pe}),(function(t){return t.getUTCDate()-1}))),Se=Ae;function Le(t){return he((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/ge}))}Ae.range;var Ve=Le(0),De=Le(1),Ne=Le(2),Oe=Le(3),Te=Le(4),Ee=Le(5),Fe=Le(6),Be=(Ve.range,De.range,Ne.range,Oe.range,Te.range,Ee.range,Fe.range,he((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/pe),(t=>t.getDate()-1))),Pe=Be,_e=(Be.range,he((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));_e.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,i){n.setFullYear(n.getFullYear()+i*t)})):null};var He=_e,Ie=(_e.range,he((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Ie.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,i){n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null};var We=Ie;function Re(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ze(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function je(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function $e(t){var n=t.dateTime,i=t.date,e=t.time,r=t.periods,o=t.days,u=t.shortDays,a=t.months,l=t.shortMonths,s=tr(r),c=nr(r),d=tr(o),f=nr(o),v=tr(u),h=nr(u),p=tr(a),g=nr(a),y=tr(l),m=nr(l),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Mr,e:Mr,f:Lr,g:Hr,G:Wr,H:Cr,I:kr,j:Ar,L:Sr,m:Vr,M:Dr,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:so,s:co,S:Nr,u:Or,U:Tr,V:Fr,w:Br,W:Pr,x:null,X:null,y:_r,Y:Ir,Z:Rr,"%":lo},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:zr,e:zr,f:Gr,g:ro,G:uo,H:jr,I:$r,j:Yr,L:Xr,m:Ur,M:qr,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:so,s:co,S:Zr,u:Kr,U:Jr,V:to,w:no,W:io,x:null,X:null,y:eo,Y:oo,Z:ao,"%":lo},w={a:function(t,n,i){var e=v.exec(n.slice(i));return e?(t.w=h.get(e[0].toLowerCase()),i+e[0].length):-1},A:function(t,n,i){var e=d.exec(n.slice(i));return e?(t.w=f.get(e[0].toLowerCase()),i+e[0].length):-1},b:function(t,n,i){var e=y.exec(n.slice(i));return e?(t.m=m.get(e[0].toLowerCase()),i+e[0].length):-1},B:function(t,n,i){var e=p.exec(n.slice(i));return e?(t.m=g.get(e[0].toLowerCase()),i+e[0].length):-1},c:function(t,i,e){return k(t,n,i,e)},d:fr,e:fr,f:mr,g:lr,G:ar,H:hr,I:hr,j:vr,L:yr,m:dr,M:pr,p:function(t,n,i){var e=s.exec(n.slice(i));return e?(t.p=c.get(e[0].toLowerCase()),i+e[0].length):-1},q:cr,Q:xr,s:wr,S:gr,u:er,U:rr,V:or,w:ir,W:ur,x:function(t,n,e){return k(t,i,n,e)},X:function(t,n,i){return k(t,e,n,i)},y:lr,Y:ar,Z:sr,"%":br};function M(t,n){return function(i){var e,r,o,u=[],a=-1,l=0,s=t.length;for(i instanceof Date||(i=new Date(+i));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(l,a)),null!=(r=Ue[e=t.charAt(++a)])?e=t.charAt(++a):r="e"===e?" ":"0",(o=n[e])&&(e=o(i,r)),u.push(e),l=a+1);return u.push(t.slice(l,a)),u.join("")}}function C(t,n){return function(i){var e,r,o=je(1900,void 0,1);if(k(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(e=ze(je(o.y,0,1))).getUTCDay(),e=r>4||0===r?be.ceil(e):be(e),e=Se.offset(e,7*(o.V-1)),o.y=e.getUTCFullYear(),o.m=e.getUTCMonth(),o.d=e.getUTCDate()+(o.w+6)%7):(r=(e=Re(je(o.y,0,1))).getDay(),e=r>4||0===r?De.ceil(e):De(e),e=Pe.offset(e,7*(o.V-1)),o.y=e.getFullYear(),o.m=e.getMonth(),o.d=e.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?ze(je(o.y,0,1)).getUTCDay():Re(je(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ze(o)):Re(o)}}function k(t,n,i,e){for(var r,o,u=0,a=n.length,l=i.length;u<a;){if(e>=l)return-1;if(37===(r=n.charCodeAt(u++))){if(r=n.charAt(u++),!(o=w[r in Ue?n.charAt(u++):r])||(e=o(t,i,e))<0)return-1}else if(r!=i.charCodeAt(e++))return-1}return e}return b.x=M(i,b),b.X=M(e,b),b.c=M(n,b),x.x=M(i,x),x.X=M(e,x),x.c=M(n,x),{format:function(t){var n=M(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=C(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=C(t+="",!0);return n.toString=function(){return t},n}}}Ie.range;var Ye,Xe,Ge,Ue={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Ze=/^%/,Ke=/[\\^$*+?|[\]().{}]/g;function Je(t,n,i){var e=t<0?"-":"",r=(e?-t:t)+"",o=r.length;return e+(o<i?new Array(i-o+1).join(n)+r:r)}function Qe(t){return t.replace(Ke,"\\$&")}function tr(t){return new RegExp("^(?:"+t.map(Qe).join("|")+")","i")}function nr(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function ir(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.w=+e[0],i+e[0].length):-1}function er(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.u=+e[0],i+e[0].length):-1}function rr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.U=+e[0],i+e[0].length):-1}function or(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.V=+e[0],i+e[0].length):-1}function ur(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.W=+e[0],i+e[0].length):-1}function ar(t,n,i){var e=qe.exec(n.slice(i,i+4));return e?(t.y=+e[0],i+e[0].length):-1}function lr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.y=+e[0]+(+e[0]>68?1900:2e3),i+e[0].length):-1}function sr(t,n,i){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return e?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),i+e[0].length):-1}function cr(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.q=3*e[0]-3,i+e[0].length):-1}function dr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.m=e[0]-1,i+e[0].length):-1}function fr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.d=+e[0],i+e[0].length):-1}function vr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.m=0,t.d=+e[0],i+e[0].length):-1}function hr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.H=+e[0],i+e[0].length):-1}function pr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.M=+e[0],i+e[0].length):-1}function gr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.S=+e[0],i+e[0].length):-1}function yr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.L=+e[0],i+e[0].length):-1}function mr(t,n,i){var e=qe.exec(n.slice(i,i+6));return e?(t.L=Math.floor(e[0]/1e3),i+e[0].length):-1}function br(t,n,i){var e=Ze.exec(n.slice(i,i+1));return e?i+e[0].length:-1}function xr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.Q=+e[0],i+e[0].length):-1}function wr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.s=+e[0],i+e[0].length):-1}function Mr(t,n){return Je(t.getDate(),n,2)}function Cr(t,n){return Je(t.getHours(),n,2)}function kr(t,n){return Je(t.getHours()%12||12,n,2)}function Ar(t,n){return Je(1+Pe.count(He(t),t),n,3)}function Sr(t,n){return Je(t.getMilliseconds(),n,3)}function Lr(t,n){return Sr(t,n)+"000"}function Vr(t,n){return Je(t.getMonth()+1,n,2)}function Dr(t,n){return Je(t.getMinutes(),n,2)}function Nr(t,n){return Je(t.getSeconds(),n,2)}function Or(t){var n=t.getDay();return 0===n?7:n}function Tr(t,n){return Je(Ve.count(He(t)-1,t),n,2)}function Er(t){var n=t.getDay();return n>=4||0===n?Te(t):Te.ceil(t)}function Fr(t,n){return t=Er(t),Je(Te.count(He(t),t)+(4===He(t).getDay()),n,2)}function Br(t){return t.getDay()}function Pr(t,n){return Je(De.count(He(t)-1,t),n,2)}function _r(t,n){return Je(t.getFullYear()%100,n,2)}function Hr(t,n){return Je((t=Er(t)).getFullYear()%100,n,2)}function Ir(t,n){return Je(t.getFullYear()%1e4,n,4)}function Wr(t,n){var i=t.getDay();return Je((t=i>=4||0===i?Te(t):Te.ceil(t)).getFullYear()%1e4,n,4)}function Rr(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Je(n/60|0,"0",2)+Je(n%60,"0",2)}function zr(t,n){return Je(t.getUTCDate(),n,2)}function jr(t,n){return Je(t.getUTCHours(),n,2)}function $r(t,n){return Je(t.getUTCHours()%12||12,n,2)}function Yr(t,n){return Je(1+Se.count(We(t),t),n,3)}function Xr(t,n){return Je(t.getUTCMilliseconds(),n,3)}function Gr(t,n){return Xr(t,n)+"000"}function Ur(t,n){return Je(t.getUTCMonth()+1,n,2)}function qr(t,n){return Je(t.getUTCMinutes(),n,2)}function Zr(t,n){return Je(t.getUTCSeconds(),n,2)}function Kr(t){var n=t.getUTCDay();return 0===n?7:n}function Jr(t,n){return Je(me.count(We(t)-1,t),n,2)}function Qr(t){var n=t.getUTCDay();return n>=4||0===n?Me(t):Me.ceil(t)}function to(t,n){return t=Qr(t),Je(Me.count(We(t),t)+(4===We(t).getUTCDay()),n,2)}function no(t){return t.getUTCDay()}function io(t,n){return Je(be.count(We(t)-1,t),n,2)}function eo(t,n){return Je(t.getUTCFullYear()%100,n,2)}function ro(t,n){return Je((t=Qr(t)).getUTCFullYear()%100,n,2)}function oo(t,n){return Je(t.getUTCFullYear()%1e4,n,4)}function uo(t,n){var i=t.getUTCDay();return Je((t=i>=4||0===i?Me(t):Me.ceil(t)).getUTCFullYear()%1e4,n,4)}function ao(){return"+0000"}function lo(){return"%"}function so(t){return+t}function co(t){return Math.floor(+t/1e3)}Ye=$e({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"]}),Xe=Ye.format,Ye.parse,Ge=Ye.utcFormat,Ye.utcParse;const fo=wi(pi),vo=fo.right;fo.left,wi((function(t){return null===t?NaN:+t})).center;var ho=vo;function po(t,n,i){t.prototype=n.prototype=i,i.constructor=t}function go(t,n){var i=Object.create(t.prototype);for(var e in n)i[e]=n[e];return i}function yo(){}var mo=.7,bo=1/mo,xo="\\s*([+-]?\\d+)\\s*",wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Co=/^#([0-9a-f]{3,8})$/,ko=new RegExp(`^rgb\\(${xo},${xo},${xo}\\)$`),Ao=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),So=new RegExp(`^rgba\\(${xo},${xo},${xo},${wo}\\)$`),Lo=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${wo}\\)$`),Vo=new RegExp(`^hsl\\(${wo},${Mo},${Mo}\\)$`),Do=new RegExp(`^hsla\\(${wo},${Mo},${Mo},${wo}\\)$`),No={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 Oo(){return this.rgb().formatHex()}function To(){return this.rgb().formatRgb()}function Eo(t){var n,i;return t=(t+"").trim().toLowerCase(),(n=Co.exec(t))?(i=n[1].length,n=parseInt(n[1],16),6===i?Fo(n):3===i?new _o(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?Bo(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?Bo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=ko.exec(t))?new _o(n[1],n[2],n[3],1):(n=Ao.exec(t))?new _o(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=So.exec(t))?Bo(n[1],n[2],n[3],n[4]):(n=Lo.exec(t))?Bo(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Vo.exec(t))?jo(n[1],n[2]/100,n[3]/100,1):(n=Do.exec(t))?jo(n[1],n[2]/100,n[3]/100,n[4]):No.hasOwnProperty(t)?Fo(No[t]):"transparent"===t?new _o(NaN,NaN,NaN,0):null}function Fo(t){return new _o(t>>16&255,t>>8&255,255&t,1)}function Bo(t,n,i,e){return e<=0&&(t=n=i=NaN),new _o(t,n,i,e)}function Po(t,n,i,e){return 1===arguments.length?((r=t)instanceof yo||(r=Eo(r)),r?new _o((r=r.rgb()).r,r.g,r.b,r.opacity):new _o):new _o(t,n,i,null==e?1:e);var r}function _o(t,n,i,e){this.r=+t,this.g=+n,this.b=+i,this.opacity=+e}function Ho(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}`}function Io(){const t=Wo(this.opacity);return`${1===t?"rgb(":"rgba("}${Ro(this.r)}, ${Ro(this.g)}, ${Ro(this.b)}${1===t?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zo(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function jo(t,n,i,e){return e<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new Yo(t,n,i,e)}function $o(t){if(t instanceof Yo)return new Yo(t.h,t.s,t.l,t.opacity);if(t instanceof yo||(t=Eo(t)),!t)return new Yo;if(t instanceof Yo)return t;var n=(t=t.rgb()).r/255,i=t.g/255,e=t.b/255,r=Math.min(n,i,e),o=Math.max(n,i,e),u=NaN,a=o-r,l=(o+r)/2;return a?(u=n===o?(i-e)/a+6*(i<e):i===o?(e-n)/a+2:(n-i)/a+4,a/=l<.5?o+r:2-o-r,u*=60):a=l>0&&l<1?0:u,new Yo(u,a,l,t.opacity)}function Yo(t,n,i,e){this.h=+t,this.s=+n,this.l=+i,this.opacity=+e}function Xo(t){return(t=(t||0)%360)<0?t+360:t}function Go(t){return Math.max(0,Math.min(1,t||0))}function Uo(t,n,i){return 255*(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)}function qo(t,n,i,e,r){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*i+(1+3*t+3*o-3*u)*e+u*r)/6}po(yo,Eo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Oo,formatHex:Oo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $o(this).formatHsl()},formatRgb:To,toString:To}),po(_o,Po,go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _o(Ro(this.r),Ro(this.g),Ro(this.b),Wo(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:Ho,formatHex:Ho,formatHex8:function(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}${zo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Io,toString:Io})),po(Yo,(function(t,n,i,e){return 1===arguments.length?$o(t):new Yo(t,n,i,null==e?1:e)}),go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,e=i+(i<.5?i:1-i)*n,r=2*i-e;return new _o(Uo(t>=240?t-240:t+120,r,e),Uo(t,r,e),Uo(t<120?t+240:t-120,r,e),this.opacity)},clamp(){return new Yo(Xo(this.h),Go(this.s),Go(this.l),Wo(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 t=Wo(this.opacity);return`${1===t?"hsl(":"hsla("}${Xo(this.h)}, ${100*Go(this.s)}%, ${100*Go(this.l)}%${1===t?")":`, ${t})`}`}}));var Zo=t=>()=>t;function Ko(t,n){var i=n-t;return i?function(t,n){return function(i){return t+i*n}}(t,i):Zo(isNaN(t)?n:t)}var Jo=function t(n){var i=function(t){return 1===(t=+t)?Ko:function(n,i){return i-n?function(t,n,i){return t=Math.pow(t,i),n=Math.pow(n,i)-t,i=1/i,function(e){return Math.pow(t+e*n,i)}}(n,i,t):Zo(isNaN(n)?i:n)}}(n);function e(t,n){var e=i((t=Po(t)).r,(n=Po(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),u=Ko(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}return e.gamma=t,e}(1);function Qo(t){return function(n){var i,e,r=n.length,o=new Array(r),u=new Array(r),a=new Array(r);for(i=0;i<r;++i)e=Po(n[i]),o[i]=e.r||0,u[i]=e.g||0,a[i]=e.b||0;return o=t(o),u=t(u),a=t(a),e.opacity=1,function(t){return e.r=o(t),e.g=u(t),e.b=a(t),e+""}}}function tu(t,n){var i,e=n?n.length:0,r=t?Math.min(e,t.length):0,o=new Array(r),u=new Array(e);for(i=0;i<r;++i)o[i]=lu(t[i],n[i]);for(;i<e;++i)u[i]=n[i];return function(t){for(i=0;i<r;++i)u[i]=o[i](t);return u}}function nu(t,n){var i=new Date;return t=+t,n=+n,function(e){return i.setTime(t*(1-e)+n*e),i}}function iu(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}function eu(t,n){var i,e={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)i in t?e[i]=lu(t[i],n[i]):r[i]=n[i];return function(t){for(i in e)r[i]=e[i](t);return r}}Qo((function(t){var n=t.length-1;return function(i){var e=i<=0?i=0:i>=1?(i=1,n-1):Math.floor(i*n),r=t[e],o=t[e+1],u=e>0?t[e-1]:2*r-o,a=e<n-1?t[e+2]:2*o-r;return qo((i-e/n)*n,u,r,o,a)}})),Qo((function(t){var n=t.length;return function(i){var e=Math.floor(((i%=1)<0?++i:i)*n),r=t[(e+n-1)%n],o=t[e%n],u=t[(e+1)%n],a=t[(e+2)%n];return qo((i-e/n)*n,r,o,u,a)}}));var ru=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ou=new RegExp(ru.source,"g");function uu(t,n){var i,e,r,o=ru.lastIndex=ou.lastIndex=0,u=-1,a=[],l=[];for(t+="",n+="";(i=ru.exec(t))&&(e=ou.exec(n));)(r=e.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(i=i[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:iu(i,e)})),o=ou.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var i,e=0;e<n;++e)a[(i=l[e]).i]=i.x(t);return a.join("")})}function au(t,n){n||(n=[]);var i,e=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function lu(t,n){var i,e,r=typeof n;return null==n||"boolean"===r?Zo(n):("number"===r?iu:"string"===r?(i=Eo(n))?(n=i,Jo):uu:n instanceof Eo?Jo:n instanceof Date?nu:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?tu:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?eu:iu:au))(t,n)}function su(t,n){return t=+t,n=+n,function(i){return Math.round(t*(1-i)+n*i)}}function cu(t){return+t}var du=[0,1];function fu(t){return t}function vu(t,n){return(n-=t=+t)?function(i){return(i-t)/n}:(i=isNaN(n)?NaN:.5,function(){return i});var i}function hu(t,n,i){var e=t[0],r=t[1],o=n[0],u=n[1];return r<e?(e=vu(r,e),o=i(u,o)):(e=vu(e,r),o=i(o,u)),function(t){return o(e(t))}}function pu(t,n,i){var e=Math.min(t.length,n.length)-1,r=new Array(e),o=new Array(e),u=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<e;)r[u]=vu(t[u],t[u+1]),o[u]=i(n[u],n[u+1]);return function(n){var i=ho(t,n,1,e)-1;return o[i](r[i](n))}}function gu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function yu(){var t,n,i,e,r,o,u=du,a=du,l=lu,s=fu;function c(){var t,n,i,l=Math.min(u.length,a.length);return s!==fu&&(t=u[0],n=u[l-1],t>n&&(i=t,t=n,n=i),s=function(i){return Math.max(t,Math.min(n,i))}),e=l>2?pu:hu,r=o=null,d}function d(n){return null==n||isNaN(n=+n)?i:(r||(r=e(u.map(t),a,l)))(t(s(n)))}return d.invert=function(i){return s(n((o||(o=e(a,u.map(t),iu)))(i)))},d.domain=function(t){return arguments.length?(u=Array.from(t,cu),c()):u.slice()},d.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},d.rangeRound=function(t){return a=Array.from(t),l=su,c()},d.clamp=function(t){return arguments.length?(s=!!t||fu,c()):s!==fu},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(i=t,d):i},function(i,e){return t=i,n=e,c()}}function mu(){return yu()(fu,fu)}function bu(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function xu(t,n){var i,e=0,r=(t=t.slice()).length-1,o=t[e],u=t[r];return u<o&&(i=e,e=r,r=i,i=o,o=u,u=i),t[e]=n.floor(o),t[r]=n.ceil(u),t}function wu(t){return new Date(t)}function Mu(t){return t instanceof Date?+t:+new Date(+t)}function Cu(t,n,i,e,r,o,u,a,l,s){var c=mu(),d=c.invert,f=c.domain,v=s(".%L"),h=s(":%S"),p=s("%I:%M"),g=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(l(t)<t?v:a(t)<t?h:u(t)<t?p:o(t)<t?g:e(t)<t?r(t)<t?y:m:i(t)<t?b:x)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?f(Array.from(t,Mu)):f().map(wu)},c.ticks=function(n){var i=f();return t(i[0],i[i.length-1],null==n?10:n)},c.tickFormat=function(t,n){return null==n?w:s(n)},c.nice=function(t){var i=f();return t&&"function"==typeof t.range||(t=n(i[0],i[i.length-1],null==t?10:t)),t?f(xu(i,t)):c},c.copy=function(){return gu(c,Cu(t,n,i,e,r,o,u,a,l,s))},c}function ku(){return bu.apply(Cu(ce,de,oe,ee,zi,Hi,Pi,Fi,Ei,Xe).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Au(){return bu.apply(Cu(le,se,ue,re,Zi,Ii,_i,Bi,Ei,Ge).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Su(t,n,i){t=+t,n=+n,i=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+i;for(var e=-1,r=0|Math.max(0,Math.ceil((n-t)/i)),o=new Array(r);++e<r;)o[e]=t+e*i;return o}class Lu extends Map{constructor(t,n=Du){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Vu(this,t))}has(t){return super.has(Vu(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):(t.set(e,i),i)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)&&(i=t.get(i),t.delete(e)),i}(this,t))}}function Vu({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):i}function Du(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Nu=Symbol("implicit");function Ou(){var t=new Lu,n=[],i=[],e=Nu;function r(r){let o=t.get(r);if(void 0===o){if(e!==Nu)return e;t.set(r,o=n.push(r)-1)}return i[o%i.length]}return r.domain=function(i){if(!arguments.length)return n.slice();n=[],t=new Lu;for(const e of i)t.has(e)||t.set(e,n.push(e)-1);return r},r.range=function(t){return arguments.length?(i=Array.from(t),r):i.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Ou(n,i).unknown(e)},bu.apply(r,arguments),r}function Tu(){var t,n,i=Ou().unknown(void 0),e=i.domain,r=i.range,o=0,u=1,a=!1,l=0,s=0,c=.5;function d(){var i=e().length,d=u<o,f=d?u:o,v=d?o:u;t=(v-f)/Math.max(1,i-l+2*s),a&&(t=Math.floor(t)),f+=(v-f-t*(i-l))*c,n=t*(1-l),a&&(f=Math.round(f),n=Math.round(n));var h=Su(i).map((function(n){return f+t*n}));return r(d?h.reverse():h)}return delete i.unknown,i.domain=function(t){return arguments.length?(e(t),d()):e()},i.range=function(t){return arguments.length?([o,u]=t,o=+o,u=+u,d()):[o,u]},i.rangeRound=function(t){return[o,u]=t,o=+o,u=+u,a=!0,d()},i.bandwidth=function(){return n},i.step=function(){return t},i.round=function(t){return arguments.length?(a=!!t,d()):a},i.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),d()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},i.paddingOuter=function(t){return arguments.length?(s=+t,d()):s},i.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},i.copy=function(){return Tu(e(),[o,u]).round(a).paddingInner(l).paddingOuter(s).align(c)},bu.apply(d(),arguments)}var Eu,Fu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bu(t){if(!(n=Fu.exec(t)))throw new Error("invalid format: "+t);var n;return new Pu({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Pu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function _u(t,n){if((i=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var i,e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function Hu(t){return(t=_u(Math.abs(t)))?t[1]:NaN}function Iu(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Bu.prototype=Pu.prototype,Pu.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 Wu={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Iu(100*t,n),r:Iu,s:function(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1],o=r-(Eu=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+_u(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ru(t){return t}var zu,ju,$u,Yu=Array.prototype.map,Xu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gu(){var t=mu();return t.copy=function(){return gu(t,Gu())},bu.apply(t,arguments),function(t){var n=t.domain;return t.ticks=function(t){var i=n();return ai(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var e=n();return function(t,n,i,e){var r,o=si(t,n,i);switch((e=Bu(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3)))-Hu(Math.abs(t)))}(o,u))||(e.precision=r),$u(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Hu(n)-Hu(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Hu(Math.abs(t)))}(o))||(e.precision=r-2*("%"===e.type))}return ju(e)}(e[0],e[e.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var e,r,o=n(),u=0,a=o.length-1,l=o[u],s=o[a],c=10;for(s<l&&(r=l,l=s,s=r,r=u,u=a,a=r);c-- >0;){if((r=li(l,s,i))===e)return o[u]=l,o[a]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}e=r}return t},t}(t)}function Uu(t){return Math.log(t)}function qu(t){return Math.exp(t)}function Zu(t){return-Math.log(-t)}function Ku(t){return-Math.exp(-t)}function Ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Qu(t){return(n,i)=>-t(-n,i)}function ta(){const t=function(t){const n=t(Uu,qu),i=n.domain;let e,r,o=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),r=function(t){return 10===t?Ju:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),i()[0]<0?(e=Qu(e),r=Qu(r),t(Zu,Ku)):t(Uu,qu),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(i(t),u()):i()},n.ticks=t=>{const n=i();let u=n[0],a=n[n.length-1];const l=a<u;l&&([u,a]=[a,u]);let s,c,d=e(u),f=e(a);const v=null==t?10:+t;let h=[];if(!(o%1)&&f-d<v){if(d=Math.floor(d),f=Math.ceil(f),u>0){for(;d<=f;++d)for(s=1;s<o;++s)if(c=d<0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}}else for(;d<=f;++d)for(s=o-1;s>=1;--s)if(c=d>0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}2*h.length<v&&(h=ai(u,a,v))}else h=ai(d,f,Math.min(f-d,v)).map(r);return l?h.reverse():h},n.tickFormat=(t,i)=>{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=Bu(i)).precision||(i.trim=!0),i=ju(i)),t===1/0)return i;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*o<o-.5&&(n*=o),n<=u?i(t):""}},n.nice=()=>i(xu(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}(yu()).domain([1,10]);return t.copy=()=>gu(t,ta()).base(t.base()),bu.apply(t,arguments),t}function na(){}function ia(t){return null==t?na:function(){return this.querySelector(t)}}function ea(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ra(){return[]}function oa(t){return function(n){return n.matches(t)}}zu=function(t){var n,i,e=void 0===t.grouping||void 0===t.thousands?Ru:(n=Yu.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,o=[],u=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=n[u=(u+1)%n.length];return o.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Ru:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(Yu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Bu(t)).fill,i=t.align,d=t.sign,f=t.symbol,v=t.zero,h=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(p=!0,m="g"):Wu[m]||(void 0===g&&(g=12),y=!0,m="g"),(v||"0"===n&&"="===i)&&(v=!0,n="0",i="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?o:/[%p]/.test(m)?l:"",w=Wu[m],M=/[defgprs%]/.test(m);function C(t){var r,o,l,f=b,C=x;if("c"===m)C=w(t)+C,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),y&&(t=function(t){t:for(var n,i=t.length,e=1,r=-1;e<i;++e)switch(t[e]){case".":r=n=e;break;case"0":0===r&&(r=e),n=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,C=("s"===m?Xu[8+Eu/3]:"")+C+(k&&"("===d?")":""),M)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){C=(46===l?u+t.slice(r+1):t.slice(r))+C,t=t.slice(0,r);break}}p&&!v&&(t=e(t,1/0));var A=f.length+t.length+C.length,S=A<h?new Array(h-A+1).join(n):"";switch(p&&v&&(t=e(S+t,S.length?h-C.length:1/0),S=""),i){case"<":t=f+t+C+S;break;case"=":t=f+S+t+C;break;case"^":t=S.slice(0,A=S.length>>1)+f+t+C+S.slice(A);break;default:t=S+f+t+C}return a(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return t+""},C}return{format:d,formatPrefix:function(t,n){var i=d(((t=Bu(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3))),r=Math.pow(10,-e),o=Xu[8+e/3];return function(t){return i(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),ju=zu.format,$u=zu.formatPrefix;var ua=Array.prototype.find;function aa(){return this.firstElementChild}var la=Array.prototype.filter;function sa(){return Array.from(this.children)}function ca(t){return new Array(t.length)}function da(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function fa(t,n,i,e,r,o){for(var u,a=0,l=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],e[a]=u):i[a]=new da(t,o[a]);for(;a<l;++a)(u=n[a])&&(r[a]=u)}function va(t,n,i,e,r,o,u){var a,l,s,c=new Map,d=n.length,f=o.length,v=new Array(d);for(a=0;a<d;++a)(l=n[a])&&(v[a]=s=u.call(l,l.__data__,a,n)+"",c.has(s)?r[a]=l:c.set(s,l));for(a=0;a<f;++a)s=u.call(t,o[a],a,o)+"",(l=c.get(s))?(e[a]=l,l.__data__=o[a],c.delete(s)):i[a]=new da(t,o[a]);for(a=0;a<d;++a)(l=n[a])&&c.get(v[a])===l&&(r[a]=l)}function ha(t){return t.__data__}function pa(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ga(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}da.prototype={constructor:da,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var ya="http://www.w3.org/1999/xhtml",ma={svg:"http://www.w3.org/2000/svg",xhtml:ya,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ba(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),ma.hasOwnProperty(n)?{space:ma[n],local:t}:t}function xa(t){return function(){this.removeAttribute(t)}}function wa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ma(t,n){return function(){this.setAttribute(t,n)}}function Ca(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ka(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function Aa(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Sa(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function La(t){return function(){this.style.removeProperty(t)}}function Va(t,n,i){return function(){this.style.setProperty(t,n,i)}}function Da(t,n,i){return function(){var e=n.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function Na(t){return function(){delete this[t]}}function Oa(t,n){return function(){this[t]=n}}function Ta(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Ea(t){return t.trim().split(/^|\s+/)}function Fa(t){return t.classList||new Ba(t)}function Ba(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}function Pa(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.add(n[e])}function _a(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.remove(n[e])}function Ha(t){return function(){Pa(this,t)}}function Ia(t){return function(){_a(this,t)}}function Wa(t,n){return function(){(n.apply(this,arguments)?Pa:_a)(this,t)}}function Ra(){this.textContent=""}function za(t){return function(){this.textContent=t}}function ja(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function $a(){this.innerHTML=""}function Ya(t){return function(){this.innerHTML=t}}function Xa(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ga(){this.nextSibling&&this.parentNode.appendChild(this)}function Ua(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qa(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===ya&&n.documentElement.namespaceURI===ya?n.createElement(t):n.createElementNS(i,t)}}function Za(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ka(t){var n=ba(t);return(n.local?Za:qa)(n)}function Ja(){return null}function Qa(){var t=this.parentNode;t&&t.removeChild(this)}function tl(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function nl(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function il(t){return function(){var n=this.__on;if(n){for(var i,e=0,r=-1,o=n.length;e<o;++e)i=n[e],t.type&&i.type!==t.type||i.name!==t.name?n[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?n.length=r:delete this.__on}}}function el(t,n,i){return function(){var e,r=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(r)for(var u=0,a=r.length;u<a;++u)if((e=r[u]).type===t.type&&e.name===t.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=o,e.options=i),void(e.value=n);this.addEventListener(t.type,o,i),e={type:t.type,name:t.name,value:n,listener:o,options:i},r?r.push(e):this.__on=[e]}}function rl(t,n,i){var e=Sa(t),r=e.CustomEvent;"function"==typeof r?r=new r(n,i):(r=e.document.createEvent("Event"),i?(r.initEvent(n,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function ol(t,n){return function(){return rl(this,t,n)}}function ul(t,n){return function(){return rl(this,t,n.apply(this,arguments))}}Ba.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var al=[null];function ll(t,n){this._groups=t,this._parents=n}function sl(t){return"string"==typeof t?new ll([[document.querySelector(t)]],[document.documentElement]):new ll([[t]],al)}function cl(t){return"string"==typeof t?new ll([document.querySelectorAll(t)],[document.documentElement]):new ll([ea(t)],al)}function dl(t){var n=/[1-9]([0]+$)|\.([0-9]*)/.exec(String(t));return n?n[1]?-n[1].length:n[2]?n[2].length:0:0}function fl(t,n,i){void 0===i&&(i=10);var e=Math.pow(i,n);return Math.round(t*e)/e}function vl(t){this._context=t}function hl(t){return new vl(t)}function pl(t){this._context=t}function gl(t){var n,i,e=t.length-1,r=new Array(e),o=new Array(e),u=new Array(e);for(r[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<e-1;++n)r[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(r[e-1]=2,o[e-1]=7,u[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=r[n]/o[n-1],o[n]-=i,u[n]-=i*u[n-1];for(r[e-1]=u[e-1]/o[e-1],n=e-2;n>=0;--n)r[n]=(u[n]-r[n+1])/o[n];for(o[e-1]=(t[e]+r[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function yl(t){return new pl(t)}function ml(t,n){this._context=t,this._t=n}function bl(t){return new ml(t,.5)}function xl(t){return new ml(t,0)}function wl(t){return new ml(t,1)}function Ml(t){const n=(4-t.length%4)%4;return t+"=".repeat(n)}function Cl(t){if("undefined"!=typeof window&&"function"==typeof atob){const n=atob(t),i=n.length,e=new Uint8Array(i);for(let t=0;t<i;t++)e[t]=n.charCodeAt(t);return e}throw new Error("Base64 decoding is not supported in this environment.")}function kl(t,n){if(1===n.length)return t;if(2===n.length){const[i,e]=n,r=[];for(let n=0;n<i;n++)r.push(t.slice(n*e,(n+1)*e));return r}const[i,...e]=n,r=t.length/i,o=[];for(let n=0;n<i;n++)o.push(kl(t.slice(n*r,(n+1)*r),e));return o}function Al(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>Al(t)));if("bdata"in t&&"string"==typeof t.bdata&&function(t){if("string"!=typeof t)return!1;if(t.length%4!=0&&(t=Ml(t)),!/^[A-Za-z0-9+/]+={0,2}$/.test(t))return!1;try{return Cl(t),!0}catch{return!1}}(t.bdata)){const n=t.dtype||"utf-8",i=function(t,n){t=Ml(t);try{const i=Cl(t);switch(n){case"f8":return Array.from(new Float64Array(i.buffer));case"i8":case"i4":return Array.from(new Int32Array(i.buffer));case"u8":return Array.from(new Uint32Array(i.buffer));case"i2":return Array.from(new Int16Array(i.buffer));case"i1":return Array.from(new Int8Array(i.buffer));default:try{return i.toString()}catch(t){return i}}}catch(n){throw new Error(`Failed to decode base64 value: ${t}`)}}(t.bdata,n);let e=t.shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Il(t)||(t=void 0)}catch{const n=e.split(",").map((t=>Number(t.trim())));n.every((t=>!isNaN(t)))&&(t=n)}e=t}return e&&Il(e)?kl(i,e):i}const n={};for(const i of Object.keys(t))n[i]=Al(t[i]);return n}function Sl(t){return t.data=Al(t.data),t}ll.prototype=function(){return new ll([[document.documentElement]],al)}.prototype={constructor:ll,select:function(t){"function"!=typeof t&&(t=ia(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u,a=n[r],l=a.length,s=e[r]=new Array(l),c=0;c<l;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),s[c]=u);return new ll(e,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return ea(t.apply(this,arguments))}}(t):function(t){return null==t?ra:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,i=n.length,e=[],r=[],o=0;o<i;++o)for(var u,a=n[o],l=a.length,s=0;s<l;++s)(u=a[s])&&(e.push(t.call(u,u.__data__,s,a)),r.push(u));return new ll(e,r)},selectChild:function(t){return this.select(null==t?aa:function(t){return function(){return ua.call(this.children,t)}}("function"==typeof t?t:oa(t)))},selectChildren:function(t){return this.selectAll(null==t?sa:function(t){return function(){return la.call(this.children,t)}}("function"==typeof t?t:oa(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u=n[r],a=u.length,l=e[r]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&l.push(o);return new ll(e,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,ha);var i,e=n?va:fa,r=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var u=o.length,a=new Array(u),l=new Array(u),s=new Array(u),c=0;c<u;++c){var d=r[c],f=o[c],v=f.length,h=pa(t.call(d,d&&d.__data__,c,r)),p=h.length,g=l[c]=new Array(p),y=a[c]=new Array(p);e(d,f,g,y,s[c]=new Array(v),h,n);for(var m,b,x=0,w=0;x<p;++x)if(m=g[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<p;);m._next=b||null}}return(a=new ll(a,r))._enter=l,a._exit=s,a},enter:function(){return new ll(this._enter||this._groups.map(ca),this._parents)},exit:function(){return new ll(this._exit||this._groups.map(ca),this._parents)},join:function(t,n,i){var e=this.enter(),r=this,o=this.exit();return"function"==typeof t?(e=t(e))&&(e=e.selection()):e=e.append(t+""),null!=n&&(r=n(r))&&(r=r.selection()),null==i?o.remove():i(o),e&&r?e.merge(r).order():r},merge:function(t){for(var n=t.selection?t.selection():t,i=this._groups,e=n._groups,r=i.length,o=e.length,u=Math.min(r,o),a=new Array(r),l=0;l<u;++l)for(var s,c=i[l],d=e[l],f=c.length,v=a[l]=new Array(f),h=0;h<f;++h)(s=c[h]||d[h])&&(v[h]=s);for(;l<r;++l)a[l]=i[l];return new ll(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,i=t.length;++n<i;)for(var e,r=t[n],o=r.length-1,u=r[o];--o>=0;)(e=r[o])&&(u&&4^e.compareDocumentPosition(u)&&u.parentNode.insertBefore(e,u),u=e);return this},sort:function(t){function n(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=ga);for(var i=this._groups,e=i.length,r=new Array(e),o=0;o<e;++o){for(var u,a=i[o],l=a.length,s=r[o]=new Array(l),c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(n)}return new ll(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e=t[n],r=0,o=e.length;r<o;++r){var u=e[r];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,i=0,e=n.length;i<e;++i)for(var r,o=n[i],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var i=ba(t);if(arguments.length<2){var e=this.node();return i.local?e.getAttributeNS(i.space,i.local):e.getAttribute(i)}return this.each((null==n?i.local?wa:xa:"function"==typeof n?i.local?Aa:ka:i.local?Ca:Ma)(i,n))},style:function(t,n,i){return arguments.length>1?this.each((null==n?La:"function"==typeof n?Da:Va)(t,n,null==i?"":i)):function(t,n){return t.style.getPropertyValue(n)||Sa(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Na:"function"==typeof n?Ta:Oa)(t,n)):this.node()[t]},classed:function(t,n){var i=Ea(t+"");if(arguments.length<2){for(var e=Fa(this.node()),r=-1,o=i.length;++r<o;)if(!e.contains(i[r]))return!1;return!0}return this.each(("function"==typeof n?Wa:n?Ha:Ia)(i,n))},text:function(t){return arguments.length?this.each(null==t?Ra:("function"==typeof t?ja:za)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$a:("function"==typeof t?Xa:Ya)(t)):this.node().innerHTML},raise:function(){return this.each(Ga)},lower:function(){return this.each(Ua)},append:function(t){var n="function"==typeof t?t:Ka(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var i="function"==typeof t?t:Ka(t),e=null==n?Ja:"function"==typeof n?n:ia(n);return this.select((function(){return this.insertBefore(i.apply(this,arguments),e.apply(this,arguments)||null)}))},remove:function(){return this.each(Qa)},clone:function(t){return this.select(t?nl:tl)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,i){var e,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?el:il,e=0;e<u;++e)this.each(a(o[e],n,i));return this}var a=this.node().__on;if(a)for(var l,s=0,c=a.length;s<c;++s)for(e=0,l=a[s];e<u;++e)if((r=o[e]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ul:ol)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e,r=t[n],o=0,u=r.length;o<u;++o)(e=r[o])&&(yield e)}},vl.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=gl(t),r=gl(n),o=0,u=1;u<i;++o,++u)this._context.bezierCurveTo(e[0][o],r[0][o],e[1][o],r[1][o],t[u],n[u]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},ml.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const Ll="Unsupported chart - type :",Vl=t=>!isNaN(parseFloat(t))&&isFinite(t),Dl=t=>{if(Vl(t))return!1;const n=new Date(Date.parse(t));if(isNaN(n.getTime()))return!1;const i=n.getFullYear();return!!(/\b\d{4}\b/.test(t)||2e3!==i&&2001!==i)},Nl=(t,n,...i)=>!!Il(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),Ol=t=>Nl(t,(t=>Dl(t)||null===t)),Tl=t=>Nl(t,(t=>"string"==typeof t&&Vl(t)||"number"==typeof t||null===t)),El=t=>Nl(t,(t=>(t=>{if("string"!=typeof t)return!1;const n=new Date(`${t} 1, 2000`);if(isNaN(n.getTime()))return!1;const i=[void 0,"en-US"];for(const e of i){const i=n.toLocaleString(e,{month:"long"}),r=n.toLocaleString(e,{month:"short"});if(t.toLowerCase()===i.toLowerCase()||t.toLowerCase()===r.toLowerCase())return!0}return!1})(t)||null===t)),Fl=t=>Nl(t,(t=>(t=>{if(Vl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),Bl=t=>Nl(t,(t=>"string"==typeof t||null===t)),Pl=t=>Nl(t,(t=>"object"==typeof t&&null!==t&&!Il(t))),_l=t=>null==t||"number"==typeof t&&!isFinite(t),Hl=(t,n=0)=>{if(n>15)throw new Error("Maximum json depth exceeded");if("object"==typeof t&&null!==t)for(const i in t)t.hasOwnProperty(i)&&("string"==typeof t[i]?t[i]=t[i].replace(/</g,"&lt;").replace(/>/g,"&gt;"):t[i]=Hl(t[i],n+1));return t};function Il(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const Wl=t=>!!t&&(!Il(t)||t.length>0),Rl=(t,n)=>{if(!(t=>!(Array.isArray(t.x)&&t.x.length>0&&Array.isArray(t.x[0])||Array.isArray(t.y)&&t.y.length>0&&Array.isArray(t.y[0])))(t))throw new Error("Invalid 2D series encountered.");if(n&&!Tl(t.y))throw new Error("Non numeric Y values encountered.")},zl=t=>["markers","text+markers","markers+text","text"].includes(t),jl=(t,n)=>{var i,e,r;const o=null!==(i=t.mode)&&void 0!==i?i:"",u=t&&t.x&&t.x.length>0?typeof(null===(e=null==t?void 0:t.x)||void 0===e?void 0:e[0]):"undefined",a=t&&t.y&&t.y.length>0?typeof(null===(r=null==t?void 0:t.y)||void 0===r?void 0:r[0]):"undefined";if(!Tl(t.x)&&!Bl(t.x)&&!Ol(t.x))throw new Error(`${Ll} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Tl(t.y)&&!Bl(t.y))throw new Error(`${Ll} ${t.type}, mode: ${o}, yAxisType: ${a}`);const l=ql(t),s=Kl(t,n);if(l&&s)throw new Error(`${Ll} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&$l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported for AreaChart.`);if(s&&$l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported for VSBC fallback.`)},$l=(t,n)=>{const i=Gl(t);return Object.keys(i).some((t=>{var e;const r=Ul(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Yl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${Ll} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)},t=>Rl(t,!1)],bar:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)},t=>{(t=>{const n=t.x&&Il(t.x)&&0===t.x.length,i=t.y&&Il(t.y)&&0===t.y.length;if(n||i){let t="Bar chart: ";throw n&&i?t+="both x and y arrays are empty.":n?t+="x array is empty.":i&&(t+="y array is empty."),new Error(t)}if("h"===t.orientation){if(!Tl(t.x)&&!Ol(t.x))throw new Error(`${Ll} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!Xl(t)&&Ol(t.x))throw new Error(`${Ll} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);Rl(t,!1)}else if(!Tl(t.y)&&!Bl(t.y)&&!Pl(t.y))throw new Error("Non numeric, string, or object Y values encountered, type: "+typeof t.y)})(t)}],sankey:[t=>{if(function(t){var n,i,e,r;const o={};null===(i=null===(n=t.node)||void 0===n?void 0:n.label)||void 0===i||i.forEach(((t,n)=>o[n]=[])),null===(r=null===(e=t.link)||void 0===e?void 0:e.value)||void 0===r||r.forEach(((n,i)=>{var e,r,u,a;_l(n)||_l(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||_l(null===(a=null===(u=t.link)||void 0===u?void 0:u.target)||void 0===a?void 0:a[i])||o[t.link.source[i]].push(t.link.target[i])}));const u=new Set,a=new Set;function l(t,n){if(_l(t)||!o[t])return!1;if(a.has(t))return!0;if(!u.has(t)){u.add(t),a.add(t);for(const i of o[t])if(l(i,[...n,i]))return!0;return a.delete(t),!1}}for(let t=0;t<Object.keys(o).length;t++)if(l(t,[t]))return!0;return!1}(t))throw new Error(`${Ll} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>jl(t,n)],scattergl:[(t,n)=>jl(t,n)],scatterpolar:[t=>{if(!Tl(t.theta)&&!Bl(t.theta))throw new Error(`${Ll} ${t.type}, theta values must be array of numbers or strings`);if(!Tl(t.r))throw new Error(`${Ll} ${t.type}, Non numeric r values`)}],funnel:[t=>Rl(t,!1)],histogram2d:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)}]},Xl=t=>Ol(t.base)||Tl(t.base)||Dl(t.base)||Vl(t.base),Gl=t=>{let n=1;"string"==typeof t.xaxis&&/^x\d+$/.test(t.xaxis)&&(n=parseInt(t.xaxis.slice(1),10));let i=1;return"string"==typeof t.yaxis&&/^y\d+$/.test(t.yaxis)&&(i=parseInt(t.yaxis.slice(1),10)),{x:n,y:i}},Ul=(t,n)=>`${t}axis${n>1?n:""}`,ql=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Zl=(t,n)=>{var i;const e=Ol(t.x),r=Tl(t.x),o=Fl(t.x),u=El(t.x),a=Bl(t.y),l=Gl(t),s=Ul("x",l.x),c="category"===(null===(i=null==n?void 0:n[s])||void 0===i?void 0:i.type);return!(!(e||r||u)||o||a||c)},Kl=(t,n)=>{var i;return!zl(null!==(i=t.mode)&&void 0!==i?i:"")&&!Zl(t,n)},Jl=(t,n)=>{var i,e;if("none"===t.mode&&"toself"===t.fill){let n=!0;for(let i=0;i<t.x.length;i+=5)if(t.x[i]!==t.x[i+3]||t.x[i+1]!==t.x[i+2]||t.y[i]!==t.y[i+1]||t.y[i+2]!==t.y[i+3]||i>0&&null!==t.y[i-1]){n=!1;break}if(n)return!0}return!("markers"!==t.mode||1!==(null===(i=t.marker)||void 0===i?void 0:i.size)||0!==(null===(e=t.marker)||void 0===e?void 0:e.opacity)||""!==t.name||!1!==t.showlegend||!n)};var Ql,ts,ns,is,es={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.11",color12:"qualitative.12",color13:"qualitative.13",color14:"qualitative.14",color15:"qualitative.15",color16:"qualitative.16",color17:"qualitative.17",color18:"qualitative.18",color19:"qualitative.19",color20:"qualitative.20",color21:"qualitative.21",color22:"qualitative.22",color23:"qualitative.23",color24:"qualitative.24",color25:"qualitative.25",color26:"qualitative.26",color27:"qualitative.27",color28:"qualitative.28",color29:"qualitative.29",color30:"qualitative.30",color31:"qualitative.31",color32:"qualitative.32",color33:"qualitative.33",color34:"qualitative.34",color35:"qualitative.35",color36:"qualitative.36",color37:"qualitative.37",color38:"qualitative.38",color39:"qualitative.39",color40:"qualitative.40",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},rs={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],11:["#3c51b4","#93a4f4"],12:["#ad006a","#ee5fb7"],13:["#026467","#4cb4b7"],14:["#674c8c","#a083c9"],15:["#0e7a0b","#27ac22"],16:["#2c72a8","#4fa1e1"],17:["#9a3d0c","#d77440"],18:["#405f14","#73aa24"],19:["#863593","#c36bd1"],20:["#6d5700","#d0b232"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"],30:["#937700","#c19c00"],31:["#2c3c85","#c8d1fa"],32:["#7f004e","#f7adda"],33:["#02494c","#9bd9db"],34:["#4c3867","#b29ad4"],35:["#0b5a08","#a7e3a5"],36:["#20547c","#83bdeb"],37:["#712d09","#df8e64"],38:["#23330b","#a4cc6c"],39:["#63276d","#cf87da"],40:["#3a2f00","#dac157"]},os={qualitative:rs,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},us=Object.values(rs),as=Object.values(es),ls=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},ss=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=us[(t+n)%us.length];return ls(e,i)},cs=function(t,n){if(void 0===n&&(n=!1),as.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=os[e][r];return ls(o,n)}return t},ds=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},fs=function(t){var n=t.r,i=t.g,e=t.b;return{r:ds(n/255),g:ds(i/255),b:ds(e/255)}},vs=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},hs=function(t,n){var i=vs(fs(Po(t))),e=vs(fs(Po(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)},ps="2000-01-01",gs="fui-cart__xAxis",ys=".".concat(gs," text");function ms(t,n){void 0===n&&(n=!1);var i=$u(".2~",t);Math.abs(t)<1?i=ju(".2~g"):n&&Math.abs(t)>=1e3&&(i=$u(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function bs(t){return ms(t)}function xs(t,n,i,e,r){var o=t.domainNRangeValues,u=t.showRoundOffXTickValues,a=void 0===u||u,l=t.xAxistickSize,s=void 0===l?6:l,c=t.tickPadding,d=void 0===c?10:c,f=t.xAxisCount,v=t.xAxisElement,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=t.tickText,b=o.dStartValue,x=o.dEndValue,w=void 0!==t.xMinValue?Math.min(b,t.xMinValue):b,M=void 0!==t.xMaxValue?Math.max(x,t.xMaxValue):x,C=fc(r).domain([w,M]).range([o.rStartValue,o.rEndValue]);a&&C.nice();var k=null!=f?f:6,A=function(t,i,r){if(n.tickValues&&m&&void 0!==m[i])return m[i];if(n.tickFormat)return ju(n.tickFormat)(t);var o="number"==typeof t?t:t.valueOf();return""===(null==r?void 0:r(o))?"":(0,Yn.c$)(o,e)};if(h){var S=p(C.ticks().map((function(t,n){return A(t,n)})))+20,L=C.range(),V=L[0],D=L[1];k=Math.min(Math.max(1,Math.floor(Math.abs(D-V)/S)),10)}var N,O=ni(C).tickSize(s).tickPadding(d).ticks(k).tickFormat((function(t,n){return A(t,n,C.tickFormat(k))}));[ts.HorizontalBarChartWithAxis,ts.GanttChart].includes(i)&&O.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?N=n.tickValues:g&&(N=bc(r,g,y,C.domain())),N&&O.tickValues(N),v&&sl(v).call(O).selectAll("text").attr("aria-hidden","true");var T=null!=N?N:C.ticks(k);return{xScale:C,tickValues:T,tickLabels:T.map(O.tickFormat())}}function ws(t,n){var i,e=Ei,r=n?Bi:Fi,o=n?_i:Pi,u=n?Ii:Hi,a=n?re:ee,l=n?Zi:zi,s=n?ue:oe,c=[{formatLevel:0,condition:function(t){return e(t)<t}},{formatLevel:1,condition:function(t){return r(t)<t}},{formatLevel:2,condition:function(t){return o(t)<t}},{formatLevel:3,condition:function(t){return u(t)<t}},{formatLevel:4,condition:function(t){return a(t)<t&&l(t)<t}},{formatLevel:5,condition:function(t){return a(t)<t}},{formatLevel:6,condition:function(t){return s(t)<t}},{formatLevel:7,condition:function(){return!0}}].find((function(n){return(0,n.condition)(t)}));return null!==(i=null==c?void 0:c.formatLevel)&&void 0!==i?i:7}function Ms(t,n,i){var e,r,o=t.yMinMaxValues,u=void 0===o?{startValue:0,endValue:0}:o,a=t.yAxisElement,l=void 0===a?null:a,s=t.yMaxValue,c=void 0===s?0:s,d=t.yMinValue,f=void 0===d?0:d,v=t.containerHeight,h=t.margins,p=t.tickPadding,g=void 0===p?12:p,y=t.maxOfYVal,m=void 0===y?0:y,b=t.yAxisTickFormat,x=t.yAxisTickCount,w=void 0===x?4:x,M=t.tickValues,C=t.tickStep,k=t.tick0,A=t.tickText,S=m||u.endValue,L=S>c?S:c,V=u.startValue<f?Math.min(0,u.startValue):f,D=Gu().domain([V,L]).range([v-h.bottom,h.top]),N=(n?ti(D):ii(D)).tickPadding(g).ticks(w);return N.tickFormat((function(t,n){return M&&A&&void 0!==A[n]?A[n]:"function"==typeof b?b(t,n):"string"==typeof b?ju(b)(t):bs("number"==typeof t?t:t.valueOf())})),M?r=M:C&&(r=bc(void 0,C,k,D.domain())),r&&N.tickValues(r),l&&sl(l).call(N).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=D.domain(),i.yAxisTickText=(null!==(e=N.tickValues())&&void 0!==e?e:D.ticks(w)).map(N.tickFormat()),D}function Cs(t,n,i,e,r,o,u,a){var l;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var s=t.yMinMaxValues,c=void 0===s?{startValue:0,endValue:0}:s,d=t.yAxisElement,f=void 0===d?null:d,v=t.yMaxValue,h=void 0===v?0:v,p=t.yMinValue,g=void 0===p?0:p,y=t.containerHeight,m=t.containerWidth,b=t.margins,x=t.tickPadding,w=void 0===x?12:x,M=t.maxOfYVal,C=void 0===M?0:M,k=t.yAxisTickFormat,A=t.yAxisTickCount,S=void 0===A?4:A,L=t.eventAnnotationProps,V=t.eventLabelHeight,D=t.tickValues,N=t.tickStep,O=t.tick0,T=t.tickText,E=C||c.endValue||0,F=E>h?E:h,B=o?Math.min(c.startValue||0,g||0):c.startValue<g?0:g,P=function(t,n,i,e,r){if(r)return function(t,n,i){var e,r,o=t<0&&t===n?0:n,u=ci(t>=0&&t===n?0:t,o,i),a=ai(u[0],u[u.length-1],i);return a[a.length-1]>o&&(e=o,r=(0,Yn.Di)(e),Math.log10(r)%1==0)&&a.pop(),a}(n,t,i);var o=e||(t-n)/i>=1?Math.ceil((t-n)/i):(t-n)/i,u=[n<0&&t>=0?0:n];if(u[0]===n&&u.push(n+o),n<0&&t>=0){for(;u[u.length-1]>n;)u.push(u[u.length-1]-o);u.reverse()}for(;u[u.length-1]<t;)u.push(u[u.length-1]+o);return u}(F,B,S,e,u),_=[o?P[0]:B,P[P.length-1]];if("log"===a){var H=c.startValue,I=c.endValue;g>0&&(H=Math.min(H,g)),h>0&&(I=Math.max(I,h)),_=[H,I]}var W,R=fc(a).domain(_).range([y-b.bottom,b.top+(L?V:0)]),z=(!n&&r||n&&!r?ti(R):ii(R)).tickPadding(w).tickSizeInner(-(m-b.left-b.right));return D?W=D:N&&(W=bc(a,N,O,R.domain())),W?z.tickValues(W):"log"!==a&&z.tickValues(P),z.tickFormat((function(t,n){return function(t,n,i){if(D&&T&&void 0!==T[n])return T[n];if("function"==typeof k)return k(t,n);if("string"==typeof k)return ju(k)(t);var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":bs(e)}(t,n,R.tickFormat(S))})),f&&sl(f).call(z).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=R.domain(),i.yAxisTickText=(null!==(l=z.tickValues())&&void 0!==l?l:R.ticks(S)).map(z.tickFormat()),R}!function(t){t[t.AreaChart=0]="AreaChart",t[t.LineChart=1]="LineChart",t[t.VerticalBarChart=2]="VerticalBarChart",t[t.VerticalStackedBarChart=3]="VerticalStackedBarChart",t[t.GroupedVerticalBarChart=4]="GroupedVerticalBarChart",t[t.HeatMapChart=5]="HeatMapChart",t[t.HorizontalBarChartWithAxis=6]="HorizontalBarChartWithAxis",t[t.ScatterChart=7]="ScatterChart",t[t.GanttChart=8]="GanttChart"}(ts||(ts={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(ns||(ns={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(is||(is={}));var ks=function(t,n,i,e,r){var o,u=t.containerHeight,a=t.tickPadding,l=void 0===a?12:a,s=t.margins,c=t.yAxisTickFormat,d=t.yAxisElement,f=t.yAxisPadding,v=t.tickValues,h=t.tickText,p=null!=f?f:.5;p=1===p?.99:p;var g=Tu().domain(n).range([u-s.bottom,s.top]).padding(p),y=i?ti(g):ii(g),m=null!==(o=v)&&void 0!==o?o:n,b=y.tickPadding(l).tickValues(m).tickFormat((function(t,n){return v&&h&&void 0!==h[n]?h[n]:"function"==typeof c?c(t,n):t}));return d&&sl(d).call(b).selectAll("text"),e.yAxisTickText=b.tickValues().map(b.tickFormat()),g},As=function(t,n,i,e,r,o){var u,a=t.containerHeight,l=t.tickPadding,s=void 0===l?12:l,c=t.margins,d=t.yAxisTickFormat,f=t.yAxisElement,v=t.yAxisPadding,h=void 0===v?0:v,p=t.containerWidth,g=t.tickValues,y=t.tickText,m=Tu().domain(n).range([a-c.bottom,c.top]).padding(h);o===ts.VerticalStackedBarChart&&m.paddingInner(1).paddingOuter(0);var b=i?ti(m):ii(m),x=null!==(u=g)&&void 0!==u?u:n,w=b.tickPadding(s).tickValues(x).tickFormat((function(t,n){return g&&y&&void 0!==y[n]?y[n]:"function"==typeof d?d(t,n):t})).tickSize(0);return o===ts.VerticalStackedBarChart&&b.tickSizeInner(-(p-c.left-c.right)),f&&sl(f).call(w).selectAll("text"),e.yAxisTickText=w.tickValues().map(w.tickFormat()),m};function Ss(t){var n=[];t.forEach((function(t){var i=t.data.filter((function(t){return!t.hideCallout})).map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,index:t.index})}));n=n.concat(i)}));var i={};return n.forEach((function(t){var n=t.x instanceof Date?t.x.getTime():t.x;n in i?i[n].push({legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}):i[n]=[{legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}]})),i}function Ls(t){var n,i,e=t.node,r=t.xAxis,o=t.noOfCharsToTruncate,u=t.showXAxisLablesTooltip,a=t.width,l=void 0===a?10:a,s=t.container;if(null!==e){var c=sl(e).call(r),d=0,f=1;if(c.selectAll(".tick text").each((function(t,n){var i=sl(this),e=i.text(),r="".concat(i.text().slice(0,o),"..."),a=i.text().length,c=i.text().split(/\s+/).reverse(),d="",v=[],h=0,p=i.attr("y"),g=parseFloat(i.attr("dy")),y=i.text(null).attr("data-full",e).append("tspan").attr("x",0).attr("y",p).attr("dy",g+"em");if(u)y.text(a>o?r:e);else for(var m=Array.isArray(l)?l[n]:l;d=c.pop();){v.push(d);var b=v.join(" ");y.text(b),oc(b,ys,s).width>m&&v.length>1&&(v.pop(),y.text(v.join(" ")),v=[d],y=i.append("tspan").attr("x",0).attr("y",p).attr("dy",1.1*++h+g+"em").text(d))}f=Math.max(f,h+1)})),!u){var v=12,h=null!==(i=null===(n=(null!=s?s:document).querySelector(".".concat(gs," tspan")))||void 0===n?void 0:n.getBoundingClientRect().height)&&void 0!==i?i:0;h>v&&(v=h),d=(f-1)*v}return d>0?d:0}}var Vs=function(t,n,i){var e=sl("#".concat(n));e.text(t);var r=e.node();if(!r||"function"!=typeof r.getComputedTextLength)return!1;for(var o=!1,u=r.getComputedTextLength();u>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),o=!0,u=r.getComputedTextLength();return o},Ds=function(t,n){void 0===n&&(n="none");var i=0,e=document.createElement("canvas").getContext("2d");if(e){var r=document.querySelector(n);if(r){var o=window.getComputedStyle(r,null),u=o.getPropertyValue("font-weight"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family");e.font="".concat(u," ").concat(a," ").concat(l)}else e.font='600 10px "Segoe UI"';t.forEach((function(t){i=Math.max(e.measureText(t.toString()).width,i)}))}return i};function Ns(t){var n=t.tooltipCls,i=t.axis,e=t.id,r=t.container;if(null===i)return null;var o=sl(r||"body").append("div").attr("id",e).attr("class",n).style("opacity",0);i.selectAll(".tick text").each((function(){var t=sl(this),n=t.attr("data-full");if(t.text()!==n){var i=this;t.on("mouseover",(function(t,e){var u,a=null==r?void 0:r.getBoundingClientRect(),l=i.getBoundingClientRect(),s=a?a.bottom-(l.top-4):l.top-4,c=(l.left+l.right)/2-(null!==(u=null==a?void 0:a.left)&&void 0!==u?u:0);o.text(n).style("bottom","".concat(s,"px")).style("left","".concat(c,"px")).style("transform","translateX(-50%)").style("opacity",.9)})).on("mouseout",(function(t){o.style("opacity",0)}))}}))}function Os(t){var n=!1;return t&&t.length>0&&t.forEach((function(t){t.data.length>0&&(n=t.data[0].x instanceof Date)})),n}function Ts(t,n,i,e,r,o,u,a){var l=cc(t),s=gc(t,r),c=s[0],d=s[1];if(o){var f=vc(c,d,r,u,a);c-=f.start,d+=f.end}var v=n.left,h=i-n.right;return e?{dStartValue:l?1:d,dEndValue:l?-1:c,rStartValue:v,rEndValue:h}:{dStartValue:l?-1:c,dEndValue:l?1:d,rStartValue:v,rEndValue:h}}function Es(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function Fs(t,n){var i=0,e=0;return t.forEach((function(t){var r=t.reduce((function(t,n){return t+(n.x>0?n.x:0)}),n),o=t.reduce((function(t,n){return t+(n.x<0?n.x:0)}),n);i=Math.max(i,r),e=Math.min(e,o)})),{longestPositiveBar:i,longestNegativeBar:e}}function Bs(t,n,i){var e=t.left,r=n-t.right;return i?{dStartValue:0,dEndValue:0,rStartValue:r,rEndValue:e}:{dStartValue:0,dEndValue:0,rStartValue:e,rEndValue:r}}function Ps(t,n,i,e,r,u,a,l){var s,c,d;if(void 0===r&&(r=[]),[ts.AreaChart,ts.LineChart,ts.ScatterChart].includes(u)){if(c=(s=gc(t))[0],d=s[1],c=di((0,o.fX)((0,o.fX)([],r,!0),[c],!1)),d=fi((0,o.fX)((0,o.fX)([],r,!0),[d],!1)),l||u===ts.ScatterChart){var f=vc(c.getTime(),d.getTime());c=new Date(c.getTime()-f.start),d=new Date(d.getTime()+f.end)}}else c=di(t,(function(t){return t.x})),d=fi(t,(function(t){return t.x}));var v=n.left,h=i-n.right;return e?{dStartValue:d,dEndValue:c,rStartValue:v,rEndValue:h}:{dStartValue:c,dEndValue:d,rStartValue:v,rEndValue:h}}function _s(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){hc(t.y,e)&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}}function Hs(t,n,i){var e=[];return t.forEach((function(t){i||e.push(t.y),void 0!==t.lineData&&!i==!t.lineData.useSecondaryYScale&&e.push(t.lineData.y)})),{startValue:di(e),endValue:fi(e)}}function Is(t,n){if(void 0!==n&&n===is.NumericAxis){var i=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:i}}return{startValue:0,endValue:0}}var Ws,Rs,zs=function(t,n){if(n)switch(typeof t){case"string":return ns.StringAxis;case"number":return ns.NumericAxis;default:return ns.DateAxis}else switch(typeof t){case"string":return is.StringAxis;case"number":return is.NumericAxis;default:return is.DateAxis}};!function(t){t[t.circle=0]="circle",t[t.square=1]="square",t[t.triangle=2]="triangle",t[t.diamond=3]="diamond",t[t.pyramid=4]="pyramid",t[t.hexagon=5]="hexagon",t[t.pentagon=6]="pentagon",t[t.octagon=7]="octagon"}(Ws||(Ws={})),function(t){t[t.dottedLine=0]="dottedLine"}(Rs||(Rs={}));var js=((Ql={})[Ws.circle]={widthRatio:1},Ql[Ws.square]={widthRatio:1},Ql[Ws.triangle]={widthRatio:1},Ql[Ws.diamond]={widthRatio:1},Ql[Ws.pyramid]={widthRatio:1},Ql[Ws.hexagon]={widthRatio:2},Ql[Ws.pentagon]={widthRatio:1.168},Ql[Ws.octagon]={widthRatio:2.414},Ql),$s=function(t,n,i){return void 0===n&&(n="text"),void 0===i&&(i=!0),{role:n,"data-is-focusable":i,"aria-label":(t=null!=t?t:{}).ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy}};function Ys(t){return ms(t,!0)}var Xs=function(t,n,i,e){var r;return void 0===i&&(i=16),r="auto"===t||"histogram"===e?i:"number"==typeof t?t:Math.min(i,16),"number"==typeof n&&(r=Math.min(r,n)),Math.max(r,1)},Gs=function(t,n,i){void 0===i&&(i=0);var e="number"==typeof t?t:"number"==typeof n?n:i;return Math.max(0,Math.min(e,1))},Us=function(t,n){return"number"==typeof t||"number"==typeof n};function qs(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Zs(t,n){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}var Ks=/var\((--[a-zA-Z0-9\-]+)\)/g;function Js(t,n){var i=getComputedStyle(t);return n.replace(Ks,(function(t,n){return i.getPropertyValue(n)}))}function Qs(t,n,i){var e=getComputedStyle(n);Array.isArray(t)?t.forEach((function(t){sl(i).style(t,e.getPropertyValue(t))})):Object.entries(t).forEach((function(t){var n=t[0],r=t[1];sl(i).style(r,e.getPropertyValue(n))}))}var tc={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nc="fui_measurement_span",ic=["font-size","font-family","font-weight","font-style","letter-spacing","text-transform"],ec=function(t,n,i){var e=document.getElementById(nc);e||((e=document.createElement("span")).setAttribute("id",nc),e.setAttribute("aria-hidden","true"),(null!=i?i:document.body).appendChild(e)),Object.assign(e.style,tc);var r=(null!=i?i:document).querySelector(n);r&&Qs(ic,r,e),e.textContent="".concat(t);var o=e.getBoundingClientRect();return{node:e,width:o.width,height:o.height}},rc=new Map,oc=function(t,n,i){var e="".concat(t,"|").concat(n),r=rc.get(e);if(r)return r;var o=ec(t,n,i),u=o.width,a=o.height;if(rc.size>=2e3){var l=rc.keys().next().value;_l(l)||rc.delete(l)}return rc.set(e,{width:u,height:a}),{width:u,height:a}};function uc(t,n){if(void 0===n&&(n=hl),"function"==typeof t)return t;switch(t){case"linear":return hl;case"natural":return yl;case"step":return bl;case"stepAfter":return wl;case"stepBefore":return xl;default:return n}}var ac=/(category|total|sum|min|max|mean|median) (ascending|descending)/,lc=function(t,n){if(Array.isArray(n)){var i=[],e=new Set;return n.forEach((function(n){t[n]&&!e.has(n)&&(i.push(n),e.add(n))})),Object.keys(t).forEach((function(t){e.has(t)||i.push(t)})),i}var r=null==n?void 0:n.match(ac);if(r){var o=r[1],u=r[2];if("category"===o){var a=Object.keys(t).sort();return"descending"===u?a.reverse():a}var l={min:di,max:fi,sum:vi,total:vi,mean:hi,median:bi},s=[];return Object.keys(t).forEach((function(n){s.push([n,l[o](t[n])||0])})),s.sort("descending"===u?function(t,n){return n[1]-t[1]}:function(t,n){return t[1]-n[1]}),s.map((function(t){return t[0]}))}return Object.keys(t)};function sc(t,n){var i=n.semanticColors.bodyText;return hs(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function cc(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"scatterpolar"===t.lineOptions.mode}))}var dc,fc=function(t){return"log"===t?ta():Gu()},vc=function(t,n,i,e,r){if("log"===i)return{start:.5*t,end:n};var o=.1*(n-t);return{start:void 0!==e&&o>Math.abs(t-Math.min(t,e))?0:o,end:void 0!==r&&o>Math.abs(n-Math.max(n,r))?0:o}},hc=function(t,n){return"number"!=typeof t||"log"!==n||t>0},pc=function(t,n){return!_l(t)&&!_l(n)},gc=function(t,n){var i=function(t){return hc(t.x,n)};return[di(t,(function(t){return di(t.data.filter(i),(function(t){return t.x}))})),fi(t,(function(t){return fi(t.data.filter(i),(function(t){return t.x}))}))]},yc=function(t){var n=t.data,i=t.xScale,e=t.yScalePrimary,r=t.yScaleSecondary,o=t.useSecondaryYScale,u=t.xScaleType,a=t.yScaleType,l=t.secondaryYScaleType,s=gc(n,u),c=s[0],d=s[1],f=vc(+c,+d,u),v=c instanceof Date?new Date(+c-f.start):c-f.start,h=d instanceof Date?new Date(+d+f.end):d+f.end,p=Math.min(Math.abs(i(c)-i(v)),Math.abs(i(h)-i(d))),g=o?l:a,y=_s(n,0,o,g),m=y.startValue,b=y.endValue,x=vc(m,b,g),w=m-x.start,M=b+x.end,C=o?r:e,k=Math.min(Math.abs(C(w)-C(m)),Math.abs(C(b)-C(M)));return Math.min(p,k)},mc=function(t,n,i){for(var e=di(i),r=fi(i),o=Math.max(dl(t),dl(n)),u=Math.ceil(fl((e-t)/n,o)),a=Math.floor(fl((r-t)/n,o)),l=[],s=u;s<=a;s++)l.push(fl(t+s*n,o));return l},bc=function(t,n,i,e){var r="number"==typeof i?i:0;if("log"!==t){if("number"==typeof n&&n>0)return mc(r,n,e)}else{if("number"==typeof n&&n>0)return mc(r,n,e.map((function(t){return Math.log10(t)}))).map((function(t){return Math.pow(10,t)}));if("string"==typeof n){var o=n[0],u=Vl(n.slice(1))?Number(n.slice(1)):0;if("L"===o&&u>0)return mc(r,u,e)}}},xc=function(t,n,i,e){var r=n instanceof Date?n:new Date(ps);if("number"==typeof t&&t>0)return mc(+r,t,i.map((function(t){return+t}))).map((function(t){return new Date(t)}));if("string"==typeof t){var o=t[0],u=Vl(t.slice(1))?Number(t.slice(1)):0;if("M"===o&&u>0&&u===Math.round(u))return function(t,n,i,e){for(var r=+di(i),o=+fi(i),u=function(t){return e?t.getUTCMonth():t.getMonth()},a=function(t,n){return e?new Date(t.setUTCMonth(n)):new Date(t.setMonth(n))},l=0,s=new Date(+t);+s>r;)s=a(s,u(s)-n),l-=n;for(var c=u(t),d=[],f=l;;f+=n){var v=a(new Date(+t),c+f);if(u(v)!==((c+f)%12+12)%12&&(v=e?new Date(v.setUTCDate(0)):new Date(v.setDate(0))),+v>o)break;+v>=r&&d.push(v)}return d}(r,u,i,e)}},wc=function(t,n){if(null!==n){var i=n instanceof Date?n.getTime():n;if(t[i])return{x:n,values:t[i]}}},Mc=function(t,n,i){if(i(t)<=n)return t;for(var e=1,r=t.length;e<r;){var o=Math.floor((e+r+1)/2);i(t.slice(0,o)+"...")<=n?e=o:r=o-1}return t.slice(0,e)+"..."},Cc=i(357),kc={gradient1:"default.1",gradient2:"default.2",gradient3:"default.3",gradient4:"default.4",gradient5:"default.5",gradient6:"default.6",gradient7:"default.7",gradient8:"default.8",gradient9:"default.9",gradient10:"default.10",gradient1Ext:"extended.1",gradient2Ext:"extended.2",gradient3Ext:"extended.3",gradient4Ext:"extended.4",gradient5Ext:"extended.5",gradient6Ext:"extended.6",gradient7Ext:"extended.7",gradient8Ext:"extended.8",gradient9Ext:"extended.9",gradient10Ext:"extended.10",success:"semantic.success",highSuccess:"semantic.highSuccess",warning:"semantic.warning",error:"semantic.error",highError:"semantic.highError",disabled:"semantic.disabled"},Ac={1:[["#4760D5","#637CEF"],["#4F6BED","#637CEF"]],2:[["#795AA6","#9373C0"],["#8764B8","#A083C9"]],3:[["#159195","#2AA0A4"],["#159195","#2AA0A4"]],4:[["#B146C2","#C36BD1"],["#B146C2","#C36BD1"]],5:[["#3487C7","#3A96DD"],["#3487C7","#3A96DD"]],6:[["#0E7A0B","#13A10E"],["#11910D","#27AC22"]],7:[["#E61C99","#EE5FB7"],["#E61C99","#EE5FB7"]],8:[["#CA5010","#D77440"],["#CA5010","#D77440"]],9:[["#57811B","#689920"],["#57811B","#689920"]],10:[["#937700","#AE8C00"],["#937700","#AE8C00"]]},Sc={default:Ac,semantic:{success:[["#0C5E0C","#107C10"],["#218C21","#359B35"]],highSuccess:[["#107C10","#359B35"],["#359B35","#9FD89F"]],warning:[["#DE590B","#F7630C"],["#DE590B","#F87528"]],error:[["#B10E1C","#CC2635"],["#D33F4C","#EEACB2"]],highError:[["#6E0811","#B10E1C"],["#D33F4C","#DC626D"]],disabled:[["#E6E6E6","#E6E6E6"],["#E6E6E6","#E6E6E6"]]},extended:{1:[["#2C3C85","#3C51B4"],["#93A4F4","#C8D1FA"]],2:[["#4C3867","#674C8C"],["#A083C9","#B29AD4"]],3:[["#02494C","#038387"],["#4CB4B7","#9BD9DB"]],4:[["#63276D","#863593"],["#C36BD1","#CF87DA"]],5:[["#20547C","#2C72A8"],["#4FA1E1","#83BDEB"]],6:[["#0B5A08","#0E7A0B"],["#27AC22","#5EC75A"]],7:[["#AD006A","#E3008C"],["#EE5FB7","#F7ADDA"]],8:[["#9A3D0C","#CA5010"],["#D77440","#DF8E64"]],9:[["#405F14","#57811B"],["#73AA24","#A4CC6C"]],10:[["#6D5700","#937700"],["#D0B232","#DAC157"]]}},Lc=Object.values(Ac),Vc=Object.values(kc),Dc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},Nc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=Lc[(t+n)%Lc.length];return Dc(e,i)},Oc=function(t,n){if(void 0===n&&(n=!1),Vc.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=Sc[e][r];return Dc(o,n)}return[t,t]};function Tc(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.length<2?n[0]:function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];n.forEach((function(n){return n&&n.apply(t,i)}))}}function Ec(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=Tc(t,t[i],n[i]))}(t,{componentDidMount:Fc,componentDidUpdate:Bc,componentWillUnmount:Pc})}function Fc(){_c(this.props.componentRef,this)}function Bc(t){t.componentRef!==this.props.componentRef&&(_c(t.componentRef,null),_c(this.props.componentRef,this))}function Pc(){_c(this.props.componentRef,null)}function _c(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function Hc(t,n,i){var e,r=x(t,(function(t){var i;return n===t||!!(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,kn))}),i);return null!==r&&!!(null===(e=r.hasAttribute)||void 0===e?void 0:e.call(r,kn))}!function(t){t[t.vertical=0]="vertical",t[t.horizontal=1]="horizontal",t[t.bidirectional=2]="bidirectional",t[t.domOrder=3]="domOrder"}(dc||(dc={}));var Ic,Wc=u.createContext(void 0),Rc="data-is-focusable",zc="data-focuszone-id",jc="tabindex",$c="data-no-vertical-wrap",Yc="data-no-horizontal-wrap",Xc=999999999,Gc=-999999999;function Uc(t,n){var i;"function"==typeof MouseEvent?i=new MouseEvent("click",{ctrlKey:null==n?void 0:n.ctrlKey,metaKey:null==n?void 0:n.metaKey,shiftKey:null==n?void 0:n.shiftKey,altKey:null==n?void 0:n.altKey,bubbles:null==n?void 0:n.bubbles,cancelable:null==n?void 0:n.cancelable}):(i=document.createEvent("MouseEvents")).initMouseEvent("click",!!n&&n.bubbles,!!n&&n.cancelable,window,0,0,0,0,0,!!n&&n.ctrlKey,!!n&&n.altKey,!!n&&n.shiftKey,!!n&&n.metaKey,0,null),t.dispatchEvent(i)}var qc,Zc={},Kc=new Set,Jc=["text","number","password","email","tel","url","search","textarea"],Qc=!1,td=function(t){function n(i){var e,r,o,a,s,c=t.call(this,i)||this;c._root=u.createRef(),c._mergedRef=(s={refs:[]},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.resolver&&function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}(s.refs,t)||(s.resolver=function(t){return function(n){for(var i=0,e=t.refs;i<e.length;i++){var r=e[i];"function"==typeof r?r(n):r&&(r.current=n)}}}(s)),s.refs=t,s.resolver}),c._onFocus=function(t){if(!c._portalContainsElement(t.target)){var n,i=c.props,e=i.onActiveElementChanged,r=i.doNotAllowFocusEventToPropagate,o=i.stopFocusPropagation,u=i.onFocusNotification,a=i.onFocus,l=i.shouldFocusInnerElementWhenReceivedFocus,s=i.defaultTabbableElement,d=c._isImmediateDescendantOfZone(t.target);if(d)n=t.target;else for(var f=t.target;f&&f!==c._root.current;){if(V(f,void 0,c._inShadowRoot)&&c._isImmediateDescendantOfZone(f)){n=f;break}f=b(f,Qc)}if(l&&t.target===c._root.current){var v=s&&"function"==typeof s&&c._root.current&&s(c._root.current);v&&V(v,void 0,c._inShadowRoot)?(n=v,v.focus()):(c.focus(!0),c._activeElement&&(n=null))}var h=!c._activeElement;n&&n!==c._activeElement&&((d||h)&&c._setFocusAlignment(n,!0,!0),c._activeElement=n,h&&c._updateTabIndexes()),e&&e(c._activeElement,t),(o||r)&&t.stopPropagation(),a?a(t):u&&u()}},c._onBlur=function(){c._setParkedFocus(!1)},c._onMouseDown=function(t){if(!c._portalContainsElement(t.target)&&!c.props.disabled){for(var n=t.target,i=[];n&&n!==c._root.current;)i.push(n),n=b(n,Qc);for(;i.length&&((n=i.pop())&&V(n,void 0,c._inShadowRoot)&&c._setActiveElement(n,!0),!D(n)););}},c._onKeyDown=function(t,n){if(!c._portalContainsElement(t.target)){var i=c.props,e=i.direction,r=i.disabled,o=i.isInnerZoneKeystroke,u=i.pagingSupportDisabled,a=i.shouldEnterInnerZone;if(!(r||(c.props.onKeyDown&&c.props.onKeyDown(t),t.isDefaultPrevented()||c._getDocument().activeElement===c._root.current&&c._isInnerZone))){if((a&&a(t)||o&&o(t))&&c._isImmediateDescendantOfZone(t.target)){var s=c._getFirstInnerZone();if(s){if(!s.focus(!0))return}else{if(!N(t.target))return;if(!c.focusElement(A(t.target,t.target.firstChild,!0)))return}}else{if(t.altKey)return;switch(t.which){case 32:if(c._shouldRaiseClicksOnSpace&&c._tryInvokeClickForFocusable(t.target,t))break;return;case 37:if(e!==dc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==dc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==dc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==dc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusDown()))break;return;case 34:if(!u&&c._moveFocusPaging(!0))break;return;case 33:if(!u&&c._moveFocusPaging(!1))break;return;case 9:if(c.props.allowTabKey||1===c.props.handleTabKey||2===c.props.handleTabKey&&c._isElementInput(t.target)){var d=!1;if(c._processingTabKey=!0,d=e!==dc.vertical&&c._shouldWrapFocus(c._activeElement,Yc)?((0,l.jI)(n)?!t.shiftKey:t.shiftKey)?c._moveFocusLeft(n):c._moveFocusRight(n):t.shiftKey?c._moveFocusUp():c._moveFocusDown(),c._processingTabKey=!1,d)break;c.props.shouldResetActiveElementWhenTabFromZone&&(c._activeElement=null)}return;case 36:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!1))return!1;var f=c._root.current&&c._root.current.firstChild;if(c._root.current&&f&&c.focusElement(A(c._root.current,f,!0)))break;return;case 35:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!0))return!1;var v=c._root.current&&c._root.current.lastChild;if(c._root.current&&c.focusElement(k(c._root.current,v,!0,!0,!0)))break;return;case 13:if(c._shouldRaiseClicksOnEnter&&c._tryInvokeClickForFocusable(t.target,t))break;return;default:return}}t.preventDefault(),t.stopPropagation()}}},c._getHorizontalDistanceFromCenter=function(t,n,i){var e=c._focusAlignment.left||c._focusAlignment.x||0,r=Math.floor(i.top),o=Math.floor(n.bottom),u=Math.floor(i.bottom),a=Math.floor(n.top);return t&&r>o||!t&&u<a?e>=i.left&&e<=i.left+i.width?0:Math.abs(i.left+i.width/2-e):c._shouldWrapFocus(c._activeElement,$c)?Xc:Gc},Ec(c),En("FocusZone",i,{rootProps:void 0,allowTabKey:"handleTabKey",elementType:"as",ariaDescribedBy:"aria-describedby",ariaLabelledBy:"aria-labelledby"}),c._id=p("FocusZone"),c._focusAlignment={left:0,top:0},c._processingTabKey=!1;var d=null===(r=null!==(e=i.shouldRaiseClicks)&&void 0!==e?e:n.defaultProps.shouldRaiseClicks)||void 0===r||r;return c._shouldRaiseClicksOnEnter=null!==(o=i.shouldRaiseClicksOnEnter)&&void 0!==o?o:d,c._shouldRaiseClicksOnSpace=null!==(a=i.shouldRaiseClicksOnSpace)&&void 0!==a?a:d,c}return(0,o.C6)(n,t),n.getOuterZones=function(){return Kc.size},n._onKeyDownCapture=function(t){9===t.which&&Kc.forEach((function(t){return t._updateTabIndexes()}))},n.prototype.componentDidMount=function(){var t,i=this._root.current;if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),Zc[this._id]=this,i){for(var e=b(i,Qc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(D(e)){this._isInnerZone=!0;break}e=b(e,Qc)}this._isInnerZone||(Kc.add(this),this._root.current&&this._root.current.addEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&"string"==typeof this.props.defaultTabbableElement?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},n.prototype.componentDidUpdate=function(){var t,n=this._root.current,i=this._getDocument();if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),(this._activeElement&&!w(this._root.current,this._activeElement,Qc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Qc))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&i&&this._lastIndexPath&&(i.activeElement===i.body||null===i.activeElement||i.activeElement===n)){var e=function(t,n){for(var i=t,e=0,r=n;e<r.length;e++){var o=r[e],u=i.children[Math.min(o,i.children.length-1)];if(!u)break;i=u}return V(i)&&S(i)?i:A(t,i,!0)||k(t,i)}(n,this._lastIndexPath);e?(this._setActiveElement(e,!0),e.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},n.prototype.componentWillUnmount=function(){delete Zc[this._id],this._isInnerZone||(Kc.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},n.prototype.render=function(){var t=this,n=this.props,i=n.as,e=n.elementType,r=n.rootProps,a=n.ariaDescribedBy,l=n.ariaLabelledBy,s=n.className,c=z(this.props,H),d=i||e||"div";this._evaluateFocusBeforeRender();var f=(0,It.O4)();return u.createElement(d,(0,o.Cl)({"aria-labelledby":l,"aria-describedby":a},c,r,{className:j((Ic||(Ic=(0,q.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),Ic),s),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(n){return t._onKeyDown(n,f)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},n.prototype.focus=function(t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this._root.current){if(!t&&"true"===this._root.current.getAttribute(Rc)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=Zc[i.getAttribute(zc)];return!!e&&e.focusElement(this._root.current)}return!1}if(!t&&this._activeElement&&w(this._root.current,this._activeElement)&&V(this._activeElement,void 0,this._inShadowRoot)&&(!n||L(this._activeElement)))return this._activeElement.focus(),!0;var r=this._root.current.firstChild;return this.focusElement(A(this._root.current,r,!0,void 0,void 0,void 0,void 0,void 0,n))}return!1},n.prototype.focusLast=function(){if(this._root.current){var t=this._root.current&&this._root.current.lastChild;return this.focusElement(k(this._root.current,t,!0,!0,!0))}return!1},n.prototype.focusElement=function(t,n){var i=this.props,e=i.onBeforeFocus,r=i.shouldReceiveFocus;return!(r&&!r(t)||e&&!e(t)||!t||(this._setActiveElement(t,n),this._activeElement&&this._activeElement.focus(),0))},n.prototype.setFocusAlignment=function(t){this._focusAlignment=t},Object.defineProperty(n.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),n.prototype._evaluateFocusBeforeRender=function(){var t=this._root.current,n=this._getDocument();if(n){var i=n.activeElement;if(i!==t){var e=w(t,i,!1);this._lastIndexPath=e?function(t,n){for(var i=[];n&&t&&n!==t;){var e=b(n,!0);if(null===e)return[];i.unshift(Array.prototype.indexOf.call(e.children,n)),n=e}return i}(t,i):void 0}}},n.prototype._setParkedFocus=function(t){var n=this._root.current;n&&this._isParked!==t&&(this._isParked=t,t?(this.props.allowFocusRoot||(this._parkedTabIndex=n.getAttribute("tabindex"),n.setAttribute("tabindex","-1")),n.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(n.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):n.removeAttribute("tabindex")))},n.prototype._setActiveElement=function(t,n){var i=this._activeElement;this._activeElement=t,i&&(D(i)&&this._updateTabIndexes(i),i.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!n||this._setFocusAlignment(t,!0,!0),this._activeElement.tabIndex=0)},n.prototype._preventDefaultWhenHandled=function(t){this.props.preventDefaultWhenHandled&&t.preventDefault()},n.prototype._tryInvokeClickForFocusable=function(t,n){var i=t;if(i===this._root.current)return!1;do{if("BUTTON"===i.tagName||"A"===i.tagName||"INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SUMMARY"===i.tagName)return!1;if(this._isImmediateDescendantOfZone(i)&&"true"===i.getAttribute(Rc)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Uc(i,n),!0;i=b(i,Qc)}while(i!==this._root.current);return!1},n.prototype._getFirstInnerZone=function(t){if(!(t=t||this._activeElement||this._root.current))return null;if(D(t))return Zc[t.getAttribute(zc)];for(var n=t.firstElementChild;n;){if(D(n))return Zc[n.getAttribute(zc)];var i=this._getFirstInnerZone(n);if(i)return i;n=n.nextElementSibling}return null},n.prototype._moveFocus=function(t,n,i,e){void 0===e&&(e=!0);var r=this._activeElement,o=-1,u=void 0,a=!1,l=this.props.direction===dc.bidirectional;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,t))return!1;var s=l?r.getBoundingClientRect():null;do{if(r=t?A(this._root.current,r):k(this._root.current,r),!l){u=r;break}if(r){var c=n(s,r.getBoundingClientRect());if(-1===c&&-1===o){u=r;break}if(c>-1&&(-1===o||c<o)&&(o=c,u=r),o>=0&&c<0)break}}while(r);if(u&&u!==this._activeElement)a=!0,this.focusElement(u);else if(this.props.isCircularNavigation&&e)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return a},n.prototype._moveFocusDown=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!0,(function(e,r){var o=-1,u=Math.floor(r.top),a=Math.floor(e.bottom);return u<a?t._shouldWrapFocus(t._activeElement,$c)?Xc:Gc:((-1===n&&u>=a||u===n)&&(n=u,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusUp=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!1,(function(e,r){var o=-1,u=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(e.top);return u>l?t._shouldWrapFocus(t._activeElement,$c)?Xc:Gc:((-1===n&&u<=l||a===n)&&(n=a,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusLeft=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Yc);return!!this._moveFocus((0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)):parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)))&&r.right<=e.right&&n.props.direction!==dc.vertical?o=e.right-r.right:i||(o=Gc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Yc);return!!this._moveFocus(!(0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)):parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)))&&r.left>=e.left&&n.props.direction!==dc.vertical?o=r.left-e.left:i||(o=Gc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusPaging=function(t,n){void 0===n&&(n=!0);var i=this._activeElement;if(!i||!this._root.current)return!1;if(this._isElementInput(i)&&!this._shouldInputLoseFocus(i,t))return!1;var e=K(i);if(!e)return!1;var r=-1,o=void 0,u=-1,a=-1,l=e.clientHeight,s=i.getBoundingClientRect();do{if(i=t?A(this._root.current,i):k(this._root.current,i)){var c=i.getBoundingClientRect(),d=Math.floor(c.top),f=Math.floor(s.bottom),v=Math.floor(c.bottom),h=Math.floor(s.top),p=this._getHorizontalDistanceFromCenter(t,s,c);if(t&&d>f+l||!t&&v<h-l)break;p>-1&&(t&&d>u?(u=d,r=p,o=i):!t&&v<a?(a=v,r=p,o=i):(-1===r||p<=r)&&(r=p,o=i))}}while(i);var g=!1;if(o&&o!==this._activeElement)g=!0,this.focusElement(o),this._setFocusAlignment(o,!1,!0);else if(this.props.isCircularNavigation&&n)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return g},n.prototype._setFocusAlignment=function(t,n,i){if(this.props.direction===dc.bidirectional&&(!this._focusAlignment||n||i)){var e=t.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:o}),n&&(this._focusAlignment.left=r),i&&(this._focusAlignment.top=o)}},n.prototype._isImmediateDescendantOfZone=function(t){return this._getOwnerZone(t)===this._root.current},n.prototype._getOwnerZone=function(t){for(var n=b(t,Qc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(D(n))return n;n=b(n,Qc)}return n},n.prototype._updateTabIndexes=function(t){!this._activeElement&&this.props.defaultTabbableElement&&"function"==typeof this.props.defaultTabbableElement&&(this._activeElement=this.props.defaultTabbableElement(this._root.current)),!t&&this._root.current&&(this._defaultFocusElement=null,t=this._root.current,this._activeElement&&!w(t,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!V(this._activeElement,void 0,this._inShadowRoot)&&(this._activeElement=null);for(var n=t&&t.children,i=0;n&&i<n.length;i++){var e=n[i];D(e)?"true"===e.getAttribute(Rc)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(jc)&&e.setAttribute(jc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(jc)&&e.setAttribute(jc,"0"))):(e.getAttribute&&"false"===e.getAttribute(Rc)&&e.setAttribute(jc,"-1"),V(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(jc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(jc)&&e.setAttribute(jc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(jc)&&e.setAttribute(jc,"0")):"svg"===e.tagName&&"false"!==e.getAttribute("focusable")&&e.setAttribute("focusable","false")),this._updateTabIndexes(e)}},n.prototype._isContentEditableElement=function(t){return t&&"true"===t.getAttribute("contenteditable")},n.prototype._isElementInput=function(t){return!(!t||!t.tagName||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())},n.prototype._shouldInputLoseFocus=function(t,n){if(!this._processingTabKey&&t&&t.type&&Jc.indexOf(t.type.toLowerCase())>-1){var i=t.selectionStart,e=i!==t.selectionEnd,r=t.value,o=t.readOnly;if(e||i>0&&!n&&!o||i!==r.length&&n&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(t)))return!1}return!0},n.prototype._shouldWrapFocus=function(t,n){return!this.props.checkForNoWrap||function(t,n,i){return"true"!==function(t,n,i){var e=x(t,(function(t){return t.hasAttribute(n)}),i);return e&&e.getAttribute(n)}(t,n,null!=i?i:(0,M.Y)())}(t,n)},n.prototype._portalContainsElement=function(t){return t&&!!this._root.current&&Hc(t,this._root.current)},n.prototype._getDocument=function(){return(0,M.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:dc.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=Wc,n}(u.Component);function nd(t){return function(t){return t.clientWidth<t.scrollWidth}(t)||function(t){return t.clientHeight<t.scrollHeight}(t)}!function(t){t[t.Parent=0]="Parent",t[t.Self=1]="Self"}(qc||(qc={}));var id,ed=(0,a.Z)(),rd=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onRenderContent=function(t){return"string"==typeof t.content?u.createElement("p",{className:n._classNames.subText},t.content):u.createElement("div",{className:n._classNames.subText},t.content)},n}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.calloutProps,e=t.directionalHint,r=t.directionalHintForRTL,a=t.styles,l=t.id,s=t.maxWidth,c=t.onRenderContent,d=void 0===c?this._onRenderContent:c,f=t.targetElement,v=t.theme;return this._classNames=ed(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement($n,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,z(this.props,R,["id"]),{className:this._classNames.root}),u.createElement("div",{className:this._classNames.content,id:l,onFocus:this.props.onFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},d(this.props,this._onRenderContent)))},n.defaultProps={directionalHint:1,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},n}(u.Component),od=(0,r.I)(rd,(function(t){var n=t.className,i=t.beakWidth,e=void 0===i?16:i,r=t.gapSpace,o=void 0===r?0:r,u=t.maxWidth,a=t.theme,l=a.semanticColors,s=a.fonts,c=a.effects,d=-(Math.sqrt(e*e/2)+o)+1/window.devicePixelRatio;return{root:["ms-Tooltip",a.fonts.medium,It.lw.fadeIn200,{background:l.menuBackground,boxShadow:c.elevation8,padding:"8px",maxWidth:u,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},n],content:["ms-Tooltip-content",s.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(t){t[t.zero=0]="zero",t[t.medium=1]="medium",t[t.long=2]="long"}(id||(id={}));var ud,ad,ld=(0,a.Z)(),sd=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._defaultTooltipId=p("tooltip"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._getTargetElement=function(){if(e._tooltipHost.current){var t=e.props.overflowMode;if(void 0!==t)switch(t){case qc.Parent:return e._tooltipHost.current.parentElement;case qc.Self:return e._tooltipHost.current}return e._tooltipHost.current}},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipContentFocus=function(t){n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e._clearDismissTimer(),e._clearOpenTimer()},e._onTooltipBlur=function(t){var n;e._ignoreNextFocusEvent=(null===(n=jt(e.context))||void 0===n?void 0:n.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props,r=i.overflowMode,o=i.delay,u=jt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!nd(a))return}if(!t.target||!Hc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==id.zero){var l=e._getDelayTime(o);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),l)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t},(function(){return e.props.onTooltipToggle&&e.props.onTooltipToggle(t)}))},e._getDelayTime=function(t){switch(t){case id.medium:return 300;case id.long:return 500;default:return 0}},Ec(e),e.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.calloutProps,i=t.children,e=t.content,r=t.directionalHint,a=t.directionalHintForRTL,l=t.hostClassName,s=t.id,c=t.setAriaDescribedBy,d=void 0===c||c,f=t.tooltipProps,v=t.styles,h=t.theme;this._classNames=ld(v,{theme:h,className:l});var p=this.state.isTooltipVisible,g=s||this._defaultTooltipId,y=(0,o.Cl)((0,o.Cl)({id:"".concat(g,"--tooltip"),content:e,targetElement:this._getTargetElement(),directionalHint:r,directionalHintForRTL:a,calloutProps:$({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},z(this.props,R,["id"])),f),m=(null==f?void 0:f.onRenderContent)?f.onRenderContent(y,(function(t){return(null==t?void 0:t.content)?u.createElement(u.Fragment,null,t.content):null})):e,b=p&&!!m,x=d&&p&&m?g:void 0;return u.createElement("div",{className:this._classNames.root,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,role:"none","aria-describedby":x},i,b&&u.createElement(od,(0,o.Cl)({},y)),u.createElement("div",{hidden:!0,id:g,style:It.dX},m))},n.prototype.componentDidMount=function(){this._async=new Nt(this)},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:id.medium},n.contextType=Ft,n}(u.Component),cd={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},dd=(0,r.I)(sd,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(cd,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),fd=function(t){function n(n){var i=t.call(this,n)||this;return i._tooltipChild=u.createRef(),i._checkTextOverflow=function(){var t=i._getTargetElement(),n=!!t&&nd(t);n!==i.state.textOverflow&&i.setState({textOverflow:n})},i._getTargetElement=function(){if(i._tooltipChild.current&&i._tooltipChild.current.parentElement)return i._tooltipChild.current.parentElement},i.state={textOverflow:!1},i._async=new Nt(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.content,e=t.accessibilityData;return u.createElement(dd,{overflowMode:qc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},$s(e),{ref:this._tooltipChild,"data-is-focusable":this.state.textOverflow}),i))},n.prototype.componentDidMount=function(){var t=this._getTargetElement();window.ResizeObserver&&t&&(this._resizeObserver=new ResizeObserver(this._async.debounce(this._checkTextOverflow,500)),this._resizeObserver.observe(t))},n.prototype.componentWillUnmount=function(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._async.dispose()},n}(u.Component),vd=(0,a.Z)(),hd=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.state.isCalloutVisible&&i.setState({isCalloutVisible:!1,hoverValue:"",refSelected:null,lineColor:"",legend:""})},i._adjustProps=function(){i._barHeight=i.props.barHeight||12,i._classNames=vd(i.props.styles,{theme:i.props.theme,width:i.props.width,className:i.props.className,barHeight:i._barHeight,color:i.state.lineColor,variant:i.props.variant,hideLabels:i.props.hideLabels})},i._getChartDataText=function(t){return i.props.barChartCustomData?u.createElement("div",{role:"text"},i.props.barChartCustomData(t)):i._getDefaultTextData(t)},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.data,r=t.yAxisCalloutData||(t.horizontalBarChartdata?"".concat(t.horizontalBarChartdata.x,"/").concat(t.horizontalBarChartdata.y):0);return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):"")+"".concat(r,".")+(e?"with benchmark at "+"".concat(e,", "):"")},i.state={isCalloutVisible:!1,hoverValue:"",lineColor:"",legend:"",refSelected:null,color:"",xCalloutValue:"",yCalloutValue:"",barSpacingInPercent:0},i._refArray=[],i._uniqLineText="_HorizontalLine_"+Math.random().toString(36).substring(7),i._hoverOff=i._hoverOff.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_HBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.theme;this._adjustProps();var r=e.palette,a=0;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},i.map((function(n,i){a=n.chartData&&n.chartData[0]&&n.chartData[0].horizontalBarChartdata.x?n.chartData[0].horizontalBarChartdata.x:0,n.chartData[1]={legend:"",horizontalBarChartdata:{x:n.chartData[0].horizontalBarChartdata.y-a,y:n.chartData[0].horizontalBarChartdata.y},color:r.neutralLight};var e=t.props.variant===v.AbsoluteScale?null:t._getChartDataText(n),o=t._createBars(n,r,i),l=t._uniqLineText+"_"+i,s=vd(t.props.styles,{theme:t.props.theme,width:t.props.width,showTriangle:!!n.chartData[0].data,variant:t.props.variant});return u.createElement("div",{key:i},u.createElement("div",{className:s.items},u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(fd,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(td,{direction:dc.horizontal,className:t._classNames.chartWrapper},u.createElement("svg",{ref:t.barChartSvgRef,className:t._classNames.chart,"aria-label":n.chartTitle},u.createElement("g",{id:l,key:l,ref:function(i){t._refCallback(i,n.chartData[0].legend)},onClick:function(){var t=n.chartData[0];t&&t.onClick&&t.onClick()}},o)))))})),u.createElement($n,(0,o.Cl)({target:this.state.refSelected,coverTarget:!0,isBeakVisible:!1,gapSpace:30,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.hoverValue,color:this.state.lineColor,culture:this.props.culture}))))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._hoverOn=function(t,n){var i,e,r,o;if((!this.state.isCalloutVisible||this.state.legend!==n.legend)&&this._calloutAnchorPoint!==n){var u=m(this._refArray,(function(t){return t.index===n.legend}));this._calloutAnchorPoint=n;var a=n.color;if(this.props.enableGradient){var l=Math.max((null===(e=null===(i=this.props.data)||void 0===i?void 0:i.map((function(t){return t.chartData})))||void 0===e?void 0:e.findIndex((function(t){return(null==t?void 0:t[0].data)===n.data&&(null==t?void 0:t[0].legend)===n.legend})))||0,0);a=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(l,0,null===(o=this.props.theme)||void 0===o?void 0:o.isInverted)[0]}this.setState({isCalloutVisible:!0,hoverValue:t,lineColor:a,legend:n.legend,refSelected:u.refElement,xCalloutValue:n.xAxisCalloutData,yCalloutValue:n.yAxisCalloutData,barCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._hoverOff=function(){},n.prototype._getDefaultTextData=function(t){var n=this.props.culture,i=this.props.chartDataMode||"default",e=t.chartData[0],r=e.horizontalBarChartdata.x,a=e.horizontalBarChartdata.y,l=$s(t.chartDataAccessibilityData,"text",!1);switch(i){case"default":return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),(0,Yn.c$)(r,n));case"fraction":return u.createElement("div",(0,o.Cl)({},l),u.createElement("span",{className:this._classNames.chartTitleRight},(0,Yn.c$)(r,n)),u.createElement("span",{className:this._classNames.chartDataTextDenominator}," / "+(0,Yn.c$)(a,n)));case"percentage":var s="".concat((0,Yn.c$)(Math.round(r/a*100),n),"%");return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),s)}},n.prototype._createBenchmark=function(t){var n=t.chartData[0].horizontalBarChartdata.y,i=t.chartData[0].data,e={left:"calc("+Math.round((i||0)/n*100)+"% - 4px)"};return u.createElement("div",{className:this._classNames.benchmarkContainer},u.createElement("div",{className:this._classNames.triangle,style:e}))},n.prototype._createBars=function(t,n,i){var e,r=this,o=(null===(e=t.chartData)||void 0===e?void 0:e.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,a=this.state.barSpacingInPercent*(o-1),l=[n.blueLight,n.blue,n.blueMid,n.red,n.black],s=[],c=t.chartData.reduce((function(t,n){return t+(n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0)}),0),d=0,f=0,h=0;t.chartData.map((function(t,n){var i=t.horizontalBarChartdata.x?t.horizontalBarChartdata.x:0;return(f=i/c*100)<0?f=0:f<1&&0!==f&&(f=1),h+=f}));var g=0!==h?(h-a)/100:1,y=t.chartData.map((function(n,e){var o,a,h,y,m=n.color?n.color:l[Math.floor(4*Math.random()+1)],b=m;r.props.enableGradient&&1!==e&&(m=(null===(o=n.gradient)||void 0===o?void 0:o[0])||Nc(i,0,null===(a=r.props.theme)||void 0===a?void 0:a.isInverted)[0],b=(null===(h=n.gradient)||void 0===h?void 0:h[1])||Nc(i,0,null===(y=r.props.theme)||void 0===y?void 0:y.isInverted)[1]);var x=n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0;e>0&&(d+=f),(f=x/c*100)<0?f=0:f<1&&0!==f?f=1/g:f/=g,s.push(d);var w=n.horizontalBarChartdata.x;if(1===e&&r.props.variant===v.AbsoluteScale){if(r.props.hideLabels)return u.createElement("text",{key:e});var M=t.chartData[0].horizontalBarChartdata.x;return u.createElement("text",{key:e,x:"".concat(r._isRTL?100-s[e]:s[e],"%"),y:r._barHeight/2,dominantBaseline:"central",transform:"translate(".concat(r._isRTL?-4:4,")"),className:r._classNames.barLabel,"aria-hidden":!0},Ys(M))}var C=p("HBC_Gradient")+"_".concat(i,"_").concat(e);return u.createElement(u.Fragment,{key:e},r.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:C},u.createElement("stop",{offset:"0",stopColor:m}),u.createElement("stop",{offset:"100%",stopColor:b}))),u.createElement("rect",{key:e,x:"".concat(r._isRTL?100-s[e]-f-e*r.state.barSpacingInPercent:s[e]+e*r.state.barSpacingInPercent,"%"),y:0,rx:r.props.roundCorners?3:0,"data-is-focusable":""!==n.legend,width:f+"%",height:r._barHeight,fill:r.props.enableGradient?"url(#".concat(C,")"):m,onMouseOver:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,onFocus:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,role:"img","aria-label":r._getAriaLabel(n),onBlur:r._hoverOff,onMouseLeave:r._hoverOff,className:r._classNames.barWrapper}))}));return y},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n}(u.Component),pd=(0,r.I)(hd,(function(t){var n,i=t.className,e=t.theme,r=t.width,u=t.barHeight,a=t.showTriangle,l=t.variant,s=t.hideLabels,c=e.palette;return{root:[{display:"flex",flexDirection:"column",width:r||"100%"},i],items:{marginBottom:a||l===v.AbsoluteScale?"16px":"10px"},chart:{width:"100%",height:u||12,display:"block",overflow:"visible"},barWrapper:{},chartTitle:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:e.palette.neutralPrimary,marginBottom:l===v.AbsoluteScale?"4px":"5px"},chartTitleRight:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:e.palette.neutralPrimary},chartDataTextDenominator:{fontSize:It.s.medium,color:e.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},triangle:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c.blue,marginBottom:"4px",position:"absolute"},barLabel:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{fontWeight:It.BO.semibold,fill:e.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}),chartWrapper:{paddingRight:l!==v.AbsoluteScale||s?0:40}}})),gd={host:"ms-HoverCard-host"},yd=function(){function t(n){this._id=t._uniqueId++,this._parent=n,this._eventRecords=[]}return t.raise=function(n,i,e,r,o){var u,a=null!=o?o:(0,M.Y)();if(t._isElement(n)){if(void 0!==a&&a.createEvent){var l=a.createEvent("HTMLEvents");l.initEvent(i,r||!1,!0),$(l,e),u=n.dispatchEvent(l)}else if(void 0!==a&&a.createEventObject){var s=a.createEventObject(e);n.fireEvent("on"+i,s)}}else for(;n&&!1!==u;){var c=n.__events__,d=c?c[i]:null;if(d)for(var f in d)if(d.hasOwnProperty(f))for(var v=d[f],h=0;!1!==u&&h<v.length;h++){var p=v[h];p.objectCallback&&(u=p.objectCallback.call(p.parent,e))}n=r?n.parent:null}return u},t.isObserved=function(t,n){var i=t&&t.__events__;return!!i&&!!i[n]},t.isDeclared=function(t,n){var i=t&&t.__declaredEvents;return!!i&&!!i[n]},t.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},t._isElement=function(t){return!!t&&(!!t.addEventListener||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement)},t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},t.prototype.onAll=function(t,n,i){for(var e in n)n.hasOwnProperty(e)&&this.on(t,e,n[e],i)},t.prototype.on=function(n,i,e,r){var o=this;if(i.indexOf(",")>-1)for(var u=i.split(/[ ,]+/),a=0;a<u.length;a++)this.on(n,u[a],e,r);else{var l=this._parent,s={target:n,eventName:i,parent:l,callback:e,options:r};if((u=n.__events__=n.__events__||{})[i]=u[i]||{count:0},u[i][this._id]=u[i][this._id]||[],u[i][this._id].push(s),u[i].count++,t._isElement(n)){var c=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed){var i;try{if(!1===(i=e.apply(l,t))&&t[0]){var r=t[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return i}};s.elementCallback=c,n.addEventListener?n.addEventListener(i,c,r):n.attachEvent&&n.attachEvent("on"+i,c)}else s.objectCallback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed)return e.apply(l,t)};this._eventRecords.push(s)}},t.prototype.off=function(t,n,i,e){for(var r=0;r<this._eventRecords.length;r++){var o=this._eventRecords[r];if(!(t&&t!==o.target||n&&n!==o.eventName||i&&i!==o.callback||"boolean"==typeof e&&e!==o.options)){var u=o.target.__events__,a=u[o.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&i?(a.count--,l.splice(l.indexOf(o),1)):(a.count-=l.length,delete u[o.eventName][this._id]),a.count||delete u[o.eventName]),o.elementCallback&&(o.target.removeEventListener?o.target.removeEventListener(o.eventName,o.elementCallback,o.options):o.target.detachEvent&&o.target.detachEvent("on"+o.eventName,o.elementCallback)),this._eventRecords.splice(r--,1)}}},t.prototype.raise=function(n,i,e){return t.raise(this._parent,n,i,e)},t.prototype.declare=function(t){var n=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof t)n[t]=!0;else for(var i=0;i<t.length;i++)n[t[i]]=!0},t._uniqueId=0,t}();!function(t){t[t.hover=0]="hover",t[t.hotKey=1]="hotKey"}(ud||(ud={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(ad||(ad={}));var md,bd={root:"ms-ExpandingCard-root",compactCard:"ms-ExpandingCard-compactCard",expandedCard:"ms-ExpandingCard-expandedCard",expandedCardScroll:"ms-ExpandingCard-expandedCardScrollRegion"};!function(t){t[t.compact=0]="compact",t[t.expanded=1]="expanded"}(md||(md={}));var xd=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},wd=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function Md(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function Cd(t){var n=u.useRef((function(){throw new Error("Cannot call an event handler while rendering")}));return Nn((function(){n.current=t}),[t]),Wt((function(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}}))}var kd={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},Ad=u.forwardRef((function(t,n){var i,e,r,a=u.useRef(null),l=u.useRef(null),s=u.useRef(null),c=Et(a,n),d=Pt(),f=zt(),v=!!u.useContext(Wc),h=null===(i=Bn(!1))||void 0===i||i,p=F(kd,t),g=Wt({hasFocus:!1,focusStackId:Md("ftz-",p.id)}),y=p.children,m=p.componentRef,b=p.disabled,x=p.disableFirstFocus,M=p.forceFocusInsideTrap,C=p.focusPreviouslyFocusedInnerElement,S=p.firstFocusableSelector,L=p.firstFocusableTarget,V=p.disableRestoreFocus,D=void 0===V?p.ignoreExternalFocusing:V,N=p.isClickableOutsideFocusTrap,O=p.enableAriaHiddenSiblings,B={"aria-hidden":!0,style:{pointerEvents:"none",position:"fixed"},tabIndex:b?-1:0,"data-is-visible":!0,"data-is-focus-trap-zone-bumper":!0},P=u.useCallback((function(t){t!==l.current&&t!==s.current&&T(t)}),[]),_=Cd((function(){if(a.current){var t=g.previouslyFocusedElementInTrapZone;if(C&&t&&w(a.current,t))P(t);else{var n=null;if("string"==typeof L)n=a.current.querySelector(L);else if(L)n=L(a.current);else if(S){var i="string"==typeof S?S:S();n=a.current.querySelector("."+i)}n||(n=A(a.current,a.current.firstChild,!1,!1,!1,!0,void 0,void 0,void 0,v)),n&&P(n)}}})),H=function(t){if(!b&&a.current){var n,i=t===g.hasFocus?(void 0===(n=!1)&&(n=!0),k(a.current,s.current,n,!1,!0,!0,!1,!0,v)):function(t,n,i,e,r){return void 0===e&&(e=!0),A(t,n,e,!1,!1,!0,!1,!0,void 0,r)}(a.current,l.current,0,!1,v);i&&(i===l.current||i===s.current?_():i.focus())}},I=Cd((function(t){if(Ad.focusStack=Ad.focusStack.filter((function(t){return g.focusStackId!==t})),d){var n=d.activeElement;D||"function"!=typeof(null==t?void 0:t.focus)||!w(a.current,n)&&n!==d.body&&!n.shadowRoot||P(t)}})),W=Cd((function(t){if(!b&&g.focusStackId===Ad.focusStack.slice(-1)[0]){var n=wd(t);n&&!w(a.current,n)&&(d&&xd(d)===d.body?setTimeout((function(){d&&xd(d)===d.body&&(_(),g.hasFocus=!0)}),0):(_(),g.hasFocus=!0),t.preventDefault(),t.stopPropagation())}}));return u.useEffect((function(){var t=[];return M&&t.push(E(f,"focus",W,!0)),N||t.push(E(f,"click",W,!0)),function(){t.forEach((function(t){return t()}))}}),[M,N,f]),u.useEffect((function(){if(!b&&(h||M)&&a.current){Ad.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||xd(d);return x||w(a.current,t)||_(),function(){return I(t)}}}),[M,b]),u.useEffect((function(){if(!b&&O)return Vt(a.current)}),[b,O,a]),e=function(){delete g.previouslyFocusedElementInTrapZone},(r=u.useRef(e)).current=e,u.useEffect((function(){return function(){var t;null===(t=r.current)||void 0===t||t.call(r)}}),[]),function(t,n,i){u.useImperativeHandle(t,(function(){return{get previouslyFocusedElement(){return n},focus:i}}),[i,n])}(m,g.previouslyFocusedElementInTrapZone,_),u.createElement("div",(0,o.Cl)({"aria-labelledby":p.ariaLabelledBy},z(p,R),{ref:c,onFocusCapture:function(t){var n;null===(n=p.onFocusCapture)||void 0===n||n.call(p,t),t.target===l.current?H(!0):t.target===s.current&&H(!1),g.hasFocus=!0,t.target!==t.currentTarget&&t.target!==l.current&&t.target!==s.current&&(g.previouslyFocusedElementInTrapZone=wd(t.nativeEvent))},onBlurCapture:function(t){var n;null===(n=p.onBlurCapture)||void 0===n||n.call(p,t);var i=t.relatedTarget;null===t.relatedTarget&&(i=xd(d)),w(a.current,i)||(g.hasFocus=!1)}}),u.createElement("div",(0,o.Cl)({},B,{ref:l})),y,u.createElement("div",(0,o.Cl)({},B,{ref:s})))}));Ad.displayName="FocusTrapZone",Ad.focusStack=[];var Sd,Ld=function(t){return u.createElement($n,(0,o.Cl)({},t),u.createElement(Ad,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},Vd=function(t){var n=t.gapSpace,i=void 0===n?0:n,e=t.directionalHint,r=void 0===e?4:e,a=t.directionalHintFixed,l=t.targetElement,s=t.firstFocus,c=t.trapFocus,d=t.onLeave,f=t.className,v=t.finalHeight,h=t.content,p=t.calloutProps,g=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},z(t,R)),{className:f,target:l,isBeakVisible:!1,directionalHint:r,directionalHintFixed:a,finalHeight:v,minPagePadding:24,onDismiss:d,gapSpace:i}),p);return u.createElement(u.Fragment,null,c?u.createElement(Ld,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement($n,(0,o.Cl)({},g),h))},Dd=(0,a.Z)(),Nd=function(t){function n(n){var i=t.call(this,n)||this;return i._expandedElem=u.createRef(),i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},i._onRenderCompactCard=function(){return u.createElement("div",{className:i._classNames.compactCard},i.props.onRenderCompactCard(i.props.renderData))},i._onRenderExpandedCard=function(){return!i.state.firstFrameRendered&&i._async.requestAnimationFrame((function(){i.setState({firstFrameRendered:!0})})),u.createElement("div",{className:i._classNames.expandedCard,ref:i._expandedElem},u.createElement("div",{className:i._classNames.expandedCardScroll},i.props.onRenderExpandedCard&&i.props.onRenderExpandedCard(i.props.renderData)))},i._checkNeedsScroll=function(){var t=i.props.expandedCardHeight;i._async.requestAnimationFrame((function(){i._expandedElem.current&&i._expandedElem.current.scrollHeight>=t&&i.setState({needsScroll:!0})}))},i._async=new Nt(i),Ec(i),i.state={firstFrameRendered:!1,needsScroll:!1},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._checkNeedsScroll()},n.prototype.componentWillUnmount=function(){this._async.dispose()},n.prototype.render=function(){var t=this.props,n=t.styles,i=t.compactCardHeight,e=t.expandedCardHeight,r=t.theme,a=t.mode,l=t.className,s=this.state,c=s.needsScroll,d=s.firstFrameRendered,f=i+e;this._classNames=Dd(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===md.expanded&&d});var v=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this._onRenderCompactCard(),this._onRenderExpandedCard());return u.createElement(Vd,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),Od=(0,r.I)(Nd,(function(t){var n,i=t.theme,e=t.needsScroll,r=t.expandedCardFirstFrameRendered,o=t.compactCardHeight,u=t.expandedCardHeight,a=t.className,l=i.palette,s=(0,It.Km)(bd,i);return{root:[s.root,{width:320,pointerEvents:"none",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},a],compactCard:[s.compactCard,{pointerEvents:"auto",position:"relative",height:o}],expandedCard:[s.expandedCard,{height:1,overflowY:"hidden",pointerEvents:"auto",transition:"height 0.467s cubic-bezier(0.5, 0, 0, 1)",selectors:{":before":{content:'""',position:"relative",display:"block",top:0,left:24,width:272,height:1,backgroundColor:l.neutralLighter}}},r&&{height:u}],expandedCardScroll:[s.expandedCardScroll,e&&{height:"100%",boxSizing:"border-box",overflowY:"auto"}]}}),void 0,{scope:"ExpandingCard"}),Td={root:"ms-PlainCard-root"},Ed=(0,a.Z)(),Fd=function(t){function n(n){var i=t.call(this,n)||this;return i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},Ec(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.styles,i=t.theme,e=t.className;this._classNames=Ed(n,{theme:i,className:e});var r=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this.props.onRenderPlainCard(this.props.renderData));return u.createElement(Vd,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),Bd=(0,r.I)(Fd,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(Td,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),Pd=(0,a.Z)(),_d=function(t){function n(n){var i=t.call(this,n)||this;return i._hoverCard=u.createRef(),i.dismiss=function(t){i._async.clearTimeout(i._openTimerId),i._async.clearTimeout(i._dismissTimerId),t?i._dismissTimerId=i._async.setTimeout((function(){i._setDismissedState()}),i.props.cardDismissDelay):i._setDismissedState()},i._cardOpen=function(t){i._shouldBlockHoverCard()||"keydown"===t.type&&t.which!==i.props.openHotKey||(i._async.clearTimeout(i._dismissTimerId),"mouseenter"===t.type&&(i._currentMouseTarget=t.currentTarget),i._executeCardOpen(t))},i._executeCardOpen=function(t){i._async.clearTimeout(i._openTimerId),i._openTimerId=i._async.setTimeout((function(){i.setState((function(n){return n.isHoverCardVisible?n:{isHoverCardVisible:!0,mode:md.compact,openMode:"keydown"===t.type?ud.hotKey:ud.hover}}))}),i.props.cardOpenDelay)},i._cardDismiss=function(t,n){if(t){if(!(n instanceof MouseEvent))return;if("keydown"===n.type&&n.which!==Dt)return;i.props.sticky||i._currentMouseTarget!==n.currentTarget&&n.which!==Dt||i.dismiss(!0)}else{if(i.props.sticky&&!(n instanceof MouseEvent)&&n.nativeEvent instanceof MouseEvent&&"mouseleave"===n.type)return;i.dismiss(!0)}},i._setDismissedState=function(){i.setState({isHoverCardVisible:!1,mode:md.compact,openMode:ud.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:md.expanded}}))},i._setEventListeners=function(){var t=i.props,n=t.trapFocus,e=t.instantOpenOnClick,r=t.eventListenerTarget,o=r?i._getTargetElement(r):i._getTargetElement(i.props.target),u=i._nativeDismissEvent;o&&(i._events.on(o,"mouseenter",i._cardOpen),i._events.on(o,"mouseleave",u),n?i._events.on(o,"keydown",i._cardOpen):(i._events.on(o,"focus",i._cardOpen),i._events.on(o,"blur",u)),e?i._events.on(o,"click",i._instantOpenAsExpanded):(i._events.on(o,"mousedown",u),i._events.on(o,"keydown",u)))},Ec(i),i._async=new Nt(i),i._events=new yd(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:md.compact,openMode:ud.hover},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._setEventListeners()},n.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},n.prototype.componentDidUpdate=function(t,n){var i=this;t.target!==this.props.target&&(this._events.off(),this._setEventListeners()),n.isHoverCardVisible!==this.state.isHoverCardVisible&&(this.state.isHoverCardVisible?(this._async.setTimeout((function(){i.setState({mode:md.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:md.compact}),this.props.onCardHide&&this.props.onCardHide()))},n.prototype.render=function(){var t=this.props,n=t.expandingCardProps,i=t.children,e=t.id,r=t.setAriaDescribedBy,a=void 0===r||r,l=t.styles,s=t.theme,c=t.className,d=t.type,f=t.plainCardProps,v=t.trapFocus,h=t.setInitialFocus,g=this.state,y=g.isHoverCardVisible,m=g.mode,b=g.openMode,x=e||p("hoverCard");this._classNames=Pd(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},z(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===ud.hotKey,targetElement:this._getTargetElement(this.props.target),onEnter:this._cardOpen,onLeave:this._childDismissEvent}),M=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),w),{mode:m}),C=(0,o.Cl)((0,o.Cl)({},f),w);return u.createElement("div",{className:this._classNames.host,ref:this._hoverCard,"aria-describedby":a&&y?x:void 0,"data-is-focusable":!this.props.target},i,y&&(d===ad.expanding?u.createElement(Od,(0,o.Cl)({},M)):u.createElement(Bd,(0,o.Cl)({},C))))},n.prototype._getTargetElement=function(t){switch(typeof t){case"string":return(0,M.Y)().querySelector(t);case"object":return t;default:return this._hoverCard.current||void 0}},n.prototype._shouldBlockHoverCard=function(){return!(!this.props.shouldBlockHoverCard||!this.props.shouldBlockHoverCard())},n.defaultProps={cardOpenDelay:500,cardDismissDelay:100,expandedCardOpenDelay:1500,instantOpenOnClick:!1,setInitialFocus:!1,openHotKey:67,type:ad.expanding},n}(u.Component),Hd=(0,r.I)(_d,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(gd,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(Sd||(Sd={}));var Id=function(t){var n;void 0===t&&(n={},t={getCachedMeasurement:function(t){if(t&&t.cacheKey&&n.hasOwnProperty(t.cacheKey))return n[t.cacheKey]},addMeasurementToCache:function(t,i){t.cacheKey&&(n[t.cacheKey]=i)}});var i,e=t;function r(t,n){var i=e.getCachedMeasurement(t);if(void 0!==i)return i;var r=n();return e.addMeasurementToCache(t,r),r}function u(t,n,o){for(var u=t,a=r(t,o);a>i;){var l=n(u);if(void 0===l)return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=e.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};u=l}return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(t,n,a,l){if(void 0!==l||void 0!==n.dataToMeasure){if(l){if(i&&n.renderedData&&!n.dataToMeasure)return(0,o.Cl)((0,o.Cl)({},n),function(t,n,e,r){var u;return u=t>i?r?{resizeDirection:"grow",dataToMeasure:r(e)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:e},i=t,(0,o.Cl)((0,o.Cl)({},u),{measureContainer:!1})}(l,t.data,n.renderedData,t.onGrowData));i=l}var s=(0,o.Cl)((0,o.Cl)({},n),{measureContainer:!1});return n.dataToMeasure&&(s="grow"===n.resizeDirection&&t.onGrowData?(0,o.Cl)((0,o.Cl)({},s),function(t,n,a,l){for(var s=t,c=r(t,a);c<i;){var d=n(s);if(void 0===d)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(c=e.getCachedMeasurement(d)))return{dataToMeasure:d};s=d}return(0,o.Cl)({resizeDirection:"shrink"},u(s,l,a))}(n.dataToMeasure,t.onGrowData,a,t.onReduceData)):(0,o.Cl)((0,o.Cl)({},s),u(n.dataToMeasure,t.onReduceData,a))),s}},shouldRenderDataForMeasurement:function(t){return!(!t||void 0!==e.getCachedMeasurement(t))},getInitialResizeGroupState:function(t){return{dataToMeasure:(0,o.Cl)({},t),resizeDirection:"grow",measureContainer:!0}}}},Wd=u.createContext({isMeasured:!1}),Rd={position:"fixed",visibility:"hidden"},zd={position:"relative"};function jd(t,n){var i;switch(n.type){case"resizeData":return(0,o.Cl)({},n.value);case"dataToMeasure":return(0,o.Cl)((0,o.Cl)({},t),{dataToMeasure:n.value,resizeDirection:"grow",measureContainer:!0});default:return(0,o.Cl)((0,o.Cl)({},t),((i={})[n.type]=n.value,i))}}var $d={isMeasured:!0},Yd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(Id),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Ot(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(jd,e),a=r[0],l=r[1];u.useEffect((function(){l({type:"dataToMeasure",value:t.data})}),[t.data]);var s=u.useRef(e);return s.current=(0,o.Cl)({},a),[s,u.useCallback((function(t){t&&l({type:"resizeData",value:t})}),[]),u.useCallback((function(){i.current&&l({type:"measureContainer",value:!0})}),[i])]}(t,i,n),c=s[0],d=s[1],f=s[2];u.useEffect((function(){var n;c.current.renderedData&&(a.current=!0,null===(n=t.dataDidRender)||void 0===n||n.call(t,c.current.renderedData))})),u.useEffect((function(){l.requestAnimationFrame((function(){var o=void 0;if(c.current.measureContainer&&n.current){var u=n.current.getBoundingClientRect();o=t.direction===Sd.vertical?u.height:u.width}var l=i.getNextState(t,c.current,(function(){var n=a.current?r:e;if(!n.current)return 0;var i=n.current.getBoundingClientRect();return t.direction===Sd.vertical?i.height:i.width}),o);d(l)}),n.current)})),Tt(Bt(),"resize",l.debounce(f,16,{leading:!0}));var v=i.shouldRenderDataForMeasurement(c.current.dataToMeasure),h=!a.current&&v;return[c.current.dataToMeasure,c.current.renderedData,f,e,r,v,h]}(t,i),a=r[0],l=r[1],s=r[2],c=r[3],d=r[4],f=r[5],v=r[6];u.useImperativeHandle(t.componentRef,(function(){return{remeasure:s}}),[s]),function(t){_n({name:"ResizeGroup",props:t,deprecations:{styles:"className"}})}(t);var h=t.className,p=t.onRenderData,g=z(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:zd},f&&!v&&u.createElement("div",{style:Rd,ref:d},u.createElement(Wd.Provider,{value:$d},p(a))),u.createElement("div",{ref:c,style:v?Rd:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));Yd.displayName="ResizeGroupBase";var Xd,Gd=Yd;!function(t){t.KEYTIP_ADDED="keytipAdded",t.KEYTIP_REMOVED="keytipRemoved",t.KEYTIP_UPDATED="keytipUpdated",t.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",t.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",t.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",t.ENTER_KEYTIP_MODE="enterKeytipMode",t.EXIT_KEYTIP_MODE="exitKeytipMode"}(Xd||(Xd={}));var Ud=function(){function t(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return t.getInstance=function(){return this._instance},t.prototype.init=function(t){this.delayUpdatingKeytipChange=t},t.prototype.register=function(t,n){void 0===n&&(n=!1);var i=t;n||(i=this.addParentOverflow(t),this.sequenceMapping[i.keySequences.toString()]=i);var e=this._getUniqueKtp(i);if(n?this.persistedKeytips[e.uniqueID]=e:this.keytips[e.uniqueID]=e,this.inKeytipMode||!this.delayUpdatingKeytipChange){var r=n?Xd.PERSISTED_KEYTIP_ADDED:Xd.KEYTIP_ADDED;yd.raise(this,r,{keytip:i,uniqueID:e.uniqueID})}return e.uniqueID},t.prototype.update=function(t,n){var i=this.addParentOverflow(t),e=this._getUniqueKtp(i,n),r=this.keytips[n];r&&(e.keytip.visible=r.keytip.visible,this.keytips[n]=e,delete this.sequenceMapping[r.keytip.keySequences.toString()],this.sequenceMapping[e.keytip.keySequences.toString()]=e.keytip,!this.inKeytipMode&&this.delayUpdatingKeytipChange||yd.raise(this,Xd.KEYTIP_UPDATED,{keytip:e.keytip,uniqueID:e.uniqueID}))},t.prototype.unregister=function(t,n,i){void 0===i&&(i=!1),i?delete this.persistedKeytips[n]:delete this.keytips[n],!i&&delete this.sequenceMapping[t.keySequences.toString()];var e=i?Xd.PERSISTED_KEYTIP_REMOVED:Xd.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||yd.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){yd.raise(this,Xd.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){yd.raise(this,Xd.EXIT_KEYTIP_MODE)},t.prototype.getKeytips=function(){var t=this;return Object.keys(this.keytips).map((function(n){return t.keytips[n].keytip}))},t.prototype.addParentOverflow=function(t){var n=(0,o.fX)([],t.keySequences,!0);if(n.pop(),0!==n.length){var i=this.sequenceMapping[n.toString()];if(i&&i.overflowSetSequence)return(0,o.Cl)((0,o.Cl)({},t),{overflowSetSequence:i.overflowSetSequence})}return t},t.prototype.menuExecute=function(t,n){yd.raise(this,Xd.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:t,keytipSequences:n})},t.prototype._getUniqueKtp=function(t,n){return void 0===n&&(n=p()),{keytip:(0,o.Cl)({},t),uniqueID:n}},t._instance=new t,t}(),qd=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},Zd=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];t.unregister(n[r],r,!0),delete n[r]}},Kd=function(t){var n=Ud.getInstance(),i=t.className,e=t.overflowItems,r=t.keytipSequences,a=t.itemSubMenuProvider,l=t.onRenderOverflowButton,s=Wt({}),c=u.useCallback((function(t){return a?a(t):t.subMenuProps?t.subMenuProps.items:void 0}),[a]),d=u.useMemo((function(){var t=[],i=[];return r?null==e||e.forEach((function(e){var u,a=e.keytipProps;if(a){var l={content:a.content,keySequences:a.keySequences,disabled:a.disabled||!(!e.disabled&&!e.isDisabled),hasDynamicChildren:a.hasDynamicChildren,hasMenu:a.hasMenu};a.hasDynamicChildren||c(e)?(l.onExecute=n.menuExecute.bind(n,r,null===(u=null==e?void 0:e.keytipProps)||void 0===u?void 0:u.keySequences),l.hasOverflowSubMenu=!0):l.onExecute=a.onExecute,t.push(l);var s=(0,o.Cl)((0,o.Cl)({},e),{keytipProps:(0,o.Cl)((0,o.Cl)({},a),{overflowSetSequence:r})});null==i||i.push(s)}else null==i||i.push(e)})):i=e,{modifiedOverflowItems:i,keytipsToRegister:t}}),[e,c,n,r]),f=d.modifiedOverflowItems;return function(t,n,i){var e=Bn(t);u.useEffect((function(){e&&(Zd(i,e),qd(n,i,t))})),u.useEffect((function(){return qd(n,i,t),function(){Zd(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},Jd=(0,a.Z)(),Qd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n);!function(t,n){var i=function(){var t;return null!==(t=Pt())&&void 0!==t?t:"undefined"!=typeof document?document:void 0}();u.useImperativeHandle(t.componentRef,(function(){return{focus:function(t,i){var e=!1;return n.current&&(e=C(n.current,i)),e},focusElement:function(t){var e=!1;return!!t&&(n.current&&w(n.current,t)&&(t.focus(),e=(null==i?void 0:i.activeElement)===t),e)}}}),[n,i])}(t,i);var r=t.items,a=t.overflowItems,l=t.className,s=t.styles,c=t.vertical,d=t.role,f=t.overflowSide,v=void 0===f?"end":f,h=t.onRenderItem,p=Jd(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},z(t,R),{role:d||"group","aria-orientation":"menubar"===d?!0===c?"vertical":"horizontal":void 0,className:p.root,ref:e}),"start"===v&&g&&u.createElement(Kd,(0,o.Cl)({},t,{className:p.overflowButton})),r&&r.map((function(t,n){return u.createElement("div",{className:p.item,key:t.key,role:"none"},h(t))})),"end"===v&&g&&u.createElement(Kd,(0,o.Cl)({},t,{className:p.overflowButton})))}));Qd.displayName="OverflowSet";var tf,nf={flexShrink:0,display:"inherit"},ef=(0,r.I)(Qd,(function(t){var n=t.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},t.vertical&&{flexDirection:"column"},n],item:["ms-OverflowSet-item",nf],overflowButton:["ms-OverflowSet-overflowButton",nf]}}),void 0,{scope:"OverflowSet"}),rf=((tf={})["".concat(Ws[Ws.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",tf["".concat(Ws[Ws.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",tf["".concat(Ws[Ws.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",tf["".concat(Ws[Ws.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",tf["".concat(Ws[Ws.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",tf["".concat(Ws[Ws.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",tf["".concat(Ws[Ws.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",tf["".concat(Ws[Ws.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",tf["".concat(Rs[Rs.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",tf),of=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(rf).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},qs(n),{transform:"rotate(".concat(e===Ws[Ws.diamond]?45:e===Ws[Ws.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:rf[e]},qs(i))))};function uf(t){return sl(Ka(t).call(document.documentElement))}function af(t,n){return(0,o.sH)(this,arguments,void 0,(function(t,n,i,e){var r,u,a,l,s;return void 0===i&&(i=!1),void 0===e&&(e={}),(0,o.YH)(this,(function(c){switch(c.label){case 0:if(0===t.length&&!n)throw new Error("No charts or legends to export");return[4,Promise.all(t.map((function(t){return new Promise((function(n){var e=function(t,n){if(!t)throw new Error("Chart container is not defined");var i=t.querySelector("svg");if(!i)throw new Error("SVG not found");for(var e=sl(i.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),r=i.getElementsByTagName("*"),u=e.node().getElementsByTagName("*"),a=["text"],l=["table","thead","tbody","tr","th","td"],s=0;s<r.length;s++){var c=r[s].tagName.toLowerCase();a.includes(c)||l.includes(c)?Qs((0,o.fX)((0,o.fX)([],lf,!0),sf,!0),r[s],u[s]):Qs(lf,r[s],u[s])}r=null,u=null;var d=i.querySelectorAll("foreignObject"),f=e.node().querySelectorAll("foreignObject");d.forEach((function(t,n){var i=f[n];if(i){var e=t.firstElementChild,r=i.firstElementChild;e&&r&&Qs(cf,e,r);var o=t.querySelectorAll("*"),u=i.querySelectorAll("*");o.forEach((function(t,n){var i=u[n];i&&Qs(cf,t,i)}))}}));var v=t.querySelector('[data-chart-annotation-svg="true"]'),h=null;if(v){h=v.cloneNode(!0),Qs(lf,v,h);var p=v.getElementsByTagName("*"),g=h.getElementsByTagName("*");for(s=0;s<p.length;s++){var y=p[s],m=g[s],b=(c=y.tagName.toLowerCase(),y instanceof SVGElement),x=y instanceof HTMLElement;b&&Qs("text"===c?(0,o.fX)((0,o.fX)([],lf,!0),sf,!0):lf,y,m),x&&Qs(cf,y,m),"foreignobject"===c&&Qs(df,y,m)}}var w=i.getBoundingClientRect(),M=w.width,C=w.height;e.attr("width",M).attr("height",C).attr("viewBox","0 0 ".concat(M," ").concat(C)).attr("direction",n?"rtl":"ltr"),h&&(e.selectAll('[data-chart-annotation-layer="true"]').remove(),sl(h).attr("x",0).attr("y",0).attr("width",M).attr("height",C),e.append((function(){return h})));var k={node:e.node(),width:M,height:C};return e=null,k}(t.container,i);n({dataUrl:hf(e.node),width:e.width,height:e.height})}))})))];case 1:return r=c.sent(),u=[],t.forEach((function(t,n){var i=t.row||0,e=t.col||0;u[i]||(u[i]=[]),u[i][e]=r[n]})),n&&(a=0,u.forEach((function(t){var n=0;t.forEach((function(t){n+=t.width})),a=Math.max(a,n)})),(l=n(a,i)).node&&(s=hf(l.node),u.push([{dataUrl:s,width:l.width,height:l.height}]))),[2,vf(u,e)]}}))}))}var lf=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],sf=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],cf=["align-items","background","background-color","border","border-radius","box-shadow","box-sizing","color","column-gap","display","flex","flex-direction","font-family","font-size","font-style","font-weight","gap","height","justify-content","letter-spacing","line-height","margin","max-height","max-width","min-height","min-width","opacity","overflow","padding","pointer-events","position","row-gap","text-align","text-decoration","text-transform","top","right","bottom","left","visibility","white-space","width","z-index"],df=["overflow","pointer-events"],ff={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};function vf(t){return(0,o.sH)(this,arguments,void 0,(function(t,n){var i,e,r,u,a,l,s,c,d,f;return void 0===n&&(n={}),(0,o.YH)(this,(function(v){switch(v.label){case 0:if(i=0,e=0,r=t.map((function(t){var n=0,r=0,u=t.map((function(t){var i=(0,o.Cl)((0,o.Cl)({},t),{x:n,y:e});return n+=t.width,r=Math.max(r,t.height),i}));return i=Math.max(i,n),e+=r,u})).flat(),u=n.scale||1,a=n.width||i,l=n.height||e,i*=s=u*a/i,e*=c=u*l/e,(d=document.createElement("canvas")).width=i,d.height=e,!(f=d.getContext("2d")))throw new Error("Canvas context is null");return f.fillStyle=n.background||"transparent",f.fillRect(0,0,i,e),[4,Promise.all(r.map((function(t){return new Promise((function(n,i){var e=new Image;e.onload=function(){f.drawImage(e,s*t.x,c*t.y,s*t.width,c*t.height),n()},e.onerror=i,e.src=t.dataUrl}))})))];case 1:return v.sent(),[2,d.toDataURL("image/png")]}}))}))}function hf(t){if(!t)throw new Error("SVG node is null");var n=(new XMLSerializer).serializeToString(t);return"data:image/svg+xml;base64,"+btoa(function(t){for(var n,i,e="",r=t.length,o=0;o<r;){if("%"===(n=t.charAt(o++)))if("u"===t.charAt(o)){if(i=t.slice(o+1,o+5),gf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),pf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(n)))}var pf=/^[\da-f]{2}$/i,gf=/^[\da-f]{4}$/i,yf=(0,a.Z)(),mf=function(t){function n(n){var i,e,r,a,l=t.call(this,n)||this;l._isLegendSelected=!1,l.toSVG=function(t,n){return void 0===n&&(n=!1),function(t,n,i,e){if(0===t.length)return{node:null,width:0,height:0};for(var r=i.selectedLegends,u=i.centerLegends,a=i.textClassName,l=i.isRTL,s=uf("svg:g"),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o=ec(t[i].title,".".concat(a),e),g=29+o.width+8,y=s.append("g");f.push({elem:y,width:g}),c+g>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:y,width:g}],c=u?0:12,d+=32);var m=r[t[i].title]||p;y.append("rect").attr("x",c+(l?g-8-13:8)).attr("y",d+8).attr("width",13).attr("height",13).style("fill",m?t[i].color:"transparent").style("stroke-width",1).style("stroke",t[i].color),y.append("text").attr("x",c+(l?g-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",m?1:.67).text(t[i].title).call((function(t){return Qs(ff,o.node,t.node())})),c+=g},y=0;y<t.length;y++)g(y);if(v.push(f),h.push(c),d+=32,u)v.forEach((function(t,i){var e=Math.max((n-h[i])/2,0),r=h[i],o=0;t.forEach((function(t){var n=e+(l?r-t.width-o:0);t.elem.attr("transform","translate(".concat(n,", 0)")),r-=t.width,o+=t.width}))}));else if(l){var m=Math.max.apply(Math,(0,o.fX)([n],h,!1));v.forEach((function(t){var n=m-12,i=12;t.forEach((function(t){var e=n-t.width-i;t.elem.attr("transform","translate(".concat(e,", 0)")),n-=t.width,i+=t.width}))}))}var b=Math.max.apply(Math,(0,o.fX)([n],h,!1)),x=d,w=uf("svg").attr("width",b).attr("height",x).attr("viewBox","0 0 ".concat(b," ").concat(x));return w.append((function(){return s.node()})),{node:w.node(),width:b,height:x}}(l.props.legends,t,{selectedLegends:l.state.selectedLegends,centerLegends:!!l.props.centerLegends,textClassName:l._classNames.text,isRTL:n},l._rootElem)},l._onRenderData=function(t){var n=l.props,i=n.overflowProps,e=n.allowFocusOnLegends,r=void 0===e||e,a=n.canSelectMultipleLegends,s=void 0!==a&&a,c={root:{justifyContent:l.props.centerLegends?"center":"unset",flexWrap:l.props.enabledWrapLines?"wrap":"nowrap"}};return u.createElement(td,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(ef,(0,o.Cl)({items:t.primary,overflowItems:t.overflow,onRenderItem:l._renderButton,onRenderOverflowButton:l._renderOverflowItems},i,{styles:(0,o.Cl)((0,o.Cl)({},c),null==i?void 0:i.styles)})))},l._onReduceData=function(t){if(0!==t.primary.length){var n=(0,o.fX)((0,o.fX)([],t.primary.slice(-1),!0),t.overflow,!0);return{primary:t.primary.slice(0,-1),overflow:n}}},l._onGrowData=function(t){if(0!==t.overflow.length){var n=t.overflow.slice(1);return{primary:(0,o.fX)((0,o.fX)([],t.primary,!0),t.overflow.slice(0,1),!0),overflow:n}}},l._getNewSelectedLegendsForMultiselect=function(t){var n=(0,o.Cl)({},l.state.selectedLegends);return n[t.title]?delete n[t.title]:(n[t.title]=!0,Object.keys(n).length===l.props.legends.length&&(n={})),n},l._getNewSelectedLegendsForSingleSelect=function(t){var n;return l.state.selectedLegends[t.title]?{}:((n={})[t.title]=!0,n)},l._onClick=function(t,n){var i,e,r,o=l.props.canSelectMultipleLegends,u=void 0!==o&&o?l._getNewSelectedLegendsForMultiselect(t):l._getNewSelectedLegendsForSingleSelect(t);l.setState({selectedLegends:u}),null===(e=(i=l.props).onChange)||void 0===e||e.call(i,Object.keys(u),n,t),null===(r=t.action)||void 0===r||r.call(t)},l._onRenderCompactCard=function(t){var n=l.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.className,a=n.styles,s=n.theme,c=n.canSelectMultipleLegends,d=void 0!==c&&c,f=[],v=yf(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(td,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:dc.vertical,handleTabKey:1,isCircularNavigation:!0},l.props.focusZonePropsInHoverCard,{className:v.hoverCardRoot}),f)},l._renderOverflowItems=function(t){var n=l.props.allowFocusOnLegends,i=void 0===n||n,e=[];t.forEach((function(t,n){e.push({key:n.toString(),name:t.title,onClick:t.action})}));var r={renderData:t},a=l.props,s=a.theme,c=a.className,d=a.styles,f=a.overflowText,v=yf(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(Hd,{type:ad.plain,plainCardProps:h,instantOpenOnClick:!0,onCardHide:function(){l.setState({isHoverCardVisible:!1});var n=m(t,(function(t){return t.title===l.state.activeLegend}));n&&(l.setState({activeLegend:""}),n.onMouseOutAction&&n.onMouseOutAction())},setInitialFocus:!0,trapFocus:!0,onCardVisible:l._hoverCardVisible,styles:v.subComponentStyles.hoverCardStyles,cardDismissDelay:300,target:l._hoverCardRef},u.createElement("div",{role:"option"},u.createElement("div",(0,o.Cl)({className:v.overflowIndicationTextStyle,ref:function(t){l._hoverCardRef=t}},i&&{role:"button","aria-expanded":l.state.isHoverCardVisible,"aria-label":"".concat(e.length," ").concat(p)},{"data-is-focusable":i}),e.length," ",p)))},l._hoverCardVisible=function(){l.setState({isHoverCardVisible:!0})},l._onHoverOverLegend=function(t){t.hoverAction&&(l.setState({activeLegend:t.title}),t.hoverAction())},l._onLeave=function(t){t.onMouseOutAction&&(l.setState({activeLegend:""}),t.onMouseOutAction())},l._renderButton=function(t,n,i){var e=l.props.allowFocusOnLegends,r=void 0===e||e,a={title:t.title,color:t.color,shape:t.shape,action:t.action,hoverAction:t.hoverAction,onMouseOutAction:t.onMouseOutAction,stripePattern:t.stripePattern,isLineLegendInBarChart:t.isLineLegendInBarChart,opacity:t.opacity},s=l._getColor(a.title,a.color),c=l.props,d=c.theme,f=c.className,v=c.styles,h=yf(v,{theme:d,className:f,colorOnSelectedState:s,borderColor:a.color,overflow:i,stripePattern:a.stripePattern,isLineLegendInBarChart:a.isLineLegendInBarChart,opacity:a.opacity}),p=function(){l._onHoverOverLegend(a)},g=function(){l._onLeave(a)},y=l._getShape(h,a,s);return u.createElement("button",(0,o.Cl)({},r&&{"aria-selected":!!l.state.selectedLegends[a.title],role:"option","aria-label":"".concat(a.title),"aria-setsize":t["aria-setsize"],"aria-posinset":t["aria-posinset"]},t.nativeButtonProps&&(0,o.Cl)({},t.nativeButtonProps),{key:n,className:h.legend,onClick:function(t){l._onClick(a,t)},onMouseOver:p,onMouseOut:g,onFocus:p,onBlur:g,"data-is-focusable":r}),y,u.createElement("div",{className:h.text},a.title))};var s=null!==(e=n.selectedLegends)&&void 0!==e?e:n.defaultSelectedLegends,c=null!==(r=n.selectedLegend)&&void 0!==r?r:n.defaultSelectedLegend,d={};return n.canSelectMultipleLegends?d=(null===(a=null!=s?s:[])||void 0===a?void 0:a.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{}))||{}:c&&((i={})[c]=!0,d=i),l.state={activeLegend:"",isHoverCardVisible:!1,selectedLegends:d},l}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e=t.selectedLegend,r=t.selectedLegends;return t.canSelectMultipleLegends&&void 0!==r?(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:r.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{})}):t.canSelectMultipleLegends||void 0===e?n:(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:(i={},i[e]=!0,i)})},n.prototype.render=function(){var t=this,n=this.props,i=n.theme,e=n.className,r=n.styles;this._classNames=yf(r,{theme:i,className:e}),this._isLegendSelected=Object.keys(this.state.selectedLegends).length>0;var o=this._generateData();return u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Gd,{data:o,onReduceData:this._onReduceData,onRenderData:this._onRenderData,onGrowData:this._onGrowData}))},n.prototype._generateData=function(){var t=this,n=this.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.shape;return{primary:this.props.legends.map((function(n,i){return(0,o.Cl)((0,o.Cl)({},e&&{nativeButtonProps:z(n,W,["title"]),"aria-setsize":t.props.legends.length,"aria-posinset":i+1}),{title:n.title,action:n.action,hoverAction:n.hoverAction,onMouseOutAction:n.onMouseOutAction,color:n.color,shape:r||n.shape,stripePattern:n.stripePattern,isLineLegendInBarChart:n.isLineLegendInBarChart,opacity:n.opacity,key:i})})),overflow:[]}},n.prototype._getShape=function(t,n,i){var e={className:t.shape},r={fill:i,strokeWidth:2,stroke:n.color};return u.createElement(of,{svgProps:e,pathProps:r,shape:n.shape,classNameForNonSvg:t.rect})},n.prototype._getColor=function(t,n){var i=this.props.theme;return this._isLegendSelected?this.state.selectedLegends[t]?n:i.semanticColors.buttonBackground:this.state.activeLegend===t||""===this.state.activeLegend?n:i.semanticColors.buttonBackground},n}(u.Component),bf=(0,r.I)(mf,(function(t){var n,i,e=t.className,r=t.theme,u=t.isLineLegendInBarChart,a=void 0!==u&&u,l=r,s=l.palette,c=l.fonts,d={inset:void 0,position:void 0,highContrastStyle:{outlineColor:r.semanticColors.focusBorder},borderColor:"transparent",outlineColor:void 0};return{root:[{whiteSpace:"nowrap",width:"100%",alignItems:"center",margin:"-8px 0 0 -8px"},e],legend:[(0,It.gm)(r,d),{display:"flex",alignItems:"center",cursor:"pointer",border:"none",padding:"".concat(8,"px"),background:"none",textTransform:"capitalize"}],rect:{selectors:(n={},n[It.up]={content:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")"),opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":""},n),width:"".concat(12,"px"),height:a?"4px":"".concat(12,"px"),backgroundColor:t.stripePattern?"":t.colorOnSelectedState,marginRight:"".concat(8,"px"),border:"".concat(1,"px solid"),borderColor:t.borderColor?t.borderColor:null==r?void 0:r.semanticColors.buttonBorder,content:t.stripePattern?"repeating-linear-gradient(135deg, transparent, transparent 3px, ".concat(t.colorOnSelectedState," 1px, ").concat(t.colorOnSelectedState," 4px)"):""},shape:[{marginRight:"".concat(8,"px")}],triangle:{width:"0",height:"0",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"10.4px solid",borderTopColor:t.colorOnSelectedState,marginRight:"8px",opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":t.opacity?t.opacity:"",selectors:(i={},i[It.up]={border:"0px",height:"10.4px",width:"10.4px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")")},i)},text:(0,o.Cl)((0,o.Cl)({},c.small),{lineHeight:"16px",color:null==r?void 0:r.semanticColors.bodyText,opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"".concat(.67):""}),hoverChange:{width:"12px",height:"12px",backgroundColor:r.semanticColors.buttonBackground,marginRight:"8px",border:"1px solid",borderColor:t.borderColor?t.borderColor:s.black},overflowIndicationTextStyle:[(0,It.gm)(r,d),(0,o.Cl)((0,o.Cl)({cursor:"pointer",color:null==r?void 0:r.semanticColors.bodyText},c.small),{lineHeight:"16px",padding:"".concat(8,"px")})],hoverCardRoot:{padding:"8px",position:"relative",overflowY:"auto",maxHeight:"300px"},subComponentStyles:{hoverCardStyles:{host:[(0,It.gm)(r,d)]}}}}));function xf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function wf(t){return function(){return t}}function Mf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function Cf(t){return t}Array.prototype.slice;const kf=Math.abs,Af=Math.atan2,Sf=Math.cos,Lf=Math.max,Vf=Math.min,Df=Math.sin,Nf=Math.sqrt,Of=1e-12,Tf=Math.PI,Ef=Tf/2,Ff=2*Tf;function Bf(t){return t>=1?Ef:t<=-1?-Ef:Math.asin(t)}function Pf(){var t=Cf,n=Mf,i=null,e=wf(0),r=wf(Ff),o=wf(0);function u(u){var a,l,s,c,d,f=(u=xf(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(Ff,Math.max(-Ff,r.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=m*(y<0?-1:1);for(a=0;a<f;++a)(d=p[h[a]=a]=+t(u[a],a,u))>0&&(v+=d);for(null!=n?h.sort((function(t,i){return n(p[t],p[i])})):null!=i&&h.sort((function(t,n){return i(u[t],u[n])})),a=0,s=v?(y-f*b)/v:0;a<f;++a,g=c)l=h[a],c=g+((d=p[l])>0?d*s:0)+b,p[l]={data:u[l],index:a,value:d,startAngle:g,endAngle:c,padAngle:m};return p}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,i=null,u):n},u.sort=function(t){return arguments.length?(i=t,n=null,u):i},u.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:wf(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:wf(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:wf(+t),u):o},u}const _f=Math.PI,Hf=2*_f,If=1e-6,Wf=Hf-If;function Rf(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class zf{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Rf:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Rf;const i=10**n;return function(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,e){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+e}`}bezierCurveTo(t,n,i,e,r,o){this._append`C${+t},${+n},${+i},${+e},${this._x1=+r},${this._y1=+o}`}arcTo(t,n,i,e,r){if(t=+t,n=+n,i=+i,e=+e,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,u=this._y1,a=i-t,l=e-n,s=o-t,c=u-n,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(d>If)if(Math.abs(c*a-l*s)>If&&r){let f=i-o,v=e-u,h=a*a+l*l,p=f*f+v*v,g=Math.sqrt(h),y=Math.sqrt(d),m=r*Math.tan((_f-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>If&&this._append`L${t+b*s},${n+b*c}`,this._append`A${r},${r},0,0,${+(c*f>s*v)},${this._x1=t+x*a},${this._y1=n+x*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,e,r,o){if(t=+t,n=+n,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(e),a=i*Math.sin(e),l=t+u,s=n+a,c=1^o,d=o?e-r:r-e;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>If||Math.abs(this._y1-s)>If)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%Hf+Hf),d>Wf?this._append`A${i},${i},0,1,${c},${t-u},${n-a}A${i},${i},0,1,${c},${this._x1=l},${this._y1=s}`:d>If&&this._append`A${i},${i},0,${+(d>=_f)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=n+i*Math.sin(r)}`)}rect(t,n,i,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+e}h${-i}Z`}toString(){return this._}}function jf(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(null==i)n=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);n=t}return t},()=>new zf(n)}function $f(t){return t.innerRadius}function Yf(t){return t.outerRadius}function Xf(t){return t.startAngle}function Gf(t){return t.endAngle}function Uf(t){return t&&t.padAngle}function qf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/Nf(a*a+l*l),c=s*l,d=-s*a,f=t+c,v=n+d,h=i+c,p=e+d,g=(f+h)/2,y=(v+p)/2,m=h-f,b=p-v,x=m*m+b*b,w=r-o,M=f*p-h*v,C=(b<0?-1:1)*Nf(Lf(0,w*w*x-M*M)),k=(M*b-m*C)/x,A=(-M*m-b*C)/x,S=(M*b+m*C)/x,L=(-M*m+b*C)/x,V=k-g,D=A-y,N=S-g,O=L-y;return V*V+D*D>N*N+O*O&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-d,x11:k*(r/w-1),y11:A*(r/w-1)}}function Zf(){var t=$f,n=Yf,i=wf(0),e=null,r=Xf,o=Gf,u=Uf,a=null,l=jf(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-Ef,p=o.apply(this,arguments)-Ef,g=kf(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>Of)if(g>Ff-Of)a.moveTo(v*Sf(h),v*Df(h)),a.arc(0,0,v,h,p,!y),f>Of&&(a.moveTo(f*Sf(p),f*Df(p)),a.arc(0,0,f,p,h,y));else{var m,b,x=h,w=p,M=h,C=p,k=g,A=g,S=u.apply(this,arguments)/2,L=S>Of&&(e?+e.apply(this,arguments):Nf(f*f+v*v)),V=Vf(kf(v-f)/2,+i.apply(this,arguments)),D=V,N=V;if(L>Of){var O=Bf(L/f*Df(S)),T=Bf(L/v*Df(S));(k-=2*O)>Of?(M+=O*=y?1:-1,C-=O):(k=0,M=C=(h+p)/2),(A-=2*T)>Of?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*Sf(x),F=v*Df(x),B=f*Sf(C),P=f*Df(C);if(V>Of){var _,H=v*Sf(w),I=v*Df(w),W=f*Sf(M),R=f*Df(M);if(g<Tf)if(_=function(t,n,i,e,r,o,u,a){var l=i-t,s=e-n,c=u-r,d=a-o,f=d*l-c*s;if(!(f*f<Of))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var z=E-_[0],j=F-_[1],$=H-_[0],Y=I-_[1],X=1/Df(((d=(z*$+j*Y)/(Nf(z*z+j*j)*Nf($*$+Y*Y)))>1?0:d<-1?Tf:Math.acos(d))/2),G=Nf(_[0]*_[0]+_[1]*_[1]);D=Vf(V,(f-G)/(X-1)),N=Vf(V,(v-G)/(X+1))}else D=N=0}A>Of?N>Of?(m=qf(W,R,E,F,v,N,y),b=qf(H,I,B,P,v,N,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),N<V?a.arc(m.cx,m.cy,N,Af(m.y01,m.x01),Af(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,Af(m.y01,m.x01),Af(m.y11,m.x11),!y),a.arc(0,0,v,Af(m.cy+m.y11,m.cx+m.x11),Af(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,Af(b.y11,b.x11),Af(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>Of&&k>Of?D>Of?(m=qf(B,P,H,I,f,-D,y),b=qf(E,F,W,R,f,-D,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),D<V?a.arc(m.cx,m.cy,D,Af(m.y01,m.x01),Af(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,D,Af(m.y01,m.x01),Af(m.y11,m.x11),!y),a.arc(0,0,f,Af(m.cy+m.y11,m.cx+m.x11),Af(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,D,Af(b.y11,b.x11),Af(b.y01,b.x01),!y))):a.arc(0,0,f,C,M,y):a.lineTo(B,P)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-Tf/2;return[Sf(e)*i,Df(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:wf(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:wf(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:wf(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:wf(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:wf(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var Kf=function(t){var n,i=t.solidFill,e=t.gradientFill,r=t.href,o=t.theme,u=t.opacity;return{root:{fill:i,cursor:r?"pointer":"default",stroke:o.semanticColors.bodyBackground,outline:"transparent",selectors:{"::-moz-focus-inner":{border:"0"}},opacity:u},gradientArc:{width:"100%",height:"100%",background:e,opacity:u},focusRing:{stroke:o.semanticColors.focusBorder,strokeWidth:4,fill:"transparent"},arcLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:o.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}};const Jf=new Set(["http:","https:","mailto:","tel:","ftp:"]);function Qf(t){const n=t.replace(/[\u0000-\u001F\u007F\s\u200B-\u200D\u2060\uFEFF]+/g,"");if(!/^[a-z][a-z0-9+.-]*:/i.test(n))return!0;try{const t=new URL(n).protocol.toLowerCase();return Jf.has(t)}catch{return!1}}var tv=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.state={},n.currentRef=u.createRef(),n._isRTL=(0,l.jI)(),n._hoverOff=function(){n.props.hoverLeaveCallback()},n._onBlur=function(){n.props.onBlurCallback()},n._getAriaLabel=function(){var t,i=n.props.data.data,e=i.xAxisCalloutData||i.legend,r=i.yAxisCalloutData||i.data||0;return(null===(t=i.callOutAccessibilityData)||void 0===t?void 0:t.ariaLabel)||(e?"".concat(e,", "):"")+"".concat(r,".")},n._shouldHighlightArc=function(t){var i=n.props.activeArc;return!i||0===i.length||void 0===t||i.includes(t)},n._renderArcLabel=function(t){var i=n.props,e=i.arc,r=i.data,o=i.innerRadius,a=i.outerRadius,l=i.showLabelsInPercent,s=i.totalValue;if(i.hideLabels||Math.abs(r.endAngle-r.startAngle)<Math.PI/12||!n._shouldHighlightArc(r.data.legend))return null;var c=e.centroid(r),d=c[0],f=c[1],v=Math.sqrt(d*d+f*f),h=Math.max(o,a)+2,p=(r.startAngle+r.endAngle)/2,g=r.value;return u.createElement("text",{x:(0===v?0:d/v)*h,y:(0===v?0:f/v)*h,textAnchor:p>Math.PI!==n._isRTL?"end":"start",dominantBaseline:p>Math.PI/2&&p<3*Math.PI/2?"hanging":"auto",className:t,"aria-hidden":!0},l?ju(".0%")(0===s?0:g/s):Ys(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return nv(t),null},n.prototype.updateChart=function(t){nv(t)},n.prototype.render=function(){var t,n,i,e,r,o,l,s=this.props,c=s.arc,d=s.href,f=s.focusedArcId,v=s.activeArc,h=(0,a.Z)(),g=this.props.uniqText+("string"==typeof this.props.data.data.legend?this.props.data.data.legend.replace(/\s+/g,""):"")+this.props.data.data.data,y=v&&v.length>0?v.includes(null===(t=this.props.data)||void 0===t?void 0:t.data.legend)?1:.1:1,m=null!==(i=null===(n=this.props.data)||void 0===n?void 0:n.startAngle)&&void 0!==i?i:0,b=(null!==(r=null===(e=this.props.data)||void 0===e?void 0:e.endAngle)&&void 0!==r?r:0)-m,x=this.props.roundCorners?3:0,w=h(Kf,{solidFill:this.props.enableGradient?"transparent":this.props.color,gradientFill:"conic-gradient(\n from ".concat(m,"rad,\n ").concat(this.props.color,",\n ").concat(this.props.nextColor," ").concat(b,"rad\n )"),href:d,theme:this.props.theme,opacity:y}),M=p("Arc_clip")+"".concat(this.props.color,"_").concat(this.props.nextColor);return u.createElement("g",{ref:this.currentRef},!!f&&f===g&&u.createElement("path",{id:g+"focusRing",d:c.cornerRadius(x)(this.props.focusData),className:w.focusRing}),u.createElement("path",{id:g,d:c.cornerRadius(x)(this.props.data),onFocus:this._onFocus.bind(this,this.props.data.data,g),className:w.root,"data-is-focusable":this._shouldHighlightArc(this.props.data.data.legend)||0===(null===(o=this.props.activeArc)||void 0===o?void 0:o.length),onMouseOver:this._hoverOn.bind(this,this.props.data.data),onMouseMove:this._hoverOn.bind(this,this.props.data.data),onMouseLeave:this._hoverOff,onBlur:this._onBlur,onClick:d?this._redirectToUrl.bind(this,d):null===(l=this.props.data)||void 0===l?void 0:l.data.onClick,"aria-label":this._getAriaLabel(),role:"img"}),this._renderArcLabel(w.arcLabel),this.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:M},u.createElement("path",{d:c.cornerRadius(x)(this.props.data)})),u.createElement("foreignObject",{x:"-50%",y:"-50%",width:"100%",height:"100%",clipPath:"url(#".concat(M,")")},u.createElement("div",{className:w.gradientArc}))))},n.prototype._onFocus=function(t,n){this.props.onFocusCallback(t,n,this.currentRef.current)},n.prototype._hoverOn=function(t,n){n.persist(),this.props.hoverOnCallback(t,n)},n.prototype._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},n.defaultProps={arc:Zf()},n}(u.Component);function nv(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var iv,ev,rv,ov=function(t){var n,i=t.theme;return{root:{},insideDonutString:{fontSize:It.s.xLargePlus,fontWeight:It.BO.semibold,fill:i.semanticColors.bodyText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},uv=(0,a.Z)(),av=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n,e,r){var o,a,l,s,c=t&&t.data&&t.data.color,d=c;return i.props.enableGradient&&(c=null!==(a=null===(o=i.props.data[n].gradient)||void 0===o?void 0:o[0])&&void 0!==a?a:Nc(n,0,i.props.theme.isInverted)[0],d=null!==(s=null===(l=i.props.data[n].gradient)||void 0===l?void 0:l[1])&&void 0!==s?s:Nc(n,0,i.props.theme.isInverted)[1]),u.createElement(tv,{key:n,data:t,focusData:e,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:c,nextColor:d,enableGradient:i.props.enableGradient,roundCorners:i.props.roundCorners,onFocusCallback:i._focusCallback,hoverOnCallback:i._hoverCallback,onBlurCallback:i.props.onBlurCallback,hoverLeaveCallback:i.props.hoverLeaveCallback,uniqText:i.props.uniqText,activeArc:i.props.activeArc,href:r,calloutId:i.props.calloutId,valueInsideDonut:i.props.valueInsideDonut,theme:i.props.theme,focusedArcId:i.props.focusedArcId,showLabelsInPercent:i.props.showLabelsInPercent,totalValue:i._totalValue,hideLabels:i.props.hideLabels})},i._focusCallback=function(t,n,e){i.props.onFocusCallback(t,n,e)},i._computeTotalValue=function(){var t=0;return i.props.data.forEach((function(n){t+=n.data})),t},i._hoverCallback=i._hoverCallback.bind(i),i._pieForFocusRing=Pf().sort(null).value((function(t){return t.data})).padAngle(0),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data.filter((function(t){return 0!==t.data})),r=this._pieForFocusRing(e.map((function(t){return t.data}))),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=uv(ov,{theme:this.props.theme});return this._totalValue=this._computeTotalValue(),u.createElement("g",{transform:a},o.map((function(n,i){return t.arcGenerator(n,i,r[i],t.props.href)})),this.props.valueInsideDonut&&u.createElement("text",{y:5,textAnchor:"middle",dominantBaseline:"middle",className:l.insideDonutString},this.props.valueInsideDonut))},n.prototype.componentDidUpdate=function(){var t,n,i;t=uv(ov,{theme:this.props.theme}).insideDonutString,n=2*this.props.innerRadius-5,i=0,cl(".".concat(t)).each((function(){for(var t=sl(this),e=t.text().split(/\s+/).reverse(),r="",o=[],u=0,a=t.attr("y"),l=t.text(null).append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em");r=e.pop();)o.push(r),l.text(o.join(" ")+" "),l.node().getComputedTextLength()>n&&o.length>1&&(o.pop(),l.text(o.join(" ")+" "),o=[r],l=t.append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em").text(r));i+=1}))},n.prototype._hoverCallback=function(t,n){this.props.hoverOnCallback(t,n)},n.defaultProps={pie:Pf().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),lv=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._tooltipHostId=p("tooltip-host"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._measureText=function(){if(e._tooltipHost.current&&"function"==typeof e._tooltipHost.current.getBBox){var t=e._tooltipHost.current.getBBox();e.setState({textX:t.x,textY:t.y,textWidth:t.width,textHeight:t.height})}},e._getTargetElement=function(){if(e._tooltipHost.current)return e._tooltipHost.current},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipBlur=function(t){e._ignoreNextFocusEvent=(null===document||void 0===document?void 0:document.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props.delay;if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e.state.isOverflowing&&(!t.target||!Hc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==id.zero){var r=e._getDelayTime(i);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),r)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t})},e._getDelayTime=function(t){switch(t){case id.medium:return 300;case id.long:return 500;default:return 0}},e._wrapContent=function(){var t=e.props,n=t.content,i=t.wrapContent,r=t.maxWidth,o=void 0===r?Number.POSITIVE_INFINITY:r,u=t.maxHeight,a=!1;n&&i&&i(n,e._tooltipHostId,o,u)&&(a=!0),e.state.isOverflowing!==a&&e.setState({isOverflowing:a})},e.state={isTooltipVisible:!1,isOverflowing:!1},e._async=new Nt(e),e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.content,i=t.tooltipProps,e=t.textProps,r=t.shouldReceiveFocus,a=void 0===r||r,l=t.showBackground,s=void 0!==l&&l,c=this.state,d=c.isTooltipVisible,f=c.textWidth,v=c.textHeight,h=(0,o.Cl)({content:n,targetElement:this._getTargetElement(),calloutProps:{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},i),p=!!this.props.isTooltipVisibleProp&&this.state.isOverflowing&&!!n||d&&!!n,g=("number"==typeof(null==e?void 0:e.x)?e.x:0)-(null!=f?f:0)/2-3,y=("number"==typeof(null==e?void 0:e.y)?e.y:0)-(null!=v?v:0)/2-6;return u.createElement(u.Fragment,null,s&&u.createElement("rect",{x:g,y:y,width:(null!=f?f:0)+6,height:(null!=v?v:0)+3,transform:null==e?void 0:e.transform,className:this.props.className}),u.createElement("text",(0,o.Cl)({},e,{id:this._tooltipHostId,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"data-is-focusable":a&&this.state.isOverflowing}),n),p&&u.createElement(od,(0,o.Cl)({},h)))},n.prototype.componentDidMount=function(){this._wrapContent(),this._measureText()},n.prototype.componentDidUpdate=function(t){this.props.maxWidth===t.maxWidth&&this.props.maxHeight===t.maxHeight||(this._wrapContent(),this._measureText())},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:id.medium},n}(u.Component);!function(t){t.shade30="#004578",t.shade20="#005a9e",t.shade10="#106ebe",t.primary="#0078d4",t.tint10="#2b88d8",t.tint20="#c7e0f4",t.tint30="#deecf9",t.tint40="#eff6fc"}(iv||(iv={})),function(t){t.black="#000000",t.gray220="#11100f",t.gray210="#161514",t.gray200="#1b1a19",t.gray190="#201f1e",t.gray180="#252423",t.gray170="#292827",t.gray160="#323130",t.gray150="#3b3a39",t.gray140="#484644",t.gray130="#605e5c",t.gray120="#797775",t.gray110="#8a8886",t.gray100="#979593",t.gray90="#a19f9d",t.gray80="#b3b0ad",t.gray70="#bebbb8",t.gray60="#c8c6c4",t.gray50="#d2d0ce",t.gray40="#e1dfdd",t.gray30="#edebe9",t.gray20="#f3f2f1",t.gray10="#faf9f8",t.white="#ffffff"}(ev||(ev={})),function(t){t.pinkRed10="#750b1c",t.red20="#a4262c",t.red10="#d13438",t.redOrange20="#603d30",t.redOrange10="#da3b01",t.orange30="#8e562e",t.orange20="#ca5010",t.orange10="#ffaa44",t.yellow10="#fce100",t.orangeYellow20="#986f0b",t.orangeYellow10="#c19c00",t.yellowGreen10="#8cbd18",t.green20="#0b6a0b",t.green10="#498205",t.greenCyan10="#00ad56",t.cyan40="#005e50",t.cyan30="#005b70",t.cyan20="#038387",t.cyan10="#00b7c3",t.cyanBlue20="#004e8c",t.cyanBlue10="#0078d4",t.blue10="#4f6bed",t.blueMagenta40="#373277",t.blueMagenta30="#5c2e91",t.blueMagenta20="#8764b8",t.blueMagenta10="#8378de",t.magenta20="#881798",t.magenta10="#c239b3",t.magentaPink20="#9b0062",t.magentaPink10="#e3008c",t.gray40="#393939",t.gray30="#7a7574",t.gray20="#69797e",t.gray10="#a0aeb2"}(rv||(rv={}));var sv=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},cv=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:ev.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},dv=function(t){var n;return{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:t.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},fv=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},vv=function(t){var n;return(0,o.Cl)((0,o.Cl)({},t.fonts.small),{fontWeight:It.BO.semibold,fontStyle:"normal",fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)})},hv=function(t){var n;return{fill:t.semanticColors.bodyBackground,selectors:(n={},n[It.up]={fill:"Canvas"},n)}};function pv(t,n,i,e){var r,o,u,a,l,s,c={};if(t&&Object.assign(c,t.family&&{fontFamily:t.family},t.size&&{fontSize:"".concat(t.size,"px")},t.weight&&{fontWeight:t.weight},t.color&&{fill:t.color},t.shadow&&"none"!==t.shadow&&{filter:"drop-shadow(".concat(t.shadow,")")}),n&&(l={left:"left",center:"center",right:"right"})[s=n.toLowerCase()]&&(c.textAlign=l[s]),i&&(l={top:"flex-start",middle:"center",bottom:"flex-end"})[s=i.toLowerCase()]&&(c.alignSelf=l[s]),e){var d=null!==(r=e.t)&&void 0!==r?r:0,f=null!==(o=e.r)&&void 0!==o?o:0,v=null!==(u=e.b)&&void 0!==u?u:0,h=null!==(a=e.l)&&void 0!==a?a:0;c.padding="".concat(d,"px ").concat(f,"px ").concat(v,"px ").concat(h,"px")}return c}var gv=function(t){var n,i,e,r,a=t.title,l=t.x,s=t.y,c=t.maxWidth,d=t.className,f=t.titleStyles,v=t.tooltipProps,h=t.tooltipClassName,p=t.theme,g=null!=f?f:{},y=g.titleFont,m=g.titleXAnchor,b=g.titleYAnchor,x=g.titlePad,w="left"===m?"start":"right"===m?"end":"middle",M="top"===b?"hanging":"bottom"===b?"alphabetic":"middle"===b?"central":"auto",C=l+(null!==(n=null==x?void 0:x.l)&&void 0!==n?n:0)-(null!==(i=null==x?void 0:x.r)&&void 0!==i?i:0),k=(null!=s?s:Math.max(("number"==typeof(null==y?void 0:y.size)?y.size:13)+8,12))+(null!==(e=null==x?void 0:x.t)&&void 0!==e?e:0)-(null!==(r=null==x?void 0:x.b)&&void 0!==r?r:0),A=(0,o.Cl)({wrapContent:Vs,showBackground:!0,className:h,theme:p},v);return u.createElement(lv,(0,o.Cl)({},A,{content:a,textProps:{x:C,y:k,textAnchor:w,dominantBaseline:M,className:d,"aria-hidden":!0,style:pv(y)},maxWidth:c}))};gv.displayName="ChartTitle";var yv=(0,a.Z)(),mv=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return af([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)},e._closeCallout=function(){e.setState({showHover:!1})},e._focusCallback=function(t,n,i){e._currentHoverElement=i,e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,focusedArcId:n,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})},e._hoverCallback=function(t,n){var i,r,o,u;if(e._calloutAnchorPoint!==t){e._calloutAnchorPoint=t,e._currentHoverElement=n;var a=t.color;if(e.props.enableGradient){var l=Math.max((null===(r=null===(i=e.props.data)||void 0===i?void 0:i.chartData)||void 0===r?void 0:r.findIndex((function(n){return n.legend===t.legend})))||0,0);a=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(l,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0]}e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:a,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})}},e._onBlur=function(){e.setState({focusedArcId:""})},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({showHover:!1})},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendsHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ss(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},Ec(e),e.state={showHover:!1,value:"",legend:"",_width:e.props.width||200,_height:e.props.height||200,activeLegend:void 0,color:"",xCalloutValue:"",yCalloutValue:"",focusedArcId:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[]},e._hoverCallback=e._hoverCallback.bind(e),e._focusCallback=e._focusCallback.bind(e),e._hoverLeave=e._hoverLeave.bind(e),e._calloutId=p("callout"),e._uniqText=p("_Pie_"),e._emptyChartId=p("_DonutChart_empty"),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e;return t.width&&t.width!==n._width&&(i={_width:t.width}),t.height&&t.height!==n._height&&(e={_height:t.height-40}),(0,o.Cl)((0,o.Cl)({},i),e)},n.prototype.componentDidMount=function(){if(this._rootElem){var t=this._getTitleHeight();this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40-t})}},n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.hideLegend,r=void 0!==e&&e,a=this._addDefaultColors(null==i?void 0:i.chartData);this._classNames=yv(this.props.styles,{theme:this.props.theme,color:this.state.color,className:this.props.className});var l=this._createLegends(a.filter((function(t){return t.data>=0}))),s=this.props.hideLabels?0:80,c=this.props.hideLabels?0:40,d=this._getTitleHeight(),f=Math.min(this.state._width-s,this.state._height-c)/2,v=this._elevateToMinimums(a),h=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,v):"";return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n},onMouseLeave:this._handleChartMouseLeave},this.props.xAxisAnnotation&&u.createElement("text",{className:this._classNames.axisAnnotation,x:this.state._width/2,y:this.state._height-10,textAnchor:"middle"},this.props.xAxisAnnotation),u.createElement(td,{direction:dc.horizontal,handleTabKey:1,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,"aria-label":null==i?void 0:i.chartTitle,ref:function(n){return t._setViewBox(n)},width:this.state._width,height:this.state._height},!r&&(null==i?void 0:i.chartTitle)&&u.createElement(gv,{title:i.chartTitle,x:this.state._width/2,maxWidth:this.state._width-20,className:this._classNames.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:this._classNames.svgTooltip}),u.createElement("g",{transform:"translate(0, ".concat(d,")")},u.createElement(av,{width:this.state._width,height:this.state._height,outerRadius:f,innerRadius:this.props.innerRadius,data:v,enableGradient:this.props.enableGradient,roundCorners:this.props.roundCorners,onFocusCallback:this._focusCallback,hoverOnCallback:this._hoverCallback,hoverLeaveCallback:this._hoverLeave,uniqText:this._uniqText,onBlurCallback:this._onBlur,activeArc:this._getHighlightedLegend(),focusedArcId:this.state.focusedArcId||"",href:this.props.href,calloutId:this._calloutId,valueInsideDonut:this._toLocaleString(h),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels})))),u.createElement($n,(0,o.Cl)({target:this._currentHoverElement,alignTargetEdge:!0,isBeakVisible:!1,directionalHint:3,gapSpace:15,hidden:!(!this.props.hideTooltip&&this.state.showHover),id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.value,color:this.state.color,culture:this.props.culture})),!r&&u.createElement("div",{className:this._classNames.legendContainer,style:{marginTop:d}},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._getTitleHeight=function(){var t,n,i=this.props.data;return(null==i?void 0:i.chartTitle)?Math.max(("number"==typeof(null===(n=null===(t=this.props.titleStyles)||void 0===t?void 0:t.titleFont)||void 0===n?void 0:n.size)?this.props.titleStyles.titleFont.size:13)+20,36):0},n.prototype._elevateToMinimums=function(t){var n=0,i=[];return t.forEach((function(t){n+=t.data})),t.forEach((function(t){i.push(.01*n>t.data&&t.data>0?(0,o.Cl)((0,o.Cl)({},t),{data:.01*n,yAxisCalloutData:void 0===t.yAxisCalloutData?t.data.toLocaleString():t.yAxisCalloutData}):t)})),i},n.prototype._setViewBox=function(t){var n,i;if(null!==t){var e=t.parentElement?t.parentElement.clientWidth:this.state._width,r=t.parentElement&&(null===(n=t.parentElement)||void 0===n?void 0:n.offsetHeight)>this.state._height?null===(i=t.parentElement)||void 0===i?void 0:i.offsetHeight:this.state._height,o="0 0 ".concat(e," ").concat(r);t.setAttribute("viewBox",o)}},n.prototype._createLegends=function(t){var n=this;"sorted"===this.props.order&&t.sort((function(t,n){return n.data-t.data}));var i=t.map((function(t,i){var e,r,o=n.props.enableGradient?(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(i,0,null===(r=n.props.theme)||void 0===r?void 0:r.isInverted)[0]:t.color;return{title:t.legend,color:o,hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:t.legend})},onMouseOutAction:function(){n.setState({activeLegend:void 0})}}}));return u.createElement(bf,(0,o.Cl)({legends:i,centerLegends:!0,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;this.props.legendProps&&(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._hoverLeave=function(){},n.prototype._valueInsideDonut=function(t,n){var i=this,e=this._getHighlightedLegend();if(void 0===t||1!==e.length&&!this.state.showHover){if(e.length>0){var r=0;return n.forEach((function(t){e.includes(t.legend)&&(r+=t.data)})),r}return t}var o=n.find((function(t){return i._isLegendHighlighted(t.legend)}));return o?o.yAxisCalloutData?o.yAxisCalloutData:o.data:t},n.prototype._toLocaleString=function(t){var n=(0,Yn.c$)(t,this.props.culture,this.props.useUTC);return n?null==n?void 0:n.toString():t},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.filter((function(t){return t.data>0})).length>0)},n.defaultProps={innerRadius:0,hideLabels:!0},n}(u.Component),bv=(0,r.I)(mv,(function(t){var n=t.className,i=t.theme;return{root:[i.fonts.medium,"ms-DonutChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},n],chart:{boxSizing:"content-box",overflow:"visible",alignmentAdjust:"center",display:"block"},legendContainer:{paddingTop:"16px",width:"100%"},chartTitle:vv(i),axisAnnotation:cv(i,i.fonts.small),svgTooltip:hv(i)}}));function xv(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var e=i.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,[(e=e.matrixTransform(n.getScreenCTM().inverse())).x,e.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}function wv(t){return t[0]}function Mv(t){return t[1]}function Cv(t,n){var i=wf(!0),e=null,r=hl,o=null,u=jf(a);function a(a){var l,s,c,d=(a=xf(a)).length,f=!1;for(null==e&&(o=r(c=u())),l=0;l<=d;++l)!(l<d&&i(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+n(s,l,a));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?wv:wf(t),n="function"==typeof n?n:void 0===n?Mv:wf(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:wf(!!t),a):i},a.curve=function(t){return arguments.length?(r=t,null!=e&&(o=r(e)),a):r},a.context=function(t){return arguments.length?(null==t?e=o=null:o=r(e=t),a):e},a}var kv="4px 8px",Av=function(t,n){if(t){var i=Eo(t);return i?(i.opacity=Math.max(0,Math.min(1,n)),i.toString()):t}},Sv=function(t){var n=t.theme,i=t.className,e=function(t){return Av(t.semanticColors.bodyBackground,.8)}(n),r=n.semanticColors.bodyText,o=n.semanticColors.bodyDivider;return{root:[{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible",zIndex:1},i],annotation:[n.fonts.small,{position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",color:r,padding:kv,borderRadius:4,whiteSpace:"pre-wrap",zIndex:2,backgroundColor:e,boxShadow:n.effects.elevation4,border:"1px solid ".concat(o)}],annotationNoDefaults:[n.fonts.small,{position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",color:r,padding:kv,borderRadius:4,whiteSpace:"pre-wrap",zIndex:2}],connectorLayer:[{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"}],measurement:[{position:"absolute",visibility:"hidden",pointerEvents:"none"}],annotationContent:[{width:"100%",height:"100%",pointerEvents:"none"}],annotationForeignObject:[{overflow:"visible",pointerEvents:"none"}],annotationContentInteractive:[{pointerEvents:"auto"}],annotationForeignObjectInteractive:[{pointerEvents:"auto"}],connectorGroup:[{pointerEvents:"none"}]}},Lv=(0,a.Z)(),Vv="<".codePointAt(0),Dv=">".codePointAt(0),Nv=function(t,n){var i,e;return null!==(e=null!==(i=t.id)&&void 0!==i?i:"string"==typeof t.text||"number"==typeof t.text?String(t.text):void 0)&&void 0!==e?e:"annotation-".concat(n)},Ov=function(t,n){if(0!==n.length){var i=t[t.length-1];i&&"text"===i.type?i.content+=n:t.push({type:"text",content:n})}},Tv=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"<br />":"<".concat(t.tag,">").concat(Tv(t.children),"</").concat(t.tag,">")})).join("")},Ev=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"\n":Ev(t.children)})).join("")},Fv=function(t,n){return t.map((function(t,i){var e="".concat(n,"-").concat(i);if("text"===t.type)return u.createElement(u.Fragment,{key:e},t.content);if("br"===t.type)return u.createElement("br",{key:e});var r="b"===t.tag?"strong":"em";return u.createElement.apply(u,(0,o.fX)([r,{key:e}],Fv(t.children,e),!1))}))},Bv=function(t,n){var i,e=Fv(t,n);return e.length<=1?null!==(i=e[0])&&void 0!==i?i:null:e},Pv=function(t,n){var i=null==t?void 0:t(n);if("number"==typeof i&&!Number.isNaN(i))return t&&"function"==typeof t.bandwidth?i+t.bandwidth()/2:i},_v=function(t,n,i){return Math.max(n,Math.min(i,t))},Hv=u.memo((function(t){var n=t.annotations,i=t.theme,e=t.context,r=t.className,a=t.hideDefaultStyles,l=Lv(Sv,{theme:i,className:r}),s=u.useMemo((function(){return p("chart-annotation")}),[]),c=u.useState({}),d=c[0],f=c[1],v=u.useMemo((function(){return(null!=n?n:[]).map((function(t,n){return{annotation:t,key:Nv(t,n)}}))}),[n]);u.useEffect((function(){f((function(t){if(0===v.length)return 0===Object.keys(t).length?t:{};var n={};if(v.forEach((function(i){var e=i.key;t[e]&&(n[e]=t[e])})),Object.keys(n).length===Object.keys(t).length){for(var i=!0,e=0,r=Object.keys(n);e<r.length;e++){var o=r[e];if(n[o]!==t[o]){i=!1;break}}if(i)return t}return n}))}),[v]);var h=u.useCallback((function(t,n,i,e){f((function(r){var u,a=r[t];return a&&a.signature===e&&Math.abs(a.width-n)<.5&&Math.abs(a.height-i)<.5||0===n&&0===i?r:(0,o.Cl)((0,o.Cl)({},r),((u={})[t]={width:n,height:i,signature:e},u))}))}),[]),g=[],y=[],m=[];if(v.forEach((function(t){var n,r,s,c,f,v,p,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z,$,Y,X,G,U,q,Z=t.annotation,K=t.key,J=function(t,n){var i,e,r=t.coordinates,o=t.layout;if(r){var u=null!==(i=null==o?void 0:o.offsetX)&&void 0!==i?i:0,a=null!==(e=null==o?void 0:o.offsetY)&&void 0!==e?e:0,l={x:0,y:0};switch(r.type){case"data":var s=r.x,c=r.y,d=r.yAxis,f=void 0===d?"primary":d,v=n.xScale,h="secondary"===f?n.yScaleSecondary:n.yScalePrimary;if(!v||!h)return;var p=Pv(v,s instanceof Date?s.getTime():s),g=Pv(h,c instanceof Date?c.getTime():c);if("number"!=typeof p||"number"!=typeof g)return;l.x=p,l.y=g;break;case"relative":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+n.plotRect.width*r.x,l.y=n.plotRect.y+n.plotRect.height*r.y;break;case"pixel":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+r.x,l.y=n.plotRect.y+r.y;break;default:return}var y=l.x+u,m=l.y+a;return(null==o?void 0:o.clipToBounds)&&(y=_v(y,n.plotRect.x,n.plotRect.x+n.plotRect.width),m=_v(m,n.plotRect.y,n.plotRect.y+n.plotRect.height)),{anchor:l,point:{x:y,y:m}}}}(Z,e);if(J){var Q=function(t){var n,i;if(!t)return[];for(var e,r=function(t){var n={amp:"&",quot:'"',apos:"'",nbsp:" "},i=t.replace(/&(#x?[0-9a-f]+|#\d+|[a-z][\w-]*);/gi,(function(t,i){var e,r=i.toLowerCase();if("lt"===r||"gt"===r)return"&".concat(r,";");if(r.startsWith("#")){var o="x"===r[1],u=r.slice(o?2:1),a=Number.parseInt(u,o?16:10);return Number.isNaN(a)?t:a===Vv?"&lt;":a===Dv?"&gt;":String.fromCodePoint(a)}return null!==(e=n[r])&&void 0!==e?e:t}));return i.replace(/&lt;([^;]+)&gt;/gi,(function(t,n){switch(n.trim().replace(/\s+/g," ").toLowerCase()){case"b":return"<b>";case"/b":return"</b>";case"i":return"<i>";case"/i":return"</i>";case"br":case"br/":case"br /":return"<br />";default:return t}}))}(t),o=[],u=[{node:null}],a=function(){var t,n;return null!==(n=null===(t=u[u.length-1].node)||void 0===t?void 0:t.children)&&void 0!==n?n:o},l=/<\/?([a-z]+)\s*\/?\s*>/gi,s=0;null!==(e=l.exec(r));){var c=e[0],d=e[1].toLowerCase(),f=c.startsWith("</"),v=/\/\s*>$/.test(c);if(Ov(a(),r.slice(s,e.index)),s=e.index+c.length,"br"!==d||f)if("b"!==d&&"i"!==d||v)Ov(a(),c);else if(f){var h=u[u.length-1].node;u.length>1&&(null==h?void 0:h.tag)===d?u.pop():Ov(a(),c)}else{if(u.length-1>=5){Ov(a(),c);continue}var p={type:"element",tag:d,children:[]};a().push(p),u.push({node:p})}else a().push({type:"br"})}for(Ov(a(),r.slice(s));u.length>1;)if(p=u.pop().node){var g=null!==(i=null===(n=u[u.length-1].node)||void 0===n?void 0:n.children)&&void 0!==i?i:o;if(g[g.length-1]===p)g.pop();else{var y=g.indexOf(p);-1!==y&&g.splice(y,1)}Ov(g,"<".concat(p.tag,">").concat(Tv(p.children),"</").concat(p.tag,">"))}return o}(void 0===Z.text||null===Z.text?"":String(Z.text)),tt=JSON.stringify(Q),nt=Ev(Q),it=Z.layout,et=null!==(n=null==it?void 0:it.align)&&void 0!==n?n:"center",rt=null!==(r=null==it?void 0:it.verticalAlign)&&void 0!==r?r:"middle",ot=null!==(c=null===(s=Z.style)||void 0===s?void 0:s.opacity)&&void 0!==c?c:.8,ut=null!==(v=null===(f=Z.style)||void 0===f?void 0:f.backgroundColor)&&void 0!==v?v:i.semanticColors.bodyBackground,at=void 0!==(null===(p=Z.style)||void 0===p?void 0:p.backgroundColor)||void 0!==(null===(b=Z.style)||void 0===b?void 0:b.opacity),lt=(0,o.Cl)((0,o.Cl)({maxWidth:null==it?void 0:it.maxWidth},at?{backgroundColor:Av(ut,ot)}:!a&&{backgroundColor:Av(i.semanticColors.bodyBackground,.8)}),{borderColor:null===(x=Z.style)||void 0===x?void 0:x.borderColor,borderWidth:null===(w=Z.style)||void 0===w?void 0:w.borderWidth,borderStyle:null!==(C=null===(M=Z.style)||void 0===M?void 0:M.borderStyle)&&void 0!==C?C:(null===(k=Z.style)||void 0===k?void 0:k.borderColor)?"solid":void 0,borderRadius:null===(A=Z.style)||void 0===A?void 0:A.borderRadius,padding:null===(S=Z.style)||void 0===S?void 0:S.padding,boxShadow:null===(L=Z.style)||void 0===L?void 0:L.boxShadow}),st={color:null===(V=Z.style)||void 0===V?void 0:V.textColor,fontSize:null===(D=Z.style)||void 0===D?void 0:D.fontSize,fontWeight:null===(N=Z.style)||void 0===N?void 0:N.fontWeight,opacity:1};"number"!=typeof(null===(O=Z.style)||void 0===O?void 0:O.rotation)||Number.isNaN(Z.style.rotation)||(lt.transform="rotate(".concat(Z.style.rotation,"deg)"),lt.transformOrigin="50% 50%");var ct=function(t,n,i,e,r){return JSON.stringify({annotationContentSignature:t,containerStyle:n,contentStyle:i,layoutClassName:null!=e?e:"",styleClassName:null!=r?r:""})}(tt,lt,st,null==it?void 0:it.className,null===(T=Z.style)||void 0===T?void 0:T.className),dt=d[K],ft=(null==dt?void 0:dt.signature)===ct,vt=ft?dt:void 0,ht=Math.max(null!==(F=null!==(E=null==vt?void 0:vt.width)&&void 0!==E?E:null==it?void 0:it.maxWidth)&&void 0!==F?F:180,1),pt=Math.max(null!==(B=null==vt?void 0:vt.height)&&void 0!==B?B:60,1),gt="center"===et?-ht/2:"end"===et?-ht:0,yt="middle"===rt?-pt/2:"bottom"===rt?-pt:0,mt=J.point.x+gt,bt=J.point.y+yt,xt=!1!==(null==it?void 0:it.clipToBounds),wt=xt?e.plotRect.x:0,Mt=xt?e.plotRect.y:0,Ct=xt?e.plotRect.width:null!==(P=e.svgRect.width)&&void 0!==P?P:0,kt=xt?e.plotRect.height:null!==(_=e.svgRect.height)&&void 0!==_?_:0,At=Ct>0?wt+Ct-ht:mt,St=kt>0?Mt+kt-pt:bt,Lt=Ct>0?_v(mt,wt,Math.max(wt,At)):mt,Vt=kt>0?_v(bt,Mt,Math.max(Mt,St)):bt,Dt={x:Lt-gt,y:Vt-yt};if(Z.connector){var Nt=null!==(H=Z.connector.startPadding)&&void 0!==H?H:12,Ot=null!==(I=Z.connector.endPadding)&&void 0!==I?I:0,Tt=Math.max(Nt+Ot+6,Nt),Et=Dt.x-J.anchor.x,Ft=Dt.y-J.anchor.y;if((zt=Math.sqrt(Et*Et+Ft*Ft))<Tt){var Bt={x:0,y:-1},Pt=0===zt?Bt.x:Et/zt,_t=0===zt?Bt.y:Ft/zt,Ht=J.anchor.x+Pt*Tt+gt,It=J.anchor.y+_t*Tt+yt;Dt={x:(Lt=Ht=Ct>0?_v(Ht,wt,Math.max(wt,At)):Ht)-gt,y:(Vt=It=kt>0?_v(It,Mt,Math.max(Mt,St)):It)-yt}}}var Wt=(0,o.Cl)({position:"absolute",left:Lt,top:Vt,pointerEvents:"none",visibility:"hidden"},lt),Rt=a?l.annotationNoDefaults:l.annotation;if(ft||y.push(u.createElement("div",{key:"".concat(K,"-measurement"),ref:function(t){if(t){var n=t.getBoundingClientRect();0===n.width&&0===n.height||h(K,n.width,n.height,ct)}},className:j(Rt,l.measurement,null==it?void 0:it.className,null===(W=Z.style)||void 0===W?void 0:W.className),style:Wt,"aria-hidden":!0,"data-annotation-key":K,"data-chart-annotation-measurement":"true"},u.createElement("div",{className:j(l.annotationContent,null==it?void 0:it.className,null===(R=Z.style)||void 0===R?void 0:R.className),style:st},Bv(Q,"".concat(K,"-measurement"))))),g.push(u.createElement("foreignObject",{key:"".concat(K,"-annotation"),x:Lt,y:Vt,width:ht,height:pt,className:j(l.annotationForeignObject),"data-annotation-key":K},u.createElement("div",{className:j(Rt,null==it?void 0:it.className,null===(z=Z.style)||void 0===z?void 0:z.className),style:lt,"data-annotation-key":K},u.createElement("div",{className:j(l.annotationContent,null===($=Z.style)||void 0===$?void 0:$.className),style:st,role:null!==(X=null===(Y=Z.accessibility)||void 0===Y?void 0:Y.role)&&void 0!==X?X:"note","aria-label":null!==(U=null===(G=Z.accessibility)||void 0===G?void 0:G.ariaLabel)&&void 0!==U?U:nt||void 0,"aria-describedby":null===(q=Z.accessibility)||void 0===q?void 0:q.ariaDescribedBy,"data-chart-annotation":"true","data-annotation-key":K},Bv(Q,"".concat(K,"-content")))))),Z.connector){var zt,jt=Z.connector,$t=jt.startPadding,Yt=(Nt=void 0===$t?12:$t,jt.endPadding),Xt=(Ot=void 0===Yt?0:Yt,jt.strokeColor),Gt=void 0===Xt?function(t){return t.palette.neutralPrimary}(i):Xt,Ut=jt.strokeWidth,qt=void 0===Ut?2:Ut,Zt=jt.dashArray,Kt=jt.arrow,Jt=void 0===Kt?"end":Kt,Qt=(Et=J.anchor.x-Dt.x,Ft=J.anchor.y-Dt.y,Pt=Et/(zt=Math.sqrt(Et*Et+Ft*Ft)||1),_t=Ft/zt,Math.max(1,Math.min(ht,pt))),tn=Nt>0?1.25*Nt:24,nn=.6*zt,en=_v(.35*Qt,6,Math.min(24,tn,nn)),rn=_v(qt,1,en/2),on={x:Dt.x+Pt*Nt,y:Dt.y+_t*Nt},un={x:J.anchor.x-Pt*Ot,y:J.anchor.y-_t*Ot};m.push({key:"".concat(K,"-connector"),start:on,end:un,strokeColor:Gt,strokeWidth:qt,dashArray:Zt,arrow:Jt,markerSize:en,markerStrokeWidth:rn})}}})),0===g.length&&0===m.length)return null;var b=e.svgRect.width||1,x=e.svgRect.height||1,w=[],M=function(t,n,i,e){var r="".concat(s,"-").concat(n,"-").concat(w.length),o=i/2,a="end"===n?i:0,l="M0 0 L ".concat(i," ").concat(o," L0 ").concat(i," Z"),c="M ".concat(i," 0 L0 ").concat(o," L ").concat(i," ").concat(i," Z"),d="end"===n?l:c;return w.push(u.createElement("marker",{key:r,id:r,markerWidth:i,markerHeight:i,viewBox:"0 0 ".concat(i," ").concat(i),refX:a,refY:o,orient:"auto",markerUnits:"userSpaceOnUse"},u.createElement("path",{d:d,fill:t,stroke:t,strokeWidth:e,strokeLinecap:"round",strokeLinejoin:"round"}))),r},C=m.map((function(t){var n,i;return"start"!==t.arrow&&"both"!==t.arrow||(n=M(t.strokeColor,"start",t.markerSize,t.markerStrokeWidth)),"end"!==t.arrow&&"both"!==t.arrow||(i=M(t.strokeColor,"end",t.markerSize,t.markerStrokeWidth)),u.createElement("line",{key:t.key,x1:t.start.x,y1:t.start.y,x2:t.end.x,y2:t.end.y,stroke:t.strokeColor,strokeWidth:t.strokeWidth,strokeDasharray:t.dashArray,strokeLinecap:"round",markerStart:n?"url(#".concat(n,")"):void 0,markerEnd:i?"url(#".concat(i,")"):void 0})})),k=m.length>0||g.length>0;return u.createElement("div",{className:l.root,role:"presentation","data-chart-annotation-layer":"true"},k&&u.createElement("svg",{className:l.connectorLayer,width:"100%",height:"100%",viewBox:"0 0 ".concat(b," ").concat(x),preserveAspectRatio:"none","data-chart-annotation-svg":"true"},w.length>0&&u.createElement("defs",null,w),C.length>0&&u.createElement("g",{"aria-hidden":"true",className:l.connectorGroup},C),g),y)}));Hv.displayName="ChartAnnotationLayer";var Iv=(0,a.Z)(),Wv=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),Rv=function(t){function n(n){var i=t.call(this,n)||this;return i.minLegendContainerHeight=32,i._isRtl=(0,l.jI)(),i._isFirstRender=!0,i._removalValueForTextTuncate=0,i._yAxisTickText=[],i.isIntegralDataset=!0,i.calculateMaxYAxisLabelLength=function(t){return Ds(i._yAxisTickText.map((function(t){return n=t,i.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,i.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},i._multiValueCallout=function(t){var n=i._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:i._classNames.calloutContentRoot},u.createElement("div",{className:i._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:i._classNames.calloutContentX},$s(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,i.props.culture,i.props.useUTC))),u.createElement("div",{className:i._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,e,r){var a=e+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},$s(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(e),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),i._getCalloutContent(t,e,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:i._classNames.descriptionMessage},t.descriptionMessage)))},i._getData=function(t,n,e){i.props.getGraphData&&i.props.getGraphData(t,n,i.state.containerHeight-i._removalValueForTextTuncate,i.state.containerWidth,i.xAxisElement,i.yAxisElement,e)},i._onChartLeave=function(){i.props.onChartMouseLeave&&i.props.onChartMouseLeave()},i._calculateChartMinWidth=function(){var t=i._calcMaxLabelWidthWithTransform(i._tickLabels)+10,n=i.margins.left+i.margins.right+t*(i._tickLabels.length-1);return[ts.GroupedVerticalBarChart,ts.VerticalBarChart,ts.VerticalStackedBarChart].includes(i.props.chartType)&&(n+=16),n},i._getChartDescription=function(){return(i.props.chartTitle||"Chart. ")+i._getAxisTitle("X",i.props.xAxisTitle,i.props.xAxisType)+i._getAxisTitle("Y",i.props.yAxisTitle,i.props.yAxisType||is.NumericAxis)+(i.props.secondaryYScaleOptions?i._getAxisTitle("secondary Y",i.props.secondaryYAxistitle,is.NumericAxis):"")},i._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===ns.StringAxis||i===is.StringAxis?"categories":i===ns.DateAxis||i===is.DateAxis?"time":"values"))+". "},i._calcMaxLabelWidthWithTransform=function(t){if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===ns.StringAxis){var n=Ds(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(i.props.showXAxisLablesTooltip){var e=t.map((function(t){var n=i.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),r=Ds(e,".".concat(i._classNames.xAxis," text"));return Math.ceil(r)}if(i.props.wrapXAxisLables){var o=[];t.forEach((function(t){o.push.apply(o,t.toString().split(/\s+/))}));var u=Ds(o,".".concat(i._classNames.xAxis," text"));return Math.max(Math.ceil(u),10)}var a=Ds(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(a)},i._transformXAxisLabels=function(){var t,n,e;if(i._removalValueForTextTuncate=0,i.props.wrapXAxisLables||i.props.showXAxisLablesTooltip){var r=void 0;i.props.xAxisType===ns.StringAxis&&(r=((null===(t=i.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?i._xScale.step():i.state.containerWidth);var o={node:i.xAxisElement,xAxis:i._xScale,showXAxisLablesTooltip:i.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:i.props.noOfCharsToTruncate||4,width:r,container:i.chartContainer};i._removalValueForTextTuncate=null!==(n=Ls(o))&&void 0!==n?n:0}if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===ns.StringAxis){var u=null!==(e=function(t){var n=t.node,i=t.xAxis;if(null!==n&&null!==i){var e=0,r=[];sl(n).call(i).selectAll(".tick").each((function(){var t=this.getAttribute("transform");if(-1===(null==t?void 0:t.indexOf("rotate"))){var n=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");2===n.length&&(r.push(n[0]),this.setAttribute("transform","translate(".concat(n[0],",0)rotate(-45)")))}var i=this.getBoundingClientRect(),o=i&&i.height;o>e&&(e=o)}));var o=0;return sl(n).call(i).selectAll(".tick").each((function(){r.length>o&&(this.setAttribute("transform","translate(".concat(r[o],",").concat(e/2,")rotate(-45)")),o+=1)})),Math.floor(e/1.414)}}({node:i.xAxisElement,xAxis:i._xScale}))&&void 0!==e?e:0;i._removalValueForTextTuncate=u+i.margins.bottom}},i._calcMargins=function(){var t=i._getDefaultMargins();return t=i._applyTitleMargins(t),t=i._applyAnnotationMargins(t),i._isRtl&&(t=i._swapRtlMargins(t)),(0,o.Cl)((0,o.Cl)({},t),i.props.margins)},i._getDefaultMargins=function(){return{top:20,bottom:35,left:Math.max(40,i.state.startFromX+20),right:i.props.secondaryYScaleOptions?40:20}},i._applyTitleMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisTitle&&""!==i.props.xAxisTitle&&(n.bottom+=20),void 0!==i.props.yAxisTitle&&""!==i.props.yAxisTitle&&(n.left+=24),void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle&&(n.right+=24),n},i._applyAnnotationMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisAnnotation&&""!==i.props.xAxisAnnotation&&(n.top+=20),void 0===i.props.yAxisAnnotation||""===i.props.yAxisAnnotation||void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle||(n.right+=24),n},i._swapRtlMargins=function(t){return(0,o.Cl)((0,o.Cl)({},t),{left:t.right,right:t.left})},i.state={containerHeight:0,containerWidth:0,_width:i.props.width||600,_height:i.props.height||350,startFromX:0},i.idForGraph=p("chart_"),i.idForDefaultTabbableElement=p("defaultTabbableElement_"),i._tooltipId=p("tooltip_"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),this.props.showYAxisLables){var t=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==t&&this.setState({startFromX:t})}else 0!==this.state.startFromX&&this.setState({startFromX:0});this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0}))},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.componentDidUpdate=function(t){if(t.height===this.props.height&&t.width===this.props.width||this._fitParentContainer(),this.props.showYAxisLables){var n=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==n&&this.setState({startFromX:n})}else 0!==this.state.startFromX&&this.setState({startFromX:0});t.points!==this.props.points&&(this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0})))},n.prototype.render=function(){var t,n,i,e,r,a,l,s,c,d,f,v,h,p=this,g=this.props,y=g.calloutProps,m=g.points,b=g.chartType,x=g.chartHoverProps,w=g.svgFocusZoneProps,M=g.svgProps,C=g.culture,k=g.dateLocalizeOptions,A=g.timeFormatLocale,S=g.customDateTimeFormatter;this.props.parentRef&&this._fitParentContainer(),this.margins=this._calcMargins(),this.props.getmargins&&this.props.getmargins(this.margins),this._classNames=Iv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,enableReflow:this.props.enableReflow});var L,V,D,N,O,T,E,F=null,B=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var P=(0,o.Cl)({domainNRangeValues:this.props.getDomainNRangeValues(m,this.props.getDomainMargins?this.props.getDomainMargins(this.state.containerWidth):this.margins,this.state.containerWidth,b,this._isRtl,this.props.xAxisType,this.props.barwidth,this.props.tickValues),containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,margins:this.margins,xAxisElement:this.xAxisElement,showRoundOffXTickValues:null===(r=this.props.showRoundOffXTickValues)||void 0===r||r,xAxisCount:this.props.xAxisTickCount,xAxistickSize:this.props.xAxistickSize,tickPadding:this.props.tickPadding||this.props.showXAxisLablesTooltip?5:10,xAxisPadding:this.props.xAxisPadding,xAxisInnerPadding:this.props.xAxisInnerPadding,xAxisOuterPadding:this.props.xAxisOuterPadding,containerWidth:this.state.containerWidth,hideTickOverlap:!this.props.rotateXAxisLables&&"auto"!==(null===(a=this.props.xAxis)||void 0===a?void 0:a.tickLayout)&&this.props.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform,xMinValue:this.props.xMinValue,xMaxValue:this.props.xMaxValue},this.props.xAxis),_=void 0,H=void 0,I=void 0;switch(this.props.xAxisType){case ns.NumericAxis:_=(t=xs(P,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,H=t.tickValues,I=t.tickLabels;break;case ns.DateAxis:_=(n=function(t,n,i,e,r,o,u,a){var l=t.domainNRangeValues,s=t.xAxisElement,c=t.tickPadding,d=void 0===c?6:c,f=t.xAxistickSize,v=void 0===f?6:f,h=t.xAxisCount,p=t.hideTickOverlap,g=t.calcMaxLabelWidth,y=t.tickStep,m=t.tick0,b=t.tickText,x=u?Au():ku();x.domain([l.dStartValue,l.dEndValue]).range([l.rStartValue,l.rEndValue]).nice();var w=null!=h?h:6,M=100,C=-1,k=r?$e(r):void 0;x.ticks().forEach((function(t){var n=ws(t,u);n>C&&(C=n),n<M&&(M=n)}));var A=null!=e?e:(0,Yn.c2)(M,C),S=function(t,n,i,e){var r="%c",o="%a %d, %X",u="%b %d, %X",a="%-I:%M %p",l="%b %d, %-I:%M %p",s="%b %d, %-I %p",c="%b %d";return(i?e?i.utcFormat:i.format:e?Ge:Xe)([[".%L",":%S.%L","%M:%S.%L","%-I:%M:%S.%L %p",o,u,u,r],[r,":%S","%-I:%M:%S","%X",o,u,u,r],[r,r,a,a,"%a %d, %-I:%M %p",l,l,"%x, %-I:%M %p"],[r,r,r,"%-I %p","%a %d, %-I %p",s,s,"%x, %-I %p"],[r,r,r,r,"%a %d",c,c,"%x"],[r,r,r,r,r,c,c,"%x"],[r,r,r,r,r,r,"%B","%b %Y"],[r,r,r,r,r,r,r,"%Y"]][t][n])}(M,C,k,u),L=function(t,e){return n.tickValues&&b&&void 0!==b[e]?b[e]:o?o(t):r?S(t):void 0===i&&n.tickFormat?u?Ge(n.tickFormat)(t):Xe(n.tickFormat)(t):(0,Yn.Yn)(t,i,u,!1,A)};if(p){var V=g(x.ticks().map(L))+40,D=x.range(),N=D[0],O=D[1];w=Math.min(Math.max(1,Math.floor(Math.abs(O-N)/V)),10)}var T,E=ni(x).tickSize(v).tickPadding(d).ticks(w).tickFormat(L);[ts.GanttChart].includes(a)&&E.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?T=n.tickValues:y&&(T=xc(y,m,x.domain(),u)),T&&E.tickValues(T),s&&sl(s).call(E).selectAll("text").attr("aria-hidden","true");var F=null!=T?T:x.ticks(w);return{xScale:x,tickValues:F,tickLabels:F.map(E.tickFormat())}}(P,this.props.tickParams,C,k,A,S,this.props.useUTC,this.props.chartType)).xScale,H=n.tickValues,I=n.tickLabels;break;case ns.StringAxis:i=function(t,n,i){var e,r=t.domainNRangeValues,o=t.xAxistickSize,u=void 0===o?6:o,a=t.tickPadding,l=void 0===a?10:a,s=t.xAxisPadding,c=void 0===s?.1:s,d=t.xAxisInnerPadding,f=t.xAxisOuterPadding,v=t.containerWidth,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickText,y=Tu().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),m=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var b=[],x=m.map((function(t){return p([t])})),w=0,M=v,C=1,k=y.range();k[1]-k[0]<0&&(w=v,M=0,C=-1);for(var A=m.length-1;A>=0;A--){var S=y(m[A]);C*(S-C*x[A]/2-w)>=0&&C*(S+C*x[A]/2-M)<=0&&(b.push(m[A]),M=S-C*(x[A]/2+10))}m=b=b.reverse()}var L=ni(y).tickSize(u).tickPadding(l).tickValues(m).tickFormat((function(t,i){return n.tickValues&&g&&void 0!==g[i]?g[i]:t}));return t.xAxisElement&&sl(t.xAxisElement).call(L).selectAll("text").attr("aria-hidden","true"),{xScale:y,tickValues:m,tickLabels:m.map(L.tickFormat())}}(P,this.props.tickParams,this.props.datasetForXAxisDomain),_=i.xScale,H=i.tickValues,I=i.tickLabels;break;default:_=(e=xs(P,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,H=e.tickValues,I=e.tickLabels}this._xScale=_,this._tickLabels=I,"auto"===(null===(l=this.props.xAxis)||void 0===l?void 0:l.tickLayout)?this._removalValueForTextTuncate=function(t,n,i,e,r,o){for(var u,a=!1,l=!1,s=[],c=i.range(),d=c[0],f=c[1]-d<0,v=f?r:0,h=f?0:r,p=function(n){var e;return(null!==(e=i(t[n]))&&void 0!==e?e:0)+("bandwidth"in i?i.bandwidth()/2:0)},g=function(t){return oc(t,ys,o).width},y=0;y<t.length;y++){var m=p(y),b=Math.abs(y>0?(m-p(y-1))/2:m-v),x=Math.abs(y+1<t.length?(p(y+1)-m)/2:h-m),w=2*Math.min(b,x)-8,M=n[y],C=g(M);s.push(w),C>w&&(Math.max.apply(Math,M.split(/\s+/).map((function(t){return g(t)})))<=w?a=!0:l=!0)}return l?function(t,n,i,e,r,o){if(!e)return 0;var u=12,a=i.range(),l=a[0],s=a[1]-l<0,c=s?r:0,d=s?0:r,f=function(n){var e;return(null!==(e=i(t[n]))&&void 0!==e?e:0)+("bandwidth"in i?i.bandwidth()/2:0)},v=function(t){return oc(t,ys,o)};return sl(e).selectAll(".tick text").each((function(i,e){var r=f(e),o=Math.abs(e>0?r-f(e-1):r-c),a=Math.abs(e+1<t.length?f(e+1)-r:d-r),l=2*Math.min(o,a)-8,s=n[e],h=sl(this).text(null).attr("data-full",s),p=h.attr("y"),g=parseFloat(h.attr("dy"));h.append("tspan").attr("x",0).attr("y",p).attr("dy",(e%2==1?1.1:0)+g+"em").text(Mc(s,l,(function(t){return v(t).width}))),u=Math.max(u,v(s).height)})),t.length>1?u:0}(t,n,i,e,r,o):a&&null!==(u=Ls({node:e,xAxis:i,noOfCharsToTruncate:100,showXAxisLablesTooltip:!1,width:s,container:o}))&&void 0!==u?u:0}(H,I,_,this.xAxisElement,this.state.containerWidth,this.chartContainer):this._transformXAxisLabels();var W=(0,o.Cl)({margins:this.props.getYDomainMargins?this.props.getYDomainMargins(this.state.containerHeight):this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElement,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:this.props.yMinValue||0,yMaxValue:this.props.yMaxValue||0,tickPadding:10,maxOfYVal:this.props.maxOfYVal,yMinMaxValues:this.props.getMinMaxOfYAxis(m,this.props.yAxisType),yAxisPadding:this.props.yAxisPadding||0,tickValues:this.props.yAxisTickValues},this.props.yAxis),R={yAxisDomainValues:[],yAxisTickText:[]};if(this.props.yAxisType&&this.props.yAxisType===is.StringAxis)L=this.props.createStringYAxis(W,this.props.stringDatasetForYAxisDomain,this._isRtl,R,this.props.barwidth,this.props.chartType);else{if(null===(s=this.props)||void 0===s?void 0:s.secondaryYScaleOptions){var z={margins:this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElementSecondary,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:(null===(c=this.props.secondaryYScaleOptions)||void 0===c?void 0:c.yMinValue)||0,yMaxValue:null!==(f=null===(d=this.props.secondaryYScaleOptions)||void 0===d?void 0:d.yMaxValue)&&void 0!==f?f:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(m,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};V=this.props.createYAxis(z,this._isRtl,R,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}L=this.props.createYAxis(W,this._isRtl,R,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}this._yAxisTickText=R.yAxisTickText,this.props.getAxisData&&this.props.getAxisData(R);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showXAxisLablesTooltip||"auto"===(null===(v=this.props.xAxis)||void 0===v?void 0:v.tickLayout)){var j=this.xAxisElement?sl(this.xAxisElement).call(_):null,$={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:j,container:this.chartContainer};j&&Ns($)}if(this.props.showYAxisLablesTooltip){L&&(D=this.yAxisElement,N=L,O=this.props.noOfCharsToTruncate||4,T=this.props.showYAxisLablesTooltip||!1,E=this._isRtl,null!==D&&sl(D).call(N).selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i=E?"...".concat(t.text().slice(0,O)):"".concat(t.text().slice(0,O),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy")),a=t.text(null).attr("data-full",n).append("tspan").attr("x",o).attr("y",r).attr("dy",u+"em");T&&a.text(e>O?i:n)})));var Y=this.yAxisElement?sl(this.yAxisElement).call(L):null,X={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:Y,container:this.chartContainer};Y&&Ns(X)}this._getData(_,L,V),B=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:_,yScalePrimary:L,yScaleSecondary:V})),!this.props.hideTooltip&&y.isCalloutVisible&&(F=this._generateCallout(y,x))}var G,U={width:this.state.containerWidth,height:this.state.containerHeight},q=Math.max(0,U.width-this.margins.left-this.margins.right),Z=Math.max(0,U.height-this.margins.top-this.margins.bottom-this._removalValueForTextTuncate),K={x:this.margins.left,y:this.margins.top,width:q,height:Z},J=null!==(h=this.props.annotations)&&void 0!==h?h:[],Q=J.length>0,tt=Q?{plotRect:K,svgRect:U,isRtl:this._isRtl,xScale:this._xScale,yScalePrimary:L,yScaleSecondary:V}:void 0;G=this.props.focusZoneDirection===dc.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:dc.horizontal;var nt=U.width-this.margins.left-this.margins.right-16,it=U.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-16,et=this.margins.top+8+it/2,rt=this._isRtl?U.width-8:16,ot=this._isRtl?16:U.width-8,ut={wrapContent:Vs,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){p.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(td,(0,o.Cl)({direction:G,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},w),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:U.width,height:U.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},qs(M)),u.createElement("g",{ref:function(t){p.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat(U.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement(lv,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+8+nt/2,y:U.height-8,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:nt},ut)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&function(){var t,n,i,e,r,a=null!==(t=p.props.titleStyles)&&void 0!==t?t:{},l=a.titleFont,s=a.titleXAnchor,c=a.titleYAnchor,d=a.titlePad,f="number"==typeof(null==l?void 0:l.size)?l.size:13,v=null!==(n=null==d?void 0:d.l)&&void 0!==n?n:0,h=null!==(i=null==d?void 0:d.r)&&void 0!==i?i:0,g=null!==(e=null==d?void 0:d.t)&&void 0!==e?e:0,y=null!==(r=null==d?void 0:d.b)&&void 0!==r?r:0,m=("left"===s?p.margins.left+8:"right"===s?p.margins.left+8+nt:p.margins.left+8+nt/2)+v-h,b=Math.max(f+8,12)+g-y,x="left"===s?"start":"right"===s?"end":"middle",w="top"===c?"hanging":"bottom"===c?"alphabetic":"middle"===c?"central":"auto";return u.createElement(lv,(0,o.Cl)({content:p.props.xAxisAnnotation,textProps:{x:m,y:b,className:p._classNames.axisAnnotation,textAnchor:x,dominantBaseline:w,"aria-hidden":!0,style:pv(l)},maxWidth:nt},ut))}(),u.createElement("g",{ref:function(t){p.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?U.width-this.margins.right:this.margins.left,", 0)"),className:this._classNames.yAxis}),this.props.secondaryYScaleOptions&&u.createElement("g",null,u.createElement("g",{ref:function(t){p.yAxisElementSecondary=t},id:"yAxisGElementSecondary".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?this.margins.left:U.width-this.margins.right,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement(lv,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:ot,y:et,textAnchor:"middle",transform:"rotate(-90, ".concat(ot,", ").concat(et,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:it},ut))),B,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement(lv,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:rt,y:et,textAnchor:"middle",transform:"rotate(-90, ".concat(rt,", ").concat(et,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:it},ut)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement(lv,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:ot,y:et,textAnchor:"middle",transform:"rotate(-90, ".concat(ot,", ").concat(et,")"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:it},ut))),Q&&tt&&u.createElement(Hv,{annotations:J,context:tt,theme:this.props.theme,className:this._classNames.annotationLayer})),!this.props.hideLegend&&u.createElement("div",{ref:function(t){p.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),F&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},F))},n.prototype._generateCallout=function(t,n){return u.createElement($n,(0,o.Cl)({hidden:!(!this.props.hideTooltip&&t.isCalloutVisible),shouldUpdateWhenHidden:!0},t),this.props.customizedCallout&&this.props.customizedCallout,!this.props.customizedCallout&&this.props.isCalloutForStack&&this._multiValueCallout(t),!this.props.customizedCallout&&!this.props.isCalloutForStack&&u.createElement(Wv,(0,o.Cl)({XValue:t.XValue,Legend:t.legend,YValue:t.YValue,color:t.color,culture:this.props.culture},n)))},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r,o=e?{}:{marginRight:"16px"},a=void 0!==t.index&&-1!==t.index,l=Iv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,lineColor:t.color,toDrawShape:a}),s=this.props,c=s.culture,d=s.useUTC,f=(0,Yn.c$)(t.y,c,d);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var v=t.yAxisCalloutData;return u.createElement("div",{style:o},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),Object.keys(v).map((function(t){return u.createElement("div",{key:t,className:l.calloutBlockContainer},u.createElement("div",{className:l.calloutlegendText},(0,Yn.c$)(t,c,d)),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(v[t],c,d)))})))}return u.createElement("div",{style:i?o:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:l.calloutBlockContainer},a&&u.createElement(of,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:Ws[t.index%Object.keys(js).length]}),u.createElement("div",null,u.createElement("div",{className:l.calloutlegendText}," ",t.legend),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:null!==(r=t.y)&&void 0!==r?r:t.data,c,d)))))},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n;if(t.props.hideLegend)n=0;else{var r=t.legendContainer&&getComputedStyle(t.legendContainer);n=(t.legendContainer&&t.legendContainer.getBoundingClientRect().height||t.minLegendContainerHeight)+parseFloat(r&&r.marginTop||"0")+parseFloat(r&&r.marginBottom||"0")}if(t.props.parentRef||t.chartContainer){var o=t.props.parentRef?t.props.parentRef:t.chartContainer,u=t.props.enableReflow&&!t._isFirstRender?Math.max(o.getBoundingClientRect().width,t._calculateChartMinWidth()):o.getBoundingClientRect().width,a=o.getBoundingClientRect().height>n?o.getBoundingClientRect().height:350;(i!==u||e!==a-n)&&t.setState({containerWidth:u,containerHeight:a-n})}}))},n}(u.Component),zv=function(){var t,n=(0,s.z)();return!!(null===(t=null==n?void 0:n.navigator)||void 0===t?void 0:t.userAgent)&&n.navigator.userAgent.indexOf("rv:11.0")>-1}(),jv=(0,r.I)(Rv,(function(t){var n,i,e,r,u,a,l,s,c,d=t.className,f=t.theme,v=t.isRtl,h=t.shouldHighlight,p=t.href,g=t.lineColor,y=void 0===g?"transparent":g,m=t.toDrawShape,b=t.enableReflow,x=f.fonts;return{root:[f.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden",position:"relative"},d],chartWrapper:(0,o.Cl)({position:"relative"},b?{overflow:"auto"}:{}),plotContainer:{position:"relative",width:"100%",height:"100%"},axisTitle:cv(f,f.fonts.xSmall),axisAnnotation:cv(f,f.fonts.small),xAxis:[{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}],line:{opacity:.2,stroke:f.semanticColors.bodyText,width:"1px",selectors:(i={},i[It.up]={opacity:.1,stroke:"CanvasText"},i)},path:{display:"none"}}},gs],yAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(e={},e[It.up]={fill:"CanvasText"},e)}],path:{display:"none"},line:{opacity:.2,stroke:f.semanticColors.bodyText,selectors:(r={},r[It.up]={opacity:.1,stroke:"CanvasText"},r)},g:[v&&!zv&&{textAnchor:"end"}]}},opacityChangeOnHover:{opacity:h?"":"0.1",cursor:p?"pointer":"default"},legendContainer:[{marginTop:"8px",marginLeft:"20px"}],calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:f.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",opacity:"0.85",color:f.semanticColors.bodySubtext})],calloutBlockContainer:[f.fonts.mediumPlus,{marginTop:"13px",color:f.semanticColors.bodyText},!m&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(y),paddingLeft:"8px"},m&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:f.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},x.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[f.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:f.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(f.semanticColors.menuDivider)}],tooltip:sv(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c),annotationLayer:{pointerEvents:"none"}}})),$v=(0,an.J5)((function(t){return(0,an.J5)((function(n){var i=(0,an.J5)((function(t){return function(i){return n(i,t)}}));return function(e,r){return t(e,r?i(r):n)}}))}));function Yv(t,n){return $v(t)(n)}var Xv=function(t){if(void 0===t)return 0;var n=0;return"scrollTop"in t?n=t.scrollTop:"scrollY"in t&&(n=t.scrollY),Math.ceil(n)},Gv=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},Uv="spacer-",qv=1/3,Zv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},Kv=function(t){return t.getBoundingClientRect()},Jv=Kv,Qv=Kv,th=function(t){function n(n){var i=t.call(this,n)||this;return i._root=u.createRef(),i._surface=u.createRef(),i._pageRefs={},i._getDerivedStateFromProps=function(t,n){return t.items!==i.props.items||t.renderCount!==i.props.renderCount||t.startIndex!==i.props.startIndex||t.version!==i.props.version||!n.hasMounted&&i.props.renderEarly&&(0,Dn.S)()?(i._resetRequiredWindows(),i._requiredRect=null,i._measureVersion++,i._invalidatePageCache(),i._updatePages(t,n)):n},i._onRenderRoot=function(t){var n=t.rootRef,i=t.surfaceElement,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderSurface=function(t){var n=t.surfaceRef,i=t.pageElements,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderPage=function(t,n){for(var e,r=i.props,a=r.onRenderCell,l=r.onRenderCellConditional,s=r.role,c=t.page,d=c.items,f=void 0===d?[]:d,v=c.startIndex,h=(0,o.Tt)(t,["page"]),p=void 0===s?"listitem":"presentation",g=[],y=0;y<f.length;y++){var m=v+y,b=f[y],x=i.props.getKey?i.props.getKey(b,m):b&&b.key;null==x&&(x=m);var w=null!=l?l:a,M=null!==(e=null==w?void 0:w(b,m,i.props.ignoreScrollingState?void 0:i.state.isScrolling))&&void 0!==e?e:null;l&&!M||g.push(u.createElement("div",{role:p,className:"ms-List-cell",key:x,"data-list-index":m,"data-automationid":"ListCell"},M))}return u.createElement("div",(0,o.Cl)({},h),g)},Ec(i),i.state={pages:[],isScrolling:!1,getDerivedStateFromProps:i._getDerivedStateFromProps,hasMounted:!1},i._estimatedPageHeight=0,i._totalEstimates=0,i._requiredWindowsAhead=0,i._requiredWindowsBehind=0,i._measureVersion=0,i._cachedPageHeights={},i._estimatedPageHeight=0,i._focusedIndex=-1,i._pageCache={},i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){return n.getDerivedStateFromProps(t,n)},Object.defineProperty(n.prototype,"pageRefs",{get:function(){return this._pageRefs},enumerable:!1,configurable:!0}),n.prototype.scrollToIndex=function(t,n,i){void 0===i&&(i=0);for(var e=this.props.startIndex,r=e+this._getRenderCount(),o=this._allowedRect,u=0,a=1,l=e;l<r;l+=a){var s=this._getPageSpecification(this.props,l,o),c=s.height;if(a=s.itemCount,l<=t&&l+a>t){if(n&&this._scrollElement){for(var d=Qv(this._scrollElement),f=Xv(this._scrollElement),v={top:f,bottom:f+d.height},h=t-l,p=0;p<h;++p)u+=n(l+p);var g=u+n(t);switch(i){case 1:return void Gv(this._scrollElement,u);case 2:return void Gv(this._scrollElement,g-d.height);case 3:return void Gv(this._scrollElement,(u+g-d.height)/2)}if(u>=v.top&&g<=v.bottom)return;u<v.top||g>v.bottom&&(u=g-d.height)}return void(this._scrollElement&&Gv(this._scrollElement,u))}u+=c}},n.prototype.getStartItemIndexInView=function(t){for(var n=0,i=this.state.pages||[];n<i.length;n++){var e=i[n];if(!e.isSpacer&&(this._scrollTop||0)>=e.top&&(this._scrollTop||0)<=e.top+e.height){if(!t){var r=Math.floor(e.height/e.itemCount);return e.startIndex+Math.floor((this._scrollTop-e.top)/r)}for(var o=0,u=e.startIndex;u<e.startIndex+e.itemCount;u++){if(r=t(u),e.top+o<=this._scrollTop&&this._scrollTop<e.top+o+r)return u;o+=r}}}return 0},n.prototype.componentDidMount=function(){this._async=new Nt(this),this._events=new yd(this),this._onAsyncScrollDebounced=this._async.debounce(this._onAsyncScroll,100,{leading:!1,maxWait:500}),this._onAsyncIdleDebounced=this._async.debounce(this._onAsyncIdle,200,{leading:!1}),this._onAsyncResizeDebounced=this._async.debounce(this._onAsyncResize,16,{leading:!1}),this._onScrollingDoneDebounced=this._async.debounce(this._onScrollingDone,500,{leading:!1}),this._scrollElement=K(this._root.current),this._scrollTop=0,this.setState((0,o.Cl)((0,o.Cl)({},this._updatePages(this.props,this.state)),{hasMounted:!0})),this._measureVersion++;var t=function(t){var n;return null!==(n=null==t?void 0:t.window)&&void 0!==n?n:"undefined"!=typeof window?window:void 0}(this.context);this._events.on(t,"resize",this._onAsyncResizeDebounced),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScrollDebounced))},n.prototype.componentDidUpdate=function(t,n){var i=this.props,e=this.state;this.state.pagesVersion!==n.pagesVersion&&(i.getPageHeight?this._onAsyncIdleDebounced():this._updatePageMeasurements(e.pages)?(this._materializedRect=null,this._hasCompletedFirstRender?this._onAsyncScrollDebounced():(this._hasCompletedFirstRender=!0,this.setState(this._updatePages(i,e)))):this._onAsyncIdleDebounced(),i.onPagesUpdated&&i.onPagesUpdated(e.pages))},n.prototype.componentWillUnmount=function(){var t,n;null===(t=this._async)||void 0===t||t.dispose(),null===(n=this._events)||void 0===n||n.dispose(),delete this._scrollElement},n.prototype.shouldComponentUpdate=function(t,n){var i=this.state.pages,e=n.pages,r=!1;if(!n.isScrolling&&this.state.isScrolling)return!0;if(t.version!==this.props.version)return!0;if(t.className!==this.props.className)return!0;if(t.items===this.props.items&&i.length===e.length)for(var o=0;o<i.length;o++){var u=i[o],a=e[o];if(u.key!==a.key||u.itemCount!==a.itemCount){r=!0;break}}else r=!0;return r},n.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,this.state,!0),this.setState(this._updatePages(this.props,this.state)),this._measureVersion++,t.prototype.forceUpdate.call(this)},n.prototype.getTotalListHeight=function(){return this._surfaceRect.height},n.prototype.render=function(){for(var t=this.props,n=t.className,i=t.role,e=void 0===i?"list":i,r=t.onRenderSurface,u=t.onRenderRoot,a=this.state.pages,l=void 0===a?[]:a,s=[],c=z(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?Yv(r,this._onRenderSurface):this._onRenderSurface;return(u?Yv(u,this._onRenderRoot):this._onRenderRoot)({rootRef:this._root,pages:l,surfaceElement:h({surfaceRef:this._surface,pages:l,pageElements:s,divProps:{role:"presentation",className:"ms-List-surface"}}),divProps:(0,o.Cl)((0,o.Cl)({},c),{className:j("ms-List",n),role:s.length>0?e:void 0,"aria-label":s.length>0?c["aria-label"]:void 0})})},n.prototype._shouldVirtualize=function(t){void 0===t&&(t=this.props);var n=t.onShouldVirtualize;return!n||n(t)},n.prototype._invalidatePageCache=function(){this._pageCache={}},n.prototype._renderPage=function(t){var n,i=this,e=this.props.usePageCache;if(e&&(n=this._pageCache[t.key])&&n.pageElement)return n.pageElement;var r=this._getPageStyle(t),o=this.props.onRenderPage,u=(void 0===o?this._onRenderPage:o)({page:t,className:"ms-List-page",key:t.key,ref:function(n){i._pageRefs[t.key]=n},style:r,role:"presentation"},this._onRenderPage);return e&&0===t.startIndex&&(this._pageCache[t.key]={page:t,pageElement:u}),u},n.prototype._getPageStyle=function(t){var n=this.props.getPageStyle;return(0,o.Cl)((0,o.Cl)({},n?n(t):{}),t.items?{}:{height:t.height})},n.prototype._onFocus=function(t){for(var n=t.target;n!==this._surface.current;){var i=n.getAttribute("data-list-index");if(i){this._focusedIndex=Number(i);break}n=b(n)}},n.prototype._onScroll=function(){this.state.isScrolling||this.props.ignoreScrollingState||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDoneDebounced()},n.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},n.prototype._onAsyncScroll=function(){var t,n;this._updateRenderRects(this.props,this.state),this._materializedRect&&(t=this._requiredRect,n=this._materializedRect,t.top>=n.top&&t.left>=n.left&&t.bottom<=n.bottom&&t.right<=n.right)||this.setState(this._updatePages(this.props,this.state))},n.prototype._onAsyncIdle=function(){var t=this.props,n=t.renderedWindowsAhead,i=t.renderedWindowsBehind,e=this._requiredWindowsAhead,r=this._requiredWindowsBehind,o=Math.min(n,e+1),u=Math.min(i,r+1);o===e&&u===r||(this._requiredWindowsAhead=o,this._requiredWindowsBehind=u,this._updateRenderRects(this.props,this.state),this.setState(this._updatePages(this.props,this.state))),(n>o||i>u)&&this._onAsyncIdleDebounced()},n.prototype._onScrollingDone=function(){this.props.ignoreScrollingState||(this.setState({isScrolling:!1}),this._onAsyncIdle())},n.prototype._onAsyncResize=function(){this.forceUpdate()},n.prototype._updatePages=function(t,n){this._requiredRect||this._updateRenderRects(t,n);var i=this._buildPages(t,n),e=n.pages;return this._notifyPageChanges(e,i.pages,this.props),(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),i),{pagesVersion:{}})},n.prototype._notifyPageChanges=function(t,n,i){var e=i.onPageAdded,r=i.onPageRemoved;if(e||r){for(var o={},u=0,a=t;u<a.length;u++)(c=a[u]).items&&(o[c.startIndex]=c);for(var l=0,s=n;l<s.length;l++){var c;(c=s[l]).items&&(o[c.startIndex]?delete o[c.startIndex]:this._onPageAdded(c))}for(var d in o)o.hasOwnProperty(d)&&this._onPageRemoved(o[d])}},n.prototype._updatePageMeasurements=function(t){var n=!1;if(!this._shouldVirtualize())return n;for(var i=0;i<t.length;i++){var e=t[i];e.items&&(n=this._measurePage(e)||n)}return n},n.prototype._measurePage=function(t){var n=!1,i=this._pageRefs[t.key],e=this._cachedPageHeights[t.startIndex];if(i&&this._shouldVirtualize()&&(!e||e.measureVersion!==this._measureVersion)){var r={width:i.clientWidth,height:i.clientHeight};(r.height||r.width)&&(n=t.height!==r.height,t.height=r.height,this._cachedPageHeights[t.startIndex]={height:r.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+r.height)/(this._totalEstimates+1)),this._totalEstimates++)}return n},n.prototype._onPageAdded=function(t){var n=this.props.onPageAdded;n&&n(t)},n.prototype._onPageRemoved=function(t){var n=this.props.onPageRemoved;n&&n(t)},n.prototype._buildPages=function(t,n){var i=t.renderCount,e=t.items,r=t.startIndex,u=t.getPageHeight;i=this._getRenderCount(t);for(var a=(0,o.Cl)({},Zv),l=[],s=1,c=0,d=null,f=this._focusedIndex,v=r+i,h=this._shouldVirtualize(t),p=0===this._estimatedPageHeight&&!u,g=this._allowedRect,m=function(i){var o=b._getPageSpecification(t,i,g),u=o.height,m=o.data,x=o.key;s=o.itemCount;var w,M,C=c+u-1,k=y(n.pages,(function(t){return!!t.items&&t.startIndex===i}))>-1,A=!g||C>=g.top&&c<=g.bottom,S=!b._requiredRect||C>=b._requiredRect.top&&c<=b._requiredRect.bottom;if(!p&&(S||A&&k)||!h||f>=i&&f<i+s||i===r){d&&(l.push(d),d=null);var L=Math.min(s,v-i),V=b._createPage(x,e.slice(i,i+L),i,void 0,void 0,m);V.top=c,V.height=u,b._visibleRect&&b._visibleRect.bottom&&(V.isVisible=C>=b._visibleRect.top&&c<=b._visibleRect.bottom),l.push(V),S&&b._allowedRect&&(w=a,M={top:c,bottom:C,height:u,left:g.left,right:g.right,width:g.width},w.top=M.top<w.top||-1===w.top?M.top:w.top,w.left=M.left<w.left||-1===w.left?M.left:w.left,w.bottom=M.bottom>w.bottom||-1===w.bottom?M.bottom:w.bottom,w.right=M.right>w.right||-1===w.right?M.right:w.right,w.width=w.right-w.left+1,w.height=w.bottom-w.top+1)}else d||(d=b._createPage(Uv+i,void 0,i,0,void 0,m,!0)),d.height=(d.height||0)+(C-c)+1,d.itemCount+=s;if(c+=C-c+1,p&&h)return"break"},b=this,x=r;x<v&&"break"!==m(x);x+=s);return d&&(d.key=Uv+"end",l.push(d)),this._materializedRect=a,(0,o.Cl)((0,o.Cl)({},n),{pages:l,measureVersion:this._measureVersion})},n.prototype._getPageSpecification=function(t,n,i){var e=t.getPageSpecification;if(e){var r=e(n,i,t.items),o=r.itemCount,u=void 0===o?this._getItemCountForPage(n,i):o,a=r.height;return{itemCount:u,height:void 0===a?this._getPageHeight(n,i,u):a,data:r.data,key:r.key}}return{itemCount:u=this._getItemCountForPage(n,i),height:this._getPageHeight(n,i,u)}},n.prototype._getPageHeight=function(t,n,i){if(this.props.getPageHeight)return this.props.getPageHeight(t,n,i,this.props.items);var e=this._cachedPageHeights[t];return e?e.height:this._estimatedPageHeight||30},n.prototype._getItemCountForPage=function(t,n){return(this.props.getItemCountForPage?this.props.getItemCountForPage(t,n):10)||10},n.prototype._createPage=function(t,n,i,e,r,o,u){void 0===i&&(i=-1),void 0===e&&(e=n?n.length:0),void 0===r&&(r={}),t=t||"page-"+i;var a=this._pageCache[t];return a&&a.page?a.page:{key:t,startIndex:i,itemCount:e,items:n,style:r,top:0,height:0,data:o,isSpacer:u||!1}},n.prototype._getRenderCount=function(t){var n=t||this.props,i=n.items,e=n.startIndex,r=n.renderCount;return void 0===r?i?i.length-e:0:r},n.prototype._updateRenderRects=function(t,n,i){var e=t.renderedWindowsAhead,r=t.renderedWindowsBehind,u=n.pages;if(this._shouldVirtualize(t)){var a=this._surfaceRect||(0,o.Cl)({},Zv),l=function(t){if(void 0===t)return 0;var n=0;return"scrollHeight"in t?n=t.scrollHeight:"document"in t&&(n=t.document.documentElement.scrollHeight),n}(this._scrollElement),c=Xv(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*qv)&&(a=this._surfaceRect=Jv(this._surface.current),this._scrollTop=c),!i&&l&&l===this._scrollHeight||this._measureVersion++,this._scrollHeight=l||0;var d=Math.max(0,-a.top),f=(0,s.z)(this._root.current),v={top:d,left:a.left,bottom:d+f.innerHeight,right:a.right,width:a.width,height:f.innerHeight};this._requiredRect=nh(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=nh(v,r,e),this._visibleRect=v}},n.defaultProps={startIndex:0,onRenderCell:function(t,n,i){return u.createElement(u.Fragment,null,t&&t.name||"")},onRenderCellConditional:void 0,renderedWindowsAhead:2,renderedWindowsBehind:2},n.contextType=Ft,n}(u.Component);function nh(t,n,i){var e=t.top-n*t.height,r=t.height+(n+i)*t.height;return{top:e,bottom:e+r,height:r,left:t.left,right:t.right,width:t.width}}var ih=function(t){var n=u.useRef(null);u.useEffect((function(){if(n.current){var i=sl(n.current),e=t.text.split(/\s+/),r=[],o=i.append("tspan"),u=0;return e.forEach((function(n){r.push(n),o.text(r.join(" "));var e=o.node();e&&e.getComputedTextLength()>t.width&&r.length>1&&(u++,r.pop(),o.text(r.join(" ")),r=[n],o=i.append("tspan").text(n).attr("dy",t.lineHeight).attr("x",t.x))})),i.attr("dy",-u*t.lineHeight),function(){i.selectAll("tspan").remove()}}})),t.lineHeight;var i=(0,o.Tt)(t,["lineHeight"]);return u.createElement("text",(0,o.Cl)({ref:n},qs(i)))},eh=function(t){var n,i,e,r=u.useRef(null),o=u.useState(!1),a=o[0],l=o[1],s=null;if(a){var c=t.labelDef.aggregatedIdx.map((function(n){return t.lineDefs[n].onRenderCard})).filter((function(t){return!!t}));c.length>0&&(s=u.createElement($n,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(td,{isCircularNavigation:!0,direction:dc.vertical},u.createElement(th,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var d=t.textColor?cs(t.textColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.semanticColors.messageText;return e=1===t.labelDef.aggregatedIdx.length?t.lineDefs[t.labelDef.aggregatedIdx[0]].event:t.mergedLabel(t.labelDef.aggregatedIdx.length),u.createElement(u.Fragment,null,u.createElement("g",{ref:r,onClick:function(){return l(!0)},"data-is-focusable":!0,style:{cursor:"pointer"},role:"button"},u.createElement(ih,{text:e,x:t.labelDef.x,y:t.textY,width:t.textWidth,lineHeight:t.textLineHeight,textAnchor:t.labelDef.anchor,fontSize:t.textFontSize,fill:d})),s)},rh=function(t){var n,i,e=t.labelWidth?t.labelWidth:105,r=t.chartYTop-20,a=r+7,l=t.scale.range(),s=t.events.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{x:t.scale(n.date)})}));s.sort((function(t,n){return+t.date-+n.date}));var c=t.strokeColor?cs(t.strokeColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.palette.black,d=function(t,n){for(var i=[],e=[],r=0,o=t;r<o.length;r++){var u=o[r],a=n(u);-1===i.indexOf(a)&&(e.push(u),i.push(a))}return e}(s,(function(t){return t.date.toString()})).map((function(n,i){return u.createElement("line",{key:i,x1:n.x,x2:n.x,y1:a,y2:t.chartYBottom,stroke:c,strokeDasharray:"8"})})),f=function(t,n,i,e){var r=function(e,r){if(r===t.length)return[];var u=t[r].x,a=u-n;return u<e?[]:r===t.length-1?e<a?[{x:u,anchor:"end",aggregatedIdx:[r]}]:u+n<i?[{x:u,anchor:"start",aggregatedIdx:[r]}]:[]:o(r,e<a?"end":"start")},o=function(e,o){var u="end"===o?t[e].x:t[e].x+n,a=y(t,(function(t){return t.x>u&&(t.x-n>=u||t.x+n<i)}),e+1);-1===a&&(a=t.length);for(var l=[],s=e;s<a;s++)l.push(s);var c=r(u,a);return c.unshift({x:t[e].x,anchor:o,aggregatedIdx:l}),c};return r(e,0)}(s,e+5,l[1],l[0]).map((function(n,i){return u.createElement(eh,{key:i,theme:t.theme,lineDefs:s,labelDef:n,textY:r,textWidth:e,textLineHeight:18,textFontSize:"10pt",textColor:t.labelColor,mergedLabel:t.mergedLabel})}));return u.createElement(u.Fragment,null,d,f)};function oh(t){var n,i,e=t.xAxisScale,r=t.yAxisScale,o=t.className,a=t.lineOptions,l=t.minPixelGap,s=void 0===l?40:l,c=function(t){return t?{originXOffset:t.originXOffset,direction:"clockwise"===t.direction||"counterclockwise"===t.direction?t.direction:void 0,rotation:t.rotation,axisLabel:Array.isArray(t.axisLabel)?t.axisLabel:void 0}:void 0}(a),d=null!==(n=null==c?void 0:c.axisLabel)&&void 0!==n?n:[],f=[],v=[],h=d.length,p="clockwise"===(null==c?void 0:c.direction)?-1:1,g=(null!==(i=null==c?void 0:c.rotation)&&void 0!==i?i:0)*Math.PI/180;return d.forEach((function(t,n){var i=g+p*(2*Math.PI/h)*n,a=(null==c?void 0:c.originXOffset)||0,l=e(.7*Math.cos(i)-a/2),d=r(.7*Math.sin(i)),y=v.every((function(t){return Math.sqrt(Math.pow(l-t.x,2)+Math.pow(d-t.y,2))>=s}));(0===f.length||y)&&(f.push(u.createElement("text",{key:"scatterpolar-label-".concat(t),x:l,y:d,className:o,textAnchor:"middle",alignmentBaseline:"middle",opacity:1},t)),v.push({x:l,y:d}))})),f}var uh,ah=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(uh||(uh={}));var lh=wi((function(t){return t.x})).left,sh=function(t){function n(n){var i,e,r,a,s,c=t.call(this,n)||this;return c._xAxisScale="",c._yScalePrimary="",c.eventLabelHeight=36,c._isRTL=(0,l.jI)(),c._hasMarkersMode=!1,c._isXAxisDateType=!1,c._isScatterPolar=!1,c.toImage=function(t){var n,i;return af([{container:null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],c.props.hideLegend||null===(i=c._legendsRef.current)||void 0===i?void 0:i.toSVG,c._isRTL,t)},c._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Ts(t,n,i,r,c.props.xScaleType,c._hasMarkersMode,c.props.xMinValue,c.props.xMaxValue):o===ns.DateAxis?Ps(t,n,i,r,a,e,0,c._hasMarkersMode):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},c._injectIndexPropertyInLineChartData=function(t,n){var i;void 0===n&&(n=!1);var e=c.props.allowMultipleShapesForPoints,r=void 0!==e&&e,u=n?null==t?void 0:t.filter((function(t){var n,i,e;return(null===(i=null===(n=c.props.legendProps)||void 0===n?void 0:n.selectedLegends)||void 0===i?void 0:i.includes(t.legend))||(null===(e=c.props.legendProps)||void 0===e?void 0:e.selectedLegend)===t.legend})):t;return c._hasMarkersMode=null!==(i=null==u?void 0:u.some((function(t){var n,i,e;return null===(e=null===(i=null===(n=t.lineOptions)||void 0===n?void 0:n.mode)||void 0===i?void 0:i.includes)||void 0===e?void 0:e.call(i,"markers")})))&&void 0!==i&&i,c._isScatterPolar=cc(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?ss(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(e=c.props.theme)||void 0===e?void 0:e.isInverted),(0,o.Cl)((0,o.Cl)({},t),{index:r?n:-1,color:u})})):[]},c._getCustomizedCallout=function(){return c.props.onRenderCalloutPerStack?c.props.onRenderCalloutPerStack(c.state.stackCalloutProps):c.props.onRenderCalloutPerDataPoint?c.props.onRenderCalloutPerDataPoint(c.state.dataPointCalloutProps):null},c._getNumericMinMaxOfY=function(t,n,i){var e=_s(t,0,i,i?c.props.secondaryYScaleType:c.props.yScaleType),r=e.startValue,o=e.endValue,u={start:0,end:0};return c._hasMarkersMode&&(u=vc(r,o,i?c.props.secondaryYScaleType:c.props.yScaleType)),{startValue:r-u.start,endValue:o+u.end}},c._getMargins=function(t){c.margins=t},c._initializeLineChartData=function(t,n,i,e,r,o,u){c._xAxisScale=t,c._yScalePrimary=n,c._yScaleSecondary=u,c._renderedColorFillBars=c.props.colorFillBars?c._createColorFillBars(i):[],c.lines=c._createLines(r,i)},c._handleSingleLegendSelectionAction=function(t){c.state.selectedLegend===t.legend?(c.setState({selectedLegend:""}),c._handleLegendClick(t,null)):(c.setState({selectedLegend:t.legend}),c._handleLegendClick(t,t.legend))},c._onHoverCardHide=function(){c.setState({selectedLegendPoints:[],selectedColorBarLegend:[],isSelectedLegend:!1})},c._closeCallout=function(){c.setState({isCalloutVisible:!1})},c._getBoxWidthOfShape=function(t,n,i){var e=c.props,r=e.allowMultipleShapesForPoints,o=void 0!==r&&r,u=e.strokeWidth,a=void 0===u?4:u,l=c.state.activePoint;return o?l===t?uh.hoverSize:1===n||i?2.5*a:uh.invisibleSize:l===t?uh.hoverSize:uh.invisibleSize},c._getPath=function(t,n,i,e,r,o){var u=c.props.allowMultipleShapesForPoints,a=void 0!==u&&u,l=c._getBoxWidthOfShape(i,e,r),s=a?o%Object.keys(js).length:0,d=js[s].widthRatio;return function(t,n,i,e){return["M".concat(t-i/2," ").concat(n,"\n A").concat(i/2," ").concat(i/2," 0 1 0 ").concat(t+i/2," ").concat(n,"\n M").concat(t-i/2," ").concat(n,"\n A ").concat(i/2," ").concat(i/2," 0 1 1 ").concat(t+i/2," ").concat(n,"\n "),"M".concat(t-i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n+i/2,"\n Z"),"M".concat(t-i/2," ").concat(n-.2886*i,"\n H ").concat(t+i/2,"\n L").concat(t," ").concat(n+.5774*i," Z"),"M".concat(t," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n,"\n L").concat(t," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.5774*i,"\n L").concat(t+i/2," ").concat(n+.2886*i,"\n L").concat(t-i/2," ").concat(n+.2886*i," Z"),"M".concat(t-.5*i," ").concat(n-.866*i,"\n L").concat(t+.5*i," ").concat(n-.866*i,"\n L").concat(t+i," ").concat(n,"\n L").concat(t+.5*i," ").concat(n+.866*i,"\n L").concat(t-.5*i," ").concat(n+.866*i,"\n L").concat(t-i," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.851*i,"\n L").concat(t+.6884*i," ").concat(n-.2633*i,"\n L").concat(t+.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.6884*i," ").concat(n-.2633*i,"\n Z"),"M".concat(t-.5001*i," ").concat(n-1.207*i,"\n L").concat(t+.5001*i," ").concat(n-1.207*i,"\n L").concat(t+1.207*i," ").concat(n-.5001*i,"\n L").concat(t+1.207*i," ").concat(n+.5001*i,"\n L").concat(t+.5001*i," ").concat(n+1.207*i,"\n L").concat(t-.5001*i," ").concat(n+1.207*i,"\n L").concat(t-1.207*i," ").concat(n+.5001*i,"\n L").concat(t-1.207*i," ").concat(n-.5001*i,"\n Z")][e]}(t,n,l=d>1?l/d:l,s)},c._getPointFill=function(t,n,i,e){var r=c.state.activePoint,o=c.props,u=o.theme;return o.allowMultipleShapesForPoints,r===n?u.semanticColors.bodyBackground:t},c._createColorFillBars=function(t){var n,i=[];c.state.isSelectedLegend?c._colorFillBars=c.state.selectedColorBarLegend:c._colorFillBars=c.props.colorFillBars;for(var e=_s(c._points),r=0;r<c._colorFillBars.length;r++){var o=c._colorFillBars[r],a=p("string"==typeof o.legend?o.legend.replace(/\W/g,""):""),l=cs(o.color,null===(n=c.props.theme)||void 0===n?void 0:n.isInverted);o.applyPattern&&i.push(c._getStripePattern(l,r));for(var s=0;s<o.data.length;s++){var d=o.data[s].startX,f=o.data[s].endX,v=c._legendHighlighted(o.legend)||c._noLegendHighlighted()||c.state.isSelectedLegend?c._getColorFillBarOpacity(o):.1;i.push(u.createElement("rect",{fill:o.applyPattern?"url(#".concat(c._colorFillBarPatternId,"_").concat(r,")"):l,fillOpacity:v,x:c._isRTL?c._xAxisScale(f):c._xAxisScale(d),y:c._yScalePrimary(e.endValue)-3,width:Math.abs(c._xAxisScale(f)-c._xAxisScale(d)),height:c._yScalePrimary(c.props.yMinValue||0)-c._yScalePrimary(e.endValue)+3,key:"".concat(a).concat(s)}))}}return i},c._getStripePattern=function(t,n){return u.createElement("pattern",{id:"".concat(c._colorFillBarPatternId,"_").concat(n),width:16,height:16,key:"".concat(c._colorFillBarPatternId,"_").concat(n),patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8",stroke:t,strokeWidth:1.25}))},c._checkInGap=function(t,n,i){for(var e=i,r=!1;e<n.length&&t>n[e].endIndex;)e++;return e<n.length&&t>n[e].startIndex&&t<=n[e].endIndex&&(r=!0),{isInGap:r,gapIndex:e}},c._onMouseOverLargeDataset=function(t,n,i,e){e.persist();var r=c.props.data.lineChartData,o=c._xAxisScale.invert(xv(e)[0],document.getElementById(c._rectId)),u=lh(r[t].data,o),a=r[t].data[u-1],l=r[t].data[u],s=null,d=null;if(void 0===a&&void 0!==l)s=l.x,d=u;else if(void 0!==a&&void 0===l)s=a.x,d=u-1;else{var f=void 0,v=void 0,h=void 0;switch(zs(r[t].data[0].x,!0)){case ns.DateAxis:f=new Date(o).getTime(),v=a.x.getTime(),h=l.x.getTime(),s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1;break;case ns.NumericAxis:f=o,v=a.x,h=l.x,s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1}}var p=r[t].data[d],g=p.xAxisCalloutData,y=p.xAxisCalloutAccessibilityData,m=s instanceof Date?(0,Yn.Yn)(s,c.props.culture,c.props.useUTC):s,b=wc(c._calloutPoints,s),x=r[t].data[d],w=null===c.state.nearestCircleToHighlight||null!==c.state.nearestCircleToHighlight&&null!==x&&(c.state.nearestCircleToHighlight.x!==x.x||c.state.nearestCircleToHighlight.y!==x.y);b&&w&&(c._uniqueCallOutID="#".concat(c._staticHighlightCircle,"_").concat(t),sl("#".concat(c._staticHighlightCircle,"_").concat(t)).attr("cx","".concat(c._xAxisScale(x.x))).attr("cy","".concat(i(x.y))).attr("visibility","visibility"),sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(c._xAxisScale(x.x),", ").concat(i(x.y),")")})).attr("visibility","visibility").attr("y2","".concat(n-i(x.y))),c.setState({nearestCircleToHighlight:x,isCalloutVisible:!0,refSelected:"#".concat(c._staticHighlightCircle,"_").concat(t),stackCalloutProps:b,YValueHover:b.values,dataPointCalloutProps:b,hoverXValue:g||m,xAxisCalloutAccessibilityData:y,activePoint:"",activeLine:t})),b||c.setState({isCalloutVisible:!1,nearestCircleToHighlight:x,activePoint:"",activeLine:t})},c._handleFocus=function(t,n,i,e,r){c._uniqueCallOutID=e;var o=n instanceof Date?(0,Yn.Yn)(n,c.props.culture,c.props.useUTC):n,u=wc(c._calloutPoints,n);if(u){var a=c;sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(a._xAxisScale(n),", 0)")})).attr("visibility","visibility"),c._refArray.forEach((function(n){n.index===t&&c.setState({isCalloutVisible:!0,refSelected:n.refElement,hoverXValue:i||""+o,YValueHover:u.values,stackCalloutProps:u,dataPointCalloutProps:u,activePoint:e,xAxisCalloutAccessibilityData:r})}))}else c.setState({activePoint:e})},c._handleHover=function(t,n,i,e,r,o,u,a,l,s){s.persist();var d=t instanceof Date?(0,Yn.Yn)(t,c.props.culture,c.props.useUTC):t,f=c,v=wc(c._calloutPoints,t),h=void 0;if(!1===c.props.isCalloutForStack&&(null==v?void 0:v.values)){var p=m(v.values,(function(t){return(null==t?void 0:t.y)===n}));p&&(h={x:t,values:[p]})}v?(sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(f._xAxisScale(t),", ").concat(u(n),")")})).attr("visibility","visibility").attr("y2","".concat(i-u(n))),c._uniqueCallOutID!==r&&(c._uniqueCallOutID=r,c.setState({isCalloutVisible:!0,refSelected:"#".concat(r),hoverXValue:e||""+d,YValueHover:v.values,YValue:n,legendVal:a,lineColor:l,stackCalloutProps:v,dataPointCalloutProps:h,activePoint:r,xAxisCalloutAccessibilityData:o,nearestCircleToHighlight:null,activeLine:null}))):c.setState({activePoint:r,nearestCircleToHighlight:null,activeLine:null})},c._getClickHandler=function(t){return t?{onClick:t}:{}},c._handleMouseOut=function(){sl("#".concat(c._verticalLine)).attr("visibility","hidden")},c._handleChartMouseLeave=function(){c._uniqueCallOutID=null,c.setState({isCalloutVisible:!1,activePoint:"",activeLine:null})},c._handleLegendClick=function(t,n){t.onLegendClick&&t.onLegendClick(n)},c._handleMultipleLineLegendSelectionAction=function(t){var n,i=c.state.selectedLegendPoints.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedLegendPoints,!0),[t],!1):c.state.selectedLegendPoints.slice(0,i).concat(c.state.selectedLegendPoints.slice(i+1)),c.props.data&&n.length===c.props.data.lineChartData.length&&(c.props.colorFillBars&&c.props.colorFillBars.length===c.state.selectedColorBarLegend.length||!c.props.colorFillBars)?c._clearMultipleLegendSelections():n.length||c.state.selectedColorBarLegend.length?c.setState({selectedLegendPoints:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._handleMultipleColorFillBarLegendSelectionAction=function(t){var n,i=c.state.selectedColorBarLegend.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);(n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedColorBarLegend,!0),[t],!1):c.state.selectedColorBarLegend.slice(0,i).concat(c.state.selectedColorBarLegend.slice(i+1))).length===(c.props.colorFillBars&&c.props.colorFillBars.length)&&(c.props.data&&c.props.data.lineChartData.length===c.state.selectedLegendPoints.length||!c.props.data)?c._clearMultipleLegendSelections():n.length||c.state.selectedLegendPoints.length?c.setState({selectedColorBarLegend:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._clearMultipleLegendSelections=function(){c.setState({selectedColorBarLegend:[],selectedLegendPoints:[],isSelectedLegend:!1})},c._legendHighlighted=function(t){return c.state.selectedLegend===t||""===c.state.selectedLegend&&c.state.activeLegend===t},c._noLegendHighlighted=function(){return""===c.state.selectedLegend&&""===c.state.activeLegend},c._getColorFillBarOpacity=function(t){return t.applyPattern?1:.4},c._getAriaLabel=function(t,n){var i,e=c._points[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,c.props.culture,c.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},c._getChartTitle=function(){var t=c.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Line chart with ".concat((null==i?void 0:i.length)||0," lines. ")},Ec(c),c.state={hoverXValue:"",activeLegend:"",YValueHover:[],YValue:"",legendVal:"",refSelected:"",selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",isCalloutVisible:!1,selectedLegendPoints:c._injectIndexPropertyInLineChartData(c.props.data.lineChartData,!0),selectedColorBarLegend:[],isSelectedLegend:(null!==(s=null===(a=null===(r=c.props.legendProps)||void 0===r?void 0:r.selectedLegends)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>0,activePoint:"",nearestCircleToHighlight:null,activeLine:null},c._refArray=[],c._points=c._injectIndexPropertyInLineChartData(c.props.data.lineChartData),c._colorFillBars=[],c._calloutPoints=Ss(c._points)||{},c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._rectId=p("containerRectLD"),c._staticHighlightCircle=p("staticHighlightCircle"),c._createLegendsMemoized=(0,an.J9)((function(t){return c._createLegends(t)})),c._firstRenderOptimization=!0,c._emptyChartId=p("_LineChart_empty"),c._cartesianChartRef=u.createRef(),c._legendsRef=u.createRef(),n.eventAnnotationProps&&n.eventAnnotationProps.labelHeight&&(c.eventLabelHeight=n.eventAnnotationProps.labelHeight),c}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r,o,u,a,l,s;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)===(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&Zs(null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends,null===(r=this.props.legendProps)||void 0===r?void 0:r.selectedLegends)||this.setState({selectedLegend:null!==(u=null===(o=this.props.legendProps)||void 0===o?void 0:o.selectedLegend)&&void 0!==u?u:"",selectedLegendPoints:this._injectIndexPropertyInLineChartData(this.props.data.lineChartData,!0),isSelectedLegend:(null!==(s=null===(l=null===(a=this.props.legendProps)||void 0===a?void 0:a.selectedLegends)||void 0===l?void 0:l.length)&&void 0!==s?s:0)>0}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData),this._calloutPoints=Ss(this._points)||{})},n.prototype.render=function(){var t=this,n=this.props,i=n.tickValues,e=n.tickFormat,r=n.eventAnnotationProps,a=n.legendProps,l=n.data;this._points=this._injectIndexPropertyInLineChartData(l.lineChartData),this._isXAxisDateType=Os(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=Ss(s));var c=null;this.props.hideLegend||(c=this._createLegendsMemoized(this._points));var d=(0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,YValue:this.state.YValue,legend:this.state.legendVal,color:this.state.lineColor,XValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,onDismiss:this._closeCallout,preventDismissOnEvent:function(){return!0},hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),descriptionMessage:this.props.getCalloutDescriptionMessage&&this.state.stackCalloutProps?this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps),f={tickValues:i,tickFormat:e};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:ts.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:Cs,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?ns.DateAxis:ns.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){return t._xAxisScale=n.xScale,t._yScalePrimary=n.yScalePrimary,t._yScaleSecondary=n.yScaleSecondary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:n.containerHeight,stroke:"#323130",id:t._verticalLine,visibility:"hidden",strokeDasharray:"5,5"}),t.props.optimizeLargeData?u.createElement("rect",{id:t._rectId,width:n.containerWidth,height:n.containerHeight,fill:"transparent"}):u.createElement(u.Fragment,null),u.createElement("g",null,t._renderedColorFillBars,t.lines),r&&u.createElement(rh,(0,o.Cl)({theme:t.props.theme},r,{scale:n.xScale,chartYTop:t.margins.top+t.eventLabelHeight,chartYBottom:n.containerHeight-35}))))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._createLegends=function(t){var n=this,i=this.props,e=i.legendProps,r=i.allowMultipleShapesForPoints,a=void 0!==r&&r,l=!(!e||!e.canSelectMultipleLegends),s={};t.forEach((function(t){t.legend&&(s[t.legend]||(s[t.legend]=[]),s[t.legend].push(t))}));var c=Object.entries(s).map((function(t){var i=t[0],e=t[1],r=e[0];return(0,o.Cl)((0,o.Cl)({title:i,color:r.color,action:function(){l?e.forEach((function(t){return n._handleMultipleLineLegendSelectionAction(t)})):e.forEach((function(t){return n._handleSingleLegendSelectionAction(t)}))},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:i})}},r.legendShape&&{shape:r.legendShape}),a&&{shape:Ws[r.index%Object.keys(js).length]})})),d=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=cs(t.color,null===(e=n.props.theme)||void 0===e?void 0:e.isInverted);return{title:r,color:o,action:function(){l?n._handleMultipleColorFillBarLegendSelectionAction(t):n._handleSingleLegendSelectionAction(t)},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:r})},opacity:n._getColorFillBarOpacity(t),stripePattern:t.applyPattern}})):[];return u.createElement(bf,(0,o.Cl)({legends:(0,o.fX)((0,o.fX)([],c,!0),d,!0),enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},l&&{onLegendHoverCardLeave:this._onHoverCardHide},this.props.legendProps,{ref:this._legendsRef}))},n.prototype._createLines=function(t,n){var i,e,r,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z,j,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it=this,et=[];this.state.isSelectedLegend?this._points=this.state.selectedLegendPoints:this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);for(var rt=fi(this._points,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),ot=ah(this.props.styles,{theme:this.props.theme}),ut=function(t){var ut=[],lt=[],st=[],ct=at._points[t].legend,dt=at._points[t].color,ft=at.state.activePoint,vt=at.props.theme,ht=n-at.margins.bottom+6,pt=!(!at._points[t].useSecondaryYScale||!at._yScaleSecondary),gt=pt?at._yScaleSecondary:at._yScalePrimary,yt=at._hasMarkersMode?yc({data:at._points,xScale:at._xAxisScale,yScalePrimary:at._yScalePrimary,yScaleSecondary:at._yScaleSecondary,useSecondaryYScale:pt,xScaleType:at.props.xScaleType,yScaleType:at.props.yScaleType,secondaryYScaleType:at.props.secondaryYScaleType}):0;if(1===at._points[t].data.length){var mt=at._points[t].data[0],bt=mt.x,xt=mt.y,wt=mt.xAxisCalloutData,Mt=mt.xAxisCalloutAccessibilityData,Ct=at._xAxisScale(bt),kt=gt(xt);if(pc(Ct,kt)){var At="".concat(at._circleId,"_").concat(t),St=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Lt=at._points[t].data[0].markerSize,Vt=null===(e=null===(i=at._points[t].lineOptions)||void 0===i?void 0:i.mode)||void 0===e?void 0:e.includes("text"),Dt=at._points[t].data[0].text;st.push(u.createElement(u.Fragment,{key:"".concat(At,"_fragment")},u.createElement("circle",(0,o.Cl)({id:At,key:At,r:Lt?Lt*yt/rt:ft===At?5.5:3.5,cx:Ct,cy:kt,fill:ft===At?vt.semanticColors.bodyBackground:dt,opacity:St?1:.1,onMouseOver:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:ft===At?4:0,stroke:ft===At?dt:"",role:"img","aria-label":at._getAriaLabel(t,0),"data-is-focusable":St,ref:function(t){it._refCallback(t,At)},onFocus:function(){return it._handleFocus(At,bt,wt,At,Mt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[0].onDataPointClick))),!at._isScatterPolar&&Vt&&Dt&&u.createElement("text",{key:"".concat(At,"-label"),x:Ct,y:kt+Math.max(Lt?Lt*yt/rt:3.5,4)+12,className:ot.markerLabel,opacity:St?1:.1},Dt)))}}var Nt=0,Ot=null!==(a=null===(r=at._points[t].gaps)||void 0===r?void 0:r.sort((function(t,n){return t.startIndex-n.startIndex})))&&void 0!==a?a:[],Tt=null===(l=at._points[t].lineOptions)||void 0===l?void 0:l.curve;if((at.props.optimizeLargeData||Tt)&&at._points[t].data.length>1){for(var Et=Cv().x((function(t){return it._xAxisScale(t[0])})).y((function(t){return gt(t[1])})).curve(uc(Tt)).defined((function(t){return pc(it._xAxisScale(t[0]),gt(t[1]))})),Ft="".concat(at._lineId,"_").concat(t),Bt="".concat(at._borderId,"_").concat(t),Pt=(null===(s=at._points[t].lineOptions)||void 0===s?void 0:s.strokeWidth)||at.props.strokeWidth||4,_t=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Ht=[],It=0;It<at._points[t].data.length;It++)Ht.push([at._points[t].data[It].x instanceof Date?at._points[t].data[It].x.getTime():at._points[t].data[It].x,at._points[t].data[It].y]);var Wt=null===(c=at._points[t].lineOptions)||void 0===c?void 0:c.mode,Rt="markers"!==Wt;if(Rt&&_t){var zt=(null===(d=at._points[t].lineOptions)||void 0===d?void 0:d.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;zt>0&&lt.push(u.createElement("path",{id:Bt,key:Bt,d:Et(Ht),fill:"transparent",strokeLinecap:null!==(v=null===(f=at._points[t].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==v?v:"round",strokeWidth:Number.parseFloat(Pt.toString())+zt,stroke:(null===(h=at._points[t].lineOptions)||void 0===h?void 0:h.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("path",(0,o.Cl)({id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!0,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(g=null===(p=at._points[t].lineOptions)||void 0===p?void 0:p.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=at._points[t].lineOptions)||void 0===y?void 0:y.strokeDasharray,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut},at._getClickHandler(at._points[t].onLineClick),{opacity:1})))}else Rt&&ut.push(u.createElement("path",{id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!1,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(b=null===(m=at._points[t].lineOptions)||void 0===m?void 0:m.strokeLinecap)&&void 0!==b?b:"round",strokeDasharray:null===(x=at._points[t].lineOptions)||void 0===x?void 0:x.strokeDasharray,opacity:.1}));var jt=null!==at.state.activeLine&&at.state.activeLine===t;if(st.push(u.createElement("circle",{id:"".concat(at._staticHighlightCircle,"_").concat(t),key:"".concat(at._staticHighlightCircle,"_").concat(t),r:5.5,cx:0,cy:0,fill:vt.semanticColors.bodyBackground,strokeWidth:4,stroke:dt,visibility:jt?"visibility":"hidden",onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut})),null==Wt?void 0:Wt.includes("markers"))for(It=0;It<at._points[t].data.length;It++){var $t=at._points[t].data[It],Yt=$t.x,Xt=$t.y;if(Ct=at._xAxisScale(Yt),kt=gt(Xt),pc(Ct,kt)){var Gt=at._points[t].data[It].markerSize,Ut=null===(w=at._points[t].data[It])||void 0===w?void 0:w.markerColor;st.push(u.createElement("circle",{key:"".concat(at._circleId,"_").concat(t,"_").concat(It,"_marker"),r:Gt?Gt*yt*.3/rt:ft===at._circleId?5.5:3.5,cx:Ct,cy:kt,fill:ft===at._circleId?vt.semanticColors.bodyBackground:Ut||(null===(M=at._points[t])||void 0===M?void 0:M.color)||dt,stroke:Ut||dt,strokeWidth:1,opacity:_t?1:.1,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut}))}}}else if(!at.props.optimizeLargeData)for(var qt=function(n){var i=at._checkInGap(n,Ot,Nt),e=i.isInGap;Nt=i.gapIndex;var r="".concat(at._lineId,"_").concat(t,"_").concat(n),a="".concat(at._borderId,"_").concat(t,"_").concat(n),l="".concat(at._circleId,"_").concat(t,"_").concat(n),s=at._points[t].data[n-1],c=s.x,d=s.y,f=s.xAxisCalloutData,v=s.xAxisCalloutAccessibilityData,h=at._points[t].data[n],p=h.x,g=h.y,y=at._xAxisScale(c),m=gt(d),b=at._xAxisScale(p),x=gt(g),w=(null===(C=at._points[t].lineOptions)||void 0===C?void 0:C.strokeWidth)||at.props.strokeWidth||4,M=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,tt=at._points[t].hideNonActiveDots&&ft!==l,nt=null===(A=null===(k=at._points[t].lineOptions)||void 0===k?void 0:k.mode)||void 0===A?void 0:A.includes("text"),et=at._points[t].data[n-1].text,pt=at._points[t].data[n-1].markerSize;if(pc(y,m)){var mt=at._getPath(y,m,l,n,!1,at._points[t].index);st.push((null===(L=null===(S=at._points[t].lineOptions)||void 0===S?void 0:S.mode)||void 0===L?void 0:L.includes("markers"))||nt?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:l,key:l,r:pt?pt*yt/rt:4,cx:y,cy:m,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(V=at._points[t].data[n-1])||void 0===V?void 0:V.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(D=at._points[t].data[n-1])||void 0===D?void 0:D.markerColor)||dt,strokeWidth:w,role:"img","aria-label":null!==(N=at._points[t].data[n-1].text)&&void 0!==N?N:at._getAriaLabel(t,n-1)})),!at._isScatterPolar&&nt&&et&&u.createElement("text",{key:"".concat(l,"-label"),x:y,y:m+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:l,key:l,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(O=at._points[t].data[n-1])||void 0===O?void 0:O.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(T=at._points[t].data[n-1])||void 0===T?void 0:T.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n-1)})))}if(n+1===at._points[t].data.length){var bt="".concat(l).concat(n,"L"),xt="".concat(l).concat(n,"D"),wt=at._points[t].hideNonActiveDots&&ft!==bt,Mt=at._points[t].data[n],Ct=Mt.xAxisCalloutData,kt=Mt.xAxisCalloutAccessibilityData;pt=at._points[t].data[n].markerSize;var At=null===(F=null===(E=at._points[t].lineOptions)||void 0===E?void 0:E.mode)||void 0===F?void 0:F.includes("text"),St=at._points[t].data[n].text;pc(b,x)&&(mt=at._getPath(b,x,bt,n,!0,at._points[t].index),st.push(u.createElement(u.Fragment,{key:"".concat(bt,"_container")},(null===(P=null===(B=at._points[t].lineOptions)||void 0===B?void 0:B.mode)||void 0===P?void 0:P.includes("markers"))||At?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:bt,key:bt,r:pt?pt*yt/rt:4,cx:b,cy:x,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:at._getPointFill(dt,bt,n,!0),stroke:dt,strokeWidth:w,role:"img","aria-label":null!==(_=at._points[t].data[n].text)&&void 0!==_?_:at._getAriaLabel(t,n)})),!at._isScatterPolar&&At&&St&&u.createElement("text",{key:"".concat(bt,"-label"),x:b,y:x+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:bt,key:bt,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:(null===(H=at._points[t].data[n])||void 0===H?void 0:H.markerColor)||at._getPointFill(dt,bt,n,!0),stroke:(null===(I=at._points[t].data[n])||void 0===I?void 0:I.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n)})),u.createElement("circle",{id:xt,key:xt,r:8,cx:b,cy:x,opacity:0,width:0,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:0,focusable:!1,onBlur:at._handleMouseOut}))))}if(pc(y,m)&&pc(b,x)&&(!at._hasMarkersMode||(null===(R=null===(W=at._points[t].lineOptions)||void 0===W?void 0:W.mode)||void 0===R?void 0:R.includes("lines"))))if(M){if(!e){var Lt=(null===(z=at._points[t].lineOptions)||void 0===z?void 0:z.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;Lt>0&&lt.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:x,strokeLinecap:null!==($=null===(j=at._points[t].lineOptions)||void 0===j?void 0:j.strokeLinecap)&&void 0!==$?$:"round",strokeWidth:Number.parseFloat(w.toString())+Lt,stroke:(null===(Y=at._points[t].lineOptions)||void 0===Y?void 0:Y.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("line",(0,o.Cl)({id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,ref:function(t){it._refCallback(t,r)},onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,stroke:dt,strokeLinecap:null!==(G=null===(X=at._points[t].lineOptions)||void 0===X?void 0:X.strokeLinecap)&&void 0!==G?G:"round",strokeDasharray:null===(U=at._points[t].lineOptions)||void 0===U?void 0:U.strokeDasharray,strokeDashoffset:null===(q=at._points[t].lineOptions)||void 0===q?void 0:q.strokeDashoffset,opacity:1},at._getClickHandler(at._points[t].onLineClick))))}}else e||ut.push(u.createElement("line",{id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,stroke:dt,strokeLinecap:null!==(K=null===(Z=at._points[t].lineOptions)||void 0===Z?void 0:Z.strokeLinecap)&&void 0!==K?K:"round",strokeDasharray:null===(J=at._points[t].lineOptions)||void 0===J?void 0:J.strokeDasharray,strokeDashoffset:null===(Q=at._points[t].lineOptions)||void 0===Q?void 0:Q.strokeDashoffset,opacity:.1}))},Zt=1;Zt<at._points[t].data.length;Zt++)qt(Zt);var Kt=null===(tt=at._points[t].lineOptions)||void 0===tt?void 0:tt.fill,Jt=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend;if("toself"===Kt&&at._points[t].data.length>=3&&Jt&&at._isScatterPolar){var Qt=function(t){return it._xAxisScale((t.x,Date,t.x))},tn=Cv().x((function(t){return Qt(t)})).y((function(t){return gt(t.y)})).curve(uc(Tt)).defined((function(t){return pc(Qt(t),gt(t.y))}))(at._points[t].data);tn&&ut.push(u.createElement("path",{key:"scatterpolar_fill_".concat(t),d:"".concat(tn,"Z"),fill:dt,fillOpacity:.5,stroke:dt,strokeWidth:2,strokeOpacity:.8,pointerEvents:"none"}))}at._isScatterPolar&&st.push.apply(st,oh({xAxisScale:at._xAxisScale,yAxisScale:gt,className:ot.markerLabel||"",lineOptions:null===(nt=at._points[t])||void 0===nt?void 0:nt.lineOptions})),et.push(u.createElement("g",{key:"line_".concat(t),role:"region","aria-label":"".concat(ct,", line ").concat(t+1," of ").concat(at._points.length," with ").concat(at._points[t].data.length," data points.")},lt,ut,st))},at=this,lt=this._points.length-1;lt>=0;lt--)ut(lt);return et},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&this.props.data.lineChartData.filter((function(t){return t.data.length})).length>0)},n.defaultProps={enableReflow:!0,useUTC:!0,isCalloutForStack:!0},n}(u.Component),ch=(0,r.I)(sh,(function(t){return{tooltip:sv(t.theme),markerLabel:fv(t.theme)}})),dh=(0,a.Z)(),fh=u.forwardRef((function(t,n){var i,e,r,a=u.useMemo((function(){return p("circle")}),[]),s=u.useMemo((function(){return p("seriesID")}),[]),c=u.useMemo((function(){return p("verticalLine")}),[]),d=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),f=u.useRef(ct(t.data.scatterChartData)),v=u.useMemo((function(){return Ss(f.current)||{}}),[f]),h=u.useRef(""),g=u.useRef(""),y=u.useRef(null),m=u.useMemo((function(){return[]}),[]),b=u.useRef(null),x=u.useRef([]),w=u.useRef(0),M=u.useRef(null),C=u.useRef(null),k=u.useState(""),A=k[0],S=k[1],L=u.useState(""),V=L[0],D=L[1],N=u.useState([]),O=N[0],T=N[1],E=u.useState([]),F=E[0],B=E[1],P=u.useState(!1),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],z=u.useState(),j=z[0],$=z[1],Y=u.useState(),X=Y[0],G=Y[1],U=u.useState(!1),q=U[0],Z=U[1],K=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),J=K[0],Q=K[1],tt=u.useState(""),nt=tt[0],it=tt[1],et=u.useRef(void 0),rt=u.useRef(!1),ot=u.useRef(!1),ut=dh(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;et.current&&!Zs(et.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&Q((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),et.current=null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){var n,i;return{chartContainer:null!==(i=null===(n=M.current)||void 0===n?void 0:n.chartContainer)&&void 0!==i?i:null,toImage:function(n){var i,e;return af([{container:null===(i=M.current)||void 0===i?void 0:i.chartContainer}],t.hideLegend||null===(e=C.current)||void 0===e?void 0:e.toSVG,(0,l.jI)(),n)}}}),[t.hideLegend]);var at=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?zs(t.data.scatterChartData[0].data[0].x,!0):ns.StringAxis,lt=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0&&"string"==typeof t.data.scatterChartData[0].data[0].y?is.StringAxis:is.NumericAxis,st=u.useRef([]);function ct(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?ss(n,0):cs(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){f.current===ct(t.data.scatterChartData)&&t.data===f.current||(st.current=ct(t.data.scatterChartData))}),[t.height,t.width,t.data,f]);var dt=u.useCallback((function(t){b.current=t}),[]);function ft(){B([]),H(!1)}function vt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?Q(n):Q(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ht=u.useCallback((function(n,i){var e=t.theme;return W===i?e.semanticColors.bodyBackground:n}),[W,t]),pt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===ns.NumericAxis?Ts(n,i,e,o,t.xScaleType,!0):u===ns.DateAxis?Ps(n,i,e,o,l,r):Bs(i,e,o)}),[t.xScaleType]),gt=u.useCallback((function(n,i,e,r,o){y.current=r;var u=i instanceof Date?(0,Yn.Yn)(i,t.culture,t.useUTC):i,a=wc(v,i);a?(sl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=h.current)||void 0===t?void 0:t.call(h,i))+w.current,", 0)")})).attr("visibility","visibility"),m.forEach((function(t){t.index===n&&(Z(!0),S(e||""+u),it("#".concat(r)),T(a.values),R(r))}))):R(r)}),[c,h,w,v,m,t.culture,t.useUTC]),yt=u.useCallback((function(n,i,e,r,o,u,a){var l;null==a||a.persist();var s=n instanceof Date?(0,Yn.Yn)(n,t.culture,t.useUTC):n,d=wc(v,n);d?(sl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=h.current)||void 0===t?void 0:t.call(h,n))+w.current,", ").concat(null===(e=g.current)||void 0===e?void 0:e.call(g,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=g.current)||void 0===l?void 0:l.call(g,i)))),y.current!==o&&(y.current=o,Z(!0),S(r||""+s),it("#".concat(o)),T(d.values),$(d),G(d),R(o))):R(o)}),[c,h,w,v,t.culture,t.useUTC]),mt=u.useCallback((function(){sl("#".concat(c)).attr("visibility","hidden")}),[c]),bt=u.useCallback((function(){y.current=null,R(""),q&&Z(!1)}),[y,q,R,Z]),xt=u.useCallback((function(){return J.length>0?J:V?[V]:[]}),[J,V]),wt=u.useCallback((function(){return 0===xt().length}),[xt]),Mt=u.useCallback((function(t){return xt().includes(t)}),[xt]),Ct=u.useCallback((function(n,i){var e,r,o=null===(e=f.current)||void 0===e?void 0:e[n],u=o.data[i],a=u.x instanceof Date?(0,Yn.Yn)(u.x,t.culture,t.useUTC):u.x,l=u.xAxisCalloutData||a,s=o.legend,c=u.yAxisCalloutData||u.y;return(null===(r=u.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(l,". ").concat(s,", ").concat(c,".")}),[f,t.culture,t.useUTC]),kt=u.useCallback((function(n,i){var e,r,l,c,d,v,p,y,m,x,M,C,k,A,S,L,V,D,N,O,T,E,B,P,H,I,R,z,j,$,Y,X,G,U,q,Z,K=[];f.current=_?F:ct(t.data.scatterChartData),at===ns.StringAxis&&(w.current=(null===(e=h.current)||void 0===e?void 0:e.bandwidth())/2);for(var J=null!==(r=di(f.current,(function(t){return di(t.data,(function(t){return t.markerSize}))})))&&void 0!==r?r:0,Q=null!==(l=fi(f.current,(function(t){return fi(t.data,(function(t){return t.markerSize}))})))&&void 0!==l?l:0,tt=at!==ns.StringAxis&&lt!==is.StringAxis,nt=tt?yc({data:f.current,xScale:h.current,yScalePrimary:g.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,it=function(t){for(var n=[],e=null===(v=null===(d=f.current)||void 0===d?void 0:d[t])||void 0===v?void 0:v.legend,r=null===(y=null===(p=f.current)||void 0===p?void 0:p[t])||void 0===y?void 0:y.color,l=i-(null!==(x=null===(m=b.current)||void 0===m?void 0:m.bottom)&&void 0!==x?x:0)+6,c=function(i){var c=null===(S=null===(A=f.current)||void 0===A?void 0:A[t])||void 0===S?void 0:S.data[i],d=c.x,v=c.y,p=c.xAxisCalloutData,y=c.xAxisCalloutAccessibilityData,m=null===(L=h.current)||void 0===L?void 0:L.call(h,d),b=lt===is.StringAxis?(null===(V=g.current)||void 0===V?void 0:V.call(g,v))+((null===(D=g.current)||void 0===D?void 0:D.bandwidth)?g.current.bandwidth()/2:0):null===(N=g.current)||void 0===N?void 0:N.call(g,v);if(!pc(m,b))return"continue";var x="".concat(s,"_").concat(t,"_").concat(i),M="".concat(a,"_").concat(t,"_").concat(i),C=(null===(T=null===(O=f.current)||void 0===O?void 0:O[t])||void 0===T?void 0:T.data[i]).markerSize,k=W===M?6:4;C&&(tt&&0!==Q?k=C*nt/Q:tt||Q===J||(k=4+(C-J)/(Q-J)*12));var F,Y=Mt(e)||wt()||_,X=(null===(B=null===(E=f.current)||void 0===E?void 0:E[t])||void 0===B?void 0:B.hideNonActiveDots)&&W!==M,G=null===(H=null===(P=f.current)||void 0===P?void 0:P[t].data[i])||void 0===H?void 0:H.text;ot.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:M,key:M,r:Math.max(k,4),cx:m+w.current,cy:b,"data-is-focusable":Y,onMouseOver:function(t){return yt(d,v,l,p,M,y,t)},onMouseMove:function(t){return yt(d,v,l,p,M,y,t)},onMouseOut:mt,onFocus:function(){return gt(x,d,p,M,y)},onBlur:mt},(F=null===(z=null===(R=null===(I=f.current)||void 0===I?void 0:I[t])||void 0===R?void 0:R.data[i])||void 0===z?void 0:z.onDataPointClick)?{onClick:F}:{},{opacity:Y&&!X?1:.1,fill:ht(r,M),stroke:r,role:"img","aria-label":Ct(t,i),tabIndex:""!==(null===($=null===(j=f.current)||void 0===j?void 0:j[t])||void 0===$?void 0:$.legend)?0:void 0})))),ot&&G&&n.push(u.createElement("text",{key:"".concat(M,"-label"),x:m+w.current,y:b+Math.max(k+12,16),className:ut.markerLabel},G))},F=0;F<(null===(k=null===(C=null===(M=f.current)||void 0===M?void 0:M[t])||void 0===C?void 0:C.data)||void 0===k?void 0:k.length);F++)c(F);rt.current&&n.push.apply(n,oh({xAxisScale:h.current,yAxisScale:g.current,className:ut.markerLabel||"",lineOptions:null===(X=null===(Y=f.current)||void 0===Y?void 0:Y[t])||void 0===X?void 0:X.lineOptions})),K.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(G=f.current)||void 0===G?void 0:G.length," with ").concat(null===(Z=null===(q=null===(U=f.current)||void 0===U?void 0:U[t])||void 0===q?void 0:q.data)||void 0===Z?void 0:Z.length," data points.")},n))},et=(null===(c=f.current)||void 0===c?void 0:c.length)-1;et>=0;et--)it(et);return K}),[h,g,t.data.scatterChartData,a,Ct,ht,gt,yt,mt,Mt,wt,s,at,lt,W,_,F,ut,t.xScaleType,t.yScaleType]),At=u.useCallback((function(t,n,i,e,r){h.current=t,g.current=n,rt.current=cc(f.current),ot.current=function(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"text"===t.lineOptions.mode}))}(f.current),x.current=kt(r,i)}),[x,h,g,kt]),St=u.useCallback((function(n,i){var e=_s(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=vc(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),Lt=t.legendProps,Vt=t.tickValues,Dt=t.tickFormat;f.current=ct(t.data.scatterChartData);var Nt=f.current;Lt&&Lt.canSelectMultipleLegends&&(Nt=F.length>=1?F:f.current,v=Ss(Nt));var Ot=null;t.hideLegend||ot.current||(Ot=function(n){var i=t.legendProps,e=!(!i||!i.canSelectMultipleLegends),r={};n.forEach((function(t){t.legend&&(r[t.legend]||(r[t.legend]=[]),r[t.legend].push(t))}));var a=Object.entries(r).map((function(t){var n=t[0],i=t[1][0];return(0,o.Cl)({title:n,color:i.color,onMouseOutAction:function(){D("")},hoverAction:function(){bt(),D(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(bf,(0,o.Cl)({ref:C,legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:ft},{onChange:vt},t.legendProps))}(f.current));var Tt=(0,o.Cl)({isCalloutVisible:q,directionalHint:3,YValueHover:O,hoverXValue:A,id:"toolTip".concat(y.current),target:nt,isBeakVisible:!1,gapSpace:15,onDismiss:function(){Z(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&q),descriptionMessage:t.getCalloutDescriptionMessage&&j?t.getCalloutDescriptionMessage(j):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Et={tickValues:Vt,tickFormat:Dt},Ft=f.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Ft));var Bt=function(){var n;if(lt!==is.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=f.current.length-1;e>=0;e--){var r=f.current[e];if(r.data&&Array.isArray(r.data))for(var o=0,u=r.data;o<u.length;o++){var a=u[o];"string"==typeof a.y&&i.add(a.y)}}return Array.from(i)}return lc((n={},f.current.forEach((function(t){t.data&&Array.isArray(t.data)&&t.data.forEach((function(t){"string"==typeof t.y&&(n[t.y]||(n[t.y]=[]),"number"==typeof t.x&&n[t.y].push(t.x))}))})),n),t.yAxisCategoryOrder)}();return t.data&&t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData.filter((function(t){return t.data.length})).length>0?u.createElement(jv,(0,o.Cl)({},t,{ref:M,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Nt,chartType:ts.ScatterChart,calloutProps:Tt,tickParams:Et,legendBars:Ot,getmargins:dt,getMinMaxOfYAxis:St,getDomainNRangeValues:pt,createYAxis:Cs,createStringYAxis:As,getGraphData:At,xAxisType:at,yAxisType:lt},lt===is.StringAxis?{stringDatasetForYAxisDomain:Bt}:{},{onChartMouseLeave:bt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:M},rt.current?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:t.onRenderCalloutPerStack?t.onRenderCalloutPerStack(j):t.onRenderCalloutPerDataPoint?t.onRenderCalloutPerDataPoint(X):null,children:function(t){return h.current=t.xScale,g.current=t.yScalePrimary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:t.containerHeight,stroke:"#323130",id:c,visibility:"hidden",strokeDasharray:"5,5"}),u.createElement("g",null,x.current)))}})):u.createElement("div",{id:d,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));fh.displayName="ScatterChart";var vh=(0,r.I)(fh,(function(t){return{tooltip:sv(t.theme),markerLabel:fv(t.theme)}}));function hh(t,n){if((r=t.length)>1)for(var i,e,r,o=1,u=t[n[0]],a=u.length;o<r;++o)for(e=u,u=t[n[o]],i=0;i<a;++i)u[i][1]+=u[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function ph(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function gh(t,n){return t[n]}function yh(t){const n=[];return n.key=t,n}function mh(t){return t<0?-1:1}function bh(t,n,i){var e=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(e||r<0&&-0),u=(i-t._y1)/(r||e<0&&-0),a=(o*r+u*e)/(e+r);return(mh(o)+mh(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function xh(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function wh(t,n,i){var e=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,r+a*n,o-a,u-a*i,o,u)}function Mh(t){this._context=t}function Ch(t){this._context=t}function kh(t){return new Mh(t)}function Ah(t,n,i){var e=null,r=wf(!0),o=null,u=hl,a=null,l=jf(s);function s(s){var c,d,f,v,h,p=(s=xf(s)).length,g=!1,y=new Array(p),m=new Array(p);for(null==o&&(a=u(h=l())),c=0;c<=p;++c){if(!(c<p&&r(v=s[c],c,s))===g)if(g=!g)d=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),f=c-1;f>=d;--f)a.point(y[f],m[f]);a.lineEnd(),a.areaEnd()}g&&(y[c]=+t(v,c,s),m[c]=+n(v,c,s),a.point(e?+e(v,c,s):y[c],i?+i(v,c,s):m[c]))}if(h)return a=null,h+""||null}function c(){return Cv().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?wv:wf(+t),n="function"==typeof n?n:wf(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?Mv:wf(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:wf(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:wf(+t),s):i},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(i)},s.lineX1=function(){return c().x(e).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:wf(!!t),s):r},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s}Mh.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:wh(this,this._t0,xh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,wh(this,xh(this,i=bh(this,t,n)),i);break;default:wh(this,this._t0,i=bh(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(function(t){this._context=new Ch(t)}.prototype=Object.create(Mh.prototype)).point=function(t,n){Mh.prototype.point.call(this,n,t)},Ch.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,r,o){this._context.bezierCurveTo(n,t,e,i,o,r)}};var Sh,Lh=wi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(Sh||(Sh={}));var Vh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._containsSecondaryYAxis=!1,e._hasDuplicateXValues=!1,e._hasMissingXValues=!1,e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return _s(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Ts(t,n,i,r):o===ns.DateAxis?Ps(t,n,i,r,a,e):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},e._getMargins=function(t){e.margins=t},e._onRectMouseMove=function(t){t.persist();var n=e.props.data.lineChartData,i=e._xAxisRectScale.invert(xv(t)[0],document.getElementById(e._rectId)),r=Lh(n[0].data,i),u=n[0].data[r-1],a=n[0].data[r],l=null,s=null,c=n[0].data.length>0?zs(n[0].data[0].x,!0):null;if(void 0===u&&void 0!==a)l=a.x,s=r;else if(void 0!==u&&void 0===a)l=u.x,s=r-1;else{var d=void 0,f=void 0,v=void 0;switch(c){case ns.DateAxis:d=new Date(i).getTime(),f=u.x.getTime(),v=a.x.getTime(),l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1;break;case ns.NumericAxis:d=i,f=u.x,v=a.x,l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1}}var h=n[0].data[s],p=h.xAxisCalloutData,g=h.xAxisCalloutAccessibilityData,y=l instanceof Date?(0,Yn.Yn)(l,e.props.culture,e.props.useUTC):l,m=wc(e._calloutPoints,l),b=c===ns.DateAxis?l.getTime():l,x=e.state.nearestCircleToHighlight!==b;if(m&&x&&!e.state.isShowCalloutPending){var w=e._getFilteredLegendValues(m.values);e.setState({nearestCircleToHighlight:b,isCalloutVisible:!1,isShowCalloutPending:!0,lineXValue:e._xAxisRectScale(l),displayOfLine:Sh.show,isCircleClicked:!1,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),YValueHover:w,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),hoverXValue:p||y,xAxisCalloutAccessibilityData:g,activePoint:""})}m||e.setState({isCalloutVisible:!1,nearestCircleToHighlight:b,displayOfLine:Sh.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:Sh.hide,isCircleClicked:!1,stackCalloutProps:void 0,dataPointCalloutProps:void 0,hoverXValue:void 0,YValueHover:[]})},e._getDataPoints=function(t,n){var i,r=[],o=0;if(e._shouldFillToZeroY())t.forEach((function(t,i){var e=[];n.forEach((function(n){e.push({values:[0,n[t]],xVal:n.xVal}),n[t]>o&&(o=n[t])})),r.push(e)}));else{var u=function(){var t=wf([]),n=ph,i=hh,e=gh;function r(r){var o,u,a=Array.from(t.apply(this,arguments),yh),l=a.length,s=-1;for(const t of r)for(o=0,++s;o<l;++o)(a[o][s]=[0,+e(t,a[o].key,s,r)]).data=t;for(o=0,u=xf(n(a));o<l;++o)a[u[o]].index=o;return i(a,u),a}return r.keys=function(n){return arguments.length?(t="function"==typeof n?n:wf(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:wf(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?ph:"function"==typeof t?t:wf(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?hh:t,r):i},r}().keys(t)(n);o=fi(u[u.length-1],(function(t){return t[1]})),u.forEach((function(t){var n=[];t.forEach((function(t){n.push({values:t,xVal:t.data.xVal})})),r.push(n)}))}return e._isMultiStackChart=!!((null===(i=e.props.legendProps)||void 0===i?void 0:i.selectedLegends)?(null==r?void 0:r.length)>=1:(null==r?void 0:r.length)>1),{renderData:r,maxOfYVal:e._containsSecondaryYAxis?_s(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=Ss(t);t&&t.length&&t.forEach((function(t){r.push(t.color),o.push(t.opacity||1),n.push.apply(n,t.data)}));var a={};n.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;a[n]?a[n].push(t):a[n]=[t]})),Object.keys(a).forEach((function(t){var n=a[t],e={};n.forEach((function(t,n){e.xVal=t.x,e["chart".concat(n)]=t.y})),i.push(e)}));for(var l=i&&Object.keys(i[0]).length,s=[],c=0;c<l-1;c++){var d="chart".concat(c);s.push(d)}var f=e._getDataPoints(s,i);return{colors:r,opacity:o,keys:s,data:f,calloutPoints:u}}var v=[],h=[],p=[],g=[],y=(u=Ss(t),f={},s=[],0);if(t&&t.length&&t.forEach((function(t){e._hasDuplicateXValues&&!t.legend&&(t.legend="chart".concat(y),++y),t.data.forEach((function(n){n.legend=t.legend})),p.push(t.color),g.push(t.opacity||1),v.push.apply(v,t.data)})),e._hasDuplicateXValues){var m=e._createDatasetForXCoordinateWithMultipleYValues(v);f=e._getDataPoints(m.keys,m.filteredDataSet)}else{for(var b=v,x=function(){var t=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x,n=b.filter((function(n){return(n.x instanceof Date?n.x.toLocaleString():n.x)===t})),i={};n.forEach((function(t,n){i.xVal=t.x,i["chart".concat(n)]=t.y})),h.push(i);var e=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x;b=b.filter((function(t){return(t.x instanceof Date?t.x.toLocaleString():t.x)!==e}))};b.length;)x();for(l=h&&Object.keys(h[0]).length,c=0;c<l-1;c++)d="chart".concat(c),s.push(d);f=e._getDataPoints(s,h)}return{colors:p,opacity:g,keys:s,data:f,calloutPoints:u}},e._createDatasetForXCoordinateWithMultipleYValues=function(t){var n=[],i={};t.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;i[n]||(i[n]=[]),i[n].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];e.forEach((function(t,i){var r={xVal:e[0].x};r[t.legend?t.legend:"chart".concat(i)]=t.y,n.push(r)}))}));var e=[];n.forEach((function(t){Object.keys(t).forEach((function(t){"xVal"===t||e.includes(t)||e.push(t)}))})),n.forEach((function(t){e.forEach((function(n){t[n]||(t[n]=0)}))}));var r=n.filter((function(t){return e.some((function(n){return 0!==t[n]}))}));return{keys:Array.from(new Set(r.flatMap((function(t){return Object.keys(t).filter((function(t){return"xVal"!==t}))})))),filteredDataSet:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._getGraphData=function(t,n,i,r,o,u,a){e._chart=e._drawGraph(i,t,n,a,o)},e._getLegendData=function(t){var n=[];return t.forEach((function(t){var i=t.color;if(!(n.filter((function(n){return n.title===t.legend&&n.color===i})).length>0)){var r={title:t.legend,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(t.legend)},onMouseOutAction:function(){e._onLegendLeave()}};n.push(r)}})),u.createElement(bf,(0,o.Cl)({legends:n,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._onDataPointClick=function(t){t&&t(),e.setState({isCircleClicked:!0})},e._getOpacity=function(t){return e._isMultiStackChart?e._legendHighlighted(t)||e._noLegendHighlighted()?.7:.1:.7},e._getLineOpacity=function(t){if(e._isMultiStackChart){var n=.3;return e.state.isCalloutVisible&&(n=1),e._noLegendHighlighted()||(n=e._legendHighlighted(t)?0:.1),n}return 1},e._updateCircleFillColor=function(t,n,i){var r=n;return e.state.nearestCircleToHighlight!==t&&e.state.activePoint!==i||(e._highlightedCircleId=i,e.state.isCircleClicked||(r=e.props.theme.semanticColors.bodyBackground)),r},e._drawGraph=function(t,n,i,r,a){var l,s=e._addDefaultColors(e.props.data.lineChartData),c=e.props.data,d=c.pointOptions,f=c.pointLineOptions,v=[];e._data.forEach((function(t,a){var l,c,d,f,h,p,g,y,m,b,x,w,M=(null===(l=s[a])||void 0===l?void 0:l.useSecondaryYScale)&&r?r:i,C=uc(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,kh),k=Ah().x((function(t){return n(t.xVal)})).y0((function(t){return M(t.values[0])})).y1((function(t){return M(t.values[1])})).curve(C),A=Cv().x((function(t){return n(t.xVal)})).y((function(t){return M(t.values[1])})).curve(C),S=e._shouldFillToZeroY()?.8:e._opacity[a];v.push(u.createElement(u.Fragment,{key:"".concat(a,"-graph-").concat(e._uniqueIdForGraph)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:"gradient_".concat(a),x1:"0%",x2:"0%",y1:"0%",y2:"100%"},u.createElement("stop",{offset:"0",stopColor:e._colors[a]}),u.createElement("stop",{offset:"100%",stopColor:"transparent"}))),u.createElement("path",{id:"".concat(a,"-line-").concat(e._uniqueIdForGraph),d:A(t),fill:"transparent",strokeWidth:null!==(p=null===(h=null===(f=s[a])||void 0===f?void 0:f.lineOptions)||void 0===h?void 0:h.strokeWidth)&&void 0!==p?p:3,stroke:e._colors[a],opacity:e._getLineOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove,strokeDasharray:null===(y=null===(g=s[a])||void 0===g?void 0:g.lineOptions)||void 0===y?void 0:y.strokeDasharray,strokeDashoffset:null===(b=null===(m=s[a])||void 0===m?void 0:m.lineOptions)||void 0===b?void 0:b.strokeDashoffset,strokeLinecap:null===(w=null===(x=s[a])||void 0===x?void 0:x.lineOptions)||void 0===w?void 0:w.strokeLinecap}),1===t.length?u.createElement("circle",{id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),cx:n(t[0].xVal),cy:M(t[0].values[1]),r:6,stroke:e._colors[a],strokeWidth:3,fill:e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove}):u.createElement("path",(0,o.Cl)({id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),d:k(t),fill:e.props.enableGradient?"url(#gradient_".concat(a,")"):e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e.props.optimizeLargeData&&{"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),role:"img","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")}))))}));var h=d&&d.r?Number(d.r):8;return e._data.forEach((function(t,a){var c;if(s.length!==a){var f=(null===(c=s[a])||void 0===c?void 0:c.useSecondaryYScale)&&r?r:i;e.props.optimizeLargeData&&1!==t.length?t.forEach((function(t,i){var r=t.xVal instanceof Date?t.xVal.getTime():t.xVal;if(e.state.nearestCircleToHighlight===r){var c="".concat(e._circleId,"_").concat(a*e._data[0].length+i);l=s[a].color;var p=s[a].legend;v.push(u.createElement("circle",(0,o.Cl)({key:c,id:c,cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(r,l,c),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),qs(d),{r:e._getCircleRadius(r,h,c,p)})))}})):v.push(u.createElement("g",{key:"".concat(a,"-dots-").concat(e._uniqueIdForGraph),clipPath:"url(#clip)",role:"region","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")},t.map((function(t,i){var r="".concat(e._circleId,"_").concat(a*e._data[0].length+i),c=t.xVal instanceof Date?t.xVal.getTime():t.xVal;l=s[a].color;var v=s[a].legend;return u.createElement("circle",(0,o.Cl)({key:r,id:r,"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(c,l,r),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),{onFocus:function(){return e._handleFocus(a,i,r)},onBlur:e._handleBlur},qs(d),{r:e._getCircleRadius(c,h,r,v),role:"img","aria-label":!e._hasDuplicateXValues&&!e._hasMissingXValues&&e._getAriaLabel(a,i)||void 0}))}))))}})),v.push(u.createElement("line",(0,o.Cl)({id:e._verticalLineId,key:e._verticalLineId,x1:e.state.lineXValue,y1:0,x2:e.state.lineXValue,y2:t,strokeWidth:1,strokeDasharray:5.5,stroke:l,opacity:.5,visibility:e.state.displayOfLine},qs(f)))),v},e._getOnClickHandler=function(t,n,i){return!e._hasDuplicateXValues&&!e._hasMissingXValues&&{onClick:e._onDataPointClick.bind(e,t[n].data[i].onDataPointClick)}},e._getCircleRadius=function(t,n,i,r){var o=e.state,u=o.isCircleClicked,a=o.nearestCircleToHighlight,l=o.activePoint;return e._noLegendHighlighted()||e._legendHighlighted(r)?u&&a===t?1:a===t||l===i?n:0:0},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){if(e._hasMissingXValues){var n=new Set;t&&t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))})),t&&t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||t.data.push({x:"string"==typeof n?new Date(n):n,y:0,legend:t.legend})})),t.data.sort((function(t,n){var i=t.x instanceof Date?t.x.getTime():t.x,e=n.x instanceof Date?n.x.getTime():n.x;return i<e?-1:i>e?1:0}))}))}return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ss(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},e._handleFocus=function(t,n,i){var r=e.props.data.lineChartData[t].data[n],u=r.x,a=r.y,l=r.xAxisCalloutData,s=u instanceof Date?(0,Yn.Yn)(u,e.props.culture,e.props.useUTC):u,c=wc(e._calloutPoints,u);if(c){c.values=c.values.filter((function(t){return t.y===a}));var d=e._getFilteredLegendValues(c.values);e.setState({refSelected:"#".concat(i),isCalloutVisible:!0,hoverXValue:l||s,YValueHover:d,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),activePoint:i})}},e._getFilteredLegendValues=function(t){return e._noLegendHighlighted()?t:t.filter((function(t){return e._legendHighlighted(t.legend)}))},e._handleBlur=function(){e.setState({refSelected:null,isCalloutVisible:!1,hoverXValue:void 0,YValueHover:[],stackCalloutProps:void 0,dataPointCalloutProps:void 0,activePoint:""})},e._getChartTitle=function(){var t=e.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Area chart with ".concat((null==i?void 0:i.length)||0," data series. ")},Ec(e),e._createSet=(0,an.J9)(e._createDataSet),e.state={selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,hoverXValue:"",isCalloutVisible:!1,refSelected:null,YValueHover:[],lineXValue:0,displayOfLine:Sh.hide,isCircleClicked:!1,nearestCircleToHighlight:null,isShowCalloutPending:!1,activePoint:""},En("AREA CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default"}),e._hasMissingXValues=e._containsMissingXValues(),e._uniqueIdForGraph=p("areaChart_"),e._verticalLineId=p("verticalLine_"),e._circleId=p("circle"),e._rectId=p("rectangle"),e._enableComputationOptimization=!0,e._firstRenderOptimization=!0,e._emptyChartId=p("_AreaChart_empty"),e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),this.state.isShowCalloutPending&&this.setState({refSelected:"#".concat(this._highlightedCircleId),isCalloutVisible:!0,isShowCalloutPending:!1})},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props.data.lineChartData,i=this._addDefaultColors(n);this._hasDuplicateXValues=this._xCoordinateContainsMultipleY(),this._containsSecondaryYAxis=!!this.props.secondaryYScaleOptions&&i.some((function(t){return t.useSecondaryYScale}));var e=this._createSet(i),r=e.colors,a=e.opacity,l=e.data,s=e.calloutPoints;this._calloutPoints=s;var c=Os(i);this._colors=r,this._opacity=a,this._data=l.renderData;var d=this._getLegendData(i),f={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat},v=(0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible&&!this._hasDuplicateXValues&&!this._hasMissingXValues,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),gapSpace:15,isBeakVisible:!1,onDismiss:this._closeCallout,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps);return u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:ts.AreaChart,calloutProps:v,legendBars:d,createYAxis:Cs,isCalloutForStack:!0,xAxisType:c?ns.DateAxis:ns.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,getmargins:this._getMargins,getMinMaxOfYAxis:this._getMinMaxOfYAxis,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){t._xAxisRectScale=n.xScale;var i=t._xAxisRectScale.ticks(),e=t._xAxisRectScale(i[i.length-1]),r=n.containerHeight-t.margins.top;return u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("rect",{id:t._rectId,width:e,height:r,fill:"transparent",onMouseMove:t._onRectMouseMove,onMouseOut:t._onRectMouseOut,onMouseOver:t._onRectMouseMove})),u.createElement("g",null,t._chart))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._getAriaLabel=function(t,n){var i,e=this.props.data.lineChartData[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,this.props.culture,this.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n.prototype._xCoordinateContainsMultipleY=function(){var t=this.props.data.lineChartData;if(!t)return!1;for(var n=0,i=t;n<i.length;n++)for(var e={},r=0,o=i[n].data;r<o.length;r++){var u=o[r],a=u.x instanceof Date?u.x.toLocaleString():u.x;if(e[a]||(e[a]=[]),e[a].push(u.y),e[a].length>1)return!0}return!1},n.prototype._containsMissingXValues=function(){var t=this.props.data.lineChartData;if(!t)return!1;var n=new Set;t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))}));var i=!1;return t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||(i=!0)}))})),i},n.prototype._shouldFillToZeroY=function(){return"tozeroy"===this.props.mode||this._containsSecondaryYAxis},n.defaultProps={useUTC:!0},n}(u.Component),Dh=(0,r.I)(Vh,(function(t){return{tooltip:sv(t.theme)}})),Nh=function(t,n){var i,e=t.color;return{arcRoot:{fill:e},arcRootFocussed:{fill:e,stroke:(null==n?void 0:n.palette.black)||It.bp.black,strokeWidth:2},arc:{outline:"none"},arcText:{fill:(null==n?void 0:n.semanticColors.bodyText)||It.bp.black,outline:"none",selectors:(i={},i[It.up]={fill:"CanvasText"},i)}}},Oh=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){Eh(t)},i._onFocus=function(){i.setState({isArcFocused:!0})},i._onBlur=function(){i.setState({isArcFocused:!1})},i.state={isArcFocused:!1},i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Eh(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return Nh(t,n.props.theme)}),(0,o.Cl)({},this.props));return u.createElement("path",{d:i(this.props.data),className:"".concat(this.state.isArcFocused?e.arcRootFocussed:e.arcRoot),onClick:null===(t=this.props.data)||void 0===t?void 0:t.data.onClick})},n.defaultProps={arc:Zf()},n}(u.Component),Th=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var n,i,e=this,r=this.props,o=r.data,l=r.culture,s=Zf().centroid({endAngle:(null==o?void 0:o.endAngle)||0,startAngle:(null==o?void 0:o.startAngle)||0,padAngle:null==o?void 0:o.padAngle,innerRadius:(null===(n=this.props)||void 0===n?void 0:n.outerRadius)||0,outerRadius:(null===(i=this.props)||void 0===i?void 0:i.outerRadius)||4}),c=s[0],d=s[1],f=(0,a.Z)()((function(t){return Nh(t,e.props.theme)})),v=(((null==o?void 0:o.startAngle)||0)+((null==o?void 0:o.endAngle)||0))/2,h="".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l));return u.createElement("g",{className:"".concat(f.arc," arc"),"data-is-focusable":!0,id:this._arcId,onFocus:this._onFocus,onBlur:this._onBlur,"aria-label":h,role:"img"},t.prototype.render.call(this),u.createElement(lv,{content:h,textProps:{x:c+(v>Math.PI?-10:10),y:d+(v>Math.PI/2&&v<3*Math.PI/2?10:-10),dominantBaseline:v>Math.PI/2&&v<3*Math.PI/2?"hanging":"auto",textAnchor:!this._isRTL&&v>Math.PI||this._isRTL&&v<Math.PI?"end":"start","aria-label":"".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l)),className:f.arcText},isTooltipVisibleProp:this.state.isArcFocused,shouldReceiveFocus:!1,maxWidth:40,wrapContent:Vs}))},n}(Oh);function Eh(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Fh,Bh=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(Th,{culture:i.props.culture,key:n,data:t,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:"".concat(i.colors(n)),theme:i.props.theme})},i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=n.width,o=n.height,a=n.chartTitle,l=n.theme,s=[];if(e&&!this.props.colors)for(var c=0;c<e.length;c++)s.push(ss(c,0,null==l?void 0:l.isInverted));var d=this.props.colors,f=void 0===d?s:d;this.colors=Ou().range(f.map((function(t){return cs(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(td,{direction:dc.domOrder},u.createElement("svg",{width:r,height:o,"aria-label":a},u.createElement("g",{className:"pie",transform:h},v.map((function(n,i){return t.arcGenerator(n,i)})))))},n.defaultProps={pie:Pf().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),Ph=(0,a.Z)(),_h=function(t){function n(n){var i=t.call(this,n)||this;return i._emptyChartId=p("_PieChart_empty"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.data,i=t.width,e=t.height,r=t.colors,o=t.chartTitle,a=this.props,l=a.theme,s=a.className,c=a.styles,d=a.culture;this._classNames=Ph(c,{theme:l,width:i,height:e,className:s});var f=Math.min(i-80,e-32)/2;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root},this.props.chartTitle&&u.createElement("p",{className:this._classNames.chartTitle},this.props.chartTitle),u.createElement(Bh,{culture:d,width:i+8,height:e+8,outerRadius:f,innerRadius:1,data:n,colors:r,chartTitle:o,theme:l}))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.y>0})).length>0)},n.defaultProps={data:[],width:600,height:350},n}(u.Component),Hh=(0,r.I)(_h,(function(t){var n=t.className,i=t.theme,e=t.width+30,r=t.height+10;return{root:[i.fonts.medium,"ms-PieChart",n,{width:e+40}],chart:[{padding:20,width:e,height:r,boxSizing:"content-box"}],chartTitle:[(0,o.Cl)((0,o.Cl)({textAlign:"center"},i.fonts.mediumPlus),{color:i.semanticColors.bodyText})]}}));!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(Fh||(Fh={}));var Ih,Wh=(0,a.Z)(),Rh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._adjustProps=function(){var t=i.props,n=t.theme,e=t.className,r=t.styles,o=t.width,u=t.barHeight;i._classNames=Wh(r,{legendColor:i.state.color,theme:n,width:o,className:e,barHeight:u})},i._getLegendData=function(t,n,e){var r=[e.blueLight,e.blue,e.blueMid,e.red,e.black],a=[];return t.forEach((function(t,e){var o=t.chartData.filter((function(t){return!t.placeHolder}));o.length<3?void 0!==n[e]&&n[e]&&o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}})):o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}}))})),u.createElement(bf,(0,o.Cl)({legends:a,overflowProps:i.props.legendsOverflowProps,focusZonePropsInHoverCard:i.props.focusZonePropsForLegendsInHoverCard,overflowText:i.props.legendsOverflowText},i.props.legendProps))},i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i._computeLongestBarTotalValue=function(){var t=0;return i.props.data.forEach((function(n){var i=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0);t=Math.max(t,i)})),t},i.state={isCalloutVisible:!1,refArray:[],selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._onLeave=i._onLeave.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i.barChartSvgRef=u.createRef(),i._emptyChartId=p("_MSBC_empty"),i._barId=p("_MSBC_rect_"),i._barIdPlaceholderPartToWhole=p("_MSBC_rect_partToWhole_"),i._barIdEmpty=p("_MSBC_rect_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.data,e=n.theme,r=n.culture;this._adjustProps();var a=e.palette,l=this._getLegendData(i,this.props.hideRatio,a),s=this.state.isCalloutVisible;this._classNames=Wh(this.props.styles,{legendColor:this.state.color,theme:e,variant:this.props.variant,hideLabels:this.props.hideLabels});var c=this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,d=this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard;this._longestBarTotalValue=this._computeLongestBarTotalValue();var f=i.map((function(n,i){var e=t._createBarsAndLegends(n,t.props.barHeight,a,t.props.hideRatio[i],t.props.hideDenominator[i],t.props.href,i);return u.createElement("div",{key:i,id:"_MSBC_bar-".concat(i)},e)}));return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},f,!this.props.hideLegend&&u.createElement("div",{className:this._classNames.legendContainer},l),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&s),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:c,YValue:d,color:this.state.color,culture:r}))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._createBarsAndLegends=function(t,n,i,e,r,a,l){var s,c,d=this,f=(null===(s=t.chartData)||void 0===s?void 0:s.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,v=this.state.barSpacingInPercent*(f-1),h=this.props.culture,g=[i.blueLight,i.blue,i.blueMid,i.red,i.black],y=[],m=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),b=this.props.variant===Fh.AbsoluteScale?this._longestBarTotalValue:m,x=0;if(t.chartData.map((function(t,n){var i=(t.data?t.data:0)/b*100||0;return i<1&&0!==i?i=1:i>99&&100!==i&&(i=99),x+=i})),this.props.variant===Fh.AbsoluteScale){var w=0===b?0:(b-m)/b*100;w<1&&0!==w?w=1:w>99&&100!==w&&(w=99),x+=w}var M=0!==x?x/(100-v):1,C=0,k=0,A=t.chartData.map((function(t,e){var r,o,s,c,f=t.color?t.color:t.placeHolder?i.neutralLight:g[Math.floor(4*Math.random()+1)],v=f;d.props.enableGradient&&(f=(null===(r=t.gradient)||void 0===r?void 0:r[0])||Nc(e,0,null===(o=d.props.theme)||void 0===o?void 0:o.isInverted)[0],v=(null===(s=t.gradient)||void 0===s?void 0:s[1])||Nc(e,0,null===(c=d.props.theme)||void 0===c?void 0:c.isInverted)[1]);var h=t.data?t.data:0;e>0&&(C+=k),(k=h/b*100?h/b*100:0)<1&&0!==k?k=1/M:k>99&&100!==k?k=99/M:k/=M,y.push(C);var m=d.props.styles,x=!(!d._legendHighlighted(t.legend)&&!d._noLegendHighlighted()),w=t.placeHolder?d.props.theme.semanticColors.bodyText:f;d._classNames=Wh(m,{theme:d.props.theme,shouldHighlight:x,href:a,variant:d.props.variant,hideLabels:d.props.hideLabels});var A=p("MSBC_Gradient")+"_".concat(l,"_").concat(e);return u.createElement("g",{key:e,className:t.placeHolder?d._classNames.placeHolderOnHover:d._classNames.opacityChangeOnHover,ref:function(n){d._refCallback(n,t.legend)},"data-is-focusable":!d.props.hideTooltip&&x,onFocus:d._onBarFocus.bind(d,h,w,t),onBlur:d._onBarLeave,role:"img","aria-label":d._getAriaLabel(t),onMouseOver:d._onBarHover.bind(d,h,w,t),onMouseMove:d._onBarHover.bind(d,h,w,t),onMouseLeave:d._onBarLeave,onClick:a?t.placeHolder?void 0:d._redirectToUrl.bind(d,a):t.onClick},d.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:A},u.createElement("stop",{offset:"0",stopColor:f}),u.createElement("stop",{offset:"100%",stopColor:v}))),u.createElement("rect",{key:e,id:"".concat(d._barId,"-").concat(l,"-").concat(e),x:"".concat(d._isRTL?100-y[e]-k-d.state.barSpacingInPercent*e:y[e]+d.state.barSpacingInPercent*e,"%"),y:0,width:k+"%",height:n,rx:d.props.roundCorners?3:0,fill:d.props.enableGradient?"url(#".concat(A,")"):f}))}));if(this.props.variant!==Fh.AbsoluteScale||this.props.hideLabels)0===t.chartData.length&&A.push(u.createElement("g",{key:0,className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdPlaceholderPartToWhole,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0}))),0===m&&A.push(u.createElement("g",{key:"empty",className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdEmpty,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0})));else{var S=!1,L=0;this._noLegendHighlighted()?(S=!0,L=m):null===(c=t.chartData)||void 0===c||c.forEach((function(t){d._legendHighlighted(t.legend)&&(S=!0,L+=t.data?t.data:0)})),S&&A.push(u.createElement("text",{key:"text",x:"".concat(this._isRTL?100-(y[y.length-1]||0)-k-v:(y[y.length-1]||0)+k+v,"%"),textAnchor:"start",y:n/2,dominantBaseline:"central",transform:"translate(".concat(this._isRTL?-4:4,")"),className:this._classNames.barLabel,"aria-label":"Total: ".concat(L),role:"img"},Ys(L)))}var V=void 0!==e&&e,D=this.props.variant!==Fh.AbsoluteScale&&!V&&2===t.chartData.length,N=this.props.variant!==Fh.AbsoluteScale&&!V&&1===t.chartData.length,O=function(){return(0,Yn.c$)(t.chartData[0].data?t.chartData[0].data:0,h)};return u.createElement("div",{className:this._classNames.singleChartRoot},u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(fd,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),D&&u.createElement("div",(0,o.Cl)({},$s(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},O()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},$s(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:this._classNames.chartWrapper},u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==t?void 0:t.chartTitle},A))))},n.prototype._onBarFocus=function(t,n,i){var e=this;this.state.refArray.forEach((function(r){r.legendText===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._refCallback=function(t,n){this.state.refArray.push({legendText:n,refElement:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&0===this.props.data.filter((function(t){return t.chartData&&0===t.chartData.length&&(!t.chartTitle||""===t.chartTitle)})).length)},n.defaultProps={barHeight:12,hideRatio:[],hideDenominator:[]},n}(u.Component),zh=(0,r.I)(Rh,(function(t){var n,i=t.className,e=t.width,r=t.barHeight,u=t.shouldHighlight,a=t.theme,l=t.href,s=t.variant,c=t.hideLabels;return{root:[a.fonts.medium,"ms-StackedBarChart",{display:"flex",flexDirection:"column",width:e||"100%"},i],items:{marginBottom:"11px"},chart:{width:"100%",height:r||12,display:"block",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},a.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:a.palette.neutralPrimary,marginBottom:s===Fh.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===Fh.AbsoluteScale?"16px":"10px"},opacityChangeOnHover:{opacity:u?"":"0.1",cursor:l?"pointer":"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:a.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:a.palette.neutralPrimary},placeHolderOnHover:{opacity:u?"":"0.1",cursor:"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},legendContainer:{margin:"5px 0px 0px 4px"},noData:{cursor:l?"pointer":"default"},barLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:a.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartWrapper:{paddingRight:s!==Fh.AbsoluteScale||c?0:40}}})),jh=(0,a.Z)(),$h=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i.state={isCalloutVisible:!1,selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._refArray=[],i._onLeave=i._onLeave.bind(i),i._refCallback=i._refCallback.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_SBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){if(!this._isChartEmpty()){this._adjustProps();var t=this.props,n=t.data,i=t.benchmarkData,e=t.targetData,r=t.hideNumberDisplay,a=t.ignoreFixStyle,l=t.culture,s=this.props.theme.palette,c=a||n.chartData.length>2?this.props.barHeight:12;i&&(i.color=i.color||s.neutralTertiary),e&&(e.color=e.color||s.neutralSecondary);var d=this._createBarsAndLegends(n,c,s,i,e),f=!1===r&&!a&&2===n.chartData.length,v=!1===r&&!a&&1===n.chartData.length,h=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),p=0;i&&h&&(p=i.data/h*100);var g=0;e&&h&&(g=e.data/h*100);var y=!1===this.props.hideLegend&&(a||n.chartData.length>2);this._classNames=jh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,benchmarkColor:i?i.color:"",benchmarkRatio:p,targetColor:e?e.color:"",targetRatio:g,showTriangle:!(!i&&!e)});var m=function(){return(0,Yn.c$)(n.chartData[0].data?n.chartData[0].data:0,l)};return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(fd,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},$s(n.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},m()),!this.props.hideDenominator&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(h,l))),v&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},$s(n.chartDataAccessibilityData,"text",!1)),m())),(i||e)&&u.createElement("div",{className:this._classNames.benchmarkContainer},i&&u.createElement("div",{className:this._classNames.benchmark,role:"text"}),e&&u.createElement("div",{className:this._classNames.target,role:"text"}))),u.createElement(td,{direction:dc.horizontal},u.createElement("div",null,u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==n?void 0:n.chartTitle},u.createElement("g",null,d[0]),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,color:this.state.color,culture:l})))))),y&&u.createElement("div",{className:this._classNames.legendContainer},d[1]))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._adjustProps=function(){this._classNames=jh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,width:this.props.width,barHeight:this.props.barHeight,className:this.props.className})},n.prototype._createBarsAndLegends=function(t,n,i,e,r){var a,l=this,s=(null===(a=t.chartData)||void 0===a?void 0:a.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,c=this.state.barSpacingInPercent*(s-1),d=[i.blueLight,i.blue,i.blueMid,i.red,i.black],f=[],v=[],h=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),g=0,y=0,m=0;t.chartData.map((function(t,n){var i=t.data?t.data:0;return(y=i/h*100)<1&&0!==y?y=1:y>99&&100!==y&&(y=99),m+=y}));var b=0!==m?m/(100-c):1,x=t.chartData.map((function(t,i){var e,r,o,a,s=t.color?t.color:d[Math.floor(4*Math.random()+1)],c=s;l.props.enableGradient&&(s=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted)[0],c=(null===(o=t.gradient)||void 0===o?void 0:o[1])||Nc(i,0,null===(a=l.props.theme)||void 0===a?void 0:a.isInverted)[1]);var m=t.data?t.data:0,x={title:t.legend,color:s,action:h>0?function(){l._onClick(t.legend)}:void 0,hoverAction:h>0?function(){l._handleChartMouseLeave(),l._onHover(t.legend)}:void 0,onMouseOutAction:h>0?function(){l._onLeave()}:void 0};t.placeHolder||f.push(x),i>0&&(g+=y),(y=m/h*100)<1&&0!==y?y=1/b:y>99&&100!==y?y=99/b:y/=b,v.push(g);var w=l.props.styles,M=!(!l._legendHighlighted(t.legend)&&!l._noLegendHighlighted()),C=t.placeHolder?l.props.theme.semanticColors.bodyText:s;l._classNames=jh(w,{theme:l.props.theme,shouldHighlight:M,href:l.props.href});var k=p("SBC_Gradient")+"_".concat(i);return u.createElement("g",{key:i,className:l._classNames.opacityChangeOnHover,ref:function(t){l._refCallback(t,x.title)},"data-is-focusable":!l.props.hideTooltip&&M,onFocus:l._onBarFocus.bind(l,m,C,t),onBlur:l._onBarLeave,"aria-label":l._getAriaLabel(t),role:"img",onMouseOver:l._onBarHover.bind(l,m,C,t),onMouseMove:l._onBarHover.bind(l,m,C,t),onMouseLeave:l._onBarLeave,pointerEvents:"all",onClick:l.props.href?l._redirectToUrl.bind(l,l.props.href):t.onClick},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:k},u.createElement("stop",{offset:"0",stopColor:s}),u.createElement("stop",{offset:"100%",stopColor:c}))),u.createElement("rect",{key:i,id:p("_SBC_bar"),x:"".concat(l._isRTL?100-v[i]-y-l.state.barSpacingInPercent*i:v[i]+l.state.barSpacingInPercent*i,"%"),y:0,width:y+"%",height:n,rx:l.props.roundCorners?3:0,fill:l.props.enableGradient?"url(#".concat(k,")"):s}))}));this._addLegend(f,e),this._addLegend(f,r);var w=u.createElement(bf,(0,o.Cl)({legends:f,enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps));return[0===h?[this._generateEmptyBar(n,this.props.barBackgroundColor?this.props.barBackgroundColor:i.neutralLight)]:x,w]},n.prototype._onBarFocus=function(t,n,i){var e=this;this._refArray.forEach((function(r){r.index===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._addLegend=function(t,n){if(n){var i={title:n.legend,color:n.color,shape:"triangle"};t.push(i)}},n.prototype._generateEmptyBar=function(t,n){return u.createElement("g",{key:0,className:this._classNames.opacityChangeOnHover},u.createElement("rect",{key:0,id:p("_SBC_empty_bar_"),x:"0%",y:0,width:"100%",height:t,fill:n}))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.length>0)},n.defaultProps={barHeight:12,hideNumberDisplay:!1,hideLegend:!1,ignoreFixStyle:!1},n}(u.Component),Yh=(0,r.I)($h,(function(t){var n,i,e=t.className,r=t.width,u=t.barHeight,a=t.shouldHighlight,l=t.theme,s=t.href,c=t.benchmarkColor,d=t.benchmarkRatio,f=t.targetColor,v=t.targetRatio,h=t.showTriangle;return{root:[l.fonts.medium,"ms-StackedBarChart",{width:r||"100%",display:"flex",flexDirection:"column"},e],chart:{width:"100%",height:u||12,display:"block",marginBottom:h?"16px":"10px",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},l.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:l.palette.neutralPrimary,marginBottom:"5px"},legendContainer:{margin:"4px 0px 0px 4px"},opacityChangeOnHover:{opacity:a?"":"0.1",cursor:s?"pointer":"default",selectors:{"&:focus":{stroke:l.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:l.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:l.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},benchmark:{position:"absolute",left:"calc("+d+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c,marginBottom:"4px",selectors:(n={},n[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(c,", ").concat(c,")")},n)},target:{position:"absolute",left:"calc("+v+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:f,marginBottom:"4px",selectors:(i={},i[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(f,", ").concat(f,")")},i)}}})),Xh=function(t){if(!(t.length<2)){t=t.sort((function(t,n){return t instanceof Date?t.getTime()-n.getTime():t-n}));for(var n=Number.MAX_VALUE,i=1;i<t.length;i++){var e=t[i]instanceof Date?t[i].getTime()-t[i-1].getTime():t[i]-t[i-1];n=Math.min(n,e)}return[n,t[0]instanceof Date?t[t.length-1].getTime()-t[0].getTime():t[t.length-1]-t[0]]}},Gh=function(t,n,i){var e=Xh(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1];return Math.floor(n*r*(1-i)/(o+r*(1-i)))},Uh=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},qh=function(t,n){return t+n/(1-n)*(t-1)},Zh=function(t,n,i){return t*qh(n,i)},Kh=function(t,n,i){return t/qh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(Ih||(Ih={}));var Jh=(0,a.Z)(),Qh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?function(t,n,i,e){var r=fi(t,(function(t){return t.x})),o=di(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}:{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}}(t,n,i,r):o===ns.DateAxis?Ps(t,n,i,r,a,e):Bs(n,i,r)},e._createLine=function(t,n,i,r,o){var a;void 0===i&&(i=0),void 0===r&&(r=0);var l=e._xAxisType===ns.StringAxis,s=e._getScales(i,r).xBarScale,c=e._createColors(),d=e.props.theme,f=e.props,v=f.data,h=f.lineLegendColor,g=void 0===h?d.palette.yellow:h,y=f.lineLegendText,m=[],b=[];v&&v.forEach((function(t,n){var i;t.lineData&&t.lineData.y&&m.push({x:t.x,y:t.lineData.y,useSecondaryYScale:null!==(i=t.lineData.useSecondaryYScale)&&void 0!==i&&i,point:t,index:n})}));var x=Cv().x((function(n){return l?s(n.x)+.5*s.bandwidth():t(n.x)})).y((function(t){return t.useSecondaryYScale&&o?o(t.y):n(t.y)})),w=!(!e._legendHighlighted(y)&&!e._noLegendHighlighted()),M=(null===(a=e.props.lineOptions)||void 0===a?void 0:a.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0;M>0&&b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3+2*M,stroke:d.semanticColors.bodyBackground})),b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3,stroke:g}));var C=m.map((function(i,r){var a,d={refElement:null};return u.createElement("circle",{key:r,id:p("_VBC_point_"),cx:l?s(i.x)+.5*s.bandwidth():t(i.x),cy:i.useSecondaryYScale&&o?o(i.y):n(i.y),onMouseOver:e._legendHighlighted(y)?e._lineHover.bind(e,i.point):e._onBarHover.bind(e,i.point,c(i.y)),onMouseOut:e._onBarLeave,r:e._getCircleVisibilityAndRadius(i.x,y).radius,stroke:g,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,visibility:e._getCircleVisibilityAndRadius(i.x,y).visibility,onClick:null===(a=i.point.lineData)||void 0===a?void 0:a.onClick,"data-is-focusable":e._legendHighlighted(y),ref:function(t){d.refElement=t},onFocus:e._lineFocus.bind(e,i.point,d),onBlur:e._handleChartMouseLeave})}));return u.createElement(u.Fragment,null,b,C)},e._getCircleVisibilityAndRadius=function(t,n){var i=e.state.activeXdataPoint;return e._noLegendHighlighted()?{visibility:i===t?Ih.show:Ih.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:Ih.show,radius:8}:e._legendHighlighted(n)?{visibility:Ih.show,radius:.3}:{visibility:Ih.hide,radius:0}},e._checkForLine=function(){return e.props.data.some((function(t){var n;return void 0!==(null===(n=null==t?void 0:t.lineData)||void 0===n?void 0:n.y)}))},e._getMargins=function(t){e.margins=t},e._renderContentForBothLineAndBars=function(t){var n=e._getCalloutContentForLineAndBar(t),i=n.YValueHover,r=n.hoverXValue,a=i.map((function(t,n){return u.createElement(Cc.ChartHoverCard,(0,o.Cl)({key:n,Legend:t.legend},0===n&&{XValue:"".concat(r||t.data)},{color:t.color,YValue:t.data||t.y,culture:e.props.culture}))}));return u.createElement(u.Fragment,null,a)},e._renderContentForOnlyBars=function(t){var n=e.props.useSingleColor,i=void 0!==n&&n;return u.createElement(u.Fragment,null,u.createElement(Cc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x,Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:!i&&t.color?t.color:e._createColors()(t.y),culture:e.props.culture}))},e._renderCallout=function(t){return t?e._isHavingLine?e._renderContentForBothLineAndBars(t):e._renderContentForOnlyBars(t):null},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._getGraphData=function(t,n,i,r,o){return e._bars=e._xAxisType===ns.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===ns.DateAxis?e._createDateBars(i,r,o):e._createStringBars(i,r,o)},e._refCallback=function(t,n){e._refArray.push({index:n,refElement:t})},e._getCalloutContentForLineAndBar=function(t){var n,i,r,o,u,a=[],l=e.props,s=l.theme,c=l.useSingleColor,d=void 0!==c&&c,f=l.enableGradient,v=e.props,h=v.data,p=v.lineLegendText,g=v.lineLegendColor,y=void 0===g?s.palette.yellow:g,m=h.filter((function(n){return n.x===t.x})),b=h.indexOf(m[0]),x=d?e._createColors()(1):m[0].color?m[0].color:e._createColors()(m[0].y);e._isHavingLine&&void 0!==(null===(n=m[0].lineData)||void 0===n?void 0:n.y)&&(e._legendHighlighted(p)||e._noLegendHighlighted())&&a.push({legend:p,color:y,y:null===(i=m[0].lineData)||void 0===i?void 0:i.y,data:null===(r=m[0].lineData)||void 0===r?void 0:r.yAxisCalloutData,yAxisCalloutData:null===(o=m[0].lineData)||void 0===o?void 0:o.yAxisCalloutData}),(e._legendHighlighted(m[0].legend)||e._noLegendHighlighted())&&a.push({legend:m[0].legend,y:m[0].y,color:f?d?Nc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||Nc(b,0)[0]:x,data:m[0].yAxisCalloutData,yAxisCalloutData:m[0].yAxisCalloutData});var w=t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString();return{YValueHover:a,hoverXValue:t.xAxisCalloutData||w}},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},e._onBarFocus=function(t,n,i){var r=e._getCalloutContentForLineAndBar(t),o=r.YValueHover,u=r.hoverXValue;e._refArray.forEach((function(r,a){r.index===t.legend&&n===a&&e.setState({refSelected:r.refElement,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.y,color:t.color||i,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:o,hoverXValue:u,callOutAccessibilityData:t.callOutAccessibilityData})}))},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){var i=e.props.theme,r=e.props,o=r.lineLegendText,u=void 0===o?"":o,a=r.lineLegendColor,l=void 0===a?i.palette.yellow:a;e.setState({refSelected:n,isCalloutVisible:!0,calloutLegend:u,dataForHoverCard:t.lineData.y,color:l,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.lineData.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x})},e._getScales=function(t,n){var i,r=Gu().domain([e.props.supportNegativeData?e._yMin:0,e._yMax]).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===ns.NumericAxis){var o=fi(e._points,(function(t){return t.x})),u=di(e._points,(function(t){return t.x}));i=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),Us(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===ns.DateAxis){var a=di(e._points,(function(t){return t.x})),l=fi(e._points,(function(t){return t.x}));(i=e.props.useUTC?Au():ku()).domain([a,l]).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin])}else i=Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding);return{xBarScale:i,yBarScale:r}},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(t,n){var i=e.props,r=i.theme,a=i.useSingleColor,l=e.props,s=l.lineLegendText,c=l.lineLegendColor,d=void 0===c?r.palette.yellow:c,f=[],v={};if(t.forEach((function(t,n){var i,o,u,l=a?e._createColors()(1):t.color;if(e.props.enableGradient){var s=Math.max((null===(i=e.props.data)||void 0===i?void 0:i.findIndex((function(n){return n.legend===t.legend})))||0,0);l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=Nc(0,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0])}v[t.legend]=l})),Object.entries(v).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};f.push(r)})),e._isHavingLine&&s&&d){var h={title:s,color:d,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(s)},onMouseOutAction:function(){e._onLegendLeave()},isLineLegendInBarChart:!0};f.unshift(h)}return u.createElement(bf,(0,o.Cl)({legends:f,enabledWrapLines:e.props.enabledLegendsWrapLines,overflowProps:e.props.legendsOverflowProps,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard,overflowText:e.props.legendsOverflowText},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0),e._yMin=Math.min(n[0],e.props.yMinValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t){var n,i,r,o=t.xAxisCalloutData?t.xAxisCalloutData:t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x,u=t.legend,a=t.yAxisCalloutData||t.y,l=e.props.lineLegendText||"Line",s=(null===(n=t.lineData)||void 0===n?void 0:n.yAxisCalloutData)||(null===(i=t.lineData)||void 0===i?void 0:i.y);return(null===(r=t.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(o,". ")+(u?"".concat(u,", "):"")+"".concat(a,".")+(void 0!==s?" ".concat(l,", ").concat(s,"."):"")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i={};null===(n=e.props.data)||void 0===n||n.forEach((function(t){t.x instanceof Date?i[t.x.getTime()]=t.x:i[t.x]=t.x}));var r=Object.values(i),u=Uh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Us(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth),u>=(f=Zh(e._barWidth,r.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(u-f)/2);else if(["plotly","histogram"].includes(e.props.mode)&&r.length>1){var a=Kh(u,r.length,e._xAxisInnerPadding),l=Xs(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=Zh(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=Ds(r)+20;c=(u-(f=(r.length-e._xAxisInnerPadding)*d))/2}e._domainMargin=8+Math.max(0,Math.min(s,c))}}else{if("histogram"===e.props.mode){l=e.props.maxBarWidth;var f=Zh(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,Gh(r,Uh(t,e.margins,e._domainMargin),e._xAxisInnerPadding),e.props.mode),e._domainMargin+=e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," bars")+(e._isHavingLine?" and 1 line":"")+". "},e._getOrderedXAxisLabels=function(){return e._xAxisType!==ns.StringAxis?[]:lc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(){var t={};return e._points.forEach((function(n){var i=n.x;t[i]||(t[i]=[]),t[i].push(n.y),n.lineData&&t[i].push(n.lineData.y)})),t},Ec(e),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",calloutLegend:""},e._isHavingLine=e._checkForLine(),e._calloutId=p("callout"),e._refArray=[],e._emptyChartId=p("_VBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._xAxisLabels=this._getOrderedXAxisLabels(),this._yMax=Math.max(fi(this._points,(function(t){return t.y})),this.props.yMaxValue||0),this._yMin=Math.min(di(this._points,(function(t){return t.y})),this.props.yMinValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=Jh(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1},this._isHavingLine&&{YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue}),{gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0}),this.props.calloutProps),$s(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:ts.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:Cs,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:dc.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:As,getmargins:this._getMargins,getMinMaxOfYAxis:Hs,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Us(this.props.xAxisInnerPadding,this.props.xAxisPadding)&&"histogram"!==this.props.mode,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),t._isHavingLine&&u.createElement("g",null,t._createLine(n.xScale,n.yScalePrimary,n.containerHeight,n.containerWidth,n.yScaleSecondary)))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._xAxisType=this.props.data&&this.props.data.length>0?zs(this.props.data[0].x,!0):ns.StringAxis,this._points=this.props.data||[],this._barWidth=Xs(this.props.barWidth,this.props.maxBarWidth,void 0,this.props.mode);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark],this._isHavingLine=this._checkForLine(),this._xAxisInnerPadding="histogram"===this.props.mode?0:Gs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=Gs(this.props.xAxisOuterPadding,this.props.xAxisPadding,0)},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._yMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForLineAndBar(t),r=e.YValueHover,o=e.hoverXValue;this._calloutAnchorPoint!==t&&(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:this._noLegendHighlighted()||this._legendHighlighted(t.legend),dataForHoverCard:t.y,calloutLegend:t.legend,color:t.color||n,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,this.props.culture,this.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:this._noLegendHighlighted()||this._legendHighlighted(t.legend)?t.x:null,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._calculateMinBarHeight=function(t,n,i,e){var r=n<0?Math.abs(t-i):Math.max(Math.abs(n-i),Math.abs(t-i));return Math.ceil(e(r)/100)},n.prototype._createNumericBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Jh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Nc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Nc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Nc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b,n.barLabel))}));return f},n.prototype._createStringBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=e._legendHighlighted(n.legend)||e._noLegendHighlighted();e._classNames=Jh(e.props.styles,{theme:e.props.theme,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x),C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d);e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,l.bandwidth(),e.props.mode);var A=n.color?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Nc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Nc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Nc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i),transform:"translate(".concat(.5*(l.bandwidth()-e._barWidth),", 0)")},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,height:w,"aria-label":e._getAriaLabel(n),role:"img",ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),onMouseLeave:e._onBarLeave,onBlur:e._onBarLeave,"data-is-focusable":!e.props.hideTooltip&&y,onFocus:e._onBarFocus.bind(e,n,i,A),fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b,n.barLabel))}));return f},n.prototype._createDateBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Jh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Nc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Nc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Nc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b,n.barLabel))}));return f},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._renderBarLabel=function(t,n,i,e,r,o){if(this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted())return null;var a=void 0!==o?o:"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):Ys(i);return u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},a)},n.prototype._isChartEmpty=function(){return 0===this._points.length||this._points.every((function(t){return 0===t.y}))&&!this._isHavingLine},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default"},n}(u.Component),tp=(0,r.I)(Qh,(function(t){var n=t.shouldHighlight,i=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1"},xAxisTicks:[],yAxisTicks:[{transform:"scaleX(-1)"}],yAxisDomain:[{transform:"scaleX(-1)"}],tooltip:sv(i),barLabel:dv(i)}})),np=(0,a.Z)(),ip=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.Y_ORIGIN=0,e._yAxisLabels=[],e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._toFocusWholeStack=function(t){var n=e.props.isCalloutForStack,i=void 0!==n&&n;return t?1!==e._getHighlightedLegend().length:i},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?function(t,n,i,e){var r=di(t,(function(t){return t.x})),o=fi(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}:{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}}(t,n,i,r):o===ns.DateAxis?Ps(t,n,i,r,a,e):Bs(n,i,r)},e._getFormattedLineData=function(t){var n=[],i={};return t.forEach((function(t,i){t.lineData&&t.lineData.forEach((function(e){n.push((0,o.Cl)((0,o.Cl)({},e),{index:i,xItem:t}))}))})),n.forEach((function(t){i[t.legend]?i[t.legend].push(t):i[t.legend]=[t]})),i},e._getLineLegends=function(t){var n=e._lineObject,i=[];return Object.keys(n).forEach((function(t){i.push({title:t,color:n[t][0].color})})),i},e._createLines=function(t,n,i,r,a){var l,s=e._getFormattedLineData(e.props.data),c=[],d=[],f=[],v=e.props.theme,h=(null===(l=e.props.lineOptions)||void 0===l?void 0:l.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0,p=e._xAxisType!==ns.StringAxis?0:t.bandwidth()/2;return Object.keys(s).forEach((function(i,r){for(var o,l,f,g,y,m=e._isLegendHighlighted(i)||e._noLegendHighlighted(),b=1;b<s[i].length;b++){var x=t(s[i][b-1].xItem.xAxisPoint),w=s[i][b-1].useSecondaryYScale&&s[i][b].useSecondaryYScale&&a,M=w?a(s[i][b-1].y):n(s[i][b-1].y),C=t(s[i][b].xItem.xAxisPoint),k=w?a(s[i][b].y):n(s[i][b].y),A=w||e._yAxisType!==is.StringAxis?0:n.bandwidth()/2;h>0&&d.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-BorderLine"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:3+2*h,fill:"transparent",strokeLinecap:"round",stroke:v.semanticColors.bodyBackground,transform:"translate(".concat(p,", ").concat(A,")")})),c.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-line"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:null!==(l=null===(o=s[i][0].lineOptions)||void 0===o?void 0:o.strokeWidth)&&void 0!==l?l:3,strokeLinecap:null!==(g=null===(f=s[i][0].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=s[i][0].lineOptions)||void 0===y?void 0:y.strokeDasharray,stroke:s[i][b].color,transform:"translate(".concat(p,", ").concat(A,")"),onMouseOver:e._lineHover.bind(e,s[i][b-1]),onMouseLeave:e._handleMouseOut}))}})),Object.keys(s).forEach((function(i,r){s[i].forEach((function(l,s){var c={refElement:null},d=0===l.xItem.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length,v=l.useSecondaryYScale||e._yAxisType!==is.StringAxis?0:n.bandwidth()/2;f.push(u.createElement("circle",(0,o.Cl)({key:"".concat(r,"-").concat(s,"-dot"),cx:t(l.xItem.xAxisPoint),cy:l.useSecondaryYScale&&a?a(l.y):n(l.y),onMouseOver:e._lineHover.bind(e,l),onMouseLeave:e._handleMouseOut,r:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).radius,stroke:l.color,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,opacity:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).opacity,transform:"translate(".concat(p,", ").concat(v,")"),ref:function(t){c.refElement=t}},d&&(e._noLegendHighlighted()||e._isLegendHighlighted(i))?{"data-is-focusable":!e.props.hideTooltip,onFocus:e._lineFocus.bind(e,l,c),onBlur:e._handleMouseOut,role:"img","aria-label":e._getAriaLabel(l.xItem,l,!0)}:{})))}))})),u.createElement(u.Fragment,null,d,c,f)},e._getCircleOpacityAndRadius=function(t,n){var i=e.state.activeXAxisDataPoint;return e._noLegendHighlighted()?{opacity:i===t?1:0,radius:8}:t===i&&e._isLegendHighlighted(n)?{opacity:1,radius:8}:e._isLegendHighlighted(n)?{opacity:1,radius:.3}:{opacity:0,radius:0}},e._getMargins=function(t){e.margins=t},e._getCustomizedCallout=function(){var t=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0}));return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint&&!t?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){1===e._getHighlightedLegend().length?(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))&&e.setState({refSelected:n,isCalloutVisible:!0,xCalloutValue:"".concat(t.xItem.xAxisPoint),yCalloutValue:"".concat(t.yAxisCalloutData||t.data||t.y),activeXAxisDataPoint:t.xItem.xAxisPoint,color:t.color}):e._onStackHoverFocus(t.xItem,n)},e._handleMouseOut=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXAxisDataPoint:""})},e._createBar=function(t,n,i,r){var a=e.props,l=a.barCornerRadius,s=void 0===l?0:l,c=a.barMinimumHeight,d=void 0===c?0:c,f=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),v=e._toFocusWholeStack(f);e._xAxisType===ns.StringAxis&&(e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===ns.NumericAxis||(e._xAxisType,ns.DateAxis),r.xAxisPoint)),c=e._xAxisType!==ns.StringAxis?-e._barWidth/2:(t.bandwidth()-e._barWidth)/2,f=0,h=r.chartData.filter((function(t){return 0!==t.data&&""!==t.data&&!(e._yAxisType===is.StringAxis&&void 0===n(t.data))}));if(h.length){var g=e._getBarGapAndScale(h,n),y=g.gapHeight,m=g.heightValueScale,b=g.absStackTotal;if(!(m<0)){var x=i-e.margins.bottom-(e._yAxisType===is.StringAxis?0:n(e.Y_ORIGIN)),w=x,M=x,C=0,k=0,A=h.map((function(t,g){var x,A,S,L,V=t.color?t.color:e._colors[g],D=V;e.props.enableGradient&&(V=(null===(x=t.gradient)||void 0===x?void 0:x[0])||Nc(g,0,null===(A=e.props.theme)||void 0===A?void 0:A.isInverted)[0],D=(null===(S=t.gradient)||void 0===S?void 0:S[1])||Nc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=V);var N={},O=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=np(e.props.styles,{theme:e.props.theme,shouldHighlight:O,href:e.props.href});var T,E=!v&&O&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r,t),onMouseOver:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseMove:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseLeave:e._handleMouseOut,onFocus:e._onRectFocus.bind(e,t,r.xAxisPoint,V,N),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,t),role:"img"},F=g?y:0;if(e._yAxisType===is.StringAxis)T=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,d,1),C=w-=T+F;else{T=Math.abs(m*t.data);var B=Math.max(m*b/100,d);T<B&&(T=B),t.data>=e.Y_ORIGIN?C=w-=T+F:M=(C=M+F)+T,f+=t.data,k=g===h.length-1?T:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&T>s&&g===h.length-1?u.createElement(u.Fragment,{key:g+a+"".concat(v)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("path",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,d:"\n M ".concat(l," ").concat(C+s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(-s,"\n h ").concat(e._barWidth-2*s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(s,"\n v ").concat(T-s,"\n h ").concat(-e._barWidth,"\n z\n "),fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):T<0?u.createElement(u.Fragment,{key:g+a}," "):u.createElement(u.Fragment,{key:g+a},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,x:l,y:C,width:e._barWidth,height:T,fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t}},E,{transform:"translate(".concat(c,", 0)")})))})),S={},L=r.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length>0,V=v&&L&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r),onMouseOver:e._onStackHover.bind(e,r),onMouseMove:e._onStackHover.bind(e,r),onMouseLeave:e._handleMouseOut,onFocus:e._onStackFocus.bind(e,r,S),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,r),role:"img"},D=!1,N=0,O=0,T=void 0;if(!e.props.hideLabels&&e._yAxisType!==is.StringAxis){var E=h.filter((function(t){return t.barLabel&&(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))}));1===E.length&&(T=E[0].barLabel),e._noLegendHighlighted()?(D=!0,N=null!=T?T:f,O=f):(h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(D=!0,O+=t.data)})),N=null!=T?T:O)}return u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){S.refElement=t}},V),A),!e.props.hideLabels&&e._barWidth>=16&&D&&u.createElement("text",{x:l+e._barWidth/2,y:O>=e.Y_ORIGIN?C-6:C+k+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-label":"Total: ".concat(N),role:"img",transform:"translate(".concat(c,", 0)")},"string"==typeof N?N:"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):Ys(N)))}}}));return h.filter((function(t){return!!t}))},e._getScales=function(t,n){var i=[Math.min(e.Y_ORIGIN,e._yMin),Math.max(e.Y_ORIGIN,e._yMax)],r=Gu().domain(i).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===ns.NumericAxis){var o=fi(e._dataset,(function(t){return t.x})),u=di(e._dataset,(function(t){return t.x})),a=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]);return Us(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===ns.DateAxis){var l=di(e._dataset,(function(t){return t.x})),s=fi(e._dataset,(function(t){return t.x})),c=e.props.useUTC?Au():ku();return c.domain(e._isRtl?[s,l]:[l,s]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),{xBarScale:c,yBarScale:r}}return{xBarScale:Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding),yBarScale:r}},e._getGraphData=function(t,n,i,r,o){var u=e._getScales(i,r),a=u.xBarScale,l=u.yBarScale;return e._bars=e._createBar(a,e._yAxisType===is.StringAxis?n:l,i,o)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||e.Y_ORIGIN),e._yMin=Math.min(n[0],e.props.yMinValue||e.Y_ORIGIN)}},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n,i){var r,o,u;if(!n){var a=t.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),l=t.chartData.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" "),s=null===(r=t.lineData)||void 0===r?void 0:r.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data||t.y;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" ");return(null===(o=t.stackCallOutAccessibilityData)||void 0===o?void 0:o.ariaLabel)||"".concat(a,". ").concat(l)+(s?" ".concat(s):"")}var c=t.xAxisCalloutData||!i&&n.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),d=n.legend,f=n.yAxisCalloutData||(i?n.data||n.y:n.data);return!i&&(null===(u=n.callOutAccessibilityData)||void 0===u?void 0:u.ariaLabel)||"".concat(c,". ").concat(d,", ").concat(f,".")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i=Uh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Us(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth),i>=(r=Zh(e._barWidth,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(i-r)/2);else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=Kh(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=Xs(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=Zh(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=Ds(e._xAxisLabels)+20,c=(i-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*s))/2;e._domainMargin=8+Math.max(0,Math.min(l,c))}}else{var d=(null===(n=e.props.data)||void 0===n?void 0:n.map((function(t){return t.xAxisPoint})))||[];e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,Gh(d,i,e._xAxisInnerPadding)),e._domainMargin=8+e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data,r=Object.keys(e._lineObject).length;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," stacked bars")+(r>0?" and ".concat(r," lines"):"")+". "},e._getMinMaxOfYAxis=function(t,n,i){if(!i)return function(t){var n=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:n}}(t);var r=[];return e.props.data.forEach((function(t){var n;null===(n=t.lineData)||void 0===n||n.forEach((function(t){t.useSecondaryYScale&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}},e._initYAxisParams=function(){e._points[0].chartData.length>0?e._yAxisType=zs(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=zs(e._lineObject[t][0].y,!1))})),e._yAxisLabels=e._getOrderedYAxisLabels()},e._getYDomainMargins=function(t){var n=0,i=t-e.margins.bottom-e.margins.top;if(e._yAxisType===is.StringAxis){var r=0;e._points.forEach((function(t){var n=0;t.chartData.forEach((function(t){n+=e._yAxisLabels.indexOf("".concat(t.data))+1})),r=Math.max(r,n)})),n+=(0===r?0:i/r)*(r-e._yAxisLabels.length)}return(0,o.Cl)((0,o.Cl)({},e.margins),{top:e.margins.top+n})},e._getOrderedXAxisLabels=function(){return e._xAxisType!==ns.StringAxis?[]:lc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==is.StringAxis?[]:lc(e._mapCategoryToValues(!0),e.props.yAxisCategoryOrder)},e._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return e._points.forEach((function(i){var e;i.chartData.forEach((function(e){var r=t?e.data:i.xAxisPoint,o=t?i.xAxisPoint:e.data;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)})),null===(e=i.lineData)||void 0===e||e.forEach((function(e){if(!t||!e.useSecondaryYScale){var r=t?e.y:i.xAxisPoint,o=t?i.xAxisPoint:e.y;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)}}))})),n},Ec(e),e.state={isCalloutVisible:!1,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,refSelected:null,dataForHoverCard:0,color:"",hoverXValue:"",YValueHover:[],xCalloutValue:"",yCalloutValue:"",activeXAxisDataPoint:"",calloutLegend:""},En("VERTICAL STACKED BAR CHART",n,{colors:"IVSChartDataPoint.color",chartLabel:"use your own title for chart"}),e._handleMouseOut=e._handleMouseOut.bind(e),e._calloutId=p("callout"),e._isChartEmpty()||(e._adjustProps(),e._dataset=e._createDataSetLayer()),e._createLegendsForLine=(0,an.J9)((function(t){return e._getLineLegends(t)})),e._emptyChartId=p("_VSBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._adjustProps(),this._dataset=this._createDataSetLayer())},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){this._adjustProps();var n=this.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),i=this._toFocusWholeStack(n),e=this.props.isCalloutForStack,r=void 0!==e&&e;this._dataset=this._createDataSetLayer();var a=this._getLegendData(this._points,this.props.theme.palette,this._createLegendsForLine(this.props.data));this._classNames=np(this.props.styles,{theme:this.props.theme,href:this.props.href});var l=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),$s(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:ts.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:Cs,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,barwidth:this._barWidth,focusZoneDirection:r||n?dc.horizontal:dc.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Us(this.props.xAxisInnerPadding,this.props.xAxisPadding),yAxisType:this._yAxisType,stringDatasetForYAxisDomain:(0,o.fX)([""],this._yAxisLabels,!0),getYDomainMargins:this._getYDomainMargins,children:function(i){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),u.createElement("g",null,n&&t._createLines(i.xScale,i.yScalePrimary,i.containerHeight,i.containerWidth,i.yScaleSecondary)))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){var t;this._points=this.props.data||[],this._barWidth=Xs(this.props.barWidth,this.props.maxBarWidth);var n=this.props.theme.palette;this._colors=this.props.colors||[n.blueLight,n.blue,n.blueMid,n.red,n.black];var i=null===(t=this._points[0])||void 0===t?void 0:t.xAxisPoint;this._xAxisType=_l(i)?ns.StringAxis:zs(i,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=Gs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=Gs(this.props.xAxisOuterPadding,this.props.xAxisPadding,0),this._initYAxisParams()},n.prototype._createDataSetLayer=function(){var t=this,n=this._points.map((function(n){if(t._yAxisType===is.StringAxis)return{x:n.xAxisPoint,y:0};var i=0;return n.chartData.forEach((function(t){i+=t.data})),{x:n.xAxisPoint,y:i}}));return this._xAxisLabels=this._getOrderedXAxisLabels(),n},n.prototype._renderCallout=function(t){return t?u.createElement(Cc.ChartHoverCard,{XValue:t.xAxisCalloutData,Legend:t.legend,YValue:t.yAxisCalloutData,color:t.color,culture:this.props.culture}):null},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._getLegendData=function(t,n,i){var e=this;if(this.props.hideLegend)return u.createElement(u.Fragment,null);var r=[n.blueLight,n.blue,n.blueMid,n.red,n.black],a=[],l=this.props,s=l.allowHoverOnLegend,c=void 0===s||s,d=l.theme;t.forEach((function(t){t.chartData.forEach((function(n){var i,o,u=n.color?n.color:r[Math.floor(4*Math.random()+1)];if(e.props.enableGradient){var l=Math.max((null===(i=t.chartData)||void 0===i?void 0:i.findIndex((function(t){return t.legend===n.legend})))||0,0);u=(null===(o=n.gradient)||void 0===o?void 0:o[0])||Nc(l,0,null==d?void 0:d.isInverted)[0]}if(!(a.filter((function(t){return t.title===n.legend&&t.color===u})).length>0)){var s={title:n.legend,color:u,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(n.legend)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};a.push(s)}}))}));var f=[];i&&i.length>0&&i.forEach((function(t){var n={title:t.title,color:t.color,isLineLegendInBarChart:!0,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(t.title)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};f.push(n)}));var v=a.concat(f);return u.createElement(bf,(0,o.Cl)({legends:v,overflowProps:this.props.legendsOverflowProps,enabledWrapLines:this.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._onRectHover=function(t,n,i,e){e.persist(),this._onRectFocusHover(t,n,i,e)},n.prototype._onRectFocusHover=function(t,n,i,e){var r,o;if((null===(r=this._calloutAnchorPoint)||void 0===r?void 0:r.chartDataPoint)!==n||(null===(o=this._calloutAnchorPoint)||void 0===o?void 0:o.xAxisDataPoint)!==t){this._calloutAnchorPoint={chartDataPoint:n,xAxisDataPoint:t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString()};var u=n.xAxisCalloutData||(t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString());this.setState({refSelected:e,isCalloutVisible:this._noLegendHighlighted()||this._isLegendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:i,xCalloutValue:u,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._onStackHover=function(t,n){n.persist(),this._onStackHoverFocus(t,n)},n.prototype._onStackHoverFocus=function(t,n){var i,e,r,u=this;this._noLegendHighlighted()||(t=(0,o.Cl)((0,o.Cl)({},t),{chartData:t.chartData.filter((function(t){return u._isLegendHighlighted(t.legend)})),lineData:null===(i=t.lineData)||void 0===i?void 0:i.filter((function(t){return u._isLegendHighlighted(t.legend)}))}));var a=t.lineData,l=void 0!==a&&a.length>0;l&&a.forEach((function(t){t.data=t.data||t.y,t.shouldDrawBorderBottom=!0})),this.setState({refSelected:n,isCalloutVisible:t.chartData.length>0||(null!==(r=null===(e=t.lineData)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0,YValueHover:l?(0,o.fX)((0,o.fX)([],a.sort((function(t,n){return t.data<n.data?1:-1})),!0),t.chartData.slice().reverse(),!0):t.chartData.slice().reverse(),hoverXValue:t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,this.props.culture,this.props.useUTC):t.xAxisPoint,stackCalloutProps:t,activeXAxisDataPoint:t.xAxisPoint,callOutAccessibilityData:t.stackCallOutAccessibilityData})},n.prototype._onRectFocus=function(t,n,i,e){e.refElement&&this._onRectFocusHover(n,t,i,e.refElement)},n.prototype._onStackFocus=function(t,n){n.refElement&&this._onStackHoverFocus(t,n.refElement)},n.prototype._onClick=function(t,n){var i,e;null===(e=(i=this.props).onBarClick)||void 0===e||e.call(i,n,t),this.props.href&&Qf(this.props.href)&&(window.location.href=this.props.href)},n.prototype._getBarGapAndScale=function(t,n,i){var e,r,o=this.props.barGapMax,u=void 0===o?0:o,a=0,l=0;this._yAxisType===is.StringAxis?e=null!=i?i:t.reduce((function(t,i){return t+n(i.data)}),0):(a=t.reduce((function(t,n){return t+Math.abs(n.data)}),0),e=null!=i?i:Math.abs(n(a)-n(this.Y_ORIGIN)),t.forEach((function(t){var n=Math.abs(t.data)/a*100;n<1&&0!==n&&(n=1),l+=n})),r=0!==l?l/100:1);var s=u&&t.length-1,c=s&&Math.max(1,Math.min(u,.2*e/s));return{gapHeight:c,heightValueScale:this._yAxisType===is.StringAxis?0:(e-c*s)/(a*r),absStackTotal:a}},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.some((function(t){return t.chartData.length>0||t.lineData&&t.lineData.length>0})))},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),ep=(0,r.I)(ip,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:sv(e),barLabel:dv(e)}})),rp=(0,a.Z)(),op=.1,up=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e._legendColorMap={},e.Y_ORIGIN=0,e._uniqDotId=p("gvbc_dot_"),e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getMinMaxOfYAxis=function(t,n,i){var e=[];return t.forEach((function(t){t.groupSeries.forEach((function(t){!i==!t.useSecondaryYScale&&e.push(t.data)}))})),{startValue:di(e),endValue:fi(e)}},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis||o===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Bs(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=Xs(e.props.barwidth,e.props.maxBarWidth,Kh(l.bandwidth(),e._barLegends.length,op)),e._groupWidth=Zh(e._barWidth,e._barLegends.length,op);var s=e._createX1Scale(),c=[];e._datasetForBars.forEach((function(t){c.push(e._buildGraph(t,l,s,n,a,i,o))})),e._groupedVerticalBarGraph=c},e._getMargins=function(t){return e.margins=t},e._createDataSetOfGVBC=function(t,n){var i=new Set;t.forEach((function(t){t.series.forEach((function(t){i.add(t.legend)}))}));var r=new Set(n.map((function(t){return t.legend}))),o=e._getOrderedXAxisLabels(t,n),u=e._createDataset(t,n);return{barLegends:Array.from(i),lineLegends:Array.from(r),xAxisLabels:o,datasetForBars:u}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._onBarHover=function(t,n,i){i.persist(),e._calloutAnchorPoint!==t&&(e._calloutAnchorPoint=t,e._showCallout(i,t,n))},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1})},e._onBarFocus=function(t,n,i){e._showCallout(i.currentTarget,t,n)},e._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},e._buildGraph=function(t,n,i,r,o,a,l){var s=[],c=[],d=e._barLegends.filter((function(n){return n in t})),f=Zh(e._barWidth,d.length,op),v=Tu().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(op);return e._barLegends.forEach((function(n,i){var a,l=t[n];if(l){var d=l[0].useSecondaryYScale&&o?o:r,f=(null!==(a=v(n))&&void 0!==a?a:0)+(v.bandwidth()-e._barWidth)/2,h=e._legendHighlighted(n)||e._noLegendHighlighted(),g=h?"":"0.1",y=0,m=d(e.Y_ORIGIN),b=m,x=m,w=e.Y_ORIGIN;l.forEach((function(n,r){var o,a;if(n.data){var l=p("GVBC_Gradient")+"_".concat(t.indexNum,"_").concat(i,"_").concat(r);if(e.props.enableGradient){var v=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,m=(null===(a=n.gradient)||void 0===a?void 0:a[1])||n.color;s.push(u.createElement("defs",{key:"defs_".concat(l)},u.createElement("linearGradient",{id:l,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0%",stopColor:v}),u.createElement("stop",{offset:"100%",stopColor:m}))))}var M=.5*(r>0?2:0),C=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),k=n.color;n.data>=e.Y_ORIGIN?w=b-=C+M:x=(w=x+M)+C,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:C,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):k,rx:e.props.roundCorners?3:0,onMouseOver:e._onBarHover.bind(e,n,t),onMouseMove:e._onBarHover.bind(e,n,t),onMouseOut:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,t),onBlur:e._onBarLeave,onClick:e.props.href?e._redirectToUrl.bind(e,e.props.href):n.onClick,"aria-label":e._getAriaLabel(n,t.xAxisPoint),role:"img"})),n.barLabel&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r,"-label"),x:f+e._barWidth/2,y:n.data>=e.Y_ORIGIN?w-6:w+C+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},n.barLabel)),y+=n.data}})),null!==y&&!e.props.hideLabels&&e._barWidth>=16&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i),x:f+e._barWidth/2,y:y>=e.Y_ORIGIN?b-6:x+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(y):Ys(y)))}})),u.createElement("g",{key:t.indexNum,transform:"translate(".concat(n(t.xAxisPoint)+(n.bandwidth()-f)/2,", 0)")},s,c)},e._createDataset=function(t,n){var i=[],e={},r=new Set;return n.forEach((function(t){t.data.forEach((function(n){e[n.x]||(e[n.x]=[]),e[n.x].push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,data:n.y,useSecondaryYScale:t.useSecondaryYScale}))}))})),t.forEach((function(t,n){var u,a={},l={};t.series.forEach((function(t){a[t.legend]?(a[t.legend].push((0,o.Cl)({},t)),l[t.legend].data+=t.data):(a[t.legend]=[(0,o.Cl)({},t)],l[t.legend]=(0,o.Cl)({},t))})),a.xAxisPoint=t.name,a.indexNum=n,a.groupSeries=(0,o.fX)((0,o.fX)([],Object.values(l),!0),null!==(u=e[t.name])&&void 0!==u?u:[],!0),a.stackCallOutAccessibilityData=t.stackCallOutAccessibilityData,i.push(a),r.add(t.name)})),Object.keys(e).forEach((function(t){r.has(t)||i.push({xAxisPoint:t,groupSeries:e[t]})})),i},e._createX0Scale=function(t){return Tu().domain(e._xAxisLabels).range(e._isRtl?[t-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,t-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding)},e._createX1Scale=function(){return Tu().domain(e._barLegends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(op)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(){var t=[],n=function(n,i){var r={title:n,color:e._legendColorMap[n][0],isLineLegendInBarChart:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};t.push(r)};return e._lineLegends.forEach((function(t){return n(t,!0)})),e._barLegends.forEach((function(t){return n(t)})),u.createElement(bf,(0,o.Cl)({legends:t,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n){var i,e=t.xAxisCalloutData||n,r=t.legend,o=t.yAxisCalloutData||t.data;return(null===(i=t.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(e,". ").concat(r,", ").concat(o,".")},e._getDomainMargins=function(t){e._domainMargin=8;var n=Uh(t,e.margins,8);if(e._xAxisType===ns.StringAxis)if(Us(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=Xs(e.props.barwidth,e.props.maxBarWidth);var i=Zh(e._barWidth,e._barLegends.length,op);n>=(r=Zh(i,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(n-r)/2)}else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=Kh(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=Kh(u,e._barLegends.length,op),l=Xs(e.props.barwidth,e.props.maxBarWidth,a),s=(i=Zh(l,e._barLegends.length,op),(n-(r=Zh(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=Ds(e._xAxisLabels)+20,d=(n-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*c))/2;e._domainMargin=8+Math.max(0,Math.min(s,d))}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Vertical bar chart with ".concat(e._barLegends.length," grouped bar series")+(e._lineLegends.length>0?" and ".concat(e._lineLegends.length," line series. "):". ")},e._adjustColor=function(t,n,i,e){var r=i?e?"#000000":"#ffffff":e?"#ffffff":"#000000";return Po(Gu().domain([0,1]).range([t,r])(n)).formatRgb()},e._prepareChartData=function(){var t,n,i,r,u=e.props.data;Array.isArray(e.props.dataV2)&&e.props.dataV2.length>0&&(u=(t=e._processDataV2(e.props.dataV2)).barData,r=t.lineData),e._legendColorMap={};var a=0;return{barData:null!==(n=null==u?void 0:u.map((function(t){var n,i;return(0,o.Cl)((0,o.Cl)({},t),{series:null!==(i=null===(n=t.series)||void 0===n?void 0:n.map((function(t){var n,i,r,u,l,s,c,d=t.color?t.color:ss(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted),f=d;if(e.props.enableGradient)if(t.color)d=e._adjustColor(t.color||f,.2,!1,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),f=e._adjustColor(t.color||d,.2,!0,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted);else{var v=Nc(a,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted);d=(null===(l=t.gradient)||void 0===l?void 0:l[0])||v[0],f=(null===(s=t.gradient)||void 0===s?void 0:s[1])||v[1]}var h=[d,f];return e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[d,f]),a+=1,(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:null!==(c=t.color)&&void 0!==c?c:e._legendColorMap[t.legend][0]}),e.props.enableGradient?{gradient:h}:{})})))&&void 0!==i?i:[]})})))&&void 0!==n?n:[],lineData:null!==(i=null==r?void 0:r.map((function(t){var n,i,r;return r=void 0===t.color?ss(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted):cs(t.color,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[r,r]),a+=1,(0,o.Cl)((0,o.Cl)({},t),{color:e._legendColorMap[t.legend][0]})})))&&void 0!==i?i:[]}},e._getOrderedXAxisLabels=function(t,n){return e._xAxisType!==ns.StringAxis?[]:lc(e._mapCategoryToValues(t,n),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(t,n){var i={};return t.forEach((function(t){i[t.name]||(i[t.name]=[]),t.series.forEach((function(n){i[t.name].push(n.data)}))})),n.forEach((function(t){t.data.forEach((function(t){i[t.x]||(i[t.x]=[]),i[t.x].push(t.y)}))})),i},e._createLines=function(t,n,i,r){var o=[],a=[],l=[],s=function(t){return n(t)+n.bandwidth()/2};return t.forEach((function(t,n){var c,d=[],f=[],v=[],h=(null===(c=t.lineOptions)||void 0===c?void 0:c.lineBorderWidth)?Number.parseFloat(t.lineOptions.lineBorderWidth.toString()):0,p=t.useSecondaryYScale&&r?r:i,g=e._legendHighlighted(t.legend)||e._noLegendHighlighted();t.data.forEach((function(i,r){var o,a,l,c,y,m,b,x=s(i.x),w=p(i.y);if(r>0){var M=s(t.data[r-1].x),C=p(t.data[r-1].y);h>0&&d.push(u.createElement("line",{key:"lineBorder-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,fill:"transparent",stroke:null!==(a=null===(o=t.lineOptions)||void 0===o?void 0:o.lineBorderColor)&&void 0!==a?a:e.props.theme.semanticColors.bodyBackground,strokeWidth:3+2*h,strokeLinecap:"round",opacity:g?1:.1})),f.push(u.createElement("line",{key:"line-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,stroke:t.color,strokeWidth:null!==(c=null===(l=t.lineOptions)||void 0===l?void 0:l.strokeWidth)&&void 0!==c?c:3,strokeLinecap:null!==(m=null===(y=t.lineOptions)||void 0===y?void 0:y.strokeLinecap)&&void 0!==m?m:"round",strokeDasharray:null===(b=t.lineOptions)||void 0===b?void 0:b.strokeDasharray,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave}))}var k=e._getDotId(n,r),A=e.state.activeLinePoint,S=A===i.x||A===k;v.push(u.createElement("circle",{key:k,id:k,cx:x,cy:w,r:g&&S?8:.3,fill:e.props.theme.semanticColors.bodyBackground,stroke:t.color,strokeWidth:3,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave,"data-is-focusable":g,onFocus:function(i){return e._onLineFocus(i,t,n,r)},onBlur:e._onBarLeave,role:"img","aria-label":e._getAriaLabel({xAxisCalloutData:i.xAxisCalloutData,legend:t.legend,yAxisCalloutData:i.yAxisCalloutData,data:i.y,callOutAccessibilityData:i.callOutAccessibilityData},i.x)}))})),o.push(u.createElement("g",{key:"lineBorderGroup-".concat(n)},d)),a.push(u.createElement("g",{key:"lineGroup-".concat(n)},f)),l.push(u.createElement("g",{key:"dotGroup-".concat(n)},v))})),l.length>0?u.createElement("g",null,o.length>0?u.createElement("g",null,o):null,a.length>0?u.createElement("g",null,a):null,u.createElement("g",null,l)):null},e._onLineHover=function(t,n,i,r,o){var u=xv(t,e._rectRef.current)[0],a=r;if(r>0){var l=o(n.data[r].x),s=o(n.data[r-1].x);Math.abs(s-u)<Math.abs(l-u)&&(a=r-1)}t.persist(),e._showCalloutForLines(t,n,i,a)},e._onLineFocus=function(t,n,i,r){e._showCalloutForLines(t.currentTarget,n,i,r)},e._showCalloutForLines=function(t,n,i,r){var u=n.data[r],a=(0,o.Cl)((0,o.Cl)({},u),{legend:n.legend,color:n.color,key:n.legend,data:u.y,yAxisCalloutData:u.yAxisCalloutData}),l=e._datasetForBars.find((function(t){return t.xAxisPoint===u.x}));e._showCallout(t,a,l,e._getDotId(i,r))},e._showCallout=function(t,n,i,r){var o,u;void 0===r&&(r=""),e.setState({refSelected:t,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:n.color,xCalloutValue:null!==(o=n.xAxisCalloutData)&&void 0!==o?o:i.xAxisPoint,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:e.props.isCalloutForStack?i.stackCallOutAccessibilityData:n.callOutAccessibilityData,YValueHover:i.groupSeries.filter((function(t){return e._noLegendHighlighted()||e._legendHighlighted(t.legend)})),hoverXValue:null!==(u=n.xAxisCalloutData)&&void 0!==u?u:i.xAxisPoint,activeLinePoint:e.props.isCalloutForStack?i.xAxisPoint:r})},e._getDotId=function(t,n){return e._uniqDotId+"-".concat(t,"-").concat(n)},e._processDataV2=function(t){var n={},i=[];return t.forEach((function(t){"bar"===t.type?t.data.forEach((function(i){var e,r;n[i.x]||(n[i.x]={name:i.x,series:[]}),n[i.x].series.push({key:null!==(e=t.key)&&void 0!==e?e:t.legend,data:i.y,color:null!==(r=i.color)&&void 0!==r?r:t.color,gradient:t.gradient,legend:t.legend,xAxisCalloutData:i.xAxisCalloutData,yAxisCalloutData:i.yAxisCalloutData,onClick:i.onClick,useSecondaryYScale:t.useSecondaryYScale})})):"line"===t.type&&i.push(t)})),{barData:Object.values(n),lineData:i}},Ec(e),e._createSet=(0,an.J9)((function(t,n){return e._createDataSetOfGVBC(t,n)})),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],xCalloutValue:"",yCalloutValue:"",YValueHover:[],hoverXValue:"",calloutLegend:"",activeLegend:"",activeLinePoint:""},En("GROUPED VERTICAL BAR CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default",showXAxisPath:"Dont use this property. Axis line removed default.",showYAxisPath:"Dont use this property. No need to display Y axis path. Handling default",showXAxisGridLines:"Dont use this property. Handling with default value.",legendColor:"Dont use this property. colour will pick from given data."}),e._calloutId=p("callout"),e._emptyChartId=p("_GVBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e._rectRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t,n,i,e,r=this,a=this._prepareChartData(),l=a.barData,s=a.lineData,c=null!==(n=null===(t=l[0])||void 0===t?void 0:t.name)&&void 0!==n?n:null===(e=null===(i=s[0])||void 0===i?void 0:i.data[0])||void 0===e?void 0:e.x;this._xAxisType=_l(c)?ns.StringAxis:zs(c,!0);var d=this._createSet(l,s),f=d.barLegends,v=d.lineLegends,h=d.xAxisLabels,p=d.datasetForBars;this._barLegends=f,this._lineLegends=v,this._xAxisLabels=h,this._datasetForBars=p;var g=this._getLegendData();this._adjustProps();var y=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(y,this.props.yMaxValue||0),this._classNames=rp(this.props.styles,{theme:this.props.theme,href:this.props.href});var m=(0,o.Cl)((0,o.Cl)((0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),gapSpace:15,isBeakVisible:!1,setInitialFocus:!0,color:this.state.color,Legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout},this.props.calloutProps),{preventDismissOnLostFocus:!0}),$s(this.state.callOutAccessibilityData,"text",!1)),b={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty(l,s)?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:ts.GroupedVerticalBarChart,calloutProps:m,legendBars:g,xAxisType:this._xAxisType,createYAxis:Cs,datasetForXAxisDomain:this._xAxisLabels,tickParams:b,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:As,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:dc.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(t){return u.createElement(u.Fragment,null,u.createElement("rect",{ref:r._rectRef,width:"100%",height:"100%",fill:"transparent",style:{pointerEvents:"none"}}),u.createElement("g",null,r._groupedVerticalBarGraph),r._createLines(s,t.xScale,t.yScalePrimary,t.yScaleSecondary))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(t,n){return!(t&&t.length>0&&t.filter((function(t){return t.series.length})).length>0||n&&n.length>0&&n.some((function(t){return t.data.length>0})))},n.prototype._adjustProps=function(){this._barWidth=Xs(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=Gs(this.props.xAxisInnerPadding,void 0,2/(2+qh(this._barLegends.length,op))),this._xAxisOuterPadding=Gs(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),ap=(0,r.I)(up,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:sv(n),barLabel:dv(n)}})),lp=i(263),sp=(0,a.Z)(),cp=function(t){function n(n){var i,e,r=t.call(this,n)||this;return r._rectRefArray={},r.toImage=function(t){var n,i;return af([{container:null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],r.props.hideLegend||null===(i=r._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},r._getMinMaxOfYAxis=function(){return{startValue:0,endValue:0}},r._getDomainNRangeValues=function(t,n,i,e,o,u,a,l){return u===ns.NumericAxis||u===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Bs(r.margins,i,o)},r._getXandY=function(){var t="",n="";return r.props.data.forEach((function(i){if(i.data&&i.data.length>0)return t=i.data[0].x,n=i.data[0].y,{x:t,y:n}})),{x:t,y:n}},r._getMargins=function(t){r.margins=t},r._getOpacity=function(t){return r._legendHighlighted(t)||r._noLegendHighlighted()?"1":"0.1"},r._rectRefCallback=function(t,n,i){r._rectRefArray[n]={data:i,refElement:t}},r._onRectFocus=function(t,n){r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData})},r._onRectMouseOver=function(t,n,i){i.persist(),r._calloutAnchorPoint!==n&&(r._calloutAnchorPoint=n,r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData}))},r._onRectBlurOrMouseOut=function(){},r._handleChartMouseLeave=function(){r._calloutAnchorPoint=null,r.setState({isCalloutVisible:!1})},r._createRectangles=function(){var t=[];return r._stringYAxisDataPoints.slice().reverse().forEach((function(n){var i=0;r._stringXAxisDataPoints.forEach((function(e){var o,a,l,s="x".concat(e,"y").concat(n);if((null===(o=r._dataSet[n][i])||void 0===o?void 0:o.x)===e&&"number"==typeof(null===(a=r._dataSet[n][i])||void 0===a?void 0:a.value)){var c=r._dataSet[n][i],d=sc(r._colorScale(c.value),r.props.theme);l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(c),"data-is-focusable":r._legendHighlighted(c.legend)||r._noLegendHighlighted(),fillOpacity:r._getOpacity(c.legend),transform:"translate(".concat(r._xAxisScale(c.x),", ").concat(r._yAxisScale(c.y),")"),ref:function(t){r._rectRefCallback(t,s,c)},onFocus:r._onRectFocus.bind(r,s,c),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,c),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:r._colorScale(c.value),width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth(),onClick:c.onClick}),u.createElement("text",{dominantBaseline:"middle",textAnchor:"middle",className:r._classNames.text,transform:"translate(".concat(r._xAxisScale.bandwidth()/2,", ").concat(r._yAxisScale.bandwidth()/2,")"),fill:d},(0,Yn.c$)(c.rectText,r.props.culture,r.props.useUTC))),i++}else{var f={x:e,y:n,value:NaN,rectText:"No data available",legend:""};l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(f),"data-is-focusable":r._noLegendHighlighted(),transform:"translate(".concat(r._xAxisScale(f.x),", ").concat(r._yAxisScale(f.y),")"),ref:function(t){r._rectRefCallback(t,s,f)},onFocus:r._onRectFocus.bind(r,s,f),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,f),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:"transparent",width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth()}))}t.push(l)}))})),t},r._createLegendBars=function(){var t=r.props,n=t.data,i=t.legendProps,e=[];return n.forEach((function(t){var n={title:t.legend,color:r._colorScale(t.value),action:function(){r._onLegendClick(t.legend)},hoverAction:function(){r._handleChartMouseLeave(),r._onLegendHover(t.legend)},onMouseOutAction:function(){r._onLegendLeave()}};e.push(n)})),u.createElement(bf,(0,o.Cl)({},i,{legends:e,ref:r._legendsRef}))},r._getColorScale=function(){var t=r.props,n=t.domainValuesForColorScale,i=t.rangeValuesForColorScale;return Gu().domain(n).range(i)},r._getXIndex=function(t){return r._xAxisType===ns.DateAxis?"".concat(t.getTime()):r._xAxisType===ns.StringAxis?t:r._xAxisType===ns.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===is.DateAxis?"".concat(t.getTime()):r._yAxisType===is.StringAxis?t:r._yAxisType===is.NumericAxis?"".concat(t):""},r._createNewDataSet=function(t,n,i,e,u){var a=[];t.forEach((function(t){t.data.forEach((function(n){a.push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend}))}))}));var l={},s={},c={};return a.forEach((function(t){var n=r._getXIndex(t.x),i=r._getYIndex(t.y);c[n]="1",s[i]="1",l[i]?l[i]=(0,o.fX)((0,o.fX)([],l[i],!0),[t],!1):l[i]=[t]})),Object.keys(l).forEach((function(t){l[t]=r._getOrderedXPoints(l[t]),l[t].forEach((function(t){r._xAxisType===ns.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===ns.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===ns.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===is.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===is.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===is.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===is.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===is.NumericAxis?l["".concat(r._getStringFormattedNumber(t,u))]=l[t]:l[r._getFormattedLabelForYAxisDataPoint(t)]=l[t]})),{dataSet:l,yAxisPoints:r._getYAxisDataPoints(s),xAxisPoints:r._getXAxisDataPoints(c)}},r._getXAxisDataPoints=function(t){return r._getOrderedXAxisLabels(t).map((function(t){return r._xAxisType===ns.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===ns.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===is.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===is.NumericAxis?r._getStringFormattedNumber(t,r.props.yAxisNumberFormatString):r._getFormattedLabelForYAxisDataPoint(t)}))},r._getStringFormattedDate=function(t,n){var i=new Date;return i.setTime(+t),Xe(n||"%b/%d")(i)},r._getStringFormattedNumber=function(t,n){return ju(n||".2~s")(+t)},r._getFormattedLabelForXAxisDataPoint=function(t){var n=r.props.xAxisStringFormatter;return n?n(t):t},r._getFormattedLabelForYAxisDataPoint=function(t){var n=r.props.yAxisStringFormatter;return n?n(t):t},r._closeCallout=function(){r.setState({isCalloutVisible:!1})},r._legendHighlighted=function(t){return r.state.selectedLegend===t||""===r.state.selectedLegend&&r.state.activeLegend===t},r._noLegendHighlighted=function(){return""===r.state.selectedLegend&&""===r.state.activeLegend},r._getAriaLabel=function(t){var n,i=t.x,e=t.y,r=t.legend,o=t.ratio?"".concat(t.ratio[0],"/").concat(t.ratio[1]):t.rectText||t.value,u=t.descriptionMessage;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,", ").concat(e,". ").concat(r,", ").concat(o,".")+(u?" ".concat(u,"."):"")},r._getChartTitle=function(){var t=r.props.chartTitle,n=r.props.data.reduce((function(t,n){return t+n.data.length}),0);return(t?"".concat(t,". "):"")+"Heat map chart with ".concat(n," data points. ")},r._getOrderedXAxisLabels=function(t){return r._shouldOrderXAxisLabelsByCategoryOrder()?lc(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===ns.DateAxis||r._xAxisType===ns.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?lc(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===is.DateAxis||r._yAxisType===is.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedXPoints=function(t){if(!r._shouldOrderXAxisLabelsByCategoryOrder())return t.sort((function(t,n){return r._xAxisType===ns.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===ns.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===ns.NumericAxis?+t.x>+n.x?1:-1:t.x>n.x?1:-1}));var n=[],i={};return t.forEach((function(t){var n=t.x;i[n]||(i[n]=[]),i[n].push(t)})),r._getOrderedXAxisLabels({}).forEach((function(t){i[t]&&n.push.apply(n,i[t])})),n},r._shouldOrderXAxisLabelsByCategoryOrder=function(){return r._xAxisType===ns.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===is.StringAxis&&"default"!==r.props.yAxisCategoryOrder},r._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return r.props.data.forEach((function(i){i.data.forEach((function(i){var e=t?i.y:i.x;n[e]||(n[e]=[]),n[e].push(i.value)}))})),n},Ec(r),r._createSet=(0,an.J9)((function(t,n,i,e,o){return r._createNewDataSet(t,n,i,e,o)})),r.state={selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",activeLegend:"",isCalloutVisible:!1,target:null,calloutLegend:"",calloutTextColor:"",calloutYValue:"",ratio:null,descriptionMessage:"",calloutId:""},r._emptyChartId=p("_HeatMap_empty"),r._cartesianChartRef=u.createRef(),r._legendsRef=u.createRef(),r}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)!==(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&this.setState({selectedLegend:null!==(r=null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegend)&&void 0!==r?r:""})},n.prototype.render=function(){var t=this,n=this._getXandY(),i=n.x,e=n.y;this._xAxisType=zs(i,!0),this._yAxisType=zs(e,!1);var r=this.props,a=r.data,l=r.xAxisDateFormatString,s=r.xAxisNumberFormatString,c=r.yAxisDateFormatString,d=r.yAxisNumberFormatString;this._colorScale=this._getColorScale();var f=this._createSet(a,l,s,c,d),v=f.dataSet,h=f.xAxisPoints,p=f.yAxisPoints;this._dataSet=v,this._stringYAxisDataPoints=p,this._stringXAxisDataPoints=h,this._classNames=sp(this.props.styles,{theme:this.props.theme});var g=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isBeakVisible:!1,gapSpace:8},this.props.calloutProps),{isCalloutVisible:this.state.isCalloutVisible,id:this.state.calloutId,YValue:this.state.calloutYValue,legend:this.state.calloutLegend,color:this.state.calloutTextColor,target:this.state.target,styles:this._classNames.subComponentStyles.calloutStyles,directionalHint:3,onDismiss:this._closeCallout}),$s(this.state.callOutAccessibilityData,"text",!1)),{preventDismissOnLostFocus:!0,calloutMaxWidth:238}),y=(0,o.Cl)((0,o.Cl)({},this.state.ratio&&{ratio:this.state.ratio}),{descriptionMessage:this.state.descriptionMessage}),m={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:ts.HeatMapChart,xAxisType:ns.StringAxis,yAxisType:is.StringAxis,calloutProps:g,createYAxis:Cs,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:As,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:dc.bidirectional},legendBars:this._createLegendBars(),onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,tickParams:m,children:function(n){return t._xAxisScale=n.xScale,t._yAxisScale=n.yScalePrimary,t._createRectangles()}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n.defaultProps={xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),dp=(0,r.I)(cp,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),fp=/[\{\}]/g,vp=/\{\d+\}/g;function hp(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(vp,(function(t){var n=e[t.replace(fp,"")];return null==n&&(n=""),n}))}function pp(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function gp(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function yp(t,n){return n-1-t.height}function mp(t,n){return t.sourceLinks.length?t.depth:n-1}function bp(t){return function(){return t}}function xp(t,n){return Mp(t.source,n.source)||t.index-n.index}function wp(t,n){return Mp(t.target,n.target)||t.index-n.index}function Mp(t,n){return t.y0-n.y0}function Cp(t){return t.value}function kp(t){return t.index}function Ap(t){return t.nodes}function Sp(t){return t.links}function Lp(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function Vp({nodes:t}){for(const n of t){let t=n.y0,i=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const t of n.targetLinks)t.y1=i+t.width/2,i+=t.width}}function Dp(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=kp,c=mp,d=Ap,f=Sp,v=6;function h(){const h={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const e=new Map(t.map(((n,i)=>[s(n,i,t),n])));for(const[t,i]of n.entries()){i.index=t;let{source:n,target:r}=i;"object"!=typeof n&&(n=i.source=Lp(e,n)),"object"!=typeof r&&(r=i.target=Lp(e,r)),n.sourceLinks.push(i),r.targetLinks.push(i)}if(null!=i)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(i),e.sort(i)}(h),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(pp(n.sourceLinks,Cp),pp(n.targetLinks,Cp)):n.fixedValue}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function(i){const s=function({nodes:t}){const i=gp(t,(t=>t.depth))+1,r=(o-e-a)/(i-1),u=new Array(i);for(const n of t){const t=Math.max(0,Math.min(i-1,Math.floor(c.call(null,n,i))));n.layer=t,n.x0=e+t*r,n.x1=n.x0+a,u[t]?u[t].push(n):u[t]=[n]}if(n)for(const t of u)t.sort(n);return u}(i);t=Math.min(l,(u-r)/(gp(s,(t=>t.length))-1)),function(n){const i=function(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}(n,(n=>(u-r-(n.length-1)*t)/pp(n,Cp)));for(const e of n){let n=r;for(const r of e){r.y0=n,r.y1=n+r.value*i,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*i}n=(u-n+t)/(e.length+1);for(let t=0;t<e.length;++t){const i=e[t];i.y0+=n*(t+1),i.y1+=n*(t+1)}w(e)}}(s);for(let t=0;t<v;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/v);g(s,n,i),p(s,n,i)}}(h),Vp(h),h}function p(t,i,e){for(let r=1,o=t.length;r<o;++r){const o=t[r];for(const t of o){let n=0,e=0;for(const{source:i,value:r}of t.targetLinks){let o=r*(t.layer-i.layer);n+=M(i,t)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Mp),y(o,e)}}function g(t,i,e){for(let r=t.length-2;r>=0;--r){const o=t[r];for(const t of o){let n=0,e=0;for(const{target:i,value:r}of t.sourceLinks){let o=r*(i.layer-t.layer);n+=C(t,i)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Mp),y(o,e)}}function y(n,i){const e=n.length>>1,o=n[e];b(n,o.y0-t,e-1,i),m(n,o.y1+t,e+1,i),b(n,u,n.length-1,i),m(n,r,0,i)}function m(n,i,e,r){for(;e<n.length;++e){const o=n[e],u=(i-o.y0)*r;u>1e-6&&(o.y0+=u,o.y1+=u),i=o.y1+t}}function b(n,i,e,r){for(;e>=0;--e){const o=n[e],u=(o.y1-i)*r;u>1e-6&&(o.y0-=u,o.y1-=u),i=o.y0-t}}function x({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(wp);for(const{target:{targetLinks:n}}of t)n.sort(xp)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(wp),i.sort(xp)}function M(n,i){let e=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:o}of n.sourceLinks){if(r===i)break;e+=o+t}for(const{source:t,width:r}of i.targetLinks){if(t===n)break;e-=r}return e}function C(n,i){let e=i.y0-(i.targetLinks.length-1)*t/2;for(const{source:r,width:o}of i.targetLinks){if(r===n)break;e+=o+t}for(const{target:t,width:r}of n.sourceLinks){if(t===i)break;e-=r}return e}return h.update=function(t){return Vp(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:bp(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:bp(t),h):c},h.nodeSort=function(t){return arguments.length?(n=t,h):n},h.nodeWidth=function(t){return arguments.length?(a=+t,h):a},h.nodePadding=function(n){return arguments.length?(l=t=+n,h):l},h.nodes=function(t){return arguments.length?(d="function"==typeof t?t:bp(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:bp(t),h):f},h.linkSort=function(t){return arguments.length?(i=t,h):i},h.size=function(t){return arguments.length?(e=r=0,o=+t[0],u=+t[1],h):[o-e,u-r]},h.extent=function(t){return arguments.length?(e=+t[0][0],o=+t[1][0],r=+t[0][1],u=+t[1][1],h):[[e,r],[o,u]]},h.iterations=function(t){return arguments.length?(v=+t,h):v},h}class Np{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}var Op=(0,a.Z)(),Tp="#757575",Ep=[{fillColor:"#00758F",borderColor:"#002E39"},{fillColor:"#77004D",borderColor:"#43002C"},{fillColor:"#4F6BED",borderColor:"#3B52B4"},{fillColor:"#937600",borderColor:"#6D5700"},{fillColor:"#286EA8",borderColor:"#00457E"},{fillColor:"#A43FB1",borderColor:"#7C158A"},{fillColor:"#CC3595",borderColor:"#7F215D"},{fillColor:"#0E7878",borderColor:"#004E4E"},{fillColor:"#8764B8",borderColor:"#4B3867"},{fillColor:"#9C663F",borderColor:"#6D4123"}];function Fp(t){return"number"==typeof t?t:t.nodeId}function Bp(t,n){return t[Fp(n.source)][Fp(n.target)]}var Pp="...";function _p(t,n){var i;try{return t.text(n),null===(i=t.node())||void 0===i?void 0:i.getComputedTextLength()}finally{t.text(null)}}var Hp,Ip,Wp=Ah().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new Np(t,!0)})),Rp=function(t){function n(n){var i,e,r,o=t.call(this,n)||this;o._isRtl=(0,l.jI)(),o._numColumns=0,o.toImage=function(t){return af([{container:o.chartContainer}],void 0,o._isRtl,t)},o._onCloseCallout=function(){o.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},o._onBlur=function(){},o._fillNodeColors=function(t){var n=o.state;if(!n.selectedState)return t.color;var i=n.selectedNode;return i&&n.selectedNodes.has(t.index)?i.color:i?void 0:t.color},o._fillNodeBorder=function(t){var n=o.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var i=n.selectedNode;return i?i.borderColor:t.borderColor}return t.borderColor}return t.borderColor},o._calculateChartMinWidth=function(){return o._margins.left+o._margins.right+124*o._numColumns+62*(o._numColumns-1)},Ec(o),o.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},o._calloutId=p("callout"),o._linkId=p("link"),o._chartId=p("sankeyChart"),o._emptyChartId=p("_SankeyChart_empty"),o._labelTooltipId=p("tooltip");var u=(null===(i=n.data)||void 0===i?void 0:i.chartTitle)?Math.max(("number"==typeof(null===(r=null===(e=n.titleStyles)||void 0===e?void 0:e.titleFont)||void 0===r?void 0:r.size)?n.titleStyles.titleFont.size:13)+20,36):36;return o._margins={top:u,right:48,bottom:32,left:48},o._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),o._computeClassNames=(0,an.J9)((function(t,n){return Op(t,n)})),o._normalizeData=(0,an.J9)((function(t,n,i,e,r){return o._normalizeSankeyData(t,n,i,e,r)})),o._fetchTooltip=(0,an.J9)((function(t){return o._labelTooltipDiv(t)})),o._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return hp(n,t.name)}}}))(n.strings),o._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",i=(null==t?void 0:t.nodeAriaLabel)||"node {0} with weight {1}";return{emptyAriaLabel:(null==t?void 0:t.emptyAriaLabel)||"Graph has no data to display",linkAriaLabel:function(t){return hp(n,t.source.name,t.target.name,t.unnormalizedValue?o._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return hp(i,t.name,o._formatNumber(n))}}}))(n.accessibility),o._nodeAttributes=(0,an.J9)((function(t,n){return o._computeNodeAttributes(t,n)})),o._fetchNodes=function(t,n,i,e){return o._createNodes(t,n,i,e)},o._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=Fp(t.source),o=e[r];o||(o={},e[r]=o),o[Fp(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),o._fetchLinks=function(t,n){return o._createLinks(t,n)},o}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._fitParentContainer()},n.prototype.componentDidUpdate=function(t){t.shouldResize!==this.props.shouldResize&&this._fitParentContainer()},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.theme,e=n.className,r=n.styles,a=n.pathColor,l=n.colorsForNodes,s=n.borderColorsForNodes,c=this.state,d=this._computeClassNamesProps(i,a,e,c.containerWidth,c.containerHeight,this.props.enableReflow),f=this._computeClassNames(r,d),v=this._normalizeData(this.props.data.SankeyChartData,c.containerWidth,c.containerHeight,l,s),h=v.nodes,p=v.links,g=v.width,y=v.height,m=[];h.sort((function(t,n){return t.x0!==n.x0?t.x0-n.x0:t.y0-n.y0})),h.forEach((function(t,n){m.push({layer:t.layer,type:"node",index:n})})),p.sort((function(t,n){var i=t.source.x0,e=n.source.x0;return i!==e?i-e:t.y0-n.y0})),p.forEach((function(t,n){m.push({layer:t.source.layer,type:"link",index:n})})),m.sort((function(t,n){return t.layer!==n.layer?t.layer-n.layer:t.type>n.type?-1:t.type<n.type?1:0}));var b=this._fetchTooltip(f),x=this._nodeAttributes(h,this._accessibility.nodeAriaLabel),w=this._fetchNodes(f,h,x,b),M=this._linkAttributes(p,this._strings.linkFrom,this._accessibility.linkAriaLabel),C=this._fetchLinks(p,M),k=(0,o.Cl)({isCalloutVisible:c.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:c.refSelected,color:c.color,XValue:c.xCalloutValue,YValue:c.yCalloutValue?c.yCalloutValue:c.dataForHoverCard,descriptionMessage:c.descriptionMessage,isBeakVisible:!1,gapSpace:15,onDismiss:this._onCloseCallout,className:f.calloutContentRoot,preventDismissOnLostFocus:!0},this.props.calloutProps);return u.createElement("div",{className:f.root,role:"presentation",ref:function(n){t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(td,{direction:dc.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},!this.props.hideLegend&&this.props.data.chartTitle&&u.createElement(gv,{title:this.props.data.chartTitle,x:g/2,maxWidth:g-20,className:f.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:f.svgTooltip}),m.map((function(t){return"node"===t.type?u.createElement("g",{key:h[t.index].nodeId,className:f.nodes},w[t.index]):u.createElement("g",{key:"".concat(p[t.index].source.nodeId,"-").concat(p[t.index].target.nodeId),className:f.links,strokeOpacity:1},C[t.index])})),k.isCalloutVisible&&u.createElement($n,(0,o.Cl)({},k),u.createElement(Cc.ChartHoverCard,{XValue:k.XValue,YValue:k.YValue,color:k.color,descriptionMessage:k.descriptionMessage?k.descriptionMessage:""})))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":this._accessibility.emptyAriaLabel})},n.prototype._computeNodeAttributes=function(t,n){var i=this,e={},r=sl(".nodeName").append("text").attr("class","tempText").append("tspan").text(null),o=sl(".nodeName").append("text").attr("class","tempText").attr("font-size","10").append("tspan").text(null);return t.forEach((function(t){var u=Math.max(t.y1-t.y0,0),a=8,l=0,s=t.actualValue;if(u<36){a+=6;var c=_p(r,i._formatNumber(s));void 0!==c&&(a+=l=c)}var d=function(t,n,i,e){var r=i-e;if(function(t,n,i){var e=_p(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=_p(t,Pp);return void 0===n?0:n}(t),u="",a=0;a<n.length;a++){u+=n[a],t.text(u);var l=t.node();if(null!==l&&l.getComputedTextLength()>=r-o){u=u.slice(0,-1),u+=Pp;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===Pp;e[t.nodeId]={reactId:p("nodeBar"),gElementId:p("nodeGElement"),name:d,aria:n(t,s),trimmed:f,height:u,weightOffset:l}})),cl(".tempText").remove(),e},n.prototype._linkCalloutAttributes=function(t,n){return{selectedLink:t,isCalloutVisible:!0,color:t.source.color,xCalloutValue:t.target.name,yCalloutValue:this._formatNumber(t.unnormalizedValue),descriptionMessage:n}},n.prototype._normalizeSankeyData=function(t,n,i,e,r){var u=function(t,n,i,e){var r=t.left,o=t.right,u=t.top,a=t.bottom;return{sankey:Dp().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?yp:mp),height:i,width:n}}(this._margins,n,i,this._isRtl),a=u.sankey,l=u.height,s=u.width,c=function(t){return{nodes:t.nodes.map((function(t){return(0,o.Cl)({},t)})),links:t.links.map((function(t){return(0,o.Cl)({},t)}))}}(t);a(c);var d=function(t){var n={};return t.nodes.forEach((function(t){var i=t.layer;n[i]?n[i].push(t):n[i]=[t]})),n}(c);this._numColumns=Object.keys(d).length;var f,v,h=(f=c.nodes,v={},f.forEach((function(t){v[t.nodeId]=t.value})),v),p=function(t){var n={};return t.forEach((function(t){var i=Fp(t.source),e=n[i];e||(e={},n[i]=e),e[Fp(t.target)]=t.value})),n}(c.links);return function(t,n,i){Object.values(t).map((function(t){return vi(t,(function(t){return t.value}))})).forEach((function(e,r){var o=0,u=.01*e,a=t[r];a.forEach((function(t){var i=n[t.nodeId],r=i/e*100;t.actualValue=i,r<1?(t.value=u,o+=1):o+=r}));var l=0!==o?o/100:1;l>1&&a.forEach((function(t){var e=t.value=t.value/l;!function(t,n,i,e){var r=function(t){var r=Bp(e,t);t.unnormalizedValue=r;var o=r/n;t.value=Math.max(i*o,t.value)};t.sourceLinks.forEach(r),t.targetLinks.forEach(r)}(t,n[t.nodeId],e,i)}))}))}(d,h,p),function(t,n,i){var e=t.nodePadding(),r=.3*n;Object.values(i).forEach((function(t){var i=n-vi(t,(function(t){return t.y1-t.y0}));r<i&&(e=Math.min(e,r/(t.length-1)))})),t.nodePadding(e)}(a,i-this._margins.top-this._margins.bottom,d),a(c),function(t,n,i){t.links.forEach((function(t){t.unnormalizedValue||(t.unnormalizedValue=Bp(i,t))})),t.nodes.forEach((function(t){t.actualValue=n[t.nodeId]}))}(c,h,p),function(t,n,i){var e,r;n&&i?(e=n,r=i):(e=Ep.map((function(t){return t.fillColor})),r=Ep.map((function(t){return t.borderColor})));var o=0;t.forEach((function(t){t.color||t.borderColor?t.color&&!t.borderColor?t.borderColor="#757575":t.borderColor&&!t.color&&(t.color="#F5F5F5"):(t.color=e[o],t.borderColor=r[o]),o=(o+1)%e.length}))}(c.nodes,e,r),{width:s,height:l,nodes:c.nodes,links:c.links}},n.prototype._labelTooltipDiv=function(t){var n=sl("#".concat(this._labelTooltipId));return n.empty()&&(n=sl("body").append("div").attr("id",this._labelTooltipId).attr("class",t.toolTip).style("opacity",0)),n.attr("class",t.toolTip),n},n.prototype._createLinks=function(t,n){var i=this;if(t){var e=this._linkId;return t.map((function(t,r){var o,a,l,s,c=Bp(n,t),d=c.reactId,f=c.from,v=c.aria,h=(a=.5*(o=t).width,l=o.y0,s=o.y1,[{x:o.source.x1,y0:l+a,y1:l-a},{x:o.target.x0,y0:s+a,y1:s-a}]),p="".concat(e,"-").concat(r),g="gradient-".concat(p),y="url(#".concat(g,")"),m=t.source,b=t.target;return u.createElement("g",{key:p},u.createElement("defs",null,u.createElement("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:m.color}),u.createElement("stop",{offset:"100%",stopColor:b.color}))),u.createElement("path",{d:Wp(h),id:d,fill:i._fillStreamColors(t,y),stroke:i._fillStreamBorder(t,y),strokeWidth:"2",strokeOpacity:i._getOpacityStreamBorder(t),onMouseOver:function(n){return i._onStreamHover(n,t,f)},onMouseOut:function(){i._onStreamLeave(t)},onFocus:function(n){return i._onFocusLink(n,t,f)},onBlur:i._onBlur,fillOpacity:i._getOpacityStream(t),"data-is-focusable":!0,"aria-label":v,role:"img"}))}))}return[]},n.prototype._createNodes=function(t,n,i,e){var r=this;if(n){var o=this.state,a=this._isRtl?"end":"start";return n.map((function(n,l){var s=i[n.nodeId],c=s.reactId,d=s.gElementId,f=s.height,v=s.trimmed,h=s.name,p=s.weightOffset,g=s.aria,y=f>36,m=n.name,b=n.actualValue,x=n.x0,w=n.x1,M=n.y0,C=function(t,n){return!t.selectedState||t.selectedNodes.has(n.index)&&t.selectedNode||!t.selectedNode?"#FFFFFF":"#323130"}(o,n);return u.createElement("g",{key:l,id:d},u.createElement("rect",{x:x,y:M,height:f,width:w-x,fill:r._fillNodeColors(n),id:c,onMouseOver:r._onHover.bind(r,n),onMouseOut:function(){r._onLeave(n)},onFocus:r._onCloseCallout.bind(r),stroke:r._fillNodeBorder(n),strokeWidth:"2",opacity:"1","data-is-focusable":!0,"aria-label":g,role:"img"}),f>24&&u.createElement("g",{className:t.nodeTextContainer},u.createElement("g",{className:"nodeName"},u.createElement("text",{id:"".concat(c,"-name"),x:x,y:M,dy:"1.2em",dx:"0.4em",textAnchor:a,fontWeight:"regular","aria-hidden":"true",fill:C,fontSize:10,onMouseOver:r._showTooltip.bind(r,m,v,e),onMouseOut:r._hideTooltip.bind(r,e)},h)),u.createElement("text",{x:y?x:w-p-8,y:M,dy:y?"2em":"1em",dx:y?"0.4em":"0em",textAnchor:a,fontWeight:"bold","aria-hidden":"true",fill:C,fontSize:14},b?r._formatNumber(b):b)))}))}},n.prototype._onLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedNode:void 0})},n.prototype._onHover=function(t,n){if(n.persist(),this._onCloseCallout(),!this.state.selectedState){var i=function(t){var n=new Array,i=new Set;for(t.sourceLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;)(e=n.shift().target)&&e.sourceLinks&&e.sourceLinks.forEach((function(t){i.add(t),n.push(t)}));for(t.targetLinks&&t.targetLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;){var e;(e=n.shift().source)&&e.targetLinks&&e.targetLinks.forEach((function(t){i.add(t),n.push(t)}))}return i}(t),e=function(t){var n=[];return t.forEach((function(t){n.push(t.target),-1===n.indexOf(t.source)&&n.push(t.source)})),n}(i);e.push(t),this.setState({selectedState:!0,selectedNodes:new Set(Array.from(e).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(i).map((function(t){return t.index}))),selectedNode:t,refSelected:n,isCalloutVisible:t.y1-t.y0<24,color:t.color,xCalloutValue:t.name,yCalloutValue:this._formatNumber(t.actualValue)})}},n.prototype._formatNumber=function(t){return this.props.formatNumberOptions?t.toLocaleString(void 0,this.props.formatNumberOptions):t.toString()},n.prototype._onStreamHover=function(t,n,i){if(t.persist(),this._onCloseCallout(),!this.state.selectedState){var e=function(t){var n=new Array,i=new Set,e=new Set;for(n.push(t.source),i.add(t);n.length>0;){var r=n.shift();e.add(r),r.targetLinks&&r.targetLinks.length>0&&r.targetLinks.forEach((function(t){n.push(t.source),i.add(t)}))}for(n.push(t.target);n.length>0;)r=n.shift(),e.add(r),r.sourceLinks&&r.sourceLinks.length>0&&r.sourceLinks.forEach((function(t){n.push(t.target),i.add(t)}));return{selectedLinks:i,selectedNodes:e}}(n),r=e.selectedLinks,u=e.selectedNodes;this.setState((0,o.Cl)({selectedState:!0,selectedNodes:new Set(Array.from(u).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(r).map((function(t){return t.index}))),refSelected:t},this._linkCalloutAttributes(n,i)))}},n.prototype._onStreamLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedLink:void 0})},n.prototype._onFocusLink=function(t,n,i){t.persist(),this._onCloseCallout(),this.setState((0,o.Cl)({refSelected:t.currentTarget},this._linkCalloutAttributes(n,i)))},n.prototype._fillStreamColors=function(t,n){var i=this.state;if(i.selectedState&&i.selectedLinks.has(t.index)){var e=i.selectedNode;return t?t.color:e?e.color:n}},n.prototype._fillStreamBorder=function(t,n){var i=this.state;if(i.selectedState){if(i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.borderColor:n}return Tp}return Tp},n.prototype._getOpacityStream=function(t){var n=this.state;if(n.selectedState){if(!n.selectedLinks.has(t.index))return 1;if(!n.selectedNode)return.3}return 1},n.prototype._getOpacityStreamBorder=function(t){var n=this.state;return!n.selectedState||n.selectedLinks.has(t.index)||n.selectedNode?1:.5},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n=t.props.parentRef?t.props.parentRef:t.chartContainer,r=n&&(t.props.enableReflow?Math.max(n.getBoundingClientRect().width,t._calculateChartMinWidth()):n.getBoundingClientRect().width),o=n&&n.getBoundingClientRect().height;(i!==r||e!==o)&&t.setState({containerWidth:r,containerHeight:o})}))},n.prototype._showTooltip=function(t,n,i,e){n&&(i.style("opacity",.9).style("color",this.props.theme.palette.neutralPrimary),i.text(t).style("left",e.pageX+"px").style("top",e.pageY-28+"px"))},n.prototype._hideTooltip=function(t){t.style("opacity",0)},n.prototype._isChartEmpty=function(){var t,n=null===(t=this.props.data)||void 0===t?void 0:t.SankeyChartData;return!(n&&n.nodes.length>0&&n.links.length>0)},n.defaultProps={enableReflow:!0},n}(u.Component),zp=(0,r.I)(Rp,(function(t){var n,i,e,r=t.className,u=t.theme,a=t.pathColor,l=t.enableReflow,s=u.effects;return{root:[u.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},r],links:{stroke:a||u.palette.black,fill:u?u.semanticColors.bodyBackground:"#F5F5F5",strokeWidth:3,selectors:(n={},n[It.up]={fill:"Canvas"},n)},nodes:{fill:"#F5F5F5",selectors:(i={},i[It.up]={fill:"Canvas"},i)},toolTip:sv(t.theme),nodeTextContainer:{selectors:{text:{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}},marginTop:"4px",marginLeft:"8px",marginBottom:"4px",marginRight:"8px"},calloutContentRoot:{boxShadow:s.elevation4},chartWrapper:(0,o.Cl)({},l?{overflow:"auto"}:{}),chart:{display:"block"},svgTooltip:hv(u),chartTitle:vv(u)}}));function jp(t){var n=0,i=t.children,e=i&&i.length;if(e)for(;--e>=0;)n+=i[e].value;else n=1;t.value=n}function $p(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Xp)):void 0===n&&(n=Yp);for(var i,e,r,o,u,a=new qp(t),l=[a];i=l.pop();)if((r=n(i.data))&&(u=(r=Array.from(r)).length))for(i.children=r,o=u-1;o>=0;--o)l.push(e=r[o]=new qp(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(Up)}function Yp(t){return t.children}function Xp(t){return Array.isArray(t)?t[1]:null}function Gp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Up(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function qp(t){this.data=t,this.depth=this.height=0,this.parent=null}function Zp(t,n){return t.parent===n.parent?1:2}function Kp(t){var n=t.children;return n?n[0]:t.t}function Jp(t){var n=t.children;return n?n[n.length-1]:t.t}function Qp(t,n,i){var e=i/(n.i-t.i);n.c-=e,n.s+=i,t.c+=e,n.z+=i,n.m+=i}function tg(t,n,i){return t.a.parent===n.parent?t.a:i}function ng(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}!function(t){t[t.long=1]="long",t[t.compact=0]="compact"}(Hp||(Hp={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(Ip||(Ip={})),qp.prototype=$p.prototype={constructor:qp,count:function(){return this.eachAfter(jp)},each:function(t,n){let i=-1;for(const e of this)t.call(n,e,++i,this);return this},eachAfter:function(t,n){for(var i,e,r,o=this,u=[o],a=[],l=-1;o=u.pop();)if(a.push(o),i=o.children)for(e=0,r=i.length;e<r;++e)u.push(i[e]);for(;o=a.pop();)t.call(n,o,++l,this);return this},eachBefore:function(t,n){for(var i,e,r=this,o=[r],u=-1;r=o.pop();)if(t.call(n,r,++u,this),i=r.children)for(e=i.length-1;e>=0;--e)o.push(i[e]);return this},find:function(t,n){let i=-1;for(const e of this)if(t.call(n,e,++i,this))return e},sum:function(t){return this.eachAfter((function(n){for(var i=+t(n.data)||0,e=n.children,r=e&&e.length;--r>=0;)i+=e[r].value;n.value=i}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,i=function(t,n){if(t===n)return t;var i=t.ancestors(),e=n.ancestors(),r=null;for(t=i.pop(),n=e.pop();t===n;)r=t,t=i.pop(),n=e.pop();return r}(n,t),e=[n];n!==i;)n=n.parent,e.push(n);for(var r=e.length;t!==i;)e.splice(r,0,t),t=t.parent;return e},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(i){i!==t&&n.push({source:i.parent,target:i})})),n},copy:function(){return $p(this).eachBefore(Gp)},[Symbol.iterator]:function*(){var t,n,i,e,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(i=0,e=n.length;i<e;++i)o.push(n[i])}while(o.length)}},ng.prototype=Object.create(qp.prototype);var ig=(0,a.Z)(),eg=function(t){function n(n,i,e,r,o,u){void 0===r&&(r=[]),void 0===o&&(o=[]);var a=t.call(this,n,e,r,o)||this;return a.composition=i,a._treeTraversal=u,a}return(0,o.C6)(n,t),n.prototype.C=function(t,n){var i,e,r,o,u,a,l=(t=t<65?65:t>90?90:t)||75,s=$p(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=Zp,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new ng(t,0),a=[u];n=a.pop();)if(e=n._.children)for(n.children=new Array(o=e.length),r=o-1;r>=0;--r)a.push(i=n.children[r]=new ng(e[r],r)),i.parent=n;return(u.parent=new ng(null,0)).children=[u],u}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(u),e)r.eachBefore(a);else{var s=r,c=r,d=r;r.eachBefore((function(t){t.x<s.x&&(s=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)}));var f=s===c?1:t(s,c)/2,v=f-s.x,h=n/(c.x+f+v),p=i/(d.depth||1);r.eachBefore((function(t){t.x=(t.x+v)*h,t.y=t.depth*p}))}return r}function o(n){var i=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(i){!function(t){for(var n,i=0,e=0,r=t.children,o=r.length;--o>=0;)(n=r[o]).z+=i,n.m+=i,i+=n.s+(e+=n.c)}(n);var o=(i[0].z+i[i.length-1].z)/2;r?(n.z=r.z+t(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+t(n._,r._));n.parent.A=function(n,i,e){if(i){for(var r,o=n,u=n,a=i,l=o.parent.children[0],s=o.m,c=u.m,d=a.m,f=l.m;a=Jp(a),o=Kp(o),a&&o;)l=Kp(l),(u=Jp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(Qp(tg(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!Jp(u)&&(u.t=a,u.m+=d-c),o&&!Kp(l)&&(l.t=o,l.m+=s-f,e=n)}return e}(n,r,n.parent.A||e[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*i}return r.separation=function(n){return arguments.length?(t=n,r):t},r.size=function(t){return arguments.length?(e=!1,n=+t[0],i=+t[1],r):e?null:[n,i]},r.nodeSize=function(t){return arguments.length?(e=!0,n=+t[0],i=+t[1],r):e?[n,i]:null},r})().nodeSize([l,l/1.5]).separation((function(t,n){return t.parent===s&&n.parent===s?3.5:1}))(s).descendants().forEach((function(t){t.y=0===t.depth?10:130*t.depth,t.x+=n/2}));var d=[],f=0,v=function(t){var n,i;t.id=f,d.push({id:f,children:t.children,dataName:t.data.name,subName:t.data.subname,bodyText:t.data.bodytext,metricName:null===(n=t.data)||void 0===n?void 0:n.metric,fill:t.data.fill,x:t.x,y:t.y,parentID:null===(i=t.parent)||void 0===i?void 0:i.id}),f++};0===this._treeTraversal?s.each((function(t){v(t)})):s.eachBefore((function(t){v(t)}));for(var h=3*l,p=h/3.45,g=20,y=new Set,m=0,b=d;m<b.length;m++){var x=b[m],w=0===x.id?"Root Node":"Parent info parentId: ".concat(x.parentID,"\n ").concat(d[x.parentID].dataName,"\n ").concat(d[x.parentID].subName);if(!x.children&&!y.has(x.parentID)&&3===c){var M=(h-g)/2,C=p;y.add(x.parentID),this.D(x.id,d[x.parentID].x,d[x.parentID].y,d[x.id].x,d[x.id].y,!0,h,p,g);for(var k=null===(i=d[x.parentID])||void 0===i?void 0:i.children,A=(null===(e=d[x.parentID])||void 0===e?void 0:e.x)-M/2-10,S=(null===(r=d[x.parentID])||void 0===r?void 0:r.x)+M/2+10,L=null===(o=d[x.parentID])||void 0===o?void 0:o.x,V=null===(u=k[0])||void 0===u?void 0:u.y,D=0;D<k.length;++D){var N=k[D];void 0!==this.composition?0===this.composition?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?1===k.length?L:A:S,V,N.data.fill,1===k.length?h:M,p,N.id,w),D%2==1&&(V+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=C+g):k.length>2?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?A:S,V,N.data.fill,1===k.length?h:M,p,N.id,w),D%2==1&&(V+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=C+g)}}if((x.children||c<=2)&&(this.N(x.dataName,x.subName,x.bodyText,x.metricName,x.x,x.y,x.fill,h,p,x.id,w),0===x.id&&x.children)){var O=di(k=null===(a=d[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),T=fi(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,O,x.children[0].y,!1,h,p,g,T)}}},n}(function(){function t(t,n,i,e){void 0===i&&(i=[]),void 0===e&&(e=[]),this._nodeElements=[],this._linkElements=[],this.treeData=t,this.styleClassNames=n,this._nodeElements=i,this._linkElements=e}return t.prototype.O=function(t,n,i,e){var r,o=t.split(/\s+/).reverse(),u="",a=sl(".svgTree").append("text").attr("class","tempText").append("tspan").text(null);e&&a.attr("class",e);for(var l=[];u=o.pop();)if(l.push(u),a.text(l.join(" ")+" "),null!==a.node()&&a.node().getComputedTextLength()>n-i){l.pop(),l.push("...");break}return r=l.join(" ")+" ",a.text(null),cl(".tempText").remove(),r},t.prototype.N=function(t,n,i,e,r,o,a,l,s,c,d){var f="nodeId: ".concat(c," \nnodeMainText: ").concat(t,"\nsubText ").concat(n," ").concat(d),v=r-l/2;!e&&0===c&&i||this._nodeElements.push(u.createElement("rect",{width:l,height:s,x:v,y:o,tabIndex:0,role:"text","data-is-focusable":!0,"aria-label":f,className:this.styleClassNames.rectNode,stroke:a,key:"".concat(c).concat(this.styleClassNames.rectNode)})),n&&(n=this.O(n,l,l/4,this.styleClassNames.rectSubText)),i&&(i=this.O(i,l,l/4,this.styleClassNames.rectBodyText)),e&&(e=this.O(e,l,l/4,this.styleClassNames.rectMetricText)),t=this.O(t,l,l/4,this.styleClassNames.rectText);var h=e?u.createElement("tspan",{className:this.styleClassNames.rectMetricText,dy:"1.4em",x:v+l/2},e):i?u.createElement(u.Fragment,null,u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n),u.createElement("tspan",{className:this.styleClassNames.rectBodyText,dy:"1.4em",x:v+l/2},i)):u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n);n||e||i?this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:e?this.styleClassNames.rectSubText:this.styleClassNames.rectText,dy:e?o+s/2.5:o+s/2,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t,h)):this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:this.styleClassNames.rectMetricText,dy:o+s/1.6,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t))},t.prototype.F=function(t,n,i,e,r,o,u,a,l){var s="M".concat(i-o/2,",").concat(e-a," H").concat(l+o/2," M").concat(t,",").concat(e-a,"\n V").concat(n+u+a/2),c="M".concat(t,",").concat(n+u+a/2," V").concat(n+5*a,"\n H").concat(t-o/2," H").concat(t+o/2);return r?c:s},t.prototype.D=function(t,n,i,e,r,o,a,l,s,c){void 0===c&&(c=0),this._linkElements.push(u.createElement("path",{className:this.styleClassNames.link,d:this.F(n,i,e,r,o,a,l,s,c),key:"".concat(t).concat(this.styleClassNames.link)}))},t}()),rg=function(t){function n(n){var i,e,r,o,u,a=t.call(this,n)||this;return a._nodeElements=[],a._linkElements=[],a._margin={top:(null===(i=a.props.margins)||void 0===i?void 0:i.top)||30,bottom:(null===(e=a.props.margins)||void 0===e?void 0:e.bottom)||30,left:(null===(r=a.props.margins)||void 0===r?void 0:r.left)||50,right:(null===(o=a.props.margins)||void 0===o?void 0:o.right)||20},a._width=a.props.width||1500,a._height=a.props.height||700,a._treeData=a.props.treeData,a._composition=null===(u=a.props)||void 0===u?void 0:u.composition,a._treeTraversal=a.props.treeTraversal,a.state={_width:a._width,_height:a._height},a}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.theme,i=t.className,e=t.styles;this._classNames=ig(e,{theme:n,className:i}),this.P(),this.setState({_width:this.props.width||1500,_height:this.props.height||700})},n.prototype.componentDidUpdate=function(t){if(t.layoutWidth!==this.props.layoutWidth){var n=cl("text"),i=cl("rect"),e=cl("path");0===this._nodeElements.length&&0===this._linkElements.length&&(n.remove(),i.remove(),e.remove()),this.P()}},n.prototype.P=function(){var t=[],n=[],i=new eg(this._treeData,this._composition,this._classNames,t,n,this._treeTraversal),e=this.state._width-this._margin.left-this._margin.right;i.C(this.props.layoutWidth,e),this._nodeElements=t,this._linkElements=n},n.prototype.render=function(){var t;return u.createElement(td,null,u.createElement("div",{className:null===(t=this._classNames)||void 0===t?void 0:t.root},u.createElement("svg",{className:"svgTree",width:this.state._width-this._margin.left-this._margin.right,height:this.state._height-this._margin.top-this._margin.bottom},u.createElement("g",{className:"svgNode"},this._nodeElements.map((function(t){return t}))),u.createElement("g",{className:"svgLink"},this._linkElements.map((function(t){return t}))))))},n}(u.Component),og=(0,r.I)(rg,(function(t){var n,i,e,r,u;return{root:[t.theme.spacing,"ms-TreeChart",t.className,{overflow:"scroll"}],link:{fill:"none",stroke:t.theme.palette.neutralSecondary,strokeWidth:"2px"},rectNode:{strokeWidth:"2px",fill:t.theme.semanticColors.bodyBackground,padding:"10px",rx:"2px",selectors:(n={},n[It.up]={fill:"Canvas"},n)},rectText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.large),{selectors:(i={},i[It.up]={fill:"CanvasText"},i)}),rectSubText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimary},t.theme.fonts.medium),{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}),rectBodyText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimaryAlt},t.theme.fonts.xSmall),{selectors:(r={},r[It.up]={fill:"CanvasText"},r)}),rectMetricText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.xLarge),{selectors:(u={},u[It.up]={fill:"CanvasText"},u)})}}));function ug(t,n){let i,e;if(void 0===n)for(const n of t)null!=n&&(void 0===i?n>=n&&(i=e=n):(i>n&&(i=n),e<n&&(e=n)));else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(void 0===i?o>=o&&(i=e=o):(i>o&&(i=o),e<o&&(e=o)))}return[i,e]}var ag=(0,a.Z)(),lg=function(t){function n(n){var i=t.call(this,n)||this;return i.margin={top:2,right:0,bottom:0,left:0},i._isRTL=(0,l.jI)(),i.state={_points:null,_width:i.props.width||80,_height:i.props.height||20,_valueTextWidth:i.props.valueTextWidth||80},i._emptyChartId=p("_SparklineChart_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this;if(!this._isChartEmpty()){var n=Ah().x((function(n){return t.x(n.x)})).y0(this.state._height).y1((function(n){return t.y(n.y)})).curve(hl);this.area=n;var i=Cv().x((function(n){return t.x(n.x)})).y((function(n){return t.y(n.y)})).curve(hl);this.line=i;var e=this.props.data.lineChartData[0].data,r=ug(e,(function(t){return t.x})),o=r[0],u=r[1];this.x=Gu().domain([o,u]).range([this.margin.left,this.state._width-this.margin.right]),this.y=Gu().domain([0,fi(e,(function(t){return t.y}))]).range([this.state._height-this.margin.bottom,this.margin.top]),this.setState({_points:e})}},n.prototype.drawSparkline=function(){return u.createElement(u.Fragment,null,u.createElement("path",{className:"line",d:this.line(this.state._points),fill:"transparent",opacity:1,strokeWidth:2,stroke:this.props.data.lineChartData[0].color}),u.createElement("path",{className:"area",d:this.area(this.state._points),opacity:1,fillOpacity:.2,fill:this.props.data.lineChartData[0].color,role:"img","aria-hidden":!0}))},n.prototype.render=function(){var t=ag(this.props.styles,{theme:this.props.theme});return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(td,{direction:dc.horizontal,isCircularNavigation:!0,className:t.inlineBlock},u.createElement("div",{className:t.inlineBlock},this.state._width>=50&&this.state._height>=16?u.createElement("svg",{width:this.state._width,height:this.state._height,"data-is-focusable":!0,"aria-label":"Sparkline with label ".concat(this.props.data.lineChartData[0].legend)},this.state._points?this.drawSparkline():null):u.createElement(u.Fragment,null),this.props.showLegend&&this.props.data.lineChartData[0].legend?u.createElement("svg",{width:this.state._valueTextWidth,height:this.state._height,"data-is-focusable":!0},u.createElement("text",{x:"0%",textAnchor:this._isRTL?"end":"start",dx:8,y:"100%",dy:-5,className:t.valueText},this.props.data.lineChartData[0].legend)):u.createElement(u.Fragment,null)))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n}(u.Component),sg=(0,r.I)(lg,(function(t){var n;return{inlineBlock:{display:"inline"},valueText:(0,o.Cl)((0,o.Cl)({},t.theme.fonts.smallPlus),{fill:t.theme.semanticColors.messageText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)})}}));function cg(t,n,i,e){var r=t.semanticColors.bodyText,o=t.semanticColors.bodyBackground;if(!n)return o;var u=Js(n,i||r),a=Js(n,e||o),l=Eo(u),s=Eo(a);if(!l||!s)return a;if(hs(l.formatHex(),s.formatHex())>=3)return s.formatHex();var c=function(t,n){var i=Eo(t);if(!i)return n.semanticColors.bodyText;var e=i.rgb();return Po(255-e.r,255-e.g,255-e.b).formatHex()}(s.formatHex(),t);return hs(l.formatHex(),c)>=3?c:o}var dg=(0,a.Z)(),fg=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return af([{container:i._rootElem}],void 0,i._isRTL,t)},Ec(i),i._isRTL=(0,l.jI)(n.theme),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t,n=this,i=this.props,e=i.headers,r=i.rows,a=i.width,l=i.height,s=i.styles,c=i.theme,d=i.chartTitle,f=dg(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var v,h=new Set;e.forEach((function(t){var n,i,e=null===(i=Eo((null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.backgroundColor)||""))||void 0===i?void 0:i.formatHex();e&&h.add(e)}));var p=!1;if(1===h.size||2===h.size)for(var g=1===h.size?Array.from(h)[0]:Array.from(h)[1],y=0,m=e;y<m.length;y++){var b=m[y],x=null===(t=null==b?void 0:b.style)||void 0===t?void 0:t.color;if(x&&hs(x,g)>=3){v=g,p=!0;break}}var w=d?30:0,M="number"==typeof l?l:650,C="".concat(M-w,"px"),k="number"==typeof a?a:"100%",A="number"==typeof a?a-20:void 0,S="number"==typeof a?a/2:0;return u.createElement("div",{ref:function(t){n._rootElem=t},className:f.root,style:{height:"".concat(M,"px"),overflow:"hidden"}},u.createElement("svg",{width:k,height:"".concat(M,"px"),className:f.chart},d&&u.createElement(gv,{title:d,x:S,maxWidth:A,className:f.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:f.svgTooltip}),u.createElement("foreignObject",{x:"0",y:w,width:"100%",height:C},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:f.table,style:{width:a?"".concat(a,"px"):"100%"}},u.createElement("thead",null,u.createElement("tr",null,e.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return p?e.backgroundColor=v:(r||a)&&(e.backgroundColor=cg(c,n._rootElem,r,a)),u.createElement("th",{key:i,className:f.headerCell,style:e},t.value)})))),r&&r.length>0&&u.createElement("tbody",null,r.map((function(t,i){return u.createElement("tr",{key:i},t.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return(r||a)&&(e.backgroundColor=cg(c,n._rootElem,r,a)),u.createElement("td",{key:i,className:f.bodyCell,style:e},t.value)})))}))))))))},n}(u.Component),vg=(0,r.I)(fg,(function(t){var n,i,e=t.theme,r=e.fonts;return{root:{width:"100%",overflowX:"auto"},table:{borderCollapse:"collapse"},headerCell:(0,o.Cl)((0,o.Cl)({},r.small),{fontWeight:It.BO.semibold,backgroundColor:e.palette.neutralQuaternary,color:e.semanticColors.bodyText,padding:"8px",textAlign:"left",border:"2px solid ".concat(e.palette.neutralLighter),selectors:(n={},n[It.up]={backgroundColor:"Window",color:"WindowText"},n)}),bodyCell:(0,o.Cl)((0,o.Cl)({},r.small),{padding:"8px",border:"2px solid ".concat(e.palette.neutralLighter),color:e.semanticColors.bodyText,textAlign:"left",selectors:(i={},i[It.up]={color:"WindowText"},i)}),chartTitle:vv(e),svgTooltip:hv(e)}})),hg=(0,a.Z)(),pg=function(t){function n(n){var i,e,r,a,s,c,d=t.call(this,n)||this;return d._isRtl=(0,l.jI)(),d.X_ORIGIN=0,d.toImage=function(t){var n,i;return af([{container:null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],d.props.hideLegend||null===(i=d._legendsRef.current)||void 0===i?void 0:i.toSVG,d._isRtl,t)},d._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){var l;return l=o===ns.NumericAxis?function(t,n,i,e,r){var o=Fs(Es(t),r),u=o.longestPositiveBar,a=o.longestNegativeBar,l=n.left,s=i-n.right;return e?{dStartValue:u,dEndValue:Math.min(a,r),rStartValue:l,rEndValue:s}:{dStartValue:Math.min(a,r),dEndValue:u,rStartValue:l,rEndValue:s}}(t,n,i,r,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},l},d._getMargins=function(t){d.margins=t},d._renderContentForOnlyBars=function(t){var n,i,e,r,o=d.props,a=o.useSingleColor,l=void 0!==a&&a,s=o.enableGradient,c=void 0!==s&&s,f=0;return d.props.data.forEach((function(n,i){n.y===t.y&&(f=i)})),l?(r=d.props.colors?d._createColors()(1):ss(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=Nc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=t.color?t.color:d.props.colors?d._createColors()(t.x):ss(f,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(Cc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x.toString(),Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:r,culture:d.props.culture}))},d._renderCallout=function(t){return t?d._renderContentForOnlyBars(t):null},d._getCustomizedCallout=function(){return d.props.onRenderCalloutPerDataPoint?d.props.onRenderCalloutPerDataPoint(d.state.dataPointCalloutProps,d._renderCallout):null},d._getGraphData=function(t,n,i,e,r,o){var u=Es(d._points),a=Fs(u,d.X_ORIGIN);d._longestBarPositiveTotalValue=a.longestPositiveBar,d._longestBarNegativeTotalValue=a.longestNegativeBar;var l=d._yAxisType===is.NumericAxis?d._getScales(i,e,!0):d._getScales(i,e,!1),s=l.xBarScale,c=l.yBarScale,f=s.range(),v=[];return f[0]<f[1]&&(v=u.map((function(t){return d._yAxisType===is.NumericAxis?d._createNumericBars(i,e,r,o,t,s,c):d._createStringBars(i,e,r,o,t,s,c)})).flat()),d._bars=v},d._refCallback=function(t,n){d._refArray.push({index:n,refElement:t})},d._getCalloutContentForBar=function(t){var n,i,e,r,o=[],u=d.props,a=u.useSingleColor,l=void 0!==a&&a,s=u.enableGradient,c=void 0!==s&&s,f=d.props.data,v=f.filter((function(n){return n.y===t.y})),h=0;return f.forEach((function(n,i){n.y===t.y&&(h=i)})),l?(r=d.props.colors?d._createColors()(1):ss(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=Nc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=v[0].color?v[0].color:d.props.colors?d._createColors()(v[0].x):ss(h,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),o.push({legend:v[0].legend,y:v[0].x,color:r,data:v[0].yAxisCalloutData,yAxisCalloutData:v[0].yAxisCalloutData}),{YValueHover:o,hoverXValue:t.yAxisCalloutData||t.y.toString()}},d._onBarLeave=function(){},d._handleChartMouseLeave=function(){d._calloutAnchorPoint=null,d.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},d._onBarFocus=function(t,n,i){if((!1===d.state.isLegendSelected||d._isLegendHighlighted(t.legend))&&d._calloutAnchorPoint!==t){var e=d._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;d._refArray.forEach((function(e,u){n===u&&d.setState({refSelected:e.refElement,isCalloutVisible:!0,selectedLegendTitle:t.legend,dataForHoverCard:t.x,color:d.props.useSingleColor?i:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData})}))}},d._getScales=function(t,n,i){var e=d._longestBarPositiveTotalValue,r=d._longestBarNegativeTotalValue,o=[Math.min(d.X_ORIGIN,r),Math.max(d.X_ORIGIN,e)];if(i){var u=fi(d._points,(function(t){return t.y})),a=di(d._points,(function(t){return t.y})),l=Math.max(u,d.props.yMaxValue||0),s=d.props.yMinValue||0,c=Math.min(a,s);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f=Gu().domain([c,l]).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin])}}var f=Tu().domain(d._yAxisLabels).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin]).padding(d._yAxisPadding);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f}},d._calculateBarTotals=function(t){var n=t.filter((function(t){return t.x>=d.X_ORIGIN})).reduce((function(t,n){return t+n.x}),0),i=t.filter((function(t){return t.x<d.X_ORIGIN})).reduce((function(t,n){return t+n.x}),0),e=n+i,r=e>=0,o=t.filter((function(t){return t.x>=d.X_ORIGIN})).length,u=t.length-o;return{totalPositiveValue:n,totalNegativeValue:i,totalBarValue:e,showLabelOnPositiveSide:r,shouldShowLabel:function(t,n,i){return r?t&&n===o:!t&&i===u}}},d._renderBarLabel=function(t,n,i,e){return d.props.hideLabels||d._barHeight<16?null:u.createElement("text",{x:t,y:n+d._barHeight/2,textAnchor:d._isRtl?e?"end":"start":e?"start":"end",transform:"translate(".concat(e?d._isRtl?-4:4:d._isRtl?4:-4,")"),dominantBaseline:"central",className:d._classNames.barLabel,"aria-hidden":!0,style:{direction:"ltr",unicodeBidi:"isolate"}},Ys(i))},d._calculateAppropriateBarHeight=function(t,n,i){var e=Xh(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1],u=fi(d._points,(function(t){return t.y}));return o=Math.max(o,u),Math.floor(n*r*(1-i)/(o+r*(1-i)))},d._getDomainMarginsForHorizontalBarChart=function(t){d._domainMargin=8;var n=d._getUniqueYValues();d._yAxisPadding=1===d._yAxisPadding?.99:d._yAxisPadding;var i=d._yAxisPadding/(1-d._yAxisPadding),e=n.length+(n.length-1)*i,r=t-(d.margins.top+8)-(d.margins.bottom+8);if(d._yAxisType!==is.StringAxis)d._barHeight=d.props.barHeight||d._calculateAppropriateBarHeight(n,r,d._yAxisPadding),d._barHeight=Math.max(d._barHeight,1),d._domainMargin+=d._barHeight/2;else{d._barHeight=d.props.barHeight||r/e;var u=e*d._barHeight;r>=u&&(d._domainMargin=8+(r-u)/2)}return(0,o.Cl)((0,o.Cl)({},d.margins),{top:d.margins.top+d._domainMargin,bottom:d.margins.bottom+d._domainMargin})},d._closeCallout=function(){d.setState({isCalloutVisible:!1})},d._getLegendData=function(t,n){var i=d.props.useSingleColor,e=[],r={};return t.forEach((function(t,n){var e,o,u,a,l=i?d.props.colors?d._createColors()(1):ss(1,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted):t.color;d.props.enableGradient&&(l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=Nc(0,0,null===(a=d.props.theme)||void 0===a?void 0:a.isInverted)[0])),r[t.legend]=l})),Object.entries(r).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){d._handleChartMouseLeave(),d._onLegendHover(n)},onMouseOutAction:function(t){d._onLegendLeave(t)}};e.push(r)})),u.createElement(bf,(0,o.Cl)({legends:e,enabledWrapLines:d.props.enabledLegendsWrapLines,overflowProps:d.props.legendsOverflowProps,focusZonePropsInHoverCard:d.props.focusZonePropsForLegendsInHoverCard,overflowText:d.props.legendsOverflowText},d.props.legendProps,{onChange:d._onLegendSelectionChange.bind(d),ref:d._legendsRef}))},d._isLegendSelected=function(){return d.state.isLegendSelected},d._isLegendHighlighted=function(t){return d._getHighlightedLegend().includes(t)},d._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;d._xMax=Math.max(n[n.length-1],d.props.xMaxValue||0)}},d._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.x,e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,". ")+"".concat(e,".")},d._getChartTitle=function(){var t=d.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Horizontal bar chart with ".concat((null==i?void 0:i.length)||0," bars. ")},d._getOrderedYAxisLabels=function(){return d._yAxisType===is.StringAxis&&"default"!==d.props.yAxisCategoryOrder?lc(d._mapCategoryToValues(),d.props.yAxisCategoryOrder):(0,o.fX)([],d._points,!0).reverse().map((function(t){return t.y}))},d._mapCategoryToValues=function(){var t={};return d._points.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(n.x)})),t},Ec(d),d.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,isLegendSelected:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)&&n.legendProps.selectedLegends.length>0||void 0!==(null===(e=n.legendProps)||void 0===e?void 0:e.selectedLegend),isLegendHovered:!1,refSelected:null,selectedLegendTitle:null!==(a=null===(r=n.legendProps)||void 0===r?void 0:r.selectedLegend)&&void 0!==a?a:"",xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",selectedLegends:(null===(s=n.legendProps)||void 0===s?void 0:s.selectedLegends)||[]},d._calloutId=p("callout"),d._refArray=[],d._xAxisType=d.props.data&&d.props.data.length>0?zs(d.props.data[0].x,!0):ns.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?zs(d.props.data[0].y,!1):is.StringAxis,d._cartesianChartRef=u.createRef(),d._legendsRef=u.createRef(),d._domainMargin=8,d._yAxisPadding=null!==(c=d.props.yAxisPadding)&&void 0!==c?c:.5,d}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._yAxisLabels=this._getOrderedYAxisLabels(),this._xMax=Math.max(fi(this._points,(function(t){return t.x})),this.props.xMaxValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=hg(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.selectedLegendTitle,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),$s(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(jv,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:ts.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:Ms,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ks,getMinMaxOfYAxis:Is,barwidth:this._barHeight,focusZoneDirection:dc.vertical,customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getYDomainMargins:this._getDomainMarginsForHorizontalBarChart,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barHeight=this.props.barHeight||32;var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark]},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._xMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;!1!==this.state.isLegendSelected&&!this._isLegendHighlighted(t.legend)||this._calloutAnchorPoint===t||(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:!0,dataForHoverCard:t.x,selectedLegendTitle:t.legend,color:this.props.useSingleColor||this.props.enableGradient?n:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._createNumericBars=function(t,n,i,e,r,a,l){var s=this,c=this.props.useSingleColor,d=void 0!==c&&c,f=(0,o.fX)([],r,!0);f.sort((function(t,n){var i="number"==typeof t.y?t.y:parseFloat(t.y);return("number"==typeof n.y?n.y:parseFloat(n.y))-i}));var v=this._calculateBarTotals(r),h=v.totalBarValue,g=v.shouldShowLabel,y=0,m=0,b=0,x=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,w=r.length-x,M=0,C=0,k=f.map((function(t,i){var e,r,o,c,f,v,k,A,S=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(S=s._isLegendHighlighted(t.legend)),s._classNames=hg(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:S}),t.x>=s.X_ORIGIN&&++M,t.x<s.X_ORIGIN&&++C;var L,V=s._isRtl?n-(s.margins.right+Math.max(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN))-s.margins.left):Math.min(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN));if(Math.max(l(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");L=d?s.props.colors?s._createColors()(1):ss(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):ss(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var D=L=t.color&&!d?t.color:L;if(s.props.enableGradient){var N=Math.max(s._points.findIndex((function(n){return n===t})),0);L=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(N,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],D=(null===(f=t.gradient)||void 0===f?void 0:f[1])||Nc(N,0,null===(v=s.props.theme)||void 0===v?void 0:v.isInverted)[1],d&&(L=Nc(0,0,null===(k=s.props.theme)||void 0===k?void 0:k.isInverted)[0],D=Nc(0,0,null===(A=s.props.theme)||void 0===A?void 0:A.isInverted)[1]),s._points[N].color=L}var O=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),T=Math.abs(a(b+s.X_ORIGIN)-a(s.X_ORIGIN));b>s.X_ORIGIN?y+=T:m+=T;var E=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),F=E>2&&(t.x>s.X_ORIGIN&&M!==x||t.x<s.X_ORIGIN&&(0!==x||C>1))?2:0,B=E>2&&(t.x>s.X_ORIGIN&&(0!==w||M>1)||t.x<s.X_ORIGIN&&C!==w)?2:0,P=s.X_ORIGIN;P=s._isRtl?t.x>s.X_ORIGIN?V-y:V+m:t.x>s.X_ORIGIN?V+y:V-m;var _=E-(s._isRtl?B:F),H=s._isRtl?t.x>=s.X_ORIGIN?P:P+_:t.x>=s.X_ORIGIN?P+_:P,I=t.x>=s.X_ORIGIN,W=g(I,M,C);return b=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:O},u.createElement("stop",{offset:"0",stopColor:L}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",{key:t.y,x:P,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":S,width:_,height:s._barHeight,ref:function(n){s._refCallback(n,t.legend)},rx:s.props.roundCorners?3:0,onClick:t.onClick,onMouseOver:s._onBarHover.bind(s,t,L),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,L),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(O,")"):L}),W&&s._renderBarLabel(H,l(t.y)-s._barHeight/2,h,I))}));return k},n.prototype._getUniqueYValues=function(){var t,n={};return null===(t=this.props.data)||void 0===t||t.forEach((function(t){n[t.y]=t.y})),Object.values(n)},n.prototype._createStringBars=function(t,n,i,e,r,o,a){var l=this,s=this.props.useSingleColor,c=void 0!==s&&s,d=this._calculateBarTotals(r),f=d.totalBarValue,v=d.shouldShowLabel,h=0,g=0,y=0,m=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,b=r.length-m,x=0,w=0,M=r.map((function(t,i){var e,r,s,d,M,C,k,A,S=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(S=l._isLegendHighlighted(t.legend)),l._classNames=hg(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:S}),t.x>=l.X_ORIGIN&&++x,t.x<l.X_ORIGIN&&++w;var L,V=l._isRtl?n-(l.margins.right+Math.max(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN))-l.margins.left):Math.min(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN));if(Math.max(a(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");L=c?l.props.colors?l._createColors()(1):ss(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):ss(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var D=L=t.color&&!c?t.color:L;if(l.props.enableGradient){var N=l._points.findIndex((function(n){return n===t}));L=(null===(s=t.gradient)||void 0===s?void 0:s[0])||Nc(N,0,null===(d=l.props.theme)||void 0===d?void 0:d.isInverted)[0],D=(null===(M=t.gradient)||void 0===M?void 0:M[1])||Nc(N,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[1],c&&(L=Nc(0,0,null===(k=l.props.theme)||void 0===k?void 0:k.isInverted)[0],D=Nc(0,0,null===(A=l.props.theme)||void 0===A?void 0:A.isInverted)[1]),l._points[N].color=L}var O=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),T=Math.abs(o(y+l.X_ORIGIN)-o(l.X_ORIGIN));y>0?h+=T:g+=T;var E=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),F=E>2&&(t.x>l.X_ORIGIN&&x!==m||t.x<l.X_ORIGIN&&(0!==m||w>1))?2:0,B=E>2&&(t.x>l.X_ORIGIN&&(0!==b||x>1)||t.x<l.X_ORIGIN&&w!==b)?2:0;y=t.x;var P=l.X_ORIGIN;P=l._isRtl?t.x>l.X_ORIGIN?V-h:V+g:t.x>l.X_ORIGIN?V+h:V-g;var _=E-(l._isRtl?B:F),H=l._isRtl?t.x>=l.X_ORIGIN?P:P+_:t.x>=l.X_ORIGIN?P+_:P,I=t.x>=l.X_ORIGIN,W=a(t.y)+.5*(a.bandwidth()-l._barHeight),R=v(I,x,w);return u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:O},u.createElement("stop",{offset:"0",stopColor:L}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:P,y:a(t.y),rx:l.props.roundCorners?3:0,width:_,height:l._barHeight,"aria-labelledby":"toolTip".concat(l._calloutId),"aria-label":l._getAriaLabel(t),role:"img",ref:function(n){l._refCallback(n,t.legend)},onClick:t.onClick,onMouseOver:l._onBarHover.bind(l,t,L),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":S,onFocus:l._onBarFocus.bind(l,t,i,L),fill:l.props.enableGradient?"url(#".concat(O,")"):L}),R&&l._renderBarLabel(H,W,f,I))}));return M},n.prototype._onLegendHover=function(t){this._isLegendSelected()||this.setState({isLegendHovered:!0,selectedLegendTitle:t})},n.prototype._onLegendLeave=function(t){!t&&this._isLegendSelected()||this.setState({isLegendHovered:!1,selectedLegendTitle:"",isLegendSelected:!t&&this._isLegendSelected()})},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.selectedLegendTitle?[this.state.selectedLegendTitle]:[]},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t,selectedLegendTitle:null==i?void 0:i.title}):this.setState({selectedLegends:t.slice(-1),selectedLegendTitle:null==i?void 0:i.title}),this.setState({isLegendSelected:t.length>0}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.defaultProps={yAxisCategoryOrder:"default"},n}(u.Component),gg=(0,r.I)(pg,(function(t){var n,i=t.shouldHighlight,e=t.theme;return{opacityChangeOnHover:{opacity:i?"":"0.1"},xAxisTicks:[],barLabel:(n={fontSize:e.fonts.small.fontSize,fontWeight:It.BO.semibold,fill:e.semanticColors.bodyText},n[It.up]={stroke:"CanvasText"},n)}}));function yg(t){var n=t.availableWidth,i=t.minTextWidth;return{show:n>(void 0===i?24:i)&&n>0,x:t.textX,y:t.textY,value:t.value,culture:t.culture,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseOut:t.onMouseOut}}var mg=(0,a.Z)(),bg=u.forwardRef((function(t,n){var i,e,r,a=t.orientation,s=void 0===a?"vertical":a,c=(0,o.Tt)(t,["orientation"]),d=p("FunnelChartTooltipId_"),f=p("_FunnelChart_empty"),v=(0,l.jI)(),h=u.useState(null),g=h[0],y=h[1],m=u.useState(!1),b=m[0],x=m[1],w=u.useState(null),M=w[0],C=w[1],k=u.useState(null),A=k[0],S=k[1],L=u.useState([]),V=L[0],D=L[1],N=u.useRef(null),O=u.useRef(null),T=z(c.data);function E(t,n){null==n||n.persist(),y(t.stage),C(t),x(!0),S(n.currentTarget)}function F(t,n,i){null==i||i.persist(),y(n.category),C({stage:t,value:n.value,color:n.color,category:n.category}),x(!0),S(i.currentTarget)}function B(){y(null),x(!1),C(null),S(null)}u.useEffect((function(){var t;(null===(t=c.legendProps)||void 0===t?void 0:t.selectedLegends)&&D(c.legendProps.selectedLegends)}),[null===(i=c.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(c.componentRef,(function(){return{chartContainer:null!=N?N:null,toImage:function(t){var n;return af([{container:N.current}],c.hideLegend||null===(n=O.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[c.hideLegend]);var P=u.useCallback((function(t,n,i){var e,r;(null===(e=c.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?D(t):D(t.slice(-1)),(null===(r=c.legendProps)||void 0===r?void 0:r.onChange)&&c.legendProps.onChange(t,n,i)}),[c.legendProps]);function _(){return V.length>0?V:g?[g]:[]}function H(t){return _().includes(t)}function I(){return 0===_().length}function W(t,n){return"subValue"in t?{culture:c.culture,onMouseOver:1===n?function(n){return F(t.stage,t.subValue,n)}:void 0,onMouseMove:1===n?function(n){return F(t.stage,t.subValue,n)}:void 0,onFocus:function(n){return i=t.stage,e=t.subValue,null==(r=n)||r.persist(),C({stage:i,value:e.value,color:e.color,category:e.category}),x(!0),void S(r.currentTarget);var i,e,r},onBlur:function(){return B()},onMouseOut:function(){return B()}}:{culture:c.culture,onMouseOver:1===n?function(n){return E(t,n)}:void 0,onMouseMove:1===n?function(n){return E(t,n)}:void 0,onFocus:function(n){return function(t,n){null==n||n.persist(),C(t),x(!0),S(n.currentTarget)}(t,n)},onBlur:function(){return B()},onMouseOut:function(){return B()}}}function R(t){var n=t.key,i=t.pathD,e=t.fill,r=t.opacity,a=t.textProps,l=t.data,s=t.isFocusable,d=W(l,r),f=sc(e,c.theme);return u.createElement("g",{key:n},u.createElement("path",(0,o.Cl)({d:i,fill:e,opacity:r},d,{"data-is-focusable":s})),a&&u.createElement("g",(0,o.Cl)({},d),function(t){var n=t.show,i=t.x,e=t.y,r=t.value,o=t.textColor;if(!n)return null;var a=u.createElement("text",{x:v?q-i:i,y:e,textAnchor:"middle",alignmentBaseline:"middle",fill:o},(0,Yn.c$)(r.toString(),c.culture));return v?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-q,",0)")},a):a}((0,o.Cl)((0,o.Cl)({},a),{textColor:f}))))}function z(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function j(t,n,i,e,r){var u=r.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),a="vertical"===s?function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight/o.length,c=o[e],d=o[e+1]||{subValues:[]},f=u[e]||1,v=u[e+1]||0,h=0,p=0,g=function(t){var i=c.subValues[t],e=null===(n=d.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;h+=r/f*(f/a)*l,p+=(o/v||0)*(v/a)*l},y=0;y<r;y++)g(y);var m,b=c.subValues[r],x=null===(i=d.subValues)||void 0===i?void 0:i.find((function(t){return t.category===b.category})),w=b.value,M=x?x.value:0,C=w/f*(f/a)*l,k=(M/v||0)*(v/a)*l,A=(l-f/a*l)/2+h,S=A+C,L=(l-v/a*l)/2+p,V=L+k,D=(A+S+L+V)/4,N=e===o.length-1,O=N?e*s+.33*s:(e+.5)*s;return m=N?C*(1-(O-e*s)/s):Math.min(C,k),{pathD:"M".concat(A,",").concat(e*s,"\n L").concat(S,",").concat(e*s,"\n L").concat(V,",").concat((e+1)*s,"\n L").concat(L,",").concat((e+1)*s,"\n Z"),textX:D,textY:O,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},r),{stages:u,i:i,k:e})):function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight,c=l/o.length,d=o[e],f=o[e+1]||{subValues:[]},v=u[e]||1,h=u[e+1]||0,p=0,g=0,y=function(t){var i=d.subValues[t],e=null===(n=f.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;p+=r/v*(v/a)*s,g+=(o/h||0)*(h/a)*s},m=0;m<r;m++)y(m);var b,x,w,M=d.subValues[r],C=null===(i=f.subValues)||void 0===i?void 0:i.find((function(t){return t.category===M.category})),k=M.value,A=C?C.value:0,S=k/v*(v/a)*s,L=(A/h||0)*(h/a)*s,V=e*c,D=(e+1)*c,N=(s-v/a*s)/2+p,O=N+S,T=(s-h/a*s)/2+g,E=T+L;return e===o.length-1?(b=V+.25*(D-V),x=(N+O)/2,w=.5*(D-V)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(V+D)/2,x=(N+O+T+E)/4,w=.9*Math.abs(D-V),(S+L)/2<20&&(w=0)),{pathD:"M".concat(V,",").concat(N,"\n L").concat(D,",").concat(T,"\n L").concat(D,",").concat(E,"\n L").concat(V,",").concat(O,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},r),{stages:u,i:i,k:e})),l=W({stage:t.stage,subValue:n}),d=yg((0,o.Cl)({availableWidth:a.availableWidth,minTextWidth:16,textX:a.textX,textY:a.textY,value:n.value},l));return R({key:"".concat(i,"-").concat(e),pathD:a.pathD,fill:n.color,opacity:z(c.data)&&H(n.category)||I()?1:.1,textProps:d,data:{stage:t.stage,subValue:n},isFocusable:!!(z(c.data)&&H(n.category)||I())})}var $=(0,o.Cl)({isCalloutVisible:b,directionalHint:3,id:"toolTip".concat(d),target:A,color:null==M?void 0:M.color,XValue:null==M?void 0:M.stage,YValue:null==M?void 0:M.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){x(!1)},preventDismissOnLostFocus:!0},c.calloutProps),Y=c.width||350,X=c.height||500,G=mg(c.styles,{theme:c.theme,className:c.className,chartWidth:Y,chartHeight:X}),U=c.chartTitle?Math.max(("number"==typeof(null===(r=null===(e=c.titleStyles)||void 0===e?void 0:e.titleFont)||void 0===r?void 0:r.size)?c.titleStyles.titleFont.size:13)+20,40):40,q=.8*Y,Z=(Y-q)/2;return c.data&&c.data.length>0?u.createElement("div",{ref:N,className:G.root},u.createElement(td,{direction:dc.horizontal},u.createElement("svg",{width:Y,height:X,className:G.chart,role:"img","aria-label":c.chartTitle},!c.hideLegend&&c.chartTitle&&u.createElement(gv,{title:c.chartTitle,x:Y/2,maxWidth:Y-20,className:G.chartTitle,titleStyles:c.titleStyles,tooltipClassName:G.svgTooltip}),u.createElement("g",{transform:v?"translate(".concat(Z+q,", ").concat(U,") scale(-1,1)"):"translate(".concat(Z,", ").concat(U,")")},T?function(t,n){for(var i,e,r=c.data,o=r.map((function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.subValues)||void 0===n?void 0:n.reduce((function(t,n){return t+n.value}),0))&&void 0!==i?i:0})),u=[],a={stages:r,totals:o,maxTotal:Math.max.apply(Math,o),funnelWidth:n,funnelHeight:.8*t,isRTL:v},l=0;l<r.length;l++)for(var s=r[l],d=0;d<(null!==(i=s.subValues)&&void 0!==i?i:[]).length;d++){var f=null===(e=s.subValues)||void 0===e?void 0:e[d];f&&u.push(j(s,f,l,d,a))}return u}(X-U,q):function(t,n){var i=c.data,e=n,r=.8*t;return i.map((function(t,n){var u="vertical"===s?function(t){var n=t.d,i=t.i,e=t.data,r=t.funnelWidth,o=t.isRTL,u=t.funnelHeight/e.length,a=function(t){return t/Math.max.apply(Math,e.map((function(t){return t.value})))*r},l=a(n.value),s=i<e.length-1?a(e[i+1].value):0,c=(r-l)/2,d=(r-s)/2,f=o?r-c:c,v=o?r-d:d,h=i===e.length-1,p=h?i*u+.33*u:i*u+u/2,g=r/2,y=l;if(h){var m=l*(1-(p-i*u)/u);y=Math.max(.8*m,0)}else y=.9*Math.min(l,s);return{pathD:"M".concat(f,",").concat(i*u,"\n L").concat(r-f,",").concat(i*u,"\n L").concat(r-v,",").concat((i+1)*u,"\n L").concat(v,",").concat((i+1)*u,"\n Z"),textX:g,textY:p,availableWidth:y}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:r,isRTL:v}):function(t){var n,i,e=t.d,r=t.i,o=t.data,u=t.funnelHeight,a=t.funnelWidth/o.length,l=function(t){return t/Math.max.apply(Math,o.map((function(t){return t.value})))*u},s=l(e.value),c=r<o.length-1?l(o[r+1].value):0,d=(u-s)/2,f=(u-c)/2,v=r*a,h=(r+1)*a,p=.8*a;return r===o.length-1?(n=v+.25*(h-v),i=u/2,p=s<40||s*a/2<800?0:.75*(h-v)*.6):(n=(v+h)/2,i=u/2,p=Math.min(s,c)>20?.8*a:0),{pathD:"M".concat(v,",").concat(d,"\n L").concat(h,",").concat(f,"\n L").concat(h,",").concat(u-f,"\n L").concat(v,",").concat(u-d,"\n Z"),textX:n,textY:i,availableWidth:p}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:r,isRTL:v}),a=u.pathD,l=u.textX,c=u.textY,d=u.availableWidth,f=W(t),h=yg((0,o.Cl)({availableWidth:d,minTextWidth:16,textX:l,textY:c,value:t.value},f));return R({key:n,pathD:a,fill:t.color,opacity:H(t.stage)||I()?1:.1,textProps:h,data:t,isFocusable:!(!H(t.stage)&&!I())})}))}(X-U,q)),b&&u.createElement($n,(0,o.Cl)({},$),u.createElement(Cc.ChartHoverCard,{XValue:null==$?void 0:$.XValue,YValue:null==$?void 0:$.YValue,color:null==$?void 0:$.color})))),function(){if(c.hideLegend)return u.createElement(u.Fragment,null);var t;if(T){var n={};c.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in n||(n[t.category]=t.color)}))})),t=Object.entries(n).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return y(n)},onMouseOutAction:function(){return y(null)}}}))}else t=c.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return y(t.stage)},onMouseOutAction:function(){return y(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(bf,(0,o.Cl)({ref:O,legends:t,centerLegends:!0,onChange:P},c.legendProps)))}()):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));bg.displayName="FunnelChart";var xg,wg,Mg=(0,r.I)(bg,(function(t){var n=t.theme,i=t.className,e=t.chartWidth,r=t.chartHeight;return{root:[n.fonts.medium,"ms-FunnelChart",{alignItems:"center",width:"100%",height:"100%"},i],chart:{display:"block",width:e,height:r},chartTitle:vv(n),text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],svgTooltip:hv(n),subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(xg||(xg={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(wg||(wg={}));var Cg=[{minRadius:52,arcWidth:12,fontSize:20},{minRadius:70,arcWidth:16,fontSize:24},{minRadius:88,arcWidth:20,fontSize:32},{minRadius:106,arcWidth:24,fontSize:32},{minRadius:124,arcWidth:28,fontSize:40},{minRadius:142,arcWidth:32,fontSize:40}],kg=(0,a.Z)(),Ag=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===wg.SingleSegment?"".concat(t.legend,", ").concat(t.size," out of ").concat(i," or ").concat((t.size/i*100).toFixed(),"%"):"".concat(t.legend,", ").concat(t.start," to ").concat(t.end):0===n&&e===wg.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},Sg=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===xg.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===xg.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},Lg=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return af([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,e._isRTL,t)},e._getMargins=function(){var t=e.props,n=t.hideMinMax;return{left:16+(n?0:40),right:16+(n?0:40),top:16+(t.chartTitle?27:2),bottom:16+(t.sublabel?20:0)}},e._getStylesBasedOnBreakpoint=function(){for(var t=Cg.length-1;t>=0;t-=1)if(e._outerRadius>=Cg[t].minRadius)return{arcWidth:Cg[t].arcWidth,chartValueSize:Cg[t].fontSize};return{arcWidth:Cg[0].arcWidth,chartValueSize:Cg[0].fontSize}},e._processProps=function(){var t=e.props,n=t.minValue,i=void 0===n?0:n,r=t.maxValue,o=t.theme,u=i,a=e.props.segments.map((function(t,n){var i,e=Math.max(t.size,0);return u+=e,{legend:t.legend,size:e,color:void 0!==t.color?cs(t.color,o.isInverted):ss(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:Nc(n,0,o.isInverted),accessibilityData:t.accessibilityData,start:u-e,end:u}}));void 0!==r&&u<r&&(a.push({legend:"Unknown",size:r-u,color:o.palette.neutralLight,start:u,end:r}),u=r);var l=Zf().cornerRadius(e.props.roundCorners?3:0).padAngle(2/e._outerRadius).padRadius(e._outerRadius),s=e._isRTL?Array.from(a).reverse():a,c=-Math.PI/2,d=s.map((function(t,n){var r=c+t.size/(u-i)*Math.PI,o=l({innerRadius:e._innerRadius,outerRadius:e._outerRadius,startAngle:c,endAngle:r});return c=r,{d:o,segmentIndex:e._isRTL?a.length-1-n:n,startAngle:c-t.size/(u-i)*Math.PI,endAngle:r}}));return e._minValue=i,e._maxValue=u,e._segments=a,{arcs:d}},e._renderNeedle=function(){var t=function(t,n,i){var e=(t-n)/(i-n)*180;return e<0?e=0:e>180&&(e=180),e}(e.props.chartValue,e._minValue,e._maxValue),n=e._isRTL?180-t:t,i=e._outerRadius-e._innerRadius+4;return u.createElement("g",{transform:"rotate(".concat(n,", 0, 0)")},u.createElement("path",{d:"\n M 0,".concat(-4,"\n L ").concat(-i,",").concat(-2,"\n A ").concat(2,",").concat(2,",0,0,0,").concat(-i,",").concat(2,"\n L 0,").concat(4,"\n A ").concat(4,",").concat(4,",0,0,0,0,").concat(-4,"\n "),strokeWidth:2,className:e._classNames.needle,transform:"translate(".concat(2-e._innerRadius,")"),"data-is-focusable":!0,onFocus:function(t){return e._handleFocus(t,"Needle")},onBlur:e._handleBlur,onMouseEnter:function(t){return e._handleMouseOver(t,"Needle")},onMouseMove:function(t){return e._handleMouseOver(t,"Needle")},role:"img","aria-label":"Current value: "+Sg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat)}))},e._renderLegends=function(){if(e.props.hideLegend)return null;var t=e._segments.map((function(t,n){var i,r=e.props.enableGradient?(null===(i=t.gradient)||void 0===i?void 0:i[0])||Nc(n,0,e.props.theme.isInverted)[0]:t.color||ss(n,0,e.props.theme.isInverted);return{title:t.legend,color:r,hoverAction:function(){e.setState({hoveredLegend:t.legend})},onMouseOutAction:function(){e.setState({hoveredLegend:""})}}}));return u.createElement("div",{className:e._classNames.legendsContainer},u.createElement(bf,(0,o.Cl)({legends:t,centerLegends:!0},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef})))},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._handleFocus=function(t,n){e._showCallout(t.target,n,!0)},e._handleBlur=function(){e._hideCallout(!0)},e._handleMouseOver=function(t,n){e._showCallout(t.target,n,!1)},e._handleMouseOut=function(){e._hideCallout(!1)},e._handleCalloutDismiss=function(){e._hideCallout(!1)},e._showCallout=function(t,n,i){if(e._calloutAnchor!==n){e._calloutAnchor=n;var r="Current value is "+Sg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:Ag(t,e._minValue,e._maxValue,e.props.variant),color:e.props.enableGradient?null===(n=t.gradient)||void 0===n?void 0:n[0]:t.color}}));e.setState((0,o.Cl)({calloutTarget:t,isCalloutVisible:["Needle","Chart value"].includes(n)||e._noLegendHighlighted()||e._legendHighlighted(n),hoverXValue:r,hoverYValues:u},i?{focusedElement:n}:{}))}},e._hideCallout=function(t){e._calloutAnchor="",e.setState((0,o.Cl)({calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[]},t?{focusedElement:""}:{}))},e._wrapContent=function(t,n,i){var e=sl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},e._multiValueCallout=function(t){var n=e._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:e._classNames.calloutContentRoot},u.createElement("div",{className:e._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:e._classNames.calloutContentX},$s(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,e.props.culture))),u.createElement("div",{className:e._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,r){var a=i+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},$s(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),e._getCalloutContent(t,i,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:e._classNames.descriptionMessage},t.descriptionMessage)))},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Gauge chart with ".concat(e._segments.length," segments. ")},Ec(e),e._margins=e._getMargins(),e._legendsHeight=n.hideLegend?0:24,e.state={hoveredLegend:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],focusedElement:"",calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[],width:140+e._margins.left+e._margins.right,height:70+e._margins.top+e._margins.bottom+e._legendsHeight},e._isRTL=(0,l.jI)(n.theme),e._calloutAnchor="",e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._rootElem&&this.setState({width:this._rootElem.clientWidth,height:this._rootElem.clientHeight})},n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._margins=this._getMargins(),this._legendsHeight=this.props.hideLegend?0:24;var n=this.props.width||this.state.width,i=this.props.height||this.state.height;this._outerRadius=Math.min((n-(this._margins.left+this._margins.right))/2,i-(this._margins.top+this._margins.bottom+this._legendsHeight));var e=this._getStylesBasedOnBreakpoint(),r=e.arcWidth,a=e.chartValueSize;this._innerRadius=this._outerRadius-r;var l=this._processProps().arcs;return this._classNames=kg(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},u.createElement(td,{direction:dc.horizontal,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,role:"region","aria-label":this._getChartTitle(),onMouseLeave:this._handleMouseOut,width:n,height:i-this._legendsHeight},u.createElement("g",{transform:"translate(".concat(n/2,", ").concat(i-(this._margins.bottom+this._legendsHeight),")")},this.props.chartTitle&&u.createElement(gv,{title:this.props.chartTitle,x:0,y:-(this._outerRadius+11),className:this._classNames.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:this._classNames.svgTooltip}),!this.props.hideMinMax&&u.createElement(u.Fragment,null,u.createElement("text",{x:(this._isRTL?1:-1)*(this._outerRadius+4),y:0,textAnchor:"end",className:this._classNames.limits,role:"img","aria-label":"Min value: ".concat(this._minValue)},Ys(this._minValue)),u.createElement("text",{x:(this._isRTL?-1:1)*(this._outerRadius+4),y:0,textAnchor:"start",className:this._classNames.limits,role:"img","aria-label":"Max value: ".concat(this._maxValue)},Ys(this._maxValue))),l.map((function(n,i){var e,r,a=t._segments[n.segmentIndex],l=p("Arc_clip")+"".concat(i,"_").concat(n.startAngle,"_").concat(n.endAngle),s=kg(t.props.styles,{theme:t.props.theme,solidFill:t.props.enableGradient?"transparent":a.color,gradientFill:"conic-gradient(\n from ".concat(n.startAngle,"rad at 50% 100%,\n ").concat(null===(e=a.gradient)||void 0===e?void 0:e[0],",\n ").concat(null===(r=a.gradient)||void 0===r?void 0:r[1]," ").concat(n.endAngle-n.startAngle,"rad\n )"),opacity:t._legendHighlighted(a.legend)||t._noLegendHighlighted()?1:.1});return u.createElement(u.Fragment,{key:i},u.createElement("path",(0,o.Cl)({d:n.d,strokeWidth:t.state.focusedElement===a.legend?2:0,className:s.segment},$s((0,o.Cl)({ariaLabel:Ag(a,t._minValue,t._maxValue,t.props.variant,!0)},a.accessibilityData),"img",!0),{onFocus:function(n){return t._handleFocus(n,a.legend)},onBlur:t._handleBlur,onMouseEnter:function(n){return t._handleMouseOver(n,a.legend)},onMouseMove:function(n){return t._handleMouseOver(n,a.legend)},"data-is-focusable":t._legendHighlighted(a.legend)||t._noLegendHighlighted()})),t.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:l},u.createElement("path",{d:n.d})),u.createElement("foreignObject",{x:"-50%",y:"-100%",width:"100%",height:"100%",clipPath:"url(#".concat(l,")")},u.createElement("div",{className:s.gradientSegment}))))})),this._renderNeedle(),u.createElement("g",{onMouseEnter:function(n){return t._handleMouseOver(n,"Chart value")},onMouseMove:function(n){return t._handleMouseOver(n,"Chart value")}},u.createElement(lv,{content:Sg(this.props.chartValue,this._minValue,this._maxValue,this.props.chartValueFormat),textProps:{x:0,y:0,textAnchor:"middle",className:this._classNames.chartValue,"aria-hidden":"true"},maxWidth:2*this._innerRadius-24,wrapContent:this._wrapContent})),this.props.sublabel&&u.createElement(lv,{content:this.props.sublabel,textProps:{x:0,y:4,textAnchor:"middle",dominantBaseline:"hanging",className:this._classNames.sublabel},maxWidth:2*this._innerRadius,wrapContent:this._wrapContent})))),this._renderLegends(),!this.props.hideTooltip&&this.state.isCalloutVisible&&u.createElement($n,(0,o.Cl)({target:this.state.calloutTarget,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:this._handleCalloutDismiss},this.props.calloutProps),this._multiValueCallout({hoverXValue:this.state.hoverXValue,YValueHover:this.state.hoverYValues})))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.hoveredLegend?[this.state.hoveredLegend]:[]},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r=e?{}:{marginRight:"16px"},o=void 0!==t.index&&-1!==t.index,a=kg(this.props.styles,{theme:this.props.theme,lineColor:t.color,toDrawShape:o}),l=this.props.culture,s=(0,Yn.c$)(t.y,l);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var c=t.yAxisCalloutData;return u.createElement("div",{style:r},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),Object.keys(c).map((function(t){return u.createElement("div",{key:t,className:a.calloutBlockContainer},u.createElement("div",{className:a.calloutlegendText}," ",(0,Yn.c$)(t,l)),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(c[t],l)))})))}return u.createElement("div",{style:i?r:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:a.calloutBlockContainer},o&&u.createElement(of,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:Ws[t.index%Object.keys(js).length]}),u.createElement("div",null,u.createElement("div",{className:a.calloutlegendText}," ",t.legend),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:t.y||t.data,l)))))},n}(u.Component),Vg=(0,r.I)(Lg,(function(t){var n,i,e,r,u,a,l,s=t.theme,c=t.chartValueSize,d=t.className,f=t.lineColor,v=t.toDrawShape,h=t.solidFill,p=t.gradientFill,g=t.opacity;return{root:[s.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},d],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:s.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:c,fontWeight:It.BO.semibold,fill:s.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:s.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:s.palette.black,stroke:s.semanticColors.bodyBackground},svgTooltip:hv(s),chartTitle:vv(s),segment:{outline:"none",stroke:s.semanticColors.focusBorder,fill:h,fillOpacity:g},gradientSegment:{width:"100%",height:"100%",background:p,opacity:g},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:s.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},s.fonts.small),{lineHeight:"16px",opacity:"0.85",color:s.semanticColors.bodySubtext})],calloutBlockContainer:[s.fonts.mediumPlus,{marginTop:"13px",color:s.semanticColors.bodyText},!v&&{selectors:(r={},r[It.up]={forcedColorAdjust:"none"},r),borderLeft:"4px solid ".concat(f),paddingLeft:"8px"},v&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},s.fonts.small),{lineHeight:"16px",selectors:(u={},u[It.up]={color:"CanvasText"},u),color:s.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},s.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(a={},a[It.up]={color:"CanvasText"},a)})],descriptionMessage:[s.fonts.small,{selectors:(l={},l[It.up]={color:"CanvasText"},l),color:s.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(s.semanticColors.menuDivider)}]}})),Dg=i(927),Ng=u.createContext(void 0),Og=function(){var t=u.useContext(Ng),n=(0,Dg.m)(["theme"]).theme;return t||n||(0,pn.a)({})},Tg=function(t){var n=t.annotations,i=t.chartTitle,e=t.description,r=t.width,o=t.height,a=t.paperBackgroundColor,s=t.plotBackgroundColor,c=t.fontColor,d=t.fontFamily,f=t.margin,v=t.componentRef,h=Og(),p=u.useRef(null),g=u.useRef(null),y=u.useState(null!=r?r:0),m=y[0],b=y[1],x=u.useState(null!=o?o:650),w=x[0],M=x[1];u.useEffect((function(){if("number"==typeof r&&r>0)b(r);else{var t=p.current;if(t&&"undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.width;i>0&&Math.abs(i-m)>.5&&b(i)}})),i=t.getBoundingClientRect();return i.width>0&&b(i.width),n.observe(t),function(){return n.disconnect()}}var e=null==t?void 0:t.getBoundingClientRect();e&&e.width>0?b(e.width):b((function(t){return t>0?t:400}))}}),[r,m]);var C=Math.max(m||400,1),k=Math.max(null!=o?o:650,1);u.useEffect((function(){var t=g.current;if(t){if("undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.height;i>0&&M((function(t){return Math.abs(t-i)>.5?i:t}))}})),i=t.getBoundingClientRect();return M((function(t){return i.height>0?i.height:t>0?t:k})),n.observe(t),function(){return n.disconnect()}}var e=t.getBoundingClientRect();M((function(t){return e.height>0?e.height:t>0?t:k}))}else M((function(t){return t>0?t:k}))}),[k,C,n,i,e,f,s,a,c,d,h]);var A=Math.max(Math.ceil(w||0),k),S={plotRect:{x:0,y:0,width:C,height:k},svgRect:{width:C,height:k},isRtl:null==h?void 0:h.rtl},L=function(t){var n,i,e,r;if(t){var o=null!==(n=t.t)&&void 0!==n?n:0,u=null!==(i=t.r)&&void 0!==i?i:0,a=null!==(e=t.b)&&void 0!==e?e:0,l=null!==(r=t.l)&&void 0!==r?r:0;if(0!==o||0!==u||0!==a||0!==l)return"".concat(o,"px ").concat(u,"px ").concat(a,"px ").concat(l,"px")}}(f),V=u.useMemo((function(){return(0,It.Zq)({position:"relative",width:r?"".concat(r,"px"):"100%",minHeight:k,backgroundColor:null!=a?a:h.semanticColors.bodyBackground,color:null!=c?c:h.semanticColors.bodyText,fontFamily:null!=d?d:h.fonts.medium.fontFamily,padding:L,display:"flex",flexDirection:"column",rowGap:"8px"})}),[c,d,a,L,k,h,r]),D=u.useMemo((function(){var t;return(0,It.Zq)({position:"relative",flexGrow:1,backgroundColor:null!=s?s:"transparent",borderRadius:null!==(t=h.effects.roundedCorner2)&&void 0!==t?t:4,boxSizing:"border-box"})}),[s,h.effects.roundedCorner2]),N=u.useMemo((function(){return(0,It.Zq)({textAlign:"center"})}),[]),O=null!=n?n:[],T=O.length>0,E=T?null!=e?e:i:void 0;return u.useImperativeHandle(v,(function(){return{chartContainer:p.current,toImage:function(t){return af([{container:p.current}],void 0,(0,l.jI)(),t)}}}),[]),u.createElement("div",{ref:p,"data-chart-annotation-container":"true"},u.createElement("svg",{width:C,height:A,viewBox:"0 0 ".concat(C," ").concat(A),style:{width:r?"".concat(r,"px"):"100%",height:"".concat(A,"px"),display:"block"},role:E?"img":void 0,"aria-label":E},u.createElement("foreignObject",{x:0,y:0,width:C,height:A},u.createElement("div",{ref:g,className:V,"data-chart-annotation-only":"true","aria-label":E},i&&u.createElement("span",{className:N,"aria-hidden":"true"},i),u.createElement("div",{className:D,role:"presentation"},T?u.createElement(Hv,{annotations:O,context:S,theme:h,hideDefaultStyles:!0}):null)))))};Tg.displayName="AnnotationOnlyChart";var Eg=Array.prototype,Fg=Eg.slice;function Bg(t){return()=>t}function Pg(t){return t}function _g(t){return Math.max(1,Math.ceil(Math.log(function(t){let n=0;for(let i of t)null!=i&&(i=+i)>=i&&++n;return n}(t))/Math.LN2)+1)}function Hg(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Ig(t,n){this._context=t,this._k=(1-n)/6}Eg.map,Ig.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:Hg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Hg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Wg=function t(n){function i(t){return new Ig(t,n)}return i.tension=function(n){return t(+n)},i}(0),Rg=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],zg=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],jg=[es.color1,es.warning,es.color8,es.color4,es.color7,es.color6,es.color2,es.color5,es.color9,es.color10],$g=[es.color26,es.warning,es.color5,es.error,es.color4,es.color17,es.color22,es.disabled,es.color10,es.color3];function Yg(t,n){if(void 0===n&&(n=!1),!t||!Il(t))return"others";var i=t.map((function(t){return t.toLowerCase()}));return n&&Zs(i,$g)?"d3":Zs(i,Rg)?"plotly":"others"}function Xg(t,n,i,e){if("plotly"!==n)return t;var r=Rg,o=jg;e&&(r="plotly"===n?Rg:zg,o="plotly"===n?jg:$g);var u=r.indexOf(t.toLowerCase());return-1!==u?cs(o[u],!!i):t}var Gg=function(t,n,i,e,r){if(!n.current.has(t)){var o,u=r?"plotly"===i?jg:$g:jg;return o=n.current.size<u.length?cs(u[n.current.size],e):ss(n.current.size,0,e),n.current.set(t,o),o}return n.current.get(t)},Ug=function(t,n,i,e,r,o){return"default"===n&&i?function(t,n,i,e,r){var o=[];if(n){var u=Yg(t,r);if(Il(n))n.forEach((function(t,n){var a=null==t?void 0:t.toString().trim(),l=Gg("Label_".concat(n),i,u,e,r);if(a){var s=Eo(a);o.push(s?Xg(s.formatHex(),u,e):l)}else o.push(l)}));else if("string"==typeof n){var a=Eo(n);return a?Xg(a.formatHex(),u,e):Gg("Label_0",i,u,e,r)}return o}}(t,i,e,r,o):void 0},qg=function(t,n,i,e,r,o,u){var a=Yg(r,u);return t&&Il(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:Gg(i,e,a,o,u)},Zg=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Il(null===(e=t.marker)||void 0===e?void 0:e.opacity)?(null===(r=t.marker)||void 0===r?void 0:r.opacity)[n%(null===(o=t.marker)||void 0===o?void 0:o.opacity).length]:null===(u=t.marker)||void 0===u?void 0:u.opacity:null!==(a=t.opacity)&&void 0!==a?a:1},Kg=function(t,n,i){var e,r,o,u,a,l,s,c,d,f,v,h;if((null===(r=null===(e=null==t?void 0:t.coloraxis)||void 0===e?void 0:e.colorscale)||void 0===r?void 0:r.length)&&Il(null===(o=n.marker)||void 0===o?void 0:o.color)&&(null===(u=n.marker)||void 0===u?void 0:u.color).length>0&&"number"==typeof(null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[0])){var p=null===(s=null==t?void 0:t.coloraxis)||void 0===s?void 0:s.colorscale,g=null===(c=n.marker)||void 0===c?void 0:c.color,y=[null!==(f=null===(d=null==t?void 0:t.coloraxis)||void 0===d?void 0:d.cmin)&&void 0!==f?f:Math.min.apply(Math,g),null!==(h=null===(v=null==t?void 0:t.coloraxis)||void 0===v?void 0:v.cmax)&&void 0!==h?h:Math.max.apply(Math,g)],m=y[0],b=y[1],x=p.map((function(t){var n=t[0];return m+n*(b-m)})),w=p.map((function(t){return t[1]}));return Gu().domain(x).range(w)}return i},Jg="nonplot_",Qg="repeat(1, 1fr)",ty={dot:{strokeDasharray:"1, 5",strokeLinecap:"round",strokeWidth:"2",lineBorderWidth:"4"},dash:{strokeDasharray:"5, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdash:{strokeDasharray:"10, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},dashdot:{strokeDasharray:"5, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdashdot:{strokeDasharray:"10, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},solid:{strokeDasharray:"0",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"}};function ny(t){var n,i,e,r,u,a,l,s,c,d,f,v=null==t?void 0:t.title,h="string"==typeof v?v:null!==(n=null==v?void 0:v.text)&&void 0!==n?n:"",p="object"==typeof v?null==v?void 0:v.font:void 0,g="object"==typeof v?null==v?void 0:v.xanchor:void 0,y="object"==typeof v?null==v?void 0:v.yanchor:void 0,m="object"==typeof v?null==v?void 0:v.pad:void 0,b=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},p?{titleFont:p}:{}),g?{titleXAnchor:g}:{}),y?{titleYAnchor:y}:{}),m?{titlePad:m}:{});return(0,o.Cl)((0,o.Cl)({chartTitle:h},Object.keys(b).length>0?{titleStyles:b}:{}),{xAxisTitle:"string"==typeof(null===(i=null==t?void 0:t.xaxis)||void 0===i?void 0:i.title)?null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title:null!==(a=null===(u=null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title)||void 0===u?void 0:u.text)&&void 0!==a?a:"",yAxisTitle:"string"==typeof(null===(l=null==t?void 0:t.yaxis)||void 0===l?void 0:l.title)?null===(s=null==t?void 0:t.yaxis)||void 0===s?void 0:s.title:null!==(f=null===(d=null===(c=null==t?void 0:t.yaxis)||void 0===c?void 0:c.title)||void 0===d?void 0:d.text)&&void 0!==f?f:"",xAxisAnnotation:h})}var iy=function(t,n){var i=ay(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},ey=function(t,n){var i=uy(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:ju(null==i?void 0:i.tickformat)}:{}},ry=function(t,n){var i,e=null===(i=uy(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},oy=function(t,n){var i,e=null===(i=ay(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{xMinValue:e[0],xMaxValue:e[1],showRoundOffXTickValues:!1}:{}},uy=function(t,n){return null==n?void 0:n.yaxis},ay=function(t,n){return null==n?void 0:n.xaxis},ly=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,Yn.c$)(t)},sy=function(t){var n=(new Date).getFullYear();if(t.length>0&&Array.isArray(t[0]))throw new Error("updateXValues:: 2D array not supported");for(var i=t.map((function(t){var i="".concat(t," 01, ").concat(n);return Dl(i)?new Date(i):null})),e=i.map((function(t,n){return[t,n]})).filter((function(t){return null!==t[0]})),r=e.length-1;r>0;r--){var o=e[r][0],u=e[r-1][0],a=o.getMonth(),l=u.getMonth(),s=o.getFullYear(),c=u.getFullYear();l>=a?e[r-1][0].setFullYear(s-1):c>s&&e[r-1][0].setFullYear(s),i[e[r-1][1]]=e[r-1][0]}return t.map((function(t,n){return null===i[n]?null:"".concat(t," 01, ").concat(i[n].getFullYear())}))},cy=function(t,n){var i,e;return"y2"===t.yaxis&&("x"===(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.anchor)||"right"===(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.side))},dy=function(t,n){var i,e,r,o,u,a,l=!1,s=!0;return t.forEach((function(t){if(cy(t,n)){l=!0;var i=t.y;i&&(u=Math.min.apply(Math,i),a=Math.max.apply(Math,i)),("scatter"!==t.type||ql(t))&&(s=!1)}})),l?(s||("number"==typeof u&&(u=Math.min(u,0)),"number"==typeof a&&(a=Math.max(a,0))),(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.range)&&(u=n.yaxis2.range[0],a=n.yaxis2.range[1]),{secondaryYAxistitle:"string"==typeof(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.title)?n.yaxis2.title:"string"==typeof(null===(o=null===(r=null==n?void 0:n.yaxis2)||void 0===r?void 0:r.title)||void 0===o?void 0:o.text)?n.yaxis2.title.text:void 0,secondaryYScaleOptions:{yMinValue:u,yMaxValue:a}}):{}},fy=function(t,n,i,e,r){var o=Ug(t,n,i,e,r);return qg(o,0,"",e,t,r)},vy=function(t,n,i){if(!n)return String(t);var e="number"==typeof t?t:parseFloat(String(t));if(isNaN(e))return String(t);var r=("string"==typeof n?n:n[i||0]||"").match(/%\{text(?::([^}]+))?\}(.*)$/);if(r){var o=r[1],u=r[2];if(!o)return u.startsWith("%")?"".concat(e.toFixed(1)).concat(u):"".concat(e).concat(u);try{var a=ju(o)(e);return"".concat(a).concat(u)}catch(t){var l=o.match(/\.(\d+)[f%]/),s=l?parseInt(l[1],10):2;return o.includes("%")?"".concat((100*e).toFixed(s),"%").concat(u):"".concat(e.toFixed(s)).concat(u)}}return String(t)},hy=function(t){return Array.from(new Set((null!=t?t:[]).flatMap((function(t){var n=t.x;return n&&Array.isArray(n)?n.flat().map((function(t){return t})):[]})).filter((function(t){return null!=t}))))},py=function(t,n){void 0===n&&(n="");var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=n?"".concat(n,".").concat(e):e,o=t[e];"object"!=typeof o||null===o||Array.isArray(o)||o instanceof Date?i[r]=o:Object.assign(i,py(o,r))}return i},gy=function(t){if(null!=t){var n="number"==typeof t?t:Number(t);return Number.isFinite(n)?n:void 0}},yy=function(t,n){if(!t)return n;var i=t.toLowerCase();if(i===n||i==="".concat(n,"axis")||i==="".concat(n,"axis1")||i==="".concat(n,"1"))return n;var e=i.match(/^([xy])(axis)?(\d+)$/);return e&&e[1]===n&&e[3]?"1"===e[3]?n:"".concat(n).concat(e[3]):i},my=function(t,n,i,e){if(e&&0!==e.length){var r,o,u=ky(i,n,t),a=yy(n,t),l="x"===t?"xaxis":"yaxis";if(e.forEach((function(n){var i=n;if(yy(i[l],t)===a){var e="x"===t?i.x:i.y;if(Il(e))for(var s=e,c=0;c<s.length;c++){var d=s[c],f=Sy(Ay(d,u));void 0===f||Number.isNaN(f)||(r=void 0===r?f:Math.min(r,f),o=void 0===o?f:Math.max(o,f))}}})),void 0!==r&&void 0!==o&&r!==o)return[r,o]}},by=function(t){if(void 0!==t&&Number.isFinite(t))return 1-t},xy=function(t){switch((null!=t?t:"").toLowerCase()){case"left":return"start";case"center":return"center";case"right":return"end";default:return}},wy=function(t){switch((null!=t?t:"").toLowerCase()){case"top":return"top";case"middle":return"middle";case"bottom":return"bottom";default:return}},My=function(t){if(null!=t)return"string"==typeof t?t:"number"==typeof t&&Number.isFinite(t)?"".concat(t,"px"):void 0},Cy=function(t,n){if(!t)return"axis";var i=t.toLowerCase();if("pixel"===i)return"pixel";if("paper"===i)return"relative";if(i.endsWith(" domain"))return i.startsWith(n)?"relative":void 0;var e=i.match(/^([xy])(\d*)$/);return e&&e[1]===n?"axis":void 0},ky=function(t,n,i){if(t){var e="".concat(i,"axis");if(!n)return t[e];var r=n.toLowerCase();if("paper"===r||"pixel"===r||r.endsWith(" domain"))return t[e];var o=r.match(/^([xy])(\d*)$/);if(o&&o[1]===i){var u=o[2];return u&&""!==u&&"1"!==u?t["".concat(i,"axis").concat(u)]:t[e]}return t[e]}},Ay=function(t,n){if(null!=t){if("date"===(null==n?void 0:n.type)||Dl(t)){var i=t instanceof Date?t:new Date(t);return Number.isNaN(i.getTime())?void 0:i}if("number"==typeof t)return t;if("linear"===(null==n?void 0:n.type)||"log"===(null==n?void 0:n.type)){var e=Number(t);return Number.isFinite(e)?e:void 0}return Date,t}},Sy=function(t){if(t instanceof Date){var n=t.getTime();return Number.isFinite(n)?n:void 0}if("number"==typeof t)return Number.isFinite(t)?t:void 0;if("string"==typeof t){var i=Number(t);return Number.isFinite(i)?i:void 0}},Ly=function(t,n,i){var e=Array.isArray(null==n?void 0:n.range)?n.range:void 0,r=e&&e.length>=2?Sy(Ay(e[0],n)):void 0,o=e&&e.length>=2?Sy(Ay(e[1],n)):void 0;void 0!==r&&void 0!==o&&r!==o||!i||(r=i[0],o=i[1]);var u=Sy(Ay(t,n));if(void 0!==r&&void 0!==o&&void 0!==u&&r!==o){var a=(u-r)/(o-r);return Number.isFinite(a)?a:void 0}},Vy=function(t,n){var i=t.replace(/\s+/g," ").trim();if(i){var e=i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32);if(e)return"annotation-".concat(n,"-").concat(e)}return"annotation-".concat(n)},Dy=function(t){var n=!1,i=!1,e="string"==typeof(null==t?void 0:t.arrowside)?null==t?void 0:t.arrowside.toLowerCase():void 0;e&&(n=e.includes("start"),i=e.includes("end"));var r=gy(null==t?void 0:t.arrowhead),o=gy(t.startarrowhead);return void 0!==r&&r>0&&(i=!0),void 0!==o&&o>0&&(n=!0),n&&i?"both":n?"start":i?"end":"none"},Ny=function(t,n,i){if(!i&&(null==t?void 0:t.annotations)){var e=(Array.isArray(t.annotations)?t.annotations:[t.annotations]).map((function(i,e){return function(t,n,i,e){var r;if(t&&!1!==t.visible){var u=Cy(t.xref,"x"),a=Cy(t.yref,"y");if(u&&a){var l;if("axis"===u&&"axis"===a){var s=ky(n,t.xref,"x"),c=ky(n,t.yref,"y"),d=Ay(t.x,s),f=Ay(t.y,c);if(void 0===d||void 0===f)return;var v="string"==typeof t.yref?t.yref.toLowerCase():void 0;l=(0,o.Cl)({type:"data",x:d,y:f},"y2"===v?{yAxis:"secondary"}:{})}else if("relative"===u&&"relative"===a){d=gy(t.x),f=gy(t.y);var h=by(f);if(void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("relative"===u&&"axis"===a){d=gy(t.x),c=ky(n,t.yref,"y");var p=my("y",t.yref,n,i),g=Ly(t.y,c,p);if(h=by(g),void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("axis"===u&&"relative"===a){f=gy(t.y),s=ky(n,t.xref,"x");var y=my("x",t.xref,n,i),m=Ly(t.x,s,y);if(h=by(f),void 0===m||void 0===h)return;l={type:"relative",x:m,y:h}}else{if("pixel"!==u||"pixel"!==a)return;if(d=gy(t.x),f=gy(t.y),void 0===d||void 0===f)return;l={type:"pixel",x:d,y:f}}var b=t.text,x=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}(null==b?"":String(b)),w={id:Vy(x,e),text:x,coordinates:l},M={},C={},k=void 0!==t.showarrow&&!!t.showarrow,A=t.cliponaxis;void 0!==A?M.clipToBounds=!!A:"data"===l.type&&(M.clipToBounds=!0);var S=xy(t.xanchor);if(S&&(M.align=S),!M.align){var L=xy(t.align);L&&(M.align=L)}var V=wy(t.yanchor);if(V&&(M.verticalAlign=V),!M.verticalAlign){var D=wy(t.valign);D&&(M.verticalAlign=D)}var N=[],O=!1,T=gy(t.ax),E="string"==typeof t.axref?t.axref.toLowerCase():void 0;void 0===T||void 0!==E&&"pixel"!==E||(N.push(T),O=!0);var F=gy(t.xshift);if(void 0!==F&&(N.push(F),O=!0),N.length>0){var B=N.reduce((function(t,n){return t+n}),0);0!==B&&(M.offsetX=B)}var P=[],_=gy(t.ay),H="string"==typeof t.ayref?t.ayref.toLowerCase():void 0;void 0===_||void 0!==H&&"pixel"!==H||(P.push(_),O=!0);var I=gy(t.yshift);if(void 0!==I&&(P.push(I),O=!0),P.length>0){var W=P.reduce((function(t,n){return t+n}),0);0!==W&&(M.offsetY=W)}k&&!O&&void 0===M.offsetY&&(M.offsetY=-40);var R=gy(t.width);void 0!==R&&(M.maxWidth=R),t.bgcolor&&(C.backgroundColor=t.bgcolor),t.bordercolor&&(C.borderColor=t.bordercolor);var z=gy(t.borderwidth);void 0!==z&&(C.borderWidth=z);var j=My(t.borderpad);j&&(C.padding=j);var $=gy(t.opacity);if(void 0!==$&&(C.opacity=$),t.font){var Y=t.font;(null==Y?void 0:Y.color)&&(C.textColor=Y.color);var X=My(null==Y?void 0:Y.size);X&&(C.fontSize=X),(null==Y?void 0:Y.weight)&&(C.fontWeight=Y.weight)}var G=null==t?void 0:t.textangle;if("number"!=typeof G||Number.isNaN(G)){if("string"==typeof G&&"auto"!==G.toLowerCase()){var U=Number(G);Number.isNaN(U)||(C.rotation=U)}}else C.rotation=G;if(Object.keys(M).length>0&&(w.layout=M),Object.keys(C).length>0&&(w.style=C),k){var q=null!==(r=t.arrowcolor)&&void 0!==r?r:C.textColor,Z=gy(t.arrowwidth),K=gy(t.standoff),J=gy(t.startstandoff),Q=function(t){if(t){var n=t.trim().toLowerCase();switch(n){case"solid":return;case"dot":return"1, 5";case"dash":return"5, 5";case"longdash":return"10, 5";case"dashdot":return"5, 5, 1, 5";case"longdashdot":return"10, 5, 1, 5";default:return/^\d+(\s|,)*\d*$/.test(n.replace(/\s+/g," "))?n.replace(/\s+/g," "):t}}}(t.arrowdash);w.connector=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},q?{strokeColor:q}:{}),void 0!==Z?{strokeWidth:Z}:{}),void 0!==K?{endPadding:Math.max(K,0)}:{}),void 0!==J?{startPadding:Math.max(J,0)}:{}),Q?{dashArray:Q}:{}),{arrow:Dy(t)})}return w}}}(i,t,n,e)})).filter((function(t){return void 0!==t}));return e.length>0?e:void 0}},Oy=function(t,n,i,e,r,u){var a,l,s,c,d,f={},v=0,h=0,p=dy(t.data,t.layout),g=jy(t.data,t.layout,n),y=g.legends,m=g.hideLegend,b=void 0,x=ey(t.data[0],t.layout),w=rm(em(t.data,im(t.data,t.layout).x));t.data.forEach((function(n,a){var l,s,c,d,p,g,m,M;b=Kg(t.layout,n,b);var C=Ug(null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),k=Ug(null===(m=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.layout)||void 0===m?void 0:m.colorway,e,null===(M=n.line)||void 0===M?void 0:M.color,i,r),A=Yy(n,w);A.forEach((function(e,l){var s=e[0],c=e[1],d=n.x.slice(s,c),p=n.y.slice(s,c),g=Array.isArray(n.text)?n.text.slice(s,c):"string"==typeof n.text?n.text:void 0;d.forEach((function(e,s){var c,d,m,M,S,L,V,D,N,O,T,E;f[e]||(f[e]={xAxisPoint:w(e),chartData:[],lineData:[]});var F=y[a],B=b?b(Il(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(m=null===(d=n.marker)||void 0===d?void 0:d.color)||void 0===m?void 0:m[s%(null===(M=n.marker)||void 0===M?void 0:M.color).length]:0):qg(C,s,F,i,null===(V=null===(L=null===(S=t.layout)||void 0===S?void 0:S.template)||void 0===L?void 0:L.layout)||void 0===V?void 0:V.colorway,r),P=Zg(n,s),_=p[s],H=ly(_,x),I=Array.isArray(g)?g[s]:g;if(I&&n.texttemplate&&(I=vy(I,n.texttemplate,s)),"bar"===n.type)f[e].chartData.push((0,o.Cl)({legend:F,data:_,color:null!==(D=Po(B).copy({opacity:P}).formatHex8())&&void 0!==D?D:B,yAxisCalloutData:H},I?{barLabel:String(I)}:{})),"number"==typeof _&&(v=Math.max(v,_));else if("scatter"===n.type||u){var W=qg(k,a,F,i,null===(T=null===(O=null===(N=t.layout)||void 0===N?void 0:N.template)||void 0===O?void 0:O.layout)||void 0===T?void 0:T.colorway,r),R=By(n.line),z=zy(n);f[e].lineData.push({legend:F+(A.length>1?".".concat(l+1):""),legendShape:z,y:_,color:null!==(E=Po(W).copy({opacity:P}).formatHex8())&&void 0!==E?E:B,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=R?R:{}),{mode:n.mode}),useSecondaryYScale:cy(n,t.layout),yAxisCalloutData:H}),cy(n,t.layout)||"number"!=typeof _||(v=Math.max(v,_),h=Math.min(h,_))}}))}))}));var M=hy(t.data);(null!==(l=null===(a=t.layout)||void 0===a?void 0:a.shapes)&&void 0!==l?l:[]).filter((function(t){return"line"===t.type})).forEach((function(t,n){var i,e,r,o=null===(i=t.line)||void 0===i?void 0:i.color,u=function(i){if("x domain"===t.xref){if(0===i)return M[0];if(1===i)return M[M.length-1]}return"number"==typeof i&&Array.isArray(M)?void 0!==M[i]?M[i]:M[n]:i},a=u(t.x0),l=u(t.x1),s=function(n){return"paper"===t.yref?0===n?h:1===n?v:"number"==typeof n?h+n*(v-h):n:n},c=s(t.y0),d=s(t.y1);f[a]&&f[a].lineData.push({legend:"Reference_".concat(n),y:c,color:null!==(e=Po(o).formatHex8())&&void 0!==e?e:o,lineOptions:By(t.line),useSecondaryYScale:!1}),f[l]&&f[l].lineData.push({legend:"Reference_".concat(n),y:d,color:null!==(r=Po(o).formatHex8())&&void 0!==r?r:o,lineOptions:By(t.line),useSecondaryYScale:!1})}));var C=Object.values(f),k=Ny(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:C,width:null===(s=t.layout)||void 0===s?void 0:s.width,height:null!==(d=null===(c=t.layout)||void 0===c?void 0:c.height)&&void 0!==d?d:350,barWidth:"auto",yMaxValue:v,yMinValue:h,mode:"plotly"},p),{hideTickOverlap:!0,hideLegend:m,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundedTicks:!0}),oy(t.data[0],t.layout)),ny(t.layout)),Uy(t.data,t.layout)),ry(t.data[0],t.layout)),iy(t.data[0],t.layout)),x),Ky(t.data,t.layout)),Qy(t.data,t.layout)),k?{annotations:k}:{})},Ty=function(t,n,i,e,r,u){var a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=["text","markers","text+markers","markers+text","lines+markers","markers+line","text+lines+markers","lines+markers+text"].includes(null===(a=t.data[0])||void 0===a?void 0:a.mode),M="area"===i,C="scatter"===i,k=dy(t.data,t.layout),A="tonexty",S=jy(t.data,t.layout,n),L=S.legends,V=S.hideLegend,D=ey(t.data[0],t.layout),N=rm(em(t.data,im(t.data,t.layout).x)),O=t.data.map((function(n,i){var a,l,s,c,d,f,v,h,p,g,y,m=w?(null===(a=null==n?void 0:n.mode)||void 0===a?void 0:a.includes("line"))?null===(l=n.line)||void 0===l?void 0:l.color:null===(s=n.marker)||void 0===s?void 0:s.color:null===(c=n.line)||void 0===c?void 0:c.color,b=Ug(null===(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r,m,e,u),x=n.x,M=L[i],C=qg(b,i,M,e,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,u),k=Zg(n,i);A="tozeroy"===n.fill?"tozeroy":"tonexty";var S=(null===(y=n.mode)||void 0===y?void 0:y.includes("text"))||"scatterpolar"===n.type?void 0:By(n.line),V=zy(n);return Yy(n,N).map((function(i,e){var r,u,a,l,s,c,d,f,v,h,p,g=i[0],y=i[1],m=x.slice(g,y),b=n.y.slice(g,y),w=Il(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(g,y):[],A=Il(null===(u=n.marker)||void 0===u?void 0:u.color)||Array.isArray(null===(a=n.marker)||void 0===a?void 0:a.color)?n.marker.color.slice(g,y):void 0,L=Array.isArray(n.text)?n.text.slice(g,y):void 0;return{legend:M,legendShape:V,data:m.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({x:N(t),y:b[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:w[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),A?{markerColor:A[i]}:{}),L?{text:L[i]}:{}),{yAxisCalloutData:ly(b[i],D)})})),color:null!==(l=Po(C).copy({opacity:k}).formatHex8())&&void 0!==l?l:C,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=S?S:{}),{mode:"scatterpolar"!==n.type?n.mode:"scatterpolar"}),"scatterpolar"===n.type?{originXOffset:null===(s=t.layout)||void 0===s?void 0:s.__polarOriginX,direction:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.polar)||void 0===d?void 0:d.angularaxis)||void 0===f?void 0:f.direction,rotation:null===(p=null===(h=null===(v=t.layout)||void 0===v?void 0:v.polar)||void 0===h?void 0:h.angularaxis)||void 0===p?void 0:p.rotation,axisLabel:n.__axisLabel?n.__axisLabel:{},fill:n.fill}:{}),useSecondaryYScale:cy(n,t.layout)}}))})).flat(),T=null===(s=null===(l=O[0])||void 0===l?void 0:l.data[0])||void 0===s?void 0:s.x,E=null===(d=null===(c=O[0])||void 0===c?void 0:c.data[O[0].data.length-1])||void 0===d?void 0:d.x,F=null===(v=null===(f=O[0])||void 0===f?void 0:f.data[0])||void 0===v?void 0:v.y,B=null===(p=null===(h=O[0])||void 0===h?void 0:h.data[O[0].data.length-1])||void 0===p?void 0:p.y,P=hy(t.data),_=(null!==(y=null===(g=t.layout)||void 0===g?void 0:g.shapes)&&void 0!==y?y:[]).filter((function(t){return"line"===t.type})).map((function(t,n){var i,e,r=null===(i=t.line)||void 0===i?void 0:i.color,o=function(i){return"number"==typeof i&&Array.isArray(P)?void 0!==P[i]?P[i]:P[n]:"paper"===t.xref?0===i?T:1===i?E:"number"==typeof T&&"number"==typeof E&&"number"==typeof i?T+i*(E-T):i:i},u=function(n){return"paper"===t.yref?0===n?F:1===n?B:"number"==typeof n?F+n*(B-F):n:n};return{legend:"Reference_".concat(n),data:[{x:N(o(t.x0)),y:u(t.y0)},{x:N(o(t.x1)),y:u(t.y1)}],color:null!==(e=Po(r).formatHex8())&&void 0!==e?e:r,lineOptions:By(t.line),useSecondaryYScale:!1}})),H=ry(t.data[0],t.layout);if(void 0===H.yMinValue&&void 0===H.yMaxValue){var I=_s(O);H.yMinValue=I.startValue,H.yMaxValue=I.endValue}var W,R,z=O.reduce((function(t,n){return t+n.data.length}),0),j={lineChartData:(0,o.fX)((0,o.fX)([],O,!0),_,!0)},$={scatterChartData:(0,o.fX)((0,o.fX)([],O,!0),_,!0)},Y=Ny(t.layout,t.data,n),X=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},k),{width:null===(m=t.layout)||void 0===m?void 0:m.width,height:null!==(x=null===(b=t.layout)||void 0===b?void 0:b.height)&&void 0!==x?x:350,hideTickOverlap:!0,hideLegend:V,useUTC:!1,optimizeLargeData:z>1e3,showYAxisLables:!0,roundedTicks:!0}),oy(t.data[0],t.layout)),ny(t.layout)),iy(t.data[0],t.layout)),D),Jy(t.data,t.layout)),Qy(t.data,t.layout)),Y?{annotations:Y}:{});return M?(0,o.Cl)({data:j,mode:A},X):(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:C?$:j,enableReflow:!1},X),H),C?(0,o.Cl)({showYAxisLablesTooltip:!0},Uy(t.data,t.layout)):{}),!C&&(W=t.layout,(R=Array.isArray(null==W?void 0:W.shapes)?W.shapes.filter((function(t){return"rect"===t.type})).map((function(t){return"string"==typeof t.x0||"string"==typeof t.x1?null:{color:t.fillcolor,data:[{startX:t.x0,endX:t.x1}],applyPattern:!1}})):[])&&!R.includes(null)?{colorFillBars:R}:{}))},Ey=function(t){return t.replace(/&lt;[^&]*?&gt;/g,"").replace(/<[^>]*>/g,"").replace(/&lt;br&gt;|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function Fy(t,n,i){var e,r;if(Array.isArray(t)){var o=null!==(e=t[i])&&void 0!==e?e:t[0];return Array.isArray(o)?null!==(r=o[n])&&void 0!==r?r:o[0]:o}return t}function By(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),ty[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=Wg.tension(1-i/1.3);break;case"hv":n.curve="stepAfter";break;case"vh":n.curve="stepBefore";break;case"hvh":n.curve="step";break;default:n.curve="linear"}return Object.keys(n).length>0?n:void 0}}var Py=function(t,n,i){return null==n?-1:i?t.findIndex((function(t){return t.includes(n)})):t.findIndex((function(i,e){return n>=i.x0&&(e===t.length-1?n<=i.x1:n<i.x1)}))},_y=function(t){return t.x1-t.x0},Hy=function(t){return(t.x1+t.x0)/2},Iy=function(t,n,i,e){if(!t||0===t.length)return[];if(Bl(t)){var r=Array.from(new Set(t)),o="number"==typeof n?Math.ceil(n):0,u="number"==typeof i?Math.floor(i)+1:r.length,a="number"==typeof e?e:1;return Su(o,u,a).map((function(t){return r.slice(t,t+a)}))}var l=Gu().domain(ug(t)).nice().domain(),s=l[0],c=l[1];s="number"==typeof n?n:s,c="number"==typeof i?i:c;var d=function(){var t=Pg,n=ug,i=_g;function e(e){Array.isArray(e)||(e=Array.from(e));var r,o,u,a=e.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(e[r],r,e);var s=n(l),c=s[0],d=s[1],f=i(l,c,d);if(!Array.isArray(f)){const t=d,i=+f;if(n===ug&&([c,d]=ci(c,d,i)),(f=ai(c,d,i))[0]<=c&&(u=li(c,d,i)),f[f.length-1]>=d)if(t>=d&&n===ug){const t=li(c,d,i);isFinite(t)&&(t>0?d=(Math.floor(d/t)+1)*t:t<0&&(d=(Math.ceil(d*-t)+1)/-t))}else f.pop()}for(var v=f.length,h=0,p=v;f[h]<=c;)++h;for(;f[p-1]>d;)--p;(h||p<v)&&(f=f.slice(h,p),v=p-h);var g,y=new Array(v+1);for(r=0;r<=v;++r)(g=y[r]=[]).x0=r>0?f[r-1]:c,g.x1=r<v?f[r]:d;if(isFinite(u)){if(u>0)for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[Math.min(v,Math.floor((o-c)/u))].push(e[r]);else if(u<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&c<=o&&o<=d){const t=Math.floor((c-o)*u);y[Math.min(v,t+(f[t]<=o))].push(e[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[ho(f,o,0,v)].push(e[r]);return y}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:Bg(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:Bg([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:Bg(Array.isArray(t)?Fg.call(t):t),e):i},e}().domain([s,c]);if("number"==typeof e&&e>0){for(var f=[],v=Math.max(dl(s),dl(e)),h=fl(s,v);h<fl(c+e,v);)f.push(h),h=fl(h+e,v);return s=f[0],c=f[f.length-1],d.domain([s,c]).thresholds(f),d(t).slice(0,-1)}return d(t)},Wy=function(t,n){var i,e;switch(t){case"sum":return vi(n);case"avg":return 0===n.length?0:vi(n)/n.length;case"min":return null!==(i=di(n))&&void 0!==i?i:0;case"max":return null!==(e=fi(n))&&void 0!==e?e:0;default:return n.length}},Ry=function(t,n,i,e,r){switch(void 0===r&&(r=1),t){case"percent":return 0===i?0:n/i*100;case"probability":return 0===i?0:n/i;case"density":return e*r===0?0:n/(e*r);case"probability density":return i*e*r===0?0:n/(i*e*r);default:return n}},zy=function(t){var n,i,e=(null===(n=t.line)||void 0===n?void 0:n.dash)||"solid";return"dot"===e||"dash"===e||"dashdot"===e?"dottedLine":(null===(i=t.mode)||void 0===i?void 0:i.includes("markers"))?"circle":"default"},jy=function(t,n,i){var e=[];1===t.length?e.push(t[0].name||""):t.forEach((function(t,n){e.push(t.name||"Series ".concat(n+1))}));var r=t.every((function(t){return!1===t.showlegend})),o=!1===(null==n?void 0:n.showlegend)||!0!==(null==n?void 0:n.showlegend)&&e.length<2;return{legends:e,hideLegend:i||o||r}},$y=function(t,n){if(Il(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Yy=function(t,n,i){if(!Il(t.x)||!Il(t.y))return[];for(var e=[],r=0,o=0;o<t.x.length;o++)(_l(t.x[o])||"function"==typeof n&&_l(n(t.x[o]))||_l(t.y[o])||"function"==typeof i&&_l(i(t.y[o])))&&(o-r>0&&e.push([r,o]),r=o+1);return o-r>0&&e.push([r,o]),e},Xy=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Gy=function(t){return["donut","sankey","pie","annotation","table","gauge","funnel"].includes(t)},Uy=function(t,n){var i={},e={x:null==n?void 0:n.xaxis,y:null==n?void 0:n.yaxis};return Object.keys(e).forEach((function(n){var r=e[n],o=n[0],u="".concat(o,"AxisCategoryOrder"),a=[];if(t.forEach((function(t){var n;null===(n=t[o])||void 0===n||n.forEach((function(t){_l(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||Bl(a)&&!Tl(a)&&!Ol(a))if(!(Il(null==r?void 0:r.categoryarray)&&r.categoryarray.length>0)||(null==r?void 0:r.categoryorder)&&"array"!==r.categoryorder)if((null==r?void 0:r.categoryorder)&&"trace"!==r.categoryorder&&"array"!==r.categoryorder)i[u]=r.categoryorder;else{var l=Array.from(new Set(a));i[u]="reversed"===(null==r?void 0:r.autorange)?l.reverse():l}else i[u]="reversed"===(null==r?void 0:r.autorange)?r.categoryarray.slice().reverse():r.categoryarray;else i[u]="data"})),i},qy=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Zy=function(t){if("string"==typeof t){var n=t.match(qy);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)},Ky=function(t,n,i){var e;"number"==typeof(null==n?void 0:n.bargap)&&(e=n.bargap>=0&&n.bargap<=1?n.bargap:.2);var r=fi(t.map((function(t){return"bar"!==t.type||!Il(t.width)&&"number"!=typeof t.width?[]:t.width})).flat());return"number"==typeof r&&(e=1-r,e=Math.max(0,Math.min(e,1))),void 0===e?{}:i?{maxBarHeight:1e3,yAxisPadding:e}:{barWidth:"auto",maxBarWidth:1e3,xAxisInnerPadding:e,xAxisOuterPadding:e/2}},Jy=function(t,n){var i,e,r,o={},u=im(t,n);return"log"===(null===(i=u.x)||void 0===i?void 0:i.type)&&(o.xScaleType="log"),"log"===(null===(e=u.y)||void 0===e?void 0:e.type)&&(o.yScaleType="log"),"log"===(null===(r=u.y2)||void 0===r?void 0:r.type)&&(o.secondaryYScaleType="log"),o},Qy=function(t,n){var i={},e=im(t,n);return Object.keys(e).forEach((function(n){var r=e[n];if(r){var u=em(t,r);if("x"===n&&"category"===u&&(i.xAxis={tickLayout:"auto"}),r.tickmode&&"array"!==r.tickmode||!Il(r.tickvals))if(r.tickmode&&"linear"!==r.tickmode||!r.dtick)(!r.tickmode||"auto"===r.tickmode)&&"number"==typeof r.nticks&&r.nticks>=0&&("x"===n?i.xAxisTickCount=r.nticks:"y"===n&&(i.yAxisTickCount=r.nticks));else{var a=tm(r.dtick,u),l=nm(r.tick0,u,a);"x"===n?i.xAxis=(0,o.Cl)((0,o.Cl)({},i.xAxis),{tickStep:a,tick0:l}):"y"===n&&(i.yAxis=(0,o.Cl)((0,o.Cl)({},i.yAxis),{tickStep:a,tick0:l}))}else{var s="date"===u?r.tickvals.map((function(t){return new Date(t)})):r.tickvals;"x"===n?(i.tickValues=s,i.xAxis=(0,o.Cl)((0,o.Cl)({},i.xAxis),{tickText:r.ticktext})):"y"===n&&(i.yAxisTickValues=s,i.yAxis=(0,o.Cl)((0,o.Cl)({},i.yAxis),{tickText:r.ticktext}))}}})),i},tm=function(t,n){var i="log"===n,e="date"===n,r="category"===n,o=e?864e5:1;if(!t)return o;if(Vl(t))return(t=Number(t))<=0?o:r?Math.max(1,Math.round(t)):e?Math.max(.1,t):t;if("string"!=typeof t||!e&&!i)return o;var u=t.charAt(0),a=Vl(t.slice(1))?Number(t.slice(1)):0;return a<=0||!(e&&"M"===u&&a===Math.round(a)||i&&"L"===u||i&&"D"===u&&(1===a||2===a))?o:t},nm=function(t,n,i){return"date"===n?Dl(t)?new Date(t):new Date(ps):"D1"!==i&&"D2"!==i?Vl(t)?Number(t):0:void 0},im=function(t,n){var i,e=new Set;t.forEach((function(t){var n=Gl(t);i=n.x,e.add(n.y)}));var r=function(t,i){return(0,o.Cl)((0,o.Cl)({},null==n?void 0:n[Ul(t,i)]),{_id:"".concat(t).concat(i>1?i:"")})},u={};"number"==typeof i&&(u.x=r("x",i));var a=Array.from(e).sort();return a.length>0&&(u.y=r("y",a[0])),a.length>1&&(u.y2=r("y",a[1])),u},em=function(t,n){var i;if(!n)return"category";if(["linear","log","date","category"].includes(null!==(i=n.type)&&void 0!==i?i:""))return n.type;var e=n._id[0],r=[];return t.forEach((function(t){var i=t["".concat(e,"axis")];(i===n._id||!i&&n._id===e)&&Il(t[e])&&t[e].forEach((function(t){_l(t)||r.push(t)}))})),Tl(r)&&!Fl(r)?"linear":Ol(r)?"date":"category"},rm=function(t,n){var i=function(t){var i=n?n(t):new Date(t);return isNaN(i.getTime())?null:i};return function(n){if(_l(n))return null;switch(t){case"linear":case"log":return Vl(n)?+n:null;case"date":return Vl(n)?i(+n):"string"==typeof n?i(n):null;case"category":return"".concat(n);default:return null}}},om={r:"radialAxis",theta:"angularAxis"},um="polar",am=function(t,n){var i=[];return t.forEach((function(t){Il(t[n])&&t[n].forEach((function(t){_l(t)||i.push(t)}))})),i},lm=function(t,n,i){if(["linear","log","date","category"].includes(null!=i?i:""))return i;var e=am(t,n);return Tl(e)&&!Fl(e)?"linear":Ol(e)?"date":"category"},sm=function(t,n,i){var e=function(t,n){var i=(null==t?void 0:t.subplot)||um;return null==n?void 0:n[i]}(t[0],i),r=null==e?void 0:e[om[n].toLowerCase()];return(0,o.Cl)((0,o.Cl)({},r),{_dataKey:n,_type:lm(t,n,null==r?void 0:r.type)})},cm=function(t,n){if("category"!==n._type)return"data";if(Il(n.categoryarray)&&n.categoryarray.length>0&&(!n.categoryorder||"array"===n.categoryorder))return n.categoryarray;if(!n.categoryorder||"trace"===n.categoryorder||"array"===n.categoryorder){var i=am(t,n._dataKey),e=Array.from(new Set(i));return"reversed"===n.autorange?e.reverse():e}return n.categoryorder},dm=function(t){var n,i,e=u.useRef(null),r=u.useRef(void 0),a=u.useState({}),l=a[0],c=a[1];r.current=t.onResize,u.useEffect((function(){var t,n,i=(0,s.z)(e.current);return i&&i.ResizeObserver&&(n=new i.ResizeObserver((function(n){var e,o=n[0].contentRect,u=o.width,a=o.height;t=null==i?void 0:i.requestAnimationFrame((function(){c((function(t){var n=Math.floor(u),i=Math.floor(a);return t.containerWidth===n&&t.containerHeight===i?t:{containerWidth:n,containerHeight:i}}))})),null===(e=r.current)||void 0===e||e.call(r,u,a)})),e.current&&n.observe(e.current)),function(){t&&(null==i||i.cancelAnimationFrame(t)),null==n||n.disconnect()}}),[]);var d=u.useMemo((function(){var n=l.containerWidth,i=l.containerHeight;return"number"==typeof t.aspect&&t.aspect>0&&(n?i=n/t.aspect:i&&(n=i*t.aspect),"number"==typeof t.maxHeight&&i&&i>t.maxHeight&&(i=t.maxHeight)),u.Children.map(t.children,(function(t){var e,r,a,l,s,c,d={root:(0,o.Cl)((0,o.Cl)({},null===(e=t.props.styles)||void 0===e?void 0:e.root),{width:"100%",height:"100%"}),chartWrapper:(0,o.Cl)((0,o.Cl)({},null===(r=t.props.styles)||void 0===r?void 0:r.chartWrapper),{width:"100%"}),chart:(0,o.Cl)((0,o.Cl)({},null===(a=t.props.styles)||void 0===a?void 0:a.chart),{width:"100%"})};return u.cloneElement(t,{width:n,height:i,shouldResize:(null!=n?n:0)+(null!=i?i:0),styles:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t.props.styles),d),{subComponentStyles:(0,o.Cl)((0,o.Cl)({},null===(l=t.props.styles)||void 0===l?void 0:l.subComponentStyles),{cartesianStyles:(0,o.Cl)((0,o.Cl)({},null===(c=null===(s=t.props.styles)||void 0===s?void 0:s.subComponentStyles)||void 0===c?void 0:c.cartesianStyles),d)})})})}))}),[l,t.aspect,t.maxHeight,t.children]);return u.createElement("div",{ref:e,style:{width:null!==(n=t.width)&&void 0!==n?n:"100%",height:null!==(i=t.height)&&void 0!==i?i:"100%",minWidth:t.minWidth,minHeight:t.minHeight,maxHeight:t.maxHeight}},d)};function fm(t){return function(n){var i=n.aspect,e=n.width,r=n.height,a=n.minWidth,l=n.minHeight,s=n.maxHeight,c=n.onResize,d=(0,o.Tt)(n,["aspect","width","height","minWidth","minHeight","maxHeight","onResize"]);return u.createElement(dm,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var vm=u.forwardRef((function(t,n){var i,e,r=t.useUTC,a=void 0===r||r,s=t.yAxisCategoryOrder,c=void 0===s?"default":s,d=t.maxBarHeight,f=void 0===d?24:d,v=(0,o.Tt)(t,["useUTC","yAxisCategoryOrder","maxBarHeight"]),h=u.useRef(24),g=u.useRef(p("callout")),y=u.useRef({}),m=u.useRef(null),b=u.useRef(null),x=u.useRef(null),w=u.useRef(p("Gantt_empty")),M=u.useRef({}),C=u.useRef({}),k=u.useState(""),A=k[0],S=k[1],L=u.useState(!1),V=L[0],D=L[1],N=u.useState(""),O=N[0],T=N[1],E=u.useState(null),F=E[0],B=E[1],P=u.useState(""),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],z=u.useState(""),j=z[0],$=z[1],Y=u.useState((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),X=Y[0],G=Y[1],U=u.useState(),q=U[0],Z=U[1];u.useEffect((function(){var t,n,i;Zs(null===(t=C.current.legendProps)||void 0===t?void 0:t.selectedLegends,null===(n=v.legendProps)||void 0===n?void 0:n.selectedLegends)||G((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),C.current=v}),[v]),u.useImperativeHandle(v.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=b.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return af([{container:null===(n=b.current)||void 0===n?void 0:n.chartContainer}],v.hideLegend||null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[v.hideLegend]);var K=u.useMemo((function(){var t,n;M.current={};var i=0;return null!==(n=null===(t=v.data)||void 0===t?void 0:t.map((function(t){var n,e,r,u,a,l="".concat(t.legend);if(!M.current[l]){var s=t.color?cs(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):ss(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var d=Nc(i,0,null===(r=v.theme)||void 0===r?void 0:r.isInverted);s=(null===(u=t.gradient)||void 0===u?void 0:u[0])||d[0],c=(null===(a=t.gradient)||void 0===a?void 0:a[1])||d[1]}M.current[l]={id:p("legend"),startColor:s,endColor:c},i+=1}var f=M.current[l],h=f.startColor,g=f.endColor;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:h}),v.enableGradient?{gradient:[h,g]}:{})})))&&void 0!==n?n:[]}),[v.data,null===(e=v.theme)||void 0===e?void 0:e.isInverted,v.enableGradient]),J=u.useMemo((function(){return K.length>0?zs(K[0].x.start,!0):ns.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?zs(K[0].y,!1):is.StringAxis}),[K]),tt=u.useMemo((function(){return Gs(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===ns.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=ws(i.x.start,a),r=ws(i.x.end,a);t=Math.min(t,e,r),n=Math.max(n,e,r)})),(0,Yn.c2)(t,n)}}),[a,K,J]),it=u.useCallback((function(){var t={};return K.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(+n.x.end-+n.x.start)})),t}),[K]),et=u.useCallback((function(){var t=it();return Q!==is.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():lc(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a){var l=[];t.forEach((function(t){l.push(t.x.start,t.x.end)}));var s=di(l)||0,c=fi(l)||0;return{dStartValue:r?c:s,dEndValue:r?s:c,rStartValue:n.left,rEndValue:i-n.right}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===ns.DateAxis?(n=(0,Yn.Yn)(t.x.start,v.culture,a,!1,nt),i=(0,Yn.Yn)(t.x.end,v.culture,a,!1,nt)):(n=t.x.start.toString(),i=t.x.end.toString()),"".concat(n," - ").concat(i)}),[v.culture,a,nt,J]),lt=u.useCallback((function(){return v.onRenderCalloutPerDataPoint?v.onRenderCalloutPerDataPoint(q,(function(t){return t?u.createElement(Cc.ChartHoverCard,{XValue:t.yAxisCalloutData||t.y.toString(),Legend:t.legend,YValue:t.xAxisCalloutData||at(t),color:t.color,culture:v.culture}):null})):null}),[at,q,v.culture,v.onRenderCalloutPerDataPoint]),st=u.useCallback((function(t){var n,i=t.xAxisCalloutData||at(t),e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(e,". ")+(t.legend?"".concat(t.legend,", "):"")+"".concat(i,".")}),[at]),ct=u.useCallback((function(){return X.length>0?X:O?[O]:[]}),[O,X]),dt=u.useCallback((function(t){return ct().includes("".concat(t))}),[ct]),ft=u.useCallback((function(){return 0===ct().length}),[ct]),vt=u.useCallback((function(t,n){(ft()||dt(n.legend))&&m.current!==n&&(m.current=n,B(t),D(!0),H(n.legend),S(n.color),R(n.yAxisCalloutData||n.y.toString()),$(n.xAxisCalloutData||at(n)),Z(n))}),[at,dt,ft]),ht=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),pt=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),gt=u.useCallback((function(){}),[]),yt=u.useCallback((function(){m.current=null,B(null),D(!1),H(""),S(""),R(""),$(""),Z(void 0)}),[]),mt=u.useCallback((function(){D(!1)}),[]),bt=u.useCallback((function(t){var n;return n="number"==typeof v.barHeight?v.barHeight:t,"number"==typeof f&&(n=Math.min(n,f)),Math.max(n,1)}),[f,v.barHeight]),xt=u.useCallback((function(){var t=[],n={};K.forEach((function(t){n[t.y]||(n[t.y]=[]),n[t.y].push(t)}));for(var i=rt.length-1;i>=0;i--){var e=rt[i];n[e]&&t.push.apply(t,n[e].sort((function(t,n){return+t.x.start-+n.x.start})))}return t}),[K,rt]),wt=u.useCallback((function(t){var n=t.xScale,i=t.yScalePrimary,e=function(t){var n=M.current["".concat(t)].id;return"".concat(n,"_gradient")},r=[];v.enableGradient&&Object.keys(M.current).forEach((function(t,n){var i=M.current[t],o=i.startColor,a=i.endColor;r.push(u.createElement("linearGradient",{key:n,id:e(t)},u.createElement("stop",{offset:"0",stopColor:o}),u.createElement("stop",{offset:"100%",stopColor:a})))}));var o=0;Q===is.StringAxis&&(o=i.bandwidth(),h.current=bt(o));var a=xt().map((function(t,r){var a=n(t.x.start),l=n(t.x.end),s=i(t.y)+(o-h.current)/2,c=ft()||dt(t.legend);return u.createElement("rect",{key:r,x:Math.min(a,l),y:s,width:Math.max(Math.abs(l-a),2),height:h.current,rx:v.roundCorners?3:0,fill:v.enableGradient?"url(#".concat(e(t.legend),")"):t.color,opacity:c?1:.1,onClick:t.onClick,onMouseOver:function(n){return pt(t,n)},onMouseLeave:gt,onFocus:function(n){return ht(t,n)},onBlur:gt,"data-is-focusable":c,role:"img","aria-label":st(t)})}));return u.createElement("g",null,r.length>0?u.createElement("defs",null,r):null,a)}),[st,bt,xt,dt,ft,ht,pt,gt,Q,v.enableGradient,v.roundCorners]),Mt=u.useCallback((function(t){T(t)}),[]),Ct=u.useCallback((function(){T("")}),[]),kt=u.useCallback((function(t,n,i){var e,r;(null===(e=v.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?G(t):G(t.slice(-1)),(null===(r=v.legendProps)||void 0===r?void 0:r.onChange)&&v.legendProps.onChange(t,n,i)}),[v.legendProps]),At=u.useCallback((function(){var t=[];return Object.keys(M.current).forEach((function(n){var i={title:n,color:M.current[n].startColor,hoverAction:function(){yt(),Mt(n)},onMouseOutAction:function(){Ct()}};t.push(i)})),u.createElement(bf,(0,o.Cl)({legends:t,enabledWrapLines:v.enabledLegendsWrapLines,overflowProps:v.legendsOverflowProps,focusZonePropsInHoverCard:v.focusZonePropsForLegendsInHoverCard,overflowText:v.legendsOverflowText,onChange:kt,ref:x},v.legendProps))}),[yt,Mt,Ct,kt,v.enabledLegendsWrapLines,v.focusZonePropsForLegendsInHoverCard,v.legendProps,v.legendsOverflowProps,v.legendsOverflowText]),St=u.useCallback((function(){return(v.chartTitle?"".concat(v.chartTitle,". "):"")+"Gantt chart with ".concat(K.length," data points. ")}),[K.length,v.chartTitle]),Lt=u.useCallback((function(){return 0===K.length}),[K.length]),Vt=u.useCallback((function(t){var n=8,i=new Set;K.forEach((function(t){i.add(t.y)}));var e=Array.from(i),r=t-(y.current.top+8)-(y.current.bottom+8);return Q!==is.StringAxis&&(h.current=bt(Gh(e,r,tt)),n+=h.current/2),(0,o.Cl)((0,o.Cl)({},y.current),{top:y.current.top+n,bottom:y.current.bottom+n})}),[bt,K,tt,Q]);if(Lt())return u.createElement("div",{id:w.current,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"});h.current=bt(24);var Dt=(0,o.Cl)({isCalloutVisible:V,directionalHint:3,id:"toolTip".concat(g.current),target:F,isBeakVisible:!1,gapSpace:15,color:A,legend:_,XValue:W,YValue:j,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(jv,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:ts.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Dt,tickParams:Nt,legendBars:At(),createYAxis:Ms,getDomainNRangeValues:ot,createStringYAxis:ks,getMinMaxOfYAxis:Is,focusZoneDirection:dc.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Vt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));vm.displayName="GanttChart";var hm=(0,r.I)(vm,(function(t){return{}}));function pm(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}var gm=mm(hl);function ym(t){this._curve=t}function mm(t){function n(n){return new ym(t(n))}return n._curve=t,n}function bm(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(mm(t)):n()._curve},t}function xm(){}function wm(t){this._context=t}function Mm(t){return new wm(t)}ym.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},wm.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Cm=1e-6,km=function(t,n){void 0===n&&(n={});var i="category";return"number"==typeof t[0]?i=n.supportsLog&&"log"===n.scaleType?"log":"linear":t[0]instanceof Date&&(i="date"),i},Am=function(t,n,i){var e;void 0===i&&(i={});var r=ug(n.filter((function(n){return hc(n,t)}))),o=r[0],u=r[1];return"linear"===t&&(o=(e=ug([o,u,0]))[0],u=e[1]),_l(i.rangeStart)||(o=i.rangeStart),_l(i.rangeEnd)||(u=i.rangeEnd),_l(o)||_l(u)?[]:[o,u]},Sm=function(t){return t*Math.PI/180},Lm=function(t,n){return(("clockwise"===n?t:450-t)%360+360)%360},Vm=function(t,n){return"string"==typeof t?t:"radians"===n?"".concat(fl(t/180,6),"π"):"".concat(fl(t,6),"°")},Dm=(0,a.Z)(),Nm=u.forwardRef((function(t,n){var i,e,r,a,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D=u.useRef(null),N=u.useRef(null),O=u.useRef(null),T=u.useState(200),E=T[0],F=T[1],B=u.useState(200),P=B[0],_=B[1],H=u.useState(t.hideLegend?0:32),I=H[0],W=H[1],R=u.useState(!1),z=R[0],j=R[1],$=u.useState(null),Y=$[0],X=$[1],G=u.useState(""),U=G[0],q=G[1],Z=u.useState(""),K=Z[0],J=Z[1],Q=u.useState(""),tt=Q[0],nt=Q[1],it=u.useState(""),et=it[0],rt=it[1],ot=u.useState(""),ut=ot[0],at=ot[1],lt=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),st=lt[0],ct=lt[1],dt=u.useState(""),ft=dt[0],vt=dt[1];u.useImperativeHandle(t.componentRef,(function(){return{chartContainer:D.current,toImage:function(n){var i;return af([{container:D.current}],t.hideLegend||null===(i=N.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),n)}}}),[t.hideLegend]),u.useEffect((function(){if(D.current){var t=D.current.getBoundingClientRect(),n=t.width,i=t.height;F(n),_(i)}}),[D]),u.useEffect((function(){if(t.hideLegend)W(0);else if(O.current){var n=O.current.getBoundingClientRect().height,i=(0,s.z)(O.current),e=(null==i?void 0:i.getComputedStyle(O.current).marginTop)||"0px";W(Math.max(n,32)+parseFloat(e))}}),[t.hideLegend]),u.useEffect((function(){var n;ct((null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)||[])}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]);var ht=u.useMemo((function(){return(0,o.Cl)({left:46,right:46,top:26,bottom:26},t.margins)}),[t.margins]),pt=u.useMemo((function(){return t.width||E}),[t.width,E]),gt=u.useMemo((function(){return(t.height||P)-I}),[t.height,P,I]),yt=u.useMemo((function(){return Math.min(pt-(ht.left+ht.right),gt-(ht.top+ht.bottom))/2}),[pt,gt,ht]),mt=u.useMemo((function(){return Math.max(0,Math.min(Math.abs(t.hole||0),1))*yt}),[t.hole,yt]),bt=u.useRef({}),xt=u.useMemo((function(){bt.current={};var n=0,i=["areapolar","linepolar","scatterpolar"];return t.data.map((function(t){var i=t.color?cs(t.color):ss(n++,0);return t.legend in bt.current||(bt.current[t.legend]=i),(0,o.Cl)((0,o.Cl)({},t),{color:i,data:t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{color:t.color?cs(t.color):i})}))})})).sort((function(t,n){return i.indexOf(t.type)-i.indexOf(n.type)}))}),[t.data]),wt=u.useCallback((function(t){var n={};return xt.forEach((function(i){i.data.forEach((function(i){var e=t?i.theta:i.r;n[e]||(n[e]=[]);var r=t?i.r:i.theta;"number"==typeof r&&n[e].push(r)}))})),n}),[xt]),Mt=u.useCallback((function(){var n;return lc(wt(),null===(n=t.radialAxis)||void 0===n?void 0:n.categoryOrder)}),[wt,null===(r=t.radialAxis)||void 0===r?void 0:r.categoryOrder]),Ct=u.useCallback((function(){var n;return lc(wt(!0),null===(n=t.angularAxis)||void 0===n?void 0:n.categoryOrder)}),[wt,null===(a=t.angularAxis)||void 0===a?void 0:a.categoryOrder]),kt=u.useMemo((function(){return xt.flatMap((function(t){return t.data.map((function(t){return t.r}))}))}),[xt]),At=u.useMemo((function(){var n;return km(kt,{scaleType:null===(n=t.radialAxis)||void 0===n?void 0:n.scaleType,supportsLog:!0})}),[kt,null===(c=t.radialAxis)||void 0===c?void 0:c.scaleType]),St=u.useMemo((function(){var n,i;return"category"===At?Mt():Am(At,kt,{rangeStart:null===(n=t.radialAxis)||void 0===n?void 0:n.rangeStart,rangeEnd:null===(i=t.radialAxis)||void 0===i?void 0:i.rangeEnd})}),[Mt,At,kt,null===(d=t.radialAxis)||void 0===d?void 0:d.rangeStart,null===(f=t.radialAxis)||void 0===f?void 0:f.rangeEnd]),Lt=u.useMemo((function(){var n,i,e,r,o,u;return function(t,n,i,e){var r,o,u;if(void 0===e&&(e={}),"category"===t){var a=Tu().domain(n).range(i).paddingInner(1),l=Array.isArray(e.tickValues)?e.tickValues:n;return{scale:a,tickValues:l,tickLabels:l.map((function(t,n){return Array.isArray(e.tickValues)&&Array.isArray(e.tickText)&&!_l(e.tickText[n])?e.tickText[n]:t}))}}(u="date"===t?e.useUTC?Au():ku():"log"===t?ta():Gu()).domain(n),u.range(i),u.nice();var s,c=null!==(r=e.tickCount)&&void 0!==r?r:4,d=Array.isArray(e.tickValues)?e.tickValues:void 0;if("date"===t){var f=100,v=-1;u.ticks().forEach((function(t){var n=ws(t,e.useUTC);n>v&&(v=n),n<f&&(f=n)}));var h=null!==(o=e.dateLocalizeOptions)&&void 0!==o?o:(0,Yn.c2)(f,v);s=function(t,n){return Array.isArray(e.tickValues)&&Array.isArray(e.tickText)&&!_l(e.tickText[n])?e.tickText[n]:_l(e.culture)&&"string"==typeof e.tickFormat?e.useUTC?Ge(e.tickFormat)(t):Xe(e.tickFormat)(t):(0,Yn.Yn)(t,e.culture,e.useUTC,!1,h)},e.tickStep&&(d=xc(e.tickStep,e.tick0,u.domain(),e.useUTC))}else{var p=u.tickFormat(c);s=function(t,n){if(Array.isArray(e.tickValues)&&Array.isArray(e.tickText)&&!_l(e.tickText[n]))return e.tickText[n];if("string"==typeof e.tickFormat)return ju(e.tickFormat)(t);var i="number"==typeof t?t:t.valueOf();return""===p(i)?"":(0,Yn.c$)(i,e.culture)},e.tickStep&&(d=bc(t,e.tickStep,e.tick0,u.domain()))}var g=null!=d?d:u.ticks(c);return{scale:u,tickValues:g,tickLabels:g.map(s)}}(At,St,[mt,yt],{useUTC:t.useUTC,tickCount:null===(n=t.radialAxis)||void 0===n?void 0:n.tickCount,tickValues:null===(i=t.radialAxis)||void 0===i?void 0:i.tickValues,tickText:null===(e=t.radialAxis)||void 0===e?void 0:e.tickText,tickFormat:null===(r=t.radialAxis)||void 0===r?void 0:r.tickFormat,culture:t.culture,tickStep:null===(o=t.radialAxis)||void 0===o?void 0:o.tickStep,tick0:null===(u=t.radialAxis)||void 0===u?void 0:u.tick0,dateLocalizeOptions:t.dateLocalizeOptions})}),[At,St,mt,yt,t.culture,t.dateLocalizeOptions,null===(v=t.radialAxis)||void 0===v?void 0:v.tick0,null===(h=t.radialAxis)||void 0===h?void 0:h.tickCount,null===(p=t.radialAxis)||void 0===p?void 0:p.tickFormat,null===(g=t.radialAxis)||void 0===g?void 0:g.tickStep,null===(y=t.radialAxis)||void 0===y?void 0:y.tickText,null===(m=t.radialAxis)||void 0===m?void 0:m.tickValues,t.useUTC]),Vt=Lt.scale,Dt=Lt.tickValues,Nt=Lt.tickLabels,Ot=u.useMemo((function(){return xt.flatMap((function(t){return t.data.map((function(t){return t.theta}))}))}),[xt]),Tt=u.useMemo((function(){var n;return km(Ot,{scaleType:null===(n=t.angularAxis)||void 0===n?void 0:n.scaleType})}),[Ot,null===(b=t.angularAxis)||void 0===b?void 0:b.scaleType]),Et=u.useMemo((function(){return"category"===Tt?Ct():Am(Tt,Ot)}),[Ct,Tt,Ot]),Ft=u.useMemo((function(){var n,i,e,r,o,u,a;return function(t,n,i){var e,r;if(void 0===i&&(i={}),"category"===t){var o={};n.forEach((function(t,n){o[t]=n}));var u=360/n.length,a=Array.isArray(i.tickValues)?i.tickValues:n;return{scale:function(t){return Sm(Lm(o[t]*u,i.direction))},tickValues:a,tickLabels:a.map((function(t,n){return Array.isArray(i.tickValues)&&Array.isArray(i.tickText)&&!_l(i.tickText[n])?i.tickText[n]:t}))}}var l=Array.isArray(i.tickValues)?i.tickValues:void 0;i.tickStep&&(l=null===(e=bc(t,i.tickStep,i.tick0,[0,("radians"===i.unit?2*Math.PI:360)-Cm]))||void 0===e?void 0:e.map((function(t){return"radians"===i.unit?180*t/Math.PI:t})));var s=null!=l?l:Su(0,360,360/(null!==(r=i.tickCount)&&void 0!==r?r:8));return{scale:function(t){return Sm(Lm(t,i.direction))},tickValues:s,tickLabels:s.map((function(t,n){return Array.isArray(i.tickValues)&&Array.isArray(i.tickText)&&!_l(i.tickText[n])?i.tickText[n]:"string"==typeof i.tickFormat?ju(i.tickFormat)(t):Vm(t,i.unit)}))}}(Tt,Et,{tickCount:null===(n=t.angularAxis)||void 0===n?void 0:n.tickCount,tickValues:null===(i=t.angularAxis)||void 0===i?void 0:i.tickValues,tickText:null===(e=t.angularAxis)||void 0===e?void 0:e.tickText,tickFormat:null===(r=t.angularAxis)||void 0===r?void 0:r.tickFormat,culture:t.culture,tickStep:null===(o=t.angularAxis)||void 0===o?void 0:o.tickStep,tick0:null===(u=t.angularAxis)||void 0===u?void 0:u.tick0,direction:t.direction,unit:null===(a=t.angularAxis)||void 0===a?void 0:a.unit})}),[Tt,Et,null===(x=t.angularAxis)||void 0===x?void 0:x.tick0,null===(w=t.angularAxis)||void 0===w?void 0:w.tickCount,null===(M=t.angularAxis)||void 0===M?void 0:M.tickFormat,null===(C=t.angularAxis)||void 0===C?void 0:C.tickStep,null===(k=t.angularAxis)||void 0===k?void 0:k.tickText,null===(A=t.angularAxis)||void 0===A?void 0:A.tickValues,null===(S=t.angularAxis)||void 0===S?void 0:S.unit,t.culture,t.direction]),Bt=Ft.scale,Pt=Ft.tickValues,_t=Ft.tickLabels,Ht=u.useMemo((function(){return Dm(t.styles,{theme:t.theme})}),[t.styles,t.theme]),It=u.useCallback((function(){var n=[],i=Vt.domain();return mt>0&&i[0]!==Dt[0]&&n.push(i[0]),n.push.apply(n,Dt),i[i.length-1]!==Dt[Dt.length-1]&&n.push(i[i.length-1]),u.createElement("g",null,u.createElement("g",null,n.map((function(i,e){var r=e===n.length-1?Ht.gridLineOuter:Ht.gridLineInner;if("polygon"===t.shape){var o="";return Pt.forEach((function(t,n){var e=pm(Bt(t),Vt(i));o+=(0===n?"M":"L")+e.join(",")+" "})),o+="Z",u.createElement("path",{key:e,d:o,className:r})}return u.createElement("circle",{key:e,cx:0,cy:0,r:Vt(i),className:r})}))),u.createElement("g",null,Pt.map((function(t,n){var i=pm(Bt(t),mt),e=pm(Bt(t),yt);return u.createElement("path",{key:n,d:"M".concat(i.join(",")," L").concat(e.join(",")),className:Ht.gridLineInner})}))))}),[mt,yt,Dt,Pt,Vt,Bt,t.shape,Ht.gridLineInner,Ht.gridLineOuter]),Wt=u.useCallback((function(){var n="clockwise"===t.direction?0:Math.PI/2,i=pm(n,mt),e=pm(n,yt),r=n>Cm&&n-Math.PI<Cm?1:-1;return u.createElement("g",null,u.createElement("g",null,u.createElement("path",{d:"M".concat(i.join(",")," L").concat(e.join(",")),className:Ht.gridLineOuter}),Dt.map((function(t,i){var e=pm(n,Vt(t)),o=e[0],a=e[1];return u.createElement("g",{key:i},u.createElement("path",{d:"M".concat(o,",").concat(a," L").concat(o+6*Math.cos(n)*r,",").concat(a+6*Math.sin(n)*r),className:Ht.gridLineOuter}),u.createElement("text",{x:o+16*Math.cos(n)*r,y:a+16*Math.sin(n)*r,textAnchor:Math.abs(n-Math.PI/2)<Cm||Math.abs(n-3*Math.PI/2)<Cm?"middle":n>Cm&&n-Math.PI/2<-Cm||n-Math.PI>Cm&&n-3*Math.PI/2<-Cm?"start":"end",dominantBaseline:"middle","aria-hidden":!0,className:Ht.tickLabel},Nt[i]))}))),u.createElement("g",null,Pt.map((function(t,n){var i=Bt(t),e=pm(i,yt+10),r=e[0],o=e[1];return u.createElement("text",{key:n,x:r,y:o,textAnchor:Math.abs(i)<Cm||Math.abs(i-Math.PI)<Cm?"middle":i>Math.PI?"end":"start",dominantBaseline:"middle","aria-hidden":!0,className:Ht.tickLabel},_t[n])}))))}),[Dt,Pt,Vt,Bt,yt,Ht.gridLineOuter,Ht.tickLabel,_t,mt,Nt,t.direction]),Rt=u.useCallback((function(){return st.length>0?st:ut?[ut]:[]}),[st,ut]),zt=u.useCallback((function(t){var n=Rt();return n.includes(t)||0===n.length}),[Rt]),jt=u.useCallback((function(t){var n,i,e,r,o,a,l,s=(i=Ah().curve(gm),e=i.curve,r=i.lineX0,o=i.lineX1,a=i.lineY0,l=i.lineY1,i.angle=i.x,delete i.x,i.startAngle=i.x0,delete i.x0,i.endAngle=i.x1,delete i.x1,i.radius=i.y,delete i.y,i.innerRadius=i.y0,delete i.y0,i.outerRadius=i.y1,delete i.y1,i.lineStartAngle=function(){return bm(r())},delete i.lineX0,i.lineEndAngle=function(){return bm(o())},delete i.lineX1,i.lineInnerRadius=function(){return bm(a())},delete i.lineY0,i.lineOuterRadius=function(){return bm(l())},delete i.lineY1,i.curve=function(t){return arguments.length?e(mm(t)):e()._curve},i).angle((function(t){return Bt(t.theta)})).innerRadius(mt).outerRadius((function(t){return Vt(t.r)})).curve(uc(null===(n=t.lineOptions)||void 0===n?void 0:n.curve,Mm)).defined((function(t){return pc(Bt(t.theta),Vt(t.r))})),c=zt(t.legend);return u.createElement("path",{d:s(t.data),fill:t.color,fillOpacity:c?.7:.1,pointerEvents:"none"})}),[mt,Vt,Bt,zt]),$t=u.useCallback((function(t){var n,i,e,r,o,a,l=bm(Cv().curve(gm)).angle((function(t){return Bt(t.theta)})).radius((function(t){return Vt(t.r)})).curve(uc(null===(n=t.lineOptions)||void 0===n?void 0:n.curve)).defined((function(t){return pc(Bt(t.theta),Vt(t.r))}));return u.createElement("path",{d:l(t.data),fill:"none",stroke:t.color,strokeOpacity:zt(t.legend)?1:.1,strokeWidth:null!==(e=null===(i=t.lineOptions)||void 0===i?void 0:i.strokeWidth)&&void 0!==e?e:3,strokeDasharray:null===(r=t.lineOptions)||void 0===r?void 0:r.strokeDasharray,strokeDashoffset:null===(o=t.lineOptions)||void 0===o?void 0:o.strokeDashoffset,strokeLinecap:null===(a=t.lineOptions)||void 0===a?void 0:a.strokeLinecap,pointerEvents:"none"})}),[Vt,Bt,zt]),Yt=u.useMemo((function(){return ug(xt.flatMap((function(t){return t.data.map((function(t){return t.markerSize}))})))}),[xt]),Xt=Yt[0],Gt=Yt[1],Ut=u.useCallback((function(n,i,e,r){var o,u,a;X(n.currentTarget),j(zt(r)),q(null!==(o=i.angularAxisCalloutData)&&void 0!==o?o:Vm(i.theta,null===(u=t.angularAxis)||void 0===u?void 0:u.unit)),J(r),nt(i.color),rt(null!==(a=i.radialAxisCalloutData)&&void 0!==a?a:(0,Yn.c$)(i.r,t.culture,t.useUTC)),vt(e)}),[zt,null===(L=t.angularAxis)||void 0===L?void 0:L.unit,t.culture,t.useUTC]),qt=u.useCallback((function(){j(!1),vt("")}),[]),Zt=u.useMemo((function(){return 0===xt.filter((function(t){return"areapolar"===t.type||"linepolar"===t.type})).length}),[xt]),Kt=u.useCallback((function(n,i){var e=zt(n.legend);return u.createElement("g",null,n.data.map((function(r,o){var a,l;if(!pc(Bt(r.theta),Vt(r.r)))return null;var s=pm(Bt(r.theta),Vt(r.r)),c=s[0],d=s[1],f="".concat(i,"-").concat(o),v=ft===f,h=Zt?4:2,p=h;void 0!==r.markerSize&&Xt!==Gt&&(p=h+(r.markerSize-Xt)/(Gt-Xt)*(16-h));var g=r.radialAxisCalloutData||(0,Yn.c$)(r.r,t.culture,t.useUTC),y=n.legend,m=r.angularAxisCalloutData||Vm(r.theta,null===(a=t.angularAxis)||void 0===a?void 0:a.unit),b=(null===(l=r.callOutAccessibilityData)||void 0===l?void 0:l.ariaLabel)||"".concat(g,". ").concat(y,", ").concat(m,".");return u.createElement("circle",{key:o,cx:c,cy:d,r:p,fill:v?t.theme.semanticColors.bodyBackground:r.color,stroke:v?r.color:"none",strokeWidth:v?2:0,opacity:e?1:.1,"data-is-focusable":e?0:-1,onMouseOver:function(t){return Ut(t,r,f,n.legend)},onFocus:function(t){return Ut(t,r,f,n.legend)},role:"img","aria-label":b})})))}),[zt,Vt,Bt,ft,Ut,Xt,Gt,Zt,null===(V=t.angularAxis)||void 0===V?void 0:V.unit,t.culture,t.useUTC,t.theme]),Jt=u.useCallback((function(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?ct(n):ct(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}),[t.legendProps]),Qt=u.useCallback((function(){if(t.hideLegend)return null;var n=Object.keys(bt.current).map((function(t){return{title:t,color:bt.current[t],hoverAction:function(){at(t)},onMouseOutAction:function(){at("")}}}));return u.createElement("div",{ref:O,className:Ht.legendContainer},u.createElement(bf,(0,o.Cl)({legends:n,centerLegends:!0,onChange:Jt,ref:N},t.legendProps)))}),[t.hideLegend,t.legendProps,N,Jt,Ht.legendContainer]);return u.createElement("div",{className:Ht.root,ref:D,onMouseLeave:qt,onBlur:qt},u.createElement(td,{direction:dc.horizontal,className:Ht.chartWrapper},u.createElement("svg",{className:Ht.chart,width:pt,height:gt,role:"region","aria-label":(t.chartTitle?"".concat(t.chartTitle,". "):"")+"Polar chart with ".concat(xt.length," data series.")},u.createElement("g",{transform:"translate(".concat(pt/2,", ").concat(gt/2,")")},It(),u.createElement("g",null,xt.map((function(t,n){return u.createElement("g",{key:n,role:"region","aria-label":"".concat(t.legend,", series ").concat(n+1," of ").concat(xt.length," with ").concat(t.data.length," data points.")},"areapolar"===t.type&&jt(t),("areapolar"===t.type||"linepolar"===t.type)&&$t(t),Kt(t,n))}))),Wt()))),Qt(),!t.hideTooltip&&u.createElement($n,(0,o.Cl)({hidden:!z,target:Y,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:qt},t.calloutProps),u.createElement(Cc.ChartHoverCard,{XValue:U,Legend:K,color:tt,YValue:et,culture:t.culture})))}));Nm.displayName="PolarChart";var Om=function(t){return{fill:"none",stroke:t.palette.neutralPrimary,strokeWidth:"1px"}},Tm=(0,r.I)(Nm,(function(t){var n=t.theme;return{root:(0,o.Cl)((0,o.Cl)({},n.fonts.medium),{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",textAlign:"left"}),chart:{display:"block"},gridLineInner:[{opacity:.2},Om(n)],gridLineOuter:[{opacity:1},Om(n)],tickLabel:{fontSize:It.s.mini,fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary},legendContainer:{width:"100%"}}})),Em=fm(bv),Fm=fm(ep),Bm=fm(ch),Pm=fm(gg),_m=fm(Dh),Hm=fm(dp),Im=fm(zp),Wm=fm(Vg),Rm=fm(ap),zm=fm(tp),jm=fm(vh),$m=fm(vg),Ym=fm(hm),Xm=fm(Tm),Gm=function(t){var n=t.data[0].x,i=El(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:sy(t.x)})}))),{data:e,layout:t.layout}},Um={annotation:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g=null!==(o=Ny(t.layout,t.data,n))&&void 0!==o?o:[],y=ny(t.layout).chartTitle||void 0,m=t.layout;return{annotations:g,chartTitle:y,description:"string"==typeof(null===(u=null==m?void 0:m.meta)||void 0===u?void 0:u.description)?m.meta.description:void 0,width:"number"==typeof(null===(a=t.layout)||void 0===a?void 0:a.width)?t.layout.width:void 0,height:"number"==typeof(null===(l=t.layout)||void 0===l?void 0:l.height)?t.layout.height:void 0,paperBackgroundColor:"string"==typeof(null===(s=t.layout)||void 0===s?void 0:s.paper_bgcolor)?t.layout.paper_bgcolor:void 0,plotBackgroundColor:"string"==typeof(null===(c=t.layout)||void 0===c?void 0:c.plot_bgcolor)?t.layout.plot_bgcolor:void 0,fontColor:"string"==typeof(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.color)?t.layout.font.color:void 0,fontFamily:"string"==typeof(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.family)?t.layout.font.family:void 0,margin:null===(p=t.layout)||void 0===p?void 0:p.margin}},renderer:Tg},donut:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=t.data[0],M=Ug(null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null!==(f=null===(d=t.layout)||void 0===d?void 0:d.piecolorway)&&void 0!==f?f:null===(v=null==w?void 0:w.marker)||void 0===v?void 0:v.colors,i,r,!0),C={};if(i.current.clear(),w.labels&&w.values){var k=(null===(h=w.marker)||void 0===h?void 0:h.colors)||void 0,A=Array.isArray(k)&&k.length>=w.labels.length,S=w.labels.map((function(t,n){return{label:t,value:$y(w.values,n),index:n,color:A?k[n]:void 0}})).filter((function(t){return!_l(t.value)}));S.sort((function(t,n){return n.value-t.value})),S.forEach((function(n,e){var o,u,a,l,s,c,d="".concat(n.label),f=null!==(o=n.color)&&void 0!==o?o:qg(M,e,d,i,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);C[d]?C[d].data+=n.value:C[d]={legend:d,data:n.value,color:f}}))}var L=null!==(g=null===(p=t.layout)||void 0===p?void 0:p.width)&&void 0!==g?g:440,V=null!==(m=null===(y=t.layout)||void 0===y?void 0:y.height)&&void 0!==m?m:220,D=!!w.textinfo&&!["value","percent","label+percent"].includes(w.textinfo),N=D?0:80,O=40+(D?0:40),T=w.hole?w.hole*(Math.min(L-N,V-O)/2):1,E=ny(t.layout),F=E.chartTitle,B=E.titleStyles,P=Object.keys(C),_=P.length>1?(0,o.fX)([[P[0],C[P[0]]]],P.slice(1).reverse().map((function(t){return[t,C[t]]})),!0):P.map((function(t){return[t,C[t]]}));return(0,o.Cl)({data:{chartTitle:F,chartData:_.map((function(t){return t[1]}))},hideLegend:n||!1===(null===(b=t.layout)||void 0===b?void 0:b.showlegend),width:null===(x=t.layout)||void 0===x?void 0:x.width,height:V,innerRadius:T,hideLabels:D,showLabelsInPercent:!w.textinfo||["percent","label+percent","percent+label"].includes(w.textinfo),roundCorners:!0,order:"sorted"},B?{titleStyles:B}:{})},renderer:Em},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=t.data[0],M=w.link,C=w.node,k=(null!==(u=null==M?void 0:M.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return _l(t)||_l(null===(i=null==M?void 0:M.source)||void 0===i?void 0:i[n])||_l(null===(e=null==M?void 0:M.target)||void 0===e?void 0:e[n])?null:{value:t,source:null==M?void 0:M.source[n],target:null==M?void 0:M.target[n]}})).filter((function(t){return null!==t&&t.source>=0&&t.target>=0&&t.source!==t.target})),A=Ug(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null==C?void 0:C.color,i,r),S=Ug(null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,e,null==M?void 0:M.color,i,r),L={nodes:null===(v=C.label)||void 0===v?void 0:v.map((function(n,e){var o,u,a;return{nodeId:e,name:n,color:qg(A,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r)}})),links:k.map((function(n,e){var u,a,l,s=qg(S,e,n.target,i,null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,r);return(0,o.Cl)((0,o.Cl)({},n),{color:s})}))},V={root:(0,o.Cl)({},(null===(p=null===(h=t.layout)||void 0===h?void 0:h.font)||void 0===p?void 0:p.size)?{fontSize:null===(g=t.layout.font)||void 0===g?void 0:g.size}:{})},D=ny(t.layout),N=D.chartTitle,O=D.titleStyles;return(0,o.Cl)({data:{chartTitle:N,SankeyChartData:L},width:null===(y=t.layout)||void 0===y?void 0:y.width,height:null!==(b=null===(m=t.layout)||void 0===m?void 0:m.height)&&void 0!==b?b:468,styles:V,enableReflow:!1,hideLegend:n||!1===(null===(x=t.layout)||void 0===x?void 0:x.showlegend)},O?{titleStyles:O}:{})},renderer:Im},table:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O=t.data[0],T=null!==(a=null===(u=O.cells)||void 0===u?void 0:u.values)&&void 0!==a?a:[],E=function(t,n){var i,e,r,u,a,l,s,c,d,f;return{values:null!==(e=null!==(i=null==t?void 0:t.values)&&void 0!==i?i:null==n?void 0:n.values)&&void 0!==e?e:[],align:null!==(r=null==t?void 0:t.align)&&void 0!==r?r:null==n?void 0:n.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(u=null==n?void 0:n.fill)&&void 0!==u?u:{}),null!==(a=null==t?void 0:t.fill)&&void 0!==a?a:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(l=null==n?void 0:n.font)&&void 0!==l?l:{}),null!==(s=null==t?void 0:t.font)&&void 0!==s?s:{}),format:null!==(c=null==t?void 0:t.format)&&void 0!==c?c:null==n?void 0:n.format,prefix:null!==(d=null==t?void 0:t.prefix)&&void 0!==d?d:null==n?void 0:n.prefix,suffix:null!==(f=null==t?void 0:t.suffix)&&void 0!==f?f:null==n?void 0:n.suffix}}(O.cells,null===(f=null===(d=null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.data)||void 0===c?void 0:c.table)||void 0===d?void 0:d[0])||void 0===f?void 0:f.cells),F=T[0].map((function(t,n){return T.map((function(t,i){var e,r,u,a=t[n],l="string"==typeof a?Ey(a):a,s="string"==typeof l||"number"==typeof l?function(t,n,i){if(null===t||"boolean"==typeof t)return t;var e=Array.isArray(i.format)?i.format[n]:i.format,r=Array.isArray(i.prefix)?i.prefix[n]:i.prefix,o=Array.isArray(i.suffix)?i.suffix[n]:i.suffix,u=t;if("number"==typeof t)if("string"==typeof e)try{u=ju(e)(t)}catch(n){u=Ys(t)}else u=Ys(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(l,i,E):l,c=Fy(null===(e=null==E?void 0:E.font)||void 0===e?void 0:e.color,n,i),d=Fy(null===(r=null==E?void 0:E.font)||void 0===r?void 0:r.size,n,i),f=Fy(null===(u=null==E?void 0:E.fill)||void 0===u?void 0:u.color,n,i),v=Fy(null==E?void 0:E.align,n,i);return{value:s,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},c?{color:c}:{}),"number"==typeof d?{fontSize:d}:{}),f?{backgroundColor:f}:{}),v?{textAlign:v}:{})}}))})),B={root:(0,o.Cl)({},(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.size)?{fontSize:t.layout.font.size}:{})},P=null===(b=null===(m=null===(y=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.data)||void 0===y?void 0:y.table)||void 0===m?void 0:m[0])||void 0===b?void 0:b.header,_=O.header,H={align:null!==(x=null==_?void 0:_.align)&&void 0!==x?x:null==P?void 0:P.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(w=null==P?void 0:P.fill)&&void 0!==w?w:{}),null!==(M=null==_?void 0:_.fill)&&void 0!==M?M:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(C=null==P?void 0:P.font)&&void 0!==C?C:{}),null!==(k=null==_?void 0:_.font)&&void 0!==k?k:{}),values:null!==(S=null!==(A=null==_?void 0:_.values)&&void 0!==A?A:null==P?void 0:P.values)&&void 0!==S?S:[]},I=ny(t.layout),W=I.chartTitle,R=I.titleStyles;return(0,o.Cl)({headers:function(t,n){return(Array.isArray(t[0])?t.map((function(t){return t.map((function(t){return Ey(t)})).filter(Boolean).join(" ")})):t.map((function(t){return Ey(t)}))).map((function(t,i){var e,r,u,a=Fy(null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.color,0,i),l=Fy(null===(r=null==n?void 0:n.font)||void 0===r?void 0:r.size,0,i),s=Fy(null===(u=null==n?void 0:n.fill)||void 0===u?void 0:u.color,0,i),c=Fy(null==n?void 0:n.align,0,i);return{value:t,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},"string"==typeof a?{color:a}:{}),"number"==typeof l?{fontSize:l}:{}),"string"==typeof s?{backgroundColor:s}:{}),c?{textAlign:c}:{})}}))}(null!==(V=null===(L=O.header)||void 0===L?void 0:L.values)&&void 0!==V?V:[],H),rows:F,width:null===(D=t.layout)||void 0===D?void 0:D.width,height:null===(N=t.layout)||void 0===N?void 0:N.height,styles:B,chartTitle:W},R?{titleStyles:R}:{})},renderer:$m},horizontalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M=jy(t.data,t.layout,n),C=M.legends,k=M.hideLegend,A=void 0,S=t.data.map((function(n,u){var a,l,s,c;A=Kg(t.layout,n,A);var d=Ug(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null===(c=n.marker)||void 0===c?void 0:c.color,i,r),f=C[u];return n.y.map((function(e,u){var a,l,s,c,v,h,p,g,y,m;if(_l(e))return null;var b=A?A(Il(null===(a=n.marker)||void 0===a?void 0:a.color)?null===(s=null===(l=n.marker)||void 0===l?void 0:l.color)||void 0===s?void 0:s[u%(null===(c=n.marker)||void 0===c?void 0:c.color).length]:0):qg(d,u,f,i,null===(p=null===(h=null===(v=t.layout)||void 0===v?void 0:v.template)||void 0===h?void 0:h.layout)||void 0===p?void 0:p.colorway,r),x=Zg(n,u);return(0,o.Cl)({x:_l(null===(g=n.x)||void 0===g?void 0:g[u])?0:n.x[u],y:e,legend:f,color:null!==(y=Po(b).copy({opacity:x}).formatHex8())&&void 0!==y?y:b},(null===(m=n.text)||void 0===m?void 0:m[u])?{barLabel:n.text[u].toString()}:{})})).filter((function(t){return null!==t}))})).flat(),L=null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:450,V=L-(null!==(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.margin)||void 0===s?void 0:s.l)&&void 0!==c?c:0)-(null!==(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.margin)||void 0===f?void 0:f.pad)&&void 0!==v?v:0),D=new Set(S.map((function(t){return t.y}))).size||1,N=V/(D*(1+1/(1+.01*D)));return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:S,secondaryYAxistitle:"string"==typeof(null===(p=null===(h=t.layout)||void 0===h?void 0:h.yaxis2)||void 0===p?void 0:p.title)?null===(y=null===(g=t.layout)||void 0===g?void 0:g.yaxis2)||void 0===y?void 0:y.title:(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.yaxis2)||void 0===b?void 0:b.title)||void 0===x?void 0:x.text)||"",barHeight:N,showYAxisLables:!0,height:L,width:null===(w=t.layout)||void 0===w?void 0:w.width,hideTickOverlap:!0,hideLegend:k,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,roundedTicks:!0},oy(t.data[0],t.layout)),ny(t.layout)),Uy(t.data,t.layout)),Ky(t.data,t.layout,!0)),Qy(t.data,t.layout))},renderer:Pm},groupedverticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s=(0,o.Cl)({},t);if(t.data.some((function(t){return"bar"===t.type&&Pl(t.y)}))){var c=t.data.map((function(t,n){return"bar"===t.type&&Pl(t.y)?function(t,n){if(!t||0===t.length)return{traces:[],x:[]};var i=n&&n.length===t.length?n:t.map((function(t,n){return"Item ".concat(n+1)})),e=t.map((function(t,n){var e;if("object"==typeof t&&null!==t){var r=py(t),o={};return Object.keys(r).forEach((function(t){var n=r[t];!function(t){var n=t.toLowerCase();return!(!n.includes("style")&&"style"!==n&&!new RegExp("^(color|fill|stroke|border|background|font|shadow|outline|margin|padding|gap|align|justify|display|flex|grid|text|line|letter|word|vertical|horizontal|overflow|position|top|right|bottom|left|zindex|z-index|opacity|filter|clip|cursor|resize|transition|animation|transform|box|column|row|direction|visibility|content|width|height|aspect|image|user|pointer|caret|scroll|%)|(-webkit-|-moz-|-ms-|-o-)","i").test(n))}(t)&&("number"==typeof n||"string"==typeof n&&Vl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&Vl(t)?((e={})[i[n]||"item_".concat(n)]=t,e):{}})),r=new Set;e.forEach((function(t){Object.keys(t).forEach((function(t){return r.add(t)}))}));var o=[];return r.forEach((function(t){var n=[],r=!1,u=!1;if(e.forEach((function(i,e){var o=i[t];"number"==typeof o?(n.push(o),r=!0,u=!0):"string"==typeof o&&Vl(o)&&(n.push(parseFloat(o)),r=!0,u=!0)})),r&&u){var a={type:"bar",name:t,x:i,y:n};o.push(a)}})),{traces:o,x:i}}(t.y,Array.isArray(t.x)?t.x:void 0).traces.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{marker:t.marker})})):[t]})).flat();s=(0,o.Cl)((0,o.Cl)({},t),{data:c})}var d=[],f=dy(s.data,s.layout),v=jy(s.data,s.layout,n),h=v.legends,p=v.hideLegend,g=void 0,y=ey(s.data[0],s.layout);s.data.forEach((function(t,n){var u,a,l,c,f,v,p,m,b,x,w;g=Kg(s.layout,t,g);var M=h[n],C=zy(t);if("bar"===t.type){var k=Ug(null===(l=null===(a=null===(u=s.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(c=t.marker)||void 0===c?void 0:c.color,i,r);d.push({type:"bar",legend:M,key:M,data:t.x.map((function(n,e){var u,a,l,c,d,f,v,h,p;if(!_l(n)&&!_l(null===(u=t.y)||void 0===u?void 0:u[e])){var m=g?g(Il(null===(a=t.marker)||void 0===a?void 0:a.color)?null===(c=null===(l=t.marker)||void 0===l?void 0:l.color)||void 0===c?void 0:c[e%(null===(d=t.marker)||void 0===d?void 0:d.color).length]:0):qg(k,e,M,i,null===(h=null===(v=null===(f=s.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r),b=Zg(t,e),x=t.y[e],w=Array.isArray(t.text)?t.text[e]:t.text;return w&&t.texttemplate&&(w=vy(w,t.texttemplate,e)),(0,o.Cl)({x:n.toString(),y:x,yAxisCalloutData:ly(x,y),color:null!==(p=Po(m).copy({opacity:b}).formatHex8())&&void 0!==p?p:m},w?{barLabel:String(w)}:{})}})).filter((function(t){return void 0!==t})),useSecondaryYScale:cy(t,s.layout)})}else if("scatter"===t.type){var A=Ug(null===(p=null===(v=null===(f=s.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===p?void 0:p.colorway,e,null===(m=t.line)||void 0===m?void 0:m.color,i,r),S=qg(A,n,M,i,null===(w=null===(x=null===(b=s.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,r),L=By(t.line),V=Zg(t,n);Yy(t).forEach((function(n){var i,e=n[0],r=n[1],u=t.x.slice(e,r),a=t.y.slice(e,r);d.push({type:"line",legend:M,legendShape:C,data:u.map((function(t,n){var i=a[n];return{x:t.toString(),y:i,yAxisCalloutData:ly(i,y)}})),color:null!==(i=Po(S).copy({opacity:V}).formatHex8())&&void 0!==i?i:S,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=L?L:{}),{mode:t.mode}),useSecondaryYScale:cy(t,s.layout)})}))}}));var m=Ny(s.layout,s.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({dataV2:d,width:null===(u=s.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=s.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,barwidth:"auto",mode:"plotly"},f),{hideTickOverlap:!0,hideLegend:p,roundCorners:!0,roundedTicks:!0,showYAxisLables:!0}),oy(s.data[0],s.layout)),ny(s.layout)),Uy(s.data,s.layout)),ry(s.data[0],s.layout)),iy(s.data[0],s.layout)),y),Ky(s.data,s.layout)),Qy(s.data,s.layout)),m?{annotations:m}:{})},renderer:Rm},verticalstackedbar:{transformer:Oy,renderer:Fm},heatmap:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z=t.data[0],j=[],$=Number.POSITIVE_INFINITY,Y=Number.NEGATIVE_INFINITY,X=[],G=null===(u=t.layout)||void 0===u?void 0:u.annotations;if(G){var U=Array.isArray(G)?G:[G],q=new Set,Z=new Set,K=[];if(U.forEach((function(t){!t||"number"!=typeof t.x||"number"!=typeof t.y||"string"!=typeof t.text||"x"!==t.xref&&void 0!==t.xref||"y"!==t.yref&&void 0!==t.yref||(q.add(t.x),Z.add(t.y),K.push({x:t.x,y:t.y,text:Ey(t.text)}))})),K.length>0){var J=Array.from(q).sort((function(t,n){return t-n})),Q=Array.from(Z).sort((function(t,n){return t-n}));K.forEach((function(t){var n=J.indexOf(t.x),i=Q.indexOf(t.y);X[i]||(X[i]=[]),X[i][n]=t.text}))}}var tt=function(t,n){var i;return null===(i=X[n])||void 0===i?void 0:i[t]};if("histogram2d"===z.type){var nt=[],it=[],et=[];null===(a=z.x)||void 0===a||a.forEach((function(t,n){var i,e,r=null!==(i=$y(z.z,n))&&void 0!==i?i:0;_l(t)||_l(null===(e=z.y)||void 0===e?void 0:e[n])||(nt.push(t),it.push(z.y[n]),et.push(r))}));var rt=Bl(nt),ot=Bl(it),ut=Iy(nt,null===(l=z.xbins)||void 0===l?void 0:l.start,null===(s=z.xbins)||void 0===s?void 0:s.end,null===(c=z.xbins)||void 0===c?void 0:c.size),at=Iy(it,null===(d=z.ybins)||void 0===d?void 0:d.start,null===(f=z.ybins)||void 0===f?void 0:f.end,null===(v=z.ybins)||void 0===v?void 0:v.size),lt=at.map((function(){return ut.map((function(){return[]}))})),st=0;nt.forEach((function(t,n){var i=Py(ut,t,rt),e=Py(at,it[n],ot);-1!==i&&-1!==e&&lt[e][i].push(et[n])}));var ct=lt.map((function(t){return t.map((function(t){var n=Wy(z.histfunc,t);return st+=n,n}))}));ut.forEach((function(t,n){at.forEach((function(i,e){var r=Ry(z.histnorm,ct[e][n],st,rt?t.length:_y(t),ot?i.length:_y(i)),o=tt(n,e);j.push({x:rt?t.join(", "):Hy(t),y:ot?i.join(", "):Hy(i),value:r,rectText:o||r}),"number"==typeof r&&($=Math.min($,r),Y=Math.max(Y,r))}))}))}else{var dt=z.z,ft=z.x,vt=z.y,ht=null!==(h=null==dt?void 0:dt.length)&&void 0!==h?h:0,pt=null!==(g=null===(p=null==dt?void 0:dt[0])||void 0===p?void 0:p.length)&&void 0!==g?g:0,gt=null!=ft?ft:Array.from({length:pt},(function(t,n){return n})),yt=null!=vt?vt:Array.from({length:ht},(function(t,n){return ht-1-n}));gt.forEach((function(n,i){yt.forEach((function(e,r){var o,u,a,l,s,c=null===(o=null==dt?void 0:dt[r])||void 0===o?void 0:o[i],d=tt(i,r);j.push({x:"date"===(null===(a=null===(u=t.layout)||void 0===u?void 0:u.xaxis)||void 0===a?void 0:a.type)||null!=n?n:0,y:(null===(s=null===(l=t.layout)||void 0===l?void 0:l.yaxis)||void 0===s||s.type,e),value:c,rectText:d||c}),"number"==typeof c&&($=Math.min($,c),Y=Math.max(Y,c))}))}))}var mt={legend:null!==(y=z.name)&&void 0!==y?y:"",data:j,value:0},bt=[$,(Y+$)/2,Y],xt=[cs(es.color1),cs(es.color2),cs(es.color3)],wt=null!==(E=null!==(L=null!==(C=null!==(x=null!==(m=null==z?void 0:z.colorscale)&&void 0!==m?m:null===(b=t.layout)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(M=null===(w=t.layout)||void 0===w?void 0:w.coloraxis)||void 0===M?void 0:M.colorscale)&&void 0!==C?C:null===(S=null===(A=null===(k=t.layout)||void 0===k?void 0:k.template)||void 0===A?void 0:A.layout)||void 0===S?void 0:S.colorscale)&&void 0!==L?L:"histogram2d"===z.type&&(null===(T=null===(O=null===(N=null===(D=null===(V=t.layout)||void 0===V?void 0:V.template)||void 0===D?void 0:D.data)||void 0===N?void 0:N.histogram2d)||void 0===O?void 0:O[0])||void 0===T?void 0:T.colorscale))&&void 0!==E?E:null===(H=null===(_=null===(P=null===(B=null===(F=t.layout)||void 0===F?void 0:F.template)||void 0===B?void 0:B.data)||void 0===P?void 0:P.heatmap)||void 0===_?void 0:_[0])||void 0===H?void 0:H.colorscale;if(wt&&"object"==typeof wt&&("diverging"in wt||"sequential"in wt||"sequentialminus"in wt)){var Mt=$>=0,Ct=Y<=0;$<0&&Y>0?wt=null==wt?void 0:wt.diverging:Mt?wt=null==wt?void 0:wt.sequential:Ct&&(wt=null==wt?void 0:wt.sequentialminus)}var kt=Array.isArray(wt)?wt.map((function(t){return t[0]*(Y-$)+$})):bt,At=Array.isArray(wt)?wt.map((function(t){return t[1]})):xt;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:[mt],domainValuesForColorScale:kt,rangeValuesForColorScale:At,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(I=t.layout)||void 0===I?void 0:I.width,height:null!==(R=null===(W=t.layout)||void 0===W?void 0:W.height)&&void 0!==R?R:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0},ny(t.layout)),Uy([z],t.layout)),Qy(t.data,t.layout))},renderer:Hm},gauge:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z,j,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it,et,rt,ot,ut,at,lt,st,ct=t.data[0],dt=(null===(u=ct.gauge)||void 0===u?void 0:u.steps)?ct.gauge.steps.map((function(t){return t.color})):void 0,ft=Ug(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,dt,i,r),vt=(null===(d=null===(c=ct.gauge)||void 0===c?void 0:c.steps)||void 0===d?void 0:d.length)?ct.gauge.steps.map((function(n,e){var o,u,a,l,s,c=n.name||"Segment ".concat(e+1),d=qg(ft,e,c,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r);return{legend:c,size:(null===(l=n.range)||void 0===l?void 0:l[1])-(null===(s=n.range)||void 0===s?void 0:s[0]),color:d}})):[{legend:"Current",size:null!==(f=ct.value)&&void 0!==f?f:0-(null!==(g=null===(p=null===(h=null===(v=ct.gauge)||void 0===v?void 0:v.axis)||void 0===h?void 0:h.range)||void 0===p?void 0:p[0])&&void 0!==g?g:0),color:fy(null===(b=null===(m=null===(y=t.layout)||void 0===y?void 0:y.template)||void 0===m?void 0:m.layout)||void 0===b?void 0:b.colorway,e,null===(w=null===(x=ct.gauge)||void 0===x?void 0:x.axis)||void 0===w?void 0:w.color,i,r)},{legend:"Target",size:(null!==(A=null===(k=null===(C=null===(M=ct.gauge)||void 0===M?void 0:M.axis)||void 0===C?void 0:C.range)||void 0===k?void 0:k[1])&&void 0!==A?A:100)-(null!==(S=ct.value)&&void 0!==S?S:0),color:es.disabled}];if(null===(L=ct.delta)||void 0===L?void 0:L.reference){var ht=ct.value-ct.delta.reference;if(ht>=0){lt="▲ ".concat(ht);var pt=Ug(null===(N=null===(D=null===(V=t.layout)||void 0===V?void 0:V.template)||void 0===D?void 0:D.layout)||void 0===N?void 0:N.colorway,e,null===(T=null===(O=ct.delta)||void 0===O?void 0:O.increasing)||void 0===T?void 0:T.color,i,r);st=qg(pt,0,"",i,null===(B=null===(F=null===(E=t.layout)||void 0===E?void 0:E.template)||void 0===F?void 0:F.layout)||void 0===B?void 0:B.colorway,r)}else{lt="▼ ".concat(Math.abs(ht));var gt=Ug(null===(H=null===(_=null===(P=t.layout)||void 0===P?void 0:P.template)||void 0===_?void 0:_.layout)||void 0===H?void 0:H.colorway,e,null===(W=null===(I=ct.delta)||void 0===I?void 0:I.decreasing)||void 0===W?void 0:W.color,i,r);st=qg(gt,0,"",i,null===(j=null===(z=null===(R=t.layout)||void 0===R?void 0:R.template)||void 0===z?void 0:z.layout)||void 0===j?void 0:j.colorway,r)}}var yt={sublabel:{fill:st}},mt=ny(t.layout),bt=mt.chartTitle,xt=mt.titleStyles;return(0,o.Cl)({segments:vt,chartValue:null!==($=ct.value)&&void 0!==$?$:0,chartTitle:bt,sublabel:lt,minValue:"number"==typeof(null===(G=null===(X=null===(Y=ct.gauge)||void 0===Y?void 0:Y.axis)||void 0===X?void 0:X.range)||void 0===G?void 0:G[0])?null===(Z=null===(q=null===(U=ct.gauge)||void 0===U?void 0:U.axis)||void 0===q?void 0:q.range)||void 0===Z?void 0:Z[0]:void 0,maxValue:"number"==typeof(null===(Q=null===(J=null===(K=ct.gauge)||void 0===K?void 0:K.axis)||void 0===J?void 0:J.range)||void 0===Q?void 0:Q[1])?null===(it=null===(nt=null===(tt=ct.gauge)||void 0===tt?void 0:tt.axis)||void 0===nt?void 0:nt.range)||void 0===it?void 0:it[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=ct.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(et=t.layout)||void 0===et?void 0:et.width,height:null!==(ot=null===(rt=t.layout)||void 0===rt?void 0:rt.height)&&void 0!==ot?ot:220,styles:yt,variant:(null===(at=null===(ut=ct.gauge)||void 0===ut?void 0:ut.steps)||void 0===at?void 0:at.length)?wg.MultipleSegments:wg.SingleSegment,roundCorners:!0},xt?{titleStyles:xt}:{})},renderer:Wm},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s=[],c=jy(t.data,t.layout,n),d=c.legends,f=c.hideLegend,v=void 0;t.data.forEach((function(n,u){var a,l,c,f,h,p,g;if(n.x){v=Kg(t.layout,n,v);var y=Ug(null===(c=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===c?void 0:c.colorway,e,null===(f=n.marker)||void 0===f?void 0:f.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e,r=null!==(e=$y(n.y,i))&&void 0!==e?e:0;_l(t)||(m.push(t),b.push(r))}));var x=Bl(m),w=Iy(m,null===(h=n.xbins)||void 0===h?void 0:h.start,null===(p=n.xbins)||void 0===p?void 0:p.end,null===(g=n.xbins)||void 0===g?void 0:g.size),M=w.map((function(){return[]})),C=0;m.forEach((function(t,n){var i=Py(w,t,x);-1!==i&&M[i].push(b[n])}));var k=M.map((function(t){var i=Wy(n.histfunc,t);return C+=i,i}));w.forEach((function(e,a){var l,c,f,h,p,g,m,b,w=d[u],M=v?v(Il(null===(l=n.marker)||void 0===l?void 0:l.color)?null===(f=null===(c=n.marker)||void 0===c?void 0:c.color)||void 0===f?void 0:f[a%(null===(h=n.marker)||void 0===h?void 0:h.color).length]:0):qg(y,a,w,i,null===(m=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.layout)||void 0===m?void 0:m.colorway,r),A=Zg(n,a),S=Ry(n.histnorm,k[a],C,x?e.length:_y(e)),L=Array.isArray(n.text)?n.text[a]:n.text;L&&n.texttemplate&&(L=vy(L,n.texttemplate,a)),s.push((0,o.Cl)((0,o.Cl)({x:x?e.join(", "):Hy(e),y:S,legend:w,color:null!==(b=Po(M).copy({opacity:A}).formatHex8())&&void 0!==b?b:M},x?{}:{xAxisCalloutData:"[".concat(e.x0," - ").concat(e.x1,")")}),L?{barLabel:String(L)}:{}))}))}}));var h=Ny(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:s,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,supportNegativeData:!0,mode:"histogram",hideTickOverlap:!0,maxBarWidth:50,hideLegend:f,roundCorners:!0,roundedTicks:!0,showYAxisLables:!0},oy(t.data[0],t.layout)),ny(t.layout)),Uy(t.data,t.layout)),ry(t.data[0],t.layout)),h?{annotations:h}:{})},renderer:zm},area:{transformer:function(t,n,i,e,r){return Ty(t,n,"area",i,e,r)},renderer:_m,preTransformOperation:Gm},line:{transformer:function(t,n,i,e,r){return Ty(t,n,"line",i,e,r)},renderer:Bm,preTransformOperation:Gm},scatter:{transformer:function(t,n,i,e,r){return Ty(t,n,"scatter",i,e,r)},renderer:jm,preTransformOperation:Gm},funnel:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=t.data.length>1&&t.data.every((function(t){var n,i,e,r,o=null!==(i=null!==(n=t.values)&&void 0!==n?n:t.x)&&void 0!==i?i:t.value,u=null!==(r=null!==(e=t.labels)&&void 0!==e?e:t.y)&&void 0!==r?r:t.stage;return Array.isArray(u)&&Array.isArray(o)&&o.length>1&&u.length>1}));if(d){var f={};t.data.forEach((function(n,o){var u,a,l,s,d,v,h,p,g,y,m,b,x,w=n.name||"Category ".concat(o+1),M=Ug(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(s=n.marker)||void 0===s?void 0:s.colors)&&void 0!==d?d:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),C=qg(M,0,w,i,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,r);f[w]=C;var k=null!==(m=null!==(y=n.labels)&&void 0!==y?y:n.y)&&void 0!==m?m:n.stage,A=null!==(x=null!==(b=n.values)&&void 0!==b?b:n.x)&&void 0!==x?x:n.value;Il(k)&&Il(A)&&k&&Il(k)&&k.length>0&&k.forEach((function(t,n){var i=c.findIndex((function(n){return n.stage===t})),e=Number(A[n]);isNaN(e)||(-1===i?c.push({stage:t,subValues:[{category:w,value:e,color:C}]}):c[i].subValues.push({category:w,value:e,color:C}))}))}))}else t.data.forEach((function(n,o){var u,a,l,s,d,f,v=function(t){var n,i,e,r,o=t.orientation||"h",u=null!==(i=null!==(n=t.labels)&&void 0!==n?n:t.y)&&void 0!==i?i:t.stage,a=null!==(r=null!==(e=t.values)&&void 0!==e?e:t.x)&&void 0!==r?r:t.value,l=Bl(a),s=Bl(u),c=Tl(a),d=Tl(u),f=function(t){return Array.isArray(t)?t:"string"==typeof t||"number"==typeof t?[t]:[]};return"h"===o?s&&c?{categories:f(u),values:f(a)}:l&&d?{categories:f(a),values:f(u)}:{categories:f(s?u:a),values:f(s?a:u)}:l&&d?{categories:f(a),values:f(u)}:s&&c?{categories:f(u),values:f(a)}:{categories:f(l?a:u),values:f(l?u:a)}}(n),h=v.categories,p=v.values;if(Il(h)&&Il(p)){var g=Ug(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(s=n.marker)||void 0===s?void 0:s.colors)&&void 0!==d?d:null===(f=n.marker)||void 0===f?void 0:f.color,i,r);h.forEach((function(n,e){var o,u,a,l=qg(g,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r),s=Number(p[e]);isNaN(s)||c.push({stage:n,value:s,color:l})}))}}));var v=ny(t.layout),h=v.chartTitle,p=v.titleStyles;return(0,o.Cl)({data:c,chartTitle:h,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null===(a=t.layout)||void 0===a?void 0:a.height,orientation:"v"===(null===(l=t.data[0])||void 0===l?void 0:l.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(s=t.layout)||void 0===s?void 0:s.showlegend)},p?{titleStyles:p}:{})},renderer:Mg},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=t.data.filter((function(t){return"scatter"!==t.type||"markers"!==t.mode})),c=jy(s,t.layout,n),d=c.legends,f=c.hideLegend,v=void 0,h=em(s,im(s,t.layout).x),p=rm(h,Zy),g=function(t){var n=p(t);return"string"==typeof n?0:null!=n?n:0},y="date"===h,m=[];return s.forEach((function(n,o){var u,a,l,s,c=d[o];if("bar"===n.type){v=Kg(t.layout,n,v);var f=Ug(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r);n.y.forEach((function(e,o){var u,a,l,s,d,h,p,b,x;if(!_l(e)){var w=v?v(Il(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[o%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):qg(f,o,c,i,null===(p=null===(h=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===h?void 0:h.layout)||void 0===p?void 0:p.colorway,r),M=Zg(n,o),C=+g(Il(n.base)?n.base[o]:n.base),k=+g(null===(b=n.x)||void 0===b?void 0:b[o]);m.push({x:{start:y?new Date(C):C,end:y?new Date(C+k):C+k},y:e,legend:c,color:null!==(x=Po(w).copy({opacity:M}).formatHex8())&&void 0!==x?x:w})}}))}else if("scatter"===n.type&&"none"===n.mode&&"toself"===n.fill)for(var h=0;h<n.y.length;h+=5)if(!_l(n.y[h])&&!_l(n.y[h+3])){var p=g(n.x[h]),b=g(n.x[h+1]),x=n.y[h],w=n.y[h+3];m.push({x:{start:p,end:b},y:Math.round((x+w)/2),legend:c,color:n.fillcolor})}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:m,showYAxisLables:!0,height:null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:350,width:null===(l=t.layout)||void 0===l?void 0:l.width,hideTickOverlap:!0,hideLegend:f,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},ny(t.layout)),Uy(s,t.layout)),Ky(s,t.layout,!0)),Qy(s,t.layout))},renderer:Ym},scatterpolar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f=[],v=jy(t.data,t.layout,n),h=v.legends,p=v.hideLegend,g=rm(sm(t.data,"r",t.layout)._type);return t.data.forEach((function(n,u){var a,l,s,c,d,v,p,y,m,b=h[u];if("scatterpolar"===n.type){var x="toself"===n.fill||"tonext"===n.fill,w=void 0===n.mode||n.mode.includes("lines"),M=x?n.fillcolor:w?null===(a=n.line)||void 0===a?void 0:a.color:null===(l=n.marker)||void 0===l?void 0:l.color,C=Ug(null===(d=null===(c=null===(s=t.layout)||void 0===s?void 0:s.template)||void 0===c?void 0:c.layout)||void 0===d?void 0:d.colorway,e,M,i,r),k=qg(C,u,b,i,null===(y=null===(p=null===(v=t.layout)||void 0===v?void 0:v.template)||void 0===p?void 0:p.layout)||void 0===y?void 0:y.colorway,r),A=Zg(n,u),S=Po(k).copy({opacity:A}).formatHex8(),L=By(n.line),V=n.thetaunit,D={legend:b,legendShape:zy(n),color:S,data:(null===(m=n.r)||void 0===m?void 0:m.map((function(e,u){var a,l,s,c,d,f,v=null===(a=n.theta)||void 0===a?void 0:a[u],h=Array.isArray(null===(l=n.marker)||void 0===l?void 0:l.size)?n.marker.size[u]:null===(s=n.marker)||void 0===s?void 0:s.size,p=Array.isArray(n.text)?n.text[u]:n.text,y=qg(C,u,b,i,null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,r),m=Zg(n,u);if(!_l(g(e))&&!_l(v))return(0,o.Cl)((0,o.Cl)({r:g(e),theta:"number"==typeof v?"radians"===V?180*v/Math.PI:"gradians"===V?.9*v:v:v,color:y?Po(y).copy({opacity:m}).formatHex8():S},void 0!==h?{markerSize:h}:{}),void 0!==p?{text:p}:{})})).filter((function(t){return void 0!==t})))||[]};x||w?f.push((0,o.Cl)((0,o.Cl)({type:x?"areapolar":"linepolar"},D),{lineOptions:L})):f.push((0,o.Cl)({type:"scatterpolar"},D))}})),(0,o.Cl)({data:f,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:400,hideLegend:p},(s=t.data,c=t.layout,d={},Object.keys(om).forEach((function(t){var n=om[t],i=sm(s,t,c);d[n]=(0,o.Cl)((0,o.Cl)({scaleType:"log"===i._type?"log":"default",categoryOrder:cm(s,i),tickFormat:i.tickformat},function(t,n){var i={};if((!n.tickmode||"array"===n.tickmode)&&Il(n.tickvals)){var e="date"===n._type?n.tickvals.map((function(t){return new Date(t)})):n.tickvals;return i.tickValues=e,i.tickText=n.ticktext,i}if((!n.tickmode||"linear"===n.tickmode)&&n.dtick){var r=tm(n.dtick,n._type),o=nm(n.tick0,n._type,r);return i.tickStep=r,i.tick0=o,i}return(!n.tickmode||"auto"===n.tickmode)&&"number"==typeof n.nticks&&n.nticks>=0&&(i.tickCount=n.nticks),i}(0,i)),Il(i.range)?{rangeStart:i.range[0],rangeEnd:i.range[1]}:{}),"angularAxis"===n&&(d[n].unit=i.thetaunit,d.direction=i.direction)})),d))},renderer:Xm},fallback:{transformer:Oy,renderer:Fm}},qm=u.forwardRef((function(t,n){var i,e,r,a=t.colorwayType,s=void 0===a?"default":a,c=t.onSchemaChange,d=(0,o.Tt)(t,["colorwayType","onSchemaChange"]),f=Hl(d.chartSchema).plotlySchema,v=(t=>{var n;try{Hl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let i=(t=>{var n;try{const i=t;if(!i)throw new Error("Plotly input is null or undefined");if("object"!=typeof i)throw new Error("Plotly input is not an object. Input type: "+typeof i);const e=Wl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations);if(!Il(i.data)){if(e)return{...i,data:[]};throw new Error("Plotly input data is not a valid array or typed array")}if(0===i.data.length){if(e)return{...i,data:[]};throw new Error("Plotly input data is empty")}return i}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{i=Sl(i)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}const e=Wl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations),r=Il(i.data)&&i.data.length>0,o=r?((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Yl[r]){const o=Yl[r];for(const r of o)try{r(t,n)}catch(n){return i.push(`data[${e}] - type: ${t.type}, ${n}`),[-1,""]}}return[e,null!=r?r:""]})).filter((t=>t[0]>=0));if(0===e.length)throw new Error(i.join("; "));return e})(i.data,i.layout):[];if(!r&&e)return{isValid:!0,type:"annotation",validTracesInfo:[]};let u=!1,a=o.map((t=>{var n,e,r;const o=t[0],a=i.data[o];switch(a.type){case"pie":return{isValid:!0,traceIndex:o,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:o,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:o,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:o,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:o,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:o,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:o,type:"table"};case"bar":const t=a;return"h"===t.orientation?Xl(t)?{isValid:!0,traceIndex:o,type:"gantt"}:{isValid:!0,traceIndex:o,type:"horizontalbar"}:Pl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:["group","overlay"].includes(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.barmode)?Tl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:o,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:o,type:"funnel"};case"scatter":case"scattergl":const l=a;if(Jl(l,u))return u=!0,{isValid:!0,traceIndex:o,type:"gantt"};const s=zl(null!==(e=l.mode)&&void 0!==e?e:""),c=Array.isArray(null===(r=null==i?void 0:i.layout)||void 0===r?void 0:r.shapes)&&i.layout.shapes.some((t=>"line"===t.type));if(s)return{isValid:!0,traceIndex:o,type:c&&Zl(l,i.layout)?"line":"scatter"};const d=ql(l);return Kl(l,i.layout)?{isValid:!0,traceIndex:o,type:"fallback"}:{isValid:!0,traceIndex:o,type:d?"area":"line"};default:return{isValid:!1,errorMessage:`${Ll} ${a.type}`}}}));if(a.every((t=>!t.isValid)))return{isValid:!1,errorMessage:a.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};a=a.filter((t=>t.isValid));const l=a.map((t=>({index:t.traceIndex,type:t.type}))),s=a.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type));if(a.some((t=>"line"===t.type||"fallback"===t.type))){if(s)return{isValid:!0,type:a.some((t=>"verticalstackedbar"===t.type))?"fallback":"groupedverticalbar",validTracesInfo:l};if(a.some((t=>"fallback"===t.type)))return{isValid:!0,type:"fallback",validTracesInfo:l}}const c=new Set(a.map((t=>t.type)));return c.size>1?{isValid:!0,type:"composite",validTracesInfo:l}:{isValid:!0,type:Array.from(c)[0],validTracesInfo:l}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(f);if(!v.isValid)throw new Error("Invalid chart schema: ".concat(v.errorMessage));var h=f;try{h=Sl(h)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var p=(0,o.Cl)((0,o.Cl)({},h),{data:v.validTracesInfo.map((function(t){return h.data[t.index]}))}),g=v.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),y=f.selectedLegends,m=u.useRef(new Map),b=Og(),x=null!==(i=null==b?void 0:b.isInverted)&&void 0!==i&&i,w=u.useRef([]),M=u.useRef(!1),C=u.useRef(null),k=u.useRef(null);Il(y)||(y=[]);var A=u.useState(y),S=A[0],L=A[1],V=u.useCallback((function(t){L(t),c&&c({plotlySchema:{plotlyInput:h,selectedLegends:t}})}),[c,h]);u.useEffect((function(){var t=Hl(d.chartSchema).plotlySchema.selectedLegends;L(null!=t?t:[])}),[d.chartSchema]);var D={legendProps:{canSelectMultipleLegends:!0,onChange:V,selectedLegends:S},calloutProps:{layerProps:{eventBubblingEnabled:!0}}},N=u.useCallback((function(t){return(0,o.sH)(void 0,void 0,void 0,(function(){var n,i,e,r;return(0,o.YH)(this,(function(u){if(!k.current)throw new Error("Container reference is null");if(n=(0,o.Cl)({background:Js(k.current,b.semanticColors.bodyBackground),scale:5},t),!M.current){if(!(null===(e=null===(i=w.current[0])||void 0===i?void 0:i.compRef)||void 0===e?void 0:e.toImage))throw new Error("Chart cannot be exported as image");return[2,w.current[0].compRef.toImage(n)]}return[2,af(w.current.map((function(t){var n;return{container:null===(n=t.compRef)||void 0===n?void 0:n.chartContainer,row:t.row,col:t.col}})),null===(r=C.current)||void 0===r?void 0:r.toSVG,(0,l.jI)(),n)]}))}))}),[b]);u.useImperativeHandle(d.componentRef,(function(){return{exportAsImage:N}}),[N]);var O={},T=0;"annotation"===v.type?O.x=[]:p.data.forEach((function(t,n){var i,e,r="";Gy(v.validTracesInfo[n].type)?(r="".concat(Jg).concat(T+1),T++):r="scatterpolar"===v.validTracesInfo[n].type?null!==(i=t.subplot)&&void 0!==i?i:um:null!==(e=t.xaxis)&&void 0!==e?e:"x",O[r]||(O[r]=[]),O[r].push(n)})),M.current=Object.keys(O).length>1;var E=function(t,n,i){var e,r,o=[],u=[],a={},l="1fr",s="1fr",c={};if(!n)return{templateRows:l,templateColumns:s,layout:c};var d=null==t?void 0:t.layout;if(null!=d&&Object.keys(d).length>0&&Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r,a;if(t.startsWith("xaxis")){var c=Xy(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Xy(f,"y")))throw new Error("Invalid layout: xaxis ".concat(c+1," anchor should be y").concat(p+1));var v=d[t],h={start:(null==v?void 0:v.domain)?v.domain[0]:0,end:(null==v?void 0:v.domain)?v.domain[1]:1,cellName:"x".concat(0===o.length?"":o.length+1)};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Xy(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Xy(f,"x"))){if(1===c&&0===p||"right"===(null===(a=d.yaxis2)||void 0===a?void 0:a.side))return{templateRows:l,templateColumns:s};throw new Error("Invalid layout: yaxis ".concat(c+1," anchor should be x").concat(p+1))}var g=d[t],y={start:(null==g?void 0:g.domain)?g.domain[0]:0,end:(null==g?void 0:g.domain)?g.domain[1]:1,cellName:"x".concat(0===u.length?"":u.length+1)};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,a,l,s,c;if(Gy(n.type)){var d=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],f={start:(null===(a=d.domain)||void 0===a?void 0:a.x)?d.domain.x[0]:0,end:(null===(l=d.domain)||void 0===l?void 0:l.x)?d.domain.x[1]:1,cellName:"".concat(Jg).concat(o.length-r+1)},v={start:(null===(s=d.domain)||void 0===s?void 0:s.y)?d.domain.y[0]:0,end:(null===(c=d.domain)||void 0===c?void 0:c.y)?d.domain.y[1]:1,cellName:"".concat(Jg).concat(u.length-r+1)};o.push(f),u.push(v)}})),null!=d&&Object.keys(d).length>0&&(Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r;if(t.startsWith("polar")){var a=d[t],l={start:(null===(n=a.domain)||void 0===n?void 0:n.x)?a.domain.x[0]:0,end:(null===(i=a.domain)||void 0===i?void 0:i.x)?a.domain.x[1]:1,cellName:t},s={start:(null===(e=a.domain)||void 0===e?void 0:e.y)?a.domain.y[0]:0,end:(null===(r=a.domain)||void 0===r?void 0:r.y)?a.domain.y[1]:1,cellName:t};o.push(l),u.push(s)}})),null===(e=d.annotations)||void 0===e||e.forEach((function(t){var n=o.flatMap((function(n,i){return(null==t?void 0:t.x)>=n.start&&(null==t?void 0:t.x)<=n.end?[i]:[]})),i=u.findIndex((function(i,e){return n.includes(e)&&(null==t?void 0:t.y)>=i.start&&(null==t?void 0:t.y)<=i.end}));-1!==i&&(void 0===a[i]&&(a[i]={}),90===(null==t?void 0:t.textangle)?a[i].yAnnotation=t.text:a[i].xAnnotation=t.text)}))),o.length>0){var f=new Map;o.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);f.has(n)||f.set(n,t)}));var v=Array.from(f.values()).map((function(t){return t.start})).sort();s="repeat(".concat(v.length,", 1fr)"),o.forEach((function(t,n){var i=v.findIndex((function(n){return n===t.start}))+1,e=a[n],r={row:-1,column:i,xAnnotation:null==e?void 0:e.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[t.cellName]=r}))}if(u.length>0){var h=new Map;u.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);h.has(n)||h.set(n,t)}));var p=Array.from(h.values()).map((function(t){return t.start})).sort(),g=p.length;l="repeat(".concat(g,", 1fr)"),u.forEach((function(t,n){var i=p.findIndex((function(n){return n===t.start})),e=g-i,r=a[n],o=null==r?void 0:r.yAnnotation,u=c[t.cellName];void 0!==u&&(u.row=e,u.yAnnotation=o,u.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(p,M.current,v.validTracesInfo);if(M.current&&E.templateRows===Qg&&E.templateColumns===Qg){if("donut"===v.type){var F=Object.keys(O);F.forEach((function(t,n){n<F.length-1&&delete O[t]}))}else Object.keys(O).forEach((function(t,n){n>0&&delete O[t]}));M.current=!1}var B,P=function(t,n,i,e,r){var o=[];return t.data.reduce((function(t,n){return t||!0===n.showlegend||void 0===n.showlegend}),!1)&&t.data.forEach((function(u,a){var l,s,c,d,f,v,h,p,g,y,m,b,x;if("donut"===e[a].type){var w=u,M=Ug(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.piecolorway)&&void 0!==s?s:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,i,null!==(h=null===(v=t.layout)||void 0===v?void 0:v.piecolorway)&&void 0!==h?h:null===(p=null==w?void 0:w.marker)||void 0===p?void 0:p.colors,n,r,!0);Il(w.labels)&&w.labels.forEach((function(i,e){var u,a,l,s,c,d="".concat(i),f=qg(M,e,d,n,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);""!==d&&!1===o.some((function(t){return t.title===d}))&&o.push({title:d,color:f})}))}else if(!1===Gy(e[a].type)){var C=u,k=C.legendgroup,A=(null===(g=C.line)||void 0===g?void 0:g.color)||(null===(y=C.marker)||void 0===y?void 0:y.color),S=zy(C),L=Ug(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.template)||void 0===b?void 0:b.layout)||void 0===x?void 0:x.colorway,i,A,n,r);void 0!==k&&""!==k&&!1===o.some((function(t){return t.title===k}))&&o.push({title:k,color:L,shape:S})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(p,m,s,v.validTracesInfo,x),_=null===(e=p.layout)||void 0===e?void 0:e.title,H="string"==typeof _?_:null!==(r=null==_?void 0:_.text)&&void 0!==r?r:"",I="object"==typeof _?null==_?void 0:_.font:void 0,W=b.fonts.medium,R=W.fontFamily,z=W.fontSize,j=W.fontWeight,$=(0,o.Cl)({fontFamily:R,fontSize:z,fontWeight:j,color:b.semanticColors.bodyText,textAlign:"center",marginBottom:"8px"},pv(I));return u.createElement(u.Fragment,null,M.current&&H&&u.createElement("div",{style:$},H),u.createElement("div",{style:{display:"grid",gridTemplateRows:E.templateRows,gridTemplateColumns:E.templateColumns},ref:k},Object.entries(O).map((function(t,n){var i,e,r,a,l,c=t[0],d=t[1],f=(0,o.Cl)((0,o.Cl)({},p),{data:d.map((function(t){return p.data[t]}))}),h=g.filter((function(t){return d.includes(t.index)})),y="fallback"===v.type||"groupedverticalbar"===v.type?v.type:null!==(e=null===(i=h[0])||void 0===i?void 0:i.type)&&void 0!==e?e:v.type;g.some((function(t){return"line"===t.type}))&&g.some((function(t){return"scatter"===t.type}))&&(y="line");var b=Um[y];if(b){var C=b.transformer,k=b.renderer,A=b.preTransformCondition,S=b.preTransformOperation;if(void 0===A||A(f)){var L=S?S(f):f,V=E.layout[c],N="annotation"===y?{}:(0,o.Cl)({},D);return function(t,n,i,e,r,a){var l=n.apply(void 0,i);return u.createElement("div",{key:"".concat(r,"_").concat(a),style:{gridRowStart:r,gridRowEnd:r+1,gridColumnStart:a,gridColumnEnd:a+1}},u.createElement(t,(0,o.Cl)({},l,e)))}(k,C,[L,M.current,m,s,x],(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},N),(null==V?void 0:V.xAnnotation)&&{xAxisAnnotation:V.xAnnotation}),(null==V?void 0:V.yAnnotation)&&{yAxisAnnotation:V.yAnnotation}),{componentRef:function(t){var i,e;w.current[n]={compRef:t,row:null!==(i=null==V?void 0:V.row)&&void 0!==i?i:1,col:null!==(e=null==V?void 0:V.column)&&void 0!==e?e:1}}}),null!==(r=null==V?void 0:V.row)&&void 0!==r?r:1,null!==(a=null==V?void 0:V.column)&&void 0!==a?a:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(l=f.data[0])||void 0===l?void 0:l.type))}))),M.current&&(B=P,u.createElement(bf,(0,o.Cl)({},B,{selectedLegends:S,onChange:V,ref:C}))))}));qm.displayName="DeclarativeChart",(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();
1
+ var FluentUIReactCharting;!function(){"use strict";var t={40:function(t,n,i){i.d(n,{nr:function(){return s}});var e,r=i(823),o=i(638),u="__stylesheet__",a="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),l={};try{l=window||{}}catch(t){}var s=function(){function t(t,n){var i,e,o,u,a,l;this._rules=[],this._preservedRules=[],this._counter=0,this._keyToClassName={},this._onInsertRuleCallbacks=[],this._onResetCallbacks=[],this._classNameToArgs={},this._config=(0,r.Cl)({injectionMode:"undefined"==typeof document?0:1,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=null!==(i=null==n?void 0:n.classNameToArgs)&&void 0!==i?i:this._classNameToArgs,this._counter=null!==(e=null==n?void 0:n.counter)&&void 0!==e?e:this._counter,this._keyToClassName=null!==(u=null!==(o=this._config.classNameCache)&&void 0!==o?o:null==n?void 0:n.keyToClassName)&&void 0!==u?u:this._keyToClassName,this._preservedRules=null!==(a=null==n?void 0:n.preservedRules)&&void 0!==a?a:this._preservedRules,this._rules=null!==(l=null==n?void 0:n.rules)&&void 0!==l?l:this._rules}return t.getInstance=function(n){if(e=l[u],l[o.Se])return l[o.Se].getInstance(n);if(!e||e._lastStyleElement&&e._lastStyleElement.ownerDocument!==document){var i=(null==l?void 0:l.FabricConfig)||{},r=new t(i.mergeStyles,i.serializedStylesheet);e=r,l[u]=r}return e},t.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},t.prototype.setConfig=function(t){this._config=(0,r.Cl)((0,r.Cl)({},this._config),t)},t.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter((function(n){return n!==t}))}},t.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter((function(n){return n!==t}))}},t.prototype.getClassName=function(t){var n=this._config.namespace,i=t||this._config.defaultPrefix;return"".concat(n?n+"-":"").concat(i,"-").concat(this._counter++)},t.prototype.cacheClassName=function(t,n,i,e){this._keyToClassName[this._getCacheKey(n)]=t,this._classNameToArgs[t]={args:i,rules:e}},t.prototype.classNameFromKey=function(t){return this._keyToClassName[this._getCacheKey(t)]},t.prototype.getClassNameCache=function(){return this._keyToClassName},t.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},t.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},t.prototype.insertRule=function(t,n,i){void 0===i&&(i=o.P6);var e=this._config.injectionMode,r=0!==e?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),r)switch(e){case 1:this._insertRuleIntoSheet(r.sheet,t);break;case 2:r.appendChild(document.createTextNode(t))}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach((function(n){return n({key:i,sheet:r?r.sheet:void 0,rule:t})}))},t.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},t.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(t){return t()}))},t.prototype.resetKeys=function(){this._keyToClassName={}},t.prototype._createStyleElement=function(){var t,n=(null===(t=this._config.window)||void 0===t?void 0:t.document)||document,i=n.head,e=n.createElement("style"),r=null;e.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&e.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var u=this._findPlaceholderStyleTag();r=u?u.nextElementSibling:i.childNodes[0]}return i.insertBefore(e,i.contains(r)?r:null),this._lastStyleElement=e,e},t.prototype._insertRuleIntoSheet=function(t,n){if(!t)return!1;try{return t.insertRule(n,t.cssRules.length),!0}catch(t){}return!1},t.prototype._getCacheKey=function(t){return t},t.prototype._getStyleElement=function(){var t=this;return this._styleElement||(this._styleElement=this._createStyleElement(),a||(this._config.window||window).requestAnimationFrame((function(){t._styleElement=void 0}))),this._styleElement},t.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},t}()},41:function(t,n,i){var e,r,o,u,a;i.d(n,{BO:function(){return u},Dn:function(){return e},bi:function(){return r},s:function(){return o}}),function(t){t.Arabic="Segoe UI Web (Arabic)",t.Cyrillic="Segoe UI Web (Cyrillic)",t.EastEuropean="Segoe UI Web (East European)",t.Greek="Segoe UI Web (Greek)",t.Hebrew="Segoe UI Web (Hebrew)",t.Thai="Leelawadee UI Web",t.Vietnamese="Segoe UI Web (Vietnamese)",t.WestEuropean="Segoe UI Web (West European)",t.Selawik="Selawik Web",t.Armenian="Segoe UI Web (Armenian)",t.Georgian="Segoe UI Web (Georgian)"}(e||(e={})),function(t){t.Arabic="'".concat(e.Arabic,"'"),t.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",t.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",t.Cyrillic="'".concat(e.Cyrillic,"'"),t.EastEuropean="'".concat(e.EastEuropean,"'"),t.Greek="'".concat(e.Greek,"'"),t.Hebrew="'".concat(e.Hebrew,"'"),t.Hindi="'Nirmala UI'",t.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",t.Korean="'Malgun Gothic', Gulim",t.Selawik="'".concat(e.Selawik,"'"),t.Thai="'Leelawadee UI Web', 'Kmer UI'",t.Vietnamese="'".concat(e.Vietnamese,"'"),t.WestEuropean="'".concat(e.WestEuropean,"'"),t.Armenian="'".concat(e.Armenian,"'"),t.Georgian="'".concat(e.Georgian,"'")}(r||(r={})),function(t){t.size10="10px",t.size12="12px",t.size14="14px",t.size16="16px",t.size18="18px",t.size20="20px",t.size24="24px",t.size28="28px",t.size32="32px",t.size42="42px",t.size68="68px",t.mini="10px",t.xSmall="10px",t.small="12px",t.smallPlus="12px",t.medium="14px",t.mediumPlus="16px",t.icon="16px",t.large="18px",t.xLarge="20px",t.xLargePlus="24px",t.xxLarge="28px",t.xxLargePlus="32px",t.superLarge="42px",t.mega="68px"}(o||(o={})),function(t){t.light=100,t.semilight=300,t.regular=400,t.semibold=600,t.bold=700}(u||(u={})),function(t){t.xSmall="10px",t.small="12px",t.medium="16px",t.large="20px"}(a||(a={}))},61:function(t,n,i){function e(t){const n=Math.round(t);return Math.abs(t-n)<1e-6?n:t}i.d(n,{Di:function(){return e},Yn:function(){return u},c$:function(){return r},c2:function(){return a}});const r=(t,n,i)=>{if(null==t||""===t||Number.isNaN(t))return t;if(n=n||void 0,"number"==typeof t){const i=Math.abs(t)>=1e4;return e(t).toLocaleString(n,{useGrouping:i})}if("string"==typeof t&&!window.isNaN(Number(t))){const i=Number(t),r=Math.abs(i)>=1e4;return e(i).toLocaleString(n,{useGrouping:r})}return t instanceof Date?u(t,n,!!i):t},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u=(t,n,i,e=!0,r)=>(n=n||void 0,r=r||o,i&&(r={...r,timeZone:"UTC"}),e&&(r={...r,timeZoneName:"short"}),t.toLocaleString(n,r));function a(t,n){const i={second:"2-digit"},e={minute:"2-digit",second:"2-digit"},r={hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u={weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},a={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},l={hour:"2-digit",minute:"2-digit",hour12:!0},s={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},c={month:"short",day:"2-digit",hour:"2-digit",hour12:!0},d={month:"short",day:"2-digit"},f={year:"numeric",month:"2-digit",day:"2-digit"},v=[[i,i,e,r,u,a,a,o],[o,i,e,r,u,a,a,o],[o,o,l,l,{weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},s,s,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}],[o,o,o,{hour:"2-digit",hour12:!0},{weekday:"short",day:"2-digit",hour:"2-digit",hour12:!0},c,c,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hour12:!0}],[o,o,o,o,{weekday:"short",day:"2-digit"},d,d,f],[o,o,o,o,o,d,d,f],[o,o,o,o,o,o,{month:"long"},{month:"short",year:"numeric"}],[o,o,o,o,o,o,o,{year:"numeric"}]];return void 0===t||t<0||t>=v.length?o:void 0===n||n<t?v[t][t]:n>=v[t].length?v[t][v[t].length-1]:v[t][n]}},143:function(t,n,i){i.d(n,{a:function(){return D}});var e,r=i(302);!function(t){t.depth0="0 0 0 0 transparent",t.depth4="0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",t.depth8="0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",t.depth16="0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",t.depth64="0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)"}(e||(e={}));var o={elevation4:e.depth4,elevation8:e.depth8,elevation16:e.depth16,elevation64:e.depth64,roundedCorner2:"2px",roundedCorner4:"4px",roundedCorner6:"6px"},u=i(800),a=i(40),l=i(289),s=i(41),c="'Segoe UI', '".concat(s.Dn.WestEuropean,"'"),d={ar:s.bi.Arabic,bg:s.bi.Cyrillic,cs:s.bi.EastEuropean,el:s.bi.Greek,et:s.bi.EastEuropean,he:s.bi.Hebrew,hi:s.bi.Hindi,hr:s.bi.EastEuropean,hu:s.bi.EastEuropean,ja:s.bi.Japanese,kk:s.bi.EastEuropean,ko:s.bi.Korean,lt:s.bi.EastEuropean,lv:s.bi.EastEuropean,pl:s.bi.EastEuropean,ru:s.bi.Cyrillic,sk:s.bi.EastEuropean,"sr-latn":s.bi.EastEuropean,th:s.bi.Thai,tr:s.bi.EastEuropean,uk:s.bi.Cyrillic,vi:s.bi.Vietnamese,"zh-hans":s.bi.ChineseSimplified,"zh-hant":s.bi.ChineseTraditional,hy:s.bi.Armenian,ka:s.bi.Georgian};function f(t,n,i){return{fontFamily:i,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:t,fontWeight:n}}var v,h,p,g=i(543),y=i(338),m=i(468),b="language",x=(h=function(t){for(var n in d)if(d.hasOwnProperty(n)&&t&&0===n.indexOf(t))return d[n];return c}(function(t){if(void 0===t&&(t="sessionStorage"),void 0===v){var n=(0,g.Y)(),i="localStorage"===t?function(t){var n=null;try{var i=(0,y.z)();n=i?i.localStorage.getItem(t):null}catch(t){}return n}(b):"sessionStorage"===t?m.G(b):void 0;i&&(v=i),void 0===v&&n&&(v=n.documentElement.getAttribute("lang")),void 0===v&&(v="en")}return v}()),p="".concat(h,", ").concat("'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif"),{tiny:f(s.s.mini,s.BO.regular,p),xSmall:f(s.s.xSmall,s.BO.regular,p),small:f(s.s.small,s.BO.regular,p),smallPlus:f(s.s.smallPlus,s.BO.regular,p),medium:f(s.s.medium,s.BO.regular,p),mediumPlus:f(s.s.mediumPlus,s.BO.regular,p),large:f(s.s.large,s.BO.regular,p),xLarge:f(s.s.xLarge,s.BO.semibold,p),xLargePlus:f(s.s.xLargePlus,s.BO.semibold,p),xxLarge:f(s.s.xxLarge,s.BO.semibold,p),xxLargePlus:f(s.s.xxLargePlus,s.BO.semibold,p),superLarge:f(s.s.superLarge,s.BO.semibold,p),mega:f(s.s.mega,s.BO.semibold,p)});function w(t,n,i,e){!function(t){var n=a.nr.getInstance(),i=(0,l.bz)((0,u.Iy)(),t);if(!n.classNameFromKey(i)){var e=n.getClassName();n.insertRule("@font-face{".concat(i,"}"),!0),n.cacheClassName(e,i,[],["font-face",i])}}({fontFamily:t="'".concat(t,"'"),src:(void 0!==e?"local('".concat(e,"'),"):"")+"url('".concat(n,".woff2') format('woff2'),")+"url('".concat(n,".woff') format('woff')"),fontWeight:i,fontStyle:"normal",fontDisplay:"swap"})}function M(t,n,i,e,r){void 0===e&&(e="segoeui");var o="".concat(t,"/").concat(i,"/").concat(e);w(n,o+"-light",s.BO.light,r&&r+" Light"),w(n,o+"-semilight",s.BO.semilight,r&&r+" SemiLight"),w(n,o+"-regular",s.BO.regular,r),w(n,o+"-semibold",s.BO.semibold,r&&r+" SemiBold"),w(n,o+"-bold",s.BO.bold,r&&r+" Bold")}function C(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=0,r=n;e<r.length;e++)k(t||{},r[e]);return t}function k(t,n,i){for(var e in void 0===i&&(i=[]),i.push(n),n)if(n.hasOwnProperty(e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var r=n[e];if("object"!=typeof r||null===r||Array.isArray(r))t[e]=r;else{var o=i.indexOf(r)>-1;t[e]=o?r:k(t[e]||{},r,i)}}return i.pop(),t}!function(t){if(t){var n="".concat(t,"/fonts");M(n,s.Dn.Thai,"leelawadeeui-thai","leelawadeeui"),M(n,s.Dn.Arabic,"segoeui-arabic"),M(n,s.Dn.Cyrillic,"segoeui-cyrillic"),M(n,s.Dn.EastEuropean,"segoeui-easteuropean"),M(n,s.Dn.Greek,"segoeui-greek"),M(n,s.Dn.Hebrew,"segoeui-hebrew"),M(n,s.Dn.Vietnamese,"segoeui-vietnamese"),M(n,s.Dn.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),M(n,s.bi.Selawik,"selawik","selawik"),M(n,s.Dn.Armenian,"segoeui-armenian"),M(n,s.Dn.Georgian,"segoeui-georgian"),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-semilight"),s.BO.light),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-bold"),s.BO.semibold)}}(function(){var t,n,i=null===(t=(0,y.z)())||void 0===t?void 0:t.FabricConfig;return null!==(n=null==i?void 0:i.fontBaseUrl)&&void 0!==n?n:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var A=i(823);function S(t,n,i,e,r){return void 0===r&&(r=!1),function(t,n){var i="";return!0===n&&(i=" /* @deprecated */"),t.listTextColor=t.listText+i,t.menuItemBackgroundChecked+=i,t.warningHighlight+=i,t.warningText=t.messageText+i,t.successText+=i,t}(L(t,n,(0,A.Cl)({primaryButtonBorder:"transparent",errorText:e?"#F1707B":"#a4262c",messageText:e?"#F3F2F1":"#323130",messageLink:e?"#6CB8F6":"#005A9E",messageLinkHovered:e?"#82C7FF":"#004578",infoIcon:e?"#C8C6C4":"#605e5c",errorIcon:e?"#F1707B":"#A80000",blockingIcon:e?"#442726":"#FDE7E9",warningIcon:e?"#C8C6C4":"#797775",severeWarningIcon:e?"#FCE100":"#D83B01",successIcon:e?"#92C353":"#107C10",infoBackground:e?"#323130":"#f3f2f1",errorBackground:e?"#442726":"#FDE7E9",blockingBackground:e?"#442726":"#FDE7E9",warningBackground:e?"#433519":"#FFF4CE",severeWarningBackground:e?"#4F2A0F":"#FED9CC",successBackground:e?"#393D1B":"#DFF6DD",warningHighlight:e?"#fff100":"#ffb900",successText:e?"#92c353":"#107C10"},i),e),r)}function L(t,n,i,e,r){void 0===r&&(r=!1);var o={},u=t||{},a=u.white,l=u.black,s=u.themePrimary,c=u.themeDark,d=u.themeDarker,f=u.themeDarkAlt,v=u.themeLighter,h=u.neutralLight,p=u.neutralLighter,g=u.neutralDark,y=u.neutralQuaternary,m=u.neutralQuaternaryAlt,b=u.neutralPrimary,x=u.neutralSecondary,w=u.neutralSecondaryAlt,M=u.neutralTertiary,C=u.neutralTertiaryAlt,k=u.neutralLighterAlt,S=u.accent;return a&&(o.bodyBackground=a,o.bodyFrameBackground=a,o.accentButtonText=a,o.buttonBackground=a,o.primaryButtonText=a,o.primaryButtonTextHovered=a,o.primaryButtonTextPressed=a,o.inputBackground=a,o.inputForegroundChecked=a,o.listBackground=a,o.menuBackground=a,o.cardStandoutBackground=a),l&&(o.bodyTextChecked=l,o.buttonTextCheckedHovered=l),s&&(o.link=s,o.primaryButtonBackground=s,o.inputBackgroundChecked=s,o.inputIcon=s,o.inputFocusBorderAlt=s,o.menuIcon=s,o.menuHeader=s,o.accentButtonBackground=s),c&&(o.primaryButtonBackgroundPressed=c,o.inputBackgroundCheckedHovered=c,o.inputIconHovered=c),d&&(o.linkHovered=d),f&&(o.primaryButtonBackgroundHovered=f),v&&(o.inputPlaceholderBackgroundChecked=v),h&&(o.bodyBackgroundChecked=h,o.bodyFrameDivider=h,o.bodyDivider=h,o.variantBorder=h,o.buttonBackgroundCheckedHovered=h,o.buttonBackgroundPressed=h,o.listItemBackgroundChecked=h,o.listHeaderBackgroundPressed=h,o.menuItemBackgroundPressed=h,o.menuItemBackgroundChecked=h),p&&(o.bodyBackgroundHovered=p,o.buttonBackgroundHovered=p,o.buttonBackgroundDisabled=p,o.buttonBorderDisabled=p,o.primaryButtonBackgroundDisabled=p,o.disabledBackground=p,o.listItemBackgroundHovered=p,o.listHeaderBackgroundHovered=p,o.menuItemBackgroundHovered=p),y&&(o.primaryButtonTextDisabled=y,o.disabledSubtext=y),m&&(o.listItemBackgroundCheckedHovered=m),M&&(o.disabledBodyText=M,o.variantBorderHovered=(null==i?void 0:i.variantBorderHovered)||M,o.buttonTextDisabled=M,o.inputIconDisabled=M,o.disabledText=M),b&&(o.bodyText=b,o.actionLink=b,o.buttonText=b,o.inputBorderHovered=b,o.inputText=b,o.listText=b,o.menuItemText=b),k&&(o.bodyStandoutBackground=k,o.defaultStateBackground=k),g&&(o.actionLinkHovered=g,o.buttonTextHovered=g,o.buttonTextChecked=g,o.buttonTextPressed=g,o.inputTextHovered=g,o.menuItemTextHovered=g),x&&(o.bodySubtext=x,o.focusBorder=x,o.inputBorder=x,o.smallInputBorder=x,o.inputPlaceholderText=x),w&&(o.buttonBorder=w),C&&(o.disabledBodySubtext=C,o.disabledBorder=C,o.buttonBackgroundChecked=C,o.menuDivider=C),S&&(o.accentButtonBackground=S),(null==n?void 0:n.elevation4)&&(o.cardShadow=n.elevation4),!e&&(null==n?void 0:n.elevation8)?o.cardShadowHovered=n.elevation8:o.variantBorderHovered&&(o.cardShadowHovered="0 0 1px "+o.variantBorderHovered),(0,A.Cl)((0,A.Cl)({},o),i)}var V={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function D(t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var i=!!t.isInverted;return function(t,n){var i,e,r;void 0===n&&(n={});var o=C({},t,n,{semanticColors:L(n.palette,n.effects,n.semanticColors,void 0===n.isInverted?t.isInverted:n.isInverted)});if((null===(i=n.palette)||void 0===i?void 0:i.themePrimary)&&!(null===(e=n.palette)||void 0===e?void 0:e.accent)&&(o.palette.accent=n.palette.themePrimary),n.defaultFontStyle)for(var u=0,a=Object.keys(o.fonts);u<a.length;u++){var l=a[u];o.fonts[l]=C(o.fonts[l],n.defaultFontStyle,null===(r=null==n?void 0:n.fonts)||void 0===r?void 0:r[l])}return o}({palette:r.b,effects:o,fonts:x,spacing:V,isInverted:i,disableGlobalClassNames:!1,semanticColors:S(r.b,o,void 0,i,n),rtl:void 0},t)}},259:function(t,n,i){i.d(n,{jI:function(){return l}});var e,r=i(543),o=i(468),u=i(800),a="isRTL";function l(t){if(void 0===t&&(t={}),void 0!==t.rtl)return t.rtl;if(void 0===e){var n=(0,o.G)(a);null!==n&&function(t,n){void 0===n&&(n=!1);var i=(0,r.Y)();i&&i.documentElement.setAttribute("dir",t?"rtl":"ltr"),n&&(0,o.S)(a,t?"1":"0"),e=t,(0,u.DU)(e)}(e="1"===n);var i=(0,r.Y)();void 0===e&&i&&(e="rtl"===(i.body&&i.body.getAttribute("dir")||i.documentElement.getAttribute("dir")),(0,u.DU)(e))}return!!e}},263:function(t,n,i){i.d(n,{J:function(){return r}});var e=i(419),r=function(t){var n,i,r,o=t.color,u=t.XValue,a=t.theme,l=t.isRatioPresent,s=void 0!==l&&l;return{calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:a.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[a.fonts.small,{lineHeight:"16px",opacity:"0.85",color:a.semanticColors.bodySubtext}],calloutBlockContainer:[a.fonts.xxLarge,{marginTop:u?"13px":"unset",paddingLeft:"8px",lineHeight:"22px",color:a.semanticColors.bodyText,borderLeft:"4px solid ".concat(o),selectors:(n={},n[e.up]={forcedColorAdjust:"none"},n)}],calloutlegendText:[a.fonts.small,{lineHeight:"16px",color:a.semanticColors.bodyText,selectors:(i={},i[e.up]={color:"CanvasText"},i)}],calloutContentY:[a.fonts.xxLarge,{color:o||a.semanticColors.bodyText,fontWeight:"bold",lineHeight:"36px",selectors:(r={},r[e.up]={color:"CanvasText"},r)}],calloutInfoContainer:[s&&{display:"flex",alignItems:"flex-end"}],ratio:[a.fonts.small,{marginLeft:"6px",color:a.semanticColors.bodyText}],numerator:{fontWeight:e.BO.bold},denominator:{fontWeight:e.BO.semibold},descriptionMessage:[a.fonts.small,{color:a.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(a.semanticColors.menuDivider)}]}}},289:function(t,n,i){i.d(n,{Ae:function(){return L},bz:function(){return A},kG:function(){return V},GJ:function(){return S}});var e,r=i(823),o=i(40),u={},a={"user-select":1};function l(t,n){var i=function(){var t;if(!e){var n="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,r=null===(t=null==i?void 0:i.userAgent)||void 0===t?void 0:t.toLowerCase();e=n?{isWebkit:!(!n||!("WebkitAppearance"in n.documentElement.style)),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!i||!/rv:11.0/i.test(i.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return e}(),r=t[n];if(a[r]){var o=t[n+1];a[r]&&(i.isWebkit&&t.push("-webkit-"+r,o),i.isMoz&&t.push("-moz-"+r,o),i.isMs&&t.push("-ms-"+r,o),i.isOpera&&t.push("-o-"+r,o))}}var s,c=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(t,n){var i=t[n],e=t[n+1];if("number"==typeof e){var r=c.indexOf(i)>-1,o=i.indexOf("--")>-1,u=r||o?"":"px";t[n+1]="".concat(e).concat(u)}}var f="left",v="right",h="@noflip",p=((s={})[f]=v,s[v]=f,s),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function y(t,n,i){if(t.rtl){var e=n[i];if(!e)return;var r=n[i+1];if("string"==typeof r&&r.indexOf(h)>=0)n[i+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(e.indexOf(f)>=0)n[i]=e.replace(f,v);else if(e.indexOf(v)>=0)n[i]=e.replace(v,f);else if(String(r).indexOf(f)>=0)n[i+1]=r.replace(f,v);else if(String(r).indexOf(v)>=0)n[i+1]=r.replace(v,f);else if(p[e])n[i]=p[e];else if(g[r])n[i+1]=g[r];else switch(e){case"margin":case"padding":n[i+1]=function(t){if("string"==typeof t){var n=t.split(" ");if(4===n.length)return"".concat(n[0]," ").concat(n[3]," ").concat(n[2]," ").concat(n[1])}return t}(r);break;case"box-shadow":n[i+1]=function(t){var n=t.split(" "),i=parseInt(n[0],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r)}}}var m="displayName",b=/\:global\((.+?)\)/g;function x(t,n){return t.indexOf(":global(")>=0?t.replace(b,"$1"):0===t.indexOf(":host(")?t:0===t.indexOf(":")?n+t:t.indexOf("&")<0?n+" "+t:t}function w(t,n,i,e,r){void 0===n&&(n={__order:[]}),0===i.indexOf("@")?M([e],n,i=i+"{"+t,r):i.indexOf(",")>-1?function(t){if(!b.test(t))return t;for(var n=[],i=/\:global\((.+?)\)/g,e=null;e=i.exec(t);)e[1].indexOf(",")>-1&&n.push([e.index,e.index+e[0].length,e[1].split(",").map((function(t){return":global(".concat(t.trim(),")")})).join(", ")]);return n.reverse().reduce((function(t,n){var i=n[0],e=n[1],r=n[2];return t.slice(0,i)+r+t.slice(e)}),t)}(i).split(",").map((function(t){return t.trim()})).forEach((function(i){return M([e],n,x(i,t),r)})):M([e],n,x(i,t),r)}function M(t,n,i,e){void 0===n&&(n={__order:[]}),void 0===i&&(i="&");var r,o=n[i];o||(o={},n[i]=o,n.__order.push(i));for(var u=0,a=t;u<a.length;u++){var l=a[u];if("string"==typeof l){var s=e.argsFromClassName(l);s&&M(s,n,i,e)}else if(Array.isArray(l))M(l,n,i,e);else for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];if("selectors"===c){var f=l.selectors;for(var v in f)f.hasOwnProperty(v)&&w(i,n,v,f[v],e)}else"object"==typeof d||(r=c).indexOf(":global(")>=0||0===r.indexOf(":")?null!=d&&w(i,n,c,d,e):void 0!==d&&("margin"===c||"padding"===c?C(o,c,d):o[c]=d)}}return n}function C(t,n,i){var e="string"==typeof i?function(t){for(var n=[],i=0,e=0,r=0;r<t.length;r++)switch(t[r]){case"(":e++;break;case")":e&&e--;break;case"\t":case" ":e||(r>i&&n.push(t.substring(i,r)),i=r+1)}return i<t.length&&n.push(t.substring(i)),n}(i):[i];0===e.length&&e.push(i),"!important"===e[e.length-1]&&(e=e.slice(0,-1).map((function(t){return t+" !important"}))),t[n+"Top"]=e[0],t[n+"Right"]=e[1]||e[0],t[n+"Bottom"]=e[2]||e[0],t[n+"Left"]=e[3]||e[1]||e[0]}function k(t,n){return n<=0?"":1===n?t:t+k(t,n-1)}function A(t,n){if(!n)return"";var i,e,r,o=[];for(var a in n)n.hasOwnProperty(a)&&a!==m&&void 0!==n[a]&&o.push(a,n[a]);for(var s=0;s<o.length;s+=2)r=void 0,"-"!==(r=(i=o)[e=s]).charAt(0)&&(i[e]=u[r]=u[r]||r.replace(/([A-Z])/g,"-$1").toLowerCase()),d(o,s),y(t,o,s),l(o,s);for(s=1;s<o.length;s+=4)o.splice(s,1,":",o[s],";");return o.join("")}function S(t){for(var n,i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var r=null!==(n=t.stylesheet)&&void 0!==n?n:o.nr.getInstance(t.shadowConfig),u=M(i,void 0,void 0,r),a=function(t,n){for(var i=[t.rtl?"rtl":"ltr"],e=!1,r=0,o=n.__order;r<o.length;r++){var u=o[r];i.push(u);var a=n[u];for(var l in a)a.hasOwnProperty(l)&&void 0!==a[l]&&(e=!0,i.push(l,a[l]))}return e?i.join(""):void 0}(t,u);if(a){var l={className:r.classNameFromKey(a),key:a,args:i};if(!l.className){l.className=r.getClassName(function(t){var n=t&&t["&"];return n?n.displayName:void 0}(u));for(var s=[],c=0,d=u.__order;c<d.length;c++){var f=d[c];s.push(f,A(t,u[f]))}l.rulesToInsert=s}return l}}function L(t,n,i,e){void 0===n&&(n=1);var r=null!=e?e:o.nr.getInstance(i),u=t.className,a=t.key,l=t.args,s=t.rulesToInsert;if(s){for(var c=0;c<s.length;c+=2){var d=s[c+1];if(d){var f=s[c];f=f.replace(/&/g,k(".".concat(t.className),n));var v="".concat(f,"{").concat(d,"}").concat(0===f.indexOf("@")?"}":"");r.insertRule(v)}}r.cacheClassName(u,a,l,s)}}function V(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=S.apply(void 0,(0,r.fX)([t],n,!1));return e?(L(e,t.specificityMultiplier,t.shadowConfig,t.stylesheet),e.className):""}},302:function(t,n,i){i.d(n,{b:function(){return e}});var e={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"}},338:function(t,n,i){i.d(n,{z:function(){return o}});var e=i(921),r=void 0;try{r=window}catch(t){}function o(t){if((0,e.S)()&&void 0!==r){var n=t;return n&&n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView:r}}},357:function(t,n,i){i.r(n),i.d(n,{ChartHoverCard:function(){return d}});var e=i(566),r=i(823),o=i(594),u=i(873),a=i(61),l=(0,u.Z)(),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.color,i=t.Legend,e=t.XValue,r=t.YValue,u=t.styles,s=t.theme,c=t.ratio,d=t.descriptionMessage,f=t.culture;return this._classNames=l(u,{theme:s,color:n,XValue:e,isRatioPresent:!!c}),o.createElement("div",{className:this._classNames.calloutContentRoot},o.createElement("div",{className:this._classNames.calloutDateTimeContainer},o.createElement("div",{className:this._classNames.calloutContentX},e," ")),o.createElement("div",{className:this._classNames.calloutInfoContainer},o.createElement("div",{className:this._classNames.calloutBlockContainer},o.createElement("div",{className:this._classNames.calloutlegendText},(0,a.c$)(i,f)),o.createElement("div",{className:this._classNames.calloutContentY},(0,a.c$)(r,f))),!!c&&o.createElement("div",{className:this._classNames.ratio},o.createElement(o.Fragment,null,o.createElement("span",{className:this._classNames.numerator},(0,a.c$)(c[0],f)),"/",o.createElement("span",{className:this._classNames.denominator},(0,a.c$)(c[1],f))))),!!d&&o.createElement("div",{className:this._classNames.descriptionMessage},d))},n}(o.Component),c=i(263),d=(0,e.I)(s,c.J)},419:function(t,n,i){i.d(n,{lw:function(){return K},bp:function(){return Ct.b},s:function(){return kt.s},BO:function(){return kt.BO},up:function(){return it},nA:function(){return nt},QN:function(){return ot},gm:function(){return rt},Km:function(){return tt},O4:function(){return Mt},dX:function(){return J},Zq:function(){return e.Z}});var e=i(916),r=i(800),o=i(40),u=i(289);function a(t){var n=o.nr.getInstance(),i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e,"{",(0,u.bz)((0,r.Iy)(),t[e]),"}");var a=i.join(""),l=n.classNameFromKey(a);if(l)return l;var s=n.getClassName();return n.insertRule("@keyframes ".concat(s,"{").concat(a,"}"),!0),n.cacheClassName(s,a,[],["keyframes",a]),s}var l="cubic-bezier(.1,.9,.2,1)",s="cubic-bezier(.1,.25,.75,.9)",c="0.167s",d="0.267s",f="0.367s",v="0.467s",h=a({from:{opacity:0},to:{opacity:1}}),p=a({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),g=G(-10),y=G(-20),m=G(-40),b=G(-400),x=G(10),w=G(20),M=G(40),C=G(400),k=U(10),A=U(20),S=U(-10),L=U(-20),V=q(10),D=q(20),N=q(40),O=q(400),T=q(-10),E=q(-20),F=q(-40),B=q(-400),P=Z(-10),_=Z(-20),H=Z(10),I=Z(20),W=a({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),R=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),z=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),j=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),$=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),Y=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}});function X(t,n,i){return{animationName:t,animationDuration:n,animationTimingFunction:i,animationFillMode:"both"}}function G(t){return a({from:{transform:"translate3d(".concat(t,"px,0,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function U(t){return a({from:{transform:"translate3d(0,".concat(t,"px,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function q(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(".concat(t,"px,0,0)")}})}function Z(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,".concat(t,"px,0)")}})}var K=function(t){var n={},i=function(i){var r;t.hasOwnProperty(i)&&Object.defineProperty(n,i,{get:function(){return void 0===r&&(r=(0,e.Z)(t[i]).toString()),r},enumerable:!0,configurable:!0})};for(var r in t)i(r);return n}({slideRightIn10:X("".concat(h,",").concat(g),f,l),slideRightIn20:X("".concat(h,",").concat(y),f,l),slideRightIn40:X("".concat(h,",").concat(m),f,l),slideRightIn400:X("".concat(h,",").concat(b),f,l),slideLeftIn10:X("".concat(h,",").concat(x),f,l),slideLeftIn20:X("".concat(h,",").concat(w),f,l),slideLeftIn40:X("".concat(h,",").concat(M),f,l),slideLeftIn400:X("".concat(h,",").concat(C),f,l),slideUpIn10:X("".concat(h,",").concat(k),f,l),slideUpIn20:X("".concat(h,",").concat(A),f,l),slideDownIn10:X("".concat(h,",").concat(S),f,l),slideDownIn20:X("".concat(h,",").concat(L),f,l),slideRightOut10:X("".concat(p,",").concat(V),f,l),slideRightOut20:X("".concat(p,",").concat(D),f,l),slideRightOut40:X("".concat(p,",").concat(N),f,l),slideRightOut400:X("".concat(p,",").concat(O),f,l),slideLeftOut10:X("".concat(p,",").concat(T),f,l),slideLeftOut20:X("".concat(p,",").concat(E),f,l),slideLeftOut40:X("".concat(p,",").concat(F),f,l),slideLeftOut400:X("".concat(p,",").concat(B),f,l),slideUpOut10:X("".concat(p,",").concat(P),f,l),slideUpOut20:X("".concat(p,",").concat(_),f,l),slideDownOut10:X("".concat(p,",").concat(H),f,l),slideDownOut20:X("".concat(p,",").concat(I),f,l),scaleUpIn100:X("".concat(h,",").concat(W),f,l),scaleDownIn100:X("".concat(h,",").concat(z),f,l),scaleUpOut103:X("".concat(p,",").concat(j),c,s),scaleDownOut98:X("".concat(p,",").concat(R),c,s),fadeIn100:X(h,c,s),fadeIn200:X(h,d,s),fadeIn400:X(h,f,s),fadeIn500:X(h,v,s),fadeOut100:X(p,c,s),fadeOut200:X(p,d,s),fadeOut400:X(p,f,s),fadeOut500:X(p,v,s),rotate90deg:X($,"0.1s",s),rotateN90deg:X(Y,"0.1s",s)}),J={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",whiteSpace:"nowrap"},Q=(0,i(753).J9)((function(t,n){var i=o.nr.getInstance();return n?Object.keys(t).reduce((function(n,e){return n[e]=i.getClassName(t[e]),n}),{}):t}));function tt(t,n,i){return Q(t,void 0!==i?i:n.disableGlobalClassNames)}var nt,it="@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)",et=i(517);function rt(t,n,i,e,r,o,u,a){return function(t,n){var i,e;void 0===n&&(n={});var r=n.borderRadius,o=n.inset,u=void 0===o?0:o,a=n.width,l=void 0===a?1:a,s=n.position,c=void 0===s?"relative":s,d=n.highContrastStyle,f=n.borderColor,v=void 0===f?t.palette.white:f,h=n.outlineColor,p=void 0===h?t.palette.neutralSecondary:h,g=n.isFocusedOnly,y=void 0===g||g,m=n.pointerEvents;return{outline:"transparent",position:c,selectors:(i={"::-moz-focus-inner":{border:"0"}},i[".".concat(et.Y2," &").concat(y?":focus":"",":after, :host(.").concat(et.Y2,") &").concat(y?":focus":"",":after")]={content:'""',position:"absolute",pointerEvents:m,left:u+1,top:u+1,bottom:u+1,right:u+1,border:"".concat(l,"px solid ").concat(v),outline:"".concat(l,"px solid ").concat(p),zIndex:nt.FocusStyle,borderRadius:r,selectors:(e={},e[it]=d,e)},i)}}(t,"number"!=typeof n&&n?n:{inset:n,position:i,highContrastStyle:e,borderColor:r,outlineColor:o,isFocusedOnly:u,borderRadius:a})}function ot(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(t){t.Nav=1,t.ScrollablePane=1,t.FocusStyle=1,t.Coachmark=1e3,t.Layer=1e6,t.KeytipLayer=1000001}(nt||(nt={}));var ut,at=i(823),lt=i(338),st=i(540),ct=function(){return ct=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},ct.apply(this,arguments)},dt="undefined"==typeof window?i.g:window,ft=dt&&dt.CSPSettings&&dt.CSPSettings.nonce,vt=((ut=dt.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(ut=ct({},ut,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),ut.registeredThemableStyles||(ut=ct({},ut,{registeredThemableStyles:[]})),dt.__themeState__=ut,ut);function ht(t){vt.theme=t,function(){if(vt.theme){for(var t=[],n=0,i=vt.registeredThemableStyles;n<i.length;n++){var e=i[n];t.push(e.themableStyle)}t.length>0&&(void 0===(o=1)&&(o=3),3!==o&&2!==o||(pt(vt.registeredStyles),vt.registeredStyles=[]),3!==o&&1!==o||(pt(vt.registeredThemableStyles),vt.registeredThemableStyles=[]),r=[].concat.apply([],t),vt.loadStyles?vt.loadStyles(gt(r).styleString,r):function(t){if("undefined"!=typeof document){var n=document.getElementsByTagName("head")[0],i=document.createElement("style"),e=gt(t),r=e.styleString,o=e.themable;i.setAttribute("data-load-themed-styles","true"),i.type="text/css",ft&&i.setAttribute("nonce",ft),i.appendChild(document.createTextNode(r)),vt.perf.count++,n.appendChild(i);var u=document.createEvent("HTMLEvents");u.initEvent("styleinsert",!0,!1),u.args={newStyle:i},document.dispatchEvent(u);var a={styleElement:i,themableStyle:t};o?vt.registeredThemableStyles.push(a):vt.registeredStyles.push(a)}}(r))}var r,o}()}function pt(t){t.forEach((function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)}))}function gt(t){var n=vt.theme,i=!1;return{styleString:(t||[]).map((function(t){var e=t.theme;if(e){i=!0;var r=n?n[e]:void 0,o=t.defaultValue||"inherit";return n&&!r&&console&&!(e in n)&&"undefined"!=typeof DEBUG&&DEBUG&&console.warn('Theming value not provided for "'+e+'". Falling back to "'+o+'".'),r||o}return t.rawString})).join(""),themable:i}}var yt=i(143),mt=(0,yt.a)({}),bt=[],xt="theme";function wt(){var t,n,i,e=(0,lt.z)();(null===(n=null==e?void 0:e.FabricConfig)||void 0===n?void 0:n.legacyTheme)?function(t,n){var i;void 0===n&&(n=!1),mt=(0,yt.a)(t,n),ht((0,at.Cl)((0,at.Cl)((0,at.Cl)((0,at.Cl)({},mt.palette),mt.semanticColors),mt.effects),function(t){for(var n={},i=0,e=Object.keys(t.fonts);i<e.length;i++)for(var r=e[i],o=t.fonts[r],u=0,a=Object.keys(o);u<a.length;u++){var l=a[u],s=r+l.charAt(0).toUpperCase()+l.slice(1),c=o[l];"fontSize"===l&&"number"==typeof c&&(c+="px"),n[s]=c}return n}(mt))),st.X.applySettings(((i={})[xt]=mt,i)),bt.forEach((function(t){try{t(mt)}catch(t){}}))}(e.FabricConfig.legacyTheme):st.X.getSettings([xt]).theme||((null===(i=null==e?void 0:e.FabricConfig)||void 0===i?void 0:i.theme)&&(mt=(0,yt.a)(e.FabricConfig.theme)),st.X.applySettings(((t={})[xt]=mt,t)))}function Mt(t){return void 0===t&&(t=!1),!0===t&&(mt=(0,yt.a)({},t)),mt}wt();var Ct=i(302),kt=i(41);(0,i(887).v)("@fluentui/style-utilities","8.15.2"),wt()},468:function(t,n,i){i.d(n,{G:function(){return r},S:function(){return o}});var e=i(338);function r(t){var n=null;try{var i=(0,e.z)();n=i?i.sessionStorage.getItem(t):null}catch(t){}return n}function o(t,n){var i;try{null===(i=(0,e.z)())||void 0===i||i.sessionStorage.setItem(t,n)}catch(t){}}},506:function(t,n,i){i.d(n,{T:function(){return o}});var e=i(823),r=i(638);function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t&&1===t.length&&t[0]&&!t[0].subComponentStyles&&!(0,r.db)(t[0]))return t[0];for(var i={},u={},a=0,l=t;a<l.length;a++){var s=l[a];if(s&&!(0,r.db)(s))for(var c in s)if(s.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==s.subComponentStyles){var d=s.subComponentStyles;for(var f in d)d.hasOwnProperty(f)&&(u.hasOwnProperty(f)?u[f].push(d[f]):u[f]=[d[f]]);continue}var v=i[c],h=s[c];i[c]=void 0===v?h:(0,e.fX)((0,e.fX)([],Array.isArray(v)?v:[v],!0),Array.isArray(h)?h:[h],!0)}}if(Object.keys(u).length>0){i.subComponentStyles={};var p=i.subComponentStyles,g=function(t){if(u.hasOwnProperty(t)){var n=u[t];p[t]=function(t){return o.apply(void 0,n.map((function(n){return"function"==typeof n?n(t):n})))}}};for(var f in u)g(f)}return i}},517:function(t,n,i){i.d(n,{Y2:function(){return e}});var e="ms-Fabric--isFocusVisible"},540:function(t,n,i){i.d(n,{X:function(){return h}});var e=i(823),r=i(338),o="__globalSettings__",u="__callbacks__",a=0,l=function(){function t(){}return t.getValue=function(t,n){var i=s();return void 0===i[t]&&(i[t]="function"==typeof n?n():n),i[t]},t.setValue=function(t,n){var i=s(),e=i[u],r=i[t];if(n!==r){i[t]=n;var o={oldValue:r,value:n,key:t};for(var a in e)e.hasOwnProperty(a)&&e[a](o)}return n},t.addChangeListener=function(t){var n=t.__id__,i=c();n||(n=t.__id__=String(a++)),i[n]=t},t.removeChangeListener=function(t){delete c()[t.__id__]},t}();function s(){var t,n=(0,r.z)()||{};return n[o]||(n[o]=((t={})[u]={},t)),n[o]}function c(){return s()[u]}var d={settings:{},scopedSettings:{},inCustomizerContext:!1},f=l.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),v=[],h=function(){function t(){}return t.reset=function(){f.settings={},f.scopedSettings={}},t.applySettings=function(n){f.settings=(0,e.Cl)((0,e.Cl)({},f.settings),n),t._raiseChange()},t.applyScopedSettings=function(n,i){f.scopedSettings[n]=(0,e.Cl)((0,e.Cl)({},f.scopedSettings[n]),i),t._raiseChange()},t.getSettings=function(t,n,i){void 0===i&&(i=d);for(var e={},r=n&&i.scopedSettings[n]||{},o=n&&f.scopedSettings[n]||{},u=0,a=t;u<a.length;u++){var l=a[u];e[l]=r[l]||i.settings[l]||o[l]||f.settings[l]}return e},t.applyBatchedUpdates=function(n,i){t._suppressUpdates=!0;try{n()}catch(t){}t._suppressUpdates=!1,i||t._raiseChange()},t.observe=function(t){v.push(t)},t.unobserve=function(t){v=v.filter((function(n){return n!==t}))},t._raiseChange=function(){t._suppressUpdates||v.forEach((function(t){return t()}))},t}()},543:function(t,n,i){i.d(n,{Y:function(){return r}});var e=i(921);function r(t){if((0,e.S)()&&"undefined"!=typeof document){var n=t;return n&&n.ownerDocument?n.ownerDocument:document}}},566:function(t,n,i){i.d(n,{I:function(){return v}});var e=i(823),r=i(594),o=i(506),u=i(638),a=function(){return!1},l=function(){},s=r.createContext({stylesheets:new Map,useAdoptedStylesheetEx:a,useAdoptedStylesheet:a,useShadowConfig:function(){return u.ou},useMergeStylesShadowRootContext:l,useHasMergeStylesShadowRootContext:a,useMergeStylesRootStylesheets:function(){return new Map},useWindow:l,useStyled:l}),c=function(){var t=r.useContext(s);return{useAdoptedStylesheet:t.useAdoptedStylesheet,useAdoptedStylesheetEx:t.useAdoptedStylesheetEx,useShadowConfig:t.useShadowConfig,useMergeStylesShadowRootContext:t.useMergeStylesShadowRootContext,useHasMergeStylesShadowRootContext:t.useHasMergeStylesShadowRootContext,useMergeStylesRootStylesheets:t.useMergeStylesRootStylesheets,useWindow:t.useWindow,useStyled:t.useStyled}},d=i(927),f=["theme","styles"];function v(t,n,i,u,a){var l=(u=u||{scope:"",fields:void 0}).scope,s=u.fields,v=void 0===s?f:s,h=r.forwardRef((function(u,a){var s=r.useRef(void 0),f=(0,d.m)(v,l),h=f.styles,p=(f.dir,(0,e.Tt)(f,["styles","dir"])),g=i?i(u):void 0,y=c().useStyled,m=s.current&&s.current.__cachedInputs__||[],b=u.styles;if(!s.current||h!==m[1]||b!==m[2]){var x=function(t){return function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=[],r=0,u=n;r<u.length;r++){var a=u[r];a&&e.push("function"==typeof a?a(t):a)}return 1===e.length?e[0]:e.length?o.T.apply(void 0,e):{}}(t,n,h,b)};x.__cachedInputs__=[n,h,b],x.__noStyleOverride__=!h&&!b,s.current=x}return s.current.__shadowConfig__=y(l),r.createElement(t,(0,e.Cl)({ref:a},p,g,u,{styles:s.current}))}));h.displayName="Styled".concat(t.displayName||t.name);var p=a?r.memo(h):h;return h.displayName&&(p.displayName=h.displayName),p}},594:function(t){t.exports=React},638:function(t,n,i){i.d(n,{P6:function(){return e},Se:function(){return r},db:function(){return u},ou:function(){return o}});var e="__global__",r="__shadow_dom_stylesheet__",o={stylesheetKey:e,inShadow:!1,window:void 0,__isShadowConfig__:!0},u=function(t){return!(!t||!function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}(t))&&!0===t.__isShadowConfig__}},753:function(t,n,i){i.d(n,{J5:function(){return d},J9:function(){return c}});var e=i(40),r=!1,o=0,u={empty:!0},a={},l="undefined"==typeof WeakMap?null:WeakMap;function s(){o++}function c(t,n,i){if(void 0===n&&(n=100),void 0===i&&(i=!1),!l)return t;if(!r){var c=e.nr.getInstance();c&&c.onReset&&e.nr.getInstance().onReset(s),r=!0}var d,v=0,h=o;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var l,s=d;(void 0===d||h!==o||n>0&&v>n)&&(d=f(),v=0,h=o),s=d;for(var c=0;c<e.length;c++){var p=(l=e[c])?"object"==typeof l||"function"==typeof l?l:(a[l]||(a[l]={val:l}),a[l]):u;s.map.has(p)||s.map.set(p,f()),s=s.map.get(p)}return s.hasOwnProperty("value")||(s.value=t.apply(void 0,e),v++),!i||null!==s.value&&void 0!==s.value||(s.value=t.apply(void 0,e)),s.value}}function d(t){if(!l)return t;var n=new l;return function(i){if(!i||"function"!=typeof i&&"object"!=typeof i)return t(i);if(n.has(i))return n.get(i);var e=t(i);return n.set(i,e),e}}function f(){return{map:l?new l:null}}},770:function(t,n,i){i.d(n,{z:function(){return e}});var e=i(594).createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},800:function(t,n,i){i.d(n,{DU:function(){return o},Iy:function(){return a}});var e,r=i(638);function o(t){e!==t&&(e=t)}function u(){return void 0===e&&(e="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),e}function a(){return{rtl:u(),shadowConfig:r.ou}}e=u()},823:function(t,n,i){i.d(n,{C6:function(){return r},Cl:function(){return o},Tt:function(){return u},YH:function(){return l},fX:function(){return s},sH:function(){return a}});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var o=function(){return o=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},o.apply(this,arguments)};function u(t,n){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(i[e[r]]=t[e[r]])}return i}function a(t,n,i,e){return new(i||(i=Promise))((function(r,o){function u(t){try{l(e.next(t))}catch(t){o(t)}}function a(t){try{l(e.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):function(t){return t instanceof i?t:new i((function(n){n(t)}))}(t.value).then(u,a)}l((e=e.apply(t,n||[])).next())}))}function l(t,n){var i,e,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(o=0)),o;)try{if(i=1,e&&(r=2&a[0]?e.return:a[0]?e.throw||((r=e.return)&&r.call(e),0):e.next)&&!(r=r.call(e,a[1])).done)return r;switch(e=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,e=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(t,o)}catch(t){a=[6,t],e=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function s(t,n,i){if(i||2===arguments.length)for(var e,r=0,o=n.length;r<o;r++)!e&&r in n||(e||(e=Array.prototype.slice.call(n,0,r)),e[r]=n[r]);return t.concat(e||Array.prototype.slice.call(n))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},873:function(t,n,i){i.d(n,{Z:function(){return g}});var e=i(40),r=i(823),o=i(506),u=i(962),a=i(289),l=i(638);var s=i(259),c=i(338),d=50,f=5,v=0,h=e.nr.getInstance();h&&h.onReset&&h.onReset((function(){return v++}));var p="__retval__";function g(t){void 0===t&&(t={});var n=new Map,i=0,h=0,g=v;return function(y,b){var x;if(void 0===b&&(b={}),t.useStaticStyles&&"function"==typeof y&&y.__noStyleOverride__)return y(b);h++;var w=y?y.__shadowConfig__:void 0,M=w&&w.window?w.window:"__default__";n.has(M)||n.set(M,new Map);var C=n.get(M),k=b.theme,A=k&&void 0!==k.rtl?k.rtl:(0,s.jI)(),S=t.disableCaching;if(g!==v&&(g=v,n.set(M,new Map),C=n.get(M),i=0),t.disableCaching||(C=m(n.get(M),y),C=m(C,b)),!S&&C[p]||(C[p]=void 0===y?{}:function(t,n){var i,s={subComponentStyles:{}},c=void 0;(0,l.db)(t[0])?(c=t[0],i=t[1]):i=t[0],null!=c||(c=null==n?void 0:n.shadowConfig);var d=(0,r.Cl)((0,r.Cl)({},n),{shadowConfig:c});if(!i&&t.length<=1)return{subComponentStyles:{}};var f=e.nr.getInstance(c);d.stylesheet=f;var v=o.T.apply(void 0,t),h=[];for(var p in v)if(v.hasOwnProperty(p)){if("subComponentStyles"===p){s.subComponentStyles=v.subComponentStyles||{};continue}if("__shadowConfig__"===p)continue;var g=v[p],y=(0,u.h)(f,g),m=y.classes,b=y.objects;(null==b?void 0:b.length)?(M=(0,a.GJ)(d||{},{displayName:p},b))&&(h.push(M),s[p]=m.concat([M.className]).join(" ")):s[p]=m.join(" ")}for(var x=0,w=h;x<w.length;x++){var M;(M=w[x])&&(0,a.Ae)(M,null==n?void 0:n.specificityMultiplier,c)}return s}(["function"==typeof y?y(b):y],{shadowConfig:y.__shadowConfig__,rtl:!!A,specificityMultiplier:t.useStaticStyles?f:void 0}),S||i++),i>(t.cacheSize||d)){var L=(0,c.z)();(null===(x=null==L?void 0:L.FabricConfig)||void 0===x?void 0:x.enableClassNameCacheFullWarning)&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(i,"/").concat(h,".")),console.trace()),n.get(M).clear(),i=0,t.disableCaching=!0}return C[p]}}function y(t,n){return n=function(t){switch(t){case void 0:return"__undefined__";case null:return"__null__";default:return t}}(n),t.has(n)||t.set(n,new Map),t.get(n)}function m(t,n){if("function"==typeof n)if(n.__cachedInputs__)for(var i=0,e=n.__cachedInputs__;i<e.length;i++)t=y(t,e[i]);else t=y(t,n);else if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&(t=y(t,n[r]));return t}},887:function(t,n,i){i.d(n,{v:function(){return o}});var e={},r=void 0;try{r=window}catch(t){}function o(t,n){if(void 0!==r){var i=r.__packages__=r.__packages__||{};i[t]&&e[t]||(e[t]=n,(i[t]=i[t]||[]).push(n))}}o("@fluentui/set-version","6.0.0")},916:function(t,n,i){i.d(n,{Z:function(){return l}});var e=i(962),r=i(638),o=i(800),u=i(40),a=i(289);function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(t,n){var i=t instanceof Array?t:[t],o=n||{};(0,r.db)(i[0])&&(o.shadowConfig=i[0]),o.stylesheet=u.nr.getInstance(o.shadowConfig);var l=(0,e.h)(o.stylesheet,i),s=l.classes,c=l.objects;return c.length&&s.push((0,a.kG)(o,c)),s.join(" ")}(t,(0,o.Iy)())}},921:function(t,n,i){function e(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}i.d(n,{S:function(){return e}})},927:function(t,n,i){i.d(n,{m:function(){return u}});var e=i(594),r=i(540),o=i(770);function u(t,n){var i,u=(i=e.useState(0)[1],function(){return i((function(t){return++t}))}),a=e.useContext(o.z).customizations,l=a.inCustomizerContext;return e.useEffect((function(){return l||r.X.observe(u),function(){l||r.X.unobserve(u)}}),[l]),r.X.getSettings(t,n,a)}},962:function(t,n,i){i.d(n,{h:function(){return r}});var e=i(638);function r(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=[],o=[],u=t;return function t(n){for(var i=0,a=n;i<a.length;i++){var l=a[i];if(l&&!(0,e.db)(l))if("string"==typeof l)if(l.indexOf(" ")>=0)t(l.split(" "));else{var s=u.argsFromClassName(l);s?t(s):-1===r.indexOf(l)&&r.push(l)}else Array.isArray(l)?t(l):"object"==typeof l&&o.push(l)}}(n),{classes:r,objects:o}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,{a:n}),n},i.d=function(t,n){for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};i.r(e),i.d(e,{AnnotationOnlyChart:function(){return Tg},AreaChart:function(){return Dh},CartesianChart:function(){return jv},ChartHoverCard:function(){return Cc.ChartHoverCard},ChartTable:function(){return vg},DataVizGradientPalette:function(){return kc},DataVizPalette:function(){return es},DeclarativeChart:function(){return qm},DonutChart:function(){return bv},FunnelChart:function(){return Mg},GanttChart:function(){return hm},GaugeChart:function(){return Vg},GaugeChartVariant:function(){return wg},GaugeValueFormat:function(){return xg},GroupedVerticalBarChart:function(){return ap},HeatMapChart:function(){return dp},HorizontalBarChart:function(){return pd},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return gg},Legends:function(){return bf},LineChart:function(){return ch},MultiStackedBarChart:function(){return zh},MultiStackedBarChartVariant:function(){return Fh},NodesComposition:function(){return Hp},PieChart:function(){return Hh},PolarChart:function(){return Tm},ResponsiveContainer:function(){return dm},SankeyChart:function(){return zp},ScatterChart:function(){return vh},Shape:function(){return of},Sparkline:function(){return sg},StackedBarChart:function(){return Yh},Textbox:function(){return ih},TreeChart:function(){return og},TreeTraverse:function(){return Ip},VerticalBarChart:function(){return tp},VerticalStackedBarChart:function(){return ep},getChartHoverCardStyles:function(){return lp.J},getColorFromToken:function(){return cs},getGradientFromToken:function(){return Oc},getNextColor:function(){return ss},getNextGradient:function(){return Nc},withResponsiveContainer:function(){return fm}});var r=i(566),o=i(823),u=i(594),a=i(873),l=i(259),s=i(338),c=i(40),d="__currentId__",f=(0,s.z)()||{};void 0===f[d]&&(f[d]=0);var v,h=!1;function p(t){if(!h){var n=c.nr.getInstance();n&&n.onReset&&n.onReset(g),h=!0}return(void 0===t?"id__":t)+f[d]++}function g(t){void 0===t&&(t=0),f[d]=t}function y(t,n,i){void 0===i&&(i=0);for(var e=-1,r=i;t&&r<t.length;r++)if(n(t[r],r)){e=r;break}return e}function m(t,n){var i=y(t,n);if(!(i<0))return t[i]}!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(v||(v={}));function b(t,n){var i,e;if(void 0===n&&(n=!0),!t)return null;var r=n&&function(t){var n,i;return t&&(i=t)&&i._virtual&&(n=t._virtual.parent),n}(t);return r||("function"!=typeof t.assignedElements&&(null===(i=t.assignedSlot)||void 0===i?void 0:i.parentNode)?t.assignedSlot:11===(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)?t.parentNode.host:t.parentNode)}function x(t,n,i){return null!=i||(i=document),!t||t===i.body||t instanceof Document?null:n(t)?t:x(b(t),n)}function w(t,n,i){void 0===i&&(i=!0);var e=!1;if(t&&n)if(i)if(t===n)e=!0;else for(e=!1;n;){var r=b(n);if(r===t){e=!0;break}n=r}else t.contains&&(e=t.contains(n));return e}var M=i(543);function C(t,n,i){var e=A(t,t,!0,!1,!1,!0,void 0,void 0,n,i);return!!e&&(T(e),!0)}function k(t,n,i,e,r,o,u,a,l){var s;if(!n||!u&&n===t)return null;var c=S(n);if(r&&c&&(o||!D(n)&&!N(n))){var d=k(t,n.lastElementChild||l&&(null===(s=n.shadowRoot)||void 0===s?void 0:s.lastElementChild),!0,!0,!0,o,u,a,l);if(d){if(a&&V(d,!0,l)||!a)return d;var f=k(t,d.previousElementSibling,!0,!0,!0,o,u,a,l);if(f)return f;for(var v=d.parentElement;v&&v!==n;){var h=k(t,v.previousElementSibling,!0,!0,!0,o,u,a,l);if(h)return h;v=v.parentElement}}}return i&&c&&V(n,a,l)?n:k(t,n.previousElementSibling,!0,!0,!0,o,u,a,l)||(e?null:k(t,n.parentElement,!0,!1,!1,o,u,a,l))}function A(t,n,i,e,r,o,u,a,l,s){var c;if(!n||n===t&&r&&!u)return null;var d=(l?L:S)(n);if(i&&d&&V(n,a,s))return n;if(!r&&d&&(o||!D(n)&&!N(n))){var f=A(t,n.firstElementChild||s&&(null===(c=n.shadowRoot)||void 0===c?void 0:c.firstElementChild),!0,!0,!1,o,u,a,l,s);if(f)return f}return n===t?null:A(t,n.nextElementSibling,!0,!0,!1,o,u,a,l,s)||(e?null:A(t,n.parentElement,!1,!1,!0,o,u,a,l,s))}function S(t){if(!t||!t.getAttribute)return!1;var n=t.getAttribute("data-is-visible");return null!=n?"true"===n:0!==t.offsetHeight||null!==t.offsetParent||!0===t.isVisible}function L(t,n){var i=null!=n?n:(0,s.z)();return!!t&&S(t)&&!t.hidden&&"hidden"!==i.getComputedStyle(t).visibility}function V(t,n,i){if(void 0===i&&(i=!0),!t||t.disabled)return!1;var e=0,r=null;t&&t.getAttribute&&(r=t.getAttribute("tabIndex"))&&(e=parseInt(r,10));var o=t.getAttribute?t.getAttribute("data-is-focusable"):null,u=null!==r&&e>=0,a=!(!i||!t.shadowRoot||!t.shadowRoot.delegatesFocus),l=!!t&&"false"!==o&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||"true"===o||u||a);return n?-1!==e&&l:l}function D(t){return!!(t&&t.getAttribute&&t.getAttribute("data-focuszone-id"))}function N(t){return!(!t||!t.getAttribute||"true"!==t.getAttribute("data-is-sub-focuszone"))}var O=void 0;function T(t){if(t){var n=(0,s.z)(t);n&&(void 0!==O&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame((function(){t&&t.focus(),O=void 0})))}}function E(t,n,i,e){return t.addEventListener(n,i,e),function(){return t.removeEventListener(n,i,e)}}function F(t,n){for(var i=(0,o.Cl)({},n),e=0,r=Object.keys(t);e<r.length;e++){var u=r[e];void 0===i[u]&&(i[u]=t[u])}return i}var B=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i={},e=0,r=t;e<r.length;e++)for(var o=r[e],u=0,a=Array.isArray(o)?o:Object.keys(o);u<a.length;u++)i[a[u]]=1;return i},P=B(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),_=B(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),H=B(_,P),I=(B(H,["form"]),B(H,["height","loop","muted","preload","src","width"])),W=(B(I,["poster"]),B(H,["start"]),B(H,["value"]),B(H,["download","href","hrefLang","media","rel","target","type"]),B(H,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"])),R=(B(W,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),B(W,["autoCapitalize","cols","dirname","form","maxLength","minLength","placeholder","readOnly","required","rows","wrap"]),B(W,["form","multiple","required"]),B(H,["selected","value"]),B(H,["cellPadding","cellSpacing"]),B(H,["rowSpan","scope"]),B(H,["colSpan","headers","rowSpan","scope"]),B(H,["span"]),B(H,["span"]),B(H,["acceptCharset","action","encType","encType","method","noValidate","target"]),B(H,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),B(H,["alt","crossOrigin","height","src","srcSet","useMap","width"]),H);function z(t,n,i){for(var e=Array.isArray(n),r={},o=0,u=Object.keys(t);o<u.length;o++){var a=u[o];!(!e&&n[a]||e&&n.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||i&&-1!==(null==i?void 0:i.indexOf(a))||(r[a]=t[a])}return r}function j(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=[],e=0,r=t;e<r.length;e++){var o=r[e];if(o)if("string"==typeof o)i.push(o);else if(o.hasOwnProperty("toString")&&"function"==typeof o.toString)i.push(o.toString());else for(var u in o)o[u]&&i.push(u)}return i.join(" ")}function $(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return Y.apply(this,[null,t].concat(n))}function Y(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];n=n||{};for(var r=0,o=i;r<o.length;r++){var u=o[r];if(u)for(var a in u)!u.hasOwnProperty(a)||t&&!t(a)||(n[a]=u[a])}return n}var X,G,U,q=i(916),Z=((0,q.Z)({overflow:"hidden !important"}),"data-is-scrollable");function K(t){for(var n=t,i=(0,M.Y)(t);n&&n!==i.body;){if("true"===n.getAttribute(Z))return n;n=n.parentElement}for(n=t;n&&n!==i.body;){if("false"!==n.getAttribute(Z)){var e=getComputedStyle(n),r=e?e.getPropertyValue("overflow-y"):"";if(r&&("scroll"===r||"auto"===r))return n}n=n.parentElement}return n&&n!==i.body||(n=(0,s.z)(t)),n}!function(t){t[t.top=1]="top",t[t.bottom=-1]="bottom",t[t.left=2]="left",t[t.right=-2]="right"}(G||(G={})),function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.start=2]="start",t[t.end=3]="end"}(U||(U={}));var J,Q=function(){function t(t,n,i,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=0),this.top=i,this.bottom=e,this.left=t,this.right=n}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return parseFloat(this.top.toFixed(4))===parseFloat(t.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(t.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(t.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(t.right.toFixed(4))},t}();function tt(t,n,i){return{targetEdge:t,alignmentEdge:n,isAuto:i}}var nt=((J={})[0]=tt(G.top,G.left),J[1]=tt(G.top),J[2]=tt(G.top,G.right),J[3]=tt(G.top,void 0,!0),J[4]=tt(G.bottom,G.left),J[5]=tt(G.bottom),J[6]=tt(G.bottom,G.right),J[7]=tt(G.bottom,void 0,!0),J[8]=tt(G.left,G.top),J[9]=tt(G.left),J[10]=tt(G.left,G.bottom),J[11]=tt(G.right,G.top),J[12]=tt(G.right),J[13]=tt(G.right,G.bottom),J);function it(t,n){return!(t.top<n.top||t.bottom>n.bottom||t.left<n.left||t.right>n.right)}function et(t,n){var i=[];return t.top<n.top&&i.push(G.top),t.bottom>n.bottom&&i.push(G.bottom),t.left<n.left&&i.push(G.left),t.right>n.right&&i.push(G.right),i}function rt(t,n){return t[G[n]]}function ot(t,n,i){return t[G[n]]=i,t}function ut(t,n){var i=mt(n);return(rt(t,i.positiveEdge)+rt(t,i.negativeEdge))/2}function at(t,n){return t>0?n:-1*n}function lt(t,n){return at(t,rt(n,t))}function st(t,n,i){return at(i,rt(t,i)-rt(n,i))}function ct(t,n,i,e){void 0===e&&(e=!0);var r=rt(t,n)-i,o=ot(t,n,i);return e&&(o=ot(t,-1*n,rt(t,-1*n)-r)),o}function dt(t,n,i,e){return void 0===e&&(e=0),ct(t,i,rt(n,i)+at(i,e))}function ft(t,n,i){return lt(i,t)>lt(i,n)}function vt(t,n){for(var i=0,e=0,r=et(t,n);e<r.length;e++){var o=r[e];i+=Math.pow(st(t,n,o),2)}return i}function ht(t,n,i,e){return void 0===e&&(e=200),(i===G.bottom||i===G.top)&&st(t,n,i)>=e}function pt(t,n,i,e){for(var r=0,o=t;r<o.length;r++){var u=o[r],a=void 0;e&&e===-1*u?(a=ct(n.elementRectangle,u,rt(i,u),!1),n.forcedInBounds=!0):ft(a=dt(n.elementRectangle,i,u),i,-1*u)||(a=ct(a,-1*u,rt(i,-1*u),!1),n.forcedInBounds=!0),n.elementRectangle=a}return n}function gt(t,n,i){var e=mt(n).positiveEdge;return ct(t,e,i-(ut(t,n)-rt(t,e)))}function yt(t,n,i,e,r){void 0===e&&(e=0);var o=new Q(t.left,t.right,t.top,t.bottom),u=i.alignmentEdge,a=i.targetEdge,l=r?a:-1*a;return o=r?dt(o,n,a,e):function(t,n,i,e){void 0===e&&(e=0);var r=at(-1*i,e);return ct(t,-1*i,rt(n,i)+r)}(o,n,a,e),o=u?dt(o,n,u):gt(o,l,ut(n,a))}function mt(t){return t===G.top||t===G.bottom?{positiveEdge:G.left,negativeEdge:G.right}:{positiveEdge:G.top,negativeEdge:G.bottom}}function bt(t,n,i){return i&&Math.abs(st(t,i,n))>Math.abs(st(t,i,-1*n))?-1*n:n}function xt(t,n,i,e,r,o,u,a){var l,s={},c=Ct(n),d=o?i:-1*i,f=r||mt(i).positiveEdge;return u&&!function(t,n,i){return void 0!==i&&rt(t,n)===rt(i,n)}(t,(l=f,-1*l),e)||(f=bt(t,f,e)),s[G[d]]=st(t,c,d),s[G[f]]=st(t,c,f),a&&(s[G[-1*d]]=st(t,c,-1*d),s[G[-1*f]]=st(t,c,-1*f)),s}function wt(t,n,i){var e=ut(n,t),r=ut(i,t),o=mt(t),u=o.positiveEdge,a=o.negativeEdge;return e<=r?u:a}function Mt(t,n,i,e,r,o,u,a,s){void 0===o&&(o=!1);var c=yt(t,n,e,r,s);return it(c,i)?{elementRectangle:c,targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}:function(t,n,i,e,r,o,u,a,s){void 0===r&&(r=!1),void 0===u&&(u=0);var c=e.alignmentEdge,d=e.alignTargetEdge,f={elementRectangle:t,targetEdge:e.targetEdge,alignmentEdge:c};a||s||(f=function(t,n,i,e,r,o,u){void 0===r&&(r=!1),void 0===u&&(u=0);var a=[G.left,G.right,G.bottom,G.top];(0,l.jI)()&&(a[0]*=-1,a[1]*=-1);for(var s,c=t,d=e.targetEdge,f=e.alignmentEdge,v=d,h=f,p=0;p<4;p++){if(ft(c,i,d))return{elementRectangle:c,targetEdge:d,alignmentEdge:f};if(r&&ht(n,i,d,o)){switch(d){case G.bottom:c.bottom=i.bottom;break;case G.top:c.top=i.top}return{elementRectangle:c,targetEdge:d,alignmentEdge:f,forcedInBounds:!0}}var g=vt(c,i);(!s||g<s)&&(s=g,v=d,h=f),a.splice(a.indexOf(d),1),a.length>0&&(a.indexOf(-1*d)>-1?d*=-1:(f=d,d=a.slice(-1)[0]),c=yt(t,n,{targetEdge:d,alignmentEdge:f},u))}return{elementRectangle:c=yt(t,n,{targetEdge:v,alignmentEdge:h},u),targetEdge:v,alignmentEdge:h}}(t,n,i,e,r,o,u));var v=et(f.elementRectangle,i),h=a?-f.targetEdge:void 0;if(v.length>0)if(d)if(f.alignmentEdge&&v.indexOf(-1*f.alignmentEdge)>-1){var p=function(t,n,i,e){var r=t.alignmentEdge,o=t.targetEdge,u=-1*r;return{elementRectangle:yt(t.elementRectangle,n,{targetEdge:o,alignmentEdge:u},i,e),targetEdge:o,alignmentEdge:u}}(f,n,u,s);if(it(p.elementRectangle,i))return p;f=pt(et(p.elementRectangle,i),f,i,h)}else f=pt(v,f,i,h);else f=pt(v,f,i,h);return f}(c,n,i,e,o,u,r,a,s)}function Ct(t){var n=t.getBoundingClientRect();return new Q(n.left,n.right,n.top,n.bottom)}function kt(t,n,i,e,r,u){void 0===r&&(r=!1);var a=t.gapSpace?t.gapSpace:0,s=function(t,n){var i;if(n){if(n.preventDefault){var e=n;i=new Q(e.clientX,e.clientX,e.clientY,e.clientY)}else if(n.getBoundingClientRect)i=Ct(n);else{var r=n,o=r.left||r.x,u=r.top||r.y,a=r.right||o,l=r.bottom||u;i=new Q(o,a,u,l)}if(!it(i,t))for(var s=0,c=et(i,t);s<c.length;s++){var d=c[s];i[G[d]]=t[G[d]]}}else i=new Q(0,0,0,0);return i}(i,t.target),c=function(t,n,i,e,r){return t.isAuto&&(t.alignmentEdge=wt(t.targetEdge,n,i)),t.alignTargetEdge=r,t}(function(t,n,i){if(void 0===t&&(t=7),i)return{alignmentEdge:i.alignmentEdge,isAuto:i.isAuto,targetEdge:i.targetEdge};var e=(0,o.Cl)({},nt[t]);return(0,l.jI)()?(e.alignmentEdge&&e.alignmentEdge%2==0&&(e.alignmentEdge=-1*e.alignmentEdge),void 0!==n?nt[n]:e):e}(t.directionalHint,t.directionalHintForRTL,e),s,i,t.coverTarget,t.alignTargetEdge),d=Mt(Ct(n),s,i,c,a,r,u,t.directionalHintFixed,t.coverTarget);return(0,o.Cl)((0,o.Cl)({},d),{targetRectangle:s})}function At(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=0),function(t){return Math.sqrt(t*t*2)}(t?n:0)/2+i}function St(t,n,i,e,r,u,a,l){void 0===r&&(r=!1);var c=null!=l?l:(0,s.z)(),d=t.isBeakVisible&&t.beakWidth||0,f=At(t.isBeakVisible,t.beakWidth,t.gapSpace),v=t;v.gapSpace=f;var h,p,g,y,m,b,x,w,C,k=t.bounds?(C=t.bounds,new Q(C.left,C.right,C.top,C.bottom)):new Q(0,c.innerWidth-function(){if(void 0===X){var t=(0,M.Y)(),n=t.createElement("div");n.style.setProperty("width","100px"),n.style.setProperty("height","100px"),n.style.setProperty("overflow","scroll"),n.style.setProperty("position","absolute"),n.style.setProperty("top","-9999px"),t.body.appendChild(n),X=n.offsetWidth-n.clientWidth,t.body.removeChild(n)}return X}(),0,c.innerHeight),A=kt(v,i,k,e,r,u),S=(h=A,p=function(t,n){var i=n.targetRectangle,e=mt(n.targetEdge),r=e.positiveEdge,o=e.negativeEdge,u=ut(i,n.targetEdge),a=new Q(t/2,n.elementRectangle.width-t/2,t/2,n.elementRectangle.height-t/2),l=new Q(0,t,0,t);return ft(l=gt(l=ct(l,-1*n.targetEdge,-t/2),-1*n.targetEdge,u-lt(r,n.elementRectangle)),a,r)?ft(l,a,o)||(l=dt(l,a,o)):l=dt(l,a,r),l}(d,A),g=k,y=-1*h.targetEdge,m=new Q(0,h.elementRectangle.width,0,h.elementRectangle.height),b={},x=bt(h.elementRectangle,h.alignmentEdge?h.alignmentEdge:mt(y).positiveEdge,g),w=st(h.elementRectangle,h.targetRectangle,y)>Math.abs(rt(p,y)),b[G[y]]=rt(p,y),b[G[x]]=st(p,m,x),{elementPosition:(0,o.Cl)({},b),closestEdge:wt(h.targetEdge,p,m),targetEdge:y,hideBeak:!w});return(0,o.Cl)((0,o.Cl)({},function(t,n,i,e,r){return{elementPosition:xt(t.elementRectangle,n,t.targetEdge,i,t.alignmentEdge,e,r,t.forcedInBounds),targetEdge:t.targetEdge,alignmentEdge:t.alignmentEdge}}(A,n,k,t.coverTarget,a)),{beakPosition:S})}var Lt=["TEMPLATE","STYLE","SCRIPT"];function Vt(t){var n=(0,M.Y)(t);if(!n)return function(){};for(var i=[];t!==n.body&&t.parentElement;){for(var e=0,r=t.parentElement.children;e<r.length;e++){var o=r[e],u=o.getAttribute("aria-hidden");o!==t&&"true"!==(null==u?void 0:u.toLowerCase())&&-1===Lt.indexOf(o.tagName)&&i.push([o,u])}t=t.parentElement}return i.forEach((function(t){t[0].setAttribute("aria-hidden","true")})),function(){!function(t){t.forEach((function(t){var n=t[0],i=t[1];i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}))}(i),i=[]}}var Dt=27,Nt=function(){function t(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return t.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},t.prototype.setTimeout=function(t,n){var i=this,e=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),e=setTimeout((function(){try{i._timeoutIds&&delete i._timeoutIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._timeoutIds[e]=!0),e},t.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},t.prototype.setImmediate=function(t,n){var i=this,e=0,r=(0,s.z)(n);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),e=r.setTimeout((function(){try{i._immediateIds&&delete i._immediateIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),0),this._immediateIds[e]=!0),e},t.prototype.clearImmediate=function(t,n){var i=(0,s.z)(n);this._immediateIds&&this._immediateIds[t]&&(i.clearTimeout(t),delete this._immediateIds[t])},t.prototype.setInterval=function(t,n){var i=this,e=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),e=setInterval((function(){try{t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._intervalIds[e]=!0),e},t.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},t.prototype.throttle=function(t,n,i){var e=this;if(this._isDisposed)return this._noop;var r,o,u=n||0,a=!0,l=!0,s=0,c=null;i&&"boolean"==typeof i.leading&&(a=i.leading),i&&"boolean"==typeof i.trailing&&(l=i.trailing);var d=function(n){var i=Date.now(),f=i-s,v=a?u-f:u;return f>=u&&(!n||a)?(s=i,c&&(e.clearTimeout(c),c=null),r=t.apply(e._parent,o)):null===c&&l&&(c=e.setTimeout(d,v)),r};return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o=t,d(!0)}},t.prototype.debounce=function(t,n,i){var e=this;if(this._isDisposed){var r=function(){};return r.cancel=function(){},r.flush=function(){return null},r.pending=function(){return!1},r}var o,u,a=n||0,l=!1,s=!0,c=null,d=0,f=Date.now(),v=null;i&&"boolean"==typeof i.leading&&(l=i.leading),i&&"boolean"==typeof i.trailing&&(s=i.trailing),i&&"number"==typeof i.maxWait&&!isNaN(i.maxWait)&&(c=i.maxWait);var h=function(t){v&&(e.clearTimeout(v),v=null),f=t},p=function(n){h(n),o=t.apply(e._parent,u)},g=function(t){var n=Date.now(),i=!1;t&&(l&&n-d>=a&&(i=!0),d=n);var r=n-d,u=a-r,h=n-f,y=!1;return null!==c&&(h>=c&&v?y=!0:u=Math.min(u,c-h)),r>=a||y||i?p(n):null!==v&&t||!s||(v=e.setTimeout(g,u)),o},y=function(){return!!v},m=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return u=t,g(!0)};return m.cancel=function(){y()&&h(Date.now())},m.flush=function(){return y()&&p(Date.now()),o},m.pending=y,m},t.prototype.requestAnimationFrame=function(t,n){var i=this,e=0,r=(0,s.z)(n);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{i._animationFrameIds&&delete i._animationFrameIds[e],t.apply(i._parent)}catch(t){i._logError(t)}};e=r.requestAnimationFrame?r.requestAnimationFrame(o):r.setTimeout(o,0),this._animationFrameIds[e]=!0}return e},t.prototype.cancelAnimationFrame=function(t,n){var i=(0,s.z)(n);this._animationFrameIds&&this._animationFrameIds[t]&&(i.cancelAnimationFrame?i.cancelAnimationFrame(t):i.clearTimeout(t),delete this._animationFrameIds[t])},t.prototype._logError=function(t){this._onErrorHandler&&this._onErrorHandler(t)},t}();function Ot(){var t=u.useRef(void 0);return t.current||(t.current=new Nt),u.useEffect((function(){return function(){var n;null===(n=t.current)||void 0===n||n.dispose(),t.current=void 0}}),[]),t.current}function Tt(t,n,i,e){var r=u.useRef(i);r.current=i,u.useEffect((function(){var i=t&&"current"in t?t.current:t;if(i&&i.addEventListener)return E(i,n,(function(t){return r.current(t)}),e)}),[t,n,e])}function Et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=u.useCallback((function(n){i.current=n;for(var e=0,r=t;e<r.length;e++){var o=r[e];"function"==typeof o?o(n):o&&(o.current=n)}}),(0,o.fX)([],t,!0));return i}var Ft=u.createContext({window:"object"==typeof window?window:void 0}),Bt=function(){return u.useContext(Ft).window},Pt=function(){var t;return null===(t=u.useContext(Ft).window)||void 0===t?void 0:t.document};function _t(t){var n=t.originalElement,i=t.containsFocus;n&&i&&n!==(0,s.z)()&&setTimeout((function(){var t;null===(t=n.focus)||void 0===t||t.call(n)}),0)}var Ht=u.forwardRef((function(t,n){var i=F({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},t),e=u.useRef(void 0),r=Et(e,n);!function(t,n){var i="true"===String(t["aria-modal"]).toLowerCase()&&t.enableAriaHiddenSiblings;u.useEffect((function(){if(i&&n.current)return Vt(n.current)}),[n,i])}(i,e),function(t,n){var i=t.onRestoreFocus,e=void 0===i?_t:i,r=u.useRef(void 0),o=u.useRef(!1);u.useEffect((function(){var t,i,u;return r.current=(0,M.Y)().activeElement,t=n.current,(u=(i=(0,M.Y)(t))&&i.activeElement)&&w(t,u)&&(o.current=!0),function(){var t;null==e||e({originalElement:r.current,containsFocus:o.current,documentContainsFocus:(null===(t=(0,M.Y)())||void 0===t?void 0:t.hasFocus())||!1}),r.current=void 0}}),[]),Tt(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Tt(n,"blur",u.useCallback((function(t){n.current&&t.relatedTarget&&!n.current.contains(t.relatedTarget)&&(o.current=!1)}),[]),!0)}(i,e);var a=i.role,l=i.className,s=i.ariaLabel,c=i.ariaLabelledBy,d=i.ariaDescribedBy,f=i.style,v=i.children,h=i.onDismiss,p=function(t,n){var i=Ot(),e=u.useState(!1),r=e[0],o=e[1];return u.useEffect((function(){return i.requestAnimationFrame((function(){var i;if(!t.style||!t.style.overflowY){var e=!1;if(n&&n.current&&(null===(i=n.current)||void 0===i?void 0:i.firstElementChild)){var u=n.current.clientHeight,a=n.current.firstElementChild.clientHeight;u>0&&a>u&&(e=a-u>1)}r!==e&&o(e)}})),function(){return i.dispose()}})),r}(i,e),g=u.useCallback((function(t){t.which===Dt&&h&&(h(t),t.preventDefault(),t.stopPropagation())}),[h]);return Tt(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},z(i,R),{className:l,role:a,"aria-label":s,"aria-labelledby":c,"aria-describedby":d,onKeyDown:g,style:(0,o.Cl)({overflowY:p?"scroll":void 0,outline:"none"},f)}),v)}));Ht.displayName="Popup";var It=i(419);function Wt(t){var n=u.useRef(void 0);return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,zt=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},jt=function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.window)||void 0===n?void 0:n.document)&&void 0!==i?i:"undefined"!=typeof document?document:void 0},$t=((Rt={})[G.top]=It.lw.slideUpIn10,Rt[G.bottom]=It.lw.slideDownIn10,Rt[G.left]=It.lw.slideLeftIn10,Rt[G.right]=It.lw.slideRightIn10,Rt),Yt={opacity:0,filter:"opacity(0)",pointerEvents:"none"},Xt=["role","aria-roledescription"],Gt={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:7},Ut=(0,a.Z)({disableCaching:!0});function qt(t,n,i,e){var r,o=t.calloutMaxHeight,a=t.finalHeight,l=t.directionalHint,s=t.directionalHintFixed,c=t.hidden,d=t.gapSpace,f=t.beakWidth,v=t.isBeakVisible,h=t.coverTarget,p=u.useState(),g=p[0],y=p[1],m=null!==(r=null==e?void 0:e.elementPosition)&&void 0!==r?r:{},b=m.top,x=m.bottom,w=(null==i?void 0:i.current)?function(t){var n,i,e,r,o=t,u=t,a=t,l=null!==(n=a.left)&&void 0!==n?n:a.x,s=null!==(i=a.top)&&void 0!==i?i:a.y,c=null!==(e=a.right)&&void 0!==e?e:l,d=null!==(r=a.bottom)&&void 0!==r?r:s;return o.stopPropagation?new Q(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==l&&void 0!==s?new Q(l,c,s,d):Ct(u)}(i.current):void 0;return u.useEffect((function(){var t,i,r=null!==(t=n())&&void 0!==t?t:{},u=r.top,a=r.bottom;(null==e?void 0:e.targetEdge)===G.top&&(null==w?void 0:w.top)&&!h&&(a=w.top-function(t,n,i){return At(t,n,i)}(v,f,d)),"number"==typeof b&&a?i=a-b:"number"==typeof x&&"number"==typeof u&&a&&(i=a-u-x),y(!o&&!c||o&&i&&o>i?i:o||void 0)}),[x,o,a,l,s,n,c,e,b,d,f,v,w,h]),g}function Zt(t,n,i,e,r,a){var l,c=u.useState(),d=c[0],f=c[1],v=u.useRef(0),h=u.useRef(void 0),p=Ot(),g=t.hidden,y=t.target,m=t.finalHeight,b=t.calloutMaxHeight,x=t.onPositioned,w=t.directionalHint,M=t.hideOverflow,C=t.preferScrollResizePositioning,k=zt(),A=u.useRef(void 0);A.current!==a.current&&(A.current=a.current,l=a.current?null==k?void 0:k.getComputedStyle(a.current):void 0);var S=null==l?void 0:l.overflowY;return u.useEffect((function(){if(!g){var u=p.requestAnimationFrame((function(){var u,a,l,c;if(n.current&&i){var p=(0,o.Cl)((0,o.Cl)({},t),{target:e.current,bounds:r()}),g=i.cloneNode(!0);g.style.maxHeight=b?"".concat(b):"",g.style.visibility="hidden",null===(u=i.parentElement)||void 0===u||u.appendChild(g);var w=h.current===y?d:void 0,A=C&&!(M||"clip"===S||"hidden"===S),L=m?function(t,n,i,e,r){return function(t,n,i,e,r){return St(t,n,i,e,!1,void 0,!0,null!=r?r:(0,s.z)())}(t,n,i,e,r)}(p,n.current,g,w,k):function(t,n,i,e,r,o,u){return St(t,n,i,e,r,void 0,void 0,u)}(p,n.current,g,w,A,0,k);null===(a=i.parentElement)||void 0===a||a.removeChild(g),!d&&L||d&&L&&(c=L,!Qt((l=d).elementPosition,c.elementPosition)||!Qt(l.beakPosition.elementPosition,c.beakPosition.elementPosition))&&v.current<5?(v.current++,f(L)):v.current>0&&(v.current=0,null==x||x(d))}}),i);return h.current=y,function(){p.cancelAnimationFrame(u),h.current=void 0}}f(void 0),v.current=0}),[g,w,p,i,b,n,e,m,r,x,d,t,y,M,C,S,k]),d}var Kt=u.memo(u.forwardRef((function(t,n){var i=F(Gt,t),e=i.styles,r=i.style,a=i.ariaLabel,l=i.ariaDescribedBy,s=i.ariaLabelledBy,c=i.className,d=i.isBeakVisible,f=i.children,v=i.beakWidth,h=i.calloutWidth,p=i.calloutMaxWidth,g=i.calloutMinWidth,y=i.doNotLayer,m=i.finalHeight,b=i.hideOverflow,x=void 0===b?!!m:b,k=i.backgroundColor,A=i.calloutMaxHeight,S=i.onScroll,L=i.shouldRestoreFocus,V=void 0===L||L,D=i.target,N=i.hidden,O=i.onLayerMounted,T=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==T?void 0:T.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),$=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(void 0),a=u.useRef(null),l=Bt();if(!t||t!==o.current||"string"==typeof t){var s=null==n?void 0:n.current;if(t)if("string"==typeof t)if(null===(i=null==s?void 0:s.getRootNode())||void 0===i?void 0:i.host)a.current=null!==(r=null===(e=null==s?void 0:s.getRootNode())||void 0===e?void 0:e.querySelector(t))&&void 0!==r?r:null;else{var c=(0,M.Y)(s);a.current=c?c.querySelector(t):null}else a.current="stopPropagation"in t||"getBoundingClientRect"in t?t:"current"in t?t.current:t;o.current=t}return[a,l]}(i.target,{current:H}),X=Y[0],G=Y[1],U=function(t,n,i){var e=t.bounds,r=t.minPagePadding,o=void 0===r?Gt.minPagePadding:r,a=t.target,l=u.useState(!1),s=l[0],c=l[1],d=u.useRef(void 0),f=u.useCallback((function(){if(!d.current||s){var t="function"==typeof e?i?e(a,i):void 0:e;!t&&i&&(t=function(t,n){return function(t,n){var i=void 0;if(n.getWindowSegments&&(i=n.getWindowSegments()),void 0===i||i.length<=1)return{top:0,left:0,right:n.innerWidth,bottom:n.innerHeight,width:n.innerWidth,height:n.innerHeight};var e=0,r=0;if(null!==t&&t.getBoundingClientRect){var o=t.getBoundingClientRect();e=(o.left+o.right)/2,r=(o.top+o.bottom)/2}else null!==t&&(e=t.left||t.x,r=t.top||t.y);for(var u={top:0,left:0,right:0,bottom:0,width:0,height:0},a=0,l=i;a<l.length;a++){var s=l[a];e&&s.left<=e&&s.right>=e&&r&&s.top<=r&&s.bottom>=r&&(u={top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})}return u}(t,n)}(n.current,i),t={top:t.top+o,left:t.left+o,right:t.right-o,bottom:t.bottom-o,width:t.width-2*o,height:t.height-2*o}),d.current=t,s&&c(!1)}return d.current}),[e,o,a,n,i,s]),v=Ot();return Tt(i,"resize",v.debounce((function(){c(!0)}),500,{leading:!0})),f}(i,X,G),q=Zt(i,B,H,X,U,P),Z=qt(i,U,X,q),K=function(t,n,i,e,r){var o=t.hidden,a=t.onDismiss,l=t.preventDismissOnScroll,s=t.preventDismissOnResize,c=t.preventDismissOnLostFocus,d=t.dismissOnTargetClick,f=t.shouldDismissOnWindowFocus,v=t.preventDismissOnEvent,h=u.useRef(!1),p=Ot(),g=Wt([function(){h.current=!0},function(){h.current=!1}]),y=!!n;return u.useEffect((function(){var t=function(t){y&&!l&&g(t)},n=function(t){s||v&&v(t)||null==a||a(t)},u=function(t){c||g(t)},g=function(t){var n=t.composedPath?t.composedPath():[],o=n.length>0?n[0]:t.target,u=i.current&&!w(i.current,o);if(u&&h.current)h.current=!1;else if(!e.current&&u||t.target!==r&&u&&(!e.current||"stopPropagation"in e.current||d||o!==e.current&&!w(e.current,o))){if(v&&v(t))return;null==a||a(t)}},m=function(t){f&&((!v||v(t))&&(v||c)||(null==r?void 0:r.document.hasFocus())||null!==t.relatedTarget||null==a||a(t))},b=new Promise((function(i){p.setTimeout((function(){if(!o&&r){var e=[E(r,"scroll",t,!0),E(r,"resize",n,!0),E(r.document.documentElement,"focus",u,!0),E(r.document.documentElement,"click",u,!0),E(r,"blur",m,!0)];i((function(){e.forEach((function(t){return t()}))}))}}),0)}));return function(){b.then((function(t){return t()}))}}),[o,p,i,e,r,a,f,d,c,s,l,y,v]),g}(i,q,B,X,G),J=K[0],Q=K[1],tt=(null==q?void 0:q.elementPosition.top)&&(null==q?void 0:q.elementPosition.bottom),nt=(0,o.Cl)((0,o.Cl)({},null==q?void 0:q.elementPosition),{maxHeight:Z});if(tt&&(nt.bottom=void 0),function(t,n,i){var e=t.hidden,r=t.setInitialFocus,o=Ot(),a=!!n;u.useEffect((function(){if(!e&&r&&a&&i){var t=o.requestAnimationFrame((function(){return C(i)}),i);return function(){return o.cancelAnimationFrame(t)}}}),[e,a,o,i,r])}(i,q,H),u.useEffect((function(){N||null==O||O()}),[N]),!G)return null;var it=x,et=d&&!!D,rt=Ut(e,{theme:i.theme,className:c,overflowYHidden:it,calloutWidth:h,positions:q,beakWidth:v,backgroundColor:k,calloutMaxWidth:p,calloutMinWidth:g,doNotLayer:y}),ot=(0,o.Cl)((0,o.Cl)({maxHeight:A||"100%"},r),it&&{overflowY:"hidden"}),ut=i.hidden?{visibility:"hidden"}:void 0;return u.createElement("div",{ref:$,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},z(i,R,Xt),{className:j(rt.root,q&&q.targetEdge&&$t[q.targetEdge]),style:q?(0,o.Cl)({},nt):Yt,tabIndex:-1,ref:W}),et&&u.createElement("div",{className:rt.beak,style:Jt(q)}),et&&u.createElement("div",{className:rt.beakCurtain}),u.createElement(Ht,(0,o.Cl)({role:i.role,"aria-roledescription":i["aria-roledescription"],ariaDescribedBy:l,ariaLabel:a,ariaLabelledBy:s,className:rt.calloutMain,onDismiss:i.onDismiss,onMouseDown:J,onMouseUp:Q,onRestoreFocus:i.onRestoreFocus,onScroll:S,shouldRestoreFocus:V,style:ot},T,{ref:P}),f)))})),(function(t,n){return!(n.shouldUpdateWhenHidden||!t.hidden||!n.hidden)||function(t,n){if(!t||!n)return!t&&!n;for(var i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0}(t,n)}));function Jt(t){var n,i,e=(0,o.Cl)((0,o.Cl)({},null===(n=null==t?void 0:t.beakPosition)||void 0===n?void 0:n.elementPosition),{display:(null===(i=null==t?void 0:t.beakPosition)||void 0===i?void 0:i.hideBeak)?"none":void 0});return e.top||e.bottom||e.left||e.right||(e.left=0,e.top=0),e}function Qt(t,n){for(var i in n)if(n.hasOwnProperty(i)){var e=t[i],r=n[i];if(void 0===e||void 0===r)return!1;if(e.toFixed(2)!==r.toFixed(2))return!1}return!0}function tn(t){return{height:t,width:t}}Kt.displayName="CalloutContentBase";var nn={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},en=(0,r.I)(Kt,(function(t){var n,i=t.theme,e=t.className,r=t.overflowYHidden,o=t.calloutWidth,u=t.beakWidth,a=t.backgroundColor,l=t.calloutMaxWidth,s=t.calloutMinWidth,c=t.doNotLayer,d=(0,It.Km)(nn,i),f=i.semanticColors,v=i.effects;return{container:[d.container,{position:"relative"}],root:[d.root,i.fonts.medium,{position:"absolute",display:"flex",zIndex:c?It.nA.Layer:void 0,boxSizing:"border-box",borderRadius:v.roundedCorner2,boxShadow:v.elevation16,selectors:(n={},n[It.up]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},n)},(0,It.QN)(),e,!!o&&{width:o},!!l&&{maxWidth:l},!!s&&{minWidth:s}],beak:[d.beak,{position:"absolute",backgroundColor:f.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},tn(u),a&&{backgroundColor:a}],beakCurtain:[d.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:f.menuBackground,borderRadius:v.roundedCorner2}],calloutMain:[d.calloutMain,{backgroundColor:f.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:v.roundedCorner2},r&&{overflowY:"hidden"},a&&{backgroundColor:a}]}}),void 0,{scope:"CalloutContent"}),rn=u.createContext(void 0),on=function(){return function(){}};rn.Provider;var un=ReactDOM,an=i(753);new WeakMap,new WeakMap;var ln=u.createContext(void 0),sn=function(t){var n=t.providerRef,i=t.layerRoot,e=u.useState([])[0],r=u.useContext(ln),o=void 0!==r&&!i,a=u.useMemo((function(){return o?void 0:{providerRef:n,registeredProviders:e,registerProvider:function(t){e.push(t),null==r||r.registerProvider(t)},unregisterProvider:function(t){null==r||r.unregisterProvider(t);var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}),[n,e,r,o]);return u.useEffect((function(){if(a)return a.registerProvider(a.providerRef),function(){return a.unregisterProvider(a.providerRef)}}),[a]),a?u.createElement(ln.Provider,{value:a},t.children):u.createElement(u.Fragment,null,t.children)},cn=i(540),dn=i(770);function fn(t,n){void 0===t&&(t={});var i=vn(n)?n:function(t){return function(n){return t?(0,o.Cl)((0,o.Cl)({},n),t):n}}(n);return i(t)}function vn(t){return"function"==typeof t}var hn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onCustomizationChange=function(){return n.forceUpdate()},n}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){cn.X.observe(this._onCustomizationChange)},n.prototype.componentWillUnmount=function(){cn.X.unobserve(this._onCustomizationChange)},n.prototype.render=function(){var t=this,n=this.props.contextTransform;return u.createElement(dn.z.Consumer,null,(function(i){var e=function(t,n){var i,e,r,u=(n||{}).customizations,a=void 0===u?{settings:{},scopedSettings:{}}:u;return{customizations:{settings:fn(a.settings,t.settings),scopedSettings:(i=a.scopedSettings,e=t.scopedSettings,void 0===i&&(i={}),(vn(e)?e:(void 0===(r=e)&&(r={}),function(t){var n=(0,o.Cl)({},t);for(var i in r)r.hasOwnProperty(i)&&(n[i]=(0,o.Cl)((0,o.Cl)({},t[i]),r[i]));return n}))(i)),inCustomizerContext:!0}}}(t.props,i);return n&&(e=n(e)),u.createElement(dn.z.Provider,{value:e},t.props.children)}))},n}(u.Component),pn=i(143),gn=(0,a.Z)(),yn=(0,an.J9)((function(t,n){return(0,pn.a)((0,o.Cl)((0,o.Cl)({},t),{rtl:n}))})),mn=u.forwardRef((function(t,n){var i=t.className,e=t.theme,r=t.applyTheme,a=t.applyThemeToBody,s=t.styles,c=gn(s,{theme:e,applyTheme:r,className:i}),d=u.useRef(null);return function(t,n,i){var e=n.bodyThemed;u.useEffect((function(){if(t){var n=(0,M.Y)(i.current);if(n)return n.body.classList.add(e),function(){n.body.classList.remove(e)}}}),[e,t,i])}(a,c,d),u.createElement(u.Fragment,null,function(t,n,i,e){var r=n.root,a=t.as,s=void 0===a?"div":a,c=t.dir,d=t.theme,f=z(t,R,["dir"]),v=function(t){var n=t.theme,i=t.dir,e=(0,l.jI)(n)?"rtl":"ltr",r=(0,l.jI)()?"rtl":"ltr",o=i||e;return{rootDir:o!==e||o!==r?o:i,needsTheme:o!==e}}(t),h=v.rootDir,p=v.needsTheme,g=u.createElement(sn,{providerRef:i},u.createElement(s,(0,o.Cl)({dir:h},f,{className:r,ref:Et(i,e)})));return p&&(g=u.createElement(hn,{settings:{theme:yn(d,"rtl"===c)}},g)),g}(t,c,d,n))}));mn.displayName="FabricBase";var bn,xn={fontFamily:"inherit"},wn={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},Mn=(0,r.I)(mn,(function(t){var n=t.applyTheme,i=t.className,e=t.preventBlanketFontInheritance,r=t.theme;return{root:[(0,It.Km)(wn,r).root,r.fonts.medium,{color:r.palette.neutralPrimary},!e&&{"& button":xn,"& input":xn,"& textarea":xn},n&&{color:r.semanticColors.bodyText,backgroundColor:r.semanticColors.bodyBackground},i],bodyThemed:[{backgroundColor:r.semanticColors.bodyBackground}]}}),void 0,{scope:"Fabric"}),Cn=i(517),kn="data-portal-element",An={},Sn={},Ln="fluent-default-layer-host",Vn="#".concat(Ln),Dn=i(921),Nn=(0,Dn.S)()?u.useLayoutEffect:u.useEffect;function On(t){console&&console.warn&&console.warn(t)}function Tn(t,n,i,e,r){if(!0===r)for(var o=0,u=i;o<u.length;o++){var a=u[o];a in n||On("".concat(t," property '").concat(a,"' is required when '").concat(e,"' is used.'"))}}function En(t,n,i){for(var e in i)if(n&&e in n){var r="".concat(t," property '").concat(e,"' was used but has been deprecated."),o=i[e];o&&(r+=" Use '".concat(o,"' instead.")),On(r)}}function Fn(t,n){return void 0!==t[n]&&null!==t[n]}function Bn(t){var n=u.useRef(void 0);return u.useEffect((function(){n.current=t})),n.current}bn={valueOnChange:{},valueDefaultValue:{},controlledToUncontrolled:{},uncontrolledToControlled:{}};var Pn=0;function _n(t){var n=t.name,i=t.props,e=t.other,r=void 0===e?[]:e,a=t.conditionallyRequired,l=t.deprecations,s=t.mutuallyExclusive,c=t.controlledUsage,d=u.useRef(!1),f=Wt((function(){return"useWarnings_".concat(Pn++)})),v=Bn(i);if(!d.current){d.current=!0;for(var h=0,p=r;h<p.length;h++)On(p[h]);if(a)for(var g=0,y=a;g<y.length;g++){var m=y[g];Tn(n,i,m.requiredProps,m.conditionalPropName,m.condition)}l&&En(n,i,l),s&&function(t,n,i){for(var e in i)if(n&&void 0!==n[e]){var r=i[e];r&&void 0!==n[r]&&On("".concat(t," property '").concat(e,"' is mutually exclusive with '").concat(i[e],"'. ")+"Use one or the other.")}}(n,i,s)}c&&function(t){var n=t.componentId,i=t.componentName,e=t.defaultValueProp,r=t.props,o=t.oldProps,u=t.onChangeProp,a=t.readOnlyProp,l=t.valueProp,s=o?Fn(o,l):void 0,c=Fn(r,l);if(c){var d=!!r[u],f=!(!a||!r[a]);d||f||bn.valueOnChange[n]||(bn.valueOnChange[n]=!0,On("Warning: You provided a '".concat(String(l),"' prop to a ").concat(String(i)," without an '").concat(String(u),"' handler. ")+"This will render a read-only field. If the field should be mutable use '".concat(String(e),"'. ")+"Otherwise, set '".concat(String(u),"'").concat(a?" or '".concat(String(a),"'"):"","."))),null==r[e]||bn.valueDefaultValue[n]||(bn.valueDefaultValue[n]=!0,On("Warning: You provided both '".concat(String(l),"' and '").concat(String(e),"' to a ").concat(i,". ")+"Form fields must be either controlled or uncontrolled (specify either the '".concat(String(l),"' prop, ")+"or the '".concat(String(e),"' prop, but not both). Decide between using a controlled or uncontrolled ")+"".concat(i," and remove one of these props. More info: https://fb.me/react-controlled-components")))}if(o&&c!==s){var v=s?"a controlled":"an uncontrolled",h=s?"uncontrolled":"controlled",p=s?bn.controlledToUncontrolled:bn.uncontrolledToControlled;p[n]||(p[n]=!0,On("Warning: A component is changing ".concat(v," ").concat(i," to be ").concat(h,". ")+"".concat(i,"s should not switch from controlled to uncontrolled (or vice versa). ")+"Decide between using controlled or uncontrolled for the lifetime of the component. More info: https://fb.me/react-controlled-components"))}}((0,o.Cl)((0,o.Cl)({},c),{componentId:f,props:i,componentName:n,oldProps:v}))}var Hn,In=(0,a.Z)(),Wn=u.forwardRef((function(t,n){var i,e=null!==(i=u.useContext(rn))&&void 0!==i?i:on,r=u.useRef(null),a=Et(r,n),l=u.useRef(void 0),s=u.useRef(null),c=u.useContext(ln),d=u.useState(!1),f=d[0],v=d[1],h=u.useCallback((function(t){var n,i=!!(null==(n=null==c?void 0:c.providerRef)?void 0:n.current)&&n.current.classList.contains(Cn.Y2);t&&i&&t.classList.add(Cn.Y2)}),[c]),p=t.children,g=t.className,y=t.eventBubblingEnabled,m=t.fabricProps,b=t.hostId,x=t.insertFirst,w=t.onLayerDidMount,C=void 0===w?function(){}:w,k=t.onLayerMounted,A=void 0===k?function(){}:k,S=t.onLayerWillUnmount,L=t.styles,V=t.theme,D=Et(s,null==m?void 0:m.ref,h),N=In(L,{theme:V,className:g,isNotHost:!b}),O=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},T=function(){var t,n,i,e,o=(0,M.Y)(r.current),u=(null===(n=null===(t=r.current)||void 0===t?void 0:t.getRootNode())||void 0===n?void 0:n.host)?null===(i=null==r?void 0:r.current)||void 0===i?void 0:i.getRootNode():void 0;if(o&&(o||u)){var a=function(t,n){var i,e;void 0===n&&(n=null);var r=null!=n?n:t;if(b){var o=function(t){var n=Sn[t];return n&&n[0]||void 0}(b);return o?null!==(i=o.rootRef.current)&&void 0!==i?i:null:null!==(e=r.getElementById(b))&&void 0!==e?e:null}var u=Vn,a=u?r.querySelector(u):null;return a||(a=function(t,n){void 0===n&&(n=null);var i=t.createElement("div");return i.setAttribute("id",Ln),i.style.cssText="position:fixed;z-index:1000000",n?n.appendChild(i):null==t||t.body.appendChild(i),i}(t,n)),a}(o,u);if(a){a.__tabsterElementFlags||(a.__tabsterElementFlags={}),a.__tabsterElementFlags.noDirectAriaHidden=!0,O();var s=(null!==(e=a.ownerDocument)&&void 0!==e?e:o).createElement("div");s.className=N.root,s.setAttribute(kn,"true"),function(t,n){var i=t,e=n;i._virtual||(i._virtual={children:[]});var r=i._virtual.parent;if(r&&r!==n){var o=r._virtual.children.indexOf(i);o>-1&&r._virtual.children.splice(o,1)}i._virtual.parent=e||void 0,e&&(e._virtual||(e._virtual={children:[]}),e._virtual.children.push(i))}(s,r.current),x?a.insertBefore(s,a.firstChild):a.appendChild(s),l.current=s,v(!0)}}};return Nn((function(){T(),b&&function(t,n){An[t]||(An[t]=[]),An[t].push(n);var i=Sn[t];if(i)for(var e=0,r=i;e<r.length;e++)r[e].notifyLayersChanged()}(b,T);var t=l.current?e(l.current):void 0;return function(){t&&t(),O(),b&&function(t,n){var i=An[t];if(i){var e=i.indexOf(n);e>=0&&(i.splice(e,1),0===i.length&&delete An[t])}var r=Sn[t];if(r)for(var o=0,u=r;o<u.length;o++)u[o].notifyLayersChanged()}(b,T)}}),[b]),u.useEffect((function(){l.current&&f&&(null==A||A(),null==C||C(),v(!1))}),[f,A,C]),function(t){_n({name:"Layer",props:t,deprecations:{onLayerMounted:"onLayerDidMount"}})}(t),u.createElement("span",{className:"ms-layer",ref:a},l.current&&un.createPortal(u.createElement(sn,{layerRoot:!0,providerRef:D},u.createElement(Mn,(0,o.Cl)({},!y&&(Hn||(Hn={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(t){return Hn[t]=Rn}))),Hn),m,{className:j(N.content,null==m?void 0:m.className),ref:D}),p)),l.current))}));Wn.displayName="LayerBase";var Rn=function(t){t.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==t.type&&"mouseleave"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&t.stopPropagation()},zn={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},jn=(0,r.I)(Wn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)(zn,e);return{root:[r.root,e.fonts.medium,i&&[r.rootNoHost,{position:"fixed",zIndex:It.nA.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],n],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]}),$n=u.forwardRef((function(t,n){var i=t.layerProps,e=t.doNotLayer,r=(0,o.Tt)(t,["layerProps","doNotLayer"]),a=u.createElement(en,(0,o.Cl)({},r,{doNotLayer:e,ref:n}));return e?a:u.createElement(jn,(0,o.Cl)({},i),a)}));$n.displayName="Callout";var Yn=i(61);function Xn(t){return t}var Gn=1e-6;function Un(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Zn(t){return n=>+t(n)}function Kn(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),i=>+t(i)+n}function Jn(){return!this.__axis}function Qn(t,n){var i=[],e=null,r=null,o=6,u=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",d=1===t||3===t?Un:qn;function f(f){var v=null==e?n.ticks?n.ticks.apply(n,i):n.domain():e,h=null==r?n.tickFormat?n.tickFormat.apply(n,i):Xn:r,p=Math.max(o,0)+a,g=n.range(),y=+g[0]+l,m=+g[g.length-1]+l,b=(n.bandwidth?Kn:Zn)(n.copy(),l),x=f.selection?f.selection():f,w=x.selectAll(".domain").data([null]),M=x.selectAll(".tick").data(v,n).order(),C=M.exit(),k=M.enter().append("g").attr("class","tick"),A=M.select("line"),S=M.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(w=w.transition(f),M=M.transition(f),A=A.transition(f),S=S.transition(f),C=C.transition(f).attr("opacity",Gn).attr("transform",(function(t){return isFinite(t=b(t))?d(t+l):this.getAttribute("transform")})),k.attr("opacity",Gn).attr("transform",(function(t){var n=this.parentNode.__axis;return d((n&&isFinite(n=n(t))?n:b(t))+l)}))),C.remove(),w.attr("d",4===t||2===t?u?"M"+s*u+","+y+"H"+l+"V"+m+"H"+s*u:"M"+l+","+y+"V"+m:u?"M"+y+","+s*u+"V"+l+"H"+m+"V"+s*u:"M"+y+","+l+"H"+m),M.attr("opacity",1).attr("transform",(function(t){return d(b(t)+l)})),A.attr(c+"2",s*o),S.attr(c,s*p).text(h),x.filter(Jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return i=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),f):i.slice()},f.tickValues=function(t){return arguments.length?(e=null==t?null:Array.from(t),f):e&&e.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=u=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(u=+t,f):u},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function ti(t){return Qn(2,t)}function ni(t){return Qn(3,t)}function ii(t){return Qn(4,t)}const ei=Math.sqrt(50),ri=Math.sqrt(10),oi=Math.sqrt(2);function ui(t,n,i){const e=(n-t)/Math.max(0,i),r=Math.floor(Math.log10(e)),o=e/Math.pow(10,r),u=o>=ei?10:o>=ri?5:o>=oi?2:1;let a,l,s;return r<0?(s=Math.pow(10,-r)/u,a=Math.round(t*s),l=Math.round(n*s),a/s<t&&++a,l/s>n&&--l,s=-s):(s=Math.pow(10,r)*u,a=Math.round(t/s),l=Math.round(n/s),a*s<t&&++a,l*s>n&&--l),l<a&&.5<=i&&i<2?ui(t,n,2*i):[a,l,s]}function ai(t,n,i){if(!((i=+i)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[r,o,u]=e?ui(n,t,i):ui(t,n,i);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(e)if(u<0)for(let t=0;t<a;++t)l[t]=(o-t)/-u;else for(let t=0;t<a;++t)l[t]=(o-t)*u;else if(u<0)for(let t=0;t<a;++t)l[t]=(r+t)/-u;else for(let t=0;t<a;++t)l[t]=(r+t)*u;return l}function li(t,n,i){return ui(t=+t,n=+n,i=+i)[2]}function si(t,n,i){i=+i;const e=(n=+n)<(t=+t),r=e?li(n,t,i):li(t,n,i);return(e?-1:1)*(r<0?1/-r:r)}function ci(t,n,i){let e;for(;;){const r=li(t,n,i);if(r===e||0===r||!isFinite(r))return[t,n];r>0?(t=Math.floor(t/r)*r,n=Math.ceil(n/r)*r):r<0&&(t=Math.ceil(t*r)/r,n=Math.floor(n*r)/r),e=r}}function di(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}function fi(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function vi(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function hi(t,n){let i=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++i,e+=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++i,e+=o)}if(i)return e/i}function pi(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function gi(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function yi(t,n,i=0,e=1/0,r){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),e=Math.floor(Math.min(t.length-1,e)),!(i<=n&&n<=e))return t;for(r=void 0===r?gi:function(t=pi){if(t===pi)return gi;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,i)=>{const e=t(n,i);return e||0===e?e:(0===t(i,i))-(0===t(n,n))}}(r);e>i;){if(e-i>600){const o=e-i+1,u=n-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o)*(u-o/2<0?-1:1);yi(t,n,Math.max(i,Math.floor(n-u*l/o+s)),Math.min(e,Math.floor(n+(o-u)*l/o+s)),r)}const o=t[n];let u=i,a=e;for(mi(t,i,n),r(t[e],o)>0&&mi(t,i,e);u<a;){for(mi(t,u,a),++u,--a;r(t[u],o)<0;)++u;for(;r(t[a],o)>0;)--a}0===r(t[i],o)?mi(t,i,a):(++a,mi(t,a,e)),a<=n&&(i=a+1),n<=a&&(e=a-1)}return t}function mi(t,n,i){const e=t[n];t[n]=t[i],t[i]=e}function bi(t,n){return function(t,n,i){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let i=-1;for(let e of t)null!=(e=n(e,++i,t))&&(e=+e)>=e&&(yield e)}}(t,i)),(e=t.length)&&!isNaN(n=+n)){if(n<=0||e<2)return di(t);if(n>=1)return fi(t);var e,r=(e-1)*n,o=Math.floor(r),u=fi(yi(t,o).subarray(0,o+1));return u+(di(t.subarray(o+1))-u)*(r-o)}}(t,.5,n)}function xi(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function wi(t){let n,i,e;function r(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length?(n=pi,i=(n,i)=>pi(t(n),i),e=(n,i)=>t(n)-i):(n=t===pi||t===xi?t:Mi,i=t,e=t),{left:r,center:function(t,n,i=0,o=t.length){const u=r(t,n,i,o-1);return u>i&&e(t[u-1],n)>-e(t[u],n)?u-1:u},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}function Mi(){return 0}const Ci=1e3,ki=6e4,Ai=36e5,Si=864e5,Li=6048e5,Vi=31536e6,Di=new Date,Ni=new Date;function Oi(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=i=>(t(i=new Date(i-1)),n(i,1),t(i),i),r.round=t=>{const n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=(t,i)=>(n(t=new Date(+t),null==i?1:Math.floor(i)),t),r.range=(i,e,o)=>{const u=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return u;let a;do{u.push(a=new Date(+i)),n(i,o),t(i)}while(a<i&&i<e);return u},r.filter=i=>Oi((n=>{if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),((t,e)=>{if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););})),i&&(r.count=(n,e)=>(Di.setTime(+n),Ni.setTime(+e),t(Di),t(Ni),Math.floor(i(Di,Ni))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?n=>e(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const Ti=Oi((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Ti.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Oi((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):Ti:null),Ti.range;const Ei=Oi((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Ci)}),((t,n)=>(n-t)/Ci),(t=>t.getUTCSeconds())),Fi=(Ei.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getMinutes()))),Bi=(Fi.range,Oi((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getUTCMinutes()))),Pi=(Bi.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci-t.getMinutes()*ki)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getHours()))),_i=(Pi.range,Oi((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getUTCHours()))),Hi=(_i.range,Oi((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Si),(t=>t.getDate()-1))),Ii=(Hi.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>t.getUTCDate()-1))),Wi=(Ii.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>Math.floor(t/Si))));function Ri(t){return Oi((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Li))}Wi.range;const zi=Ri(0),ji=Ri(1),$i=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),Ui=Ri(6);function qi(t){return Oi((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/Li))}zi.range,ji.range,$i.range,Yi.range,Xi.range,Gi.range,Ui.range;const Zi=qi(0),Ki=qi(1),Ji=qi(2),Qi=qi(3),te=qi(4),ne=qi(5),ie=qi(6),ee=(Zi.range,Ki.range,Ji.range,Qi.range,te.range,ne.range,ie.range,Oi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),re=(ee.range,Oi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),oe=(re.range,Oi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));oe.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,i)=>{n.setFullYear(n.getFullYear()+i*t)})):null,oe.range;const ue=Oi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function ae(t,n,i,e,r,o){const u=[[Ei,1,Ci],[Ei,5,5e3],[Ei,15,15e3],[Ei,30,3e4],[o,1,ki],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,Ai],[r,3,108e5],[r,6,216e5],[r,12,432e5],[e,1,Si],[e,2,1728e5],[i,1,Li],[n,1,2592e6],[n,3,7776e6],[t,1,Vi]];function a(n,i,e){const r=Math.abs(i-n)/e,o=wi((([,,t])=>t)).right(u,r);if(o===u.length)return t.every(si(n/Vi,i/Vi,e));if(0===o)return Ti.every(Math.max(si(n,i,e),1));const[a,l]=u[r/u[o-1][2]<u[o][2]/r?o-1:o];return a.every(l)}return[function(t,n,i){const e=n<t;e&&([t,n]=[n,t]);const r=i&&"function"==typeof i.range?i:a(t,n,i),o=r?r.range(t,+n+1):[];return e?o.reverse():o},a]}ue.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null,ue.range;const[le,se]=ae(ue,re,Zi,Wi,_i,Bi),[ce,de]=ae(oe,ee,zi,Hi,Pi,Fi);var fe=new Date,ve=new Date;function he(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=function(n){return t(n=new Date(+n)),n},r.ceil=function(i){return t(i=new Date(i-1)),n(i,1),t(i),i},r.round=function(t){var n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=function(t,i){return n(t=new Date(+t),null==i?1:Math.floor(i)),t},r.range=function(i,e,o){var u,a=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return a;do{a.push(u=new Date(+i)),n(i,o),t(i)}while(u<i&&i<e);return a},r.filter=function(i){return he((function(n){if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););}))},i&&(r.count=function(n,e){return fe.setTime(+n),ve.setTime(+e),t(fe),t(ve),Math.floor(i(fe,ve))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?function(n){return e(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}const pe=864e5,ge=6048e5;function ye(t){return he((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/ge}))}var me=ye(0),be=ye(1),xe=ye(2),we=ye(3),Me=ye(4),Ce=ye(5),ke=ye(6),Ae=(me.range,be.range,xe.range,we.range,Me.range,Ce.range,ke.range,he((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/pe}),(function(t){return t.getUTCDate()-1}))),Se=Ae;function Le(t){return he((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/ge}))}Ae.range;var Ve=Le(0),De=Le(1),Ne=Le(2),Oe=Le(3),Te=Le(4),Ee=Le(5),Fe=Le(6),Be=(Ve.range,De.range,Ne.range,Oe.range,Te.range,Ee.range,Fe.range,he((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/pe),(t=>t.getDate()-1))),Pe=Be,_e=(Be.range,he((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));_e.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,i){n.setFullYear(n.getFullYear()+i*t)})):null};var He=_e,Ie=(_e.range,he((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Ie.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,i){n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null};var We=Ie;function Re(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ze(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function je(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function $e(t){var n=t.dateTime,i=t.date,e=t.time,r=t.periods,o=t.days,u=t.shortDays,a=t.months,l=t.shortMonths,s=tr(r),c=nr(r),d=tr(o),f=nr(o),v=tr(u),h=nr(u),p=tr(a),g=nr(a),y=tr(l),m=nr(l),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Mr,e:Mr,f:Lr,g:Hr,G:Wr,H:Cr,I:kr,j:Ar,L:Sr,m:Vr,M:Dr,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:so,s:co,S:Nr,u:Or,U:Tr,V:Fr,w:Br,W:Pr,x:null,X:null,y:_r,Y:Ir,Z:Rr,"%":lo},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:zr,e:zr,f:Gr,g:ro,G:uo,H:jr,I:$r,j:Yr,L:Xr,m:Ur,M:qr,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:so,s:co,S:Zr,u:Kr,U:Jr,V:to,w:no,W:io,x:null,X:null,y:eo,Y:oo,Z:ao,"%":lo},w={a:function(t,n,i){var e=v.exec(n.slice(i));return e?(t.w=h.get(e[0].toLowerCase()),i+e[0].length):-1},A:function(t,n,i){var e=d.exec(n.slice(i));return e?(t.w=f.get(e[0].toLowerCase()),i+e[0].length):-1},b:function(t,n,i){var e=y.exec(n.slice(i));return e?(t.m=m.get(e[0].toLowerCase()),i+e[0].length):-1},B:function(t,n,i){var e=p.exec(n.slice(i));return e?(t.m=g.get(e[0].toLowerCase()),i+e[0].length):-1},c:function(t,i,e){return k(t,n,i,e)},d:fr,e:fr,f:mr,g:lr,G:ar,H:hr,I:hr,j:vr,L:yr,m:dr,M:pr,p:function(t,n,i){var e=s.exec(n.slice(i));return e?(t.p=c.get(e[0].toLowerCase()),i+e[0].length):-1},q:cr,Q:xr,s:wr,S:gr,u:er,U:rr,V:or,w:ir,W:ur,x:function(t,n,e){return k(t,i,n,e)},X:function(t,n,i){return k(t,e,n,i)},y:lr,Y:ar,Z:sr,"%":br};function M(t,n){return function(i){var e,r,o,u=[],a=-1,l=0,s=t.length;for(i instanceof Date||(i=new Date(+i));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(l,a)),null!=(r=Ue[e=t.charAt(++a)])?e=t.charAt(++a):r="e"===e?" ":"0",(o=n[e])&&(e=o(i,r)),u.push(e),l=a+1);return u.push(t.slice(l,a)),u.join("")}}function C(t,n){return function(i){var e,r,o=je(1900,void 0,1);if(k(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(e=ze(je(o.y,0,1))).getUTCDay(),e=r>4||0===r?be.ceil(e):be(e),e=Se.offset(e,7*(o.V-1)),o.y=e.getUTCFullYear(),o.m=e.getUTCMonth(),o.d=e.getUTCDate()+(o.w+6)%7):(r=(e=Re(je(o.y,0,1))).getDay(),e=r>4||0===r?De.ceil(e):De(e),e=Pe.offset(e,7*(o.V-1)),o.y=e.getFullYear(),o.m=e.getMonth(),o.d=e.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?ze(je(o.y,0,1)).getUTCDay():Re(je(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ze(o)):Re(o)}}function k(t,n,i,e){for(var r,o,u=0,a=n.length,l=i.length;u<a;){if(e>=l)return-1;if(37===(r=n.charCodeAt(u++))){if(r=n.charAt(u++),!(o=w[r in Ue?n.charAt(u++):r])||(e=o(t,i,e))<0)return-1}else if(r!=i.charCodeAt(e++))return-1}return e}return b.x=M(i,b),b.X=M(e,b),b.c=M(n,b),x.x=M(i,x),x.X=M(e,x),x.c=M(n,x),{format:function(t){var n=M(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=C(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=C(t+="",!0);return n.toString=function(){return t},n}}}Ie.range;var Ye,Xe,Ge,Ue={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Ze=/^%/,Ke=/[\\^$*+?|[\]().{}]/g;function Je(t,n,i){var e=t<0?"-":"",r=(e?-t:t)+"",o=r.length;return e+(o<i?new Array(i-o+1).join(n)+r:r)}function Qe(t){return t.replace(Ke,"\\$&")}function tr(t){return new RegExp("^(?:"+t.map(Qe).join("|")+")","i")}function nr(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function ir(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.w=+e[0],i+e[0].length):-1}function er(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.u=+e[0],i+e[0].length):-1}function rr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.U=+e[0],i+e[0].length):-1}function or(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.V=+e[0],i+e[0].length):-1}function ur(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.W=+e[0],i+e[0].length):-1}function ar(t,n,i){var e=qe.exec(n.slice(i,i+4));return e?(t.y=+e[0],i+e[0].length):-1}function lr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.y=+e[0]+(+e[0]>68?1900:2e3),i+e[0].length):-1}function sr(t,n,i){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return e?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),i+e[0].length):-1}function cr(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.q=3*e[0]-3,i+e[0].length):-1}function dr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.m=e[0]-1,i+e[0].length):-1}function fr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.d=+e[0],i+e[0].length):-1}function vr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.m=0,t.d=+e[0],i+e[0].length):-1}function hr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.H=+e[0],i+e[0].length):-1}function pr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.M=+e[0],i+e[0].length):-1}function gr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.S=+e[0],i+e[0].length):-1}function yr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.L=+e[0],i+e[0].length):-1}function mr(t,n,i){var e=qe.exec(n.slice(i,i+6));return e?(t.L=Math.floor(e[0]/1e3),i+e[0].length):-1}function br(t,n,i){var e=Ze.exec(n.slice(i,i+1));return e?i+e[0].length:-1}function xr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.Q=+e[0],i+e[0].length):-1}function wr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.s=+e[0],i+e[0].length):-1}function Mr(t,n){return Je(t.getDate(),n,2)}function Cr(t,n){return Je(t.getHours(),n,2)}function kr(t,n){return Je(t.getHours()%12||12,n,2)}function Ar(t,n){return Je(1+Pe.count(He(t),t),n,3)}function Sr(t,n){return Je(t.getMilliseconds(),n,3)}function Lr(t,n){return Sr(t,n)+"000"}function Vr(t,n){return Je(t.getMonth()+1,n,2)}function Dr(t,n){return Je(t.getMinutes(),n,2)}function Nr(t,n){return Je(t.getSeconds(),n,2)}function Or(t){var n=t.getDay();return 0===n?7:n}function Tr(t,n){return Je(Ve.count(He(t)-1,t),n,2)}function Er(t){var n=t.getDay();return n>=4||0===n?Te(t):Te.ceil(t)}function Fr(t,n){return t=Er(t),Je(Te.count(He(t),t)+(4===He(t).getDay()),n,2)}function Br(t){return t.getDay()}function Pr(t,n){return Je(De.count(He(t)-1,t),n,2)}function _r(t,n){return Je(t.getFullYear()%100,n,2)}function Hr(t,n){return Je((t=Er(t)).getFullYear()%100,n,2)}function Ir(t,n){return Je(t.getFullYear()%1e4,n,4)}function Wr(t,n){var i=t.getDay();return Je((t=i>=4||0===i?Te(t):Te.ceil(t)).getFullYear()%1e4,n,4)}function Rr(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Je(n/60|0,"0",2)+Je(n%60,"0",2)}function zr(t,n){return Je(t.getUTCDate(),n,2)}function jr(t,n){return Je(t.getUTCHours(),n,2)}function $r(t,n){return Je(t.getUTCHours()%12||12,n,2)}function Yr(t,n){return Je(1+Se.count(We(t),t),n,3)}function Xr(t,n){return Je(t.getUTCMilliseconds(),n,3)}function Gr(t,n){return Xr(t,n)+"000"}function Ur(t,n){return Je(t.getUTCMonth()+1,n,2)}function qr(t,n){return Je(t.getUTCMinutes(),n,2)}function Zr(t,n){return Je(t.getUTCSeconds(),n,2)}function Kr(t){var n=t.getUTCDay();return 0===n?7:n}function Jr(t,n){return Je(me.count(We(t)-1,t),n,2)}function Qr(t){var n=t.getUTCDay();return n>=4||0===n?Me(t):Me.ceil(t)}function to(t,n){return t=Qr(t),Je(Me.count(We(t),t)+(4===We(t).getUTCDay()),n,2)}function no(t){return t.getUTCDay()}function io(t,n){return Je(be.count(We(t)-1,t),n,2)}function eo(t,n){return Je(t.getUTCFullYear()%100,n,2)}function ro(t,n){return Je((t=Qr(t)).getUTCFullYear()%100,n,2)}function oo(t,n){return Je(t.getUTCFullYear()%1e4,n,4)}function uo(t,n){var i=t.getUTCDay();return Je((t=i>=4||0===i?Me(t):Me.ceil(t)).getUTCFullYear()%1e4,n,4)}function ao(){return"+0000"}function lo(){return"%"}function so(t){return+t}function co(t){return Math.floor(+t/1e3)}Ye=$e({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"]}),Xe=Ye.format,Ye.parse,Ge=Ye.utcFormat,Ye.utcParse;const fo=wi(pi),vo=fo.right;fo.left,wi((function(t){return null===t?NaN:+t})).center;var ho=vo;function po(t,n,i){t.prototype=n.prototype=i,i.constructor=t}function go(t,n){var i=Object.create(t.prototype);for(var e in n)i[e]=n[e];return i}function yo(){}var mo=.7,bo=1/mo,xo="\\s*([+-]?\\d+)\\s*",wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Co=/^#([0-9a-f]{3,8})$/,ko=new RegExp(`^rgb\\(${xo},${xo},${xo}\\)$`),Ao=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),So=new RegExp(`^rgba\\(${xo},${xo},${xo},${wo}\\)$`),Lo=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${wo}\\)$`),Vo=new RegExp(`^hsl\\(${wo},${Mo},${Mo}\\)$`),Do=new RegExp(`^hsla\\(${wo},${Mo},${Mo},${wo}\\)$`),No={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 Oo(){return this.rgb().formatHex()}function To(){return this.rgb().formatRgb()}function Eo(t){var n,i;return t=(t+"").trim().toLowerCase(),(n=Co.exec(t))?(i=n[1].length,n=parseInt(n[1],16),6===i?Fo(n):3===i?new _o(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?Bo(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?Bo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=ko.exec(t))?new _o(n[1],n[2],n[3],1):(n=Ao.exec(t))?new _o(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=So.exec(t))?Bo(n[1],n[2],n[3],n[4]):(n=Lo.exec(t))?Bo(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Vo.exec(t))?jo(n[1],n[2]/100,n[3]/100,1):(n=Do.exec(t))?jo(n[1],n[2]/100,n[3]/100,n[4]):No.hasOwnProperty(t)?Fo(No[t]):"transparent"===t?new _o(NaN,NaN,NaN,0):null}function Fo(t){return new _o(t>>16&255,t>>8&255,255&t,1)}function Bo(t,n,i,e){return e<=0&&(t=n=i=NaN),new _o(t,n,i,e)}function Po(t,n,i,e){return 1===arguments.length?((r=t)instanceof yo||(r=Eo(r)),r?new _o((r=r.rgb()).r,r.g,r.b,r.opacity):new _o):new _o(t,n,i,null==e?1:e);var r}function _o(t,n,i,e){this.r=+t,this.g=+n,this.b=+i,this.opacity=+e}function Ho(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}`}function Io(){const t=Wo(this.opacity);return`${1===t?"rgb(":"rgba("}${Ro(this.r)}, ${Ro(this.g)}, ${Ro(this.b)}${1===t?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zo(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function jo(t,n,i,e){return e<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new Yo(t,n,i,e)}function $o(t){if(t instanceof Yo)return new Yo(t.h,t.s,t.l,t.opacity);if(t instanceof yo||(t=Eo(t)),!t)return new Yo;if(t instanceof Yo)return t;var n=(t=t.rgb()).r/255,i=t.g/255,e=t.b/255,r=Math.min(n,i,e),o=Math.max(n,i,e),u=NaN,a=o-r,l=(o+r)/2;return a?(u=n===o?(i-e)/a+6*(i<e):i===o?(e-n)/a+2:(n-i)/a+4,a/=l<.5?o+r:2-o-r,u*=60):a=l>0&&l<1?0:u,new Yo(u,a,l,t.opacity)}function Yo(t,n,i,e){this.h=+t,this.s=+n,this.l=+i,this.opacity=+e}function Xo(t){return(t=(t||0)%360)<0?t+360:t}function Go(t){return Math.max(0,Math.min(1,t||0))}function Uo(t,n,i){return 255*(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)}function qo(t,n,i,e,r){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*i+(1+3*t+3*o-3*u)*e+u*r)/6}po(yo,Eo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Oo,formatHex:Oo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $o(this).formatHsl()},formatRgb:To,toString:To}),po(_o,Po,go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _o(Ro(this.r),Ro(this.g),Ro(this.b),Wo(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:Ho,formatHex:Ho,formatHex8:function(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}${zo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Io,toString:Io})),po(Yo,(function(t,n,i,e){return 1===arguments.length?$o(t):new Yo(t,n,i,null==e?1:e)}),go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,e=i+(i<.5?i:1-i)*n,r=2*i-e;return new _o(Uo(t>=240?t-240:t+120,r,e),Uo(t,r,e),Uo(t<120?t+240:t-120,r,e),this.opacity)},clamp(){return new Yo(Xo(this.h),Go(this.s),Go(this.l),Wo(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 t=Wo(this.opacity);return`${1===t?"hsl(":"hsla("}${Xo(this.h)}, ${100*Go(this.s)}%, ${100*Go(this.l)}%${1===t?")":`, ${t})`}`}}));var Zo=t=>()=>t;function Ko(t,n){var i=n-t;return i?function(t,n){return function(i){return t+i*n}}(t,i):Zo(isNaN(t)?n:t)}var Jo=function t(n){var i=function(t){return 1===(t=+t)?Ko:function(n,i){return i-n?function(t,n,i){return t=Math.pow(t,i),n=Math.pow(n,i)-t,i=1/i,function(e){return Math.pow(t+e*n,i)}}(n,i,t):Zo(isNaN(n)?i:n)}}(n);function e(t,n){var e=i((t=Po(t)).r,(n=Po(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),u=Ko(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}return e.gamma=t,e}(1);function Qo(t){return function(n){var i,e,r=n.length,o=new Array(r),u=new Array(r),a=new Array(r);for(i=0;i<r;++i)e=Po(n[i]),o[i]=e.r||0,u[i]=e.g||0,a[i]=e.b||0;return o=t(o),u=t(u),a=t(a),e.opacity=1,function(t){return e.r=o(t),e.g=u(t),e.b=a(t),e+""}}}function tu(t,n){var i,e=n?n.length:0,r=t?Math.min(e,t.length):0,o=new Array(r),u=new Array(e);for(i=0;i<r;++i)o[i]=lu(t[i],n[i]);for(;i<e;++i)u[i]=n[i];return function(t){for(i=0;i<r;++i)u[i]=o[i](t);return u}}function nu(t,n){var i=new Date;return t=+t,n=+n,function(e){return i.setTime(t*(1-e)+n*e),i}}function iu(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}function eu(t,n){var i,e={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)i in t?e[i]=lu(t[i],n[i]):r[i]=n[i];return function(t){for(i in e)r[i]=e[i](t);return r}}Qo((function(t){var n=t.length-1;return function(i){var e=i<=0?i=0:i>=1?(i=1,n-1):Math.floor(i*n),r=t[e],o=t[e+1],u=e>0?t[e-1]:2*r-o,a=e<n-1?t[e+2]:2*o-r;return qo((i-e/n)*n,u,r,o,a)}})),Qo((function(t){var n=t.length;return function(i){var e=Math.floor(((i%=1)<0?++i:i)*n),r=t[(e+n-1)%n],o=t[e%n],u=t[(e+1)%n],a=t[(e+2)%n];return qo((i-e/n)*n,r,o,u,a)}}));var ru=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ou=new RegExp(ru.source,"g");function uu(t,n){var i,e,r,o=ru.lastIndex=ou.lastIndex=0,u=-1,a=[],l=[];for(t+="",n+="";(i=ru.exec(t))&&(e=ou.exec(n));)(r=e.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(i=i[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:iu(i,e)})),o=ou.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var i,e=0;e<n;++e)a[(i=l[e]).i]=i.x(t);return a.join("")})}function au(t,n){n||(n=[]);var i,e=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function lu(t,n){var i,e,r=typeof n;return null==n||"boolean"===r?Zo(n):("number"===r?iu:"string"===r?(i=Eo(n))?(n=i,Jo):uu:n instanceof Eo?Jo:n instanceof Date?nu:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?tu:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?eu:iu:au))(t,n)}function su(t,n){return t=+t,n=+n,function(i){return Math.round(t*(1-i)+n*i)}}function cu(t){return+t}var du=[0,1];function fu(t){return t}function vu(t,n){return(n-=t=+t)?function(i){return(i-t)/n}:(i=isNaN(n)?NaN:.5,function(){return i});var i}function hu(t,n,i){var e=t[0],r=t[1],o=n[0],u=n[1];return r<e?(e=vu(r,e),o=i(u,o)):(e=vu(e,r),o=i(o,u)),function(t){return o(e(t))}}function pu(t,n,i){var e=Math.min(t.length,n.length)-1,r=new Array(e),o=new Array(e),u=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<e;)r[u]=vu(t[u],t[u+1]),o[u]=i(n[u],n[u+1]);return function(n){var i=ho(t,n,1,e)-1;return o[i](r[i](n))}}function gu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function yu(){var t,n,i,e,r,o,u=du,a=du,l=lu,s=fu;function c(){var t,n,i,l=Math.min(u.length,a.length);return s!==fu&&(t=u[0],n=u[l-1],t>n&&(i=t,t=n,n=i),s=function(i){return Math.max(t,Math.min(n,i))}),e=l>2?pu:hu,r=o=null,d}function d(n){return null==n||isNaN(n=+n)?i:(r||(r=e(u.map(t),a,l)))(t(s(n)))}return d.invert=function(i){return s(n((o||(o=e(a,u.map(t),iu)))(i)))},d.domain=function(t){return arguments.length?(u=Array.from(t,cu),c()):u.slice()},d.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},d.rangeRound=function(t){return a=Array.from(t),l=su,c()},d.clamp=function(t){return arguments.length?(s=!!t||fu,c()):s!==fu},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(i=t,d):i},function(i,e){return t=i,n=e,c()}}function mu(){return yu()(fu,fu)}function bu(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function xu(t,n){var i,e=0,r=(t=t.slice()).length-1,o=t[e],u=t[r];return u<o&&(i=e,e=r,r=i,i=o,o=u,u=i),t[e]=n.floor(o),t[r]=n.ceil(u),t}function wu(t){return new Date(t)}function Mu(t){return t instanceof Date?+t:+new Date(+t)}function Cu(t,n,i,e,r,o,u,a,l,s){var c=mu(),d=c.invert,f=c.domain,v=s(".%L"),h=s(":%S"),p=s("%I:%M"),g=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(l(t)<t?v:a(t)<t?h:u(t)<t?p:o(t)<t?g:e(t)<t?r(t)<t?y:m:i(t)<t?b:x)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?f(Array.from(t,Mu)):f().map(wu)},c.ticks=function(n){var i=f();return t(i[0],i[i.length-1],null==n?10:n)},c.tickFormat=function(t,n){return null==n?w:s(n)},c.nice=function(t){var i=f();return t&&"function"==typeof t.range||(t=n(i[0],i[i.length-1],null==t?10:t)),t?f(xu(i,t)):c},c.copy=function(){return gu(c,Cu(t,n,i,e,r,o,u,a,l,s))},c}function ku(){return bu.apply(Cu(ce,de,oe,ee,zi,Hi,Pi,Fi,Ei,Xe).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Au(){return bu.apply(Cu(le,se,ue,re,Zi,Ii,_i,Bi,Ei,Ge).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Su(t,n,i){t=+t,n=+n,i=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+i;for(var e=-1,r=0|Math.max(0,Math.ceil((n-t)/i)),o=new Array(r);++e<r;)o[e]=t+e*i;return o}class Lu extends Map{constructor(t,n=Du){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Vu(this,t))}has(t){return super.has(Vu(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):(t.set(e,i),i)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)&&(i=t.get(i),t.delete(e)),i}(this,t))}}function Vu({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):i}function Du(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Nu=Symbol("implicit");function Ou(){var t=new Lu,n=[],i=[],e=Nu;function r(r){let o=t.get(r);if(void 0===o){if(e!==Nu)return e;t.set(r,o=n.push(r)-1)}return i[o%i.length]}return r.domain=function(i){if(!arguments.length)return n.slice();n=[],t=new Lu;for(const e of i)t.has(e)||t.set(e,n.push(e)-1);return r},r.range=function(t){return arguments.length?(i=Array.from(t),r):i.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Ou(n,i).unknown(e)},bu.apply(r,arguments),r}function Tu(){var t,n,i=Ou().unknown(void 0),e=i.domain,r=i.range,o=0,u=1,a=!1,l=0,s=0,c=.5;function d(){var i=e().length,d=u<o,f=d?u:o,v=d?o:u;t=(v-f)/Math.max(1,i-l+2*s),a&&(t=Math.floor(t)),f+=(v-f-t*(i-l))*c,n=t*(1-l),a&&(f=Math.round(f),n=Math.round(n));var h=Su(i).map((function(n){return f+t*n}));return r(d?h.reverse():h)}return delete i.unknown,i.domain=function(t){return arguments.length?(e(t),d()):e()},i.range=function(t){return arguments.length?([o,u]=t,o=+o,u=+u,d()):[o,u]},i.rangeRound=function(t){return[o,u]=t,o=+o,u=+u,a=!0,d()},i.bandwidth=function(){return n},i.step=function(){return t},i.round=function(t){return arguments.length?(a=!!t,d()):a},i.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),d()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},i.paddingOuter=function(t){return arguments.length?(s=+t,d()):s},i.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},i.copy=function(){return Tu(e(),[o,u]).round(a).paddingInner(l).paddingOuter(s).align(c)},bu.apply(d(),arguments)}var Eu,Fu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bu(t){if(!(n=Fu.exec(t)))throw new Error("invalid format: "+t);var n;return new Pu({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Pu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function _u(t,n){if((i=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var i,e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function Hu(t){return(t=_u(Math.abs(t)))?t[1]:NaN}function Iu(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Bu.prototype=Pu.prototype,Pu.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 Wu={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Iu(100*t,n),r:Iu,s:function(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1],o=r-(Eu=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+_u(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ru(t){return t}var zu,ju,$u,Yu=Array.prototype.map,Xu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gu(){var t=mu();return t.copy=function(){return gu(t,Gu())},bu.apply(t,arguments),function(t){var n=t.domain;return t.ticks=function(t){var i=n();return ai(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var e=n();return function(t,n,i,e){var r,o=si(t,n,i);switch((e=Bu(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3)))-Hu(Math.abs(t)))}(o,u))||(e.precision=r),$u(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Hu(n)-Hu(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Hu(Math.abs(t)))}(o))||(e.precision=r-2*("%"===e.type))}return ju(e)}(e[0],e[e.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var e,r,o=n(),u=0,a=o.length-1,l=o[u],s=o[a],c=10;for(s<l&&(r=l,l=s,s=r,r=u,u=a,a=r);c-- >0;){if((r=li(l,s,i))===e)return o[u]=l,o[a]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}e=r}return t},t}(t)}function Uu(t){return Math.log(t)}function qu(t){return Math.exp(t)}function Zu(t){return-Math.log(-t)}function Ku(t){return-Math.exp(-t)}function Ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Qu(t){return(n,i)=>-t(-n,i)}function ta(){const t=function(t){const n=t(Uu,qu),i=n.domain;let e,r,o=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),r=function(t){return 10===t?Ju:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),i()[0]<0?(e=Qu(e),r=Qu(r),t(Zu,Ku)):t(Uu,qu),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(i(t),u()):i()},n.ticks=t=>{const n=i();let u=n[0],a=n[n.length-1];const l=a<u;l&&([u,a]=[a,u]);let s,c,d=e(u),f=e(a);const v=null==t?10:+t;let h=[];if(!(o%1)&&f-d<v){if(d=Math.floor(d),f=Math.ceil(f),u>0){for(;d<=f;++d)for(s=1;s<o;++s)if(c=d<0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}}else for(;d<=f;++d)for(s=o-1;s>=1;--s)if(c=d>0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}2*h.length<v&&(h=ai(u,a,v))}else h=ai(d,f,Math.min(f-d,v)).map(r);return l?h.reverse():h},n.tickFormat=(t,i)=>{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=Bu(i)).precision||(i.trim=!0),i=ju(i)),t===1/0)return i;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*o<o-.5&&(n*=o),n<=u?i(t):""}},n.nice=()=>i(xu(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}(yu()).domain([1,10]);return t.copy=()=>gu(t,ta()).base(t.base()),bu.apply(t,arguments),t}function na(){}function ia(t){return null==t?na:function(){return this.querySelector(t)}}function ea(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ra(){return[]}function oa(t){return function(n){return n.matches(t)}}zu=function(t){var n,i,e=void 0===t.grouping||void 0===t.thousands?Ru:(n=Yu.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,o=[],u=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=n[u=(u+1)%n.length];return o.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Ru:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(Yu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Bu(t)).fill,i=t.align,d=t.sign,f=t.symbol,v=t.zero,h=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(p=!0,m="g"):Wu[m]||(void 0===g&&(g=12),y=!0,m="g"),(v||"0"===n&&"="===i)&&(v=!0,n="0",i="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?o:/[%p]/.test(m)?l:"",w=Wu[m],M=/[defgprs%]/.test(m);function C(t){var r,o,l,f=b,C=x;if("c"===m)C=w(t)+C,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),y&&(t=function(t){t:for(var n,i=t.length,e=1,r=-1;e<i;++e)switch(t[e]){case".":r=n=e;break;case"0":0===r&&(r=e),n=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,C=("s"===m?Xu[8+Eu/3]:"")+C+(k&&"("===d?")":""),M)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){C=(46===l?u+t.slice(r+1):t.slice(r))+C,t=t.slice(0,r);break}}p&&!v&&(t=e(t,1/0));var A=f.length+t.length+C.length,S=A<h?new Array(h-A+1).join(n):"";switch(p&&v&&(t=e(S+t,S.length?h-C.length:1/0),S=""),i){case"<":t=f+t+C+S;break;case"=":t=f+S+t+C;break;case"^":t=S.slice(0,A=S.length>>1)+f+t+C+S.slice(A);break;default:t=S+f+t+C}return a(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return t+""},C}return{format:d,formatPrefix:function(t,n){var i=d(((t=Bu(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3))),r=Math.pow(10,-e),o=Xu[8+e/3];return function(t){return i(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),ju=zu.format,$u=zu.formatPrefix;var ua=Array.prototype.find;function aa(){return this.firstElementChild}var la=Array.prototype.filter;function sa(){return Array.from(this.children)}function ca(t){return new Array(t.length)}function da(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function fa(t,n,i,e,r,o){for(var u,a=0,l=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],e[a]=u):i[a]=new da(t,o[a]);for(;a<l;++a)(u=n[a])&&(r[a]=u)}function va(t,n,i,e,r,o,u){var a,l,s,c=new Map,d=n.length,f=o.length,v=new Array(d);for(a=0;a<d;++a)(l=n[a])&&(v[a]=s=u.call(l,l.__data__,a,n)+"",c.has(s)?r[a]=l:c.set(s,l));for(a=0;a<f;++a)s=u.call(t,o[a],a,o)+"",(l=c.get(s))?(e[a]=l,l.__data__=o[a],c.delete(s)):i[a]=new da(t,o[a]);for(a=0;a<d;++a)(l=n[a])&&c.get(v[a])===l&&(r[a]=l)}function ha(t){return t.__data__}function pa(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ga(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}da.prototype={constructor:da,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var ya="http://www.w3.org/1999/xhtml",ma={svg:"http://www.w3.org/2000/svg",xhtml:ya,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ba(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),ma.hasOwnProperty(n)?{space:ma[n],local:t}:t}function xa(t){return function(){this.removeAttribute(t)}}function wa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ma(t,n){return function(){this.setAttribute(t,n)}}function Ca(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ka(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function Aa(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Sa(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function La(t){return function(){this.style.removeProperty(t)}}function Va(t,n,i){return function(){this.style.setProperty(t,n,i)}}function Da(t,n,i){return function(){var e=n.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function Na(t){return function(){delete this[t]}}function Oa(t,n){return function(){this[t]=n}}function Ta(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Ea(t){return t.trim().split(/^|\s+/)}function Fa(t){return t.classList||new Ba(t)}function Ba(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}function Pa(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.add(n[e])}function _a(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.remove(n[e])}function Ha(t){return function(){Pa(this,t)}}function Ia(t){return function(){_a(this,t)}}function Wa(t,n){return function(){(n.apply(this,arguments)?Pa:_a)(this,t)}}function Ra(){this.textContent=""}function za(t){return function(){this.textContent=t}}function ja(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function $a(){this.innerHTML=""}function Ya(t){return function(){this.innerHTML=t}}function Xa(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ga(){this.nextSibling&&this.parentNode.appendChild(this)}function Ua(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qa(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===ya&&n.documentElement.namespaceURI===ya?n.createElement(t):n.createElementNS(i,t)}}function Za(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ka(t){var n=ba(t);return(n.local?Za:qa)(n)}function Ja(){return null}function Qa(){var t=this.parentNode;t&&t.removeChild(this)}function tl(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function nl(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function il(t){return function(){var n=this.__on;if(n){for(var i,e=0,r=-1,o=n.length;e<o;++e)i=n[e],t.type&&i.type!==t.type||i.name!==t.name?n[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?n.length=r:delete this.__on}}}function el(t,n,i){return function(){var e,r=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(r)for(var u=0,a=r.length;u<a;++u)if((e=r[u]).type===t.type&&e.name===t.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=o,e.options=i),void(e.value=n);this.addEventListener(t.type,o,i),e={type:t.type,name:t.name,value:n,listener:o,options:i},r?r.push(e):this.__on=[e]}}function rl(t,n,i){var e=Sa(t),r=e.CustomEvent;"function"==typeof r?r=new r(n,i):(r=e.document.createEvent("Event"),i?(r.initEvent(n,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function ol(t,n){return function(){return rl(this,t,n)}}function ul(t,n){return function(){return rl(this,t,n.apply(this,arguments))}}Ba.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var al=[null];function ll(t,n){this._groups=t,this._parents=n}function sl(t){return"string"==typeof t?new ll([[document.querySelector(t)]],[document.documentElement]):new ll([[t]],al)}function cl(t){return"string"==typeof t?new ll([document.querySelectorAll(t)],[document.documentElement]):new ll([ea(t)],al)}function dl(t){var n=/[1-9]([0]+$)|\.([0-9]*)/.exec(String(t));return n?n[1]?-n[1].length:n[2]?n[2].length:0:0}function fl(t,n,i){void 0===i&&(i=10);var e=Math.pow(i,n);return Math.round(t*e)/e}function vl(t){this._context=t}function hl(t){return new vl(t)}function pl(t){this._context=t}function gl(t){var n,i,e=t.length-1,r=new Array(e),o=new Array(e),u=new Array(e);for(r[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<e-1;++n)r[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(r[e-1]=2,o[e-1]=7,u[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=r[n]/o[n-1],o[n]-=i,u[n]-=i*u[n-1];for(r[e-1]=u[e-1]/o[e-1],n=e-2;n>=0;--n)r[n]=(u[n]-r[n+1])/o[n];for(o[e-1]=(t[e]+r[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function yl(t){return new pl(t)}function ml(t,n){this._context=t,this._t=n}function bl(t){return new ml(t,.5)}function xl(t){return new ml(t,0)}function wl(t){return new ml(t,1)}function Ml(t){const n=(4-t.length%4)%4;return t+"=".repeat(n)}function Cl(t){if("undefined"!=typeof window&&"function"==typeof atob){const n=atob(t),i=n.length,e=new Uint8Array(i);for(let t=0;t<i;t++)e[t]=n.charCodeAt(t);return e}throw new Error("Base64 decoding is not supported in this environment.")}function kl(t,n){if(1===n.length)return t;if(2===n.length){const[i,e]=n,r=[];for(let n=0;n<i;n++)r.push(t.slice(n*e,(n+1)*e));return r}const[i,...e]=n,r=t.length/i,o=[];for(let n=0;n<i;n++)o.push(kl(t.slice(n*r,(n+1)*r),e));return o}function Al(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>Al(t)));if("bdata"in t&&"string"==typeof t.bdata&&function(t){if("string"!=typeof t)return!1;if(t.length%4!=0&&(t=Ml(t)),!/^[A-Za-z0-9+/]+={0,2}$/.test(t))return!1;try{return Cl(t),!0}catch{return!1}}(t.bdata)){const n=t.dtype||"utf-8",i=function(t,n){t=Ml(t);try{const i=Cl(t);switch(n){case"f8":return Array.from(new Float64Array(i.buffer));case"i8":case"i4":return Array.from(new Int32Array(i.buffer));case"u8":return Array.from(new Uint32Array(i.buffer));case"i2":return Array.from(new Int16Array(i.buffer));case"i1":return Array.from(new Int8Array(i.buffer));default:try{return i.toString()}catch(t){return i}}}catch(n){throw new Error(`Failed to decode base64 value: ${t}`)}}(t.bdata,n);let e=t.shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Il(t)||(t=void 0)}catch{const n=e.split(",").map((t=>Number(t.trim())));n.every((t=>!isNaN(t)))&&(t=n)}e=t}return e&&Il(e)?kl(i,e):i}const n={};for(const i of Object.keys(t))n[i]=Al(t[i]);return n}function Sl(t){return t.data=Al(t.data),t}ll.prototype=function(){return new ll([[document.documentElement]],al)}.prototype={constructor:ll,select:function(t){"function"!=typeof t&&(t=ia(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u,a=n[r],l=a.length,s=e[r]=new Array(l),c=0;c<l;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),s[c]=u);return new ll(e,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return ea(t.apply(this,arguments))}}(t):function(t){return null==t?ra:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,i=n.length,e=[],r=[],o=0;o<i;++o)for(var u,a=n[o],l=a.length,s=0;s<l;++s)(u=a[s])&&(e.push(t.call(u,u.__data__,s,a)),r.push(u));return new ll(e,r)},selectChild:function(t){return this.select(null==t?aa:function(t){return function(){return ua.call(this.children,t)}}("function"==typeof t?t:oa(t)))},selectChildren:function(t){return this.selectAll(null==t?sa:function(t){return function(){return la.call(this.children,t)}}("function"==typeof t?t:oa(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u=n[r],a=u.length,l=e[r]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&l.push(o);return new ll(e,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,ha);var i,e=n?va:fa,r=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var u=o.length,a=new Array(u),l=new Array(u),s=new Array(u),c=0;c<u;++c){var d=r[c],f=o[c],v=f.length,h=pa(t.call(d,d&&d.__data__,c,r)),p=h.length,g=l[c]=new Array(p),y=a[c]=new Array(p);e(d,f,g,y,s[c]=new Array(v),h,n);for(var m,b,x=0,w=0;x<p;++x)if(m=g[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<p;);m._next=b||null}}return(a=new ll(a,r))._enter=l,a._exit=s,a},enter:function(){return new ll(this._enter||this._groups.map(ca),this._parents)},exit:function(){return new ll(this._exit||this._groups.map(ca),this._parents)},join:function(t,n,i){var e=this.enter(),r=this,o=this.exit();return"function"==typeof t?(e=t(e))&&(e=e.selection()):e=e.append(t+""),null!=n&&(r=n(r))&&(r=r.selection()),null==i?o.remove():i(o),e&&r?e.merge(r).order():r},merge:function(t){for(var n=t.selection?t.selection():t,i=this._groups,e=n._groups,r=i.length,o=e.length,u=Math.min(r,o),a=new Array(r),l=0;l<u;++l)for(var s,c=i[l],d=e[l],f=c.length,v=a[l]=new Array(f),h=0;h<f;++h)(s=c[h]||d[h])&&(v[h]=s);for(;l<r;++l)a[l]=i[l];return new ll(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,i=t.length;++n<i;)for(var e,r=t[n],o=r.length-1,u=r[o];--o>=0;)(e=r[o])&&(u&&4^e.compareDocumentPosition(u)&&u.parentNode.insertBefore(e,u),u=e);return this},sort:function(t){function n(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=ga);for(var i=this._groups,e=i.length,r=new Array(e),o=0;o<e;++o){for(var u,a=i[o],l=a.length,s=r[o]=new Array(l),c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(n)}return new ll(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e=t[n],r=0,o=e.length;r<o;++r){var u=e[r];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,i=0,e=n.length;i<e;++i)for(var r,o=n[i],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var i=ba(t);if(arguments.length<2){var e=this.node();return i.local?e.getAttributeNS(i.space,i.local):e.getAttribute(i)}return this.each((null==n?i.local?wa:xa:"function"==typeof n?i.local?Aa:ka:i.local?Ca:Ma)(i,n))},style:function(t,n,i){return arguments.length>1?this.each((null==n?La:"function"==typeof n?Da:Va)(t,n,null==i?"":i)):function(t,n){return t.style.getPropertyValue(n)||Sa(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Na:"function"==typeof n?Ta:Oa)(t,n)):this.node()[t]},classed:function(t,n){var i=Ea(t+"");if(arguments.length<2){for(var e=Fa(this.node()),r=-1,o=i.length;++r<o;)if(!e.contains(i[r]))return!1;return!0}return this.each(("function"==typeof n?Wa:n?Ha:Ia)(i,n))},text:function(t){return arguments.length?this.each(null==t?Ra:("function"==typeof t?ja:za)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$a:("function"==typeof t?Xa:Ya)(t)):this.node().innerHTML},raise:function(){return this.each(Ga)},lower:function(){return this.each(Ua)},append:function(t){var n="function"==typeof t?t:Ka(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var i="function"==typeof t?t:Ka(t),e=null==n?Ja:"function"==typeof n?n:ia(n);return this.select((function(){return this.insertBefore(i.apply(this,arguments),e.apply(this,arguments)||null)}))},remove:function(){return this.each(Qa)},clone:function(t){return this.select(t?nl:tl)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,i){var e,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?el:il,e=0;e<u;++e)this.each(a(o[e],n,i));return this}var a=this.node().__on;if(a)for(var l,s=0,c=a.length;s<c;++s)for(e=0,l=a[s];e<u;++e)if((r=o[e]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ul:ol)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e,r=t[n],o=0,u=r.length;o<u;++o)(e=r[o])&&(yield e)}},vl.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=gl(t),r=gl(n),o=0,u=1;u<i;++o,++u)this._context.bezierCurveTo(e[0][o],r[0][o],e[1][o],r[1][o],t[u],n[u]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},ml.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const Ll="Unsupported chart - type :",Vl=t=>!isNaN(parseFloat(t))&&isFinite(t),Dl=t=>{if(Vl(t))return!1;const n=new Date(Date.parse(t));if(isNaN(n.getTime()))return!1;const i=n.getFullYear();return!!(/\b\d{4}\b/.test(t)||2e3!==i&&2001!==i)},Nl=(t,n,...i)=>!!Il(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),Ol=t=>Nl(t,(t=>Dl(t)||null===t)),Tl=t=>Nl(t,(t=>"string"==typeof t&&Vl(t)||"number"==typeof t||null===t)),El=t=>Nl(t,(t=>(t=>{if("string"!=typeof t)return!1;const n=new Date(`${t} 1, 2000`);if(isNaN(n.getTime()))return!1;const i=[void 0,"en-US"];for(const e of i){const i=n.toLocaleString(e,{month:"long"}),r=n.toLocaleString(e,{month:"short"});if(t.toLowerCase()===i.toLowerCase()||t.toLowerCase()===r.toLowerCase())return!0}return!1})(t)||null===t)),Fl=t=>Nl(t,(t=>(t=>{if(Vl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),Bl=t=>Nl(t,(t=>"string"==typeof t||null===t)),Pl=t=>Nl(t,(t=>"object"==typeof t&&null!==t&&!Il(t))),_l=t=>null==t||"number"==typeof t&&!isFinite(t),Hl=(t,n=0)=>{if(n>15)throw new Error("Maximum json depth exceeded");if("object"==typeof t&&null!==t)for(const i in t)t.hasOwnProperty(i)&&("string"==typeof t[i]?t[i]=t[i].replace(/</g,"&lt;").replace(/>/g,"&gt;"):t[i]=Hl(t[i],n+1));return t};function Il(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const Wl=t=>!!t&&(!Il(t)||t.length>0),Rl=(t,n)=>{if(!(t=>!(Array.isArray(t.x)&&t.x.length>0&&Array.isArray(t.x[0])||Array.isArray(t.y)&&t.y.length>0&&Array.isArray(t.y[0])))(t))throw new Error("Invalid 2D series encountered.");if(n&&!Tl(t.y))throw new Error("Non numeric Y values encountered.")},zl=t=>["markers","text+markers","markers+text","text"].includes(t),jl=(t,n)=>{var i,e,r;const o=null!==(i=t.mode)&&void 0!==i?i:"",u=t&&t.x&&t.x.length>0?typeof(null===(e=null==t?void 0:t.x)||void 0===e?void 0:e[0]):"undefined",a=t&&t.y&&t.y.length>0?typeof(null===(r=null==t?void 0:t.y)||void 0===r?void 0:r[0]):"undefined";if(!Tl(t.x)&&!Bl(t.x)&&!Ol(t.x))throw new Error(`${Ll} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Tl(t.y)&&!Bl(t.y))throw new Error(`${Ll} ${t.type}, mode: ${o}, yAxisType: ${a}`);const l=ql(t),s=Kl(t,n);if(l&&s)throw new Error(`${Ll} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&$l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported for AreaChart.`);if(s&&$l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported for VSBC fallback.`)},$l=(t,n)=>{const i=Gl(t);return Object.keys(i).some((t=>{var e;const r=Ul(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Yl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${Ll} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)},t=>Rl(t,!1)],bar:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)},t=>{(t=>{const n=t.x&&Il(t.x)&&0===t.x.length,i=t.y&&Il(t.y)&&0===t.y.length;if(n||i){let t="Bar chart: ";throw n&&i?t+="both x and y arrays are empty.":n?t+="x array is empty.":i&&(t+="y array is empty."),new Error(t)}if("h"===t.orientation){if(!Tl(t.x)&&!Ol(t.x))throw new Error(`${Ll} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!Xl(t)&&Ol(t.x))throw new Error(`${Ll} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);Rl(t,!1)}else if(!Tl(t.y)&&!Bl(t.y)&&!Pl(t.y))throw new Error("Non numeric, string, or object Y values encountered, type: "+typeof t.y)})(t)}],sankey:[t=>{if(function(t){var n,i,e,r;const o={};null===(i=null===(n=t.node)||void 0===n?void 0:n.label)||void 0===i||i.forEach(((t,n)=>o[n]=[])),null===(r=null===(e=t.link)||void 0===e?void 0:e.value)||void 0===r||r.forEach(((n,i)=>{var e,r,u,a;_l(n)||_l(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||_l(null===(a=null===(u=t.link)||void 0===u?void 0:u.target)||void 0===a?void 0:a[i])||o[t.link.source[i]].push(t.link.target[i])}));const u=new Set,a=new Set;function l(t,n){if(_l(t)||!o[t])return!1;if(a.has(t))return!0;if(!u.has(t)){u.add(t),a.add(t);for(const i of o[t])if(l(i,[...n,i]))return!0;return a.delete(t),!1}}for(let t=0;t<Object.keys(o).length;t++)if(l(t,[t]))return!0;return!1}(t))throw new Error(`${Ll} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>jl(t,n)],scattergl:[(t,n)=>jl(t,n)],scatterpolar:[t=>{if(!Tl(t.theta)&&!Bl(t.theta))throw new Error(`${Ll} ${t.type}, theta values must be array of numbers or strings`);if(!Tl(t.r))throw new Error(`${Ll} ${t.type}, Non numeric r values`)}],funnel:[t=>Rl(t,!1)],histogram2d:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)}]},Xl=t=>Ol(t.base)||Tl(t.base)||Dl(t.base)||Vl(t.base),Gl=t=>{let n=1;"string"==typeof t.xaxis&&/^x\d+$/.test(t.xaxis)&&(n=parseInt(t.xaxis.slice(1),10));let i=1;return"string"==typeof t.yaxis&&/^y\d+$/.test(t.yaxis)&&(i=parseInt(t.yaxis.slice(1),10)),{x:n,y:i}},Ul=(t,n)=>`${t}axis${n>1?n:""}`,ql=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Zl=(t,n)=>{var i;const e=Ol(t.x),r=Tl(t.x),o=Fl(t.x),u=El(t.x),a=Bl(t.y),l=Gl(t),s=Ul("x",l.x),c="category"===(null===(i=null==n?void 0:n[s])||void 0===i?void 0:i.type);return!(!(e||r||u)||o||a||c)},Kl=(t,n)=>{var i;return!zl(null!==(i=t.mode)&&void 0!==i?i:"")&&!Zl(t,n)},Jl=(t,n)=>{var i,e;if("none"===t.mode&&"toself"===t.fill){let n=!0;for(let i=0;i<t.x.length;i+=5)if(t.x[i]!==t.x[i+3]||t.x[i+1]!==t.x[i+2]||t.y[i]!==t.y[i+1]||t.y[i+2]!==t.y[i+3]||i>0&&null!==t.y[i-1]){n=!1;break}if(n)return!0}return!("markers"!==t.mode||1!==(null===(i=t.marker)||void 0===i?void 0:i.size)||0!==(null===(e=t.marker)||void 0===e?void 0:e.opacity)||""!==t.name||!1!==t.showlegend||!n)};var Ql,ts,ns,is,es={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.11",color12:"qualitative.12",color13:"qualitative.13",color14:"qualitative.14",color15:"qualitative.15",color16:"qualitative.16",color17:"qualitative.17",color18:"qualitative.18",color19:"qualitative.19",color20:"qualitative.20",color21:"qualitative.21",color22:"qualitative.22",color23:"qualitative.23",color24:"qualitative.24",color25:"qualitative.25",color26:"qualitative.26",color27:"qualitative.27",color28:"qualitative.28",color29:"qualitative.29",color30:"qualitative.30",color31:"qualitative.31",color32:"qualitative.32",color33:"qualitative.33",color34:"qualitative.34",color35:"qualitative.35",color36:"qualitative.36",color37:"qualitative.37",color38:"qualitative.38",color39:"qualitative.39",color40:"qualitative.40",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},rs={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],11:["#3c51b4","#93a4f4"],12:["#ad006a","#ee5fb7"],13:["#026467","#4cb4b7"],14:["#674c8c","#a083c9"],15:["#0e7a0b","#27ac22"],16:["#2c72a8","#4fa1e1"],17:["#9a3d0c","#d77440"],18:["#405f14","#73aa24"],19:["#863593","#c36bd1"],20:["#6d5700","#d0b232"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"],30:["#937700","#c19c00"],31:["#2c3c85","#c8d1fa"],32:["#7f004e","#f7adda"],33:["#02494c","#9bd9db"],34:["#4c3867","#b29ad4"],35:["#0b5a08","#a7e3a5"],36:["#20547c","#83bdeb"],37:["#712d09","#df8e64"],38:["#23330b","#a4cc6c"],39:["#63276d","#cf87da"],40:["#3a2f00","#dac157"]},os={qualitative:rs,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},us=Object.values(rs),as=Object.values(es),ls=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},ss=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=us[(t+n)%us.length];return ls(e,i)},cs=function(t,n){if(void 0===n&&(n=!1),as.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=os[e][r];return ls(o,n)}return t},ds=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},fs=function(t){var n=t.r,i=t.g,e=t.b;return{r:ds(n/255),g:ds(i/255),b:ds(e/255)}},vs=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},hs=function(t,n){var i=vs(fs(Po(t))),e=vs(fs(Po(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)},ps="2000-01-01",gs="fui-cart__xAxis",ys=".".concat(gs," text");function ms(t,n){void 0===n&&(n=!1);var i=$u(".2~",t);Math.abs(t)<1?i=ju(".2~g"):n&&Math.abs(t)>=1e3&&(i=$u(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function bs(t){return ms(t)}function xs(t,n,i,e,r){var o=t.domainNRangeValues,u=t.showRoundOffXTickValues,a=void 0===u||u,l=t.xAxistickSize,s=void 0===l?6:l,c=t.tickPadding,d=void 0===c?10:c,f=t.xAxisCount,v=t.xAxisElement,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=t.tickText,b=o.dStartValue,x=o.dEndValue,w=void 0!==t.xMinValue?Math.min(b,t.xMinValue):b,M=void 0!==t.xMaxValue?Math.max(x,t.xMaxValue):x,C=fc(r).domain([w,M]).range([o.rStartValue,o.rEndValue]);a&&C.nice();var k=null!=f?f:6,A=function(t,i,r){if(n.tickValues&&m&&void 0!==m[i])return m[i];if(n.tickFormat)return ju(n.tickFormat)(t);var o="number"==typeof t?t:t.valueOf();return""===(null==r?void 0:r(o))?"":(0,Yn.c$)(o,e)};if(h){var S=p(C.ticks().map((function(t,n){return A(t,n)})))+20,L=C.range(),V=L[0],D=L[1];k=Math.min(Math.max(1,Math.floor(Math.abs(D-V)/S)),10)}var N,O=ni(C).tickSize(s).tickPadding(d).ticks(k).tickFormat((function(t,n){return A(t,n,C.tickFormat(k))}));[ts.HorizontalBarChartWithAxis,ts.GanttChart].includes(i)&&O.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?N=n.tickValues:g&&(N=bc(r,g,y,C.domain())),N&&O.tickValues(N),v&&sl(v).call(O).selectAll("text").attr("aria-hidden","true");var T=null!=N?N:C.ticks(k);return{xScale:C,tickValues:T,tickLabels:T.map(O.tickFormat())}}function ws(t,n){var i,e=Ei,r=n?Bi:Fi,o=n?_i:Pi,u=n?Ii:Hi,a=n?re:ee,l=n?Zi:zi,s=n?ue:oe,c=[{formatLevel:0,condition:function(t){return e(t)<t}},{formatLevel:1,condition:function(t){return r(t)<t}},{formatLevel:2,condition:function(t){return o(t)<t}},{formatLevel:3,condition:function(t){return u(t)<t}},{formatLevel:4,condition:function(t){return a(t)<t&&l(t)<t}},{formatLevel:5,condition:function(t){return a(t)<t}},{formatLevel:6,condition:function(t){return s(t)<t}},{formatLevel:7,condition:function(){return!0}}].find((function(n){return(0,n.condition)(t)}));return null!==(i=null==c?void 0:c.formatLevel)&&void 0!==i?i:7}function Ms(t,n,i){var e,r,o=t.yMinMaxValues,u=void 0===o?{startValue:0,endValue:0}:o,a=t.yAxisElement,l=void 0===a?null:a,s=t.yMaxValue,c=void 0===s?0:s,d=t.yMinValue,f=void 0===d?0:d,v=t.containerHeight,h=t.margins,p=t.tickPadding,g=void 0===p?12:p,y=t.maxOfYVal,m=void 0===y?0:y,b=t.yAxisTickFormat,x=t.yAxisTickCount,w=void 0===x?4:x,M=t.tickValues,C=t.tickStep,k=t.tick0,A=t.tickText,S=m||u.endValue,L=S>c?S:c,V=u.startValue<f?Math.min(0,u.startValue):f,D=Gu().domain([V,L]).range([v-h.bottom,h.top]),N=(n?ti(D):ii(D)).tickPadding(g).ticks(w);return N.tickFormat((function(t,n){return M&&A&&void 0!==A[n]?A[n]:"function"==typeof b?b(t,n):"string"==typeof b?ju(b)(t):bs("number"==typeof t?t:t.valueOf())})),M?r=M:C&&(r=bc(void 0,C,k,D.domain())),r&&N.tickValues(r),l&&sl(l).call(N).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=D.domain(),i.yAxisTickText=(null!==(e=N.tickValues())&&void 0!==e?e:D.ticks(w)).map(N.tickFormat()),D}function Cs(t,n,i,e,r,o,u,a){var l;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var s=t.yMinMaxValues,c=void 0===s?{startValue:0,endValue:0}:s,d=t.yAxisElement,f=void 0===d?null:d,v=t.yMaxValue,h=void 0===v?0:v,p=t.yMinValue,g=void 0===p?0:p,y=t.containerHeight,m=t.containerWidth,b=t.margins,x=t.tickPadding,w=void 0===x?12:x,M=t.maxOfYVal,C=void 0===M?0:M,k=t.yAxisTickFormat,A=t.yAxisTickCount,S=void 0===A?4:A,L=t.eventAnnotationProps,V=t.eventLabelHeight,D=t.tickValues,N=t.tickStep,O=t.tick0,T=t.tickText,E=C||c.endValue||0,F=E>h?E:h,B=o?Math.min(c.startValue||0,g||0):c.startValue<g?0:g,P=function(t,n,i,e,r){if(r)return function(t,n,i){var e,r,o=t<0&&t===n?0:n,u=ci(t>=0&&t===n?0:t,o,i),a=ai(u[0],u[u.length-1],i);return a[a.length-1]>o&&(e=o,r=(0,Yn.Di)(e),Math.log10(r)%1==0)&&a.pop(),a}(n,t,i);var o=e||(t-n)/i>=1?Math.ceil((t-n)/i):(t-n)/i,u=[n<0&&t>=0?0:n];if(u[0]===n&&u.push(n+o),n<0&&t>=0){for(;u[u.length-1]>n;)u.push(u[u.length-1]-o);u.reverse()}for(;u[u.length-1]<t;)u.push(u[u.length-1]+o);return u}(F,B,S,e,u),_=[o?P[0]:B,P[P.length-1]];if("log"===a){var H=c.startValue,I=c.endValue;g>0&&(H=Math.min(H,g)),h>0&&(I=Math.max(I,h)),_=[H,I]}var W,R=fc(a).domain(_).range([y-b.bottom,b.top+(L?V:0)]),z=(!n&&r||n&&!r?ti(R):ii(R)).tickPadding(w).tickSizeInner(-(m-b.left-b.right));return D?W=D:N&&(W=bc(a,N,O,R.domain())),W?z.tickValues(W):"log"!==a&&z.tickValues(P),z.tickFormat((function(t,n){return function(t,n,i){if(D&&T&&void 0!==T[n])return T[n];if("function"==typeof k)return k(t,n);if("string"==typeof k)return ju(k)(t);var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":bs(e)}(t,n,R.tickFormat(S))})),f&&sl(f).call(z).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=R.domain(),i.yAxisTickText=(null!==(l=z.tickValues())&&void 0!==l?l:R.ticks(S)).map(z.tickFormat()),R}!function(t){t[t.AreaChart=0]="AreaChart",t[t.LineChart=1]="LineChart",t[t.VerticalBarChart=2]="VerticalBarChart",t[t.VerticalStackedBarChart=3]="VerticalStackedBarChart",t[t.GroupedVerticalBarChart=4]="GroupedVerticalBarChart",t[t.HeatMapChart=5]="HeatMapChart",t[t.HorizontalBarChartWithAxis=6]="HorizontalBarChartWithAxis",t[t.ScatterChart=7]="ScatterChart",t[t.GanttChart=8]="GanttChart"}(ts||(ts={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(ns||(ns={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(is||(is={}));var ks=function(t,n,i,e,r){var o,u=t.containerHeight,a=t.tickPadding,l=void 0===a?12:a,s=t.margins,c=t.yAxisTickFormat,d=t.yAxisElement,f=t.yAxisPadding,v=t.tickValues,h=t.tickText,p=null!=f?f:.5;p=1===p?.99:p;var g=Tu().domain(n).range([u-s.bottom,s.top]).padding(p),y=i?ti(g):ii(g),m=null!==(o=v)&&void 0!==o?o:n,b=y.tickPadding(l).tickValues(m).tickFormat((function(t,n){return v&&h&&void 0!==h[n]?h[n]:"function"==typeof c?c(t,n):t}));return d&&sl(d).call(b).selectAll("text"),e.yAxisTickText=b.tickValues().map(b.tickFormat()),g},As=function(t,n,i,e,r,o){var u,a=t.containerHeight,l=t.tickPadding,s=void 0===l?12:l,c=t.margins,d=t.yAxisTickFormat,f=t.yAxisElement,v=t.yAxisPadding,h=void 0===v?0:v,p=t.containerWidth,g=t.tickValues,y=t.tickText,m=Tu().domain(n).range([a-c.bottom,c.top]).padding(h);o===ts.VerticalStackedBarChart&&m.paddingInner(1).paddingOuter(0);var b=i?ti(m):ii(m),x=null!==(u=g)&&void 0!==u?u:n,w=b.tickPadding(s).tickValues(x).tickFormat((function(t,n){return g&&y&&void 0!==y[n]?y[n]:"function"==typeof d?d(t,n):t})).tickSize(0);return o===ts.VerticalStackedBarChart&&b.tickSizeInner(-(p-c.left-c.right)),f&&sl(f).call(w).selectAll("text"),e.yAxisTickText=w.tickValues().map(w.tickFormat()),m};function Ss(t){var n=[];t.forEach((function(t){var i=t.data.filter((function(t){return!t.hideCallout})).map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,index:t.index})}));n=n.concat(i)}));var i={};return n.forEach((function(t){var n=t.x instanceof Date?t.x.getTime():t.x;n in i?i[n].push({legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}):i[n]=[{legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}]})),i}function Ls(t){var n,i,e=t.node,r=t.xAxis,o=t.noOfCharsToTruncate,u=t.showXAxisLablesTooltip,a=t.width,l=void 0===a?10:a,s=t.container;if(null!==e){var c=sl(e).call(r),d=0,f=1;if(c.selectAll(".tick text").each((function(t,n){var i=sl(this),e=i.text(),r="".concat(i.text().slice(0,o),"..."),a=i.text().length,c=i.text().split(/\s+/).reverse(),d="",v=[],h=0,p=i.attr("y"),g=parseFloat(i.attr("dy")),y=i.text(null).attr("data-full",e).append("tspan").attr("x",0).attr("y",p).attr("dy",g+"em");if(u)y.text(a>o?r:e);else for(var m=Array.isArray(l)?l[n]:l;d=c.pop();){v.push(d);var b=v.join(" ");y.text(b),oc(b,ys,s).width>m&&v.length>1&&(v.pop(),y.text(v.join(" ")),v=[d],y=i.append("tspan").attr("x",0).attr("y",p).attr("dy",1.1*++h+g+"em").text(d))}f=Math.max(f,h+1)})),!u){var v=12,h=null!==(i=null===(n=(null!=s?s:document).querySelector(".".concat(gs," tspan")))||void 0===n?void 0:n.getBoundingClientRect().height)&&void 0!==i?i:0;h>v&&(v=h),d=(f-1)*v}return d>0?d:0}}var Vs=function(t,n,i){var e=sl("#".concat(n));e.text(t);var r=e.node();if(!r||"function"!=typeof r.getComputedTextLength)return!1;for(var o=!1,u=r.getComputedTextLength();u>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),o=!0,u=r.getComputedTextLength();return o},Ds=function(t,n){void 0===n&&(n="none");var i=0,e=document.createElement("canvas").getContext("2d");if(e){var r=document.querySelector(n);if(r){var o=window.getComputedStyle(r,null),u=o.getPropertyValue("font-weight"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family");e.font="".concat(u," ").concat(a," ").concat(l)}else e.font='600 10px "Segoe UI"';t.forEach((function(t){i=Math.max(e.measureText(t.toString()).width,i)}))}return i};function Ns(t){var n=t.tooltipCls,i=t.axis,e=t.id,r=t.container;if(null===i)return null;var o=sl(r||"body").append("div").attr("id",e).attr("class",n).style("opacity",0);i.selectAll(".tick text").each((function(){var t=sl(this),n=t.attr("data-full");if(t.text()!==n){var i=this;t.on("mouseover",(function(t,e){var u,a=null==r?void 0:r.getBoundingClientRect(),l=i.getBoundingClientRect(),s=a?a.bottom-(l.top-4):l.top-4,c=(l.left+l.right)/2-(null!==(u=null==a?void 0:a.left)&&void 0!==u?u:0);o.text(n).style("bottom","".concat(s,"px")).style("left","".concat(c,"px")).style("transform","translateX(-50%)").style("opacity",.9)})).on("mouseout",(function(t){o.style("opacity",0)}))}}))}function Os(t){var n=!1;return t&&t.length>0&&t.forEach((function(t){t.data.length>0&&(n=t.data[0].x instanceof Date)})),n}function Ts(t,n,i,e,r,o,u,a){var l=cc(t),s=gc(t,r),c=s[0],d=s[1];if(o){var f=vc(c,d,r,u,a);c-=f.start,d+=f.end}var v=n.left,h=i-n.right;return e?{dStartValue:l?1:d,dEndValue:l?-1:c,rStartValue:v,rEndValue:h}:{dStartValue:l?-1:c,dEndValue:l?1:d,rStartValue:v,rEndValue:h}}function Es(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function Fs(t,n){var i=0,e=0;return t.forEach((function(t){var r=t.reduce((function(t,n){return t+(n.x>0?n.x:0)}),n),o=t.reduce((function(t,n){return t+(n.x<0?n.x:0)}),n);i=Math.max(i,r),e=Math.min(e,o)})),{longestPositiveBar:i,longestNegativeBar:e}}function Bs(t,n,i){var e=t.left,r=n-t.right;return i?{dStartValue:0,dEndValue:0,rStartValue:r,rEndValue:e}:{dStartValue:0,dEndValue:0,rStartValue:e,rEndValue:r}}function Ps(t,n,i,e,r,u,a,l){var s,c,d;if(void 0===r&&(r=[]),[ts.AreaChart,ts.LineChart,ts.ScatterChart].includes(u)){if(c=(s=gc(t))[0],d=s[1],c=di((0,o.fX)((0,o.fX)([],r,!0),[c],!1)),d=fi((0,o.fX)((0,o.fX)([],r,!0),[d],!1)),l||u===ts.ScatterChart){var f=vc(c.getTime(),d.getTime());c=new Date(c.getTime()-f.start),d=new Date(d.getTime()+f.end)}}else c=di(t,(function(t){return t.x})),d=fi(t,(function(t){return t.x}));var v=n.left,h=i-n.right;return e?{dStartValue:d,dEndValue:c,rStartValue:v,rEndValue:h}:{dStartValue:c,dEndValue:d,rStartValue:v,rEndValue:h}}function _s(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){hc(t.y,e)&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}}function Hs(t,n,i){var e=[];return t.forEach((function(t){i||e.push(t.y),void 0!==t.lineData&&!i==!t.lineData.useSecondaryYScale&&e.push(t.lineData.y)})),{startValue:di(e),endValue:fi(e)}}function Is(t,n){if(void 0!==n&&n===is.NumericAxis){var i=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:i}}return{startValue:0,endValue:0}}var Ws,Rs,zs=function(t,n){if(n)switch(typeof t){case"string":return ns.StringAxis;case"number":return ns.NumericAxis;default:return ns.DateAxis}else switch(typeof t){case"string":return is.StringAxis;case"number":return is.NumericAxis;default:return is.DateAxis}};!function(t){t[t.circle=0]="circle",t[t.square=1]="square",t[t.triangle=2]="triangle",t[t.diamond=3]="diamond",t[t.pyramid=4]="pyramid",t[t.hexagon=5]="hexagon",t[t.pentagon=6]="pentagon",t[t.octagon=7]="octagon"}(Ws||(Ws={})),function(t){t[t.dottedLine=0]="dottedLine"}(Rs||(Rs={}));var js=((Ql={})[Ws.circle]={widthRatio:1},Ql[Ws.square]={widthRatio:1},Ql[Ws.triangle]={widthRatio:1},Ql[Ws.diamond]={widthRatio:1},Ql[Ws.pyramid]={widthRatio:1},Ql[Ws.hexagon]={widthRatio:2},Ql[Ws.pentagon]={widthRatio:1.168},Ql[Ws.octagon]={widthRatio:2.414},Ql),$s=function(t,n,i){return void 0===n&&(n="text"),void 0===i&&(i=!0),{role:n,"data-is-focusable":i,"aria-label":(t=null!=t?t:{}).ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy}};function Ys(t){return ms(t,!0)}var Xs=function(t,n,i,e){var r;return void 0===i&&(i=16),r="auto"===t||"histogram"===e?i:"number"==typeof t?t:Math.min(i,16),"number"==typeof n&&(r=Math.min(r,n)),Math.max(r,1)},Gs=function(t,n,i){void 0===i&&(i=0);var e="number"==typeof t?t:"number"==typeof n?n:i;return Math.max(0,Math.min(e,1))},Us=function(t,n){return"number"==typeof t||"number"==typeof n};function qs(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Zs(t,n){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}var Ks=/var\((--[a-zA-Z0-9\-]+)\)/g;function Js(t,n){var i=getComputedStyle(t);return n.replace(Ks,(function(t,n){return i.getPropertyValue(n)}))}function Qs(t,n,i){var e=getComputedStyle(n);Array.isArray(t)?t.forEach((function(t){sl(i).style(t,e.getPropertyValue(t))})):Object.entries(t).forEach((function(t){var n=t[0],r=t[1];sl(i).style(r,e.getPropertyValue(n))}))}var tc={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nc="fui_measurement_span",ic=["font-size","font-family","font-weight","font-style","letter-spacing","text-transform"],ec=function(t,n,i){var e=document.getElementById(nc);e||((e=document.createElement("span")).setAttribute("id",nc),e.setAttribute("aria-hidden","true"),(null!=i?i:document.body).appendChild(e)),Object.assign(e.style,tc);var r=(null!=i?i:document).querySelector(n);r&&Qs(ic,r,e),e.textContent="".concat(t);var o=e.getBoundingClientRect();return{node:e,width:o.width,height:o.height}},rc=new Map,oc=function(t,n,i){var e="".concat(t,"|").concat(n),r=rc.get(e);if(r)return r;var o=ec(t,n,i),u=o.width,a=o.height;if(rc.size>=2e3){var l=rc.keys().next().value;_l(l)||rc.delete(l)}return rc.set(e,{width:u,height:a}),{width:u,height:a}};function uc(t,n){if(void 0===n&&(n=hl),"function"==typeof t)return t;switch(t){case"linear":return hl;case"natural":return yl;case"step":return bl;case"stepAfter":return wl;case"stepBefore":return xl;default:return n}}var ac=/(category|total|sum|min|max|mean|median) (ascending|descending)/,lc=function(t,n){if(Array.isArray(n)){var i=[],e=new Set;return n.forEach((function(n){t[n]&&!e.has(n)&&(i.push(n),e.add(n))})),Object.keys(t).forEach((function(t){e.has(t)||i.push(t)})),i}var r=null==n?void 0:n.match(ac);if(r){var o=r[1],u=r[2];if("category"===o){var a=Object.keys(t).sort();return"descending"===u?a.reverse():a}var l={min:di,max:fi,sum:vi,total:vi,mean:hi,median:bi},s=[];return Object.keys(t).forEach((function(n){s.push([n,l[o](t[n])||0])})),s.sort("descending"===u?function(t,n){return n[1]-t[1]}:function(t,n){return t[1]-n[1]}),s.map((function(t){return t[0]}))}return Object.keys(t)};function sc(t,n){var i=n.semanticColors.bodyText;return hs(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function cc(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"scatterpolar"===t.lineOptions.mode}))}var dc,fc=function(t){return"log"===t?ta():Gu()},vc=function(t,n,i,e,r){if("log"===i)return{start:.5*t,end:n};var o=.1*(n-t);return{start:void 0!==e&&o>Math.abs(t-Math.min(t,e))?0:o,end:void 0!==r&&o>Math.abs(n-Math.max(n,r))?0:o}},hc=function(t,n){return"number"!=typeof t||"log"!==n||t>0},pc=function(t,n){return!_l(t)&&!_l(n)},gc=function(t,n){var i=function(t){return hc(t.x,n)};return[di(t,(function(t){return di(t.data.filter(i),(function(t){return t.x}))})),fi(t,(function(t){return fi(t.data.filter(i),(function(t){return t.x}))}))]},yc=function(t){var n=t.data,i=t.xScale,e=t.yScalePrimary,r=t.yScaleSecondary,o=t.useSecondaryYScale,u=t.xScaleType,a=t.yScaleType,l=t.secondaryYScaleType,s=gc(n,u),c=s[0],d=s[1],f=vc(+c,+d,u),v=c instanceof Date?new Date(+c-f.start):c-f.start,h=d instanceof Date?new Date(+d+f.end):d+f.end,p=Math.min(Math.abs(i(c)-i(v)),Math.abs(i(h)-i(d))),g=o?l:a,y=_s(n,0,o,g),m=y.startValue,b=y.endValue,x=vc(m,b,g),w=m-x.start,M=b+x.end,C=o?r:e,k=Math.min(Math.abs(C(w)-C(m)),Math.abs(C(b)-C(M)));return Math.min(p,k)},mc=function(t,n,i){for(var e=di(i),r=fi(i),o=Math.max(dl(t),dl(n)),u=Math.ceil(fl((e-t)/n,o)),a=Math.floor(fl((r-t)/n,o)),l=[],s=u;s<=a;s++)l.push(fl(t+s*n,o));return l},bc=function(t,n,i,e){var r="number"==typeof i?i:0;if("log"!==t){if("number"==typeof n&&n>0)return mc(r,n,e)}else{if("number"==typeof n&&n>0)return mc(r,n,e.map((function(t){return Math.log10(t)}))).map((function(t){return Math.pow(10,t)}));if("string"==typeof n){var o=n[0],u=Vl(n.slice(1))?Number(n.slice(1)):0;if("L"===o&&u>0)return mc(r,u,e)}}},xc=function(t,n,i,e){var r=n instanceof Date?n:new Date(ps);if("number"==typeof t&&t>0)return mc(+r,t,i.map((function(t){return+t}))).map((function(t){return new Date(t)}));if("string"==typeof t){var o=t[0],u=Vl(t.slice(1))?Number(t.slice(1)):0;if("M"===o&&u>0&&u===Math.round(u))return function(t,n,i,e){for(var r=+di(i),o=+fi(i),u=function(t){return e?t.getUTCMonth():t.getMonth()},a=function(t,n){return e?new Date(t.setUTCMonth(n)):new Date(t.setMonth(n))},l=0,s=new Date(+t);+s>r;)s=a(s,u(s)-n),l-=n;for(var c=u(t),d=[],f=l;;f+=n){var v=a(new Date(+t),c+f);if(u(v)!==((c+f)%12+12)%12&&(v=e?new Date(v.setUTCDate(0)):new Date(v.setDate(0))),+v>o)break;+v>=r&&d.push(v)}return d}(r,u,i,e)}},wc=function(t,n){if(null!==n){var i=n instanceof Date?n.getTime():n;if(t[i])return{x:n,values:t[i]}}},Mc=function(t,n,i){if(i(t)<=n)return t;for(var e=1,r=t.length;e<r;){var o=Math.floor((e+r+1)/2);i(t.slice(0,o)+"...")<=n?e=o:r=o-1}return t.slice(0,e)+"..."},Cc=i(357),kc={gradient1:"default.1",gradient2:"default.2",gradient3:"default.3",gradient4:"default.4",gradient5:"default.5",gradient6:"default.6",gradient7:"default.7",gradient8:"default.8",gradient9:"default.9",gradient10:"default.10",gradient1Ext:"extended.1",gradient2Ext:"extended.2",gradient3Ext:"extended.3",gradient4Ext:"extended.4",gradient5Ext:"extended.5",gradient6Ext:"extended.6",gradient7Ext:"extended.7",gradient8Ext:"extended.8",gradient9Ext:"extended.9",gradient10Ext:"extended.10",success:"semantic.success",highSuccess:"semantic.highSuccess",warning:"semantic.warning",error:"semantic.error",highError:"semantic.highError",disabled:"semantic.disabled"},Ac={1:[["#4760D5","#637CEF"],["#4F6BED","#637CEF"]],2:[["#795AA6","#9373C0"],["#8764B8","#A083C9"]],3:[["#159195","#2AA0A4"],["#159195","#2AA0A4"]],4:[["#B146C2","#C36BD1"],["#B146C2","#C36BD1"]],5:[["#3487C7","#3A96DD"],["#3487C7","#3A96DD"]],6:[["#0E7A0B","#13A10E"],["#11910D","#27AC22"]],7:[["#E61C99","#EE5FB7"],["#E61C99","#EE5FB7"]],8:[["#CA5010","#D77440"],["#CA5010","#D77440"]],9:[["#57811B","#689920"],["#57811B","#689920"]],10:[["#937700","#AE8C00"],["#937700","#AE8C00"]]},Sc={default:Ac,semantic:{success:[["#0C5E0C","#107C10"],["#218C21","#359B35"]],highSuccess:[["#107C10","#359B35"],["#359B35","#9FD89F"]],warning:[["#DE590B","#F7630C"],["#DE590B","#F87528"]],error:[["#B10E1C","#CC2635"],["#D33F4C","#EEACB2"]],highError:[["#6E0811","#B10E1C"],["#D33F4C","#DC626D"]],disabled:[["#E6E6E6","#E6E6E6"],["#E6E6E6","#E6E6E6"]]},extended:{1:[["#2C3C85","#3C51B4"],["#93A4F4","#C8D1FA"]],2:[["#4C3867","#674C8C"],["#A083C9","#B29AD4"]],3:[["#02494C","#038387"],["#4CB4B7","#9BD9DB"]],4:[["#63276D","#863593"],["#C36BD1","#CF87DA"]],5:[["#20547C","#2C72A8"],["#4FA1E1","#83BDEB"]],6:[["#0B5A08","#0E7A0B"],["#27AC22","#5EC75A"]],7:[["#AD006A","#E3008C"],["#EE5FB7","#F7ADDA"]],8:[["#9A3D0C","#CA5010"],["#D77440","#DF8E64"]],9:[["#405F14","#57811B"],["#73AA24","#A4CC6C"]],10:[["#6D5700","#937700"],["#D0B232","#DAC157"]]}},Lc=Object.values(Ac),Vc=Object.values(kc),Dc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},Nc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=Lc[(t+n)%Lc.length];return Dc(e,i)},Oc=function(t,n){if(void 0===n&&(n=!1),Vc.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=Sc[e][r];return Dc(o,n)}return[t,t]};function Tc(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.length<2?n[0]:function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];n.forEach((function(n){return n&&n.apply(t,i)}))}}function Ec(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=Tc(t,t[i],n[i]))}(t,{componentDidMount:Fc,componentDidUpdate:Bc,componentWillUnmount:Pc})}function Fc(){_c(this.props.componentRef,this)}function Bc(t){t.componentRef!==this.props.componentRef&&(_c(t.componentRef,null),_c(this.props.componentRef,this))}function Pc(){_c(this.props.componentRef,null)}function _c(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function Hc(t,n,i){var e,r=x(t,(function(t){var i;return n===t||!!(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,kn))}),i);return null!==r&&!!(null===(e=r.hasAttribute)||void 0===e?void 0:e.call(r,kn))}!function(t){t[t.vertical=0]="vertical",t[t.horizontal=1]="horizontal",t[t.bidirectional=2]="bidirectional",t[t.domOrder=3]="domOrder"}(dc||(dc={}));var Ic,Wc=u.createContext(void 0),Rc="data-is-focusable",zc="data-focuszone-id",jc="tabindex",$c="data-no-vertical-wrap",Yc="data-no-horizontal-wrap",Xc=999999999,Gc=-999999999;function Uc(t,n){var i;"function"==typeof MouseEvent?i=new MouseEvent("click",{ctrlKey:null==n?void 0:n.ctrlKey,metaKey:null==n?void 0:n.metaKey,shiftKey:null==n?void 0:n.shiftKey,altKey:null==n?void 0:n.altKey,bubbles:null==n?void 0:n.bubbles,cancelable:null==n?void 0:n.cancelable}):(i=document.createEvent("MouseEvents")).initMouseEvent("click",!!n&&n.bubbles,!!n&&n.cancelable,window,0,0,0,0,0,!!n&&n.ctrlKey,!!n&&n.altKey,!!n&&n.shiftKey,!!n&&n.metaKey,0,null),t.dispatchEvent(i)}var qc,Zc={},Kc=new Set,Jc=["text","number","password","email","tel","url","search","textarea"],Qc=!1,td=function(t){function n(i){var e,r,o,a,s,c=t.call(this,i)||this;c._root=u.createRef(),c._mergedRef=(s={refs:[]},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.resolver&&function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}(s.refs,t)||(s.resolver=function(t){return function(n){for(var i=0,e=t.refs;i<e.length;i++){var r=e[i];"function"==typeof r?r(n):r&&(r.current=n)}}}(s)),s.refs=t,s.resolver}),c._onFocus=function(t){if(!c._portalContainsElement(t.target)){var n,i=c.props,e=i.onActiveElementChanged,r=i.doNotAllowFocusEventToPropagate,o=i.stopFocusPropagation,u=i.onFocusNotification,a=i.onFocus,l=i.shouldFocusInnerElementWhenReceivedFocus,s=i.defaultTabbableElement,d=c._isImmediateDescendantOfZone(t.target);if(d)n=t.target;else for(var f=t.target;f&&f!==c._root.current;){if(V(f,void 0,c._inShadowRoot)&&c._isImmediateDescendantOfZone(f)){n=f;break}f=b(f,Qc)}if(l&&t.target===c._root.current){var v=s&&"function"==typeof s&&c._root.current&&s(c._root.current);v&&V(v,void 0,c._inShadowRoot)?(n=v,v.focus()):(c.focus(!0),c._activeElement&&(n=null))}var h=!c._activeElement;n&&n!==c._activeElement&&((d||h)&&c._setFocusAlignment(n,!0,!0),c._activeElement=n,h&&c._updateTabIndexes()),e&&e(c._activeElement,t),(o||r)&&t.stopPropagation(),a?a(t):u&&u()}},c._onBlur=function(){c._setParkedFocus(!1)},c._onMouseDown=function(t){if(!c._portalContainsElement(t.target)&&!c.props.disabled){for(var n=t.target,i=[];n&&n!==c._root.current;)i.push(n),n=b(n,Qc);for(;i.length&&((n=i.pop())&&V(n,void 0,c._inShadowRoot)&&c._setActiveElement(n,!0),!D(n)););}},c._onKeyDown=function(t,n){if(!c._portalContainsElement(t.target)){var i=c.props,e=i.direction,r=i.disabled,o=i.isInnerZoneKeystroke,u=i.pagingSupportDisabled,a=i.shouldEnterInnerZone;if(!(r||(c.props.onKeyDown&&c.props.onKeyDown(t),t.isDefaultPrevented()||c._getDocument().activeElement===c._root.current&&c._isInnerZone))){if((a&&a(t)||o&&o(t))&&c._isImmediateDescendantOfZone(t.target)){var s=c._getFirstInnerZone();if(s){if(!s.focus(!0))return}else{if(!N(t.target))return;if(!c.focusElement(A(t.target,t.target.firstChild,!0)))return}}else{if(t.altKey)return;switch(t.which){case 32:if(c._shouldRaiseClicksOnSpace&&c._tryInvokeClickForFocusable(t.target,t))break;return;case 37:if(e!==dc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==dc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==dc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==dc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusDown()))break;return;case 34:if(!u&&c._moveFocusPaging(!0))break;return;case 33:if(!u&&c._moveFocusPaging(!1))break;return;case 9:if(c.props.allowTabKey||1===c.props.handleTabKey||2===c.props.handleTabKey&&c._isElementInput(t.target)){var d=!1;if(c._processingTabKey=!0,d=e!==dc.vertical&&c._shouldWrapFocus(c._activeElement,Yc)?((0,l.jI)(n)?!t.shiftKey:t.shiftKey)?c._moveFocusLeft(n):c._moveFocusRight(n):t.shiftKey?c._moveFocusUp():c._moveFocusDown(),c._processingTabKey=!1,d)break;c.props.shouldResetActiveElementWhenTabFromZone&&(c._activeElement=null)}return;case 36:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!1))return!1;var f=c._root.current&&c._root.current.firstChild;if(c._root.current&&f&&c.focusElement(A(c._root.current,f,!0)))break;return;case 35:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!0))return!1;var v=c._root.current&&c._root.current.lastChild;if(c._root.current&&c.focusElement(k(c._root.current,v,!0,!0,!0)))break;return;case 13:if(c._shouldRaiseClicksOnEnter&&c._tryInvokeClickForFocusable(t.target,t))break;return;default:return}}t.preventDefault(),t.stopPropagation()}}},c._getHorizontalDistanceFromCenter=function(t,n,i){var e=c._focusAlignment.left||c._focusAlignment.x||0,r=Math.floor(i.top),o=Math.floor(n.bottom),u=Math.floor(i.bottom),a=Math.floor(n.top);return t&&r>o||!t&&u<a?e>=i.left&&e<=i.left+i.width?0:Math.abs(i.left+i.width/2-e):c._shouldWrapFocus(c._activeElement,$c)?Xc:Gc},Ec(c),En("FocusZone",i,{rootProps:void 0,allowTabKey:"handleTabKey",elementType:"as",ariaDescribedBy:"aria-describedby",ariaLabelledBy:"aria-labelledby"}),c._id=p("FocusZone"),c._focusAlignment={left:0,top:0},c._processingTabKey=!1;var d=null===(r=null!==(e=i.shouldRaiseClicks)&&void 0!==e?e:n.defaultProps.shouldRaiseClicks)||void 0===r||r;return c._shouldRaiseClicksOnEnter=null!==(o=i.shouldRaiseClicksOnEnter)&&void 0!==o?o:d,c._shouldRaiseClicksOnSpace=null!==(a=i.shouldRaiseClicksOnSpace)&&void 0!==a?a:d,c}return(0,o.C6)(n,t),n.getOuterZones=function(){return Kc.size},n._onKeyDownCapture=function(t){9===t.which&&Kc.forEach((function(t){return t._updateTabIndexes()}))},n.prototype.componentDidMount=function(){var t,i=this._root.current;if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),Zc[this._id]=this,i){for(var e=b(i,Qc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(D(e)){this._isInnerZone=!0;break}e=b(e,Qc)}this._isInnerZone||(Kc.add(this),this._root.current&&this._root.current.addEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&"string"==typeof this.props.defaultTabbableElement?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},n.prototype.componentDidUpdate=function(){var t,n=this._root.current,i=this._getDocument();if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),(this._activeElement&&!w(this._root.current,this._activeElement,Qc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Qc))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&i&&this._lastIndexPath&&(i.activeElement===i.body||null===i.activeElement||i.activeElement===n)){var e=function(t,n){for(var i=t,e=0,r=n;e<r.length;e++){var o=r[e],u=i.children[Math.min(o,i.children.length-1)];if(!u)break;i=u}return V(i)&&S(i)?i:A(t,i,!0)||k(t,i)}(n,this._lastIndexPath);e?(this._setActiveElement(e,!0),e.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},n.prototype.componentWillUnmount=function(){delete Zc[this._id],this._isInnerZone||(Kc.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},n.prototype.render=function(){var t=this,n=this.props,i=n.as,e=n.elementType,r=n.rootProps,a=n.ariaDescribedBy,l=n.ariaLabelledBy,s=n.className,c=z(this.props,H),d=i||e||"div";this._evaluateFocusBeforeRender();var f=(0,It.O4)();return u.createElement(d,(0,o.Cl)({"aria-labelledby":l,"aria-describedby":a},c,r,{className:j((Ic||(Ic=(0,q.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),Ic),s),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(n){return t._onKeyDown(n,f)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},n.prototype.focus=function(t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this._root.current){if(!t&&"true"===this._root.current.getAttribute(Rc)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=Zc[i.getAttribute(zc)];return!!e&&e.focusElement(this._root.current)}return!1}if(!t&&this._activeElement&&w(this._root.current,this._activeElement)&&V(this._activeElement,void 0,this._inShadowRoot)&&(!n||L(this._activeElement)))return this._activeElement.focus(),!0;var r=this._root.current.firstChild;return this.focusElement(A(this._root.current,r,!0,void 0,void 0,void 0,void 0,void 0,n))}return!1},n.prototype.focusLast=function(){if(this._root.current){var t=this._root.current&&this._root.current.lastChild;return this.focusElement(k(this._root.current,t,!0,!0,!0))}return!1},n.prototype.focusElement=function(t,n){var i=this.props,e=i.onBeforeFocus,r=i.shouldReceiveFocus;return!(r&&!r(t)||e&&!e(t)||!t||(this._setActiveElement(t,n),this._activeElement&&this._activeElement.focus(),0))},n.prototype.setFocusAlignment=function(t){this._focusAlignment=t},Object.defineProperty(n.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),n.prototype._evaluateFocusBeforeRender=function(){var t=this._root.current,n=this._getDocument();if(n){var i=n.activeElement;if(i!==t){var e=w(t,i,!1);this._lastIndexPath=e?function(t,n){for(var i=[];n&&t&&n!==t;){var e=b(n,!0);if(null===e)return[];i.unshift(Array.prototype.indexOf.call(e.children,n)),n=e}return i}(t,i):void 0}}},n.prototype._setParkedFocus=function(t){var n=this._root.current;n&&this._isParked!==t&&(this._isParked=t,t?(this.props.allowFocusRoot||(this._parkedTabIndex=n.getAttribute("tabindex"),n.setAttribute("tabindex","-1")),n.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(n.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):n.removeAttribute("tabindex")))},n.prototype._setActiveElement=function(t,n){var i=this._activeElement;this._activeElement=t,i&&(D(i)&&this._updateTabIndexes(i),i.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!n||this._setFocusAlignment(t,!0,!0),this._activeElement.tabIndex=0)},n.prototype._preventDefaultWhenHandled=function(t){this.props.preventDefaultWhenHandled&&t.preventDefault()},n.prototype._tryInvokeClickForFocusable=function(t,n){var i=t;if(i===this._root.current)return!1;do{if("BUTTON"===i.tagName||"A"===i.tagName||"INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SUMMARY"===i.tagName)return!1;if(this._isImmediateDescendantOfZone(i)&&"true"===i.getAttribute(Rc)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Uc(i,n),!0;i=b(i,Qc)}while(i!==this._root.current);return!1},n.prototype._getFirstInnerZone=function(t){if(!(t=t||this._activeElement||this._root.current))return null;if(D(t))return Zc[t.getAttribute(zc)];for(var n=t.firstElementChild;n;){if(D(n))return Zc[n.getAttribute(zc)];var i=this._getFirstInnerZone(n);if(i)return i;n=n.nextElementSibling}return null},n.prototype._moveFocus=function(t,n,i,e){void 0===e&&(e=!0);var r=this._activeElement,o=-1,u=void 0,a=!1,l=this.props.direction===dc.bidirectional;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,t))return!1;var s=l?r.getBoundingClientRect():null;do{if(r=t?A(this._root.current,r):k(this._root.current,r),!l){u=r;break}if(r){var c=n(s,r.getBoundingClientRect());if(-1===c&&-1===o){u=r;break}if(c>-1&&(-1===o||c<o)&&(o=c,u=r),o>=0&&c<0)break}}while(r);if(u&&u!==this._activeElement)a=!0,this.focusElement(u);else if(this.props.isCircularNavigation&&e)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return a},n.prototype._moveFocusDown=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!0,(function(e,r){var o=-1,u=Math.floor(r.top),a=Math.floor(e.bottom);return u<a?t._shouldWrapFocus(t._activeElement,$c)?Xc:Gc:((-1===n&&u>=a||u===n)&&(n=u,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusUp=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!1,(function(e,r){var o=-1,u=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(e.top);return u>l?t._shouldWrapFocus(t._activeElement,$c)?Xc:Gc:((-1===n&&u<=l||a===n)&&(n=a,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusLeft=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Yc);return!!this._moveFocus((0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)):parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)))&&r.right<=e.right&&n.props.direction!==dc.vertical?o=e.right-r.right:i||(o=Gc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Yc);return!!this._moveFocus(!(0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)):parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)))&&r.left>=e.left&&n.props.direction!==dc.vertical?o=r.left-e.left:i||(o=Gc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusPaging=function(t,n){void 0===n&&(n=!0);var i=this._activeElement;if(!i||!this._root.current)return!1;if(this._isElementInput(i)&&!this._shouldInputLoseFocus(i,t))return!1;var e=K(i);if(!e)return!1;var r=-1,o=void 0,u=-1,a=-1,l=e.clientHeight,s=i.getBoundingClientRect();do{if(i=t?A(this._root.current,i):k(this._root.current,i)){var c=i.getBoundingClientRect(),d=Math.floor(c.top),f=Math.floor(s.bottom),v=Math.floor(c.bottom),h=Math.floor(s.top),p=this._getHorizontalDistanceFromCenter(t,s,c);if(t&&d>f+l||!t&&v<h-l)break;p>-1&&(t&&d>u?(u=d,r=p,o=i):!t&&v<a?(a=v,r=p,o=i):(-1===r||p<=r)&&(r=p,o=i))}}while(i);var g=!1;if(o&&o!==this._activeElement)g=!0,this.focusElement(o),this._setFocusAlignment(o,!1,!0);else if(this.props.isCircularNavigation&&n)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return g},n.prototype._setFocusAlignment=function(t,n,i){if(this.props.direction===dc.bidirectional&&(!this._focusAlignment||n||i)){var e=t.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:o}),n&&(this._focusAlignment.left=r),i&&(this._focusAlignment.top=o)}},n.prototype._isImmediateDescendantOfZone=function(t){return this._getOwnerZone(t)===this._root.current},n.prototype._getOwnerZone=function(t){for(var n=b(t,Qc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(D(n))return n;n=b(n,Qc)}return n},n.prototype._updateTabIndexes=function(t){!this._activeElement&&this.props.defaultTabbableElement&&"function"==typeof this.props.defaultTabbableElement&&(this._activeElement=this.props.defaultTabbableElement(this._root.current)),!t&&this._root.current&&(this._defaultFocusElement=null,t=this._root.current,this._activeElement&&!w(t,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!V(this._activeElement,void 0,this._inShadowRoot)&&(this._activeElement=null);for(var n=t&&t.children,i=0;n&&i<n.length;i++){var e=n[i];D(e)?"true"===e.getAttribute(Rc)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(jc)&&e.setAttribute(jc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(jc)&&e.setAttribute(jc,"0"))):(e.getAttribute&&"false"===e.getAttribute(Rc)&&e.setAttribute(jc,"-1"),V(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(jc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(jc)&&e.setAttribute(jc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(jc)&&e.setAttribute(jc,"0")):"svg"===e.tagName&&"false"!==e.getAttribute("focusable")&&e.setAttribute("focusable","false")),this._updateTabIndexes(e)}},n.prototype._isContentEditableElement=function(t){return t&&"true"===t.getAttribute("contenteditable")},n.prototype._isElementInput=function(t){return!(!t||!t.tagName||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())},n.prototype._shouldInputLoseFocus=function(t,n){if(!this._processingTabKey&&t&&t.type&&Jc.indexOf(t.type.toLowerCase())>-1){var i=t.selectionStart,e=i!==t.selectionEnd,r=t.value,o=t.readOnly;if(e||i>0&&!n&&!o||i!==r.length&&n&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(t)))return!1}return!0},n.prototype._shouldWrapFocus=function(t,n){return!this.props.checkForNoWrap||function(t,n,i){return"true"!==function(t,n,i){var e=x(t,(function(t){return t.hasAttribute(n)}),i);return e&&e.getAttribute(n)}(t,n,null!=i?i:(0,M.Y)())}(t,n)},n.prototype._portalContainsElement=function(t){return t&&!!this._root.current&&Hc(t,this._root.current)},n.prototype._getDocument=function(){return(0,M.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:dc.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=Wc,n}(u.Component);function nd(t){return function(t){return t.clientWidth<t.scrollWidth}(t)||function(t){return t.clientHeight<t.scrollHeight}(t)}!function(t){t[t.Parent=0]="Parent",t[t.Self=1]="Self"}(qc||(qc={}));var id,ed=(0,a.Z)(),rd=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onRenderContent=function(t){return"string"==typeof t.content?u.createElement("p",{className:n._classNames.subText},t.content):u.createElement("div",{className:n._classNames.subText},t.content)},n}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.calloutProps,e=t.directionalHint,r=t.directionalHintForRTL,a=t.styles,l=t.id,s=t.maxWidth,c=t.onRenderContent,d=void 0===c?this._onRenderContent:c,f=t.targetElement,v=t.theme;return this._classNames=ed(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement($n,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,z(this.props,R,["id"]),{className:this._classNames.root}),u.createElement("div",{className:this._classNames.content,id:l,onFocus:this.props.onFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},d(this.props,this._onRenderContent)))},n.defaultProps={directionalHint:1,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},n}(u.Component),od=(0,r.I)(rd,(function(t){var n=t.className,i=t.beakWidth,e=void 0===i?16:i,r=t.gapSpace,o=void 0===r?0:r,u=t.maxWidth,a=t.theme,l=a.semanticColors,s=a.fonts,c=a.effects,d=-(Math.sqrt(e*e/2)+o)+1/window.devicePixelRatio;return{root:["ms-Tooltip",a.fonts.medium,It.lw.fadeIn200,{background:l.menuBackground,boxShadow:c.elevation8,padding:"8px",maxWidth:u,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},n],content:["ms-Tooltip-content",s.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(t){t[t.zero=0]="zero",t[t.medium=1]="medium",t[t.long=2]="long"}(id||(id={}));var ud,ad,ld=(0,a.Z)(),sd=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._defaultTooltipId=p("tooltip"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._getTargetElement=function(){if(e._tooltipHost.current){var t=e.props.overflowMode;if(void 0!==t)switch(t){case qc.Parent:return e._tooltipHost.current.parentElement;case qc.Self:return e._tooltipHost.current}return e._tooltipHost.current}},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipContentFocus=function(t){n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e._clearDismissTimer(),e._clearOpenTimer()},e._onTooltipBlur=function(t){var n;e._ignoreNextFocusEvent=(null===(n=jt(e.context))||void 0===n?void 0:n.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props,r=i.overflowMode,o=i.delay,u=jt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!nd(a))return}if(!t.target||!Hc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==id.zero){var l=e._getDelayTime(o);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),l)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t},(function(){return e.props.onTooltipToggle&&e.props.onTooltipToggle(t)}))},e._getDelayTime=function(t){switch(t){case id.medium:return 300;case id.long:return 500;default:return 0}},Ec(e),e.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.calloutProps,i=t.children,e=t.content,r=t.directionalHint,a=t.directionalHintForRTL,l=t.hostClassName,s=t.id,c=t.setAriaDescribedBy,d=void 0===c||c,f=t.tooltipProps,v=t.styles,h=t.theme;this._classNames=ld(v,{theme:h,className:l});var p=this.state.isTooltipVisible,g=s||this._defaultTooltipId,y=(0,o.Cl)((0,o.Cl)({id:"".concat(g,"--tooltip"),content:e,targetElement:this._getTargetElement(),directionalHint:r,directionalHintForRTL:a,calloutProps:$({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},z(this.props,R,["id"])),f),m=(null==f?void 0:f.onRenderContent)?f.onRenderContent(y,(function(t){return(null==t?void 0:t.content)?u.createElement(u.Fragment,null,t.content):null})):e,b=p&&!!m,x=d&&p&&m?g:void 0;return u.createElement("div",{className:this._classNames.root,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,role:"none","aria-describedby":x},i,b&&u.createElement(od,(0,o.Cl)({},y)),u.createElement("div",{hidden:!0,id:g,style:It.dX},m))},n.prototype.componentDidMount=function(){this._async=new Nt(this)},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:id.medium},n.contextType=Ft,n}(u.Component),cd={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},dd=(0,r.I)(sd,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(cd,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),fd=function(t){function n(n){var i=t.call(this,n)||this;return i._tooltipChild=u.createRef(),i._checkTextOverflow=function(){var t=i._getTargetElement(),n=!!t&&nd(t);n!==i.state.textOverflow&&i.setState({textOverflow:n})},i._getTargetElement=function(){if(i._tooltipChild.current&&i._tooltipChild.current.parentElement)return i._tooltipChild.current.parentElement},i.state={textOverflow:!1},i._async=new Nt(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.content,e=t.accessibilityData;return u.createElement(dd,{overflowMode:qc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},$s(e),{ref:this._tooltipChild,"data-is-focusable":this.state.textOverflow}),i))},n.prototype.componentDidMount=function(){var t=this._getTargetElement();window.ResizeObserver&&t&&(this._resizeObserver=new ResizeObserver(this._async.debounce(this._checkTextOverflow,500)),this._resizeObserver.observe(t))},n.prototype.componentWillUnmount=function(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._async.dispose()},n}(u.Component),vd=(0,a.Z)(),hd=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.state.isCalloutVisible&&i.setState({isCalloutVisible:!1,hoverValue:"",refSelected:null,lineColor:"",legend:""})},i._adjustProps=function(){i._barHeight=i.props.barHeight||12,i._classNames=vd(i.props.styles,{theme:i.props.theme,width:i.props.width,className:i.props.className,barHeight:i._barHeight,color:i.state.lineColor,variant:i.props.variant,hideLabels:i.props.hideLabels})},i._getChartDataText=function(t){return i.props.barChartCustomData?u.createElement("div",{role:"text"},i.props.barChartCustomData(t)):i._getDefaultTextData(t)},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.data,r=t.yAxisCalloutData||(t.horizontalBarChartdata?"".concat(t.horizontalBarChartdata.x,"/").concat(t.horizontalBarChartdata.y):0);return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):"")+"".concat(r,".")+(e?"with benchmark at "+"".concat(e,", "):"")},i.state={isCalloutVisible:!1,hoverValue:"",lineColor:"",legend:"",refSelected:null,color:"",xCalloutValue:"",yCalloutValue:"",barSpacingInPercent:0},i._refArray=[],i._uniqLineText="_HorizontalLine_"+Math.random().toString(36).substring(7),i._hoverOff=i._hoverOff.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_HBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.theme;this._adjustProps();var r=e.palette,a=0;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},i.map((function(n,i){a=n.chartData&&n.chartData[0]&&n.chartData[0].horizontalBarChartdata.x?n.chartData[0].horizontalBarChartdata.x:0,n.chartData[1]={legend:"",horizontalBarChartdata:{x:n.chartData[0].horizontalBarChartdata.y-a,y:n.chartData[0].horizontalBarChartdata.y},color:r.neutralLight};var e=t.props.variant===v.AbsoluteScale?null:t._getChartDataText(n),o=t._createBars(n,r,i),l=t._uniqLineText+"_"+i,s=vd(t.props.styles,{theme:t.props.theme,width:t.props.width,showTriangle:!!n.chartData[0].data,variant:t.props.variant});return u.createElement("div",{key:i},u.createElement("div",{className:s.items},u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(fd,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(td,{direction:dc.horizontal,className:t._classNames.chartWrapper},u.createElement("svg",{ref:t.barChartSvgRef,className:t._classNames.chart,"aria-label":n.chartTitle},u.createElement("g",{id:l,key:l,ref:function(i){t._refCallback(i,n.chartData[0].legend)},onClick:function(){var t=n.chartData[0];t&&t.onClick&&t.onClick()}},o)))))})),u.createElement($n,(0,o.Cl)({target:this.state.refSelected,coverTarget:!0,isBeakVisible:!1,gapSpace:30,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.hoverValue,color:this.state.lineColor,culture:this.props.culture}))))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._hoverOn=function(t,n){var i,e,r,o;if((!this.state.isCalloutVisible||this.state.legend!==n.legend)&&this._calloutAnchorPoint!==n){var u=m(this._refArray,(function(t){return t.index===n.legend}));this._calloutAnchorPoint=n;var a=n.color;if(this.props.enableGradient){var l=Math.max((null===(e=null===(i=this.props.data)||void 0===i?void 0:i.map((function(t){return t.chartData})))||void 0===e?void 0:e.findIndex((function(t){return(null==t?void 0:t[0].data)===n.data&&(null==t?void 0:t[0].legend)===n.legend})))||0,0);a=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(l,0,null===(o=this.props.theme)||void 0===o?void 0:o.isInverted)[0]}this.setState({isCalloutVisible:!0,hoverValue:t,lineColor:a,legend:n.legend,refSelected:u.refElement,xCalloutValue:n.xAxisCalloutData,yCalloutValue:n.yAxisCalloutData,barCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._hoverOff=function(){},n.prototype._getDefaultTextData=function(t){var n=this.props.culture,i=this.props.chartDataMode||"default",e=t.chartData[0],r=e.horizontalBarChartdata.x,a=e.horizontalBarChartdata.y,l=$s(t.chartDataAccessibilityData,"text",!1);switch(i){case"default":return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),(0,Yn.c$)(r,n));case"fraction":return u.createElement("div",(0,o.Cl)({},l),u.createElement("span",{className:this._classNames.chartTitleRight},(0,Yn.c$)(r,n)),u.createElement("span",{className:this._classNames.chartDataTextDenominator}," / "+(0,Yn.c$)(a,n)));case"percentage":var s="".concat((0,Yn.c$)(Math.round(r/a*100),n),"%");return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),s)}},n.prototype._createBenchmark=function(t){var n=t.chartData[0].horizontalBarChartdata.y,i=t.chartData[0].data,e={left:"calc("+Math.round((i||0)/n*100)+"% - 4px)"};return u.createElement("div",{className:this._classNames.benchmarkContainer},u.createElement("div",{className:this._classNames.triangle,style:e}))},n.prototype._createBars=function(t,n,i){var e,r=this,o=(null===(e=t.chartData)||void 0===e?void 0:e.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,a=this.state.barSpacingInPercent*(o-1),l=[n.blueLight,n.blue,n.blueMid,n.red,n.black],s=[],c=t.chartData.reduce((function(t,n){return t+(n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0)}),0),d=0,f=0,h=0;t.chartData.map((function(t,n){var i=t.horizontalBarChartdata.x?t.horizontalBarChartdata.x:0;return(f=i/c*100)<0?f=0:f<1&&0!==f&&(f=1),h+=f}));var g=0!==h?(h-a)/100:1,y=t.chartData.map((function(n,e){var o,a,h,y,m=n.color?n.color:l[Math.floor(4*Math.random()+1)],b=m;r.props.enableGradient&&1!==e&&(m=(null===(o=n.gradient)||void 0===o?void 0:o[0])||Nc(i,0,null===(a=r.props.theme)||void 0===a?void 0:a.isInverted)[0],b=(null===(h=n.gradient)||void 0===h?void 0:h[1])||Nc(i,0,null===(y=r.props.theme)||void 0===y?void 0:y.isInverted)[1]);var x=n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0;e>0&&(d+=f),(f=x/c*100)<0?f=0:f<1&&0!==f?f=1/g:f/=g,s.push(d);var w=n.horizontalBarChartdata.x;if(1===e&&r.props.variant===v.AbsoluteScale){if(r.props.hideLabels)return u.createElement("text",{key:e});var M=t.chartData[0].horizontalBarChartdata.x;return u.createElement("text",{key:e,x:"".concat(r._isRTL?100-s[e]:s[e],"%"),y:r._barHeight/2,dominantBaseline:"central",transform:"translate(".concat(r._isRTL?-4:4,")"),className:r._classNames.barLabel,"aria-hidden":!0},Ys(M))}var C=p("HBC_Gradient")+"_".concat(i,"_").concat(e);return u.createElement(u.Fragment,{key:e},r.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:C},u.createElement("stop",{offset:"0",stopColor:m}),u.createElement("stop",{offset:"100%",stopColor:b}))),u.createElement("rect",{key:e,x:"".concat(r._isRTL?100-s[e]-f-e*r.state.barSpacingInPercent:s[e]+e*r.state.barSpacingInPercent,"%"),y:0,rx:r.props.roundCorners?3:0,"data-is-focusable":""!==n.legend,width:f+"%",height:r._barHeight,fill:r.props.enableGradient?"url(#".concat(C,")"):m,onMouseOver:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,onFocus:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,role:"img","aria-label":r._getAriaLabel(n),onBlur:r._hoverOff,onMouseLeave:r._hoverOff,className:r._classNames.barWrapper}))}));return y},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n}(u.Component),pd=(0,r.I)(hd,(function(t){var n,i=t.className,e=t.theme,r=t.width,u=t.barHeight,a=t.showTriangle,l=t.variant,s=t.hideLabels,c=e.palette;return{root:[{display:"flex",flexDirection:"column",width:r||"100%"},i],items:{marginBottom:a||l===v.AbsoluteScale?"16px":"10px"},chart:{width:"100%",height:u||12,display:"block",overflow:"visible"},barWrapper:{},chartTitle:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:e.palette.neutralPrimary,marginBottom:l===v.AbsoluteScale?"4px":"5px"},chartTitleRight:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:e.palette.neutralPrimary},chartDataTextDenominator:{fontSize:It.s.medium,color:e.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},triangle:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c.blue,marginBottom:"4px",position:"absolute"},barLabel:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{fontWeight:It.BO.semibold,fill:e.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}),chartWrapper:{paddingRight:l!==v.AbsoluteScale||s?0:40}}})),gd={host:"ms-HoverCard-host"},yd=function(){function t(n){this._id=t._uniqueId++,this._parent=n,this._eventRecords=[]}return t.raise=function(n,i,e,r,o){var u,a=null!=o?o:(0,M.Y)();if(t._isElement(n)){if(void 0!==a&&a.createEvent){var l=a.createEvent("HTMLEvents");l.initEvent(i,r||!1,!0),$(l,e),u=n.dispatchEvent(l)}else if(void 0!==a&&a.createEventObject){var s=a.createEventObject(e);n.fireEvent("on"+i,s)}}else for(;n&&!1!==u;){var c=n.__events__,d=c?c[i]:null;if(d)for(var f in d)if(d.hasOwnProperty(f))for(var v=d[f],h=0;!1!==u&&h<v.length;h++){var p=v[h];p.objectCallback&&(u=p.objectCallback.call(p.parent,e))}n=r?n.parent:null}return u},t.isObserved=function(t,n){var i=t&&t.__events__;return!!i&&!!i[n]},t.isDeclared=function(t,n){var i=t&&t.__declaredEvents;return!!i&&!!i[n]},t.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},t._isElement=function(t){return!!t&&(!!t.addEventListener||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement)},t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},t.prototype.onAll=function(t,n,i){for(var e in n)n.hasOwnProperty(e)&&this.on(t,e,n[e],i)},t.prototype.on=function(n,i,e,r){var o=this;if(i.indexOf(",")>-1)for(var u=i.split(/[ ,]+/),a=0;a<u.length;a++)this.on(n,u[a],e,r);else{var l=this._parent,s={target:n,eventName:i,parent:l,callback:e,options:r};if((u=n.__events__=n.__events__||{})[i]=u[i]||{count:0},u[i][this._id]=u[i][this._id]||[],u[i][this._id].push(s),u[i].count++,t._isElement(n)){var c=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed){var i;try{if(!1===(i=e.apply(l,t))&&t[0]){var r=t[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return i}};s.elementCallback=c,n.addEventListener?n.addEventListener(i,c,r):n.attachEvent&&n.attachEvent("on"+i,c)}else s.objectCallback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed)return e.apply(l,t)};this._eventRecords.push(s)}},t.prototype.off=function(t,n,i,e){for(var r=0;r<this._eventRecords.length;r++){var o=this._eventRecords[r];if(!(t&&t!==o.target||n&&n!==o.eventName||i&&i!==o.callback||"boolean"==typeof e&&e!==o.options)){var u=o.target.__events__,a=u[o.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&i?(a.count--,l.splice(l.indexOf(o),1)):(a.count-=l.length,delete u[o.eventName][this._id]),a.count||delete u[o.eventName]),o.elementCallback&&(o.target.removeEventListener?o.target.removeEventListener(o.eventName,o.elementCallback,o.options):o.target.detachEvent&&o.target.detachEvent("on"+o.eventName,o.elementCallback)),this._eventRecords.splice(r--,1)}}},t.prototype.raise=function(n,i,e){return t.raise(this._parent,n,i,e)},t.prototype.declare=function(t){var n=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof t)n[t]=!0;else for(var i=0;i<t.length;i++)n[t[i]]=!0},t._uniqueId=0,t}();!function(t){t[t.hover=0]="hover",t[t.hotKey=1]="hotKey"}(ud||(ud={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(ad||(ad={}));var md,bd={root:"ms-ExpandingCard-root",compactCard:"ms-ExpandingCard-compactCard",expandedCard:"ms-ExpandingCard-expandedCard",expandedCardScroll:"ms-ExpandingCard-expandedCardScrollRegion"};!function(t){t[t.compact=0]="compact",t[t.expanded=1]="expanded"}(md||(md={}));var xd=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},wd=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function Md(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function Cd(t){var n=u.useRef((function(){throw new Error("Cannot call an event handler while rendering")}));return Nn((function(){n.current=t}),[t]),Wt((function(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}}))}var kd={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},Ad=u.forwardRef((function(t,n){var i,e,r,a=u.useRef(null),l=u.useRef(null),s=u.useRef(null),c=Et(a,n),d=Pt(),f=zt(),v=!!u.useContext(Wc),h=null===(i=Bn(!1))||void 0===i||i,p=F(kd,t),g=Wt({hasFocus:!1,focusStackId:Md("ftz-",p.id)}),y=p.children,m=p.componentRef,b=p.disabled,x=p.disableFirstFocus,M=p.forceFocusInsideTrap,C=p.focusPreviouslyFocusedInnerElement,S=p.firstFocusableSelector,L=p.firstFocusableTarget,V=p.disableRestoreFocus,D=void 0===V?p.ignoreExternalFocusing:V,N=p.isClickableOutsideFocusTrap,O=p.enableAriaHiddenSiblings,B={"aria-hidden":!0,style:{pointerEvents:"none",position:"fixed"},tabIndex:b?-1:0,"data-is-visible":!0,"data-is-focus-trap-zone-bumper":!0},P=u.useCallback((function(t){t!==l.current&&t!==s.current&&T(t)}),[]),_=Cd((function(){if(a.current){var t=g.previouslyFocusedElementInTrapZone;if(C&&t&&w(a.current,t))P(t);else{var n=null;if("string"==typeof L)n=a.current.querySelector(L);else if(L)n=L(a.current);else if(S){var i="string"==typeof S?S:S();n=a.current.querySelector("."+i)}n||(n=A(a.current,a.current.firstChild,!1,!1,!1,!0,void 0,void 0,void 0,v)),n&&P(n)}}})),H=function(t){if(!b&&a.current){var n,i=t===g.hasFocus?(void 0===(n=!1)&&(n=!0),k(a.current,s.current,n,!1,!0,!0,!1,!0,v)):function(t,n,i,e,r){return void 0===e&&(e=!0),A(t,n,e,!1,!1,!0,!1,!0,void 0,r)}(a.current,l.current,0,!1,v);i&&(i===l.current||i===s.current?_():i.focus())}},I=Cd((function(t){if(Ad.focusStack=Ad.focusStack.filter((function(t){return g.focusStackId!==t})),d){var n=d.activeElement;D||"function"!=typeof(null==t?void 0:t.focus)||!w(a.current,n)&&n!==d.body&&!n.shadowRoot||P(t)}})),W=Cd((function(t){if(!b&&g.focusStackId===Ad.focusStack.slice(-1)[0]){var n=wd(t);n&&!w(a.current,n)&&(d&&xd(d)===d.body?setTimeout((function(){d&&xd(d)===d.body&&(_(),g.hasFocus=!0)}),0):(_(),g.hasFocus=!0),t.preventDefault(),t.stopPropagation())}}));return u.useEffect((function(){var t=[];return M&&t.push(E(f,"focus",W,!0)),N||t.push(E(f,"click",W,!0)),function(){t.forEach((function(t){return t()}))}}),[M,N,f]),u.useEffect((function(){if(!b&&(h||M)&&a.current){Ad.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||xd(d);return x||w(a.current,t)||_(),function(){return I(t)}}}),[M,b]),u.useEffect((function(){if(!b&&O)return Vt(a.current)}),[b,O,a]),e=function(){delete g.previouslyFocusedElementInTrapZone},(r=u.useRef(e)).current=e,u.useEffect((function(){return function(){var t;null===(t=r.current)||void 0===t||t.call(r)}}),[]),function(t,n,i){u.useImperativeHandle(t,(function(){return{get previouslyFocusedElement(){return n},focus:i}}),[i,n])}(m,g.previouslyFocusedElementInTrapZone,_),u.createElement("div",(0,o.Cl)({"aria-labelledby":p.ariaLabelledBy},z(p,R),{ref:c,onFocusCapture:function(t){var n;null===(n=p.onFocusCapture)||void 0===n||n.call(p,t),t.target===l.current?H(!0):t.target===s.current&&H(!1),g.hasFocus=!0,t.target!==t.currentTarget&&t.target!==l.current&&t.target!==s.current&&(g.previouslyFocusedElementInTrapZone=wd(t.nativeEvent))},onBlurCapture:function(t){var n;null===(n=p.onBlurCapture)||void 0===n||n.call(p,t);var i=t.relatedTarget;null===t.relatedTarget&&(i=xd(d)),w(a.current,i)||(g.hasFocus=!1)}}),u.createElement("div",(0,o.Cl)({},B,{ref:l})),y,u.createElement("div",(0,o.Cl)({},B,{ref:s})))}));Ad.displayName="FocusTrapZone",Ad.focusStack=[];var Sd,Ld=function(t){return u.createElement($n,(0,o.Cl)({},t),u.createElement(Ad,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},Vd=function(t){var n=t.gapSpace,i=void 0===n?0:n,e=t.directionalHint,r=void 0===e?4:e,a=t.directionalHintFixed,l=t.targetElement,s=t.firstFocus,c=t.trapFocus,d=t.onLeave,f=t.className,v=t.finalHeight,h=t.content,p=t.calloutProps,g=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},z(t,R)),{className:f,target:l,isBeakVisible:!1,directionalHint:r,directionalHintFixed:a,finalHeight:v,minPagePadding:24,onDismiss:d,gapSpace:i}),p);return u.createElement(u.Fragment,null,c?u.createElement(Ld,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement($n,(0,o.Cl)({},g),h))},Dd=(0,a.Z)(),Nd=function(t){function n(n){var i=t.call(this,n)||this;return i._expandedElem=u.createRef(),i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},i._onRenderCompactCard=function(){return u.createElement("div",{className:i._classNames.compactCard},i.props.onRenderCompactCard(i.props.renderData))},i._onRenderExpandedCard=function(){return!i.state.firstFrameRendered&&i._async.requestAnimationFrame((function(){i.setState({firstFrameRendered:!0})})),u.createElement("div",{className:i._classNames.expandedCard,ref:i._expandedElem},u.createElement("div",{className:i._classNames.expandedCardScroll},i.props.onRenderExpandedCard&&i.props.onRenderExpandedCard(i.props.renderData)))},i._checkNeedsScroll=function(){var t=i.props.expandedCardHeight;i._async.requestAnimationFrame((function(){i._expandedElem.current&&i._expandedElem.current.scrollHeight>=t&&i.setState({needsScroll:!0})}))},i._async=new Nt(i),Ec(i),i.state={firstFrameRendered:!1,needsScroll:!1},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._checkNeedsScroll()},n.prototype.componentWillUnmount=function(){this._async.dispose()},n.prototype.render=function(){var t=this.props,n=t.styles,i=t.compactCardHeight,e=t.expandedCardHeight,r=t.theme,a=t.mode,l=t.className,s=this.state,c=s.needsScroll,d=s.firstFrameRendered,f=i+e;this._classNames=Dd(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===md.expanded&&d});var v=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this._onRenderCompactCard(),this._onRenderExpandedCard());return u.createElement(Vd,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),Od=(0,r.I)(Nd,(function(t){var n,i=t.theme,e=t.needsScroll,r=t.expandedCardFirstFrameRendered,o=t.compactCardHeight,u=t.expandedCardHeight,a=t.className,l=i.palette,s=(0,It.Km)(bd,i);return{root:[s.root,{width:320,pointerEvents:"none",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},a],compactCard:[s.compactCard,{pointerEvents:"auto",position:"relative",height:o}],expandedCard:[s.expandedCard,{height:1,overflowY:"hidden",pointerEvents:"auto",transition:"height 0.467s cubic-bezier(0.5, 0, 0, 1)",selectors:{":before":{content:'""',position:"relative",display:"block",top:0,left:24,width:272,height:1,backgroundColor:l.neutralLighter}}},r&&{height:u}],expandedCardScroll:[s.expandedCardScroll,e&&{height:"100%",boxSizing:"border-box",overflowY:"auto"}]}}),void 0,{scope:"ExpandingCard"}),Td={root:"ms-PlainCard-root"},Ed=(0,a.Z)(),Fd=function(t){function n(n){var i=t.call(this,n)||this;return i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},Ec(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.styles,i=t.theme,e=t.className;this._classNames=Ed(n,{theme:i,className:e});var r=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this.props.onRenderPlainCard(this.props.renderData));return u.createElement(Vd,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),Bd=(0,r.I)(Fd,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(Td,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),Pd=(0,a.Z)(),_d=function(t){function n(n){var i=t.call(this,n)||this;return i._hoverCard=u.createRef(),i.dismiss=function(t){i._async.clearTimeout(i._openTimerId),i._async.clearTimeout(i._dismissTimerId),t?i._dismissTimerId=i._async.setTimeout((function(){i._setDismissedState()}),i.props.cardDismissDelay):i._setDismissedState()},i._cardOpen=function(t){i._shouldBlockHoverCard()||"keydown"===t.type&&t.which!==i.props.openHotKey||(i._async.clearTimeout(i._dismissTimerId),"mouseenter"===t.type&&(i._currentMouseTarget=t.currentTarget),i._executeCardOpen(t))},i._executeCardOpen=function(t){i._async.clearTimeout(i._openTimerId),i._openTimerId=i._async.setTimeout((function(){i.setState((function(n){return n.isHoverCardVisible?n:{isHoverCardVisible:!0,mode:md.compact,openMode:"keydown"===t.type?ud.hotKey:ud.hover}}))}),i.props.cardOpenDelay)},i._cardDismiss=function(t,n){if(t){if(!(n instanceof MouseEvent))return;if("keydown"===n.type&&n.which!==Dt)return;i.props.sticky||i._currentMouseTarget!==n.currentTarget&&n.which!==Dt||i.dismiss(!0)}else{if(i.props.sticky&&!(n instanceof MouseEvent)&&n.nativeEvent instanceof MouseEvent&&"mouseleave"===n.type)return;i.dismiss(!0)}},i._setDismissedState=function(){i.setState({isHoverCardVisible:!1,mode:md.compact,openMode:ud.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:md.expanded}}))},i._setEventListeners=function(){var t=i.props,n=t.trapFocus,e=t.instantOpenOnClick,r=t.eventListenerTarget,o=r?i._getTargetElement(r):i._getTargetElement(i.props.target),u=i._nativeDismissEvent;o&&(i._events.on(o,"mouseenter",i._cardOpen),i._events.on(o,"mouseleave",u),n?i._events.on(o,"keydown",i._cardOpen):(i._events.on(o,"focus",i._cardOpen),i._events.on(o,"blur",u)),e?i._events.on(o,"click",i._instantOpenAsExpanded):(i._events.on(o,"mousedown",u),i._events.on(o,"keydown",u)))},Ec(i),i._async=new Nt(i),i._events=new yd(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:md.compact,openMode:ud.hover},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._setEventListeners()},n.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},n.prototype.componentDidUpdate=function(t,n){var i=this;t.target!==this.props.target&&(this._events.off(),this._setEventListeners()),n.isHoverCardVisible!==this.state.isHoverCardVisible&&(this.state.isHoverCardVisible?(this._async.setTimeout((function(){i.setState({mode:md.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:md.compact}),this.props.onCardHide&&this.props.onCardHide()))},n.prototype.render=function(){var t=this.props,n=t.expandingCardProps,i=t.children,e=t.id,r=t.setAriaDescribedBy,a=void 0===r||r,l=t.styles,s=t.theme,c=t.className,d=t.type,f=t.plainCardProps,v=t.trapFocus,h=t.setInitialFocus,g=this.state,y=g.isHoverCardVisible,m=g.mode,b=g.openMode,x=e||p("hoverCard");this._classNames=Pd(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},z(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===ud.hotKey,targetElement:this._getTargetElement(this.props.target),onEnter:this._cardOpen,onLeave:this._childDismissEvent}),M=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),w),{mode:m}),C=(0,o.Cl)((0,o.Cl)({},f),w);return u.createElement("div",{className:this._classNames.host,ref:this._hoverCard,"aria-describedby":a&&y?x:void 0,"data-is-focusable":!this.props.target},i,y&&(d===ad.expanding?u.createElement(Od,(0,o.Cl)({},M)):u.createElement(Bd,(0,o.Cl)({},C))))},n.prototype._getTargetElement=function(t){switch(typeof t){case"string":return(0,M.Y)().querySelector(t);case"object":return t;default:return this._hoverCard.current||void 0}},n.prototype._shouldBlockHoverCard=function(){return!(!this.props.shouldBlockHoverCard||!this.props.shouldBlockHoverCard())},n.defaultProps={cardOpenDelay:500,cardDismissDelay:100,expandedCardOpenDelay:1500,instantOpenOnClick:!1,setInitialFocus:!1,openHotKey:67,type:ad.expanding},n}(u.Component),Hd=(0,r.I)(_d,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(gd,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(Sd||(Sd={}));var Id=function(t){var n;void 0===t&&(n={},t={getCachedMeasurement:function(t){if(t&&t.cacheKey&&n.hasOwnProperty(t.cacheKey))return n[t.cacheKey]},addMeasurementToCache:function(t,i){t.cacheKey&&(n[t.cacheKey]=i)}});var i,e=t;function r(t,n){var i=e.getCachedMeasurement(t);if(void 0!==i)return i;var r=n();return e.addMeasurementToCache(t,r),r}function u(t,n,o){for(var u=t,a=r(t,o);a>i;){var l=n(u);if(void 0===l)return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=e.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};u=l}return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(t,n,a,l){if(void 0!==l||void 0!==n.dataToMeasure){if(l){if(i&&n.renderedData&&!n.dataToMeasure)return(0,o.Cl)((0,o.Cl)({},n),function(t,n,e,r){var u;return u=t>i?r?{resizeDirection:"grow",dataToMeasure:r(e)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:e},i=t,(0,o.Cl)((0,o.Cl)({},u),{measureContainer:!1})}(l,t.data,n.renderedData,t.onGrowData));i=l}var s=(0,o.Cl)((0,o.Cl)({},n),{measureContainer:!1});return n.dataToMeasure&&(s="grow"===n.resizeDirection&&t.onGrowData?(0,o.Cl)((0,o.Cl)({},s),function(t,n,a,l){for(var s=t,c=r(t,a);c<i;){var d=n(s);if(void 0===d)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(c=e.getCachedMeasurement(d)))return{dataToMeasure:d};s=d}return(0,o.Cl)({resizeDirection:"shrink"},u(s,l,a))}(n.dataToMeasure,t.onGrowData,a,t.onReduceData)):(0,o.Cl)((0,o.Cl)({},s),u(n.dataToMeasure,t.onReduceData,a))),s}},shouldRenderDataForMeasurement:function(t){return!(!t||void 0!==e.getCachedMeasurement(t))},getInitialResizeGroupState:function(t){return{dataToMeasure:(0,o.Cl)({},t),resizeDirection:"grow",measureContainer:!0}}}},Wd=u.createContext({isMeasured:!1}),Rd={position:"fixed",visibility:"hidden"},zd={position:"relative"};function jd(t,n){var i;switch(n.type){case"resizeData":return(0,o.Cl)({},n.value);case"dataToMeasure":return(0,o.Cl)((0,o.Cl)({},t),{dataToMeasure:n.value,resizeDirection:"grow",measureContainer:!0});default:return(0,o.Cl)((0,o.Cl)({},t),((i={})[n.type]=n.value,i))}}var $d={isMeasured:!0},Yd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(Id),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Ot(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(jd,e),a=r[0],l=r[1];u.useEffect((function(){l({type:"dataToMeasure",value:t.data})}),[t.data]);var s=u.useRef(e);return s.current=(0,o.Cl)({},a),[s,u.useCallback((function(t){t&&l({type:"resizeData",value:t})}),[]),u.useCallback((function(){i.current&&l({type:"measureContainer",value:!0})}),[i])]}(t,i,n),c=s[0],d=s[1],f=s[2];u.useEffect((function(){var n;c.current.renderedData&&(a.current=!0,null===(n=t.dataDidRender)||void 0===n||n.call(t,c.current.renderedData))})),u.useEffect((function(){l.requestAnimationFrame((function(){var o=void 0;if(c.current.measureContainer&&n.current){var u=n.current.getBoundingClientRect();o=t.direction===Sd.vertical?u.height:u.width}var l=i.getNextState(t,c.current,(function(){var n=a.current?r:e;if(!n.current)return 0;var i=n.current.getBoundingClientRect();return t.direction===Sd.vertical?i.height:i.width}),o);d(l)}),n.current)})),Tt(Bt(),"resize",l.debounce(f,16,{leading:!0}));var v=i.shouldRenderDataForMeasurement(c.current.dataToMeasure),h=!a.current&&v;return[c.current.dataToMeasure,c.current.renderedData,f,e,r,v,h]}(t,i),a=r[0],l=r[1],s=r[2],c=r[3],d=r[4],f=r[5],v=r[6];u.useImperativeHandle(t.componentRef,(function(){return{remeasure:s}}),[s]),function(t){_n({name:"ResizeGroup",props:t,deprecations:{styles:"className"}})}(t);var h=t.className,p=t.onRenderData,g=z(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:zd},f&&!v&&u.createElement("div",{style:Rd,ref:d},u.createElement(Wd.Provider,{value:$d},p(a))),u.createElement("div",{ref:c,style:v?Rd:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));Yd.displayName="ResizeGroupBase";var Xd,Gd=Yd;!function(t){t.KEYTIP_ADDED="keytipAdded",t.KEYTIP_REMOVED="keytipRemoved",t.KEYTIP_UPDATED="keytipUpdated",t.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",t.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",t.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",t.ENTER_KEYTIP_MODE="enterKeytipMode",t.EXIT_KEYTIP_MODE="exitKeytipMode"}(Xd||(Xd={}));var Ud=function(){function t(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return t.getInstance=function(){return this._instance},t.prototype.init=function(t){this.delayUpdatingKeytipChange=t},t.prototype.register=function(t,n){void 0===n&&(n=!1);var i=t;n||(i=this.addParentOverflow(t),this.sequenceMapping[i.keySequences.toString()]=i);var e=this._getUniqueKtp(i);if(n?this.persistedKeytips[e.uniqueID]=e:this.keytips[e.uniqueID]=e,this.inKeytipMode||!this.delayUpdatingKeytipChange){var r=n?Xd.PERSISTED_KEYTIP_ADDED:Xd.KEYTIP_ADDED;yd.raise(this,r,{keytip:i,uniqueID:e.uniqueID})}return e.uniqueID},t.prototype.update=function(t,n){var i=this.addParentOverflow(t),e=this._getUniqueKtp(i,n),r=this.keytips[n];r&&(e.keytip.visible=r.keytip.visible,this.keytips[n]=e,delete this.sequenceMapping[r.keytip.keySequences.toString()],this.sequenceMapping[e.keytip.keySequences.toString()]=e.keytip,!this.inKeytipMode&&this.delayUpdatingKeytipChange||yd.raise(this,Xd.KEYTIP_UPDATED,{keytip:e.keytip,uniqueID:e.uniqueID}))},t.prototype.unregister=function(t,n,i){void 0===i&&(i=!1),i?delete this.persistedKeytips[n]:delete this.keytips[n],!i&&delete this.sequenceMapping[t.keySequences.toString()];var e=i?Xd.PERSISTED_KEYTIP_REMOVED:Xd.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||yd.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){yd.raise(this,Xd.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){yd.raise(this,Xd.EXIT_KEYTIP_MODE)},t.prototype.getKeytips=function(){var t=this;return Object.keys(this.keytips).map((function(n){return t.keytips[n].keytip}))},t.prototype.addParentOverflow=function(t){var n=(0,o.fX)([],t.keySequences,!0);if(n.pop(),0!==n.length){var i=this.sequenceMapping[n.toString()];if(i&&i.overflowSetSequence)return(0,o.Cl)((0,o.Cl)({},t),{overflowSetSequence:i.overflowSetSequence})}return t},t.prototype.menuExecute=function(t,n){yd.raise(this,Xd.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:t,keytipSequences:n})},t.prototype._getUniqueKtp=function(t,n){return void 0===n&&(n=p()),{keytip:(0,o.Cl)({},t),uniqueID:n}},t._instance=new t,t}(),qd=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},Zd=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];t.unregister(n[r],r,!0),delete n[r]}},Kd=function(t){var n=Ud.getInstance(),i=t.className,e=t.overflowItems,r=t.keytipSequences,a=t.itemSubMenuProvider,l=t.onRenderOverflowButton,s=Wt({}),c=u.useCallback((function(t){return a?a(t):t.subMenuProps?t.subMenuProps.items:void 0}),[a]),d=u.useMemo((function(){var t=[],i=[];return r?null==e||e.forEach((function(e){var u,a=e.keytipProps;if(a){var l={content:a.content,keySequences:a.keySequences,disabled:a.disabled||!(!e.disabled&&!e.isDisabled),hasDynamicChildren:a.hasDynamicChildren,hasMenu:a.hasMenu};a.hasDynamicChildren||c(e)?(l.onExecute=n.menuExecute.bind(n,r,null===(u=null==e?void 0:e.keytipProps)||void 0===u?void 0:u.keySequences),l.hasOverflowSubMenu=!0):l.onExecute=a.onExecute,t.push(l);var s=(0,o.Cl)((0,o.Cl)({},e),{keytipProps:(0,o.Cl)((0,o.Cl)({},a),{overflowSetSequence:r})});null==i||i.push(s)}else null==i||i.push(e)})):i=e,{modifiedOverflowItems:i,keytipsToRegister:t}}),[e,c,n,r]),f=d.modifiedOverflowItems;return function(t,n,i){var e=Bn(t);u.useEffect((function(){e&&(Zd(i,e),qd(n,i,t))})),u.useEffect((function(){return qd(n,i,t),function(){Zd(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},Jd=(0,a.Z)(),Qd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n);!function(t,n){var i=function(){var t;return null!==(t=Pt())&&void 0!==t?t:"undefined"!=typeof document?document:void 0}();u.useImperativeHandle(t.componentRef,(function(){return{focus:function(t,i){var e=!1;return n.current&&(e=C(n.current,i)),e},focusElement:function(t){var e=!1;return!!t&&(n.current&&w(n.current,t)&&(t.focus(),e=(null==i?void 0:i.activeElement)===t),e)}}}),[n,i])}(t,i);var r=t.items,a=t.overflowItems,l=t.className,s=t.styles,c=t.vertical,d=t.role,f=t.overflowSide,v=void 0===f?"end":f,h=t.onRenderItem,p=Jd(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},z(t,R),{role:d||"group","aria-orientation":"menubar"===d?!0===c?"vertical":"horizontal":void 0,className:p.root,ref:e}),"start"===v&&g&&u.createElement(Kd,(0,o.Cl)({},t,{className:p.overflowButton})),r&&r.map((function(t,n){return u.createElement("div",{className:p.item,key:t.key,role:"none"},h(t))})),"end"===v&&g&&u.createElement(Kd,(0,o.Cl)({},t,{className:p.overflowButton})))}));Qd.displayName="OverflowSet";var tf,nf={flexShrink:0,display:"inherit"},ef=(0,r.I)(Qd,(function(t){var n=t.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},t.vertical&&{flexDirection:"column"},n],item:["ms-OverflowSet-item",nf],overflowButton:["ms-OverflowSet-overflowButton",nf]}}),void 0,{scope:"OverflowSet"}),rf=((tf={})["".concat(Ws[Ws.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",tf["".concat(Ws[Ws.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",tf["".concat(Ws[Ws.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",tf["".concat(Ws[Ws.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",tf["".concat(Ws[Ws.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",tf["".concat(Ws[Ws.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",tf["".concat(Ws[Ws.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",tf["".concat(Ws[Ws.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",tf["".concat(Rs[Rs.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",tf),of=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(rf).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},qs(n),{transform:"rotate(".concat(e===Ws[Ws.diamond]?45:e===Ws[Ws.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:rf[e]},qs(i))))};function uf(t){return sl(Ka(t).call(document.documentElement))}function af(t,n){return(0,o.sH)(this,arguments,void 0,(function(t,n,i,e){var r,u,a,l,s;return void 0===i&&(i=!1),void 0===e&&(e={}),(0,o.YH)(this,(function(c){switch(c.label){case 0:if(0===t.length&&!n)throw new Error("No charts or legends to export");return[4,Promise.all(t.map((function(t){return new Promise((function(n){var e=function(t,n){if(!t)throw new Error("Chart container is not defined");var i=t.querySelector("svg");if(!i)throw new Error("SVG not found");for(var e=sl(i.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),r=i.getElementsByTagName("*"),u=e.node().getElementsByTagName("*"),a=["text"],l=["table","thead","tbody","tr","th","td"],s=0;s<r.length;s++){var c=r[s].tagName.toLowerCase();a.includes(c)||l.includes(c)?Qs((0,o.fX)((0,o.fX)([],lf,!0),sf,!0),r[s],u[s]):Qs(lf,r[s],u[s])}r=null,u=null;var d=i.querySelectorAll("foreignObject"),f=e.node().querySelectorAll("foreignObject");d.forEach((function(t,n){var i=f[n];if(i){var e=t.firstElementChild,r=i.firstElementChild;e&&r&&Qs(cf,e,r);var o=t.querySelectorAll("*"),u=i.querySelectorAll("*");o.forEach((function(t,n){var i=u[n];i&&Qs(cf,t,i)}))}}));var v=t.querySelector('[data-chart-annotation-svg="true"]'),h=null;if(v){h=v.cloneNode(!0),Qs(lf,v,h);var p=v.getElementsByTagName("*"),g=h.getElementsByTagName("*");for(s=0;s<p.length;s++){var y=p[s],m=g[s],b=(c=y.tagName.toLowerCase(),y instanceof SVGElement),x=y instanceof HTMLElement;b&&Qs("text"===c?(0,o.fX)((0,o.fX)([],lf,!0),sf,!0):lf,y,m),x&&Qs(cf,y,m),"foreignobject"===c&&Qs(df,y,m)}}var w=i.getBoundingClientRect(),M=w.width,C=w.height;e.attr("width",M).attr("height",C).attr("viewBox","0 0 ".concat(M," ").concat(C)).attr("direction",n?"rtl":"ltr"),h&&(e.selectAll('[data-chart-annotation-layer="true"]').remove(),sl(h).attr("x",0).attr("y",0).attr("width",M).attr("height",C),e.append((function(){return h})));var k={node:e.node(),width:M,height:C};return e=null,k}(t.container,i);n({dataUrl:hf(e.node),width:e.width,height:e.height})}))})))];case 1:return r=c.sent(),u=[],t.forEach((function(t,n){var i=t.row||0,e=t.col||0;u[i]||(u[i]=[]),u[i][e]=r[n]})),n&&(a=0,u.forEach((function(t){var n=0;t.forEach((function(t){n+=t.width})),a=Math.max(a,n)})),(l=n(a,i)).node&&(s=hf(l.node),u.push([{dataUrl:s,width:l.width,height:l.height}]))),[2,vf(u,e)]}}))}))}var lf=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],sf=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],cf=["align-items","background","background-color","border","border-radius","box-shadow","box-sizing","color","column-gap","display","flex","flex-direction","font-family","font-size","font-style","font-weight","gap","height","justify-content","letter-spacing","line-height","margin","max-height","max-width","min-height","min-width","opacity","overflow","padding","pointer-events","position","row-gap","text-align","text-decoration","text-transform","top","right","bottom","left","visibility","white-space","width","z-index"],df=["overflow","pointer-events"],ff={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};function vf(t){return(0,o.sH)(this,arguments,void 0,(function(t,n){var i,e,r,u,a,l,s,c,d,f;return void 0===n&&(n={}),(0,o.YH)(this,(function(v){switch(v.label){case 0:if(i=0,e=0,r=t.map((function(t){var n=0,r=0,u=t.map((function(t){var i=(0,o.Cl)((0,o.Cl)({},t),{x:n,y:e});return n+=t.width,r=Math.max(r,t.height),i}));return i=Math.max(i,n),e+=r,u})).flat(),u=n.scale||1,a=n.width||i,l=n.height||e,i*=s=u*a/i,e*=c=u*l/e,(d=document.createElement("canvas")).width=i,d.height=e,!(f=d.getContext("2d")))throw new Error("Canvas context is null");return f.fillStyle=n.background||"transparent",f.fillRect(0,0,i,e),[4,Promise.all(r.map((function(t){return new Promise((function(n,i){var e=new Image;e.onload=function(){f.drawImage(e,s*t.x,c*t.y,s*t.width,c*t.height),n()},e.onerror=i,e.src=t.dataUrl}))})))];case 1:return v.sent(),[2,d.toDataURL("image/png")]}}))}))}function hf(t){if(!t)throw new Error("SVG node is null");var n=(new XMLSerializer).serializeToString(t);return"data:image/svg+xml;base64,"+btoa(function(t){for(var n,i,e="",r=t.length,o=0;o<r;){if("%"===(n=t.charAt(o++)))if("u"===t.charAt(o)){if(i=t.slice(o+1,o+5),gf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),pf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(n)))}var pf=/^[\da-f]{2}$/i,gf=/^[\da-f]{4}$/i,yf=(0,a.Z)(),mf=function(t){function n(n){var i,e,r,a,l=t.call(this,n)||this;l._isLegendSelected=!1,l.toSVG=function(t,n){return void 0===n&&(n=!1),function(t,n,i,e){if(0===t.length)return{node:null,width:0,height:0};for(var r=i.selectedLegends,u=i.centerLegends,a=i.textClassName,l=i.isRTL,s=uf("svg:g"),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o=ec(t[i].title,".".concat(a),e),g=29+o.width+8,y=s.append("g");f.push({elem:y,width:g}),c+g>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:y,width:g}],c=u?0:12,d+=32);var m=r[t[i].title]||p;y.append("rect").attr("x",c+(l?g-8-13:8)).attr("y",d+8).attr("width",13).attr("height",13).style("fill",m?t[i].color:"transparent").style("stroke-width",1).style("stroke",t[i].color),y.append("text").attr("x",c+(l?g-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",m?1:.67).text(t[i].title).call((function(t){return Qs(ff,o.node,t.node())})),c+=g},y=0;y<t.length;y++)g(y);if(v.push(f),h.push(c),d+=32,u)v.forEach((function(t,i){var e=Math.max((n-h[i])/2,0),r=h[i],o=0;t.forEach((function(t){var n=e+(l?r-t.width-o:0);t.elem.attr("transform","translate(".concat(n,", 0)")),r-=t.width,o+=t.width}))}));else if(l){var m=Math.max.apply(Math,(0,o.fX)([n],h,!1));v.forEach((function(t){var n=m-12,i=12;t.forEach((function(t){var e=n-t.width-i;t.elem.attr("transform","translate(".concat(e,", 0)")),n-=t.width,i+=t.width}))}))}var b=Math.max.apply(Math,(0,o.fX)([n],h,!1)),x=d,w=uf("svg").attr("width",b).attr("height",x).attr("viewBox","0 0 ".concat(b," ").concat(x));return w.append((function(){return s.node()})),{node:w.node(),width:b,height:x}}(l.props.legends,t,{selectedLegends:l.state.selectedLegends,centerLegends:!!l.props.centerLegends,textClassName:l._classNames.text,isRTL:n},l._rootElem)},l._onRenderData=function(t){var n=l.props,i=n.overflowProps,e=n.allowFocusOnLegends,r=void 0===e||e,a=n.canSelectMultipleLegends,s=void 0!==a&&a,c={root:{justifyContent:l.props.centerLegends?"center":"unset",flexWrap:l.props.enabledWrapLines?"wrap":"nowrap"}};return u.createElement(td,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(ef,(0,o.Cl)({items:t.primary,overflowItems:t.overflow,onRenderItem:l._renderButton,onRenderOverflowButton:l._renderOverflowItems},i,{styles:(0,o.Cl)((0,o.Cl)({},c),null==i?void 0:i.styles)})))},l._onReduceData=function(t){if(0!==t.primary.length){var n=(0,o.fX)((0,o.fX)([],t.primary.slice(-1),!0),t.overflow,!0);return{primary:t.primary.slice(0,-1),overflow:n}}},l._onGrowData=function(t){if(0!==t.overflow.length){var n=t.overflow.slice(1);return{primary:(0,o.fX)((0,o.fX)([],t.primary,!0),t.overflow.slice(0,1),!0),overflow:n}}},l._getNewSelectedLegendsForMultiselect=function(t){var n=(0,o.Cl)({},l.state.selectedLegends);return n[t.title]?delete n[t.title]:(n[t.title]=!0,Object.keys(n).length===l.props.legends.length&&(n={})),n},l._getNewSelectedLegendsForSingleSelect=function(t){var n;return l.state.selectedLegends[t.title]?{}:((n={})[t.title]=!0,n)},l._onClick=function(t,n){var i,e,r,o=l.props.canSelectMultipleLegends,u=void 0!==o&&o?l._getNewSelectedLegendsForMultiselect(t):l._getNewSelectedLegendsForSingleSelect(t);l.setState({selectedLegends:u}),null===(e=(i=l.props).onChange)||void 0===e||e.call(i,Object.keys(u),n,t),null===(r=t.action)||void 0===r||r.call(t)},l._onRenderCompactCard=function(t){var n=l.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.className,a=n.styles,s=n.theme,c=n.canSelectMultipleLegends,d=void 0!==c&&c,f=[],v=yf(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(td,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:dc.vertical,handleTabKey:1,isCircularNavigation:!0},l.props.focusZonePropsInHoverCard,{className:v.hoverCardRoot}),f)},l._renderOverflowItems=function(t){var n=l.props.allowFocusOnLegends,i=void 0===n||n,e=[];t.forEach((function(t,n){e.push({key:n.toString(),name:t.title,onClick:t.action})}));var r={renderData:t},a=l.props,s=a.theme,c=a.className,d=a.styles,f=a.overflowText,v=yf(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(Hd,{type:ad.plain,plainCardProps:h,instantOpenOnClick:!0,onCardHide:function(){l.setState({isHoverCardVisible:!1});var n=m(t,(function(t){return t.title===l.state.activeLegend}));n&&(l.setState({activeLegend:""}),n.onMouseOutAction&&n.onMouseOutAction())},setInitialFocus:!0,trapFocus:!0,onCardVisible:l._hoverCardVisible,styles:v.subComponentStyles.hoverCardStyles,cardDismissDelay:300,target:l._hoverCardRef},u.createElement("div",{role:"option"},u.createElement("div",(0,o.Cl)({className:v.overflowIndicationTextStyle,ref:function(t){l._hoverCardRef=t}},i&&{role:"button","aria-expanded":l.state.isHoverCardVisible,"aria-label":"".concat(e.length," ").concat(p)},{"data-is-focusable":i}),e.length," ",p)))},l._hoverCardVisible=function(){l.setState({isHoverCardVisible:!0})},l._onHoverOverLegend=function(t){t.hoverAction&&(l.setState({activeLegend:t.title}),t.hoverAction())},l._onLeave=function(t){t.onMouseOutAction&&(l.setState({activeLegend:""}),t.onMouseOutAction())},l._renderButton=function(t,n,i){var e=l.props.allowFocusOnLegends,r=void 0===e||e,a={title:t.title,color:t.color,shape:t.shape,action:t.action,hoverAction:t.hoverAction,onMouseOutAction:t.onMouseOutAction,stripePattern:t.stripePattern,isLineLegendInBarChart:t.isLineLegendInBarChart,opacity:t.opacity},s=l._getColor(a.title,a.color),c=l.props,d=c.theme,f=c.className,v=c.styles,h=yf(v,{theme:d,className:f,colorOnSelectedState:s,borderColor:a.color,overflow:i,stripePattern:a.stripePattern,isLineLegendInBarChart:a.isLineLegendInBarChart,opacity:a.opacity}),p=function(){l._onHoverOverLegend(a)},g=function(){l._onLeave(a)},y=l._getShape(h,a,s);return u.createElement("button",(0,o.Cl)({},r&&{"aria-selected":!!l.state.selectedLegends[a.title],role:"option","aria-label":"".concat(a.title),"aria-setsize":t["aria-setsize"],"aria-posinset":t["aria-posinset"]},t.nativeButtonProps&&(0,o.Cl)({},t.nativeButtonProps),{key:n,className:h.legend,onClick:function(t){l._onClick(a,t)},onMouseOver:p,onMouseOut:g,onFocus:p,onBlur:g,"data-is-focusable":r}),y,u.createElement("div",{className:h.text},a.title))};var s=null!==(e=n.selectedLegends)&&void 0!==e?e:n.defaultSelectedLegends,c=null!==(r=n.selectedLegend)&&void 0!==r?r:n.defaultSelectedLegend,d={};return n.canSelectMultipleLegends?d=(null===(a=null!=s?s:[])||void 0===a?void 0:a.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{}))||{}:c&&((i={})[c]=!0,d=i),l.state={activeLegend:"",isHoverCardVisible:!1,selectedLegends:d},l}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e=t.selectedLegend,r=t.selectedLegends;return t.canSelectMultipleLegends&&void 0!==r?(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:r.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{})}):t.canSelectMultipleLegends||void 0===e?n:(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:(i={},i[e]=!0,i)})},n.prototype.render=function(){var t=this,n=this.props,i=n.theme,e=n.className,r=n.styles;this._classNames=yf(r,{theme:i,className:e}),this._isLegendSelected=Object.keys(this.state.selectedLegends).length>0;var o=this._generateData();return u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Gd,{data:o,onReduceData:this._onReduceData,onRenderData:this._onRenderData,onGrowData:this._onGrowData}))},n.prototype._generateData=function(){var t=this,n=this.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.shape;return{primary:this.props.legends.map((function(n,i){return(0,o.Cl)((0,o.Cl)({},e&&{nativeButtonProps:z(n,W,["title"]),"aria-setsize":t.props.legends.length,"aria-posinset":i+1}),{title:n.title,action:n.action,hoverAction:n.hoverAction,onMouseOutAction:n.onMouseOutAction,color:n.color,shape:r||n.shape,stripePattern:n.stripePattern,isLineLegendInBarChart:n.isLineLegendInBarChart,opacity:n.opacity,key:i})})),overflow:[]}},n.prototype._getShape=function(t,n,i){var e={className:t.shape},r={fill:i,strokeWidth:2,stroke:n.color};return u.createElement(of,{svgProps:e,pathProps:r,shape:n.shape,classNameForNonSvg:t.rect})},n.prototype._getColor=function(t,n){var i=this.props.theme;return this._isLegendSelected?this.state.selectedLegends[t]?n:i.semanticColors.buttonBackground:this.state.activeLegend===t||""===this.state.activeLegend?n:i.semanticColors.buttonBackground},n}(u.Component),bf=(0,r.I)(mf,(function(t){var n,i,e=t.className,r=t.theme,u=t.isLineLegendInBarChart,a=void 0!==u&&u,l=r,s=l.palette,c=l.fonts,d={inset:void 0,position:void 0,highContrastStyle:{outlineColor:r.semanticColors.focusBorder},borderColor:"transparent",outlineColor:void 0};return{root:[{whiteSpace:"nowrap",width:"100%",alignItems:"center",margin:"-8px 0 0 -8px"},e],legend:[(0,It.gm)(r,d),{display:"flex",alignItems:"center",cursor:"pointer",border:"none",padding:"".concat(8,"px"),background:"none",textTransform:"capitalize"}],rect:{selectors:(n={},n[It.up]={content:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")"),opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":""},n),width:"".concat(12,"px"),height:a?"4px":"".concat(12,"px"),backgroundColor:t.stripePattern?"":t.colorOnSelectedState,marginRight:"".concat(8,"px"),border:"".concat(1,"px solid"),borderColor:t.borderColor?t.borderColor:null==r?void 0:r.semanticColors.buttonBorder,content:t.stripePattern?"repeating-linear-gradient(135deg, transparent, transparent 3px, ".concat(t.colorOnSelectedState," 1px, ").concat(t.colorOnSelectedState," 4px)"):""},shape:[{marginRight:"".concat(8,"px")}],triangle:{width:"0",height:"0",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"10.4px solid",borderTopColor:t.colorOnSelectedState,marginRight:"8px",opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":t.opacity?t.opacity:"",selectors:(i={},i[It.up]={border:"0px",height:"10.4px",width:"10.4px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")")},i)},text:(0,o.Cl)((0,o.Cl)({},c.small),{lineHeight:"16px",color:null==r?void 0:r.semanticColors.bodyText,opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"".concat(.67):""}),hoverChange:{width:"12px",height:"12px",backgroundColor:r.semanticColors.buttonBackground,marginRight:"8px",border:"1px solid",borderColor:t.borderColor?t.borderColor:s.black},overflowIndicationTextStyle:[(0,It.gm)(r,d),(0,o.Cl)((0,o.Cl)({cursor:"pointer",color:null==r?void 0:r.semanticColors.bodyText},c.small),{lineHeight:"16px",padding:"".concat(8,"px")})],hoverCardRoot:{padding:"8px",position:"relative",overflowY:"auto",maxHeight:"300px"},subComponentStyles:{hoverCardStyles:{host:[(0,It.gm)(r,d)]}}}}));function xf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function wf(t){return function(){return t}}function Mf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function Cf(t){return t}Array.prototype.slice;const kf=Math.abs,Af=Math.atan2,Sf=Math.cos,Lf=Math.max,Vf=Math.min,Df=Math.sin,Nf=Math.sqrt,Of=1e-12,Tf=Math.PI,Ef=Tf/2,Ff=2*Tf;function Bf(t){return t>=1?Ef:t<=-1?-Ef:Math.asin(t)}function Pf(){var t=Cf,n=Mf,i=null,e=wf(0),r=wf(Ff),o=wf(0);function u(u){var a,l,s,c,d,f=(u=xf(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(Ff,Math.max(-Ff,r.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=m*(y<0?-1:1);for(a=0;a<f;++a)(d=p[h[a]=a]=+t(u[a],a,u))>0&&(v+=d);for(null!=n?h.sort((function(t,i){return n(p[t],p[i])})):null!=i&&h.sort((function(t,n){return i(u[t],u[n])})),a=0,s=v?(y-f*b)/v:0;a<f;++a,g=c)l=h[a],c=g+((d=p[l])>0?d*s:0)+b,p[l]={data:u[l],index:a,value:d,startAngle:g,endAngle:c,padAngle:m};return p}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,i=null,u):n},u.sort=function(t){return arguments.length?(i=t,n=null,u):i},u.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:wf(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:wf(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:wf(+t),u):o},u}const _f=Math.PI,Hf=2*_f,If=1e-6,Wf=Hf-If;function Rf(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class zf{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Rf:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Rf;const i=10**n;return function(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,e){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+e}`}bezierCurveTo(t,n,i,e,r,o){this._append`C${+t},${+n},${+i},${+e},${this._x1=+r},${this._y1=+o}`}arcTo(t,n,i,e,r){if(t=+t,n=+n,i=+i,e=+e,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,u=this._y1,a=i-t,l=e-n,s=o-t,c=u-n,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(d>If)if(Math.abs(c*a-l*s)>If&&r){let f=i-o,v=e-u,h=a*a+l*l,p=f*f+v*v,g=Math.sqrt(h),y=Math.sqrt(d),m=r*Math.tan((_f-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>If&&this._append`L${t+b*s},${n+b*c}`,this._append`A${r},${r},0,0,${+(c*f>s*v)},${this._x1=t+x*a},${this._y1=n+x*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,e,r,o){if(t=+t,n=+n,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(e),a=i*Math.sin(e),l=t+u,s=n+a,c=1^o,d=o?e-r:r-e;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>If||Math.abs(this._y1-s)>If)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%Hf+Hf),d>Wf?this._append`A${i},${i},0,1,${c},${t-u},${n-a}A${i},${i},0,1,${c},${this._x1=l},${this._y1=s}`:d>If&&this._append`A${i},${i},0,${+(d>=_f)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=n+i*Math.sin(r)}`)}rect(t,n,i,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+e}h${-i}Z`}toString(){return this._}}function jf(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(null==i)n=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);n=t}return t},()=>new zf(n)}function $f(t){return t.innerRadius}function Yf(t){return t.outerRadius}function Xf(t){return t.startAngle}function Gf(t){return t.endAngle}function Uf(t){return t&&t.padAngle}function qf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/Nf(a*a+l*l),c=s*l,d=-s*a,f=t+c,v=n+d,h=i+c,p=e+d,g=(f+h)/2,y=(v+p)/2,m=h-f,b=p-v,x=m*m+b*b,w=r-o,M=f*p-h*v,C=(b<0?-1:1)*Nf(Lf(0,w*w*x-M*M)),k=(M*b-m*C)/x,A=(-M*m-b*C)/x,S=(M*b+m*C)/x,L=(-M*m+b*C)/x,V=k-g,D=A-y,N=S-g,O=L-y;return V*V+D*D>N*N+O*O&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-d,x11:k*(r/w-1),y11:A*(r/w-1)}}function Zf(){var t=$f,n=Yf,i=wf(0),e=null,r=Xf,o=Gf,u=Uf,a=null,l=jf(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-Ef,p=o.apply(this,arguments)-Ef,g=kf(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>Of)if(g>Ff-Of)a.moveTo(v*Sf(h),v*Df(h)),a.arc(0,0,v,h,p,!y),f>Of&&(a.moveTo(f*Sf(p),f*Df(p)),a.arc(0,0,f,p,h,y));else{var m,b,x=h,w=p,M=h,C=p,k=g,A=g,S=u.apply(this,arguments)/2,L=S>Of&&(e?+e.apply(this,arguments):Nf(f*f+v*v)),V=Vf(kf(v-f)/2,+i.apply(this,arguments)),D=V,N=V;if(L>Of){var O=Bf(L/f*Df(S)),T=Bf(L/v*Df(S));(k-=2*O)>Of?(M+=O*=y?1:-1,C-=O):(k=0,M=C=(h+p)/2),(A-=2*T)>Of?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*Sf(x),F=v*Df(x),B=f*Sf(C),P=f*Df(C);if(V>Of){var _,H=v*Sf(w),I=v*Df(w),W=f*Sf(M),R=f*Df(M);if(g<Tf)if(_=function(t,n,i,e,r,o,u,a){var l=i-t,s=e-n,c=u-r,d=a-o,f=d*l-c*s;if(!(f*f<Of))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var z=E-_[0],j=F-_[1],$=H-_[0],Y=I-_[1],X=1/Df(((d=(z*$+j*Y)/(Nf(z*z+j*j)*Nf($*$+Y*Y)))>1?0:d<-1?Tf:Math.acos(d))/2),G=Nf(_[0]*_[0]+_[1]*_[1]);D=Vf(V,(f-G)/(X-1)),N=Vf(V,(v-G)/(X+1))}else D=N=0}A>Of?N>Of?(m=qf(W,R,E,F,v,N,y),b=qf(H,I,B,P,v,N,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),N<V?a.arc(m.cx,m.cy,N,Af(m.y01,m.x01),Af(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,Af(m.y01,m.x01),Af(m.y11,m.x11),!y),a.arc(0,0,v,Af(m.cy+m.y11,m.cx+m.x11),Af(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,Af(b.y11,b.x11),Af(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>Of&&k>Of?D>Of?(m=qf(B,P,H,I,f,-D,y),b=qf(E,F,W,R,f,-D,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),D<V?a.arc(m.cx,m.cy,D,Af(m.y01,m.x01),Af(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,D,Af(m.y01,m.x01),Af(m.y11,m.x11),!y),a.arc(0,0,f,Af(m.cy+m.y11,m.cx+m.x11),Af(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,D,Af(b.y11,b.x11),Af(b.y01,b.x01),!y))):a.arc(0,0,f,C,M,y):a.lineTo(B,P)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-Tf/2;return[Sf(e)*i,Df(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:wf(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:wf(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:wf(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:wf(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:wf(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var Kf=function(t){var n,i=t.solidFill,e=t.gradientFill,r=t.href,o=t.theme,u=t.opacity;return{root:{fill:i,cursor:r?"pointer":"default",stroke:o.semanticColors.bodyBackground,outline:"transparent",selectors:{"::-moz-focus-inner":{border:"0"}},opacity:u},gradientArc:{width:"100%",height:"100%",background:e,opacity:u},focusRing:{stroke:o.semanticColors.focusBorder,strokeWidth:4,fill:"transparent"},arcLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:o.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}};const Jf=new Set(["http:","https:","mailto:","tel:","ftp:"]);function Qf(t){const n=t.replace(/[\u0000-\u001F\u007F\s\u200B-\u200D\u2060\uFEFF]+/g,"");if(!/^[a-z][a-z0-9+.-]*:/i.test(n))return!0;try{const t=new URL(n).protocol.toLowerCase();return Jf.has(t)}catch{return!1}}var tv=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.state={},n.currentRef=u.createRef(),n._isRTL=(0,l.jI)(),n._hoverOff=function(){n.props.hoverLeaveCallback()},n._onBlur=function(){n.props.onBlurCallback()},n._getAriaLabel=function(){var t,i=n.props.data.data,e=i.xAxisCalloutData||i.legend,r=i.yAxisCalloutData||i.data||0;return(null===(t=i.callOutAccessibilityData)||void 0===t?void 0:t.ariaLabel)||(e?"".concat(e,", "):"")+"".concat(r,".")},n._shouldHighlightArc=function(t){var i=n.props.activeArc;return!i||0===i.length||void 0===t||i.includes(t)},n._renderArcLabel=function(t){var i=n.props,e=i.arc,r=i.data,o=i.innerRadius,a=i.outerRadius,l=i.showLabelsInPercent,s=i.totalValue;if(i.hideLabels||Math.abs(r.endAngle-r.startAngle)<Math.PI/12||!n._shouldHighlightArc(r.data.legend))return null;var c=e.centroid(r),d=c[0],f=c[1],v=Math.sqrt(d*d+f*f),h=Math.max(o,a)+2,p=(r.startAngle+r.endAngle)/2,g=r.value;return u.createElement("text",{x:(0===v?0:d/v)*h,y:(0===v?0:f/v)*h,textAnchor:p>Math.PI!==n._isRTL?"end":"start",dominantBaseline:p>Math.PI/2&&p<3*Math.PI/2?"hanging":"auto",className:t,"aria-hidden":!0},l?ju(".0%")(0===s?0:g/s):Ys(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return nv(t),null},n.prototype.updateChart=function(t){nv(t)},n.prototype.render=function(){var t,n,i,e,r,o,l,s=this.props,c=s.arc,d=s.href,f=s.focusedArcId,v=s.activeArc,h=(0,a.Z)(),g=this.props.uniqText+("string"==typeof this.props.data.data.legend?this.props.data.data.legend.replace(/\s+/g,""):"")+this.props.data.data.data,y=v&&v.length>0?v.includes(null===(t=this.props.data)||void 0===t?void 0:t.data.legend)?1:.1:1,m=null!==(i=null===(n=this.props.data)||void 0===n?void 0:n.startAngle)&&void 0!==i?i:0,b=(null!==(r=null===(e=this.props.data)||void 0===e?void 0:e.endAngle)&&void 0!==r?r:0)-m,x=this.props.roundCorners?3:0,w=h(Kf,{solidFill:this.props.enableGradient?"transparent":this.props.color,gradientFill:"conic-gradient(\n from ".concat(m,"rad,\n ").concat(this.props.color,",\n ").concat(this.props.nextColor," ").concat(b,"rad\n )"),href:d,theme:this.props.theme,opacity:y}),M=p("Arc_clip")+"".concat(this.props.color,"_").concat(this.props.nextColor);return u.createElement("g",{ref:this.currentRef},!!f&&f===g&&u.createElement("path",{id:g+"focusRing",d:c.cornerRadius(x)(this.props.focusData),className:w.focusRing}),u.createElement("path",{id:g,d:c.cornerRadius(x)(this.props.data),onFocus:this._onFocus.bind(this,this.props.data.data,g),className:w.root,"data-is-focusable":this._shouldHighlightArc(this.props.data.data.legend)||0===(null===(o=this.props.activeArc)||void 0===o?void 0:o.length),onMouseOver:this._hoverOn.bind(this,this.props.data.data),onMouseMove:this._hoverOn.bind(this,this.props.data.data),onMouseLeave:this._hoverOff,onBlur:this._onBlur,onClick:d?this._redirectToUrl.bind(this,d):null===(l=this.props.data)||void 0===l?void 0:l.data.onClick,"aria-label":this._getAriaLabel(),role:"img"}),this._renderArcLabel(w.arcLabel),this.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:M},u.createElement("path",{d:c.cornerRadius(x)(this.props.data)})),u.createElement("foreignObject",{x:"-50%",y:"-50%",width:"100%",height:"100%",clipPath:"url(#".concat(M,")")},u.createElement("div",{className:w.gradientArc}))))},n.prototype._onFocus=function(t,n){this.props.onFocusCallback(t,n,this.currentRef.current)},n.prototype._hoverOn=function(t,n){n.persist(),this.props.hoverOnCallback(t,n)},n.prototype._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},n.defaultProps={arc:Zf()},n}(u.Component);function nv(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var iv,ev,rv,ov=function(t){var n,i=t.theme;return{root:{},insideDonutString:{fontSize:It.s.xLargePlus,fontWeight:It.BO.semibold,fill:i.semanticColors.bodyText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},uv=(0,a.Z)(),av=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n,e,r){var o,a,l,s,c=t&&t.data&&t.data.color,d=c;return i.props.enableGradient&&(c=null!==(a=null===(o=i.props.data[n].gradient)||void 0===o?void 0:o[0])&&void 0!==a?a:Nc(n,0,i.props.theme.isInverted)[0],d=null!==(s=null===(l=i.props.data[n].gradient)||void 0===l?void 0:l[1])&&void 0!==s?s:Nc(n,0,i.props.theme.isInverted)[1]),u.createElement(tv,{key:n,data:t,focusData:e,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:c,nextColor:d,enableGradient:i.props.enableGradient,roundCorners:i.props.roundCorners,onFocusCallback:i._focusCallback,hoverOnCallback:i._hoverCallback,onBlurCallback:i.props.onBlurCallback,hoverLeaveCallback:i.props.hoverLeaveCallback,uniqText:i.props.uniqText,activeArc:i.props.activeArc,href:r,calloutId:i.props.calloutId,valueInsideDonut:i.props.valueInsideDonut,theme:i.props.theme,focusedArcId:i.props.focusedArcId,showLabelsInPercent:i.props.showLabelsInPercent,totalValue:i._totalValue,hideLabels:i.props.hideLabels})},i._focusCallback=function(t,n,e){i.props.onFocusCallback(t,n,e)},i._computeTotalValue=function(){var t=0;return i.props.data.forEach((function(n){t+=n.data})),t},i._hoverCallback=i._hoverCallback.bind(i),i._pieForFocusRing=Pf().sort(null).value((function(t){return t.data})).padAngle(0),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data.filter((function(t){return 0!==t.data})),r=this._pieForFocusRing(e.map((function(t){return t.data}))),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=uv(ov,{theme:this.props.theme});return this._totalValue=this._computeTotalValue(),u.createElement("g",{transform:a},o.map((function(n,i){return t.arcGenerator(n,i,r[i],t.props.href)})),this.props.valueInsideDonut&&u.createElement("text",{y:5,textAnchor:"middle",dominantBaseline:"middle",className:l.insideDonutString},this.props.valueInsideDonut))},n.prototype.componentDidUpdate=function(){var t,n,i;t=uv(ov,{theme:this.props.theme}).insideDonutString,n=2*this.props.innerRadius-5,i=0,cl(".".concat(t)).each((function(){for(var t=sl(this),e=t.text().split(/\s+/).reverse(),r="",o=[],u=0,a=t.attr("y"),l=t.text(null).append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em");r=e.pop();)o.push(r),l.text(o.join(" ")+" "),l.node().getComputedTextLength()>n&&o.length>1&&(o.pop(),l.text(o.join(" ")+" "),o=[r],l=t.append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em").text(r));i+=1}))},n.prototype._hoverCallback=function(t,n){this.props.hoverOnCallback(t,n)},n.defaultProps={pie:Pf().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),lv=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._tooltipHostId=p("tooltip-host"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._measureText=function(){if(e._tooltipHost.current&&"function"==typeof e._tooltipHost.current.getBBox){var t=e._tooltipHost.current.getBBox();e.setState({textX:t.x,textY:t.y,textWidth:t.width,textHeight:t.height})}},e._getTargetElement=function(){if(e._tooltipHost.current)return e._tooltipHost.current},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipBlur=function(t){e._ignoreNextFocusEvent=(null===document||void 0===document?void 0:document.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props.delay;if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e.state.isOverflowing&&(!t.target||!Hc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==id.zero){var r=e._getDelayTime(i);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),r)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t})},e._getDelayTime=function(t){switch(t){case id.medium:return 300;case id.long:return 500;default:return 0}},e._wrapContent=function(){var t=e.props,n=t.content,i=t.wrapContent,r=t.maxWidth,o=void 0===r?Number.POSITIVE_INFINITY:r,u=t.maxHeight,a=!1;n&&i&&i(n,e._tooltipHostId,o,u)&&(a=!0),e.state.isOverflowing!==a&&e.setState({isOverflowing:a})},e.state={isTooltipVisible:!1,isOverflowing:!1},e._async=new Nt(e),e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.content,i=t.tooltipProps,e=t.textProps,r=t.shouldReceiveFocus,a=void 0===r||r,l=t.showBackground,s=void 0!==l&&l,c=this.state,d=c.isTooltipVisible,f=c.textWidth,v=c.textHeight,h=(0,o.Cl)({content:n,targetElement:this._getTargetElement(),calloutProps:{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},i),p=!!this.props.isTooltipVisibleProp&&this.state.isOverflowing&&!!n||d&&!!n,g=("number"==typeof(null==e?void 0:e.x)?e.x:0)-(null!=f?f:0)/2-3,y=("number"==typeof(null==e?void 0:e.y)?e.y:0)-(null!=v?v:0)/2-6;return u.createElement(u.Fragment,null,s&&u.createElement("rect",{x:g,y:y,width:(null!=f?f:0)+6,height:(null!=v?v:0)+3,transform:null==e?void 0:e.transform,className:this.props.className}),u.createElement("text",(0,o.Cl)({},e,{id:this._tooltipHostId,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"data-is-focusable":a&&this.state.isOverflowing}),n),p&&u.createElement(od,(0,o.Cl)({},h)))},n.prototype.componentDidMount=function(){this._wrapContent(),this._measureText()},n.prototype.componentDidUpdate=function(t){this.props.maxWidth===t.maxWidth&&this.props.maxHeight===t.maxHeight||(this._wrapContent(),this._measureText())},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:id.medium},n}(u.Component);!function(t){t.shade30="#004578",t.shade20="#005a9e",t.shade10="#106ebe",t.primary="#0078d4",t.tint10="#2b88d8",t.tint20="#c7e0f4",t.tint30="#deecf9",t.tint40="#eff6fc"}(iv||(iv={})),function(t){t.black="#000000",t.gray220="#11100f",t.gray210="#161514",t.gray200="#1b1a19",t.gray190="#201f1e",t.gray180="#252423",t.gray170="#292827",t.gray160="#323130",t.gray150="#3b3a39",t.gray140="#484644",t.gray130="#605e5c",t.gray120="#797775",t.gray110="#8a8886",t.gray100="#979593",t.gray90="#a19f9d",t.gray80="#b3b0ad",t.gray70="#bebbb8",t.gray60="#c8c6c4",t.gray50="#d2d0ce",t.gray40="#e1dfdd",t.gray30="#edebe9",t.gray20="#f3f2f1",t.gray10="#faf9f8",t.white="#ffffff"}(ev||(ev={})),function(t){t.pinkRed10="#750b1c",t.red20="#a4262c",t.red10="#d13438",t.redOrange20="#603d30",t.redOrange10="#da3b01",t.orange30="#8e562e",t.orange20="#ca5010",t.orange10="#ffaa44",t.yellow10="#fce100",t.orangeYellow20="#986f0b",t.orangeYellow10="#c19c00",t.yellowGreen10="#8cbd18",t.green20="#0b6a0b",t.green10="#498205",t.greenCyan10="#00ad56",t.cyan40="#005e50",t.cyan30="#005b70",t.cyan20="#038387",t.cyan10="#00b7c3",t.cyanBlue20="#004e8c",t.cyanBlue10="#0078d4",t.blue10="#4f6bed",t.blueMagenta40="#373277",t.blueMagenta30="#5c2e91",t.blueMagenta20="#8764b8",t.blueMagenta10="#8378de",t.magenta20="#881798",t.magenta10="#c239b3",t.magentaPink20="#9b0062",t.magentaPink10="#e3008c",t.gray40="#393939",t.gray30="#7a7574",t.gray20="#69797e",t.gray10="#a0aeb2"}(rv||(rv={}));var sv=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},cv=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:ev.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},dv=function(t){var n;return{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:t.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},fv=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},vv=function(t){var n;return(0,o.Cl)((0,o.Cl)({},t.fonts.small),{fontWeight:It.BO.semibold,fontStyle:"normal",fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)})},hv=function(t){var n;return{fill:t.semanticColors.bodyBackground,selectors:(n={},n[It.up]={fill:"Canvas"},n)}};function pv(t,n,i,e){var r,o,u,a,l,s,c={};if(t&&Object.assign(c,t.family&&{fontFamily:t.family},t.size&&{fontSize:"".concat(t.size,"px")},t.weight&&{fontWeight:t.weight},t.color&&{fill:t.color},t.shadow&&"none"!==t.shadow&&{filter:"drop-shadow(".concat(t.shadow,")")}),n&&(l={left:"left",center:"center",right:"right"})[s=n.toLowerCase()]&&(c.textAlign=l[s]),i&&(l={top:"flex-start",middle:"center",bottom:"flex-end"})[s=i.toLowerCase()]&&(c.alignSelf=l[s]),e){var d=null!==(r=e.t)&&void 0!==r?r:0,f=null!==(o=e.r)&&void 0!==o?o:0,v=null!==(u=e.b)&&void 0!==u?u:0,h=null!==(a=e.l)&&void 0!==a?a:0;c.padding="".concat(d,"px ").concat(f,"px ").concat(v,"px ").concat(h,"px")}return c}var gv=function(t){var n,i,e,r,a=t.title,l=t.x,s=t.y,c=t.maxWidth,d=t.className,f=t.titleStyles,v=t.tooltipProps,h=t.tooltipClassName,p=t.theme,g=null!=f?f:{},y=g.titleFont,m=g.titleXAnchor,b=g.titleYAnchor,x=g.titlePad,w="left"===m?"start":"right"===m?"end":"middle",M="top"===b?"hanging":"bottom"===b?"alphabetic":"middle"===b?"central":"auto",C=l+(null!==(n=null==x?void 0:x.l)&&void 0!==n?n:0)-(null!==(i=null==x?void 0:x.r)&&void 0!==i?i:0),k=(null!=s?s:Math.max(("number"==typeof(null==y?void 0:y.size)?y.size:13)+8,12))+(null!==(e=null==x?void 0:x.t)&&void 0!==e?e:0)-(null!==(r=null==x?void 0:x.b)&&void 0!==r?r:0),A=(0,o.Cl)({wrapContent:Vs,showBackground:!0,className:h,theme:p},v);return u.createElement(lv,(0,o.Cl)({},A,{content:a,textProps:{x:C,y:k,textAnchor:w,dominantBaseline:M,className:d,"aria-hidden":!0,style:pv(y)},maxWidth:c}))};gv.displayName="ChartTitle";var yv=(0,a.Z)(),mv=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return af([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)},e._closeCallout=function(){e.setState({showHover:!1})},e._focusCallback=function(t,n,i){e._currentHoverElement=i,e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,focusedArcId:n,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})},e._hoverCallback=function(t,n){var i,r,o,u;if(e._calloutAnchorPoint!==t){e._calloutAnchorPoint=t,e._currentHoverElement=n;var a=t.color;if(e.props.enableGradient){var l=Math.max((null===(r=null===(i=e.props.data)||void 0===i?void 0:i.chartData)||void 0===r?void 0:r.findIndex((function(n){return n.legend===t.legend})))||0,0);a=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(l,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0]}e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:a,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})}},e._onBlur=function(){e.setState({focusedArcId:""})},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({showHover:!1})},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendsHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ss(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},Ec(e),e.state={showHover:!1,value:"",legend:"",_width:e.props.width||200,_height:e.props.height||200,activeLegend:void 0,color:"",xCalloutValue:"",yCalloutValue:"",focusedArcId:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[]},e._hoverCallback=e._hoverCallback.bind(e),e._focusCallback=e._focusCallback.bind(e),e._hoverLeave=e._hoverLeave.bind(e),e._calloutId=p("callout"),e._uniqText=p("_Pie_"),e._emptyChartId=p("_DonutChart_empty"),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e;return t.width&&t.width!==n._width&&(i={_width:t.width}),t.height&&t.height!==n._height&&(e={_height:t.height-40}),(0,o.Cl)((0,o.Cl)({},i),e)},n.prototype.componentDidMount=function(){if(this._rootElem){var t=this._getTitleHeight();this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40-t})}},n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.hideLegend,r=void 0!==e&&e,a=this._addDefaultColors(null==i?void 0:i.chartData);this._classNames=yv(this.props.styles,{theme:this.props.theme,color:this.state.color,className:this.props.className});var l=this._createLegends(a.filter((function(t){return t.data>=0}))),s=this.props.hideLabels?0:80,c=this.props.hideLabels?0:40,d=this._getTitleHeight(),f=Math.min(this.state._width-s,this.state._height-c)/2,v=this._elevateToMinimums(a),h=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,v):"";return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n},onMouseLeave:this._handleChartMouseLeave},this.props.xAxisAnnotation&&u.createElement("text",{className:this._classNames.axisAnnotation,x:this.state._width/2,y:this.state._height-10,textAnchor:"middle"},this.props.xAxisAnnotation),u.createElement(td,{direction:dc.horizontal,handleTabKey:1,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,"aria-label":null==i?void 0:i.chartTitle,ref:function(n){return t._setViewBox(n)},width:this.state._width,height:this.state._height},!r&&(null==i?void 0:i.chartTitle)&&u.createElement(gv,{title:i.chartTitle,x:this.state._width/2,maxWidth:this.state._width-20,className:this._classNames.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:this._classNames.svgTooltip}),u.createElement("g",{transform:"translate(0, ".concat(d,")")},u.createElement(av,{width:this.state._width,height:this.state._height,outerRadius:f,innerRadius:this.props.innerRadius,data:v,enableGradient:this.props.enableGradient,roundCorners:this.props.roundCorners,onFocusCallback:this._focusCallback,hoverOnCallback:this._hoverCallback,hoverLeaveCallback:this._hoverLeave,uniqText:this._uniqText,onBlurCallback:this._onBlur,activeArc:this._getHighlightedLegend(),focusedArcId:this.state.focusedArcId||"",href:this.props.href,calloutId:this._calloutId,valueInsideDonut:this._toLocaleString(h),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels})))),u.createElement($n,(0,o.Cl)({target:this._currentHoverElement,alignTargetEdge:!0,isBeakVisible:!1,directionalHint:3,gapSpace:15,hidden:!(!this.props.hideTooltip&&this.state.showHover),id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.value,color:this.state.color,culture:this.props.culture})),!r&&u.createElement("div",{className:this._classNames.legendContainer,style:{marginTop:d}},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._getTitleHeight=function(){var t,n,i=this.props.data;return(null==i?void 0:i.chartTitle)?Math.max(("number"==typeof(null===(n=null===(t=this.props.titleStyles)||void 0===t?void 0:t.titleFont)||void 0===n?void 0:n.size)?this.props.titleStyles.titleFont.size:13)+20,36):0},n.prototype._elevateToMinimums=function(t){var n=0,i=[];return t.forEach((function(t){n+=t.data})),t.forEach((function(t){i.push(.01*n>t.data&&t.data>0?(0,o.Cl)((0,o.Cl)({},t),{data:.01*n,yAxisCalloutData:void 0===t.yAxisCalloutData?t.data.toLocaleString():t.yAxisCalloutData}):t)})),i},n.prototype._setViewBox=function(t){var n,i;if(null!==t){var e=t.parentElement?t.parentElement.clientWidth:this.state._width,r=t.parentElement&&(null===(n=t.parentElement)||void 0===n?void 0:n.offsetHeight)>this.state._height?null===(i=t.parentElement)||void 0===i?void 0:i.offsetHeight:this.state._height,o="0 0 ".concat(e," ").concat(r);t.setAttribute("viewBox",o)}},n.prototype._createLegends=function(t){var n=this;"sorted"===this.props.order&&t.sort((function(t,n){return n.data-t.data}));var i=t.map((function(t,i){var e,r,o=n.props.enableGradient?(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(i,0,null===(r=n.props.theme)||void 0===r?void 0:r.isInverted)[0]:t.color;return{title:t.legend,color:o,hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:t.legend})},onMouseOutAction:function(){n.setState({activeLegend:void 0})}}}));return u.createElement(bf,(0,o.Cl)({legends:i,centerLegends:!0,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;this.props.legendProps&&(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._hoverLeave=function(){},n.prototype._valueInsideDonut=function(t,n){var i=this,e=this._getHighlightedLegend();if(void 0===t||1!==e.length&&!this.state.showHover){if(e.length>0){var r=0;return n.forEach((function(t){e.includes(t.legend)&&(r+=t.data)})),r}return t}var o=n.find((function(t){return i._isLegendHighlighted(t.legend)}));return o?o.yAxisCalloutData?o.yAxisCalloutData:o.data:t},n.prototype._toLocaleString=function(t){var n=(0,Yn.c$)(t,this.props.culture,this.props.useUTC);return n?null==n?void 0:n.toString():t},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.filter((function(t){return t.data>0})).length>0)},n.defaultProps={innerRadius:0,hideLabels:!0},n}(u.Component),bv=(0,r.I)(mv,(function(t){var n=t.className,i=t.theme;return{root:[i.fonts.medium,"ms-DonutChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},n],chart:{boxSizing:"content-box",overflow:"visible",alignmentAdjust:"center",display:"block"},legendContainer:{paddingTop:"16px",width:"100%"},chartTitle:vv(i),axisAnnotation:cv(i,i.fonts.small),svgTooltip:hv(i)}}));function xv(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var e=i.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,[(e=e.matrixTransform(n.getScreenCTM().inverse())).x,e.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}function wv(t){return t[0]}function Mv(t){return t[1]}function Cv(t,n){var i=wf(!0),e=null,r=hl,o=null,u=jf(a);function a(a){var l,s,c,d=(a=xf(a)).length,f=!1;for(null==e&&(o=r(c=u())),l=0;l<=d;++l)!(l<d&&i(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+n(s,l,a));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?wv:wf(t),n="function"==typeof n?n:void 0===n?Mv:wf(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:wf(!!t),a):i},a.curve=function(t){return arguments.length?(r=t,null!=e&&(o=r(e)),a):r},a.context=function(t){return arguments.length?(null==t?e=o=null:o=r(e=t),a):e},a}var kv="4px 8px",Av=function(t,n){if(t){var i=Eo(t);return i?(i.opacity=Math.max(0,Math.min(1,n)),i.toString()):t}},Sv=function(t){var n=t.theme,i=t.className,e=function(t){return Av(t.semanticColors.bodyBackground,.8)}(n),r=n.semanticColors.bodyText,o=n.semanticColors.bodyDivider;return{root:[{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible",zIndex:1},i],annotation:[n.fonts.small,{position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",color:r,padding:kv,borderRadius:4,whiteSpace:"pre-wrap",zIndex:2,backgroundColor:e,boxShadow:n.effects.elevation4,border:"1px solid ".concat(o)}],annotationNoDefaults:[n.fonts.small,{position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",color:r,padding:kv,borderRadius:4,whiteSpace:"pre-wrap",zIndex:2}],connectorLayer:[{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"}],measurement:[{position:"absolute",visibility:"hidden",pointerEvents:"none"}],annotationContent:[{width:"100%",height:"100%",pointerEvents:"none"}],annotationForeignObject:[{overflow:"visible",pointerEvents:"none"}],annotationContentInteractive:[{pointerEvents:"auto"}],annotationForeignObjectInteractive:[{pointerEvents:"auto"}],connectorGroup:[{pointerEvents:"none"}]}},Lv=(0,a.Z)(),Vv="<".codePointAt(0),Dv=">".codePointAt(0),Nv=function(t,n){var i,e;return null!==(e=null!==(i=t.id)&&void 0!==i?i:"string"==typeof t.text||"number"==typeof t.text?String(t.text):void 0)&&void 0!==e?e:"annotation-".concat(n)},Ov=function(t,n){if(0!==n.length){var i=t[t.length-1];i&&"text"===i.type?i.content+=n:t.push({type:"text",content:n})}},Tv=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"<br />":"<".concat(t.tag,">").concat(Tv(t.children),"</").concat(t.tag,">")})).join("")},Ev=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"\n":Ev(t.children)})).join("")},Fv=function(t,n){return t.map((function(t,i){var e="".concat(n,"-").concat(i);if("text"===t.type)return u.createElement(u.Fragment,{key:e},t.content);if("br"===t.type)return u.createElement("br",{key:e});var r="b"===t.tag?"strong":"em";return u.createElement.apply(u,(0,o.fX)([r,{key:e}],Fv(t.children,e),!1))}))},Bv=function(t,n){var i,e=Fv(t,n);return e.length<=1?null!==(i=e[0])&&void 0!==i?i:null:e},Pv=function(t,n){var i=null==t?void 0:t(n);if("number"==typeof i&&!Number.isNaN(i))return t&&"function"==typeof t.bandwidth?i+t.bandwidth()/2:i},_v=function(t,n,i){return Math.max(n,Math.min(i,t))},Hv=u.memo((function(t){var n=t.annotations,i=t.theme,e=t.context,r=t.className,a=t.hideDefaultStyles,l=Lv(Sv,{theme:i,className:r}),s=u.useMemo((function(){return p("chart-annotation")}),[]),c=u.useState({}),d=c[0],f=c[1],v=u.useMemo((function(){return(null!=n?n:[]).map((function(t,n){return{annotation:t,key:Nv(t,n)}}))}),[n]);u.useEffect((function(){f((function(t){if(0===v.length)return 0===Object.keys(t).length?t:{};var n={};if(v.forEach((function(i){var e=i.key;t[e]&&(n[e]=t[e])})),Object.keys(n).length===Object.keys(t).length){for(var i=!0,e=0,r=Object.keys(n);e<r.length;e++){var o=r[e];if(n[o]!==t[o]){i=!1;break}}if(i)return t}return n}))}),[v]);var h=u.useCallback((function(t,n,i,e){f((function(r){var u,a=r[t];return a&&a.signature===e&&Math.abs(a.width-n)<.5&&Math.abs(a.height-i)<.5||0===n&&0===i?r:(0,o.Cl)((0,o.Cl)({},r),((u={})[t]={width:n,height:i,signature:e},u))}))}),[]),g=[],y=[],m=[];if(v.forEach((function(t){var n,r,s,c,f,v,p,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z,$,Y,X,G,U,q,Z=t.annotation,K=t.key,J=function(t,n){var i,e,r=t.coordinates,o=t.layout;if(r){var u=null!==(i=null==o?void 0:o.offsetX)&&void 0!==i?i:0,a=null!==(e=null==o?void 0:o.offsetY)&&void 0!==e?e:0,l={x:0,y:0};switch(r.type){case"data":var s=r.x,c=r.y,d=r.yAxis,f=void 0===d?"primary":d,v=n.xScale,h="secondary"===f?n.yScaleSecondary:n.yScalePrimary;if(!v||!h)return;var p=Pv(v,s instanceof Date?s.getTime():s),g=Pv(h,c instanceof Date?c.getTime():c);if("number"!=typeof p||"number"!=typeof g)return;l.x=p,l.y=g;break;case"relative":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+n.plotRect.width*r.x,l.y=n.plotRect.y+n.plotRect.height*r.y;break;case"pixel":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+r.x,l.y=n.plotRect.y+r.y;break;default:return}var y=l.x+u,m=l.y+a;return(null==o?void 0:o.clipToBounds)&&(y=_v(y,n.plotRect.x,n.plotRect.x+n.plotRect.width),m=_v(m,n.plotRect.y,n.plotRect.y+n.plotRect.height)),{anchor:l,point:{x:y,y:m}}}}(Z,e);if(J){var Q=function(t){var n,i;if(!t)return[];for(var e,r=function(t){var n={amp:"&",quot:'"',apos:"'",nbsp:" "},i=t.replace(/&(#x?[0-9a-f]+|#\d+|[a-z][\w-]*);/gi,(function(t,i){var e,r=i.toLowerCase();if("lt"===r||"gt"===r)return"&".concat(r,";");if(r.startsWith("#")){var o="x"===r[1],u=r.slice(o?2:1),a=Number.parseInt(u,o?16:10);return Number.isNaN(a)?t:a===Vv?"&lt;":a===Dv?"&gt;":String.fromCodePoint(a)}return null!==(e=n[r])&&void 0!==e?e:t}));return i.replace(/&lt;([^;]+)&gt;/gi,(function(t,n){switch(n.trim().replace(/\s+/g," ").toLowerCase()){case"b":return"<b>";case"/b":return"</b>";case"i":return"<i>";case"/i":return"</i>";case"br":case"br/":case"br /":return"<br />";default:return t}}))}(t),o=[],u=[{node:null}],a=function(){var t,n;return null!==(n=null===(t=u[u.length-1].node)||void 0===t?void 0:t.children)&&void 0!==n?n:o},l=/<\/?([a-z]+)\s*\/?\s*>/gi,s=0;null!==(e=l.exec(r));){var c=e[0],d=e[1].toLowerCase(),f=c.startsWith("</"),v=/\/\s*>$/.test(c);if(Ov(a(),r.slice(s,e.index)),s=e.index+c.length,"br"!==d||f)if("b"!==d&&"i"!==d||v)Ov(a(),c);else if(f){var h=u[u.length-1].node;u.length>1&&(null==h?void 0:h.tag)===d?u.pop():Ov(a(),c)}else{if(u.length-1>=5){Ov(a(),c);continue}var p={type:"element",tag:d,children:[]};a().push(p),u.push({node:p})}else a().push({type:"br"})}for(Ov(a(),r.slice(s));u.length>1;)if(p=u.pop().node){var g=null!==(i=null===(n=u[u.length-1].node)||void 0===n?void 0:n.children)&&void 0!==i?i:o;if(g[g.length-1]===p)g.pop();else{var y=g.indexOf(p);-1!==y&&g.splice(y,1)}Ov(g,"<".concat(p.tag,">").concat(Tv(p.children),"</").concat(p.tag,">"))}return o}(void 0===Z.text||null===Z.text?"":String(Z.text)),tt=JSON.stringify(Q),nt=Ev(Q),it=Z.layout,et=null!==(n=null==it?void 0:it.align)&&void 0!==n?n:"center",rt=null!==(r=null==it?void 0:it.verticalAlign)&&void 0!==r?r:"middle",ot=null!==(c=null===(s=Z.style)||void 0===s?void 0:s.opacity)&&void 0!==c?c:.8,ut=null!==(v=null===(f=Z.style)||void 0===f?void 0:f.backgroundColor)&&void 0!==v?v:i.semanticColors.bodyBackground,at=void 0!==(null===(p=Z.style)||void 0===p?void 0:p.backgroundColor)||void 0!==(null===(b=Z.style)||void 0===b?void 0:b.opacity),lt=(0,o.Cl)((0,o.Cl)({maxWidth:null==it?void 0:it.maxWidth},at?{backgroundColor:Av(ut,ot)}:!a&&{backgroundColor:Av(i.semanticColors.bodyBackground,.8)}),{borderColor:null===(x=Z.style)||void 0===x?void 0:x.borderColor,borderWidth:null===(w=Z.style)||void 0===w?void 0:w.borderWidth,borderStyle:null!==(C=null===(M=Z.style)||void 0===M?void 0:M.borderStyle)&&void 0!==C?C:(null===(k=Z.style)||void 0===k?void 0:k.borderColor)?"solid":void 0,borderRadius:null===(A=Z.style)||void 0===A?void 0:A.borderRadius,padding:null===(S=Z.style)||void 0===S?void 0:S.padding,boxShadow:null===(L=Z.style)||void 0===L?void 0:L.boxShadow}),st={color:null===(V=Z.style)||void 0===V?void 0:V.textColor,fontSize:null===(D=Z.style)||void 0===D?void 0:D.fontSize,fontWeight:null===(N=Z.style)||void 0===N?void 0:N.fontWeight,opacity:1};"number"!=typeof(null===(O=Z.style)||void 0===O?void 0:O.rotation)||Number.isNaN(Z.style.rotation)||(lt.transform="rotate(".concat(Z.style.rotation,"deg)"),lt.transformOrigin="50% 50%");var ct=function(t,n,i,e,r){return JSON.stringify({annotationContentSignature:t,containerStyle:n,contentStyle:i,layoutClassName:null!=e?e:"",styleClassName:null!=r?r:""})}(tt,lt,st,null==it?void 0:it.className,null===(T=Z.style)||void 0===T?void 0:T.className),dt=d[K],ft=(null==dt?void 0:dt.signature)===ct,vt=ft?dt:void 0,ht=Math.max(null!==(F=null!==(E=null==vt?void 0:vt.width)&&void 0!==E?E:null==it?void 0:it.maxWidth)&&void 0!==F?F:180,1),pt=Math.max(null!==(B=null==vt?void 0:vt.height)&&void 0!==B?B:60,1),gt="center"===et?-ht/2:"end"===et?-ht:0,yt="middle"===rt?-pt/2:"bottom"===rt?-pt:0,mt=J.point.x+gt,bt=J.point.y+yt,xt=!1!==(null==it?void 0:it.clipToBounds),wt=xt?e.plotRect.x:0,Mt=xt?e.plotRect.y:0,Ct=xt?e.plotRect.width:null!==(P=e.svgRect.width)&&void 0!==P?P:0,kt=xt?e.plotRect.height:null!==(_=e.svgRect.height)&&void 0!==_?_:0,At=Ct>0?wt+Ct-ht:mt,St=kt>0?Mt+kt-pt:bt,Lt=Ct>0?_v(mt,wt,Math.max(wt,At)):mt,Vt=kt>0?_v(bt,Mt,Math.max(Mt,St)):bt,Dt={x:Lt-gt,y:Vt-yt};if(Z.connector){var Nt=null!==(H=Z.connector.startPadding)&&void 0!==H?H:12,Ot=null!==(I=Z.connector.endPadding)&&void 0!==I?I:0,Tt=Math.max(Nt+Ot+6,Nt),Et=Dt.x-J.anchor.x,Ft=Dt.y-J.anchor.y;if((zt=Math.sqrt(Et*Et+Ft*Ft))<Tt){var Bt={x:0,y:-1},Pt=0===zt?Bt.x:Et/zt,_t=0===zt?Bt.y:Ft/zt,Ht=J.anchor.x+Pt*Tt+gt,It=J.anchor.y+_t*Tt+yt;Dt={x:(Lt=Ht=Ct>0?_v(Ht,wt,Math.max(wt,At)):Ht)-gt,y:(Vt=It=kt>0?_v(It,Mt,Math.max(Mt,St)):It)-yt}}}var Wt=(0,o.Cl)({position:"absolute",left:Lt,top:Vt,pointerEvents:"none",visibility:"hidden"},lt),Rt=a?l.annotationNoDefaults:l.annotation;if(ft||y.push(u.createElement("div",{key:"".concat(K,"-measurement"),ref:function(t){if(t){var n=t.getBoundingClientRect();0===n.width&&0===n.height||h(K,n.width,n.height,ct)}},className:j(Rt,l.measurement,null==it?void 0:it.className,null===(W=Z.style)||void 0===W?void 0:W.className),style:Wt,"aria-hidden":!0,"data-annotation-key":K,"data-chart-annotation-measurement":"true"},u.createElement("div",{className:j(l.annotationContent,null==it?void 0:it.className,null===(R=Z.style)||void 0===R?void 0:R.className),style:st},Bv(Q,"".concat(K,"-measurement"))))),g.push(u.createElement("foreignObject",{key:"".concat(K,"-annotation"),x:Lt,y:Vt,width:ht,height:pt,className:j(l.annotationForeignObject),"data-annotation-key":K},u.createElement("div",{className:j(Rt,null==it?void 0:it.className,null===(z=Z.style)||void 0===z?void 0:z.className),style:lt,"data-annotation-key":K},u.createElement("div",{className:j(l.annotationContent,null===($=Z.style)||void 0===$?void 0:$.className),style:st,role:null!==(X=null===(Y=Z.accessibility)||void 0===Y?void 0:Y.role)&&void 0!==X?X:"note","aria-label":null!==(U=null===(G=Z.accessibility)||void 0===G?void 0:G.ariaLabel)&&void 0!==U?U:nt||void 0,"aria-describedby":null===(q=Z.accessibility)||void 0===q?void 0:q.ariaDescribedBy,"data-chart-annotation":"true","data-annotation-key":K},Bv(Q,"".concat(K,"-content")))))),Z.connector){var zt,jt=Z.connector,$t=jt.startPadding,Yt=(Nt=void 0===$t?12:$t,jt.endPadding),Xt=(Ot=void 0===Yt?0:Yt,jt.strokeColor),Gt=void 0===Xt?function(t){return t.palette.neutralPrimary}(i):Xt,Ut=jt.strokeWidth,qt=void 0===Ut?2:Ut,Zt=jt.dashArray,Kt=jt.arrow,Jt=void 0===Kt?"end":Kt,Qt=(Et=J.anchor.x-Dt.x,Ft=J.anchor.y-Dt.y,Pt=Et/(zt=Math.sqrt(Et*Et+Ft*Ft)||1),_t=Ft/zt,Math.max(1,Math.min(ht,pt))),tn=Nt>0?1.25*Nt:24,nn=.6*zt,en=_v(.35*Qt,6,Math.min(24,tn,nn)),rn=_v(qt,1,en/2),on={x:Dt.x+Pt*Nt,y:Dt.y+_t*Nt},un={x:J.anchor.x-Pt*Ot,y:J.anchor.y-_t*Ot};m.push({key:"".concat(K,"-connector"),start:on,end:un,strokeColor:Gt,strokeWidth:qt,dashArray:Zt,arrow:Jt,markerSize:en,markerStrokeWidth:rn})}}})),0===g.length&&0===m.length)return null;var b=e.svgRect.width||1,x=e.svgRect.height||1,w=[],M=function(t,n,i,e){var r="".concat(s,"-").concat(n,"-").concat(w.length),o=i/2,a="end"===n?i:0,l="M0 0 L ".concat(i," ").concat(o," L0 ").concat(i," Z"),c="M ".concat(i," 0 L0 ").concat(o," L ").concat(i," ").concat(i," Z"),d="end"===n?l:c;return w.push(u.createElement("marker",{key:r,id:r,markerWidth:i,markerHeight:i,viewBox:"0 0 ".concat(i," ").concat(i),refX:a,refY:o,orient:"auto",markerUnits:"userSpaceOnUse"},u.createElement("path",{d:d,fill:t,stroke:t,strokeWidth:e,strokeLinecap:"round",strokeLinejoin:"round"}))),r},C=m.map((function(t){var n,i;return"start"!==t.arrow&&"both"!==t.arrow||(n=M(t.strokeColor,"start",t.markerSize,t.markerStrokeWidth)),"end"!==t.arrow&&"both"!==t.arrow||(i=M(t.strokeColor,"end",t.markerSize,t.markerStrokeWidth)),u.createElement("line",{key:t.key,x1:t.start.x,y1:t.start.y,x2:t.end.x,y2:t.end.y,stroke:t.strokeColor,strokeWidth:t.strokeWidth,strokeDasharray:t.dashArray,strokeLinecap:"round",markerStart:n?"url(#".concat(n,")"):void 0,markerEnd:i?"url(#".concat(i,")"):void 0})})),k=m.length>0||g.length>0;return u.createElement("div",{className:l.root,role:"presentation","data-chart-annotation-layer":"true"},k&&u.createElement("svg",{className:l.connectorLayer,width:"100%",height:"100%",viewBox:"0 0 ".concat(b," ").concat(x),preserveAspectRatio:"none","data-chart-annotation-svg":"true"},w.length>0&&u.createElement("defs",null,w),C.length>0&&u.createElement("g",{"aria-hidden":"true",className:l.connectorGroup},C),g),y)}));Hv.displayName="ChartAnnotationLayer";var Iv=(0,a.Z)(),Wv=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),Rv=function(t){function n(n){var i=t.call(this,n)||this;return i.minLegendContainerHeight=32,i._isRtl=(0,l.jI)(),i._isFirstRender=!0,i._removalValueForTextTuncate=0,i._yAxisTickText=[],i.isIntegralDataset=!0,i.calculateMaxYAxisLabelLength=function(t){return Ds(i._yAxisTickText.map((function(t){return n=t,i.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,i.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},i._multiValueCallout=function(t){var n=i._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:i._classNames.calloutContentRoot},u.createElement("div",{className:i._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:i._classNames.calloutContentX},$s(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,i.props.culture,i.props.useUTC))),u.createElement("div",{className:i._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,e,r){var a=e+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},$s(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(e),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),i._getCalloutContent(t,e,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:i._classNames.descriptionMessage},t.descriptionMessage)))},i._getData=function(t,n,e){i.props.getGraphData&&i.props.getGraphData(t,n,i.state.containerHeight-i._removalValueForTextTuncate,i.state.containerWidth,i.xAxisElement,i.yAxisElement,e)},i._onChartLeave=function(){i.props.onChartMouseLeave&&i.props.onChartMouseLeave()},i._calculateChartMinWidth=function(){var t=i._calcMaxLabelWidthWithTransform(i._tickLabels)+10,n=i.margins.left+i.margins.right+t*(i._tickLabels.length-1);return[ts.GroupedVerticalBarChart,ts.VerticalBarChart,ts.VerticalStackedBarChart].includes(i.props.chartType)&&(n+=16),n},i._getChartDescription=function(){return(i.props.chartTitle||"Chart. ")+i._getAxisTitle("X",i.props.xAxisTitle,i.props.xAxisType)+i._getAxisTitle("Y",i.props.yAxisTitle,i.props.yAxisType||is.NumericAxis)+(i.props.secondaryYScaleOptions?i._getAxisTitle("secondary Y",i.props.secondaryYAxistitle,is.NumericAxis):"")},i._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===ns.StringAxis||i===is.StringAxis?"categories":i===ns.DateAxis||i===is.DateAxis?"time":"values"))+". "},i._calcMaxLabelWidthWithTransform=function(t){if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===ns.StringAxis){var n=Ds(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(i.props.showXAxisLablesTooltip){var e=t.map((function(t){var n=i.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),r=Ds(e,".".concat(i._classNames.xAxis," text"));return Math.ceil(r)}if(i.props.wrapXAxisLables){var o=[];t.forEach((function(t){o.push.apply(o,t.toString().split(/\s+/))}));var u=Ds(o,".".concat(i._classNames.xAxis," text"));return Math.max(Math.ceil(u),10)}var a=Ds(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(a)},i._transformXAxisLabels=function(){var t,n,e;if(i._removalValueForTextTuncate=0,i.props.wrapXAxisLables||i.props.showXAxisLablesTooltip){var r=void 0;i.props.xAxisType===ns.StringAxis&&(r=((null===(t=i.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?i._xScale.step():i.state.containerWidth);var o={node:i.xAxisElement,xAxis:i._xScale,showXAxisLablesTooltip:i.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:i.props.noOfCharsToTruncate||4,width:r,container:i.chartContainer};i._removalValueForTextTuncate=null!==(n=Ls(o))&&void 0!==n?n:0}if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===ns.StringAxis){var u=null!==(e=function(t){var n=t.node,i=t.xAxis;if(null!==n&&null!==i){var e=0,r=[];sl(n).call(i).selectAll(".tick").each((function(){var t=this.getAttribute("transform");if(-1===(null==t?void 0:t.indexOf("rotate"))){var n=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");2===n.length&&(r.push(n[0]),this.setAttribute("transform","translate(".concat(n[0],",0)rotate(-45)")))}var i=this.getBoundingClientRect(),o=i&&i.height;o>e&&(e=o)}));var o=0;return sl(n).call(i).selectAll(".tick").each((function(){r.length>o&&(this.setAttribute("transform","translate(".concat(r[o],",").concat(e/2,")rotate(-45)")),o+=1)})),Math.floor(e/1.414)}}({node:i.xAxisElement,xAxis:i._xScale}))&&void 0!==e?e:0;i._removalValueForTextTuncate=u+i.margins.bottom}},i._calcMargins=function(){var t=i._getDefaultMargins();return t=i._applyTitleMargins(t),t=i._applyAnnotationMargins(t),i._isRtl&&(t=i._swapRtlMargins(t)),(0,o.Cl)((0,o.Cl)({},t),i.props.margins)},i._getDefaultMargins=function(){return{top:20,bottom:35,left:Math.max(40,i.state.startFromX+20),right:i.props.secondaryYScaleOptions?40:20}},i._applyTitleMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisTitle&&""!==i.props.xAxisTitle&&(n.bottom+=20),void 0!==i.props.yAxisTitle&&""!==i.props.yAxisTitle&&(n.left+=24),void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle&&(n.right+=24),n},i._applyAnnotationMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisAnnotation&&""!==i.props.xAxisAnnotation&&(n.top+=20),void 0===i.props.yAxisAnnotation||""===i.props.yAxisAnnotation||void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle||(n.right+=24),n},i._swapRtlMargins=function(t){return(0,o.Cl)((0,o.Cl)({},t),{left:t.right,right:t.left})},i.state={containerHeight:0,containerWidth:0,_width:i.props.width||600,_height:i.props.height||350,startFromX:0},i.idForGraph=p("chart_"),i.idForDefaultTabbableElement=p("defaultTabbableElement_"),i._tooltipId=p("tooltip_"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),this.props.showYAxisLables){var t=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==t&&this.setState({startFromX:t})}else 0!==this.state.startFromX&&this.setState({startFromX:0});this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0}))},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.componentDidUpdate=function(t){if(t.height===this.props.height&&t.width===this.props.width||this._fitParentContainer(),this.props.showYAxisLables){var n=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==n&&this.setState({startFromX:n})}else 0!==this.state.startFromX&&this.setState({startFromX:0});t.points!==this.props.points&&(this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0})))},n.prototype.render=function(){var t,n,i,e,r,a,l,s,c,d,f,v,h,p=this,g=this.props,y=g.calloutProps,m=g.points,b=g.chartType,x=g.chartHoverProps,w=g.svgFocusZoneProps,M=g.svgProps,C=g.culture,k=g.dateLocalizeOptions,A=g.timeFormatLocale,S=g.customDateTimeFormatter;this.props.parentRef&&this._fitParentContainer(),this.margins=this._calcMargins(),this.props.getmargins&&this.props.getmargins(this.margins),this._classNames=Iv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,enableReflow:this.props.enableReflow});var L,V,D,N,O,T,E,F=null,B=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var P=(0,o.Cl)({domainNRangeValues:this.props.getDomainNRangeValues(m,this.props.getDomainMargins?this.props.getDomainMargins(this.state.containerWidth):this.margins,this.state.containerWidth,b,this._isRtl,this.props.xAxisType,this.props.barwidth,this.props.tickValues),containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,margins:this.margins,xAxisElement:this.xAxisElement,showRoundOffXTickValues:null===(r=this.props.showRoundOffXTickValues)||void 0===r||r,xAxisCount:this.props.xAxisTickCount,xAxistickSize:this.props.xAxistickSize,tickPadding:this.props.tickPadding||this.props.showXAxisLablesTooltip?5:10,xAxisPadding:this.props.xAxisPadding,xAxisInnerPadding:this.props.xAxisInnerPadding,xAxisOuterPadding:this.props.xAxisOuterPadding,containerWidth:this.state.containerWidth,hideTickOverlap:!this.props.rotateXAxisLables&&"auto"!==(null===(a=this.props.xAxis)||void 0===a?void 0:a.tickLayout)&&this.props.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform,xMinValue:this.props.xMinValue,xMaxValue:this.props.xMaxValue},this.props.xAxis),_=void 0,H=void 0,I=void 0;switch(this.props.xAxisType){case ns.NumericAxis:_=(t=xs(P,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,H=t.tickValues,I=t.tickLabels;break;case ns.DateAxis:_=(n=function(t,n,i,e,r,o,u,a){var l=t.domainNRangeValues,s=t.xAxisElement,c=t.tickPadding,d=void 0===c?6:c,f=t.xAxistickSize,v=void 0===f?6:f,h=t.xAxisCount,p=t.hideTickOverlap,g=t.calcMaxLabelWidth,y=t.tickStep,m=t.tick0,b=t.tickText,x=u?Au():ku();x.domain([l.dStartValue,l.dEndValue]).range([l.rStartValue,l.rEndValue]).nice();var w=null!=h?h:6,M=100,C=-1,k=r?$e(r):void 0;x.ticks().forEach((function(t){var n=ws(t,u);n>C&&(C=n),n<M&&(M=n)}));var A=null!=e?e:(0,Yn.c2)(M,C),S=function(t,n,i,e){var r="%c",o="%a %d, %X",u="%b %d, %X",a="%-I:%M %p",l="%b %d, %-I:%M %p",s="%b %d, %-I %p",c="%b %d";return(i?e?i.utcFormat:i.format:e?Ge:Xe)([[".%L",":%S.%L","%M:%S.%L","%-I:%M:%S.%L %p",o,u,u,r],[r,":%S","%-I:%M:%S","%X",o,u,u,r],[r,r,a,a,"%a %d, %-I:%M %p",l,l,"%x, %-I:%M %p"],[r,r,r,"%-I %p","%a %d, %-I %p",s,s,"%x, %-I %p"],[r,r,r,r,"%a %d",c,c,"%x"],[r,r,r,r,r,c,c,"%x"],[r,r,r,r,r,r,"%B","%b %Y"],[r,r,r,r,r,r,r,"%Y"]][t][n])}(M,C,k,u),L=function(t,e){return n.tickValues&&b&&void 0!==b[e]?b[e]:o?o(t):r?S(t):void 0===i&&n.tickFormat?u?Ge(n.tickFormat)(t):Xe(n.tickFormat)(t):(0,Yn.Yn)(t,i,u,!1,A)};if(p){var V=g(x.ticks().map(L))+40,D=x.range(),N=D[0],O=D[1];w=Math.min(Math.max(1,Math.floor(Math.abs(O-N)/V)),10)}var T,E=ni(x).tickSize(v).tickPadding(d).ticks(w).tickFormat(L);[ts.GanttChart].includes(a)&&E.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?T=n.tickValues:y&&(T=xc(y,m,x.domain(),u)),T&&E.tickValues(T),s&&sl(s).call(E).selectAll("text").attr("aria-hidden","true");var F=null!=T?T:x.ticks(w);return{xScale:x,tickValues:F,tickLabels:F.map(E.tickFormat())}}(P,this.props.tickParams,C,k,A,S,this.props.useUTC,this.props.chartType)).xScale,H=n.tickValues,I=n.tickLabels;break;case ns.StringAxis:i=function(t,n,i){var e,r=t.domainNRangeValues,o=t.xAxistickSize,u=void 0===o?6:o,a=t.tickPadding,l=void 0===a?10:a,s=t.xAxisPadding,c=void 0===s?.1:s,d=t.xAxisInnerPadding,f=t.xAxisOuterPadding,v=t.containerWidth,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickText,y=Tu().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),m=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var b=[],x=m.map((function(t){return p([t])})),w=0,M=v,C=1,k=y.range();k[1]-k[0]<0&&(w=v,M=0,C=-1);for(var A=m.length-1;A>=0;A--){var S=y(m[A]);C*(S-C*x[A]/2-w)>=0&&C*(S+C*x[A]/2-M)<=0&&(b.push(m[A]),M=S-C*(x[A]/2+10))}m=b=b.reverse()}var L=ni(y).tickSize(u).tickPadding(l).tickValues(m).tickFormat((function(t,i){return n.tickValues&&g&&void 0!==g[i]?g[i]:t}));return t.xAxisElement&&sl(t.xAxisElement).call(L).selectAll("text").attr("aria-hidden","true"),{xScale:y,tickValues:m,tickLabels:m.map(L.tickFormat())}}(P,this.props.tickParams,this.props.datasetForXAxisDomain),_=i.xScale,H=i.tickValues,I=i.tickLabels;break;default:_=(e=xs(P,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,H=e.tickValues,I=e.tickLabels}this._xScale=_,this._tickLabels=I,"auto"===(null===(l=this.props.xAxis)||void 0===l?void 0:l.tickLayout)?this._removalValueForTextTuncate=function(t,n,i,e,r,o){for(var u,a=!1,l=!1,s=[],c=i.range(),d=c[0],f=c[1]-d<0,v=f?r:0,h=f?0:r,p=function(n){var e;return(null!==(e=i(t[n]))&&void 0!==e?e:0)+("bandwidth"in i?i.bandwidth()/2:0)},g=function(t){return oc(t,ys,o).width},y=0;y<t.length;y++){var m=p(y),b=Math.abs(y>0?(m-p(y-1))/2:m-v),x=Math.abs(y+1<t.length?(p(y+1)-m)/2:h-m),w=2*Math.min(b,x)-8,M=n[y],C=g(M);s.push(w),C>w&&(Math.max.apply(Math,M.split(/\s+/).map((function(t){return g(t)})))<=w?a=!0:l=!0)}return l?function(t,n,i,e,r,o){if(!e)return 0;var u=12,a=i.range(),l=a[0],s=a[1]-l<0,c=s?r:0,d=s?0:r,f=function(n){var e;return(null!==(e=i(t[n]))&&void 0!==e?e:0)+("bandwidth"in i?i.bandwidth()/2:0)},v=function(t){return oc(t,ys,o)};return sl(e).selectAll(".tick text").each((function(i,e){var r=f(e),o=Math.abs(e>0?r-f(e-1):r-c),a=Math.abs(e+1<t.length?f(e+1)-r:d-r),l=2*Math.min(o,a)-8,s=n[e],h=sl(this).text(null).attr("data-full",s),p=h.attr("y"),g=parseFloat(h.attr("dy"));h.append("tspan").attr("x",0).attr("y",p).attr("dy",(e%2==1?1.1:0)+g+"em").text(Mc(s,l,(function(t){return v(t).width}))),u=Math.max(u,v(s).height)})),t.length>1?u:0}(t,n,i,e,r,o):a&&null!==(u=Ls({node:e,xAxis:i,noOfCharsToTruncate:100,showXAxisLablesTooltip:!1,width:s,container:o}))&&void 0!==u?u:0}(H,I,_,this.xAxisElement,this.state.containerWidth,this.chartContainer):this._transformXAxisLabels();var W=(0,o.Cl)({margins:this.props.getYDomainMargins?this.props.getYDomainMargins(this.state.containerHeight):this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElement,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:this.props.yMinValue||0,yMaxValue:this.props.yMaxValue||0,tickPadding:10,maxOfYVal:this.props.maxOfYVal,yMinMaxValues:this.props.getMinMaxOfYAxis(m,this.props.yAxisType),yAxisPadding:this.props.yAxisPadding||0,tickValues:this.props.yAxisTickValues},this.props.yAxis),R={yAxisDomainValues:[],yAxisTickText:[]};if(this.props.yAxisType&&this.props.yAxisType===is.StringAxis)L=this.props.createStringYAxis(W,this.props.stringDatasetForYAxisDomain,this._isRtl,R,this.props.barwidth,this.props.chartType);else{if(null===(s=this.props)||void 0===s?void 0:s.secondaryYScaleOptions){var z={margins:this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElementSecondary,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:(null===(c=this.props.secondaryYScaleOptions)||void 0===c?void 0:c.yMinValue)||0,yMaxValue:null!==(f=null===(d=this.props.secondaryYScaleOptions)||void 0===d?void 0:d.yMaxValue)&&void 0!==f?f:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(m,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};V=this.props.createYAxis(z,this._isRtl,R,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}L=this.props.createYAxis(W,this._isRtl,R,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}this._yAxisTickText=R.yAxisTickText,this.props.getAxisData&&this.props.getAxisData(R);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showXAxisLablesTooltip||"auto"===(null===(v=this.props.xAxis)||void 0===v?void 0:v.tickLayout)){var j=this.xAxisElement?sl(this.xAxisElement).call(_):null,$={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:j,container:this.chartContainer};j&&Ns($)}if(this.props.showYAxisLablesTooltip){L&&(D=this.yAxisElement,N=L,O=this.props.noOfCharsToTruncate||4,T=this.props.showYAxisLablesTooltip||!1,E=this._isRtl,null!==D&&sl(D).call(N).selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i=E?"...".concat(t.text().slice(0,O)):"".concat(t.text().slice(0,O),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy")),a=t.text(null).attr("data-full",n).append("tspan").attr("x",o).attr("y",r).attr("dy",u+"em");T&&a.text(e>O?i:n)})));var Y=this.yAxisElement?sl(this.yAxisElement).call(L):null,X={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:Y,container:this.chartContainer};Y&&Ns(X)}this._getData(_,L,V),B=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:_,yScalePrimary:L,yScaleSecondary:V})),!this.props.hideTooltip&&y.isCalloutVisible&&(F=this._generateCallout(y,x))}var G,U={width:this.state.containerWidth,height:this.state.containerHeight},q=Math.max(0,U.width-this.margins.left-this.margins.right),Z=Math.max(0,U.height-this.margins.top-this.margins.bottom-this._removalValueForTextTuncate),K={x:this.margins.left,y:this.margins.top,width:q,height:Z},J=null!==(h=this.props.annotations)&&void 0!==h?h:[],Q=J.length>0,tt=Q?{plotRect:K,svgRect:U,isRtl:this._isRtl,xScale:this._xScale,yScalePrimary:L,yScaleSecondary:V}:void 0;G=this.props.focusZoneDirection===dc.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:dc.horizontal;var nt=U.width-this.margins.left-this.margins.right-16,it=U.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-16,et=this.margins.top+8+it/2,rt=this._isRtl?U.width-8:16,ot=this._isRtl?16:U.width-8,ut={wrapContent:Vs,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){p.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(td,(0,o.Cl)({direction:G,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},w),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:U.width,height:U.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},qs(M)),u.createElement("g",{ref:function(t){p.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat(U.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement(lv,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+8+nt/2,y:U.height-8,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:nt},ut)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&function(){var t,n,i,e,r,a=null!==(t=p.props.titleStyles)&&void 0!==t?t:{},l=a.titleFont,s=a.titleXAnchor,c=a.titleYAnchor,d=a.titlePad,f="number"==typeof(null==l?void 0:l.size)?l.size:13,v=null!==(n=null==d?void 0:d.l)&&void 0!==n?n:0,h=null!==(i=null==d?void 0:d.r)&&void 0!==i?i:0,g=null!==(e=null==d?void 0:d.t)&&void 0!==e?e:0,y=null!==(r=null==d?void 0:d.b)&&void 0!==r?r:0,m=("left"===s?p.margins.left+8:"right"===s?p.margins.left+8+nt:p.margins.left+8+nt/2)+v-h,b=Math.max(f+8,12)+g-y,x="left"===s?"start":"right"===s?"end":"middle",w="top"===c?"hanging":"bottom"===c?"alphabetic":"middle"===c?"central":"auto";return u.createElement(lv,(0,o.Cl)({content:p.props.xAxisAnnotation,textProps:{x:m,y:b,className:p._classNames.axisAnnotation,textAnchor:x,dominantBaseline:w,"aria-hidden":!0,style:pv(l)},maxWidth:nt},ut))}(),u.createElement("g",{ref:function(t){p.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?U.width-this.margins.right:this.margins.left,", 0)"),className:this._classNames.yAxis}),this.props.secondaryYScaleOptions&&u.createElement("g",null,u.createElement("g",{ref:function(t){p.yAxisElementSecondary=t},id:"yAxisGElementSecondary".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?this.margins.left:U.width-this.margins.right,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement(lv,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:ot,y:et,textAnchor:"middle",transform:"rotate(-90, ".concat(ot,", ").concat(et,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:it},ut))),B,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement(lv,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:rt,y:et,textAnchor:"middle",transform:"rotate(-90, ".concat(rt,", ").concat(et,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:it},ut)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement(lv,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:ot,y:et,textAnchor:"middle",transform:"rotate(-90, ".concat(ot,", ").concat(et,")"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:it},ut))),Q&&tt&&u.createElement(Hv,{annotations:J,context:tt,theme:this.props.theme,className:this._classNames.annotationLayer})),!this.props.hideLegend&&u.createElement("div",{ref:function(t){p.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),F&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},F))},n.prototype._generateCallout=function(t,n){return u.createElement($n,(0,o.Cl)({hidden:!(!this.props.hideTooltip&&t.isCalloutVisible),shouldUpdateWhenHidden:!0},t),this.props.customizedCallout&&this.props.customizedCallout,!this.props.customizedCallout&&this.props.isCalloutForStack&&this._multiValueCallout(t),!this.props.customizedCallout&&!this.props.isCalloutForStack&&u.createElement(Wv,(0,o.Cl)({XValue:t.XValue,Legend:t.legend,YValue:t.YValue,color:t.color,culture:this.props.culture},n)))},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r,o=e?{}:{marginRight:"16px"},a=void 0!==t.index&&-1!==t.index,l=Iv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,lineColor:t.color,toDrawShape:a}),s=this.props,c=s.culture,d=s.useUTC,f=(0,Yn.c$)(t.y,c,d);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var v=t.yAxisCalloutData;return u.createElement("div",{style:o},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),Object.keys(v).map((function(t){return u.createElement("div",{key:t,className:l.calloutBlockContainer},u.createElement("div",{className:l.calloutlegendText},(0,Yn.c$)(t,c,d)),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(v[t],c,d)))})))}return u.createElement("div",{style:i?o:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:l.calloutBlockContainer},a&&u.createElement(of,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:Ws[t.index%Object.keys(js).length]}),u.createElement("div",null,u.createElement("div",{className:l.calloutlegendText}," ",t.legend),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:null!==(r=t.y)&&void 0!==r?r:t.data,c,d)))))},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n;if(t.props.hideLegend)n=0;else{var r=t.legendContainer&&getComputedStyle(t.legendContainer);n=(t.legendContainer&&t.legendContainer.getBoundingClientRect().height||t.minLegendContainerHeight)+parseFloat(r&&r.marginTop||"0")+parseFloat(r&&r.marginBottom||"0")}if(t.props.parentRef||t.chartContainer){var o=t.props.parentRef?t.props.parentRef:t.chartContainer,u=t.props.enableReflow&&!t._isFirstRender?Math.max(o.getBoundingClientRect().width,t._calculateChartMinWidth()):o.getBoundingClientRect().width,a=o.getBoundingClientRect().height>n?o.getBoundingClientRect().height:350;(i!==u||e!==a-n)&&t.setState({containerWidth:u,containerHeight:a-n})}}))},n}(u.Component),zv=function(){var t,n=(0,s.z)();return!!(null===(t=null==n?void 0:n.navigator)||void 0===t?void 0:t.userAgent)&&n.navigator.userAgent.indexOf("rv:11.0")>-1}(),jv=(0,r.I)(Rv,(function(t){var n,i,e,r,u,a,l,s,c,d=t.className,f=t.theme,v=t.isRtl,h=t.shouldHighlight,p=t.href,g=t.lineColor,y=void 0===g?"transparent":g,m=t.toDrawShape,b=t.enableReflow,x=f.fonts;return{root:[f.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden",position:"relative"},d],chartWrapper:(0,o.Cl)({position:"relative"},b?{overflow:"auto"}:{}),plotContainer:{position:"relative",width:"100%",height:"100%"},axisTitle:cv(f,f.fonts.xSmall),axisAnnotation:cv(f,f.fonts.small),xAxis:[{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}],line:{opacity:.2,stroke:f.semanticColors.bodyText,width:"1px",selectors:(i={},i[It.up]={opacity:.1,stroke:"CanvasText"},i)},path:{display:"none"}}},gs],yAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(e={},e[It.up]={fill:"CanvasText"},e)}],path:{display:"none"},line:{opacity:.2,stroke:f.semanticColors.bodyText,selectors:(r={},r[It.up]={opacity:.1,stroke:"CanvasText"},r)},g:[v&&!zv&&{textAnchor:"end"}]}},opacityChangeOnHover:{opacity:h?"":"0.1",cursor:p?"pointer":"default"},legendContainer:[{marginTop:"8px",marginLeft:"20px"}],calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:f.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",opacity:"0.85",color:f.semanticColors.bodySubtext})],calloutBlockContainer:[f.fonts.mediumPlus,{marginTop:"13px",color:f.semanticColors.bodyText},!m&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(y),paddingLeft:"8px"},m&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:f.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},x.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[f.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:f.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(f.semanticColors.menuDivider)}],tooltip:sv(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c),annotationLayer:{pointerEvents:"none"}}})),$v=(0,an.J5)((function(t){return(0,an.J5)((function(n){var i=(0,an.J5)((function(t){return function(i){return n(i,t)}}));return function(e,r){return t(e,r?i(r):n)}}))}));function Yv(t,n){return $v(t)(n)}var Xv=function(t){if(void 0===t)return 0;var n=0;return"scrollTop"in t?n=t.scrollTop:"scrollY"in t&&(n=t.scrollY),Math.ceil(n)},Gv=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},Uv="spacer-",qv=1/3,Zv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},Kv=function(t){return t.getBoundingClientRect()},Jv=Kv,Qv=Kv,th=function(t){function n(n){var i=t.call(this,n)||this;return i._root=u.createRef(),i._surface=u.createRef(),i._pageRefs={},i._getDerivedStateFromProps=function(t,n){return t.items!==i.props.items||t.renderCount!==i.props.renderCount||t.startIndex!==i.props.startIndex||t.version!==i.props.version||!n.hasMounted&&i.props.renderEarly&&(0,Dn.S)()?(i._resetRequiredWindows(),i._requiredRect=null,i._measureVersion++,i._invalidatePageCache(),i._updatePages(t,n)):n},i._onRenderRoot=function(t){var n=t.rootRef,i=t.surfaceElement,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderSurface=function(t){var n=t.surfaceRef,i=t.pageElements,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderPage=function(t,n){for(var e,r=i.props,a=r.onRenderCell,l=r.onRenderCellConditional,s=r.role,c=t.page,d=c.items,f=void 0===d?[]:d,v=c.startIndex,h=(0,o.Tt)(t,["page"]),p=void 0===s?"listitem":"presentation",g=[],y=0;y<f.length;y++){var m=v+y,b=f[y],x=i.props.getKey?i.props.getKey(b,m):b&&b.key;null==x&&(x=m);var w=null!=l?l:a,M=null!==(e=null==w?void 0:w(b,m,i.props.ignoreScrollingState?void 0:i.state.isScrolling))&&void 0!==e?e:null;l&&!M||g.push(u.createElement("div",{role:p,className:"ms-List-cell",key:x,"data-list-index":m,"data-automationid":"ListCell"},M))}return u.createElement("div",(0,o.Cl)({},h),g)},Ec(i),i.state={pages:[],isScrolling:!1,getDerivedStateFromProps:i._getDerivedStateFromProps,hasMounted:!1},i._estimatedPageHeight=0,i._totalEstimates=0,i._requiredWindowsAhead=0,i._requiredWindowsBehind=0,i._measureVersion=0,i._cachedPageHeights={},i._estimatedPageHeight=0,i._focusedIndex=-1,i._pageCache={},i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){return n.getDerivedStateFromProps(t,n)},Object.defineProperty(n.prototype,"pageRefs",{get:function(){return this._pageRefs},enumerable:!1,configurable:!0}),n.prototype.scrollToIndex=function(t,n,i){void 0===i&&(i=0);for(var e=this.props.startIndex,r=e+this._getRenderCount(),o=this._allowedRect,u=0,a=1,l=e;l<r;l+=a){var s=this._getPageSpecification(this.props,l,o),c=s.height;if(a=s.itemCount,l<=t&&l+a>t){if(n&&this._scrollElement){for(var d=Qv(this._scrollElement),f=Xv(this._scrollElement),v={top:f,bottom:f+d.height},h=t-l,p=0;p<h;++p)u+=n(l+p);var g=u+n(t);switch(i){case 1:return void Gv(this._scrollElement,u);case 2:return void Gv(this._scrollElement,g-d.height);case 3:return void Gv(this._scrollElement,(u+g-d.height)/2)}if(u>=v.top&&g<=v.bottom)return;u<v.top||g>v.bottom&&(u=g-d.height)}return void(this._scrollElement&&Gv(this._scrollElement,u))}u+=c}},n.prototype.getStartItemIndexInView=function(t){for(var n=0,i=this.state.pages||[];n<i.length;n++){var e=i[n];if(!e.isSpacer&&(this._scrollTop||0)>=e.top&&(this._scrollTop||0)<=e.top+e.height){if(!t){var r=Math.floor(e.height/e.itemCount);return e.startIndex+Math.floor((this._scrollTop-e.top)/r)}for(var o=0,u=e.startIndex;u<e.startIndex+e.itemCount;u++){if(r=t(u),e.top+o<=this._scrollTop&&this._scrollTop<e.top+o+r)return u;o+=r}}}return 0},n.prototype.componentDidMount=function(){this._async=new Nt(this),this._events=new yd(this),this._onAsyncScrollDebounced=this._async.debounce(this._onAsyncScroll,100,{leading:!1,maxWait:500}),this._onAsyncIdleDebounced=this._async.debounce(this._onAsyncIdle,200,{leading:!1}),this._onAsyncResizeDebounced=this._async.debounce(this._onAsyncResize,16,{leading:!1}),this._onScrollingDoneDebounced=this._async.debounce(this._onScrollingDone,500,{leading:!1}),this._scrollElement=K(this._root.current),this._scrollTop=0,this.setState((0,o.Cl)((0,o.Cl)({},this._updatePages(this.props,this.state)),{hasMounted:!0})),this._measureVersion++;var t=function(t){var n;return null!==(n=null==t?void 0:t.window)&&void 0!==n?n:"undefined"!=typeof window?window:void 0}(this.context);this._events.on(t,"resize",this._onAsyncResizeDebounced),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScrollDebounced))},n.prototype.componentDidUpdate=function(t,n){var i=this.props,e=this.state;this.state.pagesVersion!==n.pagesVersion&&(i.getPageHeight?this._onAsyncIdleDebounced():this._updatePageMeasurements(e.pages)?(this._materializedRect=null,this._hasCompletedFirstRender?this._onAsyncScrollDebounced():(this._hasCompletedFirstRender=!0,this.setState(this._updatePages(i,e)))):this._onAsyncIdleDebounced(),i.onPagesUpdated&&i.onPagesUpdated(e.pages))},n.prototype.componentWillUnmount=function(){var t,n;null===(t=this._async)||void 0===t||t.dispose(),null===(n=this._events)||void 0===n||n.dispose(),delete this._scrollElement},n.prototype.shouldComponentUpdate=function(t,n){var i=this.state.pages,e=n.pages,r=!1;if(!n.isScrolling&&this.state.isScrolling)return!0;if(t.version!==this.props.version)return!0;if(t.className!==this.props.className)return!0;if(t.items===this.props.items&&i.length===e.length)for(var o=0;o<i.length;o++){var u=i[o],a=e[o];if(u.key!==a.key||u.itemCount!==a.itemCount){r=!0;break}}else r=!0;return r},n.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,this.state,!0),this.setState(this._updatePages(this.props,this.state)),this._measureVersion++,t.prototype.forceUpdate.call(this)},n.prototype.getTotalListHeight=function(){return this._surfaceRect.height},n.prototype.render=function(){for(var t=this.props,n=t.className,i=t.role,e=void 0===i?"list":i,r=t.onRenderSurface,u=t.onRenderRoot,a=this.state.pages,l=void 0===a?[]:a,s=[],c=z(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?Yv(r,this._onRenderSurface):this._onRenderSurface;return(u?Yv(u,this._onRenderRoot):this._onRenderRoot)({rootRef:this._root,pages:l,surfaceElement:h({surfaceRef:this._surface,pages:l,pageElements:s,divProps:{role:"presentation",className:"ms-List-surface"}}),divProps:(0,o.Cl)((0,o.Cl)({},c),{className:j("ms-List",n),role:s.length>0?e:void 0,"aria-label":s.length>0?c["aria-label"]:void 0})})},n.prototype._shouldVirtualize=function(t){void 0===t&&(t=this.props);var n=t.onShouldVirtualize;return!n||n(t)},n.prototype._invalidatePageCache=function(){this._pageCache={}},n.prototype._renderPage=function(t){var n,i=this,e=this.props.usePageCache;if(e&&(n=this._pageCache[t.key])&&n.pageElement)return n.pageElement;var r=this._getPageStyle(t),o=this.props.onRenderPage,u=(void 0===o?this._onRenderPage:o)({page:t,className:"ms-List-page",key:t.key,ref:function(n){i._pageRefs[t.key]=n},style:r,role:"presentation"},this._onRenderPage);return e&&0===t.startIndex&&(this._pageCache[t.key]={page:t,pageElement:u}),u},n.prototype._getPageStyle=function(t){var n=this.props.getPageStyle;return(0,o.Cl)((0,o.Cl)({},n?n(t):{}),t.items?{}:{height:t.height})},n.prototype._onFocus=function(t){for(var n=t.target;n!==this._surface.current;){var i=n.getAttribute("data-list-index");if(i){this._focusedIndex=Number(i);break}n=b(n)}},n.prototype._onScroll=function(){this.state.isScrolling||this.props.ignoreScrollingState||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDoneDebounced()},n.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},n.prototype._onAsyncScroll=function(){var t,n;this._updateRenderRects(this.props,this.state),this._materializedRect&&(t=this._requiredRect,n=this._materializedRect,t.top>=n.top&&t.left>=n.left&&t.bottom<=n.bottom&&t.right<=n.right)||this.setState(this._updatePages(this.props,this.state))},n.prototype._onAsyncIdle=function(){var t=this.props,n=t.renderedWindowsAhead,i=t.renderedWindowsBehind,e=this._requiredWindowsAhead,r=this._requiredWindowsBehind,o=Math.min(n,e+1),u=Math.min(i,r+1);o===e&&u===r||(this._requiredWindowsAhead=o,this._requiredWindowsBehind=u,this._updateRenderRects(this.props,this.state),this.setState(this._updatePages(this.props,this.state))),(n>o||i>u)&&this._onAsyncIdleDebounced()},n.prototype._onScrollingDone=function(){this.props.ignoreScrollingState||(this.setState({isScrolling:!1}),this._onAsyncIdle())},n.prototype._onAsyncResize=function(){this.forceUpdate()},n.prototype._updatePages=function(t,n){this._requiredRect||this._updateRenderRects(t,n);var i=this._buildPages(t,n),e=n.pages;return this._notifyPageChanges(e,i.pages,this.props),(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),i),{pagesVersion:{}})},n.prototype._notifyPageChanges=function(t,n,i){var e=i.onPageAdded,r=i.onPageRemoved;if(e||r){for(var o={},u=0,a=t;u<a.length;u++)(c=a[u]).items&&(o[c.startIndex]=c);for(var l=0,s=n;l<s.length;l++){var c;(c=s[l]).items&&(o[c.startIndex]?delete o[c.startIndex]:this._onPageAdded(c))}for(var d in o)o.hasOwnProperty(d)&&this._onPageRemoved(o[d])}},n.prototype._updatePageMeasurements=function(t){var n=!1;if(!this._shouldVirtualize())return n;for(var i=0;i<t.length;i++){var e=t[i];e.items&&(n=this._measurePage(e)||n)}return n},n.prototype._measurePage=function(t){var n=!1,i=this._pageRefs[t.key],e=this._cachedPageHeights[t.startIndex];if(i&&this._shouldVirtualize()&&(!e||e.measureVersion!==this._measureVersion)){var r={width:i.clientWidth,height:i.clientHeight};(r.height||r.width)&&(n=t.height!==r.height,t.height=r.height,this._cachedPageHeights[t.startIndex]={height:r.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+r.height)/(this._totalEstimates+1)),this._totalEstimates++)}return n},n.prototype._onPageAdded=function(t){var n=this.props.onPageAdded;n&&n(t)},n.prototype._onPageRemoved=function(t){var n=this.props.onPageRemoved;n&&n(t)},n.prototype._buildPages=function(t,n){var i=t.renderCount,e=t.items,r=t.startIndex,u=t.getPageHeight;i=this._getRenderCount(t);for(var a=(0,o.Cl)({},Zv),l=[],s=1,c=0,d=null,f=this._focusedIndex,v=r+i,h=this._shouldVirtualize(t),p=0===this._estimatedPageHeight&&!u,g=this._allowedRect,m=function(i){var o=b._getPageSpecification(t,i,g),u=o.height,m=o.data,x=o.key;s=o.itemCount;var w,M,C=c+u-1,k=y(n.pages,(function(t){return!!t.items&&t.startIndex===i}))>-1,A=!g||C>=g.top&&c<=g.bottom,S=!b._requiredRect||C>=b._requiredRect.top&&c<=b._requiredRect.bottom;if(!p&&(S||A&&k)||!h||f>=i&&f<i+s||i===r){d&&(l.push(d),d=null);var L=Math.min(s,v-i),V=b._createPage(x,e.slice(i,i+L),i,void 0,void 0,m);V.top=c,V.height=u,b._visibleRect&&b._visibleRect.bottom&&(V.isVisible=C>=b._visibleRect.top&&c<=b._visibleRect.bottom),l.push(V),S&&b._allowedRect&&(w=a,M={top:c,bottom:C,height:u,left:g.left,right:g.right,width:g.width},w.top=M.top<w.top||-1===w.top?M.top:w.top,w.left=M.left<w.left||-1===w.left?M.left:w.left,w.bottom=M.bottom>w.bottom||-1===w.bottom?M.bottom:w.bottom,w.right=M.right>w.right||-1===w.right?M.right:w.right,w.width=w.right-w.left+1,w.height=w.bottom-w.top+1)}else d||(d=b._createPage(Uv+i,void 0,i,0,void 0,m,!0)),d.height=(d.height||0)+(C-c)+1,d.itemCount+=s;if(c+=C-c+1,p&&h)return"break"},b=this,x=r;x<v&&"break"!==m(x);x+=s);return d&&(d.key=Uv+"end",l.push(d)),this._materializedRect=a,(0,o.Cl)((0,o.Cl)({},n),{pages:l,measureVersion:this._measureVersion})},n.prototype._getPageSpecification=function(t,n,i){var e=t.getPageSpecification;if(e){var r=e(n,i,t.items),o=r.itemCount,u=void 0===o?this._getItemCountForPage(n,i):o,a=r.height;return{itemCount:u,height:void 0===a?this._getPageHeight(n,i,u):a,data:r.data,key:r.key}}return{itemCount:u=this._getItemCountForPage(n,i),height:this._getPageHeight(n,i,u)}},n.prototype._getPageHeight=function(t,n,i){if(this.props.getPageHeight)return this.props.getPageHeight(t,n,i,this.props.items);var e=this._cachedPageHeights[t];return e?e.height:this._estimatedPageHeight||30},n.prototype._getItemCountForPage=function(t,n){return(this.props.getItemCountForPage?this.props.getItemCountForPage(t,n):10)||10},n.prototype._createPage=function(t,n,i,e,r,o,u){void 0===i&&(i=-1),void 0===e&&(e=n?n.length:0),void 0===r&&(r={}),t=t||"page-"+i;var a=this._pageCache[t];return a&&a.page?a.page:{key:t,startIndex:i,itemCount:e,items:n,style:r,top:0,height:0,data:o,isSpacer:u||!1}},n.prototype._getRenderCount=function(t){var n=t||this.props,i=n.items,e=n.startIndex,r=n.renderCount;return void 0===r?i?i.length-e:0:r},n.prototype._updateRenderRects=function(t,n,i){var e=t.renderedWindowsAhead,r=t.renderedWindowsBehind,u=n.pages;if(this._shouldVirtualize(t)){var a=this._surfaceRect||(0,o.Cl)({},Zv),l=function(t){if(void 0===t)return 0;var n=0;return"scrollHeight"in t?n=t.scrollHeight:"document"in t&&(n=t.document.documentElement.scrollHeight),n}(this._scrollElement),c=Xv(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*qv)&&(a=this._surfaceRect=Jv(this._surface.current),this._scrollTop=c),!i&&l&&l===this._scrollHeight||this._measureVersion++,this._scrollHeight=l||0;var d=Math.max(0,-a.top),f=(0,s.z)(this._root.current),v={top:d,left:a.left,bottom:d+f.innerHeight,right:a.right,width:a.width,height:f.innerHeight};this._requiredRect=nh(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=nh(v,r,e),this._visibleRect=v}},n.defaultProps={startIndex:0,onRenderCell:function(t,n,i){return u.createElement(u.Fragment,null,t&&t.name||"")},onRenderCellConditional:void 0,renderedWindowsAhead:2,renderedWindowsBehind:2},n.contextType=Ft,n}(u.Component);function nh(t,n,i){var e=t.top-n*t.height,r=t.height+(n+i)*t.height;return{top:e,bottom:e+r,height:r,left:t.left,right:t.right,width:t.width}}var ih=function(t){var n=u.useRef(null);u.useEffect((function(){if(n.current){var i=sl(n.current),e=t.text.split(/\s+/),r=[],o=i.append("tspan"),u=0;return e.forEach((function(n){r.push(n),o.text(r.join(" "));var e=o.node();e&&e.getComputedTextLength()>t.width&&r.length>1&&(u++,r.pop(),o.text(r.join(" ")),r=[n],o=i.append("tspan").text(n).attr("dy",t.lineHeight).attr("x",t.x))})),i.attr("dy",-u*t.lineHeight),function(){i.selectAll("tspan").remove()}}})),t.lineHeight;var i=(0,o.Tt)(t,["lineHeight"]);return u.createElement("text",(0,o.Cl)({ref:n},qs(i)))},eh=function(t){var n,i,e,r=u.useRef(null),o=u.useState(!1),a=o[0],l=o[1],s=null;if(a){var c=t.labelDef.aggregatedIdx.map((function(n){return t.lineDefs[n].onRenderCard})).filter((function(t){return!!t}));c.length>0&&(s=u.createElement($n,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(td,{isCircularNavigation:!0,direction:dc.vertical},u.createElement(th,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var d=t.textColor?cs(t.textColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.semanticColors.messageText;return e=1===t.labelDef.aggregatedIdx.length?t.lineDefs[t.labelDef.aggregatedIdx[0]].event:t.mergedLabel(t.labelDef.aggregatedIdx.length),u.createElement(u.Fragment,null,u.createElement("g",{ref:r,onClick:function(){return l(!0)},"data-is-focusable":!0,style:{cursor:"pointer"},role:"button"},u.createElement(ih,{text:e,x:t.labelDef.x,y:t.textY,width:t.textWidth,lineHeight:t.textLineHeight,textAnchor:t.labelDef.anchor,fontSize:t.textFontSize,fill:d})),s)},rh=function(t){var n,i,e=t.labelWidth?t.labelWidth:105,r=t.chartYTop-20,a=r+7,l=t.scale.range(),s=t.events.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{x:t.scale(n.date)})}));s.sort((function(t,n){return+t.date-+n.date}));var c=t.strokeColor?cs(t.strokeColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.palette.black,d=function(t,n){for(var i=[],e=[],r=0,o=t;r<o.length;r++){var u=o[r],a=n(u);-1===i.indexOf(a)&&(e.push(u),i.push(a))}return e}(s,(function(t){return t.date.toString()})).map((function(n,i){return u.createElement("line",{key:i,x1:n.x,x2:n.x,y1:a,y2:t.chartYBottom,stroke:c,strokeDasharray:"8"})})),f=function(t,n,i,e){var r=function(e,r){if(r===t.length)return[];var u=t[r].x,a=u-n;return u<e?[]:r===t.length-1?e<a?[{x:u,anchor:"end",aggregatedIdx:[r]}]:u+n<i?[{x:u,anchor:"start",aggregatedIdx:[r]}]:[]:o(r,e<a?"end":"start")},o=function(e,o){var u="end"===o?t[e].x:t[e].x+n,a=y(t,(function(t){return t.x>u&&(t.x-n>=u||t.x+n<i)}),e+1);-1===a&&(a=t.length);for(var l=[],s=e;s<a;s++)l.push(s);var c=r(u,a);return c.unshift({x:t[e].x,anchor:o,aggregatedIdx:l}),c};return r(e,0)}(s,e+5,l[1],l[0]).map((function(n,i){return u.createElement(eh,{key:i,theme:t.theme,lineDefs:s,labelDef:n,textY:r,textWidth:e,textLineHeight:18,textFontSize:"10pt",textColor:t.labelColor,mergedLabel:t.mergedLabel})}));return u.createElement(u.Fragment,null,d,f)};function oh(t){var n,i,e=t.xAxisScale,r=t.yAxisScale,o=t.className,a=t.lineOptions,l=t.minPixelGap,s=void 0===l?40:l,c=function(t){return t?{originXOffset:t.originXOffset,direction:"clockwise"===t.direction||"counterclockwise"===t.direction?t.direction:void 0,rotation:t.rotation,axisLabel:Array.isArray(t.axisLabel)?t.axisLabel:void 0}:void 0}(a),d=null!==(n=null==c?void 0:c.axisLabel)&&void 0!==n?n:[],f=[],v=[],h=d.length,p="clockwise"===(null==c?void 0:c.direction)?-1:1,g=(null!==(i=null==c?void 0:c.rotation)&&void 0!==i?i:0)*Math.PI/180;return d.forEach((function(t,n){var i=g+p*(2*Math.PI/h)*n,a=(null==c?void 0:c.originXOffset)||0,l=e(.7*Math.cos(i)-a/2),d=r(.7*Math.sin(i)),y=v.every((function(t){return Math.sqrt(Math.pow(l-t.x,2)+Math.pow(d-t.y,2))>=s}));(0===f.length||y)&&(f.push(u.createElement("text",{key:"scatterpolar-label-".concat(t),x:l,y:d,className:o,textAnchor:"middle",alignmentBaseline:"middle",opacity:1},t)),v.push({x:l,y:d}))})),f}var uh,ah=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(uh||(uh={}));var lh=wi((function(t){return t.x})).left,sh=function(t){function n(n){var i,e,r,a,s,c=t.call(this,n)||this;return c._xAxisScale="",c._yScalePrimary="",c.eventLabelHeight=36,c._isRTL=(0,l.jI)(),c._hasMarkersMode=!1,c._isXAxisDateType=!1,c._isScatterPolar=!1,c.toImage=function(t){var n,i;return af([{container:null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],c.props.hideLegend||null===(i=c._legendsRef.current)||void 0===i?void 0:i.toSVG,c._isRTL,t)},c._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Ts(t,n,i,r,c.props.xScaleType,c._hasMarkersMode,c.props.xMinValue,c.props.xMaxValue):o===ns.DateAxis?Ps(t,n,i,r,a,e,0,c._hasMarkersMode):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},c._injectIndexPropertyInLineChartData=function(t,n){var i;void 0===n&&(n=!1);var e=c.props.allowMultipleShapesForPoints,r=void 0!==e&&e,u=n?null==t?void 0:t.filter((function(t){var n,i,e;return(null===(i=null===(n=c.props.legendProps)||void 0===n?void 0:n.selectedLegends)||void 0===i?void 0:i.includes(t.legend))||(null===(e=c.props.legendProps)||void 0===e?void 0:e.selectedLegend)===t.legend})):t;return c._hasMarkersMode=null!==(i=null==u?void 0:u.some((function(t){var n,i,e;return null===(e=null===(i=null===(n=t.lineOptions)||void 0===n?void 0:n.mode)||void 0===i?void 0:i.includes)||void 0===e?void 0:e.call(i,"markers")})))&&void 0!==i&&i,c._isScatterPolar=cc(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?ss(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(e=c.props.theme)||void 0===e?void 0:e.isInverted),(0,o.Cl)((0,o.Cl)({},t),{index:r?n:-1,color:u})})):[]},c._getCustomizedCallout=function(){return c.props.onRenderCalloutPerStack?c.props.onRenderCalloutPerStack(c.state.stackCalloutProps):c.props.onRenderCalloutPerDataPoint?c.props.onRenderCalloutPerDataPoint(c.state.dataPointCalloutProps):null},c._getNumericMinMaxOfY=function(t,n,i){var e=_s(t,0,i,i?c.props.secondaryYScaleType:c.props.yScaleType),r=e.startValue,o=e.endValue,u={start:0,end:0};return c._hasMarkersMode&&(u=vc(r,o,i?c.props.secondaryYScaleType:c.props.yScaleType)),{startValue:r-u.start,endValue:o+u.end}},c._getMargins=function(t){c.margins=t},c._initializeLineChartData=function(t,n,i,e,r,o,u){c._xAxisScale=t,c._yScalePrimary=n,c._yScaleSecondary=u,c._renderedColorFillBars=c.props.colorFillBars?c._createColorFillBars(i):[],c.lines=c._createLines(r,i)},c._handleSingleLegendSelectionAction=function(t){c.state.selectedLegend===t.legend?(c.setState({selectedLegend:""}),c._handleLegendClick(t,null)):(c.setState({selectedLegend:t.legend}),c._handleLegendClick(t,t.legend))},c._onHoverCardHide=function(){c.setState({selectedLegendPoints:[],selectedColorBarLegend:[],isSelectedLegend:!1})},c._closeCallout=function(){c.setState({isCalloutVisible:!1})},c._getBoxWidthOfShape=function(t,n,i){var e=c.props,r=e.allowMultipleShapesForPoints,o=void 0!==r&&r,u=e.strokeWidth,a=void 0===u?4:u,l=c.state.activePoint;return o?l===t?uh.hoverSize:1===n||i?2.5*a:uh.invisibleSize:l===t?uh.hoverSize:uh.invisibleSize},c._getPath=function(t,n,i,e,r,o){var u=c.props.allowMultipleShapesForPoints,a=void 0!==u&&u,l=c._getBoxWidthOfShape(i,e,r),s=a?o%Object.keys(js).length:0,d=js[s].widthRatio;return function(t,n,i,e){return["M".concat(t-i/2," ").concat(n,"\n A").concat(i/2," ").concat(i/2," 0 1 0 ").concat(t+i/2," ").concat(n,"\n M").concat(t-i/2," ").concat(n,"\n A ").concat(i/2," ").concat(i/2," 0 1 1 ").concat(t+i/2," ").concat(n,"\n "),"M".concat(t-i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n+i/2,"\n Z"),"M".concat(t-i/2," ").concat(n-.2886*i,"\n H ").concat(t+i/2,"\n L").concat(t," ").concat(n+.5774*i," Z"),"M".concat(t," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n,"\n L").concat(t," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.5774*i,"\n L").concat(t+i/2," ").concat(n+.2886*i,"\n L").concat(t-i/2," ").concat(n+.2886*i," Z"),"M".concat(t-.5*i," ").concat(n-.866*i,"\n L").concat(t+.5*i," ").concat(n-.866*i,"\n L").concat(t+i," ").concat(n,"\n L").concat(t+.5*i," ").concat(n+.866*i,"\n L").concat(t-.5*i," ").concat(n+.866*i,"\n L").concat(t-i," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.851*i,"\n L").concat(t+.6884*i," ").concat(n-.2633*i,"\n L").concat(t+.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.6884*i," ").concat(n-.2633*i,"\n Z"),"M".concat(t-.5001*i," ").concat(n-1.207*i,"\n L").concat(t+.5001*i," ").concat(n-1.207*i,"\n L").concat(t+1.207*i," ").concat(n-.5001*i,"\n L").concat(t+1.207*i," ").concat(n+.5001*i,"\n L").concat(t+.5001*i," ").concat(n+1.207*i,"\n L").concat(t-.5001*i," ").concat(n+1.207*i,"\n L").concat(t-1.207*i," ").concat(n+.5001*i,"\n L").concat(t-1.207*i," ").concat(n-.5001*i,"\n Z")][e]}(t,n,l=d>1?l/d:l,s)},c._getPointFill=function(t,n,i,e){var r=c.state.activePoint,o=c.props,u=o.theme;return o.allowMultipleShapesForPoints,r===n?u.semanticColors.bodyBackground:t},c._createColorFillBars=function(t){var n,i=[];c.state.isSelectedLegend?c._colorFillBars=c.state.selectedColorBarLegend:c._colorFillBars=c.props.colorFillBars;for(var e=_s(c._points),r=0;r<c._colorFillBars.length;r++){var o=c._colorFillBars[r],a=p("string"==typeof o.legend?o.legend.replace(/\W/g,""):""),l=cs(o.color,null===(n=c.props.theme)||void 0===n?void 0:n.isInverted);o.applyPattern&&i.push(c._getStripePattern(l,r));for(var s=0;s<o.data.length;s++){var d=o.data[s].startX,f=o.data[s].endX,v=c._legendHighlighted(o.legend)||c._noLegendHighlighted()||c.state.isSelectedLegend?c._getColorFillBarOpacity(o):.1;i.push(u.createElement("rect",{fill:o.applyPattern?"url(#".concat(c._colorFillBarPatternId,"_").concat(r,")"):l,fillOpacity:v,x:c._isRTL?c._xAxisScale(f):c._xAxisScale(d),y:c._yScalePrimary(e.endValue)-3,width:Math.abs(c._xAxisScale(f)-c._xAxisScale(d)),height:c._yScalePrimary(c.props.yMinValue||0)-c._yScalePrimary(e.endValue)+3,key:"".concat(a).concat(s)}))}}return i},c._getStripePattern=function(t,n){return u.createElement("pattern",{id:"".concat(c._colorFillBarPatternId,"_").concat(n),width:16,height:16,key:"".concat(c._colorFillBarPatternId,"_").concat(n),patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8",stroke:t,strokeWidth:1.25}))},c._checkInGap=function(t,n,i){for(var e=i,r=!1;e<n.length&&t>n[e].endIndex;)e++;return e<n.length&&t>n[e].startIndex&&t<=n[e].endIndex&&(r=!0),{isInGap:r,gapIndex:e}},c._onMouseOverLargeDataset=function(t,n,i,e){e.persist();var r=c.props.data.lineChartData,o=c._xAxisScale.invert(xv(e)[0],document.getElementById(c._rectId)),u=lh(r[t].data,o),a=r[t].data[u-1],l=r[t].data[u],s=null,d=null;if(void 0===a&&void 0!==l)s=l.x,d=u;else if(void 0!==a&&void 0===l)s=a.x,d=u-1;else{var f=void 0,v=void 0,h=void 0;switch(zs(r[t].data[0].x,!0)){case ns.DateAxis:f=new Date(o).getTime(),v=a.x.getTime(),h=l.x.getTime(),s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1;break;case ns.NumericAxis:f=o,v=a.x,h=l.x,s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1}}var p=r[t].data[d],g=p.xAxisCalloutData,y=p.xAxisCalloutAccessibilityData,m=s instanceof Date?(0,Yn.Yn)(s,c.props.culture,c.props.useUTC):s,b=wc(c._calloutPoints,s),x=r[t].data[d],w=null===c.state.nearestCircleToHighlight||null!==c.state.nearestCircleToHighlight&&null!==x&&(c.state.nearestCircleToHighlight.x!==x.x||c.state.nearestCircleToHighlight.y!==x.y);b&&w&&(c._uniqueCallOutID="#".concat(c._staticHighlightCircle,"_").concat(t),sl("#".concat(c._staticHighlightCircle,"_").concat(t)).attr("cx","".concat(c._xAxisScale(x.x))).attr("cy","".concat(i(x.y))).attr("visibility","visibility"),sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(c._xAxisScale(x.x),", ").concat(i(x.y),")")})).attr("visibility","visibility").attr("y2","".concat(n-i(x.y))),c.setState({nearestCircleToHighlight:x,isCalloutVisible:!0,refSelected:"#".concat(c._staticHighlightCircle,"_").concat(t),stackCalloutProps:b,YValueHover:b.values,dataPointCalloutProps:b,hoverXValue:g||m,xAxisCalloutAccessibilityData:y,activePoint:"",activeLine:t})),b||c.setState({isCalloutVisible:!1,nearestCircleToHighlight:x,activePoint:"",activeLine:t})},c._handleFocus=function(t,n,i,e,r){c._uniqueCallOutID=e;var o=n instanceof Date?(0,Yn.Yn)(n,c.props.culture,c.props.useUTC):n,u=wc(c._calloutPoints,n);if(u){var a=c;sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(a._xAxisScale(n),", 0)")})).attr("visibility","visibility"),c._refArray.forEach((function(n){n.index===t&&c.setState({isCalloutVisible:!0,refSelected:n.refElement,hoverXValue:i||""+o,YValueHover:u.values,stackCalloutProps:u,dataPointCalloutProps:u,activePoint:e,xAxisCalloutAccessibilityData:r})}))}else c.setState({activePoint:e})},c._handleHover=function(t,n,i,e,r,o,u,a,l,s){s.persist();var d=t instanceof Date?(0,Yn.Yn)(t,c.props.culture,c.props.useUTC):t,f=c,v=wc(c._calloutPoints,t),h=void 0;if(!1===c.props.isCalloutForStack&&(null==v?void 0:v.values)){var p=m(v.values,(function(t){return(null==t?void 0:t.y)===n}));p&&(h={x:t,values:[p]})}v?(sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(f._xAxisScale(t),", ").concat(u(n),")")})).attr("visibility","visibility").attr("y2","".concat(i-u(n))),c._uniqueCallOutID!==r&&(c._uniqueCallOutID=r,c.setState({isCalloutVisible:!0,refSelected:"#".concat(r),hoverXValue:e||""+d,YValueHover:v.values,YValue:n,legendVal:a,lineColor:l,stackCalloutProps:v,dataPointCalloutProps:h,activePoint:r,xAxisCalloutAccessibilityData:o,nearestCircleToHighlight:null,activeLine:null}))):c.setState({activePoint:r,nearestCircleToHighlight:null,activeLine:null})},c._getClickHandler=function(t){return t?{onClick:t}:{}},c._handleMouseOut=function(){sl("#".concat(c._verticalLine)).attr("visibility","hidden")},c._handleChartMouseLeave=function(){c._uniqueCallOutID=null,c.setState({isCalloutVisible:!1,activePoint:"",activeLine:null})},c._handleLegendClick=function(t,n){t.onLegendClick&&t.onLegendClick(n)},c._handleMultipleLineLegendSelectionAction=function(t){var n,i=c.state.selectedLegendPoints.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedLegendPoints,!0),[t],!1):c.state.selectedLegendPoints.slice(0,i).concat(c.state.selectedLegendPoints.slice(i+1)),c.props.data&&n.length===c.props.data.lineChartData.length&&(c.props.colorFillBars&&c.props.colorFillBars.length===c.state.selectedColorBarLegend.length||!c.props.colorFillBars)?c._clearMultipleLegendSelections():n.length||c.state.selectedColorBarLegend.length?c.setState({selectedLegendPoints:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._handleMultipleColorFillBarLegendSelectionAction=function(t){var n,i=c.state.selectedColorBarLegend.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);(n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedColorBarLegend,!0),[t],!1):c.state.selectedColorBarLegend.slice(0,i).concat(c.state.selectedColorBarLegend.slice(i+1))).length===(c.props.colorFillBars&&c.props.colorFillBars.length)&&(c.props.data&&c.props.data.lineChartData.length===c.state.selectedLegendPoints.length||!c.props.data)?c._clearMultipleLegendSelections():n.length||c.state.selectedLegendPoints.length?c.setState({selectedColorBarLegend:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._clearMultipleLegendSelections=function(){c.setState({selectedColorBarLegend:[],selectedLegendPoints:[],isSelectedLegend:!1})},c._legendHighlighted=function(t){return c.state.selectedLegend===t||""===c.state.selectedLegend&&c.state.activeLegend===t},c._noLegendHighlighted=function(){return""===c.state.selectedLegend&&""===c.state.activeLegend},c._getColorFillBarOpacity=function(t){return t.applyPattern?1:.4},c._getAriaLabel=function(t,n){var i,e=c._points[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,c.props.culture,c.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},c._getChartTitle=function(){var t=c.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Line chart with ".concat((null==i?void 0:i.length)||0," lines. ")},Ec(c),c.state={hoverXValue:"",activeLegend:"",YValueHover:[],YValue:"",legendVal:"",refSelected:"",selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",isCalloutVisible:!1,selectedLegendPoints:c._injectIndexPropertyInLineChartData(c.props.data.lineChartData,!0),selectedColorBarLegend:[],isSelectedLegend:(null!==(s=null===(a=null===(r=c.props.legendProps)||void 0===r?void 0:r.selectedLegends)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>0,activePoint:"",nearestCircleToHighlight:null,activeLine:null},c._refArray=[],c._points=c._injectIndexPropertyInLineChartData(c.props.data.lineChartData),c._colorFillBars=[],c._calloutPoints=Ss(c._points)||{},c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._rectId=p("containerRectLD"),c._staticHighlightCircle=p("staticHighlightCircle"),c._createLegendsMemoized=(0,an.J9)((function(t){return c._createLegends(t)})),c._firstRenderOptimization=!0,c._emptyChartId=p("_LineChart_empty"),c._cartesianChartRef=u.createRef(),c._legendsRef=u.createRef(),n.eventAnnotationProps&&n.eventAnnotationProps.labelHeight&&(c.eventLabelHeight=n.eventAnnotationProps.labelHeight),c}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r,o,u,a,l,s;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)===(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&Zs(null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends,null===(r=this.props.legendProps)||void 0===r?void 0:r.selectedLegends)||this.setState({selectedLegend:null!==(u=null===(o=this.props.legendProps)||void 0===o?void 0:o.selectedLegend)&&void 0!==u?u:"",selectedLegendPoints:this._injectIndexPropertyInLineChartData(this.props.data.lineChartData,!0),isSelectedLegend:(null!==(s=null===(l=null===(a=this.props.legendProps)||void 0===a?void 0:a.selectedLegends)||void 0===l?void 0:l.length)&&void 0!==s?s:0)>0}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData),this._calloutPoints=Ss(this._points)||{})},n.prototype.render=function(){var t=this,n=this.props,i=n.tickValues,e=n.tickFormat,r=n.eventAnnotationProps,a=n.legendProps,l=n.data;this._points=this._injectIndexPropertyInLineChartData(l.lineChartData),this._isXAxisDateType=Os(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=Ss(s));var c=null;this.props.hideLegend||(c=this._createLegendsMemoized(this._points));var d=(0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,YValue:this.state.YValue,legend:this.state.legendVal,color:this.state.lineColor,XValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,onDismiss:this._closeCallout,preventDismissOnEvent:function(){return!0},hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),descriptionMessage:this.props.getCalloutDescriptionMessage&&this.state.stackCalloutProps?this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps),f={tickValues:i,tickFormat:e};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:ts.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:Cs,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?ns.DateAxis:ns.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){return t._xAxisScale=n.xScale,t._yScalePrimary=n.yScalePrimary,t._yScaleSecondary=n.yScaleSecondary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:n.containerHeight,stroke:"#323130",id:t._verticalLine,visibility:"hidden",strokeDasharray:"5,5"}),t.props.optimizeLargeData?u.createElement("rect",{id:t._rectId,width:n.containerWidth,height:n.containerHeight,fill:"transparent"}):u.createElement(u.Fragment,null),u.createElement("g",null,t._renderedColorFillBars,t.lines),r&&u.createElement(rh,(0,o.Cl)({theme:t.props.theme},r,{scale:n.xScale,chartYTop:t.margins.top+t.eventLabelHeight,chartYBottom:n.containerHeight-35}))))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._createLegends=function(t){var n=this,i=this.props,e=i.legendProps,r=i.allowMultipleShapesForPoints,a=void 0!==r&&r,l=!(!e||!e.canSelectMultipleLegends),s={};t.forEach((function(t){t.legend&&(s[t.legend]||(s[t.legend]=[]),s[t.legend].push(t))}));var c=Object.entries(s).map((function(t){var i=t[0],e=t[1],r=e[0];return(0,o.Cl)((0,o.Cl)({title:i,color:r.color,action:function(){l?e.forEach((function(t){return n._handleMultipleLineLegendSelectionAction(t)})):e.forEach((function(t){return n._handleSingleLegendSelectionAction(t)}))},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:i})}},r.legendShape&&{shape:r.legendShape}),a&&{shape:Ws[r.index%Object.keys(js).length]})})),d=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=cs(t.color,null===(e=n.props.theme)||void 0===e?void 0:e.isInverted);return{title:r,color:o,action:function(){l?n._handleMultipleColorFillBarLegendSelectionAction(t):n._handleSingleLegendSelectionAction(t)},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:r})},opacity:n._getColorFillBarOpacity(t),stripePattern:t.applyPattern}})):[];return u.createElement(bf,(0,o.Cl)({legends:(0,o.fX)((0,o.fX)([],c,!0),d,!0),enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},l&&{onLegendHoverCardLeave:this._onHoverCardHide},this.props.legendProps,{ref:this._legendsRef}))},n.prototype._createLines=function(t,n){var i,e,r,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z,j,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it=this,et=[];this.state.isSelectedLegend?this._points=this.state.selectedLegendPoints:this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);for(var rt=fi(this._points,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),ot=ah(this.props.styles,{theme:this.props.theme}),ut=function(t){var ut=[],lt=[],st=[],ct=at._points[t].legend,dt=at._points[t].color,ft=at.state.activePoint,vt=at.props.theme,ht=n-at.margins.bottom+6,pt=!(!at._points[t].useSecondaryYScale||!at._yScaleSecondary),gt=pt?at._yScaleSecondary:at._yScalePrimary,yt=at._hasMarkersMode?yc({data:at._points,xScale:at._xAxisScale,yScalePrimary:at._yScalePrimary,yScaleSecondary:at._yScaleSecondary,useSecondaryYScale:pt,xScaleType:at.props.xScaleType,yScaleType:at.props.yScaleType,secondaryYScaleType:at.props.secondaryYScaleType}):0;if(1===at._points[t].data.length){var mt=at._points[t].data[0],bt=mt.x,xt=mt.y,wt=mt.xAxisCalloutData,Mt=mt.xAxisCalloutAccessibilityData,Ct=at._xAxisScale(bt),kt=gt(xt);if(pc(Ct,kt)){var At="".concat(at._circleId,"_").concat(t),St=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Lt=at._points[t].data[0].markerSize,Vt=null===(e=null===(i=at._points[t].lineOptions)||void 0===i?void 0:i.mode)||void 0===e?void 0:e.includes("text"),Dt=at._points[t].data[0].text;st.push(u.createElement(u.Fragment,{key:"".concat(At,"_fragment")},u.createElement("circle",(0,o.Cl)({id:At,key:At,r:Lt?Lt*yt/rt:ft===At?5.5:3.5,cx:Ct,cy:kt,fill:ft===At?vt.semanticColors.bodyBackground:dt,opacity:St?1:.1,onMouseOver:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:ft===At?4:0,stroke:ft===At?dt:"",role:"img","aria-label":at._getAriaLabel(t,0),"data-is-focusable":St,ref:function(t){it._refCallback(t,At)},onFocus:function(){return it._handleFocus(At,bt,wt,At,Mt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[0].onDataPointClick))),!at._isScatterPolar&&Vt&&Dt&&u.createElement("text",{key:"".concat(At,"-label"),x:Ct,y:kt+Math.max(Lt?Lt*yt/rt:3.5,4)+12,className:ot.markerLabel,opacity:St?1:.1},Dt)))}}var Nt=0,Ot=null!==(a=null===(r=at._points[t].gaps)||void 0===r?void 0:r.sort((function(t,n){return t.startIndex-n.startIndex})))&&void 0!==a?a:[],Tt=null===(l=at._points[t].lineOptions)||void 0===l?void 0:l.curve;if((at.props.optimizeLargeData||Tt)&&at._points[t].data.length>1){for(var Et=Cv().x((function(t){return it._xAxisScale(t[0])})).y((function(t){return gt(t[1])})).curve(uc(Tt)).defined((function(t){return pc(it._xAxisScale(t[0]),gt(t[1]))})),Ft="".concat(at._lineId,"_").concat(t),Bt="".concat(at._borderId,"_").concat(t),Pt=(null===(s=at._points[t].lineOptions)||void 0===s?void 0:s.strokeWidth)||at.props.strokeWidth||4,_t=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Ht=[],It=0;It<at._points[t].data.length;It++)Ht.push([at._points[t].data[It].x instanceof Date?at._points[t].data[It].x.getTime():at._points[t].data[It].x,at._points[t].data[It].y]);var Wt=null===(c=at._points[t].lineOptions)||void 0===c?void 0:c.mode,Rt="markers"!==Wt;if(Rt&&_t){var zt=(null===(d=at._points[t].lineOptions)||void 0===d?void 0:d.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;zt>0&&lt.push(u.createElement("path",{id:Bt,key:Bt,d:Et(Ht),fill:"transparent",strokeLinecap:null!==(v=null===(f=at._points[t].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==v?v:"round",strokeWidth:Number.parseFloat(Pt.toString())+zt,stroke:(null===(h=at._points[t].lineOptions)||void 0===h?void 0:h.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("path",(0,o.Cl)({id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!0,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(g=null===(p=at._points[t].lineOptions)||void 0===p?void 0:p.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=at._points[t].lineOptions)||void 0===y?void 0:y.strokeDasharray,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut},at._getClickHandler(at._points[t].onLineClick),{opacity:1})))}else Rt&&ut.push(u.createElement("path",{id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!1,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(b=null===(m=at._points[t].lineOptions)||void 0===m?void 0:m.strokeLinecap)&&void 0!==b?b:"round",strokeDasharray:null===(x=at._points[t].lineOptions)||void 0===x?void 0:x.strokeDasharray,opacity:.1}));var jt=null!==at.state.activeLine&&at.state.activeLine===t;if(st.push(u.createElement("circle",{id:"".concat(at._staticHighlightCircle,"_").concat(t),key:"".concat(at._staticHighlightCircle,"_").concat(t),r:5.5,cx:0,cy:0,fill:vt.semanticColors.bodyBackground,strokeWidth:4,stroke:dt,visibility:jt?"visibility":"hidden",onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut})),null==Wt?void 0:Wt.includes("markers"))for(It=0;It<at._points[t].data.length;It++){var $t=at._points[t].data[It],Yt=$t.x,Xt=$t.y;if(Ct=at._xAxisScale(Yt),kt=gt(Xt),pc(Ct,kt)){var Gt=at._points[t].data[It].markerSize,Ut=null===(w=at._points[t].data[It])||void 0===w?void 0:w.markerColor;st.push(u.createElement("circle",{key:"".concat(at._circleId,"_").concat(t,"_").concat(It,"_marker"),r:Gt?Gt*yt*.3/rt:ft===at._circleId?5.5:3.5,cx:Ct,cy:kt,fill:ft===at._circleId?vt.semanticColors.bodyBackground:Ut||(null===(M=at._points[t])||void 0===M?void 0:M.color)||dt,stroke:Ut||dt,strokeWidth:1,opacity:_t?1:.1,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut}))}}}else if(!at.props.optimizeLargeData)for(var qt=function(n){var i=at._checkInGap(n,Ot,Nt),e=i.isInGap;Nt=i.gapIndex;var r="".concat(at._lineId,"_").concat(t,"_").concat(n),a="".concat(at._borderId,"_").concat(t,"_").concat(n),l="".concat(at._circleId,"_").concat(t,"_").concat(n),s=at._points[t].data[n-1],c=s.x,d=s.y,f=s.xAxisCalloutData,v=s.xAxisCalloutAccessibilityData,h=at._points[t].data[n],p=h.x,g=h.y,y=at._xAxisScale(c),m=gt(d),b=at._xAxisScale(p),x=gt(g),w=(null===(C=at._points[t].lineOptions)||void 0===C?void 0:C.strokeWidth)||at.props.strokeWidth||4,M=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,tt=at._points[t].hideNonActiveDots&&ft!==l,nt=null===(A=null===(k=at._points[t].lineOptions)||void 0===k?void 0:k.mode)||void 0===A?void 0:A.includes("text"),et=at._points[t].data[n-1].text,pt=at._points[t].data[n-1].markerSize;if(pc(y,m)){var mt=at._getPath(y,m,l,n,!1,at._points[t].index);st.push((null===(L=null===(S=at._points[t].lineOptions)||void 0===S?void 0:S.mode)||void 0===L?void 0:L.includes("markers"))||nt?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:l,key:l,r:pt?pt*yt/rt:4,cx:y,cy:m,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(V=at._points[t].data[n-1])||void 0===V?void 0:V.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(D=at._points[t].data[n-1])||void 0===D?void 0:D.markerColor)||dt,strokeWidth:w,role:"img","aria-label":null!==(N=at._points[t].data[n-1].text)&&void 0!==N?N:at._getAriaLabel(t,n-1)})),!at._isScatterPolar&&nt&&et&&u.createElement("text",{key:"".concat(l,"-label"),x:y,y:m+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:l,key:l,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(O=at._points[t].data[n-1])||void 0===O?void 0:O.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(T=at._points[t].data[n-1])||void 0===T?void 0:T.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n-1)})))}if(n+1===at._points[t].data.length){var bt="".concat(l).concat(n,"L"),xt="".concat(l).concat(n,"D"),wt=at._points[t].hideNonActiveDots&&ft!==bt,Mt=at._points[t].data[n],Ct=Mt.xAxisCalloutData,kt=Mt.xAxisCalloutAccessibilityData;pt=at._points[t].data[n].markerSize;var At=null===(F=null===(E=at._points[t].lineOptions)||void 0===E?void 0:E.mode)||void 0===F?void 0:F.includes("text"),St=at._points[t].data[n].text;pc(b,x)&&(mt=at._getPath(b,x,bt,n,!0,at._points[t].index),st.push(u.createElement(u.Fragment,{key:"".concat(bt,"_container")},(null===(P=null===(B=at._points[t].lineOptions)||void 0===B?void 0:B.mode)||void 0===P?void 0:P.includes("markers"))||At?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:bt,key:bt,r:pt?pt*yt/rt:4,cx:b,cy:x,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:at._getPointFill(dt,bt,n,!0),stroke:dt,strokeWidth:w,role:"img","aria-label":null!==(_=at._points[t].data[n].text)&&void 0!==_?_:at._getAriaLabel(t,n)})),!at._isScatterPolar&&At&&St&&u.createElement("text",{key:"".concat(bt,"-label"),x:b,y:x+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:bt,key:bt,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:(null===(H=at._points[t].data[n])||void 0===H?void 0:H.markerColor)||at._getPointFill(dt,bt,n,!0),stroke:(null===(I=at._points[t].data[n])||void 0===I?void 0:I.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n)})),u.createElement("circle",{id:xt,key:xt,r:8,cx:b,cy:x,opacity:0,width:0,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:0,focusable:!1,onBlur:at._handleMouseOut}))))}if(pc(y,m)&&pc(b,x)&&(!at._hasMarkersMode||(null===(R=null===(W=at._points[t].lineOptions)||void 0===W?void 0:W.mode)||void 0===R?void 0:R.includes("lines"))))if(M){if(!e){var Lt=(null===(z=at._points[t].lineOptions)||void 0===z?void 0:z.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;Lt>0&&lt.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:x,strokeLinecap:null!==($=null===(j=at._points[t].lineOptions)||void 0===j?void 0:j.strokeLinecap)&&void 0!==$?$:"round",strokeWidth:Number.parseFloat(w.toString())+Lt,stroke:(null===(Y=at._points[t].lineOptions)||void 0===Y?void 0:Y.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("line",(0,o.Cl)({id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,ref:function(t){it._refCallback(t,r)},onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,stroke:dt,strokeLinecap:null!==(G=null===(X=at._points[t].lineOptions)||void 0===X?void 0:X.strokeLinecap)&&void 0!==G?G:"round",strokeDasharray:null===(U=at._points[t].lineOptions)||void 0===U?void 0:U.strokeDasharray,strokeDashoffset:null===(q=at._points[t].lineOptions)||void 0===q?void 0:q.strokeDashoffset,opacity:1},at._getClickHandler(at._points[t].onLineClick))))}}else e||ut.push(u.createElement("line",{id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,stroke:dt,strokeLinecap:null!==(K=null===(Z=at._points[t].lineOptions)||void 0===Z?void 0:Z.strokeLinecap)&&void 0!==K?K:"round",strokeDasharray:null===(J=at._points[t].lineOptions)||void 0===J?void 0:J.strokeDasharray,strokeDashoffset:null===(Q=at._points[t].lineOptions)||void 0===Q?void 0:Q.strokeDashoffset,opacity:.1}))},Zt=1;Zt<at._points[t].data.length;Zt++)qt(Zt);var Kt=null===(tt=at._points[t].lineOptions)||void 0===tt?void 0:tt.fill,Jt=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend;if("toself"===Kt&&at._points[t].data.length>=3&&Jt&&at._isScatterPolar){var Qt=function(t){return it._xAxisScale((t.x,Date,t.x))},tn=Cv().x((function(t){return Qt(t)})).y((function(t){return gt(t.y)})).curve(uc(Tt)).defined((function(t){return pc(Qt(t),gt(t.y))}))(at._points[t].data);tn&&ut.push(u.createElement("path",{key:"scatterpolar_fill_".concat(t),d:"".concat(tn,"Z"),fill:dt,fillOpacity:.5,stroke:dt,strokeWidth:2,strokeOpacity:.8,pointerEvents:"none"}))}at._isScatterPolar&&st.push.apply(st,oh({xAxisScale:at._xAxisScale,yAxisScale:gt,className:ot.markerLabel||"",lineOptions:null===(nt=at._points[t])||void 0===nt?void 0:nt.lineOptions})),et.push(u.createElement("g",{key:"line_".concat(t),role:"region","aria-label":"".concat(ct,", line ").concat(t+1," of ").concat(at._points.length," with ").concat(at._points[t].data.length," data points.")},lt,ut,st))},at=this,lt=this._points.length-1;lt>=0;lt--)ut(lt);return et},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&this.props.data.lineChartData.filter((function(t){return t.data.length})).length>0)},n.defaultProps={enableReflow:!0,useUTC:!0,isCalloutForStack:!0},n}(u.Component),ch=(0,r.I)(sh,(function(t){return{tooltip:sv(t.theme),markerLabel:fv(t.theme)}})),dh=(0,a.Z)(),fh=u.forwardRef((function(t,n){var i,e,r,a=u.useMemo((function(){return p("circle")}),[]),s=u.useMemo((function(){return p("seriesID")}),[]),c=u.useMemo((function(){return p("verticalLine")}),[]),d=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),f=u.useRef(ct(t.data.scatterChartData)),v=u.useMemo((function(){return Ss(f.current)||{}}),[f]),h=u.useRef(""),g=u.useRef(""),y=u.useRef(null),m=u.useMemo((function(){return[]}),[]),b=u.useRef(null),x=u.useRef([]),w=u.useRef(0),M=u.useRef(null),C=u.useRef(null),k=u.useState(""),A=k[0],S=k[1],L=u.useState(""),V=L[0],D=L[1],N=u.useState([]),O=N[0],T=N[1],E=u.useState([]),F=E[0],B=E[1],P=u.useState(!1),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],z=u.useState(),j=z[0],$=z[1],Y=u.useState(),X=Y[0],G=Y[1],U=u.useState(!1),q=U[0],Z=U[1],K=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),J=K[0],Q=K[1],tt=u.useState(""),nt=tt[0],it=tt[1],et=u.useRef(void 0),rt=u.useRef(!1),ot=u.useRef(!1),ut=dh(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;et.current&&!Zs(et.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&Q((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),et.current=null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){var n,i;return{chartContainer:null!==(i=null===(n=M.current)||void 0===n?void 0:n.chartContainer)&&void 0!==i?i:null,toImage:function(n){var i,e;return af([{container:null===(i=M.current)||void 0===i?void 0:i.chartContainer}],t.hideLegend||null===(e=C.current)||void 0===e?void 0:e.toSVG,(0,l.jI)(),n)}}}),[t.hideLegend]);var at=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?zs(t.data.scatterChartData[0].data[0].x,!0):ns.StringAxis,lt=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0&&"string"==typeof t.data.scatterChartData[0].data[0].y?is.StringAxis:is.NumericAxis,st=u.useRef([]);function ct(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?ss(n,0):cs(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){f.current===ct(t.data.scatterChartData)&&t.data===f.current||(st.current=ct(t.data.scatterChartData))}),[t.height,t.width,t.data,f]);var dt=u.useCallback((function(t){b.current=t}),[]);function ft(){B([]),H(!1)}function vt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?Q(n):Q(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ht=u.useCallback((function(n,i){var e=t.theme;return W===i?e.semanticColors.bodyBackground:n}),[W,t]),pt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===ns.NumericAxis?Ts(n,i,e,o,t.xScaleType,!0):u===ns.DateAxis?Ps(n,i,e,o,l,r):Bs(i,e,o)}),[t.xScaleType]),gt=u.useCallback((function(n,i,e,r,o){y.current=r;var u=i instanceof Date?(0,Yn.Yn)(i,t.culture,t.useUTC):i,a=wc(v,i);a?(sl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=h.current)||void 0===t?void 0:t.call(h,i))+w.current,", 0)")})).attr("visibility","visibility"),m.forEach((function(t){t.index===n&&(Z(!0),S(e||""+u),it("#".concat(r)),T(a.values),R(r))}))):R(r)}),[c,h,w,v,m,t.culture,t.useUTC]),yt=u.useCallback((function(n,i,e,r,o,u,a){var l;null==a||a.persist();var s=n instanceof Date?(0,Yn.Yn)(n,t.culture,t.useUTC):n,d=wc(v,n);d?(sl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=h.current)||void 0===t?void 0:t.call(h,n))+w.current,", ").concat(null===(e=g.current)||void 0===e?void 0:e.call(g,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=g.current)||void 0===l?void 0:l.call(g,i)))),y.current!==o&&(y.current=o,Z(!0),S(r||""+s),it("#".concat(o)),T(d.values),$(d),G(d),R(o))):R(o)}),[c,h,w,v,t.culture,t.useUTC]),mt=u.useCallback((function(){sl("#".concat(c)).attr("visibility","hidden")}),[c]),bt=u.useCallback((function(){y.current=null,R(""),q&&Z(!1)}),[y,q,R,Z]),xt=u.useCallback((function(){return J.length>0?J:V?[V]:[]}),[J,V]),wt=u.useCallback((function(){return 0===xt().length}),[xt]),Mt=u.useCallback((function(t){return xt().includes(t)}),[xt]),Ct=u.useCallback((function(n,i){var e,r,o=null===(e=f.current)||void 0===e?void 0:e[n],u=o.data[i],a=u.x instanceof Date?(0,Yn.Yn)(u.x,t.culture,t.useUTC):u.x,l=u.xAxisCalloutData||a,s=o.legend,c=u.yAxisCalloutData||u.y;return(null===(r=u.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(l,". ").concat(s,", ").concat(c,".")}),[f,t.culture,t.useUTC]),kt=u.useCallback((function(n,i){var e,r,l,c,d,v,p,y,m,x,M,C,k,A,S,L,V,D,N,O,T,E,B,P,H,I,R,z,j,$,Y,X,G,U,q,Z,K=[];f.current=_?F:ct(t.data.scatterChartData),at===ns.StringAxis&&(w.current=(null===(e=h.current)||void 0===e?void 0:e.bandwidth())/2);for(var J=null!==(r=di(f.current,(function(t){return di(t.data,(function(t){return t.markerSize}))})))&&void 0!==r?r:0,Q=null!==(l=fi(f.current,(function(t){return fi(t.data,(function(t){return t.markerSize}))})))&&void 0!==l?l:0,tt=at!==ns.StringAxis&&lt!==is.StringAxis,nt=tt?yc({data:f.current,xScale:h.current,yScalePrimary:g.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,it=function(t){for(var n=[],e=null===(v=null===(d=f.current)||void 0===d?void 0:d[t])||void 0===v?void 0:v.legend,r=null===(y=null===(p=f.current)||void 0===p?void 0:p[t])||void 0===y?void 0:y.color,l=i-(null!==(x=null===(m=b.current)||void 0===m?void 0:m.bottom)&&void 0!==x?x:0)+6,c=function(i){var c=null===(S=null===(A=f.current)||void 0===A?void 0:A[t])||void 0===S?void 0:S.data[i],d=c.x,v=c.y,p=c.xAxisCalloutData,y=c.xAxisCalloutAccessibilityData,m=null===(L=h.current)||void 0===L?void 0:L.call(h,d),b=lt===is.StringAxis?(null===(V=g.current)||void 0===V?void 0:V.call(g,v))+((null===(D=g.current)||void 0===D?void 0:D.bandwidth)?g.current.bandwidth()/2:0):null===(N=g.current)||void 0===N?void 0:N.call(g,v);if(!pc(m,b))return"continue";var x="".concat(s,"_").concat(t,"_").concat(i),M="".concat(a,"_").concat(t,"_").concat(i),C=(null===(T=null===(O=f.current)||void 0===O?void 0:O[t])||void 0===T?void 0:T.data[i]).markerSize,k=W===M?6:4;C&&(tt&&0!==Q?k=C*nt/Q:tt||Q===J||(k=4+(C-J)/(Q-J)*12));var F,Y=Mt(e)||wt()||_,X=(null===(B=null===(E=f.current)||void 0===E?void 0:E[t])||void 0===B?void 0:B.hideNonActiveDots)&&W!==M,G=null===(H=null===(P=f.current)||void 0===P?void 0:P[t].data[i])||void 0===H?void 0:H.text;ot.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:M,key:M,r:Math.max(k,4),cx:m+w.current,cy:b,"data-is-focusable":Y,onMouseOver:function(t){return yt(d,v,l,p,M,y,t)},onMouseMove:function(t){return yt(d,v,l,p,M,y,t)},onMouseOut:mt,onFocus:function(){return gt(x,d,p,M,y)},onBlur:mt},(F=null===(z=null===(R=null===(I=f.current)||void 0===I?void 0:I[t])||void 0===R?void 0:R.data[i])||void 0===z?void 0:z.onDataPointClick)?{onClick:F}:{},{opacity:Y&&!X?1:.1,fill:ht(r,M),stroke:r,role:"img","aria-label":Ct(t,i),tabIndex:""!==(null===($=null===(j=f.current)||void 0===j?void 0:j[t])||void 0===$?void 0:$.legend)?0:void 0})))),ot&&G&&n.push(u.createElement("text",{key:"".concat(M,"-label"),x:m+w.current,y:b+Math.max(k+12,16),className:ut.markerLabel},G))},F=0;F<(null===(k=null===(C=null===(M=f.current)||void 0===M?void 0:M[t])||void 0===C?void 0:C.data)||void 0===k?void 0:k.length);F++)c(F);rt.current&&n.push.apply(n,oh({xAxisScale:h.current,yAxisScale:g.current,className:ut.markerLabel||"",lineOptions:null===(X=null===(Y=f.current)||void 0===Y?void 0:Y[t])||void 0===X?void 0:X.lineOptions})),K.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(G=f.current)||void 0===G?void 0:G.length," with ").concat(null===(Z=null===(q=null===(U=f.current)||void 0===U?void 0:U[t])||void 0===q?void 0:q.data)||void 0===Z?void 0:Z.length," data points.")},n))},et=(null===(c=f.current)||void 0===c?void 0:c.length)-1;et>=0;et--)it(et);return K}),[h,g,t.data.scatterChartData,a,Ct,ht,gt,yt,mt,Mt,wt,s,at,lt,W,_,F,ut,t.xScaleType,t.yScaleType]),At=u.useCallback((function(t,n,i,e,r){h.current=t,g.current=n,rt.current=cc(f.current),ot.current=function(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"text"===t.lineOptions.mode}))}(f.current),x.current=kt(r,i)}),[x,h,g,kt]),St=u.useCallback((function(n,i){var e=_s(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=vc(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),Lt=t.legendProps,Vt=t.tickValues,Dt=t.tickFormat;f.current=ct(t.data.scatterChartData);var Nt=f.current;Lt&&Lt.canSelectMultipleLegends&&(Nt=F.length>=1?F:f.current,v=Ss(Nt));var Ot=null;t.hideLegend||ot.current||(Ot=function(n){var i=t.legendProps,e=!(!i||!i.canSelectMultipleLegends),r={};n.forEach((function(t){t.legend&&(r[t.legend]||(r[t.legend]=[]),r[t.legend].push(t))}));var a=Object.entries(r).map((function(t){var n=t[0],i=t[1][0];return(0,o.Cl)({title:n,color:i.color,onMouseOutAction:function(){D("")},hoverAction:function(){bt(),D(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(bf,(0,o.Cl)({ref:C,legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:ft},{onChange:vt},t.legendProps))}(f.current));var Tt=(0,o.Cl)({isCalloutVisible:q,directionalHint:3,YValueHover:O,hoverXValue:A,id:"toolTip".concat(y.current),target:nt,isBeakVisible:!1,gapSpace:15,onDismiss:function(){Z(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&q),descriptionMessage:t.getCalloutDescriptionMessage&&j?t.getCalloutDescriptionMessage(j):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Et={tickValues:Vt,tickFormat:Dt},Ft=f.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Ft));var Bt=function(){var n;if(lt!==is.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=f.current.length-1;e>=0;e--){var r=f.current[e];if(r.data&&Array.isArray(r.data))for(var o=0,u=r.data;o<u.length;o++){var a=u[o];"string"==typeof a.y&&i.add(a.y)}}return Array.from(i)}return lc((n={},f.current.forEach((function(t){t.data&&Array.isArray(t.data)&&t.data.forEach((function(t){"string"==typeof t.y&&(n[t.y]||(n[t.y]=[]),"number"==typeof t.x&&n[t.y].push(t.x))}))})),n),t.yAxisCategoryOrder)}();return t.data&&t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData.filter((function(t){return t.data.length})).length>0?u.createElement(jv,(0,o.Cl)({},t,{ref:M,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Nt,chartType:ts.ScatterChart,calloutProps:Tt,tickParams:Et,legendBars:Ot,getmargins:dt,getMinMaxOfYAxis:St,getDomainNRangeValues:pt,createYAxis:Cs,createStringYAxis:As,getGraphData:At,xAxisType:at,yAxisType:lt},lt===is.StringAxis?{stringDatasetForYAxisDomain:Bt}:{},{onChartMouseLeave:bt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:M},rt.current?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:t.onRenderCalloutPerStack?t.onRenderCalloutPerStack(j):t.onRenderCalloutPerDataPoint?t.onRenderCalloutPerDataPoint(X):null,children:function(t){return h.current=t.xScale,g.current=t.yScalePrimary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:t.containerHeight,stroke:"#323130",id:c,visibility:"hidden",strokeDasharray:"5,5"}),u.createElement("g",null,x.current)))}})):u.createElement("div",{id:d,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));fh.displayName="ScatterChart";var vh=(0,r.I)(fh,(function(t){return{tooltip:sv(t.theme),markerLabel:fv(t.theme)}}));function hh(t,n){if((r=t.length)>1)for(var i,e,r,o=1,u=t[n[0]],a=u.length;o<r;++o)for(e=u,u=t[n[o]],i=0;i<a;++i)u[i][1]+=u[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function ph(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function gh(t,n){return t[n]}function yh(t){const n=[];return n.key=t,n}function mh(t){return t<0?-1:1}function bh(t,n,i){var e=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(e||r<0&&-0),u=(i-t._y1)/(r||e<0&&-0),a=(o*r+u*e)/(e+r);return(mh(o)+mh(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function xh(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function wh(t,n,i){var e=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,r+a*n,o-a,u-a*i,o,u)}function Mh(t){this._context=t}function Ch(t){this._context=t}function kh(t){return new Mh(t)}function Ah(t,n,i){var e=null,r=wf(!0),o=null,u=hl,a=null,l=jf(s);function s(s){var c,d,f,v,h,p=(s=xf(s)).length,g=!1,y=new Array(p),m=new Array(p);for(null==o&&(a=u(h=l())),c=0;c<=p;++c){if(!(c<p&&r(v=s[c],c,s))===g)if(g=!g)d=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),f=c-1;f>=d;--f)a.point(y[f],m[f]);a.lineEnd(),a.areaEnd()}g&&(y[c]=+t(v,c,s),m[c]=+n(v,c,s),a.point(e?+e(v,c,s):y[c],i?+i(v,c,s):m[c]))}if(h)return a=null,h+""||null}function c(){return Cv().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?wv:wf(+t),n="function"==typeof n?n:wf(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?Mv:wf(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:wf(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:wf(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:wf(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:wf(+t),s):i},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(i)},s.lineX1=function(){return c().x(e).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:wf(!!t),s):r},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s}Mh.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:wh(this,this._t0,xh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,wh(this,xh(this,i=bh(this,t,n)),i);break;default:wh(this,this._t0,i=bh(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(function(t){this._context=new Ch(t)}.prototype=Object.create(Mh.prototype)).point=function(t,n){Mh.prototype.point.call(this,n,t)},Ch.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,r,o){this._context.bezierCurveTo(n,t,e,i,o,r)}};var Sh,Lh=wi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(Sh||(Sh={}));var Vh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._containsSecondaryYAxis=!1,e._hasDuplicateXValues=!1,e._hasMissingXValues=!1,e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return _s(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Ts(t,n,i,r):o===ns.DateAxis?Ps(t,n,i,r,a,e):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},e._getMargins=function(t){e.margins=t},e._onRectMouseMove=function(t){t.persist();var n=e.props.data.lineChartData,i=e._xAxisRectScale.invert(xv(t)[0],document.getElementById(e._rectId)),r=Lh(n[0].data,i),u=n[0].data[r-1],a=n[0].data[r],l=null,s=null,c=n[0].data.length>0?zs(n[0].data[0].x,!0):null;if(void 0===u&&void 0!==a)l=a.x,s=r;else if(void 0!==u&&void 0===a)l=u.x,s=r-1;else{var d=void 0,f=void 0,v=void 0;switch(c){case ns.DateAxis:d=new Date(i).getTime(),f=u.x.getTime(),v=a.x.getTime(),l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1;break;case ns.NumericAxis:d=i,f=u.x,v=a.x,l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1}}var h=n[0].data[s],p=h.xAxisCalloutData,g=h.xAxisCalloutAccessibilityData,y=l instanceof Date?(0,Yn.Yn)(l,e.props.culture,e.props.useUTC):l,m=wc(e._calloutPoints,l),b=c===ns.DateAxis?l.getTime():l,x=e.state.nearestCircleToHighlight!==b;if(m&&x&&!e.state.isShowCalloutPending){var w=e._getFilteredLegendValues(m.values);e.setState({nearestCircleToHighlight:b,isCalloutVisible:!1,isShowCalloutPending:!0,lineXValue:e._xAxisRectScale(l),displayOfLine:Sh.show,isCircleClicked:!1,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),YValueHover:w,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),hoverXValue:p||y,xAxisCalloutAccessibilityData:g,activePoint:""})}m||e.setState({isCalloutVisible:!1,nearestCircleToHighlight:b,displayOfLine:Sh.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:Sh.hide,isCircleClicked:!1,stackCalloutProps:void 0,dataPointCalloutProps:void 0,hoverXValue:void 0,YValueHover:[]})},e._getDataPoints=function(t,n){var i,r=[],o=0;if(e._shouldFillToZeroY())t.forEach((function(t,i){var e=[];n.forEach((function(n){e.push({values:[0,n[t]],xVal:n.xVal}),n[t]>o&&(o=n[t])})),r.push(e)}));else{var u=function(){var t=wf([]),n=ph,i=hh,e=gh;function r(r){var o,u,a=Array.from(t.apply(this,arguments),yh),l=a.length,s=-1;for(const t of r)for(o=0,++s;o<l;++o)(a[o][s]=[0,+e(t,a[o].key,s,r)]).data=t;for(o=0,u=xf(n(a));o<l;++o)a[u[o]].index=o;return i(a,u),a}return r.keys=function(n){return arguments.length?(t="function"==typeof n?n:wf(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:wf(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?ph:"function"==typeof t?t:wf(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?hh:t,r):i},r}().keys(t)(n);o=fi(u[u.length-1],(function(t){return t[1]})),u.forEach((function(t){var n=[];t.forEach((function(t){n.push({values:t,xVal:t.data.xVal})})),r.push(n)}))}return e._isMultiStackChart=!!((null===(i=e.props.legendProps)||void 0===i?void 0:i.selectedLegends)?(null==r?void 0:r.length)>=1:(null==r?void 0:r.length)>1),{renderData:r,maxOfYVal:e._containsSecondaryYAxis?_s(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=Ss(t);t&&t.length&&t.forEach((function(t){r.push(t.color),o.push(t.opacity||1),n.push.apply(n,t.data)}));var a={};n.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;a[n]?a[n].push(t):a[n]=[t]})),Object.keys(a).forEach((function(t){var n=a[t],e={};n.forEach((function(t,n){e.xVal=t.x,e["chart".concat(n)]=t.y})),i.push(e)}));for(var l=i&&Object.keys(i[0]).length,s=[],c=0;c<l-1;c++){var d="chart".concat(c);s.push(d)}var f=e._getDataPoints(s,i);return{colors:r,opacity:o,keys:s,data:f,calloutPoints:u}}var v=[],h=[],p=[],g=[],y=(u=Ss(t),f={},s=[],0);if(t&&t.length&&t.forEach((function(t){e._hasDuplicateXValues&&!t.legend&&(t.legend="chart".concat(y),++y),t.data.forEach((function(n){n.legend=t.legend})),p.push(t.color),g.push(t.opacity||1),v.push.apply(v,t.data)})),e._hasDuplicateXValues){var m=e._createDatasetForXCoordinateWithMultipleYValues(v);f=e._getDataPoints(m.keys,m.filteredDataSet)}else{for(var b=v,x=function(){var t=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x,n=b.filter((function(n){return(n.x instanceof Date?n.x.toLocaleString():n.x)===t})),i={};n.forEach((function(t,n){i.xVal=t.x,i["chart".concat(n)]=t.y})),h.push(i);var e=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x;b=b.filter((function(t){return(t.x instanceof Date?t.x.toLocaleString():t.x)!==e}))};b.length;)x();for(l=h&&Object.keys(h[0]).length,c=0;c<l-1;c++)d="chart".concat(c),s.push(d);f=e._getDataPoints(s,h)}return{colors:p,opacity:g,keys:s,data:f,calloutPoints:u}},e._createDatasetForXCoordinateWithMultipleYValues=function(t){var n=[],i={};t.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;i[n]||(i[n]=[]),i[n].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];e.forEach((function(t,i){var r={xVal:e[0].x};r[t.legend?t.legend:"chart".concat(i)]=t.y,n.push(r)}))}));var e=[];n.forEach((function(t){Object.keys(t).forEach((function(t){"xVal"===t||e.includes(t)||e.push(t)}))})),n.forEach((function(t){e.forEach((function(n){t[n]||(t[n]=0)}))}));var r=n.filter((function(t){return e.some((function(n){return 0!==t[n]}))}));return{keys:Array.from(new Set(r.flatMap((function(t){return Object.keys(t).filter((function(t){return"xVal"!==t}))})))),filteredDataSet:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._getGraphData=function(t,n,i,r,o,u,a){e._chart=e._drawGraph(i,t,n,a,o)},e._getLegendData=function(t){var n=[];return t.forEach((function(t){var i=t.color;if(!(n.filter((function(n){return n.title===t.legend&&n.color===i})).length>0)){var r={title:t.legend,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(t.legend)},onMouseOutAction:function(){e._onLegendLeave()}};n.push(r)}})),u.createElement(bf,(0,o.Cl)({legends:n,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._onDataPointClick=function(t){t&&t(),e.setState({isCircleClicked:!0})},e._getOpacity=function(t){return e._isMultiStackChart?e._legendHighlighted(t)||e._noLegendHighlighted()?.7:.1:.7},e._getLineOpacity=function(t){if(e._isMultiStackChart){var n=.3;return e.state.isCalloutVisible&&(n=1),e._noLegendHighlighted()||(n=e._legendHighlighted(t)?0:.1),n}return 1},e._updateCircleFillColor=function(t,n,i){var r=n;return e.state.nearestCircleToHighlight!==t&&e.state.activePoint!==i||(e._highlightedCircleId=i,e.state.isCircleClicked||(r=e.props.theme.semanticColors.bodyBackground)),r},e._drawGraph=function(t,n,i,r,a){var l,s=e._addDefaultColors(e.props.data.lineChartData),c=e.props.data,d=c.pointOptions,f=c.pointLineOptions,v=[];e._data.forEach((function(t,a){var l,c,d,f,h,p,g,y,m,b,x,w,M=(null===(l=s[a])||void 0===l?void 0:l.useSecondaryYScale)&&r?r:i,C=uc(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,kh),k=Ah().x((function(t){return n(t.xVal)})).y0((function(t){return M(t.values[0])})).y1((function(t){return M(t.values[1])})).curve(C),A=Cv().x((function(t){return n(t.xVal)})).y((function(t){return M(t.values[1])})).curve(C),S=e._shouldFillToZeroY()?.8:e._opacity[a];v.push(u.createElement(u.Fragment,{key:"".concat(a,"-graph-").concat(e._uniqueIdForGraph)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:"gradient_".concat(a),x1:"0%",x2:"0%",y1:"0%",y2:"100%"},u.createElement("stop",{offset:"0",stopColor:e._colors[a]}),u.createElement("stop",{offset:"100%",stopColor:"transparent"}))),u.createElement("path",{id:"".concat(a,"-line-").concat(e._uniqueIdForGraph),d:A(t),fill:"transparent",strokeWidth:null!==(p=null===(h=null===(f=s[a])||void 0===f?void 0:f.lineOptions)||void 0===h?void 0:h.strokeWidth)&&void 0!==p?p:3,stroke:e._colors[a],opacity:e._getLineOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove,strokeDasharray:null===(y=null===(g=s[a])||void 0===g?void 0:g.lineOptions)||void 0===y?void 0:y.strokeDasharray,strokeDashoffset:null===(b=null===(m=s[a])||void 0===m?void 0:m.lineOptions)||void 0===b?void 0:b.strokeDashoffset,strokeLinecap:null===(w=null===(x=s[a])||void 0===x?void 0:x.lineOptions)||void 0===w?void 0:w.strokeLinecap}),1===t.length?u.createElement("circle",{id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),cx:n(t[0].xVal),cy:M(t[0].values[1]),r:6,stroke:e._colors[a],strokeWidth:3,fill:e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove}):u.createElement("path",(0,o.Cl)({id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),d:k(t),fill:e.props.enableGradient?"url(#gradient_".concat(a,")"):e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e.props.optimizeLargeData&&{"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),role:"img","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")}))))}));var h=d&&d.r?Number(d.r):8;return e._data.forEach((function(t,a){var c;if(s.length!==a){var f=(null===(c=s[a])||void 0===c?void 0:c.useSecondaryYScale)&&r?r:i;e.props.optimizeLargeData&&1!==t.length?t.forEach((function(t,i){var r=t.xVal instanceof Date?t.xVal.getTime():t.xVal;if(e.state.nearestCircleToHighlight===r){var c="".concat(e._circleId,"_").concat(a*e._data[0].length+i);l=s[a].color;var p=s[a].legend;v.push(u.createElement("circle",(0,o.Cl)({key:c,id:c,cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(r,l,c),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),qs(d),{r:e._getCircleRadius(r,h,c,p)})))}})):v.push(u.createElement("g",{key:"".concat(a,"-dots-").concat(e._uniqueIdForGraph),clipPath:"url(#clip)",role:"region","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")},t.map((function(t,i){var r="".concat(e._circleId,"_").concat(a*e._data[0].length+i),c=t.xVal instanceof Date?t.xVal.getTime():t.xVal;l=s[a].color;var v=s[a].legend;return u.createElement("circle",(0,o.Cl)({key:r,id:r,"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(c,l,r),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),{onFocus:function(){return e._handleFocus(a,i,r)},onBlur:e._handleBlur},qs(d),{r:e._getCircleRadius(c,h,r,v),role:"img","aria-label":!e._hasDuplicateXValues&&!e._hasMissingXValues&&e._getAriaLabel(a,i)||void 0}))}))))}})),v.push(u.createElement("line",(0,o.Cl)({id:e._verticalLineId,key:e._verticalLineId,x1:e.state.lineXValue,y1:0,x2:e.state.lineXValue,y2:t,strokeWidth:1,strokeDasharray:5.5,stroke:l,opacity:.5,visibility:e.state.displayOfLine},qs(f)))),v},e._getOnClickHandler=function(t,n,i){return!e._hasDuplicateXValues&&!e._hasMissingXValues&&{onClick:e._onDataPointClick.bind(e,t[n].data[i].onDataPointClick)}},e._getCircleRadius=function(t,n,i,r){var o=e.state,u=o.isCircleClicked,a=o.nearestCircleToHighlight,l=o.activePoint;return e._noLegendHighlighted()||e._legendHighlighted(r)?u&&a===t?1:a===t||l===i?n:0:0},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){if(e._hasMissingXValues){var n=new Set;t&&t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))})),t&&t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||t.data.push({x:"string"==typeof n?new Date(n):n,y:0,legend:t.legend})})),t.data.sort((function(t,n){var i=t.x instanceof Date?t.x.getTime():t.x,e=n.x instanceof Date?n.x.getTime():n.x;return i<e?-1:i>e?1:0}))}))}return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ss(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},e._handleFocus=function(t,n,i){var r=e.props.data.lineChartData[t].data[n],u=r.x,a=r.y,l=r.xAxisCalloutData,s=u instanceof Date?(0,Yn.Yn)(u,e.props.culture,e.props.useUTC):u,c=wc(e._calloutPoints,u);if(c){c.values=c.values.filter((function(t){return t.y===a}));var d=e._getFilteredLegendValues(c.values);e.setState({refSelected:"#".concat(i),isCalloutVisible:!0,hoverXValue:l||s,YValueHover:d,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),activePoint:i})}},e._getFilteredLegendValues=function(t){return e._noLegendHighlighted()?t:t.filter((function(t){return e._legendHighlighted(t.legend)}))},e._handleBlur=function(){e.setState({refSelected:null,isCalloutVisible:!1,hoverXValue:void 0,YValueHover:[],stackCalloutProps:void 0,dataPointCalloutProps:void 0,activePoint:""})},e._getChartTitle=function(){var t=e.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Area chart with ".concat((null==i?void 0:i.length)||0," data series. ")},Ec(e),e._createSet=(0,an.J9)(e._createDataSet),e.state={selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,hoverXValue:"",isCalloutVisible:!1,refSelected:null,YValueHover:[],lineXValue:0,displayOfLine:Sh.hide,isCircleClicked:!1,nearestCircleToHighlight:null,isShowCalloutPending:!1,activePoint:""},En("AREA CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default"}),e._hasMissingXValues=e._containsMissingXValues(),e._uniqueIdForGraph=p("areaChart_"),e._verticalLineId=p("verticalLine_"),e._circleId=p("circle"),e._rectId=p("rectangle"),e._enableComputationOptimization=!0,e._firstRenderOptimization=!0,e._emptyChartId=p("_AreaChart_empty"),e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),this.state.isShowCalloutPending&&this.setState({refSelected:"#".concat(this._highlightedCircleId),isCalloutVisible:!0,isShowCalloutPending:!1})},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props.data.lineChartData,i=this._addDefaultColors(n);this._hasDuplicateXValues=this._xCoordinateContainsMultipleY(),this._containsSecondaryYAxis=!!this.props.secondaryYScaleOptions&&i.some((function(t){return t.useSecondaryYScale}));var e=this._createSet(i),r=e.colors,a=e.opacity,l=e.data,s=e.calloutPoints;this._calloutPoints=s;var c=Os(i);this._colors=r,this._opacity=a,this._data=l.renderData;var d=this._getLegendData(i),f={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat},v=(0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible&&!this._hasDuplicateXValues&&!this._hasMissingXValues,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),gapSpace:15,isBeakVisible:!1,onDismiss:this._closeCallout,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps);return u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:ts.AreaChart,calloutProps:v,legendBars:d,createYAxis:Cs,isCalloutForStack:!0,xAxisType:c?ns.DateAxis:ns.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,getmargins:this._getMargins,getMinMaxOfYAxis:this._getMinMaxOfYAxis,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){t._xAxisRectScale=n.xScale;var i=t._xAxisRectScale.ticks(),e=t._xAxisRectScale(i[i.length-1]),r=n.containerHeight-t.margins.top;return u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("rect",{id:t._rectId,width:e,height:r,fill:"transparent",onMouseMove:t._onRectMouseMove,onMouseOut:t._onRectMouseOut,onMouseOver:t._onRectMouseMove})),u.createElement("g",null,t._chart))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._getAriaLabel=function(t,n){var i,e=this.props.data.lineChartData[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,this.props.culture,this.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n.prototype._xCoordinateContainsMultipleY=function(){var t=this.props.data.lineChartData;if(!t)return!1;for(var n=0,i=t;n<i.length;n++)for(var e={},r=0,o=i[n].data;r<o.length;r++){var u=o[r],a=u.x instanceof Date?u.x.toLocaleString():u.x;if(e[a]||(e[a]=[]),e[a].push(u.y),e[a].length>1)return!0}return!1},n.prototype._containsMissingXValues=function(){var t=this.props.data.lineChartData;if(!t)return!1;var n=new Set;t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))}));var i=!1;return t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||(i=!0)}))})),i},n.prototype._shouldFillToZeroY=function(){return"tozeroy"===this.props.mode||this._containsSecondaryYAxis},n.defaultProps={useUTC:!0},n}(u.Component),Dh=(0,r.I)(Vh,(function(t){return{tooltip:sv(t.theme)}})),Nh=function(t,n){var i,e=t.color;return{arcRoot:{fill:e},arcRootFocussed:{fill:e,stroke:(null==n?void 0:n.palette.black)||It.bp.black,strokeWidth:2},arc:{outline:"none"},arcText:{fill:(null==n?void 0:n.semanticColors.bodyText)||It.bp.black,outline:"none",selectors:(i={},i[It.up]={fill:"CanvasText"},i)}}},Oh=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){Eh(t)},i._onFocus=function(){i.setState({isArcFocused:!0})},i._onBlur=function(){i.setState({isArcFocused:!1})},i.state={isArcFocused:!1},i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Eh(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return Nh(t,n.props.theme)}),(0,o.Cl)({},this.props));return u.createElement("path",{d:i(this.props.data),className:"".concat(this.state.isArcFocused?e.arcRootFocussed:e.arcRoot),onClick:null===(t=this.props.data)||void 0===t?void 0:t.data.onClick})},n.defaultProps={arc:Zf()},n}(u.Component),Th=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var n,i,e=this,r=this.props,o=r.data,l=r.culture,s=Zf().centroid({endAngle:(null==o?void 0:o.endAngle)||0,startAngle:(null==o?void 0:o.startAngle)||0,padAngle:null==o?void 0:o.padAngle,innerRadius:(null===(n=this.props)||void 0===n?void 0:n.outerRadius)||0,outerRadius:(null===(i=this.props)||void 0===i?void 0:i.outerRadius)||4}),c=s[0],d=s[1],f=(0,a.Z)()((function(t){return Nh(t,e.props.theme)})),v=(((null==o?void 0:o.startAngle)||0)+((null==o?void 0:o.endAngle)||0))/2,h="".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l));return u.createElement("g",{className:"".concat(f.arc," arc"),"data-is-focusable":!0,id:this._arcId,onFocus:this._onFocus,onBlur:this._onBlur,"aria-label":h,role:"img"},t.prototype.render.call(this),u.createElement(lv,{content:h,textProps:{x:c+(v>Math.PI?-10:10),y:d+(v>Math.PI/2&&v<3*Math.PI/2?10:-10),dominantBaseline:v>Math.PI/2&&v<3*Math.PI/2?"hanging":"auto",textAnchor:!this._isRTL&&v>Math.PI||this._isRTL&&v<Math.PI?"end":"start","aria-label":"".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l)),className:f.arcText},isTooltipVisibleProp:this.state.isArcFocused,shouldReceiveFocus:!1,maxWidth:40,wrapContent:Vs}))},n}(Oh);function Eh(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Fh,Bh=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(Th,{culture:i.props.culture,key:n,data:t,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:"".concat(i.colors(n)),theme:i.props.theme})},i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=n.width,o=n.height,a=n.chartTitle,l=n.theme,s=[];if(e&&!this.props.colors)for(var c=0;c<e.length;c++)s.push(ss(c,0,null==l?void 0:l.isInverted));var d=this.props.colors,f=void 0===d?s:d;this.colors=Ou().range(f.map((function(t){return cs(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(td,{direction:dc.domOrder},u.createElement("svg",{width:r,height:o,"aria-label":a},u.createElement("g",{className:"pie",transform:h},v.map((function(n,i){return t.arcGenerator(n,i)})))))},n.defaultProps={pie:Pf().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),Ph=(0,a.Z)(),_h=function(t){function n(n){var i=t.call(this,n)||this;return i._emptyChartId=p("_PieChart_empty"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.data,i=t.width,e=t.height,r=t.colors,o=t.chartTitle,a=this.props,l=a.theme,s=a.className,c=a.styles,d=a.culture;this._classNames=Ph(c,{theme:l,width:i,height:e,className:s});var f=Math.min(i-80,e-32)/2;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root},this.props.chartTitle&&u.createElement("p",{className:this._classNames.chartTitle},this.props.chartTitle),u.createElement(Bh,{culture:d,width:i+8,height:e+8,outerRadius:f,innerRadius:1,data:n,colors:r,chartTitle:o,theme:l}))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.y>0})).length>0)},n.defaultProps={data:[],width:600,height:350},n}(u.Component),Hh=(0,r.I)(_h,(function(t){var n=t.className,i=t.theme,e=t.width+30,r=t.height+10;return{root:[i.fonts.medium,"ms-PieChart",n,{width:e+40}],chart:[{padding:20,width:e,height:r,boxSizing:"content-box"}],chartTitle:[(0,o.Cl)((0,o.Cl)({textAlign:"center"},i.fonts.mediumPlus),{color:i.semanticColors.bodyText})]}}));!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(Fh||(Fh={}));var Ih,Wh=(0,a.Z)(),Rh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._adjustProps=function(){var t=i.props,n=t.theme,e=t.className,r=t.styles,o=t.width,u=t.barHeight;i._classNames=Wh(r,{legendColor:i.state.color,theme:n,width:o,className:e,barHeight:u})},i._getLegendData=function(t,n,e){var r=[e.blueLight,e.blue,e.blueMid,e.red,e.black],a=[];return t.forEach((function(t,e){var o=t.chartData.filter((function(t){return!t.placeHolder}));o.length<3?void 0!==n[e]&&n[e]&&o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}})):o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}}))})),u.createElement(bf,(0,o.Cl)({legends:a,overflowProps:i.props.legendsOverflowProps,focusZonePropsInHoverCard:i.props.focusZonePropsForLegendsInHoverCard,overflowText:i.props.legendsOverflowText},i.props.legendProps))},i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i._computeLongestBarTotalValue=function(){var t=0;return i.props.data.forEach((function(n){var i=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0);t=Math.max(t,i)})),t},i.state={isCalloutVisible:!1,refArray:[],selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._onLeave=i._onLeave.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i.barChartSvgRef=u.createRef(),i._emptyChartId=p("_MSBC_empty"),i._barId=p("_MSBC_rect_"),i._barIdPlaceholderPartToWhole=p("_MSBC_rect_partToWhole_"),i._barIdEmpty=p("_MSBC_rect_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.data,e=n.theme,r=n.culture;this._adjustProps();var a=e.palette,l=this._getLegendData(i,this.props.hideRatio,a),s=this.state.isCalloutVisible;this._classNames=Wh(this.props.styles,{legendColor:this.state.color,theme:e,variant:this.props.variant,hideLabels:this.props.hideLabels});var c=this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,d=this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard;this._longestBarTotalValue=this._computeLongestBarTotalValue();var f=i.map((function(n,i){var e=t._createBarsAndLegends(n,t.props.barHeight,a,t.props.hideRatio[i],t.props.hideDenominator[i],t.props.href,i);return u.createElement("div",{key:i,id:"_MSBC_bar-".concat(i)},e)}));return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},f,!this.props.hideLegend&&u.createElement("div",{className:this._classNames.legendContainer},l),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&s),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:c,YValue:d,color:this.state.color,culture:r}))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._createBarsAndLegends=function(t,n,i,e,r,a,l){var s,c,d=this,f=(null===(s=t.chartData)||void 0===s?void 0:s.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,v=this.state.barSpacingInPercent*(f-1),h=this.props.culture,g=[i.blueLight,i.blue,i.blueMid,i.red,i.black],y=[],m=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),b=this.props.variant===Fh.AbsoluteScale?this._longestBarTotalValue:m,x=0;if(t.chartData.map((function(t,n){var i=(t.data?t.data:0)/b*100||0;return i<1&&0!==i?i=1:i>99&&100!==i&&(i=99),x+=i})),this.props.variant===Fh.AbsoluteScale){var w=0===b?0:(b-m)/b*100;w<1&&0!==w?w=1:w>99&&100!==w&&(w=99),x+=w}var M=0!==x?x/(100-v):1,C=0,k=0,A=t.chartData.map((function(t,e){var r,o,s,c,f=t.color?t.color:t.placeHolder?i.neutralLight:g[Math.floor(4*Math.random()+1)],v=f;d.props.enableGradient&&(f=(null===(r=t.gradient)||void 0===r?void 0:r[0])||Nc(e,0,null===(o=d.props.theme)||void 0===o?void 0:o.isInverted)[0],v=(null===(s=t.gradient)||void 0===s?void 0:s[1])||Nc(e,0,null===(c=d.props.theme)||void 0===c?void 0:c.isInverted)[1]);var h=t.data?t.data:0;e>0&&(C+=k),(k=h/b*100?h/b*100:0)<1&&0!==k?k=1/M:k>99&&100!==k?k=99/M:k/=M,y.push(C);var m=d.props.styles,x=!(!d._legendHighlighted(t.legend)&&!d._noLegendHighlighted()),w=t.placeHolder?d.props.theme.semanticColors.bodyText:f;d._classNames=Wh(m,{theme:d.props.theme,shouldHighlight:x,href:a,variant:d.props.variant,hideLabels:d.props.hideLabels});var A=p("MSBC_Gradient")+"_".concat(l,"_").concat(e);return u.createElement("g",{key:e,className:t.placeHolder?d._classNames.placeHolderOnHover:d._classNames.opacityChangeOnHover,ref:function(n){d._refCallback(n,t.legend)},"data-is-focusable":!d.props.hideTooltip&&x,onFocus:d._onBarFocus.bind(d,h,w,t),onBlur:d._onBarLeave,role:"img","aria-label":d._getAriaLabel(t),onMouseOver:d._onBarHover.bind(d,h,w,t),onMouseMove:d._onBarHover.bind(d,h,w,t),onMouseLeave:d._onBarLeave,onClick:a?t.placeHolder?void 0:d._redirectToUrl.bind(d,a):t.onClick},d.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:A},u.createElement("stop",{offset:"0",stopColor:f}),u.createElement("stop",{offset:"100%",stopColor:v}))),u.createElement("rect",{key:e,id:"".concat(d._barId,"-").concat(l,"-").concat(e),x:"".concat(d._isRTL?100-y[e]-k-d.state.barSpacingInPercent*e:y[e]+d.state.barSpacingInPercent*e,"%"),y:0,width:k+"%",height:n,rx:d.props.roundCorners?3:0,fill:d.props.enableGradient?"url(#".concat(A,")"):f}))}));if(this.props.variant!==Fh.AbsoluteScale||this.props.hideLabels)0===t.chartData.length&&A.push(u.createElement("g",{key:0,className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdPlaceholderPartToWhole,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0}))),0===m&&A.push(u.createElement("g",{key:"empty",className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdEmpty,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0})));else{var S=!1,L=0;this._noLegendHighlighted()?(S=!0,L=m):null===(c=t.chartData)||void 0===c||c.forEach((function(t){d._legendHighlighted(t.legend)&&(S=!0,L+=t.data?t.data:0)})),S&&A.push(u.createElement("text",{key:"text",x:"".concat(this._isRTL?100-(y[y.length-1]||0)-k-v:(y[y.length-1]||0)+k+v,"%"),textAnchor:"start",y:n/2,dominantBaseline:"central",transform:"translate(".concat(this._isRTL?-4:4,")"),className:this._classNames.barLabel,"aria-label":"Total: ".concat(L),role:"img"},Ys(L)))}var V=void 0!==e&&e,D=this.props.variant!==Fh.AbsoluteScale&&!V&&2===t.chartData.length,N=this.props.variant!==Fh.AbsoluteScale&&!V&&1===t.chartData.length,O=function(){return(0,Yn.c$)(t.chartData[0].data?t.chartData[0].data:0,h)};return u.createElement("div",{className:this._classNames.singleChartRoot},u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(fd,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),D&&u.createElement("div",(0,o.Cl)({},$s(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},O()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},$s(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:this._classNames.chartWrapper},u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==t?void 0:t.chartTitle},A))))},n.prototype._onBarFocus=function(t,n,i){var e=this;this.state.refArray.forEach((function(r){r.legendText===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._refCallback=function(t,n){this.state.refArray.push({legendText:n,refElement:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&0===this.props.data.filter((function(t){return t.chartData&&0===t.chartData.length&&(!t.chartTitle||""===t.chartTitle)})).length)},n.defaultProps={barHeight:12,hideRatio:[],hideDenominator:[]},n}(u.Component),zh=(0,r.I)(Rh,(function(t){var n,i=t.className,e=t.width,r=t.barHeight,u=t.shouldHighlight,a=t.theme,l=t.href,s=t.variant,c=t.hideLabels;return{root:[a.fonts.medium,"ms-StackedBarChart",{display:"flex",flexDirection:"column",width:e||"100%"},i],items:{marginBottom:"11px"},chart:{width:"100%",height:r||12,display:"block",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},a.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:a.palette.neutralPrimary,marginBottom:s===Fh.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===Fh.AbsoluteScale?"16px":"10px"},opacityChangeOnHover:{opacity:u?"":"0.1",cursor:l?"pointer":"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:a.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:a.palette.neutralPrimary},placeHolderOnHover:{opacity:u?"":"0.1",cursor:"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},legendContainer:{margin:"5px 0px 0px 4px"},noData:{cursor:l?"pointer":"default"},barLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:a.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartWrapper:{paddingRight:s!==Fh.AbsoluteScale||c?0:40}}})),jh=(0,a.Z)(),$h=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i.state={isCalloutVisible:!1,selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._refArray=[],i._onLeave=i._onLeave.bind(i),i._refCallback=i._refCallback.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_SBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){if(!this._isChartEmpty()){this._adjustProps();var t=this.props,n=t.data,i=t.benchmarkData,e=t.targetData,r=t.hideNumberDisplay,a=t.ignoreFixStyle,l=t.culture,s=this.props.theme.palette,c=a||n.chartData.length>2?this.props.barHeight:12;i&&(i.color=i.color||s.neutralTertiary),e&&(e.color=e.color||s.neutralSecondary);var d=this._createBarsAndLegends(n,c,s,i,e),f=!1===r&&!a&&2===n.chartData.length,v=!1===r&&!a&&1===n.chartData.length,h=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),p=0;i&&h&&(p=i.data/h*100);var g=0;e&&h&&(g=e.data/h*100);var y=!1===this.props.hideLegend&&(a||n.chartData.length>2);this._classNames=jh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,benchmarkColor:i?i.color:"",benchmarkRatio:p,targetColor:e?e.color:"",targetRatio:g,showTriangle:!(!i&&!e)});var m=function(){return(0,Yn.c$)(n.chartData[0].data?n.chartData[0].data:0,l)};return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},u.createElement(td,{direction:dc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(fd,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},$s(n.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},m()),!this.props.hideDenominator&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(h,l))),v&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},$s(n.chartDataAccessibilityData,"text",!1)),m())),(i||e)&&u.createElement("div",{className:this._classNames.benchmarkContainer},i&&u.createElement("div",{className:this._classNames.benchmark,role:"text"}),e&&u.createElement("div",{className:this._classNames.target,role:"text"}))),u.createElement(td,{direction:dc.horizontal},u.createElement("div",null,u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==n?void 0:n.chartTitle},u.createElement("g",null,d[0]),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,$s(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Cc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,color:this.state.color,culture:l})))))),y&&u.createElement("div",{className:this._classNames.legendContainer},d[1]))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._adjustProps=function(){this._classNames=jh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,width:this.props.width,barHeight:this.props.barHeight,className:this.props.className})},n.prototype._createBarsAndLegends=function(t,n,i,e,r){var a,l=this,s=(null===(a=t.chartData)||void 0===a?void 0:a.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,c=this.state.barSpacingInPercent*(s-1),d=[i.blueLight,i.blue,i.blueMid,i.red,i.black],f=[],v=[],h=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),g=0,y=0,m=0;t.chartData.map((function(t,n){var i=t.data?t.data:0;return(y=i/h*100)<1&&0!==y?y=1:y>99&&100!==y&&(y=99),m+=y}));var b=0!==m?m/(100-c):1,x=t.chartData.map((function(t,i){var e,r,o,a,s=t.color?t.color:d[Math.floor(4*Math.random()+1)],c=s;l.props.enableGradient&&(s=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Nc(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted)[0],c=(null===(o=t.gradient)||void 0===o?void 0:o[1])||Nc(i,0,null===(a=l.props.theme)||void 0===a?void 0:a.isInverted)[1]);var m=t.data?t.data:0,x={title:t.legend,color:s,action:h>0?function(){l._onClick(t.legend)}:void 0,hoverAction:h>0?function(){l._handleChartMouseLeave(),l._onHover(t.legend)}:void 0,onMouseOutAction:h>0?function(){l._onLeave()}:void 0};t.placeHolder||f.push(x),i>0&&(g+=y),(y=m/h*100)<1&&0!==y?y=1/b:y>99&&100!==y?y=99/b:y/=b,v.push(g);var w=l.props.styles,M=!(!l._legendHighlighted(t.legend)&&!l._noLegendHighlighted()),C=t.placeHolder?l.props.theme.semanticColors.bodyText:s;l._classNames=jh(w,{theme:l.props.theme,shouldHighlight:M,href:l.props.href});var k=p("SBC_Gradient")+"_".concat(i);return u.createElement("g",{key:i,className:l._classNames.opacityChangeOnHover,ref:function(t){l._refCallback(t,x.title)},"data-is-focusable":!l.props.hideTooltip&&M,onFocus:l._onBarFocus.bind(l,m,C,t),onBlur:l._onBarLeave,"aria-label":l._getAriaLabel(t),role:"img",onMouseOver:l._onBarHover.bind(l,m,C,t),onMouseMove:l._onBarHover.bind(l,m,C,t),onMouseLeave:l._onBarLeave,pointerEvents:"all",onClick:l.props.href?l._redirectToUrl.bind(l,l.props.href):t.onClick},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:k},u.createElement("stop",{offset:"0",stopColor:s}),u.createElement("stop",{offset:"100%",stopColor:c}))),u.createElement("rect",{key:i,id:p("_SBC_bar"),x:"".concat(l._isRTL?100-v[i]-y-l.state.barSpacingInPercent*i:v[i]+l.state.barSpacingInPercent*i,"%"),y:0,width:y+"%",height:n,rx:l.props.roundCorners?3:0,fill:l.props.enableGradient?"url(#".concat(k,")"):s}))}));this._addLegend(f,e),this._addLegend(f,r);var w=u.createElement(bf,(0,o.Cl)({legends:f,enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps));return[0===h?[this._generateEmptyBar(n,this.props.barBackgroundColor?this.props.barBackgroundColor:i.neutralLight)]:x,w]},n.prototype._onBarFocus=function(t,n,i){var e=this;this._refArray.forEach((function(r){r.index===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._addLegend=function(t,n){if(n){var i={title:n.legend,color:n.color,shape:"triangle"};t.push(i)}},n.prototype._generateEmptyBar=function(t,n){return u.createElement("g",{key:0,className:this._classNames.opacityChangeOnHover},u.createElement("rect",{key:0,id:p("_SBC_empty_bar_"),x:"0%",y:0,width:"100%",height:t,fill:n}))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.length>0)},n.defaultProps={barHeight:12,hideNumberDisplay:!1,hideLegend:!1,ignoreFixStyle:!1},n}(u.Component),Yh=(0,r.I)($h,(function(t){var n,i,e=t.className,r=t.width,u=t.barHeight,a=t.shouldHighlight,l=t.theme,s=t.href,c=t.benchmarkColor,d=t.benchmarkRatio,f=t.targetColor,v=t.targetRatio,h=t.showTriangle;return{root:[l.fonts.medium,"ms-StackedBarChart",{width:r||"100%",display:"flex",flexDirection:"column"},e],chart:{width:"100%",height:u||12,display:"block",marginBottom:h?"16px":"10px",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},l.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:l.palette.neutralPrimary,marginBottom:"5px"},legendContainer:{margin:"4px 0px 0px 4px"},opacityChangeOnHover:{opacity:a?"":"0.1",cursor:s?"pointer":"default",selectors:{"&:focus":{stroke:l.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:l.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:l.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},benchmark:{position:"absolute",left:"calc("+d+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c,marginBottom:"4px",selectors:(n={},n[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(c,", ").concat(c,")")},n)},target:{position:"absolute",left:"calc("+v+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:f,marginBottom:"4px",selectors:(i={},i[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(f,", ").concat(f,")")},i)}}})),Xh=function(t){if(!(t.length<2)){t=t.sort((function(t,n){return t instanceof Date?t.getTime()-n.getTime():t-n}));for(var n=Number.MAX_VALUE,i=1;i<t.length;i++){var e=t[i]instanceof Date?t[i].getTime()-t[i-1].getTime():t[i]-t[i-1];n=Math.min(n,e)}return[n,t[0]instanceof Date?t[t.length-1].getTime()-t[0].getTime():t[t.length-1]-t[0]]}},Gh=function(t,n,i){var e=Xh(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1];return Math.floor(n*r*(1-i)/(o+r*(1-i)))},Uh=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},qh=function(t,n){return t+n/(1-n)*(t-1)},Zh=function(t,n,i){return t*qh(n,i)},Kh=function(t,n,i){return t/qh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(Ih||(Ih={}));var Jh=(0,a.Z)(),Qh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?function(t,n,i,e){var r=fi(t,(function(t){return t.x})),o=di(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}:{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}}(t,n,i,r):o===ns.DateAxis?Ps(t,n,i,r,a,e):Bs(n,i,r)},e._createLine=function(t,n,i,r,o){var a;void 0===i&&(i=0),void 0===r&&(r=0);var l=e._xAxisType===ns.StringAxis,s=e._getScales(i,r).xBarScale,c=e._createColors(),d=e.props.theme,f=e.props,v=f.data,h=f.lineLegendColor,g=void 0===h?d.palette.yellow:h,y=f.lineLegendText,m=[],b=[];v&&v.forEach((function(t,n){var i;t.lineData&&t.lineData.y&&m.push({x:t.x,y:t.lineData.y,useSecondaryYScale:null!==(i=t.lineData.useSecondaryYScale)&&void 0!==i&&i,point:t,index:n})}));var x=Cv().x((function(n){return l?s(n.x)+.5*s.bandwidth():t(n.x)})).y((function(t){return t.useSecondaryYScale&&o?o(t.y):n(t.y)})),w=!(!e._legendHighlighted(y)&&!e._noLegendHighlighted()),M=(null===(a=e.props.lineOptions)||void 0===a?void 0:a.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0;M>0&&b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3+2*M,stroke:d.semanticColors.bodyBackground})),b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3,stroke:g}));var C=m.map((function(i,r){var a,d={refElement:null};return u.createElement("circle",{key:r,id:p("_VBC_point_"),cx:l?s(i.x)+.5*s.bandwidth():t(i.x),cy:i.useSecondaryYScale&&o?o(i.y):n(i.y),onMouseOver:e._legendHighlighted(y)?e._lineHover.bind(e,i.point):e._onBarHover.bind(e,i.point,c(i.y)),onMouseOut:e._onBarLeave,r:e._getCircleVisibilityAndRadius(i.x,y).radius,stroke:g,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,visibility:e._getCircleVisibilityAndRadius(i.x,y).visibility,onClick:null===(a=i.point.lineData)||void 0===a?void 0:a.onClick,"data-is-focusable":e._legendHighlighted(y),ref:function(t){d.refElement=t},onFocus:e._lineFocus.bind(e,i.point,d),onBlur:e._handleChartMouseLeave})}));return u.createElement(u.Fragment,null,b,C)},e._getCircleVisibilityAndRadius=function(t,n){var i=e.state.activeXdataPoint;return e._noLegendHighlighted()?{visibility:i===t?Ih.show:Ih.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:Ih.show,radius:8}:e._legendHighlighted(n)?{visibility:Ih.show,radius:.3}:{visibility:Ih.hide,radius:0}},e._checkForLine=function(){return e.props.data.some((function(t){var n;return void 0!==(null===(n=null==t?void 0:t.lineData)||void 0===n?void 0:n.y)}))},e._getMargins=function(t){e.margins=t},e._renderContentForBothLineAndBars=function(t){var n=e._getCalloutContentForLineAndBar(t),i=n.YValueHover,r=n.hoverXValue,a=i.map((function(t,n){return u.createElement(Cc.ChartHoverCard,(0,o.Cl)({key:n,Legend:t.legend},0===n&&{XValue:"".concat(r||t.data)},{color:t.color,YValue:t.data||t.y,culture:e.props.culture}))}));return u.createElement(u.Fragment,null,a)},e._renderContentForOnlyBars=function(t){var n=e.props.useSingleColor,i=void 0!==n&&n;return u.createElement(u.Fragment,null,u.createElement(Cc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x,Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:!i&&t.color?t.color:e._createColors()(t.y),culture:e.props.culture}))},e._renderCallout=function(t){return t?e._isHavingLine?e._renderContentForBothLineAndBars(t):e._renderContentForOnlyBars(t):null},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._getGraphData=function(t,n,i,r,o){return e._bars=e._xAxisType===ns.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===ns.DateAxis?e._createDateBars(i,r,o):e._createStringBars(i,r,o)},e._refCallback=function(t,n){e._refArray.push({index:n,refElement:t})},e._getCalloutContentForLineAndBar=function(t){var n,i,r,o,u,a=[],l=e.props,s=l.theme,c=l.useSingleColor,d=void 0!==c&&c,f=l.enableGradient,v=e.props,h=v.data,p=v.lineLegendText,g=v.lineLegendColor,y=void 0===g?s.palette.yellow:g,m=h.filter((function(n){return n.x===t.x})),b=h.indexOf(m[0]),x=d?e._createColors()(1):m[0].color?m[0].color:e._createColors()(m[0].y);e._isHavingLine&&void 0!==(null===(n=m[0].lineData)||void 0===n?void 0:n.y)&&(e._legendHighlighted(p)||e._noLegendHighlighted())&&a.push({legend:p,color:y,y:null===(i=m[0].lineData)||void 0===i?void 0:i.y,data:null===(r=m[0].lineData)||void 0===r?void 0:r.yAxisCalloutData,yAxisCalloutData:null===(o=m[0].lineData)||void 0===o?void 0:o.yAxisCalloutData}),(e._legendHighlighted(m[0].legend)||e._noLegendHighlighted())&&a.push({legend:m[0].legend,y:m[0].y,color:f?d?Nc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||Nc(b,0)[0]:x,data:m[0].yAxisCalloutData,yAxisCalloutData:m[0].yAxisCalloutData});var w=t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString();return{YValueHover:a,hoverXValue:t.xAxisCalloutData||w}},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},e._onBarFocus=function(t,n,i){var r=e._getCalloutContentForLineAndBar(t),o=r.YValueHover,u=r.hoverXValue;e._refArray.forEach((function(r,a){r.index===t.legend&&n===a&&e.setState({refSelected:r.refElement,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.y,color:t.color||i,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:o,hoverXValue:u,callOutAccessibilityData:t.callOutAccessibilityData})}))},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){var i=e.props.theme,r=e.props,o=r.lineLegendText,u=void 0===o?"":o,a=r.lineLegendColor,l=void 0===a?i.palette.yellow:a;e.setState({refSelected:n,isCalloutVisible:!0,calloutLegend:u,dataForHoverCard:t.lineData.y,color:l,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.lineData.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x})},e._getScales=function(t,n){var i,r=Gu().domain([e.props.supportNegativeData?e._yMin:0,e._yMax]).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===ns.NumericAxis){var o=fi(e._points,(function(t){return t.x})),u=di(e._points,(function(t){return t.x}));i=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),Us(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===ns.DateAxis){var a=di(e._points,(function(t){return t.x})),l=fi(e._points,(function(t){return t.x}));(i=e.props.useUTC?Au():ku()).domain([a,l]).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin])}else i=Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding);return{xBarScale:i,yBarScale:r}},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(t,n){var i=e.props,r=i.theme,a=i.useSingleColor,l=e.props,s=l.lineLegendText,c=l.lineLegendColor,d=void 0===c?r.palette.yellow:c,f=[],v={};if(t.forEach((function(t,n){var i,o,u,l=a?e._createColors()(1):t.color;if(e.props.enableGradient){var s=Math.max((null===(i=e.props.data)||void 0===i?void 0:i.findIndex((function(n){return n.legend===t.legend})))||0,0);l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=Nc(0,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0])}v[t.legend]=l})),Object.entries(v).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};f.push(r)})),e._isHavingLine&&s&&d){var h={title:s,color:d,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(s)},onMouseOutAction:function(){e._onLegendLeave()},isLineLegendInBarChart:!0};f.unshift(h)}return u.createElement(bf,(0,o.Cl)({legends:f,enabledWrapLines:e.props.enabledLegendsWrapLines,overflowProps:e.props.legendsOverflowProps,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard,overflowText:e.props.legendsOverflowText},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0),e._yMin=Math.min(n[0],e.props.yMinValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t){var n,i,r,o=t.xAxisCalloutData?t.xAxisCalloutData:t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x,u=t.legend,a=t.yAxisCalloutData||t.y,l=e.props.lineLegendText||"Line",s=(null===(n=t.lineData)||void 0===n?void 0:n.yAxisCalloutData)||(null===(i=t.lineData)||void 0===i?void 0:i.y);return(null===(r=t.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(o,". ")+(u?"".concat(u,", "):"")+"".concat(a,".")+(void 0!==s?" ".concat(l,", ").concat(s,"."):"")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i={};null===(n=e.props.data)||void 0===n||n.forEach((function(t){t.x instanceof Date?i[t.x.getTime()]=t.x:i[t.x]=t.x}));var r=Object.values(i),u=Uh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Us(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth),u>=(f=Zh(e._barWidth,r.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(u-f)/2);else if(["plotly","histogram"].includes(e.props.mode)&&r.length>1){var a=Kh(u,r.length,e._xAxisInnerPadding),l=Xs(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=Zh(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=Ds(r)+20;c=(u-(f=(r.length-e._xAxisInnerPadding)*d))/2}e._domainMargin=8+Math.max(0,Math.min(s,c))}}else{if("histogram"===e.props.mode){l=e.props.maxBarWidth;var f=Zh(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,Gh(r,Uh(t,e.margins,e._domainMargin),e._xAxisInnerPadding),e.props.mode),e._domainMargin+=e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," bars")+(e._isHavingLine?" and 1 line":"")+". "},e._getOrderedXAxisLabels=function(){return e._xAxisType!==ns.StringAxis?[]:lc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(){var t={};return e._points.forEach((function(n){var i=n.x;t[i]||(t[i]=[]),t[i].push(n.y),n.lineData&&t[i].push(n.lineData.y)})),t},Ec(e),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",calloutLegend:""},e._isHavingLine=e._checkForLine(),e._calloutId=p("callout"),e._refArray=[],e._emptyChartId=p("_VBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._xAxisLabels=this._getOrderedXAxisLabels(),this._yMax=Math.max(fi(this._points,(function(t){return t.y})),this.props.yMaxValue||0),this._yMin=Math.min(di(this._points,(function(t){return t.y})),this.props.yMinValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=Jh(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1},this._isHavingLine&&{YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue}),{gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0}),this.props.calloutProps),$s(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:ts.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:Cs,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:dc.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:As,getmargins:this._getMargins,getMinMaxOfYAxis:Hs,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Us(this.props.xAxisInnerPadding,this.props.xAxisPadding)&&"histogram"!==this.props.mode,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),t._isHavingLine&&u.createElement("g",null,t._createLine(n.xScale,n.yScalePrimary,n.containerHeight,n.containerWidth,n.yScaleSecondary)))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._xAxisType=this.props.data&&this.props.data.length>0?zs(this.props.data[0].x,!0):ns.StringAxis,this._points=this.props.data||[],this._barWidth=Xs(this.props.barWidth,this.props.maxBarWidth,void 0,this.props.mode);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark],this._isHavingLine=this._checkForLine(),this._xAxisInnerPadding="histogram"===this.props.mode?0:Gs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=Gs(this.props.xAxisOuterPadding,this.props.xAxisPadding,0)},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._yMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForLineAndBar(t),r=e.YValueHover,o=e.hoverXValue;this._calloutAnchorPoint!==t&&(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:this._noLegendHighlighted()||this._legendHighlighted(t.legend),dataForHoverCard:t.y,calloutLegend:t.legend,color:t.color||n,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,this.props.culture,this.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:this._noLegendHighlighted()||this._legendHighlighted(t.legend)?t.x:null,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._calculateMinBarHeight=function(t,n,i,e){var r=n<0?Math.abs(t-i):Math.max(Math.abs(n-i),Math.abs(t-i));return Math.ceil(e(r)/100)},n.prototype._createNumericBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Jh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Nc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Nc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Nc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b,n.barLabel))}));return f},n.prototype._createStringBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=e._legendHighlighted(n.legend)||e._noLegendHighlighted();e._classNames=Jh(e.props.styles,{theme:e.props.theme,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x),C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d);e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,l.bandwidth(),e.props.mode);var A=n.color?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Nc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Nc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Nc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i),transform:"translate(".concat(.5*(l.bandwidth()-e._barWidth),", 0)")},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,height:w,"aria-label":e._getAriaLabel(n),role:"img",ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),onMouseLeave:e._onBarLeave,onBlur:e._onBarLeave,"data-is-focusable":!e.props.hideTooltip&&y,onFocus:e._onBarFocus.bind(e,n,i,A),fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b,n.barLabel))}));return f},n.prototype._createDateBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Jh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Nc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Nc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Nc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Nc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b,n.barLabel))}));return f},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._renderBarLabel=function(t,n,i,e,r,o){if(this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted())return null;var a=void 0!==o?o:"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):Ys(i);return u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},a)},n.prototype._isChartEmpty=function(){return 0===this._points.length||this._points.every((function(t){return 0===t.y}))&&!this._isHavingLine},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default"},n}(u.Component),tp=(0,r.I)(Qh,(function(t){var n=t.shouldHighlight,i=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1"},xAxisTicks:[],yAxisTicks:[{transform:"scaleX(-1)"}],yAxisDomain:[{transform:"scaleX(-1)"}],tooltip:sv(i),barLabel:dv(i)}})),np=(0,a.Z)(),ip=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.Y_ORIGIN=0,e._yAxisLabels=[],e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._toFocusWholeStack=function(t){var n=e.props.isCalloutForStack,i=void 0!==n&&n;return t?1!==e._getHighlightedLegend().length:i},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?function(t,n,i,e){var r=di(t,(function(t){return t.x})),o=fi(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}:{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}}(t,n,i,r):o===ns.DateAxis?Ps(t,n,i,r,a,e):Bs(n,i,r)},e._getFormattedLineData=function(t){var n=[],i={};return t.forEach((function(t,i){t.lineData&&t.lineData.forEach((function(e){n.push((0,o.Cl)((0,o.Cl)({},e),{index:i,xItem:t}))}))})),n.forEach((function(t){i[t.legend]?i[t.legend].push(t):i[t.legend]=[t]})),i},e._getLineLegends=function(t){var n=e._lineObject,i=[];return Object.keys(n).forEach((function(t){i.push({title:t,color:n[t][0].color})})),i},e._createLines=function(t,n,i,r,a){var l,s=e._getFormattedLineData(e.props.data),c=[],d=[],f=[],v=e.props.theme,h=(null===(l=e.props.lineOptions)||void 0===l?void 0:l.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0,p=e._xAxisType!==ns.StringAxis?0:t.bandwidth()/2;return Object.keys(s).forEach((function(i,r){for(var o,l,f,g,y,m=e._isLegendHighlighted(i)||e._noLegendHighlighted(),b=1;b<s[i].length;b++){var x=t(s[i][b-1].xItem.xAxisPoint),w=s[i][b-1].useSecondaryYScale&&s[i][b].useSecondaryYScale&&a,M=w?a(s[i][b-1].y):n(s[i][b-1].y),C=t(s[i][b].xItem.xAxisPoint),k=w?a(s[i][b].y):n(s[i][b].y),A=w||e._yAxisType!==is.StringAxis?0:n.bandwidth()/2;h>0&&d.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-BorderLine"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:3+2*h,fill:"transparent",strokeLinecap:"round",stroke:v.semanticColors.bodyBackground,transform:"translate(".concat(p,", ").concat(A,")")})),c.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-line"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:null!==(l=null===(o=s[i][0].lineOptions)||void 0===o?void 0:o.strokeWidth)&&void 0!==l?l:3,strokeLinecap:null!==(g=null===(f=s[i][0].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=s[i][0].lineOptions)||void 0===y?void 0:y.strokeDasharray,stroke:s[i][b].color,transform:"translate(".concat(p,", ").concat(A,")"),onMouseOver:e._lineHover.bind(e,s[i][b-1]),onMouseLeave:e._handleMouseOut}))}})),Object.keys(s).forEach((function(i,r){s[i].forEach((function(l,s){var c={refElement:null},d=0===l.xItem.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length,v=l.useSecondaryYScale||e._yAxisType!==is.StringAxis?0:n.bandwidth()/2;f.push(u.createElement("circle",(0,o.Cl)({key:"".concat(r,"-").concat(s,"-dot"),cx:t(l.xItem.xAxisPoint),cy:l.useSecondaryYScale&&a?a(l.y):n(l.y),onMouseOver:e._lineHover.bind(e,l),onMouseLeave:e._handleMouseOut,r:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).radius,stroke:l.color,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,opacity:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).opacity,transform:"translate(".concat(p,", ").concat(v,")"),ref:function(t){c.refElement=t}},d&&(e._noLegendHighlighted()||e._isLegendHighlighted(i))?{"data-is-focusable":!e.props.hideTooltip,onFocus:e._lineFocus.bind(e,l,c),onBlur:e._handleMouseOut,role:"img","aria-label":e._getAriaLabel(l.xItem,l,!0)}:{})))}))})),u.createElement(u.Fragment,null,d,c,f)},e._getCircleOpacityAndRadius=function(t,n){var i=e.state.activeXAxisDataPoint;return e._noLegendHighlighted()?{opacity:i===t?1:0,radius:8}:t===i&&e._isLegendHighlighted(n)?{opacity:1,radius:8}:e._isLegendHighlighted(n)?{opacity:1,radius:.3}:{opacity:0,radius:0}},e._getMargins=function(t){e.margins=t},e._getCustomizedCallout=function(){var t=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0}));return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint&&!t?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){1===e._getHighlightedLegend().length?(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))&&e.setState({refSelected:n,isCalloutVisible:!0,xCalloutValue:"".concat(t.xItem.xAxisPoint),yCalloutValue:"".concat(t.yAxisCalloutData||t.data||t.y),activeXAxisDataPoint:t.xItem.xAxisPoint,color:t.color}):e._onStackHoverFocus(t.xItem,n)},e._handleMouseOut=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXAxisDataPoint:""})},e._createBar=function(t,n,i,r){var a=e.props,l=a.barCornerRadius,s=void 0===l?0:l,c=a.barMinimumHeight,d=void 0===c?0:c,f=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),v=e._toFocusWholeStack(f);e._xAxisType===ns.StringAxis&&(e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===ns.NumericAxis||(e._xAxisType,ns.DateAxis),r.xAxisPoint)),c=e._xAxisType!==ns.StringAxis?-e._barWidth/2:(t.bandwidth()-e._barWidth)/2,f=0,h=r.chartData.filter((function(t){return 0!==t.data&&""!==t.data&&!(e._yAxisType===is.StringAxis&&void 0===n(t.data))}));if(h.length){var g=e._getBarGapAndScale(h,n),y=g.gapHeight,m=g.heightValueScale,b=g.absStackTotal;if(!(m<0)){var x=i-e.margins.bottom-(e._yAxisType===is.StringAxis?0:n(e.Y_ORIGIN)),w=x,M=x,C=0,k=0,A=h.map((function(t,g){var x,A,S,L,V=t.color?t.color:e._colors[g],D=V;e.props.enableGradient&&(V=(null===(x=t.gradient)||void 0===x?void 0:x[0])||Nc(g,0,null===(A=e.props.theme)||void 0===A?void 0:A.isInverted)[0],D=(null===(S=t.gradient)||void 0===S?void 0:S[1])||Nc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=V);var N={},O=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=np(e.props.styles,{theme:e.props.theme,shouldHighlight:O,href:e.props.href});var T,E=!v&&O&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r,t),onMouseOver:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseMove:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseLeave:e._handleMouseOut,onFocus:e._onRectFocus.bind(e,t,r.xAxisPoint,V,N),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,t),role:"img"},F=g?y:0;if(e._yAxisType===is.StringAxis)T=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,d,1),C=w-=T+F;else{T=Math.abs(m*t.data);var B=Math.max(m*b/100,d);T<B&&(T=B),t.data>=e.Y_ORIGIN?C=w-=T+F:M=(C=M+F)+T,f+=t.data,k=g===h.length-1?T:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&T>s&&g===h.length-1?u.createElement(u.Fragment,{key:g+a+"".concat(v)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("path",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,d:"\n M ".concat(l," ").concat(C+s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(-s,"\n h ").concat(e._barWidth-2*s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(s,"\n v ").concat(T-s,"\n h ").concat(-e._barWidth,"\n z\n "),fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):T<0?u.createElement(u.Fragment,{key:g+a}," "):u.createElement(u.Fragment,{key:g+a},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,x:l,y:C,width:e._barWidth,height:T,fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t}},E,{transform:"translate(".concat(c,", 0)")})))})),S={},L=r.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length>0,V=v&&L&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r),onMouseOver:e._onStackHover.bind(e,r),onMouseMove:e._onStackHover.bind(e,r),onMouseLeave:e._handleMouseOut,onFocus:e._onStackFocus.bind(e,r,S),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,r),role:"img"},D=!1,N=0,O=0,T=void 0;if(!e.props.hideLabels&&e._yAxisType!==is.StringAxis){var E=h.filter((function(t){return t.barLabel&&(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))}));1===E.length&&(T=E[0].barLabel),e._noLegendHighlighted()?(D=!0,N=null!=T?T:f,O=f):(h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(D=!0,O+=t.data)})),N=null!=T?T:O)}return u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){S.refElement=t}},V),A),!e.props.hideLabels&&e._barWidth>=16&&D&&u.createElement("text",{x:l+e._barWidth/2,y:O>=e.Y_ORIGIN?C-6:C+k+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-label":"Total: ".concat(N),role:"img",transform:"translate(".concat(c,", 0)")},"string"==typeof N?N:"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):Ys(N)))}}}));return h.filter((function(t){return!!t}))},e._getScales=function(t,n){var i=[Math.min(e.Y_ORIGIN,e._yMin),Math.max(e.Y_ORIGIN,e._yMax)],r=Gu().domain(i).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===ns.NumericAxis){var o=fi(e._dataset,(function(t){return t.x})),u=di(e._dataset,(function(t){return t.x})),a=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]);return Us(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===ns.DateAxis){var l=di(e._dataset,(function(t){return t.x})),s=fi(e._dataset,(function(t){return t.x})),c=e.props.useUTC?Au():ku();return c.domain(e._isRtl?[s,l]:[l,s]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),{xBarScale:c,yBarScale:r}}return{xBarScale:Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding),yBarScale:r}},e._getGraphData=function(t,n,i,r,o){var u=e._getScales(i,r),a=u.xBarScale,l=u.yBarScale;return e._bars=e._createBar(a,e._yAxisType===is.StringAxis?n:l,i,o)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||e.Y_ORIGIN),e._yMin=Math.min(n[0],e.props.yMinValue||e.Y_ORIGIN)}},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n,i){var r,o,u;if(!n){var a=t.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),l=t.chartData.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" "),s=null===(r=t.lineData)||void 0===r?void 0:r.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data||t.y;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" ");return(null===(o=t.stackCallOutAccessibilityData)||void 0===o?void 0:o.ariaLabel)||"".concat(a,". ").concat(l)+(s?" ".concat(s):"")}var c=t.xAxisCalloutData||!i&&n.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),d=n.legend,f=n.yAxisCalloutData||(i?n.data||n.y:n.data);return!i&&(null===(u=n.callOutAccessibilityData)||void 0===u?void 0:u.ariaLabel)||"".concat(c,". ").concat(d,", ").concat(f,".")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i=Uh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Us(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth),i>=(r=Zh(e._barWidth,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(i-r)/2);else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=Kh(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=Xs(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=Zh(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=Ds(e._xAxisLabels)+20,c=(i-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*s))/2;e._domainMargin=8+Math.max(0,Math.min(l,c))}}else{var d=(null===(n=e.props.data)||void 0===n?void 0:n.map((function(t){return t.xAxisPoint})))||[];e._barWidth=Xs(e.props.barWidth,e.props.maxBarWidth,Gh(d,i,e._xAxisInnerPadding)),e._domainMargin=8+e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data,r=Object.keys(e._lineObject).length;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," stacked bars")+(r>0?" and ".concat(r," lines"):"")+". "},e._getMinMaxOfYAxis=function(t,n,i){if(!i)return function(t){var n=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:n}}(t);var r=[];return e.props.data.forEach((function(t){var n;null===(n=t.lineData)||void 0===n||n.forEach((function(t){t.useSecondaryYScale&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}},e._initYAxisParams=function(){e._points[0].chartData.length>0?e._yAxisType=zs(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=zs(e._lineObject[t][0].y,!1))})),e._yAxisLabels=e._getOrderedYAxisLabels()},e._getYDomainMargins=function(t){var n=0,i=t-e.margins.bottom-e.margins.top;if(e._yAxisType===is.StringAxis){var r=0;e._points.forEach((function(t){var n=0;t.chartData.forEach((function(t){n+=e._yAxisLabels.indexOf("".concat(t.data))+1})),r=Math.max(r,n)})),n+=(0===r?0:i/r)*(r-e._yAxisLabels.length)}return(0,o.Cl)((0,o.Cl)({},e.margins),{top:e.margins.top+n})},e._getOrderedXAxisLabels=function(){return e._xAxisType!==ns.StringAxis?[]:lc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==is.StringAxis?[]:lc(e._mapCategoryToValues(!0),e.props.yAxisCategoryOrder)},e._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return e._points.forEach((function(i){var e;i.chartData.forEach((function(e){var r=t?e.data:i.xAxisPoint,o=t?i.xAxisPoint:e.data;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)})),null===(e=i.lineData)||void 0===e||e.forEach((function(e){if(!t||!e.useSecondaryYScale){var r=t?e.y:i.xAxisPoint,o=t?i.xAxisPoint:e.y;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)}}))})),n},Ec(e),e.state={isCalloutVisible:!1,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,refSelected:null,dataForHoverCard:0,color:"",hoverXValue:"",YValueHover:[],xCalloutValue:"",yCalloutValue:"",activeXAxisDataPoint:"",calloutLegend:""},En("VERTICAL STACKED BAR CHART",n,{colors:"IVSChartDataPoint.color",chartLabel:"use your own title for chart"}),e._handleMouseOut=e._handleMouseOut.bind(e),e._calloutId=p("callout"),e._isChartEmpty()||(e._adjustProps(),e._dataset=e._createDataSetLayer()),e._createLegendsForLine=(0,an.J9)((function(t){return e._getLineLegends(t)})),e._emptyChartId=p("_VSBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._adjustProps(),this._dataset=this._createDataSetLayer())},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){this._adjustProps();var n=this.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),i=this._toFocusWholeStack(n),e=this.props.isCalloutForStack,r=void 0!==e&&e;this._dataset=this._createDataSetLayer();var a=this._getLegendData(this._points,this.props.theme.palette,this._createLegendsForLine(this.props.data));this._classNames=np(this.props.styles,{theme:this.props.theme,href:this.props.href});var l=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),$s(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:ts.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:Cs,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,barwidth:this._barWidth,focusZoneDirection:r||n?dc.horizontal:dc.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Us(this.props.xAxisInnerPadding,this.props.xAxisPadding),yAxisType:this._yAxisType,stringDatasetForYAxisDomain:(0,o.fX)([""],this._yAxisLabels,!0),getYDomainMargins:this._getYDomainMargins,children:function(i){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),u.createElement("g",null,n&&t._createLines(i.xScale,i.yScalePrimary,i.containerHeight,i.containerWidth,i.yScaleSecondary)))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){var t;this._points=this.props.data||[],this._barWidth=Xs(this.props.barWidth,this.props.maxBarWidth);var n=this.props.theme.palette;this._colors=this.props.colors||[n.blueLight,n.blue,n.blueMid,n.red,n.black];var i=null===(t=this._points[0])||void 0===t?void 0:t.xAxisPoint;this._xAxisType=_l(i)?ns.StringAxis:zs(i,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=Gs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=Gs(this.props.xAxisOuterPadding,this.props.xAxisPadding,0),this._initYAxisParams()},n.prototype._createDataSetLayer=function(){var t=this,n=this._points.map((function(n){if(t._yAxisType===is.StringAxis)return{x:n.xAxisPoint,y:0};var i=0;return n.chartData.forEach((function(t){i+=t.data})),{x:n.xAxisPoint,y:i}}));return this._xAxisLabels=this._getOrderedXAxisLabels(),n},n.prototype._renderCallout=function(t){return t?u.createElement(Cc.ChartHoverCard,{XValue:t.xAxisCalloutData,Legend:t.legend,YValue:t.yAxisCalloutData,color:t.color,culture:this.props.culture}):null},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._getLegendData=function(t,n,i){var e=this;if(this.props.hideLegend)return u.createElement(u.Fragment,null);var r=[n.blueLight,n.blue,n.blueMid,n.red,n.black],a=[],l=this.props,s=l.allowHoverOnLegend,c=void 0===s||s,d=l.theme;t.forEach((function(t){t.chartData.forEach((function(n){var i,o,u=n.color?n.color:r[Math.floor(4*Math.random()+1)];if(e.props.enableGradient){var l=Math.max((null===(i=t.chartData)||void 0===i?void 0:i.findIndex((function(t){return t.legend===n.legend})))||0,0);u=(null===(o=n.gradient)||void 0===o?void 0:o[0])||Nc(l,0,null==d?void 0:d.isInverted)[0]}if(!(a.filter((function(t){return t.title===n.legend&&t.color===u})).length>0)){var s={title:n.legend,color:u,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(n.legend)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};a.push(s)}}))}));var f=[];i&&i.length>0&&i.forEach((function(t){var n={title:t.title,color:t.color,isLineLegendInBarChart:!0,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(t.title)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};f.push(n)}));var v=a.concat(f);return u.createElement(bf,(0,o.Cl)({legends:v,overflowProps:this.props.legendsOverflowProps,enabledWrapLines:this.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._onRectHover=function(t,n,i,e){e.persist(),this._onRectFocusHover(t,n,i,e)},n.prototype._onRectFocusHover=function(t,n,i,e){var r,o;if((null===(r=this._calloutAnchorPoint)||void 0===r?void 0:r.chartDataPoint)!==n||(null===(o=this._calloutAnchorPoint)||void 0===o?void 0:o.xAxisDataPoint)!==t){this._calloutAnchorPoint={chartDataPoint:n,xAxisDataPoint:t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString()};var u=n.xAxisCalloutData||(t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString());this.setState({refSelected:e,isCalloutVisible:this._noLegendHighlighted()||this._isLegendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:i,xCalloutValue:u,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._onStackHover=function(t,n){n.persist(),this._onStackHoverFocus(t,n)},n.prototype._onStackHoverFocus=function(t,n){var i,e,r,u=this;this._noLegendHighlighted()||(t=(0,o.Cl)((0,o.Cl)({},t),{chartData:t.chartData.filter((function(t){return u._isLegendHighlighted(t.legend)})),lineData:null===(i=t.lineData)||void 0===i?void 0:i.filter((function(t){return u._isLegendHighlighted(t.legend)}))}));var a=t.lineData,l=void 0!==a&&a.length>0;l&&a.forEach((function(t){t.data=t.data||t.y,t.shouldDrawBorderBottom=!0})),this.setState({refSelected:n,isCalloutVisible:t.chartData.length>0||(null!==(r=null===(e=t.lineData)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0,YValueHover:l?(0,o.fX)((0,o.fX)([],a.sort((function(t,n){return t.data<n.data?1:-1})),!0),t.chartData.slice().reverse(),!0):t.chartData.slice().reverse(),hoverXValue:t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,this.props.culture,this.props.useUTC):t.xAxisPoint,stackCalloutProps:t,activeXAxisDataPoint:t.xAxisPoint,callOutAccessibilityData:t.stackCallOutAccessibilityData})},n.prototype._onRectFocus=function(t,n,i,e){e.refElement&&this._onRectFocusHover(n,t,i,e.refElement)},n.prototype._onStackFocus=function(t,n){n.refElement&&this._onStackHoverFocus(t,n.refElement)},n.prototype._onClick=function(t,n){var i,e;null===(e=(i=this.props).onBarClick)||void 0===e||e.call(i,n,t),this.props.href&&Qf(this.props.href)&&(window.location.href=this.props.href)},n.prototype._getBarGapAndScale=function(t,n,i){var e,r,o=this.props.barGapMax,u=void 0===o?0:o,a=0,l=0;this._yAxisType===is.StringAxis?e=null!=i?i:t.reduce((function(t,i){return t+n(i.data)}),0):(a=t.reduce((function(t,n){return t+Math.abs(n.data)}),0),e=null!=i?i:Math.abs(n(a)-n(this.Y_ORIGIN)),t.forEach((function(t){var n=Math.abs(t.data)/a*100;n<1&&0!==n&&(n=1),l+=n})),r=0!==l?l/100:1);var s=u&&t.length-1,c=s&&Math.max(1,Math.min(u,.2*e/s));return{gapHeight:c,heightValueScale:this._yAxisType===is.StringAxis?0:(e-c*s)/(a*r),absStackTotal:a}},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.some((function(t){return t.chartData.length>0||t.lineData&&t.lineData.length>0})))},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),ep=(0,r.I)(ip,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:sv(e),barLabel:dv(e)}})),rp=(0,a.Z)(),op=.1,up=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e._legendColorMap={},e.Y_ORIGIN=0,e._uniqDotId=p("gvbc_dot_"),e.toImage=function(t){var n,i;return af([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getMinMaxOfYAxis=function(t,n,i){var e=[];return t.forEach((function(t){t.groupSeries.forEach((function(t){!i==!t.useSecondaryYScale&&e.push(t.data)}))})),{startValue:di(e),endValue:fi(e)}},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis||o===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Bs(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=Xs(e.props.barwidth,e.props.maxBarWidth,Kh(l.bandwidth(),e._barLegends.length,op)),e._groupWidth=Zh(e._barWidth,e._barLegends.length,op);var s=e._createX1Scale(),c=[];e._datasetForBars.forEach((function(t){c.push(e._buildGraph(t,l,s,n,a,i,o))})),e._groupedVerticalBarGraph=c},e._getMargins=function(t){return e.margins=t},e._createDataSetOfGVBC=function(t,n){var i=new Set;t.forEach((function(t){t.series.forEach((function(t){i.add(t.legend)}))}));var r=new Set(n.map((function(t){return t.legend}))),o=e._getOrderedXAxisLabels(t,n),u=e._createDataset(t,n);return{barLegends:Array.from(i),lineLegends:Array.from(r),xAxisLabels:o,datasetForBars:u}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._onBarHover=function(t,n,i){i.persist(),e._calloutAnchorPoint!==t&&(e._calloutAnchorPoint=t,e._showCallout(i,t,n))},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1})},e._onBarFocus=function(t,n,i){e._showCallout(i.currentTarget,t,n)},e._redirectToUrl=function(t){t&&Qf(t)&&(window.location.href=t)},e._buildGraph=function(t,n,i,r,o,a,l){var s=[],c=[],d=e._barLegends.filter((function(n){return n in t})),f=Zh(e._barWidth,d.length,op),v=Tu().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(op);return e._barLegends.forEach((function(n,i){var a,l=t[n];if(l){var d=l[0].useSecondaryYScale&&o?o:r,f=(null!==(a=v(n))&&void 0!==a?a:0)+(v.bandwidth()-e._barWidth)/2,h=e._legendHighlighted(n)||e._noLegendHighlighted(),g=h?"":"0.1",y=0,m=d(e.Y_ORIGIN),b=m,x=m,w=e.Y_ORIGIN;l.forEach((function(n,r){var o,a;if(n.data){var l=p("GVBC_Gradient")+"_".concat(t.indexNum,"_").concat(i,"_").concat(r);if(e.props.enableGradient){var v=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,m=(null===(a=n.gradient)||void 0===a?void 0:a[1])||n.color;s.push(u.createElement("defs",{key:"defs_".concat(l)},u.createElement("linearGradient",{id:l,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0%",stopColor:v}),u.createElement("stop",{offset:"100%",stopColor:m}))))}var M=.5*(r>0?2:0),C=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),k=n.color;n.data>=e.Y_ORIGIN?w=b-=C+M:x=(w=x+M)+C,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:C,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):k,rx:e.props.roundCorners?3:0,onMouseOver:e._onBarHover.bind(e,n,t),onMouseMove:e._onBarHover.bind(e,n,t),onMouseOut:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,t),onBlur:e._onBarLeave,onClick:e.props.href?e._redirectToUrl.bind(e,e.props.href):n.onClick,"aria-label":e._getAriaLabel(n,t.xAxisPoint),role:"img"})),n.barLabel&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r,"-label"),x:f+e._barWidth/2,y:n.data>=e.Y_ORIGIN?w-6:w+C+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},n.barLabel)),y+=n.data}})),null!==y&&!e.props.hideLabels&&e._barWidth>=16&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i),x:f+e._barWidth/2,y:y>=e.Y_ORIGIN?b-6:x+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(y):Ys(y)))}})),u.createElement("g",{key:t.indexNum,transform:"translate(".concat(n(t.xAxisPoint)+(n.bandwidth()-f)/2,", 0)")},s,c)},e._createDataset=function(t,n){var i=[],e={},r=new Set;return n.forEach((function(t){t.data.forEach((function(n){e[n.x]||(e[n.x]=[]),e[n.x].push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,data:n.y,useSecondaryYScale:t.useSecondaryYScale}))}))})),t.forEach((function(t,n){var u,a={},l={};t.series.forEach((function(t){a[t.legend]?(a[t.legend].push((0,o.Cl)({},t)),l[t.legend].data+=t.data):(a[t.legend]=[(0,o.Cl)({},t)],l[t.legend]=(0,o.Cl)({},t))})),a.xAxisPoint=t.name,a.indexNum=n,a.groupSeries=(0,o.fX)((0,o.fX)([],Object.values(l),!0),null!==(u=e[t.name])&&void 0!==u?u:[],!0),a.stackCallOutAccessibilityData=t.stackCallOutAccessibilityData,i.push(a),r.add(t.name)})),Object.keys(e).forEach((function(t){r.has(t)||i.push({xAxisPoint:t,groupSeries:e[t]})})),i},e._createX0Scale=function(t){return Tu().domain(e._xAxisLabels).range(e._isRtl?[t-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,t-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding)},e._createX1Scale=function(){return Tu().domain(e._barLegends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(op)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(){var t=[],n=function(n,i){var r={title:n,color:e._legendColorMap[n][0],isLineLegendInBarChart:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};t.push(r)};return e._lineLegends.forEach((function(t){return n(t,!0)})),e._barLegends.forEach((function(t){return n(t)})),u.createElement(bf,(0,o.Cl)({legends:t,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n){var i,e=t.xAxisCalloutData||n,r=t.legend,o=t.yAxisCalloutData||t.data;return(null===(i=t.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(e,". ").concat(r,", ").concat(o,".")},e._getDomainMargins=function(t){e._domainMargin=8;var n=Uh(t,e.margins,8);if(e._xAxisType===ns.StringAxis)if(Us(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=Xs(e.props.barwidth,e.props.maxBarWidth);var i=Zh(e._barWidth,e._barLegends.length,op);n>=(r=Zh(i,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(n-r)/2)}else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=Kh(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=Kh(u,e._barLegends.length,op),l=Xs(e.props.barwidth,e.props.maxBarWidth,a),s=(i=Zh(l,e._barLegends.length,op),(n-(r=Zh(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=Ds(e._xAxisLabels)+20,d=(n-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*c))/2;e._domainMargin=8+Math.max(0,Math.min(s,d))}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Vertical bar chart with ".concat(e._barLegends.length," grouped bar series")+(e._lineLegends.length>0?" and ".concat(e._lineLegends.length," line series. "):". ")},e._adjustColor=function(t,n,i,e){var r=i?e?"#000000":"#ffffff":e?"#ffffff":"#000000";return Po(Gu().domain([0,1]).range([t,r])(n)).formatRgb()},e._prepareChartData=function(){var t,n,i,r,u=e.props.data;Array.isArray(e.props.dataV2)&&e.props.dataV2.length>0&&(u=(t=e._processDataV2(e.props.dataV2)).barData,r=t.lineData),e._legendColorMap={};var a=0;return{barData:null!==(n=null==u?void 0:u.map((function(t){var n,i;return(0,o.Cl)((0,o.Cl)({},t),{series:null!==(i=null===(n=t.series)||void 0===n?void 0:n.map((function(t){var n,i,r,u,l,s,c,d=t.color?t.color:ss(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted),f=d;if(e.props.enableGradient)if(t.color)d=e._adjustColor(t.color||f,.2,!1,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),f=e._adjustColor(t.color||d,.2,!0,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted);else{var v=Nc(a,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted);d=(null===(l=t.gradient)||void 0===l?void 0:l[0])||v[0],f=(null===(s=t.gradient)||void 0===s?void 0:s[1])||v[1]}var h=[d,f];return e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[d,f]),a+=1,(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:null!==(c=t.color)&&void 0!==c?c:e._legendColorMap[t.legend][0]}),e.props.enableGradient?{gradient:h}:{})})))&&void 0!==i?i:[]})})))&&void 0!==n?n:[],lineData:null!==(i=null==r?void 0:r.map((function(t){var n,i,r;return r=void 0===t.color?ss(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted):cs(t.color,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[r,r]),a+=1,(0,o.Cl)((0,o.Cl)({},t),{color:e._legendColorMap[t.legend][0]})})))&&void 0!==i?i:[]}},e._getOrderedXAxisLabels=function(t,n){return e._xAxisType!==ns.StringAxis?[]:lc(e._mapCategoryToValues(t,n),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(t,n){var i={};return t.forEach((function(t){i[t.name]||(i[t.name]=[]),t.series.forEach((function(n){i[t.name].push(n.data)}))})),n.forEach((function(t){t.data.forEach((function(t){i[t.x]||(i[t.x]=[]),i[t.x].push(t.y)}))})),i},e._createLines=function(t,n,i,r){var o=[],a=[],l=[],s=function(t){return n(t)+n.bandwidth()/2};return t.forEach((function(t,n){var c,d=[],f=[],v=[],h=(null===(c=t.lineOptions)||void 0===c?void 0:c.lineBorderWidth)?Number.parseFloat(t.lineOptions.lineBorderWidth.toString()):0,p=t.useSecondaryYScale&&r?r:i,g=e._legendHighlighted(t.legend)||e._noLegendHighlighted();t.data.forEach((function(i,r){var o,a,l,c,y,m,b,x=s(i.x),w=p(i.y);if(r>0){var M=s(t.data[r-1].x),C=p(t.data[r-1].y);h>0&&d.push(u.createElement("line",{key:"lineBorder-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,fill:"transparent",stroke:null!==(a=null===(o=t.lineOptions)||void 0===o?void 0:o.lineBorderColor)&&void 0!==a?a:e.props.theme.semanticColors.bodyBackground,strokeWidth:3+2*h,strokeLinecap:"round",opacity:g?1:.1})),f.push(u.createElement("line",{key:"line-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,stroke:t.color,strokeWidth:null!==(c=null===(l=t.lineOptions)||void 0===l?void 0:l.strokeWidth)&&void 0!==c?c:3,strokeLinecap:null!==(m=null===(y=t.lineOptions)||void 0===y?void 0:y.strokeLinecap)&&void 0!==m?m:"round",strokeDasharray:null===(b=t.lineOptions)||void 0===b?void 0:b.strokeDasharray,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave}))}var k=e._getDotId(n,r),A=e.state.activeLinePoint,S=A===i.x||A===k;v.push(u.createElement("circle",{key:k,id:k,cx:x,cy:w,r:g&&S?8:.3,fill:e.props.theme.semanticColors.bodyBackground,stroke:t.color,strokeWidth:3,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave,"data-is-focusable":g,onFocus:function(i){return e._onLineFocus(i,t,n,r)},onBlur:e._onBarLeave,role:"img","aria-label":e._getAriaLabel({xAxisCalloutData:i.xAxisCalloutData,legend:t.legend,yAxisCalloutData:i.yAxisCalloutData,data:i.y,callOutAccessibilityData:i.callOutAccessibilityData},i.x)}))})),o.push(u.createElement("g",{key:"lineBorderGroup-".concat(n)},d)),a.push(u.createElement("g",{key:"lineGroup-".concat(n)},f)),l.push(u.createElement("g",{key:"dotGroup-".concat(n)},v))})),l.length>0?u.createElement("g",null,o.length>0?u.createElement("g",null,o):null,a.length>0?u.createElement("g",null,a):null,u.createElement("g",null,l)):null},e._onLineHover=function(t,n,i,r,o){var u=xv(t,e._rectRef.current)[0],a=r;if(r>0){var l=o(n.data[r].x),s=o(n.data[r-1].x);Math.abs(s-u)<Math.abs(l-u)&&(a=r-1)}t.persist(),e._showCalloutForLines(t,n,i,a)},e._onLineFocus=function(t,n,i,r){e._showCalloutForLines(t.currentTarget,n,i,r)},e._showCalloutForLines=function(t,n,i,r){var u=n.data[r],a=(0,o.Cl)((0,o.Cl)({},u),{legend:n.legend,color:n.color,key:n.legend,data:u.y,yAxisCalloutData:u.yAxisCalloutData}),l=e._datasetForBars.find((function(t){return t.xAxisPoint===u.x}));e._showCallout(t,a,l,e._getDotId(i,r))},e._showCallout=function(t,n,i,r){var o,u;void 0===r&&(r=""),e.setState({refSelected:t,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:n.color,xCalloutValue:null!==(o=n.xAxisCalloutData)&&void 0!==o?o:i.xAxisPoint,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:e.props.isCalloutForStack?i.stackCallOutAccessibilityData:n.callOutAccessibilityData,YValueHover:i.groupSeries.filter((function(t){return e._noLegendHighlighted()||e._legendHighlighted(t.legend)})),hoverXValue:null!==(u=n.xAxisCalloutData)&&void 0!==u?u:i.xAxisPoint,activeLinePoint:e.props.isCalloutForStack?i.xAxisPoint:r})},e._getDotId=function(t,n){return e._uniqDotId+"-".concat(t,"-").concat(n)},e._processDataV2=function(t){var n={},i=[];return t.forEach((function(t){"bar"===t.type?t.data.forEach((function(i){var e,r;n[i.x]||(n[i.x]={name:i.x,series:[]}),n[i.x].series.push({key:null!==(e=t.key)&&void 0!==e?e:t.legend,data:i.y,color:null!==(r=i.color)&&void 0!==r?r:t.color,gradient:t.gradient,legend:t.legend,xAxisCalloutData:i.xAxisCalloutData,yAxisCalloutData:i.yAxisCalloutData,onClick:i.onClick,useSecondaryYScale:t.useSecondaryYScale})})):"line"===t.type&&i.push(t)})),{barData:Object.values(n),lineData:i}},Ec(e),e._createSet=(0,an.J9)((function(t,n){return e._createDataSetOfGVBC(t,n)})),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],xCalloutValue:"",yCalloutValue:"",YValueHover:[],hoverXValue:"",calloutLegend:"",activeLegend:"",activeLinePoint:""},En("GROUPED VERTICAL BAR CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default",showXAxisPath:"Dont use this property. Axis line removed default.",showYAxisPath:"Dont use this property. No need to display Y axis path. Handling default",showXAxisGridLines:"Dont use this property. Handling with default value.",legendColor:"Dont use this property. colour will pick from given data."}),e._calloutId=p("callout"),e._emptyChartId=p("_GVBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e._rectRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t,n,i,e,r=this,a=this._prepareChartData(),l=a.barData,s=a.lineData,c=null!==(n=null===(t=l[0])||void 0===t?void 0:t.name)&&void 0!==n?n:null===(e=null===(i=s[0])||void 0===i?void 0:i.data[0])||void 0===e?void 0:e.x;this._xAxisType=_l(c)?ns.StringAxis:zs(c,!0);var d=this._createSet(l,s),f=d.barLegends,v=d.lineLegends,h=d.xAxisLabels,p=d.datasetForBars;this._barLegends=f,this._lineLegends=v,this._xAxisLabels=h,this._datasetForBars=p;var g=this._getLegendData();this._adjustProps();var y=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(y,this.props.yMaxValue||0),this._classNames=rp(this.props.styles,{theme:this.props.theme,href:this.props.href});var m=(0,o.Cl)((0,o.Cl)((0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),gapSpace:15,isBeakVisible:!1,setInitialFocus:!0,color:this.state.color,Legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout},this.props.calloutProps),{preventDismissOnLostFocus:!0}),$s(this.state.callOutAccessibilityData,"text",!1)),b={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty(l,s)?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:ts.GroupedVerticalBarChart,calloutProps:m,legendBars:g,xAxisType:this._xAxisType,createYAxis:Cs,datasetForXAxisDomain:this._xAxisLabels,tickParams:b,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:As,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:dc.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(t){return u.createElement(u.Fragment,null,u.createElement("rect",{ref:r._rectRef,width:"100%",height:"100%",fill:"transparent",style:{pointerEvents:"none"}}),u.createElement("g",null,r._groupedVerticalBarGraph),r._createLines(s,t.xScale,t.yScalePrimary,t.yScaleSecondary))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(t,n){return!(t&&t.length>0&&t.filter((function(t){return t.series.length})).length>0||n&&n.length>0&&n.some((function(t){return t.data.length>0})))},n.prototype._adjustProps=function(){this._barWidth=Xs(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=Gs(this.props.xAxisInnerPadding,void 0,2/(2+qh(this._barLegends.length,op))),this._xAxisOuterPadding=Gs(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),ap=(0,r.I)(up,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:sv(n),barLabel:dv(n)}})),lp=i(263),sp=(0,a.Z)(),cp=function(t){function n(n){var i,e,r=t.call(this,n)||this;return r._rectRefArray={},r.toImage=function(t){var n,i;return af([{container:null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],r.props.hideLegend||null===(i=r._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},r._getMinMaxOfYAxis=function(){return{startValue:0,endValue:0}},r._getDomainNRangeValues=function(t,n,i,e,o,u,a,l){return u===ns.NumericAxis||u===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Bs(r.margins,i,o)},r._getXandY=function(){var t="",n="";return r.props.data.forEach((function(i){if(i.data&&i.data.length>0)return t=i.data[0].x,n=i.data[0].y,{x:t,y:n}})),{x:t,y:n}},r._getMargins=function(t){r.margins=t},r._getOpacity=function(t){return r._legendHighlighted(t)||r._noLegendHighlighted()?"1":"0.1"},r._rectRefCallback=function(t,n,i){r._rectRefArray[n]={data:i,refElement:t}},r._onRectFocus=function(t,n){r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData})},r._onRectMouseOver=function(t,n,i){i.persist(),r._calloutAnchorPoint!==n&&(r._calloutAnchorPoint=n,r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData}))},r._onRectBlurOrMouseOut=function(){},r._handleChartMouseLeave=function(){r._calloutAnchorPoint=null,r.setState({isCalloutVisible:!1})},r._createRectangles=function(){var t=[];return r._stringYAxisDataPoints.slice().reverse().forEach((function(n){var i=0;r._stringXAxisDataPoints.forEach((function(e){var o,a,l,s="x".concat(e,"y").concat(n);if((null===(o=r._dataSet[n][i])||void 0===o?void 0:o.x)===e&&"number"==typeof(null===(a=r._dataSet[n][i])||void 0===a?void 0:a.value)){var c=r._dataSet[n][i],d=sc(r._colorScale(c.value),r.props.theme);l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(c),"data-is-focusable":r._legendHighlighted(c.legend)||r._noLegendHighlighted(),fillOpacity:r._getOpacity(c.legend),transform:"translate(".concat(r._xAxisScale(c.x),", ").concat(r._yAxisScale(c.y),")"),ref:function(t){r._rectRefCallback(t,s,c)},onFocus:r._onRectFocus.bind(r,s,c),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,c),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:r._colorScale(c.value),width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth(),onClick:c.onClick}),u.createElement("text",{dominantBaseline:"middle",textAnchor:"middle",className:r._classNames.text,transform:"translate(".concat(r._xAxisScale.bandwidth()/2,", ").concat(r._yAxisScale.bandwidth()/2,")"),fill:d},(0,Yn.c$)(c.rectText,r.props.culture,r.props.useUTC))),i++}else{var f={x:e,y:n,value:NaN,rectText:"No data available",legend:""};l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(f),"data-is-focusable":r._noLegendHighlighted(),transform:"translate(".concat(r._xAxisScale(f.x),", ").concat(r._yAxisScale(f.y),")"),ref:function(t){r._rectRefCallback(t,s,f)},onFocus:r._onRectFocus.bind(r,s,f),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,f),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:"transparent",width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth()}))}t.push(l)}))})),t},r._createLegendBars=function(){var t=r.props,n=t.data,i=t.legendProps,e=[];return n.forEach((function(t){var n={title:t.legend,color:r._colorScale(t.value),action:function(){r._onLegendClick(t.legend)},hoverAction:function(){r._handleChartMouseLeave(),r._onLegendHover(t.legend)},onMouseOutAction:function(){r._onLegendLeave()}};e.push(n)})),u.createElement(bf,(0,o.Cl)({},i,{legends:e,ref:r._legendsRef}))},r._getColorScale=function(){var t=r.props,n=t.domainValuesForColorScale,i=t.rangeValuesForColorScale;return Gu().domain(n).range(i)},r._getXIndex=function(t){return r._xAxisType===ns.DateAxis?"".concat(t.getTime()):r._xAxisType===ns.StringAxis?t:r._xAxisType===ns.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===is.DateAxis?"".concat(t.getTime()):r._yAxisType===is.StringAxis?t:r._yAxisType===is.NumericAxis?"".concat(t):""},r._createNewDataSet=function(t,n,i,e,u){var a=[];t.forEach((function(t){t.data.forEach((function(n){a.push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend}))}))}));var l={},s={},c={};return a.forEach((function(t){var n=r._getXIndex(t.x),i=r._getYIndex(t.y);c[n]="1",s[i]="1",l[i]?l[i]=(0,o.fX)((0,o.fX)([],l[i],!0),[t],!1):l[i]=[t]})),Object.keys(l).forEach((function(t){l[t]=r._getOrderedXPoints(l[t]),l[t].forEach((function(t){r._xAxisType===ns.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===ns.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===ns.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===is.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===is.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===is.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===is.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===is.NumericAxis?l["".concat(r._getStringFormattedNumber(t,u))]=l[t]:l[r._getFormattedLabelForYAxisDataPoint(t)]=l[t]})),{dataSet:l,yAxisPoints:r._getYAxisDataPoints(s),xAxisPoints:r._getXAxisDataPoints(c)}},r._getXAxisDataPoints=function(t){return r._getOrderedXAxisLabels(t).map((function(t){return r._xAxisType===ns.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===ns.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===is.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===is.NumericAxis?r._getStringFormattedNumber(t,r.props.yAxisNumberFormatString):r._getFormattedLabelForYAxisDataPoint(t)}))},r._getStringFormattedDate=function(t,n){var i=new Date;return i.setTime(+t),Xe(n||"%b/%d")(i)},r._getStringFormattedNumber=function(t,n){return ju(n||".2~s")(+t)},r._getFormattedLabelForXAxisDataPoint=function(t){var n=r.props.xAxisStringFormatter;return n?n(t):t},r._getFormattedLabelForYAxisDataPoint=function(t){var n=r.props.yAxisStringFormatter;return n?n(t):t},r._closeCallout=function(){r.setState({isCalloutVisible:!1})},r._legendHighlighted=function(t){return r.state.selectedLegend===t||""===r.state.selectedLegend&&r.state.activeLegend===t},r._noLegendHighlighted=function(){return""===r.state.selectedLegend&&""===r.state.activeLegend},r._getAriaLabel=function(t){var n,i=t.x,e=t.y,r=t.legend,o=t.ratio?"".concat(t.ratio[0],"/").concat(t.ratio[1]):t.rectText||t.value,u=t.descriptionMessage;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,", ").concat(e,". ").concat(r,", ").concat(o,".")+(u?" ".concat(u,"."):"")},r._getChartTitle=function(){var t=r.props.chartTitle,n=r.props.data.reduce((function(t,n){return t+n.data.length}),0);return(t?"".concat(t,". "):"")+"Heat map chart with ".concat(n," data points. ")},r._getOrderedXAxisLabels=function(t){return r._shouldOrderXAxisLabelsByCategoryOrder()?lc(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===ns.DateAxis||r._xAxisType===ns.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?lc(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===is.DateAxis||r._yAxisType===is.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedXPoints=function(t){if(!r._shouldOrderXAxisLabelsByCategoryOrder())return t.sort((function(t,n){return r._xAxisType===ns.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===ns.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===ns.NumericAxis?+t.x>+n.x?1:-1:t.x>n.x?1:-1}));var n=[],i={};return t.forEach((function(t){var n=t.x;i[n]||(i[n]=[]),i[n].push(t)})),r._getOrderedXAxisLabels({}).forEach((function(t){i[t]&&n.push.apply(n,i[t])})),n},r._shouldOrderXAxisLabelsByCategoryOrder=function(){return r._xAxisType===ns.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===is.StringAxis&&"default"!==r.props.yAxisCategoryOrder},r._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return r.props.data.forEach((function(i){i.data.forEach((function(i){var e=t?i.y:i.x;n[e]||(n[e]=[]),n[e].push(i.value)}))})),n},Ec(r),r._createSet=(0,an.J9)((function(t,n,i,e,o){return r._createNewDataSet(t,n,i,e,o)})),r.state={selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",activeLegend:"",isCalloutVisible:!1,target:null,calloutLegend:"",calloutTextColor:"",calloutYValue:"",ratio:null,descriptionMessage:"",calloutId:""},r._emptyChartId=p("_HeatMap_empty"),r._cartesianChartRef=u.createRef(),r._legendsRef=u.createRef(),r}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)!==(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&this.setState({selectedLegend:null!==(r=null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegend)&&void 0!==r?r:""})},n.prototype.render=function(){var t=this,n=this._getXandY(),i=n.x,e=n.y;this._xAxisType=zs(i,!0),this._yAxisType=zs(e,!1);var r=this.props,a=r.data,l=r.xAxisDateFormatString,s=r.xAxisNumberFormatString,c=r.yAxisDateFormatString,d=r.yAxisNumberFormatString;this._colorScale=this._getColorScale();var f=this._createSet(a,l,s,c,d),v=f.dataSet,h=f.xAxisPoints,p=f.yAxisPoints;this._dataSet=v,this._stringYAxisDataPoints=p,this._stringXAxisDataPoints=h,this._classNames=sp(this.props.styles,{theme:this.props.theme});var g=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isBeakVisible:!1,gapSpace:8},this.props.calloutProps),{isCalloutVisible:this.state.isCalloutVisible,id:this.state.calloutId,YValue:this.state.calloutYValue,legend:this.state.calloutLegend,color:this.state.calloutTextColor,target:this.state.target,styles:this._classNames.subComponentStyles.calloutStyles,directionalHint:3,onDismiss:this._closeCallout}),$s(this.state.callOutAccessibilityData,"text",!1)),{preventDismissOnLostFocus:!0,calloutMaxWidth:238}),y=(0,o.Cl)((0,o.Cl)({},this.state.ratio&&{ratio:this.state.ratio}),{descriptionMessage:this.state.descriptionMessage}),m={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(jv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:ts.HeatMapChart,xAxisType:ns.StringAxis,yAxisType:is.StringAxis,calloutProps:g,createYAxis:Cs,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:As,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:dc.bidirectional},legendBars:this._createLegendBars(),onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,tickParams:m,children:function(n){return t._xAxisScale=n.xScale,t._yAxisScale=n.yScalePrimary,t._createRectangles()}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n.defaultProps={xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),dp=(0,r.I)(cp,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),fp=/[\{\}]/g,vp=/\{\d+\}/g;function hp(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(vp,(function(t){var n=e[t.replace(fp,"")];return null==n&&(n=""),n}))}function pp(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function gp(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function yp(t,n){return n-1-t.height}function mp(t,n){return t.sourceLinks.length?t.depth:n-1}function bp(t){return function(){return t}}function xp(t,n){return Mp(t.source,n.source)||t.index-n.index}function wp(t,n){return Mp(t.target,n.target)||t.index-n.index}function Mp(t,n){return t.y0-n.y0}function Cp(t){return t.value}function kp(t){return t.index}function Ap(t){return t.nodes}function Sp(t){return t.links}function Lp(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function Vp({nodes:t}){for(const n of t){let t=n.y0,i=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const t of n.targetLinks)t.y1=i+t.width/2,i+=t.width}}function Dp(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=kp,c=mp,d=Ap,f=Sp,v=6;function h(){const h={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const e=new Map(t.map(((n,i)=>[s(n,i,t),n])));for(const[t,i]of n.entries()){i.index=t;let{source:n,target:r}=i;"object"!=typeof n&&(n=i.source=Lp(e,n)),"object"!=typeof r&&(r=i.target=Lp(e,r)),n.sourceLinks.push(i),r.targetLinks.push(i)}if(null!=i)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(i),e.sort(i)}(h),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(pp(n.sourceLinks,Cp),pp(n.targetLinks,Cp)):n.fixedValue}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function(i){const s=function({nodes:t}){const i=gp(t,(t=>t.depth))+1,r=(o-e-a)/(i-1),u=new Array(i);for(const n of t){const t=Math.max(0,Math.min(i-1,Math.floor(c.call(null,n,i))));n.layer=t,n.x0=e+t*r,n.x1=n.x0+a,u[t]?u[t].push(n):u[t]=[n]}if(n)for(const t of u)t.sort(n);return u}(i);t=Math.min(l,(u-r)/(gp(s,(t=>t.length))-1)),function(n){const i=function(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}(n,(n=>(u-r-(n.length-1)*t)/pp(n,Cp)));for(const e of n){let n=r;for(const r of e){r.y0=n,r.y1=n+r.value*i,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*i}n=(u-n+t)/(e.length+1);for(let t=0;t<e.length;++t){const i=e[t];i.y0+=n*(t+1),i.y1+=n*(t+1)}w(e)}}(s);for(let t=0;t<v;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/v);g(s,n,i),p(s,n,i)}}(h),Vp(h),h}function p(t,i,e){for(let r=1,o=t.length;r<o;++r){const o=t[r];for(const t of o){let n=0,e=0;for(const{source:i,value:r}of t.targetLinks){let o=r*(t.layer-i.layer);n+=M(i,t)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Mp),y(o,e)}}function g(t,i,e){for(let r=t.length-2;r>=0;--r){const o=t[r];for(const t of o){let n=0,e=0;for(const{target:i,value:r}of t.sourceLinks){let o=r*(i.layer-t.layer);n+=C(t,i)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Mp),y(o,e)}}function y(n,i){const e=n.length>>1,o=n[e];b(n,o.y0-t,e-1,i),m(n,o.y1+t,e+1,i),b(n,u,n.length-1,i),m(n,r,0,i)}function m(n,i,e,r){for(;e<n.length;++e){const o=n[e],u=(i-o.y0)*r;u>1e-6&&(o.y0+=u,o.y1+=u),i=o.y1+t}}function b(n,i,e,r){for(;e>=0;--e){const o=n[e],u=(o.y1-i)*r;u>1e-6&&(o.y0-=u,o.y1-=u),i=o.y0-t}}function x({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(wp);for(const{target:{targetLinks:n}}of t)n.sort(xp)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(wp),i.sort(xp)}function M(n,i){let e=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:o}of n.sourceLinks){if(r===i)break;e+=o+t}for(const{source:t,width:r}of i.targetLinks){if(t===n)break;e-=r}return e}function C(n,i){let e=i.y0-(i.targetLinks.length-1)*t/2;for(const{source:r,width:o}of i.targetLinks){if(r===n)break;e+=o+t}for(const{target:t,width:r}of n.sourceLinks){if(t===i)break;e-=r}return e}return h.update=function(t){return Vp(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:bp(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:bp(t),h):c},h.nodeSort=function(t){return arguments.length?(n=t,h):n},h.nodeWidth=function(t){return arguments.length?(a=+t,h):a},h.nodePadding=function(n){return arguments.length?(l=t=+n,h):l},h.nodes=function(t){return arguments.length?(d="function"==typeof t?t:bp(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:bp(t),h):f},h.linkSort=function(t){return arguments.length?(i=t,h):i},h.size=function(t){return arguments.length?(e=r=0,o=+t[0],u=+t[1],h):[o-e,u-r]},h.extent=function(t){return arguments.length?(e=+t[0][0],o=+t[1][0],r=+t[0][1],u=+t[1][1],h):[[e,r],[o,u]]},h.iterations=function(t){return arguments.length?(v=+t,h):v},h}class Np{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}var Op=(0,a.Z)(),Tp="#757575",Ep=[{fillColor:"#00758F",borderColor:"#002E39"},{fillColor:"#77004D",borderColor:"#43002C"},{fillColor:"#4F6BED",borderColor:"#3B52B4"},{fillColor:"#937600",borderColor:"#6D5700"},{fillColor:"#286EA8",borderColor:"#00457E"},{fillColor:"#A43FB1",borderColor:"#7C158A"},{fillColor:"#CC3595",borderColor:"#7F215D"},{fillColor:"#0E7878",borderColor:"#004E4E"},{fillColor:"#8764B8",borderColor:"#4B3867"},{fillColor:"#9C663F",borderColor:"#6D4123"}];function Fp(t){return"number"==typeof t?t:t.nodeId}function Bp(t,n){return t[Fp(n.source)][Fp(n.target)]}var Pp="...";function _p(t,n){var i;try{return t.text(n),null===(i=t.node())||void 0===i?void 0:i.getComputedTextLength()}finally{t.text(null)}}var Hp,Ip,Wp=Ah().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new Np(t,!0)})),Rp=function(t){function n(n){var i,e,r,o=t.call(this,n)||this;o._isRtl=(0,l.jI)(),o._numColumns=0,o.toImage=function(t){return af([{container:o.chartContainer}],void 0,o._isRtl,t)},o._onCloseCallout=function(){o.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},o._onBlur=function(){},o._fillNodeColors=function(t){var n=o.state;if(!n.selectedState)return t.color;var i=n.selectedNode;return i&&n.selectedNodes.has(t.index)?i.color:i?void 0:t.color},o._fillNodeBorder=function(t){var n=o.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var i=n.selectedNode;return i?i.borderColor:t.borderColor}return t.borderColor}return t.borderColor},o._calculateChartMinWidth=function(){return o._margins.left+o._margins.right+124*o._numColumns+62*(o._numColumns-1)},Ec(o),o.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},o._calloutId=p("callout"),o._linkId=p("link"),o._chartId=p("sankeyChart"),o._emptyChartId=p("_SankeyChart_empty"),o._labelTooltipId=p("tooltip");var u=(null===(i=n.data)||void 0===i?void 0:i.chartTitle)?Math.max(("number"==typeof(null===(r=null===(e=n.titleStyles)||void 0===e?void 0:e.titleFont)||void 0===r?void 0:r.size)?n.titleStyles.titleFont.size:13)+20,36):36;return o._margins={top:u,right:48,bottom:32,left:48},o._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),o._computeClassNames=(0,an.J9)((function(t,n){return Op(t,n)})),o._normalizeData=(0,an.J9)((function(t,n,i,e,r){return o._normalizeSankeyData(t,n,i,e,r)})),o._fetchTooltip=(0,an.J9)((function(t){return o._labelTooltipDiv(t)})),o._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return hp(n,t.name)}}}))(n.strings),o._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",i=(null==t?void 0:t.nodeAriaLabel)||"node {0} with weight {1}";return{emptyAriaLabel:(null==t?void 0:t.emptyAriaLabel)||"Graph has no data to display",linkAriaLabel:function(t){return hp(n,t.source.name,t.target.name,t.unnormalizedValue?o._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return hp(i,t.name,o._formatNumber(n))}}}))(n.accessibility),o._nodeAttributes=(0,an.J9)((function(t,n){return o._computeNodeAttributes(t,n)})),o._fetchNodes=function(t,n,i,e){return o._createNodes(t,n,i,e)},o._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=Fp(t.source),o=e[r];o||(o={},e[r]=o),o[Fp(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),o._fetchLinks=function(t,n){return o._createLinks(t,n)},o}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._fitParentContainer()},n.prototype.componentDidUpdate=function(t){t.shouldResize!==this.props.shouldResize&&this._fitParentContainer()},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.theme,e=n.className,r=n.styles,a=n.pathColor,l=n.colorsForNodes,s=n.borderColorsForNodes,c=this.state,d=this._computeClassNamesProps(i,a,e,c.containerWidth,c.containerHeight,this.props.enableReflow),f=this._computeClassNames(r,d),v=this._normalizeData(this.props.data.SankeyChartData,c.containerWidth,c.containerHeight,l,s),h=v.nodes,p=v.links,g=v.width,y=v.height,m=[];h.sort((function(t,n){return t.x0!==n.x0?t.x0-n.x0:t.y0-n.y0})),h.forEach((function(t,n){m.push({layer:t.layer,type:"node",index:n})})),p.sort((function(t,n){var i=t.source.x0,e=n.source.x0;return i!==e?i-e:t.y0-n.y0})),p.forEach((function(t,n){m.push({layer:t.source.layer,type:"link",index:n})})),m.sort((function(t,n){return t.layer!==n.layer?t.layer-n.layer:t.type>n.type?-1:t.type<n.type?1:0}));var b=this._fetchTooltip(f),x=this._nodeAttributes(h,this._accessibility.nodeAriaLabel),w=this._fetchNodes(f,h,x,b),M=this._linkAttributes(p,this._strings.linkFrom,this._accessibility.linkAriaLabel),C=this._fetchLinks(p,M),k=(0,o.Cl)({isCalloutVisible:c.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:c.refSelected,color:c.color,XValue:c.xCalloutValue,YValue:c.yCalloutValue?c.yCalloutValue:c.dataForHoverCard,descriptionMessage:c.descriptionMessage,isBeakVisible:!1,gapSpace:15,onDismiss:this._onCloseCallout,className:f.calloutContentRoot,preventDismissOnLostFocus:!0},this.props.calloutProps);return u.createElement("div",{className:f.root,role:"presentation",ref:function(n){t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(td,{direction:dc.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},!this.props.hideLegend&&this.props.data.chartTitle&&u.createElement(gv,{title:this.props.data.chartTitle,x:g/2,maxWidth:g-20,className:f.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:f.svgTooltip}),m.map((function(t){return"node"===t.type?u.createElement("g",{key:h[t.index].nodeId,className:f.nodes},w[t.index]):u.createElement("g",{key:"".concat(p[t.index].source.nodeId,"-").concat(p[t.index].target.nodeId),className:f.links,strokeOpacity:1},C[t.index])})),k.isCalloutVisible&&u.createElement($n,(0,o.Cl)({},k),u.createElement(Cc.ChartHoverCard,{XValue:k.XValue,YValue:k.YValue,color:k.color,descriptionMessage:k.descriptionMessage?k.descriptionMessage:""})))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":this._accessibility.emptyAriaLabel})},n.prototype._computeNodeAttributes=function(t,n){var i=this,e={},r=sl(".nodeName").append("text").attr("class","tempText").append("tspan").text(null),o=sl(".nodeName").append("text").attr("class","tempText").attr("font-size","10").append("tspan").text(null);return t.forEach((function(t){var u=Math.max(t.y1-t.y0,0),a=8,l=0,s=t.actualValue;if(u<36){a+=6;var c=_p(r,i._formatNumber(s));void 0!==c&&(a+=l=c)}var d=function(t,n,i,e){var r=i-e;if(function(t,n,i){var e=_p(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=_p(t,Pp);return void 0===n?0:n}(t),u="",a=0;a<n.length;a++){u+=n[a],t.text(u);var l=t.node();if(null!==l&&l.getComputedTextLength()>=r-o){u=u.slice(0,-1),u+=Pp;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===Pp;e[t.nodeId]={reactId:p("nodeBar"),gElementId:p("nodeGElement"),name:d,aria:n(t,s),trimmed:f,height:u,weightOffset:l}})),cl(".tempText").remove(),e},n.prototype._linkCalloutAttributes=function(t,n){return{selectedLink:t,isCalloutVisible:!0,color:t.source.color,xCalloutValue:t.target.name,yCalloutValue:this._formatNumber(t.unnormalizedValue),descriptionMessage:n}},n.prototype._normalizeSankeyData=function(t,n,i,e,r){var u=function(t,n,i,e){var r=t.left,o=t.right,u=t.top,a=t.bottom;return{sankey:Dp().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?yp:mp),height:i,width:n}}(this._margins,n,i,this._isRtl),a=u.sankey,l=u.height,s=u.width,c=function(t){return{nodes:t.nodes.map((function(t){return(0,o.Cl)({},t)})),links:t.links.map((function(t){return(0,o.Cl)({},t)}))}}(t);a(c);var d=function(t){var n={};return t.nodes.forEach((function(t){var i=t.layer;n[i]?n[i].push(t):n[i]=[t]})),n}(c);this._numColumns=Object.keys(d).length;var f,v,h=(f=c.nodes,v={},f.forEach((function(t){v[t.nodeId]=t.value})),v),p=function(t){var n={};return t.forEach((function(t){var i=Fp(t.source),e=n[i];e||(e={},n[i]=e),e[Fp(t.target)]=t.value})),n}(c.links);return function(t,n,i){Object.values(t).map((function(t){return vi(t,(function(t){return t.value}))})).forEach((function(e,r){var o=0,u=.01*e,a=t[r];a.forEach((function(t){var i=n[t.nodeId],r=i/e*100;t.actualValue=i,r<1?(t.value=u,o+=1):o+=r}));var l=0!==o?o/100:1;l>1&&a.forEach((function(t){var e=t.value=t.value/l;!function(t,n,i,e){var r=function(t){var r=Bp(e,t);t.unnormalizedValue=r;var o=r/n;t.value=Math.max(i*o,t.value)};t.sourceLinks.forEach(r),t.targetLinks.forEach(r)}(t,n[t.nodeId],e,i)}))}))}(d,h,p),function(t,n,i){var e=t.nodePadding(),r=.3*n;Object.values(i).forEach((function(t){var i=n-vi(t,(function(t){return t.y1-t.y0}));r<i&&(e=Math.min(e,r/(t.length-1)))})),t.nodePadding(e)}(a,i-this._margins.top-this._margins.bottom,d),a(c),function(t,n,i){t.links.forEach((function(t){t.unnormalizedValue||(t.unnormalizedValue=Bp(i,t))})),t.nodes.forEach((function(t){t.actualValue=n[t.nodeId]}))}(c,h,p),function(t,n,i){var e,r;n&&i?(e=n,r=i):(e=Ep.map((function(t){return t.fillColor})),r=Ep.map((function(t){return t.borderColor})));var o=0;t.forEach((function(t){t.color||t.borderColor?t.color&&!t.borderColor?t.borderColor="#757575":t.borderColor&&!t.color&&(t.color="#F5F5F5"):(t.color=e[o],t.borderColor=r[o]),o=(o+1)%e.length}))}(c.nodes,e,r),{width:s,height:l,nodes:c.nodes,links:c.links}},n.prototype._labelTooltipDiv=function(t){var n=sl("#".concat(this._labelTooltipId));return n.empty()&&(n=sl("body").append("div").attr("id",this._labelTooltipId).attr("class",t.toolTip).style("opacity",0)),n.attr("class",t.toolTip),n},n.prototype._createLinks=function(t,n){var i=this;if(t){var e=this._linkId;return t.map((function(t,r){var o,a,l,s,c=Bp(n,t),d=c.reactId,f=c.from,v=c.aria,h=(a=.5*(o=t).width,l=o.y0,s=o.y1,[{x:o.source.x1,y0:l+a,y1:l-a},{x:o.target.x0,y0:s+a,y1:s-a}]),p="".concat(e,"-").concat(r),g="gradient-".concat(p),y="url(#".concat(g,")"),m=t.source,b=t.target;return u.createElement("g",{key:p},u.createElement("defs",null,u.createElement("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:m.color}),u.createElement("stop",{offset:"100%",stopColor:b.color}))),u.createElement("path",{d:Wp(h),id:d,fill:i._fillStreamColors(t,y),stroke:i._fillStreamBorder(t,y),strokeWidth:"2",strokeOpacity:i._getOpacityStreamBorder(t),onMouseOver:function(n){return i._onStreamHover(n,t,f)},onMouseOut:function(){i._onStreamLeave(t)},onFocus:function(n){return i._onFocusLink(n,t,f)},onBlur:i._onBlur,fillOpacity:i._getOpacityStream(t),"data-is-focusable":!0,"aria-label":v,role:"img"}))}))}return[]},n.prototype._createNodes=function(t,n,i,e){var r=this;if(n){var o=this.state,a=this._isRtl?"end":"start";return n.map((function(n,l){var s=i[n.nodeId],c=s.reactId,d=s.gElementId,f=s.height,v=s.trimmed,h=s.name,p=s.weightOffset,g=s.aria,y=f>36,m=n.name,b=n.actualValue,x=n.x0,w=n.x1,M=n.y0,C=function(t,n){return!t.selectedState||t.selectedNodes.has(n.index)&&t.selectedNode||!t.selectedNode?"#FFFFFF":"#323130"}(o,n);return u.createElement("g",{key:l,id:d},u.createElement("rect",{x:x,y:M,height:f,width:w-x,fill:r._fillNodeColors(n),id:c,onMouseOver:r._onHover.bind(r,n),onMouseOut:function(){r._onLeave(n)},onFocus:r._onCloseCallout.bind(r),stroke:r._fillNodeBorder(n),strokeWidth:"2",opacity:"1","data-is-focusable":!0,"aria-label":g,role:"img"}),f>24&&u.createElement("g",{className:t.nodeTextContainer},u.createElement("g",{className:"nodeName"},u.createElement("text",{id:"".concat(c,"-name"),x:x,y:M,dy:"1.2em",dx:"0.4em",textAnchor:a,fontWeight:"regular","aria-hidden":"true",fill:C,fontSize:10,onMouseOver:r._showTooltip.bind(r,m,v,e),onMouseOut:r._hideTooltip.bind(r,e)},h)),u.createElement("text",{x:y?x:w-p-8,y:M,dy:y?"2em":"1em",dx:y?"0.4em":"0em",textAnchor:a,fontWeight:"bold","aria-hidden":"true",fill:C,fontSize:14},b?r._formatNumber(b):b)))}))}},n.prototype._onLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedNode:void 0})},n.prototype._onHover=function(t,n){if(n.persist(),this._onCloseCallout(),!this.state.selectedState){var i=function(t){var n=new Array,i=new Set;for(t.sourceLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;)(e=n.shift().target)&&e.sourceLinks&&e.sourceLinks.forEach((function(t){i.add(t),n.push(t)}));for(t.targetLinks&&t.targetLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;){var e;(e=n.shift().source)&&e.targetLinks&&e.targetLinks.forEach((function(t){i.add(t),n.push(t)}))}return i}(t),e=function(t){var n=[];return t.forEach((function(t){n.push(t.target),-1===n.indexOf(t.source)&&n.push(t.source)})),n}(i);e.push(t),this.setState({selectedState:!0,selectedNodes:new Set(Array.from(e).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(i).map((function(t){return t.index}))),selectedNode:t,refSelected:n,isCalloutVisible:t.y1-t.y0<24,color:t.color,xCalloutValue:t.name,yCalloutValue:this._formatNumber(t.actualValue)})}},n.prototype._formatNumber=function(t){return this.props.formatNumberOptions?t.toLocaleString(void 0,this.props.formatNumberOptions):t.toString()},n.prototype._onStreamHover=function(t,n,i){if(t.persist(),this._onCloseCallout(),!this.state.selectedState){var e=function(t){var n=new Array,i=new Set,e=new Set;for(n.push(t.source),i.add(t);n.length>0;){var r=n.shift();e.add(r),r.targetLinks&&r.targetLinks.length>0&&r.targetLinks.forEach((function(t){n.push(t.source),i.add(t)}))}for(n.push(t.target);n.length>0;)r=n.shift(),e.add(r),r.sourceLinks&&r.sourceLinks.length>0&&r.sourceLinks.forEach((function(t){n.push(t.target),i.add(t)}));return{selectedLinks:i,selectedNodes:e}}(n),r=e.selectedLinks,u=e.selectedNodes;this.setState((0,o.Cl)({selectedState:!0,selectedNodes:new Set(Array.from(u).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(r).map((function(t){return t.index}))),refSelected:t},this._linkCalloutAttributes(n,i)))}},n.prototype._onStreamLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedLink:void 0})},n.prototype._onFocusLink=function(t,n,i){t.persist(),this._onCloseCallout(),this.setState((0,o.Cl)({refSelected:t.currentTarget},this._linkCalloutAttributes(n,i)))},n.prototype._fillStreamColors=function(t,n){var i=this.state;if(i.selectedState&&i.selectedLinks.has(t.index)){var e=i.selectedNode;return t?t.color:e?e.color:n}},n.prototype._fillStreamBorder=function(t,n){var i=this.state;if(i.selectedState){if(i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.borderColor:n}return Tp}return Tp},n.prototype._getOpacityStream=function(t){var n=this.state;if(n.selectedState){if(!n.selectedLinks.has(t.index))return 1;if(!n.selectedNode)return.3}return 1},n.prototype._getOpacityStreamBorder=function(t){var n=this.state;return!n.selectedState||n.selectedLinks.has(t.index)||n.selectedNode?1:.5},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n=t.props.parentRef?t.props.parentRef:t.chartContainer,r=n&&(t.props.enableReflow?Math.max(n.getBoundingClientRect().width,t._calculateChartMinWidth()):n.getBoundingClientRect().width),o=n&&n.getBoundingClientRect().height;(i!==r||e!==o)&&t.setState({containerWidth:r,containerHeight:o})}))},n.prototype._showTooltip=function(t,n,i,e){n&&(i.style("opacity",.9).style("color",this.props.theme.palette.neutralPrimary),i.text(t).style("left",e.pageX+"px").style("top",e.pageY-28+"px"))},n.prototype._hideTooltip=function(t){t.style("opacity",0)},n.prototype._isChartEmpty=function(){var t,n=null===(t=this.props.data)||void 0===t?void 0:t.SankeyChartData;return!(n&&n.nodes.length>0&&n.links.length>0)},n.defaultProps={enableReflow:!0},n}(u.Component),zp=(0,r.I)(Rp,(function(t){var n,i,e,r=t.className,u=t.theme,a=t.pathColor,l=t.enableReflow,s=u.effects;return{root:[u.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},r],links:{stroke:a||u.palette.black,fill:u?u.semanticColors.bodyBackground:"#F5F5F5",strokeWidth:3,selectors:(n={},n[It.up]={fill:"Canvas"},n)},nodes:{fill:"#F5F5F5",selectors:(i={},i[It.up]={fill:"Canvas"},i)},toolTip:sv(t.theme),nodeTextContainer:{selectors:{text:{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}},marginTop:"4px",marginLeft:"8px",marginBottom:"4px",marginRight:"8px"},calloutContentRoot:{boxShadow:s.elevation4},chartWrapper:(0,o.Cl)({},l?{overflow:"auto"}:{}),chart:{display:"block"},svgTooltip:hv(u),chartTitle:vv(u)}}));function jp(t){var n=0,i=t.children,e=i&&i.length;if(e)for(;--e>=0;)n+=i[e].value;else n=1;t.value=n}function $p(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Xp)):void 0===n&&(n=Yp);for(var i,e,r,o,u,a=new qp(t),l=[a];i=l.pop();)if((r=n(i.data))&&(u=(r=Array.from(r)).length))for(i.children=r,o=u-1;o>=0;--o)l.push(e=r[o]=new qp(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(Up)}function Yp(t){return t.children}function Xp(t){return Array.isArray(t)?t[1]:null}function Gp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Up(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function qp(t){this.data=t,this.depth=this.height=0,this.parent=null}function Zp(t,n){return t.parent===n.parent?1:2}function Kp(t){var n=t.children;return n?n[0]:t.t}function Jp(t){var n=t.children;return n?n[n.length-1]:t.t}function Qp(t,n,i){var e=i/(n.i-t.i);n.c-=e,n.s+=i,t.c+=e,n.z+=i,n.m+=i}function tg(t,n,i){return t.a.parent===n.parent?t.a:i}function ng(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}!function(t){t[t.long=1]="long",t[t.compact=0]="compact"}(Hp||(Hp={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(Ip||(Ip={})),qp.prototype=$p.prototype={constructor:qp,count:function(){return this.eachAfter(jp)},each:function(t,n){let i=-1;for(const e of this)t.call(n,e,++i,this);return this},eachAfter:function(t,n){for(var i,e,r,o=this,u=[o],a=[],l=-1;o=u.pop();)if(a.push(o),i=o.children)for(e=0,r=i.length;e<r;++e)u.push(i[e]);for(;o=a.pop();)t.call(n,o,++l,this);return this},eachBefore:function(t,n){for(var i,e,r=this,o=[r],u=-1;r=o.pop();)if(t.call(n,r,++u,this),i=r.children)for(e=i.length-1;e>=0;--e)o.push(i[e]);return this},find:function(t,n){let i=-1;for(const e of this)if(t.call(n,e,++i,this))return e},sum:function(t){return this.eachAfter((function(n){for(var i=+t(n.data)||0,e=n.children,r=e&&e.length;--r>=0;)i+=e[r].value;n.value=i}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,i=function(t,n){if(t===n)return t;var i=t.ancestors(),e=n.ancestors(),r=null;for(t=i.pop(),n=e.pop();t===n;)r=t,t=i.pop(),n=e.pop();return r}(n,t),e=[n];n!==i;)n=n.parent,e.push(n);for(var r=e.length;t!==i;)e.splice(r,0,t),t=t.parent;return e},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(i){i!==t&&n.push({source:i.parent,target:i})})),n},copy:function(){return $p(this).eachBefore(Gp)},[Symbol.iterator]:function*(){var t,n,i,e,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(i=0,e=n.length;i<e;++i)o.push(n[i])}while(o.length)}},ng.prototype=Object.create(qp.prototype);var ig=(0,a.Z)(),eg=function(t){function n(n,i,e,r,o,u){void 0===r&&(r=[]),void 0===o&&(o=[]);var a=t.call(this,n,e,r,o)||this;return a.composition=i,a._treeTraversal=u,a}return(0,o.C6)(n,t),n.prototype.C=function(t,n){var i,e,r,o,u,a,l=(t=t<65?65:t>90?90:t)||75,s=$p(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=Zp,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new ng(t,0),a=[u];n=a.pop();)if(e=n._.children)for(n.children=new Array(o=e.length),r=o-1;r>=0;--r)a.push(i=n.children[r]=new ng(e[r],r)),i.parent=n;return(u.parent=new ng(null,0)).children=[u],u}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(u),e)r.eachBefore(a);else{var s=r,c=r,d=r;r.eachBefore((function(t){t.x<s.x&&(s=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)}));var f=s===c?1:t(s,c)/2,v=f-s.x,h=n/(c.x+f+v),p=i/(d.depth||1);r.eachBefore((function(t){t.x=(t.x+v)*h,t.y=t.depth*p}))}return r}function o(n){var i=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(i){!function(t){for(var n,i=0,e=0,r=t.children,o=r.length;--o>=0;)(n=r[o]).z+=i,n.m+=i,i+=n.s+(e+=n.c)}(n);var o=(i[0].z+i[i.length-1].z)/2;r?(n.z=r.z+t(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+t(n._,r._));n.parent.A=function(n,i,e){if(i){for(var r,o=n,u=n,a=i,l=o.parent.children[0],s=o.m,c=u.m,d=a.m,f=l.m;a=Jp(a),o=Kp(o),a&&o;)l=Kp(l),(u=Jp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(Qp(tg(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!Jp(u)&&(u.t=a,u.m+=d-c),o&&!Kp(l)&&(l.t=o,l.m+=s-f,e=n)}return e}(n,r,n.parent.A||e[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*i}return r.separation=function(n){return arguments.length?(t=n,r):t},r.size=function(t){return arguments.length?(e=!1,n=+t[0],i=+t[1],r):e?null:[n,i]},r.nodeSize=function(t){return arguments.length?(e=!0,n=+t[0],i=+t[1],r):e?[n,i]:null},r})().nodeSize([l,l/1.5]).separation((function(t,n){return t.parent===s&&n.parent===s?3.5:1}))(s).descendants().forEach((function(t){t.y=0===t.depth?10:130*t.depth,t.x+=n/2}));var d=[],f=0,v=function(t){var n,i;t.id=f,d.push({id:f,children:t.children,dataName:t.data.name,subName:t.data.subname,bodyText:t.data.bodytext,metricName:null===(n=t.data)||void 0===n?void 0:n.metric,fill:t.data.fill,x:t.x,y:t.y,parentID:null===(i=t.parent)||void 0===i?void 0:i.id}),f++};0===this._treeTraversal?s.each((function(t){v(t)})):s.eachBefore((function(t){v(t)}));for(var h=3*l,p=h/3.45,g=20,y=new Set,m=0,b=d;m<b.length;m++){var x=b[m],w=0===x.id?"Root Node":"Parent info parentId: ".concat(x.parentID,"\n ").concat(d[x.parentID].dataName,"\n ").concat(d[x.parentID].subName);if(!x.children&&!y.has(x.parentID)&&3===c){var M=(h-g)/2,C=p;y.add(x.parentID),this.D(x.id,d[x.parentID].x,d[x.parentID].y,d[x.id].x,d[x.id].y,!0,h,p,g);for(var k=null===(i=d[x.parentID])||void 0===i?void 0:i.children,A=(null===(e=d[x.parentID])||void 0===e?void 0:e.x)-M/2-10,S=(null===(r=d[x.parentID])||void 0===r?void 0:r.x)+M/2+10,L=null===(o=d[x.parentID])||void 0===o?void 0:o.x,V=null===(u=k[0])||void 0===u?void 0:u.y,D=0;D<k.length;++D){var N=k[D];void 0!==this.composition?0===this.composition?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?1===k.length?L:A:S,V,N.data.fill,1===k.length?h:M,p,N.id,w),D%2==1&&(V+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=C+g):k.length>2?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?A:S,V,N.data.fill,1===k.length?h:M,p,N.id,w),D%2==1&&(V+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=C+g)}}if((x.children||c<=2)&&(this.N(x.dataName,x.subName,x.bodyText,x.metricName,x.x,x.y,x.fill,h,p,x.id,w),0===x.id&&x.children)){var O=di(k=null===(a=d[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),T=fi(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,O,x.children[0].y,!1,h,p,g,T)}}},n}(function(){function t(t,n,i,e){void 0===i&&(i=[]),void 0===e&&(e=[]),this._nodeElements=[],this._linkElements=[],this.treeData=t,this.styleClassNames=n,this._nodeElements=i,this._linkElements=e}return t.prototype.O=function(t,n,i,e){var r,o=t.split(/\s+/).reverse(),u="",a=sl(".svgTree").append("text").attr("class","tempText").append("tspan").text(null);e&&a.attr("class",e);for(var l=[];u=o.pop();)if(l.push(u),a.text(l.join(" ")+" "),null!==a.node()&&a.node().getComputedTextLength()>n-i){l.pop(),l.push("...");break}return r=l.join(" ")+" ",a.text(null),cl(".tempText").remove(),r},t.prototype.N=function(t,n,i,e,r,o,a,l,s,c,d){var f="nodeId: ".concat(c," \nnodeMainText: ").concat(t,"\nsubText ").concat(n," ").concat(d),v=r-l/2;!e&&0===c&&i||this._nodeElements.push(u.createElement("rect",{width:l,height:s,x:v,y:o,tabIndex:0,role:"text","data-is-focusable":!0,"aria-label":f,className:this.styleClassNames.rectNode,stroke:a,key:"".concat(c).concat(this.styleClassNames.rectNode)})),n&&(n=this.O(n,l,l/4,this.styleClassNames.rectSubText)),i&&(i=this.O(i,l,l/4,this.styleClassNames.rectBodyText)),e&&(e=this.O(e,l,l/4,this.styleClassNames.rectMetricText)),t=this.O(t,l,l/4,this.styleClassNames.rectText);var h=e?u.createElement("tspan",{className:this.styleClassNames.rectMetricText,dy:"1.4em",x:v+l/2},e):i?u.createElement(u.Fragment,null,u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n),u.createElement("tspan",{className:this.styleClassNames.rectBodyText,dy:"1.4em",x:v+l/2},i)):u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n);n||e||i?this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:e?this.styleClassNames.rectSubText:this.styleClassNames.rectText,dy:e?o+s/2.5:o+s/2,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t,h)):this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:this.styleClassNames.rectMetricText,dy:o+s/1.6,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t))},t.prototype.F=function(t,n,i,e,r,o,u,a,l){var s="M".concat(i-o/2,",").concat(e-a," H").concat(l+o/2," M").concat(t,",").concat(e-a,"\n V").concat(n+u+a/2),c="M".concat(t,",").concat(n+u+a/2," V").concat(n+5*a,"\n H").concat(t-o/2," H").concat(t+o/2);return r?c:s},t.prototype.D=function(t,n,i,e,r,o,a,l,s,c){void 0===c&&(c=0),this._linkElements.push(u.createElement("path",{className:this.styleClassNames.link,d:this.F(n,i,e,r,o,a,l,s,c),key:"".concat(t).concat(this.styleClassNames.link)}))},t}()),rg=function(t){function n(n){var i,e,r,o,u,a=t.call(this,n)||this;return a._nodeElements=[],a._linkElements=[],a._margin={top:(null===(i=a.props.margins)||void 0===i?void 0:i.top)||30,bottom:(null===(e=a.props.margins)||void 0===e?void 0:e.bottom)||30,left:(null===(r=a.props.margins)||void 0===r?void 0:r.left)||50,right:(null===(o=a.props.margins)||void 0===o?void 0:o.right)||20},a._width=a.props.width||1500,a._height=a.props.height||700,a._treeData=a.props.treeData,a._composition=null===(u=a.props)||void 0===u?void 0:u.composition,a._treeTraversal=a.props.treeTraversal,a.state={_width:a._width,_height:a._height},a}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.theme,i=t.className,e=t.styles;this._classNames=ig(e,{theme:n,className:i}),this.P(),this.setState({_width:this.props.width||1500,_height:this.props.height||700})},n.prototype.componentDidUpdate=function(t){if(t.layoutWidth!==this.props.layoutWidth){var n=cl("text"),i=cl("rect"),e=cl("path");0===this._nodeElements.length&&0===this._linkElements.length&&(n.remove(),i.remove(),e.remove()),this.P()}},n.prototype.P=function(){var t=[],n=[],i=new eg(this._treeData,this._composition,this._classNames,t,n,this._treeTraversal),e=this.state._width-this._margin.left-this._margin.right;i.C(this.props.layoutWidth,e),this._nodeElements=t,this._linkElements=n},n.prototype.render=function(){var t;return u.createElement(td,null,u.createElement("div",{className:null===(t=this._classNames)||void 0===t?void 0:t.root},u.createElement("svg",{className:"svgTree",width:this.state._width-this._margin.left-this._margin.right,height:this.state._height-this._margin.top-this._margin.bottom},u.createElement("g",{className:"svgNode"},this._nodeElements.map((function(t){return t}))),u.createElement("g",{className:"svgLink"},this._linkElements.map((function(t){return t}))))))},n}(u.Component),og=(0,r.I)(rg,(function(t){var n,i,e,r,u;return{root:[t.theme.spacing,"ms-TreeChart",t.className,{overflow:"scroll"}],link:{fill:"none",stroke:t.theme.palette.neutralSecondary,strokeWidth:"2px"},rectNode:{strokeWidth:"2px",fill:t.theme.semanticColors.bodyBackground,padding:"10px",rx:"2px",selectors:(n={},n[It.up]={fill:"Canvas"},n)},rectText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.large),{selectors:(i={},i[It.up]={fill:"CanvasText"},i)}),rectSubText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimary},t.theme.fonts.medium),{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}),rectBodyText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimaryAlt},t.theme.fonts.xSmall),{selectors:(r={},r[It.up]={fill:"CanvasText"},r)}),rectMetricText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.xLarge),{selectors:(u={},u[It.up]={fill:"CanvasText"},u)})}}));function ug(t,n){let i,e;if(void 0===n)for(const n of t)null!=n&&(void 0===i?n>=n&&(i=e=n):(i>n&&(i=n),e<n&&(e=n)));else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(void 0===i?o>=o&&(i=e=o):(i>o&&(i=o),e<o&&(e=o)))}return[i,e]}var ag=(0,a.Z)(),lg=function(t){function n(n){var i=t.call(this,n)||this;return i.margin={top:2,right:0,bottom:0,left:0},i._isRTL=(0,l.jI)(),i.state={_points:null,_width:i.props.width||80,_height:i.props.height||20,_valueTextWidth:i.props.valueTextWidth||80},i._emptyChartId=p("_SparklineChart_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this;if(!this._isChartEmpty()){var n=Ah().x((function(n){return t.x(n.x)})).y0(this.state._height).y1((function(n){return t.y(n.y)})).curve(hl);this.area=n;var i=Cv().x((function(n){return t.x(n.x)})).y((function(n){return t.y(n.y)})).curve(hl);this.line=i;var e=this.props.data.lineChartData[0].data,r=ug(e,(function(t){return t.x})),o=r[0],u=r[1];this.x=Gu().domain([o,u]).range([this.margin.left,this.state._width-this.margin.right]),this.y=Gu().domain([0,fi(e,(function(t){return t.y}))]).range([this.state._height-this.margin.bottom,this.margin.top]),this.setState({_points:e})}},n.prototype.drawSparkline=function(){return u.createElement(u.Fragment,null,u.createElement("path",{className:"line",d:this.line(this.state._points),fill:"transparent",opacity:1,strokeWidth:2,stroke:this.props.data.lineChartData[0].color}),u.createElement("path",{className:"area",d:this.area(this.state._points),opacity:1,fillOpacity:.2,fill:this.props.data.lineChartData[0].color,role:"img","aria-hidden":!0}))},n.prototype.render=function(){var t=ag(this.props.styles,{theme:this.props.theme});return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(td,{direction:dc.horizontal,isCircularNavigation:!0,className:t.inlineBlock},u.createElement("div",{className:t.inlineBlock},this.state._width>=50&&this.state._height>=16?u.createElement("svg",{width:this.state._width,height:this.state._height,"data-is-focusable":!0,"aria-label":"Sparkline with label ".concat(this.props.data.lineChartData[0].legend)},this.state._points?this.drawSparkline():null):u.createElement(u.Fragment,null),this.props.showLegend&&this.props.data.lineChartData[0].legend?u.createElement("svg",{width:this.state._valueTextWidth,height:this.state._height,"data-is-focusable":!0},u.createElement("text",{x:"0%",textAnchor:this._isRTL?"end":"start",dx:8,y:"100%",dy:-5,className:t.valueText},this.props.data.lineChartData[0].legend)):u.createElement(u.Fragment,null)))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n}(u.Component),sg=(0,r.I)(lg,(function(t){var n;return{inlineBlock:{display:"inline"},valueText:(0,o.Cl)((0,o.Cl)({},t.theme.fonts.smallPlus),{fill:t.theme.semanticColors.messageText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)})}}));function cg(t,n,i,e){var r=t.semanticColors.bodyText,o=t.semanticColors.bodyBackground;if(!n)return o;var u=Js(n,i||r),a=Js(n,e||o),l=Eo(u),s=Eo(a);if(!l||!s)return a;if(hs(l.formatHex(),s.formatHex())>=3)return s.formatHex();var c=function(t,n){var i=Eo(t);if(!i)return n.semanticColors.bodyText;var e=i.rgb();return Po(255-e.r,255-e.g,255-e.b).formatHex()}(s.formatHex(),t);return hs(l.formatHex(),c)>=3?c:o}var dg=(0,a.Z)(),fg=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return af([{container:i._rootElem}],void 0,i._isRTL,t)},Ec(i),i._isRTL=(0,l.jI)(n.theme),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t,n=this,i=this.props,e=i.headers,r=i.rows,a=i.width,l=i.height,s=i.styles,c=i.theme,d=i.chartTitle,f=dg(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var v,h=new Set;e.forEach((function(t){var n,i,e=null===(i=Eo((null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.backgroundColor)||""))||void 0===i?void 0:i.formatHex();e&&h.add(e)}));var p=!1;if(1===h.size||2===h.size)for(var g=1===h.size?Array.from(h)[0]:Array.from(h)[1],y=0,m=e;y<m.length;y++){var b=m[y],x=null===(t=null==b?void 0:b.style)||void 0===t?void 0:t.color;if(x&&hs(x,g)>=3){v=g,p=!0;break}}var w=d?30:0,M="number"==typeof l?l:650,C="".concat(M-w,"px"),k="number"==typeof a?a:"100%",A="number"==typeof a?a-20:void 0,S="number"==typeof a?a/2:0;return u.createElement("div",{ref:function(t){n._rootElem=t},className:f.root,style:{height:"".concat(M,"px"),overflow:"hidden"}},u.createElement("svg",{width:k,height:"".concat(M,"px"),className:f.chart},d&&u.createElement(gv,{title:d,x:S,maxWidth:A,className:f.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:f.svgTooltip}),u.createElement("foreignObject",{x:"0",y:w,width:"100%",height:C},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:f.table,style:{width:a?"".concat(a,"px"):"100%"}},u.createElement("thead",null,u.createElement("tr",null,e.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return p?e.backgroundColor=v:(r||a)&&(e.backgroundColor=cg(c,n._rootElem,r,a)),u.createElement("th",{key:i,className:f.headerCell,style:e},t.value)})))),r&&r.length>0&&u.createElement("tbody",null,r.map((function(t,i){return u.createElement("tr",{key:i},t.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return(r||a)&&(e.backgroundColor=cg(c,n._rootElem,r,a)),u.createElement("td",{key:i,className:f.bodyCell,style:e},t.value)})))}))))))))},n}(u.Component),vg=(0,r.I)(fg,(function(t){var n,i,e=t.theme,r=e.fonts;return{root:{width:"100%",overflowX:"auto"},table:{borderCollapse:"collapse"},headerCell:(0,o.Cl)((0,o.Cl)({},r.small),{fontWeight:It.BO.semibold,backgroundColor:e.palette.neutralQuaternary,color:e.semanticColors.bodyText,padding:"8px",textAlign:"left",border:"2px solid ".concat(e.palette.neutralLighter),selectors:(n={},n[It.up]={backgroundColor:"Window",color:"WindowText"},n)}),bodyCell:(0,o.Cl)((0,o.Cl)({},r.small),{padding:"8px",border:"2px solid ".concat(e.palette.neutralLighter),color:e.semanticColors.bodyText,textAlign:"left",selectors:(i={},i[It.up]={color:"WindowText"},i)}),chartTitle:vv(e),svgTooltip:hv(e)}})),hg=(0,a.Z)(),pg=function(t){function n(n){var i,e,r,a,s,c,d=t.call(this,n)||this;return d._isRtl=(0,l.jI)(),d.X_ORIGIN=0,d.toImage=function(t){var n,i;return af([{container:null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],d.props.hideLegend||null===(i=d._legendsRef.current)||void 0===i?void 0:i.toSVG,d._isRtl,t)},d._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){var l;return l=o===ns.NumericAxis?function(t,n,i,e,r){var o=Fs(Es(t),r),u=o.longestPositiveBar,a=o.longestNegativeBar,l=n.left,s=i-n.right;return e?{dStartValue:u,dEndValue:Math.min(a,r),rStartValue:l,rEndValue:s}:{dStartValue:Math.min(a,r),dEndValue:u,rStartValue:l,rEndValue:s}}(t,n,i,r,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},l},d._getMargins=function(t){d.margins=t},d._renderContentForOnlyBars=function(t){var n,i,e,r,o=d.props,a=o.useSingleColor,l=void 0!==a&&a,s=o.enableGradient,c=void 0!==s&&s,f=0;return d.props.data.forEach((function(n,i){n.y===t.y&&(f=i)})),l?(r=d.props.colors?d._createColors()(1):ss(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=Nc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=t.color?t.color:d.props.colors?d._createColors()(t.x):ss(f,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(Cc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x.toString(),Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:r,culture:d.props.culture}))},d._renderCallout=function(t){return t?d._renderContentForOnlyBars(t):null},d._getCustomizedCallout=function(){return d.props.onRenderCalloutPerDataPoint?d.props.onRenderCalloutPerDataPoint(d.state.dataPointCalloutProps,d._renderCallout):null},d._getGraphData=function(t,n,i,e,r,o){var u=Es(d._points),a=Fs(u,d.X_ORIGIN);d._longestBarPositiveTotalValue=a.longestPositiveBar,d._longestBarNegativeTotalValue=a.longestNegativeBar;var l=d._yAxisType===is.NumericAxis?d._getScales(i,e,!0):d._getScales(i,e,!1),s=l.xBarScale,c=l.yBarScale,f=s.range(),v=[];return f[0]<f[1]&&(v=u.map((function(t){return d._yAxisType===is.NumericAxis?d._createNumericBars(i,e,r,o,t,s,c):d._createStringBars(i,e,r,o,t,s,c)})).flat()),d._bars=v},d._refCallback=function(t,n){d._refArray.push({index:n,refElement:t})},d._getCalloutContentForBar=function(t){var n,i,e,r,o=[],u=d.props,a=u.useSingleColor,l=void 0!==a&&a,s=u.enableGradient,c=void 0!==s&&s,f=d.props.data,v=f.filter((function(n){return n.y===t.y})),h=0;return f.forEach((function(n,i){n.y===t.y&&(h=i)})),l?(r=d.props.colors?d._createColors()(1):ss(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=Nc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=v[0].color?v[0].color:d.props.colors?d._createColors()(v[0].x):ss(h,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),o.push({legend:v[0].legend,y:v[0].x,color:r,data:v[0].yAxisCalloutData,yAxisCalloutData:v[0].yAxisCalloutData}),{YValueHover:o,hoverXValue:t.yAxisCalloutData||t.y.toString()}},d._onBarLeave=function(){},d._handleChartMouseLeave=function(){d._calloutAnchorPoint=null,d.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},d._onBarFocus=function(t,n,i){if((!1===d.state.isLegendSelected||d._isLegendHighlighted(t.legend))&&d._calloutAnchorPoint!==t){var e=d._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;d._refArray.forEach((function(e,u){n===u&&d.setState({refSelected:e.refElement,isCalloutVisible:!0,selectedLegendTitle:t.legend,dataForHoverCard:t.x,color:d.props.useSingleColor?i:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData})}))}},d._getScales=function(t,n,i){var e=d._longestBarPositiveTotalValue,r=d._longestBarNegativeTotalValue,o=[Math.min(d.X_ORIGIN,r),Math.max(d.X_ORIGIN,e)];if(i){var u=fi(d._points,(function(t){return t.y})),a=di(d._points,(function(t){return t.y})),l=Math.max(u,d.props.yMaxValue||0),s=d.props.yMinValue||0,c=Math.min(a,s);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f=Gu().domain([c,l]).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin])}}var f=Tu().domain(d._yAxisLabels).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin]).padding(d._yAxisPadding);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f}},d._calculateBarTotals=function(t){var n=t.filter((function(t){return t.x>=d.X_ORIGIN})).reduce((function(t,n){return t+n.x}),0),i=t.filter((function(t){return t.x<d.X_ORIGIN})).reduce((function(t,n){return t+n.x}),0),e=n+i,r=e>=0,o=t.filter((function(t){return t.x>=d.X_ORIGIN})).length,u=t.length-o;return{totalPositiveValue:n,totalNegativeValue:i,totalBarValue:e,showLabelOnPositiveSide:r,shouldShowLabel:function(t,n,i){return r?t&&n===o:!t&&i===u}}},d._renderBarLabel=function(t,n,i,e){return d.props.hideLabels||d._barHeight<16?null:u.createElement("text",{x:t,y:n+d._barHeight/2,textAnchor:d._isRtl?e?"end":"start":e?"start":"end",transform:"translate(".concat(e?d._isRtl?-4:4:d._isRtl?4:-4,")"),dominantBaseline:"central",className:d._classNames.barLabel,"aria-hidden":!0,style:{direction:"ltr",unicodeBidi:"isolate"}},Ys(i))},d._calculateAppropriateBarHeight=function(t,n,i){var e=Xh(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1],u=fi(d._points,(function(t){return t.y}));return o=Math.max(o,u),Math.floor(n*r*(1-i)/(o+r*(1-i)))},d._getDomainMarginsForHorizontalBarChart=function(t){d._domainMargin=8;var n=d._getUniqueYValues();d._yAxisPadding=1===d._yAxisPadding?.99:d._yAxisPadding;var i=d._yAxisPadding/(1-d._yAxisPadding),e=n.length+(n.length-1)*i,r=t-(d.margins.top+8)-(d.margins.bottom+8);if(d._yAxisType!==is.StringAxis)d._barHeight=d.props.barHeight||d._calculateAppropriateBarHeight(n,r,d._yAxisPadding),d._barHeight=Math.max(d._barHeight,1),d._domainMargin+=d._barHeight/2;else{d._barHeight=d.props.barHeight||r/e;var u=e*d._barHeight;r>=u&&(d._domainMargin=8+(r-u)/2)}return(0,o.Cl)((0,o.Cl)({},d.margins),{top:d.margins.top+d._domainMargin,bottom:d.margins.bottom+d._domainMargin})},d._closeCallout=function(){d.setState({isCalloutVisible:!1})},d._getLegendData=function(t,n){var i=d.props.useSingleColor,e=[],r={};return t.forEach((function(t,n){var e,o,u,a,l=i?d.props.colors?d._createColors()(1):ss(1,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted):t.color;d.props.enableGradient&&(l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=Nc(0,0,null===(a=d.props.theme)||void 0===a?void 0:a.isInverted)[0])),r[t.legend]=l})),Object.entries(r).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){d._handleChartMouseLeave(),d._onLegendHover(n)},onMouseOutAction:function(t){d._onLegendLeave(t)}};e.push(r)})),u.createElement(bf,(0,o.Cl)({legends:e,enabledWrapLines:d.props.enabledLegendsWrapLines,overflowProps:d.props.legendsOverflowProps,focusZonePropsInHoverCard:d.props.focusZonePropsForLegendsInHoverCard,overflowText:d.props.legendsOverflowText},d.props.legendProps,{onChange:d._onLegendSelectionChange.bind(d),ref:d._legendsRef}))},d._isLegendSelected=function(){return d.state.isLegendSelected},d._isLegendHighlighted=function(t){return d._getHighlightedLegend().includes(t)},d._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;d._xMax=Math.max(n[n.length-1],d.props.xMaxValue||0)}},d._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.x,e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,". ")+"".concat(e,".")},d._getChartTitle=function(){var t=d.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Horizontal bar chart with ".concat((null==i?void 0:i.length)||0," bars. ")},d._getOrderedYAxisLabels=function(){return d._yAxisType===is.StringAxis&&"default"!==d.props.yAxisCategoryOrder?lc(d._mapCategoryToValues(),d.props.yAxisCategoryOrder):(0,o.fX)([],d._points,!0).reverse().map((function(t){return t.y}))},d._mapCategoryToValues=function(){var t={};return d._points.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(n.x)})),t},Ec(d),d.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,isLegendSelected:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)&&n.legendProps.selectedLegends.length>0||void 0!==(null===(e=n.legendProps)||void 0===e?void 0:e.selectedLegend),isLegendHovered:!1,refSelected:null,selectedLegendTitle:null!==(a=null===(r=n.legendProps)||void 0===r?void 0:r.selectedLegend)&&void 0!==a?a:"",xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",selectedLegends:(null===(s=n.legendProps)||void 0===s?void 0:s.selectedLegends)||[]},d._calloutId=p("callout"),d._refArray=[],d._xAxisType=d.props.data&&d.props.data.length>0?zs(d.props.data[0].x,!0):ns.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?zs(d.props.data[0].y,!1):is.StringAxis,d._cartesianChartRef=u.createRef(),d._legendsRef=u.createRef(),d._domainMargin=8,d._yAxisPadding=null!==(c=d.props.yAxisPadding)&&void 0!==c?c:.5,d}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._yAxisLabels=this._getOrderedYAxisLabels(),this._xMax=Math.max(fi(this._points,(function(t){return t.x})),this.props.xMaxValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=hg(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.selectedLegendTitle,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),$s(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(jv,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:ts.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:Ms,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ks,getMinMaxOfYAxis:Is,barwidth:this._barHeight,focusZoneDirection:dc.vertical,customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getYDomainMargins:this._getDomainMarginsForHorizontalBarChart,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barHeight=this.props.barHeight||32;var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark]},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._xMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;!1!==this.state.isLegendSelected&&!this._isLegendHighlighted(t.legend)||this._calloutAnchorPoint===t||(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:!0,dataForHoverCard:t.x,selectedLegendTitle:t.legend,color:this.props.useSingleColor||this.props.enableGradient?n:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._createNumericBars=function(t,n,i,e,r,a,l){var s=this,c=this.props.useSingleColor,d=void 0!==c&&c,f=(0,o.fX)([],r,!0);f.sort((function(t,n){var i="number"==typeof t.y?t.y:parseFloat(t.y);return("number"==typeof n.y?n.y:parseFloat(n.y))-i}));var v=this._calculateBarTotals(r),h=v.totalBarValue,g=v.shouldShowLabel,y=0,m=0,b=0,x=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,w=r.length-x,M=0,C=0,k=f.map((function(t,i){var e,r,o,c,f,v,k,A,S=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(S=s._isLegendHighlighted(t.legend)),s._classNames=hg(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:S}),t.x>=s.X_ORIGIN&&++M,t.x<s.X_ORIGIN&&++C;var L,V=s._isRtl?n-(s.margins.right+Math.max(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN))-s.margins.left):Math.min(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN));if(Math.max(l(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");L=d?s.props.colors?s._createColors()(1):ss(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):ss(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var D=L=t.color&&!d?t.color:L;if(s.props.enableGradient){var N=Math.max(s._points.findIndex((function(n){return n===t})),0);L=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Nc(N,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],D=(null===(f=t.gradient)||void 0===f?void 0:f[1])||Nc(N,0,null===(v=s.props.theme)||void 0===v?void 0:v.isInverted)[1],d&&(L=Nc(0,0,null===(k=s.props.theme)||void 0===k?void 0:k.isInverted)[0],D=Nc(0,0,null===(A=s.props.theme)||void 0===A?void 0:A.isInverted)[1]),s._points[N].color=L}var O=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),T=Math.abs(a(b+s.X_ORIGIN)-a(s.X_ORIGIN));b>s.X_ORIGIN?y+=T:m+=T;var E=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),F=E>2&&(t.x>s.X_ORIGIN&&M!==x||t.x<s.X_ORIGIN&&(0!==x||C>1))?2:0,B=E>2&&(t.x>s.X_ORIGIN&&(0!==w||M>1)||t.x<s.X_ORIGIN&&C!==w)?2:0,P=s.X_ORIGIN;P=s._isRtl?t.x>s.X_ORIGIN?V-y:V+m:t.x>s.X_ORIGIN?V+y:V-m;var _=E-(s._isRtl?B:F),H=s._isRtl?t.x>=s.X_ORIGIN?P:P+_:t.x>=s.X_ORIGIN?P+_:P,I=t.x>=s.X_ORIGIN,W=g(I,M,C);return b=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:O},u.createElement("stop",{offset:"0",stopColor:L}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",{key:t.y,x:P,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":S,width:_,height:s._barHeight,ref:function(n){s._refCallback(n,t.legend)},rx:s.props.roundCorners?3:0,onClick:t.onClick,onMouseOver:s._onBarHover.bind(s,t,L),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,L),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(O,")"):L}),W&&s._renderBarLabel(H,l(t.y)-s._barHeight/2,h,I))}));return k},n.prototype._getUniqueYValues=function(){var t,n={};return null===(t=this.props.data)||void 0===t||t.forEach((function(t){n[t.y]=t.y})),Object.values(n)},n.prototype._createStringBars=function(t,n,i,e,r,o,a){var l=this,s=this.props.useSingleColor,c=void 0!==s&&s,d=this._calculateBarTotals(r),f=d.totalBarValue,v=d.shouldShowLabel,h=0,g=0,y=0,m=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,b=r.length-m,x=0,w=0,M=r.map((function(t,i){var e,r,s,d,M,C,k,A,S=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(S=l._isLegendHighlighted(t.legend)),l._classNames=hg(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:S}),t.x>=l.X_ORIGIN&&++x,t.x<l.X_ORIGIN&&++w;var L,V=l._isRtl?n-(l.margins.right+Math.max(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN))-l.margins.left):Math.min(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN));if(Math.max(a(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");L=c?l.props.colors?l._createColors()(1):ss(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):ss(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var D=L=t.color&&!c?t.color:L;if(l.props.enableGradient){var N=l._points.findIndex((function(n){return n===t}));L=(null===(s=t.gradient)||void 0===s?void 0:s[0])||Nc(N,0,null===(d=l.props.theme)||void 0===d?void 0:d.isInverted)[0],D=(null===(M=t.gradient)||void 0===M?void 0:M[1])||Nc(N,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[1],c&&(L=Nc(0,0,null===(k=l.props.theme)||void 0===k?void 0:k.isInverted)[0],D=Nc(0,0,null===(A=l.props.theme)||void 0===A?void 0:A.isInverted)[1]),l._points[N].color=L}var O=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),T=Math.abs(o(y+l.X_ORIGIN)-o(l.X_ORIGIN));y>0?h+=T:g+=T;var E=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),F=E>2&&(t.x>l.X_ORIGIN&&x!==m||t.x<l.X_ORIGIN&&(0!==m||w>1))?2:0,B=E>2&&(t.x>l.X_ORIGIN&&(0!==b||x>1)||t.x<l.X_ORIGIN&&w!==b)?2:0;y=t.x;var P=l.X_ORIGIN;P=l._isRtl?t.x>l.X_ORIGIN?V-h:V+g:t.x>l.X_ORIGIN?V+h:V-g;var _=E-(l._isRtl?B:F),H=l._isRtl?t.x>=l.X_ORIGIN?P:P+_:t.x>=l.X_ORIGIN?P+_:P,I=t.x>=l.X_ORIGIN,W=a(t.y)+.5*(a.bandwidth()-l._barHeight),R=v(I,x,w);return u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:O},u.createElement("stop",{offset:"0",stopColor:L}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:P,y:a(t.y),rx:l.props.roundCorners?3:0,width:_,height:l._barHeight,"aria-labelledby":"toolTip".concat(l._calloutId),"aria-label":l._getAriaLabel(t),role:"img",ref:function(n){l._refCallback(n,t.legend)},onClick:t.onClick,onMouseOver:l._onBarHover.bind(l,t,L),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":S,onFocus:l._onBarFocus.bind(l,t,i,L),fill:l.props.enableGradient?"url(#".concat(O,")"):L}),R&&l._renderBarLabel(H,W,f,I))}));return M},n.prototype._onLegendHover=function(t){this._isLegendSelected()||this.setState({isLegendHovered:!0,selectedLegendTitle:t})},n.prototype._onLegendLeave=function(t){!t&&this._isLegendSelected()||this.setState({isLegendHovered:!1,selectedLegendTitle:"",isLegendSelected:!t&&this._isLegendSelected()})},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.selectedLegendTitle?[this.state.selectedLegendTitle]:[]},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t,selectedLegendTitle:null==i?void 0:i.title}):this.setState({selectedLegends:t.slice(-1),selectedLegendTitle:null==i?void 0:i.title}),this.setState({isLegendSelected:t.length>0}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.defaultProps={yAxisCategoryOrder:"default"},n}(u.Component),gg=(0,r.I)(pg,(function(t){var n,i=t.shouldHighlight,e=t.theme;return{opacityChangeOnHover:{opacity:i?"":"0.1"},xAxisTicks:[],barLabel:(n={fontSize:e.fonts.small.fontSize,fontWeight:It.BO.semibold,fill:e.semanticColors.bodyText},n[It.up]={stroke:"CanvasText"},n)}}));function yg(t){var n=t.availableWidth,i=t.minTextWidth;return{show:n>(void 0===i?24:i)&&n>0,x:t.textX,y:t.textY,value:t.value,culture:t.culture,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseOut:t.onMouseOut}}var mg=(0,a.Z)(),bg=u.forwardRef((function(t,n){var i,e,r,a=t.orientation,s=void 0===a?"vertical":a,c=(0,o.Tt)(t,["orientation"]),d=p("FunnelChartTooltipId_"),f=p("_FunnelChart_empty"),v=(0,l.jI)(),h=u.useState(null),g=h[0],y=h[1],m=u.useState(!1),b=m[0],x=m[1],w=u.useState(null),M=w[0],C=w[1],k=u.useState(null),A=k[0],S=k[1],L=u.useState([]),V=L[0],D=L[1],N=u.useRef(null),O=u.useRef(null),T=z(c.data);function E(t,n){null==n||n.persist(),y(t.stage),C(t),x(!0),S(n.currentTarget)}function F(t,n,i){null==i||i.persist(),y(n.category),C({stage:t,value:n.value,color:n.color,category:n.category}),x(!0),S(i.currentTarget)}function B(){y(null),x(!1),C(null),S(null)}u.useEffect((function(){var t;(null===(t=c.legendProps)||void 0===t?void 0:t.selectedLegends)&&D(c.legendProps.selectedLegends)}),[null===(i=c.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(c.componentRef,(function(){return{chartContainer:null!=N?N:null,toImage:function(t){var n;return af([{container:N.current}],c.hideLegend||null===(n=O.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[c.hideLegend]);var P=u.useCallback((function(t,n,i){var e,r;(null===(e=c.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?D(t):D(t.slice(-1)),(null===(r=c.legendProps)||void 0===r?void 0:r.onChange)&&c.legendProps.onChange(t,n,i)}),[c.legendProps]);function _(){return V.length>0?V:g?[g]:[]}function H(t){return _().includes(t)}function I(){return 0===_().length}function W(t,n){return"subValue"in t?{culture:c.culture,onMouseOver:1===n?function(n){return F(t.stage,t.subValue,n)}:void 0,onMouseMove:1===n?function(n){return F(t.stage,t.subValue,n)}:void 0,onFocus:function(n){return i=t.stage,e=t.subValue,null==(r=n)||r.persist(),C({stage:i,value:e.value,color:e.color,category:e.category}),x(!0),void S(r.currentTarget);var i,e,r},onBlur:function(){return B()},onMouseOut:function(){return B()}}:{culture:c.culture,onMouseOver:1===n?function(n){return E(t,n)}:void 0,onMouseMove:1===n?function(n){return E(t,n)}:void 0,onFocus:function(n){return function(t,n){null==n||n.persist(),C(t),x(!0),S(n.currentTarget)}(t,n)},onBlur:function(){return B()},onMouseOut:function(){return B()}}}function R(t){var n=t.key,i=t.pathD,e=t.fill,r=t.opacity,a=t.textProps,l=t.data,s=t.isFocusable,d=W(l,r),f=sc(e,c.theme);return u.createElement("g",{key:n},u.createElement("path",(0,o.Cl)({d:i,fill:e,opacity:r},d,{"data-is-focusable":s})),a&&u.createElement("g",(0,o.Cl)({},d),function(t){var n=t.show,i=t.x,e=t.y,r=t.value,o=t.textColor;if(!n)return null;var a=u.createElement("text",{x:v?q-i:i,y:e,textAnchor:"middle",alignmentBaseline:"middle",fill:o},(0,Yn.c$)(r.toString(),c.culture));return v?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-q,",0)")},a):a}((0,o.Cl)((0,o.Cl)({},a),{textColor:f}))))}function z(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function j(t,n,i,e,r){var u=r.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),a="vertical"===s?function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight/o.length,c=o[e],d=o[e+1]||{subValues:[]},f=u[e]||1,v=u[e+1]||0,h=0,p=0,g=function(t){var i=c.subValues[t],e=null===(n=d.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;h+=r/f*(f/a)*l,p+=(o/v||0)*(v/a)*l},y=0;y<r;y++)g(y);var m,b=c.subValues[r],x=null===(i=d.subValues)||void 0===i?void 0:i.find((function(t){return t.category===b.category})),w=b.value,M=x?x.value:0,C=w/f*(f/a)*l,k=(M/v||0)*(v/a)*l,A=(l-f/a*l)/2+h,S=A+C,L=(l-v/a*l)/2+p,V=L+k,D=(A+S+L+V)/4,N=e===o.length-1,O=N?e*s+.33*s:(e+.5)*s;return m=N?C*(1-(O-e*s)/s):Math.min(C,k),{pathD:"M".concat(A,",").concat(e*s,"\n L").concat(S,",").concat(e*s,"\n L").concat(V,",").concat((e+1)*s,"\n L").concat(L,",").concat((e+1)*s,"\n Z"),textX:D,textY:O,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},r),{stages:u,i:i,k:e})):function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight,c=l/o.length,d=o[e],f=o[e+1]||{subValues:[]},v=u[e]||1,h=u[e+1]||0,p=0,g=0,y=function(t){var i=d.subValues[t],e=null===(n=f.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;p+=r/v*(v/a)*s,g+=(o/h||0)*(h/a)*s},m=0;m<r;m++)y(m);var b,x,w,M=d.subValues[r],C=null===(i=f.subValues)||void 0===i?void 0:i.find((function(t){return t.category===M.category})),k=M.value,A=C?C.value:0,S=k/v*(v/a)*s,L=(A/h||0)*(h/a)*s,V=e*c,D=(e+1)*c,N=(s-v/a*s)/2+p,O=N+S,T=(s-h/a*s)/2+g,E=T+L;return e===o.length-1?(b=V+.25*(D-V),x=(N+O)/2,w=.5*(D-V)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(V+D)/2,x=(N+O+T+E)/4,w=.9*Math.abs(D-V),(S+L)/2<20&&(w=0)),{pathD:"M".concat(V,",").concat(N,"\n L").concat(D,",").concat(T,"\n L").concat(D,",").concat(E,"\n L").concat(V,",").concat(O,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},r),{stages:u,i:i,k:e})),l=W({stage:t.stage,subValue:n}),d=yg((0,o.Cl)({availableWidth:a.availableWidth,minTextWidth:16,textX:a.textX,textY:a.textY,value:n.value},l));return R({key:"".concat(i,"-").concat(e),pathD:a.pathD,fill:n.color,opacity:z(c.data)&&H(n.category)||I()?1:.1,textProps:d,data:{stage:t.stage,subValue:n},isFocusable:!!(z(c.data)&&H(n.category)||I())})}var $=(0,o.Cl)({isCalloutVisible:b,directionalHint:3,id:"toolTip".concat(d),target:A,color:null==M?void 0:M.color,XValue:null==M?void 0:M.stage,YValue:null==M?void 0:M.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){x(!1)},preventDismissOnLostFocus:!0},c.calloutProps),Y=c.width||350,X=c.height||500,G=mg(c.styles,{theme:c.theme,className:c.className,chartWidth:Y,chartHeight:X}),U=c.chartTitle?Math.max(("number"==typeof(null===(r=null===(e=c.titleStyles)||void 0===e?void 0:e.titleFont)||void 0===r?void 0:r.size)?c.titleStyles.titleFont.size:13)+20,40):40,q=.8*Y,Z=(Y-q)/2;return c.data&&c.data.length>0?u.createElement("div",{ref:N,className:G.root},u.createElement(td,{direction:dc.horizontal},u.createElement("svg",{width:Y,height:X,className:G.chart,role:"img","aria-label":c.chartTitle},!c.hideLegend&&c.chartTitle&&u.createElement(gv,{title:c.chartTitle,x:Y/2,maxWidth:Y-20,className:G.chartTitle,titleStyles:c.titleStyles,tooltipClassName:G.svgTooltip}),u.createElement("g",{transform:v?"translate(".concat(Z+q,", ").concat(U,") scale(-1,1)"):"translate(".concat(Z,", ").concat(U,")")},T?function(t,n){for(var i,e,r=c.data,o=r.map((function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.subValues)||void 0===n?void 0:n.reduce((function(t,n){return t+n.value}),0))&&void 0!==i?i:0})),u=[],a={stages:r,totals:o,maxTotal:Math.max.apply(Math,o),funnelWidth:n,funnelHeight:.8*t,isRTL:v},l=0;l<r.length;l++)for(var s=r[l],d=0;d<(null!==(i=s.subValues)&&void 0!==i?i:[]).length;d++){var f=null===(e=s.subValues)||void 0===e?void 0:e[d];f&&u.push(j(s,f,l,d,a))}return u}(X-U,q):function(t,n){var i=c.data,e=n,r=.8*t;return i.map((function(t,n){var u="vertical"===s?function(t){var n=t.d,i=t.i,e=t.data,r=t.funnelWidth,o=t.isRTL,u=t.funnelHeight/e.length,a=function(t){return t/Math.max.apply(Math,e.map((function(t){return t.value})))*r},l=a(n.value),s=i<e.length-1?a(e[i+1].value):0,c=(r-l)/2,d=(r-s)/2,f=o?r-c:c,v=o?r-d:d,h=i===e.length-1,p=h?i*u+.33*u:i*u+u/2,g=r/2,y=l;if(h){var m=l*(1-(p-i*u)/u);y=Math.max(.8*m,0)}else y=.9*Math.min(l,s);return{pathD:"M".concat(f,",").concat(i*u,"\n L").concat(r-f,",").concat(i*u,"\n L").concat(r-v,",").concat((i+1)*u,"\n L").concat(v,",").concat((i+1)*u,"\n Z"),textX:g,textY:p,availableWidth:y}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:r,isRTL:v}):function(t){var n,i,e=t.d,r=t.i,o=t.data,u=t.funnelHeight,a=t.funnelWidth/o.length,l=function(t){return t/Math.max.apply(Math,o.map((function(t){return t.value})))*u},s=l(e.value),c=r<o.length-1?l(o[r+1].value):0,d=(u-s)/2,f=(u-c)/2,v=r*a,h=(r+1)*a,p=.8*a;return r===o.length-1?(n=v+.25*(h-v),i=u/2,p=s<40||s*a/2<800?0:.75*(h-v)*.6):(n=(v+h)/2,i=u/2,p=Math.min(s,c)>20?.8*a:0),{pathD:"M".concat(v,",").concat(d,"\n L").concat(h,",").concat(f,"\n L").concat(h,",").concat(u-f,"\n L").concat(v,",").concat(u-d,"\n Z"),textX:n,textY:i,availableWidth:p}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:r,isRTL:v}),a=u.pathD,l=u.textX,c=u.textY,d=u.availableWidth,f=W(t),h=yg((0,o.Cl)({availableWidth:d,minTextWidth:16,textX:l,textY:c,value:t.value},f));return R({key:n,pathD:a,fill:t.color,opacity:H(t.stage)||I()?1:.1,textProps:h,data:t,isFocusable:!(!H(t.stage)&&!I())})}))}(X-U,q)),b&&u.createElement($n,(0,o.Cl)({},$),u.createElement(Cc.ChartHoverCard,{XValue:null==$?void 0:$.XValue,YValue:null==$?void 0:$.YValue,color:null==$?void 0:$.color})))),function(){if(c.hideLegend)return u.createElement(u.Fragment,null);var t;if(T){var n={};c.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in n||(n[t.category]=t.color)}))})),t=Object.entries(n).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return y(n)},onMouseOutAction:function(){return y(null)}}}))}else t=c.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return y(t.stage)},onMouseOutAction:function(){return y(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(bf,(0,o.Cl)({ref:O,legends:t,centerLegends:!0,onChange:P},c.legendProps)))}()):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));bg.displayName="FunnelChart";var xg,wg,Mg=(0,r.I)(bg,(function(t){var n=t.theme,i=t.className,e=t.chartWidth,r=t.chartHeight;return{root:[n.fonts.medium,"ms-FunnelChart",{alignItems:"center",width:"100%",height:"100%"},i],chart:{display:"block",width:e,height:r},chartTitle:vv(n),text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],svgTooltip:hv(n),subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(xg||(xg={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(wg||(wg={}));var Cg=[{minRadius:52,arcWidth:12,fontSize:20},{minRadius:70,arcWidth:16,fontSize:24},{minRadius:88,arcWidth:20,fontSize:32},{minRadius:106,arcWidth:24,fontSize:32},{minRadius:124,arcWidth:28,fontSize:40},{minRadius:142,arcWidth:32,fontSize:40}],kg=(0,a.Z)(),Ag=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===wg.SingleSegment?"".concat(t.legend,", ").concat(t.size," out of ").concat(i," or ").concat((t.size/i*100).toFixed(),"%"):"".concat(t.legend,", ").concat(t.start," to ").concat(t.end):0===n&&e===wg.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},Sg=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===xg.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===xg.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},Lg=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return af([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,e._isRTL,t)},e._getMargins=function(){var t=e.props,n=t.hideMinMax;return{left:16+(n?0:40),right:16+(n?0:40),top:16+(t.chartTitle?27:2),bottom:16+(t.sublabel?20:0)}},e._getStylesBasedOnBreakpoint=function(){for(var t=Cg.length-1;t>=0;t-=1)if(e._outerRadius>=Cg[t].minRadius)return{arcWidth:Cg[t].arcWidth,chartValueSize:Cg[t].fontSize};return{arcWidth:Cg[0].arcWidth,chartValueSize:Cg[0].fontSize}},e._processProps=function(){var t=e.props,n=t.minValue,i=void 0===n?0:n,r=t.maxValue,o=t.theme,u=i,a=e.props.segments.map((function(t,n){var i,e=Math.max(t.size,0);return u+=e,{legend:t.legend,size:e,color:void 0!==t.color?cs(t.color,o.isInverted):ss(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:Nc(n,0,o.isInverted),accessibilityData:t.accessibilityData,start:u-e,end:u}}));void 0!==r&&u<r&&(a.push({legend:"Unknown",size:r-u,color:o.palette.neutralLight,start:u,end:r}),u=r);var l=Zf().cornerRadius(e.props.roundCorners?3:0).padAngle(2/e._outerRadius).padRadius(e._outerRadius),s=e._isRTL?Array.from(a).reverse():a,c=-Math.PI/2,d=s.map((function(t,n){var r=c+t.size/(u-i)*Math.PI,o=l({innerRadius:e._innerRadius,outerRadius:e._outerRadius,startAngle:c,endAngle:r});return c=r,{d:o,segmentIndex:e._isRTL?a.length-1-n:n,startAngle:c-t.size/(u-i)*Math.PI,endAngle:r}}));return e._minValue=i,e._maxValue=u,e._segments=a,{arcs:d}},e._renderNeedle=function(){var t=function(t,n,i){var e=(t-n)/(i-n)*180;return e<0?e=0:e>180&&(e=180),e}(e.props.chartValue,e._minValue,e._maxValue),n=e._isRTL?180-t:t,i=e._outerRadius-e._innerRadius+4;return u.createElement("g",{transform:"rotate(".concat(n,", 0, 0)")},u.createElement("path",{d:"\n M 0,".concat(-4,"\n L ").concat(-i,",").concat(-2,"\n A ").concat(2,",").concat(2,",0,0,0,").concat(-i,",").concat(2,"\n L 0,").concat(4,"\n A ").concat(4,",").concat(4,",0,0,0,0,").concat(-4,"\n "),strokeWidth:2,className:e._classNames.needle,transform:"translate(".concat(2-e._innerRadius,")"),"data-is-focusable":!0,onFocus:function(t){return e._handleFocus(t,"Needle")},onBlur:e._handleBlur,onMouseEnter:function(t){return e._handleMouseOver(t,"Needle")},onMouseMove:function(t){return e._handleMouseOver(t,"Needle")},role:"img","aria-label":"Current value: "+Sg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat)}))},e._renderLegends=function(){if(e.props.hideLegend)return null;var t=e._segments.map((function(t,n){var i,r=e.props.enableGradient?(null===(i=t.gradient)||void 0===i?void 0:i[0])||Nc(n,0,e.props.theme.isInverted)[0]:t.color||ss(n,0,e.props.theme.isInverted);return{title:t.legend,color:r,hoverAction:function(){e.setState({hoveredLegend:t.legend})},onMouseOutAction:function(){e.setState({hoveredLegend:""})}}}));return u.createElement("div",{className:e._classNames.legendsContainer},u.createElement(bf,(0,o.Cl)({legends:t,centerLegends:!0},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef})))},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._handleFocus=function(t,n){e._showCallout(t.target,n,!0)},e._handleBlur=function(){e._hideCallout(!0)},e._handleMouseOver=function(t,n){e._showCallout(t.target,n,!1)},e._handleMouseOut=function(){e._hideCallout(!1)},e._handleCalloutDismiss=function(){e._hideCallout(!1)},e._showCallout=function(t,n,i){if(e._calloutAnchor!==n){e._calloutAnchor=n;var r="Current value is "+Sg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:Ag(t,e._minValue,e._maxValue,e.props.variant),color:e.props.enableGradient?null===(n=t.gradient)||void 0===n?void 0:n[0]:t.color}}));e.setState((0,o.Cl)({calloutTarget:t,isCalloutVisible:["Needle","Chart value"].includes(n)||e._noLegendHighlighted()||e._legendHighlighted(n),hoverXValue:r,hoverYValues:u},i?{focusedElement:n}:{}))}},e._hideCallout=function(t){e._calloutAnchor="",e.setState((0,o.Cl)({calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[]},t?{focusedElement:""}:{}))},e._wrapContent=function(t,n,i){var e=sl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},e._multiValueCallout=function(t){var n=e._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:e._classNames.calloutContentRoot},u.createElement("div",{className:e._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:e._classNames.calloutContentX},$s(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,e.props.culture))),u.createElement("div",{className:e._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,r){var a=i+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},$s(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),e._getCalloutContent(t,i,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:e._classNames.descriptionMessage},t.descriptionMessage)))},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Gauge chart with ".concat(e._segments.length," segments. ")},Ec(e),e._margins=e._getMargins(),e._legendsHeight=n.hideLegend?0:24,e.state={hoveredLegend:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],focusedElement:"",calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[],width:140+e._margins.left+e._margins.right,height:70+e._margins.top+e._margins.bottom+e._legendsHeight},e._isRTL=(0,l.jI)(n.theme),e._calloutAnchor="",e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._rootElem&&this.setState({width:this._rootElem.clientWidth,height:this._rootElem.clientHeight})},n.prototype.componentDidUpdate=function(t){var n,i,e;Zs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._margins=this._getMargins(),this._legendsHeight=this.props.hideLegend?0:24;var n=this.props.width||this.state.width,i=this.props.height||this.state.height;this._outerRadius=Math.min((n-(this._margins.left+this._margins.right))/2,i-(this._margins.top+this._margins.bottom+this._legendsHeight));var e=this._getStylesBasedOnBreakpoint(),r=e.arcWidth,a=e.chartValueSize;this._innerRadius=this._outerRadius-r;var l=this._processProps().arcs;return this._classNames=kg(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},u.createElement(td,{direction:dc.horizontal,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,role:"region","aria-label":this._getChartTitle(),onMouseLeave:this._handleMouseOut,width:n,height:i-this._legendsHeight},u.createElement("g",{transform:"translate(".concat(n/2,", ").concat(i-(this._margins.bottom+this._legendsHeight),")")},this.props.chartTitle&&u.createElement(gv,{title:this.props.chartTitle,x:0,y:-(this._outerRadius+11),className:this._classNames.chartTitle,titleStyles:this.props.titleStyles,tooltipClassName:this._classNames.svgTooltip}),!this.props.hideMinMax&&u.createElement(u.Fragment,null,u.createElement("text",{x:(this._isRTL?1:-1)*(this._outerRadius+4),y:0,textAnchor:"end",className:this._classNames.limits,role:"img","aria-label":"Min value: ".concat(this._minValue)},Ys(this._minValue)),u.createElement("text",{x:(this._isRTL?-1:1)*(this._outerRadius+4),y:0,textAnchor:"start",className:this._classNames.limits,role:"img","aria-label":"Max value: ".concat(this._maxValue)},Ys(this._maxValue))),l.map((function(n,i){var e,r,a=t._segments[n.segmentIndex],l=p("Arc_clip")+"".concat(i,"_").concat(n.startAngle,"_").concat(n.endAngle),s=kg(t.props.styles,{theme:t.props.theme,solidFill:t.props.enableGradient?"transparent":a.color,gradientFill:"conic-gradient(\n from ".concat(n.startAngle,"rad at 50% 100%,\n ").concat(null===(e=a.gradient)||void 0===e?void 0:e[0],",\n ").concat(null===(r=a.gradient)||void 0===r?void 0:r[1]," ").concat(n.endAngle-n.startAngle,"rad\n )"),opacity:t._legendHighlighted(a.legend)||t._noLegendHighlighted()?1:.1});return u.createElement(u.Fragment,{key:i},u.createElement("path",(0,o.Cl)({d:n.d,strokeWidth:t.state.focusedElement===a.legend?2:0,className:s.segment},$s((0,o.Cl)({ariaLabel:Ag(a,t._minValue,t._maxValue,t.props.variant,!0)},a.accessibilityData),"img",!0),{onFocus:function(n){return t._handleFocus(n,a.legend)},onBlur:t._handleBlur,onMouseEnter:function(n){return t._handleMouseOver(n,a.legend)},onMouseMove:function(n){return t._handleMouseOver(n,a.legend)},"data-is-focusable":t._legendHighlighted(a.legend)||t._noLegendHighlighted()})),t.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:l},u.createElement("path",{d:n.d})),u.createElement("foreignObject",{x:"-50%",y:"-100%",width:"100%",height:"100%",clipPath:"url(#".concat(l,")")},u.createElement("div",{className:s.gradientSegment}))))})),this._renderNeedle(),u.createElement("g",{onMouseEnter:function(n){return t._handleMouseOver(n,"Chart value")},onMouseMove:function(n){return t._handleMouseOver(n,"Chart value")}},u.createElement(lv,{content:Sg(this.props.chartValue,this._minValue,this._maxValue,this.props.chartValueFormat),textProps:{x:0,y:0,textAnchor:"middle",className:this._classNames.chartValue,"aria-hidden":"true"},maxWidth:2*this._innerRadius-24,wrapContent:this._wrapContent})),this.props.sublabel&&u.createElement(lv,{content:this.props.sublabel,textProps:{x:0,y:4,textAnchor:"middle",dominantBaseline:"hanging",className:this._classNames.sublabel},maxWidth:2*this._innerRadius,wrapContent:this._wrapContent})))),this._renderLegends(),!this.props.hideTooltip&&this.state.isCalloutVisible&&u.createElement($n,(0,o.Cl)({target:this.state.calloutTarget,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:this._handleCalloutDismiss},this.props.calloutProps),this._multiValueCallout({hoverXValue:this.state.hoverXValue,YValueHover:this.state.hoverYValues})))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.hoveredLegend?[this.state.hoveredLegend]:[]},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r=e?{}:{marginRight:"16px"},o=void 0!==t.index&&-1!==t.index,a=kg(this.props.styles,{theme:this.props.theme,lineColor:t.color,toDrawShape:o}),l=this.props.culture,s=(0,Yn.c$)(t.y,l);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var c=t.yAxisCalloutData;return u.createElement("div",{style:r},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),Object.keys(c).map((function(t){return u.createElement("div",{key:t,className:a.calloutBlockContainer},u.createElement("div",{className:a.calloutlegendText}," ",(0,Yn.c$)(t,l)),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(c[t],l)))})))}return u.createElement("div",{style:i?r:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:a.calloutBlockContainer},o&&u.createElement(of,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:Ws[t.index%Object.keys(js).length]}),u.createElement("div",null,u.createElement("div",{className:a.calloutlegendText}," ",t.legend),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:t.y||t.data,l)))))},n}(u.Component),Vg=(0,r.I)(Lg,(function(t){var n,i,e,r,u,a,l,s=t.theme,c=t.chartValueSize,d=t.className,f=t.lineColor,v=t.toDrawShape,h=t.solidFill,p=t.gradientFill,g=t.opacity;return{root:[s.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},d],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:s.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:c,fontWeight:It.BO.semibold,fill:s.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:s.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:s.palette.black,stroke:s.semanticColors.bodyBackground},svgTooltip:hv(s),chartTitle:vv(s),segment:{outline:"none",stroke:s.semanticColors.focusBorder,fill:h,fillOpacity:g},gradientSegment:{width:"100%",height:"100%",background:p,opacity:g},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:s.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},s.fonts.small),{lineHeight:"16px",opacity:"0.85",color:s.semanticColors.bodySubtext})],calloutBlockContainer:[s.fonts.mediumPlus,{marginTop:"13px",color:s.semanticColors.bodyText},!v&&{selectors:(r={},r[It.up]={forcedColorAdjust:"none"},r),borderLeft:"4px solid ".concat(f),paddingLeft:"8px"},v&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},s.fonts.small),{lineHeight:"16px",selectors:(u={},u[It.up]={color:"CanvasText"},u),color:s.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},s.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(a={},a[It.up]={color:"CanvasText"},a)})],descriptionMessage:[s.fonts.small,{selectors:(l={},l[It.up]={color:"CanvasText"},l),color:s.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(s.semanticColors.menuDivider)}]}})),Dg=i(927),Ng=u.createContext(void 0),Og=function(){var t=u.useContext(Ng),n=(0,Dg.m)(["theme"]).theme;return t||n||(0,pn.a)({})},Tg=function(t){var n=t.annotations,i=t.chartTitle,e=t.description,r=t.width,o=t.height,a=t.paperBackgroundColor,s=t.plotBackgroundColor,c=t.fontColor,d=t.fontFamily,f=t.margin,v=t.componentRef,h=Og(),p=u.useRef(null),g=u.useRef(null),y=u.useState(null!=r?r:0),m=y[0],b=y[1],x=u.useState(null!=o?o:650),w=x[0],M=x[1];u.useEffect((function(){if("number"==typeof r&&r>0)b(r);else{var t=p.current;if(t&&"undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.width;i>0&&Math.abs(i-m)>.5&&b(i)}})),i=t.getBoundingClientRect();return i.width>0&&b(i.width),n.observe(t),function(){return n.disconnect()}}var e=null==t?void 0:t.getBoundingClientRect();e&&e.width>0?b(e.width):b((function(t){return t>0?t:400}))}}),[r,m]);var C=Math.max(m||400,1),k=Math.max(null!=o?o:650,1);u.useEffect((function(){var t=g.current;if(t){if("undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.height;i>0&&M((function(t){return Math.abs(t-i)>.5?i:t}))}})),i=t.getBoundingClientRect();return M((function(t){return i.height>0?i.height:t>0?t:k})),n.observe(t),function(){return n.disconnect()}}var e=t.getBoundingClientRect();M((function(t){return e.height>0?e.height:t>0?t:k}))}else M((function(t){return t>0?t:k}))}),[k,C,n,i,e,f,s,a,c,d,h]);var A=Math.max(Math.ceil(w||0),k),S={plotRect:{x:0,y:0,width:C,height:k},svgRect:{width:C,height:k},isRtl:null==h?void 0:h.rtl},L=function(t){var n,i,e,r;if(t){var o=null!==(n=t.t)&&void 0!==n?n:0,u=null!==(i=t.r)&&void 0!==i?i:0,a=null!==(e=t.b)&&void 0!==e?e:0,l=null!==(r=t.l)&&void 0!==r?r:0;if(0!==o||0!==u||0!==a||0!==l)return"".concat(o,"px ").concat(u,"px ").concat(a,"px ").concat(l,"px")}}(f),V=u.useMemo((function(){return(0,It.Zq)({position:"relative",width:r?"".concat(r,"px"):"100%",minHeight:k,backgroundColor:null!=a?a:h.semanticColors.bodyBackground,color:null!=c?c:h.semanticColors.bodyText,fontFamily:null!=d?d:h.fonts.medium.fontFamily,padding:L,display:"flex",flexDirection:"column",rowGap:"8px"})}),[c,d,a,L,k,h,r]),D=u.useMemo((function(){var t;return(0,It.Zq)({position:"relative",flexGrow:1,backgroundColor:null!=s?s:"transparent",borderRadius:null!==(t=h.effects.roundedCorner2)&&void 0!==t?t:4,boxSizing:"border-box"})}),[s,h.effects.roundedCorner2]),N=u.useMemo((function(){return(0,It.Zq)({textAlign:"center"})}),[]),O=null!=n?n:[],T=O.length>0,E=T?null!=e?e:i:void 0;return u.useImperativeHandle(v,(function(){return{chartContainer:p.current,toImage:function(t){return af([{container:p.current}],void 0,(0,l.jI)(),t)}}}),[]),u.createElement("div",{ref:p,"data-chart-annotation-container":"true"},u.createElement("svg",{width:C,height:A,viewBox:"0 0 ".concat(C," ").concat(A),style:{width:r?"".concat(r,"px"):"100%",height:"".concat(A,"px"),display:"block"},role:E?"img":void 0,"aria-label":E},u.createElement("foreignObject",{x:0,y:0,width:C,height:A},u.createElement("div",{ref:g,className:V,"data-chart-annotation-only":"true","aria-label":E},i&&u.createElement("span",{className:N,"aria-hidden":"true"},i),u.createElement("div",{className:D,role:"presentation"},T?u.createElement(Hv,{annotations:O,context:S,theme:h,hideDefaultStyles:!0}):null)))))};Tg.displayName="AnnotationOnlyChart";var Eg=Array.prototype,Fg=Eg.slice;function Bg(t){return()=>t}function Pg(t){return t}function _g(t){return Math.max(1,Math.ceil(Math.log(function(t){let n=0;for(let i of t)null!=i&&(i=+i)>=i&&++n;return n}(t))/Math.LN2)+1)}function Hg(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Ig(t,n){this._context=t,this._k=(1-n)/6}Eg.map,Ig.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:Hg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Hg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Wg=function t(n){function i(t){return new Ig(t,n)}return i.tension=function(n){return t(+n)},i}(0),Rg=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],zg=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],jg=[es.color1,es.warning,es.color8,es.color4,es.color7,es.color6,es.color2,es.color5,es.color9,es.color10],$g=[es.color26,es.warning,es.color5,es.error,es.color4,es.color17,es.color22,es.disabled,es.color10,es.color3];function Yg(t,n){if(void 0===n&&(n=!1),!t||!Il(t))return"others";var i=t.map((function(t){return t.toLowerCase()}));return n&&Zs(i,$g)?"d3":Zs(i,Rg)?"plotly":"others"}function Xg(t,n,i,e){if("plotly"!==n)return t;var r=Rg,o=jg;e&&(r="plotly"===n?Rg:zg,o="plotly"===n?jg:$g);var u=r.indexOf(t.toLowerCase());return-1!==u?cs(o[u],!!i):t}var Gg=function(t,n,i,e,r){if(!n.current.has(t)){var o,u=r?"plotly"===i?jg:$g:jg;return o=n.current.size<u.length?cs(u[n.current.size],e):ss(n.current.size,0,e),n.current.set(t,o),o}return n.current.get(t)},Ug=function(t,n,i,e,r,o){return"default"===n&&i?function(t,n,i,e,r){var o=[];if(n){var u=Yg(t,r);if(Il(n))n.forEach((function(t,n){var a=null==t?void 0:t.toString().trim(),l=Gg("Label_".concat(n),i,u,e,r);if(a){var s=Eo(a);o.push(s?Xg(s.formatHex(),u,e):l)}else o.push(l)}));else if("string"==typeof n){var a=Eo(n);return a?Xg(a.formatHex(),u,e):Gg("Label_0",i,u,e,r)}return o}}(t,i,e,r,o):void 0},qg=function(t,n,i,e,r,o,u){var a=Yg(r,u);return t&&Il(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:Gg(i,e,a,o,u)},Zg=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Il(null===(e=t.marker)||void 0===e?void 0:e.opacity)?(null===(r=t.marker)||void 0===r?void 0:r.opacity)[n%(null===(o=t.marker)||void 0===o?void 0:o.opacity).length]:null===(u=t.marker)||void 0===u?void 0:u.opacity:null!==(a=t.opacity)&&void 0!==a?a:1},Kg=function(t,n,i){var e,r,o,u,a,l,s,c,d,f,v,h;if((null===(r=null===(e=null==t?void 0:t.coloraxis)||void 0===e?void 0:e.colorscale)||void 0===r?void 0:r.length)&&Il(null===(o=n.marker)||void 0===o?void 0:o.color)&&(null===(u=n.marker)||void 0===u?void 0:u.color).length>0&&"number"==typeof(null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[0])){var p=null===(s=null==t?void 0:t.coloraxis)||void 0===s?void 0:s.colorscale,g=null===(c=n.marker)||void 0===c?void 0:c.color,y=[null!==(f=null===(d=null==t?void 0:t.coloraxis)||void 0===d?void 0:d.cmin)&&void 0!==f?f:Math.min.apply(Math,g),null!==(h=null===(v=null==t?void 0:t.coloraxis)||void 0===v?void 0:v.cmax)&&void 0!==h?h:Math.max.apply(Math,g)],m=y[0],b=y[1],x=p.map((function(t){var n=t[0];return m+n*(b-m)})),w=p.map((function(t){return t[1]}));return Gu().domain(x).range(w)}return i},Jg="nonplot_",Qg="repeat(1, 1fr)",ty={dot:{strokeDasharray:"1, 5",strokeLinecap:"round",strokeWidth:"2",lineBorderWidth:"4"},dash:{strokeDasharray:"5, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdash:{strokeDasharray:"10, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},dashdot:{strokeDasharray:"5, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdashdot:{strokeDasharray:"10, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},solid:{strokeDasharray:"0",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"}};function ny(t){var n,i,e,r,u,a,l,s,c,d,f,v=null==t?void 0:t.title,h="string"==typeof v?v:null!==(n=null==v?void 0:v.text)&&void 0!==n?n:"",p="object"==typeof v?null==v?void 0:v.font:void 0,g="object"==typeof v?null==v?void 0:v.xanchor:void 0,y="object"==typeof v?null==v?void 0:v.yanchor:void 0,m="object"==typeof v?null==v?void 0:v.pad:void 0,b=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},p?{titleFont:p}:{}),g?{titleXAnchor:g}:{}),y?{titleYAnchor:y}:{}),m?{titlePad:m}:{});return(0,o.Cl)((0,o.Cl)({chartTitle:h},Object.keys(b).length>0?{titleStyles:b}:{}),{xAxisTitle:"string"==typeof(null===(i=null==t?void 0:t.xaxis)||void 0===i?void 0:i.title)?null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title:null!==(a=null===(u=null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title)||void 0===u?void 0:u.text)&&void 0!==a?a:"",yAxisTitle:"string"==typeof(null===(l=null==t?void 0:t.yaxis)||void 0===l?void 0:l.title)?null===(s=null==t?void 0:t.yaxis)||void 0===s?void 0:s.title:null!==(f=null===(d=null===(c=null==t?void 0:t.yaxis)||void 0===c?void 0:c.title)||void 0===d?void 0:d.text)&&void 0!==f?f:"",xAxisAnnotation:h})}var iy=function(t,n){var i=ay(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},ey=function(t,n){var i=uy(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:ju(null==i?void 0:i.tickformat)}:{}},ry=function(t,n){var i,e=null===(i=uy(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},oy=function(t,n){var i,e=null===(i=ay(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{xMinValue:e[0],xMaxValue:e[1],showRoundOffXTickValues:!1}:{}},uy=function(t,n){return null==n?void 0:n.yaxis},ay=function(t,n){return null==n?void 0:n.xaxis},ly=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,Yn.c$)(t)},sy=function(t){var n=(new Date).getFullYear();if(t.length>0&&Array.isArray(t[0]))throw new Error("updateXValues:: 2D array not supported");for(var i=t.map((function(t){var i="".concat(t," 01, ").concat(n);return Dl(i)?new Date(i):null})),e=i.map((function(t,n){return[t,n]})).filter((function(t){return null!==t[0]})),r=e.length-1;r>0;r--){var o=e[r][0],u=e[r-1][0],a=o.getMonth(),l=u.getMonth(),s=o.getFullYear(),c=u.getFullYear();l>=a?e[r-1][0].setFullYear(s-1):c>s&&e[r-1][0].setFullYear(s),i[e[r-1][1]]=e[r-1][0]}return t.map((function(t,n){return null===i[n]?null:"".concat(t," 01, ").concat(i[n].getFullYear())}))},cy=function(t,n){var i,e;return"y2"===t.yaxis&&("x"===(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.anchor)||"right"===(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.side))},dy=function(t,n){var i,e,r,o,u,a,l=!1,s=!0;return t.forEach((function(t){if(cy(t,n)){l=!0;var i=t.y;i&&(u=Math.min.apply(Math,i),a=Math.max.apply(Math,i)),("scatter"!==t.type||ql(t))&&(s=!1)}})),l?(s||("number"==typeof u&&(u=Math.min(u,0)),"number"==typeof a&&(a=Math.max(a,0))),(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.range)&&(u=n.yaxis2.range[0],a=n.yaxis2.range[1]),{secondaryYAxistitle:"string"==typeof(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.title)?n.yaxis2.title:"string"==typeof(null===(o=null===(r=null==n?void 0:n.yaxis2)||void 0===r?void 0:r.title)||void 0===o?void 0:o.text)?n.yaxis2.title.text:void 0,secondaryYScaleOptions:{yMinValue:u,yMaxValue:a}}):{}},fy=function(t,n,i,e,r){var o=Ug(t,n,i,e,r);return qg(o,0,"",e,t,r)},vy=function(t,n,i){if(!n)return String(t);var e="number"==typeof t?t:parseFloat(String(t));if(isNaN(e))return String(t);var r=("string"==typeof n?n:n[i||0]||"").match(/%\{text(?::([^}]+))?\}(.*)$/);if(r){var o=r[1],u=r[2];if(!o)return u.startsWith("%")?"".concat(e.toFixed(1)).concat(u):"".concat(e).concat(u);try{var a=ju(o)(e);return"".concat(a).concat(u)}catch(t){var l=o.match(/\.(\d+)[f%]/),s=l?parseInt(l[1],10):2;return o.includes("%")?"".concat((100*e).toFixed(s),"%").concat(u):"".concat(e.toFixed(s)).concat(u)}}return String(t)},hy=function(t){return Array.from(new Set((null!=t?t:[]).flatMap((function(t){var n=t.x;return n&&Array.isArray(n)?n.flat().map((function(t){return t})):[]})).filter((function(t){return null!=t}))))},py=function(t,n){void 0===n&&(n="");var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=n?"".concat(n,".").concat(e):e,o=t[e];"object"!=typeof o||null===o||Array.isArray(o)||o instanceof Date?i[r]=o:Object.assign(i,py(o,r))}return i},gy=function(t){if(null!=t){var n="number"==typeof t?t:Number(t);return Number.isFinite(n)?n:void 0}},yy=function(t,n){if(!t)return n;var i=t.toLowerCase();if(i===n||i==="".concat(n,"axis")||i==="".concat(n,"axis1")||i==="".concat(n,"1"))return n;var e=i.match(/^([xy])(axis)?(\d+)$/);return e&&e[1]===n&&e[3]?"1"===e[3]?n:"".concat(n).concat(e[3]):i},my=function(t,n,i,e){if(e&&0!==e.length){var r,o,u=ky(i,n,t),a=yy(n,t),l="x"===t?"xaxis":"yaxis";if(e.forEach((function(n){var i=n;if(yy(i[l],t)===a){var e="x"===t?i.x:i.y;if(Il(e))for(var s=e,c=0;c<s.length;c++){var d=s[c],f=Sy(Ay(d,u));void 0===f||Number.isNaN(f)||(r=void 0===r?f:Math.min(r,f),o=void 0===o?f:Math.max(o,f))}}})),void 0!==r&&void 0!==o&&r!==o)return[r,o]}},by=function(t){if(void 0!==t&&Number.isFinite(t))return 1-t},xy=function(t){switch((null!=t?t:"").toLowerCase()){case"left":return"start";case"center":return"center";case"right":return"end";default:return}},wy=function(t){switch((null!=t?t:"").toLowerCase()){case"top":return"top";case"middle":return"middle";case"bottom":return"bottom";default:return}},My=function(t){if(null!=t)return"string"==typeof t?t:"number"==typeof t&&Number.isFinite(t)?"".concat(t,"px"):void 0},Cy=function(t,n){if(!t)return"axis";var i=t.toLowerCase();if("pixel"===i)return"pixel";if("paper"===i)return"relative";if(i.endsWith(" domain"))return i.startsWith(n)?"relative":void 0;var e=i.match(/^([xy])(\d*)$/);return e&&e[1]===n?"axis":void 0},ky=function(t,n,i){if(t){var e="".concat(i,"axis");if(!n)return t[e];var r=n.toLowerCase();if("paper"===r||"pixel"===r||r.endsWith(" domain"))return t[e];var o=r.match(/^([xy])(\d*)$/);if(o&&o[1]===i){var u=o[2];return u&&""!==u&&"1"!==u?t["".concat(i,"axis").concat(u)]:t[e]}return t[e]}},Ay=function(t,n){if(null!=t){if("date"===(null==n?void 0:n.type)||Dl(t)){var i=t instanceof Date?t:new Date(t);return Number.isNaN(i.getTime())?void 0:i}if("number"==typeof t)return t;if("linear"===(null==n?void 0:n.type)||"log"===(null==n?void 0:n.type)){var e=Number(t);return Number.isFinite(e)?e:void 0}return Date,t}},Sy=function(t){if(t instanceof Date){var n=t.getTime();return Number.isFinite(n)?n:void 0}if("number"==typeof t)return Number.isFinite(t)?t:void 0;if("string"==typeof t){var i=Number(t);return Number.isFinite(i)?i:void 0}},Ly=function(t,n,i){var e=Array.isArray(null==n?void 0:n.range)?n.range:void 0,r=e&&e.length>=2?Sy(Ay(e[0],n)):void 0,o=e&&e.length>=2?Sy(Ay(e[1],n)):void 0;void 0!==r&&void 0!==o&&r!==o||!i||(r=i[0],o=i[1]);var u=Sy(Ay(t,n));if(void 0!==r&&void 0!==o&&void 0!==u&&r!==o){var a=(u-r)/(o-r);return Number.isFinite(a)?a:void 0}},Vy=function(t,n){var i=t.replace(/\s+/g," ").trim();if(i){var e=i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32);if(e)return"annotation-".concat(n,"-").concat(e)}return"annotation-".concat(n)},Dy=function(t){var n=!1,i=!1,e="string"==typeof(null==t?void 0:t.arrowside)?null==t?void 0:t.arrowside.toLowerCase():void 0;e&&(n=e.includes("start"),i=e.includes("end"));var r=gy(null==t?void 0:t.arrowhead),o=gy(t.startarrowhead);return void 0!==r&&r>0&&(i=!0),void 0!==o&&o>0&&(n=!0),n&&i?"both":n?"start":i?"end":"none"},Ny=function(t,n,i){if(!i&&(null==t?void 0:t.annotations)){var e=(Array.isArray(t.annotations)?t.annotations:[t.annotations]).map((function(i,e){return function(t,n,i,e){var r;if(t&&!1!==t.visible){var u=Cy(t.xref,"x"),a=Cy(t.yref,"y");if(u&&a){var l;if("axis"===u&&"axis"===a){var s=ky(n,t.xref,"x"),c=ky(n,t.yref,"y"),d=Ay(t.x,s),f=Ay(t.y,c);if(void 0===d||void 0===f)return;var v="string"==typeof t.yref?t.yref.toLowerCase():void 0;l=(0,o.Cl)({type:"data",x:d,y:f},"y2"===v?{yAxis:"secondary"}:{})}else if("relative"===u&&"relative"===a){d=gy(t.x),f=gy(t.y);var h=by(f);if(void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("relative"===u&&"axis"===a){d=gy(t.x),c=ky(n,t.yref,"y");var p=my("y",t.yref,n,i),g=Ly(t.y,c,p);if(h=by(g),void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("axis"===u&&"relative"===a){f=gy(t.y),s=ky(n,t.xref,"x");var y=my("x",t.xref,n,i),m=Ly(t.x,s,y);if(h=by(f),void 0===m||void 0===h)return;l={type:"relative",x:m,y:h}}else{if("pixel"!==u||"pixel"!==a)return;if(d=gy(t.x),f=gy(t.y),void 0===d||void 0===f)return;l={type:"pixel",x:d,y:f}}var b=t.text,x=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}(null==b?"":String(b)),w={id:Vy(x,e),text:x,coordinates:l},M={},C={},k=void 0!==t.showarrow&&!!t.showarrow,A=t.cliponaxis;void 0!==A?M.clipToBounds=!!A:"data"===l.type&&(M.clipToBounds=!0);var S=xy(t.xanchor);if(S&&(M.align=S),!M.align){var L=xy(t.align);L&&(M.align=L)}var V=wy(t.yanchor);if(V&&(M.verticalAlign=V),!M.verticalAlign){var D=wy(t.valign);D&&(M.verticalAlign=D)}var N=[],O=!1,T=gy(t.ax),E="string"==typeof t.axref?t.axref.toLowerCase():void 0;void 0===T||void 0!==E&&"pixel"!==E||(N.push(T),O=!0);var F=gy(t.xshift);if(void 0!==F&&(N.push(F),O=!0),N.length>0){var B=N.reduce((function(t,n){return t+n}),0);0!==B&&(M.offsetX=B)}var P=[],_=gy(t.ay),H="string"==typeof t.ayref?t.ayref.toLowerCase():void 0;void 0===_||void 0!==H&&"pixel"!==H||(P.push(_),O=!0);var I=gy(t.yshift);if(void 0!==I&&(P.push(I),O=!0),P.length>0){var W=P.reduce((function(t,n){return t+n}),0);0!==W&&(M.offsetY=W)}k&&!O&&void 0===M.offsetY&&(M.offsetY=-40);var R=gy(t.width);void 0!==R&&(M.maxWidth=R),t.bgcolor&&(C.backgroundColor=t.bgcolor),t.bordercolor&&(C.borderColor=t.bordercolor);var z=gy(t.borderwidth);void 0!==z&&(C.borderWidth=z);var j=My(t.borderpad);j&&(C.padding=j);var $=gy(t.opacity);if(void 0!==$&&(C.opacity=$),t.font){var Y=t.font;(null==Y?void 0:Y.color)&&(C.textColor=Y.color);var X=My(null==Y?void 0:Y.size);X&&(C.fontSize=X),(null==Y?void 0:Y.weight)&&(C.fontWeight=Y.weight)}var G=null==t?void 0:t.textangle;if("number"!=typeof G||Number.isNaN(G)){if("string"==typeof G&&"auto"!==G.toLowerCase()){var U=Number(G);Number.isNaN(U)||(C.rotation=U)}}else C.rotation=G;if(Object.keys(M).length>0&&(w.layout=M),Object.keys(C).length>0&&(w.style=C),k){var q=null!==(r=t.arrowcolor)&&void 0!==r?r:C.textColor,Z=gy(t.arrowwidth),K=gy(t.standoff),J=gy(t.startstandoff),Q=function(t){if(t){var n=t.trim().toLowerCase();switch(n){case"solid":return;case"dot":return"1, 5";case"dash":return"5, 5";case"longdash":return"10, 5";case"dashdot":return"5, 5, 1, 5";case"longdashdot":return"10, 5, 1, 5";default:return/^\d+(\s|,)*\d*$/.test(n.replace(/\s+/g," "))?n.replace(/\s+/g," "):t}}}(t.arrowdash);w.connector=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},q?{strokeColor:q}:{}),void 0!==Z?{strokeWidth:Z}:{}),void 0!==K?{endPadding:Math.max(K,0)}:{}),void 0!==J?{startPadding:Math.max(J,0)}:{}),Q?{dashArray:Q}:{}),{arrow:Dy(t)})}return w}}}(i,t,n,e)})).filter((function(t){return void 0!==t}));return e.length>0?e:void 0}},Oy=function(t,n,i,e,r,u){var a,l,s,c,d,f={},v=0,h=0,p=dy(t.data,t.layout),g=jy(t.data,t.layout,n),y=g.legends,m=g.hideLegend,b=void 0,x=ey(t.data[0],t.layout),w=rm(em(t.data,im(t.data,t.layout).x));t.data.forEach((function(n,a){var l,s,c,d,p,g,m,M;b=Kg(t.layout,n,b);var C=Ug(null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),k=Ug(null===(m=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.layout)||void 0===m?void 0:m.colorway,e,null===(M=n.line)||void 0===M?void 0:M.color,i,r),A=Yy(n,w);A.forEach((function(e,l){var s=e[0],c=e[1],d=n.x.slice(s,c),p=n.y.slice(s,c),g=Array.isArray(n.text)?n.text.slice(s,c):"string"==typeof n.text?n.text:void 0;d.forEach((function(e,s){var c,d,m,M,S,L,V,D,N,O,T,E;f[e]||(f[e]={xAxisPoint:w(e),chartData:[],lineData:[]});var F=y[a],B=b?b(Il(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(m=null===(d=n.marker)||void 0===d?void 0:d.color)||void 0===m?void 0:m[s%(null===(M=n.marker)||void 0===M?void 0:M.color).length]:0):qg(C,s,F,i,null===(V=null===(L=null===(S=t.layout)||void 0===S?void 0:S.template)||void 0===L?void 0:L.layout)||void 0===V?void 0:V.colorway,r),P=Zg(n,s),_=p[s],H=ly(_,x),I=Array.isArray(g)?g[s]:g;if(I&&n.texttemplate&&(I=vy(I,n.texttemplate,s)),"bar"===n.type)f[e].chartData.push((0,o.Cl)({legend:F,data:_,color:null!==(D=Po(B).copy({opacity:P}).formatHex8())&&void 0!==D?D:B,yAxisCalloutData:H},I?{barLabel:String(I)}:{})),"number"==typeof _&&(v=Math.max(v,_));else if("scatter"===n.type||u){var W=qg(k,a,F,i,null===(T=null===(O=null===(N=t.layout)||void 0===N?void 0:N.template)||void 0===O?void 0:O.layout)||void 0===T?void 0:T.colorway,r),R=By(n.line),z=zy(n);f[e].lineData.push({legend:F+(A.length>1?".".concat(l+1):""),legendShape:z,y:_,color:null!==(E=Po(W).copy({opacity:P}).formatHex8())&&void 0!==E?E:B,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=R?R:{}),{mode:n.mode}),useSecondaryYScale:cy(n,t.layout),yAxisCalloutData:H}),cy(n,t.layout)||"number"!=typeof _||(v=Math.max(v,_),h=Math.min(h,_))}}))}))}));var M=hy(t.data);(null!==(l=null===(a=t.layout)||void 0===a?void 0:a.shapes)&&void 0!==l?l:[]).filter((function(t){return"line"===t.type})).forEach((function(t,n){var i,e,r,o=null===(i=t.line)||void 0===i?void 0:i.color,u=function(i){if("x domain"===t.xref){if(0===i)return M[0];if(1===i)return M[M.length-1]}return"number"==typeof i&&Array.isArray(M)?void 0!==M[i]?M[i]:M[n]:i},a=u(t.x0),l=u(t.x1),s=function(n){return"paper"===t.yref?0===n?h:1===n?v:"number"==typeof n?h+n*(v-h):n:n},c=s(t.y0),d=s(t.y1);f[a]&&f[a].lineData.push({legend:"Reference_".concat(n),y:c,color:null!==(e=Po(o).formatHex8())&&void 0!==e?e:o,lineOptions:By(t.line),useSecondaryYScale:!1}),f[l]&&f[l].lineData.push({legend:"Reference_".concat(n),y:d,color:null!==(r=Po(o).formatHex8())&&void 0!==r?r:o,lineOptions:By(t.line),useSecondaryYScale:!1})}));var C=Object.values(f),k=Ny(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:C,width:null===(s=t.layout)||void 0===s?void 0:s.width,height:null!==(d=null===(c=t.layout)||void 0===c?void 0:c.height)&&void 0!==d?d:350,barWidth:"auto",yMaxValue:v,yMinValue:h,mode:"plotly"},p),{hideTickOverlap:!0,hideLegend:m,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundedTicks:!0}),oy(t.data[0],t.layout)),ny(t.layout)),Uy(t.data,t.layout)),ry(t.data[0],t.layout)),iy(t.data[0],t.layout)),x),Ky(t.data,t.layout)),Qy(t.data,t.layout)),k?{annotations:k}:{})},Ty=function(t,n,i,e,r,u){var a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=["text","markers","text+markers","markers+text","lines+markers","markers+line","text+lines+markers","lines+markers+text"].includes(null===(a=t.data[0])||void 0===a?void 0:a.mode),M="area"===i,C="scatter"===i,k=dy(t.data,t.layout),A="tonexty",S=jy(t.data,t.layout,n),L=S.legends,V=S.hideLegend,D=ey(t.data[0],t.layout),N=rm(em(t.data,im(t.data,t.layout).x)),O=t.data.map((function(n,i){var a,l,s,c,d,f,v,h,p,g,y,m=w?(null===(a=null==n?void 0:n.mode)||void 0===a?void 0:a.includes("line"))?null===(l=n.line)||void 0===l?void 0:l.color:null===(s=n.marker)||void 0===s?void 0:s.color:null===(c=n.line)||void 0===c?void 0:c.color,b=Ug(null===(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r,m,e,u),x=n.x,M=L[i],C=qg(b,i,M,e,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,u),k=Zg(n,i);A="tozeroy"===n.fill?"tozeroy":"tonexty";var S=(null===(y=n.mode)||void 0===y?void 0:y.includes("text"))||"scatterpolar"===n.type?void 0:By(n.line),V=zy(n);return Yy(n,N).map((function(i,e){var r,u,a,l,s,c,d,f,v,h,p,g=i[0],y=i[1],m=x.slice(g,y),b=n.y.slice(g,y),w=Il(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(g,y):[],A=Il(null===(u=n.marker)||void 0===u?void 0:u.color)||Array.isArray(null===(a=n.marker)||void 0===a?void 0:a.color)?n.marker.color.slice(g,y):void 0,L=Array.isArray(n.text)?n.text.slice(g,y):void 0;return{legend:M,legendShape:V,data:m.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({x:N(t),y:b[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:w[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),A?{markerColor:A[i]}:{}),L?{text:L[i]}:{}),{yAxisCalloutData:ly(b[i],D)})})),color:null!==(l=Po(C).copy({opacity:k}).formatHex8())&&void 0!==l?l:C,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=S?S:{}),{mode:"scatterpolar"!==n.type?n.mode:"scatterpolar"}),"scatterpolar"===n.type?{originXOffset:null===(s=t.layout)||void 0===s?void 0:s.__polarOriginX,direction:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.polar)||void 0===d?void 0:d.angularaxis)||void 0===f?void 0:f.direction,rotation:null===(p=null===(h=null===(v=t.layout)||void 0===v?void 0:v.polar)||void 0===h?void 0:h.angularaxis)||void 0===p?void 0:p.rotation,axisLabel:n.__axisLabel?n.__axisLabel:{},fill:n.fill}:{}),useSecondaryYScale:cy(n,t.layout)}}))})).flat(),T=null===(s=null===(l=O[0])||void 0===l?void 0:l.data[0])||void 0===s?void 0:s.x,E=null===(d=null===(c=O[0])||void 0===c?void 0:c.data[O[0].data.length-1])||void 0===d?void 0:d.x,F=null===(v=null===(f=O[0])||void 0===f?void 0:f.data[0])||void 0===v?void 0:v.y,B=null===(p=null===(h=O[0])||void 0===h?void 0:h.data[O[0].data.length-1])||void 0===p?void 0:p.y,P=hy(t.data),_=(null!==(y=null===(g=t.layout)||void 0===g?void 0:g.shapes)&&void 0!==y?y:[]).filter((function(t){return"line"===t.type})).map((function(t,n){var i,e,r=null===(i=t.line)||void 0===i?void 0:i.color,o=function(i){return"number"==typeof i&&Array.isArray(P)?void 0!==P[i]?P[i]:P[n]:"paper"===t.xref?0===i?T:1===i?E:"number"==typeof T&&"number"==typeof E&&"number"==typeof i?T+i*(E-T):i:i},u=function(n){return"paper"===t.yref?0===n?F:1===n?B:"number"==typeof n?F+n*(B-F):n:n};return{legend:"Reference_".concat(n),data:[{x:N(o(t.x0)),y:u(t.y0)},{x:N(o(t.x1)),y:u(t.y1)}],color:null!==(e=Po(r).formatHex8())&&void 0!==e?e:r,lineOptions:By(t.line),useSecondaryYScale:!1}})),H=ry(t.data[0],t.layout);if(void 0===H.yMinValue&&void 0===H.yMaxValue){var I=_s(O);H.yMinValue=I.startValue,H.yMaxValue=I.endValue}var W,R,z=O.reduce((function(t,n){return t+n.data.length}),0),j={lineChartData:(0,o.fX)((0,o.fX)([],O,!0),_,!0)},$={scatterChartData:(0,o.fX)((0,o.fX)([],O,!0),_,!0)},Y=Ny(t.layout,t.data,n),X=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},k),{width:null===(m=t.layout)||void 0===m?void 0:m.width,height:null!==(x=null===(b=t.layout)||void 0===b?void 0:b.height)&&void 0!==x?x:350,hideTickOverlap:!0,hideLegend:V,useUTC:!1,optimizeLargeData:z>1e3,showYAxisLables:!0,roundedTicks:!0}),oy(t.data[0],t.layout)),ny(t.layout)),iy(t.data[0],t.layout)),D),Jy(t.data,t.layout)),Qy(t.data,t.layout)),Y?{annotations:Y}:{});return M?(0,o.Cl)({data:j,mode:A},X):(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:C?$:j,enableReflow:!1},X),H),C?(0,o.Cl)({showYAxisLablesTooltip:!0},Uy(t.data,t.layout)):{}),!C&&(W=t.layout,(R=Array.isArray(null==W?void 0:W.shapes)?W.shapes.filter((function(t){return"rect"===t.type})).map((function(t){return"string"==typeof t.x0||"string"==typeof t.x1?null:{color:t.fillcolor,data:[{startX:t.x0,endX:t.x1}],applyPattern:!1}})):[])&&!R.includes(null)?{colorFillBars:R}:{}))},Ey=function(t){return t.replace(/&lt;[^&]*?&gt;/g,"").replace(/<[^>]*>/g,"").replace(/&lt;br&gt;|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function Fy(t,n,i){var e,r;if(Array.isArray(t)){var o=null!==(e=t[i])&&void 0!==e?e:t[0];return Array.isArray(o)?null!==(r=o[n])&&void 0!==r?r:o[0]:o}return t}function By(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),ty[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=Wg.tension(1-i/1.3);break;case"hv":n.curve="stepAfter";break;case"vh":n.curve="stepBefore";break;case"hvh":n.curve="step";break;default:n.curve="linear"}return Object.keys(n).length>0?n:void 0}}var Py=function(t,n,i){return null==n?-1:i?t.findIndex((function(t){return t.includes(n)})):t.findIndex((function(i,e){return n>=i.x0&&(e===t.length-1?n<=i.x1:n<i.x1)}))},_y=function(t){return t.x1-t.x0},Hy=function(t){return(t.x1+t.x0)/2},Iy=function(t,n,i,e){if(!t||0===t.length)return[];if(Bl(t)){var r=Array.from(new Set(t)),o="number"==typeof n?Math.ceil(n):0,u="number"==typeof i?Math.floor(i)+1:r.length,a="number"==typeof e?e:1;return Su(o,u,a).map((function(t){return r.slice(t,t+a)}))}var l=Gu().domain(ug(t)).nice().domain(),s=l[0],c=l[1];s="number"==typeof n?n:s,c="number"==typeof i?i:c;var d=function(){var t=Pg,n=ug,i=_g;function e(e){Array.isArray(e)||(e=Array.from(e));var r,o,u,a=e.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(e[r],r,e);var s=n(l),c=s[0],d=s[1],f=i(l,c,d);if(!Array.isArray(f)){const t=d,i=+f;if(n===ug&&([c,d]=ci(c,d,i)),(f=ai(c,d,i))[0]<=c&&(u=li(c,d,i)),f[f.length-1]>=d)if(t>=d&&n===ug){const t=li(c,d,i);isFinite(t)&&(t>0?d=(Math.floor(d/t)+1)*t:t<0&&(d=(Math.ceil(d*-t)+1)/-t))}else f.pop()}for(var v=f.length,h=0,p=v;f[h]<=c;)++h;for(;f[p-1]>d;)--p;(h||p<v)&&(f=f.slice(h,p),v=p-h);var g,y=new Array(v+1);for(r=0;r<=v;++r)(g=y[r]=[]).x0=r>0?f[r-1]:c,g.x1=r<v?f[r]:d;if(isFinite(u)){if(u>0)for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[Math.min(v,Math.floor((o-c)/u))].push(e[r]);else if(u<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&c<=o&&o<=d){const t=Math.floor((c-o)*u);y[Math.min(v,t+(f[t]<=o))].push(e[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[ho(f,o,0,v)].push(e[r]);return y}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:Bg(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:Bg([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:Bg(Array.isArray(t)?Fg.call(t):t),e):i},e}().domain([s,c]);if("number"==typeof e&&e>0){for(var f=[],v=Math.max(dl(s),dl(e)),h=fl(s,v);h<fl(c+e,v);)f.push(h),h=fl(h+e,v);return s=f[0],c=f[f.length-1],d.domain([s,c]).thresholds(f),d(t).slice(0,-1)}return d(t)},Wy=function(t,n){var i,e;switch(t){case"sum":return vi(n);case"avg":return 0===n.length?0:vi(n)/n.length;case"min":return null!==(i=di(n))&&void 0!==i?i:0;case"max":return null!==(e=fi(n))&&void 0!==e?e:0;default:return n.length}},Ry=function(t,n,i,e,r){switch(void 0===r&&(r=1),t){case"percent":return 0===i?0:n/i*100;case"probability":return 0===i?0:n/i;case"density":return e*r===0?0:n/(e*r);case"probability density":return i*e*r===0?0:n/(i*e*r);default:return n}},zy=function(t){var n,i,e=(null===(n=t.line)||void 0===n?void 0:n.dash)||"solid";return"dot"===e||"dash"===e||"dashdot"===e?"dottedLine":(null===(i=t.mode)||void 0===i?void 0:i.includes("markers"))?"circle":"default"},jy=function(t,n,i){var e=[];1===t.length?e.push(t[0].name||""):t.forEach((function(t,n){e.push(t.name||"Series ".concat(n+1))}));var r=t.every((function(t){return!1===t.showlegend})),o=!1===(null==n?void 0:n.showlegend)||!0!==(null==n?void 0:n.showlegend)&&e.length<2;return{legends:e,hideLegend:i||o||r}},$y=function(t,n){if(Il(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Yy=function(t,n,i){if(!Il(t.x)||!Il(t.y))return[];for(var e=[],r=0,o=0;o<t.x.length;o++)(_l(t.x[o])||"function"==typeof n&&_l(n(t.x[o]))||_l(t.y[o])||"function"==typeof i&&_l(i(t.y[o])))&&(o-r>0&&e.push([r,o]),r=o+1);return o-r>0&&e.push([r,o]),e},Xy=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Gy=function(t){return["donut","sankey","pie","annotation","table","gauge","funnel"].includes(t)},Uy=function(t,n){var i={},e={x:null==n?void 0:n.xaxis,y:null==n?void 0:n.yaxis};return Object.keys(e).forEach((function(n){var r=e[n],o=n[0],u="".concat(o,"AxisCategoryOrder"),a=[];if(t.forEach((function(t){var n;null===(n=t[o])||void 0===n||n.forEach((function(t){_l(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||Bl(a)&&!Tl(a)&&!Ol(a))if(!(Il(null==r?void 0:r.categoryarray)&&r.categoryarray.length>0)||(null==r?void 0:r.categoryorder)&&"array"!==r.categoryorder)if((null==r?void 0:r.categoryorder)&&"trace"!==r.categoryorder&&"array"!==r.categoryorder)i[u]=r.categoryorder;else{var l=Array.from(new Set(a));i[u]="reversed"===(null==r?void 0:r.autorange)?l.reverse():l}else i[u]="reversed"===(null==r?void 0:r.autorange)?r.categoryarray.slice().reverse():r.categoryarray;else i[u]="data"})),i},qy=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Zy=function(t){if("string"==typeof t){var n=t.match(qy);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)},Ky=function(t,n,i){var e;"number"==typeof(null==n?void 0:n.bargap)&&(e=n.bargap>=0&&n.bargap<=1?n.bargap:.2);var r=fi(t.map((function(t){return"bar"!==t.type||!Il(t.width)&&"number"!=typeof t.width?[]:t.width})).flat());return"number"==typeof r&&(e=1-r,e=Math.max(0,Math.min(e,1))),void 0===e?{}:i?{maxBarHeight:1e3,yAxisPadding:e}:{barWidth:"auto",maxBarWidth:1e3,xAxisInnerPadding:e,xAxisOuterPadding:e/2}},Jy=function(t,n){var i,e,r,o={},u=im(t,n);return"log"===(null===(i=u.x)||void 0===i?void 0:i.type)&&(o.xScaleType="log"),"log"===(null===(e=u.y)||void 0===e?void 0:e.type)&&(o.yScaleType="log"),"log"===(null===(r=u.y2)||void 0===r?void 0:r.type)&&(o.secondaryYScaleType="log"),o},Qy=function(t,n){var i={},e=im(t,n);return Object.keys(e).forEach((function(n){var r=e[n];if(r){var u=em(t,r);if("x"===n&&"category"===u&&(i.xAxis={tickLayout:"auto"}),r.tickmode&&"array"!==r.tickmode||!Il(r.tickvals))if(r.tickmode&&"linear"!==r.tickmode||!r.dtick)(!r.tickmode||"auto"===r.tickmode)&&"number"==typeof r.nticks&&r.nticks>=0&&("x"===n?i.xAxisTickCount=r.nticks:"y"===n&&(i.yAxisTickCount=r.nticks));else{var a=tm(r.dtick,u),l=nm(r.tick0,u,a);"x"===n?i.xAxis=(0,o.Cl)((0,o.Cl)({},i.xAxis),{tickStep:a,tick0:l}):"y"===n&&(i.yAxis=(0,o.Cl)((0,o.Cl)({},i.yAxis),{tickStep:a,tick0:l}))}else{var s="date"===u?r.tickvals.map((function(t){return new Date(t)})):r.tickvals;"x"===n?(i.tickValues=s,i.xAxis=(0,o.Cl)((0,o.Cl)({},i.xAxis),{tickText:r.ticktext})):"y"===n&&(i.yAxisTickValues=s,i.yAxis=(0,o.Cl)((0,o.Cl)({},i.yAxis),{tickText:r.ticktext}))}}})),i},tm=function(t,n){var i="log"===n,e="date"===n,r="category"===n,o=e?864e5:1;if(!t)return o;if(Vl(t))return(t=Number(t))<=0?o:r?Math.max(1,Math.round(t)):e?Math.max(.1,t):t;if("string"!=typeof t||!e&&!i)return o;var u=t.charAt(0),a=Vl(t.slice(1))?Number(t.slice(1)):0;return a<=0||!(e&&"M"===u&&a===Math.round(a)||i&&"L"===u||i&&"D"===u&&(1===a||2===a))?o:t},nm=function(t,n,i){return"date"===n?Dl(t)?new Date(t):new Date(ps):"D1"!==i&&"D2"!==i?Vl(t)?Number(t):0:void 0},im=function(t,n){var i,e=new Set;t.forEach((function(t){var n=Gl(t);i=n.x,e.add(n.y)}));var r=function(t,i){return(0,o.Cl)((0,o.Cl)({},null==n?void 0:n[Ul(t,i)]),{_id:"".concat(t).concat(i>1?i:"")})},u={};"number"==typeof i&&(u.x=r("x",i));var a=Array.from(e).sort();return a.length>0&&(u.y=r("y",a[0])),a.length>1&&(u.y2=r("y",a[1])),u},em=function(t,n){var i;if(!n)return"category";if(["linear","log","date","category"].includes(null!==(i=n.type)&&void 0!==i?i:""))return n.type;var e=n._id[0],r=[];return t.forEach((function(t){var i=t["".concat(e,"axis")];(i===n._id||!i&&n._id===e)&&Il(t[e])&&t[e].forEach((function(t){_l(t)||r.push(t)}))})),Tl(r)&&!Fl(r)?"linear":Ol(r)?"date":"category"},rm=function(t,n){var i=function(t){var i=n?n(t):new Date(t);return isNaN(i.getTime())?null:i};return function(n){if(_l(n))return null;switch(t){case"linear":case"log":return Vl(n)?+n:null;case"date":return Vl(n)?i(+n):"string"==typeof n?i(n):null;case"category":return"".concat(n);default:return null}}},om={r:"radialAxis",theta:"angularAxis"},um="polar",am=function(t,n){var i=[];return t.forEach((function(t){Il(t[n])&&t[n].forEach((function(t){_l(t)||i.push(t)}))})),i},lm=function(t,n,i){if(["linear","log","date","category"].includes(null!=i?i:""))return i;var e=am(t,n);return Tl(e)&&!Fl(e)?"linear":Ol(e)?"date":"category"},sm=function(t,n,i){var e=function(t,n){var i=(null==t?void 0:t.subplot)||um;return null==n?void 0:n[i]}(t[0],i),r=null==e?void 0:e[om[n].toLowerCase()];return(0,o.Cl)((0,o.Cl)({},r),{_dataKey:n,_type:lm(t,n,null==r?void 0:r.type)})},cm=function(t,n){if("category"!==n._type)return"data";if(Il(n.categoryarray)&&n.categoryarray.length>0&&(!n.categoryorder||"array"===n.categoryorder))return n.categoryarray;if(!n.categoryorder||"trace"===n.categoryorder||"array"===n.categoryorder){var i=am(t,n._dataKey),e=Array.from(new Set(i));return"reversed"===n.autorange?e.reverse():e}return n.categoryorder},dm=function(t){var n,i,e=u.useRef(null),r=u.useRef(void 0),a=u.useState({}),l=a[0],c=a[1];r.current=t.onResize,u.useEffect((function(){var t,n,i=(0,s.z)(e.current);return i&&i.ResizeObserver&&(n=new i.ResizeObserver((function(n){var e,o=n[0].contentRect,u=o.width,a=o.height;t=null==i?void 0:i.requestAnimationFrame((function(){c((function(t){var n=Math.floor(u),i=Math.floor(a);return t.containerWidth===n&&t.containerHeight===i?t:{containerWidth:n,containerHeight:i}}))})),null===(e=r.current)||void 0===e||e.call(r,u,a)})),e.current&&n.observe(e.current)),function(){t&&(null==i||i.cancelAnimationFrame(t)),null==n||n.disconnect()}}),[]);var d=u.useMemo((function(){var n=l.containerWidth,i=l.containerHeight;return"number"==typeof t.aspect&&t.aspect>0&&(n?i=n/t.aspect:i&&(n=i*t.aspect),"number"==typeof t.maxHeight&&i&&i>t.maxHeight&&(i=t.maxHeight)),u.Children.map(t.children,(function(t){var e,r,a,l,s,c,d={root:(0,o.Cl)((0,o.Cl)({},null===(e=t.props.styles)||void 0===e?void 0:e.root),{width:"100%",height:"100%"}),chartWrapper:(0,o.Cl)((0,o.Cl)({},null===(r=t.props.styles)||void 0===r?void 0:r.chartWrapper),{width:"100%"}),chart:(0,o.Cl)((0,o.Cl)({},null===(a=t.props.styles)||void 0===a?void 0:a.chart),{width:"100%"})};return u.cloneElement(t,{width:n,height:i,shouldResize:(null!=n?n:0)+(null!=i?i:0),styles:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t.props.styles),d),{subComponentStyles:(0,o.Cl)((0,o.Cl)({},null===(l=t.props.styles)||void 0===l?void 0:l.subComponentStyles),{cartesianStyles:(0,o.Cl)((0,o.Cl)({},null===(c=null===(s=t.props.styles)||void 0===s?void 0:s.subComponentStyles)||void 0===c?void 0:c.cartesianStyles),d)})})})}))}),[l,t.aspect,t.maxHeight,t.children]);return u.createElement("div",{ref:e,style:{width:null!==(n=t.width)&&void 0!==n?n:"100%",height:null!==(i=t.height)&&void 0!==i?i:"100%",minWidth:t.minWidth,minHeight:t.minHeight,maxHeight:t.maxHeight}},d)};function fm(t){return function(n){var i=n.aspect,e=n.width,r=n.height,a=n.minWidth,l=n.minHeight,s=n.maxHeight,c=n.onResize,d=(0,o.Tt)(n,["aspect","width","height","minWidth","minHeight","maxHeight","onResize"]);return u.createElement(dm,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var vm=u.forwardRef((function(t,n){var i,e,r=t.useUTC,a=void 0===r||r,s=t.yAxisCategoryOrder,c=void 0===s?"default":s,d=t.maxBarHeight,f=void 0===d?24:d,v=(0,o.Tt)(t,["useUTC","yAxisCategoryOrder","maxBarHeight"]),h=u.useRef(24),g=u.useRef(p("callout")),y=u.useRef({}),m=u.useRef(null),b=u.useRef(null),x=u.useRef(null),w=u.useRef(p("Gantt_empty")),M=u.useRef({}),C=u.useRef({}),k=u.useState(""),A=k[0],S=k[1],L=u.useState(!1),V=L[0],D=L[1],N=u.useState(""),O=N[0],T=N[1],E=u.useState(null),F=E[0],B=E[1],P=u.useState(""),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],z=u.useState(""),j=z[0],$=z[1],Y=u.useState((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),X=Y[0],G=Y[1],U=u.useState(),q=U[0],Z=U[1];u.useEffect((function(){var t,n,i;Zs(null===(t=C.current.legendProps)||void 0===t?void 0:t.selectedLegends,null===(n=v.legendProps)||void 0===n?void 0:n.selectedLegends)||G((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),C.current=v}),[v]),u.useImperativeHandle(v.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=b.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return af([{container:null===(n=b.current)||void 0===n?void 0:n.chartContainer}],v.hideLegend||null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[v.hideLegend]);var K=u.useMemo((function(){var t,n;M.current={};var i=0;return null!==(n=null===(t=v.data)||void 0===t?void 0:t.map((function(t){var n,e,r,u,a,l="".concat(t.legend);if(!M.current[l]){var s=t.color?cs(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):ss(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var d=Nc(i,0,null===(r=v.theme)||void 0===r?void 0:r.isInverted);s=(null===(u=t.gradient)||void 0===u?void 0:u[0])||d[0],c=(null===(a=t.gradient)||void 0===a?void 0:a[1])||d[1]}M.current[l]={id:p("legend"),startColor:s,endColor:c},i+=1}var f=M.current[l],h=f.startColor,g=f.endColor;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:h}),v.enableGradient?{gradient:[h,g]}:{})})))&&void 0!==n?n:[]}),[v.data,null===(e=v.theme)||void 0===e?void 0:e.isInverted,v.enableGradient]),J=u.useMemo((function(){return K.length>0?zs(K[0].x.start,!0):ns.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?zs(K[0].y,!1):is.StringAxis}),[K]),tt=u.useMemo((function(){return Gs(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===ns.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=ws(i.x.start,a),r=ws(i.x.end,a);t=Math.min(t,e,r),n=Math.max(n,e,r)})),(0,Yn.c2)(t,n)}}),[a,K,J]),it=u.useCallback((function(){var t={};return K.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(+n.x.end-+n.x.start)})),t}),[K]),et=u.useCallback((function(){var t=it();return Q!==is.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():lc(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a){var l=[];t.forEach((function(t){l.push(t.x.start,t.x.end)}));var s=di(l)||0,c=fi(l)||0;return{dStartValue:r?c:s,dEndValue:r?s:c,rStartValue:n.left,rEndValue:i-n.right}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===ns.DateAxis?(n=(0,Yn.Yn)(t.x.start,v.culture,a,!1,nt),i=(0,Yn.Yn)(t.x.end,v.culture,a,!1,nt)):(n=t.x.start.toString(),i=t.x.end.toString()),"".concat(n," - ").concat(i)}),[v.culture,a,nt,J]),lt=u.useCallback((function(){return v.onRenderCalloutPerDataPoint?v.onRenderCalloutPerDataPoint(q,(function(t){return t?u.createElement(Cc.ChartHoverCard,{XValue:t.yAxisCalloutData||t.y.toString(),Legend:t.legend,YValue:t.xAxisCalloutData||at(t),color:t.color,culture:v.culture}):null})):null}),[at,q,v.culture,v.onRenderCalloutPerDataPoint]),st=u.useCallback((function(t){var n,i=t.xAxisCalloutData||at(t),e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(e,". ")+(t.legend?"".concat(t.legend,", "):"")+"".concat(i,".")}),[at]),ct=u.useCallback((function(){return X.length>0?X:O?[O]:[]}),[O,X]),dt=u.useCallback((function(t){return ct().includes("".concat(t))}),[ct]),ft=u.useCallback((function(){return 0===ct().length}),[ct]),vt=u.useCallback((function(t,n){(ft()||dt(n.legend))&&m.current!==n&&(m.current=n,B(t),D(!0),H(n.legend),S(n.color),R(n.yAxisCalloutData||n.y.toString()),$(n.xAxisCalloutData||at(n)),Z(n))}),[at,dt,ft]),ht=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),pt=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),gt=u.useCallback((function(){}),[]),yt=u.useCallback((function(){m.current=null,B(null),D(!1),H(""),S(""),R(""),$(""),Z(void 0)}),[]),mt=u.useCallback((function(){D(!1)}),[]),bt=u.useCallback((function(t){var n;return n="number"==typeof v.barHeight?v.barHeight:t,"number"==typeof f&&(n=Math.min(n,f)),Math.max(n,1)}),[f,v.barHeight]),xt=u.useCallback((function(){var t=[],n={};K.forEach((function(t){n[t.y]||(n[t.y]=[]),n[t.y].push(t)}));for(var i=rt.length-1;i>=0;i--){var e=rt[i];n[e]&&t.push.apply(t,n[e].sort((function(t,n){return+t.x.start-+n.x.start})))}return t}),[K,rt]),wt=u.useCallback((function(t){var n=t.xScale,i=t.yScalePrimary,e=function(t){var n=M.current["".concat(t)].id;return"".concat(n,"_gradient")},r=[];v.enableGradient&&Object.keys(M.current).forEach((function(t,n){var i=M.current[t],o=i.startColor,a=i.endColor;r.push(u.createElement("linearGradient",{key:n,id:e(t)},u.createElement("stop",{offset:"0",stopColor:o}),u.createElement("stop",{offset:"100%",stopColor:a})))}));var o=0;Q===is.StringAxis&&(o=i.bandwidth(),h.current=bt(o));var a=xt().map((function(t,r){var a=n(t.x.start),l=n(t.x.end),s=i(t.y)+(o-h.current)/2,c=ft()||dt(t.legend);return u.createElement("rect",{key:r,x:Math.min(a,l),y:s,width:Math.max(Math.abs(l-a),2),height:h.current,rx:v.roundCorners?3:0,fill:v.enableGradient?"url(#".concat(e(t.legend),")"):t.color,opacity:c?1:.1,onClick:t.onClick,onMouseOver:function(n){return pt(t,n)},onMouseLeave:gt,onFocus:function(n){return ht(t,n)},onBlur:gt,"data-is-focusable":c,role:"img","aria-label":st(t)})}));return u.createElement("g",null,r.length>0?u.createElement("defs",null,r):null,a)}),[st,bt,xt,dt,ft,ht,pt,gt,Q,v.enableGradient,v.roundCorners]),Mt=u.useCallback((function(t){T(t)}),[]),Ct=u.useCallback((function(){T("")}),[]),kt=u.useCallback((function(t,n,i){var e,r;(null===(e=v.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?G(t):G(t.slice(-1)),(null===(r=v.legendProps)||void 0===r?void 0:r.onChange)&&v.legendProps.onChange(t,n,i)}),[v.legendProps]),At=u.useCallback((function(){var t=[];return Object.keys(M.current).forEach((function(n){var i={title:n,color:M.current[n].startColor,hoverAction:function(){yt(),Mt(n)},onMouseOutAction:function(){Ct()}};t.push(i)})),u.createElement(bf,(0,o.Cl)({legends:t,enabledWrapLines:v.enabledLegendsWrapLines,overflowProps:v.legendsOverflowProps,focusZonePropsInHoverCard:v.focusZonePropsForLegendsInHoverCard,overflowText:v.legendsOverflowText,onChange:kt,ref:x},v.legendProps))}),[yt,Mt,Ct,kt,v.enabledLegendsWrapLines,v.focusZonePropsForLegendsInHoverCard,v.legendProps,v.legendsOverflowProps,v.legendsOverflowText]),St=u.useCallback((function(){return(v.chartTitle?"".concat(v.chartTitle,". "):"")+"Gantt chart with ".concat(K.length," data points. ")}),[K.length,v.chartTitle]),Lt=u.useCallback((function(){return 0===K.length}),[K.length]),Vt=u.useCallback((function(t){var n=8,i=new Set;K.forEach((function(t){i.add(t.y)}));var e=Array.from(i),r=t-(y.current.top+8)-(y.current.bottom+8);return Q!==is.StringAxis&&(h.current=bt(Gh(e,r,tt)),n+=h.current/2),(0,o.Cl)((0,o.Cl)({},y.current),{top:y.current.top+n,bottom:y.current.bottom+n})}),[bt,K,tt,Q]);if(Lt())return u.createElement("div",{id:w.current,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"});h.current=bt(24);var Dt=(0,o.Cl)({isCalloutVisible:V,directionalHint:3,id:"toolTip".concat(g.current),target:F,isBeakVisible:!1,gapSpace:15,color:A,legend:_,XValue:W,YValue:j,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(jv,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:ts.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Dt,tickParams:Nt,legendBars:At(),createYAxis:Ms,getDomainNRangeValues:ot,createStringYAxis:ks,getMinMaxOfYAxis:Is,focusZoneDirection:dc.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Vt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));vm.displayName="GanttChart";var hm=(0,r.I)(vm,(function(t){return{}}));function pm(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}var gm=mm(hl);function ym(t){this._curve=t}function mm(t){function n(n){return new ym(t(n))}return n._curve=t,n}function bm(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(mm(t)):n()._curve},t}function xm(){}function wm(t){this._context=t}function Mm(t){return new wm(t)}ym.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},wm.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Cm=1e-6,km=function(t,n){void 0===n&&(n={});var i="category";return"number"==typeof t[0]?i=n.supportsLog&&"log"===n.scaleType?"log":"linear":t[0]instanceof Date&&(i="date"),i},Am=function(t,n,i){var e;void 0===i&&(i={});var r=ug(n.filter((function(n){return hc(n,t)}))),o=r[0],u=r[1];return"linear"===t&&(o=(e=ug([o,u,0]))[0],u=e[1]),_l(i.rangeStart)||(o=i.rangeStart),_l(i.rangeEnd)||(u=i.rangeEnd),_l(o)||_l(u)?[]:[o,u]},Sm=function(t){return t*Math.PI/180},Lm=function(t,n){return(("clockwise"===n?t:450-t)%360+360)%360},Vm=function(t,n){return"string"==typeof t?t:"radians"===n?"".concat(fl(t/180,6),"π"):"".concat(fl(t,6),"°")},Dm=(0,a.Z)(),Nm=u.forwardRef((function(t,n){var i,e,r,a,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D=u.useRef(null),N=u.useRef(null),O=u.useRef(null),T=u.useState(200),E=T[0],F=T[1],B=u.useState(200),P=B[0],_=B[1],H=u.useState(t.hideLegend?0:32),I=H[0],W=H[1],R=u.useState(!1),z=R[0],j=R[1],$=u.useState(null),Y=$[0],X=$[1],G=u.useState(""),U=G[0],q=G[1],Z=u.useState(""),K=Z[0],J=Z[1],Q=u.useState(""),tt=Q[0],nt=Q[1],it=u.useState(""),et=it[0],rt=it[1],ot=u.useState(""),ut=ot[0],at=ot[1],lt=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),st=lt[0],ct=lt[1],dt=u.useState(""),ft=dt[0],vt=dt[1];u.useImperativeHandle(t.componentRef,(function(){return{chartContainer:D.current,toImage:function(n){var i;return af([{container:D.current}],t.hideLegend||null===(i=N.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),n)}}}),[t.hideLegend]),u.useEffect((function(){if(D.current){var t=D.current.getBoundingClientRect(),n=t.width,i=t.height;F(n),_(i)}}),[D]),u.useEffect((function(){if(t.hideLegend)W(0);else if(O.current){var n=O.current.getBoundingClientRect().height,i=(0,s.z)(O.current),e=(null==i?void 0:i.getComputedStyle(O.current).marginTop)||"0px";W(Math.max(n,32)+parseFloat(e))}}),[t.hideLegend]),u.useEffect((function(){var n;ct((null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)||[])}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]);var ht=u.useMemo((function(){return(0,o.Cl)({left:46,right:46,top:26,bottom:26},t.margins)}),[t.margins]),pt=u.useMemo((function(){return t.width||E}),[t.width,E]),gt=u.useMemo((function(){return(t.height||P)-I}),[t.height,P,I]),yt=u.useMemo((function(){return Math.min(pt-(ht.left+ht.right),gt-(ht.top+ht.bottom))/2}),[pt,gt,ht]),mt=u.useMemo((function(){return Math.max(0,Math.min(Math.abs(t.hole||0),1))*yt}),[t.hole,yt]),bt=u.useRef({}),xt=u.useMemo((function(){bt.current={};var n=0,i=["areapolar","linepolar","scatterpolar"];return t.data.map((function(t){var i=t.color?cs(t.color):ss(n++,0);return t.legend in bt.current||(bt.current[t.legend]=i),(0,o.Cl)((0,o.Cl)({},t),{color:i,data:t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{color:t.color?cs(t.color):i})}))})})).sort((function(t,n){return i.indexOf(t.type)-i.indexOf(n.type)}))}),[t.data]),wt=u.useCallback((function(t){var n={};return xt.forEach((function(i){i.data.forEach((function(i){var e=t?i.theta:i.r;n[e]||(n[e]=[]);var r=t?i.r:i.theta;"number"==typeof r&&n[e].push(r)}))})),n}),[xt]),Mt=u.useCallback((function(){var n;return lc(wt(),null===(n=t.radialAxis)||void 0===n?void 0:n.categoryOrder)}),[wt,null===(r=t.radialAxis)||void 0===r?void 0:r.categoryOrder]),Ct=u.useCallback((function(){var n;return lc(wt(!0),null===(n=t.angularAxis)||void 0===n?void 0:n.categoryOrder)}),[wt,null===(a=t.angularAxis)||void 0===a?void 0:a.categoryOrder]),kt=u.useMemo((function(){return xt.flatMap((function(t){return t.data.map((function(t){return t.r}))}))}),[xt]),At=u.useMemo((function(){var n;return km(kt,{scaleType:null===(n=t.radialAxis)||void 0===n?void 0:n.scaleType,supportsLog:!0})}),[kt,null===(c=t.radialAxis)||void 0===c?void 0:c.scaleType]),St=u.useMemo((function(){var n,i;return"category"===At?Mt():Am(At,kt,{rangeStart:null===(n=t.radialAxis)||void 0===n?void 0:n.rangeStart,rangeEnd:null===(i=t.radialAxis)||void 0===i?void 0:i.rangeEnd})}),[Mt,At,kt,null===(d=t.radialAxis)||void 0===d?void 0:d.rangeStart,null===(f=t.radialAxis)||void 0===f?void 0:f.rangeEnd]),Lt=u.useMemo((function(){var n,i,e,r,o,u;return function(t,n,i,e){var r,o,u;if(void 0===e&&(e={}),"category"===t){var a=Tu().domain(n).range(i).paddingInner(1),l=Array.isArray(e.tickValues)?e.tickValues:n;return{scale:a,tickValues:l,tickLabels:l.map((function(t,n){return Array.isArray(e.tickValues)&&Array.isArray(e.tickText)&&!_l(e.tickText[n])?e.tickText[n]:t}))}}(u="date"===t?e.useUTC?Au():ku():"log"===t?ta():Gu()).domain(n),u.range(i),u.nice();var s,c=null!==(r=e.tickCount)&&void 0!==r?r:4,d=Array.isArray(e.tickValues)?e.tickValues:void 0;if("date"===t){var f=100,v=-1;u.ticks().forEach((function(t){var n=ws(t,e.useUTC);n>v&&(v=n),n<f&&(f=n)}));var h=null!==(o=e.dateLocalizeOptions)&&void 0!==o?o:(0,Yn.c2)(f,v);s=function(t,n){return Array.isArray(e.tickValues)&&Array.isArray(e.tickText)&&!_l(e.tickText[n])?e.tickText[n]:_l(e.culture)&&"string"==typeof e.tickFormat?e.useUTC?Ge(e.tickFormat)(t):Xe(e.tickFormat)(t):(0,Yn.Yn)(t,e.culture,e.useUTC,!1,h)},e.tickStep&&(d=xc(e.tickStep,e.tick0,u.domain(),e.useUTC))}else{var p=u.tickFormat(c);s=function(t,n){if(Array.isArray(e.tickValues)&&Array.isArray(e.tickText)&&!_l(e.tickText[n]))return e.tickText[n];if("string"==typeof e.tickFormat)return ju(e.tickFormat)(t);var i="number"==typeof t?t:t.valueOf();return""===p(i)?"":(0,Yn.c$)(i,e.culture)},e.tickStep&&(d=bc(t,e.tickStep,e.tick0,u.domain()))}var g=null!=d?d:u.ticks(c);return{scale:u,tickValues:g,tickLabels:g.map(s)}}(At,St,[mt,yt],{useUTC:t.useUTC,tickCount:null===(n=t.radialAxis)||void 0===n?void 0:n.tickCount,tickValues:null===(i=t.radialAxis)||void 0===i?void 0:i.tickValues,tickText:null===(e=t.radialAxis)||void 0===e?void 0:e.tickText,tickFormat:null===(r=t.radialAxis)||void 0===r?void 0:r.tickFormat,culture:t.culture,tickStep:null===(o=t.radialAxis)||void 0===o?void 0:o.tickStep,tick0:null===(u=t.radialAxis)||void 0===u?void 0:u.tick0,dateLocalizeOptions:t.dateLocalizeOptions})}),[At,St,mt,yt,t.culture,t.dateLocalizeOptions,null===(v=t.radialAxis)||void 0===v?void 0:v.tick0,null===(h=t.radialAxis)||void 0===h?void 0:h.tickCount,null===(p=t.radialAxis)||void 0===p?void 0:p.tickFormat,null===(g=t.radialAxis)||void 0===g?void 0:g.tickStep,null===(y=t.radialAxis)||void 0===y?void 0:y.tickText,null===(m=t.radialAxis)||void 0===m?void 0:m.tickValues,t.useUTC]),Vt=Lt.scale,Dt=Lt.tickValues,Nt=Lt.tickLabels,Ot=u.useMemo((function(){return xt.flatMap((function(t){return t.data.map((function(t){return t.theta}))}))}),[xt]),Tt=u.useMemo((function(){var n;return km(Ot,{scaleType:null===(n=t.angularAxis)||void 0===n?void 0:n.scaleType})}),[Ot,null===(b=t.angularAxis)||void 0===b?void 0:b.scaleType]),Et=u.useMemo((function(){return"category"===Tt?Ct():Am(Tt,Ot)}),[Ct,Tt,Ot]),Ft=u.useMemo((function(){var n,i,e,r,o,u,a;return function(t,n,i){var e,r;if(void 0===i&&(i={}),"category"===t){var o={};n.forEach((function(t,n){o[t]=n}));var u=360/n.length,a=Array.isArray(i.tickValues)?i.tickValues:n;return{scale:function(t){return Sm(Lm(o[t]*u,i.direction))},tickValues:a,tickLabels:a.map((function(t,n){return Array.isArray(i.tickValues)&&Array.isArray(i.tickText)&&!_l(i.tickText[n])?i.tickText[n]:t}))}}var l=Array.isArray(i.tickValues)?i.tickValues:void 0;i.tickStep&&(l=null===(e=bc(t,i.tickStep,i.tick0,[0,("radians"===i.unit?2*Math.PI:360)-Cm]))||void 0===e?void 0:e.map((function(t){return"radians"===i.unit?180*t/Math.PI:t})));var s=null!=l?l:Su(0,360,360/(null!==(r=i.tickCount)&&void 0!==r?r:8));return{scale:function(t){return Sm(Lm(t,i.direction))},tickValues:s,tickLabels:s.map((function(t,n){return Array.isArray(i.tickValues)&&Array.isArray(i.tickText)&&!_l(i.tickText[n])?i.tickText[n]:"string"==typeof i.tickFormat?ju(i.tickFormat)(t):Vm(t,i.unit)}))}}(Tt,Et,{tickCount:null===(n=t.angularAxis)||void 0===n?void 0:n.tickCount,tickValues:null===(i=t.angularAxis)||void 0===i?void 0:i.tickValues,tickText:null===(e=t.angularAxis)||void 0===e?void 0:e.tickText,tickFormat:null===(r=t.angularAxis)||void 0===r?void 0:r.tickFormat,culture:t.culture,tickStep:null===(o=t.angularAxis)||void 0===o?void 0:o.tickStep,tick0:null===(u=t.angularAxis)||void 0===u?void 0:u.tick0,direction:t.direction,unit:null===(a=t.angularAxis)||void 0===a?void 0:a.unit})}),[Tt,Et,null===(x=t.angularAxis)||void 0===x?void 0:x.tick0,null===(w=t.angularAxis)||void 0===w?void 0:w.tickCount,null===(M=t.angularAxis)||void 0===M?void 0:M.tickFormat,null===(C=t.angularAxis)||void 0===C?void 0:C.tickStep,null===(k=t.angularAxis)||void 0===k?void 0:k.tickText,null===(A=t.angularAxis)||void 0===A?void 0:A.tickValues,null===(S=t.angularAxis)||void 0===S?void 0:S.unit,t.culture,t.direction]),Bt=Ft.scale,Pt=Ft.tickValues,_t=Ft.tickLabels,Ht=u.useMemo((function(){return Dm(t.styles,{theme:t.theme})}),[t.styles,t.theme]),It=u.useCallback((function(){var n=[],i=Vt.domain();return mt>0&&i[0]!==Dt[0]&&n.push(i[0]),n.push.apply(n,Dt),i[i.length-1]!==Dt[Dt.length-1]&&n.push(i[i.length-1]),u.createElement("g",null,u.createElement("g",null,n.map((function(i,e){var r=e===n.length-1?Ht.gridLineOuter:Ht.gridLineInner;if("polygon"===t.shape){var o="";return Pt.forEach((function(t,n){var e=pm(Bt(t),Vt(i));o+=(0===n?"M":"L")+e.join(",")+" "})),o+="Z",u.createElement("path",{key:e,d:o,className:r})}return u.createElement("circle",{key:e,cx:0,cy:0,r:Vt(i),className:r})}))),u.createElement("g",null,Pt.map((function(t,n){var i=pm(Bt(t),mt),e=pm(Bt(t),yt);return u.createElement("path",{key:n,d:"M".concat(i.join(",")," L").concat(e.join(",")),className:Ht.gridLineInner})}))))}),[mt,yt,Dt,Pt,Vt,Bt,t.shape,Ht.gridLineInner,Ht.gridLineOuter]),Wt=u.useCallback((function(){var n="clockwise"===t.direction?0:Math.PI/2,i=pm(n,mt),e=pm(n,yt),r=n>Cm&&n-Math.PI<Cm?1:-1;return u.createElement("g",null,u.createElement("g",null,u.createElement("path",{d:"M".concat(i.join(",")," L").concat(e.join(",")),className:Ht.gridLineOuter}),Dt.map((function(t,i){var e=pm(n,Vt(t)),o=e[0],a=e[1];return u.createElement("g",{key:i},u.createElement("path",{d:"M".concat(o,",").concat(a," L").concat(o+6*Math.cos(n)*r,",").concat(a+6*Math.sin(n)*r),className:Ht.gridLineOuter}),u.createElement("text",{x:o+16*Math.cos(n)*r,y:a+16*Math.sin(n)*r,textAnchor:Math.abs(n-Math.PI/2)<Cm||Math.abs(n-3*Math.PI/2)<Cm?"middle":n>Cm&&n-Math.PI/2<-Cm||n-Math.PI>Cm&&n-3*Math.PI/2<-Cm?"start":"end",dominantBaseline:"middle","aria-hidden":!0,className:Ht.tickLabel},Nt[i]))}))),u.createElement("g",null,Pt.map((function(t,n){var i=Bt(t),e=pm(i,yt+10),r=e[0],o=e[1];return u.createElement("text",{key:n,x:r,y:o,textAnchor:Math.abs(i)<Cm||Math.abs(i-Math.PI)<Cm?"middle":i>Math.PI?"end":"start",dominantBaseline:"middle","aria-hidden":!0,className:Ht.tickLabel},_t[n])}))))}),[Dt,Pt,Vt,Bt,yt,Ht.gridLineOuter,Ht.tickLabel,_t,mt,Nt,t.direction]),Rt=u.useCallback((function(){return st.length>0?st:ut?[ut]:[]}),[st,ut]),zt=u.useCallback((function(t){var n=Rt();return n.includes(t)||0===n.length}),[Rt]),jt=u.useCallback((function(t){var n,i,e,r,o,a,l,s=(i=Ah().curve(gm),e=i.curve,r=i.lineX0,o=i.lineX1,a=i.lineY0,l=i.lineY1,i.angle=i.x,delete i.x,i.startAngle=i.x0,delete i.x0,i.endAngle=i.x1,delete i.x1,i.radius=i.y,delete i.y,i.innerRadius=i.y0,delete i.y0,i.outerRadius=i.y1,delete i.y1,i.lineStartAngle=function(){return bm(r())},delete i.lineX0,i.lineEndAngle=function(){return bm(o())},delete i.lineX1,i.lineInnerRadius=function(){return bm(a())},delete i.lineY0,i.lineOuterRadius=function(){return bm(l())},delete i.lineY1,i.curve=function(t){return arguments.length?e(mm(t)):e()._curve},i).angle((function(t){return Bt(t.theta)})).innerRadius(mt).outerRadius((function(t){return Vt(t.r)})).curve(uc(null===(n=t.lineOptions)||void 0===n?void 0:n.curve,Mm)).defined((function(t){return pc(Bt(t.theta),Vt(t.r))})),c=zt(t.legend);return u.createElement("path",{d:s(t.data),fill:t.color,fillOpacity:c?.7:.1,pointerEvents:"none"})}),[mt,Vt,Bt,zt]),$t=u.useCallback((function(t){var n,i,e,r,o,a,l=bm(Cv().curve(gm)).angle((function(t){return Bt(t.theta)})).radius((function(t){return Vt(t.r)})).curve(uc(null===(n=t.lineOptions)||void 0===n?void 0:n.curve)).defined((function(t){return pc(Bt(t.theta),Vt(t.r))}));return u.createElement("path",{d:l(t.data),fill:"none",stroke:t.color,strokeOpacity:zt(t.legend)?1:.1,strokeWidth:null!==(e=null===(i=t.lineOptions)||void 0===i?void 0:i.strokeWidth)&&void 0!==e?e:3,strokeDasharray:null===(r=t.lineOptions)||void 0===r?void 0:r.strokeDasharray,strokeDashoffset:null===(o=t.lineOptions)||void 0===o?void 0:o.strokeDashoffset,strokeLinecap:null===(a=t.lineOptions)||void 0===a?void 0:a.strokeLinecap,pointerEvents:"none"})}),[Vt,Bt,zt]),Yt=u.useMemo((function(){return ug(xt.flatMap((function(t){return t.data.map((function(t){return t.markerSize}))})))}),[xt]),Xt=Yt[0],Gt=Yt[1],Ut=u.useCallback((function(n,i,e,r){var o,u,a;X(n.currentTarget),j(zt(r)),q(null!==(o=i.angularAxisCalloutData)&&void 0!==o?o:Vm(i.theta,null===(u=t.angularAxis)||void 0===u?void 0:u.unit)),J(r),nt(i.color),rt(null!==(a=i.radialAxisCalloutData)&&void 0!==a?a:(0,Yn.c$)(i.r,t.culture,t.useUTC)),vt(e)}),[zt,null===(L=t.angularAxis)||void 0===L?void 0:L.unit,t.culture,t.useUTC]),qt=u.useCallback((function(){j(!1),vt("")}),[]),Zt=u.useMemo((function(){return 0===xt.filter((function(t){return"areapolar"===t.type||"linepolar"===t.type})).length}),[xt]),Kt=u.useCallback((function(n,i){var e=zt(n.legend);return u.createElement("g",null,n.data.map((function(r,o){var a,l;if(!pc(Bt(r.theta),Vt(r.r)))return null;var s=pm(Bt(r.theta),Vt(r.r)),c=s[0],d=s[1],f="".concat(i,"-").concat(o),v=ft===f,h=Zt?4:2,p=h;void 0!==r.markerSize&&Xt!==Gt&&(p=h+(r.markerSize-Xt)/(Gt-Xt)*(16-h));var g=r.radialAxisCalloutData||(0,Yn.c$)(r.r,t.culture,t.useUTC),y=n.legend,m=r.angularAxisCalloutData||Vm(r.theta,null===(a=t.angularAxis)||void 0===a?void 0:a.unit),b=(null===(l=r.callOutAccessibilityData)||void 0===l?void 0:l.ariaLabel)||"".concat(g,". ").concat(y,", ").concat(m,".");return u.createElement("circle",{key:o,cx:c,cy:d,r:p,fill:v?t.theme.semanticColors.bodyBackground:r.color,stroke:v?r.color:"none",strokeWidth:v?2:0,opacity:e?1:.1,"data-is-focusable":e?0:-1,onMouseOver:function(t){return Ut(t,r,f,n.legend)},onFocus:function(t){return Ut(t,r,f,n.legend)},role:"img","aria-label":b})})))}),[zt,Vt,Bt,ft,Ut,Xt,Gt,Zt,null===(V=t.angularAxis)||void 0===V?void 0:V.unit,t.culture,t.useUTC,t.theme]),Jt=u.useCallback((function(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?ct(n):ct(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}),[t.legendProps]),Qt=u.useCallback((function(){if(t.hideLegend)return null;var n=Object.keys(bt.current).map((function(t){return{title:t,color:bt.current[t],hoverAction:function(){at(t)},onMouseOutAction:function(){at("")}}}));return u.createElement("div",{ref:O,className:Ht.legendContainer},u.createElement(bf,(0,o.Cl)({legends:n,centerLegends:!0,onChange:Jt,ref:N},t.legendProps)))}),[t.hideLegend,t.legendProps,N,Jt,Ht.legendContainer]);return u.createElement("div",{className:Ht.root,ref:D,onMouseLeave:qt,onBlur:qt},u.createElement(td,{direction:dc.horizontal,className:Ht.chartWrapper},u.createElement("svg",{className:Ht.chart,width:pt,height:gt,role:"region","aria-label":(t.chartTitle?"".concat(t.chartTitle,". "):"")+"Polar chart with ".concat(xt.length," data series.")},u.createElement("g",{transform:"translate(".concat(pt/2,", ").concat(gt/2,")")},It(),u.createElement("g",null,xt.map((function(t,n){return u.createElement("g",{key:n,role:"region","aria-label":"".concat(t.legend,", series ").concat(n+1," of ").concat(xt.length," with ").concat(t.data.length," data points.")},"areapolar"===t.type&&jt(t),("areapolar"===t.type||"linepolar"===t.type)&&$t(t),Kt(t,n))}))),Wt()))),Qt(),!t.hideTooltip&&u.createElement($n,(0,o.Cl)({hidden:!z,target:Y,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:qt},t.calloutProps),u.createElement(Cc.ChartHoverCard,{XValue:U,Legend:K,color:tt,YValue:et,culture:t.culture})))}));Nm.displayName="PolarChart";var Om=function(t){return{fill:"none",stroke:t.palette.neutralPrimary,strokeWidth:"1px"}},Tm=(0,r.I)(Nm,(function(t){var n=t.theme;return{root:(0,o.Cl)((0,o.Cl)({},n.fonts.medium),{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",textAlign:"left"}),chart:{display:"block"},gridLineInner:[{opacity:.2},Om(n)],gridLineOuter:[{opacity:1},Om(n)],tickLabel:{fontSize:It.s.mini,fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary},legendContainer:{width:"100%"}}})),Em=fm(bv),Fm=fm(ep),Bm=fm(ch),Pm=fm(gg),_m=fm(Dh),Hm=fm(dp),Im=fm(zp),Wm=fm(Vg),Rm=fm(ap),zm=fm(tp),jm=fm(vh),$m=fm(vg),Ym=fm(hm),Xm=fm(Tm),Gm=function(t){var n=t.data[0].x,i=El(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:sy(t.x)})}))),{data:e,layout:t.layout}},Um={annotation:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g=null!==(o=Ny(t.layout,t.data,n))&&void 0!==o?o:[],y=ny(t.layout).chartTitle||void 0,m=t.layout;return{annotations:g,chartTitle:y,description:"string"==typeof(null===(u=null==m?void 0:m.meta)||void 0===u?void 0:u.description)?m.meta.description:void 0,width:"number"==typeof(null===(a=t.layout)||void 0===a?void 0:a.width)?t.layout.width:void 0,height:"number"==typeof(null===(l=t.layout)||void 0===l?void 0:l.height)?t.layout.height:void 0,paperBackgroundColor:"string"==typeof(null===(s=t.layout)||void 0===s?void 0:s.paper_bgcolor)?t.layout.paper_bgcolor:void 0,plotBackgroundColor:"string"==typeof(null===(c=t.layout)||void 0===c?void 0:c.plot_bgcolor)?t.layout.plot_bgcolor:void 0,fontColor:"string"==typeof(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.color)?t.layout.font.color:void 0,fontFamily:"string"==typeof(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.family)?t.layout.font.family:void 0,margin:null===(p=t.layout)||void 0===p?void 0:p.margin}},renderer:Tg},donut:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=t.data[0],M=Ug(null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null!==(f=null===(d=t.layout)||void 0===d?void 0:d.piecolorway)&&void 0!==f?f:null===(v=null==w?void 0:w.marker)||void 0===v?void 0:v.colors,i,r,!0),C={};if(i.current.clear(),w.labels&&w.values){var k=(null===(h=w.marker)||void 0===h?void 0:h.colors)||void 0,A=Array.isArray(k)&&k.length>=w.labels.length,S=w.labels.map((function(t,n){return{label:t,value:$y(w.values,n),index:n,color:A?k[n]:void 0}})).filter((function(t){return!_l(t.value)}));S.sort((function(t,n){return n.value-t.value})),S.forEach((function(n,e){var o,u,a,l,s,c,d="".concat(n.label),f=null!==(o=n.color)&&void 0!==o?o:qg(M,e,d,i,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);C[d]?C[d].data+=n.value:C[d]={legend:d,data:n.value,color:f}}))}var L=null!==(g=null===(p=t.layout)||void 0===p?void 0:p.width)&&void 0!==g?g:440,V=null!==(m=null===(y=t.layout)||void 0===y?void 0:y.height)&&void 0!==m?m:220,D=!!w.textinfo&&!["value","percent","label+percent"].includes(w.textinfo),N=D?0:80,O=40+(D?0:40),T=w.hole?w.hole*(Math.min(L-N,V-O)/2):1,E=ny(t.layout),F=E.chartTitle,B=E.titleStyles,P=Object.keys(C),_=P.length>1?(0,o.fX)([[P[0],C[P[0]]]],P.slice(1).reverse().map((function(t){return[t,C[t]]})),!0):P.map((function(t){return[t,C[t]]}));return(0,o.Cl)({data:{chartTitle:F,chartData:_.map((function(t){return t[1]}))},hideLegend:n||!1===(null===(b=t.layout)||void 0===b?void 0:b.showlegend),width:null===(x=t.layout)||void 0===x?void 0:x.width,height:V,innerRadius:T,hideLabels:D,showLabelsInPercent:!w.textinfo||["percent","label+percent","percent+label"].includes(w.textinfo),roundCorners:!0,order:"sorted"},B?{titleStyles:B}:{})},renderer:Em},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=t.data[0],M=w.link,C=w.node,k=(null!==(u=null==M?void 0:M.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return _l(t)||_l(null===(i=null==M?void 0:M.source)||void 0===i?void 0:i[n])||_l(null===(e=null==M?void 0:M.target)||void 0===e?void 0:e[n])?null:{value:t,source:null==M?void 0:M.source[n],target:null==M?void 0:M.target[n]}})).filter((function(t){return null!==t&&t.source>=0&&t.target>=0&&t.source!==t.target})),A=Ug(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null==C?void 0:C.color,i,r),S=Ug(null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,e,null==M?void 0:M.color,i,r),L={nodes:null===(v=C.label)||void 0===v?void 0:v.map((function(n,e){var o,u,a;return{nodeId:e,name:n,color:qg(A,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r)}})),links:k.map((function(n,e){var u,a,l,s=qg(S,e,n.target,i,null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,r);return(0,o.Cl)((0,o.Cl)({},n),{color:s})}))},V={root:(0,o.Cl)({},(null===(p=null===(h=t.layout)||void 0===h?void 0:h.font)||void 0===p?void 0:p.size)?{fontSize:null===(g=t.layout.font)||void 0===g?void 0:g.size}:{})},D=ny(t.layout),N=D.chartTitle,O=D.titleStyles;return(0,o.Cl)({data:{chartTitle:N,SankeyChartData:L},width:null===(y=t.layout)||void 0===y?void 0:y.width,height:null!==(b=null===(m=t.layout)||void 0===m?void 0:m.height)&&void 0!==b?b:468,styles:V,enableReflow:!1,hideLegend:n||!1===(null===(x=t.layout)||void 0===x?void 0:x.showlegend)},O?{titleStyles:O}:{})},renderer:Im},table:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O=t.data[0],T=null!==(a=null===(u=O.cells)||void 0===u?void 0:u.values)&&void 0!==a?a:[],E=function(t,n){var i,e,r,u,a,l,s,c,d,f;return{values:null!==(e=null!==(i=null==t?void 0:t.values)&&void 0!==i?i:null==n?void 0:n.values)&&void 0!==e?e:[],align:null!==(r=null==t?void 0:t.align)&&void 0!==r?r:null==n?void 0:n.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(u=null==n?void 0:n.fill)&&void 0!==u?u:{}),null!==(a=null==t?void 0:t.fill)&&void 0!==a?a:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(l=null==n?void 0:n.font)&&void 0!==l?l:{}),null!==(s=null==t?void 0:t.font)&&void 0!==s?s:{}),format:null!==(c=null==t?void 0:t.format)&&void 0!==c?c:null==n?void 0:n.format,prefix:null!==(d=null==t?void 0:t.prefix)&&void 0!==d?d:null==n?void 0:n.prefix,suffix:null!==(f=null==t?void 0:t.suffix)&&void 0!==f?f:null==n?void 0:n.suffix}}(O.cells,null===(f=null===(d=null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.data)||void 0===c?void 0:c.table)||void 0===d?void 0:d[0])||void 0===f?void 0:f.cells),F=T[0].map((function(t,n){return T.map((function(t,i){var e,r,u,a=t[n],l="string"==typeof a?Ey(a):a,s="string"==typeof l||"number"==typeof l?function(t,n,i){if(null===t||"boolean"==typeof t)return t;var e=Array.isArray(i.format)?i.format[n]:i.format,r=Array.isArray(i.prefix)?i.prefix[n]:i.prefix,o=Array.isArray(i.suffix)?i.suffix[n]:i.suffix,u=t;if("number"==typeof t)if("string"==typeof e)try{u=ju(e)(t)}catch(n){u=Ys(t)}else u=Ys(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(l,i,E):l,c=Fy(null===(e=null==E?void 0:E.font)||void 0===e?void 0:e.color,n,i),d=Fy(null===(r=null==E?void 0:E.font)||void 0===r?void 0:r.size,n,i),f=Fy(null===(u=null==E?void 0:E.fill)||void 0===u?void 0:u.color,n,i),v=Fy(null==E?void 0:E.align,n,i);return{value:s,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},c?{color:c}:{}),"number"==typeof d?{fontSize:d}:{}),f?{backgroundColor:f}:{}),v?{textAlign:v}:{})}}))})),B={root:(0,o.Cl)({},(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.size)?{fontSize:t.layout.font.size}:{})},P=null===(b=null===(m=null===(y=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.data)||void 0===y?void 0:y.table)||void 0===m?void 0:m[0])||void 0===b?void 0:b.header,_=O.header,H={align:null!==(x=null==_?void 0:_.align)&&void 0!==x?x:null==P?void 0:P.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(w=null==P?void 0:P.fill)&&void 0!==w?w:{}),null!==(M=null==_?void 0:_.fill)&&void 0!==M?M:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(C=null==P?void 0:P.font)&&void 0!==C?C:{}),null!==(k=null==_?void 0:_.font)&&void 0!==k?k:{}),values:null!==(S=null!==(A=null==_?void 0:_.values)&&void 0!==A?A:null==P?void 0:P.values)&&void 0!==S?S:[]},I=ny(t.layout),W=I.chartTitle,R=I.titleStyles;return(0,o.Cl)({headers:function(t,n){return(Array.isArray(t[0])?t.map((function(t){return t.map((function(t){return Ey(t)})).filter(Boolean).join(" ")})):t.map((function(t){return Ey(t)}))).map((function(t,i){var e,r,u,a=Fy(null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.color,0,i),l=Fy(null===(r=null==n?void 0:n.font)||void 0===r?void 0:r.size,0,i),s=Fy(null===(u=null==n?void 0:n.fill)||void 0===u?void 0:u.color,0,i),c=Fy(null==n?void 0:n.align,0,i);return{value:t,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},"string"==typeof a?{color:a}:{}),"number"==typeof l?{fontSize:l}:{}),"string"==typeof s?{backgroundColor:s}:{}),c?{textAlign:c}:{})}}))}(null!==(V=null===(L=O.header)||void 0===L?void 0:L.values)&&void 0!==V?V:[],H),rows:F,width:null===(D=t.layout)||void 0===D?void 0:D.width,height:null===(N=t.layout)||void 0===N?void 0:N.height,styles:B,chartTitle:W},R?{titleStyles:R}:{})},renderer:$m},horizontalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M=jy(t.data,t.layout,n),C=M.legends,k=M.hideLegend,A=void 0,S=t.data.map((function(n,u){var a,l,s,c;A=Kg(t.layout,n,A);var d=Ug(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null===(c=n.marker)||void 0===c?void 0:c.color,i,r),f=C[u];return n.y.map((function(e,u){var a,l,s,c,v,h,p,g,y,m;if(_l(e))return null;var b=A?A(Il(null===(a=n.marker)||void 0===a?void 0:a.color)?null===(s=null===(l=n.marker)||void 0===l?void 0:l.color)||void 0===s?void 0:s[u%(null===(c=n.marker)||void 0===c?void 0:c.color).length]:0):qg(d,u,f,i,null===(p=null===(h=null===(v=t.layout)||void 0===v?void 0:v.template)||void 0===h?void 0:h.layout)||void 0===p?void 0:p.colorway,r),x=Zg(n,u);return(0,o.Cl)({x:_l(null===(g=n.x)||void 0===g?void 0:g[u])?0:n.x[u],y:e,legend:f,color:null!==(y=Po(b).copy({opacity:x}).formatHex8())&&void 0!==y?y:b},(null===(m=n.text)||void 0===m?void 0:m[u])?{barLabel:n.text[u].toString()}:{})})).filter((function(t){return null!==t}))})).flat(),L=null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:450,V=L-(null!==(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.margin)||void 0===s?void 0:s.l)&&void 0!==c?c:0)-(null!==(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.margin)||void 0===f?void 0:f.pad)&&void 0!==v?v:0),D=new Set(S.map((function(t){return t.y}))).size||1,N=V/(D*(1+1/(1+.01*D)));return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:S,secondaryYAxistitle:"string"==typeof(null===(p=null===(h=t.layout)||void 0===h?void 0:h.yaxis2)||void 0===p?void 0:p.title)?null===(y=null===(g=t.layout)||void 0===g?void 0:g.yaxis2)||void 0===y?void 0:y.title:(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.yaxis2)||void 0===b?void 0:b.title)||void 0===x?void 0:x.text)||"",barHeight:N,showYAxisLables:!0,height:L,width:null===(w=t.layout)||void 0===w?void 0:w.width,hideTickOverlap:!0,hideLegend:k,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,roundedTicks:!0},oy(t.data[0],t.layout)),ny(t.layout)),Uy(t.data,t.layout)),Ky(t.data,t.layout,!0)),Qy(t.data,t.layout))},renderer:Pm},groupedverticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s=(0,o.Cl)({},t);if(t.data.some((function(t){return"bar"===t.type&&Pl(t.y)}))){var c=t.data.map((function(t,n){return"bar"===t.type&&Pl(t.y)?function(t,n){if(!t||0===t.length)return{traces:[],x:[]};var i=n&&n.length===t.length?n:t.map((function(t,n){return"Item ".concat(n+1)})),e=t.map((function(t,n){var e;if("object"==typeof t&&null!==t){var r=py(t),o={};return Object.keys(r).forEach((function(t){var n=r[t];!function(t){var n=t.toLowerCase();return!(!n.includes("style")&&"style"!==n&&!new RegExp("^(color|fill|stroke|border|background|font|shadow|outline|margin|padding|gap|align|justify|display|flex|grid|text|line|letter|word|vertical|horizontal|overflow|position|top|right|bottom|left|zindex|z-index|opacity|filter|clip|cursor|resize|transition|animation|transform|box|column|row|direction|visibility|content|width|height|aspect|image|user|pointer|caret|scroll|%)|(-webkit-|-moz-|-ms-|-o-)","i").test(n))}(t)&&("number"==typeof n||"string"==typeof n&&Vl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&Vl(t)?((e={})[i[n]||"item_".concat(n)]=t,e):{}})),r=new Set;e.forEach((function(t){Object.keys(t).forEach((function(t){return r.add(t)}))}));var o=[];return r.forEach((function(t){var n=[],r=!1,u=!1;if(e.forEach((function(i,e){var o=i[t];"number"==typeof o?(n.push(o),r=!0,u=!0):"string"==typeof o&&Vl(o)&&(n.push(parseFloat(o)),r=!0,u=!0)})),r&&u){var a={type:"bar",name:t,x:i,y:n};o.push(a)}})),{traces:o,x:i}}(t.y,Array.isArray(t.x)?t.x:void 0).traces.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{marker:t.marker})})):[t]})).flat();s=(0,o.Cl)((0,o.Cl)({},t),{data:c})}var d=[],f=dy(s.data,s.layout),v=jy(s.data,s.layout,n),h=v.legends,p=v.hideLegend,g=void 0,y=ey(s.data[0],s.layout);s.data.forEach((function(t,n){var u,a,l,c,f,v,p,m,b,x,w;g=Kg(s.layout,t,g);var M=h[n],C=zy(t);if("bar"===t.type){var k=Ug(null===(l=null===(a=null===(u=s.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(c=t.marker)||void 0===c?void 0:c.color,i,r);d.push({type:"bar",legend:M,key:M,data:t.x.map((function(n,e){var u,a,l,c,d,f,v,h,p;if(!_l(n)&&!_l(null===(u=t.y)||void 0===u?void 0:u[e])){var m=g?g(Il(null===(a=t.marker)||void 0===a?void 0:a.color)?null===(c=null===(l=t.marker)||void 0===l?void 0:l.color)||void 0===c?void 0:c[e%(null===(d=t.marker)||void 0===d?void 0:d.color).length]:0):qg(k,e,M,i,null===(h=null===(v=null===(f=s.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r),b=Zg(t,e),x=t.y[e],w=Array.isArray(t.text)?t.text[e]:t.text;return w&&t.texttemplate&&(w=vy(w,t.texttemplate,e)),(0,o.Cl)({x:n.toString(),y:x,yAxisCalloutData:ly(x,y),color:null!==(p=Po(m).copy({opacity:b}).formatHex8())&&void 0!==p?p:m},w?{barLabel:String(w)}:{})}})).filter((function(t){return void 0!==t})),useSecondaryYScale:cy(t,s.layout)})}else if("scatter"===t.type){var A=Ug(null===(p=null===(v=null===(f=s.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===p?void 0:p.colorway,e,null===(m=t.line)||void 0===m?void 0:m.color,i,r),S=qg(A,n,M,i,null===(w=null===(x=null===(b=s.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,r),L=By(t.line),V=Zg(t,n);Yy(t).forEach((function(n){var i,e=n[0],r=n[1],u=t.x.slice(e,r),a=t.y.slice(e,r);d.push({type:"line",legend:M,legendShape:C,data:u.map((function(t,n){var i=a[n];return{x:t.toString(),y:i,yAxisCalloutData:ly(i,y)}})),color:null!==(i=Po(S).copy({opacity:V}).formatHex8())&&void 0!==i?i:S,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=L?L:{}),{mode:t.mode}),useSecondaryYScale:cy(t,s.layout)})}))}}));var m=Ny(s.layout,s.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({dataV2:d,width:null===(u=s.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=s.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,barwidth:"auto",mode:"plotly"},f),{hideTickOverlap:!0,hideLegend:p,roundCorners:!0,roundedTicks:!0,showYAxisLables:!0}),oy(s.data[0],s.layout)),ny(s.layout)),Uy(s.data,s.layout)),ry(s.data[0],s.layout)),iy(s.data[0],s.layout)),y),Ky(s.data,s.layout)),Qy(s.data,s.layout)),m?{annotations:m}:{})},renderer:Rm},verticalstackedbar:{transformer:Oy,renderer:Fm},heatmap:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z=t.data[0],j=[],$=Number.POSITIVE_INFINITY,Y=Number.NEGATIVE_INFINITY,X=[],G=null===(u=t.layout)||void 0===u?void 0:u.annotations;if(G){var U=Array.isArray(G)?G:[G],q=new Set,Z=new Set,K=[];if(U.forEach((function(t){!t||"number"!=typeof t.x||"number"!=typeof t.y||"string"!=typeof t.text||"x"!==t.xref&&void 0!==t.xref||"y"!==t.yref&&void 0!==t.yref||(q.add(t.x),Z.add(t.y),K.push({x:t.x,y:t.y,text:Ey(t.text)}))})),K.length>0){var J=Array.from(q).sort((function(t,n){return t-n})),Q=Array.from(Z).sort((function(t,n){return t-n}));K.forEach((function(t){var n=J.indexOf(t.x),i=Q.indexOf(t.y);X[i]||(X[i]=[]),X[i][n]=t.text}))}}var tt=function(t,n){var i;return null===(i=X[n])||void 0===i?void 0:i[t]};if("histogram2d"===z.type){var nt=[],it=[],et=[];null===(a=z.x)||void 0===a||a.forEach((function(t,n){var i,e,r=null!==(i=$y(z.z,n))&&void 0!==i?i:0;_l(t)||_l(null===(e=z.y)||void 0===e?void 0:e[n])||(nt.push(t),it.push(z.y[n]),et.push(r))}));var rt=Bl(nt),ot=Bl(it),ut=Iy(nt,null===(l=z.xbins)||void 0===l?void 0:l.start,null===(s=z.xbins)||void 0===s?void 0:s.end,null===(c=z.xbins)||void 0===c?void 0:c.size),at=Iy(it,null===(d=z.ybins)||void 0===d?void 0:d.start,null===(f=z.ybins)||void 0===f?void 0:f.end,null===(v=z.ybins)||void 0===v?void 0:v.size),lt=at.map((function(){return ut.map((function(){return[]}))})),st=0;nt.forEach((function(t,n){var i=Py(ut,t,rt),e=Py(at,it[n],ot);-1!==i&&-1!==e&&lt[e][i].push(et[n])}));var ct=lt.map((function(t){return t.map((function(t){var n=Wy(z.histfunc,t);return st+=n,n}))}));ut.forEach((function(t,n){at.forEach((function(i,e){var r=Ry(z.histnorm,ct[e][n],st,rt?t.length:_y(t),ot?i.length:_y(i)),o=tt(n,e);j.push({x:rt?t.join(", "):Hy(t),y:ot?i.join(", "):Hy(i),value:r,rectText:o||r}),"number"==typeof r&&($=Math.min($,r),Y=Math.max(Y,r))}))}))}else{var dt=z.z,ft=z.x,vt=z.y,ht=null!==(h=null==dt?void 0:dt.length)&&void 0!==h?h:0,pt=null!==(g=null===(p=null==dt?void 0:dt[0])||void 0===p?void 0:p.length)&&void 0!==g?g:0,gt=null!=ft?ft:Array.from({length:pt},(function(t,n){return n})),yt=null!=vt?vt:Array.from({length:ht},(function(t,n){return ht-1-n}));gt.forEach((function(n,i){yt.forEach((function(e,r){var o,u,a,l,s,c=null===(o=null==dt?void 0:dt[r])||void 0===o?void 0:o[i],d=tt(i,r);j.push({x:"date"===(null===(a=null===(u=t.layout)||void 0===u?void 0:u.xaxis)||void 0===a?void 0:a.type)||null!=n?n:0,y:(null===(s=null===(l=t.layout)||void 0===l?void 0:l.yaxis)||void 0===s||s.type,e),value:c,rectText:d||c}),"number"==typeof c&&($=Math.min($,c),Y=Math.max(Y,c))}))}))}var mt={legend:null!==(y=z.name)&&void 0!==y?y:"",data:j,value:0},bt=[$,(Y+$)/2,Y],xt=[cs(es.color1),cs(es.color2),cs(es.color3)],wt=null!==(E=null!==(L=null!==(C=null!==(x=null!==(m=null==z?void 0:z.colorscale)&&void 0!==m?m:null===(b=t.layout)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(M=null===(w=t.layout)||void 0===w?void 0:w.coloraxis)||void 0===M?void 0:M.colorscale)&&void 0!==C?C:null===(S=null===(A=null===(k=t.layout)||void 0===k?void 0:k.template)||void 0===A?void 0:A.layout)||void 0===S?void 0:S.colorscale)&&void 0!==L?L:"histogram2d"===z.type&&(null===(T=null===(O=null===(N=null===(D=null===(V=t.layout)||void 0===V?void 0:V.template)||void 0===D?void 0:D.data)||void 0===N?void 0:N.histogram2d)||void 0===O?void 0:O[0])||void 0===T?void 0:T.colorscale))&&void 0!==E?E:null===(H=null===(_=null===(P=null===(B=null===(F=t.layout)||void 0===F?void 0:F.template)||void 0===B?void 0:B.data)||void 0===P?void 0:P.heatmap)||void 0===_?void 0:_[0])||void 0===H?void 0:H.colorscale;if(wt&&"object"==typeof wt&&("diverging"in wt||"sequential"in wt||"sequentialminus"in wt)){var Mt=$>=0,Ct=Y<=0;$<0&&Y>0?wt=null==wt?void 0:wt.diverging:Mt?wt=null==wt?void 0:wt.sequential:Ct&&(wt=null==wt?void 0:wt.sequentialminus)}var kt=Array.isArray(wt)?wt.map((function(t){return t[0]*(Y-$)+$})):bt,At=Array.isArray(wt)?wt.map((function(t){return t[1]})):xt;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:[mt],domainValuesForColorScale:kt,rangeValuesForColorScale:At,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(I=t.layout)||void 0===I?void 0:I.width,height:null!==(R=null===(W=t.layout)||void 0===W?void 0:W.height)&&void 0!==R?R:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0},ny(t.layout)),Uy([z],t.layout)),Qy(t.data,t.layout))},renderer:Hm},gauge:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,z,j,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it,et,rt,ot,ut,at,lt,st,ct=t.data[0],dt=(null===(u=ct.gauge)||void 0===u?void 0:u.steps)?ct.gauge.steps.map((function(t){return t.color})):void 0,ft=Ug(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,dt,i,r),vt=(null===(d=null===(c=ct.gauge)||void 0===c?void 0:c.steps)||void 0===d?void 0:d.length)?ct.gauge.steps.map((function(n,e){var o,u,a,l,s,c=n.name||"Segment ".concat(e+1),d=qg(ft,e,c,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r);return{legend:c,size:(null===(l=n.range)||void 0===l?void 0:l[1])-(null===(s=n.range)||void 0===s?void 0:s[0]),color:d}})):[{legend:"Current",size:null!==(f=ct.value)&&void 0!==f?f:0-(null!==(g=null===(p=null===(h=null===(v=ct.gauge)||void 0===v?void 0:v.axis)||void 0===h?void 0:h.range)||void 0===p?void 0:p[0])&&void 0!==g?g:0),color:fy(null===(b=null===(m=null===(y=t.layout)||void 0===y?void 0:y.template)||void 0===m?void 0:m.layout)||void 0===b?void 0:b.colorway,e,null===(w=null===(x=ct.gauge)||void 0===x?void 0:x.axis)||void 0===w?void 0:w.color,i,r)},{legend:"Target",size:(null!==(A=null===(k=null===(C=null===(M=ct.gauge)||void 0===M?void 0:M.axis)||void 0===C?void 0:C.range)||void 0===k?void 0:k[1])&&void 0!==A?A:100)-(null!==(S=ct.value)&&void 0!==S?S:0),color:es.disabled}];if(null===(L=ct.delta)||void 0===L?void 0:L.reference){var ht=ct.value-ct.delta.reference;if(ht>=0){lt="▲ ".concat(ht);var pt=Ug(null===(N=null===(D=null===(V=t.layout)||void 0===V?void 0:V.template)||void 0===D?void 0:D.layout)||void 0===N?void 0:N.colorway,e,null===(T=null===(O=ct.delta)||void 0===O?void 0:O.increasing)||void 0===T?void 0:T.color,i,r);st=qg(pt,0,"",i,null===(B=null===(F=null===(E=t.layout)||void 0===E?void 0:E.template)||void 0===F?void 0:F.layout)||void 0===B?void 0:B.colorway,r)}else{lt="▼ ".concat(Math.abs(ht));var gt=Ug(null===(H=null===(_=null===(P=t.layout)||void 0===P?void 0:P.template)||void 0===_?void 0:_.layout)||void 0===H?void 0:H.colorway,e,null===(W=null===(I=ct.delta)||void 0===I?void 0:I.decreasing)||void 0===W?void 0:W.color,i,r);st=qg(gt,0,"",i,null===(j=null===(z=null===(R=t.layout)||void 0===R?void 0:R.template)||void 0===z?void 0:z.layout)||void 0===j?void 0:j.colorway,r)}}var yt={sublabel:{fill:st}},mt=ny(t.layout),bt=mt.chartTitle,xt=mt.titleStyles;return(0,o.Cl)({segments:vt,chartValue:null!==($=ct.value)&&void 0!==$?$:0,chartTitle:bt,sublabel:lt,minValue:"number"==typeof(null===(G=null===(X=null===(Y=ct.gauge)||void 0===Y?void 0:Y.axis)||void 0===X?void 0:X.range)||void 0===G?void 0:G[0])?null===(Z=null===(q=null===(U=ct.gauge)||void 0===U?void 0:U.axis)||void 0===q?void 0:q.range)||void 0===Z?void 0:Z[0]:void 0,maxValue:"number"==typeof(null===(Q=null===(J=null===(K=ct.gauge)||void 0===K?void 0:K.axis)||void 0===J?void 0:J.range)||void 0===Q?void 0:Q[1])?null===(it=null===(nt=null===(tt=ct.gauge)||void 0===tt?void 0:tt.axis)||void 0===nt?void 0:nt.range)||void 0===it?void 0:it[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=ct.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(et=t.layout)||void 0===et?void 0:et.width,height:null!==(ot=null===(rt=t.layout)||void 0===rt?void 0:rt.height)&&void 0!==ot?ot:220,styles:yt,variant:(null===(at=null===(ut=ct.gauge)||void 0===ut?void 0:ut.steps)||void 0===at?void 0:at.length)?wg.MultipleSegments:wg.SingleSegment,roundCorners:!0},xt?{titleStyles:xt}:{})},renderer:Wm},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s=[],c=jy(t.data,t.layout,n),d=c.legends,f=c.hideLegend,v=void 0;t.data.forEach((function(n,u){var a,l,c,f,h,p,g;if(n.x){v=Kg(t.layout,n,v);var y=Ug(null===(c=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===c?void 0:c.colorway,e,null===(f=n.marker)||void 0===f?void 0:f.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e,r=null!==(e=$y(n.y,i))&&void 0!==e?e:0;_l(t)||(m.push(t),b.push(r))}));var x=Bl(m),w=Iy(m,null===(h=n.xbins)||void 0===h?void 0:h.start,null===(p=n.xbins)||void 0===p?void 0:p.end,null===(g=n.xbins)||void 0===g?void 0:g.size),M=w.map((function(){return[]})),C=0;m.forEach((function(t,n){var i=Py(w,t,x);-1!==i&&M[i].push(b[n])}));var k=M.map((function(t){var i=Wy(n.histfunc,t);return C+=i,i}));w.forEach((function(e,a){var l,c,f,h,p,g,m,b,w=d[u],M=v?v(Il(null===(l=n.marker)||void 0===l?void 0:l.color)?null===(f=null===(c=n.marker)||void 0===c?void 0:c.color)||void 0===f?void 0:f[a%(null===(h=n.marker)||void 0===h?void 0:h.color).length]:0):qg(y,a,w,i,null===(m=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.layout)||void 0===m?void 0:m.colorway,r),A=Zg(n,a),S=Ry(n.histnorm,k[a],C,x?e.length:_y(e)),L=Array.isArray(n.text)?n.text[a]:n.text;L&&n.texttemplate&&(L=vy(L,n.texttemplate,a)),s.push((0,o.Cl)((0,o.Cl)({x:x?e.join(", "):Hy(e),y:S,legend:w,color:null!==(b=Po(M).copy({opacity:A}).formatHex8())&&void 0!==b?b:M},x?{}:{xAxisCalloutData:"[".concat(e.x0," - ").concat(e.x1,")")}),L?{barLabel:String(L)}:{}))}))}}));var h=Ny(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:s,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,supportNegativeData:!0,mode:"histogram",hideTickOverlap:!0,maxBarWidth:50,hideLegend:f,roundCorners:!0,roundedTicks:!0,showYAxisLables:!0},oy(t.data[0],t.layout)),ny(t.layout)),Uy(t.data,t.layout)),ry(t.data[0],t.layout)),h?{annotations:h}:{})},renderer:zm},area:{transformer:function(t,n,i,e,r){return Ty(t,n,"area",i,e,r)},renderer:_m,preTransformOperation:Gm},line:{transformer:function(t,n,i,e,r){return Ty(t,n,"line",i,e,r)},renderer:Bm,preTransformOperation:Gm},scatter:{transformer:function(t,n,i,e,r){return Ty(t,n,"scatter",i,e,r)},renderer:jm,preTransformOperation:Gm},funnel:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=t.data.length>1&&t.data.every((function(t){var n,i,e,r,o=null!==(i=null!==(n=t.values)&&void 0!==n?n:t.x)&&void 0!==i?i:t.value,u=null!==(r=null!==(e=t.labels)&&void 0!==e?e:t.y)&&void 0!==r?r:t.stage;return Array.isArray(u)&&Array.isArray(o)&&o.length>1&&u.length>1}));if(d){var f={};t.data.forEach((function(n,o){var u,a,l,s,d,v,h,p,g,y,m,b,x,w=n.name||"Category ".concat(o+1),M=Ug(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(s=n.marker)||void 0===s?void 0:s.colors)&&void 0!==d?d:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),C=qg(M,0,w,i,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,r);f[w]=C;var k=null!==(m=null!==(y=n.labels)&&void 0!==y?y:n.y)&&void 0!==m?m:n.stage,A=null!==(x=null!==(b=n.values)&&void 0!==b?b:n.x)&&void 0!==x?x:n.value;Il(k)&&Il(A)&&k&&Il(k)&&k.length>0&&k.forEach((function(t,n){var i=c.findIndex((function(n){return n.stage===t})),e=Number(A[n]);isNaN(e)||(-1===i?c.push({stage:t,subValues:[{category:w,value:e,color:C}]}):c[i].subValues.push({category:w,value:e,color:C}))}))}))}else t.data.forEach((function(n,o){var u,a,l,s,d,f,v=function(t){var n,i,e,r,o=t.orientation||"h",u=null!==(i=null!==(n=t.labels)&&void 0!==n?n:t.y)&&void 0!==i?i:t.stage,a=null!==(r=null!==(e=t.values)&&void 0!==e?e:t.x)&&void 0!==r?r:t.value,l=Bl(a),s=Bl(u),c=Tl(a),d=Tl(u),f=function(t){return Array.isArray(t)?t:"string"==typeof t||"number"==typeof t?[t]:[]};return"h"===o?s&&c?{categories:f(u),values:f(a)}:l&&d?{categories:f(a),values:f(u)}:{categories:f(s?u:a),values:f(s?a:u)}:l&&d?{categories:f(a),values:f(u)}:s&&c?{categories:f(u),values:f(a)}:{categories:f(l?a:u),values:f(l?u:a)}}(n),h=v.categories,p=v.values;if(Il(h)&&Il(p)){var g=Ug(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(s=n.marker)||void 0===s?void 0:s.colors)&&void 0!==d?d:null===(f=n.marker)||void 0===f?void 0:f.color,i,r);h.forEach((function(n,e){var o,u,a,l=qg(g,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r),s=Number(p[e]);isNaN(s)||c.push({stage:n,value:s,color:l})}))}}));var v=ny(t.layout),h=v.chartTitle,p=v.titleStyles;return(0,o.Cl)({data:c,chartTitle:h,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null===(a=t.layout)||void 0===a?void 0:a.height,orientation:"v"===(null===(l=t.data[0])||void 0===l?void 0:l.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(s=t.layout)||void 0===s?void 0:s.showlegend)},p?{titleStyles:p}:{})},renderer:Mg},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=t.data.filter((function(t){return"scatter"!==t.type||"markers"!==t.mode})),c=jy(s,t.layout,n),d=c.legends,f=c.hideLegend,v=void 0,h=em(s,im(s,t.layout).x),p=rm(h,Zy),g=function(t){var n=p(t);return"string"==typeof n?0:null!=n?n:0},y="date"===h,m=[];return s.forEach((function(n,o){var u,a,l,s,c=d[o];if("bar"===n.type){v=Kg(t.layout,n,v);var f=Ug(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r);n.y.forEach((function(e,o){var u,a,l,s,d,h,p,b,x;if(!_l(e)){var w=v?v(Il(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[o%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):qg(f,o,c,i,null===(p=null===(h=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===h?void 0:h.layout)||void 0===p?void 0:p.colorway,r),M=Zg(n,o),C=+g(Il(n.base)?n.base[o]:n.base),k=+g(null===(b=n.x)||void 0===b?void 0:b[o]);m.push({x:{start:y?new Date(C):C,end:y?new Date(C+k):C+k},y:e,legend:c,color:null!==(x=Po(w).copy({opacity:M}).formatHex8())&&void 0!==x?x:w})}}))}else if("scatter"===n.type&&"none"===n.mode&&"toself"===n.fill)for(var h=0;h<n.y.length;h+=5)if(!_l(n.y[h])&&!_l(n.y[h+3])){var p=g(n.x[h]),b=g(n.x[h+1]),x=n.y[h],w=n.y[h+3];m.push({x:{start:p,end:b},y:Math.round((x+w)/2),legend:c,color:n.fillcolor})}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:m,showYAxisLables:!0,height:null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:350,width:null===(l=t.layout)||void 0===l?void 0:l.width,hideTickOverlap:!0,hideLegend:f,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},ny(t.layout)),Uy(s,t.layout)),Ky(s,t.layout,!0)),Qy(s,t.layout))},renderer:Ym},scatterpolar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f=[],v=jy(t.data,t.layout,n),h=v.legends,p=v.hideLegend,g=rm(sm(t.data,"r",t.layout)._type);return t.data.forEach((function(n,u){var a,l,s,c,d,v,p,y,m,b=h[u];if("scatterpolar"===n.type){var x="toself"===n.fill||"tonext"===n.fill,w=void 0===n.mode||n.mode.includes("lines"),M=x?n.fillcolor:w?null===(a=n.line)||void 0===a?void 0:a.color:null===(l=n.marker)||void 0===l?void 0:l.color,C=Ug(null===(d=null===(c=null===(s=t.layout)||void 0===s?void 0:s.template)||void 0===c?void 0:c.layout)||void 0===d?void 0:d.colorway,e,M,i,r),k=qg(C,u,b,i,null===(y=null===(p=null===(v=t.layout)||void 0===v?void 0:v.template)||void 0===p?void 0:p.layout)||void 0===y?void 0:y.colorway,r),A=Zg(n,u),S=Po(k).copy({opacity:A}).formatHex8(),L=By(n.line),V=n.thetaunit,D={legend:b,legendShape:zy(n),color:S,data:(null===(m=n.r)||void 0===m?void 0:m.map((function(e,u){var a,l,s,c,d,f,v=null===(a=n.theta)||void 0===a?void 0:a[u],h=Array.isArray(null===(l=n.marker)||void 0===l?void 0:l.size)?n.marker.size[u]:null===(s=n.marker)||void 0===s?void 0:s.size,p=Array.isArray(n.text)?n.text[u]:n.text,y=qg(C,u,b,i,null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,r),m=Zg(n,u);if(!_l(g(e))&&!_l(v))return(0,o.Cl)((0,o.Cl)({r:g(e),theta:"number"==typeof v?"radians"===V?180*v/Math.PI:"gradians"===V?.9*v:v:v,color:y?Po(y).copy({opacity:m}).formatHex8():S},void 0!==h?{markerSize:h}:{}),void 0!==p?{text:p}:{})})).filter((function(t){return void 0!==t})))||[]};x||w?f.push((0,o.Cl)((0,o.Cl)({type:x?"areapolar":"linepolar"},D),{lineOptions:L})):f.push((0,o.Cl)({type:"scatterpolar"},D))}})),(0,o.Cl)({data:f,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:400,hideLegend:p},(s=t.data,c=t.layout,d={},Object.keys(om).forEach((function(t){var n=om[t],i=sm(s,t,c);d[n]=(0,o.Cl)((0,o.Cl)({scaleType:"log"===i._type?"log":"default",categoryOrder:cm(s,i),tickFormat:i.tickformat},function(t,n){var i={};if((!n.tickmode||"array"===n.tickmode)&&Il(n.tickvals)){var e="date"===n._type?n.tickvals.map((function(t){return new Date(t)})):n.tickvals;return i.tickValues=e,i.tickText=n.ticktext,i}if((!n.tickmode||"linear"===n.tickmode)&&n.dtick){var r=tm(n.dtick,n._type),o=nm(n.tick0,n._type,r);return i.tickStep=r,i.tick0=o,i}return(!n.tickmode||"auto"===n.tickmode)&&"number"==typeof n.nticks&&n.nticks>=0&&(i.tickCount=n.nticks),i}(0,i)),Il(i.range)?{rangeStart:i.range[0],rangeEnd:i.range[1]}:{}),"angularAxis"===n&&(d[n].unit=i.thetaunit,d.direction=i.direction)})),d))},renderer:Xm},fallback:{transformer:Oy,renderer:Fm}},qm=u.forwardRef((function(t,n){var i,e,r,a=t.colorwayType,s=void 0===a?"default":a,c=t.onSchemaChange,d=(0,o.Tt)(t,["colorwayType","onSchemaChange"]),f=Hl(d.chartSchema).plotlySchema,v=(t=>{var n;try{Hl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let i=(t=>{var n;try{const i=t;if(!i)throw new Error("Plotly input is null or undefined");if("object"!=typeof i)throw new Error("Plotly input is not an object. Input type: "+typeof i);const e=Wl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations);if(!Il(i.data)){if(e)return{...i,data:[]};throw new Error("Plotly input data is not a valid array or typed array")}if(0===i.data.length){if(e)return{...i,data:[]};throw new Error("Plotly input data is empty")}return i}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{i=Sl(i)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}const e=Wl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations),r=Il(i.data)&&i.data.length>0,o=r?((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Yl[r]){const o=Yl[r];for(const r of o)try{r(t,n)}catch(n){return i.push(`data[${e}] - type: ${t.type}, ${n}`),[-1,""]}}return[e,null!=r?r:""]})).filter((t=>t[0]>=0));if(0===e.length)throw new Error(i.join("; "));return e})(i.data,i.layout):[];if(!r&&e)return{isValid:!0,type:"annotation",validTracesInfo:[]};let u=!1,a=o.map((t=>{var n,e,r;const o=t[0],a=i.data[o];switch(a.type){case"pie":return{isValid:!0,traceIndex:o,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:o,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:o,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:o,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:o,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:o,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:o,type:"table"};case"bar":const t=a;return"h"===t.orientation?Xl(t)?{isValid:!0,traceIndex:o,type:"gantt"}:{isValid:!0,traceIndex:o,type:"horizontalbar"}:Pl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:["group","overlay"].includes(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.barmode)?Tl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:o,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:o,type:"funnel"};case"scatter":case"scattergl":const l=a;if(Jl(l,u))return u=!0,{isValid:!0,traceIndex:o,type:"gantt"};const s=zl(null!==(e=l.mode)&&void 0!==e?e:""),c=Array.isArray(null===(r=null==i?void 0:i.layout)||void 0===r?void 0:r.shapes)&&i.layout.shapes.some((t=>"line"===t.type));if(s)return{isValid:!0,traceIndex:o,type:c&&Zl(l,i.layout)?"line":"scatter"};const d=ql(l);return Kl(l,i.layout)?{isValid:!0,traceIndex:o,type:"fallback"}:{isValid:!0,traceIndex:o,type:d?"area":"line"};default:return{isValid:!1,errorMessage:`${Ll} ${a.type}`}}}));if(a.every((t=>!t.isValid)))return{isValid:!1,errorMessage:a.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};a=a.filter((t=>t.isValid));const l=a.map((t=>({index:t.traceIndex,type:t.type}))),s=a.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type));if(a.some((t=>"line"===t.type||"fallback"===t.type))){if(s)return{isValid:!0,type:a.some((t=>"verticalstackedbar"===t.type))?"fallback":"groupedverticalbar",validTracesInfo:l};if(a.some((t=>"fallback"===t.type)))return{isValid:!0,type:"fallback",validTracesInfo:l}}const c=new Set(a.map((t=>t.type)));return c.size>1?{isValid:!0,type:"composite",validTracesInfo:l}:{isValid:!0,type:Array.from(c)[0],validTracesInfo:l}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(f);if(!v.isValid)throw new Error("Invalid chart schema: ".concat(v.errorMessage));var h=f;try{h=Sl(h)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var p=(0,o.Cl)((0,o.Cl)({},h),{data:v.validTracesInfo.map((function(t){return h.data[t.index]}))}),g=v.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),y=f.selectedLegends,m=u.useRef(new Map),b=Og(),x=null!==(i=null==b?void 0:b.isInverted)&&void 0!==i&&i,w=u.useRef([]),M=u.useRef(!1),C=u.useRef(null),k=u.useRef(null);Il(y)||(y=[]);var A=u.useState(y),S=A[0],L=A[1],V=u.useCallback((function(t){L(t),c&&c({plotlySchema:{plotlyInput:h,selectedLegends:t}})}),[c,h]);u.useEffect((function(){var t=Hl(d.chartSchema).plotlySchema.selectedLegends;L(null!=t?t:[])}),[d.chartSchema]);var D={legendProps:{canSelectMultipleLegends:!0,onChange:V,selectedLegends:S},calloutProps:{layerProps:{eventBubblingEnabled:!0}}},N=u.useCallback((function(t){return(0,o.sH)(void 0,void 0,void 0,(function(){var n,i,e,r;return(0,o.YH)(this,(function(u){if(!k.current)throw new Error("Container reference is null");if(n=(0,o.Cl)({background:Js(k.current,b.semanticColors.bodyBackground),scale:5},t),!M.current){if(!(null===(e=null===(i=w.current[0])||void 0===i?void 0:i.compRef)||void 0===e?void 0:e.toImage))throw new Error("Chart cannot be exported as image");return[2,w.current[0].compRef.toImage(n)]}return[2,af(w.current.map((function(t){var n;return{container:null===(n=t.compRef)||void 0===n?void 0:n.chartContainer,row:t.row,col:t.col}})),null===(r=C.current)||void 0===r?void 0:r.toSVG,(0,l.jI)(),n)]}))}))}),[b]);u.useImperativeHandle(d.componentRef,(function(){return{exportAsImage:N}}),[N]);var O={},T=0;"annotation"===v.type?O.x=[]:p.data.forEach((function(t,n){var i,e,r="";Gy(v.validTracesInfo[n].type)?(r="".concat(Jg).concat(T+1),T++):r="scatterpolar"===v.validTracesInfo[n].type?null!==(i=t.subplot)&&void 0!==i?i:um:null!==(e=t.xaxis)&&void 0!==e?e:"x",O[r]||(O[r]=[]),O[r].push(n)})),M.current=Object.keys(O).length>1;var E=function(t,n,i){var e,r,o=[],u=[],a={},l="1fr",s="1fr",c={};if(!n)return{templateRows:l,templateColumns:s,layout:c};var d=null==t?void 0:t.layout;if(null!=d&&Object.keys(d).length>0&&Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r,a;if(t.startsWith("xaxis")){var c=Xy(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Xy(f,"y")))throw new Error("Invalid layout: xaxis ".concat(c+1," anchor should be y").concat(p+1));var v=d[t],h={start:(null==v?void 0:v.domain)?v.domain[0]:0,end:(null==v?void 0:v.domain)?v.domain[1]:1,cellName:"x".concat(0===o.length?"":o.length+1)};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Xy(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Xy(f,"x"))){if(1===c&&0===p||"right"===(null===(a=d.yaxis2)||void 0===a?void 0:a.side))return{templateRows:l,templateColumns:s};throw new Error("Invalid layout: yaxis ".concat(c+1," anchor should be x").concat(p+1))}var g=d[t],y={start:(null==g?void 0:g.domain)?g.domain[0]:0,end:(null==g?void 0:g.domain)?g.domain[1]:1,cellName:"x".concat(0===u.length?"":u.length+1)};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,a,l,s,c;if(Gy(n.type)){var d=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],f={start:(null===(a=d.domain)||void 0===a?void 0:a.x)?d.domain.x[0]:0,end:(null===(l=d.domain)||void 0===l?void 0:l.x)?d.domain.x[1]:1,cellName:"".concat(Jg).concat(o.length-r+1)},v={start:(null===(s=d.domain)||void 0===s?void 0:s.y)?d.domain.y[0]:0,end:(null===(c=d.domain)||void 0===c?void 0:c.y)?d.domain.y[1]:1,cellName:"".concat(Jg).concat(u.length-r+1)};o.push(f),u.push(v)}})),null!=d&&Object.keys(d).length>0&&(Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r;if(t.startsWith("polar")){var a=d[t],l={start:(null===(n=a.domain)||void 0===n?void 0:n.x)?a.domain.x[0]:0,end:(null===(i=a.domain)||void 0===i?void 0:i.x)?a.domain.x[1]:1,cellName:t},s={start:(null===(e=a.domain)||void 0===e?void 0:e.y)?a.domain.y[0]:0,end:(null===(r=a.domain)||void 0===r?void 0:r.y)?a.domain.y[1]:1,cellName:t};o.push(l),u.push(s)}})),null===(e=d.annotations)||void 0===e||e.forEach((function(t){var n=o.flatMap((function(n,i){return(null==t?void 0:t.x)>=n.start&&(null==t?void 0:t.x)<=n.end?[i]:[]})),i=u.findIndex((function(i,e){return n.includes(e)&&(null==t?void 0:t.y)>=i.start&&(null==t?void 0:t.y)<=i.end}));-1!==i&&(void 0===a[i]&&(a[i]={}),90===(null==t?void 0:t.textangle)?a[i].yAnnotation=t.text:a[i].xAnnotation=t.text)}))),o.length>0){var f=new Map;o.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);f.has(n)||f.set(n,t)}));var v=Array.from(f.values()).map((function(t){return t.start})).sort();s="repeat(".concat(v.length,", 1fr)"),o.forEach((function(t,n){var i=v.findIndex((function(n){return n===t.start}))+1,e=a[n],r={row:-1,column:i,xAnnotation:null==e?void 0:e.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[t.cellName]=r}))}if(u.length>0){var h=new Map;u.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);h.has(n)||h.set(n,t)}));var p=Array.from(h.values()).map((function(t){return t.start})).sort(),g=p.length;l="repeat(".concat(g,", 1fr)"),u.forEach((function(t,n){var i=p.findIndex((function(n){return n===t.start})),e=g-i,r=a[n],o=null==r?void 0:r.yAnnotation,u=c[t.cellName];void 0!==u&&(u.row=e,u.yAnnotation=o,u.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(p,M.current,v.validTracesInfo);if(M.current&&E.templateRows===Qg&&E.templateColumns===Qg){if("donut"===v.type){var F=Object.keys(O);F.forEach((function(t,n){n<F.length-1&&delete O[t]}))}else Object.keys(O).forEach((function(t,n){n>0&&delete O[t]}));M.current=!1}var B,P=function(t,n,i,e,r){var o=[];return t.data.reduce((function(t,n){return t||!0===n.showlegend||void 0===n.showlegend}),!1)&&t.data.forEach((function(u,a){var l,s,c,d,f,v,h,p,g,y,m,b,x;if("donut"===e[a].type){var w=u,M=Ug(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.piecolorway)&&void 0!==s?s:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,i,null!==(h=null===(v=t.layout)||void 0===v?void 0:v.piecolorway)&&void 0!==h?h:null===(p=null==w?void 0:w.marker)||void 0===p?void 0:p.colors,n,r,!0);Il(w.labels)&&w.labels.forEach((function(i,e){var u,a,l,s,c,d="".concat(i),f=qg(M,e,d,n,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);""!==d&&!1===o.some((function(t){return t.title===d}))&&o.push({title:d,color:f})}))}else if(!1===Gy(e[a].type)){var C=u,k=C.legendgroup,A=(null===(g=C.line)||void 0===g?void 0:g.color)||(null===(y=C.marker)||void 0===y?void 0:y.color),S=zy(C),L=Ug(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.template)||void 0===b?void 0:b.layout)||void 0===x?void 0:x.colorway,i,A,n,r);void 0!==k&&""!==k&&!1===o.some((function(t){return t.title===k}))&&o.push({title:k,color:L,shape:S})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(p,m,s,v.validTracesInfo,x),_=null===(e=p.layout)||void 0===e?void 0:e.title,H="string"==typeof _?_:null!==(r=null==_?void 0:_.text)&&void 0!==r?r:"",I="object"==typeof _?null==_?void 0:_.font:void 0,W=b.fonts.medium,R=W.fontFamily,z=W.fontSize,j=W.fontWeight,$=(0,o.Cl)({fontFamily:R,fontSize:z,fontWeight:j,color:b.semanticColors.bodyText,textAlign:"center",marginBottom:"8px"},pv(I));return u.createElement(u.Fragment,null,M.current&&H&&u.createElement("div",{style:$},H),u.createElement("div",{style:{display:"grid",gridTemplateRows:E.templateRows,gridTemplateColumns:E.templateColumns},ref:k},Object.entries(O).map((function(t,n){var i,e,r,a,l,c=t[0],d=t[1],f=(0,o.Cl)((0,o.Cl)({},p),{data:d.map((function(t){return p.data[t]}))}),h=g.filter((function(t){return d.includes(t.index)})),y="fallback"===v.type||"groupedverticalbar"===v.type?v.type:null!==(e=null===(i=h[0])||void 0===i?void 0:i.type)&&void 0!==e?e:v.type;g.some((function(t){return"line"===t.type}))&&g.some((function(t){return"scatter"===t.type}))&&(y="line");var b=Um[y];if(b){var C=b.transformer,k=b.renderer,A=b.preTransformCondition,S=b.preTransformOperation;if(void 0===A||A(f)){var L=S?S(f):f,V=E.layout[c],N="annotation"===y?{}:(0,o.Cl)({},D);return function(t,n,i,e,r,a){var l=n.apply(void 0,i);return u.createElement("div",{key:"".concat(r,"_").concat(a),style:{gridRowStart:r,gridRowEnd:r+1,gridColumnStart:a,gridColumnEnd:a+1}},u.createElement(t,(0,o.Cl)({},l,e)))}(k,C,[L,M.current,m,s,x],(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},N),(null==V?void 0:V.xAnnotation)&&{xAxisAnnotation:V.xAnnotation}),(null==V?void 0:V.yAnnotation)&&{yAxisAnnotation:V.yAnnotation}),{componentRef:function(t){var i,e;w.current[n]={compRef:t,row:null!==(i=null==V?void 0:V.row)&&void 0!==i?i:1,col:null!==(e=null==V?void 0:V.column)&&void 0!==e?e:1}}}),null!==(r=null==V?void 0:V.row)&&void 0!==r?r:1,null!==(a=null==V?void 0:V.column)&&void 0!==a?a:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(l=f.data[0])||void 0===l?void 0:l.type))}))),M.current&&(B=P,u.createElement(bf,(0,o.Cl)({},B,{selectedLegends:S,onChange:V,ref:C}))))}));qm.displayName="DeclarativeChart",(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();