@fluentui/react-charting 5.24.33 → 5.24.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +51 -1
- package/CHANGELOG.md +21 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +70 -7
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +70 -7
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +70 -7
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/package.json +2 -5
- package/project.json +1 -155
package/dist/react-charting.js
CHANGED
|
@@ -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}});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),T=q(400),O=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)"}}),$=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),z=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),j=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(T),f,l),slideLeftOut10:X("".concat(p,",").concat(O),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($),f,l),scaleUpOut103:X("".concat(p,",").concat(z),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(j,"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.12.4"),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(),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},fX: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){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,{AreaChart:function(){return Zv},CartesianChart:function(){return sv},ChartHoverCard:function(){return hc.ChartHoverCard},ChartTable:function(){return Fp},DataVizGradientPalette:function(){return pc},DataVizPalette:function(){return is},DeclarativeChart:function(){return ky},DonutChart:function(){return Jf},FunnelChart:function(){return zp},GanttChart:function(){return ly},GaugeChart:function(){return qp},GaugeChartVariant:function(){return $p},GaugeValueFormat:function(){return Rp},GroupedVerticalBarChart:function(){return Vh},HeatMapChart:function(){return Oh},HorizontalBarChart:function(){return ud},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return _p},Legends:function(){return of},LineChart:function(){return Nv},MultiStackedBarChart:function(){return sh},MultiStackedBarChartVariant:function(){return nh},NodesComposition:function(){return op},PieChart:function(){return oh},ResponsiveContainer:function(){return oy},SankeyChart:function(){return sp},ScatterChart:function(){return Ev},Shape:function(){return qd},Sparkline:function(){return Np},StackedBarChart:function(){return fh},Textbox:function(){return Mv},TreeChart:function(){return Sp},TreeTraverse:function(){return up},VerticalBarChart:function(){return wh},VerticalStackedBarChart:function(){return kh},getChartHoverCardStyles:function(){return Dh.J},getColorFromToken:function(){return ss},getGradientFromToken:function(){return Mc},getNextColor:function(){return ls},getNextGradient:function(){return wc},withResponsiveContainer:function(){return uy}});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&&(O(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 T=void 0;function O(t){if(t){var n=(0,s.z)(t);n&&(void 0!==T&&n.cancelAnimationFrame(T),T=n.requestAnimationFrame((function(){t&&t.focus(),T=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 $(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 z(){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 j(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 Tt(){var t=u.useRef();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 Ot(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(),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(),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}}),[]),Ot(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Ot(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=Tt(),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 Ot(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},$(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();return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,$t=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},zt=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},jt=((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(),p=Tt(),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=$t(),A=u.useRef();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,T=i.onLayerMounted,O=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==O?void 0:O.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),j=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(),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(),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=Tt();return Ot(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=Tt(),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=Tt(),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==T||T()}),[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:j,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},$(i,R,Xt),{className:z(rt.root,q&&q.targetEdge&&jt[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},O,{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=$(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 Tn(t){console&&console.warn&&console.warn(t)}function On(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||Tn("".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.")),Tn(r)}}function Fn(t,n){return void 0!==t[n]&&null!==t[n]}function Bn(t){var n=u.useRef();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++)Tn(p[h]);if(a)for(var g=0,y=a;g<y.length;g++){var m=y[g];On(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]&&Tn("".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,Tn("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,Tn("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,Tn("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(),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}),T=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},O=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,T();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(){O(),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,O);var t=l.current?e(l.current):void 0;return function(){t&&t(),T(),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,O)}}),[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:z(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()},$n={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},zn=(0,r.I)(Wn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)($n,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"]}),jn=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(zn,(0,o.Cl)({},i),a)}));jn.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 Ti(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=>Ti((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 Oi=Ti((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Oi.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Ti((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):Oi:null),Oi.range;const Ei=Ti((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Ci)}),((t,n)=>(n-t)/Ci),(t=>t.getUTCSeconds())),Fi=(Ei.range,Ti((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,Ti((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getUTCMinutes()))),Pi=(Bi.range,Ti((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,Ti((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getUTCHours()))),Hi=(_i.range,Ti((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,Ti((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,Ti((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 Ti((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 $i=Ri(0),zi=Ri(1),ji=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),Ui=Ri(6);function qi(t){return Ti((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))}$i.range,zi.range,ji.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,Ti((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,Ti((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,Ti((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?Ti((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=Ti((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 Oi.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?Ti((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,$i,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),Te=Le(3),Oe=Le(4),Ee=Le(5),Fe=Le(6),Be=(Ve.range,De.range,Ne.range,Te.range,Oe.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 $e(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 ze(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function je(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:Tr,U:Or,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:$r,e:$r,f:Gr,g:ro,G:uo,H:zr,I:jr,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=ze(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=$e(ze(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(ze(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?$e(ze(o.y,0,1)).getUTCDay():Re(ze(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,$e(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 Tr(t){var n=t.getDay();return 0===n?7:n}function Or(t,n){return Je(Ve.count(He(t)-1,t),n,2)}function Er(t){var n=t.getDay();return n>=4||0===n?Oe(t):Oe.ceil(t)}function Fr(t,n){return t=Er(t),Je(Oe.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?Oe(t):Oe.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 $r(t,n){return Je(t.getUTCDate(),n,2)}function zr(t,n){return Je(t.getUTCHours(),n,2)}function jr(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=je({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 To(){return this.rgb().formatHex()}function Oo(){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))?zo(n[1],n[2]/100,n[3]/100,1):(n=Do.exec(t))?zo(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`#${$o(this.r)}${$o(this.g)}${$o(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 $o(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function zo(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 jo(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:To,formatHex:To,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jo(this).formatHsl()},formatRgb:Oo,toString:Oo}),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`#${$o(this.r)}${$o(this.g)}${$o(this.b)}${$o(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Io,toString:Io})),po(Yo,(function(t,n,i,e){return 1===arguments.length?jo(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,$i,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 Tu(){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 Tu(n,i).unknown(e)},bu.apply(r,arguments),r}function Ou(){var t,n,i=Tu().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 Ou(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 $u,zu,ju,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),ju(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 zu(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=zu(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)}}$u=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:["$",""]}),zu=$u.format,ju=$u.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 Ta(t,n){return function(){this[t]=n}}function Oa(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 $a(t){return function(){this.textContent=t}}function za(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ja(){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("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 kl(t),!0}catch{return!1}}function kl(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 Al(t,n){t=Ml(t);try{const i=kl(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}`)}}function Sl(t){for(const[n,i]of Object.entries(t))if("object"!=typeof i||Array.isArray(i)||null===i){if("bdata"===n&&"string"==typeof i&&Cl(i)){const e=t.dtype||"utf-8";t[n]=Al(i,e)}else if(Array.isArray(i))for(let t=0;t<i.length;t++)"object"==typeof i[t]&&null!==i[t]&&Sl(i[t])}else Sl(i)}function Ll(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(Ll(t.slice(n*r,(n+1)*r),e));return o}function Vl(t){const n=JSON.parse(JSON.stringify(t.data));if(Sl(t.data),JSON.stringify(t.data)!==JSON.stringify(n)){for(const n of t.data||[])["y","x","z","r","theta","values"].forEach((t=>{if(n[t]&&"object"==typeof n[t]&&"bdata"in n[t]){const i=n[t].bdata;let e=n[t].shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Rl(t)||(t=void 0)}catch(n){const i=e.split(",").map((t=>Number(t.trim())));i.every((t=>!isNaN(t)))?t=i:e=void 0}e=t}void 0!==e&&Rl(e)?n[t]=Ll(i,e):n[t]=i}}));return t}return t.data=n,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?Oa:Ta)(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?za:$a)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ja:("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 Dl="Unsupported chart - type :",Nl=t=>!isNaN(parseFloat(t))&&isFinite(t),Tl=t=>{if(Nl(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)},Ol=(t,n,...i)=>!!Rl(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),El=t=>Ol(t,(t=>Tl(t)||null===t)),Fl=t=>Ol(t,(t=>"string"==typeof t&&Nl(t)||"number"==typeof t||null===t)),Bl=t=>Ol(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)),Pl=t=>Ol(t,(t=>(t=>{if(Nl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),_l=t=>Ol(t,(t=>"string"==typeof t||null===t)),Hl=t=>Ol(t,(t=>"object"==typeof t&&null!==t&&!Rl(t))),Il=t=>null==t||"number"==typeof t&&!isFinite(t),Wl=(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,"<").replace(/>/g,">"):t[i]=Wl(t[i],n+1));return t};function Rl(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const $l=(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&&!Fl(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(zl(o)){if(!Fl(t.x)&&!_l(t.x)&&!El(t.x))throw new Error(`${Dl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Fl(t.y)&&!_l(t.y))throw new Error(`${Dl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}else{if(!["lines+markers","markers+lines","text+lines+markers","lines","text+lines","lines+text","lines+markers+text"].includes(o))throw new Error(`${Dl} ${t.type}, mode: ${o}, Unsupported mode`);if(!Fl(t.x)&&!_l(t.x)&&!El(t.x))throw new Error(`${Dl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Fl(t.y)&&!_l(t.y))throw new Error(`${Dl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}const l=Zl(t),s=Kl(t);if(l&&s)throw new Error(`${Dl} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported for AreaChart.`);if(s&&Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported for VSBC fallback.`)},Yl=(t,n)=>{const i=Ul(t);return Object.keys(i).some((t=>{var e;const r=ql(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Xl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${Dl} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)},t=>$l(t,!1)],bar:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)},t=>{(t=>{const n=t.x&&Rl(t.x)&&0===t.x.length,i=t.y&&Rl(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(!Fl(t.x)&&!El(t.x))throw new Error(`${Dl} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!Gl(t)&&El(t.x))throw new Error(`${Dl} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);$l(t,!1)}else if(!Fl(t.y)&&!_l(t.y)&&!Hl(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;Il(n)||Il(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||Il(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(Il(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(`${Dl} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>jl(t,n)],scattergl:[(t,n)=>jl(t,n)],scatterpolar:[t=>{if(!Fl(t.theta)&&!_l(t.theta))throw new Error(`${Dl} ${t.type}, theta values must be array of numbers or strings`);if(!Fl(t.r))throw new Error(`${Dl} ${t.type}, Non numeric r values`)}],funnel:[t=>$l(t,!1)],histogram2d:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)}]},Gl=t=>El(t.base)||Fl(t.base),Ul=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}},ql=(t,n)=>`${t}axis${n>1?n:""}`,Zl=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Kl=t=>{var n;if(zl(null!==(n=t.mode)&&void 0!==n?n:""))return!1;const i=El(t.x),e=Fl(t.x),r=Pl(t.x),o=Bl(t.x),u=_l(t.y);return!((i||e||o)&&!r&&!u)};var Jl,Ql,ts,ns,is={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"},es={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"]},rs={qualitative:es,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},os=Object.values(es),us=Object.values(is),as=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},ls=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=os[(t+n)%os.length];return as(e,i)},ss=function(t,n){if(void 0===n&&(n=!1),us.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=rs[e][r];return as(o,n)}return t},cs=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ds=function(t){var n=t.r,i=t.g,e=t.b;return{r:cs(n/255),g:cs(i/255),b:cs(e/255)}},fs=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},vs=function(t,n){var i=fs(ds(Po(t))),e=fs(ds(Po(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)},hs="2000-01-01";function ps(t,n){void 0===n&&(n=!1);var i=ju(".2~",t);Math.abs(t)<1?i=zu(".2~g"):n&&Math.abs(t)>=1e3&&(i=ju(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function gs(t){return ps(t)}function ys(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=rc(r).domain([o.dStartValue,o.dEndValue]).range([o.rStartValue,o.rEndValue]);a&&m.nice();var b=null!=f?f:6,x=function(t,i,r){if(n.tickFormat)return zu(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&&void 0===f){var w=p(m.ticks().map((function(t,n){return x(t)})))+20,M=m.range(),C=M[0],k=M[1];b=Math.min(Math.max(1,Math.floor(Math.abs(k-C)/w)),10)}var A,S=ni(m).tickSize(s).tickPadding(d).ticks(b).tickFormat((function(t,n){return x(t,0,m.tickFormat(b))}));[Ql.HorizontalBarChartWithAxis,Ql.GanttChart].includes(i)&&S.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?A=n.tickValues:g&&(A=dc(r,g,y,m.domain())),A&&S.tickValues(A),v&&sl(v).call(S).selectAll("text").attr("aria-hidden","true");var L=(null!=A?A:m.ticks(b)).map(S.tickFormat());return{xScale:m,tickValues:L}}function ms(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:$i,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 bs(t,n){var i,e=t.yMinMaxValues,r=void 0===e?{startValue:0,endValue:0}:e,o=t.yAxisElement,u=void 0===o?null:o,a=t.yMaxValue,l=void 0===a?0:a,s=t.yMinValue,c=void 0===s?0:s,d=t.containerHeight,f=t.margins,v=t.tickPadding,h=void 0===v?12:v,p=t.maxOfYVal,g=void 0===p?0:p,y=t.yAxisTickFormat,m=t.yAxisTickCount,b=void 0===m?4:m,x=t.tickValues,w=t.tickStep,M=t.tick0,C=g||r.endValue,k=C>l?C:l,A=r.startValue<c?Math.min(0,r.startValue):c,S=Gu().domain([A,k]).range([d-f.bottom,f.top]),L=(n?ti(S):ii(S)).tickPadding(h).ticks(b);return y?L.tickFormat(y):L.tickFormat(gs),x?i=x:w&&(i=dc(void 0,w,M,S.domain())),i&&L.tickValues(i),u&&sl(u).call(L).selectAll("text").attr("aria-hidden","true"),S}function xs(t,n,i,e,r,o,u,a){void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var l=t.yMinMaxValues,s=void 0===l?{startValue:0,endValue:0}:l,c=t.yAxisElement,d=void 0===c?null:c,f=t.yMaxValue,v=void 0===f?0:f,h=t.yMinValue,p=void 0===h?0:h,g=t.containerHeight,y=t.containerWidth,m=t.margins,b=t.tickPadding,x=void 0===b?12:b,w=t.maxOfYVal,M=void 0===w?0:w,C=t.yAxisTickFormat,k=t.yAxisTickCount,A=void 0===k?4:k,S=t.eventAnnotationProps,L=t.eventLabelHeight,V=t.tickValues,D=t.tickStep,N=t.tick0,T=M||s.endValue||0,O=T>v?T:v,E=o?Math.min(s.startValue||0,p||0):s.startValue<p?0:p,F=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}(O,E,A,e,u),B=[o?F[0]:E,F[F.length-1]];if("log"===a){var P=s.startValue,_=s.endValue;p>0&&(P=Math.min(P,p)),v>0&&(_=Math.max(_,v)),B=[P,_]}var H,I=rc(a).domain(B).range([g-m.bottom,m.top+(S?L:0)]),W=(!n&&r||n&&!r?ti(I):ii(I)).tickPadding(x).tickSizeInner(-(y-m.left-m.right));return V?H=V:D&&(H=dc(a,D,N,I.domain())),H?(W.tickValues(H),i.yAxisDomainValues=H):"log"===a?i.yAxisDomainValues=I.ticks():(W.tickValues(F),i.yAxisDomainValues=F),C?W.tickFormat(C):W.tickFormat((function(t,n){return function(t,n,i){var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":gs(e)}(t,0,I.tickFormat(A))})),d&&sl(d).call(W).selectAll("text").attr("aria-hidden","true"),I}!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"}(Ql||(Ql={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(ts||(ts={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(ns||(ns={}));var ws=function(t,n,i,e){var r=t.containerHeight,o=t.tickPadding,u=void 0===o?12:o,a=t.margins,l=t.yAxisTickFormat,s=t.yAxisElement,c=t.yAxisPadding,d=null!=c?c:.5;d=1===d?.99:d;var f=Ou().domain(n).range([r-a.bottom,a.top]).padding(d),v=(i?ti(f):ii(f)).tickPadding(u).ticks(n);return l&&v.tickFormat(l),s&&sl(s).call(v).selectAll("text"),f},Ms=function(t,n,i,e,r){var o=t.containerHeight,u=t.tickPadding,a=void 0===u?12:u,l=t.margins,s=t.yAxisTickFormat,c=t.yAxisElement,d=t.yAxisPadding,f=void 0===d?0:d,v=t.containerWidth,h=Ou().domain(n).range([o-l.bottom,l.top]).padding(f);r===Ql.VerticalStackedBarChart&&h.paddingInner(1).paddingOuter(0);var p=i?ti(h):ii(h),g=p.tickPadding(a).tickValues(n).tickSize(0);return r===Ql.VerticalStackedBarChart&&p.tickSizeInner(-(v-l.left-l.right)),s&&g.tickFormat(s),c&&sl(c).call(g).selectAll("text"),h};function Cs(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}var ks=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},As=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 Ss(t){var n=t.tooltipCls,i=t.axis,e=t.id;if(null===i)return null;for(var r=sl("body").append("div").attr("id",e).attr("class",n).style("opacity",0),o=i.selectAll("#BaseSpan")._groups[0],u=o&&Object.keys(o).length,a=[],l=0;l<u;l++){var s=o[l].dataset&&Object.values(o[l].dataset)[0];a.push(s)}var c=i.selectAll(".tick")._groups[0],d=c&&Object.keys(c).length,f=function(t){sl(c[t]).on("mouseover",(function(n,i){r.style("opacity",.9),r.text(a[t]).style("left",n.pageX+"px").style("top",n.pageY-28+"px")})).on("mouseout",(function(t){r.style("opacity",0)}))};for(l=0;l<d;l++)f(l)}function Ls(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 Vs(t,n,i,e,r,o){var u=ic(t),a=lc(t,r),l=a[0],s=a[1];if(o){var c=oc(l,s,r);l-=c.start,s+=c.end}var d=n.left,f=i-n.right;return e?{dStartValue:u?1:s,dEndValue:u?-1:l,rStartValue:d,rEndValue:f}:{dStartValue:u?-1:l,dEndValue:u?1:s,rStartValue:d,rEndValue:f}}function Ds(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function Ns(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 Ts(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 Os(t,n,i,e,r,u,a,l){var s,c,d;if(void 0===r&&(r=[]),[Ql.AreaChart,Ql.LineChart,Ql.ScatterChart].includes(u)){if(c=(s=lc(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===Ql.ScatterChart){var f=oc(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 Es(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){uc(t.y,e)&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}}function Fs(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 Bs(t,n){if(void 0!==n&&n===ns.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 Ps,_s,Hs=function(t,n){if(n)switch(typeof t){case"string":return ts.StringAxis;case"number":return ts.NumericAxis;default:return ts.DateAxis}else switch(typeof t){case"string":return ns.StringAxis;case"number":return ns.NumericAxis;default:return ns.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"}(Ps||(Ps={})),function(t){t[t.dottedLine=0]="dottedLine"}(_s||(_s={}));var Is=((Jl={})[Ps.circle]={widthRatio:1},Jl[Ps.square]={widthRatio:1},Jl[Ps.triangle]={widthRatio:1},Jl[Ps.diamond]={widthRatio:1},Jl[Ps.pyramid]={widthRatio:1},Jl[Ps.hexagon]={widthRatio:2},Jl[Ps.pentagon]={widthRatio:1.168},Jl[Ps.octagon]={widthRatio:2.414},Jl),Ws=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 Rs(t){return ps(t,!0)}var $s=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)},zs=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))},js=function(t,n){return"number"==typeof t||"number"==typeof n};function Ys(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Xs(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 Gs=/var\((--[a-zA-Z0-9\-]+)\)/g;function Us(t,n){var i=getComputedStyle(t);return n.replace(Gs,(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 Zs={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Ks=p("measurement_span_");function Js(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 Qs=/(category|total|sum|min|max|mean|median) (ascending|descending)/,tc=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(Qs);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 nc(t,n){var i=n.semanticColors.bodyText;return vs(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function ic(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 ec,rc=function(t){return"log"===t?ta():Gu()},oc=function(t,n,i){if("log"===i)return{start:.5*t,end:n};var e=.1*(n-t);return{start:e,end:e}},uc=function(t,n){return"number"!=typeof t||"log"!==n||t>0},ac=function(t,n){return!Il(t)&&!Il(n)},lc=function(t,n){var i=function(t){return uc(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}))}))]},sc=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=lc(n,u),c=s[0],d=s[1],f=oc(+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=Es(n,0,o,g),m=y.startValue,b=y.endValue,x=oc(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)},cc=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},dc=function(t,n,i,e){var r="number"==typeof i?i:0;if("log"!==t){if("number"==typeof n&&n>0)return cc(r,n,e)}else{if("number"==typeof n&&n>0)return cc(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=Nl(n.slice(1))?Number(n.slice(1)):0;if("L"===o&&u>0)return cc(r,u,e)}}},fc=function(t,n,i,e){var r=n instanceof Date?n:new Date(hs);if("number"==typeof t&&t>0)return cc(+r,t,i.map((function(t){return+t}))).map((function(t){return new Date(t)}));if("string"==typeof t){var o=t[0],u=Nl(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)}},vc=function(t,n){if(null!==n){var i=n instanceof Date?n.getTime():n;if(t[i])return{x:n,values:t[i]}}},hc=i(357),pc={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"},gc={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"]]},yc={default:gc,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"]]}},mc=Object.values(gc),bc=Object.values(pc),xc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},wc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=mc[(t+n)%mc.length];return xc(e,i)},Mc=function(t,n){if(void 0===n&&(n=!1),bc.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=yc[e][r];return xc(o,n)}return[t,t]};function Cc(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 kc(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=Cc(t,t[i],n[i]))}(t,{componentDidMount:Ac,componentDidUpdate:Sc,componentWillUnmount:Lc})}function Ac(){Vc(this.props.componentRef,this)}function Sc(t){t.componentRef!==this.props.componentRef&&(Vc(t.componentRef,null),Vc(this.props.componentRef,this))}function Lc(){Vc(this.props.componentRef,null)}function Vc(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function Dc(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"}(ec||(ec={}));var Nc,Tc=u.createContext(void 0),Oc="data-is-focusable",Ec="data-focuszone-id",Fc="tabindex",Bc="data-no-vertical-wrap",Pc="data-no-horizontal-wrap",_c=999999999,Hc=-999999999;function Ic(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 Wc,Rc={},$c=new Set,zc=["text","number","password","email","tel","url","search","textarea"],jc=!1,Yc=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,jc)}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,jc);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!==ec.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==ec.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==ec.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==ec.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!==ec.vertical&&c._shouldWrapFocus(c._activeElement,Pc)?((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,Bc)?_c:Hc},kc(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 $c.size},n._onKeyDownCapture=function(t){9===t.which&&$c.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),Rc[this._id]=this,i){for(var e=b(i,jc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(D(e)){this._isInnerZone=!0;break}e=b(e,jc)}this._isInnerZone||($c.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,jc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,jc))&&(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 Rc[this._id],this._isInnerZone||($c.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=$(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:z((Nc||(Nc=(0,q.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),Nc),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(Oc)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=Rc[i.getAttribute(Ec)];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(Oc)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Ic(i,n),!0;i=b(i,jc)}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 Rc[t.getAttribute(Ec)];for(var n=t.firstElementChild;n;){if(D(n))return Rc[n.getAttribute(Ec)];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===ec.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,Bc)?_c:Hc:((-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,Bc)?_c:Hc:((-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,Pc);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!==ec.vertical?o=e.right-r.right:i||(o=Hc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Pc);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!==ec.vertical?o=r.left-e.left:i||(o=Hc),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===ec.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,jc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(D(n))return n;n=b(n,jc)}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(Oc)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(Fc)&&e.setAttribute(Fc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(Fc)&&e.setAttribute(Fc,"0"))):(e.getAttribute&&"false"===e.getAttribute(Oc)&&e.setAttribute(Fc,"-1"),V(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(Fc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(Fc)&&e.setAttribute(Fc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(Fc)&&e.setAttribute(Fc,"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&&zc.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&&Dc(t,this._root.current)},n.prototype._getDocument=function(){return(0,M.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:ec.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=Tc,n}(u.Component);function Xc(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"}(Wc||(Wc={}));var Gc,Uc=(0,a.Z)(),qc=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=Uc(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement(jn,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,$(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),Zc=(0,r.I)(qc,(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"}(Gc||(Gc={}));var Kc,Jc,Qc=(0,a.Z)(),td=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 Wc.Parent:return e._tooltipHost.current.parentElement;case Wc.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=zt(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=zt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!Xc(a))return}if(!t.target||!Dc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==Gc.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 Gc.medium:return 300;case Gc.long:return 500;default:return 0}},kc(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=Qc(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:j({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},$(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(Zc,(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:Gc.medium},n.contextType=Ft,n}(u.Component),nd={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},id=(0,r.I)(td,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(nd,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),ed=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&&Xc(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(id,{overflowMode:Wc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},Ws(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),rd=(0,a.Z)(),od=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=rd(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=rd(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(Yc,{direction:ec.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(ed,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(Yc,{direction:ec.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(jn,(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,Ws(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(hc.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])||wc(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=Ws(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])||wc(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])||wc(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},Rs(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),ud=(0,r.I)(od,(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}}})),ad={host:"ms-HoverCard-host"},ld=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),j(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"}(Kc||(Kc={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(Jc||(Jc={}));var sd,cd={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"}(sd||(sd={}));var dd=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},fd=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function vd(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function hd(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 pd={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},gd=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=$t(),v=!!u.useContext(Tc),h=null===(i=Bn(!1))||void 0===i||i,p=F(pd,t),g=Wt({hasFocus:!1,focusStackId:vd("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,T=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&&O(t)}),[]),_=hd((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=hd((function(t){if(gd.focusStack=gd.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=hd((function(t){if(!b&&g.focusStackId===gd.focusStack.slice(-1)[0]){var n=fd(t);n&&!w(a.current,n)&&(d&&dd(d)===d.body?setTimeout((function(){d&&dd(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){gd.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||dd(d);return x||w(a.current,t)||_(),function(){return I(t)}}}),[M,b]),u.useEffect((function(){if(!b&&T)return Vt(a.current)}),[b,T,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},$(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=fd(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=dd(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})))}));gd.displayName="FocusTrapZone",gd.focusStack=[];var yd,md=function(t){return u.createElement(jn,(0,o.Cl)({},t),u.createElement(gd,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},bd=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)({},$(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(md,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement(jn,(0,o.Cl)({},g),h))},xd=(0,a.Z)(),wd=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),kc(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=xd(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===sd.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(bd,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),Md=(0,r.I)(wd,(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)(cd,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"}),Cd={root:"ms-PlainCard-root"},kd=(0,a.Z)(),Ad=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)},kc(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=kd(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(bd,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),Sd=(0,r.I)(Ad,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(Cd,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),Ld=(0,a.Z)(),Vd=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:sd.compact,openMode:"keydown"===t.type?Kc.hotKey:Kc.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:sd.compact,openMode:Kc.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:sd.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)))},kc(i),i._async=new Nt(i),i._events=new ld(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:sd.compact,openMode:Kc.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:sd.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:sd.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=Ld(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},$(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===Kc.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===Jc.expanding?u.createElement(Md,(0,o.Cl)({},M)):u.createElement(Sd,(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:Jc.expanding},n}(u.Component),Dd=(0,r.I)(Vd,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(ad,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(yd||(yd={}));var Nd=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}}}},Td=u.createContext({isMeasured:!1}),Od={position:"fixed",visibility:"hidden"},Ed={position:"relative"};function Fd(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 Bd={isMeasured:!0},Pd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(Nd),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Tt(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(Fd,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===yd.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===yd.vertical?i.height:i.width}),o);d(l)}),n.current)})),Ot(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=$(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:Ed},f&&!v&&u.createElement("div",{style:Od,ref:d},u.createElement(Td.Provider,{value:Bd},p(a))),u.createElement("div",{ref:c,style:v?Od:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));Pd.displayName="ResizeGroupBase";var _d,Hd=Pd;!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"}(_d||(_d={}));var Id=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?_d.PERSISTED_KEYTIP_ADDED:_d.KEYTIP_ADDED;ld.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||ld.raise(this,_d.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?_d.PERSISTED_KEYTIP_REMOVED:_d.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||ld.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){ld.raise(this,_d.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){ld.raise(this,_d.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){ld.raise(this,_d.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}(),Wd=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},Rd=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]}},$d=function(t){var n=Id.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&&(Rd(i,e),Wd(n,i,t))})),u.useEffect((function(){return Wd(n,i,t),function(){Rd(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},zd=(0,a.Z)(),jd=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=zd(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},$(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($d,(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($d,(0,o.Cl)({},t,{className:p.overflowButton})))}));jd.displayName="OverflowSet";var Yd,Xd={flexShrink:0,display:"inherit"},Gd=(0,r.I)(jd,(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",Xd],overflowButton:["ms-OverflowSet-overflowButton",Xd]}}),void 0,{scope:"OverflowSet"}),Ud=((Yd={})["".concat(Ps[Ps.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",Yd["".concat(Ps[Ps.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",Yd["".concat(Ps[Ps.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Yd["".concat(Ps[Ps.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Yd["".concat(Ps[Ps.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",Yd["".concat(Ps[Ps.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",Yd["".concat(Ps[Ps.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",Yd["".concat(Ps[Ps.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",Yd["".concat(_s[_s.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",Yd),qd=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(Ud).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},Ys(n),{transform:"rotate(".concat(e===Ps[Ps.diamond]?45:e===Ps[Ps.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:Ud[e]},Ys(i))))};function Zd(t,n,i,e){return void 0===i&&(i=!1),void 0===e&&(e={}),new Promise((function(r,u){if(!t)return u(new Error("Chart container is not defined"));try{var a="string"==typeof e.background?Us(t,e.background):"transparent",l=function(t,n,i,e){var r=t.querySelector("svg");if(!r)throw new Error("SVG not found");for(var u=sl(r.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),a=r.getElementsByTagName("*"),l=u.node().getElementsByTagName("*"),s=["text"],c=["table","thead","tbody","tr","th","td"],d=0;d<a.length;d++){var f=a[d].tagName.toLowerCase();s.includes(f)||c.includes(f)?qs((0,o.fX)((0,o.fX)([],Kd,!0),Jd,!0),a[d],l[d]):qs(Kd,a[d],l[d])}a=null,l=null;var v=r.getBoundingClientRect(),h=v.width,p=v.height,g="function"==typeof n?n(h,i):{node:null,width:0,height:0},y=Math.max(h,g.width),m=p+g.height;g.node&&(sl(g.node).attr("transform","translate(0, ".concat(p,")")),u.append((function(){return g.node}))),u.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y).attr("height",m).attr("fill",e),u.attr("width",y).attr("height",m).attr("viewBox","0 0 ".concat(y," ").concat(m)).attr("direction",i?"rtl":"ltr");var b={node:u.node(),width:y,height:m};return u=null,b}(t,n,i,a);if(!l.node)return u(new Error("SVG node is null"));var s=(new XMLSerializer).serializeToString(l.node);l.node=null;var c="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),nf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),tf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(s)));s=null,function(t,n){return void 0===n&&(n={}),new Promise((function(i,e){var r=n.scale||1,o=n.width||300,u=n.height||150,a=r*o,l=r*u,s=document.createElement("canvas"),c=new Image;s.width=a,s.height=l,c.onload=function(){var t=s.getContext("2d");if(!t)return e(new Error("Canvas context is null"));t.clearRect(0,0,a,l),t.drawImage(c,0,0,a,l);var n=s.toDataURL("image/png");i(n)},c.onerror=function(t){e(t)},c.src=t}))}(c,{width:e.width||l.width,height:e.height||l.height,scale:e.scale}).then(r).catch(u),c=null}catch(t){return u(t)}}))}var Kd=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],Jd=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],Qd={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};var tf=/^[\da-f]{2}$/i,nf=/^[\da-f]{4}$/i,ef=(0,a.Z)(),rf=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=sl(Ka("svg:g").call(document.documentElement)),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o,g,y,m,b=(o=t[i].title,g=a,y=e,(m=document.getElementById(Ks))||((m=document.createElement("span")).setAttribute("id",Ks),m.setAttribute("aria-hidden","true"),y?y.appendChild(m):document.body.appendChild(m)),m.setAttribute("class",g),Object.assign(m.style,Zs),m.textContent="".concat(o),m),x=29+b.getBoundingClientRect().width+8,w=s.append("g");f.push({elem:w,width:x}),c+x>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:w,width:x}],c=u?0:12,d+=32);var M=r[t[i].title]||p;w.append("rect").attr("x",c+(l?x-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),w.append("text").attr("x",c+(l?x-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",M?1:.67).text(t[i].title).call((function(t){return qs(Qd,b,t.node())})),c+=x},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}))}))}return{node:s.node(),width:Math.max.apply(Math,h),height:d}}(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(Yc,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(Gd,(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=ef(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(Yc,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:ec.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=ef(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(Dd,{type:Jc.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){return 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=ef(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=ef(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){return t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Hd,{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:$(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(qd,{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),of=(0,r.I)(rf,(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 uf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function af(t){return function(){return t}}function lf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function sf(t){return t}Array.prototype.slice;const cf=Math.abs,df=Math.atan2,ff=Math.cos,vf=Math.max,hf=Math.min,pf=Math.sin,gf=Math.sqrt,yf=1e-12,mf=Math.PI,bf=mf/2,xf=2*mf;function wf(t){return t>=1?bf:t<=-1?-bf:Math.asin(t)}function Mf(){var t=sf,n=lf,i=null,e=af(0),r=af(xf),o=af(0);function u(u){var a,l,s,c,d,f=(u=uf(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(xf,Math.max(-xf,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:af(+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:af(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:af(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:af(+t),u):o},u}const Cf=Math.PI,kf=2*Cf,Af=1e-6,Sf=kf-Af;function Lf(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class Vf{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Lf:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Lf;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>Af)if(Math.abs(c*a-l*s)>Af&&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((Cf-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>Af&&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)>Af||Math.abs(this._y1-s)>Af)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%kf+kf),d>Sf?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>Af&&this._append`A${i},${i},0,${+(d>=Cf)},${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 Df(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 Vf(n)}function Nf(t){return t.innerRadius}function Tf(t){return t.outerRadius}function Of(t){return t.startAngle}function Ef(t){return t.endAngle}function Ff(t){return t&&t.padAngle}function Bf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/gf(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)*gf(vf(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,T=L-y;return V*V+D*D>N*N+T*T&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-d,x11:k*(r/w-1),y11:A*(r/w-1)}}function Pf(){var t=Nf,n=Tf,i=af(0),e=null,r=Of,o=Ef,u=Ff,a=null,l=Df(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-bf,p=o.apply(this,arguments)-bf,g=cf(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>yf)if(g>xf-yf)a.moveTo(v*ff(h),v*pf(h)),a.arc(0,0,v,h,p,!y),f>yf&&(a.moveTo(f*ff(p),f*pf(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>yf&&(e?+e.apply(this,arguments):gf(f*f+v*v)),V=hf(cf(v-f)/2,+i.apply(this,arguments)),D=V,N=V;if(L>yf){var T=wf(L/f*pf(S)),O=wf(L/v*pf(S));(k-=2*T)>yf?(M+=T*=y?1:-1,C-=T):(k=0,M=C=(h+p)/2),(A-=2*O)>yf?(x+=O*=y?1:-1,w-=O):(A=0,x=w=(h+p)/2)}var E=v*ff(x),F=v*pf(x),B=f*ff(C),P=f*pf(C);if(V>yf){var _,H=v*ff(w),I=v*pf(w),W=f*ff(M),R=f*pf(M);if(g<mf)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<yf))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var $=E-_[0],z=F-_[1],j=H-_[0],Y=I-_[1],X=1/pf(((d=($*j+z*Y)/(gf($*$+z*z)*gf(j*j+Y*Y)))>1?0:d<-1?mf:Math.acos(d))/2),G=gf(_[0]*_[0]+_[1]*_[1]);D=hf(V,(f-G)/(X-1)),N=hf(V,(v-G)/(X+1))}else D=N=0}A>yf?N>yf?(m=Bf(W,R,E,F,v,N,y),b=Bf(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,df(m.y01,m.x01),df(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,df(m.y01,m.x01),df(m.y11,m.x11),!y),a.arc(0,0,v,df(m.cy+m.y11,m.cx+m.x11),df(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,df(b.y11,b.x11),df(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>yf&&k>yf?D>yf?(m=Bf(B,P,H,I,f,-D,y),b=Bf(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,df(m.y01,m.x01),df(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,D,df(m.y01,m.x01),df(m.y11,m.x11),!y),a.arc(0,0,f,df(m.cy+m.y11,m.cx+m.x11),df(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,D,df(b.y11,b.x11),df(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-mf/2;return[ff(e)*i,pf(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:af(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:af(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:af(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:af(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:af(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:af(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:af(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var _f=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)}}},Hf=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?zu(".0%")(0===s?0:g/s):Rs(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return If(t),null},n.prototype.updateChart=function(t){If(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(_f,{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&&(window.location.href=t)},n.defaultProps={arc:Pf()},n}(u.Component);function If(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Wf,Rf,$f,zf=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)}}},jf=(0,a.Z)(),Yf=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:wc(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:wc(n,0,i.props.theme.isInverted)[1]),u.createElement(Hf,{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=Mf().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,r=this._pieForFocusRing(e),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=jf(zf,{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=jf(zf,{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:Mf().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),Xf=(0,a.Z)(),Gf=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Zd(e._rootElem,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])||wc(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?ls(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):ss(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},kc(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(){this._rootElem&&this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40})},n.prototype.componentDidUpdate=function(t){var n,i,e;Xs(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=Xf(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=Math.min(this.state._width-s,this.state._height-c)/2,f=this._elevateToMinimums(a),v=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,f):"";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){return 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(Yc,{direction:ec.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},u.createElement(Yf,{width:this.state._width,height:this.state._height,outerRadius:d,innerRadius:this.props.innerRadius,data:f,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(v),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels}))),u.createElement(jn,(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,Ws(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(hc.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},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!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])||wc(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(of,(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);!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"}(Wf||(Wf={})),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"}(Rf||(Rf={})),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"}($f||($f={}));var Uf=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",top:"0px",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},qf=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:Rf.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},Zf=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)}},Kf=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},Jf=(0,r.I)(Gf,(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%"},axisAnnotation:qf(i,i.fonts.small)}}));function Qf(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 tv(t){return t[0]}function nv(t){return t[1]}function iv(t,n){var i=af(!0),e=null,r=hl,o=null,u=Df(a);function a(a){var l,s,c,d=(a=uf(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?tv:af(t),n="function"==typeof n?n:void 0===n?nv:af(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:af(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:af(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:af(!!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 ev=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||!Dc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==Gc.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 Gc.medium:return 300;case Gc.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(Zc,(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:Gc.medium},n}(u.Component),rv=(0,a.Z)(),ov=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),uv=[Ql.HorizontalBarChartWithAxis,Ql.HeatMapChart,Ql.VerticalStackedBarChart,Ql.GanttChart,Ql.ScatterChart],av=function(t){function n(n){var i,e,r,a,s,c,d,f,v,h,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,T,O,E,F,B,P,_,H=t.call(this,n)||this;H.minLegendContainerHeight=32,H._isRtl=(0,l.jI)(),H._isFirstRender=!0,H._removalValueForTextTuncate=0,H.isIntegralDataset=!0,H.calculateMaxYAxisLabelLength=function(t){return As(H.props.stringDatasetForYAxisDomain.map((function(t){return n=t,H.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,H.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},H._multiValueCallout=function(t){var n=H._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:H._classNames.calloutContentRoot},u.createElement("div",{className:H._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:H._classNames.calloutContentX},Ws(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,H.props.culture,H.props.useUTC))),u.createElement("div",{className:H._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,e){var r=i+1===e.length,a=t.shouldDrawBorderBottom,l=void 0!==a&&a;return u.createElement("div",(0,o.Cl)({},Ws(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),H._getCalloutContent(t,i,n,r))})),!!t.descriptionMessage&&u.createElement("div",{className:H._classNames.descriptionMessage},t.descriptionMessage)))},H._getData=function(t,n,i){H.props.getGraphData&&H.props.getGraphData(t,n,H.state.containerHeight-H._removalValueForTextTuncate,H.state.containerWidth,H.xAxisElement,H.yAxisElement,i)},H._onChartLeave=function(){H.props.onChartMouseLeave&&H.props.onChartMouseLeave()},H._calculateChartMinWidth=function(){var t=H._calcMaxLabelWidthWithTransform(H._tickValues)+10,n=H.margins.left+H.margins.right+t*(H._tickValues.length-1);return[Ql.GroupedVerticalBarChart,Ql.VerticalBarChart,Ql.VerticalStackedBarChart].includes(H.props.chartType)&&(n+=16),n},H._getChartDescription=function(){return(H.props.chartTitle||"Chart. ")+H._getAxisTitle("X",H.props.xAxisTitle,H.props.xAxisType)+H._getAxisTitle("Y",H.props.yAxisTitle,H.props.yAxisType||ns.NumericAxis)+(H.props.secondaryYScaleOptions?H._getAxisTitle("secondary Y",H.props.secondaryYAxistitle,ns.NumericAxis):"")},H._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===ts.StringAxis||i===ns.StringAxis?"categories":i===ts.DateAxis||i===ns.DateAxis?"time":"values"))+". "},H._calcMaxLabelWidthWithTransform=function(t){if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===ts.StringAxis){var n=As(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(H.props.showXAxisLablesTooltip){var i=t.map((function(t){var n=H.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),e=As(i,".".concat(H._classNames.xAxis," text"));return Math.ceil(e)}if(H.props.wrapXAxisLables){var r=[];t.forEach((function(t){r.push.apply(r,t.toString().split(/\s+/))}));var o=As(r,".".concat(H._classNames.xAxis," text"));return Math.max(Math.ceil(o),10)}var u=As(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(u)},H._transformXAxisLabels=function(){var t,n,i;if(H._removalValueForTextTuncate=0,H.props.wrapXAxisLables||H.props.showXAxisLablesTooltip){var e=void 0;H.props.xAxisType===ts.StringAxis&&(e=((null===(t=H.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?H._xScale.step():H.state.containerWidth);var r={node:H.xAxisElement,xAxis:H._xScale,showXAxisLablesTooltip:H.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:H.props.noOfCharsToTruncate||4,width:e};H._removalValueForTextTuncate=null!==(n=function(t){var n=t.node,i=t.xAxis,e=t.noOfCharsToTruncate,r=t.showXAxisLablesTooltip,o=t.width,u=void 0===o?10:o;if(null!==n){var a=sl(n).call(i),l=0,s=1;if(a.selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i="".concat(t.text().slice(0,e),"..."),o=t.text().length,a=t.text().split(/\s+/).reverse(),l="",c=[],d=0,f=t.attr("y"),v=parseFloat(t.attr("dy")),h=t.text(null).append("tspan").attr("x",0).attr("y",f).attr("id","BaseSpan").attr("dy",v+"em").attr("data-",n);if(r&&o>e)h=t.append("tspan").attr("id","showDots").attr("x",0).attr("y",f).attr("dy",v+"em").text(i);else if(r&&o<=e)h=t.append("tspan").attr("id","LessLength").attr("x",0).attr("y",f).attr("dy",v+"em").text(n);else for(;l=a.pop();)c.push(l),h.text(c.join(" ")),h.node().getComputedTextLength()>u&&c.length>1&&(c.pop(),h.text(c.join(" ")),c=[l],h=t.append("tspan").attr("id","WordBreakId").attr("x",0).attr("y",f).attr("dy",1.1*++d+v+"em").text(l));s=Math.max(s,d+1)})),!r){var c=12,d=document.getElementById("WordBreakId"),f=d&&d.getBoundingClientRect(),v=f&&f.height;v>c&&(c=v),l=(s-1)*c}return l>0?l:0}}(r))&&void 0!==n?n:0}if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===ts.StringAxis){var o=null!==(i=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:H.xAxisElement,xAxis:H._xScale}))&&void 0!==i?i:0;H._removalValueForTextTuncate=o+H.margins.bottom}},H.state={containerHeight:0,containerWidth:0,_width:H.props.width||600,_height:H.props.height||350,startFromX:0},H.idForGraph=p("chart_"),H.titleMargin=8,H.idForDefaultTabbableElement=p("defaultTabbableElement_"),H._tooltipId=p("tooltip_"),H.margins={top:null!==(e=null===(i=H.props.margins)||void 0===i?void 0:i.top)&&void 0!==e?e:20,bottom:null!==(a=null===(r=H.props.margins)||void 0===r?void 0:r.bottom)&&void 0!==a?a:35,right:H._isRtl?null!==(c=null===(s=H.props.margins)||void 0===s?void 0:s.left)&&void 0!==c?c:40:(null!==(f=null===(d=H.props.margins)||void 0===d?void 0:d.right)&&void 0!==f?f:null===(v=H.props)||void 0===v?void 0:v.secondaryYScaleOptions)?40:20,left:H._isRtl?(null!==(g=null===(h=H.props.margins)||void 0===h?void 0:h.right)&&void 0!==g?g:null===(y=H.props)||void 0===y?void 0:y.secondaryYScaleOptions)?40:20:null!==(b=null===(m=H.props.margins)||void 0===m?void 0:m.left)&&void 0!==b?b:40};var I=24;return void 0!==H.props.xAxisTitle&&""!==H.props.xAxisTitle&&(H.margins.bottom=null!==(w=null===(x=H.props.margins)||void 0===x?void 0:x.bottom)&&void 0!==w?w:H.margins.bottom+20),void 0!==H.props.yAxisTitle&&""!==H.props.yAxisTitle&&(H.margins.left=H._isRtl?(null!==(C=null===(M=H.props.margins)||void 0===M?void 0:M.right)&&void 0!==C?C:null===(k=H.props)||void 0===k?void 0:k.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I:null!==(S=null===(A=H.props.margins)||void 0===A?void 0:A.left)&&void 0!==S?S:H.margins.left+I,H.margins.right=H._isRtl?null!==(V=null===(L=H.props.margins)||void 0===L?void 0:L.left)&&void 0!==V?V:H.margins.left+I:(null!==(N=null===(D=H.props.margins)||void 0===D?void 0:D.right)&&void 0!==N?N:null===(T=H.props)||void 0===T?void 0:T.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I),void 0!==H.props.xAxisAnnotation&&""!==H.props.xAxisAnnotation&&(H.margins.top=null!==(E=null===(O=H.props.margins)||void 0===O?void 0:O.top)&&void 0!==E?E:H.margins.top+20),void 0===H.props.yAxisAnnotation||""===H.props.yAxisAnnotation||void 0!==H.props.secondaryYAxistitle&&""!==H.props.secondaryYAxistitle||(H._isRtl?H.margins.left=null!==(B=null===(F=H.props.margins)||void 0===F?void 0:F.right)&&void 0!==B?B:H.margins.right+I:H.margins.right=null!==(_=null===(P=H.props.margins)||void 0===P?void 0:P.right)&&void 0!==_?_:H.margins.right+I),H}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),uv.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===ns.StringAxis){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(),uv.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===ns.StringAxis){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();var L=(0,o.Cl)({},this.margins);uv.includes(this.props.chartType)&&(this._isRtl?L.right+=this.state.startFromX:L.left+=this.state.startFromX),this.props.getmargins&&this.props.getmargins(L),this._classNames=rv(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 V,D,N,T,O,E=null,F=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var B={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,this.state.startFromX),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.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform,tickStep:null===(a=this.props.xAxis)||void 0===a?void 0:a.tickStep,tick0:null===(l=this.props.xAxis)||void 0===l?void 0:l.tick0},P=void 0,_=void 0;switch(this.props.xAxisType){case ts.NumericAxis:P=(t=ys(B,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,_=t.tickValues;break;case ts.DateAxis:P=(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.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=u?Au():ku();m.domain([l.dStartValue,l.dEndValue]).range([l.rStartValue,l.rEndValue]).nice();var b=null!=h?h:6,x=100,w=-1,M=r?je(r):void 0;m.ticks().forEach((function(t){var n=ms(t,u);n>w&&(w=n),n<x&&(x=n)}));var C=null!=e?e:(0,Yn.c2)(x,w),k=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])}(x,w,M,u),A=function(t,e){return o?o(t):r?k(t):void 0===i&&n.tickFormat?u?Ge(n.tickFormat)(t):Xe(n.tickFormat)(t):(0,Yn.Yn)(t,i,u,!1,C)},S=p(m.ticks().map(A))+40,L=m.range(),V=L[0],D=L[1],N=Math.min(Math.max(1,Math.floor(Math.abs(D-V)/S)),10);b=Math.min(N,null!=h?h:b);var T,O=ni(m).tickSize(v).tickPadding(d).ticks(b).tickFormat(A);[Ql.GanttChart].includes(a)&&O.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?T=n.tickValues:g&&(T=fc(g,y,m.domain(),u)),T&&O.tickValues(T),s&&sl(s).call(O).selectAll("text").attr("aria-hidden","true");var E=(null!=T?T:m.ticks(b)).map(O.tickFormat());return{xScale:m,tickValues:E}}(B,this.props.tickParams,C,k,A,S,this.props.useUTC,this.props.chartType)).xScale,_=n.tickValues;break;case ts.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=Ou().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),y=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var m=[],b=y.map((function(t){return p([t])})),x=0,w=v,M=1,C=g.range();C[1]-C[0]<0&&(x=v,w=0,M=-1);for(var k=y.length-1;k>=0;k--){var A=g(y[k]);M*(A-M*b[k]/2-x)>=0&&M*(A+M*b[k]/2-w)<=0&&(m.push(y[k]),w=A-M*(b[k]/2+10))}y=m=m.reverse()}var S=ni(g).tickSize(u).tickPadding(l).tickValues(y);return t.xAxisElement&&sl(t.xAxisElement).call(S).selectAll("text").attr("aria-hidden","true"),{xScale:g,tickValues:y}}(B,this.props.tickParams,this.props.datasetForXAxisDomain),P=i.xScale,_=i.tickValues;break;default:P=(e=ys(B,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,_=e.tickValues}this._xScale=P,this._tickValues=_,this._transformXAxisLabels();var H={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,tickStep:null===(s=this.props.yAxis)||void 0===s?void 0:s.tickStep,tick0:null===(c=this.props.yAxis)||void 0===c?void 0:c.tick0},I=void 0,W=void 0,R={yAxisDomainValues:[]};if(this.props.yAxisType&&this.props.yAxisType===ns.StringAxis)I=this.props.createStringYAxis(H,this.props.stringDatasetForYAxisDomain,this._isRtl,this.props.barwidth,this.props.chartType);else{if(null===(d=this.props)||void 0===d?void 0:d.secondaryYScaleOptions){var $={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===(f=this.props.secondaryYScaleOptions)||void 0===f?void 0:f.yMinValue)||0,yMaxValue:null!==(h=null===(v=this.props.secondaryYScaleOptions)||void 0===v?void 0:v.yMaxValue)&&void 0!==h?h:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(m,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};W=this.props.createYAxis($,this._isRtl,R,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}I=this.props.createYAxis(H,this._isRtl,R,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}if(uv.includes(this.props.chartType)&&this.props.yAxisType===ns.StringAxis){if(!this.props.showYAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showYAxisLablesTooltip){I&&(V=this.yAxisElement,D=I,N=this.props.noOfCharsToTruncate||4,T=this.props.showYAxisLablesTooltip||!1,O=this._isRtl,null!==V&&sl(V).call(D).selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i=O?"...".concat(t.text().slice(0,N)):"".concat(t.text().slice(0,N),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy"));t.text(null).append("tspan").attr("x",o).attr("y",r).attr("id","BaseSpan").attr("dy",u+"em").attr("data-",n),T&&e>N?t.append("tspan").attr("id","showDots").attr("x",o).attr("y",r).attr("dy",u+"em").attr("dx","0em").text(i):t.append("tspan").attr("id","LessLength").attr("x",o).attr("y",r).attr("dx","0em").text(n)})));var z=sl(this.yAxisElement).call(I);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var j={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:z};z&&Ss(j)}}this.props.getAxisData&&this.props.getAxisData(R),this._getData(P,I,W),F=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:P,yScalePrimary:I,yScaleSecondary:W})),!this.props.hideTooltip&&y.isCalloutVisible&&(E=this._generateCallout(y,x))}var Y,X={width:this.state.containerWidth,height:this.state.containerHeight};Y=this.props.focusZoneDirection===ec.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:ec.horizontal;var G=X.width-this.margins.left-this.margins.right-this.state.startFromX,U=X.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-this.titleMargin,q={wrapContent:ks,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){return p.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(Yc,(0,o.Cl)({direction:Y,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},w),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:X.width,height:X.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},Ys(M)),u.createElement("g",{ref:function(t){p.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat(X.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement(ev,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+this.state.startFromX+G/2,y:X.height-this.titleMargin,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:G},q)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&u.createElement(ev,(0,o.Cl)({content:this.props.xAxisAnnotation,textProps:{x:this.margins.left+this.state.startFromX+G/2,y:this.titleMargin+3,className:this._classNames.axisAnnotation,textAnchor:"middle","aria-hidden":!0},maxWidth:G},q)),u.createElement("g",{ref:function(t){p.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?X.width-this.margins.right-this.state.startFromX:this.margins.left+this.state.startFromX,", 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+this.state.startFromX:X.width-this.margins.right-this.state.startFromX,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement(ev,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:(U-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:X.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat(X.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:U},q))),F,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement(ev,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:(U-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?X.width-this.margins.right/2+this.titleMargin:this.margins.left/2-this.titleMargin,textAnchor:"middle",transform:"translate(0,\n ".concat(X.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:U},q)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement(ev,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:(U-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:X.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat(X.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:U},q)))),!this.props.hideLegend&&u.createElement("div",{ref:function(t){return p.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),E&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},E))},n.prototype._generateCallout=function(t,n){return u.createElement(jn,(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(ov,(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=rv(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(qd,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:Ps[t.index%Object.keys(Is).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),lv=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}(),sv=(0,r.I)(av,(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"},d],chartWrapper:(0,o.Cl)({},b?{overflow:"auto"}:{}),axisTitle:qf(f,f.fonts.xSmall),axisAnnotation:qf(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"}}},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&&!lv&&{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:Uf(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c)}})),cv=(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 dv(t,n){return cv(t)(n)}var fv=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)},vv=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},hv="spacer-",pv=1/3,gv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},yv=function(t){return t.getBoundingClientRect()},mv=yv,bv=yv,xv=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)},kc(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=bv(this._scrollElement),f=fv(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 vv(this._scrollElement,u);case 2:return void vv(this._scrollElement,g-d.height);case 3:return void vv(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&&vv(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 ld(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=$(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?dv(r,this._onRenderSurface):this._onRenderSurface;return(u?dv(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:z("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)({},gv),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(hv+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=hv+"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)({},gv),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=fv(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*pv)&&(a=this._surfaceRect=mv(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=wv(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=wv(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 wv(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 Mv=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},Ys(i)))},Cv=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(jn,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(Yc,{isCircularNavigation:!0,direction:ec.vertical},u.createElement(xv,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var d=t.textColor?ss(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(Mv,{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)},kv=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?ss(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(Cv,{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 Av(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 Sv,Lv=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(Sv||(Sv={}));var Vv=wi((function(t){return t.x})).left,Dv=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 Zd(null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){return o===ts.NumericAxis?Vs(t,n,i,r,c.props.xScaleType,c._hasMarkersMode):o===ts.DateAxis?Os(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=ic(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?ls(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):ss(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=Es(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=oc(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?Sv.hoverSize:1===n||i?2.5*a:Sv.invisibleSize:l===t?Sv.hoverSize:Sv.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(Is).length:0,d=Is[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=Es(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=ss(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(Qf(e)[0],document.getElementById(c._rectId)),u=Vv(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(Hs(r[t].data[0].x,!0)){case ts.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 ts.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=vc(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=vc(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=vc(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. ")},kc(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=Cs(c._points)||{},c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._tooltipId=p("LineChartTooltipId_"),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)&&Xs(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=Cs(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=Ls(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=Cs(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(sv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:Ql.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:xs,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?ts.DateAxis:ts.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Ms,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(kv,(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:Ps[r.index%Object.keys(Is).length]})})),d=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=ss(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(of,(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,T,O,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=Lv(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?sc({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(ac(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,Tt=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:[],Ot=null===(l=at._points[t].lineOptions)||void 0===l?void 0:l.curve;if((at.props.optimizeLargeData||Ot)&&at._points[t].data.length>1){for(var Et=iv().x((function(t){return it._xAxisScale(t[0])})).y((function(t){return gt(t[1])})).curve(Js(Ot)).defined((function(t){return ac(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 $t=(null===(d=at._points[t].lineOptions)||void 0===d?void 0:d.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;$t>0&<.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())+$t,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 zt=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:zt?"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"))||!Wt)for(It=0;It<at._points[t].data.length;It++){var jt=at._points[t].data[It],Yt=jt.x,Xt=jt.y;if(Ct=at._xAxisScale(Yt instanceof Date?Yt.getTime():Yt),kt=gt(Xt),ac(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,Tt,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(ac(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===(T=at._points[t].data[n-1])||void 0===T?void 0:T.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(O=at._points[t].data[n-1])||void 0===O?void 0:O.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;ac(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(ac(y,m)&&ac(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===($=at._points[t].lineOptions)||void 0===$?void 0:$.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;Lt>0&<.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:x,strokeLinecap:null!==(j=null===(z=at._points[t].lineOptions)||void 0===z?void 0:z.strokeLinecap)&&void 0!==j?j:"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=iv().x((function(t){return Qt(t)})).y((function(t){return gt(t.y)})).curve(Js(Ot)).defined((function(t){return ac(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,Av({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);if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var st=sl(t).call(this._xAxisScale);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var ct={tooltipCls:ot.tooltip,id:this._tooltipId,axis:st};st&&Ss(ct)}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),Nv=(0,r.I)(Dv,(function(t){return{tooltip:Uf(t.theme),markerLabel:Kf(t.theme)}})),Tv=(0,a.Z)(),Ov=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("ScatterChartTooltipId_")}),[]),f=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),v=u.useRef(lt(t.data.scatterChartData)),h=u.useMemo((function(){return Cs(v.current)||{}}),[v]),g=u.useRef(""),y=u.useRef(""),m=u.useRef(null),b=u.useMemo((function(){return[]}),[]),x=u.useRef(null),w=u.useRef([]),M=u.useRef(0),C=u.useRef(null),k=u.useRef(null),A=u.useState(""),S=A[0],L=A[1],V=u.useState(""),D=V[0],N=V[1],T=u.useState([]),O=T[0],E=T[1],F=u.useState([]),B=F[0],P=F[1],_=u.useState(!1),H=_[0],I=_[1],W=u.useState(""),R=W[0],$=W[1],z=u.useState(),j=z[0],Y=z[1],X=u.useState(!1),G=X[0],U=X[1],q=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),Z=q[0],K=q[1],J=u.useState(""),Q=J[0],tt=J[1],nt=u.useRef(void 0),it=u.useRef(!1),et=u.useRef(!1),rt=Tv(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;nt.current&&!Xs(nt.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&K((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),nt.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 t,n;return{chartContainer:null!==(n=null===(t=C.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Zd(null===(n=C.current)||void 0===n?void 0:n.chartContainer,null===(i=k.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);var ot=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?Hs(t.data.scatterChartData[0].data[0].x,!0):ts.StringAxis,ut=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?ns.StringAxis:ns.NumericAxis,at=u.useRef([]);function lt(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?ls(n,0):ss(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){v.current===lt(t.data.scatterChartData)&&t.data===v.current||(at.current=lt(t.data.scatterChartData))}),[t.height,t.width,t.data,v]);var st=u.useCallback((function(t){x.current=t}),[]);function ct(){P([]),I(!1)}function dt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?K(n):K(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ft=u.useCallback((function(n,i){var e=t.theme;return R===i?e.semanticColors.bodyBackground:n}),[R,t]),vt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===ts.NumericAxis?Vs(n,i,e,o,t.xScaleType,!0):u===ts.DateAxis?Os(n,i,e,o,l,r):Ts(i,e,o)}),[t.xScaleType]),ht=u.useCallback((function(n,i,e,r,o){m.current=r;var u=i instanceof Date?(0,Yn.Yn)(i,t.culture,t.useUTC):i,a=vc(h,i);a?(sl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,i))+M.current,", 0)")})).attr("visibility","visibility"),b.forEach((function(t){t.index===n&&(U(!0),L(e||""+u),tt("#".concat(r)),E(a.values),$(r))}))):$(r)}),[c,g,M,h,b,t.culture,t.useUTC]),pt=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=vc(h,n);d?(sl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,n))+M.current,", ").concat(null===(e=y.current)||void 0===e?void 0:e.call(y,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=y.current)||void 0===l?void 0:l.call(y,i)))),m.current!==o&&(m.current=o,U(!0),L(r||""+s),tt("#".concat(o)),E(d.values),Y(d),$(o))):$(o)}),[c,g,M,h,t.culture,t.useUTC]),gt=u.useCallback((function(){sl("#".concat(c)).attr("visibility","hidden")}),[c]),yt=u.useCallback((function(){m.current=null,$(""),G&&U(!1)}),[m,G,$,U]),mt=u.useCallback((function(){return Z.length>0?Z:D?[D]:[]}),[Z,D]),bt=u.useCallback((function(){return 0===mt().length}),[mt]),xt=u.useCallback((function(t){return mt().includes(t)}),[mt]),wt=u.useCallback((function(n,i){var e,r,o=null===(e=v.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,".")}),[v,t.culture,t.useUTC]),Mt=u.useCallback((function(n,i){var e,r,l,c,f,h,p,m,b,w,C,k,A,S,L,V,D,N,T,O,E,F,P,_,I,W,$,z,j,Y,X,G,U,q,Z=[];v.current=H?B:lt(t.data.scatterChartData),ot===ts.StringAxis&&(M.current=(null===(e=g.current)||void 0===e?void 0:e.bandwidth())/2);for(var K=fi(v.current,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),J=ot!==ts.StringAxis&&ut!==ns.StringAxis?sc({data:v.current,xScale:g.current,yScalePrimary:y.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,Q=function(t){for(var n=[],e=null===(c=null===(l=v.current)||void 0===l?void 0:l[t])||void 0===c?void 0:c.legend,r=null===(h=null===(f=v.current)||void 0===f?void 0:f[t])||void 0===h?void 0:h.color,d=i-(null!==(m=null===(p=x.current)||void 0===p?void 0:p.bottom)&&void 0!==m?m:0)+6,B=function(i){var l=null===(A=null===(k=v.current)||void 0===k?void 0:k[t])||void 0===A?void 0:A.data[i],c=l.x,f=l.y,h=l.xAxisCalloutData,p=l.xAxisCalloutAccessibilityData,m=null===(S=g.current)||void 0===S?void 0:S.call(g,c),b=ut===ns.StringAxis?(null===(L=y.current)||void 0===L?void 0:L.call(y,f))+((null===(V=y.current)||void 0===V?void 0:V.bandwidth)?y.current.bandwidth()/2:0):null===(D=y.current)||void 0===D?void 0:D.call(y,f);if(!ac(m,b))return"continue";var x,w="".concat(s,"_").concat(t,"_").concat(i),C="".concat(a,"_").concat(t,"_").concat(i),B=(null===(T=null===(N=v.current)||void 0===N?void 0:N[t])||void 0===T?void 0:T.data[i]).markerSize,j=B&&0!==K?ot!==ts.StringAxis?B*J/K:4+(B-4)/(K-4)*12:R===C?6:4,Y=xt(e)||bt()||H,X=(null===(E=null===(O=v.current)||void 0===O?void 0:O[t])||void 0===E?void 0:E.hideNonActiveDots)&&R!==C,G=null===(P=null===(F=v.current)||void 0===F?void 0:F[t].data[i])||void 0===P?void 0:P.text;et.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:C,key:C,r:Math.max(j,4),cx:m+M.current,cy:b,"data-is-focusable":Y,onMouseOver:function(t){return pt(c,f,d,h,C,p,t)},onMouseMove:function(t){return pt(c,f,d,h,C,p,t)},onMouseOut:gt,onFocus:function(){return ht(w,c,h,C,p)},onBlur:gt},(x=null===(W=null===(I=null===(_=v.current)||void 0===_?void 0:_[t])||void 0===I?void 0:I.data[i])||void 0===W?void 0:W.onDataPointClick)?{onClick:x}:{},{opacity:Y&&!X?1:.1,fill:ft(r,C),stroke:r,role:"img","aria-label":wt(t,i),tabIndex:""!==(null===(z=null===($=v.current)||void 0===$?void 0:$[t])||void 0===z?void 0:z.legend)?0:void 0})))),et&&G&&n.push(u.createElement("text",{key:"".concat(C,"-label"),x:m+M.current,y:b+Math.max(j+12,16),className:rt.markerLabel},G))},Q=0;Q<(null===(C=null===(w=null===(b=v.current)||void 0===b?void 0:b[t])||void 0===w?void 0:w.data)||void 0===C?void 0:C.length);Q++)B(Q);it.current&&n.push.apply(n,Av({xAxisScale:g.current,yAxisScale:y.current,className:rt.markerLabel||"",lineOptions:null===(Y=null===(j=v.current)||void 0===j?void 0:j[t])||void 0===Y?void 0:Y.lineOptions})),Z.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(X=v.current)||void 0===X?void 0:X.length," with ").concat(null===(q=null===(U=null===(G=v.current)||void 0===G?void 0:G[t])||void 0===U?void 0:U.data)||void 0===q?void 0:q.length," data points.")},n))},tt=(null===(r=v.current)||void 0===r?void 0:r.length)-1;tt>=0;tt--)Q(tt);if(!t.showXAxisLablesTooltip)try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}if(!t.wrapXAxisLables&&t.showXAxisLablesTooltip){var nt=sl(n).call(g.current);try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}var at={tooltipCls:rt.tooltip,id:d,xAxis:nt};nt&&Ss(at)}return Z}),[g,y,t.data.scatterChartData,t.showXAxisLablesTooltip,t.wrapXAxisLables,a,wt,ft,ht,pt,gt,xt,bt,s,d,ot,ut,R,H,B,rt,t.xScaleType,t.yScaleType]),Ct=u.useCallback((function(t,n,i,e,r){g.current=t,y.current=n,it.current=ic(v.current),et.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}))}(v.current),w.current=Mt(r,i)}),[w,g,y,Mt]),kt=u.useCallback((function(n,i){var e=Es(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=oc(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),At=t.legendProps,St=t.tickValues,Lt=t.tickFormat;v.current=lt(t.data.scatterChartData);var Vt=v.current;At&&At.canSelectMultipleLegends&&(Vt=B.length>=1?B:v.current,h=Cs(Vt));var Dt=null;t.hideLegend||et.current||(Dt=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(){N("")},hoverAction:function(){yt(),N(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(of,(0,o.Cl)({legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:ct},{onChange:dt},t.legendProps))}(v.current));var Nt=(0,o.Cl)({isCalloutVisible:G,directionalHint:3,YValueHover:O,hoverXValue:S,id:"toolTip".concat(m.current),target:Q,isBeakVisible:!1,gapSpace:15,onDismiss:function(){U(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&G),descriptionMessage:t.getCalloutDescriptionMessage&&j?t.getCalloutDescriptionMessage(j):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Tt={tickValues:St,tickFormat:Lt},Ot=v.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Ot));var Et=function(){var n;if(ut!==ns.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=v.current.length-1;e>=0;e--){var r=v.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 tc((n={},v.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(sv,(0,o.Cl)({},t,{ref:C,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Vt,chartType:Ql.ScatterChart,calloutProps:Nt,tickParams:Tt,legendBars:Dt,getmargins:st,getMinMaxOfYAxis:kt,getDomainNRangeValues:vt,createYAxis:xs,createStringYAxis:Ms,getGraphData:Ct,xAxisType:ot,yAxisType:ut},ut===ns.StringAxis?{stringDatasetForYAxisDomain:Et}:{},{onChartMouseLeave:yt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:C},it.current?{yMaxValue:1,yMinValue:-1}:{},{children:function(t){return g.current=t.xScale,y.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,w.current)))}})):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Ov.displayName="ScatterChart";var Ev=(0,r.I)(Ov,(function(t){return{tooltip:Uf(t.theme),markerLabel:Kf(t.theme)}}));function Fv(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 Bv(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function Pv(t,n){return t[n]}function _v(t){const n=[];return n.key=t,n}function Hv(t){return t<0?-1:1}function Iv(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(Hv(o)+Hv(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Wv(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Rv(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 $v(t){this._context=t}function zv(t){this._context=t}function jv(t){return new $v(t)}function Yv(t,n,i){var e=null,r=af(!0),o=null,u=hl,a=null,l=Df(s);function s(s){var c,d,f,v,h,p=(s=uf(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 iv().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?tv:af(+t),n="function"==typeof n?n:af(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?nv:af(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:af(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:af(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:af(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:af(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:af(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:af(+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:af(!!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}$v.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:Rv(this,this._t0,Wv(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,Rv(this,Wv(this,i=Iv(this,t,n)),i);break;default:Rv(this,this._t0,i=Iv(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 zv(t)}.prototype=Object.create($v.prototype)).point=function(t,n){$v.prototype.point.call(this,n,t)},zv.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 Xv,Gv=(0,a.Z)(),Uv=wi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(Xv||(Xv={}));var qv=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 Zd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return Es(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ts.NumericAxis?Vs(t,n,i,r):o===ts.DateAxis?Os(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(Qf(t)[0],document.getElementById(e._rectId)),r=Uv(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?Hs(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 ts.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 ts.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=vc(e._calloutPoints,l),b=c===ts.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:Xv.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:Xv.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:Xv.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=af([]),n=Bv,i=Fv,e=Pv;function r(r){var o,u,a=Array.from(t.apply(this,arguments),_v),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=uf(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:af(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:af(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?Bv:"function"==typeof t?t:af(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?Fv: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?Es(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=Cs(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=Cs(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(of,(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=Js(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,jv),k=Yv().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=iv().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;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),Ys(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},Ys(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},Ys(f))));var p=Gv(e.props.styles,{theme:e.props.theme});if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(a).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:p.tooltip,id:e._tooltipId,axis:g};g&&Ss(y)}return 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?ls(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):ss(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=vc(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. ")},kc(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:Xv.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._tooltipId=p("AreaChartTooltipID"),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;Xs(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=Ls(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(sv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:Ql.AreaChart,calloutProps:v,legendBars:d,createYAxis:xs,isCalloutForStack:!0,xAxisType:c?ts.DateAxis:ts.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Ms,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),Zv=(0,r.I)(qv,(function(t){return{tooltip:Uf(t.theme)}})),Kv=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)}}},Jv=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){th(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 th(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return Kv(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:Pf()},n}(u.Component),Qv=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=Pf().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 Kv(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(ev,{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:ks}))},n}(Jv);function th(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var nh,ih=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(Qv,{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(ls(c,0,null==l?void 0:l.isInverted));var d=this.props.colors,f=void 0===d?s:d;this.colors=Tu().range(f.map((function(t){return ss(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(Yc,{direction:ec.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:Mf().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),eh=(0,a.Z)(),rh=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=eh(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(ih,{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),oh=(0,r.I)(rh,(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"}(nh||(nh={}));var uh,ah=(0,a.Z)(),lh=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=ah(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])||wc(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])||wc(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(of,(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=ah(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(jn,(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,Ws(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(hc.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===nh.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===nh.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])||wc(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])||wc(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=ah(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!==nh.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"},Rs(L)))}var V=void 0!==e&&e,D=this.props.variant!==nh.AbsoluteScale&&!V&&2===t.chartData.length,N=this.props.variant!==nh.AbsoluteScale&&!V&&1===t.chartData.length,T=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(Yc,{direction:ec.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(ed,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),D&&u.createElement("div",(0,o.Cl)({},Ws(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},T()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Ws(t.chartDataAccessibilityData,"text",!1)),T()))),u.createElement(Yc,{direction:ec.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&&(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),sh=(0,r.I)(lh,(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===nh.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===nh.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!==nh.AbsoluteScale||c?0:40}}})),ch=(0,a.Z)(),dh=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=ch(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(Yc,{direction:ec.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(ed,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},Ws(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},Ws(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(Yc,{direction:ec.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(jn,(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,Ws(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(hc.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=ch(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])||wc(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])||wc(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=ch(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(of,(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&&(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),fh=(0,r.I)(dh,(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)}}})),vh=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]]}},hh=function(t,n,i){var e=vh(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)))},ph=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},gh=function(t,n){return t+n/(1-n)*(t-1)},yh=function(t,n,i){return t*gh(n,i)},mh=function(t,n,i){return t/gh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(uh||(uh={}));var bh=(0,a.Z)(),xh=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 Zd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){return o===ts.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===ts.DateAxis?Os(t,n,i,r,a,e):Ts(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===ts.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=iv().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){return 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?uh.show:uh.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:uh.show,radius:8}:e._legendHighlighted(n)?{visibility:uh.show,radius:.3}:{visibility:uh.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(hc.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(hc.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===ts.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===ts.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?wc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||wc(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===ts.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]),js(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===ts.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=Ou().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])||wc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=wc(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(of,(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=ph(t,e.margins,8);if(e._xAxisType===ts.StringAxis){if(js(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=$s(e.props.barWidth,e.props.maxBarWidth),u>=(f=yh(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=mh(u,r.length,e._xAxisInnerPadding),l=$s(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=yh(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=As(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=yh(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=$s(e.props.barWidth,e.props.maxBarWidth,hh(r,ph(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!==ts.StringAxis?[]:tc(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},kc(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._tooltipId=p("VCTooltipID_"),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;Xs(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=bh(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),Ws(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(sv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:Ql.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:xs,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:ec.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:Ms,getmargins:this._getMargins,getMinMaxOfYAxis:Fs,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ts.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!js(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?Hs(this.props.data[0].x,!0):ts.StringAxis,this._points=this.props.data||[],this._barWidth=$s(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:zs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ts.StringAxis?2/3:.5),this._xAxisOuterPadding=zs(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=bh(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])||wc(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])||wc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=wc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=wc(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))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Ss(h)}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=bh(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=$s(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])||wc(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])||wc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=wc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=wc(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))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v,showTooltip:this.props.showXAxisLablesTooltip};v&&Ss(h)}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=bh(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])||wc(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])||wc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=wc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=wc(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))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Ss(h)}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){return this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted()?null:u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):Rs(i))},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),wh=(0,r.I)(xh,(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:Uf(i),barLabel:Zf(i)}})),Mh=(0,a.Z)(),Ch=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 Zd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){return o===ts.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===ts.DateAxis?Os(t,n,i,r,a,e):Ts(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!==ts.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!==ns.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!==ns.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){return 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===ts.StringAxis&&(e._barWidth=$s(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===ts.NumericAxis||(e._xAxisType,ts.DateAxis),r.xAxisPoint)),c=e._xAxisType!==ts.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===ns.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===ns.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])||wc(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])||wc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=V);var N={},T=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=Mh(e.props.styles,{theme:e.props.theme,shouldHighlight:T,href:e.props.href});var O,E=!v&&T&&{"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===ns.StringAxis)O=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,d,1),C=w-=O+F;else{O=Math.abs(m*t.data);var B=Math.max(m*b/100,d);O<B&&(O=B),t.data>=e.Y_ORIGIN?C=w-=O+F:M=(C=M+F)+O,f+=t.data,k=g===h.length-1?O:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&O>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(O-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){return N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):O<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:O,fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){return 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;return e.props.hideLabels||e._yAxisType===ns.StringAxis||(e._noLegendHighlighted()?(D=!0,N=f):h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(D=!0,N+=t.data)}))),u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){return S.refElement=t}},V),A),!e.props.hideLabels&&e._barWidth>=16&&D&&u.createElement("text",{x:l+e._barWidth/2,y:N>=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)")},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):Rs(N)))}}}));if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(r).call(t);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:g};g&&Ss(y)}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===ts.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 js(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===ts.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:Ou().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===ns.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=ph(t,e.margins,8);if(e._xAxisType===ts.StringAxis){if(js(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=$s(e.props.barWidth,e.props.maxBarWidth),i>=(r=yh(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=mh(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=$s(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=yh(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=As(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=$s(e.props.barWidth,e.props.maxBarWidth,hh(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=Hs(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=Hs(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===ns.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!==ts.StringAxis?[]:tc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==ns.StringAxis?[]:tc(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},kc(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._tooltipId=p("VSBCTooltipId_"),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;Xs(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=Mh(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),Ws(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(sv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:Ql.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:xs,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Ms,barwidth:this._barWidth,focusZoneDirection:r||n?ec.horizontal:ec.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ts.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!js(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(){this._points=this.props.data||[],this._barWidth=$s(this.props.barWidth,this.props.maxBarWidth);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.red,t.black],this._xAxisType=Hs(this.props.data[0].xAxisPoint,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=zs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ts.StringAxis?2/3:.5),this._xAxisOuterPadding=zs(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===ns.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(hc.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])||wc(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=f.concat(a);return u.createElement(of,(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&&(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===ns.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===ns.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),kh=(0,r.I)(Ch,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:Uf(e),barLabel:Zf(e)}})),Ah=(0,a.Z)(),Sh=.1,Lh=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 Zd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){return o===ts.NumericAxis||o===ts.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Ts(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=$s(e.props.barwidth,e.props.maxBarWidth,mh(l.bandwidth(),e._barLegends.length,Sh)),e._groupWidth=yh(e._barWidth,e._barLegends.length,Sh);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&&(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=yh(e._barWidth,d.length,Sh),v=Ou().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(Sh);if(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 c=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,v=(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:c}),u.createElement("stop",{offset:"100%",stopColor:v}))))}var m=.5*(r>0?2:0),M=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),C=n.color;n.data>=e.Y_ORIGIN?w=b-=M+m:x=(w=x+m)+M,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:M,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):C,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"})),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):Rs(y)))}})),!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var h=sl(l).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var g={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:h};h&&Ss(g)}return 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 Ou().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 Ou().domain(e._barLegends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(Sh)},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(of,(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=ph(t,e.margins,8);if(e._xAxisType===ts.StringAxis)if(js(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=$s(e.props.barwidth,e.props.maxBarWidth);var i=yh(e._barWidth,e._barLegends.length,Sh);n>=(r=yh(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=mh(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=mh(u,e._barLegends.length,Sh),l=$s(e.props.barwidth,e.props.maxBarWidth,a),s=(i=yh(l,e._barLegends.length,Sh),(n-(r=yh(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=As(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:ls(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=wc(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?ls(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted):ss(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!==ts.StringAxis?[]:tc(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=Qf(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}},kc(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._tooltipId=p("GVBCTooltipId_"),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;Xs(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._prepareChartData(),i=n.barData,e=n.lineData;this._xAxisType=Hs(i[0].name,!0);var r=this._createSet(i,e),a=r.barLegends,l=r.lineLegends,s=r.xAxisLabels,c=r.datasetForBars;this._barLegends=a,this._lineLegends=l,this._xAxisLabels=s,this._datasetForBars=c;var d=this._getLegendData();this._adjustProps();var f=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(f,this.props.yMaxValue||0),this._classNames=Ah(this.props.styles,{theme:this.props.theme,href:this.props.href});var v=(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}),Ws(this.state.callOutAccessibilityData,"text",!1)),h={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty(i,e)?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(sv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:Ql.GroupedVerticalBarChart,calloutProps:v,legendBars:d,xAxisType:this._xAxisType,createYAxis:xs,datasetForXAxisDomain:this._xAxisLabels,tickParams:h,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:Ms,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:ec.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ts.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("rect",{ref:t._rectRef,width:"100%",height:"100%",fill:"transparent",style:{pointerEvents:"none"}}),u.createElement("g",null,t._groupedVerticalBarGraph),t._createLines(e,n.xScale,n.yScalePrimary,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._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=$s(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=zs(this.props.xAxisInnerPadding,void 0,2/(2+gh(this._barLegends.length,Sh))),this._xAxisOuterPadding=zs(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),Vh=(0,r.I)(Lh,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:Uf(n),barLabel:Zf(n)}})),Dh=i(263),Nh=(0,a.Z)(),Th=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 Zd(null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,s){return u===ts.NumericAxis||u===ts.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Ts(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=nc(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(of,(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===ts.DateAxis?"".concat(t.getTime()):r._xAxisType===ts.StringAxis?t:r._xAxisType===ts.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===ns.DateAxis?"".concat(t.getTime()):r._yAxisType===ns.StringAxis?t:r._yAxisType===ns.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===ts.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===ts.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===ts.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===ns.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===ns.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===ns.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===ns.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===ns.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===ts.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===ts.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===ns.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===ns.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 zu(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()?tc(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===ts.DateAxis||r._xAxisType===ts.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?tc(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===ns.DateAxis||r._yAxisType===ns.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===ts.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===ts.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===ts.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===ts.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===ns.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},kc(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=Hs(i,!0),this._yAxisType=Hs(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=Nh(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}),Ws(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(sv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:Ql.HeatMapChart,xAxisType:ts.StringAxis,yAxisType:ns.StringAxis,calloutProps:g,createYAxis:xs,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:Ms,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:ec.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),Oh=(0,r.I)(Th,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),Eh=/[\{\}]/g,Fh=/\{\d+\}/g;function Bh(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(Fh,(function(t){var n=e[t.replace(Eh,"")];return null==n&&(n=""),n}))}function Ph(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 _h(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 Hh(t,n){return n-1-t.height}function Ih(t,n){return t.sourceLinks.length?t.depth:n-1}function Wh(t){return function(){return t}}function Rh(t,n){return zh(t.source,n.source)||t.index-n.index}function $h(t,n){return zh(t.target,n.target)||t.index-n.index}function zh(t,n){return t.y0-n.y0}function jh(t){return t.value}function Yh(t){return t.index}function Xh(t){return t.nodes}function Gh(t){return t.links}function Uh(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function qh({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 Zh(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=Yh,c=Ih,d=Xh,f=Gh,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=Uh(e,n)),"object"!=typeof r&&(r=i.target=Uh(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(Ph(n.sourceLinks,jh),Ph(n.targetLinks,jh)):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=_h(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)/(_h(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)/Ph(n,jh)));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),qh(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(zh),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(zh),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($h);for(const{target:{targetLinks:n}}of t)n.sort(Rh)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort($h),i.sort(Rh)}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 qh(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:Wh(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Wh(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:Wh(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:Wh(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 Kh{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 Jh=(0,a.Z)(),Qh="#757575",tp=[{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 np(t){return"number"==typeof t?t:t.nodeId}function ip(t,n){return t[np(n.source)][np(n.target)]}var ep="...";function rp(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 op,up,ap=Yv().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new Kh(t,!0)})),lp=function(t){function n(n){var i=t.call(this,n)||this;return i._isRtl=(0,l.jI)(),i._numColumns=0,i.toImage=function(t){return Zd(i.chartContainer,void 0,i._isRtl,t)},i._onCloseCallout=function(){i.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},i._onBlur=function(){},i._fillNodeColors=function(t){var n=i.state;if(!n.selectedState)return t.color;var e=n.selectedNode;return e&&n.selectedNodes.has(t.index)?e.color:e?void 0:t.color},i._fillNodeBorder=function(t){var n=i.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var e=n.selectedNode;return e?e.borderColor:t.borderColor}return t.borderColor}return t.borderColor},i._calculateChartMinWidth=function(){return i._margins.left+i._margins.right+124*i._numColumns+62*(i._numColumns-1)},kc(i),i.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},i._calloutId=p("callout"),i._linkId=p("link"),i._chartId=p("sankeyChart"),i._emptyChartId=p("_SankeyChart_empty"),i._labelTooltipId=p("tooltip"),i._margins={top:36,right:48,bottom:32,left:48},i._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),i._computeClassNames=(0,an.J9)((function(t,n){return Jh(t,n)})),i._normalizeData=(0,an.J9)((function(t,n,e,r,o){return i._normalizeSankeyData(t,n,e,r,o)})),i._fetchTooltip=(0,an.J9)((function(t){return i._labelTooltipDiv(t)})),i._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return Bh(n,t.name)}}}))(n.strings),i._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",e=(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 Bh(n,t.source.name,t.target.name,t.unnormalizedValue?i._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return Bh(e,t.name,i._formatNumber(n))}}}))(n.accessibility),i._nodeAttributes=(0,an.J9)((function(t,n){return i._computeNodeAttributes(t,n)})),i._fetchNodes=function(t,n,e,r){return i._createNodes(t,n,e,r)},i._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=np(t.source),o=e[r];o||(o={},e[r]=o),o[np(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),i._fetchLinks=function(t,n){return i._createLinks(t,n)},i}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){return t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(Yc,{direction:ec.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},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(jn,(0,o.Cl)({},k),u.createElement(hc.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=rp(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=rp(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=rp(t,ep);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+=ep;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===ep;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:Zh().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?Hh:Ih),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=np(t.source),e=n[i];e||(e={},n[i]=e),e[np(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=ip(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=ip(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=tp.map((function(t){return t.fillColor})),r=tp.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=ip(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:ap(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 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 Qh}return Qh},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.html(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),sp=(0,r.I)(lp,(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:Uf(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"}}}));function cp(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 dp(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=vp)):void 0===n&&(n=fp);for(var i,e,r,o,u,a=new gp(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 gp(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(pp)}function fp(t){return t.children}function vp(t){return Array.isArray(t)?t[1]:null}function hp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function pp(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function gp(t){this.data=t,this.depth=this.height=0,this.parent=null}function yp(t,n){return t.parent===n.parent?1:2}function mp(t){var n=t.children;return n?n[0]:t.t}function bp(t){var n=t.children;return n?n[n.length-1]:t.t}function xp(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 wp(t,n,i){return t.a.parent===n.parent?t.a:i}function Mp(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"}(op||(op={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(up||(up={})),gp.prototype=dp.prototype={constructor:gp,count:function(){return this.eachAfter(cp)},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 dp(this).eachBefore(hp)},[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)}},Mp.prototype=Object.create(gp.prototype);var Cp=(0,a.Z)(),kp=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=dp(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=yp,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new Mp(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 Mp(e[r],r)),i.parent=n;return(u.parent=new Mp(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=bp(a),o=mp(o),a&&o;)l=mp(l),(u=bp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(xp(wp(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!bp(u)&&(u.t=a,u.m+=d-c),o&&!mp(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 T=di(k=null===(a=d[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),O=fi(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,T,x.children[0].y,!1,h,p,g,O)}}},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}()),Ap=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=Cp(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 kp(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(Yc,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),Sp=(0,r.I)(Ap,(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 Lp(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 Vp=(0,a.Z)(),Dp=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=Yv().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=iv().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=Lp(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=Vp(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(Yc,{direction:ec.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),Np=(0,r.I)(Dp,(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 Tp(t,n,i,e){var r=t.semanticColors.bodyText,o=t.semanticColors.bodyBackground;if(!n)return o;var u=Us(n,i||r),a=Us(n,e||o),l=Eo(u),s=Eo(a);if(!l||!s)return a;if(vs(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 vs(l.formatHex(),c)>=3?c:o}var Op=(0,a.Z)(),Ep=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return Zd(i._rootElem,void 0,i._isRTL,t)},kc(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=Op(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var f,v=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&&v.add(e)}));var h=!1;if(1===v.size||2===v.size)for(var p=1===v.size?Array.from(v)[0]:Array.from(v)[1],g=0,y=e;g<y.length;g++){var m=y[g],b=null===(t=null==m?void 0:m.style)||void 0===t?void 0:t.color;if(b&&vs(b,p)>=3){f=p,h=!0;break}}return u.createElement("div",{ref:function(t){return n._rootElem=t},className:d.root,style:{height:l?"".concat(l,"px"):"650px",overflow:"hidden"}},u.createElement("svg",{width:null!=a?a:"100%",height:null!=l?l:"650px",className:d.chart},u.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:d.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 h?e.backgroundColor=f:(r||a)&&(e.backgroundColor=Tp(c,n._rootElem,r,a)),u.createElement("th",{key:i,className:d.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=Tp(c,n._rootElem,r,a)),u.createElement("td",{key:i,className:d.bodyCell,style:e},t.value)})))}))))))))},n}(u.Component),Fp=(0,r.I)(Ep,(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)})}})),Bp=(0,a.Z)(),Pp=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 Zd(null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){var s;return s=o===ts.NumericAxis?function(t,n,i,e,r,o){var u=Ns(Ds(t),o),a=u.longestPositiveBar,l=u.longestNegativeBar,s=e?n.left:n.left+r,c=e?i-n.right-r:i-n.right;return e?{dStartValue:a,dEndValue:Math.min(l,o),rStartValue:s,rEndValue:c}:{dStartValue:Math.min(l,o),dEndValue:a,rStartValue:s,rEndValue:c}}(t,n,i,r,l,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},s},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):ls(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=wc(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):ls(f,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(hc.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=Ds(d._points),a=Ns(u,d.X_ORIGIN);d._longestBarPositiveTotalValue=a.longestPositiveBar,d._longestBarNegativeTotalValue=a.longestNegativeBar;var l=d._yAxisType===ns.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===ns.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):ls(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=wc(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):ls(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=Ou().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._calculateAppropriateBarHeight=function(t,n,i){var e=vh(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!==ns.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):ls(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])||wc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=wc(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(of,(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===ns.StringAxis&&"default"!==d.props.yAxisCategoryOrder?tc(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},kc(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?Hs(d.props.data[0].x,!0):ts.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?Hs(d.props.data[0].y,!1):ns.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;Xs(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=Bp(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),Ws(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(sv,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:Ql.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:bs,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ws,getMinMaxOfYAxis:Bs,barwidth:this._barHeight,focusZoneDirection:ec.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=0,h=0,g=0,y=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,m=r.length-y,b=0,x=0,w=f.map((function(t,i){var e,r,o,c,f,w,M,C,k=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(k=s._isLegendHighlighted(t.legend)),s._classNames=Bp(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:k}),t.x>=s.X_ORIGIN&&++b,t.x<s.X_ORIGIN&&++x;var A,S=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}," ");A=d?s.props.colors?s._createColors()(1):ls(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):ls(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!d?t.color:A;if(s.props.enableGradient){var V=Math.max(s._points.findIndex((function(n){return n===t})),0);A=(null===(o=t.gradient)||void 0===o?void 0:o[0])||wc(V,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],L=(null===(f=t.gradient)||void 0===f?void 0:f[1])||wc(V,0,null===(w=s.props.theme)||void 0===w?void 0:w.isInverted)[1],d&&(A=wc(0,0,null===(M=s.props.theme)||void 0===M?void 0:M.isInverted)[0],L=wc(0,0,null===(C=s.props.theme)||void 0===C?void 0:C.isInverted)[1]),s._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(a(g+s.X_ORIGIN)-a(s.X_ORIGIN));g>s.X_ORIGIN?v+=N:h+=N;var T=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),O=T>2&&(t.x>s.X_ORIGIN&&b!==y||t.x<s.X_ORIGIN&&(0!==y||x>1))?2:0,E=T>2&&(t.x>s.X_ORIGIN&&(0!==m||b>1)||t.x<s.X_ORIGIN&&x!==m)?2:0,F=s.X_ORIGIN;return F=s._isRtl?t.x>s.X_ORIGIN?S-v:S+h:t.x>s.X_ORIGIN?S+v:S-h,g=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{key:t.y,x:F,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":k,width:T-(s._isRtl?E:O),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,A),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,A),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(D,")"):A}))}));return w},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=0,f=0,v=0,h=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,g=r.length-h,y=0,m=0,b=r.map((function(t,i){var e,r,s,b,x,w,M,C,k=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(k=l._isLegendHighlighted(t.legend)),l._classNames=Bp(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:k}),t.x>=l.X_ORIGIN&&++y,t.x<l.X_ORIGIN&&++m;var A,S=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}," ");A=c?l.props.colors?l._createColors()(1):ls(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):ls(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!c?t.color:A;if(l.props.enableGradient){var V=l._points.findIndex((function(n){return n===t}));A=(null===(s=t.gradient)||void 0===s?void 0:s[0])||wc(V,0,null===(b=l.props.theme)||void 0===b?void 0:b.isInverted)[0],L=(null===(x=t.gradient)||void 0===x?void 0:x[1])||wc(V,0,null===(w=l.props.theme)||void 0===w?void 0:w.isInverted)[1],c&&(A=wc(0,0,null===(M=l.props.theme)||void 0===M?void 0:M.isInverted)[0],L=wc(0,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[1]),l._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(o(v+l.X_ORIGIN)-o(l.X_ORIGIN));v>0?d+=N:f+=N;var T=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),O=T>2&&(t.x>l.X_ORIGIN&&y!==h||t.x<l.X_ORIGIN&&(0!==h||m>1))?2:0,E=T>2&&(t.x>l.X_ORIGIN&&(0!==g||y>1)||t.x<l.X_ORIGIN&&m!==g)?2:0;v=t.x;var F=l.X_ORIGIN;return F=l._isRtl?t.x>l.X_ORIGIN?S-d:S+f:t.x>l.X_ORIGIN?S+d:S-f,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:F,y:a(t.y),rx:l.props.roundCorners?3:0,width:T-(l._isRtl?E:O),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,A),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":k,onFocus:l._onBarFocus.bind(l,t,i,A),fill:l.props.enableGradient?"url(#".concat(D,")"):A}))}));return b},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),_p=(0,r.I)(Pp,(function(t){return{opacityChangeOnHover:{opacity:t.shouldHighlight?"":"0.1"},xAxisTicks:[]}}));function Hp(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 Ip=(0,a.Z)(),Wp=u.forwardRef((function(t,n){var i,e=p("FunnelChartTooltipId_"),r=p("_FunnelChart_empty"),a=(0,l.jI)(),s=u.useState(null),c=s[0],d=s[1],f=u.useState(!1),v=f[0],h=f[1],g=u.useState(null),y=g[0],m=g[1],b=u.useState(null),x=b[0],w=b[1],M=u.useState([]),C=M[0],k=M[1],A=u.useRef(null),S=u.useRef(null),L=_(t.data);function V(t,n){null==n||n.persist(),d(t.stage),m(t),h(!0),w(n.currentTarget)}function D(t,n,i){null==i||i.persist(),d(n.category),m({stage:t,value:n.value,color:n.color,category:n.category}),h(!0),w(i.currentTarget)}function N(){d(null),h(!1),m(null),w(null)}u.useEffect((function(){var n;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&k(t.legendProps.selectedLegends)}),[null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){return{chartContainer:null!=A?A:null,toImage:function(t){var n;return Zd(A.current,null===(n=S.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[]);var T=u.useCallback((function(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?k(n):k(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}),[t.legendProps]);function O(){return C.length>0?C:c?[c]:[]}function E(t){return O().includes(t)}function F(){return 0===O().length}function B(n,i){return"subValue"in n?{culture:t.culture,onMouseOver:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onMouseMove:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onFocus:function(t){return i=n.stage,e=n.subValue,null==(r=t)||r.persist(),m({stage:i,value:e.value,color:e.color,category:e.category}),h(!0),void w(r.currentTarget);var i,e,r},onBlur:function(){return N()},onMouseOut:function(){return N()}}:{culture:t.culture,onMouseOver:1===i?function(t){return V(n,t)}:void 0,onMouseMove:1===i?function(t){return V(n,t)}:void 0,onFocus:function(t){return function(t,n){null==n||n.persist(),m(t),h(!0),w(n.currentTarget)}(n,t)},onBlur:function(){return N()},onMouseOut:function(){return N()}}}function P(n){var i=n.key,e=n.pathD,r=n.fill,l=n.opacity,s=n.textProps,c=n.data,d=n.isFocusable,f=B(c,l),v=nc(r,t.theme);return u.createElement("g",{key:i},u.createElement("path",(0,o.Cl)({d:e,fill:r,opacity:l},f,{"data-is-focusable":d})),s&&u.createElement("g",(0,o.Cl)({},f),function(n){var i=n.show,e=n.x,r=n.y,o=n.value,l=n.textColor;if(!i)return null;var s=u.createElement("text",{x:a?z-e:e,y:r,textAnchor:"middle",alignmentBaseline:"middle",fill:l},(0,Yn.c$)(o.toString(),t.culture));return a?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-z,",0)")},s):s}((0,o.Cl)((0,o.Cl)({},s),{textColor:v}))))}function _(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function H(n,i,e,r,u){var a=u.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),l="vertical"===t.orientation?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,T=N?e*s+.33*s:(e+.5)*s;return m=N?C*(1-(T-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:T,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},u),{stages:a,i:e,k:r})):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,T=N+S,O=(s-h/a*s)/2+g,E=O+L;return e===o.length-1?(b=V+.25*(D-V),x=(N+T)/2,w=.5*(D-V)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(V+D)/2,x=(N+T+O+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(O,"\n L").concat(D,",").concat(E,"\n L").concat(V,",").concat(T,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},u),{stages:a,i:e,k:r})),s=B({stage:n.stage,subValue:i}),c=Hp((0,o.Cl)({availableWidth:l.availableWidth,minTextWidth:16,textX:l.textX,textY:l.textY,value:i.value},s));return P({key:"".concat(e,"-").concat(r),pathD:l.pathD,fill:i.color,opacity:_(t.data)&&E(i.category)||F()?1:.1,textProps:c,data:{stage:n.stage,subValue:i},isFocusable:!!(_(t.data)&&E(i.category)||F())})}var I=(0,o.Cl)({isCalloutVisible:v,directionalHint:3,id:"toolTip".concat(e),target:x,color:null==y?void 0:y.color,XValue:null==y?void 0:y.stage,YValue:null==y?void 0:y.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){h(!1)},preventDismissOnLostFocus:!0},t.calloutProps),W=t.width||350,R=t.height||500,$=Ip(t.styles,{theme:t.theme,className:t.className,chartWidth:W,chartHeight:R}),z=.8*W,j=(W-z)/2;return t.data&&t.data.length>0?u.createElement("div",{ref:A,className:$.root},u.createElement(Yc,{direction:ec.horizontal},u.createElement("svg",{width:W,height:R,className:$.chart,role:"img","aria-label":t.chartTitle},u.createElement("g",{transform:a?"translate(".concat(j+z,", ").concat(40,") scale(-1,1)"):"translate(".concat(j,", ").concat(40,")")},L?function(n,i){for(var e,r,o=t.data,u=o.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})),l=[],s={stages:o,totals:u,maxTotal:Math.max.apply(Math,u),funnelWidth:i,funnelHeight:.8*n,isRTL:a},c=0;c<o.length;c++)for(var d=o[c],f=0;f<(null!==(e=d.subValues)&&void 0!==e?e:[]).length;f++){var v=null===(r=d.subValues)||void 0===r?void 0:r[f];v&&l.push(H(d,v,c,f,s))}return l}(R-40,z):function(n,i){var e=t.data,r=i,u=.8*n;return e.map((function(n,i){var l="vertical"===t.orientation?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:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}):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:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}),s=l.pathD,c=l.textX,d=l.textY,f=l.availableWidth,v=B(n),h=Hp((0,o.Cl)({availableWidth:f,minTextWidth:16,textX:c,textY:d,value:n.value},v));return P({key:i,pathD:s,fill:n.color,opacity:E(n.stage)||F()?1:.1,textProps:h,data:n,isFocusable:!(!E(n.stage)&&!F())})}))}(R-40,z)),v&&u.createElement(jn,(0,o.Cl)({},I),u.createElement(hc.ChartHoverCard,{XValue:null==I?void 0:I.XValue,YValue:null==I?void 0:I.YValue,color:null==I?void 0:I.color})))),function(){if(t.hideLegend)return u.createElement(u.Fragment,null);var n;if(L){var i={};t.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in i||(i[t.category]=t.color)}))})),n=Object.entries(i).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return d(n)},onMouseOutAction:function(){return d(null)}}}))}else n=t.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return d(t.stage)},onMouseOutAction:function(){return d(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(of,(0,o.Cl)({ref:S,legends:n,centerLegends:!0,onChange:T},t.legendProps)))}()):u.createElement("div",{id:r,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Wp.displayName="FunnelChart",Wp.defaultProps={orientation:"vertical"};var Rp,$p,zp=(0,r.I)(Wp,(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},text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(Rp||(Rp={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}($p||($p={}));var jp=[{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}],Yp=(0,a.Z)(),Xp=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===$p.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===$p.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},Gp=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===Rp.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===Rp.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},Up=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Zd(e._rootElem,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=jp.length-1;t>=0;t-=1)if(e._outerRadius>=jp[t].minRadius)return{arcWidth:jp[t].arcWidth,chartValueSize:jp[t].fontSize};return{arcWidth:jp[0].arcWidth,chartValueSize:jp[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?ss(t.color,o.isInverted):ls(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:wc(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=Pf().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: "+Gp(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])||wc(n,0,e.props.theme.isInverted)[0]:t.color||ls(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(of,(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 "+Gp(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:Xp(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},Ws(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)({},Ws(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. ")},kc(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;Xs(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=Yp(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n}},u.createElement(Yc,{direction:ec.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("text",{x:0,y:-(this._outerRadius+11),textAnchor:"middle",className:this._classNames.chartTitle,"aria-hidden":!0},this.props.chartTitle),!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)},Rs(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)},Rs(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=Yp(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},Ws((0,o.Cl)({ariaLabel:Xp(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(ev,{content:Gp(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(ev,{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(jn,(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=Yp(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(qd,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:Ps[t.index%Object.keys(Is).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),qp=(0,r.I)(Up,(function(t){var n,i,e,r,u,a,l,s,c=t.theme,d=t.chartValueSize,f=t.className,v=t.lineColor,h=t.toDrawShape,p=t.solidFill,g=t.gradientFill,y=t.opacity;return{root:[c.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},f],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:d,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:c.palette.black,stroke:c.semanticColors.bodyBackground},chartTitle:{fontSize:It.s.small,fill:c.palette.neutralPrimary,selectors:(r={},r[It.up]={fill:"CanvasText"},r)},segment:{outline:"none",stroke:c.semanticColors.focusBorder,fill:p,fillOpacity:y},gradientSegment:{width:"100%",height:"100%",background:g,opacity:y},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:c.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",opacity:"0.85",color:c.semanticColors.bodySubtext})],calloutBlockContainer:[c.fonts.mediumPlus,{marginTop:"13px",color:c.semanticColors.bodyText},!h&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(v),paddingLeft:"8px"},h&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:c.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},c.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[c.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:c.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(c.semanticColors.menuDivider)}]}})),Zp=i(927),Kp=u.createContext(void 0),Jp=Array.prototype,Qp=Jp.slice;function tg(t){return()=>t}function ng(t){return t}function ig(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 eg(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 rg(t,n){this._context=t,this._k=(1-n)/6}Jp.map,rg.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:eg(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:eg(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 og=function t(n){function i(t){return new rg(t,n)}return i.tension=function(n){return t(+n)},i}(0),ug=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],ag=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],lg=[is.color1,is.warning,is.color8,is.color4,is.color7,is.color6,is.color2,is.color5,is.color9,is.color10],sg=[is.color26,is.warning,is.color5,is.error,is.color4,is.color17,is.color22,is.disabled,is.color10,is.color3];function cg(t,n){if(void 0===n&&(n=!1),!t||!Rl(t))return"others";var i=t.map((function(t){return t.toLowerCase()}));return n&&Xs(i,sg)?"d3":Xs(i,ug)?"plotly":"others"}function dg(t,n,i,e){if("plotly"!==n)return t;var r=ug,o=lg;e&&(r="plotly"===n?ug:ag,o="plotly"===n?lg:sg);var u=r.indexOf(t.toLowerCase());return-1!==u?ss(o[u],!!i):t}var fg=function(t,n,i,e,r){if(!n.current.has(t)){var o,u=r?"plotly"===i?lg:sg:lg;return o=n.current.size<u.length?ss(u[n.current.size],e):ls(n.current.size,0,e),n.current.set(t,o),o}return n.current.get(t)},vg=function(t,n,i,e,r,o){return"default"===n&&i?function(t,n,i,e,r){var o=[];if(n){var u=cg(t,r);if(Rl(n))n.forEach((function(t,n){var a=null==t?void 0:t.toString().trim(),l=fg("Label_".concat(n),i,u,e,r);if(a){var s=Eo(a);o.push(s?dg(s.formatHex(),u,e):l)}else o.push(l)}));else if("string"==typeof n){var a=Eo(n);return a?dg(a.formatHex(),u,e):fg("Label_0",i,u,e,r)}return o}}(t,i,e,r,o):void 0},hg=function(t,n,i,e,r,o,u){var a=cg(r,u);return t&&Rl(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:fg(i,e,a,o,u)},pg=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Rl(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},gg=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)&&Rl(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},yg="nonplot_",mg="repeat(1, 1fr)",bg={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 xg(t){var n,i,e,r,o,u,a,l,s,c,d,f;return{chartTitle:"string"==typeof(null==t?void 0:t.title)?t.title:null!==(i=null===(n=null==t?void 0:t.title)||void 0===n?void 0:n.text)&&void 0!==i?i:"",xAxisTitle:"string"==typeof(null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title)?null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title:null!==(a=null===(u=null===(o=null==t?void 0:t.xaxis)||void 0===o?void 0:o.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:""}}var wg=function(t,n){var i=Ag(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},Mg=function(t,n){var i=kg(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:zu(null==i?void 0:i.tickformat)}:{}},Cg=function(t,n){var i,e=null===(i=kg(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},kg=function(t,n){return null==n?void 0:n.yaxis},Ag=function(t,n){return null==n?void 0:n.xaxis},Sg=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,Yn.c$)(t)},Lg=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 Tl(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())}))},Vg=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))},Dg=function(t,n){var i,e,r,o,u,a,l=!1,s=!0;return t.forEach((function(t){if(Vg(t,n)){l=!0;var i=t.y;i&&(u=Math.min.apply(Math,i),a=Math.max.apply(Math,i)),("scatter"!==t.type||Zl(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}}):{}},Ng=function(t,n,i,e,r){var o=vg(t,n,i,e,r);return hg(o,0,"",e,t,r)},Tg=function(t,n,i,e,r){return null==t?"":n?t.toString():i?e?new Date(t):r?parseFloat(t):t:t},Og=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,Og(o,r))}return i},Eg=function(t,n,i,e,r,u){var a,l,s,c,d={},f=0,v=0,h=Dg(t.data,t.layout),p=Yg(t.data,t.layout,n),g=p.legends,y=p.hideLegend,m=void 0,b=Mg(t.data[0],t.layout);t.data.forEach((function(n,a){var l,s,c,h,p,y,x,w;m=gg(t.layout,n,m);var M=Pl(n.x),C=vg(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===(h=n.marker)||void 0===h?void 0:h.color,i,r),k=vg(null===(x=null===(y=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===y?void 0:y.layout)||void 0===x?void 0:x.colorway,e,null===(w=n.line)||void 0===w?void 0:w.color,i,r),A=n.x,S=El(A),L=_l(A),V=Fl(A),D=Gg(n);D.forEach((function(e,l){var s=e[0],c=e[1],h=n.x.slice(s,c),p=n.y.slice(s,c);h.forEach((function(e,s){var c,h,y,x,w,A,N,T,O,E,F,B;d[e]||(d[e]={xAxisPoint:Tg(e,M,L,S,V),chartData:[],lineData:[]});var P=g[a],_=m?m(Rl(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(y=null===(h=n.marker)||void 0===h?void 0:h.color)||void 0===y?void 0:y[s%(null===(x=n.marker)||void 0===x?void 0:x.color).length]:0):hg(C,s,P,i,null===(N=null===(A=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===A?void 0:A.layout)||void 0===N?void 0:N.colorway,r),H=pg(n,s),I=p[s],W=Sg(I,b);if("bar"===n.type)d[e].chartData.push({legend:P,data:I,color:null!==(T=Po(_).copy({opacity:H}).formatHex8())&&void 0!==T?T:_,yAxisCalloutData:W}),"number"==typeof I&&(f=Math.max(f,I));else if("scatter"===n.type||u){var R=hg(k,a,P,i,null===(F=null===(E=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,r),$=_g(n.line),z=jg(n);d[e].lineData.push({legend:P+(D.length>1?".".concat(l+1):""),legendShape:z,y:I,color:null!==(B=Po(R).copy({opacity:H}).formatHex8())&&void 0!==B?B:_,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=$?$:{}),{mode:n.mode}),useSecondaryYScale:Vg(n,t.layout),yAxisCalloutData:W}),Vg(n,t.layout)||"number"!=typeof I||(f=Math.max(f,I),v=Math.min(v,I))}}))}))}));var x=Object.values(d);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)({data:x,width:null===(a=t.layout)||void 0===a?void 0:a.width,height:null!==(s=null===(l=t.layout)||void 0===l?void 0:l.height)&&void 0!==s?s:350,barWidth:"auto",yMaxValue:f,yMinValue:v,mode:"plotly"},h),{hideTickOverlap:!0,hideLegend:y,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:"string"==typeof(null===(c=x[0])||void 0===c?void 0:c.xAxisPoint)}),xg(t.layout)),Zg(t.data,t.layout)),Cg(t.data[0],t.layout)),wg(t.data[0],t.layout)),b),Jg(t.data,t.layout)),ty(t.data,t.layout))},Fg=function(t,n,i,e,r,u){var a,l,s,c,d=["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),f="area"===i,v="scatter"===i,h=Dg(t.data,t.layout),p="tonexty",g=Yg(t.data,t.layout,n),y=g.legends,m=g.hideLegend,b=Mg(t.data[0],t.layout),x=t.data.map((function(n,i){var a,l,s,c,f,v,h,g,m,x,w,M=d?(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,C=vg(null===(h=null===(v=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r,M,e,u),k=n.x,A=_l(k),S=El(k),L=Fl(k),V=Pl(n.x),D=y[i],N=hg(C,i,D,e,null===(x=null===(m=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===m?void 0:m.layout)||void 0===x?void 0:x.colorway,u),T=pg(n,i);p="tozeroy"===n.fill?"tozeroy":"tonexty";var O=(null===(w=n.mode)||void 0===w?void 0:w.includes("text"))||"scatterpolar"===n.type?void 0:_g(n.line),E=jg(n);return Gg(n).map((function(i,e){var r,u,a,l,s,c,d,f,v,h,p,g=i[0],y=i[1],m=k.slice(g,y),x=n.y.slice(g,y),w=Rl(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(g,y):[],M=Rl(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,C=Array.isArray(n.text)?n.text.slice(g,y):void 0;return{legend:D,legendShape:E,data:m.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({x:Tg(t,V,A,S,L),y:x[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}:{}),M?{markerColor:M[i]}:{}),C?{text:C[i]}:{}),{yAxisCalloutData:Sg(x[i],b)})})),color:null!==(l=Po(N).copy({opacity:T}).formatHex8())&&void 0!==l?l:N,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=O?O:{}),{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:Vg(n,t.layout)}}))})).flat(),w=Cg(t.data[0],t.layout);if(void 0===w.yMinValue&&void 0===w.yMaxValue){var M=Es(x);w.yMinValue=M.startValue,w.yMaxValue=M.endValue}var C=x.reduce((function(t,n){return t+n.data.length}),0),k={lineChartData:x},A={scatterChartData:x},S=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},h),{width:null===(l=t.layout)||void 0===l?void 0:l.width,height:null!==(c=null===(s=t.layout)||void 0===s?void 0:s.height)&&void 0!==c?c:350,hideTickOverlap:!0,hideLegend:m,useUTC:!1,optimizeLargeData:C>1e3}),xg(t.layout)),wg(t.data[0],t.layout)),b),Qg(t.data,t.layout)),ty(t.data,t.layout));return f?(0,o.Cl)({data:k,mode:p},S):(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:v?A:k,roundedTicks:!0,enableReflow:!1},S),w),v?(0,o.Cl)({showYAxisLablesTooltip:!0},Zg(t.data,t.layout)):{})},Bg=function(t){return t.replace(/<[^&]*?>/g,"").replace(/<[^>]*>/g,"").replace(/<br>|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function Pg(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 _g(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),bg[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=og.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 Hg=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)}))},Ig=function(t){return t.x1-t.x0},Wg=function(t){return(t.x1+t.x0)/2},Rg=function(t,n,i,e){if(!t||0===t.length)return[];if(_l(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(Lp(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=ng,n=Lp,i=ig;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===Lp&&([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===Lp){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:tg(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:tg([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:tg(Array.isArray(t)?Qp.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)},$g=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}},zg=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}},jg=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"},Yg=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}},Xg=function(t,n){if(Rl(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Gg=function(t){if(!Rl(t.x)||!Rl(t.y))return[];for(var n=[],i=0,e=0;e<t.x.length;e++)(Il(t.x[e])||Il(t.y[e]))&&(e-i>0&&n.push([i,e]),i=e+1);return e-i>0&&n.push([i,e]),n},Ug=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},qg=function(t){return["donut","sankey","pie"].includes(t)},Zg=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){Il(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||_l(a)&&!Fl(a)&&!El(a))if(!(Rl(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]=r.categoryarray;else i[u]="data"})),i},Kg=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Jg=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||!Rl(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}},Qg=function(t,n){var i,e,r,o={},u=ey(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},ty=function(t,n){var i={},e=ey(t,n);return Object.keys(e).forEach((function(n){var r=e[n];if(r){var o=ry(t,n[0],r);if(r.tickmode&&"array"!==r.tickmode||!Rl(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 u=ny(r.dtick,o),a=iy(r.tick0,o,u);"x"===n?i.xAxis={tickStep:u,tick0:a}:"y"===n&&(i.yAxis={tickStep:u,tick0:a})}else{var l="date"===o?r.tickvals.map((function(t){return new Date(t)})):r.tickvals;"x"===n?i.tickValues=l:"y"===n&&(i.yAxisTickValues=l)}}})),i},ny=function(t,n){var i="log"===n,e="date"===n,r="category"===n,o=e?864e5:1;if(!t)return o;if(Nl(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=Nl(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},iy=function(t,n,i){return"date"===n?Tl(t)?new Date(t):new Date(hs):"D1"!==i&&"D2"!==i?Nl(t)?Number(t):0:void 0},ey=function(t,n){var i,e=new Set;t.forEach((function(t){var n=Ul(t);i=n.x,e.add(n.y)}));var r={};"number"==typeof i&&(r.x=null==n?void 0:n[ql("x",i)]);var o=Array.from(e).sort();return o.length>0&&(r.y=null==n?void 0:n[ql("y",o[0])]),o.length>1&&(r.y2=null==n?void 0:n[ql("y",o[1])]),r},ry=function(t,n,i){var e=[];return t.forEach((function(t){var i;null===(i=t[n])||void 0===i||i.forEach((function(t){Il(t)||e.push(t)}))})),Fl(e)?"log"===(null==i?void 0:i.type)?"log":"linear":El(e)?"date":_l(e)?"category":void 0},oy=function(t){var n,i,e=u.useRef(null),r=u.useRef(),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 uy(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(oy,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var ay=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(""),T=N[0],O=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],$=u.useState(""),z=$[0],j=$[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;Xs(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 Zd(null===(n=b.current)||void 0===n?void 0:n.chartContainer,null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);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?ss(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):ls(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var d=wc(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?Hs(K[0].x.start,!0):ts.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?Hs(K[0].y,!1):ns.StringAxis}),[K]),tt=u.useMemo((function(){return zs(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===ts.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=ms(i.x.start,a),r=ms(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!==ns.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():tc(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a,l){var s=[];t.forEach((function(t){s.push(t.x.start,t.x.end)}));var c=di(s)||0,d=fi(s)||0;return{dStartValue:r?d:c,dEndValue:r?c:d,rStartValue:n.left+(r?0:l),rEndValue:i-n.right-(r?l:0)}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===ts.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(hc.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:T?[T]:[]}),[T,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()),j(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(""),j(""),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===ns.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.abs(l-a),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){O(t)}),[]),Ct=u.useCallback((function(){O("")}),[]),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(of,(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!==ns.StringAxis&&(h.current=bt(hh(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:z,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(sv,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:Ql.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Dt,tickParams:Nt,legendBars:At(),createYAxis:bs,getDomainNRangeValues:ot,createStringYAxis:ws,getMinMaxOfYAxis:Bs,focusZoneDirection:ec.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Vt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));ay.displayName="GanttChart";var ly=(0,r.I)(ay,(function(t){return{}})),sy=uy(Jf),cy=uy(kh),dy=uy(Nv),fy=uy(_p),vy=uy(Zv),hy=uy(Oh),py=uy(sp),gy=uy(qp),yy=uy(Vh),my=uy(wh),by=uy(Ev),xy=uy(Fp),wy=uy(ly),My=function(t){var n=t.data[0].x,i=Bl(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:Lg(t.x)})}))),{data:e,layout:t.layout}},Cy={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=vg(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:Xg(w.values,n),index:n,color:A?k[n]:void 0}})).filter((function(t){return!Il(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:hg(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,T=40+(D?0:40),O=w.hole?w.hole*(Math.min(L-N,V-T)/2):1,E=xg(t.layout).chartTitle,F=Object.keys(C);return{data:{chartTitle:E,chartData:(F.length>1?(0,o.fX)([[F[0],C[F[0]]]],F.slice(1).reverse().map((function(t){return[t,C[t]]})),!0):F.map((function(t){return[t,C[t]]}))).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:O,hideLabels:D,showLabelsInPercent:!w.textinfo||["percent","label+percent"].includes(w.textinfo),roundCorners:!0,order:"sorted"}},renderer:sy},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y=t.data[0],m=y.link,b=y.node,x=(null!==(u=null==m?void 0:m.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return Il(t)||Il(null===(i=null==m?void 0:m.source)||void 0===i?void 0:i[n])||Il(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})),w=vg(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==b?void 0:b.color,i,r),M={nodes:null===(c=b.label)||void 0===c?void 0:c.map((function(n,e){var o,u,a;return{nodeId:e,name:n,color:hg(w,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:x.map((function(t,n){return(0,o.Cl)({},t)}))},C={root:(0,o.Cl)({},(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.size)?{fontSize:null===(v=t.layout.font)||void 0===v?void 0:v.size}:{})};return{data:{chartTitle:xg(t.layout).chartTitle,SankeyChartData:M},width:null===(h=t.layout)||void 0===h?void 0:h.width,height:null!==(g=null===(p=t.layout)||void 0===p?void 0:p.height)&&void 0!==g?g:468,styles:C,enableReflow:!1}},renderer:py},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,T=t.data[0],O=null!==(a=null===(u=T.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}}(T.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=O[0].map((function(t,n){return O.map((function(t,i){var e,r,u,a=t[n],l="string"==typeof a?Bg(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=zu(e)(t)}catch(n){u=Rs(t)}else u=Rs(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(l,i,E):l,c=Pg(null===(e=null==E?void 0:E.font)||void 0===e?void 0:e.color,n,i),d=Pg(null===(r=null==E?void 0:E.font)||void 0===r?void 0:r.size,n,i),f=Pg(null===(u=null==E?void 0:E.fill)||void 0===u?void 0:u.color,n,i),v=Pg(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,_=T.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:[]};return{headers:function(t,n){return(Array.isArray(t[0])?t.map((function(t){return t.map((function(t){return Bg(t)})).filter(Boolean).join(" ")})):t.map((function(t){return Bg(t)}))).map((function(t,i){var e,r,u,a=Pg(null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.color,0,i),l=Pg(null===(r=null==n?void 0:n.font)||void 0===r?void 0:r.size,0,i),s=Pg(null===(u=null==n?void 0:n.fill)||void 0===u?void 0:u.color,0,i),c=Pg(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=T.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}},renderer:xy},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=Yg(t.data,t.layout,n),C=M.legends,k=M.hideLegend,A=void 0,S=t.data.map((function(n,o){var u,a,l,s;A=gg(t.layout,n,A);var c=vg(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),d=C[o];return n.y.map((function(e,o){var u,a,l,s,f,v,h,p,g;if(Il(null===(u=n.x)||void 0===u?void 0:u[o])||Il(e))return null;var y=A?A(Rl(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[o%(null===(f=n.marker)||void 0===f?void 0:f.color).length]:0):hg(c,o,d,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),m=pg(n,o);return{x:n.x[o],y:e,legend:d,color:null!==(g=Po(y).copy({opacity:m}).formatHex8())&&void 0!==g?g:y}})).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)({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},xg(t.layout)),Zg(t.data,t.layout)),Jg(t.data,t.layout,!0)),ty(t.data,t.layout))},renderer:fy},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&&Hl(t.y)}))){var c=t.data.map((function(t,n){return"bar"===t.type&&Hl(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=Og(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&&Nl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&Nl(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&&Nl(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=Dg(s.data,s.layout),v=Yg(s.data,s.layout,n),h=v.legends,p=v.hideLegend,g=void 0,y=Mg(s.data[0],s.layout);return s.data.forEach((function(t,n){var u,a,l,c,f,v,p,m,b,x,w;g=gg(s.layout,t,g);var M=h[n],C=jg(t);if("bar"===t.type){var k=vg(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 o,u,a,l,c,d,f,v,h;if(!Il(n)&&!Il(null===(o=t.y)||void 0===o?void 0:o[e])){var p=g?g(Rl(null===(u=t.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=t.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[e%(null===(c=t.marker)||void 0===c?void 0:c.color).length]:0):hg(k,e,M,i,null===(v=null===(f=null===(d=s.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r),m=pg(t,e),b=t.y[e];return{x:n.toString(),y:b,yAxisCalloutData:Sg(b,y),color:null!==(h=Po(p).copy({opacity:m}).formatHex8())&&void 0!==h?h:p}}})).filter((function(t){return void 0!==t})),useSecondaryYScale:Vg(t,s.layout)})}else if("scatter"===t.type){var A=vg(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=hg(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=_g(t.line),V=pg(t,n);Gg(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:Sg(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:Vg(t,s.layout)})}))}})),(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,wrapXAxisLables:!0}),xg(s.layout)),Zg(s.data,s.layout)),Cg(s.data[0],s.layout)),wg(s.data[0],s.layout)),y),Jg(s.data,s.layout)),ty(s.data,s.layout))},renderer:yy},verticalstackedbar:{transformer:Eg,renderer:cy},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,T,O,E,F,B,P,_,H,I=t.data[0],W=[],R=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;if("histogram2d"===I.type){var z=[],j=[],Y=[];null===(u=I.x)||void 0===u||u.forEach((function(t,n){var i,e=Xg(I.z,n);Il(t)||Il(null===(i=I.y)||void 0===i?void 0:i[n])||Il(e)||(z.push(t),j.push(I.y[n]),Y.push(e))}));var X=_l(z),G=_l(j),U=Rg(z,null===(a=I.xbins)||void 0===a?void 0:a.start,null===(l=I.xbins)||void 0===l?void 0:l.end,null===(s=I.xbins)||void 0===s?void 0:s.size),q=Rg(j,null===(c=I.ybins)||void 0===c?void 0:c.start,null===(d=I.ybins)||void 0===d?void 0:d.end,null===(f=I.ybins)||void 0===f?void 0:f.size),Z=q.map((function(){return U.map((function(){return[]}))})),K=0;z.forEach((function(t,n){var i=Hg(U,t,X),e=Hg(q,j[n],G);-1!==i&&-1!==e&&Z[e][i].push(Y[n])}));var J=Z.map((function(t){return t.map((function(t){var n=$g(I.histfunc,t);return K+=n,n}))}));U.forEach((function(t,n){q.forEach((function(i,e){var r=zg(I.histnorm,J[e][n],K,X?t.length:Ig(t),G?i.length:Ig(i));W.push({x:X?t.join(", "):Wg(t),y:G?i.join(", "):Wg(i),value:r,rectText:r}),"number"==typeof r&&(R=Math.min(R,r),$=Math.max($,r))}))}))}else null===(v=I.x)||void 0===v||v.forEach((function(n,i){var e;null===(e=I.y)||void 0===e||e.forEach((function(e,r){var o,u,a,l,s,c,d=null===(u=null===(o=I.z)||void 0===o?void 0:o[r])||void 0===u?void 0:u[i];W.push({x:"date"===(null===(l=null===(a=t.layout)||void 0===a?void 0:a.xaxis)||void 0===l?void 0:l.type)||null!=n?n:0,y:(null===(c=null===(s=t.layout)||void 0===s?void 0:s.yaxis)||void 0===c||c.type,e),value:d,rectText:d}),"number"==typeof d&&(R=Math.min(R,d),$=Math.max($,d))}))}));var Q={legend:null!==(h=I.name)&&void 0!==h?h:"",data:W,value:0},tt=[R,($+R)/2,$],nt=[ss(is.color1),ss(is.color2),ss(is.color3)],it=null!==(N=null!==(k=null!==(x=null!==(y=null!==(p=null==I?void 0:I.colorscale)&&void 0!==p?p:null===(g=t.layout)||void 0===g?void 0:g.colorscale)&&void 0!==y?y:null===(b=null===(m=t.layout)||void 0===m?void 0:m.coloraxis)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(C=null===(M=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===M?void 0:M.layout)||void 0===C?void 0:C.colorscale)&&void 0!==k?k:"histogram2d"===I.type&&(null===(D=null===(V=null===(L=null===(S=null===(A=t.layout)||void 0===A?void 0:A.template)||void 0===S?void 0:S.data)||void 0===L?void 0:L.histogram2d)||void 0===V?void 0:V[0])||void 0===D?void 0:D.colorscale))&&void 0!==N?N:null===(B=null===(F=null===(E=null===(O=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===O?void 0:O.data)||void 0===E?void 0:E.heatmap)||void 0===F?void 0:F[0])||void 0===B?void 0:B.colorscale;if(it&&"object"==typeof it&&("diverging"in it||"sequential"in it||"sequentialminus"in it)){var et=R>=0,rt=$<=0;R<0&&$>0?it=null==it?void 0:it.diverging:et?it=null==it?void 0:it.sequential:rt&&(it=null==it?void 0:it.sequentialminus)}var ot=Array.isArray(it)?it.map((function(t){return t[0]*($-R)+R})):tt,ut=Array.isArray(it)?it.map((function(t){return t[1]})):nt;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:[Q],domainValuesForColorScale:ot,rangeValuesForColorScale:ut,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(P=t.layout)||void 0===P?void 0:P.width,height:null!==(H=null===(_=t.layout)||void 0===_?void 0:_.height)&&void 0!==H?H:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:!0},xg(t.layout)),Zg([I],t.layout)),ty(t.data,t.layout))},renderer:hy},gauge:{transformer:function(t,n,i,e,r){var o,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,T,O,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=t.data[0],ct=(null===(o=st.gauge)||void 0===o?void 0:o.steps)?st.gauge.steps.map((function(t){return t.color})):void 0,dt=vg(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,ct,i,r),ft=(null===(c=null===(s=st.gauge)||void 0===s?void 0:s.steps)||void 0===c?void 0:c.length)?st.gauge.steps.map((function(n,e){var o,u,a,l,s,c=n.name||"Segment ".concat(e+1),d=hg(dt,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!==(d=st.value)&&void 0!==d?d:0-(null!==(p=null===(h=null===(v=null===(f=st.gauge)||void 0===f?void 0:f.axis)||void 0===v?void 0:v.range)||void 0===h?void 0:h[0])&&void 0!==p?p:0),color:Ng(null===(m=null===(y=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===y?void 0:y.layout)||void 0===m?void 0:m.colorway,e,null===(x=null===(b=st.gauge)||void 0===b?void 0:b.axis)||void 0===x?void 0:x.color,i,r)},{legend:"Target",size:(null!==(k=null===(C=null===(M=null===(w=st.gauge)||void 0===w?void 0:w.axis)||void 0===M?void 0:M.range)||void 0===C?void 0:C[1])&&void 0!==k?k:100)-(null!==(A=st.value)&&void 0!==A?A:0),color:is.disabled}];if(null===(S=st.delta)||void 0===S?void 0:S.reference){var vt=st.value-st.delta.reference;if(vt>=0){at="▲ ".concat(vt);var ht=vg(null===(D=null===(V=null===(L=t.layout)||void 0===L?void 0:L.template)||void 0===V?void 0:V.layout)||void 0===D?void 0:D.colorway,e,null===(T=null===(N=st.delta)||void 0===N?void 0:N.increasing)||void 0===T?void 0:T.color,i,r);lt=hg(ht,0,"",i,null===(F=null===(E=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,r)}else{at="▼ ".concat(Math.abs(vt));var pt=vg(null===(_=null===(P=null===(B=t.layout)||void 0===B?void 0:B.template)||void 0===P?void 0:P.layout)||void 0===_?void 0:_.colorway,e,null===(I=null===(H=st.delta)||void 0===H?void 0:H.decreasing)||void 0===I?void 0:I.color,i,r);lt=hg(pt,0,"",i,null===($=null===(R=null===(W=t.layout)||void 0===W?void 0:W.template)||void 0===R?void 0:R.layout)||void 0===$?void 0:$.colorway,r)}}var gt={sublabel:{fill:lt}},yt=xg(t.layout).chartTitle;return{segments:ft,chartValue:null!==(z=st.value)&&void 0!==z?z:0,chartTitle:yt,sublabel:at,minValue:"number"==typeof(null===(X=null===(Y=null===(j=st.gauge)||void 0===j?void 0:j.axis)||void 0===Y?void 0:Y.range)||void 0===X?void 0:X[0])?null===(q=null===(U=null===(G=st.gauge)||void 0===G?void 0:G.axis)||void 0===U?void 0:U.range)||void 0===q?void 0:q[0]:void 0,maxValue:"number"==typeof(null===(J=null===(K=null===(Z=st.gauge)||void 0===Z?void 0:Z.axis)||void 0===K?void 0:K.range)||void 0===J?void 0:J[1])?null===(nt=null===(tt=null===(Q=st.gauge)||void 0===Q?void 0:Q.axis)||void 0===tt?void 0:tt.range)||void 0===nt?void 0:nt[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=st.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(it=t.layout)||void 0===it?void 0:it.width,height:null!==(rt=null===(et=t.layout)||void 0===et?void 0:et.height)&&void 0!==rt?rt:220,styles:gt,variant:(null===(ut=null===(ot=st.gauge)||void 0===ot?void 0:ot.steps)||void 0===ut?void 0:ut.length)?$p.MultipleSegments:$p.SingleSegment,roundCorners:!0}},renderer:gy},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=Yg(t.data,t.layout,n),f=d.legends,v=d.hideLegend,h=void 0;return t.data.forEach((function(n,u){var a,l,s,d,v,p,g;if(n.x){h=gg(t.layout,n,h);var y=vg(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===(d=n.marker)||void 0===d?void 0:d.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e=Xg(n.y,i);Il(t)||Il(e)||(m.push(t),b.push(e))}));var x=_l(m),w=Rg(m,null===(v=n.xbins)||void 0===v?void 0:v.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=Hg(w,t,x);-1!==i&&M[i].push(b[n])}));var k=M.map((function(t){var i=$g(n.histfunc,t);return C+=i,i}));w.forEach((function(e,a){var l,s,d,v,p,g,m,b,w=f[u],M=h?h(Rl(null===(l=n.marker)||void 0===l?void 0:l.color)?null===(d=null===(s=n.marker)||void 0===s?void 0:s.color)||void 0===d?void 0:d[a%(null===(v=n.marker)||void 0===v?void 0:v.color).length]:0):hg(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=pg(n,a),S=zg(n.histnorm,k[a],C,x?e.length:Ig(e));c.push((0,o.Cl)({x:x?e.join(", "):Wg(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,")")}))}))}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:c,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:v,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=c[0])||void 0===s?void 0:s.x)},xg(t.layout)),Zg(t.data,t.layout)),Cg(t.data[0],t.layout))},renderer:my},area:{transformer:function(t,n,i,e,r){return Fg(t,n,"area",i,e,r)},renderer:vy,preTransformOperation:My},line:{transformer:function(t,n,i,e,r){return Fg(t,n,"line",i,e,r)},renderer:dy,preTransformOperation:My},scatter:{transformer:function(t,n,i,e,r){return Fg(t,n,"scatter",i,e,r)},renderer:by,preTransformOperation:My},funnel:{transformer:function(t,n,i,e,r){var o,u,a,l,s=[],c=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(c){var d={};t.data.forEach((function(n,o){var u,a,l,c,f,v,h,p,g,y,m,b,x,w=n.name||"Category ".concat(o+1),M=vg(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!==(f=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==f?f:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),C=hg(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);d[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;Rl(k)&&Rl(A)&&k&&Rl(k)&&k.length>0&&k.forEach((function(t,n){var i=s.findIndex((function(n){return n.stage===t})),e=Number(A[n]);isNaN(e)||(-1===i?s.push({stage:t,subValues:[{category:w,value:e,color:C}]}):s[i].subValues.push({category:w,value:e,color:C}))}))}))}else t.data.forEach((function(n,o){var u,a,l,c,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=_l(a),s=_l(u),c=Fl(a),d=Fl(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(Rl(h)&&Rl(p)){var g=vg(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===(c=n.marker)||void 0===c?void 0:c.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=hg(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),c=Number(p[e]);isNaN(c)||s.push({stage:n,value:c,color:l})}))}}));return{data:s,width:null===(o=t.layout)||void 0===o?void 0:o.width,height:null===(u=t.layout)||void 0===u?void 0:u.height,orientation:"v"===(null===(a=t.data[0])||void 0===a?void 0:a.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(l=t.layout)||void 0===l?void 0:l.showlegend)}},renderer:zp},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=Yg(t.data,t.layout,n),c=s.legends,d=s.hideLegend,f=void 0,v=t.data.map((function(n,o){var u,a,l,s,d,v;f=gg(t.layout,n,f);var h=vg(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),p=c[o],g="date"===(null===(v=null===(d=t.layout)||void 0===d?void 0:d.xaxis)||void 0===v?void 0:v.type)||El(n.x),y=function(t){return Il(t)?0:g?+function(t){if("string"==typeof t){var n=t.match(Kg);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)}(t):+t};return n.y.map((function(e,o){var u,a,l,s,c,d,v,m,b,x;if(Il(e))return null;var w=f?f(Rl(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):hg(h,o,p,i,null===(v=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===v?void 0:v.colorway,r),M=pg(n,o),C=y(null===(m=n.base)||void 0===m?void 0:m[o]),k=y(null===(b=n.x)||void 0===b?void 0:b[o]);return{x:{start:g?new Date(C):C,end:g?new Date(C+k):C+k},y:e,legend:p,color:null!==(x=Po(w).copy({opacity:M}).formatHex8())&&void 0!==x?x:w}})).filter((function(t){return null!==t}))})).flat();return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:v,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:d,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},xg(t.layout)),Zg(t.data,t.layout)),Jg(t.data,t.layout,!0)),ty(t.data,t.layout))},renderer:wy},fallback:{transformer:Eg,renderer:cy}},ky=u.forwardRef((function(t,n){var i,e=Wl(t.chartSchema).plotlySchema,r=(t=>{try{Wl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let n=(t=>{try{const n=t;if(!n)throw new Error("Plotly input is null or undefined");if("object"!=typeof n)throw new Error("Plotly input is not an object. Input type: "+typeof n);if(!Rl(n.data))throw new Error("Plotly input data is not a valid array or typed array");if(0===n.data.length)throw new Error("Plotly input data is empty");return n}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{n=Vl(n)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}let i=((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Xl[r]){const o=Xl[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})(n.data,n.layout).map((t=>{var i,e;const r=t[0],o=n.data[r];switch(o.type){case"pie":return{isValid:!0,traceIndex:r,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:r,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:r,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:r,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:r,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:r,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:r,type:"table"};case"bar":const t=o;return"h"===t.orientation?Gl(t)?{isValid:!0,traceIndex:r,type:"gantt"}:{isValid:!0,traceIndex:r,type:"horizontalbar"}:Hl(t.y)?{isValid:!0,traceIndex:r,type:"groupedverticalbar"}:["group","overlay"].includes(null===(i=null==n?void 0:n.layout)||void 0===i?void 0:i.barmode)?Fl(t.y)?{isValid:!0,traceIndex:r,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:r,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:r,type:"funnel"};case"scatter":case"scattergl":const u=o,a=Zl(u);return zl(null!==(e=u.mode)&&void 0!==e?e:"")?{isValid:!0,traceIndex:r,type:"scatter"}:Kl(u)?{isValid:!0,traceIndex:r,type:"fallback"}:{isValid:!0,traceIndex:r,type:a?"area":"line"};default:return{isValid:!1,errorMessage:`${Dl} ${o.type}`}}}));if(i.every((t=>!t.isValid)))return{isValid:!1,errorMessage:i.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};i=i.filter((t=>t.isValid));const e=i.map((t=>({index:t.traceIndex,type:t.type}))),r=i.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type));if(i.some((t=>"line"===t.type||"fallback"===t.type))){if(r)return{isValid:!0,type:i.some((t=>"verticalstackedbar"===t.type))?"fallback":"groupedverticalbar",validTracesInfo:e};if(i.some((t=>"fallback"===t.type)))return{isValid:!0,type:"fallback",validTracesInfo:e}}const o=new Set(i.map((t=>t.type)));return o.size>1?{isValid:!0,type:"composite",validTracesInfo:e}:{isValid:!0,type:Array.from(o)[0],validTracesInfo:e}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(e);if(!r.isValid)throw new Error("Invalid chart schema: ".concat(r.errorMessage));var a=e;try{a=Vl(a)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var l=(0,o.Cl)((0,o.Cl)({},a),{data:r.validTracesInfo.map((function(t){return a.data[t.index]}))}),s=r.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),c=e.selectedLegends,d=u.useRef(new Map),f=function(){var t=u.useContext(Kp),n=(0,Zp.m)(["theme"]).theme;return t||n||(0,pn.a)({})}(),v=null!==(i=null==f?void 0:f.isInverted)&&void 0!==i&&i,h=u.useRef(null),p=u.useRef(!1);Rl(c)||(c=[]);var g=u.useState(c),y=g[0],m=g[1],b=function(n){m(n),t.onSchemaChange&&t.onSchemaChange({plotlySchema:{plotlyInput:a,selectedLegends:n}})};u.useEffect((function(){var n=Wl(t.chartSchema).plotlySchema.selectedLegends;m(null!=n?n:[])}),[t.chartSchema]);var x={legendProps:{canSelectMultipleLegends:!0,onChange:b,selectedLegends:y},componentRef:h,calloutProps:{layerProps:{eventBubblingEnabled:!0}}},w=u.useCallback((function(t){return new Promise((function(n,i){return p.current?i(Error("Exporting multi plot charts as image is not supported")):h.current&&"function"==typeof h.current.toImage?void h.current.toImage((0,o.Cl)({background:f.semanticColors.bodyBackground,scale:5},t)).then(n).catch(i):i(Error("Chart cannot be exported as image"))}))}),[f]);if(u.useImperativeHandle(t.componentRef,(function(){return{exportAsImage:w}}),[w]),"scatterpolar"===r.type){var M=function(t){for(var n,i,e,r,u,a,l,s,c,d=(0,o.Cl)({},t),f=0,v=0,h=0;h<t.data.length;h++){var p=t.data[h].r;if(p&&Rl(p))for(var g=0;g<p.length;g++)Il(p[g])||(f=Math.min(f,p[g]),v=Math.max(v,p[g]))}var y=f<0?-f:0,m=new Set;for(h=0;h<t.data.length;h++)(A=t.data[h]).theta&&Rl(A.theta)&&A.theta.forEach((function(t){return m.add(String(t))}));var b=[],x=[],w=null,M=function(s){var c=t.data[s];Rl(c.theta)&&(c.__axisLabel=Array.from(m)),c.x=[],c.y=[];var f=c.theta,v=c.r;if(!Rl(v)||!Rl(f))return d.data[s]=c,"continue";var h="clockwise"===(null===(e=null===(i=null===(n=t.layout)||void 0===n?void 0:n.polar)||void 0===i?void 0:i.angularaxis)||void 0===e?void 0:e.direction)?-1:1,p=(null!==(l=null===(a=null===(u=null===(r=t.layout)||void 0===r?void 0:r.polar)||void 0===u?void 0:u.angularaxis)||void 0===a?void 0:a.rotation)&&void 0!==l?l:0)*Math.PI/180,g=[],M=!1;Fl(f)||(g=Array.from(new Set(f)),M=!0);for(var C=0;C<v.length;C++)if(!Il(null==f?void 0:f[C])&&!Il(null==v?void 0:v[C])){var k;k=M?p+h*g.indexOf(f[C])*(2*Math.PI/g.length):p+h*(f[C]*Math.PI/180);var A=v[C]+y,S=A*Math.cos(k),L=A*Math.sin(k);0===s&&0===C&&(w=y),c.x.push(S),c.y.push(L),b.push(S),x.push(L)}c.x&&c.y&&(c.data=c.x.map((function(t,n){return(0,o.Cl)({x:t,y:c.y[n]},c.text?{text:c.text[n]}:{})}))),d.data[s]=c};for(h=0;h<t.data.length;h++)M(h);if(null!==w){for(h=0;h<d.data.length;h++)(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t-w})));for(var C=0;C<b.length;C++)b[C]=b[C]-w}var k=Math.max.apply(Math,(0,o.fX)((0,o.fX)([],b.map(Math.abs),!1),x.map(Math.abs),!1));for(k=0===k?1:k,h=0;h<d.data.length;h++){var A;(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t/(2*k)})),A.y=A.y.map((function(t){return t/(2*k)})))}var S=(null===(s=t.layout)||void 0===s?void 0:s.width)||(null===(c=t.layout)||void 0===c?void 0:c.height)||500;return d.layout=(0,o.Cl)((0,o.Cl)({},d.layout),{width:S,height:S}),d.layout.__polarOriginX=null!=w?w:void 0,d}(l);l.data=M.data,l.layout=M.layout,s.forEach((function(t,n){var i,e;if("scatterpolar"===t.type){var r=null!==(e=null===(i=l.data[n])||void 0===i?void 0:i.mode)&&void 0!==e?e:"";r.includes("line")?s[n].type="line":r.includes("markers")||"text"===r?s[n].type="scatter":s[n].type="line"}}))}var C={},k=0;l.data.forEach((function(t,n){var i,e="";qg(r.validTracesInfo[n].type)?(e="".concat(yg).concat(k+1),k++):e=null!==(i=t.xaxis)&&void 0!==i?i:"x",C[e]||(C[e]=[]),C[e].push(n)})),p.current=Object.keys(C).length>1;var A=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=Ug(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Ug(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};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Ug(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Ug(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};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,r,a,l,s;if(qg(n.type)){var c=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],d={start:(null===(r=c.domain)||void 0===r?void 0:r.x)?c.domain.x[0]:0,end:(null===(a=c.domain)||void 0===a?void 0:a.x)?c.domain.x[1]:1},f={start:(null===(l=c.domain)||void 0===l?void 0:l.y)?c.domain.y[0]:0,end:(null===(s=c.domain)||void 0===s?void 0:s.y)?c.domain.y[1]:1};o.push(d),u.push(f)}})),null!=d&&Object.keys(d).length>0&&(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=n>=r?"".concat(yg).concat(n-r+1):"x".concat(0===n?"":n+1),e=v.findIndex((function(n){return n===t.start}))+1,o=a[n],u={row:-1,column:e,xAnnotation:null==o?void 0:o.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[i]=u}))}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=n>=r?"".concat(yg).concat(n-r+1):"x".concat(0===n?"":n+1),e=p.findIndex((function(n){return n===t.start})),o=g-e,u=a[n],l=null==u?void 0:u.yAnnotation,s=c[i];void 0!==s&&(s.row=o,s.yAnnotation=l,s.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(l,p.current,r.validTracesInfo);if(p.current&&A.templateRows===mg&&A.templateColumns===mg){if("donut"===r.type){var S=Object.keys(C);S.forEach((function(t,n){n<S.length-1&&delete C[t]}))}else Object.keys(C).forEach((function(t,n){n>0&&delete C[t]}));p.current=!1}var L,V=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,w;if("donut"===e[a].type){var M=u,C=vg(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==M?void 0:M.marker)||void 0===p?void 0:p.colors,n,r,!0);null===(g=M.labels)||void 0===g||g.forEach((function(i,e){var u,a,l,s,c,d="".concat(i),f=hg(C,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===qg(e[a].type)){var k=u,A=k.legendgroup,S=(null===(y=k.line)||void 0===y?void 0:y.color)||(null===(m=k.marker)||void 0===m?void 0:m.color),L=jg(k),V=vg(null===(w=null===(x=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,i,S,n,r);void 0!==A&&""!==A&&!1===o.some((function(t){return t.title===A}))&&o.push({title:A,color:V,shape:L})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(l,d,t.colorwayType,r.validTracesInfo,v);return u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"grid",gridTemplateRows:A.templateRows,gridTemplateColumns:A.templateColumns}},Object.entries(C).map((function(n){var i,e,a,c=n[0],f=n[1],h=(0,o.Cl)((0,o.Cl)({},l),{data:f.map((function(t){return l.data[t]}))}),g=s.filter((function(t){return f.includes(t.index)})),y="fallback"===r.type||"groupedverticalbar"===r.type?r.type:g[0].type;s.some((function(t){return"line"===t.type}))&&s.some((function(t){return"scatter"===t.type}))&&(y="line");var m=Cy[y];if(m){var b=m.transformer,w=m.renderer,M=m.preTransformCondition,C=m.preTransformOperation;if(void 0===M||M(h)){var k=C?C(h):h,S=A.layout[c];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)))}(w,b,[k,p.current,d,t.colorwayType,v],(0,o.Cl)((0,o.Cl)({},x),{xAxisAnnotation:null==S?void 0:S.xAnnotation,yAxisAnnotation:null==S?void 0:S.yAnnotation}),null!==(i=null==S?void 0:S.row)&&void 0!==i?i:1,null!==(e=null==S?void 0:S.column)&&void 0!==e?e:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(a=h.data[0])||void 0===a?void 0:a.type))}))),p.current&&(L=V,u.createElement(of,(0,o.Cl)({},L,{selectedLegends:y,onChange:b}))))}));ky.displayName="DeclarativeChart",ky.defaultProps={colorwayType:"default"},(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}});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)"}}),$=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),z=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),j=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($),f,l),scaleUpOut103:X("".concat(p,",").concat(z),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(j,"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.12.4"),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(),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},fX: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){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,{AreaChart:function(){return Kv},CartesianChart:function(){return cv},ChartHoverCard:function(){return pc.ChartHoverCard},ChartTable:function(){return Bp},DataVizGradientPalette:function(){return gc},DataVizPalette:function(){return es},DeclarativeChart:function(){return Ay},DonutChart:function(){return Qf},FunnelChart:function(){return jp},GanttChart:function(){return sy},GaugeChart:function(){return Zp},GaugeChartVariant:function(){return zp},GaugeValueFormat:function(){return $p},GroupedVerticalBarChart:function(){return Dh},HeatMapChart:function(){return Eh},HorizontalBarChart:function(){return ad},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return Hp},Legends:function(){return uf},LineChart:function(){return Ov},MultiStackedBarChart:function(){return ch},MultiStackedBarChartVariant:function(){return ih},NodesComposition:function(){return up},PieChart:function(){return uh},ResponsiveContainer:function(){return uy},SankeyChart:function(){return cp},ScatterChart:function(){return Fv},Shape:function(){return Zd},Sparkline:function(){return Op},StackedBarChart:function(){return vh},Textbox:function(){return Cv},TreeChart:function(){return Lp},TreeTraverse:function(){return ap},VerticalBarChart:function(){return Mh},VerticalStackedBarChart:function(){return Ah},getChartHoverCardStyles:function(){return Nh.J},getColorFromToken:function(){return cs},getGradientFromToken:function(){return Cc},getNextColor:function(){return ss},getNextGradient:function(){return Mc},withResponsiveContainer:function(){return ay}});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 $(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 z(){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 j(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();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(),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(),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},$(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();return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,$t=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},zt=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},jt=((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(),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=$t(),A=u.useRef();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)}),[]),j=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(),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(),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:j,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},$(i,R,Xt),{className:z(rt.root,q&&q.targetEdge&&jt[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=$(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();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(),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:z(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()},$n={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},zn=(0,r.I)(Wn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)($n,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"]}),jn=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(zn,(0,o.Cl)({},i),a)}));jn.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 $i=Ri(0),zi=Ri(1),ji=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))}$i.range,zi.range,ji.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,$i,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 $e(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 ze(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function je(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:$r,e:$r,f:Gr,g:ro,G:uo,H:zr,I:jr,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=ze(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=$e(ze(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(ze(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?$e(ze(o.y,0,1)).getUTCDay():Re(ze(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,$e(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 $r(t,n){return Je(t.getUTCDate(),n,2)}function zr(t,n){return Je(t.getUTCHours(),n,2)}function jr(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=je({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))?zo(n[1],n[2]/100,n[3]/100,1):(n=Do.exec(t))?zo(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`#${$o(this.r)}${$o(this.g)}${$o(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 $o(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function zo(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 jo(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 jo(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`#${$o(this.r)}${$o(this.g)}${$o(this.b)}${$o(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Io,toString:Io})),po(Yo,(function(t,n,i,e){return 1===arguments.length?jo(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,$i,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 $u,zu,ju,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),ju(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 zu(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=zu(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)}}$u=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:["$",""]}),zu=$u.format,ju=$u.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 $a(t){return function(){this.textContent=t}}function za(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ja(){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("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 kl(t),!0}catch{return!1}}function kl(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 Al(t,n){t=Ml(t);try{const i=kl(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}`)}}function Sl(t){for(const[n,i]of Object.entries(t))if("object"!=typeof i||Array.isArray(i)||null===i){if("bdata"===n&&"string"==typeof i&&Cl(i)){const e=t.dtype||"utf-8";t[n]=Al(i,e)}else if(Array.isArray(i))for(let t=0;t<i.length;t++)"object"==typeof i[t]&&null!==i[t]&&Sl(i[t])}else Sl(i)}function Ll(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(Ll(t.slice(n*r,(n+1)*r),e));return o}function Vl(t){const n=JSON.parse(JSON.stringify(t.data));if(Sl(t.data),JSON.stringify(t.data)!==JSON.stringify(n)){for(const n of t.data||[])["y","x","z","r","theta","values"].forEach((t=>{if(n[t]&&"object"==typeof n[t]&&"bdata"in n[t]){const i=n[t].bdata;let e=n[t].shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Rl(t)||(t=void 0)}catch(n){const i=e.split(",").map((t=>Number(t.trim())));i.every((t=>!isNaN(t)))?t=i:e=void 0}e=t}void 0!==e&&Rl(e)?n[t]=Ll(i,e):n[t]=i}}));return t}return t.data=n,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?za:$a)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ja:("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 Dl="Unsupported chart - type :",Nl=t=>!isNaN(parseFloat(t))&&isFinite(t),Ol=t=>{if(Nl(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)},Tl=(t,n,...i)=>!!Rl(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),El=t=>Tl(t,(t=>Ol(t)||null===t)),Fl=t=>Tl(t,(t=>"string"==typeof t&&Nl(t)||"number"==typeof t||null===t)),Bl=t=>Tl(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)),Pl=t=>Tl(t,(t=>(t=>{if(Nl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),_l=t=>Tl(t,(t=>"string"==typeof t||null===t)),Hl=t=>Tl(t,(t=>"object"==typeof t&&null!==t&&!Rl(t))),Il=t=>null==t||"number"==typeof t&&!isFinite(t),Wl=(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,"<").replace(/>/g,">"):t[i]=Wl(t[i],n+1));return t};function Rl(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const $l=(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&&!Fl(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(zl(o)){if(!Fl(t.x)&&!_l(t.x)&&!El(t.x))throw new Error(`${Dl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Fl(t.y)&&!_l(t.y))throw new Error(`${Dl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}else{if(!["lines+markers","markers+lines","text+lines+markers","lines","text+lines","lines+text","lines+markers+text"].includes(o))throw new Error(`${Dl} ${t.type}, mode: ${o}, Unsupported mode`);if(!Fl(t.x)&&!_l(t.x)&&!El(t.x))throw new Error(`${Dl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Fl(t.y)&&!_l(t.y))throw new Error(`${Dl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}const l=Zl(t),s=Jl(t);if(l&&s)throw new Error(`${Dl} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported for AreaChart.`);if(s&&Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported for VSBC fallback.`)},Yl=(t,n)=>{const i=Ul(t);return Object.keys(i).some((t=>{var e;const r=ql(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Xl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${Dl} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)},t=>$l(t,!1)],bar:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)},t=>{(t=>{const n=t.x&&Rl(t.x)&&0===t.x.length,i=t.y&&Rl(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(!Fl(t.x)&&!El(t.x))throw new Error(`${Dl} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!Gl(t)&&El(t.x))throw new Error(`${Dl} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);$l(t,!1)}else if(!Fl(t.y)&&!_l(t.y)&&!Hl(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;Il(n)||Il(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||Il(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(Il(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(`${Dl} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>jl(t,n)],scattergl:[(t,n)=>jl(t,n)],scatterpolar:[t=>{if(!Fl(t.theta)&&!_l(t.theta))throw new Error(`${Dl} ${t.type}, theta values must be array of numbers or strings`);if(!Fl(t.r))throw new Error(`${Dl} ${t.type}, Non numeric r values`)}],funnel:[t=>$l(t,!1)],histogram2d:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if(Yl(t,n))throw new Error(`${Dl} ${t.type}, log axis type not supported.`)}]},Gl=t=>El(t.base)||Fl(t.base),Ul=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}},ql=(t,n)=>`${t}axis${n>1?n:""}`,Zl=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Kl=t=>{const n=El(t.x),i=Fl(t.x),e=Pl(t.x),r=Bl(t.x),o=_l(t.y);return!(!(n||i||r)||e||o)},Jl=t=>{var n;return!zl(null!==(n=t.mode)&&void 0!==n?n:"")&&!Kl(t)};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";function gs(t,n){void 0===n&&(n=!1);var i=ju(".2~",t);Math.abs(t)<1?i=zu(".2~g"):n&&Math.abs(t)>=1e3&&(i=ju(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function ys(t){return gs(t)}function ms(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=oc(r).domain([o.dStartValue,o.dEndValue]).range([o.rStartValue,o.rEndValue]);a&&m.nice();var b=null!=f?f:6,x=function(t,i,r){if(n.tickFormat)return zu(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&&void 0===f){var w=p(m.ticks().map((function(t,n){return x(t)})))+20,M=m.range(),C=M[0],k=M[1];b=Math.min(Math.max(1,Math.floor(Math.abs(k-C)/w)),10)}var A,S=ni(m).tickSize(s).tickPadding(d).ticks(b).tickFormat((function(t,n){return x(t,0,m.tickFormat(b))}));[ts.HorizontalBarChartWithAxis,ts.GanttChart].includes(i)&&S.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?A=n.tickValues:g&&(A=fc(r,g,y,m.domain())),A&&S.tickValues(A),v&&sl(v).call(S).selectAll("text").attr("aria-hidden","true");var L=(null!=A?A:m.ticks(b)).map(S.tickFormat());return{xScale:m,tickValues:L}}function bs(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:$i,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 xs(t,n){var i,e=t.yMinMaxValues,r=void 0===e?{startValue:0,endValue:0}:e,o=t.yAxisElement,u=void 0===o?null:o,a=t.yMaxValue,l=void 0===a?0:a,s=t.yMinValue,c=void 0===s?0:s,d=t.containerHeight,f=t.margins,v=t.tickPadding,h=void 0===v?12:v,p=t.maxOfYVal,g=void 0===p?0:p,y=t.yAxisTickFormat,m=t.yAxisTickCount,b=void 0===m?4:m,x=t.tickValues,w=t.tickStep,M=t.tick0,C=g||r.endValue,k=C>l?C:l,A=r.startValue<c?Math.min(0,r.startValue):c,S=Gu().domain([A,k]).range([d-f.bottom,f.top]),L=(n?ti(S):ii(S)).tickPadding(h).ticks(b);return y?L.tickFormat(y):L.tickFormat(ys),x?i=x:w&&(i=fc(void 0,w,M,S.domain())),i&&L.tickValues(i),u&&sl(u).call(L).selectAll("text").attr("aria-hidden","true"),S}function ws(t,n,i,e,r,o,u,a){void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var l=t.yMinMaxValues,s=void 0===l?{startValue:0,endValue:0}:l,c=t.yAxisElement,d=void 0===c?null:c,f=t.yMaxValue,v=void 0===f?0:f,h=t.yMinValue,p=void 0===h?0:h,g=t.containerHeight,y=t.containerWidth,m=t.margins,b=t.tickPadding,x=void 0===b?12:b,w=t.maxOfYVal,M=void 0===w?0:w,C=t.yAxisTickFormat,k=t.yAxisTickCount,A=void 0===k?4:k,S=t.eventAnnotationProps,L=t.eventLabelHeight,V=t.tickValues,D=t.tickStep,N=t.tick0,O=M||s.endValue||0,T=O>v?O:v,E=o?Math.min(s.startValue||0,p||0):s.startValue<p?0:p,F=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}(T,E,A,e,u),B=[o?F[0]:E,F[F.length-1]];if("log"===a){var P=s.startValue,_=s.endValue;p>0&&(P=Math.min(P,p)),v>0&&(_=Math.max(_,v)),B=[P,_]}var H,I=oc(a).domain(B).range([g-m.bottom,m.top+(S?L:0)]),W=(!n&&r||n&&!r?ti(I):ii(I)).tickPadding(x).tickSizeInner(-(y-m.left-m.right));return V?H=V:D&&(H=fc(a,D,N,I.domain())),H?(W.tickValues(H),i.yAxisDomainValues=H):"log"===a?i.yAxisDomainValues=I.ticks():(W.tickValues(F),i.yAxisDomainValues=F),C?W.tickFormat(C):W.tickFormat((function(t,n){return function(t,n,i){var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":ys(e)}(t,0,I.tickFormat(A))})),d&&sl(d).call(W).selectAll("text").attr("aria-hidden","true"),I}!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 Ms=function(t,n,i,e){var r=t.containerHeight,o=t.tickPadding,u=void 0===o?12:o,a=t.margins,l=t.yAxisTickFormat,s=t.yAxisElement,c=t.yAxisPadding,d=null!=c?c:.5;d=1===d?.99:d;var f=Tu().domain(n).range([r-a.bottom,a.top]).padding(d),v=(i?ti(f):ii(f)).tickPadding(u).ticks(n);return l&&v.tickFormat(l),s&&sl(s).call(v).selectAll("text"),f},Cs=function(t,n,i,e,r){var o=t.containerHeight,u=t.tickPadding,a=void 0===u?12:u,l=t.margins,s=t.yAxisTickFormat,c=t.yAxisElement,d=t.yAxisPadding,f=void 0===d?0:d,v=t.containerWidth,h=Tu().domain(n).range([o-l.bottom,l.top]).padding(f);r===ts.VerticalStackedBarChart&&h.paddingInner(1).paddingOuter(0);var p=i?ti(h):ii(h),g=p.tickPadding(a).tickValues(n).tickSize(0);return r===ts.VerticalStackedBarChart&&p.tickSizeInner(-(v-l.left-l.right)),s&&g.tickFormat(s),c&&sl(c).call(g).selectAll("text"),h};function ks(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}var As=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},Ss=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 Ls(t){var n=t.tooltipCls,i=t.axis,e=t.id;if(null===i)return null;for(var r=sl("body").append("div").attr("id",e).attr("class",n).style("opacity",0),o=i.selectAll("#BaseSpan")._groups[0],u=o&&Object.keys(o).length,a=[],l=0;l<u;l++){var s=o[l].dataset&&Object.values(o[l].dataset)[0];a.push(s)}var c=i.selectAll(".tick")._groups[0],d=c&&Object.keys(c).length,f=function(t){sl(c[t]).on("mouseover",(function(n,i){r.style("opacity",.9),r.text(a[t]).style("left",n.pageX+"px").style("top",n.pageY-28+"px")})).on("mouseout",(function(t){r.style("opacity",0)}))};for(l=0;l<d;l++)f(l)}function Vs(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 Ds(t,n,i,e,r,o){var u=ec(t),a=sc(t,r),l=a[0],s=a[1];if(o){var c=uc(l,s,r);l-=c.start,s+=c.end}var d=n.left,f=i-n.right;return e?{dStartValue:u?1:s,dEndValue:u?-1:l,rStartValue:d,rEndValue:f}:{dStartValue:u?-1:l,dEndValue:u?1:s,rStartValue:d,rEndValue:f}}function Ns(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function Os(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 Ts(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 Es(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=sc(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=uc(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 Fs(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){ac(t.y,e)&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}}function Bs(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 Ps(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 _s,Hs,Is=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"}(_s||(_s={})),function(t){t[t.dottedLine=0]="dottedLine"}(Hs||(Hs={}));var Ws=((Ql={})[_s.circle]={widthRatio:1},Ql[_s.square]={widthRatio:1},Ql[_s.triangle]={widthRatio:1},Ql[_s.diamond]={widthRatio:1},Ql[_s.pyramid]={widthRatio:1},Ql[_s.hexagon]={widthRatio:2},Ql[_s.pentagon]={widthRatio:1.168},Ql[_s.octagon]={widthRatio:2.414},Ql),Rs=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 $s(t){return gs(t,!0)}var zs=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)},js=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))},Ys=function(t,n){return"number"==typeof t||"number"==typeof n};function Xs(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Gs(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 Us=/var\((--[a-zA-Z0-9\-]+)\)/g;function qs(t,n){var i=getComputedStyle(t);return n.replace(Us,(function(t,n){return i.getPropertyValue(n)}))}function Zs(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 Ks={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Js=p("measurement_span_");function Qs(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 tc=/(category|total|sum|min|max|mean|median) (ascending|descending)/,nc=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(tc);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 ic(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 ec(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 rc,oc=function(t){return"log"===t?ta():Gu()},uc=function(t,n,i){if("log"===i)return{start:.5*t,end:n};var e=.1*(n-t);return{start:e,end:e}},ac=function(t,n){return"number"!=typeof t||"log"!==n||t>0},lc=function(t,n){return!Il(t)&&!Il(n)},sc=function(t,n){var i=function(t){return ac(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}))}))]},cc=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=sc(n,u),c=s[0],d=s[1],f=uc(+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=Fs(n,0,o,g),m=y.startValue,b=y.endValue,x=uc(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)},dc=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},fc=function(t,n,i,e){var r="number"==typeof i?i:0;if("log"!==t){if("number"==typeof n&&n>0)return dc(r,n,e)}else{if("number"==typeof n&&n>0)return dc(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=Nl(n.slice(1))?Number(n.slice(1)):0;if("L"===o&&u>0)return dc(r,u,e)}}},vc=function(t,n,i,e){var r=n instanceof Date?n:new Date(ps);if("number"==typeof t&&t>0)return dc(+r,t,i.map((function(t){return+t}))).map((function(t){return new Date(t)}));if("string"==typeof t){var o=t[0],u=Nl(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)}},hc=function(t,n){if(null!==n){var i=n instanceof Date?n.getTime():n;if(t[i])return{x:n,values:t[i]}}},pc=i(357),gc={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"},yc={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"]]},mc={default:yc,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"]]}},bc=Object.values(yc),xc=Object.values(gc),wc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},Mc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=bc[(t+n)%bc.length];return wc(e,i)},Cc=function(t,n){if(void 0===n&&(n=!1),xc.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=mc[e][r];return wc(o,n)}return[t,t]};function kc(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 Ac(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=kc(t,t[i],n[i]))}(t,{componentDidMount:Sc,componentDidUpdate:Lc,componentWillUnmount:Vc})}function Sc(){Dc(this.props.componentRef,this)}function Lc(t){t.componentRef!==this.props.componentRef&&(Dc(t.componentRef,null),Dc(this.props.componentRef,this))}function Vc(){Dc(this.props.componentRef,null)}function Dc(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function Nc(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"}(rc||(rc={}));var Oc,Tc=u.createContext(void 0),Ec="data-is-focusable",Fc="data-focuszone-id",Bc="tabindex",Pc="data-no-vertical-wrap",_c="data-no-horizontal-wrap",Hc=999999999,Ic=-999999999;function Wc(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 Rc,$c={},zc=new Set,jc=["text","number","password","email","tel","url","search","textarea"],Yc=!1,Xc=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,Yc)}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,Yc);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!==rc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==rc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==rc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==rc.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!==rc.vertical&&c._shouldWrapFocus(c._activeElement,_c)?((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,Pc)?Hc:Ic},Ac(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 zc.size},n._onKeyDownCapture=function(t){9===t.which&&zc.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),$c[this._id]=this,i){for(var e=b(i,Yc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(D(e)){this._isInnerZone=!0;break}e=b(e,Yc)}this._isInnerZone||(zc.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,Yc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Yc))&&(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 $c[this._id],this._isInnerZone||(zc.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=$(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:z((Oc||(Oc=(0,q.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),Oc),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(Ec)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=$c[i.getAttribute(Fc)];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(Ec)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Wc(i,n),!0;i=b(i,Yc)}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 $c[t.getAttribute(Fc)];for(var n=t.firstElementChild;n;){if(D(n))return $c[n.getAttribute(Fc)];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===rc.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,Pc)?Hc:Ic:((-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,Pc)?Hc:Ic:((-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,_c);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!==rc.vertical?o=e.right-r.right:i||(o=Ic),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,_c);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!==rc.vertical?o=r.left-e.left:i||(o=Ic),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===rc.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,Yc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(D(n))return n;n=b(n,Yc)}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(Ec)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"0"))):(e.getAttribute&&"false"===e.getAttribute(Ec)&&e.setAttribute(Bc,"-1"),V(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(Bc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"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&&Nc(t,this._root.current)},n.prototype._getDocument=function(){return(0,M.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:rc.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=Tc,n}(u.Component);function Gc(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"}(Rc||(Rc={}));var Uc,qc=(0,a.Z)(),Zc=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=qc(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement(jn,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,$(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),Kc=(0,r.I)(Zc,(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"}(Uc||(Uc={}));var Jc,Qc,td=(0,a.Z)(),nd=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 Rc.Parent:return e._tooltipHost.current.parentElement;case Rc.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=zt(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=zt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!Gc(a))return}if(!t.target||!Nc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==Uc.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 Uc.medium:return 300;case Uc.long:return 500;default:return 0}},Ac(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=td(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:j({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},$(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(Kc,(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:Uc.medium},n.contextType=Ft,n}(u.Component),id={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},ed=(0,r.I)(nd,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(id,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),rd=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&&Gc(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(ed,{overflowMode:Rc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},Rs(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),od=(0,a.Z)(),ud=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=od(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=od(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(Xc,{direction:rc.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(rd,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(Xc,{direction:rc.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(jn,(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,Rs(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(pc.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])||Mc(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=Rs(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])||Mc(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])||Mc(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},$s(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),ad=(0,r.I)(ud,(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}}})),ld={host:"ms-HoverCard-host"},sd=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),j(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"}(Jc||(Jc={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(Qc||(Qc={}));var cd,dd={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"}(cd||(cd={}));var fd=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},vd=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function hd(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function pd(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 gd={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},yd=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=$t(),v=!!u.useContext(Tc),h=null===(i=Bn(!1))||void 0===i||i,p=F(gd,t),g=Wt({hasFocus:!1,focusStackId:hd("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)}),[]),_=pd((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=pd((function(t){if(yd.focusStack=yd.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=pd((function(t){if(!b&&g.focusStackId===yd.focusStack.slice(-1)[0]){var n=vd(t);n&&!w(a.current,n)&&(d&&fd(d)===d.body?setTimeout((function(){d&&fd(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){yd.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||fd(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},$(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=vd(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=fd(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})))}));yd.displayName="FocusTrapZone",yd.focusStack=[];var md,bd=function(t){return u.createElement(jn,(0,o.Cl)({},t),u.createElement(yd,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},xd=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)({},$(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(bd,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement(jn,(0,o.Cl)({},g),h))},wd=(0,a.Z)(),Md=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),Ac(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=wd(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===cd.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(xd,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),Cd=(0,r.I)(Md,(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)(dd,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"}),kd={root:"ms-PlainCard-root"},Ad=(0,a.Z)(),Sd=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)},Ac(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=Ad(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(xd,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),Ld=(0,r.I)(Sd,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(kd,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),Vd=(0,a.Z)(),Dd=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:cd.compact,openMode:"keydown"===t.type?Jc.hotKey:Jc.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:cd.compact,openMode:Jc.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:cd.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)))},Ac(i),i._async=new Nt(i),i._events=new sd(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:cd.compact,openMode:Jc.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:cd.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:cd.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=Vd(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},$(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===Jc.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===Qc.expanding?u.createElement(Cd,(0,o.Cl)({},M)):u.createElement(Ld,(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:Qc.expanding},n}(u.Component),Nd=(0,r.I)(Dd,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(ld,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(md||(md={}));var Od=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}}}},Td=u.createContext({isMeasured:!1}),Ed={position:"fixed",visibility:"hidden"},Fd={position:"relative"};function Bd(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 Pd={isMeasured:!0},_d=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(Od),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(Bd,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===md.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===md.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=$(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:Fd},f&&!v&&u.createElement("div",{style:Ed,ref:d},u.createElement(Td.Provider,{value:Pd},p(a))),u.createElement("div",{ref:c,style:v?Ed:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));_d.displayName="ResizeGroupBase";var Hd,Id=_d;!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"}(Hd||(Hd={}));var Wd=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?Hd.PERSISTED_KEYTIP_ADDED:Hd.KEYTIP_ADDED;sd.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||sd.raise(this,Hd.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?Hd.PERSISTED_KEYTIP_REMOVED:Hd.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||sd.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){sd.raise(this,Hd.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){sd.raise(this,Hd.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){sd.raise(this,Hd.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}(),Rd=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},$d=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]}},zd=function(t){var n=Wd.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&&($d(i,e),Rd(n,i,t))})),u.useEffect((function(){return Rd(n,i,t),function(){$d(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},jd=(0,a.Z)(),Yd=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)({},$(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(zd,(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(zd,(0,o.Cl)({},t,{className:p.overflowButton})))}));Yd.displayName="OverflowSet";var Xd,Gd={flexShrink:0,display:"inherit"},Ud=(0,r.I)(Yd,(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",Gd],overflowButton:["ms-OverflowSet-overflowButton",Gd]}}),void 0,{scope:"OverflowSet"}),qd=((Xd={})["".concat(_s[_s.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",Xd["".concat(_s[_s.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",Xd["".concat(_s[_s.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Xd["".concat(_s[_s.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Xd["".concat(_s[_s.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",Xd["".concat(_s[_s.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",Xd["".concat(_s[_s.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",Xd["".concat(_s[_s.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",Xd["".concat(Hs[Hs.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",Xd),Zd=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(qd).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},Xs(n),{transform:"rotate(".concat(e===_s[_s.diamond]?45:e===_s[_s.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:qd[e]},Xs(i))))};function Kd(t,n,i,e){return void 0===i&&(i=!1),void 0===e&&(e={}),new Promise((function(r,u){if(!t)return u(new Error("Chart container is not defined"));try{var a="string"==typeof e.background?qs(t,e.background):"transparent",l=function(t,n,i,e){var r=t.querySelector("svg");if(!r)throw new Error("SVG not found");for(var u=sl(r.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),a=r.getElementsByTagName("*"),l=u.node().getElementsByTagName("*"),s=["text"],c=["table","thead","tbody","tr","th","td"],d=0;d<a.length;d++){var f=a[d].tagName.toLowerCase();s.includes(f)||c.includes(f)?Zs((0,o.fX)((0,o.fX)([],Jd,!0),Qd,!0),a[d],l[d]):Zs(Jd,a[d],l[d])}a=null,l=null;var v=r.getBoundingClientRect(),h=v.width,p=v.height,g="function"==typeof n?n(h,i):{node:null,width:0,height:0},y=Math.max(h,g.width),m=p+g.height;g.node&&(sl(g.node).attr("transform","translate(0, ".concat(p,")")),u.append((function(){return g.node}))),u.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y).attr("height",m).attr("fill",e),u.attr("width",y).attr("height",m).attr("viewBox","0 0 ".concat(y," ").concat(m)).attr("direction",i?"rtl":"ltr");var b={node:u.node(),width:y,height:m};return u=null,b}(t,n,i,a);if(!l.node)return u(new Error("SVG node is null"));var s=(new XMLSerializer).serializeToString(l.node);l.node=null;var c="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),ef.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),nf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(s)));s=null,function(t,n){return void 0===n&&(n={}),new Promise((function(i,e){var r=n.scale||1,o=n.width||300,u=n.height||150,a=r*o,l=r*u,s=document.createElement("canvas"),c=new Image;s.width=a,s.height=l,c.onload=function(){var t=s.getContext("2d");if(!t)return e(new Error("Canvas context is null"));t.clearRect(0,0,a,l),t.drawImage(c,0,0,a,l);var n=s.toDataURL("image/png");i(n)},c.onerror=function(t){e(t)},c.src=t}))}(c,{width:e.width||l.width,height:e.height||l.height,scale:e.scale}).then(r).catch(u),c=null}catch(t){return u(t)}}))}var Jd=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],Qd=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],tf={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};var nf=/^[\da-f]{2}$/i,ef=/^[\da-f]{4}$/i,rf=(0,a.Z)(),of=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=sl(Ka("svg:g").call(document.documentElement)),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o,g,y,m,b=(o=t[i].title,g=a,y=e,(m=document.getElementById(Js))||((m=document.createElement("span")).setAttribute("id",Js),m.setAttribute("aria-hidden","true"),y?y.appendChild(m):document.body.appendChild(m)),m.setAttribute("class",g),Object.assign(m.style,Ks),m.textContent="".concat(o),m),x=29+b.getBoundingClientRect().width+8,w=s.append("g");f.push({elem:w,width:x}),c+x>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:w,width:x}],c=u?0:12,d+=32);var M=r[t[i].title]||p;w.append("rect").attr("x",c+(l?x-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),w.append("text").attr("x",c+(l?x-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",M?1:.67).text(t[i].title).call((function(t){return Zs(tf,b,t.node())})),c+=x},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}))}))}return{node:s.node(),width:Math.max.apply(Math,h),height:d}}(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(Xc,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(Ud,(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=rf(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(Xc,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:rc.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=rf(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(Nd,{type:Qc.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){return 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=rf(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=rf(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){return t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Id,{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:$(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(Zd,{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),uf=(0,r.I)(of,(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 af(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lf(t){return function(){return t}}function sf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function cf(t){return t}Array.prototype.slice;const df=Math.abs,ff=Math.atan2,vf=Math.cos,hf=Math.max,pf=Math.min,gf=Math.sin,yf=Math.sqrt,mf=1e-12,bf=Math.PI,xf=bf/2,wf=2*bf;function Mf(t){return t>=1?xf:t<=-1?-xf:Math.asin(t)}function Cf(){var t=cf,n=sf,i=null,e=lf(0),r=lf(wf),o=lf(0);function u(u){var a,l,s,c,d,f=(u=af(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(wf,Math.max(-wf,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:lf(+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:lf(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:lf(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:lf(+t),u):o},u}const kf=Math.PI,Af=2*kf,Sf=1e-6,Lf=Af-Sf;function Vf(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class Df{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Vf:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Vf;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>Sf)if(Math.abs(c*a-l*s)>Sf&&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((kf-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>Sf&&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)>Sf||Math.abs(this._y1-s)>Sf)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%Af+Af),d>Lf?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>Sf&&this._append`A${i},${i},0,${+(d>=kf)},${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 Nf(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 Df(n)}function Of(t){return t.innerRadius}function Tf(t){return t.outerRadius}function Ef(t){return t.startAngle}function Ff(t){return t.endAngle}function Bf(t){return t&&t.padAngle}function Pf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/yf(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)*yf(hf(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 _f(){var t=Of,n=Tf,i=lf(0),e=null,r=Ef,o=Ff,u=Bf,a=null,l=Nf(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-xf,p=o.apply(this,arguments)-xf,g=df(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>mf)if(g>wf-mf)a.moveTo(v*vf(h),v*gf(h)),a.arc(0,0,v,h,p,!y),f>mf&&(a.moveTo(f*vf(p),f*gf(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>mf&&(e?+e.apply(this,arguments):yf(f*f+v*v)),V=pf(df(v-f)/2,+i.apply(this,arguments)),D=V,N=V;if(L>mf){var O=Mf(L/f*gf(S)),T=Mf(L/v*gf(S));(k-=2*O)>mf?(M+=O*=y?1:-1,C-=O):(k=0,M=C=(h+p)/2),(A-=2*T)>mf?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*vf(x),F=v*gf(x),B=f*vf(C),P=f*gf(C);if(V>mf){var _,H=v*vf(w),I=v*gf(w),W=f*vf(M),R=f*gf(M);if(g<bf)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<mf))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var $=E-_[0],z=F-_[1],j=H-_[0],Y=I-_[1],X=1/gf(((d=($*j+z*Y)/(yf($*$+z*z)*yf(j*j+Y*Y)))>1?0:d<-1?bf:Math.acos(d))/2),G=yf(_[0]*_[0]+_[1]*_[1]);D=pf(V,(f-G)/(X-1)),N=pf(V,(v-G)/(X+1))}else D=N=0}A>mf?N>mf?(m=Pf(W,R,E,F,v,N,y),b=Pf(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,ff(m.y01,m.x01),ff(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,ff(m.y01,m.x01),ff(m.y11,m.x11),!y),a.arc(0,0,v,ff(m.cy+m.y11,m.cx+m.x11),ff(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,ff(b.y11,b.x11),ff(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>mf&&k>mf?D>mf?(m=Pf(B,P,H,I,f,-D,y),b=Pf(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,ff(m.y01,m.x01),ff(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,D,ff(m.y01,m.x01),ff(m.y11,m.x11),!y),a.arc(0,0,f,ff(m.cy+m.y11,m.cx+m.x11),ff(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,D,ff(b.y11,b.x11),ff(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-bf/2;return[vf(e)*i,gf(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:lf(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:lf(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:lf(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:lf(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:lf(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:lf(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:lf(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var Hf=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)}}},If=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?zu(".0%")(0===s?0:g/s):$s(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Wf(t),null},n.prototype.updateChart=function(t){Wf(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(Hf,{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&&(window.location.href=t)},n.defaultProps={arc:_f()},n}(u.Component);function Wf(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Rf,$f,zf,jf=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)}}},Yf=(0,a.Z)(),Xf=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:Mc(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:Mc(n,0,i.props.theme.isInverted)[1]),u.createElement(If,{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=Cf().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,r=this._pieForFocusRing(e),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=Yf(jf,{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=Yf(jf,{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:Cf().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),Gf=(0,a.Z)(),Uf=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Kd(e._rootElem,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])||Mc(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})})):[]},Ac(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(){this._rootElem&&this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40})},n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(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=Gf(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=Math.min(this.state._width-s,this.state._height-c)/2,f=this._elevateToMinimums(a),v=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,f):"";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){return 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(Xc,{direction:rc.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},u.createElement(Xf,{width:this.state._width,height:this.state._height,outerRadius:d,innerRadius:this.props.innerRadius,data:f,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(v),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels}))),u.createElement(jn,(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,Rs(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(pc.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},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!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])||Mc(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(uf,(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);!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"}(Rf||(Rf={})),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"}($f||($f={})),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"}(zf||(zf={}));var qf=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",top:"0px",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},Zf=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:$f.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},Kf=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)}},Jf=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},Qf=(0,r.I)(Uf,(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%"},axisAnnotation:Zf(i,i.fonts.small)}}));function tv(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 nv(t){return t[0]}function iv(t){return t[1]}function ev(t,n){var i=lf(!0),e=null,r=hl,o=null,u=Nf(a);function a(a){var l,s,c,d=(a=af(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?nv:lf(t),n="function"==typeof n?n:void 0===n?iv:lf(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:lf(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:lf(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:lf(!!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 rv=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||!Nc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==Uc.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 Uc.medium:return 300;case Uc.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(Kc,(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:Uc.medium},n}(u.Component),ov=(0,a.Z)(),uv=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),av=[ts.HorizontalBarChartWithAxis,ts.HeatMapChart,ts.VerticalStackedBarChart,ts.GanttChart,ts.ScatterChart],lv=function(t){function n(n){var i,e,r,a,s,c,d,f,v,h,g,y,m,b,x,w,M,C,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H=t.call(this,n)||this;H.minLegendContainerHeight=32,H._isRtl=(0,l.jI)(),H._isFirstRender=!0,H._removalValueForTextTuncate=0,H.isIntegralDataset=!0,H.calculateMaxYAxisLabelLength=function(t){return Ss(H.props.stringDatasetForYAxisDomain.map((function(t){return n=t,H.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,H.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},H._multiValueCallout=function(t){var n=H._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:H._classNames.calloutContentRoot},u.createElement("div",{className:H._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:H._classNames.calloutContentX},Rs(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,H.props.culture,H.props.useUTC))),u.createElement("div",{className:H._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,e){var r=i+1===e.length,a=t.shouldDrawBorderBottom,l=void 0!==a&&a;return u.createElement("div",(0,o.Cl)({},Rs(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),H._getCalloutContent(t,i,n,r))})),!!t.descriptionMessage&&u.createElement("div",{className:H._classNames.descriptionMessage},t.descriptionMessage)))},H._getData=function(t,n,i){H.props.getGraphData&&H.props.getGraphData(t,n,H.state.containerHeight-H._removalValueForTextTuncate,H.state.containerWidth,H.xAxisElement,H.yAxisElement,i)},H._onChartLeave=function(){H.props.onChartMouseLeave&&H.props.onChartMouseLeave()},H._calculateChartMinWidth=function(){var t=H._calcMaxLabelWidthWithTransform(H._tickValues)+10,n=H.margins.left+H.margins.right+t*(H._tickValues.length-1);return[ts.GroupedVerticalBarChart,ts.VerticalBarChart,ts.VerticalStackedBarChart].includes(H.props.chartType)&&(n+=16),n},H._getChartDescription=function(){return(H.props.chartTitle||"Chart. ")+H._getAxisTitle("X",H.props.xAxisTitle,H.props.xAxisType)+H._getAxisTitle("Y",H.props.yAxisTitle,H.props.yAxisType||is.NumericAxis)+(H.props.secondaryYScaleOptions?H._getAxisTitle("secondary Y",H.props.secondaryYAxistitle,is.NumericAxis):"")},H._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"))+". "},H._calcMaxLabelWidthWithTransform=function(t){if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===ns.StringAxis){var n=Ss(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(H.props.showXAxisLablesTooltip){var i=t.map((function(t){var n=H.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),e=Ss(i,".".concat(H._classNames.xAxis," text"));return Math.ceil(e)}if(H.props.wrapXAxisLables){var r=[];t.forEach((function(t){r.push.apply(r,t.toString().split(/\s+/))}));var o=Ss(r,".".concat(H._classNames.xAxis," text"));return Math.max(Math.ceil(o),10)}var u=Ss(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(u)},H._transformXAxisLabels=function(){var t,n,i;if(H._removalValueForTextTuncate=0,H.props.wrapXAxisLables||H.props.showXAxisLablesTooltip){var e=void 0;H.props.xAxisType===ns.StringAxis&&(e=((null===(t=H.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?H._xScale.step():H.state.containerWidth);var r={node:H.xAxisElement,xAxis:H._xScale,showXAxisLablesTooltip:H.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:H.props.noOfCharsToTruncate||4,width:e};H._removalValueForTextTuncate=null!==(n=function(t){var n=t.node,i=t.xAxis,e=t.noOfCharsToTruncate,r=t.showXAxisLablesTooltip,o=t.width,u=void 0===o?10:o;if(null!==n){var a=sl(n).call(i),l=0,s=1;if(a.selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i="".concat(t.text().slice(0,e),"..."),o=t.text().length,a=t.text().split(/\s+/).reverse(),l="",c=[],d=0,f=t.attr("y"),v=parseFloat(t.attr("dy")),h=t.text(null).append("tspan").attr("x",0).attr("y",f).attr("id","BaseSpan").attr("dy",v+"em").attr("data-",n);if(r&&o>e)h=t.append("tspan").attr("id","showDots").attr("x",0).attr("y",f).attr("dy",v+"em").text(i);else if(r&&o<=e)h=t.append("tspan").attr("id","LessLength").attr("x",0).attr("y",f).attr("dy",v+"em").text(n);else for(;l=a.pop();)c.push(l),h.text(c.join(" ")),h.node().getComputedTextLength()>u&&c.length>1&&(c.pop(),h.text(c.join(" ")),c=[l],h=t.append("tspan").attr("id","WordBreakId").attr("x",0).attr("y",f).attr("dy",1.1*++d+v+"em").text(l));s=Math.max(s,d+1)})),!r){var c=12,d=document.getElementById("WordBreakId"),f=d&&d.getBoundingClientRect(),v=f&&f.height;v>c&&(c=v),l=(s-1)*c}return l>0?l:0}}(r))&&void 0!==n?n:0}if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===ns.StringAxis){var o=null!==(i=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:H.xAxisElement,xAxis:H._xScale}))&&void 0!==i?i:0;H._removalValueForTextTuncate=o+H.margins.bottom}},H.state={containerHeight:0,containerWidth:0,_width:H.props.width||600,_height:H.props.height||350,startFromX:0},H.idForGraph=p("chart_"),H.titleMargin=8,H.idForDefaultTabbableElement=p("defaultTabbableElement_"),H._tooltipId=p("tooltip_"),H.margins={top:null!==(e=null===(i=H.props.margins)||void 0===i?void 0:i.top)&&void 0!==e?e:20,bottom:null!==(a=null===(r=H.props.margins)||void 0===r?void 0:r.bottom)&&void 0!==a?a:35,right:H._isRtl?null!==(c=null===(s=H.props.margins)||void 0===s?void 0:s.left)&&void 0!==c?c:40:(null!==(f=null===(d=H.props.margins)||void 0===d?void 0:d.right)&&void 0!==f?f:null===(v=H.props)||void 0===v?void 0:v.secondaryYScaleOptions)?40:20,left:H._isRtl?(null!==(g=null===(h=H.props.margins)||void 0===h?void 0:h.right)&&void 0!==g?g:null===(y=H.props)||void 0===y?void 0:y.secondaryYScaleOptions)?40:20:null!==(b=null===(m=H.props.margins)||void 0===m?void 0:m.left)&&void 0!==b?b:40};var I=24;return void 0!==H.props.xAxisTitle&&""!==H.props.xAxisTitle&&(H.margins.bottom=null!==(w=null===(x=H.props.margins)||void 0===x?void 0:x.bottom)&&void 0!==w?w:H.margins.bottom+20),void 0!==H.props.yAxisTitle&&""!==H.props.yAxisTitle&&(H.margins.left=H._isRtl?(null!==(C=null===(M=H.props.margins)||void 0===M?void 0:M.right)&&void 0!==C?C:null===(k=H.props)||void 0===k?void 0:k.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I:null!==(S=null===(A=H.props.margins)||void 0===A?void 0:A.left)&&void 0!==S?S:H.margins.left+I,H.margins.right=H._isRtl?null!==(V=null===(L=H.props.margins)||void 0===L?void 0:L.left)&&void 0!==V?V:H.margins.left+I:(null!==(N=null===(D=H.props.margins)||void 0===D?void 0:D.right)&&void 0!==N?N:null===(O=H.props)||void 0===O?void 0:O.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I),void 0!==H.props.xAxisAnnotation&&""!==H.props.xAxisAnnotation&&(H.margins.top=null!==(E=null===(T=H.props.margins)||void 0===T?void 0:T.top)&&void 0!==E?E:H.margins.top+20),void 0===H.props.yAxisAnnotation||""===H.props.yAxisAnnotation||void 0!==H.props.secondaryYAxistitle&&""!==H.props.secondaryYAxistitle||(H._isRtl?H.margins.left=null!==(B=null===(F=H.props.margins)||void 0===F?void 0:F.right)&&void 0!==B?B:H.margins.right+I:H.margins.right=null!==(_=null===(P=H.props.margins)||void 0===P?void 0:P.right)&&void 0!==_?_:H.margins.right+I),H}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),av.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===is.StringAxis){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(),av.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===is.StringAxis){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();var L=(0,o.Cl)({},this.margins);av.includes(this.props.chartType)&&(this._isRtl?L.right+=this.state.startFromX:L.left+=this.state.startFromX),this.props.getmargins&&this.props.getmargins(L),this._classNames=ov(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 V,D,N,O,T,E=null,F=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var B={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,this.state.startFromX),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.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform,tickStep:null===(a=this.props.xAxis)||void 0===a?void 0:a.tickStep,tick0:null===(l=this.props.xAxis)||void 0===l?void 0:l.tick0},P=void 0,_=void 0;switch(this.props.xAxisType){case ns.NumericAxis:P=(t=ms(B,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,_=t.tickValues;break;case ns.DateAxis:P=(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.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=u?Au():ku();m.domain([l.dStartValue,l.dEndValue]).range([l.rStartValue,l.rEndValue]).nice();var b=null!=h?h:6,x=100,w=-1,M=r?je(r):void 0;m.ticks().forEach((function(t){var n=bs(t,u);n>w&&(w=n),n<x&&(x=n)}));var C=null!=e?e:(0,Yn.c2)(x,w),k=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])}(x,w,M,u),A=function(t,e){return o?o(t):r?k(t):void 0===i&&n.tickFormat?u?Ge(n.tickFormat)(t):Xe(n.tickFormat)(t):(0,Yn.Yn)(t,i,u,!1,C)},S=p(m.ticks().map(A))+40,L=m.range(),V=L[0],D=L[1],N=Math.min(Math.max(1,Math.floor(Math.abs(D-V)/S)),10);b=Math.min(N,null!=h?h:b);var O,T=ni(m).tickSize(v).tickPadding(d).ticks(b).tickFormat(A);[ts.GanttChart].includes(a)&&T.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?O=n.tickValues:g&&(O=vc(g,y,m.domain(),u)),O&&T.tickValues(O),s&&sl(s).call(T).selectAll("text").attr("aria-hidden","true");var E=(null!=O?O:m.ticks(b)).map(T.tickFormat());return{xScale:m,tickValues:E}}(B,this.props.tickParams,C,k,A,S,this.props.useUTC,this.props.chartType)).xScale,_=n.tickValues;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=Tu().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),y=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var m=[],b=y.map((function(t){return p([t])})),x=0,w=v,M=1,C=g.range();C[1]-C[0]<0&&(x=v,w=0,M=-1);for(var k=y.length-1;k>=0;k--){var A=g(y[k]);M*(A-M*b[k]/2-x)>=0&&M*(A+M*b[k]/2-w)<=0&&(m.push(y[k]),w=A-M*(b[k]/2+10))}y=m=m.reverse()}var S=ni(g).tickSize(u).tickPadding(l).tickValues(y);return t.xAxisElement&&sl(t.xAxisElement).call(S).selectAll("text").attr("aria-hidden","true"),{xScale:g,tickValues:y}}(B,this.props.tickParams,this.props.datasetForXAxisDomain),P=i.xScale,_=i.tickValues;break;default:P=(e=ms(B,this.props.tickParams,this.props.chartType,C,this.props.xScaleType)).xScale,_=e.tickValues}this._xScale=P,this._tickValues=_,this._transformXAxisLabels();var H={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,tickStep:null===(s=this.props.yAxis)||void 0===s?void 0:s.tickStep,tick0:null===(c=this.props.yAxis)||void 0===c?void 0:c.tick0},I=void 0,W=void 0,R={yAxisDomainValues:[]};if(this.props.yAxisType&&this.props.yAxisType===is.StringAxis)I=this.props.createStringYAxis(H,this.props.stringDatasetForYAxisDomain,this._isRtl,this.props.barwidth,this.props.chartType);else{if(null===(d=this.props)||void 0===d?void 0:d.secondaryYScaleOptions){var $={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===(f=this.props.secondaryYScaleOptions)||void 0===f?void 0:f.yMinValue)||0,yMaxValue:null!==(h=null===(v=this.props.secondaryYScaleOptions)||void 0===v?void 0:v.yMaxValue)&&void 0!==h?h:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(m,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};W=this.props.createYAxis($,this._isRtl,R,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}I=this.props.createYAxis(H,this._isRtl,R,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}if(av.includes(this.props.chartType)&&this.props.yAxisType===is.StringAxis){if(!this.props.showYAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showYAxisLablesTooltip){I&&(V=this.yAxisElement,D=I,N=this.props.noOfCharsToTruncate||4,O=this.props.showYAxisLablesTooltip||!1,T=this._isRtl,null!==V&&sl(V).call(D).selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i=T?"...".concat(t.text().slice(0,N)):"".concat(t.text().slice(0,N),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy"));t.text(null).append("tspan").attr("x",o).attr("y",r).attr("id","BaseSpan").attr("dy",u+"em").attr("data-",n),O&&e>N?t.append("tspan").attr("id","showDots").attr("x",o).attr("y",r).attr("dy",u+"em").attr("dx","0em").text(i):t.append("tspan").attr("id","LessLength").attr("x",o).attr("y",r).attr("dx","0em").text(n)})));var z=sl(this.yAxisElement).call(I);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var j={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:z};z&&Ls(j)}}this.props.getAxisData&&this.props.getAxisData(R),this._getData(P,I,W),F=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:P,yScalePrimary:I,yScaleSecondary:W})),!this.props.hideTooltip&&y.isCalloutVisible&&(E=this._generateCallout(y,x))}var Y,X={width:this.state.containerWidth,height:this.state.containerHeight};Y=this.props.focusZoneDirection===rc.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:rc.horizontal;var G=X.width-this.margins.left-this.margins.right-this.state.startFromX,U=X.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-this.titleMargin,q={wrapContent:As,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){return p.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(Xc,(0,o.Cl)({direction:Y,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},w),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:X.width,height:X.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},Xs(M)),u.createElement("g",{ref:function(t){p.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat(X.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement(rv,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+this.state.startFromX+G/2,y:X.height-this.titleMargin,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:G},q)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&u.createElement(rv,(0,o.Cl)({content:this.props.xAxisAnnotation,textProps:{x:this.margins.left+this.state.startFromX+G/2,y:this.titleMargin+3,className:this._classNames.axisAnnotation,textAnchor:"middle","aria-hidden":!0},maxWidth:G},q)),u.createElement("g",{ref:function(t){p.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?X.width-this.margins.right-this.state.startFromX:this.margins.left+this.state.startFromX,", 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+this.state.startFromX:X.width-this.margins.right-this.state.startFromX,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement(rv,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:(U-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:X.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat(X.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:U},q))),F,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement(rv,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:(U-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?X.width-this.margins.right/2+this.titleMargin:this.margins.left/2-this.titleMargin,textAnchor:"middle",transform:"translate(0,\n ".concat(X.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:U},q)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement(rv,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:(U-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:X.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat(X.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:U},q)))),!this.props.hideLegend&&u.createElement("div",{ref:function(t){return p.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),E&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},E))},n.prototype._generateCallout=function(t,n){return u.createElement(jn,(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(uv,(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=ov(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(Zd,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:_s[t.index%Object.keys(Ws).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),sv=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}(),cv=(0,r.I)(lv,(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"},d],chartWrapper:(0,o.Cl)({},b?{overflow:"auto"}:{}),axisTitle:Zf(f,f.fonts.xSmall),axisAnnotation:Zf(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"}}},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&&!sv&&{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:qf(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c)}})),dv=(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 fv(t,n){return dv(t)(n)}var vv=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)},hv=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},pv="spacer-",gv=1/3,yv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},mv=function(t){return t.getBoundingClientRect()},bv=mv,xv=mv,wv=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)},Ac(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=xv(this._scrollElement),f=vv(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 hv(this._scrollElement,u);case 2:return void hv(this._scrollElement,g-d.height);case 3:return void hv(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&&hv(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 sd(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=$(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?fv(r,this._onRenderSurface):this._onRenderSurface;return(u?fv(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:z("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)({},yv),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(pv+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=pv+"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)({},yv),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=vv(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*gv)&&(a=this._surfaceRect=bv(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=Mv(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=Mv(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 Mv(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 Cv=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},Xs(i)))},kv=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(jn,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(Xc,{isCircularNavigation:!0,direction:rc.vertical},u.createElement(wv,{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(Cv,{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)},Av=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(kv,{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 Sv(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 Lv,Vv=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(Lv||(Lv={}));var Dv=wi((function(t){return t.x})).left,Nv=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 Kd(null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){return o===ns.NumericAxis?Ds(t,n,i,r,c.props.xScaleType,c._hasMarkersMode):o===ns.DateAxis?Es(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=ec(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=Fs(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=uc(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?Lv.hoverSize:1===n||i?2.5*a:Lv.invisibleSize:l===t?Lv.hoverSize:Lv.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(Ws).length:0,d=Ws[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=Fs(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(tv(e)[0],document.getElementById(c._rectId)),u=Dv(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(Is(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=hc(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=hc(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=hc(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. ")},Ac(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=ks(c._points)||{},c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._tooltipId=p("LineChartTooltipId_"),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)&&Gs(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=ks(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=Vs(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=ks(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(cv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:ts.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:ws,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:Cs,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(Av,(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:_s[r.index%Object.keys(Ws).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(uf,(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=Vv(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?cc({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(lc(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=ev().x((function(t){return it._xAxisScale(t[0])})).y((function(t){return gt(t[1])})).curve(Qs(Tt)).defined((function(t){return lc(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 $t=(null===(d=at._points[t].lineOptions)||void 0===d?void 0:d.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;$t>0&<.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())+$t,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 zt=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:zt?"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"))||!Wt)for(It=0;It<at._points[t].data.length;It++){var jt=at._points[t].data[It],Yt=jt.x,Xt=jt.y;if(Ct=at._xAxisScale(Yt instanceof Date?Yt.getTime():Yt),kt=gt(Xt),lc(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(lc(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;lc(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(lc(y,m)&&lc(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===($=at._points[t].lineOptions)||void 0===$?void 0:$.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;Lt>0&<.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:x,strokeLinecap:null!==(j=null===(z=at._points[t].lineOptions)||void 0===z?void 0:z.strokeLinecap)&&void 0!==j?j:"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=ev().x((function(t){return Qt(t)})).y((function(t){return gt(t.y)})).curve(Qs(Tt)).defined((function(t){return lc(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,Sv({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);if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var st=sl(t).call(this._xAxisScale);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var ct={tooltipCls:ot.tooltip,id:this._tooltipId,axis:st};st&&Ls(ct)}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),Ov=(0,r.I)(Nv,(function(t){return{tooltip:qf(t.theme),markerLabel:Jf(t.theme)}})),Tv=(0,a.Z)(),Ev=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("ScatterChartTooltipId_")}),[]),f=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),v=u.useRef(lt(t.data.scatterChartData)),h=u.useMemo((function(){return ks(v.current)||{}}),[v]),g=u.useRef(""),y=u.useRef(""),m=u.useRef(null),b=u.useMemo((function(){return[]}),[]),x=u.useRef(null),w=u.useRef([]),M=u.useRef(0),C=u.useRef(null),k=u.useRef(null),A=u.useState(""),S=A[0],L=A[1],V=u.useState(""),D=V[0],N=V[1],O=u.useState([]),T=O[0],E=O[1],F=u.useState([]),B=F[0],P=F[1],_=u.useState(!1),H=_[0],I=_[1],W=u.useState(""),R=W[0],$=W[1],z=u.useState(),j=z[0],Y=z[1],X=u.useState(!1),G=X[0],U=X[1],q=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),Z=q[0],K=q[1],J=u.useState(""),Q=J[0],tt=J[1],nt=u.useRef(void 0),it=u.useRef(!1),et=u.useRef(!1),rt=Tv(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;nt.current&&!Gs(nt.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&K((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),nt.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 t,n;return{chartContainer:null!==(n=null===(t=C.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Kd(null===(n=C.current)||void 0===n?void 0:n.chartContainer,null===(i=k.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);var ot=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?Is(t.data.scatterChartData[0].data[0].x,!0):ns.StringAxis,ut=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,at=u.useRef([]);function lt(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(){v.current===lt(t.data.scatterChartData)&&t.data===v.current||(at.current=lt(t.data.scatterChartData))}),[t.height,t.width,t.data,v]);var st=u.useCallback((function(t){x.current=t}),[]);function ct(){P([]),I(!1)}function dt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?K(n):K(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ft=u.useCallback((function(n,i){var e=t.theme;return R===i?e.semanticColors.bodyBackground:n}),[R,t]),vt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===ns.NumericAxis?Ds(n,i,e,o,t.xScaleType,!0):u===ns.DateAxis?Es(n,i,e,o,l,r):Ts(i,e,o)}),[t.xScaleType]),ht=u.useCallback((function(n,i,e,r,o){m.current=r;var u=i instanceof Date?(0,Yn.Yn)(i,t.culture,t.useUTC):i,a=hc(h,i);a?(sl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,i))+M.current,", 0)")})).attr("visibility","visibility"),b.forEach((function(t){t.index===n&&(U(!0),L(e||""+u),tt("#".concat(r)),E(a.values),$(r))}))):$(r)}),[c,g,M,h,b,t.culture,t.useUTC]),pt=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=hc(h,n);d?(sl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,n))+M.current,", ").concat(null===(e=y.current)||void 0===e?void 0:e.call(y,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=y.current)||void 0===l?void 0:l.call(y,i)))),m.current!==o&&(m.current=o,U(!0),L(r||""+s),tt("#".concat(o)),E(d.values),Y(d),$(o))):$(o)}),[c,g,M,h,t.culture,t.useUTC]),gt=u.useCallback((function(){sl("#".concat(c)).attr("visibility","hidden")}),[c]),yt=u.useCallback((function(){m.current=null,$(""),G&&U(!1)}),[m,G,$,U]),mt=u.useCallback((function(){return Z.length>0?Z:D?[D]:[]}),[Z,D]),bt=u.useCallback((function(){return 0===mt().length}),[mt]),xt=u.useCallback((function(t){return mt().includes(t)}),[mt]),wt=u.useCallback((function(n,i){var e,r,o=null===(e=v.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,".")}),[v,t.culture,t.useUTC]),Mt=u.useCallback((function(n,i){var e,r,l,c,f,h,p,m,b,w,C,k,A,S,L,V,D,N,O,T,E,F,P,_,I,W,$,z,j,Y,X,G,U,q,Z=[];v.current=H?B:lt(t.data.scatterChartData),ot===ns.StringAxis&&(M.current=(null===(e=g.current)||void 0===e?void 0:e.bandwidth())/2);for(var K=fi(v.current,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),J=ot!==ns.StringAxis&&ut!==is.StringAxis?cc({data:v.current,xScale:g.current,yScalePrimary:y.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,Q=function(t){for(var n=[],e=null===(c=null===(l=v.current)||void 0===l?void 0:l[t])||void 0===c?void 0:c.legend,r=null===(h=null===(f=v.current)||void 0===f?void 0:f[t])||void 0===h?void 0:h.color,d=i-(null!==(m=null===(p=x.current)||void 0===p?void 0:p.bottom)&&void 0!==m?m:0)+6,B=function(i){var l=null===(A=null===(k=v.current)||void 0===k?void 0:k[t])||void 0===A?void 0:A.data[i],c=l.x,f=l.y,h=l.xAxisCalloutData,p=l.xAxisCalloutAccessibilityData,m=null===(S=g.current)||void 0===S?void 0:S.call(g,c),b=ut===is.StringAxis?(null===(L=y.current)||void 0===L?void 0:L.call(y,f))+((null===(V=y.current)||void 0===V?void 0:V.bandwidth)?y.current.bandwidth()/2:0):null===(D=y.current)||void 0===D?void 0:D.call(y,f);if(!lc(m,b))return"continue";var x,w="".concat(s,"_").concat(t,"_").concat(i),C="".concat(a,"_").concat(t,"_").concat(i),B=(null===(O=null===(N=v.current)||void 0===N?void 0:N[t])||void 0===O?void 0:O.data[i]).markerSize,j=B&&0!==K?ot!==ns.StringAxis?B*J/K:4+(B-4)/(K-4)*12:R===C?6:4,Y=xt(e)||bt()||H,X=(null===(E=null===(T=v.current)||void 0===T?void 0:T[t])||void 0===E?void 0:E.hideNonActiveDots)&&R!==C,G=null===(P=null===(F=v.current)||void 0===F?void 0:F[t].data[i])||void 0===P?void 0:P.text;et.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:C,key:C,r:Math.max(j,4),cx:m+M.current,cy:b,"data-is-focusable":Y,onMouseOver:function(t){return pt(c,f,d,h,C,p,t)},onMouseMove:function(t){return pt(c,f,d,h,C,p,t)},onMouseOut:gt,onFocus:function(){return ht(w,c,h,C,p)},onBlur:gt},(x=null===(W=null===(I=null===(_=v.current)||void 0===_?void 0:_[t])||void 0===I?void 0:I.data[i])||void 0===W?void 0:W.onDataPointClick)?{onClick:x}:{},{opacity:Y&&!X?1:.1,fill:ft(r,C),stroke:r,role:"img","aria-label":wt(t,i),tabIndex:""!==(null===(z=null===($=v.current)||void 0===$?void 0:$[t])||void 0===z?void 0:z.legend)?0:void 0})))),et&&G&&n.push(u.createElement("text",{key:"".concat(C,"-label"),x:m+M.current,y:b+Math.max(j+12,16),className:rt.markerLabel},G))},Q=0;Q<(null===(C=null===(w=null===(b=v.current)||void 0===b?void 0:b[t])||void 0===w?void 0:w.data)||void 0===C?void 0:C.length);Q++)B(Q);it.current&&n.push.apply(n,Sv({xAxisScale:g.current,yAxisScale:y.current,className:rt.markerLabel||"",lineOptions:null===(Y=null===(j=v.current)||void 0===j?void 0:j[t])||void 0===Y?void 0:Y.lineOptions})),Z.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(X=v.current)||void 0===X?void 0:X.length," with ").concat(null===(q=null===(U=null===(G=v.current)||void 0===G?void 0:G[t])||void 0===U?void 0:U.data)||void 0===q?void 0:q.length," data points.")},n))},tt=(null===(r=v.current)||void 0===r?void 0:r.length)-1;tt>=0;tt--)Q(tt);if(!t.showXAxisLablesTooltip)try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}if(!t.wrapXAxisLables&&t.showXAxisLablesTooltip){var nt=sl(n).call(g.current);try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}var at={tooltipCls:rt.tooltip,id:d,xAxis:nt};nt&&Ls(at)}return Z}),[g,y,t.data.scatterChartData,t.showXAxisLablesTooltip,t.wrapXAxisLables,a,wt,ft,ht,pt,gt,xt,bt,s,d,ot,ut,R,H,B,rt,t.xScaleType,t.yScaleType]),Ct=u.useCallback((function(t,n,i,e,r){g.current=t,y.current=n,it.current=ec(v.current),et.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}))}(v.current),w.current=Mt(r,i)}),[w,g,y,Mt]),kt=u.useCallback((function(n,i){var e=Fs(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=uc(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),At=t.legendProps,St=t.tickValues,Lt=t.tickFormat;v.current=lt(t.data.scatterChartData);var Vt=v.current;At&&At.canSelectMultipleLegends&&(Vt=B.length>=1?B:v.current,h=ks(Vt));var Dt=null;t.hideLegend||et.current||(Dt=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(){N("")},hoverAction:function(){yt(),N(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(uf,(0,o.Cl)({legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:ct},{onChange:dt},t.legendProps))}(v.current));var Nt=(0,o.Cl)({isCalloutVisible:G,directionalHint:3,YValueHover:T,hoverXValue:S,id:"toolTip".concat(m.current),target:Q,isBeakVisible:!1,gapSpace:15,onDismiss:function(){U(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&G),descriptionMessage:t.getCalloutDescriptionMessage&&j?t.getCalloutDescriptionMessage(j):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Ot={tickValues:St,tickFormat:Lt},Tt=v.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Tt));var Et=function(){var n;if(ut!==is.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=v.current.length-1;e>=0;e--){var r=v.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 nc((n={},v.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(cv,(0,o.Cl)({},t,{ref:C,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Vt,chartType:ts.ScatterChart,calloutProps:Nt,tickParams:Ot,legendBars:Dt,getmargins:st,getMinMaxOfYAxis:kt,getDomainNRangeValues:vt,createYAxis:ws,createStringYAxis:Cs,getGraphData:Ct,xAxisType:ot,yAxisType:ut},ut===is.StringAxis?{stringDatasetForYAxisDomain:Et}:{},{onChartMouseLeave:yt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:C},it.current?{yMaxValue:1,yMinValue:-1}:{},{children:function(t){return g.current=t.xScale,y.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,w.current)))}})):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Ev.displayName="ScatterChart";var Fv=(0,r.I)(Ev,(function(t){return{tooltip:qf(t.theme),markerLabel:Jf(t.theme)}}));function Bv(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 Pv(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function _v(t,n){return t[n]}function Hv(t){const n=[];return n.key=t,n}function Iv(t){return t<0?-1:1}function Wv(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(Iv(o)+Iv(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Rv(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function $v(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 zv(t){this._context=t}function jv(t){this._context=t}function Yv(t){return new zv(t)}function Xv(t,n,i){var e=null,r=lf(!0),o=null,u=hl,a=null,l=Nf(s);function s(s){var c,d,f,v,h,p=(s=af(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 ev().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?nv:lf(+t),n="function"==typeof n?n:lf(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?iv:lf(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:lf(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:lf(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:lf(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:lf(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:lf(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:lf(+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:lf(!!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}zv.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:$v(this,this._t0,Rv(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,$v(this,Rv(this,i=Wv(this,t,n)),i);break;default:$v(this,this._t0,i=Wv(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 jv(t)}.prototype=Object.create(zv.prototype)).point=function(t,n){zv.prototype.point.call(this,n,t)},jv.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 Gv,Uv=(0,a.Z)(),qv=wi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(Gv||(Gv={}));var Zv=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 Kd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return Fs(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Ds(t,n,i,r):o===ns.DateAxis?Es(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(tv(t)[0],document.getElementById(e._rectId)),r=qv(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?Is(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=hc(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:Gv.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:Gv.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:Gv.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=lf([]),n=Pv,i=Bv,e=_v;function r(r){var o,u,a=Array.from(t.apply(this,arguments),Hv),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=af(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:lf(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:lf(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?Pv:"function"==typeof t?t:lf(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?Bv: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?Fs(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=ks(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=ks(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(uf,(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=Qs(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,Yv),k=Xv().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=ev().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;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),Xs(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},Xs(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},Xs(f))));var p=Uv(e.props.styles,{theme:e.props.theme});if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(a).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:p.tooltip,id:e._tooltipId,axis:g};g&&Ls(y)}return 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=hc(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. ")},Ac(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:Gv.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._tooltipId=p("AreaChartTooltipID"),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;Gs(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=Vs(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(cv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:ts.AreaChart,calloutProps:v,legendBars:d,createYAxis:ws,isCalloutForStack:!0,xAxisType:c?ns.DateAxis:ns.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Cs,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),Kv=(0,r.I)(Zv,(function(t){return{tooltip:qf(t.theme)}})),Jv=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)}}},Qv=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){nh(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 nh(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return Jv(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:_f()},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=_f().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 Jv(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(rv,{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:As}))},n}(Qv);function nh(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var ih,eh=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(Xc,{direction:rc.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:Cf().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),rh=(0,a.Z)(),oh=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=rh(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(eh,{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),uh=(0,r.I)(oh,(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"}(ih||(ih={}));var ah,lh=(0,a.Z)(),sh=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=lh(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])||Mc(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])||Mc(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(uf,(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=lh(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(jn,(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,Rs(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(pc.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===ih.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===ih.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])||Mc(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])||Mc(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=lh(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!==ih.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"},$s(L)))}var V=void 0!==e&&e,D=this.props.variant!==ih.AbsoluteScale&&!V&&2===t.chartData.length,N=this.props.variant!==ih.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(Xc,{direction:rc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(rd,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),D&&u.createElement("div",(0,o.Cl)({},Rs(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},Rs(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(Xc,{direction:rc.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&&(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),ch=(0,r.I)(sh,(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===ih.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===ih.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!==ih.AbsoluteScale||c?0:40}}})),dh=(0,a.Z)(),fh=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=dh(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(Xc,{direction:rc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(rd,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},Rs(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},Rs(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(Xc,{direction:rc.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(jn,(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,Rs(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(pc.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=dh(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])||Mc(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])||Mc(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=dh(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(uf,(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&&(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),vh=(0,r.I)(fh,(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)}}})),hh=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]]}},ph=function(t,n,i){var e=hh(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)))},gh=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},yh=function(t,n){return t+n/(1-n)*(t-1)},mh=function(t,n,i){return t*yh(n,i)},bh=function(t,n,i){return t/yh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(ah||(ah={}));var xh=(0,a.Z)(),wh=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 Kd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){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?Es(t,n,i,r,a,e):Ts(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=ev().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){return 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?ah.show:ah.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:ah.show,radius:8}:e._legendHighlighted(n)?{visibility:ah.show,radius:.3}:{visibility:ah.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(pc.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(pc.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?Mc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||Mc(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]),Ys(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])||Mc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=Mc(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(uf,(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=gh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Ys(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=zs(e.props.barWidth,e.props.maxBarWidth),u>=(f=mh(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=bh(u,r.length,e._xAxisInnerPadding),l=zs(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=mh(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=Ss(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=mh(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=zs(e.props.barWidth,e.props.maxBarWidth,ph(r,gh(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?[]:nc(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},Ac(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._tooltipId=p("VCTooltipID_"),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;Gs(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=xh(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),Rs(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(cv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:ts.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:ws,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:rc.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:Cs,getmargins:this._getMargins,getMinMaxOfYAxis:Bs,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:!Ys(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?Is(this.props.data[0].x,!0):ns.StringAxis,this._points=this.props.data||[],this._barWidth=zs(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:js(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=js(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=xh(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])||Mc(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])||Mc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Mc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Mc(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))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Ls(h)}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=xh(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=zs(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])||Mc(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])||Mc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Mc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Mc(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))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v,showTooltip:this.props.showXAxisLablesTooltip};v&&Ls(h)}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=xh(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])||Mc(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])||Mc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Mc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Mc(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))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Ls(h)}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){return this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted()?null:u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):$s(i))},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),Mh=(0,r.I)(wh,(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:qf(i),barLabel:Kf(i)}})),Ch=(0,a.Z)(),kh=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 Kd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){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?Es(t,n,i,r,a,e):Ts(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){return 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=zs(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])||Mc(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])||Mc(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=Ch(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){return 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){return 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;return e.props.hideLabels||e._yAxisType===is.StringAxis||(e._noLegendHighlighted()?(D=!0,N=f):h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(D=!0,N+=t.data)}))),u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){return S.refElement=t}},V),A),!e.props.hideLabels&&e._barWidth>=16&&D&&u.createElement("text",{x:l+e._barWidth/2,y:N>=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)")},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):$s(N)))}}}));if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(r).call(t);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:g};g&&Ls(y)}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 Ys(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=gh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Ys(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=zs(e.props.barWidth,e.props.maxBarWidth),i>=(r=mh(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=bh(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=zs(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=mh(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=Ss(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=zs(e.props.barWidth,e.props.maxBarWidth,ph(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=Is(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=Is(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?[]:nc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==is.StringAxis?[]:nc(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},Ac(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._tooltipId=p("VSBCTooltipId_"),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;Gs(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=Ch(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),Rs(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(cv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:ts.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:ws,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Cs,barwidth:this._barWidth,focusZoneDirection:r||n?rc.horizontal:rc.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:!Ys(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(){this._points=this.props.data||[],this._barWidth=zs(this.props.barWidth,this.props.maxBarWidth);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.red,t.black],this._xAxisType=Is(this.props.data[0].xAxisPoint,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=js(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=js(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(pc.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])||Mc(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=f.concat(a);return u.createElement(uf,(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&&(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),Ah=(0,r.I)(kh,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:qf(e),barLabel:Kf(e)}})),Sh=(0,a.Z)(),Lh=.1,Vh=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 Kd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){return o===ns.NumericAxis||o===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Ts(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=zs(e.props.barwidth,e.props.maxBarWidth,bh(l.bandwidth(),e._barLegends.length,Lh)),e._groupWidth=mh(e._barWidth,e._barLegends.length,Lh);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&&(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=mh(e._barWidth,d.length,Lh),v=Tu().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(Lh);if(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 c=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,v=(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:c}),u.createElement("stop",{offset:"100%",stopColor:v}))))}var m=.5*(r>0?2:0),M=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),C=n.color;n.data>=e.Y_ORIGIN?w=b-=M+m:x=(w=x+m)+M,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:M,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):C,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"})),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):$s(y)))}})),!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var h=sl(l).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var g={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:h};h&&Ls(g)}return 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(Lh)},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(uf,(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=gh(t,e.margins,8);if(e._xAxisType===ns.StringAxis)if(Ys(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=zs(e.props.barwidth,e.props.maxBarWidth);var i=mh(e._barWidth,e._barLegends.length,Lh);n>=(r=mh(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=bh(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=bh(u,e._barLegends.length,Lh),l=zs(e.props.barwidth,e.props.maxBarWidth,a),s=(i=mh(l,e._barLegends.length,Lh),(n-(r=mh(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=Ss(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=Mc(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?[]:nc(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=tv(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}},Ac(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._tooltipId=p("GVBCTooltipId_"),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;Gs(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._prepareChartData(),i=n.barData,e=n.lineData;this._xAxisType=Is(i[0].name,!0);var r=this._createSet(i,e),a=r.barLegends,l=r.lineLegends,s=r.xAxisLabels,c=r.datasetForBars;this._barLegends=a,this._lineLegends=l,this._xAxisLabels=s,this._datasetForBars=c;var d=this._getLegendData();this._adjustProps();var f=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(f,this.props.yMaxValue||0),this._classNames=Sh(this.props.styles,{theme:this.props.theme,href:this.props.href});var v=(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}),Rs(this.state.callOutAccessibilityData,"text",!1)),h={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty(i,e)?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(cv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:ts.GroupedVerticalBarChart,calloutProps:v,legendBars:d,xAxisType:this._xAxisType,createYAxis:ws,datasetForXAxisDomain:this._xAxisLabels,tickParams:h,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:Cs,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:rc.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(n){return u.createElement(u.Fragment,null,u.createElement("rect",{ref:t._rectRef,width:"100%",height:"100%",fill:"transparent",style:{pointerEvents:"none"}}),u.createElement("g",null,t._groupedVerticalBarGraph),t._createLines(e,n.xScale,n.yScalePrimary,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._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=zs(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=js(this.props.xAxisInnerPadding,void 0,2/(2+yh(this._barLegends.length,Lh))),this._xAxisOuterPadding=js(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),Dh=(0,r.I)(Vh,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:qf(n),barLabel:Kf(n)}})),Nh=i(263),Oh=(0,a.Z)(),Th=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 Kd(null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,s){return u===ns.NumericAxis||u===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Ts(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=ic(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(uf,(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 zu(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()?nc(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()?nc(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},Ac(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=Is(i,!0),this._yAxisType=Is(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=Oh(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}),Rs(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(cv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:ts.HeatMapChart,xAxisType:ns.StringAxis,yAxisType:is.StringAxis,calloutProps:g,createYAxis:ws,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:Cs,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:rc.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),Eh=(0,r.I)(Th,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),Fh=/[\{\}]/g,Bh=/\{\d+\}/g;function Ph(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(Bh,(function(t){var n=e[t.replace(Fh,"")];return null==n&&(n=""),n}))}function _h(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 Hh(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 Ih(t,n){return n-1-t.height}function Wh(t,n){return t.sourceLinks.length?t.depth:n-1}function Rh(t){return function(){return t}}function $h(t,n){return jh(t.source,n.source)||t.index-n.index}function zh(t,n){return jh(t.target,n.target)||t.index-n.index}function jh(t,n){return t.y0-n.y0}function Yh(t){return t.value}function Xh(t){return t.index}function Gh(t){return t.nodes}function Uh(t){return t.links}function qh(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function Zh({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 Kh(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=Xh,c=Wh,d=Gh,f=Uh,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=qh(e,n)),"object"!=typeof r&&(r=i.target=qh(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(_h(n.sourceLinks,Yh),_h(n.targetLinks,Yh)):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=Hh(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)/(Hh(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)/_h(n,Yh)));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),Zh(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(jh),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(jh),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(zh);for(const{target:{targetLinks:n}}of t)n.sort($h)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(zh),i.sort($h)}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 Zh(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:Rh(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Rh(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:Rh(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:Rh(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 Jh{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 Qh=(0,a.Z)(),tp="#757575",np=[{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 ip(t){return"number"==typeof t?t:t.nodeId}function ep(t,n){return t[ip(n.source)][ip(n.target)]}var rp="...";function op(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 up,ap,lp=Xv().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new Jh(t,!0)})),sp=function(t){function n(n){var i=t.call(this,n)||this;return i._isRtl=(0,l.jI)(),i._numColumns=0,i.toImage=function(t){return Kd(i.chartContainer,void 0,i._isRtl,t)},i._onCloseCallout=function(){i.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},i._onBlur=function(){},i._fillNodeColors=function(t){var n=i.state;if(!n.selectedState)return t.color;var e=n.selectedNode;return e&&n.selectedNodes.has(t.index)?e.color:e?void 0:t.color},i._fillNodeBorder=function(t){var n=i.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var e=n.selectedNode;return e?e.borderColor:t.borderColor}return t.borderColor}return t.borderColor},i._calculateChartMinWidth=function(){return i._margins.left+i._margins.right+124*i._numColumns+62*(i._numColumns-1)},Ac(i),i.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},i._calloutId=p("callout"),i._linkId=p("link"),i._chartId=p("sankeyChart"),i._emptyChartId=p("_SankeyChart_empty"),i._labelTooltipId=p("tooltip"),i._margins={top:36,right:48,bottom:32,left:48},i._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),i._computeClassNames=(0,an.J9)((function(t,n){return Qh(t,n)})),i._normalizeData=(0,an.J9)((function(t,n,e,r,o){return i._normalizeSankeyData(t,n,e,r,o)})),i._fetchTooltip=(0,an.J9)((function(t){return i._labelTooltipDiv(t)})),i._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return Ph(n,t.name)}}}))(n.strings),i._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",e=(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 Ph(n,t.source.name,t.target.name,t.unnormalizedValue?i._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return Ph(e,t.name,i._formatNumber(n))}}}))(n.accessibility),i._nodeAttributes=(0,an.J9)((function(t,n){return i._computeNodeAttributes(t,n)})),i._fetchNodes=function(t,n,e,r){return i._createNodes(t,n,e,r)},i._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=ip(t.source),o=e[r];o||(o={},e[r]=o),o[ip(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),i._fetchLinks=function(t,n){return i._createLinks(t,n)},i}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){return t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(Xc,{direction:rc.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},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(jn,(0,o.Cl)({},k),u.createElement(pc.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=op(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=op(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=op(t,rp);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+=rp;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===rp;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:Kh().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?Ih:Wh),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=ip(t.source),e=n[i];e||(e={},n[i]=e),e[ip(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=ep(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=ep(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=np.map((function(t){return t.fillColor})),r=np.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=ep(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:lp(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 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.html(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),cp=(0,r.I)(sp,(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:qf(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"}}}));function dp(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 fp(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=hp)):void 0===n&&(n=vp);for(var i,e,r,o,u,a=new yp(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 yp(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(gp)}function vp(t){return t.children}function hp(t){return Array.isArray(t)?t[1]:null}function pp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function gp(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function yp(t){this.data=t,this.depth=this.height=0,this.parent=null}function mp(t,n){return t.parent===n.parent?1:2}function bp(t){var n=t.children;return n?n[0]:t.t}function xp(t){var n=t.children;return n?n[n.length-1]:t.t}function wp(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 Mp(t,n,i){return t.a.parent===n.parent?t.a:i}function Cp(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"}(up||(up={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(ap||(ap={})),yp.prototype=fp.prototype={constructor:yp,count:function(){return this.eachAfter(dp)},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 fp(this).eachBefore(pp)},[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)}},Cp.prototype=Object.create(yp.prototype);var kp=(0,a.Z)(),Ap=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=fp(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=mp,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new Cp(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 Cp(e[r],r)),i.parent=n;return(u.parent=new Cp(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=xp(a),o=bp(o),a&&o;)l=bp(l),(u=xp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(wp(Mp(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!xp(u)&&(u.t=a,u.m+=d-c),o&&!bp(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}()),Sp=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=kp(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 Ap(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(Xc,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),Lp=(0,r.I)(Sp,(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 Vp(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 Dp=(0,a.Z)(),Np=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=Xv().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=ev().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=Vp(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=Dp(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(Xc,{direction:rc.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),Op=(0,r.I)(Np,(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 Tp(t,n,i,e){var r=t.semanticColors.bodyText,o=t.semanticColors.bodyBackground;if(!n)return o;var u=qs(n,i||r),a=qs(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 Ep=(0,a.Z)(),Fp=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return Kd(i._rootElem,void 0,i._isRTL,t)},Ac(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=Ep(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var f,v=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&&v.add(e)}));var h=!1;if(1===v.size||2===v.size)for(var p=1===v.size?Array.from(v)[0]:Array.from(v)[1],g=0,y=e;g<y.length;g++){var m=y[g],b=null===(t=null==m?void 0:m.style)||void 0===t?void 0:t.color;if(b&&hs(b,p)>=3){f=p,h=!0;break}}return u.createElement("div",{ref:function(t){return n._rootElem=t},className:d.root,style:{height:l?"".concat(l,"px"):"650px",overflow:"hidden"}},u.createElement("svg",{width:null!=a?a:"100%",height:null!=l?l:"650px",className:d.chart},u.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:d.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 h?e.backgroundColor=f:(r||a)&&(e.backgroundColor=Tp(c,n._rootElem,r,a)),u.createElement("th",{key:i,className:d.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=Tp(c,n._rootElem,r,a)),u.createElement("td",{key:i,className:d.bodyCell,style:e},t.value)})))}))))))))},n}(u.Component),Bp=(0,r.I)(Fp,(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)})}})),Pp=(0,a.Z)(),_p=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 Kd(null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,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,l){var s;return s=o===ns.NumericAxis?function(t,n,i,e,r,o){var u=Os(Ns(t),o),a=u.longestPositiveBar,l=u.longestNegativeBar,s=e?n.left:n.left+r,c=e?i-n.right-r:i-n.right;return e?{dStartValue:a,dEndValue:Math.min(l,o),rStartValue:s,rEndValue:c}:{dStartValue:Math.min(l,o),dEndValue:a,rStartValue:s,rEndValue:c}}(t,n,i,r,l,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},s},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=Mc(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(pc.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=Ns(d._points),a=Os(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=Mc(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._calculateAppropriateBarHeight=function(t,n,i){var e=hh(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])||Mc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=Mc(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(uf,(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?nc(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},Ac(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?Is(d.props.data[0].x,!0):ns.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?Is(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;Gs(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=Pp(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),Rs(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(cv,(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:xs,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Ms,getMinMaxOfYAxis:Ps,barwidth:this._barHeight,focusZoneDirection:rc.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=0,h=0,g=0,y=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,m=r.length-y,b=0,x=0,w=f.map((function(t,i){var e,r,o,c,f,w,M,C,k=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(k=s._isLegendHighlighted(t.legend)),s._classNames=Pp(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:k}),t.x>=s.X_ORIGIN&&++b,t.x<s.X_ORIGIN&&++x;var A,S=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}," ");A=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 L=A=t.color&&!d?t.color:A;if(s.props.enableGradient){var V=Math.max(s._points.findIndex((function(n){return n===t})),0);A=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Mc(V,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],L=(null===(f=t.gradient)||void 0===f?void 0:f[1])||Mc(V,0,null===(w=s.props.theme)||void 0===w?void 0:w.isInverted)[1],d&&(A=Mc(0,0,null===(M=s.props.theme)||void 0===M?void 0:M.isInverted)[0],L=Mc(0,0,null===(C=s.props.theme)||void 0===C?void 0:C.isInverted)[1]),s._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(a(g+s.X_ORIGIN)-a(s.X_ORIGIN));g>s.X_ORIGIN?v+=N:h+=N;var O=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),T=O>2&&(t.x>s.X_ORIGIN&&b!==y||t.x<s.X_ORIGIN&&(0!==y||x>1))?2:0,E=O>2&&(t.x>s.X_ORIGIN&&(0!==m||b>1)||t.x<s.X_ORIGIN&&x!==m)?2:0,F=s.X_ORIGIN;return F=s._isRtl?t.x>s.X_ORIGIN?S-v:S+h:t.x>s.X_ORIGIN?S+v:S-h,g=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{key:t.y,x:F,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":k,width:O-(s._isRtl?E:T),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,A),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,A),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(D,")"):A}))}));return w},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=0,f=0,v=0,h=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,g=r.length-h,y=0,m=0,b=r.map((function(t,i){var e,r,s,b,x,w,M,C,k=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(k=l._isLegendHighlighted(t.legend)),l._classNames=Pp(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:k}),t.x>=l.X_ORIGIN&&++y,t.x<l.X_ORIGIN&&++m;var A,S=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}," ");A=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 L=A=t.color&&!c?t.color:A;if(l.props.enableGradient){var V=l._points.findIndex((function(n){return n===t}));A=(null===(s=t.gradient)||void 0===s?void 0:s[0])||Mc(V,0,null===(b=l.props.theme)||void 0===b?void 0:b.isInverted)[0],L=(null===(x=t.gradient)||void 0===x?void 0:x[1])||Mc(V,0,null===(w=l.props.theme)||void 0===w?void 0:w.isInverted)[1],c&&(A=Mc(0,0,null===(M=l.props.theme)||void 0===M?void 0:M.isInverted)[0],L=Mc(0,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[1]),l._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(o(v+l.X_ORIGIN)-o(l.X_ORIGIN));v>0?d+=N:f+=N;var O=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),T=O>2&&(t.x>l.X_ORIGIN&&y!==h||t.x<l.X_ORIGIN&&(0!==h||m>1))?2:0,E=O>2&&(t.x>l.X_ORIGIN&&(0!==g||y>1)||t.x<l.X_ORIGIN&&m!==g)?2:0;v=t.x;var F=l.X_ORIGIN;return F=l._isRtl?t.x>l.X_ORIGIN?S-d:S+f:t.x>l.X_ORIGIN?S+d:S-f,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:F,y:a(t.y),rx:l.props.roundCorners?3:0,width:O-(l._isRtl?E:T),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,A),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":k,onFocus:l._onBarFocus.bind(l,t,i,A),fill:l.props.enableGradient?"url(#".concat(D,")"):A}))}));return b},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),Hp=(0,r.I)(_p,(function(t){return{opacityChangeOnHover:{opacity:t.shouldHighlight?"":"0.1"},xAxisTicks:[]}}));function Ip(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 Wp=(0,a.Z)(),Rp=u.forwardRef((function(t,n){var i,e=p("FunnelChartTooltipId_"),r=p("_FunnelChart_empty"),a=(0,l.jI)(),s=u.useState(null),c=s[0],d=s[1],f=u.useState(!1),v=f[0],h=f[1],g=u.useState(null),y=g[0],m=g[1],b=u.useState(null),x=b[0],w=b[1],M=u.useState([]),C=M[0],k=M[1],A=u.useRef(null),S=u.useRef(null),L=_(t.data);function V(t,n){null==n||n.persist(),d(t.stage),m(t),h(!0),w(n.currentTarget)}function D(t,n,i){null==i||i.persist(),d(n.category),m({stage:t,value:n.value,color:n.color,category:n.category}),h(!0),w(i.currentTarget)}function N(){d(null),h(!1),m(null),w(null)}u.useEffect((function(){var n;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&k(t.legendProps.selectedLegends)}),[null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){return{chartContainer:null!=A?A:null,toImage:function(t){var n;return Kd(A.current,null===(n=S.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[]);var O=u.useCallback((function(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?k(n):k(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}),[t.legendProps]);function T(){return C.length>0?C:c?[c]:[]}function E(t){return T().includes(t)}function F(){return 0===T().length}function B(n,i){return"subValue"in n?{culture:t.culture,onMouseOver:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onMouseMove:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onFocus:function(t){return i=n.stage,e=n.subValue,null==(r=t)||r.persist(),m({stage:i,value:e.value,color:e.color,category:e.category}),h(!0),void w(r.currentTarget);var i,e,r},onBlur:function(){return N()},onMouseOut:function(){return N()}}:{culture:t.culture,onMouseOver:1===i?function(t){return V(n,t)}:void 0,onMouseMove:1===i?function(t){return V(n,t)}:void 0,onFocus:function(t){return function(t,n){null==n||n.persist(),m(t),h(!0),w(n.currentTarget)}(n,t)},onBlur:function(){return N()},onMouseOut:function(){return N()}}}function P(n){var i=n.key,e=n.pathD,r=n.fill,l=n.opacity,s=n.textProps,c=n.data,d=n.isFocusable,f=B(c,l),v=ic(r,t.theme);return u.createElement("g",{key:i},u.createElement("path",(0,o.Cl)({d:e,fill:r,opacity:l},f,{"data-is-focusable":d})),s&&u.createElement("g",(0,o.Cl)({},f),function(n){var i=n.show,e=n.x,r=n.y,o=n.value,l=n.textColor;if(!i)return null;var s=u.createElement("text",{x:a?z-e:e,y:r,textAnchor:"middle",alignmentBaseline:"middle",fill:l},(0,Yn.c$)(o.toString(),t.culture));return a?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-z,",0)")},s):s}((0,o.Cl)((0,o.Cl)({},s),{textColor:v}))))}function _(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function H(n,i,e,r,u){var a=u.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),l="vertical"===t.orientation?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)({},u),{stages:a,i:e,k:r})):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)({},u),{stages:a,i:e,k:r})),s=B({stage:n.stage,subValue:i}),c=Ip((0,o.Cl)({availableWidth:l.availableWidth,minTextWidth:16,textX:l.textX,textY:l.textY,value:i.value},s));return P({key:"".concat(e,"-").concat(r),pathD:l.pathD,fill:i.color,opacity:_(t.data)&&E(i.category)||F()?1:.1,textProps:c,data:{stage:n.stage,subValue:i},isFocusable:!!(_(t.data)&&E(i.category)||F())})}var I=(0,o.Cl)({isCalloutVisible:v,directionalHint:3,id:"toolTip".concat(e),target:x,color:null==y?void 0:y.color,XValue:null==y?void 0:y.stage,YValue:null==y?void 0:y.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){h(!1)},preventDismissOnLostFocus:!0},t.calloutProps),W=t.width||350,R=t.height||500,$=Wp(t.styles,{theme:t.theme,className:t.className,chartWidth:W,chartHeight:R}),z=.8*W,j=(W-z)/2;return t.data&&t.data.length>0?u.createElement("div",{ref:A,className:$.root},u.createElement(Xc,{direction:rc.horizontal},u.createElement("svg",{width:W,height:R,className:$.chart,role:"img","aria-label":t.chartTitle},u.createElement("g",{transform:a?"translate(".concat(j+z,", ").concat(40,") scale(-1,1)"):"translate(".concat(j,", ").concat(40,")")},L?function(n,i){for(var e,r,o=t.data,u=o.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})),l=[],s={stages:o,totals:u,maxTotal:Math.max.apply(Math,u),funnelWidth:i,funnelHeight:.8*n,isRTL:a},c=0;c<o.length;c++)for(var d=o[c],f=0;f<(null!==(e=d.subValues)&&void 0!==e?e:[]).length;f++){var v=null===(r=d.subValues)||void 0===r?void 0:r[f];v&&l.push(H(d,v,c,f,s))}return l}(R-40,z):function(n,i){var e=t.data,r=i,u=.8*n;return e.map((function(n,i){var l="vertical"===t.orientation?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:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}):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:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}),s=l.pathD,c=l.textX,d=l.textY,f=l.availableWidth,v=B(n),h=Ip((0,o.Cl)({availableWidth:f,minTextWidth:16,textX:c,textY:d,value:n.value},v));return P({key:i,pathD:s,fill:n.color,opacity:E(n.stage)||F()?1:.1,textProps:h,data:n,isFocusable:!(!E(n.stage)&&!F())})}))}(R-40,z)),v&&u.createElement(jn,(0,o.Cl)({},I),u.createElement(pc.ChartHoverCard,{XValue:null==I?void 0:I.XValue,YValue:null==I?void 0:I.YValue,color:null==I?void 0:I.color})))),function(){if(t.hideLegend)return u.createElement(u.Fragment,null);var n;if(L){var i={};t.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in i||(i[t.category]=t.color)}))})),n=Object.entries(i).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return d(n)},onMouseOutAction:function(){return d(null)}}}))}else n=t.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return d(t.stage)},onMouseOutAction:function(){return d(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(uf,(0,o.Cl)({ref:S,legends:n,centerLegends:!0,onChange:O},t.legendProps)))}()):u.createElement("div",{id:r,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Rp.displayName="FunnelChart",Rp.defaultProps={orientation:"vertical"};var $p,zp,jp=(0,r.I)(Rp,(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},text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}($p||($p={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(zp||(zp={}));var Yp=[{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}],Xp=(0,a.Z)(),Gp=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===zp.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===zp.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},Up=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===$p.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===$p.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},qp=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Kd(e._rootElem,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=Yp.length-1;t>=0;t-=1)if(e._outerRadius>=Yp[t].minRadius)return{arcWidth:Yp[t].arcWidth,chartValueSize:Yp[t].fontSize};return{arcWidth:Yp[0].arcWidth,chartValueSize:Yp[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:Mc(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=_f().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: "+Up(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])||Mc(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(uf,(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 "+Up(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:Gp(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},Rs(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)({},Rs(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. ")},Ac(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;Gs(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=Xp(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n}},u.createElement(Xc,{direction:rc.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("text",{x:0,y:-(this._outerRadius+11),textAnchor:"middle",className:this._classNames.chartTitle,"aria-hidden":!0},this.props.chartTitle),!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)},$s(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)},$s(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=Xp(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},Rs((0,o.Cl)({ariaLabel:Gp(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(rv,{content:Up(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(rv,{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(jn,(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=Xp(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(Zd,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:_s[t.index%Object.keys(Ws).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),Zp=(0,r.I)(qp,(function(t){var n,i,e,r,u,a,l,s,c=t.theme,d=t.chartValueSize,f=t.className,v=t.lineColor,h=t.toDrawShape,p=t.solidFill,g=t.gradientFill,y=t.opacity;return{root:[c.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},f],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:d,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:c.palette.black,stroke:c.semanticColors.bodyBackground},chartTitle:{fontSize:It.s.small,fill:c.palette.neutralPrimary,selectors:(r={},r[It.up]={fill:"CanvasText"},r)},segment:{outline:"none",stroke:c.semanticColors.focusBorder,fill:p,fillOpacity:y},gradientSegment:{width:"100%",height:"100%",background:g,opacity:y},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:c.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",opacity:"0.85",color:c.semanticColors.bodySubtext})],calloutBlockContainer:[c.fonts.mediumPlus,{marginTop:"13px",color:c.semanticColors.bodyText},!h&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(v),paddingLeft:"8px"},h&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:c.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},c.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[c.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:c.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(c.semanticColors.menuDivider)}]}})),Kp=i(927),Jp=u.createContext(void 0),Qp=Array.prototype,tg=Qp.slice;function ng(t){return()=>t}function ig(t){return t}function eg(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 rg(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 og(t,n){this._context=t,this._k=(1-n)/6}Qp.map,og.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:rg(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:rg(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 ug=function t(n){function i(t){return new og(t,n)}return i.tension=function(n){return t(+n)},i}(0),ag=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],lg=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],sg=[es.color1,es.warning,es.color8,es.color4,es.color7,es.color6,es.color2,es.color5,es.color9,es.color10],cg=[es.color26,es.warning,es.color5,es.error,es.color4,es.color17,es.color22,es.disabled,es.color10,es.color3];function dg(t,n){if(void 0===n&&(n=!1),!t||!Rl(t))return"others";var i=t.map((function(t){return t.toLowerCase()}));return n&&Gs(i,cg)?"d3":Gs(i,ag)?"plotly":"others"}function fg(t,n,i,e){if("plotly"!==n)return t;var r=ag,o=sg;e&&(r="plotly"===n?ag:lg,o="plotly"===n?sg:cg);var u=r.indexOf(t.toLowerCase());return-1!==u?cs(o[u],!!i):t}var vg=function(t,n,i,e,r){if(!n.current.has(t)){var o,u=r?"plotly"===i?sg:cg:sg;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)},hg=function(t,n,i,e,r,o){return"default"===n&&i?function(t,n,i,e,r){var o=[];if(n){var u=dg(t,r);if(Rl(n))n.forEach((function(t,n){var a=null==t?void 0:t.toString().trim(),l=vg("Label_".concat(n),i,u,e,r);if(a){var s=Eo(a);o.push(s?fg(s.formatHex(),u,e):l)}else o.push(l)}));else if("string"==typeof n){var a=Eo(n);return a?fg(a.formatHex(),u,e):vg("Label_0",i,u,e,r)}return o}}(t,i,e,r,o):void 0},pg=function(t,n,i,e,r,o,u){var a=dg(r,u);return t&&Rl(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:vg(i,e,a,o,u)},gg=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Rl(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},yg=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)&&Rl(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},mg="nonplot_",bg="repeat(1, 1fr)",xg={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 wg(t){var n,i,e,r,o,u,a,l,s,c,d,f;return{chartTitle:"string"==typeof(null==t?void 0:t.title)?t.title:null!==(i=null===(n=null==t?void 0:t.title)||void 0===n?void 0:n.text)&&void 0!==i?i:"",xAxisTitle:"string"==typeof(null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title)?null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title:null!==(a=null===(u=null===(o=null==t?void 0:t.xaxis)||void 0===o?void 0:o.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:""}}var Mg=function(t,n){var i=Sg(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},Cg=function(t,n){var i=Ag(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:zu(null==i?void 0:i.tickformat)}:{}},kg=function(t,n){var i,e=null===(i=Ag(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},Ag=function(t,n){return null==n?void 0:n.yaxis},Sg=function(t,n){return null==n?void 0:n.xaxis},Lg=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,Yn.c$)(t)},Vg=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 Ol(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())}))},Dg=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))},Ng=function(t,n){var i,e,r,o,u,a,l=!1,s=!0;return t.forEach((function(t){if(Dg(t,n)){l=!0;var i=t.y;i&&(u=Math.min.apply(Math,i),a=Math.max.apply(Math,i)),("scatter"!==t.type||Zl(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}}):{}},Og=function(t,n,i,e,r){var o=hg(t,n,i,e,r);return pg(o,0,"",e,t,r)},Tg=function(t,n,i,e,r){return null==t?"":n?t.toString():i?e?new Date(t):r?parseFloat(t):t:t},Eg=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,Eg(o,r))}return i},Fg=function(t,n,i,e,r,u){var a,l,s,c,d,f,v,h,p={},g=0,y=0,m=Ng(t.data,t.layout),b=Xg(t.data,t.layout,n),x=b.legends,w=b.hideLegend,M=void 0,C=Cg(t.data[0],t.layout);t.data.forEach((function(n,a){var l,s,c,d,f,v,h,m;M=yg(t.layout,n,M);var b=Pl(n.x),w=hg(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=hg(null===(h=null===(v=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,e,null===(m=n.line)||void 0===m?void 0:m.color,i,r),A=n.x,S=El(A),L=_l(A),V=Fl(A),D=Ug(n);D.forEach((function(e,l){var s=e[0],c=e[1],d=n.x.slice(s,c),f=n.y.slice(s,c);d.forEach((function(e,s){var c,d,v,h,m,A,N,O,T,E,F,B;p[e]||(p[e]={xAxisPoint:Tg(e,b,L,S,V),chartData:[],lineData:[]});var P=x[a],_=M?M(Rl(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(v=null===(d=n.marker)||void 0===d?void 0:d.color)||void 0===v?void 0:v[s%(null===(h=n.marker)||void 0===h?void 0:h.color).length]:0):pg(w,s,P,i,null===(N=null===(A=null===(m=t.layout)||void 0===m?void 0:m.template)||void 0===A?void 0:A.layout)||void 0===N?void 0:N.colorway,r),H=gg(n,s),I=f[s],W=Lg(I,C);if("bar"===n.type)p[e].chartData.push({legend:P,data:I,color:null!==(O=Po(_).copy({opacity:H}).formatHex8())&&void 0!==O?O:_,yAxisCalloutData:W}),"number"==typeof I&&(g=Math.max(g,I));else if("scatter"===n.type||u){var R=pg(k,a,P,i,null===(F=null===(E=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,r),$=Hg(n.line),z=Yg(n);p[e].lineData.push({legend:P+(D.length>1?".".concat(l+1):""),legendShape:z,y:I,color:null!==(B=Po(R).copy({opacity:H}).formatHex8())&&void 0!==B?B:_,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=$?$:{}),{mode:n.mode}),useSecondaryYScale:Dg(n,t.layout),yAxisCalloutData:W}),Dg(n,t.layout)||"number"!=typeof I||(g=Math.max(g,I),y=Math.min(y,I))}}))}))}));var k=null!==(l=null===(a=t.data[0])||void 0===a?void 0:a.x)&&void 0!==l?l:[];(null!==(c=null===(s=t.layout)||void 0===s?void 0:s.shapes)&&void 0!==c?c:[]).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(t){return"number"==typeof t&&Array.isArray(k)&&void 0!==k[t]?k[t]:t},a=u(t.x0),l=u(t.x1),s=function(n){return"paper"===t.yref?0===n?y:1===n?g:y+n*(g-y):n},c=s(t.y0),d=s(t.y1);p[a].lineData.push({legend:"Reference_".concat(n),y:c,color:null!==(e=Po(o).formatHex8())&&void 0!==e?e:o,lineOptions:Hg(t.line),useSecondaryYScale:!1}),p[l].lineData.push({legend:"Reference_".concat(n),y:d,color:null!==(r=Po(o).formatHex8())&&void 0!==r?r:o,lineOptions:Hg(t.line),useSecondaryYScale:!1})}));var A=Object.values(p);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)({data:A,width:null===(d=t.layout)||void 0===d?void 0:d.width,height:null!==(v=null===(f=t.layout)||void 0===f?void 0:f.height)&&void 0!==v?v:350,barWidth:"auto",yMaxValue:g,yMinValue:y,mode:"plotly"},m),{hideTickOverlap:!0,hideLegend:w,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:"string"==typeof(null===(h=A[0])||void 0===h?void 0:h.xAxisPoint)}),wg(t.layout)),Kg(t.data,t.layout)),kg(t.data[0],t.layout)),Mg(t.data[0],t.layout)),C),Qg(t.data,t.layout)),ny(t.data,t.layout))},Bg=function(t,n,i,e,r,u){var a,l,s,c,d,f,v=["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),h="area"===i,p="scatter"===i,g=Ng(t.data,t.layout),y="tonexty",m=Xg(t.data,t.layout,n),b=m.legends,x=m.hideLegend,w=Cg(t.data[0],t.layout),M=!1,C=t.data.map((function(n,i){var a,l,s,c,d,f,h,p,g,m,x,C=v?(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,k=hg(null===(h=null===(f=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===h?void 0:h.colorway,r,C,e,u),A=n.x,S=_l(A),L=El(A),V=Fl(A),D=Pl(n.x);M=M||S&&!L;var N=b[i],O=pg(k,i,N,e,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,u),T=gg(n,i);y="tozeroy"===n.fill?"tozeroy":"tonexty";var E=(null===(x=n.mode)||void 0===x?void 0:x.includes("text"))||"scatterpolar"===n.type?void 0:Hg(n.line),F=Yg(n);return Ug(n).map((function(i,e){var r,u,a,l,s,c,d,f,v,h,p,g=i[0],y=i[1],m=A.slice(g,y),b=n.y.slice(g,y),x=Rl(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(g,y):[],M=Rl(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,C=Array.isArray(n.text)?n.text.slice(g,y):void 0;return{legend:N,legendShape:F,data:m.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({x:Tg(t,D,S,L,V),y:b[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:x[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),M?{markerColor:M[i]}:{}),C?{text:C[i]}:{}),{yAxisCalloutData:Lg(b[i],w)})})),color:null!==(l=Po(O).copy({opacity:T}).formatHex8())&&void 0!==l?l:O,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=E?E:{}),{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:Dg(n,t.layout)}}))})).flat(),k=(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.shapes)&&void 0!==s?s:[]).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;return{legend:"Reference_".concat(n),data:[{x:t.x0,y:t.y0},{x:t.x1,y:t.y1}],color:null!==(e=Po(r).formatHex8())&&void 0!==e?e:r,lineOptions:Hg(t.line),useSecondaryYScale:!1}})),A=kg(t.data[0],t.layout);if(void 0===A.yMinValue&&void 0===A.yMaxValue){var S=Fs(C);A.yMinValue=S.startValue,A.yMaxValue=S.endValue}var L=C.reduce((function(t,n){return t+n.data.length}),0),V={lineChartData:(0,o.fX)((0,o.fX)([],C,!0),k,!0)},D={scatterChartData:C},N=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},g),{width:null===(c=t.layout)||void 0===c?void 0:c.width,height:null!==(f=null===(d=t.layout)||void 0===d?void 0:d.height)&&void 0!==f?f:350,hideTickOverlap:!0,hideLegend:x,useUTC:!1,optimizeLargeData:L>1e3,shouldWrapLabels:M}),wg(t.layout)),Mg(t.data[0],t.layout)),w),ty(t.data,t.layout)),ny(t.data,t.layout));return h?(0,o.Cl)({data:V,mode:y},N):(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:p?D:V,roundedTicks:!0,enableReflow:!1},N),A),p?(0,o.Cl)({showYAxisLablesTooltip:!0},Kg(t.data,t.layout)):{})},Pg=function(t){return t.replace(/<[^&]*?>/g,"").replace(/<[^>]*>/g,"").replace(/<br>|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function _g(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 Hg(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),xg[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=ug.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 Ig=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)}))},Wg=function(t){return t.x1-t.x0},Rg=function(t){return(t.x1+t.x0)/2},$g=function(t,n,i,e){if(!t||0===t.length)return[];if(_l(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(Vp(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=ig,n=Vp,i=eg;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===Vp&&([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===Vp){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:ng(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:ng([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:ng(Array.isArray(t)?tg.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)},zg=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}},jg=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}},Yg=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"},Xg=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}},Gg=function(t,n){if(Rl(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Ug=function(t){if(!Rl(t.x)||!Rl(t.y))return[];for(var n=[],i=0,e=0;e<t.x.length;e++)(Il(t.x[e])||Il(t.y[e]))&&(e-i>0&&n.push([i,e]),i=e+1);return e-i>0&&n.push([i,e]),n},qg=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Zg=function(t){return["donut","sankey","pie"].includes(t)},Kg=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){Il(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||_l(a)&&!Fl(a)&&!El(a))if(!(Rl(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]=r.categoryarray;else i[u]="data"})),i},Jg=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Qg=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||!Rl(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}},ty=function(t,n){var i,e,r,o={},u=ry(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},ny=function(t,n){var i={},e=ry(t,n);return Object.keys(e).forEach((function(n){var r=e[n];if(r){var o=oy(t,n[0],r);if(r.tickmode&&"array"!==r.tickmode||!Rl(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 u=iy(r.dtick,o),a=ey(r.tick0,o,u);"x"===n?i.xAxis={tickStep:u,tick0:a}:"y"===n&&(i.yAxis={tickStep:u,tick0:a})}else{var l="date"===o?r.tickvals.map((function(t){return new Date(t)})):r.tickvals;"x"===n?i.tickValues=l:"y"===n&&(i.yAxisTickValues=l)}}})),i},iy=function(t,n){var i="log"===n,e="date"===n,r="category"===n,o=e?864e5:1;if(!t)return o;if(Nl(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=Nl(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},ey=function(t,n,i){return"date"===n?Ol(t)?new Date(t):new Date(ps):"D1"!==i&&"D2"!==i?Nl(t)?Number(t):0:void 0},ry=function(t,n){var i,e=new Set;t.forEach((function(t){var n=Ul(t);i=n.x,e.add(n.y)}));var r={};"number"==typeof i&&(r.x=null==n?void 0:n[ql("x",i)]);var o=Array.from(e).sort();return o.length>0&&(r.y=null==n?void 0:n[ql("y",o[0])]),o.length>1&&(r.y2=null==n?void 0:n[ql("y",o[1])]),r},oy=function(t,n,i){var e=[];return t.forEach((function(t){var i;null===(i=t[n])||void 0===i||i.forEach((function(t){Il(t)||e.push(t)}))})),Fl(e)?"log"===(null==i?void 0:i.type)?"log":"linear":El(e)?"date":_l(e)?"category":void 0},uy=function(t){var n,i,e=u.useRef(null),r=u.useRef(),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 ay(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(uy,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var ly=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],$=u.useState(""),z=$[0],j=$[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;Gs(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 Kd(null===(n=b.current)||void 0===n?void 0:n.chartContainer,null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);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=Mc(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?Is(K[0].x.start,!0):ns.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?Is(K[0].y,!1):is.StringAxis}),[K]),tt=u.useMemo((function(){return js(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=bs(i.x.start,a),r=bs(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():nc(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a,l){var s=[];t.forEach((function(t){s.push(t.x.start,t.x.end)}));var c=di(s)||0,d=fi(s)||0;return{dStartValue:r?d:c,dEndValue:r?c:d,rStartValue:n.left+(r?0:l),rEndValue:i-n.right-(r?l:0)}}),[]),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(pc.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()),j(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(""),j(""),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.abs(l-a),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(uf,(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(ph(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:z,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(cv,(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:xs,getDomainNRangeValues:ot,createStringYAxis:Ms,getMinMaxOfYAxis:Ps,focusZoneDirection:rc.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Vt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));ly.displayName="GanttChart";var sy=(0,r.I)(ly,(function(t){return{}})),cy=ay(Qf),dy=ay(Ah),fy=ay(Ov),vy=ay(Hp),hy=ay(Kv),py=ay(Eh),gy=ay(cp),yy=ay(Zp),my=ay(Dh),by=ay(Mh),xy=ay(Fv),wy=ay(Bp),My=ay(sy),Cy=function(t){var n=t.data[0].x,i=Bl(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:Vg(t.x)})}))),{data:e,layout:t.layout}},ky={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=hg(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:Gg(w.values,n),index:n,color:A?k[n]:void 0}})).filter((function(t){return!Il(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:pg(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=wg(t.layout).chartTitle,F=Object.keys(C);return{data:{chartTitle:E,chartData:(F.length>1?(0,o.fX)([[F[0],C[F[0]]]],F.slice(1).reverse().map((function(t){return[t,C[t]]})),!0):F.map((function(t){return[t,C[t]]}))).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"].includes(w.textinfo),roundCorners:!0,order:"sorted"}},renderer:cy},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y=t.data[0],m=y.link,b=y.node,x=(null!==(u=null==m?void 0:m.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return Il(t)||Il(null===(i=null==m?void 0:m.source)||void 0===i?void 0:i[n])||Il(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})),w=hg(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==b?void 0:b.color,i,r),M={nodes:null===(c=b.label)||void 0===c?void 0:c.map((function(n,e){var o,u,a;return{nodeId:e,name:n,color:pg(w,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:x.map((function(t,n){return(0,o.Cl)({},t)}))},C={root:(0,o.Cl)({},(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.size)?{fontSize:null===(v=t.layout.font)||void 0===v?void 0:v.size}:{})};return{data:{chartTitle:wg(t.layout).chartTitle,SankeyChartData:M},width:null===(h=t.layout)||void 0===h?void 0:h.width,height:null!==(g=null===(p=t.layout)||void 0===p?void 0:p.height)&&void 0!==g?g:468,styles:C,enableReflow:!1}},renderer:gy},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?Pg(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=zu(e)(t)}catch(n){u=$s(t)}else u=$s(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(l,i,E):l,c=_g(null===(e=null==E?void 0:E.font)||void 0===e?void 0:e.color,n,i),d=_g(null===(r=null==E?void 0:E.font)||void 0===r?void 0:r.size,n,i),f=_g(null===(u=null==E?void 0:E.fill)||void 0===u?void 0:u.color,n,i),v=_g(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:[]};return{headers:function(t,n){return(Array.isArray(t[0])?t.map((function(t){return t.map((function(t){return Pg(t)})).filter(Boolean).join(" ")})):t.map((function(t){return Pg(t)}))).map((function(t,i){var e,r,u,a=_g(null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.color,0,i),l=_g(null===(r=null==n?void 0:n.font)||void 0===r?void 0:r.size,0,i),s=_g(null===(u=null==n?void 0:n.fill)||void 0===u?void 0:u.color,0,i),c=_g(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}},renderer:wy},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=Xg(t.data,t.layout,n),C=M.legends,k=M.hideLegend,A=void 0,S=t.data.map((function(n,o){var u,a,l,s;A=yg(t.layout,n,A);var c=hg(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),d=C[o];return n.y.map((function(e,o){var u,a,l,s,f,v,h,p,g;if(Il(null===(u=n.x)||void 0===u?void 0:u[o])||Il(e))return null;var y=A?A(Rl(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[o%(null===(f=n.marker)||void 0===f?void 0:f.color).length]:0):pg(c,o,d,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),m=gg(n,o);return{x:n.x[o],y:e,legend:d,color:null!==(g=Po(y).copy({opacity:m}).formatHex8())&&void 0!==g?g:y}})).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)({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},wg(t.layout)),Kg(t.data,t.layout)),Qg(t.data,t.layout,!0)),ny(t.data,t.layout))},renderer:vy},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&&Hl(t.y)}))){var c=t.data.map((function(t,n){return"bar"===t.type&&Hl(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=Eg(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&&Nl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&Nl(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&&Nl(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=Ng(s.data,s.layout),v=Xg(s.data,s.layout,n),h=v.legends,p=v.hideLegend,g=void 0,y=Cg(s.data[0],s.layout);return s.data.forEach((function(t,n){var u,a,l,c,f,v,p,m,b,x,w;g=yg(s.layout,t,g);var M=h[n],C=Yg(t);if("bar"===t.type){var k=hg(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 o,u,a,l,c,d,f,v,h;if(!Il(n)&&!Il(null===(o=t.y)||void 0===o?void 0:o[e])){var p=g?g(Rl(null===(u=t.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=t.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[e%(null===(c=t.marker)||void 0===c?void 0:c.color).length]:0):pg(k,e,M,i,null===(v=null===(f=null===(d=s.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r),m=gg(t,e),b=t.y[e];return{x:n.toString(),y:b,yAxisCalloutData:Lg(b,y),color:null!==(h=Po(p).copy({opacity:m}).formatHex8())&&void 0!==h?h:p}}})).filter((function(t){return void 0!==t})),useSecondaryYScale:Dg(t,s.layout)})}else if("scatter"===t.type){var A=hg(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=pg(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=Hg(t.line),V=gg(t,n);Ug(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:Lg(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:Dg(t,s.layout)})}))}})),(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,wrapXAxisLables:!0}),wg(s.layout)),Kg(s.data,s.layout)),kg(s.data[0],s.layout)),Mg(s.data[0],s.layout)),y),Qg(s.data,s.layout)),ny(s.data,s.layout))},renderer:my},verticalstackedbar:{transformer:Fg,renderer:dy},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=t.data[0],W=[],R=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;if("histogram2d"===I.type){var z=[],j=[],Y=[];null===(u=I.x)||void 0===u||u.forEach((function(t,n){var i,e=Gg(I.z,n);Il(t)||Il(null===(i=I.y)||void 0===i?void 0:i[n])||Il(e)||(z.push(t),j.push(I.y[n]),Y.push(e))}));var X=_l(z),G=_l(j),U=$g(z,null===(a=I.xbins)||void 0===a?void 0:a.start,null===(l=I.xbins)||void 0===l?void 0:l.end,null===(s=I.xbins)||void 0===s?void 0:s.size),q=$g(j,null===(c=I.ybins)||void 0===c?void 0:c.start,null===(d=I.ybins)||void 0===d?void 0:d.end,null===(f=I.ybins)||void 0===f?void 0:f.size),Z=q.map((function(){return U.map((function(){return[]}))})),K=0;z.forEach((function(t,n){var i=Ig(U,t,X),e=Ig(q,j[n],G);-1!==i&&-1!==e&&Z[e][i].push(Y[n])}));var J=Z.map((function(t){return t.map((function(t){var n=zg(I.histfunc,t);return K+=n,n}))}));U.forEach((function(t,n){q.forEach((function(i,e){var r=jg(I.histnorm,J[e][n],K,X?t.length:Wg(t),G?i.length:Wg(i));W.push({x:X?t.join(", "):Rg(t),y:G?i.join(", "):Rg(i),value:r,rectText:r}),"number"==typeof r&&(R=Math.min(R,r),$=Math.max($,r))}))}))}else null===(v=I.x)||void 0===v||v.forEach((function(n,i){var e;null===(e=I.y)||void 0===e||e.forEach((function(e,r){var o,u,a,l,s,c,d=null===(u=null===(o=I.z)||void 0===o?void 0:o[r])||void 0===u?void 0:u[i];W.push({x:"date"===(null===(l=null===(a=t.layout)||void 0===a?void 0:a.xaxis)||void 0===l?void 0:l.type)||null!=n?n:0,y:(null===(c=null===(s=t.layout)||void 0===s?void 0:s.yaxis)||void 0===c||c.type,e),value:d,rectText:d}),"number"==typeof d&&(R=Math.min(R,d),$=Math.max($,d))}))}));var Q={legend:null!==(h=I.name)&&void 0!==h?h:"",data:W,value:0},tt=[R,($+R)/2,$],nt=[cs(es.color1),cs(es.color2),cs(es.color3)],it=null!==(N=null!==(k=null!==(x=null!==(y=null!==(p=null==I?void 0:I.colorscale)&&void 0!==p?p:null===(g=t.layout)||void 0===g?void 0:g.colorscale)&&void 0!==y?y:null===(b=null===(m=t.layout)||void 0===m?void 0:m.coloraxis)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(C=null===(M=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===M?void 0:M.layout)||void 0===C?void 0:C.colorscale)&&void 0!==k?k:"histogram2d"===I.type&&(null===(D=null===(V=null===(L=null===(S=null===(A=t.layout)||void 0===A?void 0:A.template)||void 0===S?void 0:S.data)||void 0===L?void 0:L.histogram2d)||void 0===V?void 0:V[0])||void 0===D?void 0:D.colorscale))&&void 0!==N?N:null===(B=null===(F=null===(E=null===(T=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===T?void 0:T.data)||void 0===E?void 0:E.heatmap)||void 0===F?void 0:F[0])||void 0===B?void 0:B.colorscale;if(it&&"object"==typeof it&&("diverging"in it||"sequential"in it||"sequentialminus"in it)){var et=R>=0,rt=$<=0;R<0&&$>0?it=null==it?void 0:it.diverging:et?it=null==it?void 0:it.sequential:rt&&(it=null==it?void 0:it.sequentialminus)}var ot=Array.isArray(it)?it.map((function(t){return t[0]*($-R)+R})):tt,ut=Array.isArray(it)?it.map((function(t){return t[1]})):nt;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:[Q],domainValuesForColorScale:ot,rangeValuesForColorScale:ut,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(P=t.layout)||void 0===P?void 0:P.width,height:null!==(H=null===(_=t.layout)||void 0===_?void 0:_.height)&&void 0!==H?H:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:!0},wg(t.layout)),Kg([I],t.layout)),ny(t.data,t.layout))},renderer:py},gauge:{transformer:function(t,n,i,e,r){var o,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=t.data[0],ct=(null===(o=st.gauge)||void 0===o?void 0:o.steps)?st.gauge.steps.map((function(t){return t.color})):void 0,dt=hg(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,ct,i,r),ft=(null===(c=null===(s=st.gauge)||void 0===s?void 0:s.steps)||void 0===c?void 0:c.length)?st.gauge.steps.map((function(n,e){var o,u,a,l,s,c=n.name||"Segment ".concat(e+1),d=pg(dt,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!==(d=st.value)&&void 0!==d?d:0-(null!==(p=null===(h=null===(v=null===(f=st.gauge)||void 0===f?void 0:f.axis)||void 0===v?void 0:v.range)||void 0===h?void 0:h[0])&&void 0!==p?p:0),color:Og(null===(m=null===(y=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===y?void 0:y.layout)||void 0===m?void 0:m.colorway,e,null===(x=null===(b=st.gauge)||void 0===b?void 0:b.axis)||void 0===x?void 0:x.color,i,r)},{legend:"Target",size:(null!==(k=null===(C=null===(M=null===(w=st.gauge)||void 0===w?void 0:w.axis)||void 0===M?void 0:M.range)||void 0===C?void 0:C[1])&&void 0!==k?k:100)-(null!==(A=st.value)&&void 0!==A?A:0),color:es.disabled}];if(null===(S=st.delta)||void 0===S?void 0:S.reference){var vt=st.value-st.delta.reference;if(vt>=0){at="▲ ".concat(vt);var ht=hg(null===(D=null===(V=null===(L=t.layout)||void 0===L?void 0:L.template)||void 0===V?void 0:V.layout)||void 0===D?void 0:D.colorway,e,null===(O=null===(N=st.delta)||void 0===N?void 0:N.increasing)||void 0===O?void 0:O.color,i,r);lt=pg(ht,0,"",i,null===(F=null===(E=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,r)}else{at="▼ ".concat(Math.abs(vt));var pt=hg(null===(_=null===(P=null===(B=t.layout)||void 0===B?void 0:B.template)||void 0===P?void 0:P.layout)||void 0===_?void 0:_.colorway,e,null===(I=null===(H=st.delta)||void 0===H?void 0:H.decreasing)||void 0===I?void 0:I.color,i,r);lt=pg(pt,0,"",i,null===($=null===(R=null===(W=t.layout)||void 0===W?void 0:W.template)||void 0===R?void 0:R.layout)||void 0===$?void 0:$.colorway,r)}}var gt={sublabel:{fill:lt}},yt=wg(t.layout).chartTitle;return{segments:ft,chartValue:null!==(z=st.value)&&void 0!==z?z:0,chartTitle:yt,sublabel:at,minValue:"number"==typeof(null===(X=null===(Y=null===(j=st.gauge)||void 0===j?void 0:j.axis)||void 0===Y?void 0:Y.range)||void 0===X?void 0:X[0])?null===(q=null===(U=null===(G=st.gauge)||void 0===G?void 0:G.axis)||void 0===U?void 0:U.range)||void 0===q?void 0:q[0]:void 0,maxValue:"number"==typeof(null===(J=null===(K=null===(Z=st.gauge)||void 0===Z?void 0:Z.axis)||void 0===K?void 0:K.range)||void 0===J?void 0:J[1])?null===(nt=null===(tt=null===(Q=st.gauge)||void 0===Q?void 0:Q.axis)||void 0===tt?void 0:tt.range)||void 0===nt?void 0:nt[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=st.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(it=t.layout)||void 0===it?void 0:it.width,height:null!==(rt=null===(et=t.layout)||void 0===et?void 0:et.height)&&void 0!==rt?rt:220,styles:gt,variant:(null===(ut=null===(ot=st.gauge)||void 0===ot?void 0:ot.steps)||void 0===ut?void 0:ut.length)?zp.MultipleSegments:zp.SingleSegment,roundCorners:!0}},renderer:yy},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=Xg(t.data,t.layout,n),f=d.legends,v=d.hideLegend,h=void 0;return t.data.forEach((function(n,u){var a,l,s,d,v,p,g;if(n.x){h=yg(t.layout,n,h);var y=hg(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===(d=n.marker)||void 0===d?void 0:d.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e=Gg(n.y,i);Il(t)||Il(e)||(m.push(t),b.push(e))}));var x=_l(m),w=$g(m,null===(v=n.xbins)||void 0===v?void 0:v.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=Ig(w,t,x);-1!==i&&M[i].push(b[n])}));var k=M.map((function(t){var i=zg(n.histfunc,t);return C+=i,i}));w.forEach((function(e,a){var l,s,d,v,p,g,m,b,w=f[u],M=h?h(Rl(null===(l=n.marker)||void 0===l?void 0:l.color)?null===(d=null===(s=n.marker)||void 0===s?void 0:s.color)||void 0===d?void 0:d[a%(null===(v=n.marker)||void 0===v?void 0:v.color).length]:0):pg(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=gg(n,a),S=jg(n.histnorm,k[a],C,x?e.length:Wg(e));c.push((0,o.Cl)({x:x?e.join(", "):Rg(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,")")}))}))}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:c,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:v,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=c[0])||void 0===s?void 0:s.x)},wg(t.layout)),Kg(t.data,t.layout)),kg(t.data[0],t.layout))},renderer:by},area:{transformer:function(t,n,i,e,r){return Bg(t,n,"area",i,e,r)},renderer:hy,preTransformOperation:Cy},line:{transformer:function(t,n,i,e,r){return Bg(t,n,"line",i,e,r)},renderer:fy,preTransformOperation:Cy},scatter:{transformer:function(t,n,i,e,r){return Bg(t,n,"scatter",i,e,r)},renderer:xy,preTransformOperation:Cy},funnel:{transformer:function(t,n,i,e,r){var o,u,a,l,s=[],c=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(c){var d={};t.data.forEach((function(n,o){var u,a,l,c,f,v,h,p,g,y,m,b,x,w=n.name||"Category ".concat(o+1),M=hg(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!==(f=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==f?f:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),C=pg(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);d[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;Rl(k)&&Rl(A)&&k&&Rl(k)&&k.length>0&&k.forEach((function(t,n){var i=s.findIndex((function(n){return n.stage===t})),e=Number(A[n]);isNaN(e)||(-1===i?s.push({stage:t,subValues:[{category:w,value:e,color:C}]}):s[i].subValues.push({category:w,value:e,color:C}))}))}))}else t.data.forEach((function(n,o){var u,a,l,c,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=_l(a),s=_l(u),c=Fl(a),d=Fl(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(Rl(h)&&Rl(p)){var g=hg(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===(c=n.marker)||void 0===c?void 0:c.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=pg(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),c=Number(p[e]);isNaN(c)||s.push({stage:n,value:c,color:l})}))}}));return{data:s,width:null===(o=t.layout)||void 0===o?void 0:o.width,height:null===(u=t.layout)||void 0===u?void 0:u.height,orientation:"v"===(null===(a=t.data[0])||void 0===a?void 0:a.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(l=t.layout)||void 0===l?void 0:l.showlegend)}},renderer:jp},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=Xg(t.data,t.layout,n),c=s.legends,d=s.hideLegend,f=void 0,v=t.data.map((function(n,o){var u,a,l,s,d,v;f=yg(t.layout,n,f);var h=hg(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),p=c[o],g="date"===(null===(v=null===(d=t.layout)||void 0===d?void 0:d.xaxis)||void 0===v?void 0:v.type)||El(n.x),y=function(t){return Il(t)?0:g?+function(t){if("string"==typeof t){var n=t.match(Jg);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)}(t):+t};return n.y.map((function(e,o){var u,a,l,s,c,d,v,m,b,x;if(Il(e))return null;var w=f?f(Rl(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):pg(h,o,p,i,null===(v=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===v?void 0:v.colorway,r),M=gg(n,o),C=y(null===(m=n.base)||void 0===m?void 0:m[o]),k=y(null===(b=n.x)||void 0===b?void 0:b[o]);return{x:{start:g?new Date(C):C,end:g?new Date(C+k):C+k},y:e,legend:p,color:null!==(x=Po(w).copy({opacity:M}).formatHex8())&&void 0!==x?x:w}})).filter((function(t){return null!==t}))})).flat();return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:v,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:d,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},wg(t.layout)),Kg(t.data,t.layout)),Qg(t.data,t.layout,!0)),ny(t.data,t.layout))},renderer:My},fallback:{transformer:Fg,renderer:dy}},Ay=u.forwardRef((function(t,n){var i,e=Wl(t.chartSchema).plotlySchema,r=(t=>{try{Wl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let n=(t=>{try{const n=t;if(!n)throw new Error("Plotly input is null or undefined");if("object"!=typeof n)throw new Error("Plotly input is not an object. Input type: "+typeof n);if(!Rl(n.data))throw new Error("Plotly input data is not a valid array or typed array");if(0===n.data.length)throw new Error("Plotly input data is empty");return n}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{n=Vl(n)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}let i=((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Xl[r]){const o=Xl[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})(n.data,n.layout).map((t=>{var i,e,r;const o=t[0],u=n.data[o];switch(u.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=u;return"h"===t.orientation?Gl(t)?{isValid:!0,traceIndex:o,type:"gantt"}:{isValid:!0,traceIndex:o,type:"horizontalbar"}:Hl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:["group","overlay"].includes(null===(i=null==n?void 0:n.layout)||void 0===i?void 0:i.barmode)?Fl(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 a=u,l=Zl(a),s=zl(null!==(e=a.mode)&&void 0!==e?e:""),c=Array.isArray(null===(r=null==n?void 0:n.layout)||void 0===r?void 0:r.shapes)&&n.layout.shapes.some((t=>"line"===t.type));return s?{isValid:!0,traceIndex:o,type:c&&Kl(a)?"line":"scatter"}:Jl(a)?{isValid:!0,traceIndex:o,type:"fallback"}:{isValid:!0,traceIndex:o,type:l?"area":"line"};default:return{isValid:!1,errorMessage:`${Dl} ${u.type}`}}}));if(i.every((t=>!t.isValid)))return{isValid:!1,errorMessage:i.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};i=i.filter((t=>t.isValid));const e=i.map((t=>({index:t.traceIndex,type:t.type}))),r=i.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type));if(i.some((t=>"line"===t.type||"fallback"===t.type))){if(r)return{isValid:!0,type:i.some((t=>"verticalstackedbar"===t.type))?"fallback":"groupedverticalbar",validTracesInfo:e};if(i.some((t=>"fallback"===t.type)))return{isValid:!0,type:"fallback",validTracesInfo:e}}const o=new Set(i.map((t=>t.type)));return o.size>1?{isValid:!0,type:"composite",validTracesInfo:e}:{isValid:!0,type:Array.from(o)[0],validTracesInfo:e}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(e);if(!r.isValid)throw new Error("Invalid chart schema: ".concat(r.errorMessage));var a=e;try{a=Vl(a)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var l=(0,o.Cl)((0,o.Cl)({},a),{data:r.validTracesInfo.map((function(t){return a.data[t.index]}))}),s=r.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),c=e.selectedLegends,d=u.useRef(new Map),f=function(){var t=u.useContext(Jp),n=(0,Kp.m)(["theme"]).theme;return t||n||(0,pn.a)({})}(),v=null!==(i=null==f?void 0:f.isInverted)&&void 0!==i&&i,h=u.useRef(null),p=u.useRef(!1);Rl(c)||(c=[]);var g=u.useState(c),y=g[0],m=g[1],b=function(n){m(n),t.onSchemaChange&&t.onSchemaChange({plotlySchema:{plotlyInput:a,selectedLegends:n}})};u.useEffect((function(){var n=Wl(t.chartSchema).plotlySchema.selectedLegends;m(null!=n?n:[])}),[t.chartSchema]);var x={legendProps:{canSelectMultipleLegends:!0,onChange:b,selectedLegends:y},componentRef:h,calloutProps:{layerProps:{eventBubblingEnabled:!0}}},w=u.useCallback((function(t){return new Promise((function(n,i){return p.current?i(Error("Exporting multi plot charts as image is not supported")):h.current&&"function"==typeof h.current.toImage?void h.current.toImage((0,o.Cl)({background:f.semanticColors.bodyBackground,scale:5},t)).then(n).catch(i):i(Error("Chart cannot be exported as image"))}))}),[f]);if(u.useImperativeHandle(t.componentRef,(function(){return{exportAsImage:w}}),[w]),"scatterpolar"===r.type){var M=function(t){for(var n,i,e,r,u,a,l,s,c,d=(0,o.Cl)({},t),f=0,v=0,h=0;h<t.data.length;h++){var p=t.data[h].r;if(p&&Rl(p))for(var g=0;g<p.length;g++)Il(p[g])||(f=Math.min(f,p[g]),v=Math.max(v,p[g]))}var y=f<0?-f:0,m=new Set;for(h=0;h<t.data.length;h++)(A=t.data[h]).theta&&Rl(A.theta)&&A.theta.forEach((function(t){return m.add(String(t))}));var b=[],x=[],w=null,M=function(s){var c=t.data[s];Rl(c.theta)&&(c.__axisLabel=Array.from(m)),c.x=[],c.y=[];var f=c.theta,v=c.r;if(!Rl(v)||!Rl(f))return d.data[s]=c,"continue";var h="clockwise"===(null===(e=null===(i=null===(n=t.layout)||void 0===n?void 0:n.polar)||void 0===i?void 0:i.angularaxis)||void 0===e?void 0:e.direction)?-1:1,p=(null!==(l=null===(a=null===(u=null===(r=t.layout)||void 0===r?void 0:r.polar)||void 0===u?void 0:u.angularaxis)||void 0===a?void 0:a.rotation)&&void 0!==l?l:0)*Math.PI/180,g=[],M=!1;Fl(f)||(g=Array.from(new Set(f)),M=!0);for(var C=0;C<v.length;C++)if(!Il(null==f?void 0:f[C])&&!Il(null==v?void 0:v[C])){var k;k=M?p+h*g.indexOf(f[C])*(2*Math.PI/g.length):p+h*(f[C]*Math.PI/180);var A=v[C]+y,S=A*Math.cos(k),L=A*Math.sin(k);0===s&&0===C&&(w=y),c.x.push(S),c.y.push(L),b.push(S),x.push(L)}c.x&&c.y&&(c.data=c.x.map((function(t,n){return(0,o.Cl)({x:t,y:c.y[n]},c.text?{text:c.text[n]}:{})}))),d.data[s]=c};for(h=0;h<t.data.length;h++)M(h);if(null!==w){for(h=0;h<d.data.length;h++)(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t-w})));for(var C=0;C<b.length;C++)b[C]=b[C]-w}var k=Math.max.apply(Math,(0,o.fX)((0,o.fX)([],b.map(Math.abs),!1),x.map(Math.abs),!1));for(k=0===k?1:k,h=0;h<d.data.length;h++){var A;(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t/(2*k)})),A.y=A.y.map((function(t){return t/(2*k)})))}var S=(null===(s=t.layout)||void 0===s?void 0:s.width)||(null===(c=t.layout)||void 0===c?void 0:c.height)||500;return d.layout=(0,o.Cl)((0,o.Cl)({},d.layout),{width:S,height:S}),d.layout.__polarOriginX=null!=w?w:void 0,d}(l);l.data=M.data,l.layout=M.layout,s.forEach((function(t,n){var i,e;if("scatterpolar"===t.type){var r=null!==(e=null===(i=l.data[n])||void 0===i?void 0:i.mode)&&void 0!==e?e:"";r.includes("line")?s[n].type="line":r.includes("markers")||"text"===r?s[n].type="scatter":s[n].type="line"}}))}var C={},k=0;l.data.forEach((function(t,n){var i,e="";Zg(r.validTracesInfo[n].type)?(e="".concat(mg).concat(k+1),k++):e=null!==(i=t.xaxis)&&void 0!==i?i:"x",C[e]||(C[e]=[]),C[e].push(n)})),p.current=Object.keys(C).length>1;var A=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=qg(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=qg(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};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=qg(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=qg(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};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,r,a,l,s;if(Zg(n.type)){var c=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],d={start:(null===(r=c.domain)||void 0===r?void 0:r.x)?c.domain.x[0]:0,end:(null===(a=c.domain)||void 0===a?void 0:a.x)?c.domain.x[1]:1},f={start:(null===(l=c.domain)||void 0===l?void 0:l.y)?c.domain.y[0]:0,end:(null===(s=c.domain)||void 0===s?void 0:s.y)?c.domain.y[1]:1};o.push(d),u.push(f)}})),null!=d&&Object.keys(d).length>0&&(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=n>=r?"".concat(mg).concat(n-r+1):"x".concat(0===n?"":n+1),e=v.findIndex((function(n){return n===t.start}))+1,o=a[n],u={row:-1,column:e,xAnnotation:null==o?void 0:o.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[i]=u}))}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=n>=r?"".concat(mg).concat(n-r+1):"x".concat(0===n?"":n+1),e=p.findIndex((function(n){return n===t.start})),o=g-e,u=a[n],l=null==u?void 0:u.yAnnotation,s=c[i];void 0!==s&&(s.row=o,s.yAnnotation=l,s.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(l,p.current,r.validTracesInfo);if(p.current&&A.templateRows===bg&&A.templateColumns===bg){if("donut"===r.type){var S=Object.keys(C);S.forEach((function(t,n){n<S.length-1&&delete C[t]}))}else Object.keys(C).forEach((function(t,n){n>0&&delete C[t]}));p.current=!1}var L,V=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,w;if("donut"===e[a].type){var M=u,C=hg(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==M?void 0:M.marker)||void 0===p?void 0:p.colors,n,r,!0);null===(g=M.labels)||void 0===g||g.forEach((function(i,e){var u,a,l,s,c,d="".concat(i),f=pg(C,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===Zg(e[a].type)){var k=u,A=k.legendgroup,S=(null===(y=k.line)||void 0===y?void 0:y.color)||(null===(m=k.marker)||void 0===m?void 0:m.color),L=Yg(k),V=hg(null===(w=null===(x=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,i,S,n,r);void 0!==A&&""!==A&&!1===o.some((function(t){return t.title===A}))&&o.push({title:A,color:V,shape:L})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(l,d,t.colorwayType,r.validTracesInfo,v);return u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"grid",gridTemplateRows:A.templateRows,gridTemplateColumns:A.templateColumns}},Object.entries(C).map((function(n){var i,e,a,c=n[0],f=n[1],h=(0,o.Cl)((0,o.Cl)({},l),{data:f.map((function(t){return l.data[t]}))}),g=s.filter((function(t){return f.includes(t.index)})),y="fallback"===r.type||"groupedverticalbar"===r.type?r.type:g[0].type;s.some((function(t){return"line"===t.type}))&&s.some((function(t){return"scatter"===t.type}))&&(y="line");var m=ky[y];if(m){var b=m.transformer,w=m.renderer,M=m.preTransformCondition,C=m.preTransformOperation;if(void 0===M||M(h)){var k=C?C(h):h,S=A.layout[c];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)))}(w,b,[k,p.current,d,t.colorwayType,v],(0,o.Cl)((0,o.Cl)({},x),{xAxisAnnotation:null==S?void 0:S.xAnnotation,yAxisAnnotation:null==S?void 0:S.yAnnotation}),null!==(i=null==S?void 0:S.row)&&void 0!==i?i:1,null!==(e=null==S?void 0:S.column)&&void 0!==e?e:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(a=h.data[0])||void 0===a?void 0:a.type))}))),p.current&&(L=V,u.createElement(uf,(0,o.Cl)({},L,{selectedLegends:y,onChange:b}))))}));Ay.displayName="DeclarativeChart",Ay.defaultProps={colorwayType:"default"},(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();
|