@nebula.js/sn-bar-chart 1.35.0 → 1.35.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,94 @@
1
1
  /*
2
- * @nebula.js/sn-bar-chart v1.35.0
2
+ * @nebula.js/sn-bar-chart v1.35.2
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["picasso.js","picasso-plugin-q","hammerjs","qlik-chart-modules","react","react-dom","@nebula.js/stardust","qlik-object-conversion"],(function(e){"use strict";var t,n,i,o,r,a,s,l,u,c,d,m,f,h,p,g,y,v,b,x,S,M,C,w,q,k,T,E,D,N,L,O,A,I,P,R,z,F,j,H,B,_,V,U,$,W,K;return{setters:[function(e){t=e.default},function(e){n=e.default},function(e){i=e.default},function(e){o=e.getValue,r=e.setValue,a=e.debouncer,s=e.throttler,l=e.cache,u=e.storage,c=e.memoize,d=e.selectionService,m=e.colorService,f=e.layoutService,h=e.dockService,p=e.themeService,g=e.pluginService,y=e.fontResolver},function(e){v=e.default,b=e,x=e.Children,S=e.isValidElement,M=e.cloneElement},function(e){C=e,w=e.default},function(e){q=e.useTranslator,k=e.useEmbed,T=e.useTheme,E=e.useState,D=e.useDeviceType,N=e.useAppLayout,L=e.useEffect,O=e.useElement,A=e.useOptions,I=e.useLayout,P=e.useAction,R=e.useStaleLayout,z=e.useModel,F=e.useApp,j=e.usePlugins,H=e.useSelections,B=e.useConstraints,_=e.useRect,V=e.usePromise,U=e.onTakeSnapshot,$=e.useImperativeHandle,W=e.useRenderState},function(e){K=e.default}],execute:function(){e("default",(function(e){const r=function(){const e=t();return e.use(n),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",X(e))};return void e.interaction("hammer",X(Hammer))}(i)),e.use(function(){return function(e){e.renderer("react",function(){function e({x:e,y:t,width:n,height:i,scaleRatio:o,margin:r}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(i)?a.height:i,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==r&&(a.margin.left=Number.isNaN(r.left)?0:r.left,a.margin.top=Number.isNaN(r.top)?0:r.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let i,o=e();const r={element:()=>i,root:()=>i,appendTo:e=>(i||(i=n("div"),i.style.position="absolute",i.style["-webkit-font-smoothing"]="antialiased",i.style["-moz-osx-font-smoothing"]="antialiased",i.style.pointerEvents="none"),e.appendChild(i),i),render(e){if(!i)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return i.style.left=`${Math.round(o.margin.left+o.x*t)}px`,i.style.top=`${Math.round(o.margin.top+o.y*n)}px`,i.style.width=`${Math.round(o.width)}px`,i.style.height=`${Math.round(o.height)}px`,i.style.transform=`scale(${t}, ${n})`,i.style.transformOrigin="top left",w.render(function(e,t){return v.createElement(jd,{generateClassName:t},v.createElement(Nm,{theme:kh},e))}(e,Th),i),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(i&&w.unmountComponentAtNode(i),r),destroy(){i&&i.parentElement&&(w.unmountComponentAtNode(i),i.parentElement.removeChild(i)),i=null},size:t=>(t&&(o=e(t)),o)};return r}}()),e.component("data-title",function(e){function t(e){return!e.isDimension&&be.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function n(e){return e.isDimension&&be.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:n}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||t(this.settings.settings)?Math.max(28,n):Math.max(20,n)},render(){const{settings:{app:e,disabled:i,explicitItemInfos:o,hyperCube:r,hyperCubeDef:a,isDimension:s,minWidth:l,model:u,onChangeToAlternative:c,padding:d,rtl:m,selections:f,skipAttributeExpressions:h,translator:p,supportConditional:g=!1,isEnabled:y},layout:{dock:b}}=this.settings,x="top"!==b&&"bottom"!==b||!m?"ltr":"rtl",S=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};"left"===e?(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left");return n}(b,this.rect),M=a&&a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef,C=M&&M[s?"qDimensions":"qMeasures"]||[],w=o||r[s?"qDimensionInfo":"qMeasureInfo"],q=s?Rs:Fs,k=s?zs:js,T=Boolean(u&&u.colorSupport&&u.modifiers),E=T&&(n(this.settings.settings)||t(this.settings.settings)),D=y("PS_21223_CYCLIC_GROUPS"),N=w.map(((t,n)=>{const o="number"==typeof t.explicitColumn?t.explicitColumn:n,r=k(t,o,u,e),a=n===w.length-1,y=D&&s&&"N"!==t.qGrouping,x=q({column:o,activeInfo:t,altList:C,app:e,dir:m?"rtl":"ltr",dock:qh(b),model:u,onChange:c,skipAttributeExpressions:h,translator:p,allowChangeOfAlternatives:T,isCyclicFFEnabled:D});return v.createElement(v.Fragment,{key:t.cId},v.createElement(wh,{showGroupDimOptions:y,popover:x,titleData:r,model:u,translator:p,selections:f,disabled:i(),style:this.style,isDimension:s,padding:d,minWidth:l,hasAlternative:E,supportConditional:g,isCyclicFFEnabled:D}),!a&&v.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return v.createElement("div",{style:S,dir:x},N)}}}(e.renderer("svg")())),e.component("disclaimer",function(){class e extends v.Component{render(){const{label:e,spanStyle:t}=this.props;return v.createElement(v.Fragment,null,v.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}function t(e,t,n){const i={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":i.width=`${n.height}px`,i.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,i.transformOrigin="top left";break;case"right":i.width=`${n.height}px`,i.transform=`rotate(90deg) translate(0, -${n.width}px)`,i.transformOrigin="top left";break;case"center":i.width=`${n.width}px`,i.height=`${n.height}px`,i.color="#595959",i.fontStyle="normal",i.fontSize="1.2em",i.textAlign="center";break;default:i.justifyContent="flex-start",i.alignItems="flex-start"}return i}return e.propTypes={label:Us.string.isRequired,spanStyle:Us.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:n,rtl:i},layout:{dock:o},style:r={}}=this.settings,a="top"!==o&&"bottom"!==o||!i?"ltr":"rtl",s=t(r,o,this.rect),l="center"===o?n:`* ${n}`,u="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return v.createElement("div",{style:s,dir:a},v.createElement(v.Fragment,null,v.createElement(e,{label:l,spanStyle:u})))}}}())}}()),e.use(yy),e.component("box-sliced-hat",py),e.component("box-out-of-bounds",cy),e.component("scrollbar",ry),e.component("scroll-hint",ea),e.component("reference-line-labels",ts),e.component("axis-overlay",vg.picassoComponents.axisOverlay),e.component("time-axis",vg.picassoComponents.timeAxis),e.scale("q-time-axis",vg.picassoScales.time),e}();return{qae:Jy(e),ext:gM(e),component(){const t=function({env:e}){var t;const{flags:n}=e,i=null===(t=e.anything)||void 0===t||null===(t=t.sense)||void 0===t?void 0:t.isUnsupportedFeature,o=q();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(Zy).forEach((t=>{e.add(Zy[t])}))}}(e.translator);const r=k(),a=T(),[s,l]=E(),u=D(),c=N(),{qLocaleInfo:d}=c;return L((()=>{l({translator:o,theme:a,embed:r,deviceType:u,localeInfo:d,isUnsupportedFeature:i,flags:n})}),[d,i,o.language(),a.name(),u]),s}({env:e}),{viewState:n,viewCache:i}=function(){const[e]=E((()=>l())),[t]=E((()=>u({viewRange:[0,1],scrollOffset:void 0})));return{viewCache:e,viewState:t}}(),c=function({picasso:e}){const t=O(),n=A(),[i,o]=E();return L((()=>{if(!e)return()=>{};t.style.overflow="hidden";const i=e({renderer:{prio:[(null==n?void 0:n.renderer)||"canvas"]}}).chart({element:t,data:[],settings:{}});o(i);const{destroy:r}=i;return()=>{r()}}),[n.renderer]),i}({picasso:r}),d=function({picasso:e,chart:t,environment:n,viewState:i,viewCache:r}){const a=R(),u=z(),c=F(),d=j(),m=H(),y=A(),[v,b]=E(),[x,S]=E(),[M,C]=E(),w=B(),k=function(){const[e]=E({}),[t]=E({}),n=function(){var e,t;const n=I(),i=q(),o=!(null==n||null===(e=n.qSelectionInfo)||void 0===e||!e.qInSelections),r=!(null==n||null===(t=n.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t||null===(t=t[0])||void 0===t||!t.qIsOneAndOnlyOne),[a,s]=E(!1),[l,u]=E(!1),[c,d]=E({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),m=e=>{u("boolean"==typeof e?e:!l)};return P((()=>(d({key:"lasso",action:m,enabled:()=>a,active:()=>l}),{key:"lasso",label:i.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:mb,hidden:!a||!o||r,active:l,action:m})),[o,r,l,a,i.language()]),{get:()=>c,setAllows:e=>{s(!!e)}}}(),[i,o]=E();return L((()=>{const i={};i.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:n,discrete:i}=e;return t.allowScroll&&((null==n?void 0:n.meta.isContinuous)||(null==i?void 0:i.query.getCanScroll()))}},i.interact={key:"interact",isEnabled:!0,enabled:()=>t.allowInteract},i.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>t.allowTooltip},i.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>t.allowSelect},i.lasso=n.get(),Object.keys(i).forEach((e=>fb(i[e]))),o(i)}),[]),L((()=>{i&&n&&(i.lasso={...i.lasso,...n.get()})}),[n]),{get:()=>i,setAllows:e=>{Object.assign(t,e),n.setAllows(null==e?void 0:e.allowSelect)},setContext:t=>{Object.assign(e,t)},destroy:()=>{Object.keys(i).forEach((e=>i[e].removeAllListeners()))}}}();return L((()=>{if(!t)return()=>{};const e=k.get(),n=bb({chart:t,actions:e,selections:m});return S(e),C(n),()=>{n.destroy(),k.destroy()}}),[t]),L((()=>{if(!w)return;const e={allowScroll:!w.active,allowInteract:!w.active,allowTooltip:!w.passive,allowSelect:!w.select&&!w.active};k.setAllows(e)}),[w]),L((()=>{if(!M||!n)return;const{theme:m,translator:v,localeInfo:S,flags:C,embed:w}=n,{direction:q="ltr"}=y,T=f({source:a,metaAdditionsFn:gb,experimental:{filter:C.isEnabled("IM_1579_HIDE_DIM_MEA")}});M.setFilteredFields(T.meta.filteredFields);const E=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(T.getLayout())?f({source:T.getLayout()}):void 0,D=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:a,options:y}),N=function({layoutService:e,viewCache:t,flags:n,options:i}){const o={};return o.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map(((e,t)=>`qDimensionInfo/${t}`)),minor:e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>`qMeasureInfo/${t}`))};return n.majorNumeric=`${t.isStackedByDimension?n.majorStack:n.major}:numeric`,n}(e),o.selectionDimensionIdx=xb(e.getHyperCube()),o.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,o.selectionDimensionProp=e=>void 0===o.selectionDimensionIdx||void 0!==e&&o.selectionDimensionIdx!==e?{}:{selectionDimension:{field:o.selectionDimensionIdx}},o.animations={enabled:()=>!1!==i.chartAnimations&&(!!n.isEnabled("IM_1355_ANIMATIONS_BAR")&&(!(o.animations.isPartialUpdating||o.animations.isSizeChanging||o.animations.hasSlicedHats)&&!os.propertiesHaveChanged({viewCache:t,layout:e.getLayout()}))),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},o}({layoutService:T,viewCache:r,flags:C,options:y}),L=h({chart:t,layoutService:T,config:{logicalSize:D,rtl:"rtl"===q},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),O=p({theme:m,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]]}}),A=function({layoutService:e,themeService:t,flags:n}){const i=t.getStyles(),o=t=>n.isEnabled("CLIENT_IM_747")?(e.getLayoutValue("components",[])||[]).find((e=>e.key===t)):void 0;return{axis:{title:{getStyle:()=>{var e,t,n,r,a,s;return{fontFamily:null!==(e=null===(t=o("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:i.axis.title.fontFamily,fontSize:null!==(n=null===(r=o("axis"))||void 0===r||null===(r=r.axis)||void 0===r||null===(r=r.title)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:i.axis.title.fontSize,color:null!==(a=null===(s=o("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:i.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,a,s;return{fill:null!==(e=null===(t=o("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:i.axis.label.name.color,fontSize:null!==(n=null===(r=o("axis"))||void 0===r||null===(r=r.axis)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:i.axis.label.name.fontSize,fontFamily:null!==(a=null===(s=o("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.name)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:i.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,r,a,s;return{fontFamily:null!==(e=null===(t=o("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:i.legend.title.fontFamily,fontSize:null!==(n=null===(r=o("legend"))||void 0===r||null===(r=r.legend)||void 0===r||null===(r=r.title)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:i.legend.title.fontSize,color:null!==(a=null===(s=o("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:i.legend.title.color}}},label:{getStyle:()=>{var e,t,n,r,a,s;return{fontFamily:null!==(e=null===(t=o("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:i.legend.label.fontFamily,fontSize:null!==(n=null===(r=o("legend"))||void 0===r||null===(r=r.legend)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:i.legend.label.fontSize,color:null!==(a=null===(s=o("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:i.legend.label.color}}}},label:{getStyle:()=>{var e,t,n,r,a,s,l,u;return{fill:null!==(e=null===(t=o("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:i.label.value.color,useContrastColor:null===(n=null===(r=o("label"))||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.useContrastColor)||void 0===n||n,fontSize:null!==(a=null===(s=o("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.fontSize)&&void 0!==a?a:i.label.value.fontSize,fontFamily:null!==(l=null===(u=o("label"))||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.value)||void 0===u?void 0:u.fontFamily)&&void 0!==l?l:i.label.value.fontFamily}}}}}({layoutService:T,themeService:O,flags:C}),I=vg.model({model:u,layoutService:T,viewCache:r,viewState:i}),P=function({enigma:e,layoutService:t,viewModel:n,definitionPath:i,reducedHyperCubePath:o},r={}){const a=function(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(qe).then((e=>{var n;const i=t.getHyperCubeValue("qMode"),o=t.getHyperCubeValue("qDimensionInfo"),r="K"===i&&o.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=r?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:o.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:r?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),i=t.meta.isStacked&&e.length>1?1:0,o=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:i,qWidth:e.length+o.length+i,qHeight:Math.min(2e3,1e4/(o.length+1))},zoomLevel:-1,filter:"D1"}}}}(e,t,i),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,o),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),u=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,i=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return i.should=e=>t&&n&&1===e.qDimensionInfo.length,i}({layoutService:t}),c={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>c,update(e){var i;u.should(e)&&u(e),c.mode=se(c.mode,t.meta),c.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,c.mode.isStackedByDimension=c.mode.isStacked&&(2===(i=e).qDimensionInfo.length&&2===i.qMeasureInfo.length),c.mode.isStackedByMeasure=c.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),c.fields={major:c.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:c.mode.isStackedByDimension?e.qMeasureInfo.map(((e,t)=>`qMeasureInfo/${t}`)):n.fields.minor},c.scales={major:pb.SCALE.REDUCED.MAJOR,minor:pb.SCALE.REDUCED.MINOR},c.cube=e,r.qDataPages=e.qDataPages},fetchMinMaxData(){if(r.qDataPages)return Promise.resolve(r.qDataPages);let n=a.settings();const i="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=se(!0,{},n,{rect:{qHeight:i}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then((e=>e))},setSnapshotData(e){e.reducedHyperCube=c.cube}}}({enigma:u,layoutService:T,viewModel:N});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const i=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",i.scrollOffset),t.preventSet("legendScrollOffset",i.legendScrollOffset||0),i.zoom&&t.preventSet("zoom",i.zoom)}({layoutService:T,viewState:i,viewStateOptions:null==y?void 0:y.viewState});const R=Mb({picasso:e,model:u,app:c,translator:v,localeInfo:S,theme:m,continuousDataModel:I,layoutService:T,legendLayoutService:E,reducedDataModel:P}),z=Kv({layoutService:T,viewState:i,colorModel:{settings:()=>R.getMain().getSettings(),resolveUIColor:e=>R.getMain().getPaletteColor(e)},chart:t,env:n,keys:{colorScale:pb.SCALE.MAIN.COLOR},isEnabled:()=>!T.meta.isGroupedByDimension&&(!T.meta.isStackedByDimension||C.isEnabled("TRENDLINES_STACKED_DIM"))&&!T.meta.isDimensionless});Hy.attrExpr.updateProperties(u,a);const F=function({layout:e,app:t,picasso:n,model:i,chart:o,translator:r,localeInfo:a,embed:s}){const l=e.tooltip&&!e.tooltip.auto;return{layout:e,app:t,picasso:n,model:i,chart:o,translator:r,localeInfo:a,useCustomTooltip:l,utils:Oy,miniChartToken:{},embed:s}}({layout:a,app:c,model:u,picasso:e,chart:t,translator:v,localeInfo:S,embed:w,extractDimsAndNode:yb.extractDimsAndNode});let j;T.meta.isDiscrete&&(j=function({chart:e,actions:t,componentKey:n,enigmaModel:i,layoutService:r,dockService:a,trendLineModel:u,itemWidths:c,viewState:d,rtl:m,options:{definitionPath:f="/qHyperCubeDef",getRect:h,axisKey:p,renderer:g,areaBuffer:y,processDataPage:v=(()=>{})}={}}){const b=l(),x=function({qMode:e}){switch(e){case"S":default:return av;case"K":return sv;case"T":return lv}}({qMode:r.getHyperCubeValue("qMode")}),S=function({state:e,contains:t}){return e.set(uv,[]),{add:t=>{const n=e.get(uv);n.length=0,n.push(t)},getCurrent:()=>e.get(uv)[0],getAll:()=>e.get(uv),contains:n=>t(e.get(uv)[0],n)}}({state:b,contains:x.contains});!function({layoutService:e,dataStore:t,composition:n}){const i=e.getDataPages()[0];if(!i)return;const o=n.patcher({layoutService:e});o.should(i)&&o(i);t.add(i)}({layoutService:r,dataStore:S,composition:x});const M=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:y}),C=function({dataStore:e,composition:t,enigmaModel:n,layoutService:i,trendLineModel:o=gv,definitionPath:r,processDataPage:a}){const{slicer:l,cacheWarden:u,request:c}=t,d=function({dataStore:e,slice:t,warden:n,expand:i,request:o,process:r,connectionless:a,processDataPage:s}){const l=(l,{onProcessing:u}={})=>{if(e.contains(l)){const i=e.getCurrent();if(a)return Promise.resolve(t(i,l));const o=n.release(i.qArea,l),s=r.isProcessing();if(!o&&s&&r.cancel(),!o||s)return Promise.resolve(t(i,l))}if(a)return Promise.resolve(e.getCurrent());r.isProcessing()&&u&&u();const c=i(l);return r(o(c)).then((n=>(s(n),e.add(n),t(n,l))))};return l}({dataStore:e,slice:l,warden:u({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:hv({layoutService:i}),request:c({definitionPath:r}),process:pv(n),connectionless:i.meta.isSnapshot,processDataPage:a}),m=s(((e,{onProcessing:t,onData:n})=>{d(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==Qy)throw e}))}),iv);return function(e,{onProcessing:t=ev,onDataPage:n=ev}={}){m(e,{onProcessing:t,onData:e=>{i.setDataPages(e?[e]:[]),o.command.update(),n(e)}})}}({dataStore:S,composition:x,enigmaModel:i,layoutService:r,trendLineModel:u,definitionPath:f,processDataPage:v}),w=function({chart:e,componentKey:t,state:n,dataStore:i,pageData:o,layoutService:r,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:f}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const h=function({chart:e,getRect:t,getDataPages:n,layoutService:i,dockService:o,getItemWidths:r,axisKey:a,renderer:s,areaBuffer:l,rtl:u}){const{inTotal:c,area:d,scaleRange:m}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:i}=e.meta;if(t)return yv;if(!n)return vv;return i?Mv:kv}({layoutService:i}),f=()=>"horizontal"===o.meta.major.orientation?t().width:t().height,h=e=>e?f()/e:0,p=(e,t)=>-(e-t)*h(t);return{getItems(){const n=i.getLayoutValue("dimensionAxis"),l=c({layoutService:i});return{inTotal:l,inView:Tv({chart:e,rect:t(),dockService:o,itemWidths:r(),axisKey:a,renderer:s,isGrouped:i.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(tv/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return h(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t,o=Math.min(0,Math.max(e,p(n,i))),r=i?Math.abs(i*o/f()):0;return{start:{pixel:o,item:r},end:{item:Math.min(r+(i||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return p(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:i}){const o=e/n*t,r=Math.abs(i)/o,a=Math.min(1,r+e/o);return[r,a]}({viewSize:f(),inTotal:n,inView:i,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:i,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const r=m({getDataPages:n,layoutService:i,offsets:e,items:t,viewSize:f(),upperBound:p(t.inTotal,t.inView)});return"horizontal"===o.meta.major.orientation&&u?function(e){return[1-e[1],1-e[0]]}(r):r},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t;return e<=0&&e>=p(n,i)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,i=e*h(n);return Number.isFinite(i)?-i:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:i}=t;return-e*(h(i)*n)}}}}({chart:e,getRect:()=>n.get("rect"),getDataPages:i.getCurrent,layoutService:r,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:f}),p=()=>{const e=h.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const i=h.getOffsets({pixelOffset:e,items:t});return n.set("offsets",i),i},y=({items:e})=>{const t=r.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?h.getUpperBound({items:e}):0;if("number"==typeof n)return h.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:i,end:o}=n,a=1===t&&o?o-e.inView:i;return h.convert.itemToPixelOffset({itemOffset:a,items:e})},v=e=>{const[{qArea:t}]=r.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))},b=e=>{const t=Date.now(),i=p(),r=g({pixelOffset:e,items:i}),a=h.getArea({itemOffset:r.start.item,items:i});if(v(a))return void((h.validate.offset({pixelOffset:e,items:i})||m.get("scrollOffset").start!==r.start.item)&&(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:r.start,items:i})),m.preventSet("viewRange",h.getViewRange({pixelOffset:r.start.pixel,items:i})),m.set("scrollOffset",{start:r.start.item,end:r.end.item})));m.preventSet("viewRange",h.getViewRange({pixelOffset:r.start.pixel,items:i}));const s=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:r.start,items:i})),m.set("scrollOffset",{start:r.start.item,end:r.end.item}))};o(a,{onProcessing:s,onDataPage:s})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const i=e.component(t);if(!i)return Promise.resolve();n.set("rect","function"==typeof l?l():i.rect),n.set("itemWidths","function"==typeof s?s():s);const r=p();n.set("itemSize",h.getItemSize({items:r}));const a=y({items:r}),u=g({pixelOffset:a,items:r});m.preventSet("viewRange",h.getViewRange({pixelOffset:u.start.pixel,items:r}));const c=h.getArea({itemOffset:u.start.item,items:r});return new Promise((e=>{o(c,{onDataPage:()=>{n.set("scaleRange",h.getScaleRange({offsets:u.start,items:r})),m.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;b(t)},scrollToRelative(e){const t=n.get("items"),i=h.convert.relativeToPixelOffset({relativeOffset:e,items:t});b(i)}}}({chart:e,componentKey:n,state:b,dataStore:S,pageData:C,layoutService:r,dockService:a,itemWidths:c,getRect:h,axisKey:p,renderer:g,areaBuffer:M,viewState:d,rtl:m}),q=function({layoutService:e,dataStore:t}){return function(n){const i=o(n,`${e.refs.dataPages}`);i.length=0,i.push(t.getCurrent())}}({layoutService:r,dataStore:S}),k=function({chart:e,actions:t,componentKey:n,dockService:i,rtl:o,scroller:r}){return{gestures:[mv({chart:e,actions:t,componentKey:n,dockService:i,rtl:o,scroller:r})],native:{type:"native",events:{wheel:fv({chart:e,actions:t,componentKey:n,scroller:r})}}}}({chart:e,actions:t,componentKey:n,dockService:a,rtl:m,scroller:w});return{interactions:k,query:{getCanScroll:()=>w.enabled(),getItemSize:()=>w.itemSize(),getScaleRange:()=>w.scaleRange(),getCurrentDataPage:()=>S.getCurrent()},command:{initialize:()=>w.initialize(),scrollTo:e=>w.scrollToRelative(e),setSnapshotData:e=>q(e)}}}({chart:t,actions:x,componentKey:pb.COMPONENT.BAR,enigmaModel:u,layoutService:T,dockService:L,trendLineModel:z,itemWidths:hb,viewState:i,rtl:"rtl"===q,options:{axisKey:pb.COMPONENT.BAR_AXIS,renderer:e.renderer("svg")()}}));const H=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:i,isGroupedByDimension:o}=e.meta,r=e.getLayout(),a="K"===r.qHyperCube.qMode,s=Ce.dimensionless(r),l=Pa.getMeasureRefLines(r),u=Pa.getDimensionRefLines(r,s),c=Pa.getMeasureRefLineLabels(r),d=Pa.getDimensionRefLineLabels(r,s);let m={},f={};const h=t=>{if(i){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:i,qMax:o}=n;return Pa.isOutOfRange({value:t,qMin:i,qMax:o})}return!1},p=t=>{if(!f[t])return!1;if(!n&&o){const n={valueInfo:f[t]},i="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=e.getHyperCubeValue(i);return Pa.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!u||!u.length)&&!u.every((t=>{const n=Pa.getInputValue({refLineLayout:t,layoutService:e});return h(n)||p(n)})),y={isKMode:a,canBeContinuous:i,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:f,dimensionValuesInfo:m,query:{getRefLines:e=>Pa.getRefLines(r,e),getRefLineLabels:e=>Pa.getRefLineLabels(r,e)},update:()=>{f=y.dimensionRefLineInfo,g()&&(m=Pa.getDimensionValuesInfo({layout:r,canBeContinuous:i,discreteModel:t,layoutService:e}),y.dimensionValuesInfo=m,u.forEach((t=>{const n=Pa.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(f[n]?(f[n].innerValues=m[n].innerValues,f[n].minOrder=Math.min(f[n].minOrder,m[n].minOrder),f[n].maxOrder=Math.max(f[n].maxOrder,m[n].maxOrder),f[n].isMinOrderOk=f[n].isMinOrderOk||m[n].isMinOrderOk,f[n].isMaxOrderOk=f[n].isMaxOrderOk||m[n].isMaxOrderOk):f[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},f[n].numInnerValues=(f[n].maxOrder||0)-(f[n].minOrder||0)+1)})))}};return y.update(),y}({layoutService:T,discreteModel:j}),B=function(e){const t={layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:pb.SCALE.MAIN.MINOR,MAJOR:pb.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:pb.COMPONENT.BAR,BAR_AXIS:pb.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:pb.COLLECTION.MAIN}}};return t}(T),_=g({picassoInstance:e,plugins:d||[],pluginArgs:B});k.setContext({discrete:j,layoutService:T}),b({discrete:j,continuous:vg,legendLayoutService:E,layoutService:T,viewModel:N,dockService:L,themeService:O,styleService:A,continuousDataModel:I,reducedDataModel:P,colorService:R,trendLineModel:z,refLineModel:H,pluginService:_,customTooltipModel:F,selectionService:M,logicalSize:D})}),[M,y,n,a]),v}({picasso:r,chart:c,environment:t,viewState:n,viewCache:i}),m=function({env:e,services:t}){const n=F(),i=z(),o=W(),[r,a]=V((async()=>{if(!e||!t)return Promise.resolve();const{flags:r}=e,{layoutService:a}=t,{isSnapshot:s,isStacked:l,isContinuous:u}=a.meta,c=[];return s||c.push(i.getEffectiveProperties()),Promise.all(c).then((async e=>{const t=e[0]||void 0;if(r.isEnabled("IM_1579_HIDE_DIM_MEA")&&null!=t&&t.qHyperCubeDef){const e=a.getLayout(),r=se(!0,{},t);if(WS({properties:t,layout:e,isStacked:l,isContinuous:u,model:i,layoutService:a}))return o.pending(),ys(e)?i.setProperties(t).then((()=>{n.clearUndoBuffer()})):void await gs(i,r,t);o.restore()}return{properties:t}}))}),[e,t]);if(a&&!a.isHandled)throw a;return r}({env:e,services:d});!function({picasso:e,chart:t,services:n,environment:i,viewState:o,viewCache:r,bootstrapped:s}){const{width:l,height:u}=_(),c=z(),d=H(),m=A(),[f,h]=E(),[p,g]=E(),[y,v]=E(),[b,x]=E(),S=F();function M(s={}){const{selectionService:l,refLineModel:u,discrete:h,reducedDataModel:p,continuousDataModel:g,trendLineModel:y,pluginService:v,colorService:b,viewModel:x,dockService:M,themeService:C,customTooltipModel:w,layoutService:q,logicalSize:k,styleService:T}=n,E=l.custom.getActions(),D=e.data("q")(f.prepPicassoDataSet()),N={picasso:e,ds:D,rtl:"rtl"===(null==m?void 0:m.direction),model:c,app:S,chart:t,actions:E,localeInfo:i.localeInfo,logicalSize:k,flags:i.flags,translator:i.translator,selections:d,isLocked:l.getIsSelectionLocked,viewCache:r,viewState:o,layoutService:q,dockService:M,viewModel:x,colorService:b,selectionService:l,themeService:C,trendLineModel:y,discrete:h,continuousDataModel:g,reducedDataModel:p.model(),customTooltipModel:w,debouncer:a,refLineModel:u,pluginService:v,styleService:T,...s};return US(q.getLayout(),N,i)}function C(){if(!t.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:i,viewModel:o}=n;r.set("isPreRender",!0);const a=M(p);f.extractDataPages(),t.layoutComponents({settings:a,data:y}),r.set("isPreRender",!1),f.insertDataPages(),o.animations.hasSlicedHats=a.components.filter((e=>"box-sliced-hat"===e.type)).length>0;const s=[];return 1!==a.components.length&&i.meta.isDiscrete&&s.push(e.command.initialize()),Promise.all(s)}const[[w,q]=[]]=V((()=>{var a,l;if(!(e&&t&&n&&i&&o&&r&&s))return Promise.resolve();const{layoutService:u,selectionService:c,refLineModel:d,discrete:m,continuous:f,reducedDataModel:h,continuousDataModel:p,trendLineModel:g,legendLayoutService:y,colorService:v,pluginService:b,viewModel:S,customTooltipModel:M}=n;if(null==c||null===(a=c.custom)||void 0===a||!a.getActions())return Promise.resolve();const{flags:C}=i;if(null!=C&&null!==(l=C.isEnabled)&&void 0!==l&&l.call(C,"IM_1579_HIDE_DIM_MEA")){const{properties:e}=s,t=null==e?void 0:e.qHyperCubeDef.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv}));t&&(M.useCustomTooltip=!1)}const w=()=>{x(Date.now()),S.animations.isPartialUpdating=!0},q=()=>{y&&y.setDataPages([m.query.getCurrentDataPage()]),d&&d.update(),w()};o.onChanged("scrollOffset",q),o.onChanged("legendScrollOffset",w),o.intercept("zoom",f.event.onZoomIntercept({viewCache:r})),o.onChanged("zoom",f.event.onZoomChange({layoutService:u,continuousDataModel:p},w)),c.setLayout(u.getLayout());const k=[];u.meta.isContinuous&&(p.update(u.getLayout()),k.push(p.initialFetch())),g.command.update(),k.push(h.fetch().then((({reducedCube:e})=>{h.update(e)}))),k.push(Promise.resolve({properties:s.properties}));const T=()=>[b.initialize(),v.initialize(),Vb({reducedDataModel:h,layoutService:u,continuousDataModel:p,trendLineModel:g})];return Promise.all(k).then((e=>Promise.all(T()).then((t=>[e,t.pop()]))))}),[s]);L((()=>{var e;if(null==n||null===(e=n.colorService)||void 0===e||!e.getMain()||!q)return;const{layoutService:t,selectionService:o,reducedDataModel:a,continuousDataModel:s,trendLineModel:l,legendLayoutService:u,colorService:c,viewModel:d}=n;r.set("minorMinMax",q);const m=()=>!t.meta.isContinuous&&(a.model().mode.isReduced||t.meta.isStacked)&&u,f=t.getHyperCube(),p=t.meta.isContinuous?s.getInitialCube():a.model().cube,{field:y}=c.getMain().getSettings(),v=m(),b=v?u.getHyperCube():void 0;o.setBrushAliases({colorField:y,useLegendCube:v,legendAlias:`legendCube/${y}`});const x=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:i,layoutService:o,viewModel:r,trendLineModel:a}){const s=o.refs.dataPages.split(".").pop();let l=[],u=[];const c=o.meta.isContinuous?[{key:r.fields.majorNumeric,from:o.meta.isStackedByDimension?r.fields.majorStack:r.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:i,virtualFields:c}}),prepPicassoData(o){const r=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:i,virtualFields:c}},{type:"q",key:"miniCube",data:t,config:{localeInfo:i,virtualFields:c}},...o];return n&&r.push({type:"q",key:"legendCube",data:n,config:{localeInfo:i,virtualFields:c}}),a.query.hasTrendLines()&&r.push({key:"trend",data:a.query.getData()}),r},extractDataPages(){l=e[s],u=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=u}}}({mainCube:f,miniCube:p,legendCube:b,localeInfo:i.localeInfo,layoutService:t,viewModel:d,trendLineModel:l}),S=w[w.length-1];g({localeInfo:i.localeInfo,...S}),h(x)}),[q]),L((()=>{if(!n||!p||!f)return;const e=n.colorService.getMain();if(!e)return;f.prepPicassoDataSet();const t=f.prepPicassoData(e.getData());v(t)}),[p]),L((()=>{var e;null!=n&&null!==(e=n.colorService)&&void 0!==e&&e.getMain()&&t.update&&f&&y&&C().then((()=>{const{layoutService:e,discrete:i,legendLayoutService:o}=n;if(o){1===e.getLayoutValue("scrollStartPos")&&o.setDataPages([i.query.getCurrentDataPage()])}t.update(),os.cacheProperties({viewCache:r,layout:e.getLayout()})}))}),[y]),L((()=>{if(!(l&&u&&f&&null!=t&&t.update&&null!=n&&n.colorService.getMain()))return;const{viewModel:e}=n;e.animations.isSizeChanging=!0;const{dockService:o,themeService:r}=n;o.update({width:l,height:u}),r.setTheme(i.theme),C().then((()=>{t.update&&t.update()}))}),[l,u]),L((()=>{if(null==t||!t.update)return;const{viewModel:e}=n;t.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1}),[b])}({picasso:r,chart:c,services:d,environment:t,viewState:n,viewCache:i,bootstrapped:m}),$S({environment:t,services:d,chart:c,viewState:n,bootstrapped:m})}}}));const G={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Y(e){return G[e]||e}function X(e){return function(t,n,i){let o,r,a,s,l=[],u=!0;function c(){"function"==typeof o.enable&&(o.enable=o.enable.bind(r)()),o.enable&&(o.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(r));const n=Y(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(i),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(r),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((t=>{const n=Y(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,o=e,r={chart:t,mediator:n,settings:o},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),u&&c()},off(){u=!1,d()},on(){u=!0,0===l.length&&c()},destroy(){d(),a&&a.destroy(),a=null,r=null,o=null}}}}function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z=Object.prototype.hasOwnProperty,Q=Object.prototype.toString,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,ne=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Q.call(e)},ie=function(e){if(!e||"[object Object]"!==Q.call(e))return!1;var t,n=Z.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&Z.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||Z.call(e,t)},oe=function(e,t){ee&&"__proto__"===t.name?ee(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},re=function(e,t){if("__proto__"===t){if(!Z.call(e,t))return;if(te)return te(e,t).value}return e[t]},ae=function e(){var t,n,i,o,r,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)i=re(s,n),s!==(o=re(t,n))&&(c&&o&&(ie(o)||(r=ne(o)))?(r?(r=!1,a=i&&ne(i)?i:[]):a=i&&ie(i)?i:{},oe(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&oe(s,{name:n,newValue:o}));return s},se=J(ae);const le="center",ue="bottom";var ce={NoDataExist:{label:"NoDataExist",alignment:le,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:le,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:le,default:!1},LimitedData:{label:"LimitedData",alignment:ue,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ue,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ue,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ue,default:!1}};const de=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],me={};de.forEach((([e,{width:t,height:n}])=>{me[e]={width:t,height:n}}));const fe={getLayoutModes:()=>me,getLayoutMode(e,t){let n;for(n=0;n<de.length;++n)if(e>=de[n][1].width&&t>=de[n][1].height)return de[n][0];return"SPARK"}};function he(e,t){return{layoutModes:fe.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const pe=["$date","$timestamp","$time"],ge=["D","TS","T"],ye={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>pe.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ge.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(ye.hasTimeTag(t)&&ye.hasUnknownFormat(t)||ye.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ye.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}))[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n;const i=null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(n=null==i?void 0:i.length)&&void 0!==n?n:0)<1)&&ye.canBeContinuousDimension(i[0])},maxNumberOfLines:12},ve=/^[A-Z][A-z0-9_]*$/i,be={setValue:(e,t,n)=>{if(!t)return!1;const i=t.split("."),o=i[i.length-1];let r,a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){const e=a[o];return a[o]=n,{updated:n,previous:e}}return delete a[o],!1},getValue:(e,t,n)=>{const i=t.split(".");let o,r=e;if(void 0===r)return n;for(o=0;o<i.length;++o){if(void 0===r[i[o]])return n;r=r[i[o]]}return r},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||ve.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},xe=e=>be.getValue(e,"qHyperCube.qDimensionInfo",[]),Se=e=>be.getValue(e,"qHyperCube.qMeasureInfo",[]),Me=e=>be.getValue(e,"barGrouping.grouping"),Ce={continuous:(e,t=!1)=>!!ye.canBeContinuous(e)&&(be.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!xe(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===Me(e)&&(xe(e).length>1||Se(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&xe(e).length>1&&1===Se(e).length},groupedByMeasure(e){return this.grouped(e)&&1===xe(e).length&&Se(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==Me(e)||this.continuous(e))&&(xe(e).length>1||Se(e).length>1)},stackedByDimension(e){return this.stacked(e)&&xe(e).length>1&&1===Se(e).length},stackedByMeasure(e){return this.stacked(e)&&1===xe(e).length&&Se(e).length>1},simple:e=>0===xe(e).length||1===xe(e).length&&1===Se(e).length,snapshot:e=>!!be.getValue(e,"snapshotData")};function we(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const qe=e=>{throw e.isHandled=!0,e};const ke={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?ke.getVerticalDock(t):n?ke.getOppositeDock(ke.getHorizontalDock(t)):ke.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n};var Te=(e,t)=>{if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};const Ee={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),i=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,i=i?i.length:0;const o=t+n+i;return{latin:e.length-o,cjk:o}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const i={latin:0,cjk:0};let o;void 0===t?e.forEach((e=>{o=Ee.getCharacterRatios(e[n]),i.latin+=o.latin,i.cjk+=o.cjk})):e.forEach((e=>{o=Ee.getCharacterRatios(e[t][n]),i.latin+=o.latin,i.cjk+=o.cjk}));const r=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/r,i.cjkRatio=i.cjk/r,i},getAdjustedMaxGlyphCount(e,t,n,i="qText"){const o=Ee.getTotalCharacterRatios(t,n,i),r=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(Ee.stringWidthOverMWidth(r)+1.0909090909090908*a)}},De="#la-vie-tooltip";function Ne(){if(!document.querySelector(De)){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Le({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){Ne()},beforeUpdate(){Ne()},destroyed(){!function(){const e=document.querySelector(De);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(De),content:({h:e,data:t,style:n})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:n}){return e.map((e=>{const i={style:{...n.cell||{},...e.style||{}},class:e.class};return e.colspan&&(i.colspan=e.colspan),t("td",i,e.content)}))}(t,{h:e,style:n})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const Oe=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ae=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Pe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Oe.test(e),isRtlChar:e=>Ae.test(e)||Ie.test(e),detectTextDirection(e){const t=e?e.length:0;let n,i;for(n=0;n<t;n++){if(i=e[n],Pe.isLtrChar(i))return"ltr";if(Pe.isRtlChar(i))return"rtl"}return"ltr"}},Re={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const i=t.data,o=e.resources.formatter,r=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&i.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(i.fillTooltip.value):i.fillTooltip.label?i.fillTooltip.label:i.fillTooltip.value,!n.coloring.label){const e=r(i.fillTooltip.source.key).field(i.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===i._fillColor?Re.getNodeFillColor(t):i._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=Pe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=Pe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Pe.detectTextDirection(i)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const i=Pe.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],r=Pe.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:i}},{content:n?[t.color.value,Re.getColorSymbol(e,t)]:[Re.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:r,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,i,o=!1){const r=Pe.detectTextDirection(e.label),a=i?[":",e.label]:[e.label,":"],s=Pe.detectTextDirection(e.value);let l;return l=o?i?[e.value,Re.getColorSymbol(t,n)]:[Re.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":i?"right":"left",direction:r}},{content:l,style:{"text-align":i?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ze(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Fe(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function je(){}var He=.7,Be=1/He,_e="\\s*([+-]?\\d+)\\s*",Ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$e=/^#([0-9a-f]{3,8})$/,We=new RegExp(`^rgb\\(${_e},${_e},${_e}\\)$`),Ke=new RegExp(`^rgb\\(${Ue},${Ue},${Ue}\\)$`),Ge=new RegExp(`^rgba\\(${_e},${_e},${_e},${Ve}\\)$`),Ye=new RegExp(`^rgba\\(${Ue},${Ue},${Ue},${Ve}\\)$`),Xe=new RegExp(`^hsl\\(${Ve},${Ue},${Ue}\\)$`),Je=new RegExp(`^hsla\\(${Ve},${Ue},${Ue},${Ve}\\)$`),Ze={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 Qe(){return this.rgb().formatHex()}function et(){return this.rgb().formatRgb()}function tt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?nt(t):3===n?new rt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?it(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?it(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=We.exec(e))?new rt(t[1],t[2],t[3],1):(t=Ke.exec(e))?new rt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ge.exec(e))?it(t[1],t[2],t[3],t[4]):(t=Ye.exec(e))?it(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xe.exec(e))?dt(t[1],t[2]/100,t[3]/100,1):(t=Je.exec(e))?dt(t[1],t[2]/100,t[3]/100,t[4]):Ze.hasOwnProperty(e)?nt(Ze[e]):"transparent"===e?new rt(NaN,NaN,NaN,0):null}function nt(e){return new rt(e>>16&255,e>>8&255,255&e,1)}function it(e,t,n,i){return i<=0&&(e=t=n=NaN),new rt(e,t,n,i)}function ot(e){return e instanceof je||(e=tt(e)),e?new rt((e=e.rgb()).r,e.g,e.b,e.opacity):new rt}function rt(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function at(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}`}function st(){const e=lt(this.opacity);return`${1===e?"rgb(":"rgba("}${ut(this.r)}, ${ut(this.g)}, ${ut(this.b)}${1===e?")":`, ${e})`}`}function lt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ut(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ct(e){return((e=ut(e))<16?"0":"")+e.toString(16)}function dt(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ft(e,t,n,i)}function mt(e){if(e instanceof ft)return new ft(e.h,e.s,e.l,e.opacity);if(e instanceof je||(e=tt(e)),!e)return new ft;if(e instanceof ft)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,l=(r+o)/2;return s?(a=t===r?(n-i)/s+6*(n<i):n===r?(i-t)/s+2:(t-n)/s+4,s/=l<.5?r+o:2-r-o,a*=60):s=l>0&&l<1?0:a,new ft(a,s,l,e.opacity)}function ft(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function ht(e){return(e=(e||0)%360)<0?e+360:e}function pt(e){return Math.max(0,Math.min(1,e||0))}function gt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ze(je,tt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qe,formatHex:Qe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mt(this).formatHsl()},formatRgb:et,toString:et}),ze(rt,(function(e,t,n,i){return 1===arguments.length?ot(e):new rt(e,t,n,null==i?1:i)}),Fe(je,{brighter(e){return e=null==e?Be:Math.pow(Be,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?He:Math.pow(He,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rt(ut(this.r),ut(this.g),ut(this.b),lt(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:at,formatHex:at,formatHex8:function(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}${ct(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:st,toString:st})),ze(ft,(function(e,t,n,i){return 1===arguments.length?mt(e):new ft(e,t,n,null==i?1:i)}),Fe(je,{brighter(e){return e=null==e?Be:Math.pow(Be,e),new ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?He:Math.pow(He,e),new ft(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new rt(gt(e>=240?e-240:e+120,o,i),gt(e,o,i),gt(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new ft(ht(this.h),pt(this.s),pt(this.l),lt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lt(this.opacity);return`${1===e?"hsl(":"hsla("}${ht(this.h)}, ${100*pt(this.s)}%, ${100*pt(this.l)}%${1===e?")":`, ${e})`}`}}));const yt=Math.PI/180,vt=180/Math.PI,bt=.96422,xt=1,St=.82521,Mt=4/29,Ct=6/29,wt=3*Ct*Ct,qt=Ct*Ct*Ct;function kt(e){if(e instanceof Tt)return new Tt(e.l,e.a,e.b,e.opacity);if(e instanceof At)return It(e);e instanceof rt||(e=ot(e));var t,n,i=Lt(e.r),o=Lt(e.g),r=Lt(e.b),a=Et((.2225045*i+.7168786*o+.0606169*r)/xt);return i===o&&o===r?t=n=a:(t=Et((.4360747*i+.3850649*o+.1430804*r)/bt),n=Et((.0139322*i+.0971045*o+.7141733*r)/St)),new Tt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Tt(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function Et(e){return e>qt?Math.pow(e,1/3):e/wt+Mt}function Dt(e){return e>Ct?e*e*e:wt*(e-Mt)}function Nt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Lt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ot(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof At)return new At(e.h,e.c,e.l,e.opacity);if(e instanceof Tt||(e=kt(e)),0===e.a&&0===e.b)return new At(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*vt;return new At(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new At(e,t,n,null==i?1:i)}function At(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function It(e){if(isNaN(e.h))return new Tt(e.l,0,0,e.opacity);var t=e.h*yt;return new Tt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ze(Tt,(function(e,t,n,i){return 1===arguments.length?kt(e):new Tt(e,t,n,null==i?1:i)}),Fe(je,{brighter(e){return new Tt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Tt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new rt(Nt(3.1338561*(t=bt*Dt(t))-1.6168667*(e=xt*Dt(e))-.4906146*(n=St*Dt(n))),Nt(-.9787684*t+1.9161415*e+.033454*n),Nt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ze(At,Ot,Fe(je,{brighter(e){return new At(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new At(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return It(this).rgb()}}));var Pt={isDark:function(e){return Ot(e).l<70}};function Rt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function zt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ft(e){return 1===e.length&&(e=function(e){return function(t,n){return zt(e(t),n)}}(e)),{left:function(t,n,i,o){for(null==i&&(i=0),null==o&&(o=t.length);i<o;){var r=i+o>>>1;e(t[r],n)<0?i=r+1:o=r}return i},right:function(t,n,i,o){for(null==i&&(i=0),null==o&&(o=t.length);i<o;){var r=i+o>>>1;e(t[r],n)>0?o=r:i=r+1}return i}}}var jt=Ft(zt).right,Ht=Math.sqrt(50),Bt=Math.sqrt(10),_t=Math.sqrt(2);function Vt(e,t,n){var i=(t-e)/Math.max(0,n),o=Math.floor(Math.log(i)/Math.LN10),r=i/Math.pow(10,o);return o>=0?(r>=Ht?10:r>=Bt?5:r>=_t?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(r>=Ht?10:r>=Bt?5:r>=_t?2:1)}function Ut(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),r=i/o;return r>=Ht?o*=10:r>=Bt?o*=5:r>=_t&&(o*=2),t<e?-o:o}function $t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Wt="$";function Kt(){}function Gt(e,t){var n=new Kt;if(e instanceof Kt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var i,o=-1,r=e.length;if(null==t)for(;++o<r;)n.set(o,e[o]);else for(;++o<r;)n.set(t(i=e[o],o,e),i)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Yt(){}Kt.prototype=Gt.prototype={constructor:Kt,has:function(e){return Wt+e in this},get:function(e){return this[Wt+e]},set:function(e,t){return this[Wt+e]=t,this},remove:function(e){var t=Wt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Wt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Wt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Wt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Wt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Wt&&++e;return e},empty:function(){for(var e in this)if(e[0]===Wt)return!1;return!0},each:function(e){for(var t in this)t[0]===Wt&&e(this[t],t.slice(1),this)}};var Xt=Gt.prototype;Yt.prototype={constructor:Yt,has:Xt.has,add:function(e){return this[Wt+(e+="")]=e,this},remove:Xt.remove,clear:Xt.clear,values:Xt.keys,size:Xt.size,empty:Xt.empty,each:Xt.each};var Jt=Array.prototype,Zt=Jt.map,Qt=Jt.slice;function en(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tn(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function nn(){}var on=.7,rn=1/on,an="\\s*([+-]?\\d+)\\s*",sn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ln="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",un=/^#([0-9a-f]{3})$/,cn=/^#([0-9a-f]{6})$/,dn=new RegExp("^rgb\\("+[an,an,an]+"\\)$"),mn=new RegExp("^rgb\\("+[ln,ln,ln]+"\\)$"),fn=new RegExp("^rgba\\("+[an,an,an,sn]+"\\)$"),hn=new RegExp("^rgba\\("+[ln,ln,ln,sn]+"\\)$"),pn=new RegExp("^hsl\\("+[sn,ln,ln]+"\\)$"),gn=new RegExp("^hsla\\("+[sn,ln,ln,sn]+"\\)$"),yn={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 vn(e){var t;return e=(e+"").trim().toLowerCase(),(t=un.exec(e))?new Cn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=cn.exec(e))?bn(parseInt(t[1],16)):(t=dn.exec(e))?new Cn(t[1],t[2],t[3],1):(t=mn.exec(e))?new Cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=fn.exec(e))?xn(t[1],t[2],t[3],t[4]):(t=hn.exec(e))?xn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pn.exec(e))?qn(t[1],t[2]/100,t[3]/100,1):(t=gn.exec(e))?qn(t[1],t[2]/100,t[3]/100,t[4]):yn.hasOwnProperty(e)?bn(yn[e]):"transparent"===e?new Cn(NaN,NaN,NaN,0):null}function bn(e){return new Cn(e>>16&255,e>>8&255,255&e,1)}function xn(e,t,n,i){return i<=0&&(e=t=n=NaN),new Cn(e,t,n,i)}function Sn(e){return e instanceof nn||(e=vn(e)),e?new Cn((e=e.rgb()).r,e.g,e.b,e.opacity):new Cn}function Mn(e,t,n,i){return 1===arguments.length?Sn(e):new Cn(e,t,n,null==i?1:i)}function Cn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function wn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function qn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kn(e,t,n,i)}function kn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function Tn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}en(nn,vn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),en(Cn,Mn,tn(nn,{brighter:function(e){return e=null==e?rn:Math.pow(rn,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?on:Math.pow(on,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+wn(this.r)+wn(this.g)+wn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),en(kn,(function(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);if(e instanceof nn||(e=vn(e)),!e)return new kn;if(e instanceof kn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,l=(r+o)/2;return s?(a=t===r?(n-i)/s+6*(n<i):n===r?(i-t)/s+2:(t-n)/s+4,s/=l<.5?r+o:2-r-o,a*=60):s=l>0&&l<1?0:a,new kn(a,s,l,e.opacity)}(e):new kn(e,t,n,null==i?1:i)}),tn(nn,{brighter:function(e){return e=null==e?rn:Math.pow(rn,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?on:Math.pow(on,e),new kn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new Cn(Tn(e>=240?e-240:e+120,o,i),Tn(e,o,i),Tn(e<120?e+240:e-120,o,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var En=Math.PI/180,Dn=180/Math.PI,Nn=.96422,Ln=1,On=.82521,An=4/29,In=6/29,Pn=3*In*In,Rn=In*In*In;function zn(e){if(e instanceof Fn)return new Fn(e.l,e.a,e.b,e.opacity);if(e instanceof Vn){if(isNaN(e.h))return new Fn(e.l,0,0,e.opacity);var t=e.h*En;return new Fn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Cn||(e=Sn(e));var n,i,o=_n(e.r),r=_n(e.g),a=_n(e.b),s=jn((.2225045*o+.7168786*r+.0606169*a)/Ln);return o===r&&r===a?n=i=s:(n=jn((.4360747*o+.3850649*r+.1430804*a)/Nn),i=jn((.0139322*o+.0971045*r+.7141733*a)/On)),new Fn(116*s-16,500*(n-s),200*(s-i),e.opacity)}function Fn(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function jn(e){return e>Rn?Math.pow(e,1/3):e/Pn+An}function Hn(e){return e>In?e*e*e:Pn*(e-An)}function Bn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function _n(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Vn(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}en(Fn,(function(e,t,n,i){return 1===arguments.length?zn(e):new Fn(e,t,n,null==i?1:i)}),tn(nn,{brighter:function(e){return new Fn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Fn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Cn(Bn(3.1338561*(t=Nn*Hn(t))-1.6168667*(e=Ln*Hn(e))-.4906146*(n=On*Hn(n))),Bn(-.9787684*t+1.9161415*e+.033454*n),Bn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),en(Vn,(function(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof Vn)return new Vn(e.h,e.c,e.l,e.opacity);if(e instanceof Fn||(e=zn(e)),0===e.a&&0===e.b)return new Vn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Dn;return new Vn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Vn(e,t,n,null==i?1:i)}),tn(nn,{brighter:function(e){return new Vn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Vn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return zn(this).rgb()}}));var Un=-.14861,$n=1.78277,Wn=-.29227,Kn=-.90649,Gn=1.97294,Yn=Gn*Kn,Xn=Gn*$n,Jn=$n*Wn-Kn*Un;function Zn(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof Qn)return new Qn(e.h,e.s,e.l,e.opacity);e instanceof Cn||(e=Sn(e));var t=e.r/255,n=e.g/255,i=e.b/255,o=(Jn*i+Yn*t-Xn*n)/(Jn+Yn-Xn),r=i-o,a=(Gn*(n-o)-Wn*r)/Kn,s=Math.sqrt(a*a+r*r)/(Gn*o*(1-o)),l=s?Math.atan2(a,r)*Dn-120:NaN;return new Qn(l<0?l+360:l,s,o,e.opacity)}(e):new Qn(e,t,n,null==i?1:i)}function Qn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function ei(e){return function(){return e}}function ti(e,t){return function(n){return e+n*t}}function ni(e){return 1==(e=+e)?ii:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):ei(isNaN(t)?n:t)}}function ii(e,t){var n=t-e;return n?ti(e,n):ei(isNaN(e)?t:e)}en(Qn,Zn,tn(nn,{brighter:function(e){return e=null==e?rn:Math.pow(rn,e),new Qn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?on:Math.pow(on,e),new Qn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*En,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),o=Math.sin(e);return new Cn(255*(t+n*(Un*i+$n*o)),255*(t+n*(Wn*i+Kn*o)),255*(t+n*(Gn*i)),this.opacity)}}));var oi=function e(t){var n=ni(t);function i(e,t){var i=n((e=Mn(e)).r,(t=Mn(t)).r),o=n(e.g,t.g),r=n(e.b,t.b),a=ii(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=o(t),e.b=r(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function ri(e,t){var n,i=t?t.length:0,o=e?Math.min(i,e.length):0,r=new Array(o),a=new Array(i);for(n=0;n<o;++n)r[n]=mi(e[n],t[n]);for(;n<i;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=r[n](e);return a}}function ai(e,t){var n=new Date;return t-=e=+e,function(i){return n.setTime(e+t*i),n}}function si(e,t){return t-=e=+e,function(n){return e+t*n}}function li(e,t){var n,i={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=mi(e[n],t[n]):o[n]=t[n];return function(e){for(n in i)o[n]=i[n](e);return o}}var ui=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ci=new RegExp(ui.source,"g");function di(e,t){var n,i,o,r=ui.lastIndex=ci.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ui.exec(e))&&(i=ci.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:si(n,i)})),r=ci.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function mi(e,t){var n,i=typeof t;return null==t||"boolean"===i?ei(t):("number"===i?si:"string"===i?(n=vn(t))?(t=n,oi):di:t instanceof vn?oi:t instanceof Date?ai:Array.isArray(t)?ri:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?li:si)(e,t)}function fi(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function hi(e){return function t(n){function i(t,i){var o=e((t=Zn(t)).h,(i=Zn(i)).h),r=ii(t.s,i.s),a=ii(t.l,i.l),s=ii(t.opacity,i.opacity);return function(e){return t.h=o(e),t.s=r(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,i.gamma=t,i}(1)}function pi(e){return+e}hi((function(e,t){var n=t-e;return n?ti(e,n>180||n<-180?n-360*Math.round(n/360):n):ei(isNaN(e)?t:e)})),hi(ii);var gi=[0,1];function yi(e){return e}function vi(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function bi(e){var t,n=e[0],i=e[e.length-1];return n>i&&(t=n,n=i,i=t),function(e){return Math.max(n,Math.min(i,e))}}function xi(e,t,n){var i=e[0],o=e[1],r=t[0],a=t[1];return o<i?(i=vi(o,i),r=n(a,r)):(i=vi(i,o),r=n(r,a)),function(e){return r(i(e))}}function Si(e,t,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),r=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)o[a]=vi(e[a],e[a+1]),r[a]=n(t[a],t[a+1]);return function(t){var n=jt(e,t,1,i)-1;return r[n](o[n](t))}}function Mi(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ci(e,t){return function(){var e,t,n,i,o,r,a=gi,s=gi,l=mi,u=yi;function c(){return i=Math.min(a.length,s.length)>2?Si:xi,o=r=null,d}function d(t){return isNaN(t=+t)?n:(o||(o=i(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((r||(r=i(s,a.map(e),si)))(n)))},d.domain=function(e){return arguments.length?(a=Zt.call(e,pi),u===yi||(u=bi(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Qt.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Qt.call(e),l=fi,c()},d.clamp=function(e){return arguments.length?(u=e?bi(a):yi,d):u!==yi},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,i){return e=n,t=i,c()}}()(e,t)}function wi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function qi(e){return(e=wi(Math.abs(e)))?e[1]:NaN}var ki,Ti=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ei(e){return new Di(e)}function Di(e){if(!(t=Ti.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Ni(e,t){var n=wi(e,t);if(!n)return e+"";var i=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}Ei.prototype=Di.prototype,Di.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Li={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Ni(100*e,t)},r:Ni,s:function(e,t){var n=wi(e,t);if(!n)return e+"";var i=n[0],o=n[1],r=o-(ki=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+wi(e,Math.max(0,t+r-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Oi(e){return e}var Ai,Ii,Pi,Ri=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zi(e){var t,n,i=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,i){for(var o=e.length,r=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(e.substring(o-=s,o+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return r.reverse().join(n)}):Oi,o=e.currency,r=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Oi,s=e.percent||"%";function l(e){var t=(e=Ei(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,m=e.comma,f=e.precision,h=e.trim,p=e.type;"n"===p?(m=!0,p="g"):Li[p]||(null==f&&(f=12),h=!0,p="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(p)?s:"",v=Li[p],b=/[defgprs%]/.test(p);function x(e){var o,s,u,x=g,S=y;if("c"===p)S=v(e)+S,e="";else{var M=(e=+e)<0;if(e=v(Math.abs(e),f),h&&(e=function(e){e:for(var t,n=e.length,i=1,o=-1;i<n;++i)switch(e[i]){case".":o=t=i;break;case"0":0===o&&(o=i),t=i;break;default:if(o>0){if(!+e[i])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),M&&0==+e&&(M=!1),x=(M?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===p?Ri[8+ki/3]:"")+S+(M&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){S=(46===u?r+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}m&&!c&&(e=i(e,1/0));var C=x.length+e.length+S.length,w=C<d?new Array(d-C+1).join(t):"";switch(m&&c&&(e=i(w+e,w.length?d-S.length:1/0),w=""),n){case"<":e=x+e+S+w;break;case"=":e=x+w+e+S;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+S+w.slice(C);break;default:e=w+x+e+S}return a(e)}return f=null==f?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Ei(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(qi(t)/3))),o=Math.pow(10,-i),r=Ri[8+i/3];return function(e){return n(o*e)+r}}}}function Fi(e,t,n,i){var o,r=Ut(e,t,n);switch((i=Ei(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qi(t)/3)))-qi(Math.abs(e)))}(r,a))||(i.precision=o),Pi(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qi(t)-qi(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-qi(Math.abs(e)))}(r))||(i.precision=o-2*("%"===i.type))}return Ii(i)}function ji(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var i,o,r,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((i=t<e)&&(o=e,e=t,t=o),0===(a=Vt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),r=new Array(o=Math.ceil(t-e+1));++s<o;)r[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),r=new Array(o=Math.ceil(e-t+1));++s<o;)r[s]=(e-s)/a;return i&&r.reverse(),r}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return Fi(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,o=t(),r=0,a=o.length-1,s=o[r],l=o[a];return l<s&&(i=s,s=l,l=i,i=r,r=a,a=i),(i=Vt(s,l,n))>0?i=Vt(s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=Vt(s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i,n)),i>0?(o[r]=Math.floor(s/i)*i,o[a]=Math.ceil(l/i)*i,t(o)):i<0&&(o[r]=Math.ceil(s*i)/i,o[a]=Math.floor(l*i)/i,t(o)),e},e}function Hi(){var e=Ci(yi,yi);return e.copy=function(){return Mi(e,Hi())},$t.apply(e,arguments),ji(e)}Ai=zi({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Ii=Ai.format,Pi=Ai.formatPrefix;var Bi=new Date,_i=new Date;function Vi(e,t,n,i){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,i,r){var a,s=[];if(n=o.ceil(n),r=null==r?1:Math.floor(r),!(n<i&&r>0))return s;do{s.push(a=new Date(+n)),t(n,r),e(n)}while(a<n&&n<i);return s},o.filter=function(n){return Vi((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,i){return Bi.setTime(+t),_i.setTime(+i),e(Bi),e(_i),Math.floor(n(Bi,_i))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(i?function(t){return i(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Ui=Vi((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Ui.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Vi((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Ui:null},Ui.range;var $i=1e3,Wi=6e4,Ki=36e5,Gi=864e5,Yi=6048e5,Xi=Vi((function(e){e.setTime(Math.floor(e/$i)*$i)}),(function(e,t){e.setTime(+e+t*$i)}),(function(e,t){return(t-e)/$i}),(function(e){return e.getUTCSeconds()}));Xi.range;var Ji=Vi((function(e){e.setTime(Math.floor(e/Wi)*Wi)}),(function(e,t){e.setTime(+e+t*Wi)}),(function(e,t){return(t-e)/Wi}),(function(e){return e.getMinutes()}));Ji.range;var Zi=Vi((function(e){var t=e.getTimezoneOffset()*Wi%Ki;t<0&&(t+=Ki),e.setTime(Math.floor((+e-t)/Ki)*Ki+t)}),(function(e,t){e.setTime(+e+t*Ki)}),(function(e,t){return(t-e)/Ki}),(function(e){return e.getHours()}));Zi.range;var Qi=Vi((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wi)/Gi}),(function(e){return e.getDate()-1}));function eo(e){return Vi((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wi)/Yi}))}Qi.range;var to=eo(0),no=eo(1),io=eo(2),oo=eo(3),ro=eo(4),ao=eo(5),so=eo(6);to.range,no.range,io.range,oo.range,ro.range,ao.range,so.range;var lo=Vi((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));lo.range;var uo=Vi((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));uo.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Vi((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},uo.range;var co=Vi((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Wi)}),(function(e,t){return(t-e)/Wi}),(function(e){return e.getUTCMinutes()}));co.range;var mo=Vi((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Ki)}),(function(e,t){return(t-e)/Ki}),(function(e){return e.getUTCHours()}));mo.range;var fo=Vi((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Gi}),(function(e){return e.getUTCDate()-1}));function ho(e){return Vi((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Yi}))}fo.range;var po=ho(0),go=ho(1),yo=ho(2),vo=ho(3),bo=ho(4),xo=ho(5),So=ho(6);po.range,go.range,yo.range,vo.range,bo.range,xo.range,So.range;var Mo=Vi((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));Mo.range;var Co=Vi((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function wo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ko(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Co.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Vi((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},Co.range;var To,Eo,Do,No={"-":"",_:" ",0:"0"},Lo=/^\s*\d+/,Oo=/^%/,Ao=/[\\^$*+?|[\]().{}]/g;function Io(e,t,n){var i=e<0?"-":"",o=(i?-e:e)+"",r=o.length;return i+(r<n?new Array(n-r+1).join(t)+o:o)}function Po(e){return e.replace(Ao,"\\$&")}function Ro(e){return new RegExp("^(?:"+e.map(Po).join("|")+")","i")}function zo(e){for(var t={},n=-1,i=e.length;++n<i;)t[e[n].toLowerCase()]=n;return t}function Fo(e,t,n){var i=Lo.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function jo(e,t,n){var i=Lo.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ho(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function Bo(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function _o(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function Vo(e,t,n){var i=Lo.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Uo(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function $o(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Wo(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function Ko(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Go(e,t,n){var i=Lo.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Yo(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Xo(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Jo(e,t,n){var i=Lo.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function Zo(e,t,n){var i=Lo.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Qo(e,t,n){var i=Lo.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function er(e,t,n){var i=Oo.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function tr(e,t,n){var i=Lo.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function nr(e,t,n){var i=Lo.exec(t.slice(n));return i?(e.Q=1e3*+i[0],n+i[0].length):-1}function ir(e,t){return Io(e.getDate(),t,2)}function or(e,t){return Io(e.getHours(),t,2)}function rr(e,t){return Io(e.getHours()%12||12,t,2)}function ar(e,t){return Io(1+Qi.count(uo(e),e),t,3)}function sr(e,t){return Io(e.getMilliseconds(),t,3)}function lr(e,t){return sr(e,t)+"000"}function ur(e,t){return Io(e.getMonth()+1,t,2)}function cr(e,t){return Io(e.getMinutes(),t,2)}function dr(e,t){return Io(e.getSeconds(),t,2)}function mr(e){var t=e.getDay();return 0===t?7:t}function fr(e,t){return Io(to.count(uo(e),e),t,2)}function hr(e,t){var n=e.getDay();return e=n>=4||0===n?ro(e):ro.ceil(e),Io(ro.count(uo(e),e)+(4===uo(e).getDay()),t,2)}function pr(e){return e.getDay()}function gr(e,t){return Io(no.count(uo(e),e),t,2)}function yr(e,t){return Io(e.getFullYear()%100,t,2)}function vr(e,t){return Io(e.getFullYear()%1e4,t,4)}function br(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Io(t/60|0,"0",2)+Io(t%60,"0",2)}function xr(e,t){return Io(e.getUTCDate(),t,2)}function Sr(e,t){return Io(e.getUTCHours(),t,2)}function Mr(e,t){return Io(e.getUTCHours()%12||12,t,2)}function Cr(e,t){return Io(1+fo.count(Co(e),e),t,3)}function wr(e,t){return Io(e.getUTCMilliseconds(),t,3)}function qr(e,t){return wr(e,t)+"000"}function kr(e,t){return Io(e.getUTCMonth()+1,t,2)}function Tr(e,t){return Io(e.getUTCMinutes(),t,2)}function Er(e,t){return Io(e.getUTCSeconds(),t,2)}function Dr(e){var t=e.getUTCDay();return 0===t?7:t}function Nr(e,t){return Io(po.count(Co(e),e),t,2)}function Lr(e,t){var n=e.getUTCDay();return e=n>=4||0===n?bo(e):bo.ceil(e),Io(bo.count(Co(e),e)+(4===Co(e).getUTCDay()),t,2)}function Or(e){return e.getUTCDay()}function Ar(e,t){return Io(go.count(Co(e),e),t,2)}function Ir(e,t){return Io(e.getUTCFullYear()%100,t,2)}function Pr(e,t){return Io(e.getUTCFullYear()%1e4,t,4)}function Rr(){return"+0000"}function zr(){return"%"}function Fr(e){return+e}function jr(e){return Math.floor(+e/1e3)}!function(e){To=function(e){var t=e.dateTime,n=e.date,i=e.time,o=e.periods,r=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ro(o),c=zo(o),d=Ro(r),m=zo(r),f=Ro(a),h=zo(a),p=Ro(s),g=zo(s),y=Ro(l),v=zo(l),b={a:function(e){return a[e.getDay()]},A:function(e){return r[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ir,e:ir,f:lr,H:or,I:rr,j:ar,L:sr,m:ur,M:cr,p:function(e){return o[+(e.getHours()>=12)]},Q:Fr,s:jr,S:dr,u:mr,U:fr,V:hr,w:pr,W:gr,x:null,X:null,y:yr,Y:vr,Z:br,"%":zr},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return r[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:xr,e:xr,f:qr,H:Sr,I:Mr,j:Cr,L:wr,m:kr,M:Tr,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Fr,s:jr,S:Er,u:Dr,U:Nr,V:Lr,w:Or,W:Ar,x:null,X:null,y:Ir,Y:Pr,Z:Rr,"%":zr},S={a:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.w=h[i[0].toLowerCase()],n+i[0].length):-1},A:function(e,t,n){var i=d.exec(t.slice(n));return i?(e.w=m[i[0].toLowerCase()],n+i[0].length):-1},b:function(e,t,n){var i=y.exec(t.slice(n));return i?(e.m=v[i[0].toLowerCase()],n+i[0].length):-1},B:function(e,t,n){var i=p.exec(t.slice(n));return i?(e.m=g[i[0].toLowerCase()],n+i[0].length):-1},c:function(e,n,i){return w(e,t,n,i)},d:Ko,e:Ko,f:Qo,H:Yo,I:Yo,j:Go,L:Zo,m:Wo,M:Xo,p:function(e,t,n){var i=u.exec(t.slice(n));return i?(e.p=c[i[0].toLowerCase()],n+i[0].length):-1},Q:tr,s:nr,S:Jo,u:jo,U:Ho,V:Bo,w:Fo,W:_o,x:function(e,t,i){return w(e,n,t,i)},X:function(e,t,n){return w(e,i,t,n)},y:Uo,Y:Vo,Z:$o,"%":er};function M(e,t){return function(n){var i,o,r,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=No[i=e.charAt(++s)])?i=e.charAt(++s):o="e"===i?" ":"0",(r=t[i])&&(i=r(n,o)),a.push(i),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var i,o,r=ko(1900);if(w(r,e,n+="",0)!=n.length)return null;if("Q"in r)return new Date(r.Q);if("p"in r&&(r.H=r.H%12+12*r.p),"V"in r){if(r.V<1||r.V>53)return null;"w"in r||(r.w=1),"Z"in r?(o=(i=qo(ko(r.y))).getUTCDay(),i=o>4||0===o?go.ceil(i):go(i),i=fo.offset(i,7*(r.V-1)),r.y=i.getUTCFullYear(),r.m=i.getUTCMonth(),r.d=i.getUTCDate()+(r.w+6)%7):(o=(i=t(ko(r.y))).getDay(),i=o>4||0===o?no.ceil(i):no(i),i=Qi.offset(i,7*(r.V-1)),r.y=i.getFullYear(),r.m=i.getMonth(),r.d=i.getDate()+(r.w+6)%7)}else("W"in r||"U"in r)&&("w"in r||(r.w="u"in r?r.u%7:"W"in r?1:0),o="Z"in r?qo(ko(r.y)).getUTCDay():t(ko(r.y)).getDay(),r.m=0,r.d="W"in r?(r.w+6)%7+7*r.W-(o+5)%7:r.w+7*r.U-(o+6)%7);return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,qo(r)):t(r)}}function w(e,t,n,i){for(var o,r,a=0,s=t.length,l=n.length;a<s;){if(i>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(r=S[o in No?t.charAt(a++):o])||(i=r(e,n,i))<0)return-1}else if(o!=n.charCodeAt(i++))return-1}return i}return b.x=M(n,b),b.X=M(i,b),b.c=M(t,b),x.x=M(n,x),x.X=M(i,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",wo);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,qo);return t.toString=function(){return e},t}}}(e),To.format,To.parse,Eo=To.utcFormat,Do=To.utcParse}({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"]});var Hr="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||Eo(Hr),+new Date("2000-01-01T00:00:00.000Z")||Do(Hr);var Br=1e3,_r=60*Br,Vr=60*_r,Ur=24*Vr,$r=7*Ur,Wr=30*Ur,Kr=365*Ur;function Gr(e){return new Date(e)}function Yr(e){return e instanceof Date?+e:+new Date(+e)}function Xr(e,t,n,i,o,r,a,s,l){var u=Ci(yi,yi),c=u.invert,d=u.domain,m=l(".%L"),f=l(":%S"),h=l("%I:%M"),p=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,Br],[a,5,5*Br],[a,15,15*Br],[a,30,30*Br],[r,1,_r],[r,5,5*_r],[r,15,15*_r],[r,30,30*_r],[o,1,Vr],[o,3,3*Vr],[o,6,6*Vr],[o,12,12*Vr],[i,1,Ur],[i,2,2*Ur],[n,1,$r],[t,1,Wr],[t,3,3*Wr],[e,1,Kr]];function S(s){return(a(s)<s?m:r(s)<s?f:o(s)<s?h:i(s)<s?p:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function M(t,n,i,o){if(null==t&&(t=10),"number"==typeof t){var r=Math.abs(i-n)/t,a=Ft((function(e){return e[2]})).right(x,r);a===x.length?(o=Ut(n/Kr,i/Kr,t),t=e):a?(o=(a=x[r/x[a-1][2]<x[a][2]/r?a-1:a])[1],t=a[0]):(o=Math.max(Ut(n,i,t),1),t=s)}return null==o?t:t.every(o)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Zt.call(e,Yr)):d().map(Gr)},u.ticks=function(e,t){var n,i=d(),o=i[0],r=i[i.length-1],a=r<o;return a&&(n=o,o=r,r=n),n=(n=M(e,o,r,t))?n.range(o,r+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?S:l(t)},u.nice=function(e,t){var n=d();return(e=M(e,n[0],n[n.length-1],t))?d(function(e,t){var n,i=0,o=(e=e.slice()).length-1,r=e[i],a=e[o];return a<r&&(n=i,i=o,o=n,n=r,r=a,a=n),e[i]=t.floor(r),e[o]=t.ceil(a),e}(n,e)):u},u.copy=function(){return Mi(u,Xr(e,t,n,i,o,r,a,s,l))},u}function Jr(){return $t.apply(Xr(Co,Mo,po,fo,mo,co,Xi,Ui,Eo).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Zr={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Qr=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var ea={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:i}=this.settings.settings,[o,r]=t(),a=Math.abs(o)<1e-15,s=Math.abs(r-1)<1e-15,l=(e=>{const t=Zr[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Qr(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Qr(t.shadow.endOffset)}}})(n),u="horizontal"===n&&i,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function ta({viewState:e,viewCache:t,layoutService:n,dockService:i,rtl:o}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:o,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-i)/(o-i),(n.max-i)/(o-i)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let na;function ia(){na=na||document.createElement("canvas").getContext("2d")}const oa={measureTextWidth(e){ia();const{width:t}=na.measureText(e);return t},lineWrap(e,t,n,i){let o,r;ia();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],f=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof i&&a.length>=i)return a.slice(0,i);for(n&&(na.font=n),r=0;r<a.length;r++){for(d=a[r]||"",m=d.split(/\s+/),[f]=m,c="",o=1;o<m.length;o++)if(l=`${f} ${m[o]}`,u=oa.measureTextWidth(l),u>t&&("number"!=typeof i||i>s.length)?(s.push(f),f=m[o]):f=l,"number"==typeof i&&s.length>=i){c=m.slice(o+1).join(" ");break}"number"!=typeof i||s.length<i?s.push(f):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${f} ${c}`}return s},wordWrap(e,t,n,i,o){if(ia(),!e||!e.length)return[];n&&(na.font=n);let r=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||oa.measureTextWidth(u)<=t?r.push(u):(s=oa.splitWord(u,t,void 0,i-r.length),s.length<=1?r.push(s[0]):(l=s.pop(),r=r.concat(s),a[c+1]?oa.measureTextWidth(`${l} ${a[c+1]}`)>t&&r.length+a.length-c<=i?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return r.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),r.length>i?(r=r.splice(0,i),r[r.length-1]=oa.truncate(r[r.length-1],t,n,o).text):(u=r[r.length-1],u&&u.length>1&&oa.measureTextWidth(u)>t&&(r[r.length-1]=oa.truncate(u,t,n,o).text)),r},truncate(e,t,n,i="…"){ia();let o,r,a,s,l=e;const u=oa.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(na.font=n),e&&t){if(oa.measureTextWidth(l)>t){for(o=Math.min(c,l.length);o>0;o--)if(r=l.substring(0,o-1),a=r.trim()+i,oa.measureTextWidth(a)<=t){s=l.substring(o-1),l=a;break}o||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,i){let o;ia();let r,a=e,s="",l=[];if(oa.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/i);for(o=Math.min(e.length,u);o>0&&(a=e.substring(0,o),r=e.substring(o-1,o)," "===r?a=e.substring(0,o-1):a+="-",s=e.substring(o),!(oa.measureTextWidth(a)<=t));o--);return(!o&&!a||oa.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(oa.measureTextWidth(s)>t?(s=oa.explodeWord(s,t,n-1,i),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,i)=>(ia(),e&&t?(n&&(na.font=n),oa.explodeWord(e,t,i,Math.max(1,oa.measureTextWidth("i")))):[]),wrapText(e,t,n,i,o){let r;return Number.isNaN(t)?[e]:(r=i>1?oa.lineWrap(e,t,n,i):[e],r=oa.wordWrap(r,t,n,i,o),r)},getFontHeight:e=>(ia(),e&&(na.font=e),1.5*oa.measureTextWidth("m")),tokenize(e,t,n,i,o,r,a=1){ia(),t&&(na.font=t);const s=oa.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(r<s)return[];const m=r?Math.max(1,Math.floor(r/l)):i||1;return Array.isArray(i)?(i.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),i.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(i)||i<=0?m:Math.min(m,i)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(oa.wrapText(e,o,t,u[n])))})):d=oa.wrapText(e,o,t,u[0],n),d}},ra={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:i,rendHeight:o,flipXY:r,symbol:a}){let s="x",l="y",u=i,c=o,d=t<.5?90:-90;return r&&(s="y",l="x",u=o,c=i,d=t<.5?180:0),a(se({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},aa=se.bind(null,!0),sa={},{isArray:la}=Array;function ua(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ca(e){return void 0===e}function da(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ma(e,t){const n=t.substring(1).split("/").slice(0,-1);let i;return n.forEach(((t,o)=>{if(o===n.length)return;i=+t;const r=isNaN(i)?{}:[];e[i||t]=ca(e[i||t])?r:e[t],e=e[i||t]})),e}function fa(e,t){let n=!0;if(ua(e)&&ua(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((i=>{fa(e[i],t[i])||(n=!1)})),n);if(la(e)&&la(t)){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n+=1)if(!fa(e[n],t[n]))return!1;return!0}return e===t}sa.generate=function(e,t,n){n=n||"";let i=[];return Object.keys(t).forEach((o=>{const r=function(e){return e?aa({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;fa(r,a)||da(t,o)||(ca(a)?i.push({op:"add",path:s,value:r}):ua(r)&&ua(a)?i=i.concat(sa.generate(a,r,s)):la(r)&&la(a)?i=i.concat(function(e,t,n){let i=[];const o=e.slice();let r=-1;function a(e,t,n){if(e[n]&&ca(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(fa(t,o))return i;if(!ca(t[0])&&ca(t[0].qInfo)||0===t.length)return i.push({op:"replace",path:n,value:t}),i;for(let e=o.length-1;e>=0;e-=1)r=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===r?(i.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):i=i.concat(sa.generate(o[e],t[r],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)r=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===r?(i.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):r!==e&&(i.push({op:"move",path:`${n}/${e}`,from:`${n}/${r}`}),o.splice(e,0,o.splice(r,1)[0]));return i}(a,r,s)):i.push({op:"replace",path:`${n}/${o}`,value:r}))})),Object.keys(e).forEach((o=>{ca(t[o])&&!da(e,o)&&i.push({op:"remove",path:`${n}/${o}`})})),i},sa.apply=function(e,t){t.forEach((t=>{let n=ma(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&isNaN(+i)?n[i]:n[+i]||n;const r=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(la(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(la(o)&&la(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(ua(o)&&ua(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!da(a,e)&&delete a[e]})),aa(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){const o=ma(e,t.from);la(n)?n.splice(+i,0,o.splice(+r,1)[0]):(n[i]=o[r],delete o[r])}else"remove"===t.op&&(la(n)?n.splice(+i,1):delete n[i]);var a}))},sa.clone=function(e){return aa({},e)},sa.createPatch=function(e,t,n){const i={op:e.toLowerCase(),path:n};return"move"===i.op?i.from=t:void 0!==t&&(i.value=t),i},sa.updateObject=function(e,t){Object.keys(e).length?sa.apply(e,sa.generate(e,t)):aa(e,t)};const ha=Math.log(10);function pa(e){return 10**e}const ga={pow10:pa,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/ha,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/ha),i=e/pa(n);return t=i<=1?1:i<=2?2:i<=5?5:10,t*pa(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/ha);const i=e/pa(t);return i<1?(n=5,t--):n=i<2?1:i<5?2:5,n*pa(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return pa(Math.floor(Math.log(Math.abs(e))/ha))},getFraction(e){if(0===e)return 0;return e/pa(Math.floor(Math.log(Math.abs(e))/ha))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/ha),i=e/pa(n);return t=Math.ceil(i),7!==t&&9!==t||t++,i>1&&i<=1.5?t=1.5:i>2&&i<=2.5&&(t=2.5),t*pa(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},ya=[[2,4,6],[2,4],[3]],va=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function ba(e,t,n){const i=e?e.length:0;let o,r=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<i;o++)r=Math.min(r,e[o]/e[o-1]);void 0!==n&&(r=Math.min(r,n/e[i-1])),e.splice(0,0,r)}function xa(e,t,n){let i;const o=e?e.length:0;for(i=0;i<o;i++)ba(e[i],t,n)}!function(){let e,t;for(xa(ya,1,10),e=0;e<va.length;e++)if(va[e])for(t=0;t<va[e].length;t++)Array.isArray(va[e][t])&&xa(va[e][t])}();const Sa={isInside(e,t,n,i){if(!i)return!0;const o=e.position-e.radius,r=e.position+e.radius;return o>=t&&r<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,i=e.position<t.position?t:e;return i.position-i.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const i=Sa.findSegmentPositionMeetMin(e,t);return Sa.findSegmentPositionMeetMax({center:i,max:i+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const i=Sa.findSegmentPositionMeetMax(e,n);return Sa.findSegmentPositionMeetMin({center:i,min:i-e.radius},t)},layoutPositionFromMin(e,t,n,i=0){const o=e.length-1;let r,a,s=t;for(let t=0;t<o;t++)r=e[t],a=e[t+1],r.position=Sa.findSegmentPositionMeetMaxThenMin(r,s,(r.center+a.center-i)/2),s=r.position+r.radius+i/2;a.position=Sa.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,i=0){const o=e.length-1;let r,a,s;const l=Math.max(0,e[o].position+e[o].radius-n);if(0===l)return;let u,c=0;for(r=o;r>0&&(a=e[r],s=e[r-1],u=Math.max(0,Sa.getGap(s,a)-i),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));r--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,r=0;r<=o;r++)a=e[r],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,i=0){const o=e.length-1;if(!(o<0))if(0!==o)Sa.layoutPositionFromMin(e,t,n,i),Sa.adjustPositionFromMax(e,t,n,i);else{const i=e[0];i.position=Sa.findSegmentPositionMeetMaxThenMin(i,t,n)}}},Ma=(e,t,n,i=1)=>{const o=e.bandwidth();return n?"start"===t?o:"end"===t?o*(1-i):o*(2-i)/2:"start"===t?0:"end"===t?o*i:o*i/2},Ca=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,wa=e=>e.filter(Ca),qa=(e,t)=>wa(be.getValue(e,t,[])),ka=e=>Ca(e)&&(!1!==e.showValue||!1!==e.showLabel),Ta=e=>e.filter(ka),Ea=(e,t)=>Ta(be.getValue(e,t,[])),Da=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,Na=(e,t,n)=>{const{dimensionRefLineInfo:i}=t;if(i[e])return i[e][n]},La=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:o}=n;return void 0!==i&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<i},Oa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:o}=n;return void 0!==i&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=i+o},Aa=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ia=({value:e,qMax:t})=>"NaN"!==t&&e>t,Pa={isRefLineVisible:Ca,getVisibleRefLines:wa,getRefLines:qa,getMeasureRefLines:e=>qa(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:qa(e,"refLine.dimRefLines"),isRefLineLabelVisible:ka,getVisibleRefLineLabels:Ta,getRefLineLabels:Ea,getMeasureRefLineLabels:e=>Ea(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:Ea(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:i,align:o,invert:r=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=Ma(s,o,r,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!i)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=i;let u;return l=Ma(s,o,r,t),e&&e.length&&(u=(({pxScale:e,value:t,innerValues:n,invert:i,minOrder:o})=>{const r=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:i});for(let i=0;i<n.length;i++){const{id:a,order:s}=n[i],l=e([t,a]);if(void 0!==l)return l-r*(s-o)}})({pxScale:s,value:n,innerValues:e,invert:r,minOrder:a})),(void 0===u?s(n):u)+l}return l=Ma(s,o,r),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:i})=>{const{isGroupedByDimension:o}=i.meta,r={},a=be.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():be.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=s?"qData.0.qSubNodes":"qMatrix",c=be.getValue(l,u,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),m=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+m,i=t[d];r[i]||(r[i]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():o?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],i=c[t][1],o=t+m,a=n[d];r[a]?(r[a].minOrder=Math.min(r[a].minOrder,o),r[a].maxOrder=Math.max(r[a].maxOrder,o),r[a].innerValues[r[a].innerValues.length]={id:i.qElemNumber,order:o}):r[a]={id:n.qElemNumber,qText:n.qText,minOrder:o,maxOrder:o,innerValues:[{id:i.qElemNumber,order:o}]},0===t?0===o&&(r[a].isMinOrderOk=!0):a!==e&&(r[a].isMinOrderOk=!0,r[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+m,i=t[d];r[i]||(r[i]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),r},getInputValue:Da,extractInfoFromInputValue:Na,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=Da({refLineLayout:e,layoutService:n});return Na(i,t,"id")},isDiscreteMinOutOfBounds:La,isDiscreteMaxOutOfBounds:Oa,isContinuousMinOutOfBounds:Aa,isContinuousMaxOutOfBounds:Ia,isOutOfRange:({value:e,qMin:t,qMax:n})=>Aa({value:e,qMin:t})||Ia({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Oa({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&La({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Ra="…";function za(e,t,n=70){for(let i=0;i<e.length;i++){const o=e[i];o.lines=oa.tokenize(o.title,t,`${Ra} ${o.valueString}`,3,n),o.maxNumLines=o.lines.length}}function Fa({title:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:o=200}){const r=oa.tokenize(e,t,n,i,o),a=r.length;let s="";if(a){[s]=r;for(let e=1;e<a;e++)s=`${s}\n${r[e]}`}return s}function ja({oobs:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:o=200}){const r=e.map((e=>Fa({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:i,maxWidth:o}))),a=r.length;let s="";if(a){[s]=r;for(let e=1;e<a;e++)s=`${s}\n\n${r[e]}`}return s}function Ha(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ba=3,_a=2;function Va({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const i=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${i}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Ua=({label:e,dataPages:t,qMin:n,qMax:i})=>{if(void 0!==n&&void 0!==i){const{inputValue:t}=e;if(Pa.isContinuousMaxOutOfBounds({value:t,qMax:i}))return 1;if(Pa.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Pa.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Pa.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},$a={hasEngineFormat:Va,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:i,orientation:o,rtl:r,isContinuous:a,isDimension:s}){const l=Pa.getInvert({orientation:o,rtl:r,isContinuous:a}),u="S"===i.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=i.getHyperCubeValue(u),{canBeContinuous:d}=i.meta;let m,f;if(s&&d){const e=i.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,f=e.qMax}for(let o=0;o<e.length;o++){const r=e[o],{value:s,align:u,valueInfo:d}=r,h=Ua({label:r,dataPages:c,qMin:m,qMax:f});r.scaledValue=1===h?l?-.1:1.1:-1===h?l?1.1:-.1:Pa.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:i,isContinuous:a}),r.center=r.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:i,localeInfo:o}){let r;if(n)for(let n=0;n<e.length;n++){const i=e[n],{value:a,inputValue:s,inputValueLabel:l}=i;r=Va({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,i.valueString=`${Pe.lrm}(${r})${Pe.lrm}`,i.title=$a.getTitle(i)}else if(i)for(let t=0;t<e.length;t++){const n=e[t],{valueText:i,inputValue:a,inputValueLabel:s}=n;r=Va({inputValue:a,inputValueLabel:s,localeInfo:o})?s:i,n.valueString=`${Pe.lrm}(${r})${Pe.lrm}`,n.title=$a.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];r=n.valueText,n.valueString=`${Pe.lrm}(${r})${Pe.lrm}`,n.title=$a.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const i=e[n];i.totalWidth=t(i.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,i=0){const o=e.length-1;if(o<0)return;let r,a;if([r]=e,r.cMin=t,0!==o){for(let t=0;t<o;t++)r=e[t],a=e[t+1],r.cMax=(r.center+a.center-i)/2,a.cMin=r.cMax+i;a.cMax=n}else r.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const i=t-1,o=e.filter((e=>e.maxNumLines===t)),r=Math.min(n,o.length);for(let e=o.length-1;e>=o.length-r;e--)o[e].maxNumLines=i},reduceTotalMaxNumLines(e,t,n){const i=Math.floor(n/t);let o=3;do{const t=$a.getTotalNumLines(e)-i;if(t<=0)return;$a.reduceLabelsHavingMaxNumLines(e,o,t),o--}while(o>1)},reduceMaxNumLines(e,t,n=0){for(let i=0;i<e.length;i++){const o=e[i];o.maxNumLines=Math.max(1,Math.min(o.maxNumLines,Math.floor((Math.max(0,o.cMax-o.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,i){for(let o=0;o<e.length;o++){const r=e[o];r.width=Math.min(t,$a.measureLabelMaxLineWidth(r,i)),r.height=r.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const i=e[n],{center:o}=i,r=i[t],a=r/2;i.segment={center:o,range:r,min:o-a,max:o+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:i,upperLimit:o,gap:r,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:f,isContinuous:h,isDimension:p}){const g=e.map((e=>e)),y=n;$a.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:f,orientation:c,rtl:m,isContinuous:h,isDimension:p}),Ha(e,"center"),$a.addLabelsNeighborInfo(e,i,o,r),za(e,a,s),$a.reduceTotalMaxNumLines(g,l,o-(g.length-1)*r),"vertical"===c&&($a.reduceMaxNumLines(e,l,.05*r),function(e,t,n=70){for(let i=0;i<e.length;i++){const o=e[i];o.lines.length>o.maxNumLines&&(o.lines=oa.tokenize(o.title,t,`${Ra} ${o.valueString}`,o.maxNumLines,n))}}(e,a,s)),$a.addLabelsSize(e,s,l,d),$a.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:i,area:o,lineHeight:r=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=i,{minorCenter:c}=o,{fontSize:d,fontFamily:m,background:f}=t;let h=[];return e.forEach((e=>{const{lines:t}=e,i=t.length,o=t.map(((t,o)=>{const f={type:"text",text:t,title:Fa({title:e.title,font:a,ellipsis:`… ${e.valueString}`}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:u};return f[l]=c,f[s]=e.segment.position,f.y+=(o-(i-1)/2)*r,f}));e.background&&h.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:i,label:o,lineHeight:r,background:a}){const{lines:s}=o,{borderRadius:l=Ba,padding:u={}}=a,{top:c=_a,bottom:d=_a,left:m=_a,right:f=_a}=u,h=s.length,p={type:"rect",rx:l,ry:l,fill:o.background.fill,width:o.width+(m+f),height:o.height+(c+d),value:o.value,dock:i};return p[n]=e,p[t]=o.segment.position,p.x-=o.width/2+m,p.y-=h*r/2+c,p}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:r,background:f})),h=h.concat(o)})),h}};function Wa(e,t,n){let i;const o=typeof t;if("string"===o||"object"===o)i=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;i=e&&e[0]?e[0].formatter():null}return i}function Ka(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:i,top:o,bottom:r,maxLabelWidth:a}=t;let s=1;return $a.getMaxTextWidth(e)>a&&(za(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*i+o+r}(t,n):function(e,t){const{left:n,right:i,maxLabelWidth:o}=t;return Math.min(o,$a.getMaxTextWidth(e))+n+i}(t,n)}function Ga(e,t){return t?e.domain():[0,1]}function Ya(e,t,n,i="value"){let o=e.filter((e=>e[i]>=t));o=o.filter((e=>e[i]<=n));const r=e.filter((e=>e[i]<t)),a=e.filter((e=>e[i]>n));return{filteredLabels:o,minOobs:r,maxOobs:a,numMinOobs:r.length,numMaxOobs:a.length}}function Xa(e){let t,n=0;for(let i=1;i<10;i++)t=e(i),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ja(e,t){return e>9?t[1]:t[0]}function Za({alignment:e,dockValue:t,oobs:n,style:i,rect:o,symbol:r,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:m,minorAxis:f,minorDimension:h,dock:p}=s,g=o[h],y=ra.createOob({oob:ra.getDefaultSettings({size:i.size,fill:i.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:r});y.dock=p;const v=`c${m}`,b=`c${f}`,x={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0,dock:p};x[b]=g/2,x[v]=a;const S={type:"text",text:c>9?"9+":c,title:ja({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle",dock:p};return S[f]=g/2,S[m]=a,[y,x,S]}function Qa(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:oa.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const es=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var ts={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:i,localeInfo:o}=this.settings,r=!!i||n.meta.canBeContinuous,a=es(this.settings.labels),s=Wa(this.chart,this.settings.formatter,e);$a.addLabelTitles({labels:a,formatter:s,isContinuous:i,canBeContinuous:r,localeInfo:o});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:i,layoutService:o})=>{if(n){const[i,o]=Ga(t,n);return Ya(e,i,o)}if(i){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:i}=t;if("NaN"!==n&&"NaN"!==i)return Ya(e,n,i,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:i,canBeContinuous:r,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=Qa(t.label),{dock:n}=this.settings.layout;return $a.measureLabelsWidth(c,this.measureText),d=Ka(n,c,e),d}const m=Xa(this.measureText),f=l?Ja(l,m):0,h=u?Ja(u,m):0;return d=Math.max(f,h),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:i,theme:o,isContinuous:r,isDimension:a,localeInfo:s}=this.settings,l=!!r||i.meta.canBeContinuous,u=es(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,f=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),h=function(e,t,n){const i=e[t.minorDimension];return{minorSize:i,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(i-n.right-n.left)/2+n.left:(i-n.top-n.bottom)/2+n.top}}(this.rect,f,m),{orientation:p,majorDimension:g}=f,{majorSize:y}=h,{font:v,lineHeight:b,gap:x,maxLabelWidth:S}=Qa(n.label),M=Wa(this.chart,this.settings.formatter,e),C=y;$a.addLabelTitles({labels:u,formatter:M,isContinuous:r,canBeContinuous:l,localeInfo:s}),$a.calculateLabelPositions({labels:u,scale:e,size:C,layoutService:i,orientation:p,rtl:d,isContinuous:r,isDimension:a});const[w,q]=Ga(e,r),{filteredLabels:k,lowerOobs:T,upperOobs:E,lowerCircleSize:D,upperCircleSize:N,lowerOobSpace:L,upperOobSpace:O}=function({labels:e,minValue:t,maxValue:n,orientation:i,rtl:o,isContinuous:r,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=Ya(e,t,n,u),f="scaledValue"!==u&&Pa.getInvert({orientation:i,rtl:o,isContinuous:r}),h=function(e,t,n){return n?t:e}(d,c,f),p=function(e,t,n){return n?e:t}(d,c,f),g=h.length,y=p.length,v=Xa(l),b=Ja(g,v),x=Ja(y,v),S=function(e,t,n,i,o){return("vertical"===i?o.top:o.left)+(e>0?t+n:0)}(g,a.oob.size,b,i,s),M=function(e,t,n,i,o){return("vertical"===i?o.bottom:o.right)+(e>0?t+n:0)}(y,a.oob.size,x,i,s);return{filteredLabels:m,lowerOobs:h,upperOobs:p,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:M}}({labels:u,minValue:w,maxValue:q,orientation:p,rtl:d,isContinuous:r,style:n,padding:m,measureText:this.measureText,prop:r?"value":"scaledValue"}),A=L,I=y-O;Ha(T),Ha(E);const P=Za({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+D/2,areaProps:f,radius:D/2,font:v}),R=Za({alignment:1,dockValue:1,oobs:E,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+N/2),areaProps:f,radius:N/2,font:v});$a.addLabelsInfo({labels:k,scale:e,majorSize:y,lowerLimit:A,upperLimit:I,font:v,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:p,measureText:this.measureText,rtl:d,layoutService:i,isContinuous:r,isDimension:a}),Sa.layout(k.map((e=>e.segment)),A,I,n.label.gap);const z=k.filter((e=>Sa.isInside(e.segment,A,I,r)));return $a.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:f,area:h,lineHeight:b,font:v,theme:o}).concat([...P,...R])}};var ns={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function is(e){const{qHyperCube:t,...n}=e,{qAxisData:i,qDataPages:a,qStackedDataPages:s,qTreeDataPages:l,...u}=t,c=se(!0,{},{...n,qHyperCube:{...u,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:d}=ns;return d.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==o(c,e)&&r(c,e,null);else{const e=t[0],n=t[1].split("].")[1];o(c,e,[]).forEach((e=>{void 0!==o(e,n)&&r(e,n,null)}))}})),c}var os={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:i}){return o=>{if(e||t||n){var r;if("line"===o.type)return null!==(r=o.tickValue)&&void 0!==r?r:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(i){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?`${o.data.group.value} `:""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:i,dock:o}){return({currentNodes:r,currentRect:a,previousRect:s})=>{const l=a.x-s.x,u=a.y-s.y,c=a.width-s.width,d=a.height-s.height;e?("left"===o&&r.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==o&&"right"!==o||r.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||r.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?r.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||i?r.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):r.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,o=t.y-n.y;0===i&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=i,e.y-=o):e.transform=`translate(${-i}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x;0===t.y-n.y&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,o=t.y-n.y;0===i&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=i):(e.x-=i,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,o=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=i,e.x2-=i);else{const t="x"===e.major.p?i/e.major.size:o/e.major.size,n="y"===e.minor.p?o/e.minor.size:i/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x;0===t.y-n.y&&0===i||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,o=t.y-n.y;0===i&&0===o||e.forEach((e=>{e.cx-=i,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,o=t.y-n.y,r=t.width-n.width,a=t.height-n.height;let s=-i,l=-o;e.forEach((e=>{switch(e.dock){case"right":i>0&&(s=t.width);break;case"left":r<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=is(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=is(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:rs,extractInfoFromInputValue:as,resolveValue:ss}=Pa;var ls={resolveValue:ss,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const i=rs({refLineLayout:e,layoutService:n});return as(i,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const i=rs({refLineLayout:e,layoutService:n});return as(i,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:i}=t,{canBeContinuous:o}=n.meta,r=rs({refLineLayout:e,layoutService:n});return i[r]&&o?i[r].qText:r},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=rs({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[i]}};const us=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:i,colorModel:o,dockService:r,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,f;const h={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(f=t.style)||void 0===f?void 0:f.lineType,stroke:o.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||i.meta.isContinuous?(h.scale=s,h.value=t.refLineExpr.value):(h.valueInfo=ls.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:i}),h.value=()=>{var e;const o=Pa.getScaledPosition({scale:a.scale(s),value:ls.resolveValue({refLineLayout:t,refLineModel:n,layoutService:i}),valueInfo:h.valueInfo,size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===r.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:i,isContinuous:d});return Number.isNaN(o)?void 0:o}),h};function cs({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,dockService:o,animationsEnabled:r,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:f}){const h=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!h.length)return!1;const p={key:c,type:"ref-line",layout:{minimumLayoutMode:f},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:r,trackBy:os.lines.trackBy,compensateForLayoutChanges:os.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==o.meta.major.orientation||!u),y=!e||n.meta.isContinuous;return h.forEach((r=>{p.lines[l].push(us({isDimension:e,refLineLayout:r,refLineModel:t,layoutService:n,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))})),p}const ds={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}},ms=({isDimension:e,layoutService:t,animationsEnabled:n,style:i,labels:o,scale:r,formatter:a,dock:s,key:l,rtl:u,theme:c,isContinuous:d,localeInfo:m})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:o,formatter:a,scale:r,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:i.referenceLine.label.name.fontFamily,fontSize:i.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:u?2:4,right:u?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:i.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:i.referenceLine.outOfBounds.fontFamily,fontSize:i.referenceLine.outOfBounds.fontSize,fill:i.referenceLine.outOfBounds.color,background:{fill:i.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:os.refLineLabels.trackBy,compensateForLayoutChanges:os.refLineLabels.compensateForLayoutChanges}}),fs=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:o,theme:r,isContinuous:a})=>{const s=i.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?r.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=o,l.value=e.refLineExpr.value):(l.value=()=>ls.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>ls.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>ls.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l};function hs({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,animationsEnabled:o,dock:r,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:f}){const h=e?t.dimensionRefLineLabels:f?t.query.getRefLineLabels(f):t.measureRefLineLabels;if(!h.length)return[];const p=[],g=!e||n.meta.isContinuous,y=h.map((e=>fs({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:a,theme:u,isContinuous:g})));return p.push(ms({isDimension:e,rtl:d,style:se(!0,ds,s),dock:r,key:m,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:o,theme:u,isContinuous:g,localeInfo:c})),p}const ps={combineBounds(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE;return e.forEach((e=>{e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),i=Math.min(i,e.y,e.y+e.height),o=Math.max(o,e.y,e.y+e.height))})),{x:t,y:i,width:n-t,height:o-i}}},gs=(e,t,n)=>{if(!e)return Promise.resolve();let i=sa.generate(t,n);return se(!0,t,n),i&&i.length?(i=i.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(i,!0)):Promise.resolve()},ys=e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))};function vs(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}const bs={ref:null,refFn:e=>{var t;const n=null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.findIndex((e=>{var t;return"colorByExpression"===(null===(t=e.qAttributeExpressions)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.id)}));return`qHyperCubeDef.qMeasures.${-1===n?0:n}.qAttributeExpressions.0.qExpression`},change(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t||null===(t=t.qMeasures)||void 0===t?void 0:t.findIndex((e=>{var t;return"colorByExpression"===(null===(t=e.qAttributeExpressions)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.id)})),i=be.getValue(e,`qHyperCubeDef.qMeasures.${-1===n?0:n}.qAttributeExpressions.0`),o=be.getValue(e,"color");i&&(i.id="colorByExpression",o&&(o.colorExpression=i.qExpression))}},xs={d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"},Ss={d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"},Ms={d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"},Cs={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},ws={d:"m 13.914 4.5 l -7.707 7.707 L 2 8 l 0.707 -0.707 l 3.5 3.5 l 7 -7 Z"},qs={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},ks={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},Ts={single:"N",drillDown:"H",cyclic:"C"},Es={N:void 0,H:xs,C:Ms},Ds=(e,t)=>{switch(e.qGrouping){case Ts.single:return;case Ts.drillDown:return{path:xs,tooltip:"Tooltip.dimensions.drilldown",onClick:void 0};case Ts.cyclic:return{path:Ss,tooltip:"Tooltip.dimensions.cyclic",onClick:()=>{t.getDimension(e.qLibraryId).then((e=>{e.stepCycle(1)})).catch((()=>null))}};default:return}};function Ns(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let i=sa.generate(t,n);i&&i.length&&(i=i.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(i,!0))}))}function Ls(e,t,n,i,o,r){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[i].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[i].findIndex((e=>e.qDef.cId===n)),u=se(!0,{},a),c=u.qHyperCubeDef[i][s],d=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[i][l];d.qAttributeDimensions=c.qAttributeDimensions,c.qAttributeDimensions=[],r||(d.qAttributeExpressions=c.qAttributeExpressions,c.qAttributeExpressions=[]),u.qHyperCubeDef[i][s]=d,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[i][l]=c,o&&o({oldItem:c,newItem:d,oldProperties:a,newProperties:u,model:e}),Ns(e,a,u)}))}function Os(e){return e.qGrouping===Ts.single?e.qFallbackTitle||"":e.title||""}const As=(e,t,n,i,o,r="/qHyperCubeDef")=>{const a=!o;switch(e.qGrouping){case Ts.drillDown:{const n=e.qGroupFallbackTitles.slice(0,e.qGroupPos+1),o=a?[]:n.map(((n,o)=>({id:`${e.cId}-${o}`,title:n,selected:e.qGroupPos===o,onSelect:()=>{t.drillUp(r,i,e.qGroupPos-o)}})));return{id:e.cId,icon:a?void 0:xs,groupItem:!a,title:e.title,selected:a,children:o}}case Ts.cyclic:{const t=a?[]:e.qGroupFallbackTitles.map(((t,i)=>({id:`${e.cId}-${i}`,title:t,selected:e.qGroupPos===i,onSelect:()=>{n.getDimension(e.qLibraryId).then((e=>{e.setActiveField(i)}))}})));return{id:e.cId,icon:a?void 0:Ms,groupItem:!a,title:e.title,selected:a,children:t}}default:return{selected:!0,id:e.cId,title:Os(e)}}},Is=(e,t)=>{const n=[],i=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&i.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(i).then((()=>n))},Ps=async(e,t,n,i,o,r)=>{const a=await Is(e,n),s=!r,l=n.filter((e=>!a.includes(e.qDef.cId))),u=await Promise.all(l.map((async n=>{const r=await((e,t)=>{if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null))})(n,e),a=await function(e,t,n,i){if(e.qLibraryId)return i?i.qDim.qGrouping===Ts.single&&i.qDim.qLabelExpression?Promise.resolve(i.qDim.qLabelExpression):Promise.resolve(i.qDim.title):Promise.resolve(n.get("Object.ErrorMessage.MissingDimension"));const o=e.qDef.qLabelExpression;if(o)return t.evaluate(o);const r=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(r)}(n,e,i,r),l=(null==r?void 0:r.qDim.qGrouping)||n.qDef.qGrouping,u=s?void 0:Es[l],c=!s&&l!==Ts.single;return{id:n.qDef.cId,icon:u,groupItem:c,selected:!1,title:a,onSelect(e){Ls(t,e,n.qDef.cId,"qDimensions",o)}}})));return u};function Rs({column:e,dir:t,dock:n,altList:i,model:o,translator:r,app:a,onChange:s,activeInfo:l,allowChangeOfAlternatives:u,isCyclicFFEnabled:c}){const d=l.qGrouping===Ts.single;return 0===i.length&&d?null:{dir:t,dock:n,getPopoverOptions:async()=>{const t=As(l,o,a,e,c),n=u?await Ps(a,o,i,r,s,c):[];return!d&&c||0!==n.length?[t,...n]:[]}}}function zs(e,t,n,i,o="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===Ts.drillDown?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:Ds(e,i),index:t,locked:!!e.qLocked,text:e.qGrouping===Ts.single?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:Os(e),drillUp(e){n.drillUp(o,t,e)},id:e.cId}}function Fs({activeInfo:e,altList:t,app:n,dir:i,dock:o,model:r,onChange:a,skipAttributeExpressions:s,translator:l,allowChangeOfAlternatives:u}){return 0===t.length?null:{dir:i,dock:o,getPopoverOptions:async()=>{const i=[{id:e.cId,title:e.qFallbackTitle,selected:!0,onSelect:()=>{}}],o=await Is(n,t),c=t.filter((e=>!o.includes(e.qDef.cId))),d=u?await Promise.all(c.map((async e=>{const t=await function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const i=e.qDef.qLabelExpression;if(i)return t.evaluate(i);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,n,l);return{id:e.qDef.cId,selected:!1,title:t,onSelect(t){Ls(r,t,e.qDef.cId,"qMeasures",a,s)}}}))):[];return 0===d.length?[]:[...i,...d]}}}function js(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Hs.apply(this,arguments)}var Bs={exports:{}};function _s(){}function Vs(){}Vs.resetWarningCache=_s;Bs.exports=function(){function e(e,t,n,i,o,r){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Vs,resetWarningCache:_s};return n.PropTypes=n,n}();var Us=J(Bs.exports),$s={black:"#000",white:"#fff"},Ws={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ks={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Gs={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Ys={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Xs={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Js={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Zs={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Qs.apply(this,arguments)}function el(e){return el="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},el(e)}function tl(e){return e&&"object"===el(e)&&e.constructor===Object}function nl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Qs({},e):e;return tl(e)&&tl(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(tl(t[o])&&o in e?i[o]=nl(e[o],t[o],n):i[o]=t[o])})),i}function il(e){var t=function(e,t){if("object"!==el(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==el(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===el(t)?t:String(t)}function ol(e,t,n){return(t=il(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rl(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function al(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function sl(e){if(e.type)return e;if("#"===e.charAt(0))return sl(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(rl(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function ll(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function ul(e){var t="hsl"===(e=sl(e)).type?sl(function(e){var t=(e=sl(e)).values,n=t[0],i=t[1]/100,o=t[2]/100,r=i*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-r*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),ll({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function cl(e,t){return e=sl(e),t=al(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,ll(e)}function dl(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}function ml(e,t){if(null==e)return{};var n,i,o=dl(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fl=["xs","sm","md","lg","xl"];function hl(e,t,n){var i;return Qs({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Qs({paddingLeft:t(2),paddingRight:t(2)},n,ol({},e.up("sm"),Qs({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},ol(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),ol(i,e.up("sm"),{minHeight:64}),i)},n)}var pl={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:$s.white,default:Zs[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},gl={text:{primary:$s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Zs[800],default:"#303030"},action:{active:$s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function yl(e,t,n,i){var o=i.light||i,r=i.dark||1.5*i;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=sl(e),t=al(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return ll(e)}(e.main,o):"dark"===t&&(e.dark=function(e,t){if(e=sl(e),t=al(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return ll(e)}(e.main,r)))}function vl(e){var t=e.primary,n=void 0===t?{light:Gs[300],main:Gs[500],dark:Gs[700]}:t,i=e.secondary,o=void 0===i?{light:Ks.A200,main:Ks.A400,dark:Ks.A700}:i,r=e.error,a=void 0===r?{light:Ws[300],main:Ws[500],dark:Ws[700]}:r,s=e.warning,l=void 0===s?{light:Js[300],main:Js[500],dark:Js[700]}:s,u=e.info,c=void 0===u?{light:Ys[300],main:Ys[500],dark:Ys[700]}:u,d=e.success,m=void 0===d?{light:Xs[300],main:Xs[500],dark:Xs[700]}:d,f=e.type,h=void 0===f?"light":f,p=e.contrastThreshold,g=void 0===p?3:p,y=e.tonalOffset,v=void 0===y?.2:y,b=ml(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=ul(e),i=ul(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}(e,gl.text.primary)>=g?gl.text.primary:pl.text.primary;return t}var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Qs({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(rl(4,t));if("string"!=typeof e.main)throw new Error(rl(5,JSON.stringify(e.main)));return yl(e,"light",n,v),yl(e,"dark",i,v),e.contrastText||(e.contrastText=x(e.main)),e},M={dark:gl,light:pl};return nl(Qs({common:$s,type:h,primary:S(n),secondary:S(o,"A400","A200","A700"),error:S(a),warning:S(l),info:S(c),success:S(m),grey:Zs,contrastThreshold:g,getContrastText:x,augmentColor:S,tonalOffset:v},M[h]),b)}function bl(e){return Math.round(1e5*e)/1e5}function xl(e){return bl(e)}var Sl={textTransform:"uppercase"},Ml='"Roboto", "Helvetica", "Arial", sans-serif';function Cl(e,t){var n="function"==typeof t?t(e):t,i=n.fontFamily,o=void 0===i?Ml:i,r=n.fontSize,a=void 0===r?14:r,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,m=void 0===d?500:d,f=n.fontWeightBold,h=void 0===f?700:f,p=n.htmlFontSize,g=void 0===p?16:p,y=n.allVariants,v=n.pxToRem,b=ml(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=v||function(e){return"".concat(e/g*x,"rem")},M=function(e,t,n,i,r){return Qs({fontFamily:o,fontWeight:e,fontSize:S(t),lineHeight:n},o===Ml?{letterSpacing:"".concat(bl(i/t),"em")}:{},r,y)},C={h1:M(l,96,1.167,-1.5),h2:M(l,60,1.2,-.5),h3:M(c,48,1.167,0),h4:M(c,34,1.235,.25),h5:M(c,24,1.334,0),h6:M(m,20,1.6,.15),subtitle1:M(c,16,1.75,.15),subtitle2:M(m,14,1.57,.1),body1:M(c,16,1.5,.15),body2:M(c,14,1.43,.15),button:M(m,14,1.75,.4,Sl),caption:M(c,12,1.66,.4),overline:M(c,12,2.66,1,Sl)};return nl(Qs({htmlFontSize:g,pxToRem:S,round:xl,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:m,fontWeightBold:h},C),b,{clone:!1})}function wl(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var ql=["none",wl(0,2,1,-1,0,1,1,0,0,1,3,0),wl(0,3,1,-2,0,2,2,0,0,1,5,0),wl(0,3,3,-2,0,3,4,0,0,1,8,0),wl(0,2,4,-1,0,4,5,0,0,1,10,0),wl(0,3,5,-1,0,5,8,0,0,1,14,0),wl(0,3,5,-1,0,6,10,0,0,1,18,0),wl(0,4,5,-2,0,7,10,1,0,2,16,1),wl(0,5,5,-3,0,8,10,1,0,3,14,2),wl(0,5,6,-3,0,9,12,1,0,3,16,2),wl(0,6,6,-3,0,10,14,1,0,4,18,3),wl(0,6,7,-4,0,11,15,1,0,4,20,3),wl(0,7,8,-4,0,12,17,2,0,5,22,4),wl(0,7,8,-4,0,13,19,2,0,5,24,4),wl(0,7,9,-4,0,14,21,2,0,5,26,4),wl(0,8,9,-5,0,15,22,2,0,6,28,5),wl(0,8,10,-5,0,16,24,2,0,6,30,5),wl(0,8,11,-5,0,17,26,2,0,6,32,5),wl(0,9,11,-5,0,18,28,2,0,7,34,6),wl(0,9,12,-6,0,19,29,2,0,7,36,6),wl(0,10,13,-6,0,20,31,3,0,8,38,7),wl(0,10,13,-6,0,21,33,3,0,8,40,7),wl(0,10,14,-6,0,22,35,3,0,8,42,7),wl(0,11,14,-7,0,23,36,3,0,9,44,8),wl(0,11,15,-7,0,24,38,3,0,9,46,8)],kl={borderRadius:4};function Tl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function El(e,t){if(e){if("string"==typeof e)return Tl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tl(e,t):void 0}}function Dl(e){return function(e){if(Array.isArray(e))return Tl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||El(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||El(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ll(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Ol={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Al={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Il(e){return"".concat(Math.round(e),"ms")}var Pl={easing:Ol,duration:Al,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,i=void 0===n?Al.standard:n,o=t.easing,r=void 0===o?Ol.easeInOut:o,a=t.delay,s=void 0===a?0:a;return ml(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof i?i:Il(i)," ").concat(r," ").concat("string"==typeof s?s:Il(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Rl={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function zl(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,i=e.mixins,o=void 0===i?{}:i,r=e.palette,a=void 0===r?{}:r,s=e.spacing,l=e.typography,u=void 0===l?{}:l,c=ml(e,["breakpoints","mixins","palette","spacing","typography"]),d=vl(a),m=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,i=e.unit,o=void 0===i?"px":i,r=e.step,a=void 0===r?5:r,s=ml(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var i=fl.indexOf(t);return i===fl.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==i&&"number"==typeof n[fl[i+1]]?n[fl[i+1]]:t)-a/100).concat(o,")")}return Qs({keys:fl,values:n,up:l,down:function(e){var t=fl.indexOf(e)+1,i=n[fl[t]];return t===fl.length?l("xs"):"@media (max-width:".concat(("number"==typeof i&&t>0?i:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}(n),f=Ll(s),h=nl({breakpoints:m,direction:"ltr",mixins:hl(m,f,o),overrides:{},palette:d,props:{},shadows:ql,typography:Cl(d,u),spacing:f,shape:kl,transitions:Pl,zIndex:Rl},c),p=arguments.length,g=new Array(p>1?p-1:0),y=1;y<p;y++)g[y-1]=arguments[y];return h=g.reduce((function(e,t){return nl(e,t)}),h)}var Fl="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",jl=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Hl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,o=void 0===i?"jss":i,r=e.seed,a=void 0===r?"":r,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==jl.indexOf(e.key))return"Mui-".concat(e.key);var r="".concat(s).concat(i,"-").concat(e.key);return t.options.theme[Fl]&&""===a?"".concat(r,"-").concat(u()):r}return"".concat(s).concat(o).concat(u())}}function Bl(e){var t=e.theme,n=e.name,i=e.props;if(!t||!t.props||!t.props[n])return i;var o,r=t.props[n];for(o in r)void 0===i[o]&&(i[o]=r[o]);return i}var _l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vl="object"===("undefined"==typeof window?"undefined":_l(window))&&"object"===("undefined"==typeof document?"undefined":_l(document))&&9===document.nodeType;function Ul(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,il(i.key),i)}}function $l(e,t,n){return t&&Ul(e.prototype,t),n&&Ul(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wl(e,t){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wl(e,t)}function Kl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wl(e,t)}function Gl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Yl={}.constructor;function Xl(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Xl);if(e.constructor!==Yl)return e;var t={};for(var n in e)t[n]=Xl(e[n]);return t}function Jl(e,t,n){void 0===e&&(e="unnamed");var i=n.jss,o=Xl(t),r=i.plugins.onCreateRule(e,o,n);return r||(e[0],null)}var Zl=function(e,t){for(var n="",i=0;i<e.length&&"!important"!==e[i];i++)n&&(n+=t),n+=e[i];return n},Ql=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Zl(e[n]," ");else t=Zl(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function eu(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function tu(e,t){for(var n="",i=0;i<t;i++)n+=" ";return n+e}function nu(e,t,n){void 0===n&&(n={});var i="";if(!t)return i;var o=n.indent,r=void 0===o?0:o,a=t.fallbacks;!1===n.format&&(r=-1/0);var s=eu(n),l=s.linebreak,u=s.space;if(e&&r++,a)if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];for(var m in d){var f=d[m];null!=f&&(i&&(i+=l),i+=tu(m+":"+u+Ql(f)+";",r))}}else for(var h in a){var p=a[h];null!=p&&(i&&(i+=l),i+=tu(h+":"+u+Ql(p)+";",r))}for(var g in t){var y=t[g];null!=y&&"fallbacks"!==g&&(i&&(i+=l),i+=tu(g+":"+u+Ql(y)+";",r))}return(i||n.allowEmpty)&&e?(i&&(i=""+l+i+l),tu(""+e+u+"{"+i,--r)+tu("}",r)):i}var iu=/([[\].#*$><+~=|^:(),"'`\s])/g,ou="undefined"!=typeof CSS&&CSS.escape,ru=function(e){return ou?ou(e):e.replace(iu,"\\$1")},au=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var i=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,i?this.renderer=i.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var i=!!n&&n.force;if(!i&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var r=null==o||!1===o,a=e in this.style;if(r&&!a&&!i)return this;var s=r&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),su=function(e){function t(t,n,i){var o;o=e.call(this,t,n,i)||this;var r=i.selector,a=i.scoped,s=i.sheet,l=i.generateId;return r?o.selectorText=r:!1!==a&&(o.id=l(Gl(Gl(o)),s),o.selectorText="."+ru(o.id)),o}Kl(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var i in n)t.setProperty(e,i,n[i])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Ql(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Qs({},e,{allowEmpty:!0}):e;return nu(this.selectorText,this.style,n)},$l(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(au),lu={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new su(e,t,n)}},uu={indent:1,children:!0},cu=/@([\w-]+)/,du=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var i=e.match(cu);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Pu(Qs({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),i):null},t.replaceRule=function(e,t,n){var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.toString=function(e){void 0===e&&(e=uu);var t=eu(e).linebreak;if(null==e.indent&&(e.indent=uu.indent),null==e.children&&(e.children=uu.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),mu=/@container|@media|@supports\s+/,fu={onCreateRule:function(e,t,n){return mu.test(e)?new du(e,t,n):null}},hu={indent:1,children:!0},pu=/@keyframes\s+([\w-]+)/,gu=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=e.match(pu);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,r=n.sheet,a=n.generateId;for(var s in this.id=!1===o?this.name:ru(a(this,r)),this.rules=new Pu(Qs({},n,{parent:this})),t)this.rules.add(s,t[s],Qs({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=hu);var t=eu(e).linebreak;if(null==e.indent&&(e.indent=hu.indent),null==e.children&&(e.children=hu.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),yu=/@keyframes\s+/,vu=/\$([\w-]+)/g,bu=function(e,t){return"string"==typeof e?e.replace(vu,(function(e,n){return n in t?t[n]:e})):e},xu=function(e,t,n){var i=e[t],o=bu(i,n);o!==i&&(e[t]=o)},Su={onCreateRule:function(e,t,n){return"string"==typeof e&&yu.test(e)?new gu(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&xu(e,"animation-name",n.keyframes),"animation"in e&&xu(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var i=n.options.sheet;if(!i)return e;switch(t){case"animation":case"animation-name":return bu(e,i.keyframes);default:return e}}},Mu=function(e){function t(){return e.apply(this,arguments)||this}return Kl(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Qs({},e,{allowEmpty:!0}):e;return nu(this.key,this.style,n)},t}(au),Cu={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new Mu(e,t,n):null}},wu=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=eu(e).linebreak;if(Array.isArray(this.style)){for(var n="",i=0;i<this.style.length;i++)n+=nu(this.at,this.style[i]),this.style[i+1]&&(n+=t);return n}return nu(this.at,this.style,e)},e}(),qu=/@font-face/,ku={onCreateRule:function(e,t,n){return qu.test(e)?new wu(e,t,n):null}},Tu=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return nu(this.key,this.style,e)},e}(),Eu={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Tu(e,t,n):null}},Du=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Nu={"@charset":!0,"@import":!0,"@namespace":!0},Lu={onCreateRule:function(e,t,n){return e in Nu?new Du(e,t,n):null}},Ou=[lu,fu,Su,Cu,ku,Eu,Lu],Au={process:!0},Iu={force:!0,process:!0},Pu=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var i=this.options,o=i.parent,r=i.sheet,a=i.jss,s=i.Renderer,l=i.generateId,u=i.scoped,c=Qs({classes:this.classes,parent:o,sheet:r,jss:a,Renderer:s,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+ru(this.classes[d]));var m=Jl(d,t,c);if(!m)return null;this.register(m);var f=void 0===c.index?this.index.length:c.index;return this.index.splice(f,0,m),m},t.replace=function(e,t,n){var i=this.get(e),o=this.index.indexOf(i);i&&this.remove(i);var r=n;return-1!==o&&(r=Qs({},n,{index:o})),this.add(e,t,r)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof su?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof gu&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof su?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof gu&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var i=0;i<this.index.length;i++)this.updateOne(this.index[i],t,n)},t.updateOne=function(t,n,i){void 0===i&&(i=Au);var o=this.options,r=o.jss.plugins,a=o.sheet;if(t.rules instanceof e)t.rules.update(n,i);else{var s=t.style;if(r.onUpdate(n,t,a,i),i.process&&s&&s!==t.style){for(var l in r.onProcessStyle(t.style,t,a),t.style){var u=t.style[l];u!==s[l]&&t.prop(l,u,Iu)}for(var c in s){var d=t.style[c],m=s[c];null==d&&d!==m&&t.prop(c,null,Iu)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,i=!!n&&n.options.link,o=eu(e).linebreak,r=0;r<this.index.length;r++){var a=this.index[r].toString(e);(a||i)&&(t&&(t+=o),t+=a)}return t},e}(),Ru=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Qs({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Pu(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var i=this.queue;this.attached&&!i&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(i?i.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)):null},t.replaceRule=function(e,t,n){var i=this.rules.get(e);if(!i)return this.addRule(e,t,n);var o=this.rules.replace(e,t,n);return o&&this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(this.renderer&&(o?i.renderable&&this.renderer.replaceRule(i.renderable,o):this.renderer.deleteRule(i)),o):o:(this.deployed=!1,o)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var i in e){var o=this.addRule(i,e[i],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),zu=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var i=0;i<this.registry.onCreateRule.length;i++){var o=this.registry.onCreateRule[i](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var i=0;i<this.registry.onProcessStyle.length;i++)t.style=this.registry.onProcessStyle[i](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,i){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,i)},t.onChangeValue=function(e,t,n){for(var i=e,o=0;o<this.registry.onChangeValue.length;o++)i=this.registry.onChangeValue[o](i,t,n);return i},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Fu=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var i=0;i<t.length;i++)if(t[i].options.index>n)return void t.splice(i,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,i=dl(t,["attached"]),o=eu(i).linebreak,r="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(r&&(r+=o),r+=s.toString(i))}return r},$l(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),ju=new Fu,Hu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Bu="2f1acc6c3a606b082e5eef5e54414ffb";null==Hu[Bu]&&(Hu[Bu]=0);var _u=Hu[Bu]++,Vu=function(e){void 0===e&&(e={});var t=0;return function(n,i){t+=1;var o="",r="";return i&&(i.options.classNamePrefix&&(r=i.options.classNamePrefix),null!=i.options.jss.id&&(o=String(i.options.jss.id))),e.minify?""+(r||"c")+_u+o+t:r+n.key+"-"+_u+(o?"-"+o:"")+"-"+t}},Uu=function(e){var t;return function(){return t||(t=e()),t}},$u=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},Wu=function(e,t,n){try{var i=n;if(Array.isArray(n)&&(i=Ql(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,i);else{var o=i?i.indexOf("!important"):-1,r=o>-1?i.substr(0,o-1):i;e.style.setProperty(t,r,o>-1?"important":"")}}catch(e){return!1}return!0},Ku=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Gu=function(e,t){return e.selectorText=t,e.selectorText===t},Yu=Uu((function(){return document.querySelector("head")}));function Xu(e){var t=ju.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.attached&&i.options.index>t.index&&i.options.insertionPoint===t.insertionPoint)return i}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.attached&&i.options.insertionPoint===t.insertionPoint)return i}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var i=e.insertionPoint;if(i&&"string"==typeof i){var o=function(e){for(var t=Yu(),n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(8===i.nodeType&&i.nodeValue.trim()===e)return i}return null}(i);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var Ju=Uu((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Zu=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Qu=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},ec=function(){function e(e){this.getPropertyValue=$u,this.setProperty=Wu,this.removeProperty=Ku,this.setSelector=Gu,this.hasInsertedRules=!1,this.cssRules=[],e&&ju.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,i=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),i&&this.element.setAttribute("data-meta",i);var r=Ju();r&&this.element.setAttribute("nonce",r)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,i=Xu(t);if(!1!==i&&i.parent)i.parent.insertBefore(e,i.node);else if(n&&"number"==typeof n.nodeType){var o=n,r=o.parentNode;r&&r.insertBefore(e,o.nextSibling)}else Yu().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var i=e,o=n;if("conditional"===e.type||"keyframes"===e.type){var r=Qu(n,t);if(!1===(o=Zu(n,i.toString({children:!1}),r)))return!1;this.refCssRule(e,r,o)}return this.insertRules(i.rules,o),o}var a=e.toString();if(!a)return!1;var s=Qu(n,t),l=Zu(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ru&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),tc=0,nc=function(){function e(e){this.id=tc++,this.version="10.10.0",this.plugins=new zu,this.options={id:{minify:!1},createGenerateId:Vu,Renderer:Vl?ec:null,plugins:[]},this.generateId=Vu({minify:!1});for(var t=0;t<Ou.length;t++)this.plugins.use(Ou[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Qs({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===ju.index?0:ju.index+1);var i=new Ru(e,Qs({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},t.removeStyleSheet=function(e){return e.detach(),ju.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var i=Qs({},n,{name:e,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=Jl(e,t,i);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),ic=function(e){return new nc(e)},oc="object"==typeof CSS&&null!=CSS&&"number"in CSS;function rc(e){var t=null;for(var n in e){var i=e[n],o=typeof i;if("function"===o)t||(t={}),t[n]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var r=rc(i);r&&(t||(t={}),t[n]=r)}}return t}
7
+ System.register(["picasso.js","picasso-plugin-q","hammerjs","qlik-chart-modules","react","react-dom","@nebula.js/stardust","qlik-object-conversion"],(function(e){"use strict";var t,n,r,o,i,a,s,l,c,u,d,f,p,m,h,g,y,v,b,x,S,M,C,w,k,T,E,q,L,O,N,D,A,I,R,P,z,j,F,_,B,H,$,V,W,U,K,G,Y;return{setters:[function(e){t=e.default},function(e){n=e.default},function(e){r=e.default},function(e){o=e.getValue,i=e.setValue,a=e.debouncer,s=e.throttler,l=e.cache,c=e.storage,u=e.memoize,d=e.selectionService,f=e.colorService,p=e.layoutService,m=e.dockService,h=e.themeService,g=e.pluginService,y=e.fontResolver},function(e){v=e.default,b=e,x=e.Children,S=e.isValidElement,M=e.cloneElement,C=e.forwardRef,w=e.useContext},function(e){k=e,T=e.default},function(e){E=e.useTranslator,q=e.useEmbed,L=e.useTheme,O=e.useState,N=e.useDeviceType,D=e.useAppLayout,A=e.useEffect,I=e.useElement,R=e.useOptions,P=e.useLayout,z=e.useAction,j=e.useStaleLayout,F=e.useModel,_=e.useApp,B=e.usePlugins,H=e.useSelections,$=e.useConstraints,V=e.useRect,W=e.usePromise,U=e.onTakeSnapshot,K=e.useImperativeHandle,G=e.useRenderState},function(e){Y=e.default}],execute:function(){e("default",(function(e){const i=function(){const e=t();return e.use(n),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Z(e))};return void e.interaction("hammer",Z(Hammer))}(r)),e.use(function(){return function(e){e.renderer("react",function(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,o=e();const i={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return r.style.left=`${Math.round(o.margin.left+o.x*t)}px`,r.style.top=`${Math.round(o.margin.top+o.y*n)}px`,r.style.width=`${Math.round(o.width)}px`,r.style.height=`${Math.round(o.height)}px`,r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",T.render(function(e,t){return v.createElement(Hd,{generateClassName:t},v.createElement(If,{theme:Am},e))}(e,Im),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&T.unmountComponentAtNode(r),i),destroy(){r&&r.parentElement&&(T.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return i}}()),e.component("data-title",function(e){function t(e){return!e.isDimension&&Me.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function n(e){return e.isDimension&&Me.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:n}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||t(this.settings.settings)?Math.max(28,n):Math.max(20,n)},render(){const{settings:{app:e,disabled:r,explicitItemInfos:o,hyperCube:i,hyperCubeDef:a,isDimension:s,minWidth:l,model:c,onChangeToAlternative:u,padding:d,rtl:f,selections:p,skipAttributeExpressions:m,translator:h,supportConditional:g=!1,isEnabled:y},layout:{dock:b}}=this.settings,x="top"!==b&&"bottom"!==b||!f?"ltr":"rtl",S=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};"left"===e?(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left");return n}(b,this.rect),M=a&&a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef,C=M&&M[s?"qDimensions":"qMeasures"]||[],w=o||i[s?"qDimensionInfo":"qMeasureInfo"],k=s?Fs:Bs,T=s?_s:Hs,E=Boolean(c&&c.colorSupport&&c.modifiers),q=E&&(n(this.settings.settings)||t(this.settings.settings)),L=y("PS_21223_CYCLIC_GROUPS"),O=w.map(((t,n)=>{const o="number"==typeof t.explicitColumn?t.explicitColumn:n,i=T(t,o,c,e),a=n===w.length-1,y=L&&Boolean(e)&&s&&"N"!==t.qGrouping,x=E||y?k({column:o,activeInfo:t,altList:C,app:e,dir:f?"rtl":"ltr",dock:Dm(b),model:c,onChange:u,skipAttributeExpressions:m,translator:h,allowChangeOfAlternatives:E,isCyclicFFEnabled:L}):void 0;return v.createElement(v.Fragment,{key:t.cId},v.createElement(Nm,{showGroupDimOptions:y,popover:x,titleData:i,model:c,translator:h,selections:p,disabled:r(),style:this.style,isDimension:s,padding:d,minWidth:l,hasAlternative:q,supportConditional:g,isCyclicFFEnabled:L}),!a&&v.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return v.createElement("div",{style:S,dir:x},O)}}}(e.renderer("svg")()))}}()),e.use(Yw),e.renderer("react-qcm",zw),e.component("box-sliced-hat",Kw),e.component("box-out-of-bounds",Hw),e.component("disclaimer",Aw),e.component("scrollbar",fy),e.component("scroll-hint",ra),e.component("reference-line-labels",os),e.component("axis-overlay",kg.picassoComponents.axisOverlay),e.component("time-axis",kg.picassoComponents.timeAxis),e.scale("q-time-axis",kg.picassoScales.time),e}();return{qae:Lk(e),ext:GL(e),component(){const t=function({env:e}){var t;const{flags:n}=e,r=null===(t=e.anything)||void 0===t||null===(t=t.sense)||void 0===t?void 0:t.isUnsupportedFeature,o=E();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(Ok).forEach((t=>{e.add(Ok[t])}))}}(e.translator);const i=q(),a=L(),[s,l]=O(),c=N(),u=D(),{qLocaleInfo:d}=u;return A((()=>{l({translator:o,theme:a,embed:i,deviceType:c,localeInfo:d,isUnsupportedFeature:r,flags:n})}),[d,r,o.language(),a.name(),c]),s}({env:e}),{viewState:n,viewCache:r}=function(){const[e]=O((()=>l())),[t]=O((()=>c({viewRange:[0,1],scrollOffset:void 0})));return{viewCache:e,viewState:t}}(),u=function({picasso:e}){const t=I(),n=R(),[r,o]=O();return A((()=>{if(!e)return()=>{};t.style.overflow="hidden";const r=e({renderer:{prio:[(null==n?void 0:n.renderer)||"canvas"]}}).chart({element:t,data:[],settings:{}});o(r);const{destroy:i}=r;return()=>{i()}}),[n.renderer]),r}({picasso:i}),d=function({picasso:e,chart:t,environment:n,viewState:r,viewCache:i}){const a=j(),c=F(),u=_(),d=B(),f=H(),y=R(),[v,b]=O(),[x,S]=O(),[M,C]=O(),w=$(),k=function(){const[e]=O({}),[t]=O({}),n=function(){var e,t;const n=P(),r=E(),o=!(null==n||null===(e=n.qSelectionInfo)||void 0===e||!e.qInSelections),i=!(null==n||null===(t=n.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t||null===(t=t[0])||void 0===t||!t.qIsOneAndOnlyOne),[a,s]=O(!1),[l,c]=O(!1),[u,d]=O({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),f=e=>{c("boolean"==typeof e?e:!l)};return z((()=>(d({key:"lasso",action:f,enabled:()=>a,active:()=>l}),{key:"lasso",label:r.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:VT,hidden:!a||!o||i,active:l,action:f})),[o,i,l,a,r.language()]),{get:()=>u,setAllows:e=>{s(!!e)}}}(),[r,o]=O();return A((()=>{const r={};r.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:n,discrete:r}=e;return t.allowScroll&&((null==n?void 0:n.meta.isContinuous)||(null==r?void 0:r.query.getCanScroll()))}},r.interact={key:"interact",isEnabled:!0,enabled:()=>t.allowInteract},r.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>t.allowTooltip},r.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>t.allowSelect},r.lasso=n.get(),Object.keys(r).forEach((e=>WT(r[e]))),o(r)}),[]),A((()=>{r&&n&&(r.lasso={...r.lasso,...n.get()})}),[n]),{get:()=>r,setAllows:e=>{Object.assign(t,e),n.setAllows(null==e?void 0:e.allowSelect)},setContext:t=>{Object.assign(e,t)},destroy:()=>{Object.keys(r).forEach((e=>r[e].removeAllListeners()))}}}();return A((()=>{if(!t)return()=>{};const e=k.get(),n=JT({chart:t,actions:e,selections:f});return S(e),C(n),()=>{n.destroy(),k.destroy()}}),[t]),A((()=>{if(!w)return;const e={allowScroll:!w.active,allowInteract:!w.active,allowTooltip:!w.passive,allowSelect:!w.select&&!w.active};k.setAllows(e)}),[w]),A((()=>{if(!M||!n)return;const{theme:f,translator:v,localeInfo:S,flags:C,embed:w}=n,{direction:T="ltr"}=y,E=p({source:a,metaAdditionsFn:GT,experimental:{filter:C.isEnabled("IM_1579_HIDE_DIM_MEA")}});M.setFilteredFields(E.meta.filteredFields);const q=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(E.getLayout())?p({source:E.getLayout()}):void 0,L=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:a,options:y}),O=function({layoutService:e,viewCache:t,flags:n,options:r}){const o={};return o.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map(((e,t)=>`qDimensionInfo/${t}`)),minor:e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>`qMeasureInfo/${t}`))};return n.majorNumeric=`${t.isStackedByDimension?n.majorStack:n.major}:numeric`,n}(e),o.selectionDimensionIdx=ZT(e.getHyperCube()),o.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,o.selectionDimensionProp=e=>void 0===o.selectionDimensionIdx||void 0!==e&&o.selectionDimensionIdx!==e?{}:{selectionDimension:{field:o.selectionDimensionIdx}},o.animations={enabled:()=>!1!==r.chartAnimations&&(!!n.isEnabled("IM_1355_ANIMATIONS_BAR")&&(!(o.animations.isPartialUpdating||o.animations.isSizeChanging||o.animations.hasSlicedHats)&&!ss.propertiesHaveChanged({viewCache:t,layout:e.getLayout()}))),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},o}({layoutService:E,viewCache:i,flags:C,options:y}),N=m({chart:t,layoutService:E,config:{logicalSize:L,rtl:"rtl"===T},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),D=h({theme:f,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]]}}),A=function({layoutService:e,themeService:t,flags:n}){const r=t.getStyles(),o=t=>n.isEnabled("CLIENT_IM_747")?(e.getLayoutValue("components",[])||[]).find((e=>e.key===t)):void 0;return{axis:{title:{getStyle:()=>{var e,t,n,i,a,s;return{fontFamily:null!==(e=null===(t=o("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(n=null===(i=o("axis"))||void 0===i||null===(i=i.axis)||void 0===i||null===(i=i.title)||void 0===i?void 0:i.fontSize)&&void 0!==n?n:r.axis.title.fontSize,color:null!==(a=null===(s=o("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.axis.title.color}}},label:{getStyle:()=>{var e,t,n,i,a,s;return{fill:null!==(e=null===(t=o("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.axis.label.name.color,fontSize:null!==(n=null===(i=o("axis"))||void 0===i||null===(i=i.axis)||void 0===i||null===(i=i.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.fontSize)&&void 0!==n?n:r.axis.label.name.fontSize,fontFamily:null!==(a=null===(s=o("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.name)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,i,a,s;return{fontFamily:null!==(e=null===(t=o("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.title.fontFamily,fontSize:null!==(n=null===(i=o("legend"))||void 0===i||null===(i=i.legend)||void 0===i||null===(i=i.title)||void 0===i?void 0:i.fontSize)&&void 0!==n?n:r.legend.title.fontSize,color:null!==(a=null===(s=o("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.title.color}}},label:{getStyle:()=>{var e,t,n,i,a,s;return{fontFamily:null!==(e=null===(t=o("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.label.fontFamily,fontSize:null!==(n=null===(i=o("legend"))||void 0===i||null===(i=i.legend)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.fontSize)&&void 0!==n?n:r.legend.label.fontSize,color:null!==(a=null===(s=o("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.label.color}}}},label:{getStyle:()=>{var e,t,n,i,a,s,l,c;return{fill:null!==(e=null===(t=o("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.value.color,useContrastColor:null===(n=null===(i=o("label"))||void 0===i||null===(i=i.label)||void 0===i||null===(i=i.value)||void 0===i?void 0:i.useContrastColor)||void 0===n||n,fontSize:null!==(a=null===(s=o("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.fontSize)&&void 0!==a?a:r.label.value.fontSize,fontFamily:null!==(l=null===(c=o("label"))||void 0===c||null===(c=c.label)||void 0===c||null===(c=c.value)||void 0===c?void 0:c.fontFamily)&&void 0!==l?l:r.label.value.fontFamily}}}}}({layoutService:E,themeService:D,flags:C}),I=kg.model({model:c,layoutService:E,viewCache:i,viewState:r}),R=function({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:o},i={}){const a=function(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(qe).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),o=t.getHyperCubeValue("qDimensionInfo"),i="K"===r&&o.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:o.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,o=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+o.length+r,qHeight:Math.min(2e3,1e4/(o.length+1))},zoomLevel:-1,filter:"D1"}}}}(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,o),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),c=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),u={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>u,update(e){var r;c.should(e)&&c(e),u.mode=ue(u.mode,t.meta),u.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,u.mode.isStackedByDimension=u.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),u.mode.isStackedByMeasure=u.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),u.fields={major:u.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:u.mode.isStackedByDimension?e.qMeasureInfo.map(((e,t)=>`qMeasureInfo/${t}`)):n.fields.minor},u.scales={major:KT.SCALE.REDUCED.MAJOR,minor:KT.SCALE.REDUCED.MINOR},u.cube=e,i.qDataPages=e.qDataPages},fetchMinMaxData(){if(i.qDataPages)return Promise.resolve(i.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=ue(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then((e=>e))},setSnapshotData(e){e.reducedHyperCube=u.cube}}}({enigma:c,layoutService:E,viewModel:O});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:E,viewState:r,viewStateOptions:null==y?void 0:y.viewState});const P=eE({picasso:e,model:c,app:u,translator:v,localeInfo:S,theme:f,continuousDataModel:I,layoutService:E,legendLayoutService:q,reducedDataModel:R}),z=kT({layoutService:E,viewState:r,colorModel:{settings:()=>P.getMain().getSettings(),resolveUIColor:e=>P.getMain().getPaletteColor(e)},chart:t,env:n,keys:{colorScale:KT.SCALE.MAIN.COLOR},isEnabled:()=>!E.meta.isGroupedByDimension&&(!E.meta.isStackedByDimension||C.isEnabled("TRENDLINES_STACKED_DIM"))&&!E.meta.isDimensionless});vk.attrExpr.updateProperties(c,a);const j=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){const l=e.tooltip&&!e.tooltip.auto;return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:l,utils:uk,miniChartToken:{},embed:s}}({layout:a,app:u,model:c,picasso:e,chart:t,translator:v,localeInfo:S,embed:w,extractDimsAndNode:YT.extractDimsAndNode});let F;E.meta.isDiscrete&&(F=function({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:a,trendLineModel:c,itemWidths:u,viewState:d,rtl:f,options:{definitionPath:p="/qHyperCubeDef",getRect:m,axisKey:h,renderer:g,areaBuffer:y,processDataPage:v=(()=>{})}={}}){const b=l(),x=function({qMode:e}){switch(e){case"S":default:return jk;case"K":return Fk;case"T":return _k}}({qMode:i.getHyperCubeValue("qMode")}),S=function({state:e,contains:t}){return e.set(Bk,[]),{add:t=>{const n=e.get(Bk);n.length=0,n.push(t)},getCurrent:()=>e.get(Bk)[0],getAll:()=>e.get(Bk),contains:n=>t(e.get(Bk)[0],n)}}({state:b,contains:x.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const o=n.patcher({layoutService:e});o.should(r)&&o(r);t.add(r)}({layoutService:i,dataStore:S,composition:x});const M=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:y}),C=function({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:o=Gk,definitionPath:i,processDataPage:a}){const{slicer:l,cacheWarden:c,request:u}=t,d=function({dataStore:e,slice:t,warden:n,expand:r,request:o,process:i,connectionless:a,processDataPage:s}){const l=(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const o=n.release(r.qArea,l),s=i.isProcessing();if(!o&&s&&i.cancel(),!o||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());i.isProcessing()&&c&&c();const u=r(l);return i(o(u)).then((n=>(s(n),e.add(n),t(n,l))))};return l}({dataStore:e,slice:l,warden:c({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:Uk({layoutService:r}),request:u({definitionPath:i}),process:Kk(n),connectionless:r.meta.isSnapshot,processDataPage:a}),f=s(((e,{onProcessing:t,onData:n})=>{d(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==Nk)throw e}))}),Rk);return function(e,{onProcessing:t=Dk,onDataPage:n=Dk}={}){f(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),o.command.update(),n(e)}})}}({dataStore:S,composition:x,enigmaModel:r,layoutService:i,trendLineModel:c,definitionPath:p,processDataPage:v}),w=function({chart:e,componentKey:t,state:n,dataStore:r,pageData:o,layoutService:i,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:f,rtl:p}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const m=function({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:o,getItemWidths:i,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:f}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;if(t)return Yk;if(!n)return Xk;return r?eT:oT}({layoutService:r}),p=()=>"horizontal"===o.meta.major.orientation?t().width:t().height,m=e=>e?p()/e:0,h=(e,t)=>-(e-t)*m(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:iT({chart:e,rect:t(),dockService:o,itemWidths:i(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(Ak/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return m(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,o=Math.min(0,Math.max(e,h(n,r))),i=r?Math.abs(r*o/p()):0;return{start:{pixel:o,item:i},end:{item:Math.min(i+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return h(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const o=e/n*t,i=Math.abs(r)/o,a=Math.min(1,i+e/o);return[i,a]}({viewSize:p(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const i=f({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:p(),upperBound:h(t.inTotal,t.inView)});return"horizontal"===o.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(i):i},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=h(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*m(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(m(r)*n)}}}}({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:i,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:p}),h=()=>{const e=m.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=m.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=({items:e})=>{const t=i.getLayoutValue("scrollStartPos"),n=f.get("scrollOffset");if(void 0===n)return 1===t?m.getUpperBound({items:e}):0;if("number"==typeof n)return m.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:o}=n,a=1===t&&o?o-e.inView:r;return m.convert.itemToPixelOffset({itemOffset:a,items:e})},v=e=>{const[{qArea:t}]=i.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))},b=e=>{const t=Date.now(),r=h(),i=g({pixelOffset:e,items:r}),a=m.getArea({itemOffset:i.start.item,items:r});if(v(a))return void((m.validate.offset({pixelOffset:e,items:r})||f.get("scrollOffset").start!==i.start.item)&&(n.set("finished",t),n.set("scaleRange",m.getScaleRange({offsets:i.start,items:r})),f.preventSet("viewRange",m.getViewRange({pixelOffset:i.start.pixel,items:r})),f.set("scrollOffset",{start:i.start.item,end:i.end.item})));f.preventSet("viewRange",m.getViewRange({pixelOffset:i.start.pixel,items:r}));const s=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",m.getScaleRange({offsets:i.start,items:r})),f.set("scrollOffset",{start:i.start.item,end:i.end.item}))};o(a,{onProcessing:s,onDataPage:s})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const i=h();n.set("itemSize",m.getItemSize({items:i}));const a=y({items:i}),c=g({pixelOffset:a,items:i});f.preventSet("viewRange",m.getViewRange({pixelOffset:c.start.pixel,items:i}));const u=m.getArea({itemOffset:c.start.item,items:i});return new Promise((e=>{o(u,{onDataPage:()=>{n.set("scaleRange",m.getScaleRange({offsets:c.start,items:i})),f.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;b(t)},scrollToRelative(e){const t=n.get("items"),r=m.convert.relativeToPixelOffset({relativeOffset:e,items:t});b(r)}}}({chart:e,componentKey:n,state:b,dataStore:S,pageData:C,layoutService:i,dockService:a,itemWidths:u,getRect:m,axisKey:h,renderer:g,areaBuffer:M,viewState:d,rtl:f}),k=function({layoutService:e,dataStore:t}){return function(n){const r=o(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:S}),T=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{gestures:[Vk({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i})],native:{type:"native",events:{wheel:Wk({chart:e,actions:t,componentKey:n,scroller:i})}}}}({chart:e,actions:t,componentKey:n,dockService:a,rtl:f,scroller:w});return{interactions:T,query:{getCanScroll:()=>w.enabled(),getItemSize:()=>w.itemSize(),getScaleRange:()=>w.scaleRange(),getCurrentDataPage:()=>S.getCurrent()},command:{initialize:()=>w.initialize(),scrollTo:e=>w.scrollToRelative(e),setSnapshotData:e=>k(e)}}}({chart:t,actions:x,componentKey:KT.COMPONENT.BAR,enigmaModel:c,layoutService:E,dockService:N,trendLineModel:z,itemWidths:UT,viewState:r,rtl:"rtl"===T,options:{axisKey:KT.COMPONENT.BAR_AXIS,renderer:e.renderer("svg")()}}));const _=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:o}=e.meta,i=e.getLayout(),a="K"===i.qHyperCube.qMode,s=Te.dimensionless(i),l=ja.getMeasureRefLines(i),c=ja.getDimensionRefLines(i,s),u=ja.getMeasureRefLineLabels(i),d=ja.getDimensionRefLineLabels(i,s);let f={},p={};const m=t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:o}=n;return ja.isOutOfRange({value:t,qMin:r,qMax:o})}return!1},h=t=>{if(!p[t])return!1;if(!n&&o){const n={valueInfo:p[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=e.getHyperCubeValue(r);return ja.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!c||!c.length)&&!c.every((t=>{const n=ja.getInputValue({refLineLayout:t,layoutService:e});return m(n)||h(n)})),y={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:p,dimensionValuesInfo:f,query:{getRefLines:e=>ja.getRefLines(i,e),getRefLineLabels:e=>ja.getRefLineLabels(i,e)},update:()=>{p=y.dimensionRefLineInfo,g()&&(f=ja.getDimensionValuesInfo({layout:i,canBeContinuous:r,discreteModel:t,layoutService:e}),y.dimensionValuesInfo=f,c.forEach((t=>{const n=ja.getInputValue({refLineLayout:t,layoutService:e});f[n]&&(p[n]?(p[n].innerValues=f[n].innerValues,p[n].minOrder=Math.min(p[n].minOrder,f[n].minOrder),p[n].maxOrder=Math.max(p[n].maxOrder,f[n].maxOrder),p[n].isMinOrderOk=p[n].isMinOrderOk||f[n].isMinOrderOk,p[n].isMaxOrderOk=p[n].isMaxOrderOk||f[n].isMaxOrderOk):p[n]={id:f[n].id,qText:f[n].qText,innerValues:f[n].innerValues,minOrder:f[n].minOrder,maxOrder:f[n].maxOrder,isMinOrderOk:f[n].isMinOrderOk,isMaxOrderOk:f[n].isMaxOrderOk},p[n].numInnerValues=(p[n].maxOrder||0)-(p[n].minOrder||0)+1)})))}};return y.update(),y}({layoutService:E,discreteModel:F}),B=function(e){const t={layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:KT.SCALE.MAIN.MINOR,MAJOR:KT.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:KT.COMPONENT.BAR,BAR_AXIS:KT.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:KT.COLLECTION.MAIN}}};return t}(E),H=g({picassoInstance:e,plugins:d||[],pluginArgs:B});k.setContext({discrete:F,layoutService:E}),b({discrete:F,continuous:kg,legendLayoutService:q,layoutService:E,viewModel:O,dockService:N,themeService:D,styleService:A,continuousDataModel:I,reducedDataModel:R,colorService:P,trendLineModel:z,refLineModel:_,pluginService:H,customTooltipModel:j,selectionService:M,logicalSize:L})}),[M,y,n,a]),v}({picasso:i,chart:u,environment:t,viewState:n,viewCache:r}),f=function({env:e,services:t}){const n=_(),r=F(),o=G(),[i,a]=W((async()=>{if(!e||!t)return Promise.resolve();const{flags:i}=e,{layoutService:a}=t,{isSnapshot:s,isStacked:l,isContinuous:c}=a.meta,u=[];return s||u.push(r.getEffectiveProperties()),Promise.all(u).then((async e=>{const t=e[0]||void 0;if(i.isEnabled("IM_1579_HIDE_DIM_MEA")&&null!=t&&t.qHyperCubeDef){const e=a.getLayout(),i=ue(!0,{},t);if(wL({properties:t,layout:e,isStacked:l,isContinuous:c,model:r,layoutService:a}))return o.pending(),xs(e)?r.setProperties(t).then((()=>{n.clearUndoBuffer()})):void await bs(r,i,t);o.restore()}return{properties:t}}))}),[e,t]);if(a&&!a.isHandled)throw a;return i}({env:e,services:d});!function({picasso:e,chart:t,services:n,environment:r,viewState:o,viewCache:i,bootstrapped:s}){const{width:l,height:c}=V(),u=F(),d=H(),f=R(),[p,m]=O(),[h,g]=O(),[y,v]=O(),[b,x]=O(),S=_();function M(s={}){const{selectionService:l,refLineModel:c,discrete:m,reducedDataModel:h,continuousDataModel:g,trendLineModel:y,pluginService:v,colorService:b,viewModel:x,dockService:M,themeService:C,customTooltipModel:w,layoutService:k,logicalSize:T,styleService:E}=n,q=l.custom.getActions(),L=e.data("q")(p.prepPicassoDataSet()),O={picasso:e,ds:L,rtl:"rtl"===(null==f?void 0:f.direction),model:u,app:S,chart:t,actions:q,localeInfo:r.localeInfo,logicalSize:T,flags:r.flags,translator:r.translator,selections:d,isLocked:l.getIsSelectionLocked,viewCache:i,viewState:o,layoutService:k,dockService:M,viewModel:x,colorService:b,selectionService:l,themeService:C,trendLineModel:y,discrete:m,continuousDataModel:g,reducedDataModel:h.model(),customTooltipModel:w,debouncer:a,refLineModel:c,pluginService:v,styleService:E,...s};return ML(k.getLayout(),O,r)}function C(){if(!t.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:r,viewModel:o}=n;i.set("isPreRender",!0);const a=M(h);p.extractDataPages(),t.layoutComponents({settings:a,data:y}),i.set("isPreRender",!1),p.insertDataPages(),o.animations.hasSlicedHats=a.components.filter((e=>"box-sliced-hat"===e.type)).length>0;const s=[];return 1!==a.components.length&&r.meta.isDiscrete&&s.push(e.command.initialize()),Promise.all(s)}const[[w,k]=[]]=W((()=>{var a,l;if(!(e&&t&&n&&r&&o&&i&&s))return Promise.resolve();const{layoutService:c,selectionService:u,refLineModel:d,discrete:f,continuous:p,reducedDataModel:m,continuousDataModel:h,trendLineModel:g,legendLayoutService:y,colorService:v,pluginService:b,viewModel:S,customTooltipModel:M}=n;if(null==u||null===(a=u.custom)||void 0===a||!a.getActions())return Promise.resolve();const{flags:C}=r;if(null!=C&&null!==(l=C.isEnabled)&&void 0!==l&&l.call(C,"IM_1579_HIDE_DIM_MEA")){const{properties:e}=s,t=null==e?void 0:e.qHyperCubeDef.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv}));t&&(M.useCustomTooltip=!1)}const w=()=>{x(Date.now()),S.animations.isPartialUpdating=!0},k=()=>{y&&y.setDataPages([f.query.getCurrentDataPage()]),d&&d.update(),w()};o.onChanged("scrollOffset",k),o.onChanged("legendScrollOffset",w),o.intercept("zoom",p.event.onZoomIntercept({viewCache:i})),o.onChanged("zoom",p.event.onZoomChange({layoutService:c,continuousDataModel:h},w)),u.setLayout(c.getLayout());const T=[];c.meta.isContinuous&&(h.update(c.getLayout()),T.push(h.initialFetch())),g.command.update(),T.push(m.fetch().then((({reducedCube:e})=>{m.update(e)}))),T.push(Promise.resolve({properties:s.properties}));const E=()=>[b.initialize(),v.initialize(),SE({reducedDataModel:m,layoutService:c,continuousDataModel:h,trendLineModel:g})];return Promise.all(T).then((e=>Promise.all(E()).then((t=>[e,t.pop()]))))}),[s]);A((()=>{var e;if(null==n||null===(e=n.colorService)||void 0===e||!e.getMain()||!k)return;const{layoutService:t,selectionService:o,reducedDataModel:a,continuousDataModel:s,trendLineModel:l,legendLayoutService:c,colorService:u,viewModel:d}=n;i.set("minorMinMax",k);const f=()=>!t.meta.isContinuous&&(a.model().mode.isReduced||t.meta.isStacked)&&c,p=t.getHyperCube(),h=t.meta.isContinuous?s.getInitialCube():a.model().cube,{field:y}=u.getMain().getSettings(),v=f(),b=v?c.getHyperCube():void 0;o.setBrushAliases({colorField:y,useLegendCube:v,legendAlias:`legendCube/${y}`});const x=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:o,viewModel:i,trendLineModel:a}){const s=o.refs.dataPages.split(".").pop();let l=[],c=[];const u=o.meta.isContinuous?[{key:i.fields.majorNumeric,from:o.meta.isStackedByDimension?i.fields.majorStack:i.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}}),prepPicassoData(o){const i=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:u}},...o];return n&&i.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:u}}),a.query.hasTrendLines()&&i.push({key:"trend",data:a.query.getData()}),i},extractDataPages(){l=e[s],c=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=c}}}({mainCube:p,miniCube:h,legendCube:b,localeInfo:r.localeInfo,layoutService:t,viewModel:d,trendLineModel:l}),S=w[w.length-1];g({localeInfo:r.localeInfo,...S}),m(x)}),[k]),A((()=>{if(!n||!h||!p)return;const e=n.colorService.getMain();if(!e)return;p.prepPicassoDataSet();const t=p.prepPicassoData(e.getData());v(t)}),[h]),A((()=>{var e;null!=n&&null!==(e=n.colorService)&&void 0!==e&&e.getMain()&&t.update&&p&&y&&C().then((()=>{const{layoutService:e,discrete:r,legendLayoutService:o}=n;if(o){1===e.getLayoutValue("scrollStartPos")&&o.setDataPages([r.query.getCurrentDataPage()])}t.update(),ss.cacheProperties({viewCache:i,layout:e.getLayout()})}))}),[y]),A((()=>{if(!(l&&c&&p&&null!=t&&t.update&&null!=n&&n.colorService.getMain()))return;const{viewModel:e}=n;e.animations.isSizeChanging=!0;const{dockService:o,themeService:i}=n;o.update({width:l,height:c}),i.setTheme(r.theme),C().then((()=>{t.update&&t.update()}))}),[l,c]),A((()=>{if(null==t||!t.update)return;const{viewModel:e}=n;t.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1}),[b])}({picasso:i,chart:u,services:d,environment:t,viewState:n,viewCache:r,bootstrapped:f}),CL({environment:t,services:d,chart:u,viewState:n,bootstrapped:f})}}}));const X={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function J(e){return X[e]||e}function Z(e){return function(t,n,r){let o,i,a,s,l=[],c=!0;function u(){"function"==typeof o.enable&&(o.enable=o.enable.bind(i)()),o.enable&&(o.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(i));const n=J(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(i),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((t=>{const n=J(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,o=e,i={chart:t,mediator:n,settings:o},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,i=null,o=null}}}}function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ee(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var te=Object.prototype.hasOwnProperty,ne=Object.prototype.toString,re=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,ie=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ne.call(e)},ae=function(e){if(!e||"[object Object]"!==ne.call(e))return!1;var t,n=te.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&te.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||te.call(e,t)},se=function(e,t){re&&"__proto__"===t.name?re(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},le=function(e,t){if("__proto__"===t){if(!te.call(e,t))return;if(oe)return oe(e,t).value}return e[t]},ce=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=le(s,n),s!==(o=le(t,n))&&(u&&o&&(ae(o)||(i=ie(o)))?(i?(i=!1,a=r&&ie(r)?r:[]):a=r&&ae(r)?r:{},se(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&se(s,{name:n,newValue:o}));return s},ue=Q(ce);const de="center",fe="bottom";var pe={NoDataExist:{label:"NoDataExist",alignment:de,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:de,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:de,default:!1},LimitedData:{label:"LimitedData",alignment:fe,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:fe,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:fe,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:fe,default:!1}};const me=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],he={};me.forEach((([e,{width:t,height:n}])=>{he[e]={width:t,height:n}}));const ge={getLayoutModes:()=>he,getLayoutMode(e,t){let n;for(n=0;n<me.length;++n)if(e>=me[n][1].width&&t>=me[n][1].height)return me[n][0];return"SPARK"}};function ye(e,t){return{layoutModes:ge.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const ve=["$date","$timestamp","$time"],be=["D","TS","T"],xe={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ve.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&be.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(xe.hasTimeTag(t)&&xe.hasUnknownFormat(t)||xe.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&xe.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}))[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n;const r=null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0)<1)&&xe.canBeContinuousDimension(r[0])},maxNumberOfLines:12},Se=/^[A-Z][A-z0-9_]*$/i,Me={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),o=r[r.length-1];let i,a=e;for(i=0;i<r.length-1;++i)void 0===a[r[i]]&&(a[r[i]]=Number.isNaN(+r[i+1])?{}:[]),a=a[r[i]];if(void 0!==n){const e=a[o];return a[o]=n,{updated:n,previous:e}}return delete a[o],!1},getValue:(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||Se.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},Ce=e=>Me.getValue(e,"qHyperCube.qDimensionInfo",[]),we=e=>Me.getValue(e,"qHyperCube.qMeasureInfo",[]),ke=e=>Me.getValue(e,"barGrouping.grouping"),Te={continuous:(e,t=!1)=>!!xe.canBeContinuous(e)&&(Me.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!Ce(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ke(e)&&(Ce(e).length>1||we(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&Ce(e).length>1&&1===we(e).length},groupedByMeasure(e){return this.grouped(e)&&1===Ce(e).length&&we(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ke(e)||this.continuous(e))&&(Ce(e).length>1||we(e).length>1)},stackedByDimension(e){return this.stacked(e)&&Ce(e).length>1&&1===we(e).length},stackedByMeasure(e){return this.stacked(e)&&1===Ce(e).length&&we(e).length>1},simple:e=>0===Ce(e).length||1===Ce(e).length&&1===we(e).length,snapshot:e=>!!Me.getValue(e,"snapshotData")};function Ee(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const qe=e=>{throw e.isHandled=!0,e};const Le={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?Le.getVerticalDock(t):n?Le.getOppositeDock(Le.getHorizontalDock(t)):Le.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n};var Oe=(e,t)=>{if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};const Ne={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const o=t+n+r;return{latin:e.length-o,cjk:o}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let o;void 0===t?e.forEach((e=>{o=Ne.getCharacterRatios(e[n]),r.latin+=o.latin,r.cjk+=o.cjk})):e.forEach((e=>{o=Ne.getCharacterRatios(e[t][n]),r.latin+=o.latin,r.cjk+=o.cjk}));const i=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/i,r.cjkRatio=r.cjk/i,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const o=Ne.getTotalCharacterRatios(t,n,r),i=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(Ne.stringWidthOverMWidth(i)+1.0909090909090908*a)}},De="#la-vie-tooltip";function Ae(){if(!document.querySelector(De)){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Ie({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){Ae()},beforeUpdate(){Ae()},destroyed(){!function(){const e=document.querySelector(De);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(De),content:({h:e,data:t,style:n})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:n}){return e.map((e=>{const r={style:{...n.cell||{},...e.style||{}},class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)}))}(t,{h:e,style:n})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const Re=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Pe=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),ze=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),je={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Re.test(e),isRtlChar:e=>Pe.test(e)||ze.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],je.isLtrChar(r))return"ltr";if(je.isRtlChar(r))return"rtl"}return"ltr"}},Fe={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Fe.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=je.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=je.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:je.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=je.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=je.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Fe.getColorSymbol(e,t)]:[Fe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=je.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=je.detectTextDirection(e.value);let l;return l=o?r?[e.value,Fe.getColorSymbol(t,n)]:[Fe.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function _e(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Be(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function He(){}var $e=.7,Ve=1/$e,We="\\s*([+-]?\\d+)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ge=/^#([0-9a-f]{3,8})$/,Ye=new RegExp(`^rgb\\(${We},${We},${We}\\)$`),Xe=new RegExp(`^rgb\\(${Ke},${Ke},${Ke}\\)$`),Je=new RegExp(`^rgba\\(${We},${We},${We},${Ue}\\)$`),Ze=new RegExp(`^rgba\\(${Ke},${Ke},${Ke},${Ue}\\)$`),Qe=new RegExp(`^hsl\\(${Ue},${Ke},${Ke}\\)$`),et=new RegExp(`^hsla\\(${Ue},${Ke},${Ke},${Ue}\\)$`),tt={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 nt(){return this.rgb().formatHex()}function rt(){return this.rgb().formatRgb()}function ot(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ge.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?it(t):3===n?new lt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?at(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?at(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ye.exec(e))?new lt(t[1],t[2],t[3],1):(t=Xe.exec(e))?new lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Je.exec(e))?at(t[1],t[2],t[3],t[4]):(t=Ze.exec(e))?at(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qe.exec(e))?mt(t[1],t[2]/100,t[3]/100,1):(t=et.exec(e))?mt(t[1],t[2]/100,t[3]/100,t[4]):tt.hasOwnProperty(e)?it(tt[e]):"transparent"===e?new lt(NaN,NaN,NaN,0):null}function it(e){return new lt(e>>16&255,e>>8&255,255&e,1)}function at(e,t,n,r){return r<=0&&(e=t=n=NaN),new lt(e,t,n,r)}function st(e){return e instanceof He||(e=ot(e)),e?new lt((e=e.rgb()).r,e.g,e.b,e.opacity):new lt}function lt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ct(){return`#${pt(this.r)}${pt(this.g)}${pt(this.b)}`}function ut(){const e=dt(this.opacity);return`${1===e?"rgb(":"rgba("}${ft(this.r)}, ${ft(this.g)}, ${ft(this.b)}${1===e?")":`, ${e})`}`}function dt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ft(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pt(e){return((e=ft(e))<16?"0":"")+e.toString(16)}function mt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gt(e,t,n,r)}function ht(e){if(e instanceof gt)return new gt(e.h,e.s,e.l,e.opacity);if(e instanceof He||(e=ot(e)),!e)return new gt;if(e instanceof gt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new gt(a,s,l,e.opacity)}function gt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yt(e){return(e=(e||0)%360)<0?e+360:e}function vt(e){return Math.max(0,Math.min(1,e||0))}function bt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}_e(He,ot,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nt,formatHex:nt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ht(this).formatHsl()},formatRgb:rt,toString:rt}),_e(lt,(function(e,t,n,r){return 1===arguments.length?st(e):new lt(e,t,n,null==r?1:r)}),Be(He,{brighter(e){return e=null==e?Ve:Math.pow(Ve,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?$e:Math.pow($e,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lt(ft(this.r),ft(this.g),ft(this.b),dt(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:ct,formatHex:ct,formatHex8:function(){return`#${pt(this.r)}${pt(this.g)}${pt(this.b)}${pt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ut,toString:ut})),_e(gt,(function(e,t,n,r){return 1===arguments.length?ht(e):new gt(e,t,n,null==r?1:r)}),Be(He,{brighter(e){return e=null==e?Ve:Math.pow(Ve,e),new gt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?$e:Math.pow($e,e),new gt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new lt(bt(e>=240?e-240:e+120,o,r),bt(e,o,r),bt(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new gt(yt(this.h),vt(this.s),vt(this.l),dt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=dt(this.opacity);return`${1===e?"hsl(":"hsla("}${yt(this.h)}, ${100*vt(this.s)}%, ${100*vt(this.l)}%${1===e?")":`, ${e})`}`}}));const xt=Math.PI/180,St=180/Math.PI,Mt=.96422,Ct=1,wt=.82521,kt=4/29,Tt=6/29,Et=3*Tt*Tt,qt=Tt*Tt*Tt;function Lt(e){if(e instanceof Ot)return new Ot(e.l,e.a,e.b,e.opacity);if(e instanceof Pt)return zt(e);e instanceof lt||(e=st(e));var t,n,r=It(e.r),o=It(e.g),i=It(e.b),a=Nt((.2225045*r+.7168786*o+.0606169*i)/Ct);return r===o&&o===i?t=n=a:(t=Nt((.4360747*r+.3850649*o+.1430804*i)/Mt),n=Nt((.0139322*r+.0971045*o+.7141733*i)/wt)),new Ot(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ot(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Nt(e){return e>qt?Math.pow(e,1/3):e/Et+kt}function Dt(e){return e>Tt?e*e*e:Et*(e-kt)}function At(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function It(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Rt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Pt)return new Pt(e.h,e.c,e.l,e.opacity);if(e instanceof Ot||(e=Lt(e)),0===e.a&&0===e.b)return new Pt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*St;return new Pt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Pt(e,t,n,null==r?1:r)}function Pt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function zt(e){if(isNaN(e.h))return new Ot(e.l,0,0,e.opacity);var t=e.h*xt;return new Ot(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}_e(Ot,(function(e,t,n,r){return 1===arguments.length?Lt(e):new Ot(e,t,n,null==r?1:r)}),Be(He,{brighter(e){return new Ot(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ot(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new lt(At(3.1338561*(t=Mt*Dt(t))-1.6168667*(e=Ct*Dt(e))-.4906146*(n=wt*Dt(n))),At(-.9787684*t+1.9161415*e+.033454*n),At(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),_e(Pt,Rt,Be(He,{brighter(e){return new Pt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Pt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return zt(this).rgb()}}));var jt={isDark:function(e){return Rt(e).l<70}};function Ft(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function _t(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Bt(e){return 1===e.length&&(e=function(e){return function(t,n){return _t(e(t),n)}}(e)),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}}var Ht=Bt(_t).right,$t=Math.sqrt(50),Vt=Math.sqrt(10),Wt=Math.sqrt(2);function Ut(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=$t?10:i>=Vt?5:i>=Wt?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=$t?10:i>=Vt?5:i>=Wt?2:1)}function Kt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=$t?o*=10:i>=Vt?o*=5:i>=Wt&&(o*=2),t<e?-o:o}function Gt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Yt="$";function Xt(){}function Jt(e,t){var n=new Xt;if(e instanceof Xt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Zt(){}Xt.prototype=Jt.prototype={constructor:Xt,has:function(e){return Yt+e in this},get:function(e){return this[Yt+e]},set:function(e,t){return this[Yt+e]=t,this},remove:function(e){var t=Yt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Yt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Yt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Yt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Yt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Yt&&++e;return e},empty:function(){for(var e in this)if(e[0]===Yt)return!1;return!0},each:function(e){for(var t in this)t[0]===Yt&&e(this[t],t.slice(1),this)}};var Qt=Jt.prototype;Zt.prototype={constructor:Zt,has:Qt.has,add:function(e){return this[Yt+(e+="")]=e,this},remove:Qt.remove,clear:Qt.clear,values:Qt.keys,size:Qt.size,empty:Qt.empty,each:Qt.each};var en=Array.prototype,tn=en.map,nn=en.slice;function rn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function on(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function an(){}var sn=.7,ln=1/sn,cn="\\s*([+-]?\\d+)\\s*",un="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",dn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fn=/^#([0-9a-f]{3})$/,pn=/^#([0-9a-f]{6})$/,mn=new RegExp("^rgb\\("+[cn,cn,cn]+"\\)$"),hn=new RegExp("^rgb\\("+[dn,dn,dn]+"\\)$"),gn=new RegExp("^rgba\\("+[cn,cn,cn,un]+"\\)$"),yn=new RegExp("^rgba\\("+[dn,dn,dn,un]+"\\)$"),vn=new RegExp("^hsl\\("+[un,dn,dn]+"\\)$"),bn=new RegExp("^hsla\\("+[un,dn,dn,un]+"\\)$"),xn={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 Sn(e){var t;return e=(e+"").trim().toLowerCase(),(t=fn.exec(e))?new Tn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=pn.exec(e))?Mn(parseInt(t[1],16)):(t=mn.exec(e))?new Tn(t[1],t[2],t[3],1):(t=hn.exec(e))?new Tn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gn.exec(e))?Cn(t[1],t[2],t[3],t[4]):(t=yn.exec(e))?Cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=vn.exec(e))?qn(t[1],t[2]/100,t[3]/100,1):(t=bn.exec(e))?qn(t[1],t[2]/100,t[3]/100,t[4]):xn.hasOwnProperty(e)?Mn(xn[e]):"transparent"===e?new Tn(NaN,NaN,NaN,0):null}function Mn(e){return new Tn(e>>16&255,e>>8&255,255&e,1)}function Cn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tn(e,t,n,r)}function wn(e){return e instanceof an||(e=Sn(e)),e?new Tn((e=e.rgb()).r,e.g,e.b,e.opacity):new Tn}function kn(e,t,n,r){return 1===arguments.length?wn(e):new Tn(e,t,n,null==r?1:r)}function Tn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function En(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function qn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ln(e,t,n,r)}function Ln(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function On(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}rn(an,Sn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),rn(Tn,kn,on(an,{brighter:function(e){return e=null==e?ln:Math.pow(ln,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?sn:Math.pow(sn,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+En(this.r)+En(this.g)+En(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),rn(Ln,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ln)return new Ln(e.h,e.s,e.l,e.opacity);if(e instanceof an||(e=Sn(e)),!e)return new Ln;if(e instanceof Ln)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Ln(a,s,l,e.opacity)}(e):new Ln(e,t,n,null==r?1:r)}),on(an,{brighter:function(e){return e=null==e?ln:Math.pow(ln,e),new Ln(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?sn:Math.pow(sn,e),new Ln(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Tn(On(e>=240?e-240:e+120,o,r),On(e,o,r),On(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Nn=Math.PI/180,Dn=180/Math.PI,An=.96422,In=1,Rn=.82521,Pn=4/29,zn=6/29,jn=3*zn*zn,Fn=zn*zn*zn;function _n(e){if(e instanceof Bn)return new Bn(e.l,e.a,e.b,e.opacity);if(e instanceof Un){if(isNaN(e.h))return new Bn(e.l,0,0,e.opacity);var t=e.h*Nn;return new Bn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Tn||(e=wn(e));var n,r,o=Wn(e.r),i=Wn(e.g),a=Wn(e.b),s=Hn((.2225045*o+.7168786*i+.0606169*a)/In);return o===i&&i===a?n=r=s:(n=Hn((.4360747*o+.3850649*i+.1430804*a)/An),r=Hn((.0139322*o+.0971045*i+.7141733*a)/Rn)),new Bn(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Bn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Hn(e){return e>Fn?Math.pow(e,1/3):e/jn+Pn}function $n(e){return e>zn?e*e*e:jn*(e-Pn)}function Vn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Un(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}rn(Bn,(function(e,t,n,r){return 1===arguments.length?_n(e):new Bn(e,t,n,null==r?1:r)}),on(an,{brighter:function(e){return new Bn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Bn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Tn(Vn(3.1338561*(t=An*$n(t))-1.6168667*(e=In*$n(e))-.4906146*(n=Rn*$n(n))),Vn(-.9787684*t+1.9161415*e+.033454*n),Vn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),rn(Un,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Un)return new Un(e.h,e.c,e.l,e.opacity);if(e instanceof Bn||(e=_n(e)),0===e.a&&0===e.b)return new Un(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Dn;return new Un(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Un(e,t,n,null==r?1:r)}),on(an,{brighter:function(e){return new Un(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Un(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return _n(this).rgb()}}));var Kn=-.14861,Gn=1.78277,Yn=-.29227,Xn=-.90649,Jn=1.97294,Zn=Jn*Xn,Qn=Jn*Gn,er=Gn*Yn-Xn*Kn;function tr(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof nr)return new nr(e.h,e.s,e.l,e.opacity);e instanceof Tn||(e=wn(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(er*r+Zn*t-Qn*n)/(er+Zn-Qn),i=r-o,a=(Jn*(n-o)-Yn*i)/Xn,s=Math.sqrt(a*a+i*i)/(Jn*o*(1-o)),l=s?Math.atan2(a,i)*Dn-120:NaN;return new nr(l<0?l+360:l,s,o,e.opacity)}(e):new nr(e,t,n,null==r?1:r)}function nr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function rr(e){return function(){return e}}function or(e,t){return function(n){return e+n*t}}function ir(e){return 1==(e=+e)?ar:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):rr(isNaN(t)?n:t)}}function ar(e,t){var n=t-e;return n?or(e,n):rr(isNaN(e)?t:e)}rn(nr,tr,on(an,{brighter:function(e){return e=null==e?ln:Math.pow(ln,e),new nr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?sn:Math.pow(sn,e),new nr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Nn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Tn(255*(t+n*(Kn*r+Gn*o)),255*(t+n*(Yn*r+Xn*o)),255*(t+n*(Jn*r)),this.opacity)}}));var sr=function e(t){var n=ir(t);function r(e,t){var r=n((e=kn(e)).r,(t=kn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=ar(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function lr(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=hr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function cr(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function ur(e,t){return t-=e=+e,function(n){return e+t*n}}function dr(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=hr(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var fr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pr=new RegExp(fr.source,"g");function mr(e,t){var n,r,o,i=fr.lastIndex=pr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=fr.exec(e))&&(r=pr.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:ur(n,r)})),i=pr.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function hr(e,t){var n,r=typeof t;return null==t||"boolean"===r?rr(t):("number"===r?ur:"string"===r?(n=Sn(t))?(t=n,sr):mr:t instanceof Sn?sr:t instanceof Date?cr:Array.isArray(t)?lr:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?dr:ur)(e,t)}function gr(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function yr(e){return function t(n){function r(t,r){var o=e((t=tr(t)).h,(r=tr(r)).h),i=ar(t.s,r.s),a=ar(t.l,r.l),s=ar(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function vr(e){return+e}yr((function(e,t){var n=t-e;return n?or(e,n>180||n<-180?n-360*Math.round(n/360):n):rr(isNaN(e)?t:e)})),yr(ar);var br=[0,1];function xr(e){return e}function Sr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Mr(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Cr(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Sr(o,r),i=n(a,i)):(r=Sr(r,o),i=n(i,a)),function(e){return i(r(e))}}function wr(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Sr(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Ht(e,t,1,r)-1;return i[n](o[n](t))}}function kr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Tr(e,t){return function(){var e,t,n,r,o,i,a=br,s=br,l=hr,c=xr;function u(){return r=Math.min(a.length,s.length)>2?wr:Cr,o=i=null,d}function d(t){return isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),ur)))(n)))},d.domain=function(e){return arguments.length?(a=tn.call(e,vr),c===xr||(c=Mr(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=nn.call(e),u()):s.slice()},d.rangeRound=function(e){return s=nn.call(e),l=gr,u()},d.clamp=function(e){return arguments.length?(c=e?Mr(a):xr,d):c!==xr},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Er(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qr(e){return(e=Er(Math.abs(e)))?e[1]:NaN}var Lr,Or=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nr(e){return new Dr(e)}function Dr(e){if(!(t=Or.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Ar(e,t){var n=Er(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}Nr.prototype=Dr.prototype,Dr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ir={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Ar(100*e,t)},r:Ar,s:function(e,t){var n=Er(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Lr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Er(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Rr(e){return e}var Pr,zr,jr,Fr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _r(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):Rr,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Rr,s=e.percent||"%";function l(e){var t=(e=Nr(e)).fill,n=e.align,l=e.sign,c=e.symbol,u=e.zero,d=e.width,f=e.comma,p=e.precision,m=e.trim,h=e.type;"n"===h?(f=!0,h="g"):Ir[h]||(null==p&&(p=12),m=!0,h="g"),(u||"0"===t&&"="===n)&&(u=!0,t="0",n="=");var g="$"===c?o[0]:"#"===c&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===c?o[1]:/[%p]/.test(h)?s:"",v=Ir[h],b=/[defgprs%]/.test(h);function x(e){var o,s,c,x=g,S=y;if("c"===h)S=v(e)+S,e="";else{var M=(e=+e)<0;if(e=v(Math.abs(e),p),m&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),M&&0==+e&&(M=!1),x=(M?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===h?Fr[8+Lr/3]:"")+S+(M&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(c=e.charCodeAt(o))||c>57){S=(46===c?i+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}f&&!u&&(e=r(e,1/0));var C=x.length+e.length+S.length,w=C<d?new Array(d-C+1).join(t):"";switch(f&&u&&(e=r(w+e,w.length?d-S.length:1/0),w=""),n){case"<":e=x+e+S+w;break;case"=":e=x+w+e+S;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+S+w.slice(C);break;default:e=w+x+e+S}return a(e)}return p=null==p?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Nr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(qr(t)/3))),o=Math.pow(10,-r),i=Fr[8+r/3];return function(e){return n(o*e)+i}}}}function Br(e,t,n,r){var o,i=Kt(e,t,n);switch((r=Nr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qr(t)/3)))-qr(Math.abs(e)))}(i,a))||(r.precision=o),jr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qr(t)-qr(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-qr(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return zr(r)}function Hr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,o,i,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=Ut(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++s<o;)i[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),i=new Array(o=Math.ceil(e-t+1));++s<o;)i[s]=(e-s)/a;return r&&i.reverse(),i}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Br(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o=t(),i=0,a=o.length-1,s=o[i],l=o[a];return l<s&&(r=s,s=l,l=r,r=i,i=a,a=r),(r=Ut(s,l,n))>0?r=Ut(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Ut(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(o[i]=Math.floor(s/r)*r,o[a]=Math.ceil(l/r)*r,t(o)):r<0&&(o[i]=Math.ceil(s*r)/r,o[a]=Math.floor(l*r)/r,t(o)),e},e}function $r(){var e=Tr(xr,xr);return e.copy=function(){return kr(e,$r())},Gt.apply(e,arguments),Hr(e)}Pr=_r({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),zr=Pr.format,jr=Pr.formatPrefix;var Vr=new Date,Wr=new Date;function Ur(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Ur((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return Vr.setTime(+t),Wr.setTime(+r),e(Vr),e(Wr),Math.floor(n(Vr,Wr))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Kr=Ur((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Kr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Ur((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Kr:null},Kr.range;var Gr=1e3,Yr=6e4,Xr=36e5,Jr=864e5,Zr=6048e5,Qr=Ur((function(e){e.setTime(Math.floor(e/Gr)*Gr)}),(function(e,t){e.setTime(+e+t*Gr)}),(function(e,t){return(t-e)/Gr}),(function(e){return e.getUTCSeconds()}));Qr.range;var eo=Ur((function(e){e.setTime(Math.floor(e/Yr)*Yr)}),(function(e,t){e.setTime(+e+t*Yr)}),(function(e,t){return(t-e)/Yr}),(function(e){return e.getMinutes()}));eo.range;var to=Ur((function(e){var t=e.getTimezoneOffset()*Yr%Xr;t<0&&(t+=Xr),e.setTime(Math.floor((+e-t)/Xr)*Xr+t)}),(function(e,t){e.setTime(+e+t*Xr)}),(function(e,t){return(t-e)/Xr}),(function(e){return e.getHours()}));to.range;var no=Ur((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yr)/Jr}),(function(e){return e.getDate()-1}));function ro(e){return Ur((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yr)/Zr}))}no.range;var oo=ro(0),io=ro(1),ao=ro(2),so=ro(3),lo=ro(4),co=ro(5),uo=ro(6);oo.range,io.range,ao.range,so.range,lo.range,co.range,uo.range;var fo=Ur((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));fo.range;var po=Ur((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));po.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ur((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},po.range;var mo=Ur((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Yr)}),(function(e,t){return(t-e)/Yr}),(function(e){return e.getUTCMinutes()}));mo.range;var ho=Ur((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Xr)}),(function(e,t){return(t-e)/Xr}),(function(e){return e.getUTCHours()}));ho.range;var go=Ur((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Jr}),(function(e){return e.getUTCDate()-1}));function yo(e){return Ur((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Zr}))}go.range;var vo=yo(0),bo=yo(1),xo=yo(2),So=yo(3),Mo=yo(4),Co=yo(5),wo=yo(6);vo.range,bo.range,xo.range,So.range,Mo.range,Co.range,wo.range;var ko=Ur((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));ko.range;var To=Ur((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Eo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Lo(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}To.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ur((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},To.range;var Oo,No,Do,Ao={"-":"",_:" ",0:"0"},Io=/^\s*\d+/,Ro=/^%/,Po=/[\\^$*+?|[\]().{}]/g;function zo(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function jo(e){return e.replace(Po,"\\$&")}function Fo(e){return new RegExp("^(?:"+e.map(jo).join("|")+")","i")}function _o(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Bo(e,t,n){var r=Io.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=Io.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function $o(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Vo(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Uo(e,t,n){var r=Io.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ko(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Go(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yo(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Xo(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Jo(e,t,n){var r=Io.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Zo(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qo(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ei(e,t,n){var r=Io.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ti(e,t,n){var r=Io.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ni(e,t,n){var r=Io.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ri(e,t,n){var r=Ro.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function oi(e,t,n){var r=Io.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ii(e,t,n){var r=Io.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function ai(e,t){return zo(e.getDate(),t,2)}function si(e,t){return zo(e.getHours(),t,2)}function li(e,t){return zo(e.getHours()%12||12,t,2)}function ci(e,t){return zo(1+no.count(po(e),e),t,3)}function ui(e,t){return zo(e.getMilliseconds(),t,3)}function di(e,t){return ui(e,t)+"000"}function fi(e,t){return zo(e.getMonth()+1,t,2)}function pi(e,t){return zo(e.getMinutes(),t,2)}function mi(e,t){return zo(e.getSeconds(),t,2)}function hi(e){var t=e.getDay();return 0===t?7:t}function gi(e,t){return zo(oo.count(po(e),e),t,2)}function yi(e,t){var n=e.getDay();return e=n>=4||0===n?lo(e):lo.ceil(e),zo(lo.count(po(e),e)+(4===po(e).getDay()),t,2)}function vi(e){return e.getDay()}function bi(e,t){return zo(io.count(po(e),e),t,2)}function xi(e,t){return zo(e.getFullYear()%100,t,2)}function Si(e,t){return zo(e.getFullYear()%1e4,t,4)}function Mi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zo(t/60|0,"0",2)+zo(t%60,"0",2)}function Ci(e,t){return zo(e.getUTCDate(),t,2)}function wi(e,t){return zo(e.getUTCHours(),t,2)}function ki(e,t){return zo(e.getUTCHours()%12||12,t,2)}function Ti(e,t){return zo(1+go.count(To(e),e),t,3)}function Ei(e,t){return zo(e.getUTCMilliseconds(),t,3)}function qi(e,t){return Ei(e,t)+"000"}function Li(e,t){return zo(e.getUTCMonth()+1,t,2)}function Oi(e,t){return zo(e.getUTCMinutes(),t,2)}function Ni(e,t){return zo(e.getUTCSeconds(),t,2)}function Di(e){var t=e.getUTCDay();return 0===t?7:t}function Ai(e,t){return zo(vo.count(To(e),e),t,2)}function Ii(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Mo(e):Mo.ceil(e),zo(Mo.count(To(e),e)+(4===To(e).getUTCDay()),t,2)}function Ri(e){return e.getUTCDay()}function Pi(e,t){return zo(bo.count(To(e),e),t,2)}function zi(e,t){return zo(e.getUTCFullYear()%100,t,2)}function ji(e,t){return zo(e.getUTCFullYear()%1e4,t,4)}function Fi(){return"+0000"}function _i(){return"%"}function Bi(e){return+e}function Hi(e){return Math.floor(+e/1e3)}!function(e){Oo=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Fo(o),u=_o(o),d=Fo(i),f=_o(i),p=Fo(a),m=_o(a),h=Fo(s),g=_o(s),y=Fo(l),v=_o(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ai,e:ai,f:di,H:si,I:li,j:ci,L:ui,m:fi,M:pi,p:function(e){return o[+(e.getHours()>=12)]},Q:Bi,s:Hi,S:mi,u:hi,U:gi,V:yi,w:vi,W:bi,x:null,X:null,y:xi,Y:Si,Z:Mi,"%":_i},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Ci,e:Ci,f:qi,H:wi,I:ki,j:Ti,L:Ei,m:Li,M:Oi,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Bi,s:Hi,S:Ni,u:Di,U:Ai,V:Ii,w:Ri,W:Pi,x:null,X:null,y:zi,Y:ji,Z:Fi,"%":_i},S={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:Xo,e:Xo,f:ni,H:Zo,I:Zo,j:Jo,L:ti,m:Yo,M:Qo,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},Q:oi,s:ii,S:ei,u:Ho,U:$o,V:Vo,w:Bo,W:Wo,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:Ko,Y:Uo,Z:Go,"%":ri};function M(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Ao[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=Lo(1900);if(w(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=qo(Lo(i.y))).getUTCDay(),r=o>4||0===o?bo.ceil(r):bo(r),r=go.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(Lo(i.y))).getDay(),r=o>4||0===o?io.ceil(r):io(r),r=no.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?qo(Lo(i.y)).getUTCDay():t(Lo(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,qo(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=S[o in Ao?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Eo);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,qo);return t.toString=function(){return e},t}}}(e),Oo.format,Oo.parse,No=Oo.utcFormat,Do=Oo.utcParse}({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"]});var $i="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||No($i),+new Date("2000-01-01T00:00:00.000Z")||Do($i);var Vi=1e3,Wi=60*Vi,Ui=60*Wi,Ki=24*Ui,Gi=7*Ki,Yi=30*Ki,Xi=365*Ki;function Ji(e){return new Date(e)}function Zi(e){return e instanceof Date?+e:+new Date(+e)}function Qi(e,t,n,r,o,i,a,s,l){var c=Tr(xr,xr),u=c.invert,d=c.domain,f=l(".%L"),p=l(":%S"),m=l("%I:%M"),h=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,Vi],[a,5,5*Vi],[a,15,15*Vi],[a,30,30*Vi],[i,1,Wi],[i,5,5*Wi],[i,15,15*Wi],[i,30,30*Wi],[o,1,Ui],[o,3,3*Ui],[o,6,6*Ui],[o,12,12*Ui],[r,1,Ki],[r,2,2*Ki],[n,1,Gi],[t,1,Yi],[t,3,3*Yi],[e,1,Xi]];function S(s){return(a(s)<s?f:i(s)<s?p:o(s)<s?m:r(s)<s?h:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function M(t,n,r,o){if(null==t&&(t=10),"number"==typeof t){var i=Math.abs(r-n)/t,a=Bt((function(e){return e[2]})).right(x,i);a===x.length?(o=Kt(n/Xi,r/Xi,t),t=e):a?(o=(a=x[i/x[a-1][2]<x[a][2]/i?a-1:a])[1],t=a[0]):(o=Math.max(Kt(n,r,t),1),t=s)}return null==o?t:t.every(o)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(tn.call(e,Zi)):d().map(Ji)},c.ticks=function(e,t){var n,r=d(),o=r[0],i=r[r.length-1],a=i<o;return a&&(n=o,o=i,i=n),n=(n=M(e,o,i,t))?n.range(o,i+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=M(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}(n,e)):c},c.copy=function(){return kr(c,Qi(e,t,n,r,o,i,a,s,l))},c}function ea(){return Gt.apply(Qi(To,ko,vo,go,ho,mo,Qr,Kr,No).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const ta={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},na=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var ra={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[o,i]=t(),a=Math.abs(o)<1e-15,s=Math.abs(i-1)<1e-15,l=(e=>{const t=ta[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:na(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:na(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function oa({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:o}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:o,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let ia;function aa(){ia=ia||document.createElement("canvas").getContext("2d")}const sa={measureTextWidth(e){aa();const{width:t}=ia.measureText(e);return t},lineWrap(e,t,n,r){let o,i;aa();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,f=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(ia.font=n),i=0;i<a.length;i++){for(d=a[i]||"",f=d.split(/\s+/),[p]=f,u="",o=1;o<f.length;o++)if(l=`${p} ${f[o]}`,c=sa.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=f[o]):p=l,"number"==typeof r&&s.length>=r){u=f.slice(o+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${p} ${u}`}return s},wordWrap(e,t,n,r,o){if(aa(),!e||!e.length)return[];n&&(ia.font=n);let i=[];const a=e.slice();let s,l,c,u;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||sa.measureTextWidth(c)<=t?i.push(c):(s=sa.splitWord(c,t,void 0,r-i.length),s.length<=1?i.push(s[0]):(l=s.pop(),i=i.concat(s),a[u+1]?sa.measureTextWidth(`${l} ${a[u+1]}`)>t&&i.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return i.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),i.length>r?(i=i.splice(0,r),i[i.length-1]=sa.truncate(i[i.length-1],t,n,o).text):(c=i[i.length-1],c&&c.length>1&&sa.measureTextWidth(c)>t&&(i[i.length-1]=sa.truncate(c,t,n,o).text)),i},truncate(e,t,n,r="…"){aa();let o,i,a,s,l=e;const c=sa.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(ia.font=n),e&&t){if(sa.measureTextWidth(l)>t){for(o=Math.min(u,l.length);o>0;o--)if(i=l.substring(0,o-1),a=i.trim()+r,sa.measureTextWidth(a)<=t){s=l.substring(o-1),l=a;break}o||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let o;aa();let i,a=e,s="",l=[];if(sa.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(o=Math.min(e.length,c);o>0&&(a=e.substring(0,o),i=e.substring(o-1,o)," "===i?a=e.substring(0,o-1):a+="-",s=e.substring(o),!(sa.measureTextWidth(a)<=t));o--);return(!o&&!a||sa.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(sa.measureTextWidth(s)>t?(s=sa.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(aa(),e&&t?(n&&(ia.font=n),sa.explodeWord(e,t,r,Math.max(1,sa.measureTextWidth("i")))):[]),wrapText(e,t,n,r,o){let i;return Number.isNaN(t)?[e]:(i=r>1?sa.lineWrap(e,t,n,r):[e],i=sa.wordWrap(i,t,n,r,o),i)},getFontHeight:e=>(aa(),e&&(ia.font=e),1.5*sa.measureTextWidth("m")),tokenize(e,t,n,r,o,i,a=1){aa(),t&&(ia.font=t);const s=sa.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(i<s)return[];const f=i?Math.max(1,Math.floor(i/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{u+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{c.push(Number.isNaN(e)||e<=0?f-u:e)}))):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<f&&(d=d.concat(sa.wrapText(e,o,t,c[n])))})):d=sa.wrapText(e,o,t,c[0],n),d}},la={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(ue({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},ca=ue.bind(null,!0),ua={},{isArray:da}=Array;function fa(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pa(e){return void 0===e}function ma(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ha(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=pa(e[r||t])?i:e[t],e=e[r||t]})),e}function ga(e,t){let n=!0;if(fa(e)&&fa(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{ga(e[r],t[r])||(n=!1)})),n);if(da(e)&&da(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!ga(e[n],t[n]))return!1;return!0}return e===t}ua.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?ca({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;ga(i,a)||ma(t,o)||(pa(a)?r.push({op:"add",path:s,value:i}):fa(i)&&fa(a)?r=r.concat(ua.generate(a,i,s)):da(i)&&da(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&pa(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(ga(t,o))return r;if(!pa(t[0])&&pa(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(ua.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{pa(t[o])&&!ma(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},ua.apply=function(e,t){t.forEach((t=>{let n=ha(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(da(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(da(o)&&da(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(fa(o)&&fa(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ma(a,e)&&delete a[e]})),ca(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=ha(e,t.from);da(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(da(n)?n.splice(+r,1):delete n[r]);var a}))},ua.clone=function(e){return ca({},e)},ua.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},ua.updateObject=function(e,t){Object.keys(e).length?ua.apply(e,ua.generate(e,t)):ca(e,t)};const ya=Math.log(10);function va(e){return 10**e}const ba={pow10:va,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/ya,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/ya),r=e/va(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*va(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/ya);const r=e/va(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*va(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return va(Math.floor(Math.log(Math.abs(e))/ya))},getFraction(e){if(0===e)return 0;return e/va(Math.floor(Math.log(Math.abs(e))/ya))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/ya),r=e/va(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*va(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},xa=[[2,4,6],[2,4],[3]],Sa=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Ma(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function Ca(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)Ma(e[r],t,n)}!function(){let e,t;for(Ca(xa,1,10),e=0;e<Sa.length;e++)if(Sa[e])for(t=0;t<Sa[e].length;t++)Array.isArray(Sa[e][t])&&Ca(Sa[e][t])}();const wa={isInside(e,t,n,r){if(!r)return!0;const o=e.position-e.radius,i=e.position+e.radius;return o>=t&&i<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=wa.findSegmentPositionMeetMin(e,t);return wa.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=wa.findSegmentPositionMeetMax(e,n);return wa.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const o=e.length-1;let i,a,s=t;for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.position=wa.findSegmentPositionMeetMaxThenMin(i,s,(i.center+a.center-r)/2),s=i.position+i.radius+r/2;a.position=wa.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const o=e.length-1;let i,a,s;const l=Math.max(0,e[o].position+e[o].radius-n);if(0===l)return;let c,u=0;for(i=o;i>0&&(a=e[i],s=e[i-1],c=Math.max(0,wa.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));i--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,i=0;i<=o;i++)a=e[i],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const o=e.length-1;if(!(o<0))if(0!==o)wa.layoutPositionFromMin(e,t,n,r),wa.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=wa.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ka=(e,t,n,r=1)=>{const o=e.bandwidth();return n?"start"===t?o:"end"===t?o*(1-r):o*(2-r)/2:"start"===t?0:"end"===t?o*r:o*r/2},Ta=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,Ea=e=>e.filter(Ta),qa=(e,t)=>Ea(Me.getValue(e,t,[])),La=e=>Ta(e)&&(!1!==e.showValue||!1!==e.showLabel),Oa=e=>e.filter(La),Na=(e,t)=>Oa(Me.getValue(e,t,[])),Da=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,Aa=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},Ia=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},Ra=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+o},Pa=({value:e,qMin:t})=>"NaN"!==t&&e<t,za=({value:e,qMax:t})=>"NaN"!==t&&e>t,ja={isRefLineVisible:Ta,getVisibleRefLines:Ea,getRefLines:qa,getMeasureRefLines:e=>qa(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:qa(e,"refLine.dimRefLines"),isRefLineLabelVisible:La,getVisibleRefLineLabels:Oa,getRefLineLabels:Na,getMeasureRefLineLabels:e=>Na(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:Na(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:o,invert:i=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=ka(s,o,i,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=ka(s,o,i,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:o})=>{const i=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-i*(s-o)}})({pxScale:s,value:n,innerValues:e,invert:i,minOrder:a})),(void 0===c?s(n):c)+l}return l=ka(s,o,i),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:o}=r.meta,i={},a=Me.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():Me.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=s?"qData.0.qSubNodes":"qMatrix",u=Me.getValue(l,c,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),f=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+f,r=t[d];i[r]||(i[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():o?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],o=t+f,a=n[d];i[a]?(i[a].minOrder=Math.min(i[a].minOrder,o),i[a].maxOrder=Math.max(i[a].maxOrder,o),i[a].innerValues[i[a].innerValues.length]={id:r.qElemNumber,order:o}):i[a]={id:n.qElemNumber,qText:n.qText,minOrder:o,maxOrder:o,innerValues:[{id:r.qElemNumber,order:o}]},0===t?0===o&&(i[a].isMinOrderOk=!0):a!==e&&(i[a].isMinOrderOk=!0,i[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+f,r=t[d];i[r]||(i[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),i},getInputValue:Da,extractInfoFromInputValue:Aa,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Da({refLineLayout:e,layoutService:n});return Aa(r,t,"id")},isDiscreteMinOutOfBounds:Ia,isDiscreteMaxOutOfBounds:Ra,isContinuousMinOutOfBounds:Pa,isContinuousMaxOutOfBounds:za,isOutOfRange:({value:e,qMin:t,qMax:n})=>Pa({value:e,qMin:t})||za({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Ra({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Ia({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Fa="…";function _a(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines=sa.tokenize(o.title,t,`${Fa} ${o.valueString}`,3,n),o.maxNumLines=o.lines.length}}function Ba({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=sa.tokenize(e,t,n,r,o),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n${i[e]}`}return s}function Ha({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=e.map((e=>Ba({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:o}))),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n\n${i[e]}`}return s}function $a(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Va=3,Wa=2;function Ua({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Ka=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ja.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ja.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ja.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ja.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Ga={hasEngineFormat:Ua,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:o,rtl:i,isContinuous:a,isDimension:s}){const l=ja.getInvert({orientation:o,rtl:i,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let f,p;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");f=e.qMin,p=e.qMax}for(let o=0;o<e.length;o++){const i=e[o],{value:s,align:c,valueInfo:d}=i,m=Ka({label:i,dataPages:u,qMin:f,qMax:p});i.scaledValue=1===m?l?-.1:1.1:-1===m?l?1.1:-.1:ja.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),i.center=i.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:o}){let i;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;i=Ua({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,r.valueString=`${je.lrm}(${i})${je.lrm}`,r.title=Ga.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;i=Ua({inputValue:a,inputValueLabel:s,localeInfo:o})?s:r,n.valueString=`${je.lrm}(${i})${je.lrm}`,n.title=Ga.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];i=n.valueText,n.valueString=`${je.lrm}(${i})${je.lrm}`,n.title=Ga.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth(e,t){const n=Math.max(...e.lines.map((e=>t(e).width)));return n},getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const o=e.length-1;if(o<0)return;let i,a;if([i]=e,i.cMin=t,0!==o){for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.cMax=(i.center+a.center-r)/2,a.cMin=i.cMax+r;a.cMax=n}else i.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,o=e.filter((e=>e.maxNumLines===t)),i=Math.min(n,o.length);for(let e=o.length-1;e>=o.length-i;e--)o[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let o=3;do{const t=Ga.getTotalNumLines(e)-r;if(t<=0)return;Ga.reduceLabelsHavingMaxNumLines(e,o,t),o--}while(o>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const o=e[r];o.maxNumLines=Math.max(1,Math.min(o.maxNumLines,Math.floor((Math.max(0,o.cMax-o.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let o=0;o<e.length;o++){const i=e[o];i.width=Math.min(t,Ga.measureLabelMaxLineWidth(i,r)),i.height=i.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:o}=r,i=r[t],a=i/2;r.segment={center:o,range:i,min:o-a,max:o+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:o,gap:i,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:f,layoutService:p,isContinuous:m,isDimension:h}){const g=e.map((e=>e)),y=n;Ga.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:p,orientation:u,rtl:f,isContinuous:m,isDimension:h}),$a(e,"center"),Ga.addLabelsNeighborInfo(e,r,o,i),_a(e,a,s),Ga.reduceTotalMaxNumLines(g,l,o-(g.length-1)*i),"vertical"===u&&(Ga.reduceMaxNumLines(e,l,.05*i),function(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines.length>o.maxNumLines&&(o.lines=sa.tokenize(o.title,t,`${Fa} ${o.valueString}`,o.maxNumLines,n))}}(e,a,s)),Ga.addLabelsSize(e,s,l,d),Ga.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:o,lineHeight:i=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=o,{fontSize:d,fontFamily:f,background:p}=t;let m=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,o=t.map(((t,o)=>{const p={type:"text",text:t,title:Ba({title:e.title,font:a,ellipsis:`… ${e.valueString}`}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return p[l]=u,p[s]=e.segment.position,p.y+=(o-(r-1)/2)*i,p}));e.background&&m.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:o,lineHeight:i,background:a}){const{lines:s}=o,{borderRadius:l=Va,padding:c={}}=a,{top:u=Wa,bottom:d=Wa,left:f=Wa,right:p=Wa}=c,m=s.length,h={type:"rect",rx:l,ry:l,fill:o.background.fill,width:o.width+(f+p),height:o.height+(u+d),value:o.value,dock:r};return h[n]=e,h[t]=o.segment.position,h.x-=o.width/2+f,h.y-=m*i/2+u,h}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:i,background:p})),m=m.concat(o)})),m}};function Ya(e,t,n){let r;const o=typeof t;if("string"===o||"object"===o)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function Xa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:o,bottom:i,maxLabelWidth:a}=t;let s=1;return Ga.getMaxTextWidth(e)>a&&(_a(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+o+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:o}=t;return Math.min(o,Ga.getMaxTextWidth(e))+n+r}(t,n)}function Ja(e,t){return t?e.domain():[0,1]}function Za(e,t,n,r="value"){let o=e.filter((e=>e[r]>=t));o=o.filter((e=>e[r]<=n));const i=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:o,minOobs:i,maxOobs:a,numMinOobs:i.length,numMaxOobs:a.length}}function Qa(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function es(e,t){return e>9?t[1]:t[0]}function ts({alignment:e,dockValue:t,oobs:n,style:r,rect:o,symbol:i,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:f,minorAxis:p,minorDimension:m,dock:h}=s,g=o[m],y=la.createOob({oob:la.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:i});y.dock=h;const v=`c${f}`,b=`c${p}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:h};x[b]=g/2,x[v]=a;const S={type:"text",text:u>9?"9+":u,title:Ha({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:h};return S[p]=g/2,S[f]=a,[y,x,S]}function ns(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:sa.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const rs=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var os={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:o}=this.settings,i=!!r||n.meta.canBeContinuous,a=rs(this.settings.labels),s=Ya(this.chart,this.settings.formatter,e);Ga.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:i,localeInfo:o});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:o})=>{if(n){const[r,o]=Ja(t,n);return Za(e,r,o)}if(r){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Za(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:i,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),u&&u.length){const e=ns(t.label),{dock:n}=this.settings.layout;return Ga.measureLabelsWidth(u,this.measureText),d=Xa(n,u,e),d}const f=Qa(this.measureText),p=l?es(l,f):0,m=c?es(c,f):0;return d=Math.max(p,m),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:o,isContinuous:i,isDimension:a,localeInfo:s}=this.settings,l=!!i||r.meta.canBeContinuous,c=rs(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:f}=n.label,p=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),m=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,p,f),{orientation:h,majorDimension:g}=p,{majorSize:y}=m,{font:v,lineHeight:b,gap:x,maxLabelWidth:S}=ns(n.label),M=Ya(this.chart,this.settings.formatter,e),C=y;Ga.addLabelTitles({labels:c,formatter:M,isContinuous:i,canBeContinuous:l,localeInfo:s}),Ga.calculateLabelPositions({labels:c,scale:e,size:C,layoutService:r,orientation:h,rtl:d,isContinuous:i,isDimension:a});const[w,k]=Ja(e,i),{filteredLabels:T,lowerOobs:E,upperOobs:q,lowerCircleSize:L,upperCircleSize:O,lowerOobSpace:N,upperOobSpace:D}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:o,isContinuous:i,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:f}=Za(e,t,n,c),p="scaledValue"!==c&&ja.getInvert({orientation:r,rtl:o,isContinuous:i}),m=function(e,t,n){return n?t:e}(d,u,p),h=function(e,t,n){return n?e:t}(d,u,p),g=m.length,y=h.length,v=Qa(l),b=es(g,v),x=es(y,v),S=function(e,t,n,r,o){return("vertical"===r?o.top:o.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),M=function(e,t,n,r,o){return("vertical"===r?o.bottom:o.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:f,lowerOobs:m,upperOobs:h,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:M}}({labels:c,minValue:w,maxValue:k,orientation:h,rtl:d,isContinuous:i,style:n,padding:f,measureText:this.measureText,prop:i?"value":"scaledValue"}),A=N,I=y-D;$a(E),$a(q);const R=ts({alignment:0,dockValue:0,oobs:E,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+L/2,areaProps:p,radius:L/2,font:v}),P=ts({alignment:1,dockValue:1,oobs:q,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+O/2),areaProps:p,radius:O/2,font:v});Ga.addLabelsInfo({labels:T,scale:e,majorSize:y,lowerLimit:A,upperLimit:I,font:v,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:h,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:i,isDimension:a}),wa.layout(T.map((e=>e.segment)),A,I,n.label.gap);const z=T.filter((e=>wa.isInside(e.segment,A,I,i)));return Ga.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:p,area:m,lineHeight:b,font:v,theme:o}).concat([...R,...P])}};var is={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function as(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:a,qStackedDataPages:s,qTreeDataPages:l,...c}=t,u=ue(!0,{},{...n,qHyperCube:{...c,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:d}=is;return d.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==o(u,e)&&i(u,e,null);else{const e=t[0],n=t[1].split("].")[1];o(u,e,[]).forEach((e=>{void 0!==o(e,n)&&i(e,n,null)}))}})),u}var ss={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return o=>{if(e||t||n){var i;if("line"===o.type)return null!==(i=o.tickValue)&&void 0!==i?i:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?`${o.data.group.value} `:""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:o}){return({currentNodes:i,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===o&&i.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==o&&"right"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?i.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?i.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):i.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=o):e.transform=`translate(${-r}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=r):(e.x-=r,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:o/e.major.size,n="y"===e.minor.p?o/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.cx-=r,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y,i=t.width-n.width,a=t.height-n.height;let s=-r,l=-o;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":i<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=as(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=as(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:ls,extractInfoFromInputValue:cs,resolveValue:us}=ja;var ds={resolveValue:us,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=ls({refLineLayout:e,layoutService:n});return cs(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=ls({refLineLayout:e,layoutService:n});return cs(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:o}=n.meta,i=ls({refLineLayout:e,layoutService:n});return r[i]&&o?r[i].qText:i},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=ls({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[r]}};const fs=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:o,dockService:i,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{var f,p;const m={dir:l,line:{strokeWidth:(null==t||null===(f=t.style)||void 0===f?void 0:f.lineThickness)||2,strokeDasharray:null==t||null===(p=t.style)||void 0===p?void 0:p.lineType,stroke:o.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(m.scale=s,m.value=t.refLineExpr.value):(m.valueInfo=ds.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),m.value=()=>{var e;const o=ja.getScaledPosition({scale:a.scale(s),value:ds.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:m.valueInfo,size:null===(e=a.component(u))||void 0===e?void 0:e.rect["horizontal"===i.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(o)?void 0:o}),m};function ps({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:o,animationsEnabled:i,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:f,minimumLayoutMode:p}){const m=e?t.dimensionRefLines:f?t.query.getRefLines(f):t.measureRefLines;if(!m.length)return!1;const h={key:u,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:i,trackBy:ss.lines.trackBy,compensateForLayoutChanges:ss.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==o.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return m.forEach((i=>{h.lines[l].push(fs({isDimension:e,refLineLayout:i,refLineModel:t,layoutService:n,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))})),h}const ms={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}},hs=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:o,scale:i,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:f})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:o,formatter:a,scale:i,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:f,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:ss.refLineLabels.trackBy,compensateForLayoutChanges:ss.refLineLabels.compensateForLayoutChanges}}),gs=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:o,theme:i,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?i.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=o,l.value=e.refLineExpr.value):(l.value=()=>ds.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>ds.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>ds.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l};function ys({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:o,dock:i,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:f,path:p}){const m=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!m.length)return[];const h=[],g=!e||n.meta.isContinuous,y=m.map((e=>gs({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g})));return h.push(hs({isDimension:e,rtl:d,style:ue(!0,ms,s),dock:i,key:f,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:o,theme:c,isContinuous:g,localeInfo:u})),h}const vs={combineBounds(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE;return e.forEach((e=>{e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),o=Math.max(o,e.y,e.y+e.height))})),{x:t,y:r,width:n-t,height:o-r}}},bs=(e,t,n)=>{if(!e)return Promise.resolve();let r=ua.generate(t,n);return ue(!0,t,n),r&&r.length?(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0)):Promise.resolve()},xs=e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))};function Ss(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}const Ms={ref:null,refFn:e=>{var t;const n=null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.findIndex((e=>{var t;return"colorByExpression"===(null===(t=e.qAttributeExpressions)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.id)}));return`qHyperCubeDef.qMeasures.${-1===n?0:n}.qAttributeExpressions.0.qExpression`},change(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t||null===(t=t.qMeasures)||void 0===t?void 0:t.findIndex((e=>{var t;return"colorByExpression"===(null===(t=e.qAttributeExpressions)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.id)})),r=Me.getValue(e,`qHyperCubeDef.qMeasures.${-1===n?0:n}.qAttributeExpressions.0`),o=Me.getValue(e,"color");r&&(r.id="colorByExpression",o&&(o.colorExpression=r.qExpression))}},Cs={d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"},ws={d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"},ks={d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"},Ts={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},Es={d:"m 13.914 4.5 l -7.707 7.707 L 2 8 l 0.707 -0.707 l 3.5 3.5 l 7 -7 Z"},qs={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},Ls={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},Os={single:"N",drillDown:"H",cyclic:"C"},Ns={N:void 0,H:Cs,C:ks},Ds=(e,t)=>{switch(e.qGrouping){case Os.single:return;case Os.drillDown:return{path:Cs,tooltip:"Tooltip.dimensions.drilldown",onClick:void 0};case Os.cyclic:return{path:t?ws:ks,tooltip:"Tooltip.dimensions.cyclic",onClick:t?({onError:n})=>{t.getDimension(e.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):n()})).catch((()=>null))}:void 0};default:return}};function As(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=ua.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function Is(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=ue(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],i||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,o&&o({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),As(e,a,c)}))}function Rs(e){return e.qGrouping===Os.single?e.qFallbackTitle||"":e.title||""}const Ps=async(e,t,n,r,o,i="/qHyperCubeDef")=>{const a=!o;switch(e.qGrouping){case Os.drillDown:{const n=e.qGroupFallbackTitles.slice(0,e.qGroupPos+1),o=a?[]:n.map(((n,o)=>({id:`${e.cId}-${o}`,title:n,selected:e.qGroupPos===o,onSelect:()=>{t.drillUp(i,r,e.qGroupPos-o)}})));return{id:e.cId,icon:a?void 0:Cs,groupItem:!a,title:e.title,selected:a,children:o}}case Os.cyclic:{const t=await(null==n?void 0:n.getDimension(e.qLibraryId)),r=a||!(null!=t&&t.setActiveField)?[]:e.qGroupFallbackTitles.map(((n,r)=>({id:`${e.cId}-${r}`,title:n,selected:e.qGroupPos===r,onSelect:()=>{t.setActiveField(r).catch((()=>null))}})));return{id:e.cId,icon:a?void 0:ks,groupItem:!a,title:e.title,selected:a,children:r}}default:return{selected:!0,id:e.cId,title:Rs(e)}}},zs=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))},js=async(e,t,n,r,o,i)=>{const a=await zs(e,n),s=!i,l=n.filter((e=>!a.includes(e.qDef.cId))),c=await Promise.all(l.map((async n=>{const i=await((e,t)=>{if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null))})(n,e),a=await function(e,t,n,r){if(e.qLibraryId)return r?r.qDim.qGrouping===Os.single&&r.qDim.qLabelExpression?Promise.resolve(r.qDim.qLabelExpression):Promise.resolve(r.qDim.title):Promise.resolve(n.get("Object.ErrorMessage.MissingDimension"));const o=e.qDef.qLabelExpression;if(o)return t.evaluate(o);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(n,e,r,i),l=(null==i?void 0:i.qDim.qGrouping)||n.qDef.qGrouping,c=s?void 0:Ns[l],u=!s&&l!==Os.single;return{id:n.qDef.cId,icon:c,groupItem:u,selected:!1,title:a,onSelect(e){Is(t,e,n.qDef.cId,"qDimensions",o)}}})));return c};function Fs({column:e,dir:t,dock:n,altList:r,model:o,translator:i,app:a,onChange:s,activeInfo:l,allowChangeOfAlternatives:c,isCyclicFFEnabled:u}){const d=l.qGrouping===Os.single;return 0!==r.length||u&&!d?{dir:t,dock:n,getPopoverOptions:async()=>{const t=await Ps(l,o,a,e,u),n=c?await js(a,o,r,i,s,u):[];return(d||0===t.children.length)&&0===n.length?[]:[t,...n]}}:null}function _s(e,t,n,r,o="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===Os.drillDown?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:Ds(e,r),index:t,locked:!!e.qLocked,text:e.qGrouping===Os.single?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:Rs(e),...n&&{drillUp(e){n.drillUp(o,t,e)}},id:e.cId}}function Bs({activeInfo:e,altList:t,app:n,dir:r,dock:o,model:i,onChange:a,skipAttributeExpressions:s,translator:l,allowChangeOfAlternatives:c}){return 0===t.length?null:{dir:r,dock:o,getPopoverOptions:async()=>{const r=[{id:e.cId,title:e.qFallbackTitle,selected:!0,onSelect:()=>{}}],o=await zs(n,t),u=t.filter((e=>!o.includes(e.qDef.cId))),d=c?await Promise.all(u.map((async e=>{const t=await function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,n,l);return{id:e.qDef.cId,selected:!1,title:t,onSelect(t){Is(i,t,e.qDef.cId,"qMeasures",a,s)}}}))):[];return 0===d.length?[]:[...r,...d]}}}function Hs(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$s.apply(this,arguments)}var Vs={exports:{}};function Ws(){}function Us(){}Us.resetWarningCache=Ws;Vs.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Us,resetWarningCache:Ws};return n.PropTypes=n,n}();var Ks=Q(Vs.exports),Gs={black:"#000",white:"#fff"},Ys={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Xs={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Js={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Zs={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Qs={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},el={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},tl={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}function rl(e){return rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rl(e)}function ol(e){return e&&"object"===rl(e)&&e.constructor===Object}function il(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?nl({},e):e;return ol(e)&&ol(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(ol(t[o])&&o in e?r[o]=il(e[o],t[o],n):r[o]=t[o])})),r}function al(e){var t=function(e,t){if("object"!==rl(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==rl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===rl(t)?t:String(t)}function sl(e,t,n){return(t=al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ll(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function cl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function ul(e){if(e.type)return e;if("#"===e.charAt(0))return ul(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(ll(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function dl(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function fl(e){var t="hsl"===(e=ul(e)).type?ul(function(e){var t=(e=ul(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),dl({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function pl(e,t){return e=ul(e),t=cl(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,dl(e)}function ml(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function hl(e,t){if(null==e)return{};var n,r,o=ml(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gl=["xs","sm","md","lg","xl"];function yl(e,t,n){var r;return nl({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),nl({paddingLeft:t(2),paddingRight:t(2)},n,sl({},e.up("sm"),nl({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},sl(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),sl(r,e.up("sm"),{minHeight:64}),r)},n)}var vl={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Gs.white,default:tl[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},bl={text:{primary:Gs.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:tl[800],default:"#303030"},action:{active:Gs.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function xl(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=ul(e),t=cl(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return dl(e)}(e.main,o):"dark"===t&&(e.dark=function(e,t){if(e=ul(e),t=cl(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return dl(e)}(e.main,i)))}function Sl(e){var t=e.primary,n=void 0===t?{light:Js[300],main:Js[500],dark:Js[700]}:t,r=e.secondary,o=void 0===r?{light:Xs.A200,main:Xs.A400,dark:Xs.A700}:r,i=e.error,a=void 0===i?{light:Ys[300],main:Ys[500],dark:Ys[700]}:i,s=e.warning,l=void 0===s?{light:el[300],main:el[500],dark:el[700]}:s,c=e.info,u=void 0===c?{light:Zs[300],main:Zs[500],dark:Zs[700]}:c,d=e.success,f=void 0===d?{light:Qs[300],main:Qs[500],dark:Qs[700]}:d,p=e.type,m=void 0===p?"light":p,h=e.contrastThreshold,g=void 0===h?3:h,y=e.tonalOffset,v=void 0===y?.2:y,b=hl(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=fl(e),r=fl(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,bl.text.primary)>=g?bl.text.primary:vl.text.primary;return t}var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=nl({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(ll(4,t));if("string"!=typeof e.main)throw new Error(ll(5,JSON.stringify(e.main)));return xl(e,"light",n,v),xl(e,"dark",r,v),e.contrastText||(e.contrastText=x(e.main)),e},M={dark:bl,light:vl};return il(nl({common:Gs,type:m,primary:S(n),secondary:S(o,"A400","A200","A700"),error:S(a),warning:S(l),info:S(u),success:S(f),grey:tl,contrastThreshold:g,getContrastText:x,augmentColor:S,tonalOffset:v},M[m]),b)}function Ml(e){return Math.round(1e5*e)/1e5}function Cl(e){return Ml(e)}var wl={textTransform:"uppercase"},kl='"Roboto", "Helvetica", "Arial", sans-serif';function Tl(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?kl:r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,c=n.fontWeightRegular,u=void 0===c?400:c,d=n.fontWeightMedium,f=void 0===d?500:d,p=n.fontWeightBold,m=void 0===p?700:p,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=hl(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=v||function(e){return"".concat(e/g*x,"rem")},M=function(e,t,n,r,i){return nl({fontFamily:o,fontWeight:e,fontSize:S(t),lineHeight:n},o===kl?{letterSpacing:"".concat(Ml(r/t),"em")}:{},i,y)},C={h1:M(l,96,1.167,-1.5),h2:M(l,60,1.2,-.5),h3:M(u,48,1.167,0),h4:M(u,34,1.235,.25),h5:M(u,24,1.334,0),h6:M(f,20,1.6,.15),subtitle1:M(u,16,1.75,.15),subtitle2:M(f,14,1.57,.1),body1:M(u,16,1.5,.15),body2:M(u,14,1.43,.15),button:M(f,14,1.75,.4,wl),caption:M(u,12,1.66,.4),overline:M(u,12,2.66,1,wl)};return il(nl({htmlFontSize:g,pxToRem:S,round:Cl,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:f,fontWeightBold:m},C),b,{clone:!1})}function El(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var ql=["none",El(0,2,1,-1,0,1,1,0,0,1,3,0),El(0,3,1,-2,0,2,2,0,0,1,5,0),El(0,3,3,-2,0,3,4,0,0,1,8,0),El(0,2,4,-1,0,4,5,0,0,1,10,0),El(0,3,5,-1,0,5,8,0,0,1,14,0),El(0,3,5,-1,0,6,10,0,0,1,18,0),El(0,4,5,-2,0,7,10,1,0,2,16,1),El(0,5,5,-3,0,8,10,1,0,3,14,2),El(0,5,6,-3,0,9,12,1,0,3,16,2),El(0,6,6,-3,0,10,14,1,0,4,18,3),El(0,6,7,-4,0,11,15,1,0,4,20,3),El(0,7,8,-4,0,12,17,2,0,5,22,4),El(0,7,8,-4,0,13,19,2,0,5,24,4),El(0,7,9,-4,0,14,21,2,0,5,26,4),El(0,8,9,-5,0,15,22,2,0,6,28,5),El(0,8,10,-5,0,16,24,2,0,6,30,5),El(0,8,11,-5,0,17,26,2,0,6,32,5),El(0,9,11,-5,0,18,28,2,0,7,34,6),El(0,9,12,-6,0,19,29,2,0,7,36,6),El(0,10,13,-6,0,20,31,3,0,8,38,7),El(0,10,13,-6,0,21,33,3,0,8,40,7),El(0,10,14,-6,0,22,35,3,0,8,42,7),El(0,11,14,-7,0,23,36,3,0,9,44,8),El(0,11,15,-7,0,24,38,3,0,9,46,8)],Ll={borderRadius:4};function Ol(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nl(e,t){if(e){if("string"==typeof e)return Ol(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ol(e,t):void 0}}function Dl(e){return function(e){if(Array.isArray(e))return Ol(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Nl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Al(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Nl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Il(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Rl={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Pl={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function zl(e){return"".concat(Math.round(e),"ms")}var jl={easing:Rl,duration:Pl,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?Pl.standard:n,o=t.easing,i=void 0===o?Rl.easeInOut:o,a=t.delay,s=void 0===a?0:a;return hl(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:zl(r)," ").concat(i," ").concat("string"==typeof s?s:zl(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Fl={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function _l(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.spacing,l=e.typography,c=void 0===l?{}:l,u=hl(e,["breakpoints","mixins","palette","spacing","typography"]),d=Sl(a),f=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=hl(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function c(e,t){var r=gl.indexOf(t);return r===gl.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[gl[r+1]]?n[gl[r+1]]:t)-a/100).concat(o,")")}return nl({keys:gl,values:n,up:l,down:function(e){var t=gl.indexOf(e)+1,r=n[gl[t]];return t===gl.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:c,only:function(e){return c(e,e)},width:function(e){return n[e]}},s)}(n),p=Il(s),m=il({breakpoints:f,direction:"ltr",mixins:yl(f,p,o),overrides:{},palette:d,props:{},shadows:ql,typography:Tl(d,c),spacing:p,shape:Ll,transitions:jl,zIndex:Fl},u),h=arguments.length,g=new Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return m=g.reduce((function(e,t){return il(e,t)}),m)}var Bl="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Hl=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function $l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Hl.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Bl]&&""===a?"".concat(i,"-").concat(c()):i}return"".concat(s).concat(o).concat(c())}}function Vl(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var o,i=t.props[n];for(o in i)void 0===r[o]&&(r[o]=i[o]);return r}var Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ul="object"===("undefined"==typeof window?"undefined":Wl(window))&&"object"===("undefined"==typeof document?"undefined":Wl(document))&&9===document.nodeType;function Kl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,al(r.key),r)}}function Gl(e,t,n){return t&&Kl(e.prototype,t),n&&Kl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yl(e,t)}function Xl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yl(e,t)}function Jl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Zl={}.constructor;function Ql(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Ql);if(e.constructor!==Zl)return e;var t={};for(var n in e)t[n]=Ql(e[n]);return t}function ec(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=Ql(t),i=r.plugins.onCreateRule(e,o,n);return i||(e[0],null)}var tc=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},nc=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=tc(e[n]," ");else t=tc(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function rc(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function oc(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function ic(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,i=void 0===o?0:o,a=t.fallbacks;!1===n.format&&(i=-1/0);var s=rc(n),l=s.linebreak,c=s.space;if(e&&i++,a)if(Array.isArray(a))for(var u=0;u<a.length;u++){var d=a[u];for(var f in d){var p=d[f];null!=p&&(r&&(r+=l),r+=oc(f+":"+c+nc(p)+";",i))}}else for(var m in a){var h=a[m];null!=h&&(r&&(r+=l),r+=oc(m+":"+c+nc(h)+";",i))}for(var g in t){var y=t[g];null!=y&&"fallbacks"!==g&&(r&&(r+=l),r+=oc(g+":"+c+nc(y)+";",i))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),oc(""+e+c+"{"+r,--i)+oc("}",i)):r}var ac=/([[\].#*$><+~=|^:(),"'`\s])/g,sc="undefined"!=typeof CSS&&CSS.escape,lc=function(e){return sc?sc(e):e.replace(ac,"\\$1")},cc=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),uc=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l(Jl(Jl(o)),s),o.selectorText="."+lc(o.id)),o}Xl(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=nc(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?nl({},e,{allowEmpty:!0}):e;return ic(this.selectorText,this.style,n)},Gl(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(cc),dc={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new uc(e,t,n)}},fc={indent:1,children:!0},pc=/@([\w-]+)/,mc=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(pc);for(var o in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new jc(nl({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=fc);var t=rc(e).linebreak;if(null==e.indent&&(e.indent=fc.indent),null==e.children&&(e.children=fc.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),hc=/@container|@media|@supports\s+/,gc={onCreateRule:function(e,t,n){return hc.test(e)?new mc(e,t,n):null}},yc={indent:1,children:!0},vc=/@keyframes\s+([\w-]+)/,bc=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(vc);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,i=n.sheet,a=n.generateId;for(var s in this.id=!1===o?this.name:lc(a(this,i)),this.rules=new jc(nl({},n,{parent:this})),t)this.rules.add(s,t[s],nl({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=yc);var t=rc(e).linebreak;if(null==e.indent&&(e.indent=yc.indent),null==e.children&&(e.children=yc.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),xc=/@keyframes\s+/,Sc=/\$([\w-]+)/g,Mc=function(e,t){return"string"==typeof e?e.replace(Sc,(function(e,n){return n in t?t[n]:e})):e},Cc=function(e,t,n){var r=e[t],o=Mc(r,n);o!==r&&(e[t]=o)},wc={onCreateRule:function(e,t,n){return"string"==typeof e&&xc.test(e)?new bc(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&Cc(e,"animation-name",n.keyframes),"animation"in e&&Cc(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return Mc(e,r.keyframes);default:return e}}},kc=function(e){function t(){return e.apply(this,arguments)||this}return Xl(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?nl({},e,{allowEmpty:!0}):e;return ic(this.key,this.style,n)},t}(cc),Tc={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new kc(e,t,n):null}},Ec=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=rc(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=ic(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return ic(this.at,this.style,e)},e}(),qc=/@font-face/,Lc={onCreateRule:function(e,t,n){return qc.test(e)?new Ec(e,t,n):null}},Oc=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return ic(this.key,this.style,e)},e}(),Nc={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Oc(e,t,n):null}},Dc=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Ac={"@charset":!0,"@import":!0,"@namespace":!0},Ic={onCreateRule:function(e,t,n){return e in Ac?new Dc(e,t,n):null}},Rc=[dc,gc,wc,Tc,Lc,Nc,Ic],Pc={process:!0},zc={force:!0,process:!0},jc=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,i=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,c=r.scoped,u=nl({classes:this.classes,parent:o,sheet:i,jss:a,Renderer:s,generateId:l,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(u.selector="."+lc(this.classes[d]));var f=ec(d,t,u);if(!f)return null;this.register(f);var p=void 0===u.index?this.index.length:u.index;return this.index.splice(p,0,f),f},t.replace=function(e,t,n){var r=this.get(e),o=this.index.indexOf(r);r&&this.remove(r);var i=n;return-1!==o&&(i=nl({},n,{index:o})),this.add(e,t,i)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof uc?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof bc&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof uc?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof bc&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Pc);var o=this.options,i=o.jss.plugins,a=o.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(i.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in i.onProcessStyle(t.style,t,a),t.style){var c=t.style[l];c!==s[l]&&t.prop(l,c,zc)}for(var u in s){var d=t.style[u],f=s[u];null==d&&d!==f&&t.prop(u,null,zc)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=rc(e).linebreak,i=0;i<this.index.length;i++){var a=this.index[i].toString(e);(a||r)&&(t&&(t+=o),t+=a)}return t},e}(),Fc=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=nl({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new jc(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var o=this.rules.replace(e,t,n);return o&&this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(this.renderer&&(o?r.renderable&&this.renderer.replaceRule(r.renderable,o):this.renderer.deleteRule(r)),o):o:(this.deployed=!1,o)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),_c=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Bc=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=ml(t,["attached"]),o=rc(r).linebreak,i="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(i&&(i+=o),i+=s.toString(r))}return i},Gl(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Hc=new Bc,$c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Vc="2f1acc6c3a606b082e5eef5e54414ffb";null==$c[Vc]&&($c[Vc]=0);var Wc=$c[Vc]++,Uc=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",i="";return r&&(r.options.classNamePrefix&&(i=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(i||"c")+Wc+o+t:i+n.key+"-"+Wc+(o?"-"+o:"")+"-"+t}},Kc=function(e){var t;return function(){return t||(t=e()),t}},Gc=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},Yc=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=nc(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var o=r?r.indexOf("!important"):-1,i=o>-1?r.substr(0,o-1):r;e.style.setProperty(t,i,o>-1?"important":"")}}catch(e){return!1}return!0},Xc=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Jc=function(e,t){return e.selectorText=t,e.selectorText===t},Zc=Kc((function(){return document.querySelector("head")}));function Qc(e){var t=Hc.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var o=function(e){for(var t=Zc(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var eu=Kc((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),tu=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},nu=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},ru=function(){function e(e){this.getPropertyValue=Gc,this.setProperty=Yc,this.removeProperty=Xc,this.setSelector=Jc,this.hasInsertedRules=!1,this.cssRules=[],e&&Hc.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=eu();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Qc(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else Zc().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;if("conditional"===e.type||"keyframes"===e.type){var i=nu(n,t);if(!1===(o=tu(n,r.toString({children:!1}),i)))return!1;this.refCssRule(e,i,o)}return this.insertRules(r.rules,o),o}var a=e.toString();if(!a)return!1;var s=nu(n,t),l=tu(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Fc&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ou=0,iu=function(){function e(e){this.id=ou++,this.version="10.10.0",this.plugins=new _c,this.options={id:{minify:!1},createGenerateId:Uc,Renderer:Ul?ru:null,plugins:[]},this.generateId=Uc({minify:!1});for(var t=0;t<Rc.length;t++)this.plugins.use(Rc[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=nl({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Hc.index?0:Hc.index+1);var r=new Fc(e,nl({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Hc.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=nl({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=ec(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),au=function(e){return new iu(e)},su="object"==typeof CSS&&null!=CSS&&"number"in CSS;function lu(e){var t=null;for(var n in e){var r=e[n],o=typeof r;if("function"===o)t||(t={}),t[n]=r;else if("object"===o&&null!==r&&!Array.isArray(r)){var i=lu(r);i&&(t||(t={}),t[n]=i)}}return t}
8
8
  /**
9
9
  * A better abstraction over CSS.
10
10
  *
11
11
  * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
12
12
  * @website https://github.com/cssinjs/jss
13
13
  * @license MIT
14
- */ic();var ac=Date.now(),sc="fnValues"+ac,lc="fnStyle"+ ++ac,uc=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var i=Jl(e,{},n);return i[lc]=t,i},onProcessStyle:function(e,t){if(sc in t||lc in t)return e;var n={};for(var i in e){var o=e[i];"function"==typeof o&&(delete e[i],n[i]=o)}return t[sc]=n,e},onUpdate:function(e,t,n,i){var o=t,r=o[lc];r&&(o.style=r(e)||{});var a=o[sc];if(a)for(var s in a)o.prop(s,a[s](e),i)}}},cc="@global",dc="@global ",mc=function(){function e(e,t,n){for(var i in this.type="global",this.at=cc,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Pu(Qs({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var i=this.rules.add(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.replaceRule=function(e,t,n){var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),fc=function(){function e(e,t,n){this.type="global",this.at=cc,this.isProcessed=!1,this.key=e,this.options=n;var i=e.substr(dc.length);this.rule=n.jss.createRule(i,t,Qs({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),hc=/\s*,\s*/g;function pc(e,t){for(var n=e.split(hc),i="",o=0;o<n.length;o++)i+=t+" "+n[o].trim(),n[o+1]&&(i+=", ");return i}function gc(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===cc)return new mc(e,t,n);if("@"===e[0]&&e.substr(0,dc.length)===dc)return new fc(e,t,n);var i=n.parent;return i&&("global"===i.type||i.options.parent&&"global"===i.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,i=e.style,o=i?i[cc]:null;if(o){for(var r in o)t.addRule(r,o[r],Qs({},n,{selector:pc(r,e.selector)}));delete i[cc]}}(e,t),function(e,t){var n=e.options,i=e.style;for(var o in i)if("@"===o[0]&&o.substr(0,cc.length)===cc){var r=pc(o.substr(cc.length),e.selector);t.addRule(r,i[o],Qs({},n,{selector:r})),delete i[o]}}(e,t))}}}var yc=/\s*,\s*/g,vc=/&/g,bc=/\$([\w-]+)/g;function xc(){function e(e,t){return function(n,i){var o=e.getRule(i)||t&&t.getRule(i);return o?o.selector:i}}function t(e,t){for(var n=t.split(yc),i=e.split(yc),o="",r=0;r<n.length;r++)for(var a=n[r],s=0;s<i.length;s++){var l=i[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(vc,a):a+" "+l}return o}function n(e,t,n){if(n)return Qs({},n,{index:n.index+1});var i=e.options.nestingLevel;i=void 0===i?1:i+1;var o=Qs({},e.options,{nestingLevel:i,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(i,o,r){if("style"!==o.type)return i;var a,s,l=o,u=l.options.parent;for(var c in i){var d=-1!==c.indexOf("&"),m="@"===c[0];if(d||m){if(a=n(l,u,a),d){var f=t(c,l.selector);s||(s=e(u,r)),f=f.replace(bc,s);var h=l.key+"-"+c;"replaceRule"in u?u.replaceRule(h,i[c],Qs({},a,{selector:f})):u.addRule(h,i[c],Qs({},a,{selector:f}))}else m&&u.addRule(c,{},a).addRule(l.key,i[c],{selector:l.selector});delete i[c]}}return i}}}var Sc=/[A-Z]/g,Mc=/^ms-/,Cc={};function wc(e){return"-"+e.toLowerCase()}function qc(e){if(Cc.hasOwnProperty(e))return Cc[e];var t=e.replace(Sc,wc);return Cc[e]=Mc.test(t)?"-"+t:t}function kc(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:qc(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(kc):t.fallbacks=kc(e.fallbacks)),t}var Tc=oc&&CSS?CSS.px:"px",Ec=oc&&CSS?CSS.ms:"ms",Dc=oc&&CSS?CSS.percent:"%";function Nc(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},i={};for(var o in e)i[o]=e[o],i[o.replace(t,n)]=e[o];return i}var Lc=Nc({"animation-delay":Ec,"animation-duration":Ec,"background-position":Tc,"background-position-x":Tc,"background-position-y":Tc,"background-size":Tc,border:Tc,"border-bottom":Tc,"border-bottom-left-radius":Tc,"border-bottom-right-radius":Tc,"border-bottom-width":Tc,"border-left":Tc,"border-left-width":Tc,"border-radius":Tc,"border-right":Tc,"border-right-width":Tc,"border-top":Tc,"border-top-left-radius":Tc,"border-top-right-radius":Tc,"border-top-width":Tc,"border-width":Tc,"border-block":Tc,"border-block-end":Tc,"border-block-end-width":Tc,"border-block-start":Tc,"border-block-start-width":Tc,"border-block-width":Tc,"border-inline":Tc,"border-inline-end":Tc,"border-inline-end-width":Tc,"border-inline-start":Tc,"border-inline-start-width":Tc,"border-inline-width":Tc,"border-start-start-radius":Tc,"border-start-end-radius":Tc,"border-end-start-radius":Tc,"border-end-end-radius":Tc,margin:Tc,"margin-bottom":Tc,"margin-left":Tc,"margin-right":Tc,"margin-top":Tc,"margin-block":Tc,"margin-block-end":Tc,"margin-block-start":Tc,"margin-inline":Tc,"margin-inline-end":Tc,"margin-inline-start":Tc,padding:Tc,"padding-bottom":Tc,"padding-left":Tc,"padding-right":Tc,"padding-top":Tc,"padding-block":Tc,"padding-block-end":Tc,"padding-block-start":Tc,"padding-inline":Tc,"padding-inline-end":Tc,"padding-inline-start":Tc,"mask-position-x":Tc,"mask-position-y":Tc,"mask-size":Tc,height:Tc,width:Tc,"min-height":Tc,"max-height":Tc,"min-width":Tc,"max-width":Tc,bottom:Tc,left:Tc,top:Tc,right:Tc,inset:Tc,"inset-block":Tc,"inset-block-end":Tc,"inset-block-start":Tc,"inset-inline":Tc,"inset-inline-end":Tc,"inset-inline-start":Tc,"box-shadow":Tc,"text-shadow":Tc,"column-gap":Tc,"column-rule":Tc,"column-rule-width":Tc,"column-width":Tc,"font-size":Tc,"font-size-delta":Tc,"letter-spacing":Tc,"text-decoration-thickness":Tc,"text-indent":Tc,"text-stroke":Tc,"text-stroke-width":Tc,"word-spacing":Tc,motion:Tc,"motion-offset":Tc,outline:Tc,"outline-offset":Tc,"outline-width":Tc,perspective:Tc,"perspective-origin-x":Dc,"perspective-origin-y":Dc,"transform-origin":Dc,"transform-origin-x":Dc,"transform-origin-y":Dc,"transform-origin-z":Dc,"transition-delay":Ec,"transition-duration":Ec,"vertical-align":Tc,"flex-basis":Tc,"shape-margin":Tc,size:Tc,gap:Tc,grid:Tc,"grid-gap":Tc,"row-gap":Tc,"grid-row-gap":Tc,"grid-column-gap":Tc,"grid-template-rows":Tc,"grid-template-columns":Tc,"grid-auto-rows":Tc,"grid-auto-columns":Tc,"box-shadow-x":Tc,"box-shadow-y":Tc,"box-shadow-blur":Tc,"box-shadow-spread":Tc,"font-line-height":Tc,"text-shadow-x":Tc,"text-shadow-y":Tc,"text-shadow-blur":Tc});function Oc(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=Oc(e,t[i],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Oc(o,t[o],n);else for(var r in t)t[r]=Oc(e+"-"+r,t[r],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Lc[e];return!a||0===t&&a===Tc?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Ac(e){void 0===e&&(e={});var t=Nc(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var i in e)e[i]=Oc(i,e[i],t);return e},onChangeValue:function(e,n){return Oc(n,e,t)}}}var Ic="",Pc="",Rc="",zc="",Fc=Vl&&"ontouchstart"in document.documentElement;if(Vl){var jc={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Hc=document.createElement("p").style;for(var Bc in jc)if(Bc+"Transform"in Hc){Ic=Bc,Pc=jc[Bc];break}"Webkit"===Ic&&"msHyphens"in Hc&&(Ic="ms",Pc=jc.ms,zc="edge"),"Webkit"===Ic&&"-apple-trailing-word"in Hc&&(Rc="apple")}var _c={js:Ic,css:Pc,vendor:Rc,browser:zc,isTouch:Fc};var Vc={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===_c.js?"-webkit-"+e:_c.css+e)}},Uc={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===_c.js?_c.css+"print-"+e:e)}},$c=/[-\s]+(.)?/g;function Wc(e,t){return t?t.toUpperCase():""}function Kc(e){return e.replace($c,Wc)}function Gc(e){return Kc("-"+e)}var Yc,Xc={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===_c.js){var n="mask-image";if(Kc(n)in t)return e;if(_c.js+Gc(n)in t)return _c.css+e}return e}},Jc={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==_c.vendor||_c.isTouch?e:_c.css+e)}},Zc={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:_c.css+e)}},Qc={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:_c.css+e)}},ed={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===_c.js||"ms"===_c.js&&"edge"!==_c.browser?_c.css+e:e)}},td={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===_c.js||"ms"===_c.js||"apple"===_c.vendor?_c.css+e:e)}},nd={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===_c.js?"WebkitColumn"+Gc(e)in t&&_c.css+"column-"+e:"Moz"===_c.js&&("page"+Gc(e)in t&&"page-"+e))}},id={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===_c.js)return e;var n=e.replace("-inline","");return _c.js+Gc(n)in t&&_c.css+n}},od={supportedProperty:function(e,t){return Kc(e)in t&&e}},rd={supportedProperty:function(e,t){var n=Gc(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:_c.js+n in t?_c.css+e:"Webkit"!==_c.js&&"Webkit"+n in t&&"-webkit-"+e}},ad={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===_c.js?""+_c.css+e:e)}},sd={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===_c.js?_c.css+"scroll-chaining":e)}},ld={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},ud={supportedProperty:function(e,t){var n=ld[e];return!!n&&(_c.js+Gc(n)in t&&_c.css+n)}},cd={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},dd=Object.keys(cd),md=function(e){return _c.css+e},fd={supportedProperty:function(e,t,n){var i=n.multiple;if(dd.indexOf(e)>-1){var o=cd[e];if(!Array.isArray(o))return _c.js+Gc(o)in t&&_c.css+o;if(!i)return!1;for(var r=0;r<o.length;r++)if(!(_c.js+Gc(o[0])in t))return!1;return o.map(md)}return!1}},hd=[Vc,Uc,Xc,Jc,Zc,Qc,ed,td,nd,id,od,rd,ad,sd,ud,fd],pd=hd.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),gd=hd.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Dl(t.noPrefill)),e}),[]),yd={};if(Vl){Yc=document.createElement("p");var vd=window.getComputedStyle(document.documentElement,"");for(var bd in vd)isNaN(bd)||(yd[vd[bd]]=vd[bd]);gd.forEach((function(e){return delete yd[e]}))}function xd(e,t){if(void 0===t&&(t={}),!Yc)return e;if(null!=yd[e])return yd[e];"transition"!==e&&"transform"!==e||(t[e]=e in Yc.style);for(var n=0;n<pd.length&&(yd[e]=pd[n](e,Yc.style,t),!yd[e]);n++);try{Yc.style[e]=""}catch(e){return!1}return yd[e]}var Sd,Md={},Cd={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},wd=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function qd(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var i=t?xd(t):", "+xd(n);return i||(t||n)}function kd(e,t){var n=t;if(!Sd||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var i=e+n;if(null!=Md[i])return Md[i];try{Sd.style[e]=n}catch(e){return Md[i]=!1,!1}if(Cd[e])n=n.replace(wd,qd);else if(""===Sd.style[e]&&("-ms-flex"===(n=_c.css+n)&&(Sd.style[e]="-ms-flexbox"),Sd.style[e]=n,""===Sd.style[e]))return Md[i]=!1,!1;return Sd.style[e]="",Md[i]=n,Md[i]}function Td(){function e(t){for(var n in t){var i=t[n];if("fallbacks"===n&&Array.isArray(i))t[n]=i.map(e);else{var o=!1,r=xd(n);r&&r!==n&&(o=!0);var a=!1,s=kd(r,Ql(i));s&&s!==i&&(a=!0),(o||a)&&(o&&delete t[n],t[r||n]=s||i)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===_c.js?e:"@"+_c.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return kd(t,Ql(e))||e}}}function Ed(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var i={},o=Object.keys(t).sort(e),r=0;r<o.length;r++)i[o[r]]=t[o[r]];return i}}}function Dd(){return{plugins:[uc(),gc(),xc(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=kc(e[t]);return e}return kc(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var i=qc(t);return t===i?e:(n.prop(i,e),null)}},Ac(),"undefined"==typeof window?null:Td(),Ed()]}}function Nd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var i=Qs({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}Vl&&(Sd=document.createElement("p"));var Ld={set:function(e,t,n,i){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,i)},get:function(e,t,n){var i=e.get(t);return i?i.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Od=Ld,Ad=v.createContext(null);function Id(){return v.useContext(Ad)}var Pd,Rd=ic(Dd()),zd={disableGeneration:!1,generateClassName:Hl(),jss:Rd,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Fd=v.createContext(zd);function jd(e){var t=e.children,n=e.injectFirst,i=void 0!==n&&n,o=e.disableGeneration,r=void 0!==o&&o,a=ml(e,["children","injectFirst","disableGeneration"]),s=Qs({},v.useContext(Fd),{disableGeneration:r},a);if(!s.jss.options.insertionPoint&&i&&"undefined"!=typeof window){if(!Pd){var l=document.head;Pd=document.createComment("mui-inject-first"),l.insertBefore(Pd,l.firstChild)}s.jss=ic({plugins:Dd().plugins,insertionPoint:Pd})}return v.createElement(Fd.Provider,{value:s},t)}var Hd=-1e9;var Bd={};function _d(e,t){var n=e.state,i=e.theme,o=e.stylesOptions,r=e.stylesCreator,a=e.name;if(!o.disableGeneration){var s=Od.get(o.sheetsManager,r,i);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Od.set(o.sheetsManager,r,i,s));var l=Qs({},r.options,o,{theme:i,flip:"boolean"==typeof o.flip?o.flip:"rtl"===i.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=o.sheetsRegistry;if(0===s.refs){var c;o.sheetsCache&&(c=Od.get(o.sheetsCache,r,i));var d=r.create(i,a);c||((c=o.jss.createStyleSheet(d,Qs({link:!1},l))).attach(),o.sheetsCache&&Od.set(o.sheetsCache,r,i,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=rc(d)}if(s.dynamicStyles){var m=o.jss.createStyleSheet(s.dynamicStyles,Qs({link:!0},l));m.update(t),m.attach(),n.dynamicSheet=m,n.classes=Nd({baseClasses:s.staticSheet.classes,newClasses:m.classes}),u&&u.add(m)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Vd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,o=t.Component,r=t.defaultTheme,a=void 0===r?Bd:r,s=ml(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,i){var o;try{o=t?e(n):e}catch(e){throw e}if(!i||!n.overrides||!n.overrides[i])return o;var r=n.overrides[i],a=Qs({},o);return Object.keys(r).forEach((function(e){a[e]=nl(a[e],r[e])})),a},options:{}}}(e),u=n||i||"makeStyles";l.options={index:Hd+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Id()||a,i=Qs({},v.useContext(Fd),s),r=v.useRef(),u=v.useRef();!function(e,t){var n,i=v.useRef([]),o=v.useMemo((function(){return{}}),t);i.current!==o&&(i.current=o,n=e()),v.useEffect((function(){return function(){n&&n()}}),[o])}((function(){var o={name:n,state:{},stylesCreator:l,stylesOptions:i,theme:t};return _d(o,e),u.current=!1,r.current=o,function(){!function(e){var t=e.state,n=e.theme,i=e.stylesOptions,o=e.stylesCreator;if(!i.disableGeneration){var r=Od.get(i.sheetsManager,o,n);r.refs-=1;var a=i.sheetsRegistry;0===r.refs&&(Od.delete(i.sheetsManager,o,n),i.jss.removeStyleSheet(r.staticSheet),a&&a.remove(r.staticSheet)),t.dynamicSheet&&(i.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(o)}}),[t,l]),v.useEffect((function(){u.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(r.current,e),u.current=!0}));var c=function(e,t,n){var i=e.state;if(e.stylesOptions.disableGeneration)return t||{};i.cacheClasses||(i.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return i.classes!==i.cacheClasses.lastJSS&&(i.cacheClasses.lastJSS=i.classes,o=!0),t!==i.cacheClasses.lastProp&&(i.cacheClasses.lastProp=t,o=!0),o&&(i.cacheClasses.value=Nd({baseClasses:i.cacheClasses.lastJSS,newClasses:t,Component:n})),i.cacheClasses.value}(r.current,e.classes,o);return c}}function Ud(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ud(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function $d(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Ud(e))&&(i&&(i+=" "),i+=t);return i}var Wd={exports:{}},Kd={},Gd="function"==typeof Symbol&&Symbol.for,Yd=Gd?Symbol.for("react.element"):60103,Xd=Gd?Symbol.for("react.portal"):60106,Jd=Gd?Symbol.for("react.fragment"):60107,Zd=Gd?Symbol.for("react.strict_mode"):60108,Qd=Gd?Symbol.for("react.profiler"):60114,em=Gd?Symbol.for("react.provider"):60109,tm=Gd?Symbol.for("react.context"):60110,nm=Gd?Symbol.for("react.async_mode"):60111,im=Gd?Symbol.for("react.concurrent_mode"):60111,om=Gd?Symbol.for("react.forward_ref"):60112,rm=Gd?Symbol.for("react.suspense"):60113,am=Gd?Symbol.for("react.suspense_list"):60120,sm=Gd?Symbol.for("react.memo"):60115,lm=Gd?Symbol.for("react.lazy"):60116,um=Gd?Symbol.for("react.block"):60121,cm=Gd?Symbol.for("react.fundamental"):60117,dm=Gd?Symbol.for("react.responder"):60118,mm=Gd?Symbol.for("react.scope"):60119;function fm(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Yd:switch(e=e.type){case nm:case im:case Jd:case Qd:case Zd:case rm:return e;default:switch(e=e&&e.$$typeof){case tm:case om:case lm:case sm:case em:return e;default:return t}}case Xd:return t}}}function hm(e){return fm(e)===im}Kd.AsyncMode=nm,Kd.ConcurrentMode=im,Kd.ContextConsumer=tm,Kd.ContextProvider=em,Kd.Element=Yd,Kd.ForwardRef=om,Kd.Fragment=Jd,Kd.Lazy=lm,Kd.Memo=sm,Kd.Portal=Xd,Kd.Profiler=Qd,Kd.StrictMode=Zd,Kd.Suspense=rm,Kd.isAsyncMode=function(e){return hm(e)||fm(e)===nm},Kd.isConcurrentMode=hm,Kd.isContextConsumer=function(e){return fm(e)===tm},Kd.isContextProvider=function(e){return fm(e)===em},Kd.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Yd},Kd.isForwardRef=function(e){return fm(e)===om},Kd.isFragment=function(e){return fm(e)===Jd},Kd.isLazy=function(e){return fm(e)===lm},Kd.isMemo=function(e){return fm(e)===sm},Kd.isPortal=function(e){return fm(e)===Xd},Kd.isProfiler=function(e){return fm(e)===Qd},Kd.isStrictMode=function(e){return fm(e)===Zd},Kd.isSuspense=function(e){return fm(e)===rm},Kd.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Jd||e===im||e===Qd||e===Zd||e===rm||e===am||"object"==typeof e&&null!==e&&(e.$$typeof===lm||e.$$typeof===sm||e.$$typeof===em||e.$$typeof===tm||e.$$typeof===om||e.$$typeof===cm||e.$$typeof===dm||e.$$typeof===mm||e.$$typeof===um)},Kd.typeOf=fm,Wd.exports=Kd;var pm=Wd.exports,gm={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ym={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},vm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bm={};function xm(e){return pm.isMemo(e)?vm:bm[e.$$typeof]||gm}bm[pm.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bm[pm.Memo]=vm;var Sm=Object.defineProperty,Mm=Object.getOwnPropertyNames,Cm=Object.getOwnPropertySymbols,wm=Object.getOwnPropertyDescriptor,qm=Object.getPrototypeOf,km=Object.prototype;var Tm=function e(t,n,i){if("string"!=typeof n){if(km){var o=qm(n);o&&o!==km&&e(t,o,i)}var r=Mm(n);Cm&&(r=r.concat(Cm(n)));for(var a=xm(t),s=xm(n),l=0;l<r.length;++l){var u=r[l];if(!(ym[u]||i&&i[u]||s&&s[u]||a&&a[u])){var c=wm(n,u);try{Sm(t,u,c)}catch(e){}}}}return t},Em=J(Tm);function Dm(e){return function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.name,r=ml(i,["name"]),a=o,s="function"==typeof t?function(e){return{root:function(n){return t(Qs({theme:e},n))}}}:{root:t},l=Vd(s,Qs({Component:e,name:o||e.displayName,classNamePrefix:a},r));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=v.forwardRef((function(t,i){var o,r,a,s=t.children,u=t.className,c=t.clone,d=t.component,m=ml(t,["children","className","clone","component"]),f=$d(l(t).root,u),h=m;if(n&&(o=h,r=n,a={},Object.keys(o).forEach((function(e){-1===r.indexOf(e)&&(a[e]=o[e])})),h=a),c)return v.cloneElement(s,Qs({className:$d(s.props.className,f)},h));if("function"==typeof s)return s(Qs({className:f},h));var p=d||e;return v.createElement(p,Qs({ref:i,className:f},h),s)}));return Em(u,e),u}}function Nm(e){var t=e.children,n=e.theme,i=Id(),o=v.useMemo((function(){var e=null===i?n:function(e,t){return"function"==typeof t?t(e):Qs({},e,t)}(i,n);return null!=e&&(e[Fl]=null!==i),e}),[n,i]);return v.createElement(Ad.Provider,{value:o},t)}var Lm=zl(),Om=function(e){var t=Dm(e);return function(e,n){return t(e,Qs({defaultTheme:Lm},n))}};function Am(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,o=t.withTheme,r=void 0!==o&&o,a=t.name,s=ml(t,["defaultTheme","withTheme","name"]),l=a,u=Vd(e,Qs({defaultTheme:i,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=v.forwardRef((function(e,t){e.classes;var o,s=e.innerRef,l=ml(e,["classes","innerRef"]),c=u(Qs({},n.defaultProps,e)),d=l;return("string"==typeof a||r)&&(o=Id()||i,a&&(d=Bl({theme:o,name:a,props:l})),r&&!d.theme&&(d.theme=o)),v.createElement(n,Qs({ref:s||t,classes:c},d))}));return Em(c,n),c}}(e,Qs({defaultTheme:Lm},t))}function Im(e){if("string"!=typeof e)throw new Error(rl(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Pm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];e.apply(this,i),t.apply(this,i)}}),(function(){}))}function Rm(e){return e&&e.ownerDocument||document}function zm(e){return Rm(e).defaultView||window}function Fm(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var jm="undefined"!=typeof window?b.useLayoutEffect:b.useEffect;function Hm(e){var t=b.useRef(e);return jm((function(){t.current=e})),b.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Bm(e,t){return b.useMemo((function(){return null==e&&null==t?null:function(n){Fm(e,n),Fm(t,n)}}),[e,t])}var _m=!0,Vm=!1,Um=null,$m={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Wm(e){e.metaKey||e.altKey||e.ctrlKey||(_m=!0)}function Km(){_m=!1}function Gm(){"hidden"===this.visibilityState&&Vm&&(_m=!0)}function Ym(e){var t,n,i,o=e.target;try{return o.matches(":focus-visible")}catch(e){}return _m||(n=(t=o).type,!("INPUT"!==(i=t.tagName)||!$m[n]||t.readOnly)||"TEXTAREA"===i&&!t.readOnly||!!t.isContentEditable)}function Xm(){Vm=!0,window.clearTimeout(Um),Um=window.setTimeout((function(){Vm=!1}),100)}function Jm(){return{isFocusVisible:Ym,onBlurVisible:Xm,ref:b.useCallback((function(e){var t,n=C.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Wm,!0),t.addEventListener("mousedown",Km,!0),t.addEventListener("pointerdown",Km,!0),t.addEventListener("touchstart",Km,!0),t.addEventListener("visibilitychange",Gm,!0))}),[])}}var Zm=!1,Qm=v.createContext(null),ef="unmounted",tf="exited",nf="entering",of="entered",rf="exiting",af=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var o,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(o=tf,i.appearStatus=nf):o=of:o=t.unmountOnExit||t.mountOnEnter?ef:tf,i.state={status:o},i.nextCallback=null,i}Kl(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ef?{status:tf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==nf&&n!==of&&(t=nf):n!==nf&&n!==of||(t=rf)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===nf){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===tf&&this.setState({status:ef})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,o=this.props.nodeRef?[i]:[w.findDOMNode(this),i],r=o[0],a=o[1],s=this.getTimeouts(),l=i?s.appear:s.enter;!e&&!n||Zm?this.safeSetState({status:of},(function(){t.props.onEntered(r)})):(this.props.onEnter(r,a),this.safeSetState({status:nf},(function(){t.props.onEntering(r,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:of},(function(){t.props.onEntered(r,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:w.findDOMNode(this);t&&!Zm?(this.props.onExit(i),this.safeSetState({status:rf},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:tf},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:tf},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=o[0],a=o[1];this.props.addEndListener(r,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ef)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var i=dl(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(Qm.Provider,{value:null},"function"==typeof n?n(e,i):v.cloneElement(v.Children.only(n),i))},t}(v.Component);function sf(){}af.contextType=Qm,af.propTypes={},af.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:sf,onEntering:sf,onEntered:sf,onExit:sf,onExiting:sf,onExited:sf},af.UNMOUNTED=ef,af.EXITED=tf,af.ENTERING=nf,af.ENTERED=of,af.EXITING=rf;var lf=af;function uf(e,t){var n=Object.create(null);return e&&x.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&S(e)?t(e):e}(e)})),n}function cf(e,t,n){return null!=n[t]?n[t]:e.props[t]}function df(e,t,n){var i=uf(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var i,o=Object.create(null),r=[];for(var a in e)a in t?r.length&&(o[a]=r,r=[]):r.push(a);var s={};for(var l in t){if(o[l])for(i=0;i<o[l].length;i++){var u=o[l][i];s[o[l][i]]=n(u)}s[l]=n(l)}for(i=0;i<r.length;i++)s[r[i]]=n(r[i]);return s}(t,i);return Object.keys(o).forEach((function(r){var a=o[r];if(S(a)){var s=r in t,l=r in i,u=t[r],c=S(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&S(u)&&(o[r]=M(a,{onExited:n.bind(null,a),in:u.props.in,exit:cf(a,"exit",e),enter:cf(a,"enter",e)})):o[r]=M(a,{in:!1}):o[r]=M(a,{onExited:n.bind(null,a),in:!0,exit:cf(a,"exit",e),enter:cf(a,"enter",e)})}})),o}var mf=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},ff=function(e){function t(t,n){var i,o=(i=e.call(this,t,n)||this).handleExited.bind(Gl(i));return i.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},i}Kl(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,i,o=t.children,r=t.handleExited;return{children:t.firstRender?(n=e,i=r,uf(n.children,(function(e){return M(e,{onExited:i.bind(null,e),in:!0,appear:cf(e,"appear",n),enter:cf(e,"enter",n),exit:cf(e,"exit",n)})}))):df(e,o,r),firstRender:!1}},n.handleExited=function(e,t){var n=uf(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Qs({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=dl(e,["component","childFactory"]),o=this.state.contextValue,r=mf(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?v.createElement(Qm.Provider,{value:o},r):v.createElement(Qm.Provider,{value:o},v.createElement(t,i,r))},t}(v.Component);ff.propTypes={},ff.defaultProps={component:"div",childFactory:function(e){return e}};var hf=ff;function pf(e,t){var n=e.timeout,i=e.style,o=void 0===i?{}:i;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}var gf=b.forwardRef((function(e,t){var n=e.classes,i=e.className,o=e.component,r=void 0===o?"div":o,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,m=ml(e,["classes","className","component","square","elevation","variant"]);return b.createElement(r,Qs({className:$d(n.root,i,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},m))})),yf=Am((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Qs({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(gf),vf="undefined"==typeof window?b.useEffect:b.useLayoutEffect;function bf(e){var t=e.classes,n=e.pulsate,i=void 0!==n&&n,o=e.rippleX,r=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=b.useState(!1),m=d[0],f=d[1],h=$d(t.ripple,t.rippleVisible,i&&t.ripplePulsate),p={width:a,height:a,top:-a/2+r,left:-a/2+o},g=$d(t.child,m&&t.childLeaving,i&&t.childPulsate),y=Hm(u);return vf((function(){if(!s){f(!0);var e=setTimeout(y,c);return function(){clearTimeout(e)}}}),[y,s,c]),b.createElement("span",{className:h,style:p},b.createElement("span",{className:g}))}var xf=b.forwardRef((function(e,t){var n=e.center,i=void 0!==n&&n,o=e.classes,r=e.className,a=ml(e,["center","classes","className"]),s=b.useState([]),l=s[0],u=s[1],c=b.useRef(0),d=b.useRef(null);b.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var m=b.useRef(!1),f=b.useRef(null),h=b.useRef(null),p=b.useRef(null);b.useEffect((function(){return function(){clearTimeout(f.current)}}),[]);var g=b.useCallback((function(e){var t=e.pulsate,n=e.rippleX,i=e.rippleY,r=e.rippleSize,a=e.cb;u((function(e){return[].concat(Dl(e),[b.createElement(bf,{key:c.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:i,rippleSize:r})])})),c.current+=1,d.current=a}),[o]),y=b.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=t.pulsate,r=void 0!==o&&o,a=t.center,s=void 0===a?i||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var c,d,y,v=u?null:p.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,M=x.clientY;c=Math.round(S-b.left),d=Math.round(M-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var C=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,w=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(C,2)+Math.pow(w,2))}e.touches?null===h.current&&(h.current=function(){g({pulsate:r,rippleX:c,rippleY:d,rippleSize:y,cb:n})},f.current=setTimeout((function(){h.current&&(h.current(),h.current=null)}),80)):g({pulsate:r,rippleX:c,rippleY:d,rippleSize:y,cb:n})}}),[i,g]),v=b.useCallback((function(){y({},{pulsate:!0})}),[y]),x=b.useCallback((function(e,t){if(clearTimeout(f.current),"touchend"===e.type&&h.current)return e.persist(),h.current(),h.current=null,void(f.current=setTimeout((function(){x(e,t)})));h.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return b.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:x}}),[v,y,x]),b.createElement("span",Qs({className:$d(o.root,r),ref:p},a),b.createElement(hf,{component:null,exit:!0},l))})),Sf=Am((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(b.memo(xf)),Mf=b.forwardRef((function(e,t){var n=e.action,i=e.buttonRef,o=e.centerRipple,r=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,m=void 0!==d&&d,f=e.disableRipple,h=void 0!==f&&f,p=e.disableTouchRipple,g=void 0!==p&&p,y=e.focusRipple,v=void 0!==y&&y,x=e.focusVisibleClassName,S=e.onBlur,M=e.onClick,w=e.onFocus,q=e.onFocusVisible,k=e.onKeyDown,T=e.onKeyUp,E=e.onMouseDown,D=e.onMouseLeave,N=e.onMouseUp,L=e.onTouchEnd,O=e.onTouchMove,A=e.onTouchStart,I=e.onDragLeave,P=e.tabIndex,R=void 0===P?0:P,z=e.TouchRippleProps,F=e.type,j=void 0===F?"button":F,H=ml(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),B=b.useRef(null);var _=b.useRef(null),V=b.useState(!1),U=V[0],$=V[1];m&&U&&$(!1);var W=Jm(),K=W.isFocusVisible,G=W.onBlurVisible,Y=W.ref;function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Hm((function(i){return t&&t(i),!n&&_.current&&_.current[e](i),!0}))}b.useImperativeHandle(n,(function(){return{focusVisible:function(){$(!0),B.current.focus()}}}),[]),b.useEffect((function(){U&&v&&!h&&_.current.pulsate()}),[h,v,U]);var J=X("start",E),Z=X("stop",I),Q=X("stop",N),ee=X("stop",(function(e){U&&e.preventDefault(),D&&D(e)})),te=X("start",A),ne=X("stop",L),ie=X("stop",O),oe=X("stop",(function(e){U&&(G(e),$(!1)),S&&S(e)}),!1),re=Hm((function(e){B.current||(B.current=e.currentTarget),K(e)&&($(!0),q&&q(e)),w&&w(e)})),ae=function(){var e=C.findDOMNode(B.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=b.useRef(!1),le=Hm((function(e){v&&!se.current&&U&&_.current&&" "===e.key&&(se.current=!0,e.persist(),_.current.stop(e,(function(){_.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),k&&k(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!m&&(e.preventDefault(),M&&M(e))})),ue=Hm((function(e){v&&" "===e.key&&_.current&&U&&!e.defaultPrevented&&(se.current=!1,e.persist(),_.current.stop(e,(function(){_.current.pulsate(e)}))),T&&T(e),M&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&M(e)})),ce=c;"button"===ce&&H.href&&(ce="a");var de={};"button"===ce?(de.type=j,de.disabled=m):("a"===ce&&H.href||(de.role="button"),de["aria-disabled"]=m);var me=Bm(i,t),fe=Bm(Y,B),he=Bm(me,fe),pe=b.useState(!1),ge=pe[0],ye=pe[1];b.useEffect((function(){ye(!0)}),[]);var ve=ge&&!h&&!m;return b.createElement(ce,Qs({className:$d(s.root,l,U&&[s.focusVisible,x],m&&s.disabled),onBlur:oe,onClick:M,onFocus:re,onKeyDown:le,onKeyUp:ue,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:ie,onTouchStart:te,ref:he,tabIndex:m?-1:R},de,H),a,ve?b.createElement(Sf,Qs({ref:_,center:r},z)):null)})),Cf=Am({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Mf),wf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},qf=b.forwardRef((function(e,t){var n=e.align,i=void 0===n?"inherit":n,o=e.classes,r=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,m=void 0!==d&&d,f=e.noWrap,h=void 0!==f&&f,p=e.paragraph,g=void 0!==p&&p,y=e.variant,v=void 0===y?"body1":y,x=e.variantMapping,S=void 0===x?wf:x,M=ml(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=l||(g?"p":S[v]||wf[v])||"span";return b.createElement(C,Qs({className:$d(o.root,r,"inherit"!==v&&o[v],"initial"!==s&&o["color".concat(Im(s))],h&&o.noWrap,m&&o.gutterBottom,g&&o.paragraph,"inherit"!==i&&o["align".concat(Im(i))],"initial"!==c&&o["display".concat(Im(c))]),ref:t},M))})),kf=Am((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(qf),Tf=b.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.color,a=void 0===r?"default":r,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableElevation,m=void 0!==d&&d,f=e.disableFocusRipple,h=void 0!==f&&f,p=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,x=e.size,S=void 0===x?"medium":x,M=e.startIcon,C=e.type,w=void 0===C?"button":C,q=e.variant,k=void 0===q?"text":q,T=ml(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),E=M&&b.createElement("span",{className:$d(i.startIcon,i["iconSize".concat(Im(S))])},M),D=p&&b.createElement("span",{className:$d(i.endIcon,i["iconSize".concat(Im(S))])},p);return b.createElement(Cf,Qs({className:$d(i.root,i[k],o,"inherit"===a?i.colorInherit:"default"!==a&&i["".concat(k).concat(Im(a))],"medium"!==S&&[i["".concat(k,"Size").concat(Im(S))],i["size".concat(Im(S))]],m&&i.disableElevation,c&&i.disabled,v&&i.fullWidth),component:l,disabled:c,focusRipple:!h,focusVisibleClassName:$d(i.focusVisible,g),ref:t,type:w},T),b.createElement("span",{className:i.label},E,n,D))})),Ef=Am((function(e){return{root:Qs({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:cl(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:cl(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:cl(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(cl(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:cl(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(cl(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:cl(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(Tf);var Df="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,Nf=b.forwardRef((function(e,t){var n=e.children,i=e.container,o=e.disablePortal,r=void 0!==o&&o,a=e.onRendered,s=b.useState(null),l=s[0],u=s[1],c=Bm(b.isValidElement(n)?n.ref:null,t);return Df((function(){r||u(function(e){return e="function"==typeof e?e():e,C.findDOMNode(e)}(i)||document.body)}),[i,r]),Df((function(){if(l&&!r)return Fm(t,l),function(){Fm(t,null)}}),[t,l,r]),Df((function(){a&&(l||r)&&a()}),[a,l,r]),r?b.isValidElement(n)?b.cloneElement(n,{ref:c}):n:l?C.createPortal(n,l):l})),Lf=Nf;function Of(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Af(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function If(e,t,n){var i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(Dl(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),r=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===r.indexOf(e.tagName)&&Of(e,i)}))}function Pf(e,t){var n=-1;return e.some((function(e,i){return!!t(e)&&(n=i,!0)})),n}function Rf(e,t){var n,i=[],o=[],r=e.container;if(!t.disableScrollLock){if(function(e){var t=Rm(e);return t.body===e?zm(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();i.push({value:r.style.paddingRight,key:"padding-right",el:r}),r.style["padding-right"]="".concat(Af(r)+a,"px"),n=Rm(r).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(Af(e)+a,"px")}))}var s=r.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:r;i.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),i.forEach((function(e){var t=e.value,n=e.el,i=e.key;t?n.style.setProperty(i,t):n.style.removeProperty(i)}))}}var zf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return $l(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Of(e.modalRef,!1);var i=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);If(t,e.mountNode,e.modalRef,i,!0);var o=Pf(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:i}),n)}},{key:"mount",value:function(e,t){var n=Pf(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),i=this.containers[n];i.restore||(i.restore=Rf(i,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Pf(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),i=this.containers[n];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(t,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&Of(e.modalRef,!0),If(i.container,e.mountNode,e.modalRef,i.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=i.modals[i.modals.length-1];o.modalRef&&Of(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Ff(e){var t=e.children,n=e.disableAutoFocus,i=void 0!==n&&n,o=e.disableEnforceFocus,r=void 0!==o&&o,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=b.useRef(),m=b.useRef(null),f=b.useRef(null),h=b.useRef(),p=b.useRef(null),g=b.useCallback((function(e){p.current=C.findDOMNode(e)}),[]),y=Bm(t.ref,g),v=b.useRef();return b.useEffect((function(){v.current=c}),[c]),!v.current&&c&&"undefined"!=typeof window&&(h.current=l().activeElement),b.useEffect((function(){if(c){var e=Rm(p.current);i||!p.current||p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex",-1),p.current.focus());var t=function(){null!==p.current&&(e.hasFocus()&&!r&&u()&&!d.current?p.current&&!p.current.contains(e.activeElement)&&p.current.focus():d.current=!1)},n=function(t){!r&&u()&&9===t.keyCode&&e.activeElement===p.current&&(d.current=!0,t.shiftKey?f.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(h.current&&h.current.focus&&h.current.focus(),h.current=null)}}}),[i,r,s,u,c]),b.createElement(b.Fragment,null,b.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),b.cloneElement(t,{ref:y}),b.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelEnd"}))}var jf={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Hf=b.forwardRef((function(e,t){var n=e.invisible,i=void 0!==n&&n,o=e.open,r=ml(e,["invisible","open"]);return o?b.createElement("div",Qs({"aria-hidden":!0,ref:t},r,{style:Qs({},jf.root,i?jf.invisible:{},r.style)})):null}));var Bf=new zf,_f=b.forwardRef((function(e,t){var n=Id(),i=Bl({name:"MuiModal",props:Qs({},e),theme:n}),o=i.BackdropComponent,r=void 0===o?Hf:o,a=i.BackdropProps,s=i.children,l=i.closeAfterTransition,u=void 0!==l&&l,c=i.container,d=i.disableAutoFocus,m=void 0!==d&&d,f=i.disableBackdropClick,h=void 0!==f&&f,p=i.disableEnforceFocus,g=void 0!==p&&p,y=i.disableEscapeKeyDown,v=void 0!==y&&y,x=i.disablePortal,S=void 0!==x&&x,M=i.disableRestoreFocus,w=void 0!==M&&M,q=i.disableScrollLock,k=void 0!==q&&q,T=i.hideBackdrop,E=void 0!==T&&T,D=i.keepMounted,N=void 0!==D&&D,L=i.manager,O=void 0===L?Bf:L,A=i.onBackdropClick,I=i.onClose,P=i.onEscapeKeyDown,R=i.onRendered,z=i.open,F=ml(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),j=b.useState(!0),H=j[0],B=j[1],_=b.useRef({}),V=b.useRef(null),U=b.useRef(null),$=Bm(U,t),W=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(i),K=function(){return Rm(V.current)},G=function(){return _.current.modalRef=U.current,_.current.mountNode=V.current,_.current},Y=function(){O.mount(G(),{disableScrollLock:k}),U.current.scrollTop=0},X=Hm((function(){var e=function(e){return e="function"==typeof e?e():e,C.findDOMNode(e)}(c)||K().body;O.add(G(),e),U.current&&Y()})),J=b.useCallback((function(){return O.isTopModal(G())}),[O]),Z=Hm((function(e){V.current=e,e&&(R&&R(),z&&J()?Y():Of(U.current,!0))})),Q=b.useCallback((function(){O.remove(G())}),[O]);if(b.useEffect((function(){return function(){Q()}}),[Q]),b.useEffect((function(){z?X():W&&u||Q()}),[z,Q,W,u,X]),!N&&!z&&(!W||H))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Rl}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),W&&(te.onEnter=Pm((function(){B(!1)}),s.props.onEnter),te.onExited=Pm((function(){B(!0),u&&Q()}),s.props.onExited)),b.createElement(Lf,{ref:Z,container:c,disablePortal:S},b.createElement("div",Qs({ref:$,onKeyDown:function(e){"Escape"===e.key&&J()&&(P&&P(e),v||(e.stopPropagation(),I&&I(e,"escapeKeyDown")))},role:"presentation"},F,{style:Qs({},ee.root,!z&&H?ee.hidden:{},F.style)}),E?null:b.createElement(r,Qs({open:z,onClick:function(e){e.target===e.currentTarget&&(A&&A(e),!h&&I&&I(e,"backdropClick"))}},a)),b.createElement(Ff,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:w,getDoc:K,isEnabled:J,open:z},b.cloneElement(s,te))))})),Vf=_f,Uf=b.forwardRef((function(e,t){var n=e.absolute,i=void 0!==n&&n,o=e.classes,r=e.className,a=e.component,s=void 0===a?"hr":a,l=e.flexItem,u=void 0!==l&&l,c=e.light,d=void 0!==c&&c,m=e.orientation,f=void 0===m?"horizontal":m,h=e.role,p=void 0===h?"hr"!==s?"separator":void 0:h,g=e.variant,y=void 0===g?"fullWidth":g,v=ml(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return b.createElement(s,Qs({className:$d(o.root,r,"fullWidth"!==y&&o[y],i&&o.absolute,u&&o.flexItem,d&&o.light,"vertical"===f&&o.vertical),role:p,ref:t},v))})),$f=Am((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:cl(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(Uf);function Wf(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Kf={entering:{opacity:1,transform:Wf(1)},entered:{opacity:1,transform:"none"}},Gf=b.forwardRef((function(e,t){var n=e.children,i=e.disableStrictModeCompat,o=void 0!==i&&i,r=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,u=e.onExit,c=e.onExited,d=e.onExiting,m=e.style,f=e.timeout,h=void 0===f?"auto":f,p=e.TransitionComponent,g=void 0===p?lf:p,y=ml(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=b.useRef(),x=b.useRef(),S=Id()||Lm,M=S.unstable_strictMode&&!o,C=b.useRef(null),w=Bm(n.ref,t),q=Bm(M?C:void 0,w),k=function(e){return function(t,n){if(e){var i=Nl(M?[C.current,t]:[t,n],2),o=i[0],r=i[1];void 0===r?e(o):e(o,r)}}},T=k(l),E=k((function(e,t){!function(e){e.scrollTop}(e);var n,i=pf({style:m,timeout:h},{mode:"enter"}),o=i.duration,r=i.delay;"auto"===h?(n=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=o,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:r}),S.transitions.create("transform",{duration:.666*n,delay:r})].join(","),a&&a(e,t)})),D=k(s),N=k(d),L=k((function(e){var t,n=pf({style:m,timeout:h},{mode:"exit"}),i=n.duration,o=n.delay;"auto"===h?(t=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=i,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:o}),S.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=Wf(.75),u&&u(e)})),O=k(c);return b.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),b.createElement(g,Qs({appear:!0,in:r,nodeRef:M?C:void 0,onEnter:E,onEntered:D,onEntering:T,onExit:L,onExited:O,onExiting:N,addEndListener:function(e,t){var n=M?e:t;"auto"===h&&(v.current=setTimeout(n,x.current||0))},timeout:"auto"===h?null:h},y),(function(e,t){return b.cloneElement(n,Qs({style:Qs({opacity:0,transform:Wf(.75),visibility:"exited"!==e||r?void 0:"hidden"},Kf[e],m,n.props.style),ref:q},t))}))}));Gf.muiSupportAuto=!0;var Yf=b.createContext({}),Xf=b.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.component,a=void 0===r?"ul":r,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,m=ml(e,["children","classes","className","component","dense","disablePadding","subheader"]),f=b.useMemo((function(){return{dense:l}}),[l]);return b.createElement(Yf.Provider,{value:f},b.createElement(a,Qs({className:$d(i.root,o,l&&i.dense,!c&&i.padding,d&&i.subheader),ref:t},m),d,n))})),Jf=Am({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Xf),Zf="undefined"==typeof window?b.useEffect:b.useLayoutEffect,Qf=b.forwardRef((function(e,t){var n=e.alignItems,i=void 0===n?"center":n,o=e.autoFocus,r=void 0!==o&&o,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,m=e.ContainerComponent,f=void 0===m?"li":m,h=e.ContainerProps,p=(h=void 0===h?{}:h).className,g=ml(h,["className"]),y=e.dense,v=void 0!==y&&y,x=e.disabled,S=void 0!==x&&x,M=e.disableGutters,w=void 0!==M&&M,q=e.divider,k=void 0!==q&&q,T=e.focusVisibleClassName,E=e.selected,D=void 0!==E&&E,N=ml(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),L=b.useContext(Yf),O={dense:v||L.dense||!1,alignItems:i},A=b.useRef(null);Zf((function(){r&&A.current&&A.current.focus()}),[r]);var I,P,R=b.Children.toArray(l),z=R.length&&(I=R[R.length-1],P=["ListItemSecondaryAction"],b.isValidElement(I)&&-1!==P.indexOf(I.type.muiName)),F=Bm(b.useCallback((function(e){A.current=C.findDOMNode(e)}),[]),t),j=Qs({className:$d(u.root,c,O.dense&&u.dense,!w&&u.gutters,k&&u.divider,S&&u.disabled,s&&u.button,"center"!==i&&u.alignItemsFlexStart,z&&u.secondaryAction,D&&u.selected),disabled:S},N),H=d||"li";return s&&(j.component=d||"div",j.focusVisibleClassName=$d(u.focusVisible,T),H=Cf),z?(H=j.component||d?H:"div","li"===f&&("li"===H?H="div":"li"===j.component&&(j.component="div")),b.createElement(Yf.Provider,{value:O},b.createElement(f,Qs({className:$d(u.container,p),ref:F},g),b.createElement(H,j,R),R.pop()))):b.createElement(Yf.Provider,{value:O},b.createElement(H,Qs({ref:F},j),R))})),eh=Am((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(Qf),th=b.forwardRef((function(e,t){var n=e.classes,i=e.className,o=ml(e,["classes","className"]),r=b.useContext(Yf);return b.createElement("div",Qs({className:$d(n.root,i,"flex-start"===r.alignItems&&n.alignItemsFlexStart),ref:t},o))})),nh=Am((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(th),ih=b.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.disableTypography,a=void 0!==r&&r,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,m=e.secondaryTypographyProps,f=ml(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),h=b.useContext(Yf).dense,p=null!=u?u:n;null==p||p.type===kf||a||(p=b.createElement(kf,Qs({variant:h?"body2":"body1",className:i.primary,component:"span",display:"block"},c),p));var g=d;return null==g||g.type===kf||a||(g=b.createElement(kf,Qs({variant:"body2",className:i.secondary,color:"textSecondary",display:"block"},m),g)),b.createElement("div",Qs({className:$d(i.root,o,h&&i.dense,l&&i.inset,p&&g&&i.multiline),ref:t},f),p,g)})),oh=Am({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(ih);function rh(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function ah(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function sh(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function lh(e){return"function"==typeof e?e():e}var uh=b.forwardRef((function(e,t){var n=e.action,i=e.anchorEl,o=e.anchorOrigin,r=void 0===o?{vertical:"top",horizontal:"left"}:o,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,m=e.container,f=e.elevation,h=void 0===f?8:f,p=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,x=e.onEntered,S=e.onEntering,M=e.onExit,w=e.onExited,q=e.onExiting,k=e.open,T=e.PaperProps,E=void 0===T?{}:T,D=e.transformOrigin,N=void 0===D?{vertical:"top",horizontal:"left"}:D,L=e.TransitionComponent,O=void 0===L?Gf:L,A=e.transitionDuration,I=void 0===A?"auto":A,P=e.TransitionProps,R=void 0===P?{}:P,z=ml(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),F=b.useRef(),j=b.useCallback((function(e){if("anchorPosition"===l)return a;var t=lh(i),n=(t&&1===t.nodeType?t:Rm(F.current).body).getBoundingClientRect(),o=0===e?r.vertical:"center";return{top:n.top+rh(n,o),left:n.left+ah(n,r.horizontal)}}),[i,r.horizontal,r.vertical,a,l]),H=b.useCallback((function(e){var t=0;if(p&&"anchorEl"===l){var n=p(e);if(n&&e.contains(n)){var i=function(e,t){for(var n=t,i=0;n&&n!==e;)i+=(n=n.parentElement).scrollTop;return i}(e,n);t=n.offsetTop+n.clientHeight/2-i||0}}return t}),[r.vertical,l,p]),B=b.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:rh(e,N.vertical)+t,horizontal:ah(e,N.horizontal)}}),[N.horizontal,N.vertical]),_=b.useCallback((function(e){var t=H(e),n={width:e.offsetWidth,height:e.offsetHeight},o=B(n,t);if("none"===l)return{top:null,left:null,transformOrigin:sh(o)};var r=j(t),a=r.top-o.vertical,s=r.left-o.horizontal,u=a+n.height,c=s+n.width,d=zm(lh(i)),m=d.innerHeight-y,f=d.innerWidth-y;if(a<y){var h=a-y;a-=h,o.vertical+=h}else if(u>m){var p=u-m;a-=p,o.vertical+=p}if(s<y){var g=s-y;s-=g,o.horizontal+=g}else if(c>f){var v=c-f;s-=v,o.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:sh(o)}}),[i,l,j,H,B,y]),V=b.useCallback((function(){var e=F.current;if(e){var t=_(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[_]),U=b.useCallback((function(e){F.current=C.findDOMNode(e)}),[]);b.useEffect((function(){k&&V()})),b.useImperativeHandle(n,(function(){return k?{updatePosition:function(){V()}}:null}),[k,V]),b.useEffect((function(){if(k){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function i(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,o)}),n)}return i.clear=function(){clearTimeout(t)},i}((function(){V()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[k,V]);var $=I;"auto"!==I||O.muiSupportAuto||($=void 0);var W=m||(i?Rm(lh(i)).body:void 0);return b.createElement(Vf,Qs({container:W,open:k,ref:t,BackdropProps:{invisible:!0},className:$d(c.root,d)},z),b.createElement(O,Qs({appear:!0,in:k,onEnter:v,onEntered:x,onExit:M,onExited:w,onExiting:q,timeout:$},R,{onEntering:Pm((function(e,t){S&&S(e,t),V()}),R.onEntering)}),b.createElement(yf,Qs({elevation:h,ref:U},E,{className:$d(c.paper,E.className)}),u)))})),ch=Am({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(uh);function dh(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function mh({d:e,size:t,style:n={},viewBox:i="0 0 16 16"}){const o={fontSize:dh(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return v.createElement("i",{style:o},v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:i,fill:"currentColor"},v.createElement("path",{d:e})))}const fh=Om(eh)((()=>({textAlign:"start","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),hh={menuItem:"alternative-menu-item"},ph=e=>{const{nested:t,className:n,...i}=e,o=(({nested:e,dir:t})=>Vd((n=>({root:{textAlign:"ltr"===t?"start":"end","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"},...e&&"ltr"===t&&{paddingLeft:n.spacing(4)},...e&&"rtl"===t&&{paddingRight:n.spacing(4)}}}))))(e)();return v.createElement(eh,Hs({className:`${o.root} ${n}`},i))},gh=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${hh.menuItem}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function yh({title:e,selected:t,onClick:n,nested:i,icon:o,bold:r,dir:a,isCyclicFFEnabled:s}){const l=Pe.detectTextDirection(e);return!s?v.createElement(fh,{role:"menuitem",button:!0,onClick:n,className:hh.menuItem,onKeyDown:gh,autoFocus:t},v.createElement(nh,{style:{minWidth:32}},v.createElement(mh,{d:t?ws.d:""})),v.createElement(oh,{primaryTypographyProps:{dir:l}},e)):v.createElement(ph,{nested:i,role:"menuitem",button:!0,onClick:n,className:hh.menuItem,onKeyDown:gh,dir:a,autoFocus:t},v.createElement(oh,{primary:e,primaryTypographyProps:{dir:l,...r&&{style:{fontWeight:600}}}}),v.createElement(nh,{style:{minWidth:16}},v.createElement(mh,{d:t?ws.d:""})),o&&v.createElement(nh,{style:{minWidth:16}},v.createElement(mh,{d:o.d})))}yh.propTypes={title:Us.string.isRequired,selected:Us.bool,onClick:Us.func.isRequired,nested:Us.bool,icon:Us.shape({d:Us.string.isRequired}),bold:Us.bool,dir:Us.string.isRequired,isCyclicFFEnabled:Us.bool.isRequired},yh.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},ph.propTypes={nested:Us.bool,className:Us.string},ph.defaultProps={nested:!1,className:hh.menuItem};const vh={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}};function bh({alignTo:e,currentId:t,dir:n,dock:i,list:o,onClose:r,show:a,instruction:s,isCyclicFFEnabled:l}){const u=l,c=o.map(((e,i)=>{var a;return v.createElement(v.Fragment,{key:e.id},v.createElement(yh,{icon:e.icon,title:e.title,bold:e.groupItem,selected:e.selected,onClick:()=>{e.onSelect&&e.onSelect(t),r(e.id)},dir:n,isCyclicFFEnabled:l}),(null===(a=e.children)||void 0===a?void 0:a.length)>0&&v.createElement(Jf,{dense:!0,dir:n,component:"div",disablePadding:!0},e.children.map((t=>v.createElement(yh,{key:t.id,nested:!0,title:t.title,selected:t.selected,onClick:()=>{t.onSelect(),r(e.id)},dir:n,isCyclicFFEnabled:l})))),i<o.length-1&&u&&v.createElement($f,{key:`divider-${e.id}`}))}));return v.createElement(ch,Hs({anchorEl:e,open:a,onClose:r},vh[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),v.createElement(Jf,{dense:!0,disablePadding:!0,dir:n,"aria-label":s,component:"nav"},c))}bh.propTypes={alignTo:Us.any,currentId:Us.string.isRequired,dir:Us.string.isRequired,dock:Us.string.isRequired,list:Us.array,onClose:Us.func.isRequired,show:Us.bool.isRequired,instruction:Us.string.isRequired,isCyclicFFEnabled:Us.bool.isRequired},bh.defaultProps={list:[],alignTo:null};const xh="title-button",Sh="active-title-button",Mh=Om((({children:e,...t})=>v.createElement(Ef,Hs({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),Ch=Om(Ef)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class wh extends v.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasPopoverOptions:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.alignToRef=v.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&n&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:i}=this.props;n&&i&&n.getPopoverOptions().then((e=>{t.hasPopoverOptions!==(0!==e.length)&&this.setState({hasPopoverOptions:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${xh}`);t&&t.classList.add(Sh)}this.props.popover.getPopoverOptions().then((e=>{this.setState({open:!0,list:e})}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${xh}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${Sh}`);e&&(e.classList.remove(Sh),setTimeout((()=>{e.focus()}),50))}}render(){const{titleData:e,popover:t,translator:n,disabled:i,isDimension:o,padding:r,minWidth:a,hasAlternative:s,supportConditional:l,showGroupDimOptions:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,m=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>v.createElement(Mh,{style:{display:"flex",alignItems:"center",color:m&&"rgba(89, 89, 89, 0.8)",pointerEvents:m?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>m?void 0:e.drillUp(d-n),title:t},v.createElement("span",{style:c},t),v.createElement(mh,Hs({},ks,{size:"small",style:{margin:"0 8px"}}))))),h=l?this.state.hasPopoverOptions:s,p=h||u,g=t&&!this.state.open?this.openPopover:this.closePopover,y=!t||i||this.state.inSelection,b={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&y&&"none",...r?{padding:r}:{paddingTop:0,paddingBottom:0},...a&&{minWidth:a}};this.state.open&&(b.background="rgba(0,0,0,0.08)");const x=Pe.detectTextDirection(e.text),S=v.createElement(Mh,{"aria-label":n.get(`Accessibility.${t&&h?"Alternative":"Normal"}.Instructions`,[e.text]),style:b,onClick:y?void 0:g,title:e.text,tabIndex:y?-1:0,onFocus:y?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:y?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${xh} ${e.id}`,"data-id":e.id},e.locked&&v.createElement(mh,Hs({},Cs,{size:"small",title:n.get("Tooltip.selections.locked")})),v.createElement("span",{style:c,dir:x},e.text),t&&p&&v.createElement(mh,Hs({},qs,{size:"small",style:{margin:"0 8px"}})));return v.createElement(v.Fragment,null,e.icon&&e.icon.onClick&&v.createElement(Ch,{variant:"outlined",onClick:e.icon.onClick,disabled:!e.icon.onClick},v.createElement(mh,Hs({},e.icon.path,{size:"small",title:n.get(e.icon.tooltip)}))),e.icon&&!e.icon.onClick&&v.createElement(mh,Hs({},e.icon.path,{size:"small",title:n.get(e.icon.tooltip),style:{margin:"0 4px 0 0"}})),f,v.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:p?"auto":"none",height:"100%"}},S),t&&p&&v.createElement(bh,{dock:t.dock,dir:t.dir,currentId:e.id,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.list,onClose:this.closePopover,changeTo:this.changeTo,instruction:n.get("Accessibility.Popover.Instructions"),isCyclicFFEnabled:this.props.isCyclicFFEnabled}))}}function qh(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}wh.propTypes={disabled:Us.bool.isRequired,padding:Us.string,minWidth:Us.string,titleData:Us.shape({breadcrumbs:Us.arrayOf(Us.string).isRequired,icon:Us.shape({path:Us.shape({d:Us.string.isRequired}),tooltip:Us.string.isRequired,onClick:Us.func}),index:Us.number.isRequired,locked:Us.bool.isRequired,text:Us.string.isRequired,popoverText:Us.string.isRequired,drillUp:Us.func,id:Us.string.isRequired}).isRequired,popover:Us.shape({dir:Us.string.isRequired,dock:Us.string.isRequired,getPopoverOptions:Us.func.isRequired}),translator:Us.shape({get:Us.func.isRequired}).isRequired,selections:Us.shape({isActive:Us.func,addListener:Us.func,removeListener:Us.func}),style:Us.shape({fontSize:Us.string,color:Us.string,fontFamily:Us.string}).isRequired,isDimension:Us.bool.isRequired,hasAlternative:Us.bool.isRequired,supportConditional:Us.bool.isRequired,isCyclicFFEnabled:Us.bool.isRequired,showGroupDimOptions:Us.bool.isRequired},wh.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const kh=zl({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const Th=Hl({productionPrefix:"q7fc0",disableGlobal:!0,seed:""});var Eh={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Dh}=Eh;function Nh({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Dh}=(null==t?void 0:t.meta)||{},{qHyperCube:i}=e.getLayout();return i.qSize.qcy*i.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Lh}=Eh,Oh=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Lh}=(null==t?void 0:t.meta)||{},{qHyperCube:i}=e.getLayout();return i.qDimensionInfo.length>1&&!Nh({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Ah}=Eh,{MAX_NUM_POINTS:Ih,DEFAULT_NUM_POINTS:Ph,DEFAULT_NUM_LINES:Rh}=Eh,{DEFAULT_NUM_POINTS:zh}=Eh,Fh=({layoutService:e,largeDataService:t})=>{if(!Nh({layoutService:e,largeDataService:t})){const{maxNumPoints:e=zh}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:i=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:o=Rh,maxNumPoints:r=Ph,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Oh({layoutService:e,largeDataService:t})*i[0]<=r)return i[0];const s=Math.max(1,Math.min(o,i[1])),l=r/s,u=Math.floor(i[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>Rh||r>Ph)?Math.min(u,Math.ceil(Ih/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Ah}=(null==t?void 0:t.meta)||{},{measureCount:i=1}=(null==e?void 0:e.meta)||{},o=4+2*(i-1);return Math.floor(n/(i*o))})({layoutService:e,largeDataService:t})},jh=({start:e,end:t,model:n,layoutService:i,largeDataService:o,definitionPath:r})=>{const a={qStart:e,qEnd:t,qNbrPoints:Fh({layoutService:i,largeDataService:o}),qMaxNbrTicks:300,qMaxNumberLines:Oh({layoutService:i,largeDataService:o})};return n.getHyperCubeContinuousData(r,a,!1)};function Hh({model:e,layoutService:t,largeDataService:n,definitionPath:i="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Nh({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Fh({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Oh({layoutService:t,largeDataService:n}),fetch:(o,r)=>jh({start:o,end:r,model:e,layoutService:t,largeDataService:n,definitionPath:i})}}function Bh(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function _h({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let i=n+e,o=i+t;return 1===t&&0===e&&(i=n-.5,o=n+.5),{zoom:{min:i,max:o}}}(n,t.get("continuousMin"))}}}function Vh(){const e=()=>{},t=[],n={};return e.set=(e,i)=>{const o=t.indexOf(e);o>-1&&t.splice(o,1),t.push(e),n[e]=i},e.forEach=e=>{t.forEach(((t,i)=>e(n[t],i)))},e.has=e=>e in n,e}function Uh(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const i=[],o=Vh(),r=Vh();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?o.set(l,s):s[0].qNum>t&&(r.has(l)||r.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return o.forEach(((e,t)=>i.splice(t,0,e))),r.forEach((e=>i.push(e))),i}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const i=[];let o,r;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?o=s:s[0].qNum>t&&(r||(r=s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return o&&i.unshift(o),r&&i.push(r),i}({start:e,end:t,matrix:n})}function $h(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Wh(e,t,n){const i={qDataPages:(n.qDataPages||[]).map((n=>{const i=Uh(e,t,n.qMatrix),o=$h(n.qArea,i);return{...n,qArea:o,qMatrix:i}}))};return n.qAxisData&&n.qAxisData.qAxis&&(i.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,i)=>((i.qStart>=e&&i.qStart<=t||i.qEnd>=e&&i.qEnd<=t||i.qStart<e&&i.qEnd>t)&&n.push(i),n)),[])})))}}(e,t,n.qAxisData)),i}const Kh=2**.5,Gh=1/Kh,Yh=1e-6,Xh=Gh**44;function Jh(e){return e.qIsOtherCell}function Zh({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Jh)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(Jh)||t++})),t}(n)}const Qh={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var ep={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const i=t[e],o=t[e+1];i.data={},o||1===i.end?o?(i.data.start=i.value,i.data.end=o.value,i.end=o.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const i=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return n}};const tp="…";function np(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function ip(e,t){const{localProps:{size:n},props:{anchor:i}}=t,o=function({props:e,localProps:{size:t},style:n,renderer:i}){const o=e.label.padding,r=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>i.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,i)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=i;e.start===e.end&&(d=u.width+2*o,1===e.end&&(c-=d));const m={x:c+o,y:o,width:d-2*o,height:t.height-2*o},f=s(`${l[0]}${tp}`).width,h=Math.max(0,m.width-u.width),p=Math.max(0,m.height-u.height),g=r*h,y=a*p;return{show:m.width>=Math.min(f,u.width),text:l,dx:g,dy:y,rect:m,style:n.label,segment:{x:c+g,width:u.width+2*o},tickValue:e.value}}}}(t),r=function({localProps:{size:e},style:t,scale:n,props:i}){const[o,r]=n.domain(),a=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:(n,i)=>{const s=a*i.width,l=np(i.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=r,x1:l,y1:0,x2:l,y2:np(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const i=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:i,height:t.height}}(e,n,i);return{rect:t,label:o.resolve(e,t),guideLine:r.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const i=e[n-1],o=t[n-1].label;if(i&&i.start===i.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(r=n.segment,a=o.segment,!(r.x<a.x?r.x+r.width>=a.x:a.x+a.width>=r.x))}var r,a}(e,a),a}function op(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:i=>{const o=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),r=np(i.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:r,y1:np(o,n.minorGuideLine.strokeWidth),x2:r,y2:np(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function rp(e){return e.filter((e=>e.show)).map((e=>se({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var ap={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),i=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const i=np(1,t.line.strokeWidth);return{show:n.line.show,x1:np(0,t.line.strokeWidth),y1:i,x2:np(e.width,t.line.strokeWidth),y2:i,style:t.line}}(this),this.state.major=ip(n,this),this.state.minor=op(i,this)},render(){return[...rp([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>se({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...rp(this.state.major.map((e=>e.guideLine))),...rp(this.state.minor.map((e=>e.guideLine)))];var e}};function sp(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function lp(e){return e.qTags.indexOf("$qualified")>-1}function up({qAxis:e}){const t=[],n=[];for(let i=0;i<e.length;i++){const o=i+1,r=e[i],a=e[o];sp(r,a)?(lp(a)?(t.push(o),n.push(i)):(t.push(i),n.push(o)),i++):(t.push(i),n.push(i))}return{qualified:t,nonQualified:n}}function cp({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let i,o=NaN,r=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(o=u.index,i=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){r="auto",s=!0;break}if(e&&e.queries.inner(n)){r=e.index;const i=t[l+2];i&&i.queries.minor(n)&&(a=i.index);break}}}if(!Number.isNaN(o)&&Number.isNaN(r)&&"auto"!==r){r=o,o=NaN;const e=t[i+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(o)&&(o="auto",r="auto");return{outer:o,inner:r,minor:a,isDayOrShorter:s}}}}const dp=16;function mp({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:i}){const o=n;return{isDayOrShorter:()=>(o.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,o.isDayOrShorter),count:()=>e.length,maxRange:()=>(o.maxRange=e.length?Math.max(...e.map((e=>Math.abs(i(e.qStart)-i(e.qEnd))))):0,o.maxRange),rangeAndWidth(){const n=i.clamp();return i.clamp(!1),o.rangeAndWidth=e.map((e=>({range:Math.abs(i(e.qStart)-i(e.qEnd)),width:t(`${e.qText}`).width+dp}))),i.clamp(n),o.rangeAndWidth}}}const fp=6;function hp({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=fp,canFitHalfDayTicks:n=>n>=t*e.count()}}function pp({qualified:e,nonQualified:t,qAxis:n,measureText:i,reqAutoFitWidth:o,scale:r},{attributesFactory:a=mp,queryFactory:s=hp}={attributesFactory:mp,queryFactory:hp}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:i,scale:r});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:o})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function gp({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:i=0,scale:o},{metaFactory:r=pp,mapper:a=up,resolver:s=cp}={metaFactory:pp,mapper:up,resolver:cp}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=r({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:i,scale:o}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const i=n.key({distance:t});if(n.get(i))return n.get(i);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const o=m.resolve(t);return n.set(i,o),o}}}const yp=86400,vp=864e5;function bp(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(vp*(e-Math.floor(e)))))}const xp=bp(0).getTime();function Sp(e){return(e.getTime()-xp)/yp/1e3}const Mp=new Date,Cp=new Date;function wp(e,t,n,i){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,i,r)=>{const a=[];if(n=o.ceil(n),r=null==r?1:Math.floor(r),!(n<i&&r>0))return a;let s;do{a.push(s=new Date(+n)),t(n,r),e(n)}while(s<n&&n<i);return a},o.filter=n=>wp((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,i)=>{if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,i)=>(Mp.setTime(+t),Cp.setTime(+i),e(Mp),e(Cp),Math.floor(n(Mp,Cp))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(i?t=>i(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const qp=1e3,kp=6e4,Tp=36e5,Ep=864e5,Dp=6048e5,Np=wp((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*qp)}),((e,t)=>(t-e)/qp),(e=>e.getUTCSeconds()));Np.range;const Lp=wp((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qp)}),((e,t)=>{e.setTime(+e+t*kp)}),((e,t)=>(t-e)/kp),(e=>e.getMinutes()));Lp.range;const Op=wp((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*kp)}),((e,t)=>(t-e)/kp),(e=>e.getUTCMinutes()));Op.range;const Ap=wp((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qp-e.getMinutes()*kp)}),((e,t)=>{e.setTime(+e+t*Tp)}),((e,t)=>(t-e)/Tp),(e=>e.getHours()));Ap.range;const Ip=wp((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*Tp)}),((e,t)=>(t-e)/Tp),(e=>e.getUTCHours()));Ip.range;const Pp=wp((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*kp)/Ep),(e=>e.getDate()-1));Pp.range;const Rp=wp((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Ep),(e=>e.getUTCDate()-1));Rp.range;const zp=wp((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Ep),(e=>Math.floor(e/Ep)));function Fp(e){return wp((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*kp)/Dp))}zp.range;const jp=Fp(0),Hp=Fp(1),Bp=Fp(2),_p=Fp(3),Vp=Fp(4),Up=Fp(5),$p=Fp(6);function Wp(e){return wp((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/Dp))}jp.range,Hp.range,Bp.range,_p.range,Vp.range,Up.range,$p.range;const Kp=Wp(0),Gp=Wp(1),Yp=Wp(2),Xp=Wp(3),Jp=Wp(4),Zp=Wp(5),Qp=Wp(6);Kp.range,Gp.range,Yp.range,Xp.range,Jp.range,Zp.range,Qp.range;const eg=wp((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));eg.range;const tg=wp((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));tg.range;const ng=wp((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));ng.every=e=>isFinite(e=Math.floor(e))&&e>0?wp((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,ng.range;const ig=wp((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));ig.every=e=>isFinite(e=Math.floor(e))&&e>0?wp((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,ig.range;const og={second:1,minute:2,hour:3,day:4,month:5,year:6};function rg({timeScale:e,labels:t,distance:n,isDayOrShorter:i,cache:o,timeOnly:r,initialMin:a}){const[s,l]=e.domain(),u=o.key({distance:n});let c;o.get(u,1)?c=o.get(u,1):(c=function(e,t,n,i,o,r){function a(e){return ig.filter((t=>(t.getUTCFullYear()-r.getUTCFullYear())%e==0))}const s=Np.count(e,t),l=Op.count(e,t),u=Ip.count(e,t),c=Rp.count(e,t),d=Kp.count(e,t),m=tg.count(e,t),f=ig.count(e,t),h=n/i.second.width-1,p=n/i.minute.width-1,g=n/i.date.width-1,y=n/i.year.width-1,v={type:"year",desc:"year",count:f,interval:ig.every(1),formatter:i.year.formatter,offset:e=>ig.offset(e,-1),floor:ig.floor};if(s<=h)v.type=og.second,v.desc="second",v.count=s,v.interval=Np.every(1),v.formatter=i.second.formatter,v.offset=e=>Np.offset(e,-1),v.floor=Np.floor;else if(s/2<=h)v.type=og.second,v.desc="every other second",v.count=s/2,v.interval=Np.every(2),v.formatter=i.second.formatter,v.offset=e=>Np.offset(e,-2),v.floor=Np.floor;else if(s/5<=h)v.type=og.second,v.desc="every 5 second",v.count=s/5,v.interval=Np.every(5),v.formatter=i.second.formatter,v.offset=e=>Np.offset(e,-5),v.floor=Np.floor;else if(s/15<=h)v.type=og.second,v.desc="every 15 second",v.count=s/15,v.interval=Np.every(15),v.formatter=i.second.formatter,v.offset=e=>Np.offset(e,-15),v.floor=Np.floor;else if(s/30<=h)v.type=og.second,v.desc="every 30 second",v.count=s/30,v.interval=Np.every(30),v.formatter=i.second.formatter,v.offset=e=>Np.offset(e,-30),v.floor=Np.floor;else if(l<=p)v.type=og.minute,v.desc="minute",v.count=l,v.interval=Op.every(1),v.formatter=i.minute.formatter,v.offset=e=>Op.offset(e,-1),v.floor=Op.floor;else if(l/2<=p)v.type=og.minute,v.desc="every 2 minute",v.count=l/2,v.interval=Op.every(2),v.formatter=i.minute.formatter,v.offset=e=>Op.offset(e,-2),v.floor=Op.floor;else if(l/5<=p)v.type=og.minute,v.desc="every 5 minute",v.count=l/5,v.interval=Op.every(5),v.formatter=i.minute.formatter,v.offset=e=>Op.offset(e,-5),v.floor=Op.floor;else if(l/10<=p)v.type=og.minute,v.desc="every 10 minute",v.count=l/10,v.interval=Op.every(10),v.formatter=i.minute.formatter,v.offset=e=>Op.offset(e,-10),v.floor=Op.floor;else if(l/15<=p)v.type=og.minute,v.desc="every 15 minute",v.count=l/15,v.interval=Op.every(15),v.formatter=i.minute.formatter,v.offset=e=>Op.offset(e,-15),v.floor=Op.floor;else if(l/30<=p)v.type=og.minute,v.desc="every 30 minute",v.count=l/30,v.interval=Op.every(30),v.formatter=i.minute.formatter,v.offset=e=>Op.offset(e,-30),v.floor=Op.floor;else if(u<=p)v.type=og.hour,v.desc="hour",v.count=u,v.interval=Ip.every(1),v.formatter=i.minute.formatter,v.offset=e=>Ip.offset(e,-1),v.floor=Ip.floor;else if(u/2<=p)v.type=og.hour,v.desc="every 2 hour",v.count=u/2,v.interval=Ip.every(2),v.formatter=i.minute.formatter,v.offset=e=>Ip.offset(e,-2),v.floor=Ip.floor;else if(u/3<=p)v.type=og.hour,v.desc="every 3 hour",v.count=u/3,v.interval=Ip.every(3),v.formatter=i.minute.formatter,v.offset=e=>Ip.offset(e,-3),v.floor=Ip.floor;else if(u/6<=p)v.type=og.hour,v.desc="every 6 hour",v.count=u/6,v.interval=Ip.every(6),v.formatter=i.minute.formatter,v.offset=e=>Ip.offset(e,-6),v.floor=Ip.floor;else if(u/12<=p||o)v.type=og.hour,v.desc="every 12 hour",v.count=u/12,v.interval=Ip.every(12),v.formatter=i.minute.formatter,v.offset=e=>Ip.offset(e,-12),v.floor=Ip.floor;else if(c<=g)v.type=og.day,v.desc="day",v.count=c,v.interval=Rp.every(1),v.formatter=i.date.formatter,v.offset=e=>Rp.offset(e,-1),v.floor=Rp.floor;else if(c/2<=g)v.type=og.day,v.desc="every 2 day",v.count=c/2,v.interval=Rp.every(2),v.formatter=i.date.formatter,v.offset=e=>Rp.offset(e,-2),v.floor=Rp.floor;else if(c/3<=g)v.type=og.day,v.desc="every 3 day",v.count=c/3,v.interval=Rp.every(3),v.formatter=i.date.formatter,v.offset=e=>Rp.offset(e,-3),v.floor=Rp.floor;else if(d<=g)v.type=og.day,v.desc="week",v.count=d,v.interval=Kp.every(1),v.formatter=i.date.formatter,v.offset=e=>Kp.offset(e,-1),v.floor=Rp.floor;else if(d/2<=g)v.type=og.day,v.desc="every 2 week",v.count=d/2,v.interval=Kp.every(2),v.formatter=i.date.formatter,v.offset=e=>Kp.offset(e,-2),v.floor=Rp.floor;else if(m<=g)v.type=og.month,v.desc="month",v.count=m,v.interval=tg.every(1),v.formatter=i.date.formatter,v.offset=e=>tg.offset(e,-1),v.floor=Rp.floor;else if(m/3<=g)v.type=og.month,v.desc="quarter",v.count=m/3,v.interval=tg.every(3),v.formatter=i.date.formatter,v.offset=e=>tg.offset(e,-3),v.floor=Rp.floor;else if(m/6<=g)v.type=og.month,v.desc="half year",v.count=m/6,v.interval=tg.every(6),v.formatter=i.date.formatter,v.offset=e=>tg.offset(e,-6),v.floor=Rp.floor;else if(f<=y)v.type=og.year,v.desc="year",v.count=f,v.interval=ig.every(1),v.formatter=i.year.formatter,v.offset=e=>ig.offset(e,-1),v.floor=ig.floor;else if(f/2<=y)v.type=og.year,v.desc="every 2 year",v.count=f/2,v.interval=a(2),v.formatter=i.year.formatter,v.offset=e=>ig.offset(e,-2),v.floor=ig.floor;else if(f/5<=y)v.type=og.year,v.desc="every 5 year",v.count=f/5,v.interval=a(5),v.formatter=i.year.formatter,v.offset=e=>ig.offset(e,-5),v.floor=ig.floor;else if(f/10<=y)v.type=og.year,v.desc="every 10 year",v.count=f/10,v.interval=a(10),v.formatter=i.year.formatter,v.offset=e=>ig.offset(e,-10),v.floor=ig.floor;else{const e=Math.floor(f/y);v.type=og.year,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=i.year.formatter,v.offset=t=>ig.offset(t,-e),v.floor=ig.floor}return v}(s,l,n,t.all(),i,a),o.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const m=d.map(((e,t,n)=>{const i=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:c.formatter}}));let f=[];if(!r&&c.type<=og.hour){const n=t.getFormat("date"),i=e.ticks(Rp.every(1));i.length&&s.getUTCDate()!==i[0].getUTCDate()&&i.unshift(Rp.offset(i[0],-1)),f=(i.length?i:[Rp.floor(s)]).map(((e,t,i)=>{const o=i[t+1]?i[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:n.formatter}}))}return{inner:m,outer:f}}const ag=86400,sg=1440,lg={};function ug(e,t,n,i){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:i}}function cg(e,t,n){const{generator:i,anchor:o,clamp:r,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(r);const[l,u]=e.domain(),c=Jr().domain([bp(l),bp(u)]);c.clamp(r),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof i?i:{type:i};let m;m="d3"===d.type?(e,o)=>rg({timeScale:c,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:bp(i.initialMin)}):e=>function(e,t,n,i,o,r=!1){if(lg[[t,n,i,i,r]])return lg[[t,n,i,i,r]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=bp(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=i-n,m=t/(o-i),f=m/1440,h=m/ag,p=366*m,g=3*m*30,y=a.second.width/h,v=a.minute.width/f,b=a.date.width/g,x=a.year.width/p;let S,M,C,w=0,q=0,k=null,T=null,E=null,D=null,N=null,L=null;const O={outer:[],inner:[]};for(y<1?(k=1,q=1/ag):y<2?(k=2,q=1/ag*2):y<5?(k=5,q=1/ag*5):y<10?(k=10,q=1/ag*10):y<30?(k=30,q=1/ag*30):v<1?(T=1,q=1/sg):v<2?(T=2,q=1/sg*2):v<5?(T=5,q=1/sg*5):v<10?(T=10,q=1/sg*10):v<30?(T=30,q=1/sg*30):v<60?(E=1,q=1/24):v<120?(E=2,q=2/24):v<360?(E=6,q=.25):v<720?(E=12,q=.5):b<1/90?(q=1,D=1):b<2/90?(q=2,D=2):b<7/90?(q=7,D=7):b<31/90?(N=1,q=31):b<1?(N=3,q=90):x<1?(L=1,q=366):x<2?(L=2,q=732):x<5?(L=5,q=1826.25):(L=10,q=3652.5),M=Math.floor((d+n%1)/q);w<o;){C=M+1,S=L?ug("year",[l+M*L,0,1],[l+C*L,0,1],a.year.formatter):N?ug("month",[l,u+M*N,1],[l,u+C*N,1],a.date.formatter):D?ug("day",[l,u,c+M*D],[l,u,c+C*D],a.date.formatter):E?ug("hour",[l,u,c,0+M*E],[l,u,c,0+C*E],a.minute.formatter):T?ug("minute",[l,u,c,0,0+M*T],[l,u,c,0,0+C*T],a.minute.formatter):ug("second",[l,u,c,0,0,0+M*k],[l,u,c,0,0,0+C*k],a.second.formatter),w=Sp(S.start),O.inner.push(S);const e=Math.floor(w);if(!(r||L||N||D)){const t={type:"day",start:bp(e),end:bp(e+1),formatter:a.date.formatter,qStart:e};O.outer[O.outer.length-1]&&O.outer[O.outer.length-1].qStart===t.qStart||O.outer.push(t)}M++}return O.min=i,O.max=o,lg[[t,n,i,i,r]]=O,O}(n,e,d.min,l,u,"T"===s.qType);const f={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let i;i="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;const r=e.clamp();n&&e.clamp(!1);const a=e(i),s=e(t.qStart),l=e(t.qEnd);return e.clamp(r),{value:i,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>m(t,n)[a].map((t=>{let n;return n="start"===o?Sp(t.start):"end"===o?Sp(t.end):(Sp(t.start)+Sp(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:Sp(t.start),end:Sp(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return f}const dg=41000.2343433,mg=/t+/i,fg=16,hg=60;const pg={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function gg(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const yg="continuousPan";var vg={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:i=Qh,viewCache:o,viewState:r,definitionPath:a},s={}){const{engineFetcherFactory:l=Hh,snapshotFetcherFactory:u=_h,cacheFetcherFactory:c=Bh,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),f=u({layoutService:t,viewCache:o}),h=c({cache:d}),p=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,i;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),o.set("continuousMin",y),o.set("continuousMax",v),o.set("minimiumZoomSpan",(n=y,i=v,Math.max(Yh,(i-n)*Xh))),g=t.meta.isSnapshot?f:m,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=f.getSnapshotData()),r.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:i}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",i),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=$h(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return i.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Wh(y,v,e))).then((e=>this.updateLayout(e))).catch(p)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const i=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,i=t[t.length-1][0].qNum,o=[],r=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?o.push(e[t]):a.qNum>i&&r.push(e[t])}return[...o,...t,...r]}(e.qMatrix,t.qDataPages[n].qMatrix),o=$h(e.qArea,i);return{...e,qArea:o,qMatrix:i}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),i=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),o=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,r=e.qAxis.length;t<r;t++){const r=e.qAxis[t],a=n.indexOf(r.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=i[a];for(let n=0,i=r.qTicks.length;n<i;n++){const i=r.qTicks[n];i.qStart<e?s.push(i):i.qStart>t&&l.push(i)}o[a].qTicks=[...s,...o[a].qTicks,...l]}}return{qAxis:o}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(i.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Wh(e,t,n))).catch(p),fetchFromCache:(e,t)=>h.fetch(e,t).then((n=>Wh(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return se({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return se({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Zh(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=i.query.getShouldProcess()?[i.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:i}=e;function o(e,n,o){return i[e](n,o).then((e=>(i.updateLayout(e),t(),e)))}const r=a(((e,t)=>o("fetch",e,t)),50);return({min:e,max:t},{min:i,max:a})=>!n.meta.isContinuous||e===i&&t===a?Promise.resolve(null):o("fetchFromCache",e,t).then((n=>(r(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,i=NaN;return(o,r)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),i=e.get("minimiumZoomSpan"),Math.abs(o.max-o.min)<i?r:{min:Math.min(o.max,Math.max(t,o.min)),max:Math.max(o.min,Math.min(n,o.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:i=50,rtl:o=!1,targetKey:r}){const a=e.get("continuousMin"),l=e.get("continuousMax");return s(((e,i)=>{const s=(e=>n.componentsFromPoint(e).filter((e=>e.key===r))[0])(e);if(s){const r=function(e,t,n){let{x:i}=e;return i-=t.element.getBoundingClientRect().left,i-=n.rect.x,Math.max(0,Math.min(1,i/n.rect.width))}(e,n,s),u=o?1-r:r,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),f=m-(i>0?Gh:Kh)*m,h=c+f*u,p=d-f*(1-u),g=h<a?a-h:0,y=p>l?p-l:0;t.set("zoom",{min:Math.max(h-y,a),max:Math.min(p+g,l)})}}),i)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:o}){return{type:"Pan",key:"continuous:pan",options:{event:yg,pointers:1,threshold:10,enable(i,o){return this.started===yg||!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))}},events:{[`${yg}start`](n){n.preventDefault(),this.started=yg;const{min:o,max:r}=i.get("zoom");this[yg]={min:o,max:r,size:t.component(e).rect.computedInner.width,span:r-o}},[`${yg}move`](e){e.preventDefault();const{span:t,min:n,max:r,size:a}=this[yg],s=-e.deltaX/a;i.set("zoom",{min:Math.min(n+s*t,o.get("continuousMax")-t),max:Math.max(r+s*t,o.get("continuousMin")+t)})},[`${yg}end`](e){e.preventDefault(),this.started=!1},[`${yg}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:ep,timeAxis:ap},picassoScales:{time:function e(t,n={}){const i=function(e,t,n){const i={};return Object.keys(t).forEach((o=>{const r=e[o],a=typeof r;"function"===a?i[o]=r(n):"object"!==a||Array.isArray(r)?i[o]="undefined"===a?t[o]:r:i[o]=se(!0,{},t[o],r)})),i}(t,pg,n),{qAxis:r}=i,a=Hi(),s={instance:null,invert:!1},{min:l,max:u}=function(e,t){let n=+e.min,i=+e.max;return Number.isNaN(n)&&Number.isNaN(i)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),i=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===i&&(n-=.5,i+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+i)?1:i}}(i,r);let c,d,m=[];const f=function(e){return Number.isNaN(+e)?NaN:a(e)};f.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[i.ticks.level];if(Number.isNaN(+o)||(m=d.transform(r[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=d.transform(r[n.minor].qTicks,{isMinor:!0});m=m.concat(e)}return"auto"===o&&(m=d.generate(e,n.isDayOrShorter)),m},f.invert=e=>a.invert(e),f.domain=e=>Array.isArray(e)?a.domain(e):a.domain(),f.range=e=>Array.isArray(e)?a.range(e):a.range(),f.norm=e=>(gg(s,f),s.instance(e)),f.normInvert=e=>(gg(s,f),s.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(a.clamp(e),a.clamp()),f.min=()=>Math.min(l,u),f.max=()=>Math.max(l,u),a.range(i.invert?[1,0]:[0,1]),a.domain([l,u]),s.invert=i.invert;const h=function(e){const t={},{measureText:n,fn:i,localeInfo:o}=e.formatter,r={second:{type:"second",pattern:"hh:mm:ss",width:hg,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:hg,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:hg,formatter:void 0},year:{type:"year",pattern:"YYYY",width:hg,formatter:void 0}};return o&&mg.test(o.qTimestampFmt)&&(r.minute.pattern+=" tt",r.second.pattern+=" tt"),r.date.pattern=o&&o.qDateFmt?o.qDateFmt:r.date.pattern,Object.keys(r).forEach((e=>{r[e].formatter=i(r[e].pattern),r[e].width=Math.max(r[e].width,n(r[e].formatter(dg)).width+fg)})),t.getFormat=e=>r[e],t.all=()=>r,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return r.date;const i=bp(t[0].data.start),o=bp(t[n-1].data.start);return Rp.count(i,o)/n>=1?r.date:Ip.count(i,o)/n>0?r.minute:Op.count(i,o)/n>0?r.second:r.date},t}(i);return d=cg(a.copy(),i,h),c=gp({qAxis:r,measureText:i.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:i.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>`qHyperCube/${i.field}`,key:()=>i.field,raw:o(n,"fields.0.raw",(()=>({})))}]}),f.formatter=()=>h.getFormatFromTicks(m).formatter,f}}};const bg={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var xg={OPTIONS:bg,DEFAULT:bg.MINI_CHART};function Sg({layoutService:e,discrete:t}){return({h:n,rect:i,orientation:o,minThumbSize:r})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===o,u=i[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<r){const e=(r-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=r}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Mg({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-i)/(o-i),(n.max-i)/(o-i)]}(t,n):function(e){return e.get("viewRange")}(t)}const Cg=e=>({miniChart:e===xg.OPTIONS.MINI_CHART.value,bar:e===xg.OPTIONS.BAR.value,none:e===xg.OPTIONS.NONE.value}),wg=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Cg(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Cg(xg.DEFAULT.value);const i=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Cg(!n&&(i||!i&&o)?xg.OPTIONS.NONE.value:xg.OPTIONS.MINI_CHART.value)};function qg({layoutService:e,override:t}){const n=wg({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===xg.OPTIONS.MINI_CHART.value,n.bar=t.value===xg.OPTIONS.BAR.value,n.none=t.value===xg.OPTIONS.NONE.value),n}function kg({layoutService:e,dockService:t,discrete:n,continuousDataModel:i,viewState:o,viewCache:r,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=qg({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,f={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?i.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Mg({layoutService:e,viewState:o,viewCache:r})}};d.bar&&(f.settings.style="slim",f.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(f.settings.size.thumb={min:4}));const h=a.getStyles();return h.color&&(f.style={standard:{thumb:{"border-color":h.color,opacity:.4},before:{background:h.color,opacity:.1},after:{background:h.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(f.settings.injections=()=>[Sg({layoutService:e,discrete:n})]),f}function Tg({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:r,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===r.meta.major.orientation,f=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,h=m?d.rect.computedInner.width:d.rect.computedInner.height,p=m&&a?h-f:f,g=Math.max(0,Math.min(p/h,1)),[y,v]=Mg({layoutService:o,viewState:n,viewCache:i}),b=g<y,x=g>v,S=!b&&!x;return{pixel:p,relative:g,thumb:S?p-y*h:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Eg({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:o,dockService:r}){return()=>{const a=t.component(e),{orientation:s}=r.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,m]=Mg({layoutService:o,viewState:n,viewCache:i});return{size:c,thumbSize:(m-d)*c}}}function Dg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l}){const u=Tg({componentKey:e,chart:t,viewState:i,viewCache:o,layoutService:r,dockService:a,rtl:l}),c=Eg({componentKey:e,chart:t,viewState:i,viewCache:o,layoutService:r,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(i,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(r.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),r=o.get("continuousMax"),s=n+(r-n)*a.relative;i.set("zoom",{min:Math.min(s-t/2,r-t),max:Math.max(s+t/2,n+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Ng="data-scrollbar-handle";function Lg({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ng)||""}const Og="scrollbarResize",Ag=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Ig({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,rtl:s}){const l=Tg({componentKey:e,chart:t,viewState:i,viewCache:o,layoutService:r,dockService:a,rtl:s});return{type:"Pan",key:`event:${Og}`,options:{event:Og,threshold:0,enable(e,t){return!(!r.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Og]=this[Og]||{},Ag(t)&&Lg({e:t})&&(this[Og].panningEvent=t.srcEvent),!!this[Og].panningEvent))}},events:{[`${Og}start`](n){n.preventDefault(),this[Og]=this[Og]||{},this[Og].panningEvent&&t.component(e).emit("dragStart",this[Og].panningEvent)},[`${Og}move`](n){if(n.preventDefault(),this[Og]=this[Og]||{},!this[Og].panningEvent)return;const r=i.get("zoom"),a=o.get("continuousMin"),s=o.get("continuousMax"),u=o.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Lg({e:this[Og].panningEvent});let m="start"===d?Math.min(c,r.max):r.min,f="end"===d?Math.max(c,r.min):r.max;m===f&&(m-="start"===d?u:0,f+="end"===d?u:0),i.set("zoom",{min:m,max:f}),t.component(e).emit("render")},[`${Og}end`](n){n.preventDefault(),this[Og]=this[Og]||{},delete this[Og].panningEvent,t.component(e).emit("dragEnd")},[`${Og}cancel`](n){n.preventDefault(),this[Og]=this[Og]||{},delete this[Og].panningEvent,t.component(e).emit("dragEnd")}}}}const Pg="scrollbarPan";function Rg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l}){const u=Tg({componentKey:e,chart:t,viewState:i,viewCache:o,layoutService:r,dockService:a,rtl:l}),c=Eg({componentKey:e,chart:t,viewState:i,viewCache:o,layoutService:r,dockService:a});return{type:"Pan",key:`event:${Pg}`,options:{event:Pg,threshold:0,enable(i,o){return this[Pg]=this[Pg]||{},!(o&&!this[Pg].isPanning)||!!n.scroll.enabled()&&((!o||o.target===t.element)&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e)))}},events:{[`${Pg}start`](n){n.preventDefault();const a=u(n);if(this[Pg]=this[Pg]||{},this[Pg].isPanning=!0,t.component(e).emit("lockState"),r.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),r=o.get("continuousMax"),s=n+(r-n)*a.relative;s<e.min?i.set("zoom",{min:Math.min(s,r-t),max:Math.max(s+t,n+t)}):s>e.max&&i.set("zoom",{min:Math.min(s-t,r-t),max:Math.max(s,n+t)}),this[Pg].relative=a.relative,this[Pg].zoom=i.get("zoom"),this[Pg].zoom.span=this[Pg].zoom.max-this[Pg].zoom.min,this[Pg].zoom.fullSpan=r-n}else if(a.onThumb)this[Pg].offset=a.thumb;else{const e=c();this[Pg].offset=a.beforeThumb?0:e.thumbSize}},[`${Pg}move`](n){n.preventDefault();const a=u(n);if(this[Pg]=this[Pg]||{},r.meta.isContinuous){const e=a.relative-this[Pg].relative,{fullSpan:t,span:n,min:r,max:s}=this[Pg].zoom,l=o.get("continuousMin"),u=o.get("continuousMax");i.set("zoom",{min:Math.min(r+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Pg].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Pg}end`](n){n.preventDefault(),this[Pg]=this[Pg]||{},this[Pg].isPanning=!1,t.component(e).emit("unlockState")},[`${Pg}cancel`](n){n.preventDefault(),this[Pg]=this[Pg]||{},this[Pg].isPanning=!1,t.component(e).emit("unlockState")}}}}function zg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l}){return[Dg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l}),Ig({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,rtl:l}),Rg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l})]}function Fg({componentKey:e,chart:t,actions:n,layoutService:i}){const o=(o,r)=>{if(!i.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(o,r)};return{type:"native",events:{mousemove:e=>o("hover",e),mouseleave:()=>o("leave")}}}function jg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l}){return{gestures:[...zg({componentKey:e,chart:t,actions:n,viewState:i,viewCache:o,layoutService:r,dockService:a,discrete:s,rtl:l})],native:Fg({componentKey:e,chart:t,actions:n,layoutService:r})}}const Hg={background:"rgba(0, 0, 0, 0.1)"},Bg={top:-1,bottom:-1,width:6},_g={width:2,background:"#595959"};var Vg={before:Hg,after:Hg,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Bg,endHandle:Bg,startHandleBorder:_g,endHandleBorder:_g};const Ug={background:"rgba(0, 0, 0, 0.1)"},$g={top:-1,bottom:-1,width:6},Wg={width:2,background:"#595959"};var Kg={before:Ug,after:Ug,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:$g,endHandle:$g,startHandleBorder:Wg,endHandleBorder:Wg};const Gg={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Yg={pointerEvents:"initial"},Xg={pointerEvents:"none"};const Jg="ew-resize",Zg="default";function Qg(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,i=n?e.computedInner.width:e.computedInner.height,o=t.range(),r=n&&t.rtl;return{size:i,start:(r?1-o[1]:o[0])*i,end:(r?1-o[0]:o[1])*i}}function ey(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?Jg:Zg}function ty(e,t,n){const{min:i}=this.settings.settings.size.thumb;if(n-t<i){const o=(i-(n-t))/2,r=Math.max(0,0-(t-o))-Math.max(0,n+o-e);return{size:e,start:t-o+r,end:n+o+r}}return{size:e,start:t,end:n}}function ny(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function iy(){const{size:e,start:t,end:n}=Qg.call(this);this.renderer.render(this.elements(this.h,ty.call(this,e,t,n)))}function oy(){const{state:e,settings:t,style:n}=this,i=t.settings.style;return e.style[i]||(e.style[i]=function({id:e,style:t}){const n="slim"===e?Kg:Vg;return{container:{...Gg},before:{...Gg,...n.before,...t.before},after:{...Gg,...n.after,...t.after},thumb:{...Gg,...n.thumb,...t.thumb},startHandle:{...Gg,...Yg,...n.startHandle},endHandle:{...Gg,...Yg,...n.endHandle},startHandleBorder:{...Gg,...Xg,...n.startHandleBorder},endHandleBorder:{...Gg,...Xg,...n.endHandleBorder}}}({id:t.settings.style,style:n[i]})),e.style[i]}var ry={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){iy.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!ny.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Lg({e:e});t&&(this.state.hover[t]=!0),ey.call(this),iy.call(this)},leave(){this.state.locked||(this.state.hover.reset(),ey.call(this),iy.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Lg({e:e});t&&(this.state.drag[t]=!0),ey.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),ey.call(this),iy.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:i}=this.settings.settings.size.area,o="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[o]*i))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:i}=Qg.call(this);return this.elements(e,ty.call(this,t,n,i))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:i}){const{settings:o}=this.settings,r=o.injections().map((t=>t({h:e,rect:this.rect,orientation:o.orientation,minThumbSize:o.size.thumb.min})));return function({h:e,size:t,start:n,end:i,properties:o,startHandleActive:r,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[o.end]:t-n},m={[o.start]:i},f={left:-3},h={left:1},p={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...u?m:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:m},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?p:f},class:"scrollbar--start-handle",[Ng]:"start"},r?e("div",{style:{...s.startHandleBorder,...u?g:h}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?f:p},class:"scrollbar--end-handle",[Ng]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?h:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[o.start]:n,[o.end]:t-i},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...c])}({h:e,size:t,start:n,end:i,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:oy.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:r})}};const ay={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:i,rendHeight:o,flipXY:r,symbol:a}){let s="x",l="y",u=i,c=o,d=t<.5?90:-90;return r&&(s="y",l="x",u=o,c=i,d=t<.5?180:0),a(se({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function sy({i:e,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:a="box"}){let s,l=null,u=null;void 0!==i.major.settings.binStart?(l=i.major.items[e].binStart,u=i.major.items[e].binEnd,s=i.major.settings.binStart.scale):(s=i.major.settings.major.scale,l=s?i.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=se({},{major:l,majorEnd:u},i.minor.items[e]);o.forEach((t=>{d[t]=i[t].items[e]}));const m=r?n:t,f=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:i,maxMajorWidth:o}){const r=e>=0?1:-1;let a=Math.min(r*e*t,Number.isNaN(Number(i))?o:i/o);return a=Number.isNaN(Number(n))?a:Math.max(n/o,a),a*r}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),h=(c-f)/2,p=h+d.major+f/2;return{item:d,boxCenter:p,boxWidth:f,boxPadding:h,rendWidth:t,rendHeight:n}}function ly({keys:e,data:t,defaultSettings:n,style:i,settings:o,width:r,height:a,resolver:s}){const l=se(!0,{},n||{},i||{}),u={major:"horizontal"===o.orientation?a:r,minor:"horizontal"===o.orientation?r:a},c=o.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:se(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:se(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:o.major}});const m=o.minor||{};let f;const h={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:se(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let n=0,i=e.length;n<i;n++)f=e[n],h[f]=s.resolve({data:t,defaults:l[f],settings:o[f],scaled:u});return h}const uy=["oob"];const cy={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,i="horizontal"===this.settings.settings.orientation,{data:o,style:r,resolver:a,symbol:s}=this,l=ly({keys:uy,data:o,defaultSettings:{oob:ay.getDefaultSettings()},style:r,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l,d=function({width:e,height:t,flipXY:n,resolved:i,keys:o,symbol:r,dockValue:a,_calcItemRenderingOpts:s=sy}){const l=[],{items:u}=i.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:f,rendHeight:h}=s({i:c,width:e,height:t,resolved:i,keys:o,flipXY:n,calcKey:"oob"}),p=u[c].data,g=[];if(d.oob.show){g.push(ay.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:f,rendHeight:h,flipXY:n,symbol:r}));const e={type:"container",data:p,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:i,resolved:l,keys:uy,symbol:s,dockValue:n});return d}},dy={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},my=["hat"];function fy(e,t=!0){let n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?`M${i.x} ${i.y}`:`L${i.x} ${i.y}`,n+=" "}return t&&(n+="Z"),n}function hy({item:e,boxWidth:t,boxPadding:n,rendWidth:i,rendHeight:o,flipXY:r}){let a="x",s="y",l=i,u=o,c=e.hat.alignment||0;r&&(a="y",s="x",l=o,u=i,c=1-c);const d=(n+e.major)*l;let m=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const f=se({},e.hat,{type:"path",d:fy(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[f,se({},e.hat,{type:"path",d:fy(m)})]}const py={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:r}=this,a=ly({keys:my,data:i,defaultSettings:dy,style:o,settings:this.settings.settings,width:e,height:t,resolver:r}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:i,keys:o,_calcItemRenderingOpts:r=sy}){const a=[],{items:s}=i.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:f}=r({i:l,width:e,height:t,resolved:i,keys:o,flipXY:n,calcKey:"hat"}),h=s[l].data,p=[];u.hat.show&&p.push(...hy({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:f,flipXY:n}));const g={type:"container",data:h,collider:{type:"bounds"},children:p};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:my});return u}};function gy(e,t,n,i){const o=function(t){const n=String(t);return e(n)};return o.ticks=()=>t.map((t=>{const r=o([t.data.value,i?n-1:0]),a=o([t.data.value,i?0:n-1])+e.bandwidth();return{position:(r+a)/2,label:t.label,data:t.data,start:r,end:a}})),o.bandwidth=()=>e.bandwidth(),o.data=()=>e.data(),o.domain=()=>e.domain(),o.pxScale=function(i){const o=e.pxScale(i);return o===e?this:gy(o,t,n)},o}function yy(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},i={}){const o=t(e,n,i),r=o.domain(),a=o.ticks(),s=[],l=e.measureCount;return r.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),o.domain(s),gy(o,a,l,e.invert)}))}const vy=()=>({version:"1.35.0",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}}),by={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function xy(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Sy={getImageSize(e,t){let n;function i(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,i()}const r={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,u=r[t]*(n>l?1:n/l),c=r[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},i()):(e={height:u,width:c},i()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function My(e,t,n){let i=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,i;let o,r,a,s,l,u;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.url)){var c;if(o=e.session.options||(null===(c=e.enigmaModel)||void 0===c?void 0:c.session.sessionConfig),!o){var d;o=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(o.url);o.host=t.hostname,o.port=t.port,o.isSecure="wss:"===t.protocol}return u=void 0!==o.secure?o.secure:o.isSecure,r=u?"https://":"http://",a=o.host||"localhost",s=o.port?`:${o.port}`:"",l=o.prefix?o.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),r+a+s+l}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(i,o),i=i.replace(/"/g,'\\"'),i=i.replace(/'/g,"\\'"),i=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(i,o));const{height:r,width:a,imageError:s}=await Sy.getImageSize(i,t);return{src:i,size:t,height:r,width:a,imageError:s}}async function Cy(e,t,n,i){var o,r,a;const{app:s,flags:l}=t,u=null===(o=e.layout)||void 0===o||null===(o=o.tooltip)||void 0===o?void 0:o.imageComponents;if(!u)return[];const[c]=u,d=c.size||"small",m=c.type||"media";let f=-1;for(let e=0;e<n.length;e++)if(n[e].cId===c.cId){f=e;break}const h=(null===(r=i.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];let p;if(-1!==f&&h[f]&&(p=h[f]),"media"===m&&null!==(a=c.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return My(c,d,s);if("url"===m)return async function(e,t,n,i,o){let r,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&xy(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:o,imageError:s}=await Sy.getImageSize(t,i);r={src:t,size:i,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Sy.getImageSize(a,i);r={src:a,size:i,height:e,width:t,imageError:n}}return r}(s,l,c,d,p);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&p&&p.label){return async function(e,t,n,i){let o;const r=i.label,a=`qmem://${t.qFallbackTitle}/${r}`;if(xy(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:i,width:r,imageError:a}=await Sy.getImageSize(e,n);o={src:e,size:n,height:i,width:r,imageError:a}}}catch(e){}return o}(s,n[f],d,p)}return[]}const wy={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){const o=t,r=[];for(let t=0;t<o.length;t++)r.push(Cy(e,i,n,o[t]));const a=await Promise.all(r);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},qy={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){let o=t;return o=await wy.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}),o},checkIfPromisesExist:({customTooltipModel:e})=>wy.checkIfPromisesExist({customTooltipModel:e})};const ky=(e,t)=>{var n,i,o;const r=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:by.CHART.CHART_PARENT_TYPE,qId:by.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:r,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Ty=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:by.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const Ey={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,i;const o=null!==(n=null===(i=t.tooltip)||void 0===i||null===(i=i.chart)||void 0===i||null===(i=i.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",r=by.CHART.STYLE[o];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:by.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:i,customTooltipModel:o,rtl:r})=>{var a;const s=o,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ey.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const i=n,o=by.CHART.STATE,r=t.qStateName;i.miniChartToken.alternateState||(i.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,r),i.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var i;const o=n;null!==(i=o.miniChartToken.sessionObj)&&void 0!==i&&i.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const r=by.CHART.STATE,a=ky(t,r),s=await e.createSessionObject(a),l=Ty(t);if(s.id!==by.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var u,c,d,m;const e=n.length>0&&void 0!==(null===(u=n[0].data)||void 0===u?void 0:u.value)?[null===(c=n[0].data)||void 0===c?void 0:c.value]:[],a=void 0!==i?i:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===i&&n.length>0){var f,h;const e=null!==(f=n[0].data.selectionOuterDimension)&&void 0!==f?f:n[0].data.selectionDimension;if(null!=e&&null!==(h=e.source)&&void 0!==h&&h.field){var p;const t=null==e||null===(p=e.source)||void 0===p?void 0:p.field.split("/"),n=t[t.length-1],i=void 0!==e.value?[e.value]:[];i.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),i,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(by.CHART.CONTAINER_ID),g={direction:r?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await o.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(m=s.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await Ey.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Ey.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(by.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,i=by.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(i)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function Dy(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Ny(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:i}=by.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[i]=!0,o}function Ly(e){const t=Ny();return e.filter((e=>t[e.id]))}const Oy={getNodes(e,t){const n=function(e,t){let n=0,i=0;e.center?(n+=e.center.x,i+=e.center.y):(n+=e.clientX,i+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:i-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,i=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var r,a,s,l;const u=null!==(r=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==r?r:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],i.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const i=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return i&&i.value===u.value&&i.label===u.label}));t.length>0&&(i=i.concat(t[0]))}})),i},displayTooltip(e,t,{nodes:n,opts:i={},customTooltipModel:o,extractedNodes:r=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Oy.getAttrExprData(a);r.length||n.length?qy.handlePromises({customTooltipModel:o,nodes:Oy.getDataNodes(s,r.length>0?r:n),attrExps:l,opts:i}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&Ey.hide({app:i.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>qy.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const i=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return i[o]||(i[o]=[]),i[o]},getAttrExprData(e){var t;let n=[],i="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var r;const t=o.length-1;n=(null===(r=e.qHyperCube)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r||null===(r=r[t])||void 0===r?void 0:r.qAttrExprInfo)||[],i=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:i}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[by.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let i=n.qLayoutExclude;i||(n.qLayoutExclude={quarantine:{}},i=n.qLayoutExclude),i.quarantine||(i.quarantine={}),i.quarantine[by.CUSTOM.QUARANTINE]=[],e.forEach((e=>{i.quarantine[by.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=i}(Ly(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[by.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[by.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Dy(e);if(!n)return;const i=void 0!==t?t:n.length-1;if(!n[i])return;const o=this.getAttrExps(e,n[i]);if(0===Ly(o).length){var r;const t=(null===(r=e.qLayoutExclude)||void 0===r||null===(r=r.quarantine)||void 0===r?void 0:r.customTooltip)||[],n=[...o,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[i].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[i].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let i=[];const o=Dy(e)||[];[...o,t].forEach((e=>{const t=Ly(e.qAttributeExpressions||[]);t.length>0&&(i=t)}));const r=Ny(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!r[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(i));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Pe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Pe.detectTextDirection(e.src),i=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){i.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;i.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,i),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Ay(e,t,n,i){var o;const r=(null===(o=t.qHyperCube)||void 0===o||null===(o=o[n])||void 0===o||null===(o=o[i])||void 0===o?void 0:o.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[i]?e.qSubNodes[i].qAttrExps:e.qAttrExps;return s?(r.forEach(((e,t)=>{const o=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,r=void 0===o?"NaN":function(e,t){let n;switch(e.id){case by.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case by.CUSTOM.TITLE:case by.CUSTOM.DESCRIPTION:case by.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);a.push({source:{key:"qHyperCube",field:`${n}/${i}/qAttrExprInfo/${t}`},label:r,value:"value"})})),a):a}const Iy={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,i="qDimensionInfo";return{field:`${i}/${n}`,value:t=>Ay(t,e,i,n)}}};const Py={getCustomAttrExps(e,t,n){var i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},r=(null===(i=t.data)||void 0===i||null===(i=i.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(r))return o;return function(e,t,n,i){const o={[by.CUSTOM.TITLE]:!0,[by.CUSTOM.DESCRIPTION]:!0},{attrExps:r,fieldPath:a}=Oy.getAttrExprData(e);return 0===t.length||0===r.length||""===a||r.forEach(((e,r)=>{const s=t[r];if(e.id===by.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${r}`).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&i.customTooltipInfoAttrExpsArr.push({...e.id===by.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),i}(n,r.map((t=>Re.getMeasure(e,t))),e,o)}};function Ry({nodes:e,layout:t,dataset:n}){const i=function(e,t,n){const i=[];return e.forEach((e=>{i.push(Py.getCustomAttrExps(n,e,t))})),i}(e,t,n);return i.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function zy(e){const t=by.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}}function Fy(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}const jy={migrateProperties(e){var t,n;const i=se(!0,{},e),o=(null===(t=i.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let r=Fy(i);return r=function(e,t){return t.concat(e.map((e=>zy(e))))}(o,r),function(e,t){var n;const i=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;i[i.length-1].qAttributeExpressions=e}(r,i),null===(n=i.tooltip)||void 0===n||delete n.data,i},getPatches(e){var t,n;const i=(null===(t=e.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[],o=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,r=function(e,t,n){let i=e.length;const o=[];return t.forEach((e=>{const t=zy(e),r=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${i}`,qOp:"add",qValue:r}),i++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Fy(e),i,o);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise((n=>{var i,o,r;const a=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],s=(null===(o=t.tooltip)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.qHyperCube)||{},l=null===(r=t.qMeta)||void 0===r||null===(r=r.privileges)||void 0===r?void 0:r.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){const i=this.migrateProperties(t);e.setProperties(i).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const i=this.getPatches(t);e.applyPatches(i,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}));return n}};var Hy={attrExpr:jy},By=7005;const _y=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By},Vy=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&be.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},Uy=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&be.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&be.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},$y=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},Wy=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,i=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===i.length){const i=n[0];return i.qLibraryId?t.getDimension(i.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;Uy(e,n)}return i})):t.getField(i.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(Uy(e,t),i)))),(()=>i))}return Vy(e),Promise.resolve()};function Ky(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:i}}=e;t.length>1&&e.color?r(e,"color.persistent",!0):"byDimension"===i&&n.length>1?r(e,"color.mode","byMultiple"):"byExpression"===i&&0===n.length?r(e,"color.mode","primary"):0===t.length&&n.length>0&&(r(e,"color.byMeasureDef",void 0),r(e,"color.byDimDef",void 0),1===n.length&&r(e,"color.mode","primary"))}const Gy=(e,t)=>{Ky(t),Rt(e),Oy.addCallbackCustomTooltip(t)},Yy=e=>{Ky(e)};function Xy({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,i,o){let r;const a=null!=o&&o.layout?o.layout.qHyperCube.qDimensionInfo.filter((e=>_y(e))).length:t.qHyperCubeDef.qDimensions.length;return i.isAutoChart&&n>a-1?r="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?r="Visualizations.Descriptions.Stack":(r="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):r="Visualizations.Descriptions.Bars",e.get(r)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=n&&n.app?Wy(t,n.app).then((()=>(Gy(e,t),e))):($y(t),Gy(e,t),e)),move(e,t,n){n.layout.qHyperCube.qDimensionInfo.filter((e=>_y(e))).length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),Vy(t),Ky(t),Oy.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;Ky(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),Oy.removeCallbackCustomTooltip(t,e)},replace(e,t,n,i){Oy.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?Wy(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,Yy(t),e))):($y(t),Yy(t),e),move(e,t){Vy(t),Ky(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;Ky(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function Jy(e){return{properties:vy(),data:{targets:[{path:"/qHyperCubeDef",...Xy(e)}]}}}var Zy={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};const Qy="REJECTED",ev=()=>{},tv=1e4,nv={MULTIPLIER:2,MINIMUM:20,MAXIMUM:200},iv=50,ov=10,rv=100;var av={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),i=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),o=Math.max(t.qTop,e.qArea.qTop),r=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,o-e.qArea.qTop),s=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,r-e.qArea.qLeft),u=Math.min(r+i-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:o,qLeft:r},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const i=n.qTop-ov<=t.qTop,o=n.qLeft+n.qWidth+ov>=t.qLeft+t.qWidth,r=n.qTop+n.qHeight+ov>=t.qTop+t.qHeight,a=n.qLeft-ov<=t.qLeft;return i&&t.qTop>0||o&&t.qLeft+t.qWidth<e.width||r&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var sv={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),r=Math.max(0,i-e.qArea.qTop),a=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-i-(a-r),l={qArea:{qHeight:a-r,qWidth:e.qArea.qWidth,qTop:i,qLeft:o},qData:[{...e.qData[0],qUp:i,qDown:s,qSubNodes:[]}]};for(let t=r;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const i=n.qTop-ov<=t.qTop,o=n.qTop+n.qHeight+ov>=t.qTop+t.qHeight;return i&&t.qTop>0||o&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var lv={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const uv="pages";const cv="discretePan",dv=10;function mv({chart:e,actions:t,componentKey:n,dockService:i,rtl:o,scroller:r}){return{type:"Pan",key:"discrete:pan",options:{event:cv,pointers:1,threshold:dv,enable(i,o){return this.started===cv||!o||!(!t.scroll.enabled()||!r.enabled())&&e.componentsFromPoint({x:o.center.x,y:o.center.y}).some((e=>e.key===n))}},events:{[`${cv}start`](e){e.preventDefault(),this.started=cv;const t="horizontal"===i.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-dv:dv},[`${cv}move`](e){e.preventDefault();const t="horizontal"===i.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&o?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,r.scroll(s)},[`${cv}end`](e){e.preventDefault(),this.started=!1},[`${cv}cancel`](e){e.preventDefault(),this.started=!1}}}}function fv({chart:e,componentKey:t,actions:n,scroller:i}){return function(o){if(!n.scroll.enabled()||!i.enabled())return;const[r]=e.componentsFromPoint({x:o.clientX,y:o.clientY}).filter((e=>e.key===t));if(!r)return;o.preventDefault();const a=Math.abs(o.deltaY)>Math.abs(o.deltaX)?o.deltaY:o.deltaX,s=Math.sign(-a)*rv;i.scroll(s)}}function hv({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(tv/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const i=Math.min(t,Math.max(nv.MAXIMUM,n));return{width:e,height:Math.max(nv.MINIMUM,Math.min(n*nv.MULTIPLIER,i))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:i,height:o}=t({width:e.qWidth,height:e.qHeight}),r=o?Math.ceil((o-e.qHeight)/2):0,a=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:o?Math.min(o,n.height):e.qHeight,qWidth:i?Math.min(i,n.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-r,n.height-o)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-a,n.width-i)):e.qLeft}}}function pv(e){let t,n;const i=o=>{t=o;const{method:r,args:a}=t.request;e[r](...a).then((e=>{if(t.canceled||n)return t.reject(Qy),t=null,void(n&&(i(n),n=null));t.resolve(e[0]),t=null}))},o=e=>new Promise(((o,r)=>{const a={request:e,resolve:o,reject:r,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(Qy),n=e})(a):i(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(Qy),n=null)},o}const gv={command:{update:()=>{}}};var yv={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const{pixel:o}=t,r=e.getDataPages()[0],a=o/i;return[a,n.inView>=n.inTotal?a+1:a+r.qArea.qWidth/n.inView]}};var vv={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:i}){const o=void 0===i?4:i,r=Math.max(0,Math.floor(t)-o/2);return{qTop:r,qHeight:Math.min(e.meta.size.y-r,Math.max(0,Math.ceil(n+o))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const{pixel:o}=t,r=e.getDataPages()[0],a=i/n.inView,s=(o+r.qArea.qTop*a)/i;return[s,n.inView>=n.inTotal?s+1:s+r.qArea.qHeight/n.inView]}};function bv(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function xv(e,t){const n=[];for(let i=0;i<e.length;i++){const o=t(e[i]);-1===n.indexOf(o)&&n.push(o)}return n.length}function Sv(e){return xv(e.qMatrix,(e=>e[0].qElemNumber))-1}var Mv={inTotal:function({layoutService:e}){const t=bv(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:i}){const o=bv(e),r=void 0===i?o:i,a=t/(o+1),s=Math.max(0,Math.floor((t-a-r/2)/o));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+r)/o+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const o=bv(e),r=e.getDataPages()[0],a=i/n.inView,{pixel:s}=t,l=Sv(r),u=r.qArea.qHeight*o+l,c=(s+(r.qArea.qTop*o+r.qArea.qTop)*a)/i;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const Cv=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1),wv=(e,t)=>{const n={successful:!0,count:0};let i=Math.abs(Math.floor(t));const o=[];for(let t=0;t<=i;t++){if(!e[t])return n.successful=!1,n;const r=e[t][0].qElemNumber;-1===o.indexOf(r)&&(o.push(r),i--)}return n.count=o.length-1,n};function qv(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return Cv(e,n);const i=wv(t.qMatrix,n);return i.successful?i.count:Cv(e,n)},area(t,n,i){if(0!==t.qArea.qTop)return Cv(e,n);return xv(t.qMatrix.slice(0,i.qTop+1),(e=>e[0].qElemNumber))-1}}}var kv={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:i}){const o=qv(t).itemOffset(e(),n),r=Math.max(0,Math.floor(n-o));return{qTop:r,qHeight:Math.min(t.meta.size.y-r,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:i,viewSize:o,upperBound:r}){const a=t.getDataPages()[0],s=o/i.inView,{item:l,pixel:u}=n,c=qv(t).area(e(),l,a.qArea),d=Sv(a),m=a.qArea.qHeight+d,f=u===r?(i.inView-m)*s/o:(u+(a.qArea.qTop+c)*s)/o;return[f,i.inView>=i.inTotal?f+1:f+m/i.inView]}};function Tv({chart:e,rect:t,dockService:n,itemWidths:i,axisKey:o,renderer:r,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:f}=i[n.meta.chart.mode],h="horizontal"===n.meta.major.orientation,{axisDisplayMode:p="auto",maxVisibleItems:g=10,label:y}=s,v=h?t.width:t.height,b=v/l>=m;switch(p){case"max":return Math.min(l,c);case"custom":return Math.min(g,c);default:return u?v/f:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:i={},isGrouped:o,itemSize:r,label:a}){if(o||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=i;if(!s||!l)return!0;const{fontFamily:u,fontSize:c,tiltAngle:d}=s.settings.settings.labels,{height:m}=l({fontFamily:u,fontSize:c,text:"M"});if(!t)return m>r;const f=(90-d)*(Math.PI/180);return m>Math.cos(f)*r}({chart:e,isHorizontal:h,axisKey:o,renderer:r,isGrouped:a,itemSize:m,label:y})?v/d:l:v/d}}var Ev="AVERAGE",Dv="LINEAR",Nv="POLYNOMIAL2",Lv="POLYNOMIAL3",Ov="POLYNOMIAL4",Av="EXPONENTIAL",Iv="LOG",Pv="POWER";function Rv({dimValue:e,value:t,qTrendLine:n}){const{qType:i,qCoeff:o}=n,r={x:e,y:o[2]*t**2+o[1]*t+o[0]};switch(i){default:case Nv:return r;case Lv:return r.y+=o[3]*t**3,r;case Ov:return r.y+=o[4]*t**4+o[3]*t**3,r}}var zv={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:Rv,polynomial3:Rv,polynomial4:Rv,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};const Fv=500;function jv(e,t){const n=zv[t.qType.toLowerCase()],i=Math.max(1,e/Fv);let o=1/0,r=-1/0;for(let a=0;a<e;a+=i){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});o=Math.min(e,o),r=Math.max(e,r)}return{min:o,max:r}}const Hv=100;function Bv(e){return zv[e.qType.toLowerCase()]}function _v(e,t){return e.meta.isContinuous?function(e,t){return{generate:(e,n,i)=>{const o=[],r=Bv(e),{min:a,max:s}=t.get("zoom"),l=(s-a)/Hv;if(l>0){const t=t=>{const a=r({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=i,a.dimValue=t,o.push(a)};let u=a;for(let e=a;e<=s;e+=l)t(e),u=e;u!==s&&t(s)}return o},calculate:(e,t)=>Bv(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map((({y:e})=>e));return{min:Math.min(...n),max:Math.max(...n)}}}}(0,t):e.meta.mode.K?function(e){return{generate:(t,n,i)=>{const o=[],r=e.getDataPages()[0],a=r.qData[0].qSubNodes,s=r.qArea.qTop,l=zv[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const r=a[e],u=l({dimValue:r.qElemNo,value:e+s+1,qTrendLine:t});u.layerId=n,u.measureIndex=i,u.dimValue=r.qText,o.push(u)}return o},findMinMax:jv}}(e):function(e){return{generate:(t,n,i)=>{const o=[],r=e.getDataPages()[0],a=r.qMatrix,s=r.qArea.qTop,l=zv[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const r=a[e][0],u=e+s+1,c=l({dimValue:r.qElemNumber,value:u,qTrendLine:t});c.layerId=n,c.measureIndex=i,c.dimValue=r.qText,o.push(c)}return o},calculate:(e,t,n)=>(0,zv[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:jv}}(e)}var Vv={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},Uv={color:"#f93f17",index:9};const{isDark:$v}=Pt,Wv={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},Kv=({layoutService:e,viewState:t,colorModel:n,chart:i,env:o,keys:{colorScale:r},isEnabled:a=(()=>!1)})=>{const{translator:s}=o,l=[Wv],u=[],d=[],m=_v(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach(((e,t)=>{Array.isArray(e.qTrendLines)&&(u.push(...e.qTrendLines),d.push(...e.qTrendLines.map((()=>t))))}));const f=c((e=>{const{style:t}=u[e]||{},o=n.settings();if(t.autoColor){if("measure"===o.mode){const t=d[e],n=i.scale(r)(t);return $v(n)?function(e){const t=Ot(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=Ot(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(Uv)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"}));return{query:{hasTrendLines:()=>!!u.length&&a(),getData:()=>l,getStroke:f,getLineDash:e=>{const{style:t}=u[e]||{};return t.lineDash},getLabel:e=>(u[e]||{}).label,getType:e=>{const{qType:t}=u[e]||{};return s.get(Vv.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return u.forEach((i=>{const o=m.findMinMax(e.meta.size.y,i);t=Math.min(o.min,t),n=Math.max(o.max,n)})),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const i=u[e];return m.calculate(i,t,n)}},command:{update:()=>{l.length=0,u.forEach(((e,t)=>{const n=m.generate(e,t,d[t]);l.push(...n)}))}}}};var Gv={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const Yv=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,Xv=(e,{layoutService:t,trendLineModel:n,dockService:i,animationsEnabled:o})=>{if(!n.query.hasTrendLines())return[];const r=(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:i,dockService:o,animationsEnabled:r})=>{const a=Yv(i);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:Gv,settings:{connect:!0,orientation:o.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:r,trackBy:os.nonUpdatingNode.trackBy,compensateForLayoutChanges:os.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:i,animationsEnabled:o}),a=(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:i,dockService:o})=>{const r=Yv(i),a="horizontal"===o.meta.major.orientation,s={scale:e,fn:r},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:Gv,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:i});return[r,a]};function Jv(e,t){const{getLabel:n,getType:i,getLineDash:o,getStroke:r}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:r(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":o(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:i(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}const Zv=16,Qv=2;function eb(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((t=>e("span",{style:t.style,direction:Pe.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:`${Zv}px`,x2:`${Zv}px`,y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:`0 0 ${Zv} ${Zv}`},t)}(e):t.content}function tb(e,t){return({h:n,data:i,style:o})=>{const r=i[0].title,a=i.filter((e=>e.title===r)),s=function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:Pe.detectTextDirection(t)},t);return e("tr",{},n)}(n,r),l=[s];if(a.slice(0,Qv).forEach((e=>{l.push(n("tr",{},function(e,{h:t,style:n}){return e.map((e=>{const i={style:{direction:"string"==typeof e.content?Pe.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(i.colspan=e.colspan);const o=eb(t,e);return t("td",i,o)}))}(e.row,{h:n,style:o})))})),i.length>Qv){const o=i.length-Qv;l.push(...function(e,t,n,i){const o=t?t.get("Object.ChartTooltip.NMore",i):`+${i} more`,r=Pe.detectTextDirection(o);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:r},colspan:3},o))]}(n,e,t,o))}return l}}function nb(e,{trendLineModel:t,translator:n},i={}){if(!t.query.hasTrendLines())return!1;const{rtl:o}=i,r=Le({key:e.tooltip,rtl:o});return se(!0,r,{settings:{extract:Jv(e,t),content:tb(n,o),placement:"pointer",direction:i.rtl?"rtl":"ltr"}})}function ib(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function ob(e,{chart:t,viewState:n,trendLineModel:i,layoutService:o,rtl:r}){const{isContinuous:a}=o.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=ib(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:o}=i.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(i,a)=>{const l=ib(i,t),u=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(u.length){const i=function(e,t,n,i){let o=(e.x-t.rect.computed.x)/t.rect.computed.width;o=i?1-o:o;const{min:r,max:a}=n.get("zoom");return r+(a-r)*o}(l,a,n,r),s=t.scale(e.majorInnerScale),c=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(i);u.forEach((e=>{e.data.dimValue.value=i,e.data.dimValue.label=c,e.data.minor.value=o(e.data.layer.value,i).y}))}return u}}return n=>{const i=t.component(e.tooltip);if(i&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some((t=>t.key===e.tooltipOverlay)))(n)){const e=l(n,i);return e.length?(i.emit("show",n,{nodes:e}),!0):(i.emit("hide"),!1)}return!1}}const rb=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},ab=e=>{rb(e),e.qMultiDimMode="Sum",e.qXColIx=0};function sb(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:i=!1}=e;return{show:(e,t,{layout:n})=>!Ce.dimensionless(n)&&!Ce.groupedByDimension(n)&&(i||!Ce.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:Vv.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(Vv.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:Vv.ADD_BUTTON,add:ab,globalChange:e=>{const t=o(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),i=(e=>!o(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=i})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:Vv.TYPE,options:[{value:Ev,translation:Vv.TYPES.AVERAGE},{value:Dv,translation:Vv.TYPES.LINEAR},{value:Nv,translation:Vv.TYPES.POLYNOMIAL2},{value:Lv,translation:Vv.TYPES.POLYNOMIAL3},{value:Ov,translation:Vv.TYPES.POLYNOMIAL4},{value:Av,translation:Vv.TYPES.EXPONENTIAL},{value:Iv,translation:Vv.TYPES.LOG},{value:Pv,translation:Vv.TYPES.POWER}],defaultValue:Ev},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:Uv,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:Vv.STYLE.DASHED,type:"boolean",defaultValue:!0,change:rb}}}}var lb={};function ub(){ub.init.call(this)}lb.isObject=function(e){return"object"==typeof e&&null!==e},lb.isNumber=function(e){return"number"==typeof e},lb.isUndefined=function(e){return void 0===e},lb.isFunction=function(e){return"function"==typeof e};var cb=ub;ub.EventEmitter=ub,ub.prototype._events=void 0,ub.prototype._maxListeners=void 0,ub.defaultMaxListeners=10,ub.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},ub.prototype.setMaxListeners=function(e){if(!lb.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},ub.prototype.emit=function(e){var t,n,i,o,r,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],lb.isUndefined(n))return!1;if(lb.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,o=new Array(i-1),r=1;r<i;r++)o[r-1]=arguments[r];n.apply(this,o)}else if(lb.isObject(n)){for(i=arguments.length,o=new Array(i-1),r=1;r<i;r++)o[r-1]=arguments[r];for(i=(a=n.slice()).length,r=0;r<i;r++)a[r].apply(this,o)}return!0},ub.prototype.addListener=function(e,t){var n;if(!lb.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,lb.isFunction(t.listener)?t.listener:t),this._events[e]?lb.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,lb.isObject(this._events[e])&&!this._events[e].warned)&&((n=lb.isUndefined(this._maxListeners)?ub.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,lb.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),lb.isFunction(console.trace)&&console.trace()));return this},ub.prototype.on=ub.prototype.addListener,ub.prototype.once=function(e,t){if(!lb.isFunction(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},ub.prototype.removeListener=function(e,t){var n,i,o,r;if(!lb.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||lb.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(lb.isObject(n)){for(r=o;r-- >0;)if(n[r]===t||n[r].listener&&n[r].listener===t){i=r;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},ub.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],lb.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},ub.prototype.listeners=function(e){return this._events&&this._events[e]?lb.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},ub.listenerCount=function(e,t){return e._events&&e._events[t]?lb.isFunction(e._events[t])?1:e._events[t].length:0};var db=J(cb);const mb={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const fb=e=>(Object.keys(db.prototype).forEach((t=>{e[t]=db.prototype[t]})),db.init(e),e);var hb={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},pb={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"},STYLING:{AXIS:"axis"}};function gb({layout:e}){const t=ye.canBeContinuous(e),n=Ce.continuous(e),i=Ce.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:ye.isTime(n,e),isDimensionless:i,isSimple:Ce.simple(e),isGrouped:Ce.grouped(e),isGroupedByMeasure:Ce.groupedByMeasure(e),isGroupedByDimension:Ce.groupedByDimension(e),isStacked:Ce.stacked(e),isStackedByDimension:Ce.stackedByDimension(e),isStackedByMeasure:Ce.stackedByMeasure(e),isSnapshot:Ce.snapshot(e)}}const yb={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===pb.COMPONENT.BAR){n=e;const i=o(e,"data.selectionDimension",!1);i&&(t.push(i.label),i.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function vb({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:i,selectionInfo:o}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==o.event&&i({componentName:"continuousRangeBrush",brushName:!1})}function bb({chart:e,actions:t,selections:n}){const i=e.scale(pb.SCALE.MAIN.MAJOR);return d({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:i,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:vb},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}const xb=e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const i=e.qDimensionInfo[n];if(!(i.qLocked||i.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}};function Sb({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function Mb({app:e,model:t,translator:n,picasso:i,localeInfo:o,theme:r,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:u}){const{isContinuous:c,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const h=[],{isReduced:p}=u.model().mode,g=c||p||d,y=!c&&(p||d)&&l?l.getHyperCube():void 0,v=y?"legendCube":void 0;return f.main=m({app:e,model:t,translator:n,picasso:i,layoutService:s,config:{localeInfo:o,auto:Sb,key:pb.SCALE.MAIN.COLOR},createConfig:()=>({hc:g?y||s.getHyperCube():u.model().cube,source:g?v:"miniCube",theme:r})}),h.push(f.main.initialize()),c&&(f.mini=m({app:e,model:t,translator:n,picasso:i,layoutService:s,config:{localeInfo:o,auto:Sb,key:pb.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:r})}),h.push(f.mini.initialize())),Promise.all(h)},getMain:()=>f.main,getMini:()=>f.mini}}function Cb(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function wb(e){return e.some(Cb)}function qb(e,t){let n=NaN,i=NaN;return e.forEach((e=>{wb(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),i=Number.isNaN(i)?e.qNum:Math.max(e.qNum,i))}))})),{min:n,max:i}}function kb(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const i=e.getLayoutValue("measureAxis.minMax");"min"!==i&&"minMax"!==i||(t=+e.getLayoutValue("measureAxis.min")),"max"!==i&&"minMax"!==i||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function Tb(e,t){let n=NaN,i=NaN;return e.forEach((e=>{if(!wb(e)){let o=0,r=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?r+=e.qNum:o+=e.qNum)})),n=Number.isNaN(n)?o:Math.min(o,n),i=Number.isNaN(i)?r:Math.max(r,i)}})),{min:n,max:i}}function Eb(e,t){const n={};e.forEach((e=>{if(!wb(e)){const i=e[0].qElemNumber;n[i]=n[i]?n[i]:{min:0,max:0,cId:i},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[i].max+=e.qNum:n[i].min+=e.qNum)}))}}));let i=NaN,o=NaN;return Object.keys(n).forEach((e=>{i=Number.isNaN(i)?n[e].min:Math.min(n[e].min,i),o=Number.isNaN(o)?n[e].max:Math.max(n[e].max,o)})),{min:i,max:o}}function Db(e){return"number"==typeof e&&!Number.isNaN(e)}function Nb(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>Db(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>Db(e.qMax))).map((e=>e.qMax)))}}function Lb(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function Ob(e){return!Number.isNaN(+e.qNum)}function Ab(e){return e.qNum}function Ib(e){return!Number.isNaN(+e.qNum)}function Pb(e){return e.qNum}function Rb(e,t){return e.push(...t),e}const{getValueWithOffset:zb,isNumber:Fb}=ga,jb=5,Hb=.2;function Bb(e,t){return Math.abs(e/t)<jb||0===t}function _b({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:i=Tb,stackedByDimensionExtractor:r=Eb,straightExtractor:a=qb,measureInfoExtractor:s=Nb,explicitExtractor:l=kb}=n,{meta:u}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:i,count:o}){let r,a;if(Array.isArray(n)?({min:r,max:a}=this.extractFromStacked(n)):({min:r,max:a}=this.extractFromStraight(e,o)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();r=Number.isFinite(e)?Math.min(r,e):r,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(i),u=this.extractExplicit(),c=[0,r,a].filter((e=>Fb(e)));let d=Math.min(...c),m=Math.max(...c);d=Bb(s,d)?Math.min(d,s):d,m=Bb(l,m)?Math.max(m,l):m;const f=[u.explicitMin,u.explicitMax,d,m].filter((e=>Fb(e)));return r=Number.isNaN(u.explicitMin)?Math.min(...f):u.explicitMin,a=Number.isNaN(u.explicitMax)?Math.max(...f):u.explicitMax,r===a&&(Number.isNaN(u.explicitMin)?r=zb(r,-Hb):Number.isNaN(u.explicitMax)&&(a=zb(a,Hb))),{min:r,max:a,implicitMin:d,implicitMax:m,otherMin:s,otherMax:l,hasOtherMin:s<r,hasOtherMax:l>a,...u}},extractExplicit(){const{min:t,max:n,isExplicitMin:i,isExplicitMax:o}=l(e);return{hasExplicitMinMax:i||o,hasExplicitMin:i,hasExplicitMax:o,explicitMin:t,explicitMax:n}},extractFromStacked(e){const t=e.length?e[0].qData:[];return(n=t).length?{min:Math.min(...n[0].qSubNodes.map((e=>e.qMinNeg))),max:Math.max(...n[0].qSubNodes.map((e=>e.qMaxPos)))}:{min:0,max:0};var n},extractFromStraight(t,n){const o=t.length?t[0].qMatrix:[];return u.isStackedByMeasure?i(o,n):u.isStackedByDimension?r(o,n):e.getHyperCubeValue("qHasOtherValues")?a(o,n):s(e)},extractOthers:e=>u.isStackedByDimension?function(e){const t=Lb(o(e,"0.qData.0.qSubNodes",[]),Cb,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):u.isGroupedByDimension?function(e){const t=o(e,"0.qMatrix",[]).filter(wb).reduce(Rb,[]).filter(Ib).map(Pb);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=Lb(o(e,"0.qMatrix",[]),wb,[]).filter(Ob).map(Ab);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function Vb(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:i,getHyperCubeValue:o}=t,r=e=>!e.length&&i.mode.K,a=e=>{const t=o("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=o("qMeasureInfo").length,s=o("qDimensionInfo").length,l=o("qHasOtherValues");if(!i.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(i.isContinuous){const e=i.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const u=i.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(r(e))return a(l);let t=[];return l&&(t=i.mode.K?o("qStackedDataPages",[]):o("qDataPages",[])),{qDataPages:e,count:u,others:t}}))}}}(e),n=_b(e);return t.resolve().then((e=>n.extract(e)))}const Ub=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}),$b="lasso",Wb=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:i},o)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:i,options:{event:$b,enable(e,n){if(this.started===$b||!n)return!0;if(!o.actions.select.enabled()||!o.actions.lasso.enabled()||!o.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==$b&&(o.actions.select.emit("start",$b),this.chart.component(e).emit("lassoStart",t),this.started=$b)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",$b),"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});const Kb=({targets:e,requireFailure:t,recognizeWith:n,components:i,eventName:o="tap"},r)=>{let a;const s=r.customTooltipModel?r.customTooltipModel.utils:void 0,l=s?r.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:o,interval:10,pointers:1,enable(t,n){return!n||!(!r.actions.select.enabled()&&!r.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[o](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let i,o;return e.center?(({x:i}=e.center),({y:o}=e.center)):(i=e.clientX,o=e.clientY),{x:i-n.left,y:o-n.top}}(t,this.chart),u=r.hitRadius?r.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=r.shapesAt?r.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),f="mouse"!==t.pointerType&&m&&m.show;if(!r.isLocked(a)&&!r.tooltipOnly&&r.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,r.actions.select.brushSelectionIncludeMax=!1,r.actions.select.emit("start",o,e)),d.length&&i){this.chart.brushSelectionIncludeMax=!1,r.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof i?i(t,d):i;this.chart.brushFromShapes(d,{components:e}),r.actions.select.emit("end",o),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:r.largeDataService,chart:this.chart})}}if(m&&r.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=r;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,m,{nodes:n,opts:r,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else f&&m.emit("hide")}}}};const Gb=({key:e,requireFailure:t,recognizeWith:n,eventName:i="tap"},o)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${i}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!o.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${i}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const Yb=({eventName:e,key:t,fillTargets:n=[],requireFailure:i,recognizeWith:o},r,a)=>({key:`event:${t}`,type:"Pan",requireFailure:i,recognizeWith:o,options:{event:e,enable(i,o){if(this.started===e||!o)return!0;if(!r.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:o.center.x,y:o.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(o,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,r.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),r.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof r.updateOnMove&&r.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,r.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),r.actions.select.emit("end",e),this.started=!1,"function"==typeof r.updateOnEnd&&r.updateOnEnd()}}});function Xb(e,t){const n=function(e){const{key:t,targets:n,fillTargets:i,targetSelector:o,targetFillSelector:r,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:i,selector:o,fillSelector:r,fill:"rgba(82,204,82,0.2)"}}}}(e),i=Yb(e,t,"range");return{interactions:[e.onEdited?Gb(e,t):null,i].filter(Boolean),components:[n]}}const Jb={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},Zb="inner-time-axis",Qb="outer-time-axis";const ex={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:i}=n[t];return i},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:i=0,qOption:o=0,qSelected:r=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?i+o+r:n}},tx={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const i=t?0:e.qDimensionInfo.length-1;n=ex.getMaxGlyphCount(e,i)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?o(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=tx.getAxisData(e,t),i=!e.qDimensionInfo.length,o=i||t?void 0:e.qDimensionInfo.length-1,r=tx.getMajorAxisMaxGlyphCount(e,t),a=i?"qFallbackTitle":"qText";return Ee.getAdjustedMaxGlyphCount(r,n,o,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=tx.getAxisData(e),n=ex.getMaxGlyphCount(e,0);return Ee.getAdjustedMaxGlyphCount(n,t,0)}};var nx={LOWERGLYPHCOUNT:3,UPPERGLYPHCOUNT:13};function ix(e,t,n,i){const{meta:o}=t.layoutService,r=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);o.isContinuous?r.push(...function(e,t,n,i){const{meta:o}=t.layoutService,{axis:r,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:u}=t.layoutService.getLayoutValue("gridLine",{}),c=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,m=Jb[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode,f={type:"grid-line",x:{},layout:{minimumLayoutMode:Jb.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:os.lines.trackBy,compensateForLayoutChanges:os.lines.compensateForLayoutChanges}},h=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(o.isTime){if(d){const e=n?"end":"start",i=n?1:0,o="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:r.line.major.color},minorGuideLine:{stroke:r.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:m},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:o,justify:i},guideLine:{major:{justify:i},minor:{align:o}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:os.axes.trackBy({isTime:!0}),compensateForLayoutChanges:os.axes.compensateForLayoutChanges({isTime:!0})}};c.push(se(!0,{},d,{key:Zb,scale:pb.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===u}},style:se(!0,{},a,{line:{stroke:r.line.major.color},majorGuideLine:{stroke:r.line.minor.color},minorGuideLine:{stroke:r.line.major.color}})})),c.push(se(!0,{},d,{key:Qb,scale:pb.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),c.push({type:"axis-overlay",key:"outer-axis-overlay",scale:pb.SCALE.MAIN.MAJOR,layout:{dock:`@${Qb}`,minimumLayoutMode:m}}),c.push({type:"axis-overlay",key:"inner-axis-overlay",scale:pb.SCALE.MAIN.MAJOR_INNER,layout:{dock:`@${Zb}`,minimumLayoutMode:m}}),c.push(h)}return c.push(se(!0,{},f,{key:"inner-time-grid",x:{scale:pb.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),c.push(se(!0,{},f,{key:"outer-time-grid",x:{scale:pb.SCALE.MAIN.MAJOR}})),c}if(o.isContinuous){const e="continuous-axis";d&&(c.push({type:"axis",key:e,renderer:vs(t.flags),scale:pb.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:m},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:r.line.major.color},line:{show:!i},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:os.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:os.axes.compensateForLayoutChanges({isContinuous:!0})}}),c.push({type:"axis-overlay",key:"inner-axis-overlay",scale:pb.SCALE.MAIN.MAJOR,layout:{dock:`@${e}`,minimumLayoutMode:m}}),c.push(h)),c.push(se(!0,{},f,{key:"continuous-grid",x:{scale:pb.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return c}(e,t,n,i)):r.push(...function(e,t,n,i){if("none"===e.dimensionAxis.show)return[];const{meta:o}=t.layoutService,r=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),u="horizontal"===t.dockService.meta.major.orientation,c=u?e.dimensionAxis.label:"auto",d="horizontal"===c?void 0:t.dockService.meta.minor.size/4,m=t.styleService.axis.label.getStyle(),f={type:"axis",renderer:vs(t.flags),layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:Jb[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:c,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...m},line:{show:!i,stroke:r.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:os.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:os.axes.compensateForLayoutChanges({isHorizontal:u})}};l&&a.push(se(!0,{},f,{key:"group-axis",scale:pb.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":f.settings.labels.mode,maxGlyphCount:tx.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(u||!s)&&f.settings.line.show}}}));const h=tx.getBarAxisMaxGlyphCount(e.qHyperCube,o.isStackedByDimension);return s&&a.push(se(!0,{},f,{key:pb.COMPONENT.BAR_AXIS,scale:pb.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:h,maxLengthPx:d,tiltThreshold:h>nx.LOWERGLYPHCOUNT&&h<nx.UPPERGLYPHCOUNT?1:void 0},line:{show:!(u&&l)&&f.settings.line.show}}})),u||2!==a.length?a:[a[1],a[0]]}(e,t,n,i));const l=t.themeService.getStyles(),u=t.styleService.axis.label.getStyle();return a&&r.push({type:"axis",key:"y-axis",renderer:vs(t.flags),formatter:pb.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:Jb.measureAxis.minimumLayoutMode},scale:pb.SCALE.MAIN.MINOR,settings:{labels:{show:s,...u},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:os.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:os.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),r}var ox={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};const rx=.7,ax=.9;function sx({layoutService:e,discrete:t,componentKey:n}){var i;const{isContinuous:o,isGrouped:r}=e.meta;if(o)return 1;const a=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(null!=a&&null!==(i=a.style)&&void 0!==i&&i.width){const{style:e}=a;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=ox.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),i=e.width+n;return i>1?e.width-(i-1):e.width}:e.width}return r?ax:rx}const lx={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function ux(e,t,n={}){return({data:i})=>{const o=e.chart.component(t).rect;if(!i.items.length||!o)return 2;const{min:r,max:a}=e.viewState.get("zoom");if(n[[r,a]])return n[[r,a]];const s=lx[fe.getLayoutMode(o.width,Number.MAX_VALUE)];n={};const l=Math.abs(a-r),u=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===u)return s;const c=function(e,t,n){return e*(1-n)+t*n}(2,s,1-Math.min(l/u/.2,1));return n[[r,a]]=Math.max(2,Math.min(s,c)),n[[r,a]]}}function cx(e,t){const{hasExplicitMax:n,explicitMax:i}=t;return!!n&&e>i&&i<=0}function dx(e,t){const{hasExplicitMin:n,explicitMin:i}=t;return!!n&&e<i&&i>=0}function mx(e,t){const{hasExplicitMax:n,explicitMax:i}=t;return!!n&&e>i&&i>0}function fx(e,t){const{hasExplicitMin:n,explicitMin:i}=t;return!!n&&e<i&&i<0}const hx={MAX:"max",MIN:"min"},px={min:"Min",max:"Max"};function gx(e,t,n){return void 0===n?cx(e,t)||dx(e,t):n===hx.MAX?cx(e,t):dx(e,t)}function yx({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e[`hasExplicit${px[t]}`]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===hx.MAX?e.implicitMax:e.implicitMin;return!gx(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function vx(e,{barComponent:t,type:n,isStacked:i}){const{viewCache:o,dockService:r,themeService:a}=e,s=o.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===hx.MAX?s.implicitMax:s.implicitMin;if(!gx(Number(l.toFixed(13)),s,n))return!1;const{orientation:u}=t.settings,c=n===hx.MAX?r.meta.minor.end:r.meta.minor.start;let d="end";i&&(d=n===hx.MAX?"sumOfPositives":"sumOfNegatives");const m=a.getStyles();return{type:"box-out-of-bounds",key:`bar-oob-${n}`,layout:{dock:c},data:t.data,brush:t.brush,settings:{orientation:u,major:t.settings.major,minor:t.settings.minor,dockValue:ke.getDockValue(c),oob:se({},t.settings.box,{fill:m.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!i||0!==e.datum[d].value)&&gx(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:os.barOobs.compensateForLayoutChanges}}}function bx(e){return Math.min(Math.max(0,e),1)}const xx=(e,{chart:t,type:n,componentKey:i,collectionKey:o})=>{const{layoutService:r,dockService:a,viewCache:s}=e,{isStacked:l}=r.meta,u=s.get("minorMinMax"),{meta:c}=e.layoutService;if(!yx({minorMinMax:u,type:n}))return!1;let d;c.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:c.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);const m={type:"box",key:`${pb.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:o},settings:{orientation:a.meta.minor.orientation,major:{scale:pb.SCALE.MAIN.MAJOR,fn:d},minor:{scale:pb.SCALE.MAIN.MINOR,start(e){var n;return bx(t.scale(pb.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(n=n.start)||void 0===n?void 0:n.value)||0))},end(e){const i=t.scale(pb.SCALE.MAIN.MINOR);let o="end";l&&(o="max"===n?"sumOfPositives":"sumOfNegatives");const r=e.datum[o]?e.datum[o].value:i[n]();return bx(i(r))}},box:{width:sx({layoutService:e.layoutService,discrete:e.discrete,componentKey:i}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const i=t.scale(pb.SCALE.MAIN.MINOR);let o="end";l&&(o="max"===n?"sumOfPositives":"sumOfNegatives");const r=e.datum[o]?e.datum[o].value:i.max();return"max"===n?r>i.max():r<i.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return m};function Sx(e,t){const{style:n,styleService:i,dockService:o}=t,r=i.label.getStyle(),a=r.useContrastColor&&!e.onBackground?function(e){return function(t){return Pt.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n):r.fill,s="horizontal"===o.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function Mx(e){return{placements:e.simplifiedPlacements.map((t=>Sx(t,e))),label:e.label}}function Cx(e,t){if(t){if(function(e,t){return cx(e,t)}(e,t))return-1;if(function(e,t){return dx(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}const wx="vertical",qx="horizontal";function kx(e,t,n,i){const o=Cx(e,i);let r="up";return t===wx&&o<0?r="down":t===qx&&(r=o>=0&&!n||o<0&&n?"right":"left"),r}function Tx(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:i,isContinuous:o}=t.layoutService.meta;return!i||!o&&!!n.showSegmentLabels}function Ex(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:i,isContinuous:o}=t.layoutService.meta;return!!i&&(!!o||!1!==n.showTotalLabels)}function Dx(e,t,n,i){const o=[];return void 0!==e&&(o[e]={position:"outside",onBackground:!0,justify:0,overflow:i}),void 0!==t&&(o[t]={position:"inside",onBackground:!1,justify:n}),o}function Nx({layout:e,component:t,minorScale:n},i,o){if(!Tx(e,i))return!1;const{viewModel:r,ds:a,viewCache:s,layoutService:l,dockService:u,themeService:c}=i,{meta:d}=l,m=s.get("minorMinMax"),f=c.getStyles(),h=i.styleService.label.getStyle();let p;!d.isStacked&&(p=d.isStacked?1:0);const g=0===p?1:0,y=d.isStacked?.5:1,v=r.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,S=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>S?b(e.data.segment.value):""}:function(e){return e.data.end.label};const M={label:x,simplifiedPlacements:Dx(p,g,y,d.isContinuous),style:f.label.value},C=[Mx(se(i,M))],w={component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>kx(e.data.end.value,u.meta.minor.orientation,o,m),labels:C,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily,linkData:os.labels.linkData}}},q=[w],k={key:"bar-labels",type:"labels",renderer:vs(i.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:q},animations:{enabled:i.viewModel.animations.enabled,trackBy:os.labels.trackBy,compensateForLayoutChanges:os.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(k.beforeRender=()=>{S=function(e,t,n){const i="vertical"===t.dockService.meta.minor.orientation?"height":"width",o=t.chart.component(e),r=o&&o.rect?o.rect[i]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/r}(t,i,n)}),k}const Lx={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let i;return t.isStackedByDimension?i=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(i=n.group?n.group.label:void 0),void 0!==i?`${n.label}, ${i}`:n.label},getMeasure(e,t,n,i,o){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const r=t.data,a=n.isStacked?i.viewModel.fields.minor[n.isStackedByDimension?0:r.measureIndex.value]:void 0,s=n.isStacked?{source:{key:r.source.key,field:a},label:!0===(null===(l=r.null)||void 0===l?void 0:l.value)?"":n.isStackedByDimension&&o?o(r.segment.value):r.segment.label}:r.end;var l;return Re.getMeasure(e,s)},getMeasures(e,t,n,i,o){const r=e.resources.dataset;return t.map((e=>Lx.getMeasure(r,e,n,i,o))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const i=e.resources.dataset;return Ry({nodes:t,layout:n.layoutService.getLayout(),dataset:i})},extractBarTooltipData(e,t,n,i,o){const r={title:Lx.getTitle(t,n),color:Re.getColor(e,t,i),measures:Lx.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,i,o)};if(Lx.useCustomTooltip(i)){var a,s;const n=Lx.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],i);r.customMeasures=n.customTooltipAttrExpsArr,r.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===by.CUSTOM.TITLE)),r.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===by.CUSTOM.DESCRIPTION));let o=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((e=>{var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(o=e.data.customTooltipImages)})),o.length>0&&(r.customImages=o);const d=i.layoutService.getLayout();var l,u,c;if(null!==(a=d.tooltip)&&void 0!==a&&null!==(a=a.chart)&&void 0!==a&&null!==(a=a.object)&&void 0!==a&&a.refId&&i.app&&i.customTooltipModel.embed&&"function"==typeof(null===(s=i.customTooltipModel.model)||void 0===s?void 0:s.getEffectiveProperties))if(null!==(l=(u=i.app).isInModalSelection)&&void 0!==l&&l.call(u)){if((null==d||null===(c=d.qHyperCube)||void 0===c||null===(c=c.qDimensionInfo)||void 0===c?void 0:c.length)>0){Ey.destroyVisualization({customTooltipModel:i.customTooltipModel});const e=i.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");r.customLimitation=e}}else{const t=Ey.createContainer({ctx:e,layout:d});r.customChart=t}}return r},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData(e,t,n){const i=e.data.label,o=[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:`${Lx.getTotalStackTitle(e,t)}`,value:n?n(e):e})));return{title:i,measures:o}},extractTooltipData(e,t){const n=t.chart.formatter(pb.FORMATTER.MINOR),{meta:i}=t.layoutService,o=e.node.childrenNodes?e.node.childrenNodes:[e.node],r=Math.max(0,o.length-6);o.length=Math.min(o.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>Lx.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:o.map((o=>Lx.extractBarTooltipData(e,o,i,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:r}},extractBarNodeData(e,t,n,i,o,r,a){let s=!o&&Re.getTitleRow(t,i);const l=Re.hideColorRow(t,n),u=!r&&!l&&Re.getColorRow(e,t,i),c=t.measures.map((o=>!a&&Re.getMeasureRow(o,e,t,i,l&&o.field===n.coloring.field))),d=c.filter((e=>!Lx.isSameMeasureAndColorRow(e,u,i)));if(Lx.useCustomTooltip(n)){const n=o?[]:t.customMeasures.map((n=>Re.getMeasureRow(n,e,t,i,!1))),r=!(!t.customTitle[0]||o)&&Re.getTitleRow(t.customTitle[0],i),a=!(!t.customDescription[0]||o)&&Re.getDescriptionRow(t.customDescription[0],i);s=!Lx.shouldIgnoreTitleRowForCtt(r,a,d,n)&&s;const l=[r,a,s,u,...d,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(Oy.getFooterRow(t.customLimitation,i)),t.customImages){const n=t.customImages.map((t=>Oy.getImageRow(t,e)));l.push(...n)}return l.filter(Boolean)}return[s,u,...d].filter(Boolean)},extractStackTotalBarNodeData(e,t,n){const i=!!t.measures.length&&Re.getTitleRow(t,n),o=t.measures.map((i=>Re.getMeasureRow(i,e,t,n,!1)));return[i,...o].filter(Boolean)},useCustomTooltip:e=>o(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,i)=>!1===n[0]&&0===i.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some((e=>e.field===n.coloring.field)),shouldIgnoreDefaultRows:(e,t)=>Lx.useCustomTooltip(t)&&o(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,i){const{meta:o}=t.layoutService,r=t.layoutService.getLayout(),a=i.length;let s,l,u=[];const c=Lx.shouldIgnoreDefaultRows(r,t);for(s=0;s<a;s++){l=i[s];const r=Lx.shouldIgnoreTitleRow(o,s),d=c||Lx.shouldIgnoreColorRow(o,s),m=c||Lx.shouldIgnoreMeasureRow(d,l,t);if(u=u.concat(Lx.extractBarNodeData(e,l,t,n,r,d,m)),u.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:u,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:u,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let i=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{i=i.concat(Lx.extractStackTotalBarNodeData(e,n,t))})),i},extractData(e,t,n){const{barTooltipData:i,numInvisibleNodesPhase1:o,stackTotalBarTooltipData:r}=Lx.extractTooltipData(e,t),a=Lx.extractStackTotalBarsData(e,n,r);a.length&&a.push(Re.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=Lx.extractBarsData(e,t,n,i),u=a.concat(s),c=o+l;return c&&u.push(Re.getNMoreRow(c,t.translator,n)),u},calculateBoundsFromBars(e){const t=e.filter((e=>{const t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return ps.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:i,data:o,groupProp:r}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",u=e.chart.scale(n).pxScale(a[l]);let c,d,m;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;c=o.value,d=n===i&&void 0!==c?(u([c,0])+u([c,t-1]))/2:0,m=n===i&&void 0!==c?u.bandwidth([c,0]):0}else{const{value:e}=o;c=o[r]?o[r].value:void 0,d=u(n===i&&void 0!==c?[c,e]:e),m=n===i&&void 0!==c?u.bandwidth([c,e]):u.bandwidth(e)}const f=(d+m/2)*a[l],h={width:0,height:0};return"horizontal"===s?(h.x=f,h.y=a.height):(h.y=f,h.x=0),h},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:i,barAxisKey:o,majorScale:r,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let u;return u=l.length?Lx.calculateBoundsFromBars(l):Lx.calculateBoundsFromScale({opts:e,barKey:i,scale:t[0].key===o?r:a,majorScale:r,data:t[0].data,groupProp:s}),u},filterNodesOnKeys:(e,t)=>e.filter((e=>e.data&&t.indexOf(e.key)>-1)),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels(e,t,n,i){const o=e.filter((e=>t.some((t=>n(e,t,i)))));return o},findBarsFromGroupLabelsInGroupedByDim(e,t,n){const i=Lx.isBarMatchingLabelOnProp;return Lx.findBarsMatchingLabels(e,t,i,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter((e=>t.some((t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)))),findBarsFromLabelsInSingleDim(e,t){const n=Lx.isBarMatchingLabel;return Lx.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,i){const o=t.filter((e=>e.key===n)),r=t.filter((e=>e.key!==n)),a=Lx.findBarsFromBarLabelsInGroupedByDim(e,o,i),s=Lx.findBarsFromGroupLabelsInGroupedByDim(e,r,i);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=Lx.isBarMatchingLabel;return Lx.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=Lx.isBarMatchingLabel;return Lx.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const i=Lx.isBarMatchingLabelOnProp;return Lx.findBarsMatchingLabels(e,t,i,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>Lx.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:i,groupProp:o,stackProp:r}){const{meta:a}=t.layoutService,s=Lx.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?Lx.findBarsFromLabelsInStackedByDim(s,e,r):a.isStackedByMeasure?Lx.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?Lx.findBarsFromLabelsInGroupedByDim(s,e,i,o):Lx.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:i}=t.layoutService;if(i.isStacked){const o=Lx.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return i.isStackedByDimension?Lx.findStackTotalBarsFromLabelsInStackedByDim(o,e):Lx.findStackTotalBarsFromLabelsInStackedByMeasure(o,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:r,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:u,majorInnerScale:c,filterFn:d}){const{meta:m}=t.layoutService;if(e.length){let f=Lx.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:r,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(f=f.filter(d)),Lx.isSingleBarMode(m,f))return[f[0]];if(f.length){let m=Lx.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,r,a],stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:r,barOobMinKey:a,groupProp:s,stackProp:l});d&&(m=m.filter(d));const h=Lx.calculateTotalBounds({opts:t,labels:e,bars:m,barKey:n,barAxisKey:o,groupProp:s,majorScale:u,majorInnerScale:c}),p=Lx.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:i});return[{key:n,bounds:h,childrenNodes:f,data:f.map((e=>e.data)),stackTotalBarNodes:p}]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:i,barAxisKey:o,groupAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d}){let m=Lx.filterNodesOnKeys(e,[o,r]),f=m&&m.length?[m[0]]:[];const h=Lx.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d});if(h&&h.length)return h;const{meta:p}=t.layoutService;if(p.isStackedByMeasure){m=Lx.filterNodesOnKeys(e,[a,s]),f=m&&m.length?[m[0]]:[];const r=e=>Lx.filterNodesForOob(e,n,a),h=Lx.filterNodesOnLabels({labels:m,opts:t,barKey:n,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d,filterFn:r});if(h&&h.length)return h[0].stackTotalBarNodes=void 0,h}if(p.isStackedByDimension){m=Lx.filterNodesOnKeys(e,[a,s]),f=m&&m.length?[m[0]]:[];const r=e=>Lx.filterNodesForOob(e,n,a),h=Lx.filterNodesOnLabels({labels:m,opts:t,barKey:n,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d,filterFn:r});if(h&&h.length)return h[0].stackTotalBarNodes=void 0,h}const g=Lx.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function Ox(e,t={},n){let i=[];const o=Le({key:pb.COMPONENT.BASE_TOOLTIP,rtl:n});return se(!0,o,{scale:pb.SCALE.MAIN.COLOR,settings:{filter:e=>Lx.filterNodes({nodes:e,opts:t,barKey:pb.COMPONENT.BAR,stackTotalBarKey:pb.COMPONENT.STACK_TOTAL_BAR,barAxisKey:pb.COMPONENT.BAR_AXIS,groupAxisKey:pb.COMPONENT.GROUP_AXIS,barOobMaxKey:pb.COMPONENT.BAR_OOB_MAX,barOobMinKey:pb.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(i=e.node.childrenNodes?e.node.childrenNodes:[e.node],Lx.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e;const{app:o,properties:r,customTooltipModel:a}=t;o&&(null===(e=o.isInModalSelection)||void 0===e||!e.call(o))&&a.useCustomTooltip&&a.embed&&Ey.show({app:o,properties:r,selectedNodes:i,customTooltipModel:a,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const Ax={extractData:(e,t)=>[Re.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter((e=>e.data&&e.key===t));return n.length?[n[0]]:[]}};function Ix(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const i=Le({key:pb.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return se(!0,i,{scale:pb.SCALE.MAIN.COLOR,settings:{filter:e=>Ax.filterNodes(e,pb.COMPONENT.LEGEND_COLOR_CAT),extract:e=>Ax.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function Px(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function Rx({layout:e},t,n){const i=function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(Px))return"OnlyNanData";let n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){const t=e.qHyperCube.qDimensionInfo[1];n=ex.getDimensionSize(t)>ye.maxNumberOfLines}return!!n&&"LimitedData"}(e,t),{fontFamily:o}=t.themeService.getStyles();return function(e,t,n,i={}){if(!e)return!1;const{translator:o}=t,{rtl:r}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:ce[e].alignment},settings:{label:o.get(`Object.Disclaimer.${e}`),rtl:r},style:i}}(i,t,{rtl:n},{fontFamily:o})}function zx(e,{fill:t}){return{[pb.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[pb.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const Fx=1,jx=3;function Hx(e){return e.getLayoutValue("gridLine.auto")}function Bx(e){return!Hx(e)&&e.getLayoutValue("gridLine.spacing")===Fx}function _x(e){return!Hx(e)&&e.getLayoutValue("gridLine.spacing")===jx}const Vx=e=>({enabled:e.animations.enabled,trackBy:os.lines.trackBy,compensateForLayoutChanges:os.lines.compensateForLayoutChanges}),Ux=(e,{themeService:t,layoutService:n,dockService:i,viewModel:o})=>{if(!Hx(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:r}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:Jb.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!Bx(n)||((e,t)=>t%2==0),stroke:r.line.major.color},minorTicks:{show:_x(n),stroke:r.line.minor.color},animations:Vx(o)};return a["horizontal"===i.meta.major.orientation?"y":"x"]=pb.SCALE.MAIN.MINOR,a};function $x(e,t){const n=[Ux(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:i})=>{const o=n.get("minorMinMax");if(o.min>0||o.max<0)return!1;const r=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:pb.SCALE.MAIN.MINOR,line:{stroke:r.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:pb.SCALE.MAIN.MINOR,lines:a,animations:Vx(i)}})(t)),n}const Wx="areaPan",Kx=e=>({type:"Pan",key:"panorama",options:{event:Wx,pointers:1,threshold:10,enable(t,n){return this.started===Wx||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===pb.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started=Wx;const n=e.viewState.get("zoom");this[Wx]={min:n.min,max:n.max,size:e.chart.component(pb.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:i,max:o,size:r}=this[Wx],a=-t.deltaX/r;e.viewState.set("zoom",{min:Math.min(i+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(o+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function Gx(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:i,chart:o}=e,{rtl:r}=t,a=vg.event.onZoom({viewCache:n,viewState:i,chart:o},{threshold:100,rtl:r,targetKey:pb.COMPONENT.BAR}),s={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===pb.COMPONENT.BAR))},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function Yx({chart:e},t,n){const i=e.component(pb.COMPONENT.BASE_TOOLTIP);var o;i&&i.show&&(i.emit("hide"),null!=n&&null!==(o=n.customTooltipModel)&&void 0!==o&&o.useCustomTooltip&&t&&t({},i,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const r=e.component(pb.COMPONENT.LEGEND_CAT_TOOLTIP);r&&r.show&&r.emit("hide");const a=e.component(pb.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function Xx(e,t){const{viewCache:n,viewState:i,chart:o,trendLineModel:r,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?vg.event.onZoom({viewCache:n,viewState:i,chart:o},{rtl:s,threshold:50,targetKey:pb.COMPONENT.BAR}):void 0,u=ob({majorInnerScale:pb.SCALE.MAIN.MAJOR_INNER,tooltip:pb.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:pb.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:o,viewState:i,trendLineModel:r,layoutService:a,rtl:s}),c=[pb.COMPONENT.BAR,pb.COMPONENT.BAR_AXIS,pb.COMPONENT.GROUP_AXIS,pb.COMPONENT.BAR_OOB_MAX,pb.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,m=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,i=!1;if(e.actions.scroll.enabled()){const o={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(o).filter((e=>e.key===pb.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(o,Math.sign(-t.deltaY)),i=!0)}!i&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===pb.COMPONENT.LEGEND_COLOR_CAT)),n&&(i=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),i&&t.preventDefault(),Yx(e,m,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(u(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),i=this.chart.component(pb.COMPONENT.BASE_TOOLTIP);if(i&&i.show)if(n.some((e=>c.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const o=d.getNodes(t,this.chart);m(t,i,{nodes:o,opts:e,customTooltipModel:n})}else i.emit("show",t)}else i.emit("hide");const o=this.chart.component(pb.COMPONENT.LEGEND_CAT_TOOLTIP);o&&o.show&&(n.some((e=>e.key===pb.COMPONENT.LEGEND_COLOR_CAT))?o.emit("show",t):o.emit("hide"))}},mouseup(t){2===t.button&&Yx(this,m,e)},mouseleave(){Yx(this,m,e)}}}}const Jx=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...jg({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[Kx(e,t.rtl),Gx(e,t)]]});function Zx(e,t){const n=[Jx(e,t),Xx(e,t),jg({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&n.push(e.discrete.interactions.native),n}const Qx=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:os.bars.compensateForLayoutChanges});const eS=(e,t,{collectionKey:n})=>{if(!qg({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:i,viewModel:o},{collectionKey:r}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>i.getDimensionCardinality()>1,data:{collection:r},settings:{box:se(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:se(!0,{},e.settings.major,{scale:t.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:Qx(o)}}(e,t,{collectionKey:n});const{mode:i,scales:o}=t.reducedDataModel;let r;return i.isGroupedByDimension&&!i.isReduced?r=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:i.isGroupedByMeasure&&(r=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:i.isReduced||i.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:o.major,fn:r},minor:{scale:o.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:Qx(t.viewModel)}},{measureText:tS}=t.renderer("svg")();function nS(e,t,n){const i=function(e){const t=se(!0,{},e);return delete t.data,t}(t.minor),o=function(e,t,{majorScaleInvert:n,maxPxStep:i,align:o,getProp:r}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map(((e,t)=>({field:e,value:t}))):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:i,align:o};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=se(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=se(!0,{},t,{min:()=>r("continuousMin"),max:()=>r("continuousMax")})),a}(e,t.major,n);return{reducedMinor:i,reducedMajor:o}}const iS=125,oS={NARROW:50,MEDIUM:100,WIDE:200};function rS(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return oS.NARROW;case 1:return oS.MEDIUM;case 2:return oS.WIDE;default:return t*iS}}(t);return Math.max(1,Math.round(e/n))}const aS=10;function sS(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function lS(e,t,n){return 0===t||0===e||t===n.length-1}function uS(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function cS(e,t,n,i,o){e.domain([t,n]),e.nice(aS);const[r,a]=e.domain();let s=e.ticks(aS);const l=function(e){return e.length%2==0}(s),u=function(e){const t=Math.round(.3*e.length),n=t,i=e.length-t;return e.slice(n,i).some((e=>0===e))}(s),c=u?lS:sS;s=s.filter(c),l&&!u&&!i&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=o?o.formatter(pb.FORMATTER.MINOR):void 0;return uS(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:r,roundedMax:a,ticks:s}}function dS(e,t,n,i,o,r,a,s){const l=r.formatter(pb.FORMATTER.MINOR),u=s.getStyles(),c="horizontal"===a.meta.major.orientation?"height":"width",d=e=>tS({text:e,fontSize:u.axis.label.name.fontSize,fontFamily:u.axis.label.name.fontFamily})[c];let[m,f]=e.domain(),h=e.ticks(i);function p(){const e=h.map(l);return!uS(e)&&function(e){const t=o/h.length;return Math.max(...e.map(d))<=t}(e)}for(let o=i-1;o>0&&!p();o--)e.domain([t,n]),e.nice(o),[m,f]=e.domain(),h=e.ticks(o);return{roundedMin:m,roundedMax:f,ticks:h}}const mS=(e,t)=>e.value-t.value,fS=e=>({value:e,isMinor:!1}),hS=e=>({value:e,isMinor:!0});function pS(e,t,n){const i=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e))).length<=i}function gS({chart:e,viewCache:t,dockService:n,layoutService:i,themeService:o}){const{explicitMin:r,explicitMax:a,hasExplicitMin:s,hasExplicitMax:l}=t.get("minorMinMax"),{min:u,max:d}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),m=c((()=>{const c=function(e,t,n){let i;return e?i=n.meta.chart.size:({rect:i}=t.component(pb.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?i.height:i.width}(t.get("isPreRender"),e,n),m=rS(c,i),f=function(e,t,n){const i=Hi().domain([e,t]);return i.nice(n),i}(u,d,m);let h,p,g=[];"SPARK"===n.meta.chart.mode?({roundedMin:h,roundedMax:p}=function(e,t){return{roundedMin:e,roundedMax:t}}(u,d)):(({roundedMin:h,roundedMax:p,ticks:g}=dS(f,u,d,m,c,e,n,o)),pS(g,r,a)&&({roundedMin:h,roundedMax:p,ticks:g}=cS(f,u,d,s||l,e)));const y=function(e,t){const n=[];for(let i=0;i<e.length-1;i++){const o=e[i],r=(e[i+1]-o)/(t+1);for(let e=1;e<=t;e++)n.push(o+r*e)}return n}(g,1);g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.unshift(t),n.filter((e=>e>=t))):n}(s,r,g),g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.push(t),n.filter((e=>e<=t))):n}(l,a,g);const v=function(e,t){return[...e.map(fS),...t.map(hS)].sort(mS)}(g,y);return{roundedMin:h,roundedMax:p,ticks:v}}),(()=>t.get("isPreRender")));return{values:()=>m().ticks,min:()=>s?r:m().roundedMin,max:()=>l?a:m().roundedMax}}function yS(e,{picasso:t,discrete:n,layoutService:i,dockService:o,viewModel:r,viewCache:a,reducedDataModel:s,colorService:l,themeService:u,viewState:c,chart:d},{localeInfo:m,rtl:f}){const{meta:h}=i,{fields:p}=r,g=()=>{if("custom"!==i.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,o.meta.chart.size["horizontal"===o.meta.major.orientation?"height":"width"]/4)},y=!("none"===i.getLayoutValue("measureAxis.show"))?(v=o.meta.minor.orientation,b=o.meta.minor.dock,"vertical"===v?"near"===b||"left"===b?0:1:"near"===b||"bottom"===b?1:0):.5;var v,b;const x={},S="vertical"===o.meta.minor.orientation&&f,M=l.getMain().getScales(),C=l.getMini().getScales();if(Object.assign(x,M,{reducedFill:C.reducedFill}),x[pb.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:i,layoutService:o,themeService:r},{rtl:a}){const s=gS({chart:e,dockService:n,viewCache:i,layoutService:o,themeService:r}),l={invert:"vertical"===n.meta.minor.orientation||a,ticks:{values:s.values},minorTicks:{count:1},min:s.min,max:s.max};return o.meta.isStacked||(l.data={source:"qHyperCube",fields:t.minor}),l}({chart:d,viewModel:r,dockService:o,viewCache:a,layoutService:i,themeService:u},{rtl:f}),h.isGroupedByDimension)[pb.SCALE.MAIN.MAJOR_INNER,pb.SCALE.MAIN.MAJOR].forEach(((e,t)=>{x[e]={invert:S,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...r.selectionDimensionProp(t),group:h.isGroupedByDimension?{field:p.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:g,align:y}})),r.isDimensionLocked(0)||(x[pb.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(h.isGroupedByMeasure)x[pb.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:S,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:g,align:y};else if(h.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:i,viewCache:o,picasso:r,viewState:a,localeInfo:s,themeService:l}=e,u=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),c=r.formatter("q-time"),d=l.getStyles(),m=e=>tS({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});o.set("qTimeAxisCache",[]);const f={get:(e,t=0)=>{const n=o.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{o.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),i=(n-t)/(o.get("continuousMax")-o.get("continuousMin")),r=u().map((e=>e.qName));return[e,Number.parseFloat(i).toFixed(12),...r].toString()}};return{innerTime:{data:{field:i.fields.majorNumeric},type:"q-time-axis",qAxis:u,field:i.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:c,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:m},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:f},outerTime:{data:{field:i.fields.majorNumeric},type:"q-time-axis",qAxis:u,field:i.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:c,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:m},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:f}}}({picasso:t,localeInfo:m,viewState:c,viewModel:r,viewCache:a,themeService:u,layoutService:i},f);x[pb.SCALE.MAIN.MAJOR_INNER]=e,x[pb.SCALE.MAIN.MAJOR]=n}else h.isContinuous?x[pb.SCALE.MAIN.MAJOR]={type:"linear",invert:S,data:{extract:{key:"qHyperCube",field:p.majorNumeric}},ticks:{forceBounds:!0,count:c.get("zoom").min===c.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>c.get("zoom").min,max:()=>c.get("zoom").max}:x[pb.SCALE.MAIN.MAJOR]={invert:S,data:{extract:h.isDimensionless?p.minor.map(((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n}))):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:h.isDimensionless?"band":void 0,maxPxStep:g,align:y};const{reducedMinor:w,reducedMajor:q}=nS(s,{major:x[pb.SCALE.MAIN.MAJOR],minor:x[pb.SCALE.MAIN.MINOR]},{majorScaleInvert:S,maxPxStep:g,align:y,getProp:a.get});return h.isDiscrete&&(x[pb.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,h.isGroupedByDimension&&(x[pb.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),x[s.scales.major]=q,x[s.scales.minor]=w,x}function vS(e,t,n){const{layoutService:i,colorService:o}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[Kb(e,t)],components:[]}}({targets:[i.meta.isStackedByDimension&&i.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?pb.COMPONENT.STACK_TOTAL_BAR:pb.COMPONENT.BAR,pb.COMPONENT.BAR_AXIS,pb.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",pb.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const i={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return pb.COMPONENT.BAR===t[0].key?[{...i,data:["selectionDimension"]}]:[pb.COMPONENT.BAR_AXIS,pb.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...i,data:["selectionDimension","axisSelectionDimension"]}]:[i]}},{...e,isLocked:n=>n.some((e=>e.key===pb.COMPONENT.LEGEND_COLOR_CAT))?o.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function bS(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},i=Ub(n);return{interactions:[Wb(n,t)],components:[i]}}({key:"lasso",componentTargetKey:pb.COMPONENT.BAR,components:[t?{key:pb.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:pb.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function xS(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:i,fillTargets:o,dock:r}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:i},direction:"left"===r||"right"===r?"vertical":"horizontal",bubbles:{align:"left"===r||"top"===r?"end":"start",placement:"inside"},target:{components:o,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[Yb(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:pb.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",pb.COMPONENT.BAR_AXIS,pb.COMPONENT.BAR],fillTargets:["group-axis",pb.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function SS(e,t,n){const{selectionService:i}=e,{isUnsupportedFeature:o}=t,r=void 0===n,a=i.getIsSingleSelect(n),s=vS(e,r,a);if(r||a)return{components:[...s.components],gestures:[...s.interactions]};const l=bS(e),u=function(e,t){return e.layoutService.meta.isStacked||null!=t&&t("rangeSelections")?{components:[],interactions:[]}:Xb({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",pb.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:pb.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,o),c=function(e){return e.layoutService.meta.isContinuous?Xb({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",pb.COMPONENT.BAR]:["continuous-axis",pb.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?pb.SCALE.MAIN.MAJOR_INNER:pb.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:i}){const o=e.layoutService.meta.isTime?i.formatter():e.chart.formatter(pb.FORMATTER.MINOR),r=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||r?"":"<"}${o(t)}`}},e):{components:[],interactions:[]}}(e),d=xS(e);return{components:[...s.components,...l.components,...u.components,...d.components,...c.components],gestures:[...l.interactions,...s.interactions,...u.interactions,...d.interactions,...c.interactions]}}function MS({layoutService:e,viewModel:t,dockService:n}){var i;const{meta:o}=e;if(!o.isStackedByDimension||o.isContinuous)return!1;const{fields:r}=t,a=e.getLayoutValue("components",null),s=a?a.filter((e=>"bar"===e.key))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:r.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>{return t=e.qSubNodes,Number(t.map((e=>e.qMaxPos)).reduce(((e,t)=>e+t),0).toFixed(13));var t}},end:{value:e=>Number(e.qMaxPos.toFixed(13))}}},{field:r.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>{return t=e.qSubNodes,Number(t.map((e=>e.qMinNeg)).reduce(((e,t)=>e+t),0).toFixed(13));var t}},end:{value:e=>Number(e.qMinNeg.toFixed(13))}}}]},settings:{major:{scale:pb.SCALE.MAIN.MAJOR},minor:{scale:pb.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:null!=s&&null!==(i=s.style)&&void 0!==i&&i.width&&s.style.width>0?s.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:os.shadowBars.trackBy,compensateForLayoutChanges:os.bars.compensateForLayoutChanges}}}const CS={min:"Min",max:"Max"};function wS(e,t,n){const i=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?mx(e,t)||fx(e,t):n===hx.MAX?mx(e,t):fx(e,t)}(Number(i.toFixed(13)),e,t)}function qS(e,{barComponent:t,type:n,isStacked:i}){var o,r,a;const{viewCache:s,layoutService:l,dockService:u}=e,c=s.get("minorMinMax"),d=n===hx.MAX;if(function(e,t){return!e[`hasOther${CS[t]}`]}(c,n)){if(function(e,t){return!e[`hasExplicit${CS[t]}`]}(c,n))return!1;if(wS(c,n,d))return!1}if(function(e,t,n){const i=n?e=>e<0:e=>e>0;return e[`hasExplicit${CS[t]}`]&&i(e[`explicit${CS[t]}`])}(c,n,d))return!1;let m="end";i&&(m=d?"sumOfPositives":"sumOfNegatives");const f=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale(pb.SCALE.MAIN.MINOR)[n]())),h=d?e=>e.datum[m].value>f():e=>e.datum[m].value<f(),p=pb.COMPONENT.BAR,g=e.layoutService.getLayoutValue("components",[]),y=g?g.filter((e=>e.key===p))[0]:null;return{type:"box-sliced-hat",key:`sliced-hat-${n}`,layout:{dock:d?u.meta.minor.end:u.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:se({},t.settings.box,{fill:l.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:h,width:sx({layoutService:e.layoutService,discrete:e.discrete,componentKey:p}),strokeWidth:null!=y&&null!==(o=y.style)&&void 0!==o&&o.strokeWidth?ox.BAR.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:ox.BAR.STROKE.WIDTH.NONE,stroke:null!==(r=null==y||null===(a=y.style)||void 0===a||null===(a=a.strokeColor)||void 0===a?void 0:a.color)&&void 0!==r?r:ox.BAR.STROKE.COLOR})}}}function kS(e,t){var n;let i;return i=e.isContinuous?1:.7,!e.isContinuous&&null!=t&&null!==(n=t.style)&&void 0!==n&&n.width&&t.style.width>0?t.style.width:i}function TS(e,{collectionKey:t},n){const{meta:i}=e.layoutService,{fields:o}=e.viewModel,r=i.isStackedByDimension&&!i.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[r]?0:e[r];function s(t){const n=e.ds.field(t).raw(),i=e.ds.field(t).formatter(),o=be.shouldUseFormat(n);return{field:t,reduceLabel:"none",value:a,label:e=>o?(e=>"NaN"===e[r]?"-":i(e[r]))(e):e.qText}}const l=i.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;const u={key:t,data:{extract:o.minor.map(((t,r)=>{const a=e.colorService.getMain().getDatumProps(r),u=e.colorService.getMini().getDatumProps(r),c=a[Object.keys(a)[0]],d=null==c?void 0:c.field,m=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,f={field:i.isDimensionless?t:o.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:s(t),null:(h=t,{field:h,reduceLabel:"none",reduce:"first",value:l}),segment:i.isStacked?s(t):void 0,group:i.isGroupedByDimension?{field:o.majorGroup}:void 0,stack:i.isStacked?{field:o.majorStack}:void 0,measureIndex:i.isGroupedByDimension||i.isStackedByDimension?void 0:r,timeStart:i.isContinuous?{field:o.majorNumeric}:void 0,timeEnd:i.isContinuous?{field:o.majorNumeric}:void 0,fillTooltip:m,...a,...u,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${r}`},customTooltipAttrExps:0!==i.dimensionCount?Iy.getNode(e.layoutService.getLayout(),i):void 0}};var h;return i.isDimensionless&&(f.value=r),void 0!==n&&(f.source=n),be.deleteUndefinedProperties(f.props),f}))}};return i.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}function ES({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:i}=e,{fields:o}=t;if(!i.isStacked)return!1;let r;return r=i.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},null:{fields:t.minor.map((e=>({field:e}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(i,o):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>Number(e.qMaxPos.toFixed(13))},sumOfNegatives:{value:e=>Number(e.qMinNeg.toFixed(13))},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every((e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue))}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t>0?e+t:e),0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t<0?e+t:e),0)},timeStart:n,timeEnd:n}}}(i,o),{key:n,data:{extract:r}}}const DS="main-collection",NS="stack-total-collection";const LS="mini-collection",OS="mini-stack-collection",AS="mini-continuous-collection",IS="miniCube",PS=(e,t)=>{const n=(e=>{const t=[TS(e,{collectionKey:DS})];return e.layoutService.meta.isStacked&&t.push(ES(e,{collectionKey:NS})),t})(t),i=((e,t)=>{const n=[];return qg({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(TS(t,{collectionKey:AS},IS)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:i,mode:o}}=e;return{key:t,data:{extract:i.minor.map(((e,t)=>{const r={end:{field:e,reduceLabel:"none"},...o.isStackedByMeasure&&!o.isReduced?n.getMain().getDatumProps(t):{}};return o.isContinuous&&(r.timeStart={field:i.major,value:e=>e.qNum},r.timeEnd=r.timeStart),{source:"miniCube",field:i.major,props:r}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:OS})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:i,mode:o}}=e;return{key:t,data:{extract:i.minor.map(((e,t)=>{const r=o.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:i.majorGroup},measureIndex:t,...r},s={source:"miniCube",field:o.isDimensionless?e:i.major,props:a};return o.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:LS}))),n})(0,t);return n.concat(i)};function RS(e,t,n,i){const o=[{position:e,onBackground:!0,justify:0,overflow:i}];if(t){const t={fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}};o.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return o}function zS({layout:e,component:t},n,i){if(!Ex(e,n))return!1;const{layoutService:o,chart:r,dockService:a,viewModel:s,themeService:l,styleService:u}=n,{meta:c}=o,d=!Tx(e,n),m=l.getStyles(),f=u.label.getStyle(),h=f.useContrastColor;function p(e){const t=r.formatter(pb.FORMATTER.MINOR);return t?t(e):e}const g={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value)},simplifiedPlacements:RS("outside",d,h,c.isContinuous),style:m.label.value},y={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value)},simplifiedPlacements:RS("opposite",d,h,c.isContinuous),style:m.label.value},v=[Mx(se(n,g)),Mx(se(n,y))];return{key:"stack-total-labels",type:"labels",renderer:vs(n.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>kx(e.data.sumOfPositives.value,a.meta.minor.orientation,i),labels:v,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily,linkData:os.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:os.labels.trackBy,compensateForLayoutChanges:os.labels.compensateForLayoutChanges}}}function FS(e,t,n){const i=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&i.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),i}function jS({layout:e,type:t},n){const{layoutService:i,viewCache:o,themeService:r,styleService:a}=n,{meta:s}=i,{isStacked:l}=s;if(!l&&!Tx(e,n)||l&&!Ex(e,n))return!1;const u=o.get("minorMinMax");if(!u.hasExplicitMinMax||t===hx.MAX&&0===u.max||t===hx.MIN&&0===u.min)return!1;if(!gx(t===hx.MAX?u.implicitMax:u.implicitMin,u,t))return!1;const c=r.getStyles(),d=a.label.getStyle();let m=e=>e.data.end.label;s.isStacked&&(m=t===hx.MAX?function(e){if(gx(e.data.sumOfNegatives.value,u,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,i=n.chart.formatter(pb.FORMATTER.MINOR);return i?i(t):t}return""}:function(e){if(gx(e.data.sumOfPositives.value,u,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,i=n.chart.formatter(pb.FORMATTER.MINOR);return i?i(t):t}return""});const f={label:m,simplifiedPlacements:FS("outside",true,s.isContinuous),styles:c},h={label:m,simplifiedPlacements:FS("opposite",true,s.isContinuous),styles:c},p=[Mx(se(n,f)),Mx(se(n,h))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y=[{component:`${pb.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:p,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:os.labels.linkData}}}];return{key:`bar-oob-labels-${t}`,type:"labels",renderer:vs(n.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:y},animations:{enabled:n.viewModel.animations.enabled,trackBy:os.labels.trackBy,compensateForLayoutChanges:os.labels.compensateForLayoutChanges}}}function HS(e){return"all"===e||"title"===e}function BS(e,t,n){if(!HS(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:i,properties:o}=t,r={hyperCube:e.qHyperCube,hyperCubeDef:o&&o.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=i&&null!==(e=i.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA"),isEnabled:t.flags.isEnabled},a=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleDimensions&&(r.padding="0",r.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:Jb[`${t.dockService.meta.major.orientation}DimensionAxisTitle`].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:r,style:a}}function _S(e,t,n){if(!HS(e.measureAxis.show))return!1;const{layoutService:i,actions:r}=t,a=t.properties,s=i.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",l={hyperCube:i.getHyperCube(),hyperCubeDef:o(a,s),isDimension:!1,disabled:()=>!r.interact.enabled(),model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA"),isEnabled:t.flags.isEnabled},u=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleMeasures&&(l.padding="0",l.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:l,style:u}}function VS({environment:e,rtl:t,refLineModel:n,layoutService:i,colorService:o,dockService:r,themeService:a,viewModel:s,chart:l}){const{theme:u,localeInfo:c}=e,d={resolveUIColor:o.getMain().getPaletteColor},m=a.getStyles(),f=s.animations.enabled;return[cs({refLineModel:n,layoutService:i,colorModel:d,dockService:r,animationsEnabled:f,chart:l,scale:pb.SCALE.MAIN.MINOR,axis:"horizontal"===r.meta.major.orientation?"y":"x",key:pb.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:Jb.refLines.minimumLayoutMode}),cs({isDimension:!0,refLineModel:n,layoutService:i,colorModel:d,dockService:r,animationsEnabled:f,chart:l,scale:pb.SCALE.MAIN.MAJOR,axis:"horizontal"===r.meta.major.orientation?"x":"y",rtl:t,key:pb.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:pb.COMPONENT.BAR,minimumLayoutMode:Jb.refLines.minimumLayoutMode}),...hs({refLineModel:n,layoutService:i,colorModel:d,animationsEnabled:f,dock:r.meta.minor.opposite,scale:pb.SCALE.MAIN.MINOR,style:m,formatter:pb.FORMATTER.MINOR,theme:u,localeInfo:c,rtl:t,key:pb.COMPONENT.MEASURE_REF_LINE_LABEL}),...hs({isDimension:!0,refLineModel:n,layoutService:i,colorModel:d,animationsEnabled:f,dock:r.meta.major.opposite,scale:pb.SCALE.MAIN.MAJOR,style:m,theme:u,localeInfo:c,rtl:t,key:pb.COMPONENT.DIMENSION_REF_LINE_LABEL})]}const US=(e,t,n)=>{var i;const{layoutService:o,dockService:r,colorService:a,chart:s,actions:l,discrete:u,continuousDataModel:c,reducedDataModel:d,viewModel:m,viewState:f,viewCache:h,themeService:p,refLineModel:g,pluginService:y,rtl:v,logicalSize:b,trendLineModel:x}=t,{localeInfo:S}=n,M=Rx({layout:e},t,v);if(M&&"center"===M.layout.dock)return{components:[M]};const C=yS(e,t,{localeInfo:S,rtl:v}),w=!(null!=l&&null!==(i=l.interact)&&void 0!==i&&i.enabled()),q=a.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:f,chart:s,styleReference:"object.barChart",styleOverrides:{title:t.styleService.legend.title.getStyle(),label:t.styleService.legend.label.getStyle()},rtl:v,settings:{item:{shape:{size:10}}}},{actions:l,navigationDisabled:w}),k=q.components[0];if(k){const{dock:e}=k.layout;if(C.fillRange&&(["right","left"].includes(e)||v)&&(C.fillRange.invert=!0),"legend-seq"===k.type&&void 0!==m.selectionDimensionIdx&&C.fillRange&&C.fillRange.min<C.fillRange.max){const e=Xb({eventName:"legendRange",key:"legendRangeBrush",targets:[k.key],fillTargets:[k.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:k.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{l.select.emit("end","legendRange")}},t);q.components.push(...e.components),q.interactions.unshift(...e.interactions)}}else C.fillRange&&v&&(C.fillRange.invert=!0);const T=((e,{componentKey:t,collectionKey:n})=>{var i,o,r;const{meta:a}=e.layoutService;let s,l;a.isGroupedByDimension?s=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:a.isGroupedByMeasure&&(s=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let u=2;a.isContinuous?(l={start:"timeStart",end:"timeEnd"},u=ux(e,t)):a.isStacked&&(l="stack");const c=a.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,d=e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},m=e.layoutService.getLayoutValue("components",null),f=m?m.filter((e=>e.key===t))[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:a.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:a.isContinuous||c?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:pb.SCALE.MAIN.MAJOR,fn:s,ref:l},minor:{scale:pb.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:sx({layoutService:e.layoutService,discrete:e.discrete,componentKey:t}),minWidthPx:u,fill:e.colorService.getMain().getColor(),opacity:e=>d(e)?0:void 0,minHeightPx:function(e){return a.isStacked?.1:d(e)?.01:.3},strokeWidth:null!=f&&null!==(i=f.style)&&void 0!==i&&i.strokeWidth?ox.BAR.STROKE.WIDTH[f.style.strokeWidth.toUpperCase()]:ox.BAR.STROKE.WIDTH.NONE,stroke:null!==(o=null==f||null===(r=f.style)||void 0===r||null===(r=r.strokeColor)||void 0===r?void 0:r.color)&&void 0!==o?o:ox.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:e.viewModel.animations.enabled,isMainComponent:!0,trackBy:os.bars.trackBy,compensateForLayoutChanges:os.bars.compensateForLayoutChanges}}})(t,{componentKey:pb.COMPONENT.BAR,collectionKey:pb.COLLECTION.MAIN}),E=((e,{componentKey:t,collectionKey:n})=>{const{meta:i}=e.layoutService;if(!i.isStacked)return!1;let o=2;i.isContinuous&&(o=ux(e,t));const r=e.layoutService.getLayoutValue("components",null),a=r?r.filter((e=>e.key===t))[0]:null,s={key:t,type:"box",data:{collection:n},settings:{major:{scale:pb.SCALE.MAIN.MAJOR},minor:{scale:pb.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:kS(i,a),minWidthPx:o,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:.3}}}}]}};return i.isContinuous&&(s.settings.major.ref={start:"timeStart",end:"timeEnd"}),s})(t,{componentKey:pb.COMPONENT.STACK_TOTAL_BAR,collectionKey:pb.COLLECTION.STACK_TOTAL}),D=SS(t,n,m.selectionDimensionIdx),{isStacked:N}=o.meta;let L;L=d.mode.isContinuous?pb.COLLECTION.MINI_CONTINUOUS:N?pb.COLLECTION.MINI_STACK:pb.COLLECTION.MINI;const O=N?E:T,A=$x(0,t),I=[...A,qS(t,{barComponent:O,type:"max",isStacked:N}),qS(t,{barComponent:O,type:"min",isStacked:N}),vx(t,{barComponent:O,type:"max",isStacked:N}),vx(t,{barComponent:O,type:"min",isStacked:N}),xx(t,{chart:s,barComponent:O,type:"max",scales:C,collectionKey:N?pb.COLLECTION.STACK_TOTAL:pb.COLLECTION.MAIN}),xx(t,{chart:s,barComponent:O,type:"min",scales:C,collectionKey:N?pb.COLLECTION.STACK_TOTAL:pb.COLLECTION.MAIN}),...ix(e,t,v,!!A[0]),T,E,MS({layoutService:o,viewModel:m,layout:e,dockService:r}),BS(e,t,v),_S(e,t,v),...VS({environment:n,rtl:v,refLineModel:g,layoutService:o,colorService:a,dockService:r,themeService:p,viewModel:m,chart:s}),ta({viewState:f,viewCache:h,layoutService:o,dockService:r,rtl:v}),eS(T,t,{collectionKey:L}),kg({layoutService:o,dockService:r,discrete:u,continuousDataModel:c,viewState:f,viewCache:h,themeService:p,rtl:v,deviceType:n.deviceType}),...Xv({majorScale:pb.SCALE.MAIN.MAJOR,minorScale:pb.SCALE.MAIN.MINOR,tooltipOverlay:pb.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:o,trendLineModel:x,dockService:r,animationsEnabled:m.animations.enabled}),...q.components,Nx({layout:e,component:pb.COMPONENT.BAR,minorScale:C.minor},t,v),zS({layout:e,component:pb.COMPONENT.STACK_TOTAL_BAR},t,v),jS({layout:e,component:"bar-oob-max",type:"max"},t),jS({layout:e,component:"bar-oob-min",type:"min"},t),...D.components,Ox(0,{...t,coloring:a.getMain().getSettings()},v),Ix(0,{...t,coloring:a.getMain().getSettings()},v),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&M,nb({tooltip:pb.COMPONENT.TREND_LINES_TOOLTIP,formatter:pb.FORMATTER.MINOR,majorScale:pb.SCALE.MAIN.MAJOR},t,{rtl:v})].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(I);const P=[...q.interactions,...D.gestures].sort(((e,t)=>(t.prio||0)-(e.prio||0)));return{interactions:Zx(t,{rtl:v,hammer:{gestures:P}}),scales:C,palettes:a.getMain().getPalettes(),components:y.extendComponents(I),strategy:he(0,{logicalSize:b,minCenterRatio:0}),formatters:zx(t,C),collections:PS(0,t)}};const $S=({environment:e,services:t,chart:n,viewState:i,bootstrapped:o})=>{U((r=>{var a;if(!e||!t||!o)return;const{flags:s}=e,{layoutService:l,dockService:u,colorService:c,discrete:d,continuousDataModel:m,reducedDataModel:f}=t,{width:h,height:p}=u.meta.chart.size;if(r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:h,h:p}},l.meta.isSnapshot)return Promise.resolve();if(r.snapshotData.content.chartData={scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:we(n,pb.COMPONENT.LEGEND_COLOR_CAT)},null!=s&&null!==(a=s.isEnabled)&&void 0!==a&&a.call(s,"IM_1579_HIDE_DIM_MEA")){const{properties:e}=o,t=null==e?void 0:e.qHyperCubeDef.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv}));t&&(r.tooltip.auto=!0)}return l.meta.isDiscrete?(d.command.setSnapshotData(r),f.setSnapshotData(r)):m.setSnapshotData(r),c.getMain().getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{}))})),$((()=>({getViewState(){if(i&&n)return{scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:we(n,pb.COMPONENT.LEGEND_COLOR_CAT)}}})),[i,n])},WS=({properties:e,layout:t,isStacked:n,isContinuous:i,model:o,layoutService:r})=>{var a,s;const l=t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),u=t.qHyperCube.qMeasureInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),c=se(!0,{},e);return((e,t,n)=>{const{color:{mode:i}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===i&&t.length>1?n.color.mode="byMultiple":"byExpression"===i&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&(n.color.mode="primary"))})(l,u,e),l.length>1&&n&&!i&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),l.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),null===(a=o.colorSupport)||void 0===a||null===(s=a.colorByUpdater)||void 0===s||s.call(a,e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:i}=e.color||{};if("byExpression"===i){var o;if("colorByExpression"===(null===(o=t.getLayout().qHyperCube.qMeasureInfo)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.qAttrExprInfo)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.id))return;const{current:i,target:r}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:i,target:o}=n.reduce(((e,n,i)=>{var o;return"colorByExpression"===(null===(o=n.qAttributeExpressions[0])||void 0===o?void 0:o.id)&&(e.current=i),void 0!==e.target||t.includes(i)||(e.target=i),e}),{current:void 0,target:void 0});return{current:i,target:o}}({properties:e,filtered:n.measures});if(void 0===i)return;const a=e.qHyperCubeDef.qMeasures[i].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[r].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:r}),JSON.stringify(c)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)};function KS(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By})).length,i=t.layout.qHyperCube.qDimensionInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By})).length,o=e.dimensionAxis.maxVisibleItems;o<1?e.dimensionAxis.maxVisibleItems=10:o>1e4/(i+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(o,Math.floor(1e4/(i+n))))}}const GS=.7,YS=.9,XS=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],JS=(e,t)=>{var n,i,o;const r=null===(n=t.qHyperCube)||void 0===n||null===(n=n.qMeasureInfo)||void 0===n?void 0:n.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By})).length,a=null===(i=t.qHyperCube)||void 0===i||null===(i=i.qDimensionInfo)||void 0===i?void 0:i.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By})).length,s="grouped"===(null===(o=e.barGrouping)||void 0===o?void 0:o.grouping)&&a>0&&r+a>2;return Ce.continuous(t)?1:s?YS:GS},ZS=(e,t,n)=>{const i=`${e}.fontFamily`,o=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:o,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function QS(e=!1,t,n,i){return e?function(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(XS).map((e=>XS[e])),schemaIgnore:!0,defaultValue:XS[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!Ce.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>JS(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(xg.OPTIONS).map((e=>xg.OPTIONS[e])),schemaIgnore:!0,defaultValue:xg.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}(n):function(e,t,n){const i=y({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]},flags:t});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==t?void 0:t.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:Object.keys(XS).map((e=>XS[e])),defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",show:(e,t)=>!Ce.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:i}=n,{barGrouping:o,qHyperCubeDef:r}=i,a=r.qMeasures.length,s=r.qDimensions.length,l="grouped"===o.grouping&&s>0&&a+s>2;return Ce.continuous(i)?1:l?YS:GS},schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:ZS("axis.title",i,e)}}}:void 0,axisLabelSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:ZS("axis.label.name",i,e)}}}:void 0,labelSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...ZS("label.value",i,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0,legendTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{legendTitleSection:{component:"items",ref:"components",key:"legend",items:ZS("legend.title",i,e)}}}:void 0,legendLabelSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{legendLabelSection:{component:"items",ref:"components",key:"legend",items:ZS("legend.label",i,e)}}}:void 0}}}(t,n,i)}const eM={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues:(e,t)=>({key:"bar",style:{width:JS(e,t.layout),strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}),items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},width:{show:(e,t,n)=>!Ce.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:GS}}}}},tM=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By},nM=(e,t)=>e.qHyperCube[t].filter((e=>tM(e))),iM=e=>({get:(t,n,i)=>Ce.continuous(i.layout)?e:t(n.type),set(e,t,n){const i=Te(n.type,n);t(n.type,e,i)}}),oM=e=>{if(!e)return!1;const t=se(!0,{},e);return t.qHyperCube.qMeasureInfo=nM(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=nM(e,"qDimensionInfo"),t&&!Ce.continuous(t)&&Ce.stacked(t)},rM=({translator:e,flags:t,anything:n})=>{var i,o,r;const a=null==n||null===(i=n.sense)||void 0===i||null===(o=i.isUnsupportedFeature)||void 0===o?void 0:o.call(i,"continuousData"),s={items:{labels:{items:{header:{show:(e,t,n)=>nM(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!oM(t.layout)&&nM(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>oM(t.layout),convertFunctions:{get:(e,t,n,i)=>i.dataPoint.showLabels&&i.dataPoint.showSegmentLabels,set(e,t,n,i,o){o.dataPoint.showSegmentLabels=e,o.dataPoint.showLabels=o.dataPoint.showSegmentLabels||o.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>oM(t.layout),convertFunctions:{get:(e,t,n,i)=>i.dataPoint.showLabels&&i.dataPoint.showTotalLabels,set(e,t,n,i,o){o.dataPoint.showTotalLabels=e,o.dataPoint.showLabels=o.dataPoint.showSegmentLabels||o.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>nM(n.layout,"qDimensionInfo").length&&nM(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,i)=>"labels"===i.dimensionAxis.show||"none"===i.dimensionAxis.show,set(e,t,n,i,o){o.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>nM(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxis.show||"none"===i.measureAxis.show,set(e,t,n,i,o){o.measureAxis.show=e?"labels":"all"}}}}}}},l=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme,u={uses:"settings",items:{simpleStyling:QS(!0,l,t,e),simpleLabels:s,general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_BARCHART")?QS(!1,l,t,e):eM,grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){const n=nM(t.layout,"qMeasureInfo").length,i=nM(t.layout,"qDimensionInfo").length;return i>0&&n+i>2},change(e,t){nM(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>Ce.continuous(n.layout),convertFunctions:iM("stacked")},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>Ce.continuous(n.layout),convertFunctions:iM("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(xg.OPTIONS).map((e=>xg.OPTIONS[e])),defaultValue:xg.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!Ce.continuous(n.layout)}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(oM(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&oM(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&oM(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{attributeExpression:bs}},legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,i)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!Ce.continuous(i.layout),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const i=nM(n.layout,"qMeasureInfo").length,o=nM(n.layout,"qDimensionInfo").length,r=e.dimensionAxis.maxVisibleItems;return r<0||r>1e4/(o+i)},globalChange:KS,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null},show:!a}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=t&&t.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(u.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),u},aM={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){Rt(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:i,qInterColumnSortOrder:o}=e.qHyperCubeDef,{qCardinal:r}=t.layout.qHyperCube.qDimensionInfo[0],a=o.length,s=[...Array(a).keys()];1===n.length&&i.length>=1&&r>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},sM={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"}}},lM=({translator:e,flags:t,anything:n})=>{var i,o;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,i){var o,r;if(null!=n&&null!==(o=n.sense)&&void 0!==o&&null!==(r=o.isUnsupportedFeature)&&void 0!==r&&r.call(o,"includeZeroValues"))return!1;const a=((e,t)=>{var n,i;const o=null===(n=t.layout)||void 0===n||null===(n=n.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.findIndex((e=>tM(e)));return(null===(i=t.properties)||void 0===i||null===(i=i.qHyperCubeDef)||void 0===i||null===(i=i.qDimensions)||void 0===i?void 0:i[o])===e})(e,t),s=Ce.continuous(i.layout);return!(a&&s)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")},trendLines:null!=n&&null!==(i=n.sense)&&void 0!==i&&null!==(o=i.isUnsupportedFeature)&&void 0!==o&&o.call(i,"trendlines")?void 0:sb({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function uM({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:lM({translator:e,flags:t,anything:n}),sorting:aM,addons:sM,settings:rM({translator:e,flags:t,anything:n})}}}const cM=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==By};function dM(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const i=n.qHyperCube.qMeasureInfo.length,o=n.qHyperCube.qDimensionInfo.filter((e=>cM(e))).length;return 1===i&&2===o&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){return t.qHyperCube.qMeasureInfo.filter((e=>cM(e))).length+t.qHyperCube.qDimensionInfo.filter((e=>cM(e))).length>2&&!Ce.continuous(t)&&!((null==(n=t)||null===(i=n.qHyperCube)||void 0===i||null===(i=i.qDimensionInfo)||void 0===i?void 0:i.filter((e=>cM(e))).length)>1&&(null==n||null===(o=n.qHyperCube)||void 0===o?void 0:o.isHCEnabled));var n,i,o},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!Ce.continuous(t)}}},color:{uses:"color"}}}}function mM(e){const t={},n=o(e,"components"),i=o(e,"dimensionAxis.axisDisplayMode"),r=o(e,"dimensionAxis.maxVisibleItems"),a=n?n.filter((e=>"bar"===e.key))[0]:void 0,s=o(e,"tooltip");if(a&&a.style&&Object.keys(a.style).forEach((e=>{t[`chart_style_${e}`]=a.style[e]})),r&&(t.chart_dimaxis_maxVisibleItems=r),i&&(t.chart_dimaxis_axisDisplayMode=i),s){t.chart_tooltip_custom=!s.auto;const e=o(s,"chart.object.refId");!s.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const fM=e=>!!(e&&e.qHyperCube.qSize.qcy>0),hM={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function pM(){const e=[];return Object.keys(hM).forEach((t=>{e.push(hM[t])})),e}function gM(e){const{flags:t}=e;return{definition:uM(e),softDefinition:dM(),support:{snapshot:fM,export:fM,exportData:!0,sharing:fM,viewData:!0,effects:!0,modifiers:pM()},importProperties:(n,i,o,r)=>{const a={layout:{templateId:i.templateId}};o.mapProperties(a);const s={defaultDimension:o.getDefaultDimensionProperties(),defaultMeasure:o.getDefaultMeasureProperties()},l=K.axisChart.importProperties({exportFormat:n,initialProperties:i,dataDefinition:Xy(e),defaultPropertyValues:s,hypercubePath:r,extension:o}),u=l.qProperty;return u.qHyperCubeDef.qDimensions.length>1&&"stacked"===u.barGrouping.grouping&&(u.qHyperCubeDef.qMode="K",u.qHyperCubeDef.qAlwaysFullyExpanded=!0),t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(K.conditionalShow.unquarantine(u),K.conditionalShow.unquarantineAlternative(u)),l},exportProperties:(e,n,i)=>{t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(K.conditionalShow.quarantine(e.qProperty),K.conditionalShow.quarantineAlternative(e.qProperty));return K.axisChart.exportProperties({propertyTree:e,hyperCubePath:n,viewDataMode:i})},migrate:{properties:e=>(e.qExtendsId||(function(e){var t;e.qHyperCubeDef.qDimensions.forEach(Rt),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(t=t.qHyperCubeDef)&&void 0!==t&&t.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(Rt)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:i,showMiniChartForContinuousAxis:o}=e;if(t||!1!==o)return;const{continuousAuto:r}=n;(r||!r&&i)&&(e.scrollbar=xg.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:mM}}}}}));
14
+ */au();var cu=Date.now(),uu="fnValues"+cu,du="fnStyle"+ ++cu,fu=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=ec(e,{},n);return r[du]=t,r},onProcessStyle:function(e,t){if(uu in t||du in t)return e;var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return t[uu]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[du];i&&(o.style=i(e)||{});var a=o[uu];if(a)for(var s in a)o.prop(s,a[s](e),r)}}},pu="@global",mu="@global ",hu=function(){function e(e,t,n){for(var r in this.type="global",this.at=pu,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new jc(nl({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),gu=function(){function e(e,t,n){this.type="global",this.at=pu,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(mu.length);this.rule=n.jss.createRule(r,t,nl({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),yu=/\s*,\s*/g;function vu(e,t){for(var n=e.split(yu),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}function bu(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===pu)return new hu(e,t,n);if("@"===e[0]&&e.substr(0,mu.length)===mu)return new gu(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,o=r?r[pu]:null;if(o){for(var i in o)t.addRule(i,o[i],nl({},n,{selector:vu(i,e.selector)}));delete r[pu]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var o in r)if("@"===o[0]&&o.substr(0,pu.length)===pu){var i=vu(o.substr(pu.length),e.selector);t.addRule(i,r[o],nl({},n,{selector:i})),delete r[o]}}(e,t))}}}var xu=/\s*,\s*/g,Su=/&/g,Mu=/\$([\w-]+)/g;function Cu(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?o.selector:r}}function t(e,t){for(var n=t.split(xu),r=e.split(xu),o="",i=0;i<n.length;i++)for(var a=n[i],s=0;s<r.length;s++){var l=r[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(Su,a):a+" "+l}return o}function n(e,t,n){if(n)return nl({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var o=nl({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(r,o,i){if("style"!==o.type)return r;var a,s,l=o,c=l.options.parent;for(var u in r){var d=-1!==u.indexOf("&"),f="@"===u[0];if(d||f){if(a=n(l,c,a),d){var p=t(u,l.selector);s||(s=e(c,i)),p=p.replace(Mu,s);var m=l.key+"-"+u;"replaceRule"in c?c.replaceRule(m,r[u],nl({},a,{selector:p})):c.addRule(m,r[u],nl({},a,{selector:p}))}else f&&c.addRule(u,{},a).addRule(l.key,r[u],{selector:l.selector});delete r[u]}}return r}}}var wu=/[A-Z]/g,ku=/^ms-/,Tu={};function Eu(e){return"-"+e.toLowerCase()}function qu(e){if(Tu.hasOwnProperty(e))return Tu[e];var t=e.replace(wu,Eu);return Tu[e]=ku.test(t)?"-"+t:t}function Lu(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:qu(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Lu):t.fallbacks=Lu(e.fallbacks)),t}var Ou=su&&CSS?CSS.px:"px",Nu=su&&CSS?CSS.ms:"ms",Du=su&&CSS?CSS.percent:"%";function Au(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(t,n)]=e[o];return r}var Iu=Au({"animation-delay":Nu,"animation-duration":Nu,"background-position":Ou,"background-position-x":Ou,"background-position-y":Ou,"background-size":Ou,border:Ou,"border-bottom":Ou,"border-bottom-left-radius":Ou,"border-bottom-right-radius":Ou,"border-bottom-width":Ou,"border-left":Ou,"border-left-width":Ou,"border-radius":Ou,"border-right":Ou,"border-right-width":Ou,"border-top":Ou,"border-top-left-radius":Ou,"border-top-right-radius":Ou,"border-top-width":Ou,"border-width":Ou,"border-block":Ou,"border-block-end":Ou,"border-block-end-width":Ou,"border-block-start":Ou,"border-block-start-width":Ou,"border-block-width":Ou,"border-inline":Ou,"border-inline-end":Ou,"border-inline-end-width":Ou,"border-inline-start":Ou,"border-inline-start-width":Ou,"border-inline-width":Ou,"border-start-start-radius":Ou,"border-start-end-radius":Ou,"border-end-start-radius":Ou,"border-end-end-radius":Ou,margin:Ou,"margin-bottom":Ou,"margin-left":Ou,"margin-right":Ou,"margin-top":Ou,"margin-block":Ou,"margin-block-end":Ou,"margin-block-start":Ou,"margin-inline":Ou,"margin-inline-end":Ou,"margin-inline-start":Ou,padding:Ou,"padding-bottom":Ou,"padding-left":Ou,"padding-right":Ou,"padding-top":Ou,"padding-block":Ou,"padding-block-end":Ou,"padding-block-start":Ou,"padding-inline":Ou,"padding-inline-end":Ou,"padding-inline-start":Ou,"mask-position-x":Ou,"mask-position-y":Ou,"mask-size":Ou,height:Ou,width:Ou,"min-height":Ou,"max-height":Ou,"min-width":Ou,"max-width":Ou,bottom:Ou,left:Ou,top:Ou,right:Ou,inset:Ou,"inset-block":Ou,"inset-block-end":Ou,"inset-block-start":Ou,"inset-inline":Ou,"inset-inline-end":Ou,"inset-inline-start":Ou,"box-shadow":Ou,"text-shadow":Ou,"column-gap":Ou,"column-rule":Ou,"column-rule-width":Ou,"column-width":Ou,"font-size":Ou,"font-size-delta":Ou,"letter-spacing":Ou,"text-decoration-thickness":Ou,"text-indent":Ou,"text-stroke":Ou,"text-stroke-width":Ou,"word-spacing":Ou,motion:Ou,"motion-offset":Ou,outline:Ou,"outline-offset":Ou,"outline-width":Ou,perspective:Ou,"perspective-origin-x":Du,"perspective-origin-y":Du,"transform-origin":Du,"transform-origin-x":Du,"transform-origin-y":Du,"transform-origin-z":Du,"transition-delay":Nu,"transition-duration":Nu,"vertical-align":Ou,"flex-basis":Ou,"shape-margin":Ou,size:Ou,gap:Ou,grid:Ou,"grid-gap":Ou,"row-gap":Ou,"grid-row-gap":Ou,"grid-column-gap":Ou,"grid-template-rows":Ou,"grid-template-columns":Ou,"grid-auto-rows":Ou,"grid-auto-columns":Ou,"box-shadow-x":Ou,"box-shadow-y":Ou,"box-shadow-blur":Ou,"box-shadow-spread":Ou,"font-line-height":Ou,"text-shadow-x":Ou,"text-shadow-y":Ou,"text-shadow-blur":Ou});function Ru(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ru(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Ru(o,t[o],n);else for(var i in t)t[i]=Ru(e+"-"+i,t[i],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Iu[e];return!a||0===t&&a===Ou?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Pu(e){void 0===e&&(e={});var t=Au(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Ru(r,e[r],t);return e},onChangeValue:function(e,n){return Ru(n,e,t)}}}var zu="",ju="",Fu="",_u="",Bu=Ul&&"ontouchstart"in document.documentElement;if(Ul){var Hu={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},$u=document.createElement("p").style;for(var Vu in Hu)if(Vu+"Transform"in $u){zu=Vu,ju=Hu[Vu];break}"Webkit"===zu&&"msHyphens"in $u&&(zu="ms",ju=Hu.ms,_u="edge"),"Webkit"===zu&&"-apple-trailing-word"in $u&&(Fu="apple")}var Wu={js:zu,css:ju,vendor:Fu,browser:_u,isTouch:Bu};var Uu={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Wu.js?"-webkit-"+e:Wu.css+e)}},Ku={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Wu.js?Wu.css+"print-"+e:e)}},Gu=/[-\s]+(.)?/g;function Yu(e,t){return t?t.toUpperCase():""}function Xu(e){return e.replace(Gu,Yu)}function Ju(e){return Xu("-"+e)}var Zu,Qu={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Wu.js){var n="mask-image";if(Xu(n)in t)return e;if(Wu.js+Ju(n)in t)return Wu.css+e}return e}},ed={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Wu.vendor||Wu.isTouch?e:Wu.css+e)}},td={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Wu.css+e)}},nd={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Wu.css+e)}},rd={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Wu.js||"ms"===Wu.js&&"edge"!==Wu.browser?Wu.css+e:e)}},od={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Wu.js||"ms"===Wu.js||"apple"===Wu.vendor?Wu.css+e:e)}},id={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Wu.js?"WebkitColumn"+Ju(e)in t&&Wu.css+"column-"+e:"Moz"===Wu.js&&("page"+Ju(e)in t&&"page-"+e))}},ad={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Wu.js)return e;var n=e.replace("-inline","");return Wu.js+Ju(n)in t&&Wu.css+n}},sd={supportedProperty:function(e,t){return Xu(e)in t&&e}},ld={supportedProperty:function(e,t){var n=Ju(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Wu.js+n in t?Wu.css+e:"Webkit"!==Wu.js&&"Webkit"+n in t&&"-webkit-"+e}},cd={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Wu.js?""+Wu.css+e:e)}},ud={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Wu.js?Wu.css+"scroll-chaining":e)}},dd={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},fd={supportedProperty:function(e,t){var n=dd[e];return!!n&&(Wu.js+Ju(n)in t&&Wu.css+n)}},pd={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},md=Object.keys(pd),hd=function(e){return Wu.css+e},gd={supportedProperty:function(e,t,n){var r=n.multiple;if(md.indexOf(e)>-1){var o=pd[e];if(!Array.isArray(o))return Wu.js+Ju(o)in t&&Wu.css+o;if(!r)return!1;for(var i=0;i<o.length;i++)if(!(Wu.js+Ju(o[0])in t))return!1;return o.map(hd)}return!1}},yd=[Uu,Ku,Qu,ed,td,nd,rd,od,id,ad,sd,ld,cd,ud,fd,gd],vd=yd.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),bd=yd.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Dl(t.noPrefill)),e}),[]),xd={};if(Ul){Zu=document.createElement("p");var Sd=window.getComputedStyle(document.documentElement,"");for(var Md in Sd)isNaN(Md)||(xd[Sd[Md]]=Sd[Md]);bd.forEach((function(e){return delete xd[e]}))}function Cd(e,t){if(void 0===t&&(t={}),!Zu)return e;if(null!=xd[e])return xd[e];"transition"!==e&&"transform"!==e||(t[e]=e in Zu.style);for(var n=0;n<vd.length&&(xd[e]=vd[n](e,Zu.style,t),!xd[e]);n++);try{Zu.style[e]=""}catch(e){return!1}return xd[e]}var wd,kd={},Td={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Ed=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function qd(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Cd(t):", "+Cd(n);return r||(t||n)}function Ld(e,t){var n=t;if(!wd||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=kd[r])return kd[r];try{wd.style[e]=n}catch(e){return kd[r]=!1,!1}if(Td[e])n=n.replace(Ed,qd);else if(""===wd.style[e]&&("-ms-flex"===(n=Wu.css+n)&&(wd.style[e]="-ms-flexbox"),wd.style[e]=n,""===wd.style[e]))return kd[r]=!1,!1;return wd.style[e]="",kd[r]=n,kd[r]}function Od(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var o=!1,i=Cd(n);i&&i!==n&&(o=!0);var a=!1,s=Ld(i,nc(r));s&&s!==r&&(a=!0),(o||a)&&(o&&delete t[n],t[i||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Wu.js?e:"@"+Wu.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Ld(t,nc(e))||e}}}function Nd(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i<o.length;i++)r[o[i]]=t[o[i]];return r}}}function Dd(){return{plugins:[fu(),bu(),Cu(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Lu(e[t]);return e}return Lu(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=qu(t);return t===r?e:(n.prop(r,e),null)}},Pu(),"undefined"==typeof window?null:Od(),Nd()]}}function Ad(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=nl({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Ul&&(wd=document.createElement("p"));var Id={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Rd=Id,Pd=v.createContext(null);function zd(){return v.useContext(Pd)}var jd,Fd=au(Dd()),_d={disableGeneration:!1,generateClassName:$l(),jss:Fd,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Bd=v.createContext(_d);function Hd(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,o=e.disableGeneration,i=void 0!==o&&o,a=hl(e,["children","injectFirst","disableGeneration"]),s=nl({},v.useContext(Bd),{disableGeneration:i},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!jd){var l=document.head;jd=document.createComment("mui-inject-first"),l.insertBefore(jd,l.firstChild)}s.jss=au({plugins:Dd().plugins,insertionPoint:jd})}return v.createElement(Bd.Provider,{value:s},t)}var $d=-1e9;var Vd={};function Wd(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,i=e.stylesCreator,a=e.name;if(!o.disableGeneration){var s=Rd.get(o.sheetsManager,i,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Rd.set(o.sheetsManager,i,r,s));var l=nl({},i.options,o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=o.sheetsRegistry;if(0===s.refs){var u;o.sheetsCache&&(u=Rd.get(o.sheetsCache,i,r));var d=i.create(r,a);u||((u=o.jss.createStyleSheet(d,nl({link:!1},l))).attach(),o.sheetsCache&&Rd.set(o.sheetsCache,i,r,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=lu(d)}if(s.dynamicStyles){var f=o.jss.createStyleSheet(s.dynamicStyles,nl({link:!0},l));f.update(t),f.attach(),n.dynamicSheet=f,n.classes=Ad({baseClasses:s.staticSheet.classes,newClasses:f.classes}),c&&c.add(f)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ud(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,o=t.Component,i=t.defaultTheme,a=void 0===i?Vd:i,s=hl(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var i=n.overrides[r],a=nl({},o);return Object.keys(i).forEach((function(e){a[e]=il(a[e],i[e])})),a},options:{}}}(e),c=n||r||"makeStyles";l.options={index:$d+=1,name:n,meta:c,classNamePrefix:c};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=zd()||a,r=nl({},v.useContext(Bd),s),i=v.useRef(),c=v.useRef();!function(e,t){var n,r=v.useRef([]),o=v.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),v.useEffect((function(){return function(){n&&n()}}),[o])}((function(){var o={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Wd(o,e),c.current=!1,i.current=o,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=Rd.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(Rd.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(o)}}),[t,l]),v.useEffect((function(){c.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(i.current,e),c.current=!0}));var u=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=Ad({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(i.current,e.classes,o);return u}}function Kd(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Kd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Gd(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Kd(e))&&(r&&(r+=" "),r+=t);return r}var Yd={exports:{}},Xd={},Jd="function"==typeof Symbol&&Symbol.for,Zd=Jd?Symbol.for("react.element"):60103,Qd=Jd?Symbol.for("react.portal"):60106,ef=Jd?Symbol.for("react.fragment"):60107,tf=Jd?Symbol.for("react.strict_mode"):60108,nf=Jd?Symbol.for("react.profiler"):60114,rf=Jd?Symbol.for("react.provider"):60109,of=Jd?Symbol.for("react.context"):60110,af=Jd?Symbol.for("react.async_mode"):60111,sf=Jd?Symbol.for("react.concurrent_mode"):60111,lf=Jd?Symbol.for("react.forward_ref"):60112,cf=Jd?Symbol.for("react.suspense"):60113,uf=Jd?Symbol.for("react.suspense_list"):60120,df=Jd?Symbol.for("react.memo"):60115,ff=Jd?Symbol.for("react.lazy"):60116,pf=Jd?Symbol.for("react.block"):60121,mf=Jd?Symbol.for("react.fundamental"):60117,hf=Jd?Symbol.for("react.responder"):60118,gf=Jd?Symbol.for("react.scope"):60119;function yf(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Zd:switch(e=e.type){case af:case sf:case ef:case nf:case tf:case cf:return e;default:switch(e=e&&e.$$typeof){case of:case lf:case ff:case df:case rf:return e;default:return t}}case Qd:return t}}}function vf(e){return yf(e)===sf}Xd.AsyncMode=af,Xd.ConcurrentMode=sf,Xd.ContextConsumer=of,Xd.ContextProvider=rf,Xd.Element=Zd,Xd.ForwardRef=lf,Xd.Fragment=ef,Xd.Lazy=ff,Xd.Memo=df,Xd.Portal=Qd,Xd.Profiler=nf,Xd.StrictMode=tf,Xd.Suspense=cf,Xd.isAsyncMode=function(e){return vf(e)||yf(e)===af},Xd.isConcurrentMode=vf,Xd.isContextConsumer=function(e){return yf(e)===of},Xd.isContextProvider=function(e){return yf(e)===rf},Xd.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Zd},Xd.isForwardRef=function(e){return yf(e)===lf},Xd.isFragment=function(e){return yf(e)===ef},Xd.isLazy=function(e){return yf(e)===ff},Xd.isMemo=function(e){return yf(e)===df},Xd.isPortal=function(e){return yf(e)===Qd},Xd.isProfiler=function(e){return yf(e)===nf},Xd.isStrictMode=function(e){return yf(e)===tf},Xd.isSuspense=function(e){return yf(e)===cf},Xd.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ef||e===sf||e===nf||e===tf||e===cf||e===uf||"object"==typeof e&&null!==e&&(e.$$typeof===ff||e.$$typeof===df||e.$$typeof===rf||e.$$typeof===of||e.$$typeof===lf||e.$$typeof===mf||e.$$typeof===hf||e.$$typeof===gf||e.$$typeof===pf)},Xd.typeOf=yf,Yd.exports=Xd;var bf=Yd.exports,xf={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Sf={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Mf={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Cf={};function wf(e){return bf.isMemo(e)?Mf:Cf[e.$$typeof]||xf}Cf[bf.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Cf[bf.Memo]=Mf;var kf=Object.defineProperty,Tf=Object.getOwnPropertyNames,Ef=Object.getOwnPropertySymbols,qf=Object.getOwnPropertyDescriptor,Lf=Object.getPrototypeOf,Of=Object.prototype;var Nf=function e(t,n,r){if("string"!=typeof n){if(Of){var o=Lf(n);o&&o!==Of&&e(t,o,r)}var i=Tf(n);Ef&&(i=i.concat(Ef(n)));for(var a=wf(t),s=wf(n),l=0;l<i.length;++l){var c=i[l];if(!(Sf[c]||r&&r[c]||s&&s[c]||a&&a[c])){var u=qf(n,c);try{kf(t,c,u)}catch(e){}}}}return t},Df=Q(Nf);function Af(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.name,i=hl(r,["name"]),a=o,s="function"==typeof t?function(e){return{root:function(n){return t(nl({theme:e},n))}}}:{root:t},l=Ud(s,nl({Component:e,name:o||e.displayName,classNamePrefix:a},i));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var c=v.forwardRef((function(t,r){var o,i,a,s=t.children,c=t.className,u=t.clone,d=t.component,f=hl(t,["children","className","clone","component"]),p=Gd(l(t).root,c),m=f;if(n&&(o=m,i=n,a={},Object.keys(o).forEach((function(e){-1===i.indexOf(e)&&(a[e]=o[e])})),m=a),u)return v.cloneElement(s,nl({className:Gd(s.props.className,p)},m));if("function"==typeof s)return s(nl({className:p},m));var h=d||e;return v.createElement(h,nl({ref:r,className:p},m),s)}));return Df(c,e),c}}function If(e){var t=e.children,n=e.theme,r=zd(),o=v.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):nl({},e,t)}(r,n);return null!=e&&(e[Bl]=null!==r),e}),[n,r]);return v.createElement(Pd.Provider,{value:o},t)}var Rf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,o=t.withTheme,i=void 0!==o&&o,a=t.name,s=hl(t,["defaultTheme","withTheme","name"]),l=a,c=Ud(e,nl({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),u=v.forwardRef((function(e,t){e.classes;var o,s=e.innerRef,l=hl(e,["classes","innerRef"]),u=c(nl({},n.defaultProps,e)),d=l;return("string"==typeof a||i)&&(o=zd()||r,a&&(d=Vl({theme:o,name:a,props:l})),i&&!d.theme&&(d.theme=o)),v.createElement(n,nl({ref:s||t,classes:u},d))}));return Df(u,n),u}},Pf=_l(),zf=function(e){var t=Af(e);return function(e,n){return t(e,nl({defaultTheme:Pf},n))}};function jf(e,t){return Rf(e,nl({defaultTheme:Pf},t))}function Ff(e){if("string"!=typeof e)throw new Error(ll(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Bf(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Bf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Hf(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Bf(e))&&(r&&(r+=" "),r+=t);return r}function $f(e){return e&&e.ownerDocument||document}function Vf(e){return $f(e).defaultView||window}function Wf(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Uf="undefined"!=typeof window?b.useLayoutEffect:b.useEffect;function Kf(e){var t=b.useRef(e);return Uf((function(){t.current=e})),b.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Gf(e,t){return b.useMemo((function(){return null==e&&null==t?null:function(n){Wf(e,n),Wf(t,n)}}),[e,t])}var Yf=!0,Xf=!1,Jf=null,Zf={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Qf(e){e.metaKey||e.altKey||e.ctrlKey||(Yf=!0)}function ep(){Yf=!1}function tp(){"hidden"===this.visibilityState&&Xf&&(Yf=!0)}function np(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return Yf||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Zf[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function rp(){Xf=!0,window.clearTimeout(Jf),Jf=window.setTimeout((function(){Xf=!1}),100)}function op(){var e=b.useCallback((function(e){var t,n=k.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Qf,!0),t.addEventListener("mousedown",ep,!0),t.addEventListener("pointerdown",ep,!0),t.addEventListener("touchstart",ep,!0),t.addEventListener("visibilitychange",tp,!0))}),[]);return{isFocusVisible:np,onBlurVisible:rp,ref:e}}var ip=!1,ap=v.createContext(null),sp="unmounted",lp="exited",cp="entering",up="entered",dp="exiting",fp=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=lp,r.appearStatus=cp):o=up:o=t.unmountOnExit||t.mountOnEnter?sp:lp,r.state={status:o},r.nextCallback=null,r}Xl(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===sp?{status:lp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==cp&&n!==up&&(t=cp):n!==cp&&n!==up||(t=dp)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===cp){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:T.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===lp&&this.setState({status:sp})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[T.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||ip?this.safeSetState({status:up},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:cp},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:up},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:T.findDOMNode(this);t&&!ip?(this.props.onExit(r),this.safeSetState({status:dp},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:lp},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:lp},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:T.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===sp)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=ml(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(ap.Provider,{value:null},"function"==typeof n?n(e,r):v.cloneElement(v.Children.only(n),r))},t}(v.Component);function pp(){}fp.contextType=ap,fp.propTypes={},fp.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pp,onEntering:pp,onEntered:pp,onExit:pp,onExiting:pp,onExited:pp},fp.UNMOUNTED=sp,fp.EXITED=lp,fp.ENTERING=cp,fp.ENTERED=up,fp.EXITING=dp;var mp=fp;function hp(e,t){var n=Object.create(null);return e&&x.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&S(e)?t(e):e}(e)})),n}function gp(e,t,n){return null!=n[t]?n[t]:e.props[t]}function yp(e,t,n){var r=hp(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if(S(a)){var s=i in t,l=i in r,c=t[i],u=S(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&S(c)&&(o[i]=M(a,{onExited:n.bind(null,a),in:c.props.in,exit:gp(a,"exit",e),enter:gp(a,"enter",e)})):o[i]=M(a,{in:!1}):o[i]=M(a,{onExited:n.bind(null,a),in:!0,exit:gp(a,"exit",e),enter:gp(a,"enter",e)})}})),o}var vp=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},bp=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Jl(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Xl(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,hp(n.children,(function(e){return M(e,{onExited:r.bind(null,e),in:!0,appear:gp(e,"appear",n),enter:gp(e,"enter",n),exit:gp(e,"exit",n)})}))):yp(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=hp(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=nl({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=ml(e,["component","childFactory"]),o=this.state.contextValue,i=vp(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?v.createElement(ap.Provider,{value:o},i):v.createElement(ap.Provider,{value:o},v.createElement(t,r,i))},t}(v.Component);bp.propTypes={},bp.defaultProps={component:"div",childFactory:function(e){return e}};var xp=bp;function Sp(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}var Mp=b.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.square,s=void 0!==a&&a,l=e.elevation,c=void 0===l?1:l,u=e.variant,d=void 0===u?"elevation":u,f=hl(e,["classes","className","component","square","elevation","variant"]);return b.createElement(i,nl({className:Hf(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(c)],!s&&n.rounded),ref:t},f))})),Cp=jf((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),nl({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Mp),wp="undefined"==typeof window?b.useEffect:b.useLayoutEffect;function kp(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,o=e.rippleX,i=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=b.useState(!1),f=d[0],p=d[1],m=Hf(t.ripple,t.rippleVisible,r&&t.ripplePulsate),h={width:a,height:a,top:-a/2+i,left:-a/2+o},g=Hf(t.child,f&&t.childLeaving,r&&t.childPulsate),y=Kf(c);return wp((function(){if(!s){p(!0);var e=setTimeout(y,u);return function(){clearTimeout(e)}}}),[y,s,u]),b.createElement("span",{className:m,style:h},b.createElement("span",{className:g}))}var Tp=b.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,o=e.classes,i=e.className,a=hl(e,["center","classes","className"]),s=b.useState([]),l=s[0],c=s[1],u=b.useRef(0),d=b.useRef(null);b.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var f=b.useRef(!1),p=b.useRef(null),m=b.useRef(null),h=b.useRef(null);b.useEffect((function(){return function(){clearTimeout(p.current)}}),[]);var g=b.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,a=e.cb;c((function(e){return[].concat(Dl(e),[b.createElement(kp,{key:u.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),u.current+=1,d.current=a}),[o]),y=b.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=t.pulsate,i=void 0!==o&&o,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&f.current)f.current=!1;else{"touchstart"===e.type&&(f.current=!0);var u,d,y,v=c?null:h.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,M=x.clientY;u=Math.round(S-b.left),d=Math.round(M-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var C=2*Math.max(Math.abs((v?v.clientWidth:0)-u),u)+2,w=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(C,2)+Math.pow(w,2))}e.touches?null===m.current&&(m.current=function(){g({pulsate:i,rippleX:u,rippleY:d,rippleSize:y,cb:n})},p.current=setTimeout((function(){m.current&&(m.current(),m.current=null)}),80)):g({pulsate:i,rippleX:u,rippleY:d,rippleSize:y,cb:n})}}),[r,g]),v=b.useCallback((function(){y({},{pulsate:!0})}),[y]),x=b.useCallback((function(e,t){if(clearTimeout(p.current),"touchend"===e.type&&m.current)return e.persist(),m.current(),m.current=null,void(p.current=setTimeout((function(){x(e,t)})));m.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return b.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:x}}),[v,y,x]),b.createElement("span",nl({className:Hf(o.root,i),ref:h},a),b.createElement(xp,{component:null,exit:!0},l))})),Ep=jf((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(b.memo(Tp)),qp=b.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,o=e.centerRipple,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,f=void 0!==d&&d,p=e.disableRipple,m=void 0!==p&&p,h=e.disableTouchRipple,g=void 0!==h&&h,y=e.focusRipple,v=void 0!==y&&y,x=e.focusVisibleClassName,S=e.onBlur,M=e.onClick,C=e.onFocus,w=e.onFocusVisible,T=e.onKeyDown,E=e.onKeyUp,q=e.onMouseDown,L=e.onMouseLeave,O=e.onMouseUp,N=e.onTouchEnd,D=e.onTouchMove,A=e.onTouchStart,I=e.onDragLeave,R=e.tabIndex,P=void 0===R?0:R,z=e.TouchRippleProps,j=e.type,F=void 0===j?"button":j,_=hl(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),B=b.useRef(null);var H=b.useRef(null),$=b.useState(!1),V=$[0],W=$[1];f&&V&&W(!1);var U=op(),K=U.isFocusVisible,G=U.onBlurVisible,Y=U.ref;function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Kf((function(r){return t&&t(r),!n&&H.current&&H.current[e](r),!0}))}b.useImperativeHandle(n,(function(){return{focusVisible:function(){W(!0),B.current.focus()}}}),[]),b.useEffect((function(){V&&v&&!m&&H.current.pulsate()}),[m,v,V]);var J=X("start",q),Z=X("stop",I),Q=X("stop",O),ee=X("stop",(function(e){V&&e.preventDefault(),L&&L(e)})),te=X("start",A),ne=X("stop",N),re=X("stop",D),oe=X("stop",(function(e){V&&(G(e),W(!1)),S&&S(e)}),!1),ie=Kf((function(e){B.current||(B.current=e.currentTarget),K(e)&&(W(!0),w&&w(e)),C&&C(e)})),ae=function(){var e=k.findDOMNode(B.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},se=b.useRef(!1),le=Kf((function(e){v&&!se.current&&V&&H.current&&" "===e.key&&(se.current=!0,e.persist(),H.current.stop(e,(function(){H.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),T&&T(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!f&&(e.preventDefault(),M&&M(e))})),ce=Kf((function(e){v&&" "===e.key&&H.current&&V&&!e.defaultPrevented&&(se.current=!1,e.persist(),H.current.stop(e,(function(){H.current.pulsate(e)}))),E&&E(e),M&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&M(e)})),ue=u;"button"===ue&&_.href&&(ue="a");var de={};"button"===ue?(de.type=F,de.disabled=f):("a"===ue&&_.href||(de.role="button"),de["aria-disabled"]=f);var fe=Gf(r,t),pe=Gf(Y,B),me=Gf(fe,pe),he=b.useState(!1),ge=he[0],ye=he[1];b.useEffect((function(){ye(!0)}),[]);var ve=ge&&!m&&!f;return b.createElement(ue,nl({className:Hf(s.root,l,V&&[s.focusVisible,x],f&&s.disabled),onBlur:oe,onClick:M,onFocus:ie,onKeyDown:le,onKeyUp:ce,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:me,tabIndex:f?-1:P},de,_),a,ve?b.createElement(Ep,nl({ref:H,center:i},z)):null)})),Lp=jf({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(qp),Op={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Np=b.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,c=e.display,u=void 0===c?"initial":c,d=e.gutterBottom,f=void 0!==d&&d,p=e.noWrap,m=void 0!==p&&p,h=e.paragraph,g=void 0!==h&&h,y=e.variant,v=void 0===y?"body1":y,x=e.variantMapping,S=void 0===x?Op:x,M=hl(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=l||(g?"p":S[v]||Op[v])||"span";return b.createElement(C,nl({className:Hf(o.root,i,"inherit"!==v&&o[v],"initial"!==s&&o["color".concat(Ff(s))],m&&o.noWrap,f&&o.gutterBottom,g&&o.paragraph,"inherit"!==r&&o["align".concat(Ff(r))],"initial"!==u&&o["display".concat(Ff(u))]),ref:t},M))})),Dp=jf((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(Np),Ap=b.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"default":i,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableElevation,f=void 0!==d&&d,p=e.disableFocusRipple,m=void 0!==p&&p,h=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,x=e.size,S=void 0===x?"medium":x,M=e.startIcon,C=e.type,w=void 0===C?"button":C,k=e.variant,T=void 0===k?"text":k,E=hl(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),q=M&&b.createElement("span",{className:Hf(r.startIcon,r["iconSize".concat(Ff(S))])},M),L=h&&b.createElement("span",{className:Hf(r.endIcon,r["iconSize".concat(Ff(S))])},h);return b.createElement(Lp,nl({className:Hf(r.root,r[T],o,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(T).concat(Ff(a))],"medium"!==S&&[r["".concat(T,"Size").concat(Ff(S))],r["size".concat(Ff(S))]],f&&r.disableElevation,u&&r.disabled,v&&r.fullWidth),component:l,disabled:u,focusRipple:!m,focusVisibleClassName:Hf(r.focusVisible,g),ref:t,type:w},E),b.createElement("span",{className:r.label},q,n,L))})),Ip=jf((function(e){return{root:nl({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:pl(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:pl(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:pl(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(pl(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:pl(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(pl(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:pl(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(Ap);var Rp="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,Pp=b.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,i=void 0!==o&&o,a=e.onRendered,s=b.useState(null),l=s[0],c=s[1],u=Gf(b.isValidElement(n)?n.ref:null,t);return Rp((function(){i||c(function(e){return e="function"==typeof e?e():e,k.findDOMNode(e)}(r)||document.body)}),[r,i]),Rp((function(){if(l&&!i)return Wf(t,l),function(){Wf(t,null)}}),[t,l,i]),Rp((function(){a&&(l||i)&&a()}),[a,l,i]),i?b.isValidElement(n)?b.cloneElement(n,{ref:u}):n:l?k.createPortal(n,l):l})),zp=Pp;function jp(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Fp(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function _p(e,t,n){var r=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(Dl(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),i=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===i.indexOf(e.tagName)&&jp(e,r)}))}function Bp(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Hp(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=$f(e);return t.body===e?Vf(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(Fp(i)+a,"px"),n=$f(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(Fp(e)+a,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var $p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Gl(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&jp(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);_p(t,e.mountNode,e.modalRef,r,!0);var o=Bp(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Bp(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Hp(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Bp(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&jp(e.modalRef,!0),_p(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&jp(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Vp(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,i=void 0!==o&&o,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=b.useRef(),f=b.useRef(null),p=b.useRef(null),m=b.useRef(),h=b.useRef(null),g=b.useCallback((function(e){h.current=k.findDOMNode(e)}),[]),y=Gf(t.ref,g),v=b.useRef();return b.useEffect((function(){v.current=u}),[u]),!v.current&&u&&"undefined"!=typeof window&&(m.current=l().activeElement),b.useEffect((function(){if(u){var e=$f(h.current);r||!h.current||h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex",-1),h.current.focus());var t=function(){null!==h.current&&(e.hasFocus()&&!i&&c()&&!d.current?h.current&&!h.current.contains(e.activeElement)&&h.current.focus():d.current=!1)},n=function(t){!i&&c()&&9===t.keyCode&&e.activeElement===h.current&&(d.current=!0,t.shiftKey?p.current.focus():f.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(m.current&&m.current.focus&&m.current.focus(),m.current=null)}}}),[r,i,s,c,u]),b.createElement(b.Fragment,null,b.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelStart"}),b.cloneElement(t,{ref:y}),b.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelEnd"}))}var Wp={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Up=b.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,o=e.open,i=hl(e,["invisible","open"]);return o?b.createElement("div",nl({"aria-hidden":!0,ref:t},i,{style:nl({},Wp.root,r?Wp.invisible:{},i.style)})):null}));var Kp=new $p,Gp=b.forwardRef((function(e,t){var n=zd(),r=Vl({name:"MuiModal",props:nl({},e),theme:n}),o=r.BackdropComponent,i=void 0===o?Up:o,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,c=void 0!==l&&l,u=r.container,d=r.disableAutoFocus,f=void 0!==d&&d,p=r.disableBackdropClick,m=void 0!==p&&p,h=r.disableEnforceFocus,g=void 0!==h&&h,y=r.disableEscapeKeyDown,v=void 0!==y&&y,x=r.disablePortal,S=void 0!==x&&x,M=r.disableRestoreFocus,C=void 0!==M&&M,w=r.disableScrollLock,T=void 0!==w&&w,E=r.hideBackdrop,q=void 0!==E&&E,L=r.keepMounted,O=void 0!==L&&L,N=r.manager,D=void 0===N?Kp:N,A=r.onBackdropClick,I=r.onClose,R=r.onEscapeKeyDown,P=r.onRendered,z=r.open,j=hl(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),F=b.useState(!0),_=F[0],B=F[1],H=b.useRef({}),$=b.useRef(null),V=b.useRef(null),W=Gf(V,t),U=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),K=function(){return $f($.current)},G=function(){return H.current.modalRef=V.current,H.current.mountNode=$.current,H.current},Y=function(){D.mount(G(),{disableScrollLock:T}),V.current.scrollTop=0},X=Kf((function(){var e=function(e){return e="function"==typeof e?e():e,k.findDOMNode(e)}(u)||K().body;D.add(G(),e),V.current&&Y()})),J=b.useCallback((function(){return D.isTopModal(G())}),[D]),Z=Kf((function(e){$.current=e,e&&(P&&P(),z&&J()?Y():jp(V.current,!0))})),Q=b.useCallback((function(){D.remove(G())}),[D]);if(b.useEffect((function(){return function(){Q()}}),[Q]),b.useEffect((function(){z?X():U&&c||Q()}),[z,Q,U,c,X]),!O&&!z&&(!U||_))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Fl}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),U&&(te.onEnter=_f((function(){B(!1)}),s.props.onEnter),te.onExited=_f((function(){B(!0),c&&Q()}),s.props.onExited)),b.createElement(zp,{ref:Z,container:u,disablePortal:S},b.createElement("div",nl({ref:W,onKeyDown:function(e){"Escape"===e.key&&J()&&(R&&R(e),v||(e.stopPropagation(),I&&I(e,"escapeKeyDown")))},role:"presentation"},j,{style:nl({},ee.root,!z&&_?ee.hidden:{},j.style)}),q?null:b.createElement(i,nl({open:z,onClick:function(e){e.target===e.currentTarget&&(A&&A(e),!m&&I&&I(e,"backdropClick"))}},a)),b.createElement(Vp,{disableEnforceFocus:g,disableAutoFocus:f,disableRestoreFocus:C,getDoc:K,isEnabled:J,open:z},b.cloneElement(s,te))))})),Yp=Gp,Xp=b.forwardRef((function(e,t){var n=e.absolute,r=void 0!==n&&n,o=e.classes,i=e.className,a=e.component,s=void 0===a?"hr":a,l=e.flexItem,c=void 0!==l&&l,u=e.light,d=void 0!==u&&u,f=e.orientation,p=void 0===f?"horizontal":f,m=e.role,h=void 0===m?"hr"!==s?"separator":void 0:m,g=e.variant,y=void 0===g?"fullWidth":g,v=hl(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return b.createElement(s,nl({className:Hf(o.root,i,"fullWidth"!==y&&o[y],r&&o.absolute,c&&o.flexItem,d&&o.light,"vertical"===p&&o.vertical),role:h,ref:t},v))})),Jp=jf((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:pl(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(Xp);function Zp(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Qp={entering:{opacity:1,transform:Zp(1)},entered:{opacity:1,transform:"none"}},em=b.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,o=void 0!==r&&r,i=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,c=e.onExit,u=e.onExited,d=e.onExiting,f=e.style,p=e.timeout,m=void 0===p?"auto":p,h=e.TransitionComponent,g=void 0===h?mp:h,y=hl(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=b.useRef(),x=b.useRef(),S=zd()||Pf,M=S.unstable_strictMode&&!o,C=b.useRef(null),w=Gf(n.ref,t),k=Gf(M?C:void 0,w),T=function(e){return function(t,n){if(e){var r=Al(M?[C.current,t]:[t,n],2),o=r[0],i=r[1];void 0===i?e(o):e(o,i)}}},E=T(l),q=T((function(e,t){!function(e){e.scrollTop}(e);var n,r=Sp({style:f,timeout:m},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===m?(n=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=o,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:i}),S.transitions.create("transform",{duration:.666*n,delay:i})].join(","),a&&a(e,t)})),L=T(s),O=T(d),N=T((function(e){var t,n=Sp({style:f,timeout:m},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===m?(t=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=r,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:o}),S.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=Zp(.75),c&&c(e)})),D=T(u);return b.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),b.createElement(g,nl({appear:!0,in:i,nodeRef:M?C:void 0,onEnter:q,onEntered:L,onEntering:E,onExit:N,onExited:D,onExiting:O,addEndListener:function(e,t){var n=M?e:t;"auto"===m&&(v.current=setTimeout(n,x.current||0))},timeout:"auto"===m?null:m},y),(function(e,t){return b.cloneElement(n,nl({style:nl({opacity:0,transform:Zp(.75),visibility:"exited"!==e||i?void 0:"hidden"},Qp[e],f,n.props.style),ref:k},t))}))}));em.muiSupportAuto=!0;var tm=em,nm=b.createContext({}),rm=b.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"ul":i,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,f=hl(e,["children","classes","className","component","dense","disablePadding","subheader"]),p=b.useMemo((function(){return{dense:l}}),[l]);return b.createElement(nm.Provider,{value:p},b.createElement(a,nl({className:Hf(r.root,o,l&&r.dense,!u&&r.padding,d&&r.subheader),ref:t},f),d,n))})),om=jf({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(rm),im="undefined"==typeof window?b.useEffect:b.useLayoutEffect,am=b.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,o=e.autoFocus,i=void 0!==o&&o,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,f=e.ContainerComponent,p=void 0===f?"li":f,m=e.ContainerProps,h=(m=void 0===m?{}:m).className,g=hl(m,["className"]),y=e.dense,v=void 0!==y&&y,x=e.disabled,S=void 0!==x&&x,M=e.disableGutters,C=void 0!==M&&M,w=e.divider,T=void 0!==w&&w,E=e.focusVisibleClassName,q=e.selected,L=void 0!==q&&q,O=hl(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),N=b.useContext(nm),D={dense:v||N.dense||!1,alignItems:r},A=b.useRef(null);im((function(){i&&A.current&&A.current.focus()}),[i]);var I,R,P=b.Children.toArray(l),z=P.length&&(I=P[P.length-1],R=["ListItemSecondaryAction"],b.isValidElement(I)&&-1!==R.indexOf(I.type.muiName)),j=Gf(b.useCallback((function(e){A.current=k.findDOMNode(e)}),[]),t),F=nl({className:Hf(c.root,u,D.dense&&c.dense,!C&&c.gutters,T&&c.divider,S&&c.disabled,s&&c.button,"center"!==r&&c.alignItemsFlexStart,z&&c.secondaryAction,L&&c.selected),disabled:S},O),_=d||"li";return s&&(F.component=d||"div",F.focusVisibleClassName=Hf(c.focusVisible,E),_=Lp),z?(_=F.component||d?_:"div","li"===p&&("li"===_?_="div":"li"===F.component&&(F.component="div")),b.createElement(nm.Provider,{value:D},b.createElement(p,nl({className:Hf(c.container,h),ref:j},g),b.createElement(_,F,P),P.pop()))):b.createElement(nm.Provider,{value:D},b.createElement(_,nl({ref:j},F),P))})),sm=jf((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(am),lm=b.forwardRef((function(e,t){var n=e.classes,r=e.className,o=hl(e,["classes","className"]),i=b.useContext(nm);return b.createElement("div",nl({className:Hf(n.root,r,"flex-start"===i.alignItems&&n.alignItemsFlexStart),ref:t},o))})),cm=jf((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(lm),um=b.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.disableTypography,a=void 0!==i&&i,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,f=e.secondaryTypographyProps,p=hl(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),m=b.useContext(nm).dense,h=null!=c?c:n;null==h||h.type===Dp||a||(h=b.createElement(Dp,nl({variant:m?"body2":"body1",className:r.primary,component:"span",display:"block"},u),h));var g=d;return null==g||g.type===Dp||a||(g=b.createElement(Dp,nl({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},f),g)),b.createElement("div",nl({className:Hf(r.root,o,m&&r.dense,l&&r.inset,h&&g&&r.multiline),ref:t},p),h,g)})),dm=jf({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(um);function fm(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function pm(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function mm(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function hm(e){return"function"==typeof e?e():e}var gm=b.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,o=e.anchorOrigin,i=void 0===o?{vertical:"top",horizontal:"left"}:o,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,f=e.container,p=e.elevation,m=void 0===p?8:p,h=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,x=e.onEntered,S=e.onEntering,M=e.onExit,C=e.onExited,w=e.onExiting,T=e.open,E=e.PaperProps,q=void 0===E?{}:E,L=e.transformOrigin,O=void 0===L?{vertical:"top",horizontal:"left"}:L,N=e.TransitionComponent,D=void 0===N?tm:N,A=e.transitionDuration,I=void 0===A?"auto":A,R=e.TransitionProps,P=void 0===R?{}:R,z=hl(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=b.useRef(),F=b.useCallback((function(e){if("anchorPosition"===l)return a;var t=hm(r),n=(t&&1===t.nodeType?t:$f(j.current).body).getBoundingClientRect(),o=0===e?i.vertical:"center";return{top:n.top+fm(n,o),left:n.left+pm(n,i.horizontal)}}),[r,i.horizontal,i.vertical,a,l]),_=b.useCallback((function(e){var t=0;if(h&&"anchorEl"===l){var n=h(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[i.vertical,l,h]),B=b.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:fm(e,O.vertical)+t,horizontal:pm(e,O.horizontal)}}),[O.horizontal,O.vertical]),H=b.useCallback((function(e){var t=_(e),n={width:e.offsetWidth,height:e.offsetHeight},o=B(n,t);if("none"===l)return{top:null,left:null,transformOrigin:mm(o)};var i=F(t),a=i.top-o.vertical,s=i.left-o.horizontal,c=a+n.height,u=s+n.width,d=Vf(hm(r)),f=d.innerHeight-y,p=d.innerWidth-y;if(a<y){var m=a-y;a-=m,o.vertical+=m}else if(c>f){var h=c-f;a-=h,o.vertical+=h}if(s<y){var g=s-y;s-=g,o.horizontal+=g}else if(u>p){var v=u-p;s-=v,o.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:mm(o)}}),[r,l,F,_,B,y]),$=b.useCallback((function(){var e=j.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]),V=b.useCallback((function(e){j.current=k.findDOMNode(e)}),[]);b.useEffect((function(){T&&$()})),b.useImperativeHandle(n,(function(){return T?{updatePosition:function(){$()}}:null}),[T,$]),b.useEffect((function(){if(T){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,o)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){$()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[T,$]);var W=I;"auto"!==I||D.muiSupportAuto||(W=void 0);var U=f||(r?$f(hm(r)).body:void 0);return b.createElement(Yp,nl({container:U,open:T,ref:t,BackdropProps:{invisible:!0},className:Hf(u.root,d)},z),b.createElement(D,nl({appear:!0,in:T,onEnter:v,onEntered:x,onExit:M,onExited:C,onExiting:w,timeout:W},P,{onEntering:_f((function(e,t){S&&S(e,t),$()}),P.onEntering)}),b.createElement(Cp,nl({elevation:m,ref:V},q,{className:Hf(u.paper,q.className)}),c)))})),ym=jf({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(gm);function vm(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function bm({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:vm(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return v.createElement("i",{style:o},v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},v.createElement("path",{d:e})))}const xm=zf(sm)((()=>({textAlign:"start","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),Sm={menuItem:"alternative-menu-item"},Mm=e=>{const{nested:t,className:n,...r}=e,o=(({nested:e,dir:t})=>Ud((n=>({root:{textAlign:"ltr"===t?"start":"end","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"},...e&&"ltr"===t&&{paddingLeft:n.spacing(4)},...e&&"rtl"===t&&{paddingRight:n.spacing(4)}}}))))(e)();return v.createElement(sm,$s({className:`${o.root} ${n}`},r))},Cm=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${Sm.menuItem}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function wm({title:e,selected:t,onClick:n,nested:r,icon:o,bold:i,dir:a,isCyclicFFEnabled:s}){const l=je.detectTextDirection(e);return!s?v.createElement(xm,{role:"menuitem",button:!0,onClick:n,className:Sm.menuItem,onKeyDown:Cm,autoFocus:t},v.createElement(cm,{style:{minWidth:32}},v.createElement(bm,{d:t?Es.d:""})),v.createElement(dm,{primaryTypographyProps:{dir:l}},e)):v.createElement(Mm,{nested:r,role:"menuitem",button:!0,onClick:n,className:Sm.menuItem,onKeyDown:Cm,dir:a,autoFocus:t},v.createElement(dm,{primary:e,primaryTypographyProps:{dir:l,...i&&{style:{fontWeight:600}}}}),v.createElement(cm,{style:{minWidth:16}},v.createElement(bm,{d:t?Es.d:""})),o&&v.createElement(cm,{style:{minWidth:16}},v.createElement(bm,{d:o.d})))}wm.propTypes={title:Ks.string.isRequired,selected:Ks.bool,onClick:Ks.func.isRequired,nested:Ks.bool,icon:Ks.shape({d:Ks.string.isRequired}),bold:Ks.bool,dir:Ks.string.isRequired,isCyclicFFEnabled:Ks.bool.isRequired},wm.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},Mm.propTypes={nested:Ks.bool,className:Ks.string},Mm.defaultProps={nested:!1,className:Sm.menuItem};const km={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}};function Tm({alignTo:e,currentId:t,dir:n,dock:r,list:o,onClose:i,show:a,instruction:s,isCyclicFFEnabled:l}){const c=l,u=o.map(((e,r)=>{var a;return v.createElement(v.Fragment,{key:e.id},v.createElement(wm,{icon:e.icon,title:e.title,bold:e.groupItem,selected:e.selected,onClick:()=>{e.onSelect&&e.onSelect(t),i(e.id)},dir:n,isCyclicFFEnabled:l}),(null===(a=e.children)||void 0===a?void 0:a.length)>0&&v.createElement(om,{dense:!0,dir:n,component:"div",disablePadding:!0},e.children.map((t=>v.createElement(wm,{key:t.id,nested:!0,title:t.title,selected:t.selected,onClick:()=>{t.onSelect(),i(e.id)},dir:n,isCyclicFFEnabled:l})))),r<o.length-1&&c&&v.createElement(Jp,{key:`divider-${e.id}`}))}));return v.createElement(ym,$s({anchorEl:e,open:a,onClose:i},km[r],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),v.createElement(om,{dense:!0,disablePadding:!0,dir:n,"aria-label":s,component:"nav"},u))}Tm.propTypes={alignTo:Ks.any,currentId:Ks.string.isRequired,dir:Ks.string.isRequired,dock:Ks.string.isRequired,list:Ks.array,onClose:Ks.func.isRequired,show:Ks.bool.isRequired,instruction:Ks.string.isRequired,isCyclicFFEnabled:Ks.bool.isRequired},Tm.defaultProps={list:[],alignTo:null};const Em="title-button",qm="active-title-button",Lm=zf((({children:e,...t})=>v.createElement(Ip,$s({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),Om=zf(Ip)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class Nm extends v.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasPopoverOptions:!1,disableCyclicButton:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.alignToRef=v.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:r}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&(n||r)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r,showGroupDimOptions:o}=this.props;n&&(r||o)&&n.getPopoverOptions().then((e=>{t.hasPopoverOptions!==(0!==e.length)&&this.setState({hasPopoverOptions:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${Em}`);t&&t.classList.add(qm)}this.props.popover.getPopoverOptions().then((e=>{this.setState({open:!0,list:e})}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${Em}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${qm}`);e&&(e.classList.remove(qm),setTimeout((()=>{e.focus()}),50))}}render(){const{titleData:e,popover:t,translator:n,disabled:r,isDimension:o,padding:i,minWidth:a,hasAlternative:s,supportConditional:l,showGroupDimOptions:c}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,f=r||Boolean(!e.drillUp)||this.state.inSelection,p=e.breadcrumbs.map(((t,n)=>v.createElement(Lm,{style:{display:"flex",alignItems:"center",color:f&&"rgba(89, 89, 89, 0.8)",pointerEvents:f?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>f?void 0:e.drillUp(d-n),title:t},v.createElement("span",{style:u},t),v.createElement(bm,$s({},Ls,{size:"small",style:{margin:"0 8px"}}))))),m=l||c?this.state.hasPopoverOptions:s,h=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||r||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",...i?{padding:i}:{paddingTop:0,paddingBottom:0},...a&&{minWidth:a}};this.state.open&&(y.background="rgba(0,0,0,0.08)");const b=()=>{this.setState({disableCyclicButton:!0})},x=je.detectTextDirection(e.text),S=v.createElement(Lm,{"aria-label":n.get(`Accessibility.${t&&m?"Alternative":"Normal"}.Instructions`,[e.text]),style:y,onClick:g?void 0:h,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${Em} ${e.id}`,"data-id":e.id},e.locked&&v.createElement(bm,$s({},Ts,{size:"small",title:n.get("Tooltip.selections.locked")})),v.createElement("span",{style:u,dir:x},e.text),t&&m&&v.createElement(bm,$s({},qs,{size:"small",style:{margin:"0 8px"}})));return v.createElement(v.Fragment,null,e.icon&&e.icon.onClick&&v.createElement(Om,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:r?void 0:()=>e.icon.onClick({onError:b})},v.createElement(bm,$s({},e.icon.path,{size:"small",title:n.get(e.icon.tooltip)}))),e.icon&&!e.icon.onClick&&v.createElement(bm,$s({},e.icon.path,{size:"small",title:n.get(e.icon.tooltip),style:{margin:"0 4px 0 0"}})),p,v.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:m?"auto":"none",height:"100%"}},S),t&&m&&v.createElement(Tm,{dock:t.dock,dir:t.dir,currentId:e.id,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.list,onClose:this.closePopover,changeTo:this.changeTo,instruction:n.get("Accessibility.Popover.Instructions"),isCyclicFFEnabled:this.props.isCyclicFFEnabled}))}}function Dm(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}Nm.propTypes={disabled:Ks.bool.isRequired,padding:Ks.string,minWidth:Ks.string,titleData:Ks.shape({breadcrumbs:Ks.arrayOf(Ks.string).isRequired,icon:Ks.shape({path:Ks.shape({d:Ks.string.isRequired}),tooltip:Ks.string.isRequired,onClick:Ks.func}),index:Ks.number.isRequired,locked:Ks.bool.isRequired,text:Ks.string.isRequired,popoverText:Ks.string.isRequired,drillUp:Ks.func,id:Ks.string.isRequired}).isRequired,popover:Ks.shape({dir:Ks.string.isRequired,dock:Ks.string.isRequired,getPopoverOptions:Ks.func.isRequired}),translator:Ks.shape({get:Ks.func.isRequired}).isRequired,selections:Ks.shape({isActive:Ks.func,addListener:Ks.func,removeListener:Ks.func}),style:Ks.shape({fontSize:Ks.string,color:Ks.string,fontFamily:Ks.string}).isRequired,isDimension:Ks.bool.isRequired,hasAlternative:Ks.bool.isRequired,supportConditional:Ks.bool.isRequired,isCyclicFFEnabled:Ks.bool.isRequired,showGroupDimOptions:Ks.bool.isRequired},Nm.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const Am=_l({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const Im=$l({productionPrefix:"q15a3",disableGlobal:!0,seed:""});var Rm={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Pm}=Rm;function zm({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Pm}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:jm}=Rm,Fm=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=jm}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!zm({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:_m}=Rm,{MAX_NUM_POINTS:Bm,DEFAULT_NUM_POINTS:Hm,DEFAULT_NUM_LINES:$m}=Rm,{DEFAULT_NUM_POINTS:Vm}=Rm,Wm=({layoutService:e,largeDataService:t})=>{if(!zm({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Vm}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:o=$m,maxNumPoints:i=Hm,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Fm({layoutService:e,largeDataService:t})*r[0]<=i)return r[0];const s=Math.max(1,Math.min(o,r[1])),l=i/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>$m||i>Hm)?Math.min(c,Math.ceil(Bm/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=_m}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},o=4+2*(r-1);return Math.floor(n/(r*o))})({layoutService:e,largeDataService:t})},Um=({start:e,end:t,model:n,layoutService:r,largeDataService:o,definitionPath:i})=>{const a={qStart:e,qEnd:t,qNbrPoints:Wm({layoutService:r,largeDataService:o}),qMaxNbrTicks:300,qMaxNumberLines:Fm({layoutService:r,largeDataService:o})};return n.getHyperCubeContinuousData(i,a,!1)};function Km({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>zm({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Wm({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Fm({layoutService:t,largeDataService:n}),fetch:(o,i)=>Um({start:o,end:i,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Gm(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Ym({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,o=r+t;return 1===t&&0===e&&(r=n-.5,o=n+.5),{zoom:{min:r,max:o}}}(n,t.get("continuousMin"))}}}function Xm(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const o=t.indexOf(e);o>-1&&t.splice(o,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function Jm(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],o=Xm(),i=Xm();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?o.set(l,s):s[0].qNum>t&&(i.has(l)||i.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o.forEach(((e,t)=>r.splice(t,0,e))),i.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let o,i;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?o=s:s[0].qNum>t&&(i||(i=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o&&r.unshift(o),i&&r.push(i),r}({start:e,end:t,matrix:n})}function Zm(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Qm(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Jm(e,t,n.qMatrix),o=Zm(n.qArea,r);return{...n,qArea:o,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const eh=2**.5,th=1/eh,nh=1e-6,rh=th**44;function oh(e){return e.qIsOtherCell}function ih({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(oh)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(oh)||t++})),t}(n)}const ah={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var sh={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],o=t[e+1];r.data={},o||1===r.end?o?(r.data.start=r.value,r.data.end=o.value,r.end=o.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};const lh="…";function ch(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function uh(e,t){const{localProps:{size:n},props:{anchor:r}}=t,o=function({props:e,localProps:{size:t},style:n,renderer:r}){const o=e.label.padding,i=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*o,1===e.end&&(u-=d));const f={x:u+o,y:o,width:d-2*o,height:t.height-2*o},p=s(`${l[0]}${lh}`).width,m=Math.max(0,f.width-c.width),h=Math.max(0,f.height-c.height),g=i*m,y=a*h;return{show:f.width>=Math.min(p,c.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:u+g,width:c.width+2*o},tickValue:e.value}}}}(t),i=function({localProps:{size:e},style:t,scale:n,props:r}){const[o,i]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=ch(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=i,x1:l,y1:0,x2:l,y2:ch(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:o.resolve(e,t),guideLine:i.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],o=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(i=n.segment,a=o.segment,!(i.x<a.x?i.x+i.width>=a.x:a.x+a.width>=i.x))}var i,a}(e,a),a}function dh(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const o=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),i=ch(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:ch(o,n.minorGuideLine.strokeWidth),x2:i,y2:ch(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function fh(e){return e.filter((e=>e.show)).map((e=>ue({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var ph={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=ch(1,t.line.strokeWidth);return{show:n.line.show,x1:ch(0,t.line.strokeWidth),y1:r,x2:ch(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=uh(n,this),this.state.minor=dh(r,this)},render(){return[...fh([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>ue({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...fh(this.state.major.map((e=>e.guideLine))),...fh(this.state.minor.map((e=>e.guideLine)))];var e}};function mh(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function hh(e){return e.qTags.indexOf("$qualified")>-1}function gh({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const o=r+1,i=e[r],a=e[o];mh(i,a)?(hh(a)?(t.push(o),n.push(r)):(t.push(r),n.push(o)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function yh({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,o=NaN,i=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(o=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){i="auto",s=!0;break}if(e&&e.queries.inner(n)){i=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(o)&&Number.isNaN(i)&&"auto"!==i){i=o,o=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(o)&&(o="auto",i="auto");return{outer:o,inner:i,minor:a,isDayOrShorter:s}}}}const vh=16;function bh({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const o=n;return{isDayOrShorter:()=>(o.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,o.isDayOrShorter),count:()=>e.length,maxRange:()=>(o.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,o.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),o.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+vh}))),r.clamp(n),o.rangeAndWidth}}}const xh=6;function Sh({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=xh,canFitHalfDayTicks:n=>n>=t*e.count()}}function Mh({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:o,scale:i},{attributesFactory:a=bh,queryFactory:s=Sh}={attributesFactory:bh,queryFactory:Sh}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:i});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:o})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function Ch({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:o},{metaFactory:i=Mh,mapper:a=gh,resolver:s=yh}={metaFactory:Mh,mapper:gh,resolver:yh}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=i({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:o}),f=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const o=f.resolve(t);return n.set(r,o),o}}}const wh=86400,kh=864e5;function Th(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(kh*(e-Math.floor(e)))))}const Eh=Th(0).getTime();function qh(e){return(e.getTime()-Eh)/wh/1e3}const Lh=new Date,Oh=new Date;function Nh(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>Nh((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(Lh.setTime(+t),Oh.setTime(+r),e(Lh),e(Oh),Math.floor(n(Lh,Oh))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const Dh=1e3,Ah=6e4,Ih=36e5,Rh=864e5,Ph=6048e5,zh=Nh((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*Dh)}),((e,t)=>(t-e)/Dh),(e=>e.getUTCSeconds()));zh.range;const jh=Nh((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dh)}),((e,t)=>{e.setTime(+e+t*Ah)}),((e,t)=>(t-e)/Ah),(e=>e.getMinutes()));jh.range;const Fh=Nh((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Ah)}),((e,t)=>(t-e)/Ah),(e=>e.getUTCMinutes()));Fh.range;const _h=Nh((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dh-e.getMinutes()*Ah)}),((e,t)=>{e.setTime(+e+t*Ih)}),((e,t)=>(t-e)/Ih),(e=>e.getHours()));_h.range;const Bh=Nh((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*Ih)}),((e,t)=>(t-e)/Ih),(e=>e.getUTCHours()));Bh.range;const Hh=Nh((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ah)/Rh),(e=>e.getDate()-1));Hh.range;const $h=Nh((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Rh),(e=>e.getUTCDate()-1));$h.range;const Vh=Nh((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Rh),(e=>Math.floor(e/Rh)));function Wh(e){return Nh((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ah)/Ph))}Vh.range;const Uh=Wh(0),Kh=Wh(1),Gh=Wh(2),Yh=Wh(3),Xh=Wh(4),Jh=Wh(5),Zh=Wh(6);function Qh(e){return Nh((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/Ph))}Uh.range,Kh.range,Gh.range,Yh.range,Xh.range,Jh.range,Zh.range;const eg=Qh(0),tg=Qh(1),ng=Qh(2),rg=Qh(3),og=Qh(4),ig=Qh(5),ag=Qh(6);eg.range,tg.range,ng.range,rg.range,og.range,ig.range,ag.range;const sg=Nh((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));sg.range;const lg=Nh((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));lg.range;const cg=Nh((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));cg.every=e=>isFinite(e=Math.floor(e))&&e>0?Nh((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,cg.range;const ug=Nh((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));ug.every=e=>isFinite(e=Math.floor(e))&&e>0?Nh((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,ug.range;const dg={second:1,minute:2,hour:3,day:4,month:5,year:6};function fg({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:o,timeOnly:i,initialMin:a}){const[s,l]=e.domain(),c=o.key({distance:n});let u;o.get(c,1)?u=o.get(c,1):(u=function(e,t,n,r,o,i){function a(e){return ug.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=zh.count(e,t),l=Fh.count(e,t),c=Bh.count(e,t),u=$h.count(e,t),d=eg.count(e,t),f=lg.count(e,t),p=ug.count(e,t),m=n/r.second.width-1,h=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:p,interval:ug.every(1),formatter:r.year.formatter,offset:e=>ug.offset(e,-1),floor:ug.floor};if(s<=m)v.type=dg.second,v.desc="second",v.count=s,v.interval=zh.every(1),v.formatter=r.second.formatter,v.offset=e=>zh.offset(e,-1),v.floor=zh.floor;else if(s/2<=m)v.type=dg.second,v.desc="every other second",v.count=s/2,v.interval=zh.every(2),v.formatter=r.second.formatter,v.offset=e=>zh.offset(e,-2),v.floor=zh.floor;else if(s/5<=m)v.type=dg.second,v.desc="every 5 second",v.count=s/5,v.interval=zh.every(5),v.formatter=r.second.formatter,v.offset=e=>zh.offset(e,-5),v.floor=zh.floor;else if(s/15<=m)v.type=dg.second,v.desc="every 15 second",v.count=s/15,v.interval=zh.every(15),v.formatter=r.second.formatter,v.offset=e=>zh.offset(e,-15),v.floor=zh.floor;else if(s/30<=m)v.type=dg.second,v.desc="every 30 second",v.count=s/30,v.interval=zh.every(30),v.formatter=r.second.formatter,v.offset=e=>zh.offset(e,-30),v.floor=zh.floor;else if(l<=h)v.type=dg.minute,v.desc="minute",v.count=l,v.interval=Fh.every(1),v.formatter=r.minute.formatter,v.offset=e=>Fh.offset(e,-1),v.floor=Fh.floor;else if(l/2<=h)v.type=dg.minute,v.desc="every 2 minute",v.count=l/2,v.interval=Fh.every(2),v.formatter=r.minute.formatter,v.offset=e=>Fh.offset(e,-2),v.floor=Fh.floor;else if(l/5<=h)v.type=dg.minute,v.desc="every 5 minute",v.count=l/5,v.interval=Fh.every(5),v.formatter=r.minute.formatter,v.offset=e=>Fh.offset(e,-5),v.floor=Fh.floor;else if(l/10<=h)v.type=dg.minute,v.desc="every 10 minute",v.count=l/10,v.interval=Fh.every(10),v.formatter=r.minute.formatter,v.offset=e=>Fh.offset(e,-10),v.floor=Fh.floor;else if(l/15<=h)v.type=dg.minute,v.desc="every 15 minute",v.count=l/15,v.interval=Fh.every(15),v.formatter=r.minute.formatter,v.offset=e=>Fh.offset(e,-15),v.floor=Fh.floor;else if(l/30<=h)v.type=dg.minute,v.desc="every 30 minute",v.count=l/30,v.interval=Fh.every(30),v.formatter=r.minute.formatter,v.offset=e=>Fh.offset(e,-30),v.floor=Fh.floor;else if(c<=h)v.type=dg.hour,v.desc="hour",v.count=c,v.interval=Bh.every(1),v.formatter=r.minute.formatter,v.offset=e=>Bh.offset(e,-1),v.floor=Bh.floor;else if(c/2<=h)v.type=dg.hour,v.desc="every 2 hour",v.count=c/2,v.interval=Bh.every(2),v.formatter=r.minute.formatter,v.offset=e=>Bh.offset(e,-2),v.floor=Bh.floor;else if(c/3<=h)v.type=dg.hour,v.desc="every 3 hour",v.count=c/3,v.interval=Bh.every(3),v.formatter=r.minute.formatter,v.offset=e=>Bh.offset(e,-3),v.floor=Bh.floor;else if(c/6<=h)v.type=dg.hour,v.desc="every 6 hour",v.count=c/6,v.interval=Bh.every(6),v.formatter=r.minute.formatter,v.offset=e=>Bh.offset(e,-6),v.floor=Bh.floor;else if(c/12<=h||o)v.type=dg.hour,v.desc="every 12 hour",v.count=c/12,v.interval=Bh.every(12),v.formatter=r.minute.formatter,v.offset=e=>Bh.offset(e,-12),v.floor=Bh.floor;else if(u<=g)v.type=dg.day,v.desc="day",v.count=u,v.interval=$h.every(1),v.formatter=r.date.formatter,v.offset=e=>$h.offset(e,-1),v.floor=$h.floor;else if(u/2<=g)v.type=dg.day,v.desc="every 2 day",v.count=u/2,v.interval=$h.every(2),v.formatter=r.date.formatter,v.offset=e=>$h.offset(e,-2),v.floor=$h.floor;else if(u/3<=g)v.type=dg.day,v.desc="every 3 day",v.count=u/3,v.interval=$h.every(3),v.formatter=r.date.formatter,v.offset=e=>$h.offset(e,-3),v.floor=$h.floor;else if(d<=g)v.type=dg.day,v.desc="week",v.count=d,v.interval=eg.every(1),v.formatter=r.date.formatter,v.offset=e=>eg.offset(e,-1),v.floor=$h.floor;else if(d/2<=g)v.type=dg.day,v.desc="every 2 week",v.count=d/2,v.interval=eg.every(2),v.formatter=r.date.formatter,v.offset=e=>eg.offset(e,-2),v.floor=$h.floor;else if(f<=g)v.type=dg.month,v.desc="month",v.count=f,v.interval=lg.every(1),v.formatter=r.date.formatter,v.offset=e=>lg.offset(e,-1),v.floor=$h.floor;else if(f/3<=g)v.type=dg.month,v.desc="quarter",v.count=f/3,v.interval=lg.every(3),v.formatter=r.date.formatter,v.offset=e=>lg.offset(e,-3),v.floor=$h.floor;else if(f/6<=g)v.type=dg.month,v.desc="half year",v.count=f/6,v.interval=lg.every(6),v.formatter=r.date.formatter,v.offset=e=>lg.offset(e,-6),v.floor=$h.floor;else if(p<=y)v.type=dg.year,v.desc="year",v.count=p,v.interval=ug.every(1),v.formatter=r.year.formatter,v.offset=e=>ug.offset(e,-1),v.floor=ug.floor;else if(p/2<=y)v.type=dg.year,v.desc="every 2 year",v.count=p/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>ug.offset(e,-2),v.floor=ug.floor;else if(p/5<=y)v.type=dg.year,v.desc="every 5 year",v.count=p/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>ug.offset(e,-5),v.floor=ug.floor;else if(p/10<=y)v.type=dg.year,v.desc="every 10 year",v.count=p/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>ug.offset(e,-10),v.floor=ug.floor;else{const e=Math.floor(p/y);v.type=dg.year,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>ug.offset(t,-e),v.floor=ug.floor}return v}(s,l,n,t.all(),r,a),o.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const f=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}}));let p=[];if(!i&&u.type<=dg.hour){const n=t.getFormat("date"),r=e.ticks($h.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift($h.offset(r[0],-1)),p=(r.length?r:[$h.floor(s)]).map(((e,t,r)=>{const o=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:n.formatter}}))}return{inner:f,outer:p}}const pg=86400,mg=1440,hg={};function gg(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function yg(e,t,n){const{generator:r,anchor:o,clamp:i,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(i);const[l,c]=e.domain(),u=ea().domain([Th(l),Th(c)]);u.clamp(i),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,o)=>fg({timeScale:u,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:Th(r.initialMin)}):e=>function(e,t,n,r,o,i=!1){if(hg[[t,n,r,r,i]])return hg[[t,n,r,r,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Th(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,f=t/(o-r),p=f/1440,m=f/pg,h=366*f,g=3*f*30,y=a.second.width/m,v=a.minute.width/p,b=a.date.width/g,x=a.year.width/h;let S,M,C,w=0,k=0,T=null,E=null,q=null,L=null,O=null,N=null;const D={outer:[],inner:[]};for(y<1?(T=1,k=1/pg):y<2?(T=2,k=1/pg*2):y<5?(T=5,k=1/pg*5):y<10?(T=10,k=1/pg*10):y<30?(T=30,k=1/pg*30):v<1?(E=1,k=1/mg):v<2?(E=2,k=1/mg*2):v<5?(E=5,k=1/mg*5):v<10?(E=10,k=1/mg*10):v<30?(E=30,k=1/mg*30):v<60?(q=1,k=1/24):v<120?(q=2,k=2/24):v<360?(q=6,k=.25):v<720?(q=12,k=.5):b<1/90?(k=1,L=1):b<2/90?(k=2,L=2):b<7/90?(k=7,L=7):b<31/90?(O=1,k=31):b<1?(O=3,k=90):x<1?(N=1,k=366):x<2?(N=2,k=732):x<5?(N=5,k=1826.25):(N=10,k=3652.5),M=Math.floor((d+n%1)/k);w<o;){C=M+1,S=N?gg("year",[l+M*N,0,1],[l+C*N,0,1],a.year.formatter):O?gg("month",[l,c+M*O,1],[l,c+C*O,1],a.date.formatter):L?gg("day",[l,c,u+M*L],[l,c,u+C*L],a.date.formatter):q?gg("hour",[l,c,u,0+M*q],[l,c,u,0+C*q],a.minute.formatter):E?gg("minute",[l,c,u,0,0+M*E],[l,c,u,0,0+C*E],a.minute.formatter):gg("second",[l,c,u,0,0,0+M*T],[l,c,u,0,0,0+C*T],a.second.formatter),w=qh(S.start),D.inner.push(S);const e=Math.floor(w);if(!(i||N||O||L)){const t={type:"day",start:Th(e),end:Th(e+1),formatter:a.date.formatter,qStart:e};D.outer[D.outer.length-1]&&D.outer[D.outer.length-1].qStart===t.qStart||D.outer.push(t)}M++}return D.min=r,D.max=o,hg[[t,n,r,r,i]]=D,D}(n,e,d.min,l,c,"T"===s.qType);const p={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;const i=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(i),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>f(t,n)[a].map((t=>{let n;return n="start"===o?qh(t.start):"end"===o?qh(t.end):(qh(t.start)+qh(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:qh(t.start),end:qh(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return p}const vg=41000.2343433,bg=/t+/i,xg=16,Sg=60;const Mg={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function Cg(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const wg="continuousPan";var kg={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=ah,viewCache:o,viewState:i,definitionPath:a},s={}){const{engineFetcherFactory:l=Km,snapshotFetcherFactory:c=Ym,cacheFetcherFactory:u=Gm,cache:d={initial:{},merged:{}}}=s,f=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),p=c({layoutService:t,viewCache:o}),m=u({cache:d}),h=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,r;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),o.set("continuousMin",y),o.set("continuousMax",v),o.set("minimiumZoomSpan",(n=y,r=v,Math.max(nh,(r-n)*rh))),g=t.meta.isSnapshot?p:f,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=p.getSnapshotData()),i.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Zm(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Qm(y,v,e))).then((e=>this.updateLayout(e))).catch(h)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,o=[],i=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?o.push(e[t]):a.qNum>r&&i.push(e[t])}return[...o,...t,...i]}(e.qMatrix,t.qDataPages[n].qMatrix),o=Zm(e.qArea,r);return{...e,qArea:o,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),o=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,i=e.qAxis.length;t<i;t++){const i=e.qAxis[t],a=n.indexOf(i.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=i.qTicks.length;n<r;n++){const r=i.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}o[a].qTicks=[...s,...o[a].qTicks,...l]}}return{qAxis:o}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Qm(e,t,n))).catch(h),fetchFromCache:(e,t)=>m.fetch(e,t).then((n=>Qm(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return ue({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return ue({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>ih(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function o(e,n,o){return r[e](n,o).then((e=>(r.updateLayout(e),t(),e)))}const i=a(((e,t)=>o("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):o("fetchFromCache",e,t).then((n=>(i(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(o,i)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(o.max-o.min)<r?i:{min:Math.min(o.max,Math.max(t,o.min)),max:Math.max(o.min,Math.min(n,o.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:o=!1,targetKey:i}){const a=e.get("continuousMin"),l=e.get("continuousMax");return s(((e,r)=>{const s=(e=>n.componentsFromPoint(e).filter((e=>e.key===i))[0])(e);if(s){const i=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,s),c=o?1-i:i,{min:u,max:d}=t.get("zoom"),f=Math.abs(d-u),p=f-(r>0?th:eh)*f,m=u+p*c,h=d-p*(1-c),g=m<a?a-m:0,y=h>l?h-l:0;t.set("zoom",{min:Math.max(m-y,a),max:Math.min(h+g,l)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o}){return{type:"Pan",key:"continuous:pan",options:{event:wg,pointers:1,threshold:10,enable(r,o){return this.started===wg||!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))}},events:{[`${wg}start`](n){n.preventDefault(),this.started=wg;const{min:o,max:i}=r.get("zoom");this[wg]={min:o,max:i,size:t.component(e).rect.computedInner.width,span:i-o}},[`${wg}move`](e){e.preventDefault();const{span:t,min:n,max:i,size:a}=this[wg],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,o.get("continuousMax")-t),max:Math.max(i+s*t,o.get("continuousMin")+t)})},[`${wg}end`](e){e.preventDefault(),this.started=!1},[`${wg}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:sh,timeAxis:ph},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((o=>{const i=e[o],a=typeof i;"function"===a?r[o]=i(n):"object"!==a||Array.isArray(i)?r[o]="undefined"===a?t[o]:i:r[o]=ue(!0,{},t[o],i)})),r}(t,Mg,n),{qAxis:i}=r,a=$r(),s={instance:null,invert:!1},{min:l,max:c}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let u,d,f=[];const p=function(e){return Number.isNaN(+e)?NaN:a(e)};p.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(f=d.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=d.transform(i[n.minor].qTicks,{isMinor:!0});f=f.concat(e)}return"auto"===o&&(f=d.generate(e,n.isDayOrShorter)),f},p.invert=e=>a.invert(e),p.domain=e=>Array.isArray(e)?a.domain(e):a.domain(),p.range=e=>Array.isArray(e)?a.range(e):a.range(),p.norm=e=>(Cg(s,p),s.instance(e)),p.normInvert=e=>(Cg(s,p),s.instance.invert(e)),p.copy=()=>e(t,n),p.clamp=(e=!0)=>(a.clamp(e),a.clamp()),p.min=()=>Math.min(l,c),p.max=()=>Math.max(l,c),a.range(r.invert?[1,0]:[0,1]),a.domain([l,c]),s.invert=r.invert;const m=function(e){const t={},{measureText:n,fn:r,localeInfo:o}=e.formatter,i={second:{type:"second",pattern:"hh:mm:ss",width:Sg,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:Sg,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:Sg,formatter:void 0},year:{type:"year",pattern:"YYYY",width:Sg,formatter:void 0}};return o&&bg.test(o.qTimestampFmt)&&(i.minute.pattern+=" tt",i.second.pattern+=" tt"),i.date.pattern=o&&o.qDateFmt?o.qDateFmt:i.date.pattern,Object.keys(i).forEach((e=>{i[e].formatter=r(i[e].pattern),i[e].width=Math.max(i[e].width,n(i[e].formatter(vg)).width+xg)})),t.getFormat=e=>i[e],t.all=()=>i,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return i.date;const r=Th(t[0].data.start),o=Th(t[n-1].data.start);return $h.count(r,o)/n>=1?i.date:Bh.count(r,o)/n>0?i.minute:Fh.count(r,o)/n>0?i.second:i.date},t}(r);return d=yg(a.copy(),r,m),u=Ch({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*m.getFormat("minute").width,cache:r.cache,scale:p}),p.data=()=>({fields:[{formatter:p.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:o(n,"fields.0.raw",(()=>({})))}]}),p.formatter=()=>m.getFormatFromTicks(f).formatter,p}}};const Tg={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Eg={OPTIONS:Tg,DEFAULT:Tg.MINI_CHART};function qg({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:o,minThumbSize:i})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===o,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<i){const e=(i-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=i}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function Lg({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Og=e=>({miniChart:e===Eg.OPTIONS.MINI_CHART.value,bar:e===Eg.OPTIONS.BAR.value,none:e===Eg.OPTIONS.NONE.value}),Ng=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Og(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Og(Eg.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Og(!n&&(r||!r&&o)?Eg.OPTIONS.NONE.value:Eg.OPTIONS.MINI_CHART.value)};function Dg({layoutService:e,override:t}){const n=Ng({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Eg.OPTIONS.MINI_CHART.value,n.bar=t.value===Eg.OPTIONS.BAR.value,n.none=t.value===Eg.OPTIONS.NONE.value),n}function Ag({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:o,viewCache:i,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=Dg({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,p={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Lg({layoutService:e,viewState:o,viewCache:i})}};d.bar&&(p.settings.style="slim",p.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(p.settings.size.thumb={min:4}));const m=a.getStyles();return m.color&&(p.style={standard:{thumb:{"border-color":m.color,opacity:.4},before:{background:m.color,opacity:.1},after:{background:m.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(p.settings.injections=()=>[qg({layoutService:e,discrete:n})]),p}function Ig({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===i.meta.major.orientation,p=f?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,m=f?d.rect.computedInner.width:d.rect.computedInner.height,h=f&&a?m-p:p,g=Math.max(0,Math.min(h/m,1)),[y,v]=Lg({layoutService:o,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:h,relative:g,thumb:S?h-y*m:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Rg({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i}){return()=>{const a=t.component(e),{orientation:s}=i.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,f]=Lg({layoutService:o,viewState:n,viewCache:r});return{size:u,thumbSize:(f-d)*u}}}function Pg({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ig({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Rg({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,i-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const zg="data-scrollbar-handle";function jg({e:e}){return(e.srcEvent||e).srcElement.getAttribute(zg)||""}const Fg="scrollbarResize",_g=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Bg({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s}){const l=Ig({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:`event:${Fg}`,options:{event:Fg,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Fg]=this[Fg]||{},_g(t)&&jg({e:t})&&(this[Fg].panningEvent=t.srcEvent),!!this[Fg].panningEvent))}},events:{[`${Fg}start`](n){n.preventDefault(),this[Fg]=this[Fg]||{},this[Fg].panningEvent&&t.component(e).emit("dragStart",this[Fg].panningEvent)},[`${Fg}move`](n){if(n.preventDefault(),this[Fg]=this[Fg]||{},!this[Fg].panningEvent)return;const i=r.get("zoom"),a=o.get("continuousMin"),s=o.get("continuousMax"),c=o.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=jg({e:this[Fg].panningEvent});let f="start"===d?Math.min(u,i.max):i.min,p="end"===d?Math.max(u,i.min):i.max;f===p&&(f-="start"===d?c:0,p+="end"===d?c:0),r.set("zoom",{min:f,max:p}),t.component(e).emit("render")},[`${Fg}end`](n){n.preventDefault(),this[Fg]=this[Fg]||{},delete this[Fg].panningEvent,t.component(e).emit("dragEnd")},[`${Fg}cancel`](n){n.preventDefault(),this[Fg]=this[Fg]||{},delete this[Fg].panningEvent,t.component(e).emit("dragEnd")}}}}const Hg="scrollbarPan";function $g({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ig({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Rg({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Pan",key:`event:${Hg}`,options:{event:Hg,threshold:0,enable(r,o){return this[Hg]=this[Hg]||{},!(o&&!this[Hg].isPanning)||!!n.scroll.enabled()&&((!o||o.target===t.element)&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e)))}},events:{[`${Hg}start`](n){n.preventDefault();const a=c(n);if(this[Hg]=this[Hg]||{},this[Hg].isPanning=!0,t.component(e).emit("lockState"),i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,i-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,i-t),max:Math.max(s,n+t)}),this[Hg].relative=a.relative,this[Hg].zoom=r.get("zoom"),this[Hg].zoom.span=this[Hg].zoom.max-this[Hg].zoom.min,this[Hg].zoom.fullSpan=i-n}else if(a.onThumb)this[Hg].offset=a.thumb;else{const e=u();this[Hg].offset=a.beforeThumb?0:e.thumbSize}},[`${Hg}move`](n){n.preventDefault();const a=c(n);if(this[Hg]=this[Hg]||{},i.meta.isContinuous){const e=a.relative-this[Hg].relative,{fullSpan:t,span:n,min:i,max:s}=this[Hg].zoom,l=o.get("continuousMin"),c=o.get("continuousMax");r.set("zoom",{min:Math.min(i+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Hg].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Hg}end`](n){n.preventDefault(),this[Hg]=this[Hg]||{},this[Hg].isPanning=!1,t.component(e).emit("unlockState")},[`${Hg}cancel`](n){n.preventDefault(),this[Hg]=this[Hg]||{},this[Hg].isPanning=!1,t.component(e).emit("unlockState")}}}}function Vg({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return[Pg({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}),Bg({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),$g({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})]}function Wg({componentKey:e,chart:t,actions:n,layoutService:r}){const o=(o,i)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(o,i)};return{type:"native",events:{mousemove:e=>o("hover",e),mouseleave:()=>o("leave")}}}function Ug({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...Vg({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})],native:Wg({componentKey:e,chart:t,actions:n,layoutService:i})}}const Kg={background:"rgba(0, 0, 0, 0.1)"},Gg={top:-1,bottom:-1,width:6},Yg={width:2,background:"#595959"};var Xg={before:Kg,after:Kg,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Gg,endHandle:Gg,startHandleBorder:Yg,endHandleBorder:Yg};const Jg={background:"rgba(0, 0, 0, 0.1)"},Zg={top:-1,bottom:-1,width:6},Qg={width:2,background:"#595959"};var ey={before:Jg,after:Jg,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Zg,endHandle:Zg,startHandleBorder:Qg,endHandleBorder:Qg};const ty={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},ny={pointerEvents:"initial"},ry={pointerEvents:"none"};const oy="ew-resize",iy="default";function ay(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,o=t.range(),i=n&&t.rtl;return{size:r,start:(i?1-o[1]:o[0])*r,end:(i?1-o[0]:o[1])*r}}function sy(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?oy:iy}function ly(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const o=(r-(n-t))/2,i=Math.max(0,0-(t-o))-Math.max(0,n+o-e);return{size:e,start:t-o+i,end:n+o+i}}return{size:e,start:t,end:n}}function cy(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function uy(){const{size:e,start:t,end:n}=ay.call(this);this.renderer.render(this.elements(this.h,ly.call(this,e,t,n)))}function dy(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?ey:Xg;return{container:{...ty},before:{...ty,...n.before,...t.before},after:{...ty,...n.after,...t.after},thumb:{...ty,...n.thumb,...t.thumb},startHandle:{...ty,...ny,...n.startHandle},endHandle:{...ty,...ny,...n.endHandle},startHandleBorder:{...ty,...ry,...n.startHandleBorder},endHandleBorder:{...ty,...ry,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var fy={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){uy.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!cy.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=jg({e:e});t&&(this.state.hover[t]=!0),sy.call(this),uy.call(this)},leave(){this.state.locked||(this.state.hover.reset(),sy.call(this),uy.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=jg({e:e});t&&(this.state.drag[t]=!0),sy.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),sy.call(this),uy.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,o="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[o]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=ay.call(this);return this.elements(e,ly.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:o}=this.settings,i=o.injections().map((t=>t({h:e,rect:this.rect,orientation:o.orientation,minThumbSize:o.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:o,startHandleActive:i,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[o.end]:t-n},f={[o.start]:r},p={left:-3},m={left:1},h={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?h:p},class:"scrollbar--start-handle",[zg]:"start"},i?e("div",{style:{...s.startHandleBorder,...c?g:m}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?p:h},class:"scrollbar--end-handle",[zg]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?m:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[o.start]:n,[o.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:dy.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:i})}};var py={black:"#000",white:"#fff"};var my={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var hy={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var gy={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var yy={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var vy={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};var by={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var xy={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Sy(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var My=Object.freeze({__proto__:null,default:Sy}),Cy="$$material";function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(this,arguments)}function ky(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ty.apply(this,arguments)}function Ey(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var qy=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ly=Ey((function(e){return qy.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var Oy=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Ny="-ms-",Dy="-moz-",Ay="-webkit-",Iy="comm",Ry="rule",Py="decl",zy="@keyframes",jy=Math.abs,Fy=String.fromCharCode,_y=Object.assign;function By(e){return e.trim()}function Hy(e,t,n){return e.replace(t,n)}function $y(e,t){return e.indexOf(t)}function Vy(e,t){return 0|e.charCodeAt(t)}function Wy(e,t,n){return e.slice(t,n)}function Uy(e){return e.length}function Ky(e){return e.length}function Gy(e,t){return t.push(e),e}var Yy=1,Xy=1,Jy=0,Zy=0,Qy=0,ev="";function tv(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Yy,column:Xy,length:a,return:""}}function nv(e,t){return _y(tv("",null,null,"",null,null,0),e,{length:-e.length},t)}function rv(){return Qy=Zy>0?Vy(ev,--Zy):0,Xy--,10===Qy&&(Xy=1,Yy--),Qy}function ov(){return Qy=Zy<Jy?Vy(ev,Zy++):0,Xy++,10===Qy&&(Xy=1,Yy++),Qy}function iv(){return Vy(ev,Zy)}function av(){return Zy}function sv(e,t){return Wy(ev,e,t)}function lv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function cv(e){return Yy=Xy=1,Jy=Uy(ev=e),Zy=0,[]}function uv(e){return ev="",e}function dv(e){return By(sv(Zy-1,mv(91===e?e+2:40===e?e+1:e)))}function fv(e){for(;(Qy=iv())&&Qy<33;)ov();return lv(e)>2||lv(Qy)>3?"":" "}function pv(e,t){for(;--t&&ov()&&!(Qy<48||Qy>102||Qy>57&&Qy<65||Qy>70&&Qy<97););return sv(e,av()+(t<6&&32==iv()&&32==ov()))}function mv(e){for(;ov();)switch(Qy){case e:return Zy;case 34:case 39:34!==e&&39!==e&&mv(Qy);break;case 40:41===e&&mv(e);break;case 92:ov()}return Zy}function hv(e,t){for(;ov()&&e+Qy!==57&&(e+Qy!==84||47!==iv()););return"/*"+sv(t,Zy-1)+"*"+Fy(47===e?e:ov())}function gv(e){for(;!lv(iv());)ov();return sv(e,Zy)}function yv(e){return uv(vv("",null,null,null,[""],e=cv(e),0,[0],e))}function vv(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,h=1,g=1,y=1,v=0,b="",x=o,S=i,M=r,C=b;g;)switch(m=v,v=ov()){case 40:if(108!=m&&58==Vy(C,d-1)){-1!=$y(C+=Hy(dv(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:C+=dv(v);break;case 9:case 10:case 13:case 32:C+=fv(m);break;case 92:C+=pv(av()-1,7);continue;case 47:switch(iv()){case 42:case 47:Gy(xv(hv(ov(),av()),t,n),l);break;default:C+="/"}break;case 123*h:s[c++]=Uy(C)*y;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(C=Hy(C,/\f/g,"")),p>0&&Uy(C)-d&&Gy(p>32?Sv(C+";",r,n,d-1):Sv(Hy(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(Gy(M=bv(C,t,n,c,u,o,s,b,x=[],S=[],d),i),123===v)if(0===u)vv(C,t,M,M,x,i,d,s,S);else switch(99===f&&110===Vy(C,3)?100:f){case 100:case 108:case 109:case 115:vv(e,M,M,r&&Gy(bv(e,M,M,0,0,o,s,b,o,x=[],d),S),o,S,d,s,r?x:S);break;default:vv(C,M,M,M,[""],S,0,s,S)}}c=u=p=0,h=y=1,b=C="",d=a;break;case 58:d=1+Uy(C),p=m;default:if(h<1)if(123==v)--h;else if(125==v&&0==h++&&125==rv())continue;switch(C+=Fy(v),v*h){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Uy(C)-1)*y,y=1;break;case 64:45===iv()&&(C+=dv(ov())),f=iv(),u=d=Uy(b=C+=gv(av())),v++;break;case 45:45===m&&2==Uy(C)&&(h=0)}}return i}function bv(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=Ky(f),m=0,h=0,g=0;m<r;++m)for(var y=0,v=Wy(e,d+1,d=jy(h=a[m])),b=e;y<p;++y)(b=By(h>0?f[y]+" "+v:Hy(v,/&\f/g,f[y])))&&(l[g++]=b);return tv(e,t,n,0===o?Ry:s,l,c,u)}function xv(e,t,n){return tv(e,t,n,Iy,Fy(Qy),Wy(e,2,-2),0)}function Sv(e,t,n,r){return tv(e,t,n,Py,Wy(e,0,r),Wy(e,r+1,-1),r)}function Mv(e,t){for(var n="",r=Ky(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Cv(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Py:return e.return=e.return||e.value;case Iy:return"";case zy:return e.return=e.value+"{"+Mv(e.children,r)+"}";case Ry:e.value=e.props.join(",")}return Uy(n=Mv(e.children,r))?e.return=e.value+"{"+n+"}":""}function wv(e){var t=Ky(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}var kv=function(e,t,n){for(var r=0,o=0;r=o,o=iv(),38===r&&12===o&&(t[n]=1),!lv(o);)ov();return sv(e,Zy)},Tv=function(e,t){return uv(function(e,t){var n=-1,r=44;do{switch(lv(r)){case 0:38===r&&12===iv()&&(t[n]=1),e[n]+=kv(Zy-1,t,n);break;case 2:e[n]+=dv(r);break;case 4:if(44===r){e[++n]=58===iv()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Fy(r)}}while(r=ov());return e}(cv(e),t))},Ev=new WeakMap,qv=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ev.get(n))&&!r){Ev.set(e,!0);for(var o=[],i=Tv(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},Lv=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ov(e,t){switch(function(e,t){return 45^Vy(e,0)?(((t<<2^Vy(e,0))<<2^Vy(e,1))<<2^Vy(e,2))<<2^Vy(e,3):0}(e,t)){case 5103:return Ay+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ay+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ay+e+Dy+e+Ny+e+e;case 6828:case 4268:return Ay+e+Ny+e+e;case 6165:return Ay+e+Ny+"flex-"+e+e;case 5187:return Ay+e+Hy(e,/(\w+).+(:[^]+)/,Ay+"box-$1$2"+Ny+"flex-$1$2")+e;case 5443:return Ay+e+Ny+"flex-item-"+Hy(e,/flex-|-self/,"")+e;case 4675:return Ay+e+Ny+"flex-line-pack"+Hy(e,/align-content|flex-|-self/,"")+e;case 5548:return Ay+e+Ny+Hy(e,"shrink","negative")+e;case 5292:return Ay+e+Ny+Hy(e,"basis","preferred-size")+e;case 6060:return Ay+"box-"+Hy(e,"-grow","")+Ay+e+Ny+Hy(e,"grow","positive")+e;case 4554:return Ay+Hy(e,/([^-])(transform)/g,"$1"+Ay+"$2")+e;case 6187:return Hy(Hy(Hy(e,/(zoom-|grab)/,Ay+"$1"),/(image-set)/,Ay+"$1"),e,"")+e;case 5495:case 3959:return Hy(e,/(image-set\([^]*)/,Ay+"$1$`$1");case 4968:return Hy(Hy(e,/(.+:)(flex-)?(.*)/,Ay+"box-pack:$3"+Ny+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ay+e+e;case 4095:case 3583:case 4068:case 2532:return Hy(e,/(.+)-inline(.+)/,Ay+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Uy(e)-1-t>6)switch(Vy(e,t+1)){case 109:if(45!==Vy(e,t+4))break;case 102:return Hy(e,/(.+:)(.+)-([^]+)/,"$1"+Ay+"$2-$3$1"+Dy+(108==Vy(e,t+3)?"$3":"$2-$3"))+e;case 115:return~$y(e,"stretch")?Ov(Hy(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Vy(e,t+1))break;case 6444:switch(Vy(e,Uy(e)-3-(~$y(e,"!important")&&10))){case 107:return Hy(e,":",":"+Ay)+e;case 101:return Hy(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ay+(45===Vy(e,14)?"inline-":"")+"box$3$1"+Ay+"$2$3$1"+Ny+"$2box$3")+e}break;case 5936:switch(Vy(e,t+11)){case 114:return Ay+e+Ny+Hy(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ay+e+Ny+Hy(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ay+e+Ny+Hy(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ay+e+Ny+e+e}return e}var Nv="undefined"!=typeof document,Dv=Nv?void 0:function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}}((function(){return Ey((function(){var e={};return function(t){return e[t]}}))})),Av=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Py:e.return=Ov(e.value,e.length);break;case zy:return Mv([nv(e,{value:Hy(e.value,"@","@"+Ay)})],r);case Ry:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mv([nv(e,{props:[Hy(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Mv([nv(e,{props:[Hy(t,/:(plac\w+)/,":"+Ay+"input-$1")]}),nv(e,{props:[Hy(t,/:(plac\w+)/,":-moz-$1")]}),nv(e,{props:[Hy(t,/:(plac\w+)/,Ny+"input-$1")]})],r)}return""}))}}],Iv=function(e){var t=e.key;if(Nv&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||Av,a={},s=[];Nv&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)})));var l,c=[qv,Lv];if(Nv){var u,d=[Cv,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],f=wv(c.concat(i,d));o=function(e,t,n,r){u=n,function(e){Mv(yv(e),f)}(e?e+"{"+t.styles+"}":t.styles),r&&(y.inserted[t.name]=!0)}}else{var p=[Cv],m=wv(c.concat(i,p)),h=Dv(i)(t),g=function(e,t){var n=t.name;return void 0===h[n]&&(h[n]=function(e){return Mv(yv(e),m)}(e?e+"{"+t.styles+"}":t.styles)),h[n]};o=function(e,t,n,r){var o=t.name,i=g(e,t);return void 0===y.compat?(r&&(y.inserted[o]=!0),i):r?void(y.inserted[o]=i):i}}var y={key:t,sheet:new Oy({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return y.sheet.hydrate(s),y},Rv="undefined"!=typeof document;var Pv=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===Rv&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},zv=function(e,t,n){Pv(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",i=t;do{var a=e.insert(t===i?"."+r:"",i,e.sheet,!0);Rv||void 0===a||(o+=a),i=i.next}while(void 0!==i);if(!Rv&&0!==o.length)return o}};var jv={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Fv=/[A-Z]|^ms/g,_v=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bv=function(e){return 45===e.charCodeAt(1)},Hv=function(e){return null!=e&&"boolean"!=typeof e},$v=Ey((function(e){return Bv(e)?e:e.replace(Fv,"-$&").toLowerCase()})),Vv=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_v,(function(e,t,n){return Uv={name:t,styles:n,next:Uv},t}))}return 1===jv[e]||Bv(e)||"number"!=typeof t||0===t?t:t+"px"};function Wv(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Uv={name:n.name,styles:n.styles,next:Uv},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Uv={name:r.name,styles:r.styles,next:Uv},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Wv(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Hv(a)&&(r+=$v(i)+":"+Vv(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Wv(e,t,a);switch(i){case"animation":case"animationName":r+=$v(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Hv(a[l])&&(r+=$v(i)+":"+Vv(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Uv,i=n(e);return Uv=o,Wv(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Uv,Kv=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Gv=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Uv=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Wv(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Wv(n,t,e[a]),r&&(o+=i[a]);Kv.lastIndex=0;for(var s,l="";null!==(s=Kv.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Uv}},Yv="undefined"!=typeof document,Xv=function(e){return e()},Jv=!!b.useInsertionEffect&&b.useInsertionEffect,Zv=Yv&&Jv||Xv,Qv=Jv||b.useLayoutEffect,eb="undefined"!=typeof document,tb=b.createContext("undefined"!=typeof HTMLElement?Iv({key:"css"}):null),nb=tb.Provider,rb=function(e){return C((function(t,n){var r=w(tb);return e(t,r,n)}))};eb||(rb=function(e){return function(t){var n=w(tb);return null===n?(n=Iv({key:"css"}),b.createElement(tb.Provider,{value:n},e(t,n))):e(t,n)}});var ob=b.createContext({}),ib=rb((function(e,t){var n=e.styles,r=Gv([n],void 0,b.useContext(ob));if(!eb){for(var o,i=r.name,a=r.styles,s=r.next;void 0!==s;)i+=" "+s.name,a+=s.styles,s=s.next;var l=!0===t.compat,c=t.insert("",{name:i,styles:a},t.sheet,l);return l?null:b.createElement("style",((o={})["data-emotion"]=t.key+"-global "+i,o.dangerouslySetInnerHTML={__html:c},o.nonce=t.sheet.nonce,o))}var u=b.useRef();return Qv((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,i=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(o=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),u.current=[n,o],function(){n.flush()}}),[t]),Qv((function(){var e=u.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&zv(t,r.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function ab(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Gv(t)}var sb=function(){var e=ab.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},lb=Ly,cb=function(e){return"theme"!==e},ub=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?lb:cb},db=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},fb="undefined"!=typeof document,pb=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Pv(t,n,r);var o=Zv((function(){return zv(t,n,r)}));if(!fb&&void 0!==o){for(var i,a=n.name,s=n.next;void 0!==s;)a+=" "+s.name,s=s.next;return b.createElement("style",((i={})["data-emotion"]=t.key+" "+a,i.dangerouslySetInnerHTML={__html:o},i.nonce=t.sheet.nonce,i))}return null},mb=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=db(t,n,i),l=s||ub(a),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;p<f;p++)d.push(u[p],u[0][p])}var m=rb((function(e,t,n){var r,i,u,f,p=c&&e.as||a,m="",h=[],g=e;if(null==e.theme){for(var y in g={},e)g[y]=e[y];g.theme=b.useContext(ob)}"string"==typeof e.className?(r=t.registered,i=h,u=e.className,f="",u.split(" ").forEach((function(e){void 0!==r[e]?i.push(r[e]+";"):f+=e+" "})),m=f):null!=e.className&&(m=e.className+" ");var v=Gv(d.concat(h),t.registered,g);m+=t.key+"-"+v.name,void 0!==o&&(m+=" "+o);var x=c&&void 0===s?ub(p):l,S={};for(var M in e)c&&"as"===M||x(M)&&(S[M]=e[M]);return S.className=m,S.ref=n,b.createElement(b.Fragment,null,b.createElement(pb,{cache:t,serialized:v,isStringTag:"string"==typeof p}),b.createElement(p,S))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,Ty({},n,r,{shouldForwardProp:db(m,r,!0)})).apply(void 0,d)},m}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){mb[e]=mb(e)}));var hb={exports:{}},gb={},yb=v,vb=Symbol.for("react.element"),bb=Symbol.for("react.fragment"),xb=Object.prototype.hasOwnProperty,Sb=yb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Mb={key:!0,ref:!0,__self:!0,__source:!0};function Cb(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)xb.call(t,r)&&!Mb.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:vb,type:e,key:i,ref:a,props:o,_owner:Sb.current}}gb.Fragment=bb,gb.jsx=Cb,gb.jsxs=Cb,hb.exports=gb;var wb=hb.exports;let kb;"object"==typeof document&&(kb=Iv({key:"css",prepend:!0}));var Tb=Object.freeze({__proto__:null,GlobalStyles:function(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return wb.jsx(ib,{styles:r})}
15
+ /**
16
+ * @mui/styled-engine v5.15.14
17
+ *
18
+ * @license MIT
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */,StyledEngineProvider:function(e){const{injectFirst:t,children:n}=e;return t&&kb?wb.jsx(nb,{value:kb,children:n}):n},ThemeContext:ob,css:ab,default:function(e,t){return mb(e,t)},internal_processStyles:(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},keyframes:sb});function Eb(){return Eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eb.apply(this,arguments)}function qb(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lb.apply(this,arguments)}function Ob(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Nb(e){if(!Ob(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=Nb(e[n])})),t}function Db(e,t,n={clone:!0}){const r=n.clone?Lb({},e):e;return Ob(e)&&Ob(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(Ob(t[o])&&o in e&&Ob(e[o])?r[o]=Db(e[o],t[o],n):n.clone?r[o]=Ob(t[o])?Nb(t[o]):t[o]:r[o]=t[o])})),r}var Ab=Object.freeze({__proto__:null,default:Db,isPlainObject:Ob});const Ib=["values","unit","step"],Rb=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Eb({},e,{[t.key]:t.val})),{})};function Pb(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=qb(e,Ib),i=Rb(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return Eb({keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}var zb={borderRadius:4};function jb(e,t){return t?Db(e,t,{clone:!1}):e}const Fb={xs:0,sm:600,md:900,lg:1200,xl:1536},_b={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Fb[e]}px)`};function Bb(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||_b;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||_b;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||Fb).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function Hb(e){if("string"!=typeof e)throw new Error(Sy(7));return e.charAt(0).toUpperCase()+e.slice(1)}var $b=Object.freeze({__proto__:null,default:Hb});function Vb(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Wb(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Vb(e,n)||r,t&&(o=t(o,r,e)),o}function Ub(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Vb(e.theme,r)||{};return Bb(e,i,(e=>{let r=Wb(a,o,e);return e===r&&"string"==typeof e&&(r=Wb(a,o,`${t}${"default"===e?"":Hb(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const Kb={m:"margin",p:"padding"},Gb={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yb={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Xb=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!Yb[e])return[e];e=Yb[e]}const[t,n]=e.split(""),r=Kb[t],o=Gb[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Jb=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Zb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Qb(e,t,n,r){var o;const i=null!=(o=Vb(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function ex(e){return Qb(e,"spacing",8)}function tx(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function nx(e,t,n,r){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=tx(t,n),e)),{})}(Xb(n),r);return Bb(e,e[n],o)}function rx(e,t){const n=ex(e.theme);return Object.keys(e).map((r=>nx(e,t,r,n))).reduce(jb,{})}function ox(e){return rx(e,Jb)}function ix(e){return rx(e,Zb)}function ax(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?jb(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function sx(e){return"number"!=typeof e?e:`${e}px solid`}function lx(e,t){return Ub({prop:e,themeKey:"borders",transform:t})}ox.propTypes={},ox.filterProps=Jb,ix.propTypes={},ix.filterProps=Zb;const cx=lx("border",sx),ux=lx("borderTop",sx),dx=lx("borderRight",sx),fx=lx("borderBottom",sx),px=lx("borderLeft",sx),mx=lx("borderColor"),hx=lx("borderTopColor"),gx=lx("borderRightColor"),yx=lx("borderBottomColor"),vx=lx("borderLeftColor"),bx=lx("outline",sx),xx=lx("outlineColor"),Sx=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Qb(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:tx(t,e)});return Bb(e,e.borderRadius,n)}return null};Sx.propTypes={},Sx.filterProps=["borderRadius"],ax(cx,ux,dx,fx,px,mx,hx,gx,yx,vx,Sx,bx,xx);const Mx=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Qb(e.theme,"spacing",8),n=e=>({gap:tx(t,e)});return Bb(e,e.gap,n)}return null};Mx.propTypes={},Mx.filterProps=["gap"];const Cx=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Qb(e.theme,"spacing",8),n=e=>({columnGap:tx(t,e)});return Bb(e,e.columnGap,n)}return null};Cx.propTypes={},Cx.filterProps=["columnGap"];const wx=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Qb(e.theme,"spacing",8),n=e=>({rowGap:tx(t,e)});return Bb(e,e.rowGap,n)}return null};wx.propTypes={},wx.filterProps=["rowGap"];function kx(e,t){return"grey"===t?t:e}ax(Mx,Cx,wx,Ub({prop:"gridColumn"}),Ub({prop:"gridRow"}),Ub({prop:"gridAutoFlow"}),Ub({prop:"gridAutoColumns"}),Ub({prop:"gridAutoRows"}),Ub({prop:"gridTemplateColumns"}),Ub({prop:"gridTemplateRows"}),Ub({prop:"gridTemplateAreas"}),Ub({prop:"gridArea"}));function Tx(e){return e<=1&&0!==e?100*e+"%":e}ax(Ub({prop:"color",themeKey:"palette",transform:kx}),Ub({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:kx}),Ub({prop:"backgroundColor",themeKey:"palette",transform:kx}));const Ex=Ub({prop:"width",transform:Tx}),qx=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||Fb[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Tx(t)}};return Bb(e,e.maxWidth,t)}return null};qx.filterProps=["maxWidth"];const Lx=Ub({prop:"minWidth",transform:Tx}),Ox=Ub({prop:"height",transform:Tx}),Nx=Ub({prop:"maxHeight",transform:Tx}),Dx=Ub({prop:"minHeight",transform:Tx});Ub({prop:"size",cssProperty:"width",transform:Tx}),Ub({prop:"size",cssProperty:"height",transform:Tx});ax(Ex,qx,Lx,Ox,Nx,Dx,Ub({prop:"boxSizing"}));var Ax={border:{themeKey:"borders",transform:sx},borderTop:{themeKey:"borders",transform:sx},borderRight:{themeKey:"borders",transform:sx},borderBottom:{themeKey:"borders",transform:sx},borderLeft:{themeKey:"borders",transform:sx},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:sx},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Sx},color:{themeKey:"palette",transform:kx},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:kx},backgroundColor:{themeKey:"palette",transform:kx},p:{style:ix},pt:{style:ix},pr:{style:ix},pb:{style:ix},pl:{style:ix},px:{style:ix},py:{style:ix},padding:{style:ix},paddingTop:{style:ix},paddingRight:{style:ix},paddingBottom:{style:ix},paddingLeft:{style:ix},paddingX:{style:ix},paddingY:{style:ix},paddingInline:{style:ix},paddingInlineStart:{style:ix},paddingInlineEnd:{style:ix},paddingBlock:{style:ix},paddingBlockStart:{style:ix},paddingBlockEnd:{style:ix},m:{style:ox},mt:{style:ox},mr:{style:ox},mb:{style:ox},ml:{style:ox},mx:{style:ox},my:{style:ox},margin:{style:ox},marginTop:{style:ox},marginRight:{style:ox},marginBottom:{style:ox},marginLeft:{style:ox},marginX:{style:ox},marginY:{style:ox},marginInline:{style:ox},marginInlineStart:{style:ox},marginInlineEnd:{style:ox},marginBlock:{style:ox},marginBlockStart:{style:ox},marginBlockEnd:{style:ox},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Mx},rowGap:{style:wx},columnGap:{style:Cx},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Tx},maxWidth:{style:qx},minWidth:{transform:Tx},height:{transform:Tx},maxHeight:{transform:Tx},minHeight:{transform:Tx},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Ix(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Vb(n,s)||{};if(c)return c(o);return Bb(o,t,(t=>{let n=Wb(u,l,t);return t===n&&"string"==typeof t&&(n=Wb(u,l,`${e}${"default"===t?"":Hb(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:Ax;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=function(e={}){var t;const n=null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return n||{}}(i.breakpoints),s=Object.keys(o);let l=o;return Object.keys(r).forEach((n=>{const o=(s=r[n],c=i,"function"==typeof s?s(c):s);var s,c;if(null!=o)if("object"==typeof o)if(a[n])l=jb(l,e(n,o,i,a));else{const e=Bb({theme:i},o,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,o)?l=jb(l,e):l[n]=t({sx:o,theme:i})}else l=jb(l,e(n,o,i,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l)}return Array.isArray(o)?o.map(s):s(o)}}const Rx=Ix();Rx.filterProps=["sx"];var Px=Rx;function zx(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){return{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}}return n.palette.mode===e?t:{}}const jx=["breakpoints","palette","spacing","shape"];function Fx(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=qb(e,jx),s=Pb(n),l=function(e=8){if(e.mui)return e;const t=ex({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(o);let c=Db({breakpoints:s,direction:"ltr",components:{},palette:Eb({mode:"light"},r),spacing:l,shape:Eb({},zb,i)},a);return c.applyStyles=zx,c=t.reduce(((e,t)=>Db(e,t)),c),c.unstable_sxConfig=Eb({},Ax,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return Px({sx:e,theme:this})},c}var _x=Object.freeze({__proto__:null,default:Fx,private_createBreakpoints:Pb,unstable_applyStyles:zx});function Bx(e=null){const t=b.useContext(ob);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const Hx=Fx();const $x=["sx"];var Vx=Object.freeze({__proto__:null,default:Px,extendSxProp:function(e){const{sx:t}=e,n=qb(e,$x),{systemProps:r,otherProps:o}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:Ax;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Ob(n)?Eb({},r,n):r}:Eb({},r,t),Eb({},o,{sx:i})},unstable_createStyleFunctionSx:Ix,unstable_defaultSxConfig:Ax});const Wx=e=>e;var Ux=(()=>{let e=Wx;return{configure(t){e=t},generate:t=>e(t),reset(){e=Wx}}})();function Kx(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Kx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Kx(e))&&(r&&(r+=" "),r+=t);return r}const Yx={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Xx(e,t,n="Mui"){const r=Yx[t];return r?`${n}-${r}`:`${Ux.generate(e)}-${t}`}function Jx(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=Xx(e,t,n)})),r}var Zx,Qx={exports:{}},eS={},tS=Symbol.for("react.element"),nS=Symbol.for("react.portal"),rS=Symbol.for("react.fragment"),oS=Symbol.for("react.strict_mode"),iS=Symbol.for("react.profiler"),aS=Symbol.for("react.provider"),sS=Symbol.for("react.context"),lS=Symbol.for("react.server_context"),cS=Symbol.for("react.forward_ref"),uS=Symbol.for("react.suspense"),dS=Symbol.for("react.suspense_list"),fS=Symbol.for("react.memo"),pS=Symbol.for("react.lazy"),mS=Symbol.for("react.offscreen");function hS(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case tS:switch(e=e.type){case rS:case iS:case oS:case uS:case dS:return e;default:switch(e=e&&e.$$typeof){case lS:case sS:case cS:case pS:case fS:case aS:return e;default:return t}}case nS:return t}}}Zx=Symbol.for("react.module.reference"),eS.ContextConsumer=sS,eS.ContextProvider=aS,eS.Element=tS,eS.ForwardRef=cS,eS.Fragment=rS,eS.Lazy=pS,eS.Memo=fS,eS.Portal=nS,eS.Profiler=iS,eS.StrictMode=oS,eS.Suspense=uS,eS.SuspenseList=dS,eS.isAsyncMode=function(){return!1},eS.isConcurrentMode=function(){return!1},eS.isContextConsumer=function(e){return hS(e)===sS},eS.isContextProvider=function(e){return hS(e)===aS},eS.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===tS},eS.isForwardRef=function(e){return hS(e)===cS},eS.isFragment=function(e){return hS(e)===rS},eS.isLazy=function(e){return hS(e)===pS},eS.isMemo=function(e){return hS(e)===fS},eS.isPortal=function(e){return hS(e)===nS},eS.isProfiler=function(e){return hS(e)===iS},eS.isStrictMode=function(e){return hS(e)===oS},eS.isSuspense=function(e){return hS(e)===uS},eS.isSuspenseList=function(e){return hS(e)===dS},eS.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===rS||e===iS||e===oS||e===uS||e===dS||e===mS||"object"==typeof e&&null!==e&&(e.$$typeof===pS||e.$$typeof===fS||e.$$typeof===aS||e.$$typeof===sS||e.$$typeof===cS||e.$$typeof===Zx||void 0!==e.getModuleId)},eS.typeOf=hS,Qx.exports=eS;var gS=Qx.exports;const yS=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function vS(e){const t=`${e}`.match(yS);return t&&t[1]||""}function bS(e,t=""){return e.displayName||e.name||vS(e)||t}function xS(e,t,n){const r=bS(t);return e.displayName||(""!==r?`${n}(${r})`:n)}var SS=Object.freeze({__proto__:null,default:function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return bS(e,"Component");if("object"==typeof e)switch(e.$$typeof){case gS.ForwardRef:return xS(e,e.render,"ForwardRef");case gS.Memo:return xS(e,e.type,"memo");default:return}}},getFunctionName:vS});function MS(e,t){const n=Lb({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=Lb({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=Lb({},i),Object.keys(o).forEach((e=>{n[r][e]=MS(o[e],i[e])}))):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])})),n}function CS({props:e,name:t,defaultTheme:n,themeId:r}){let o=function(e=Hx){return Bx(e)}(n);r&&(o=o[r]||o);const i=function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?MS(t.components[n].defaultProps,r):r}({theme:o,name:t,props:e});return i}var wS="undefined"!=typeof window?b.useLayoutEffect:b.useEffect;var kS=Object.freeze({__proto__:null,default:function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}});function TS(){return TS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TS.apply(this,arguments)}function ES(e){const t=b.useRef(e);return wS((()=>{t.current=e})),b.useRef(((...e)=>(0,t.current)(...e))).current}function qS(...e){return b.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)}))}),e)}const LS={};const OS=[];class NS{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new NS}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function DS(){const e=function(e,t){const n=b.useRef(LS);return n.current===LS&&(n.current=e(t)),n}(NS.create).current;var t;return t=e.disposeEffect,b.useEffect(t,OS),e}let AS=!0,IS=!1;const RS=new NS,PS={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function zS(e){e.metaKey||e.altKey||e.ctrlKey||(AS=!0)}function jS(){AS=!1}function FS(){"hidden"===this.visibilityState&&IS&&(AS=!0)}function _S(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return AS||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!PS[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function BS(){const e=b.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",zS,!0),t.addEventListener("mousedown",jS,!0),t.addEventListener("pointerdown",jS,!0),t.addEventListener("touchstart",jS,!0),t.addEventListener("visibilitychange",FS,!0))}),[]),t=b.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!_S(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(IS=!0,RS.start(100,(()=>{IS=!1})),t.current=!1,!0)},ref:e}}function HS(e,t,n=void 0){const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}var $S=b.createContext(null);function VS(){return b.useContext($S)}var WS="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function US(e){const{children:t,theme:n}=e,r=VS(),o=b.useMemo((()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return TS({},e,t)}(r,n);return null!=e&&(e[WS]=null!==r),e}),[n,r]);return wb.jsx($S.Provider,{value:o,children:t})}const KS=["value"],GS=b.createContext();function YS(e){let{value:t}=e,n=qb(e,KS);return wb.jsx(GS.Provider,Eb({value:null==t||t},n))}const XS={};function JS(e,t,n,r=!1){return b.useMemo((()=>{const o=e&&t[e]||t;if("function"==typeof n){const i=n(o),a=e?Eb({},t,{[e]:i}):i;return r?()=>a:a}return Eb({},t,e?{[e]:n}:n)}),[e,t,n,r])}function ZS(e){const{children:t,theme:n,themeId:r}=e,o=Bx(XS),i=VS()||XS,a=JS(r,o,n),s=JS(r,i,n,!0),l="rtl"===a.direction;return wb.jsx(US,{theme:s,children:wb.jsx(ob.Provider,{value:a,children:wb.jsx(YS,{value:l,children:t})})})}var QS,eM={},tM={exports:{}};(QS=tM).exports=function(e){return e&&e.__esModule?e:{default:e}},QS.exports.__esModule=!0,QS.exports.default=QS.exports;var nM=tM.exports,rM=ee(My),oM=ee(kS),iM=nM;Object.defineProperty(eM,"__esModule",{value:!0});var aM=eM.alpha=bM;eM.blend=function(e,t,n,r=1){const o=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),i=mM(e),a=mM(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return gM({type:"rgb",values:s})},eM.colorChannel=void 0;var sM=eM.darken=xM;eM.decomposeColor=mM,eM.emphasize=function(e,t=.15){return vM(e)>.5?xM(e,t):SM(e,t)};var lM=eM.getContrastRatio=function(e,t){const n=vM(e),r=vM(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};eM.getLuminance=vM,eM.hexToRgb=pM,eM.hslToRgb=yM;var cM=eM.lighten=SM;eM.private_safeAlpha=function(e,t,n){try{return bM(e,t)}catch(t){return e}},eM.private_safeColorChannel=void 0,eM.private_safeDarken=function(e,t,n){try{return xM(e,t)}catch(t){return e}},eM.private_safeEmphasize=function e(t,n,r){try{return e(t,n)}catch(e){return t}},eM.private_safeLighten=function(e,t,n){try{return SM(e,t)}catch(t){return e}},eM.recomposeColor=gM,eM.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=mM(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`};var uM=iM(rM),dM=iM(oM);function fM(e,t=0,n=1){return(0,dM.default)(e,t,n)}function pM(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function mM(e){if(e.type)return e;if("#"===e.charAt(0))return mM(pM(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,uM.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,uM.default)(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const hM=e=>{const t=mM(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};eM.colorChannel=hM;function gM(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function yM(e){e=mM(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),gM({type:s,values:l})}function vM(e){let t="hsl"===(e=mM(e)).type||"hsla"===e.type?mM(yM(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function bM(e,t){return e=mM(e),t=fM(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,gM(e)}function xM(e,t){if(e=mM(e),t=fM(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return gM(e)}function SM(e,t){if(e=mM(e),t=fM(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return gM(e)}eM.private_safeColorChannel=(e,t)=>{try{return hM(e)}catch(t){return e}};const MM=["mode","contrastThreshold","tonalOffset"],CM={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:py.white,default:py.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},wM={text:{primary:py.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:py.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function kM(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=cM(e.main,o):"dark"===t&&(e.dark=sM(e.main,i)))}function TM(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=ky(e,MM),i=e.primary||function(e="light"){return"dark"===e?{main:gy[200],light:gy[50],dark:gy[400]}:{main:gy[700],light:gy[400],dark:gy[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:hy[200],light:hy[50],dark:hy[400]}:{main:hy[500],light:hy[300],dark:hy[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:my[500],light:my[300],dark:my[700]}:{main:my[700],light:my[400],dark:my[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:yy[400],light:yy[300],dark:yy[700]}:{main:yy[700],light:yy[500],dark:yy[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:vy[400],light:vy[300],dark:vy[700]}:{main:vy[800],light:vy[500],dark:vy[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:by[400],light:by[300],dark:by[700]}:{main:"#ed6c02",light:by[500],dark:by[900]}}(t);function d(e){return lM(e,wM.text.primary)>=n?wM.text.primary:CM.text.primary}const f=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=wy({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(Sy(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(Sy(12,t?` (${t})`:"",JSON.stringify(e.main)));return kM(e,"light",o,r),kM(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},p={dark:wM,light:CM};return Db(wy({common:wy({},py),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:xy,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},p[t]),o)}const EM=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const qM={textTransform:"uppercase"},LM='"Roboto", "Helvetica", "Arial", sans-serif';function OM(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=LM,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=ky(n,EM),p=o/14,m=d||(e=>e/c*p+"rem"),h=(e,t,n,o,i)=>{return wy({fontFamily:r,fontWeight:e,fontSize:m(t),lineHeight:n},r===LM?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},i,u);var a},g={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(a,48,1.167,0),h4:h(a,34,1.235,.25),h5:h(a,24,1.334,0),h6:h(s,20,1.6,.15),subtitle1:h(a,16,1.75,.15),subtitle2:h(s,14,1.57,.1),body1:h(a,16,1.5,.15),body2:h(a,14,1.43,.15),button:h(s,14,1.75,.4,qM),caption:h(a,12,1.66,.4),overline:h(a,12,2.66,1,qM),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Db(wy({htmlFontSize:c,pxToRem:m,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),f,{clone:!1})}function NM(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var DM=["none",NM(0,2,1,-1,0,1,1,0,0,1,3,0),NM(0,3,1,-2,0,2,2,0,0,1,5,0),NM(0,3,3,-2,0,3,4,0,0,1,8,0),NM(0,2,4,-1,0,4,5,0,0,1,10,0),NM(0,3,5,-1,0,5,8,0,0,1,14,0),NM(0,3,5,-1,0,6,10,0,0,1,18,0),NM(0,4,5,-2,0,7,10,1,0,2,16,1),NM(0,5,5,-3,0,8,10,1,0,3,14,2),NM(0,5,6,-3,0,9,12,1,0,3,16,2),NM(0,6,6,-3,0,10,14,1,0,4,18,3),NM(0,6,7,-4,0,11,15,1,0,4,20,3),NM(0,7,8,-4,0,12,17,2,0,5,22,4),NM(0,7,8,-4,0,13,19,2,0,5,24,4),NM(0,7,9,-4,0,14,21,2,0,5,26,4),NM(0,8,9,-5,0,15,22,2,0,6,28,5),NM(0,8,10,-5,0,16,24,2,0,6,30,5),NM(0,8,11,-5,0,17,26,2,0,6,32,5),NM(0,9,11,-5,0,18,28,2,0,7,34,6),NM(0,9,12,-6,0,19,29,2,0,7,36,6),NM(0,10,13,-6,0,20,31,3,0,8,38,7),NM(0,10,13,-6,0,21,33,3,0,8,40,7),NM(0,10,14,-6,0,22,35,3,0,8,42,7),NM(0,11,14,-7,0,23,36,3,0,9,44,8),NM(0,11,15,-7,0,24,38,3,0,9,46,8)];const AM=["duration","easing","delay"],IM={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},RM={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function PM(e){return`${Math.round(e)}ms`}function zM(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function jM(e){const t=wy({},IM,e.easing),n=wy({},RM,e.duration);return wy({getAutoHeightDuration:zM,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;return ky(r,AM),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:PM(o)} ${i} ${"string"==typeof a?a:PM(a)}`)).join(",")}},e,{easing:t,duration:n})}var FM={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const _M=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function BM(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=ky(e,_M);if(e.vars)throw new Error(Sy(18));const s=TM(r),l=Fx(e);let c=Db(l,{mixins:(u=l.breakpoints,d=n,wy({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:DM.slice(),typography:OM(s,i),transitions:jM(o),zIndex:wy({},FM)});var u,d;return c=Db(c,a),c=t.reduce(((e,t)=>Db(e,t)),c),c.unstable_sxConfig=wy({},Ax,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return Px({sx:e,theme:this})},c}var HM=BM();function $M({props:e,name:t}){return CS({props:e,name:t,defaultTheme:HM,themeId:Cy})}var VM,WM={},UM={exports:{}};var KM,GM={exports:{}};var YM=ee(Tb),XM=ee(Ab),JM=ee($b),ZM=ee(SS),QM=ee(_x),eC=ee(Vx),tC=nM;Object.defineProperty(WM,"__esModule",{value:!0});var nC=WM.default=function(e={}){const{themeId:t,defaultTheme:n=mC,rootShouldForwardProp:r=pC,slotShouldForwardProp:o=pC}=e,i=e=>(0,lC.default)((0,rC.default)({},e,{theme:gC((0,rC.default)({},e,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(e,a={})=>{(0,iC.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=yC(hC(l))}=a,f=(0,oC.default)(a,dC),p=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,m=u||!1;let h=pC;"Root"===l||"root"===l?h=r:l?h=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(h=void 0);const g=(0,iC.default)(e,(0,rC.default)({shouldForwardProp:h,label:undefined},f)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,aC.isPlainObject)(e)?r=>vC(e,(0,rC.default)({},r,{theme:gC({theme:r.theme,defaultTheme:n,themeId:t})})):e,v=(r,...o)=>{let a=y(r);const l=o?o.map(y):[];s&&d&&l.push((e=>{const r=gC((0,rC.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const o=r.components[s].styleOverrides,i={};return Object.entries(o).forEach((([t,n])=>{i[t]=vC(n,(0,rC.default)({},e,{theme:r}))})),d(e,i)})),s&&!p&&l.push((e=>{var r;const o=gC((0,rC.default)({},e,{defaultTheme:n,themeId:t}));return vC({variants:null==o||null==(r=o.components)||null==(r=r[s])?void 0:r.variants},(0,rC.default)({},e,{theme:o}))})),m||l.push(i);const c=l.length-o.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");a=[...r,...e],a.raw=[...r.raw,...e]}const u=g(a,...l);return e.muiName&&(u.muiName=e.muiName),u};return g.withConfig&&(v.withConfig=g.withConfig),v}};WM.shouldForwardProp=pC,WM.systemDefaultTheme=void 0;var rC=tC((VM||(VM=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(UM)),UM.exports)),oC=tC((KM||(KM=1,function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports}(GM)),GM.exports)),iC=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=fC(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(YM),aC=XM;tC(JM),tC(ZM);var sC=tC(QM),lC=tC(eC);const cC=["ownerState"],uC=["variants"],dC=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function fC(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(fC=function(e){return e?n:t})(e)}function pC(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const mC=WM.systemDefaultTheme=(0,sC.default)(),hC=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function gC({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function yC(e){return e?(t,n)=>n[e]:null}function vC(e,t){let{ownerState:n}=t,r=(0,oC.default)(t,cC);const o="function"==typeof e?e((0,rC.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>vC(e,(0,rC.default)({ownerState:n},r))));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,oC.default)(o,uC);return e.forEach((e=>{let o=!0;"function"==typeof e.props?o=e.props((0,rC.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,rC.default)({ownerState:n},r,n)):e.style))})),t}return o}var bC=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e;var xC=nC({themeId:Cy,defaultTheme:HM,rootShouldForwardProp:bC});const SC=["theme"];function MC(e){let{theme:t}=e,n=ky(e,SC);const r=t[Cy];return wb.jsx(ZS,wy({},n,{themeId:r?Cy:void 0,theme:r||t}))}function CC(e){return Xx("MuiSvgIcon",e)}Jx("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wC=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],kC=xC("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Hb(n.color)}`],t[`fontSize${Hb(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,a,s,l,c,u,d,f,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(f=(e.vars||e).palette)||null==(f=f[t.color])?void 0:f.main)?d:{action:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(m=(e.vars||e).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[t.color]}})),TC=b.forwardRef((function(e,t){const n=$M({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:i="inherit",component:a="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24"}=n,f=ky(n,wC),p=b.isValidElement(r)&&"svg"===r.type,m=wy({},n,{color:i,component:a,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:p}),h={};c||(h.viewBox=d);const g=(e=>{const{color:t,fontSize:n,classes:r}=e;return HS({root:["root","inherit"!==t&&`color${Hb(t)}`,`fontSize${Hb(n)}`]},CC,r)})(m);return wb.jsxs(kC,wy({as:a,className:Gx(g.root,o),focusable:"false",color:l,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t},h,f,p&&r.props,{ownerState:m,children:[p?r.props.children:r,u?wb.jsx("title",{children:u}):null]}))}));TC.muiName="SvgIcon";var EC=TC;var qC=Jx("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const LC=["center","classes","className"];let OC,NC,DC,AC,IC=e=>e;const RC=sb(OC||(OC=IC`
22
+ 0% {
23
+ transform: scale(0);
24
+ opacity: 0.1;
25
+ }
26
+
27
+ 100% {
28
+ transform: scale(1);
29
+ opacity: 0.3;
30
+ }
31
+ `)),PC=sb(NC||(NC=IC`
32
+ 0% {
33
+ opacity: 1;
34
+ }
35
+
36
+ 100% {
37
+ opacity: 0;
38
+ }
39
+ `)),zC=sb(DC||(DC=IC`
40
+ 0% {
41
+ transform: scale(1);
42
+ }
43
+
44
+ 50% {
45
+ transform: scale(0.92);
46
+ }
47
+
48
+ 100% {
49
+ transform: scale(1);
50
+ }
51
+ `)),jC=xC("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),FC=xC((function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=b.useState(!1),f=Gx(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+i,left:-a/2+o},m=Gx(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),b.useEffect((()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}}),[l,s,c]),wb.jsx("span",{className:f,style:p,children:wb.jsx("span",{className:m})})}),{name:"MuiTouchRipple",slot:"Ripple"})(AC||(AC=IC`
52
+ opacity: 0;
53
+ position: absolute;
54
+
55
+ &.${0} {
56
+ opacity: 0.3;
57
+ transform: scale(1);
58
+ animation-name: ${0};
59
+ animation-duration: ${0}ms;
60
+ animation-timing-function: ${0};
61
+ }
62
+
63
+ &.${0} {
64
+ animation-duration: ${0}ms;
65
+ }
66
+
67
+ & .${0} {
68
+ opacity: 1;
69
+ display: block;
70
+ width: 100%;
71
+ height: 100%;
72
+ border-radius: 50%;
73
+ background-color: currentColor;
74
+ }
75
+
76
+ & .${0} {
77
+ opacity: 0;
78
+ animation-name: ${0};
79
+ animation-duration: ${0}ms;
80
+ animation-timing-function: ${0};
81
+ }
82
+
83
+ & .${0} {
84
+ position: absolute;
85
+ /* @noflip */
86
+ left: 0px;
87
+ top: 0;
88
+ animation-name: ${0};
89
+ animation-duration: 2500ms;
90
+ animation-timing-function: ${0};
91
+ animation-iteration-count: infinite;
92
+ animation-delay: 200ms;
93
+ }
94
+ `),qC.rippleVisible,RC,550,(({theme:e})=>e.transitions.easing.easeInOut),qC.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),qC.child,qC.childLeaving,PC,550,(({theme:e})=>e.transitions.easing.easeInOut),qC.childPulsate,zC,(({theme:e})=>e.transitions.easing.easeInOut)),_C=b.forwardRef((function(e,t){const n=$M({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=ky(n,LC),[s,l]=b.useState([]),c=b.useRef(0),u=b.useRef(null);b.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=b.useRef(!1),f=DS(),p=b.useRef(null),m=b.useRef(null),h=b.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;l((e=>[...e,wb.jsx(FC,{classes:{ripple:Gx(o.ripple,qC.ripple),rippleVisible:Gx(o.rippleVisible,qC.rippleVisible),ripplePulsate:Gx(o.ripplePulsate,qC.ripplePulsate),child:Gx(o.child,qC.child),childLeaving:Gx(o.childLeaving,qC.childLeaving),childPulsate:Gx(o.childPulsate,qC.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)])),c.current+=1,u.current=a}),[o]),g=b.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{h({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,(()=>{p.current&&(p.current(),p.current=null)}))):h({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,h,f]),y=b.useCallback((()=>{g({},{pulsate:!0})}),[g]),v=b.useCallback(((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&p.current)return p.current(),p.current=null,void f.start(0,(()=>{v(e,t)}));p.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[f]);return b.useImperativeHandle(t,(()=>({pulsate:y,start:g,stop:v})),[y,g,v]),wb.jsx(jC,wy({className:Gx(qC.root,o.root,i),ref:m},a,{children:wb.jsx(xp,{component:null,exit:!0,children:s})}))}));var BC=_C;function HC(e){return Xx("MuiButtonBase",e)}var $C=Jx("MuiButtonBase",["root","disabled","focusVisible"]);const VC=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],WC=xC("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${$C.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),UC=b.forwardRef((function(e,t){const n=$M({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:f="a",onBlur:p,onClick:m,onContextMenu:h,onDragLeave:g,onFocus:y,onFocusVisible:v,onKeyDown:x,onKeyUp:S,onMouseDown:M,onMouseLeave:C,onMouseUp:w,onTouchEnd:k,onTouchMove:T,onTouchStart:E,tabIndex:q=0,TouchRippleProps:L,touchRippleRef:O,type:N}=n,D=ky(n,VC),A=b.useRef(null),I=b.useRef(null),R=qS(I,O),{isFocusVisibleRef:P,onFocus:z,onBlur:j,ref:F}=BS(),[_,B]=b.useState(!1);l&&_&&B(!1),b.useImperativeHandle(r,(()=>({focusVisible:()=>{B(!0),A.current.focus()}})),[]);const[H,$]=b.useState(!1);b.useEffect((()=>{$(!0)}),[]);const V=H&&!c&&!l;function W(e,t,n=u){return ES((r=>{t&&t(r);return!n&&I.current&&I.current[e](r),!0}))}b.useEffect((()=>{_&&d&&!c&&H&&I.current.pulsate()}),[c,d,_,H]);const U=W("start",M),K=W("stop",h),G=W("stop",g),Y=W("stop",w),X=W("stop",(e=>{_&&e.preventDefault(),C&&C(e)})),J=W("start",E),Z=W("stop",k),Q=W("stop",T),ee=W("stop",(e=>{j(e),!1===P.current&&B(!1),p&&p(e)}),!1),te=ES((e=>{A.current||(A.current=e.currentTarget),z(e),!0===P.current&&(B(!0),v&&v(e)),y&&y(e)})),ne=()=>{const e=A.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},re=b.useRef(!1),oe=ES((e=>{d&&!re.current&&_&&I.current&&" "===e.key&&(re.current=!0,I.current.stop(e,(()=>{I.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))})),ie=ES((e=>{d&&" "===e.key&&I.current&&_&&!e.defaultPrevented&&(re.current=!1,I.current.stop(e,(()=>{I.current.pulsate(e)}))),S&&S(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=s;"button"===ae&&(D.href||D.to)&&(ae=f);const se={};"button"===ae?(se.type=void 0===N?"button":N,se.disabled=l):(D.href||D.to||(se.role="button"),l&&(se["aria-disabled"]=l));const le=qS(t,F,A),ce=wy({},n,{centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:q,focusVisible:_}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=HS({root:["root",t&&"disabled",n&&"focusVisible"]},HC,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return wb.jsxs(WC,wy({as:ae,className:Gx(ue.root,a),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:K,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:U,onMouseLeave:X,onMouseUp:Y,onDragLeave:G,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:l?-1:q,type:N},se,D,{children:[i,V?wb.jsx(BC,wy({ref:R,center:o},L)):null]}))}));var KC=UC;function GC(e){return Xx("MuiButton",e)}var YC=Jx("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var XC=b.createContext({});var JC=b.createContext(void 0);const ZC=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],QC=e=>wy({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),ew=xC(KC,{shouldForwardProp:e=>bC(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Hb(n.color)}`],t[`size${Hb(n.size)}`],t[`${n.variant}Size${Hb(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return wy({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":wy({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:aM(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:aM(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:aM(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":wy({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${YC.focusVisible}`]:wy({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${YC.disabled}`]:wy({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${aM(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${YC.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${YC.disabled}`]:{boxShadow:"none"}})),tw=xC("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Hb(n.size)}`]]}})((({ownerState:e})=>wy({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},QC(e)))),nw=xC("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Hb(n.size)}`]]}})((({ownerState:e})=>wy({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},QC(e)))),rw=b.forwardRef((function(e,t){const n=b.useContext(XC),r=b.useContext(JC),o=$M({props:MS(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,size:h="medium",startIcon:g,type:y,variant:v="text"}=o,x=ky(o,ZC),S=wy({},o,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:m,size:h,type:y,variant:v}),M=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return wy({},a,HS({root:["root",i,`${i}${Hb(t)}`,`size${Hb(o)}`,`${i}Size${Hb(o)}`,`color${Hb(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Hb(o)}`],endIcon:["icon","endIcon",`iconSize${Hb(o)}`]},GC,a))})(S),C=g&&wb.jsx(tw,{className:M.startIcon,ownerState:S,children:g}),w=f&&wb.jsx(nw,{className:M.endIcon,ownerState:S,children:f}),k=r||"";return wb.jsxs(ew,wy({ownerState:S,className:Gx(n.className,M.root,l,k),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:Gx(M.focusVisible,p),ref:t,type:y},x,{classes:M,children:[C,i,w]}))}));var ow=rw;var iw=b.createContext({});function aw(e){return Xx("MuiListItemButton",e)}var sw=Jx("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);const lw=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],cw=xC(KC,{shouldForwardProp:e=>bC(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>wy({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${sw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:aM(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${sw.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:aM(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${sw.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:aM(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:aM(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${sw.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${sw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),uw=b.forwardRef((function(e,t){const n=$M({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:o=!1,component:i="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=n,p=ky(n,lw),m=b.useContext(iw),h=b.useMemo((()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:l})),[r,m.dense,s,l]),g=b.useRef(null);wS((()=>{o&&g.current&&g.current.focus()}),[o]);const y=wy({},n,{alignItems:r,dense:h.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e;return wy({},n,HS({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},aw,n))})(y),x=qS(g,t);return wb.jsx(iw.Provider,{value:h,children:wb.jsx(cw,wy({ref:x,href:p.href||p.to,component:(p.href||p.to)&&"div"===i?"button":i,focusVisibleClassName:Gx(v.focusVisible,u),ownerState:y,className:Gx(v.root,f)},p,{classes:v,children:a}))})}));var dw=uw;function fw(e){return Xx("MuiListItemIcon",e)}Jx("MuiListItemIcon",["root","alignItemsFlexStart"]);const pw=["className"],mw=xC("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>wy({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),hw=b.forwardRef((function(e,t){const n=$M({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=ky(n,pw),i=wy({},n,{alignItems:b.useContext(iw).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return HS({root:["root","flex-start"===t&&"alignItemsFlexStart"]},fw,n)})(i);return wb.jsx(mw,wy({className:Gx(a.root,r),ownerState:i,ref:t},o))}));var gw=hw;function yw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yw(Object(n),!0).forEach((function(t){bw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xw=function(e){var t=e.className,n=e.path,r=e.fillRule;return v.createElement(EC,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12}},v.createElement("path",{d:n}),r?v.createElement("use",{fillRule:r}):void 0)},Sw={ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}};xC(ow,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})((function(e){var t=e.direction,n=e.padding,r=e.styling,o=r.fontSize,i=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:o,fontFamily:i,color:a,height:"100%",minWidth:"45px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}})),xC((function(e){var t=e.className;return v.createElement(xw,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})}))((function(){return{color:Sw.ICONS.COLOR.SECONDARY}})),xC((function(e){var t=e.className;return v.createElement(xw,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})}))((function(){return{color:Sw.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:Sw.ICONS.COLOR.DISABLED}}})),xC(ow,{shouldForwardProp:function(e){return"styling"!==e}})((function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,o=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:n,fontFamily:r,color:o,padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:o}}}));var Mw={color:Sw.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:Sw.ICONS.COLOR.DISABLED}};xC((function(e){var t=e.className;return v.createElement(xw,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})}))((function(){return Mw})),xC((function(e){var t=e.className;return v.createElement(xw,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}))((function(){return Mw})),xC((function(e){var t=e.className;return v.createElement(xw,{className:t,path:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"})}),{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:Sw.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"2px",marginRight:"rtl"!==t||r?void 0:"2px"}})),xC(dw)((function(){return{padding:"4px 12px","&:focus":vw({},Sw.FOCUS)}})),xC(gw)((function(){return{marginRight:0,justifyContent:"center"}})),xC((function(e){var t=e.className;return v.createElement(xw,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})}))((function(){return{color:Sw.ICONS.COLOR.SECONDARY}}));var Cw=Object.prototype.hasOwnProperty,ww=Object.prototype.toString,kw=Object.defineProperty,Tw=Object.getOwnPropertyDescriptor,Ew=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ww.call(e)},qw=function(e){if(!e||"[object Object]"!==ww.call(e))return!1;var t,n=Cw.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Cw.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Cw.call(e,t)},Lw=function(e,t){kw&&"__proto__"===t.name?kw(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ow=function(e,t){if("__proto__"===t){if(!Cw.call(e,t))return;if(Tw)return Tw(e,t).value}return e[t]};!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Ow(s,n),s!==(o=Ow(t,n))&&(u&&o&&(qw(o)||(i=Ew(o)))?(i?(i=!1,a=r&&Ew(r)?r:[]):a=r&&qw(r)?r:{},Lw(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&Lw(s,{name:n,newValue:o}));return s}));var Nw,Dw=function(e){var t=e.dock,n=e.settings.label,r="center"===t,o=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return v.createElement("span",{style:o,title:n},r?n:"* ".concat(n))},Aw={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,o=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,o=e.styling,i=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:o});return v.createElement("div",{dir:i,style:a},v.createElement(Dw,{dock:t,settings:r}))}({dock:n.dock,rect:e,settings:r,styling:o})}},Iw=T;Nw=Iw.createRoot,Iw.hydrateRoot;var Rw=BM({spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"116px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transform:"translate3d(0,0,0)"},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function Pw(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,o=n.y,i=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(o)||void 0===o?t.y:o,t.width=Number.isNaN(i)||void 0===i?t.width:i,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function zw(){var e={rendererBox:Pw(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=Pw(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=Nw(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,o=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*o),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(o,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return v.createElement(v.StrictMode,null,v.createElement(MC,{theme:Rw},t))}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}const jw={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(ue({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Fw({i:e,width:t,height:n,resolved:r,keys:o,flipXY:i,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=ue({},{major:l,majorEnd:c},r.minor.items[e]);o.forEach((t=>{d[t]=r[t].items[e]}));const f=i?n:t,p=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:o}){const i=e>=0?1:-1;let a=Math.min(i*e*t,Number.isNaN(Number(r))?o:r/o);return a=Number.isNaN(Number(n))?a:Math.max(n/o,a),a*i}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),m=(u-p)/2,h=m+d.major+p/2;return{item:d,boxCenter:h,boxWidth:p,boxPadding:m,rendWidth:t,rendHeight:n}}function _w({keys:e,data:t,defaultSettings:n,style:r,settings:o,width:i,height:a,resolver:s}){const l=ue(!0,{},n||{},r||{}),c={major:"horizontal"===o.orientation?a:i,minor:"horizontal"===o.orientation?i:a},u=o.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ue(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ue(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:o.major}});const f=o.minor||{};let p;const m={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ue(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)p=e[n],m[p]=s.resolve({data:t,defaults:l[p],settings:o[p],scaled:c});return m}const Bw=["oob"];const Hw={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:o,style:i,resolver:a,symbol:s}=this,l=_w({keys:Bw,data:o,defaultSettings:{oob:jw.getDefaultSettings()},style:i,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:o,symbol:i,dockValue:a,_calcItemRenderingOpts:s=Fw}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:f,rendWidth:p,rendHeight:m}=s({i:u,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"oob"}),h=c[u].data,g=[];if(d.oob.show){g.push(jw.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:p,rendHeight:m,flipXY:n,symbol:i}));const e={type:"container",data:h,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:u,settings:c,width:e,height:t,flipXY:r,resolved:l,keys:Bw,symbol:s,dockValue:n});return d}},$w={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Vw=["hat"];function Ww(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function Uw({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:o,flipXY:i}){let a="x",s="y",l=r,c=o,u=e.hat.alignment||0;i&&(a="y",s="x",l=o,c=r,u=1-u);const d=(n+e.major)*l;let f=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const p=ue({},e.hat,{type:"path",d:Ww(f)});f=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[p,ue({},e.hat,{type:"path",d:Ww(f)})]}const Kw={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:i}=this,a=_w({keys:Vw,data:r,defaultSettings:$w,style:o,settings:this.settings.settings,width:e,height:t,resolver:i}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:o,_calcItemRenderingOpts:i=Fw}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:p}=i({i:l,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"hat"}),m=s[l].data,h=[];c.hat.show&&h.push(...Uw({item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:p,flipXY:n}));const g={type:"container",data:m,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:Vw});return c}};function Gw(e,t,n,r){const o=function(t){const n=String(t);return e(n)};return o.ticks=()=>t.map((t=>{const i=o([t.data.value,r?n-1:0]),a=o([t.data.value,r?0:n-1])+e.bandwidth();return{position:(i+a)/2,label:t.label,data:t.data,start:i,end:a}})),o.bandwidth=()=>e.bandwidth(),o.data=()=>e.data(),o.domain=()=>e.domain(),o.pxScale=function(r){const o=e.pxScale(r);return o===e?this:Gw(o,t,n)},o}function Yw(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const o=t(e,n,r),i=o.domain(),a=o.ticks(),s=[],l=e.measureCount;return i.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),o.domain(s),Gw(o,a,l,e.invert)}))}const Xw=()=>({version:"1.35.2",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}}),Jw={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function Zw(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Qw={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=i[t]*(n>l?1:n/l),u=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function ek(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,r;let o,i,a,s,l,c;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var u;if(o=e.session.options||(null===(u=e.enigmaModel)||void 0===u?void 0:u.session.sessionConfig),!o){var d;o=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(o.url);o.host=t.hostname,o.port=t.port,o.isSecure="wss:"===t.protocol}return c=void 0!==o.secure?o.secure:o.isSecure,i=c?"https://":"http://",a=o.host||"localhost",s=o.port?`:${o.port}`:"",l=o.prefix?o.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),i+a+s+l}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await Qw.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}async function tk(e,t,n,r){var o,i,a;const{app:s,flags:l}=t,c=null===(o=e.layout)||void 0===o||null===(o=o.tooltip)||void 0===o?void 0:o.imageComponents;if(!c)return[];const[u]=c,d=u.size||"small",f=u.type||"media";let p=-1;for(let e=0;e<n.length;e++)if(n[e].cId===u.cId){p=e;break}const m=(null===(i=r.data)||void 0===i||null===(i=i.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];let h;if(-1!==p&&m[p]&&(h=m[p]),"media"===f&&null!==(a=u.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return ek(u,d,s);if("url"===f)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&Zw(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:o,imageError:s}=await Qw.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Qw.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(s,l,u,d,h);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===f&&h&&h.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(Zw(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:i,imageError:a}=await Qw.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(s,n[p],d,h)}return[]}const nk={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(tk(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},rk={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await nk.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>nk.checkIfPromisesExist({customTooltipModel:e})};const ok=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Jw.CHART.CHART_PARENT_TYPE,qId:Jw.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ik=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:Jw.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const ak={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r;const o=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",i=Jw.CHART.STYLE[o];return[{content:[e.h("div",{style:{display:"flex",width:i,height:i,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Jw.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":i,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a;const s=o,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await ak.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=Jw.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=Jw.CHART.STATE,a=ok(t,i),s=await e.createSessionObject(a),l=ik(t);if(s.id!==Jw.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var c,u,d,f;const e=n.length>0&&void 0!==(null===(c=n[0].data)||void 0===c?void 0:c.value)?[null===(u=n[0].data)||void 0===u?void 0:u.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var p,m;const e=null!==(p=n[0].data.selectionOuterDimension)&&void 0!==p?p:n[0].data.selectionDimension;if(null!=e&&null!==(m=e.source)&&void 0!==m&&m.field){var h;const t=null==e||null===(h=e.source)||void 0===h?void 0:h.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(Jw.CHART.CONTAINER_ID),g={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await o.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(f=s.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await ak.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ak.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Jw.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Jw.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function sk(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function lk(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Jw.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function ck(e){const t=lk();return e.filter((e=>t[e.id]))}const uk={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const c=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=uk.getAttrExprData(a);i.length||n.length?rk.handlePromises({customTooltipModel:o,nodes:uk.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&ak.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>rk.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(i=i.qDimensionInfo)||void 0===i||null===(i=i[t])||void 0===i?void 0:i.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[Jw.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Jw.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[Jw.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(ck(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[Jw.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Jw.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=sk(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===ck(o).length){var i;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(i=i.quarantine)||void 0===i?void 0:i.customTooltip)||[],n=[...o,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=sk(e)||[];[...o,t].forEach((e=>{const t=ck(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=lk(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:je.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=je.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function dk(e,t,n,r){var o;const i=(null===(o=t.qHyperCube)||void 0===o||null===(o=o[n])||void 0===o||null===(o=o[r])||void 0===o?void 0:o.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(i.forEach(((e,t)=>{const o=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case Jw.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Jw.CUSTOM.TITLE:case Jw.CUSTOM.DESCRIPTION:case Jw.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),a):a}const fk={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>dk(t,e,r,n)}}};const pk={getCustomAttrExps(e,t,n){var r;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(i))return o;return function(e,t,n,r){const o={[Jw.CUSTOM.TITLE]:!0,[Jw.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=uk.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===Jw.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===Jw.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,i.map((t=>Fe.getMeasure(e,t))),e,o)}};function mk({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(pk.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function hk(e){const t=Jw.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}}function gk(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}const yk={migrateProperties(e){var t,n;const r=ue(!0,{},e),o=(null===(t=r.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let i=gk(r);return i=function(e,t){return t.concat(e.map((e=>hk(e))))}(o,i),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(i,r),null===(n=r.tooltip)||void 0===n||delete n.data,r},getPatches(e){var t,n;const r=(null===(t=e.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[],o=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,i=function(e,t,n){let r=e.length;const o=[];return t.forEach((e=>{const t=hk(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:i}),r++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(gk(e),r,o);return i},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise((n=>{var r,o,i;const a=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],s=(null===(o=t.tooltip)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.qHyperCube)||{},l=null===(i=t.qMeta)||void 0===i||null===(i=i.privileges)||void 0===i?void 0:i.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}));return n}};var vk={attrExpr:yk},bk=7005;const xk=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk},Sk=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&Me.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},Mk=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&Me.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&Me.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},Ck=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},wk=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;Mk(e,n)}return r})):t.getField(r.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(Mk(e,t),r)))),(()=>r))}return Sk(e),Promise.resolve()};function kk(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?i(e,"color.persistent",!0):"byDimension"===r&&n.length>1?i(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?i(e,"color.mode","primary"):0===t.length&&n.length>0&&(i(e,"color.byMeasureDef",void 0),i(e,"color.byDimDef",void 0),1===n.length&&i(e,"color.mode","primary"))}const Tk=(e,t)=>{kk(t),Ft(e),uk.addCallbackCustomTooltip(t)},Ek=e=>{kk(e)};function qk({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r,o){let i;const a=null!=o&&o.layout?o.layout.qHyperCube.qDimensionInfo.filter((e=>xk(e))).length:t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>a-1?i="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?i="Visualizations.Descriptions.Stack":(i="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):i="Visualizations.Descriptions.Bars",e.get(i)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=n&&n.app?wk(t,n.app).then((()=>(Tk(e,t),e))):(Ck(t),Tk(e,t),e)),move(e,t,n){const r=n.layout.qHyperCube.qDimensionInfo.filter((e=>xk(e))).length;r>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),Sk(t),kk(t),uk.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;kk(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),uk.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){uk.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?wk(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,Ek(t),e))):(Ck(t),Ek(t),e),move(e,t){Sk(t),kk(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;kk(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function Lk(e){return{properties:Xw(),data:{targets:[{path:"/qHyperCubeDef",...qk(e)}]}}}var Ok={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};const Nk="REJECTED",Dk=()=>{},Ak=1e4,Ik={MULTIPLIER:2,MINIMUM:20,MAXIMUM:200},Rk=50,Pk=10,zk=100;var jk={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),o=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,o-e.qArea.qTop),s=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,i-e.qArea.qLeft),c=Math.min(i+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:o,qLeft:i},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-Pk<=t.qTop,o=n.qLeft+n.qWidth+Pk>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+Pk>=t.qTop+t.qHeight,a=n.qLeft-Pk<=t.qLeft;return r&&t.qTop>0||o&&t.qLeft+t.qWidth<e.width||i&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var Fk={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),i=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-i),l={qArea:{qHeight:a-i,qWidth:e.qArea.qWidth,qTop:r,qLeft:o},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=i;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-Pk<=t.qTop,o=n.qTop+n.qHeight+Pk>=t.qTop+t.qHeight;return r&&t.qTop>0||o&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var _k={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const Bk="pages";const Hk="discretePan",$k=10;function Vk({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:Hk,pointers:1,threshold:$k,enable(r,o){return this.started===Hk||!o||!(!t.scroll.enabled()||!i.enabled())&&e.componentsFromPoint({x:o.center.x,y:o.center.y}).some((e=>e.key===n))}},events:{[`${Hk}start`](e){e.preventDefault(),this.started=Hk;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-$k:$k},[`${Hk}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&o?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,i.scroll(s)},[`${Hk}end`](e){e.preventDefault(),this.started=!1},[`${Hk}cancel`](e){e.preventDefault(),this.started=!1}}}}function Wk({chart:e,componentKey:t,actions:n,scroller:r}){return function(o){if(!n.scroll.enabled()||!r.enabled())return;const[i]=e.componentsFromPoint({x:o.clientX,y:o.clientY}).filter((e=>e.key===t));if(!i)return;o.preventDefault();const a=Math.abs(o.deltaY)>Math.abs(o.deltaX)?o.deltaY:o.deltaX,s=Math.sign(-a)*zk;r.scroll(s)}}function Uk({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(Ak/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(Ik.MAXIMUM,n));return{width:e,height:Math.max(Ik.MINIMUM,Math.min(n*Ik.MULTIPLIER,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:o}=t({width:e.qWidth,height:e.qHeight}),i=o?Math.ceil((o-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:o?Math.min(o,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-i,n.height-o)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function Kk(e){let t,n;const r=o=>{t=o;const{method:i,args:a}=t.request;e[i](...a).then((e=>{if(t.canceled||n)return t.reject(Nk),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},o=e=>new Promise(((o,i)=>{const a={request:e,resolve:o,reject:i,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(Nk),n=e})(a):r(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(Nk),n=null)},o}const Gk={command:{update:()=>{}}};var Yk={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=o/r;return[a,n.inView>=n.inTotal?a+1:a+i.qArea.qWidth/n.inView]}};var Xk={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=void 0===r?4:r,i=Math.max(0,Math.floor(t)-o/2);return{qTop:i,qHeight:Math.min(e.meta.size.y-i,Math.max(0,Math.ceil(n+o))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=r/n.inView,s=(o+i.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+i.qArea.qHeight/n.inView]}};function Jk(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function Zk(e,t){const n=[];for(let r=0;r<e.length;r++){const o=t(e[r]);-1===n.indexOf(o)&&n.push(o)}return n.length}function Qk(e){return Zk(e.qMatrix,(e=>e[0].qElemNumber))-1}var eT={inTotal:function({layoutService:e}){const t=Jk(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=Jk(e),i=void 0===r?o:r,a=t/(o+1),s=Math.max(0,Math.floor((t-a-i/2)/o));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+i)/o+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const o=Jk(e),i=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=Qk(i),c=i.qArea.qHeight*o+l,u=(s+(i.qArea.qTop*o+i.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const tT=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1),nT=(e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const o=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const i=e[t][0].qElemNumber;-1===o.indexOf(i)&&(o.push(i),r--)}return n.count=o.length-1,n};function rT(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return tT(e,n);const r=nT(t.qMatrix,n);return r.successful?r.count:tT(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return tT(e,n);return Zk(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var oT={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const o=rT(t).itemOffset(e(),n),i=Math.max(0,Math.floor(n-o));return{qTop:i,qHeight:Math.min(t.meta.size.y-i,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:o,upperBound:i}){const a=t.getDataPages()[0],s=o/r.inView,{item:l,pixel:c}=n,u=rT(t).area(e(),l,a.qArea),d=Qk(a),f=a.qArea.qHeight+d,p=c===i?(r.inView-f)*s/o:(c+(a.qArea.qTop+u)*s)/o;return[p,r.inView>=r.inTotal?p+1:p+f/r.inView]}};function iT({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:o,renderer:i,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:f,LABELLESS:p}=r[n.meta.chart.mode],m="horizontal"===n.meta.major.orientation,{axisDisplayMode:h="auto",maxVisibleItems:g=10,label:y}=s,v=m?t.width:t.height,b=v/l>=f;switch(h){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/p:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:o,itemSize:i,label:a}){if(o||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:f}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return f>i;const p=(90-d)*(Math.PI/180);return f>Math.cos(p)*i}({chart:e,isHorizontal:m,axisKey:o,renderer:i,isGrouped:a,itemSize:f,label:y})?v/d:l:v/d}}var aT="AVERAGE",sT="LINEAR",lT="POLYNOMIAL2",cT="POLYNOMIAL3",uT="POLYNOMIAL4",dT="EXPONENTIAL",fT="LOG",pT="POWER";function mT({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:o}=n,i={x:e,y:o[2]*t**2+o[1]*t+o[0]};switch(r){default:case lT:return i;case cT:return i.y+=o[3]*t**3,i;case uT:return i.y+=o[4]*t**4+o[3]*t**3,i}}var hT={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:mT,polynomial3:mT,polynomial4:mT,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};const gT=500;function yT(e,t){const n=hT[t.qType.toLowerCase()],r=Math.max(1,e/gT);let o=1/0,i=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});o=Math.min(e,o),i=Math.max(e,i)}return{min:o,max:i}}const vT=100;function bT(e){return hT[e.qType.toLowerCase()]}function xT(e,t){return e.meta.isContinuous?function(e,t){return{generate:(e,n,r)=>{const o=[],i=bT(e),{min:a,max:s}=t.get("zoom"),l=(s-a)/vT;if(l>0){const t=t=>{const a=i({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=r,a.dimValue=t,o.push(a)};let c=a;for(let e=a;e<=s;e+=l)t(e),c=e;c!==s&&t(s)}return o},calculate:(e,t)=>bT(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map((({y:e})=>e));return{min:Math.min(...n),max:Math.max(...n)}}}}(0,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const o=[],i=e.getDataPages()[0],a=i.qData[0].qSubNodes,s=i.qArea.qTop,l=hT[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const i=a[e],c=l({dimValue:i.qElemNo,value:e+s+1,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=i.qText,o.push(c)}return o},findMinMax:yT}}(e):function(e){return{generate:(t,n,r)=>{const o=[],i=e.getDataPages()[0],a=i.qMatrix,s=i.qArea.qTop,l=hT[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const i=a[e][0],c=e+s+1,u=l({dimValue:i.qElemNumber,value:c,qTrendLine:t});u.layerId=n,u.measureIndex=r,u.dimValue=i.qText,o.push(u)}return o},calculate:(e,t,n)=>(0,hT[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:yT}}(e)}var ST={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},MT={color:"#f93f17",index:9};const{isDark:CT}=jt,wT={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},kT=({layoutService:e,viewState:t,colorModel:n,chart:r,env:o,keys:{colorScale:i},isEnabled:a=(()=>!1)})=>{const{translator:s}=o,l=[wT],c=[],d=[],f=xT(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach(((e,t)=>{Array.isArray(e.qTrendLines)&&(c.push(...e.qTrendLines),d.push(...e.qTrendLines.map((()=>t))))}));const p=u((e=>{const{style:t}=c[e]||{},o=n.settings();if(t.autoColor){if("measure"===o.mode){const t=d[e],n=r.scale(i)(t);return CT(n)?function(e){const t=Rt(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=Rt(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(MT)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"}));return{query:{hasTrendLines:()=>!!c.length&&a(),getData:()=>l,getStroke:p,getLineDash:e=>{const{style:t}=c[e]||{};return t.lineDash},getLabel:e=>(c[e]||{}).label,getType:e=>{const{qType:t}=c[e]||{};return s.get(ST.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return c.forEach((r=>{const o=f.findMinMax(e.meta.size.y,r);t=Math.min(o.min,t),n=Math.max(o.max,n)})),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=c[e];return f.calculate(r,t,n)}},command:{update:()=>{l.length=0,c.forEach(((e,t)=>{const n=f.generate(e,t,d[t]);l.push(...n)}))}}}};var TT={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const ET=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,qT=(e,{layoutService:t,trendLineModel:n,dockService:r,animationsEnabled:o})=>{if(!n.query.hasTrendLines())return[];const i=(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:o,animationsEnabled:i})=>{const a=ET(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:TT,settings:{connect:!0,orientation:o.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:i,trackBy:ss.nonUpdatingNode.trackBy,compensateForLayoutChanges:ss.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:r,animationsEnabled:o}),a=(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:o})=>{const i=ET(r),a="horizontal"===o.meta.major.orientation,s={scale:e,fn:i},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:TT,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r});return[i,a]};function LT(e,t){const{getLabel:n,getType:r,getLineDash:o,getStroke:i}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:i(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":o(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}const OT=16,NT=2;function DT(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((t=>e("span",{style:t.style,direction:je.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:`${OT}px`,x2:`${OT}px`,y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:`0 0 ${OT} ${OT}`},t)}(e):t.content}function AT(e,t){return({h:n,data:r,style:o})=>{const i=r[0].title,a=r.filter((e=>e.title===i)),s=function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:je.detectTextDirection(t)},t);return e("tr",{},n)}(n,i),l=[s];if(a.slice(0,NT).forEach((e=>{l.push(n("tr",{},function(e,{h:t,style:n}){return e.map((e=>{const r={style:{direction:"string"==typeof e.content?je.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const o=DT(t,e);return t("td",r,o)}))}(e.row,{h:n,style:o})))})),r.length>NT){const o=r.length-NT;l.push(...function(e,t,n,r){const o=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,i=je.detectTextDirection(o);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:i},colspan:3},o))]}(n,e,t,o))}return l}}function IT(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:o}=r,i=Ie({key:e.tooltip,rtl:o});return ue(!0,i,{settings:{extract:LT(e,t),content:AT(n,o),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function RT(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function PT(e,{chart:t,viewState:n,trendLineModel:r,layoutService:o,rtl:i}){const{isContinuous:a}=o.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=RT(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:o}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=RT(r,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const r=function(e,t,n,r){let o=(e.x-t.rect.computed.x)/t.rect.computed.width;o=r?1-o:o;const{min:i,max:a}=n.get("zoom");return i+(a-i)*o}(l,a,n,i),s=t.scale(e.majorInnerScale),u=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);c.forEach((e=>{e.data.dimValue.value=r,e.data.dimValue.label=u,e.data.minor.value=o(e.data.layer.value,r).y}))}return c}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some((t=>t.key===e.tooltipOverlay)))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const zT=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},jT=e=>{zT(e),e.qMultiDimMode="Sum",e.qXColIx=0};function FT(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!Te.dimensionless(n)&&!Te.groupedByDimension(n)&&(r||!Te.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:ST.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(ST.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:ST.ADD_BUTTON,add:jT,globalChange:e=>{const t=o(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),r=(e=>!o(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=r})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:ST.TYPE,options:[{value:aT,translation:ST.TYPES.AVERAGE},{value:sT,translation:ST.TYPES.LINEAR},{value:lT,translation:ST.TYPES.POLYNOMIAL2},{value:cT,translation:ST.TYPES.POLYNOMIAL3},{value:uT,translation:ST.TYPES.POLYNOMIAL4},{value:dT,translation:ST.TYPES.EXPONENTIAL},{value:fT,translation:ST.TYPES.LOG},{value:pT,translation:ST.TYPES.POWER}],defaultValue:aT},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:MT,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:ST.STYLE.DASHED,type:"boolean",defaultValue:!0,change:zT}}}}var _T={};function BT(){BT.init.call(this)}_T.isObject=function(e){return"object"==typeof e&&null!==e},_T.isNumber=function(e){return"number"==typeof e},_T.isUndefined=function(e){return void 0===e},_T.isFunction=function(e){return"function"==typeof e};var HT=BT;BT.EventEmitter=BT,BT.prototype._events=void 0,BT.prototype._maxListeners=void 0,BT.defaultMaxListeners=10,BT.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},BT.prototype.setMaxListeners=function(e){if(!_T.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},BT.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],_T.isUndefined(n))return!1;if(_T.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(_T.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},BT.prototype.addListener=function(e,t){var n;if(!_T.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,_T.isFunction(t.listener)?t.listener:t),this._events[e]?_T.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,_T.isObject(this._events[e])&&!this._events[e].warned)&&((n=_T.isUndefined(this._maxListeners)?BT.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,_T.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),_T.isFunction(console.trace)&&console.trace()));return this},BT.prototype.on=BT.prototype.addListener,BT.prototype.once=function(e,t){if(!_T.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},BT.prototype.removeListener=function(e,t){var n,r,o,i;if(!_T.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||_T.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(_T.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},BT.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],_T.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},BT.prototype.listeners=function(e){return this._events&&this._events[e]?_T.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},BT.listenerCount=function(e,t){return e._events&&e._events[t]?_T.isFunction(e._events[t])?1:e._events[t].length:0};var $T=Q(HT);const VT={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const WT=e=>(Object.keys($T.prototype).forEach((t=>{e[t]=$T.prototype[t]})),$T.init(e),e);var UT={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},KT={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"},STYLING:{AXIS:"axis"}};function GT({layout:e}){const t=xe.canBeContinuous(e),n=Te.continuous(e),r=Te.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:xe.isTime(n,e),isDimensionless:r,isSimple:Te.simple(e),isGrouped:Te.grouped(e),isGroupedByMeasure:Te.groupedByMeasure(e),isGroupedByDimension:Te.groupedByDimension(e),isStacked:Te.stacked(e),isStackedByDimension:Te.stackedByDimension(e),isStackedByMeasure:Te.stackedByMeasure(e),isSnapshot:Te.snapshot(e)}}const YT={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===KT.COMPONENT.BAR){n=e;const r=o(e,"data.selectionDimension",!1);r&&(t.push(r.label),r.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function XT({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:o}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==o.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function JT({chart:e,actions:t,selections:n}){const r=e.scale(KT.SCALE.MAIN.MAJOR);return d({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:XT},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}const ZT=e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}};function QT({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function eE({app:e,model:t,translator:n,picasso:r,localeInfo:o,theme:i,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:c}){const{isContinuous:u,isStacked:d}=s.meta,p={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const m=[],{isReduced:h}=c.model().mode,g=u||h||d,y=!u&&(h||d)&&l?l.getHyperCube():void 0,v=y?"legendCube":void 0;return p.main=f({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:o,auto:QT,key:KT.SCALE.MAIN.COLOR},createConfig:()=>({hc:g?y||s.getHyperCube():c.model().cube,source:g?v:"miniCube",theme:i})}),m.push(p.main.initialize()),u&&(p.mini=f({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:o,auto:QT,key:KT.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:i})}),m.push(p.mini.initialize())),Promise.all(m)},getMain:()=>p.main,getMini:()=>p.mini}}function tE(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function nE(e){return e.some(tE)}function rE(e,t){let n=NaN,r=NaN;return e.forEach((e=>{nE(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))}))})),{min:n,max:r}}function oE(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function iE(e,t){let n=NaN,r=NaN;return e.forEach((e=>{if(!nE(e)){let o=0,i=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?i+=e.qNum:o+=e.qNum)})),n=Number.isNaN(n)?o:Math.min(o,n),r=Number.isNaN(r)?i:Math.max(i,r)}})),{min:n,max:r}}function aE(e,t){const n={};e.forEach((e=>{if(!nE(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)}))}}));let r=NaN,o=NaN;return Object.keys(n).forEach((e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),o=Number.isNaN(o)?n[e].max:Math.max(n[e].max,o)})),{min:r,max:o}}function sE(e){return"number"==typeof e&&!Number.isNaN(e)}function lE(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>sE(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>sE(e.qMax))).map((e=>e.qMax)))}}function cE(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function uE(e){return!Number.isNaN(+e.qNum)}function dE(e){return e.qNum}function fE(e){return!Number.isNaN(+e.qNum)}function pE(e){return e.qNum}function mE(e,t){return e.push(...t),e}const{getValueWithOffset:hE,isNumber:gE}=ba,yE=5,vE=.2;function bE(e,t){return Math.abs(e/t)<yE||0===t}function xE({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=iE,stackedByDimensionExtractor:i=aE,straightExtractor:a=rE,measureInfoExtractor:s=lE,explicitExtractor:l=oE}=n,{meta:c}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:o}){let i,a;if(Array.isArray(n)?({min:i,max:a}=this.extractFromStacked(n)):({min:i,max:a}=this.extractFromStraight(e,o)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();i=Number.isFinite(e)?Math.min(i,e):i,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),c=this.extractExplicit(),u=[0,i,a].filter((e=>gE(e)));let d=Math.min(...u),f=Math.max(...u);d=bE(s,d)?Math.min(d,s):d,f=bE(l,f)?Math.max(f,l):f;const p=[c.explicitMin,c.explicitMax,d,f].filter((e=>gE(e)));return i=Number.isNaN(c.explicitMin)?Math.min(...p):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...p):c.explicitMax,i===a&&(Number.isNaN(c.explicitMin)?i=hE(i,-vE):Number.isNaN(c.explicitMax)&&(a=hE(a,vE))),{min:i,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<i,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:o}=l(e);return{hasExplicitMinMax:r||o,hasExplicitMin:r,hasExplicitMax:o,explicitMin:t,explicitMax:n}},extractFromStacked(e){const t=e.length?e[0].qData:[];return(n=t).length?{min:Math.min(...n[0].qSubNodes.map((e=>e.qMinNeg))),max:Math.max(...n[0].qSubNodes.map((e=>e.qMaxPos)))}:{min:0,max:0};var n},extractFromStraight(t,n){const o=t.length?t[0].qMatrix:[];return c.isStackedByMeasure?r(o,n):c.isStackedByDimension?i(o,n):e.getHyperCubeValue("qHasOtherValues")?a(o,n):s(e)},extractOthers:e=>c.isStackedByDimension?function(e){const t=cE(o(e,"0.qData.0.qSubNodes",[]),tE,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):c.isGroupedByDimension?function(e){const t=o(e,"0.qMatrix",[]).filter(nE).reduce(mE,[]).filter(fE).map(pE);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=cE(o(e,"0.qMatrix",[]),nE,[]).filter(uE).map(dE);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function SE(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:o}=t,i=e=>!e.length&&r.mode.K,a=e=>{const t=o("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=o("qMeasureInfo").length,s=o("qDimensionInfo").length,l=o("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const c=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(i(e))return a(l);let t=[];return l&&(t=r.mode.K?o("qStackedDataPages",[]):o("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}}(e),n=xE(e);return t.resolve().then((e=>n.extract(e)))}const ME=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}),CE="lasso",wE=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},o)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:CE,enable(e,n){if(this.started===CE||!n)return!0;if(!o.actions.select.enabled()||!o.actions.lasso.enabled()||!o.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==CE&&(o.actions.select.emit("start",CE),this.chart.component(e).emit("lassoStart",t),this.started=CE)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",CE),"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});const kE=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:o="tap"},i)=>{let a;const s=i.customTooltipModel?i.customTooltipModel.utils:void 0,l=s?i.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:o,interval:10,pointers:1,enable(t,n){return!n||!(!i.actions.select.enabled()&&!i.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[o](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}(t,this.chart),c=i.hitRadius?i.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=i.shapesAt?i.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),f=this.chart.component("tooltip"),p="mouse"!==t.pointerType&&f&&f.show;if(!i.isLocked(a)&&!i.tooltipOnly&&i.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1,i.actions.select.emit("start",o,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),i.actions.select.emit("end",o),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:i.largeDataService,chart:this.chart})}}if(f&&i.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=i;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:i,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else p&&f.emit("hide")}}}};const TE=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},o)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!o.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const EE=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:o},i,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:o,options:{event:e,enable(r,o){if(this.started===e||!o)return!0;if(!i.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:o.center.x,y:o.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(o,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),i.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),i.actions.select.emit("end",e),this.started=!1,"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});function qE(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:o,targetFillSelector:i,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:f?{bubbleEnd(){f()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:o,fillSelector:i,fill:"rgba(82,204,82,0.2)"}}}}(e),r=EE(e,t,"range");return{interactions:[e.onEdited?TE(e,t):null,r].filter(Boolean),components:[n]}}const LE={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},OE="inner-time-axis",NE="outer-time-axis";const DE={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:r=0,qOption:o=0,qSelected:i=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?r+o+i:n}},AE={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=DE.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?o(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=AE.getAxisData(e,t),r=!e.qDimensionInfo.length,o=r||t?void 0:e.qDimensionInfo.length-1,i=AE.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return Ne.getAdjustedMaxGlyphCount(i,n,o,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=AE.getAxisData(e),n=DE.getMaxGlyphCount(e,0);return Ne.getAdjustedMaxGlyphCount(n,t,0)}};var IE={LOWERGLYPHCOUNT:3,UPPERGLYPHCOUNT:13};function RE(e,t,n,r){const{meta:o}=t.layoutService,i=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);o.isContinuous?i.push(...function(e,t,n,r){const{meta:o}=t.layoutService,{axis:i,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:c}=t.layoutService.getLayoutValue("gridLine",{}),u=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,f=LE[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode,p={type:"grid-line",x:{},layout:{minimumLayoutMode:LE.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:ss.lines.trackBy,compensateForLayoutChanges:ss.lines.compensateForLayoutChanges}},m=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(o.isTime){if(d){const e=n?"end":"start",r=n?1:0,o="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:i.line.major.color},minorGuideLine:{stroke:i.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:o,justify:r},guideLine:{major:{justify:r},minor:{align:o}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:ss.axes.trackBy({isTime:!0}),compensateForLayoutChanges:ss.axes.compensateForLayoutChanges({isTime:!0})}};u.push(ue(!0,{},d,{key:OE,scale:KT.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:ue(!0,{},a,{line:{stroke:i.line.major.color},majorGuideLine:{stroke:i.line.minor.color},minorGuideLine:{stroke:i.line.major.color}})})),u.push(ue(!0,{},d,{key:NE,scale:KT.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:KT.SCALE.MAIN.MAJOR,layout:{dock:`@${NE}`,minimumLayoutMode:f}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:KT.SCALE.MAIN.MAJOR_INNER,layout:{dock:`@${OE}`,minimumLayoutMode:f}}),u.push(m)}return u.push(ue(!0,{},p,{key:"inner-time-grid",x:{scale:KT.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(ue(!0,{},p,{key:"outer-time-grid",x:{scale:KT.SCALE.MAIN.MAJOR}})),u}if(o.isContinuous){const e="continuous-axis";d&&(u.push({type:"axis",key:e,renderer:Ss(t.flags),scale:KT.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:i.line.major.color},line:{show:!r},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:ss.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:ss.axes.compensateForLayoutChanges({isContinuous:!0})}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:KT.SCALE.MAIN.MAJOR,layout:{dock:`@${e}`,minimumLayoutMode:f}}),u.push(m)),u.push(ue(!0,{},p,{key:"continuous-grid",x:{scale:KT.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):i.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:o}=t.layoutService,i=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),c="horizontal"===t.dockService.meta.major.orientation,u=c?e.dimensionAxis.label:"auto",d="horizontal"===u?void 0:t.dockService.meta.minor.size/4,f=t.styleService.axis.label.getStyle(),p={type:"axis",renderer:Ss(t.flags),layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:LE[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...f},line:{show:!r,stroke:i.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:ss.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:ss.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(ue(!0,{},p,{key:"group-axis",scale:KT.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":p.settings.labels.mode,maxGlyphCount:AE.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&p.settings.line.show}}}));const m=AE.getBarAxisMaxGlyphCount(e.qHyperCube,o.isStackedByDimension);return s&&a.push(ue(!0,{},p,{key:KT.COMPONENT.BAR_AXIS,scale:KT.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:m,maxLengthPx:d,tiltThreshold:m>IE.LOWERGLYPHCOUNT&&m<IE.UPPERGLYPHCOUNT?1:void 0},line:{show:!(c&&l)&&p.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&i.push({type:"axis",key:"y-axis",renderer:Ss(t.flags),formatter:KT.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:LE.measureAxis.minimumLayoutMode},scale:KT.SCALE.MAIN.MINOR,settings:{labels:{show:s,...c},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:ss.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:ss.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),i}var PE={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};const zE=.7,jE=.9;function FE({layoutService:e,discrete:t,componentKey:n}){var r;const{isContinuous:o,isGrouped:i}=e.meta;if(o)return 1;const a=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(null!=a&&null!==(r=a.style)&&void 0!==r&&r.width){const{style:e}=a;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=PE.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return i?jE:zE}const _E={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function BE(e,t,n={}){return({data:r})=>{const o=e.chart.component(t).rect;if(!r.items.length||!o)return 2;const{min:i,max:a}=e.viewState.get("zoom");if(n[[i,a]])return n[[i,a]];const s=_E[ge.getLayoutMode(o.width,Number.MAX_VALUE)];n={};const l=Math.abs(a-i),c=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===c)return s;const u=function(e,t,n){return e*(1-n)+t*n}(2,s,1-Math.min(l/c/.2,1));return n[[i,a]]=Math.max(2,Math.min(s,u)),n[[i,a]]}}function HE(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function $E(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function VE(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function WE(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const UE={MAX:"max",MIN:"min"},KE={min:"Min",max:"Max"};function GE(e,t,n){return void 0===n?HE(e,t)||$E(e,t):n===UE.MAX?HE(e,t):$E(e,t)}function YE({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e[`hasExplicit${KE[t]}`]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===UE.MAX?e.implicitMax:e.implicitMin;return!GE(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function XE(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:o,dockService:i,themeService:a}=e,s=o.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===UE.MAX?s.implicitMax:s.implicitMin;if(!GE(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===UE.MAX?i.meta.minor.end:i.meta.minor.start;let d="end";r&&(d=n===UE.MAX?"sumOfPositives":"sumOfNegatives");const f=a.getStyles();return{type:"box-out-of-bounds",key:`bar-oob-${n}`,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:c,major:t.settings.major,minor:t.settings.minor,dockValue:Le.getDockValue(u),oob:ue({},t.settings.box,{fill:f.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!r||0!==e.datum[d].value)&&GE(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:ss.barOobs.compensateForLayoutChanges}}}function JE(e){return Math.min(Math.max(0,e),1)}const ZE=(e,{chart:t,type:n,componentKey:r,collectionKey:o})=>{const{layoutService:i,dockService:a,viewCache:s}=e,{isStacked:l}=i.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!YE({minorMinMax:c,type:n}))return!1;let d;u.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:u.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);const f={type:"box",key:`${KT.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:o},settings:{orientation:a.meta.minor.orientation,major:{scale:KT.SCALE.MAIN.MAJOR,fn:d},minor:{scale:KT.SCALE.MAIN.MINOR,start(e){var n;return JE(t.scale(KT.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(n=n.start)||void 0===n?void 0:n.value)||0))},end(e){const r=t.scale(KT.SCALE.MAIN.MINOR);let o="end";l&&(o="max"===n?"sumOfPositives":"sumOfNegatives");const i=e.datum[o]?e.datum[o].value:r[n]();return JE(r(i))}},box:{width:FE({layoutService:e.layoutService,discrete:e.discrete,componentKey:r}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(KT.SCALE.MAIN.MINOR);let o="end";l&&(o="max"===n?"sumOfPositives":"sumOfNegatives");const i=e.datum[o]?e.datum[o].value:r.max();return"max"===n?i>r.max():i<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return f};function QE(e,t){const{style:n,styleService:r,dockService:o}=t,i=r.label.getStyle(),a=i.useContrastColor&&!e.onBackground?function(e){return function(t){return jt.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n):i.fill,s="horizontal"===o.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function eq(e){return{placements:e.simplifiedPlacements.map((t=>QE(t,e))),label:e.label}}function tq(e,t){if(t){if(function(e,t){return HE(e,t)}(e,t))return-1;if(function(e,t){return $E(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}const nq="vertical",rq="horizontal";function oq(e,t,n,r){const o=tq(e,r);let i="up";return t===nq&&o<0?i="down":t===rq&&(i=o>=0&&!n||o<0&&n?"right":"left"),i}function iq(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:o}=t.layoutService.meta;return!r||!o&&!!n.showSegmentLabels}function aq(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:o}=t.layoutService.meta;return!!r&&(!!o||!1!==n.showTotalLabels)}function sq(e,t,n,r){const o=[];return void 0!==e&&(o[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(o[t]={position:"inside",onBackground:!1,justify:n}),o}function lq({layout:e,component:t,minorScale:n},r,o){if(!iq(e,r))return!1;const{viewModel:i,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=r,{meta:d}=l,f=s.get("minorMinMax"),p=u.getStyles(),m=r.styleService.label.getStyle();let h;!d.isStacked&&(h=d.isStacked?1:0);const g=0===h?1:0,y=d.isStacked?.5:1,v=i.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,S=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>S?b(e.data.segment.value):""}:function(e){return e.data.end.label};const M={label:x,simplifiedPlacements:sq(h,g,y,d.isContinuous),style:p.label.value},C=[eq(ue(r,M))],w={component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>oq(e.data.end.value,c.meta.minor.orientation,o,f),labels:C,fontSize:parseInt(m.fontSize,10),fontFamily:m.fontFamily,linkData:ss.labels.linkData}}},k=[w],T={key:"bar-labels",type:"labels",renderer:Ss(r.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:k},animations:{enabled:r.viewModel.animations.enabled,trackBy:ss.labels.trackBy,compensateForLayoutChanges:ss.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(T.beforeRender=()=>{S=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",o=t.chart.component(e),i=o&&o.rect?o.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/i}(t,r,n)}),T}const cq={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let r;return t.isStackedByDimension?r=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(r=n.group?n.group.label:void 0),void 0!==r?`${n.label}, ${r}`:n.label},getMeasure(e,t,n,r,o){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const i=t.data,a=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:i.measureIndex.value]:void 0,s=n.isStacked?{source:{key:i.source.key,field:a},label:!0===(null===(l=i.null)||void 0===l?void 0:l.value)?"":n.isStackedByDimension&&o?o(i.segment.value):i.segment.label}:i.end;var l;return Fe.getMeasure(e,s)},getMeasures(e,t,n,r,o){const i=e.resources.dataset;return t.map((e=>cq.getMeasure(i,e,n,r,o))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const r=e.resources.dataset;return mk({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData(e,t,n,r,o){const i={title:cq.getTitle(t,n),color:Fe.getColor(e,t,r),measures:cq.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,o)};if(cq.useCustomTooltip(r)){var a,s;const n=cq.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);i.customMeasures=n.customTooltipAttrExpsArr,i.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===Jw.CUSTOM.TITLE)),i.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===Jw.CUSTOM.DESCRIPTION));let o=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((e=>{var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(o=e.data.customTooltipImages)})),o.length>0&&(i.customImages=o);const d=r.layoutService.getLayout();var l,c,u;if(null!==(a=d.tooltip)&&void 0!==a&&null!==(a=a.chart)&&void 0!==a&&null!==(a=a.object)&&void 0!==a&&a.refId&&r.app&&r.customTooltipModel.embed&&"function"==typeof(null===(s=r.customTooltipModel.model)||void 0===s?void 0:s.getEffectiveProperties))if(null!==(l=(c=r.app).isInModalSelection)&&void 0!==l&&l.call(c)){if((null==d||null===(u=d.qHyperCube)||void 0===u||null===(u=u.qDimensionInfo)||void 0===u?void 0:u.length)>0){ak.destroyVisualization({customTooltipModel:r.customTooltipModel});const e=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");i.customLimitation=e}}else{const t=ak.createContainer({ctx:e,layout:d});i.customChart=t}}return i},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData(e,t,n){const r=e.data.label,o=[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:`${cq.getTotalStackTitle(e,t)}`,value:n?n(e):e})));return{title:r,measures:o}},extractTooltipData(e,t){const n=t.chart.formatter(KT.FORMATTER.MINOR),{meta:r}=t.layoutService,o=e.node.childrenNodes?e.node.childrenNodes:[e.node],i=Math.max(0,o.length-6);o.length=Math.min(o.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>cq.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:o.map((o=>cq.extractBarTooltipData(e,o,r,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:i}},extractBarNodeData(e,t,n,r,o,i,a){let s=!o&&Fe.getTitleRow(t,r);const l=Fe.hideColorRow(t,n),c=!i&&!l&&Fe.getColorRow(e,t,r),u=t.measures.map((o=>!a&&Fe.getMeasureRow(o,e,t,r,l&&o.field===n.coloring.field))),d=u.filter((e=>!cq.isSameMeasureAndColorRow(e,c,r)));if(cq.useCustomTooltip(n)){const n=o?[]:t.customMeasures.map((n=>Fe.getMeasureRow(n,e,t,r,!1))),i=!(!t.customTitle[0]||o)&&Fe.getTitleRow(t.customTitle[0],r),a=!(!t.customDescription[0]||o)&&Fe.getDescriptionRow(t.customDescription[0],r);s=!cq.shouldIgnoreTitleRowForCtt(i,a,d,n)&&s;const l=[i,a,s,c,...d,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(uk.getFooterRow(t.customLimitation,r)),t.customImages){const n=t.customImages.map((t=>uk.getImageRow(t,e)));l.push(...n)}return l.filter(Boolean)}return[s,c,...d].filter(Boolean)},extractStackTotalBarNodeData(e,t,n){const r=!!t.measures.length&&Fe.getTitleRow(t,n),o=t.measures.map((r=>Fe.getMeasureRow(r,e,t,n,!1)));return[r,...o].filter(Boolean)},useCustomTooltip:e=>o(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,r)=>!1===n[0]&&0===r.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some((e=>e.field===n.coloring.field)),shouldIgnoreDefaultRows:(e,t)=>cq.useCustomTooltip(t)&&o(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,r){const{meta:o}=t.layoutService,i=t.layoutService.getLayout(),a=r.length;let s,l,c=[];const u=cq.shouldIgnoreDefaultRows(i,t);for(s=0;s<a;s++){l=r[s];const i=cq.shouldIgnoreTitleRow(o,s),d=u||cq.shouldIgnoreColorRow(o,s),f=u||cq.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(cq.extractBarNodeData(e,l,t,n,i,d,f)),c.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:c,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:c,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let r=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{r=r.concat(cq.extractStackTotalBarNodeData(e,n,t))})),r},extractData(e,t,n){const{barTooltipData:r,numInvisibleNodesPhase1:o,stackTotalBarTooltipData:i}=cq.extractTooltipData(e,t),a=cq.extractStackTotalBarsData(e,n,i);a.length&&a.push(Fe.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=cq.extractBarsData(e,t,n,r),c=a.concat(s),u=o+l;return u&&c.push(Fe.getNMoreRow(u,t.translator,n)),c},calculateBoundsFromBars(e){const t=e.filter((e=>{const t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return vs.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:r,data:o,groupProp:i}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",c=e.chart.scale(n).pxScale(a[l]);let u,d,f;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=o.value,d=n===r&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,f=n===r&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=o;u=o[i]?o[i].value:void 0,d=c(n===r&&void 0!==u?[u,e]:e),f=n===r&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const p=(d+f/2)*a[l],m={width:0,height:0};return"horizontal"===s?(m.x=p,m.y=a.height):(m.y=p,m.x=0),m},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:r,barAxisKey:o,majorScale:i,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let c;return c=l.length?cq.calculateBoundsFromBars(l):cq.calculateBoundsFromScale({opts:e,barKey:r,scale:t[0].key===o?i:a,majorScale:i,data:t[0].data,groupProp:s}),c},filterNodesOnKeys:(e,t)=>e.filter((e=>e.data&&t.indexOf(e.key)>-1)),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels(e,t,n,r){const o=e.filter((e=>t.some((t=>n(e,t,r)))));return o},findBarsFromGroupLabelsInGroupedByDim(e,t,n){const r=cq.isBarMatchingLabelOnProp;return cq.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter((e=>t.some((t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)))),findBarsFromLabelsInSingleDim(e,t){const n=cq.isBarMatchingLabel;return cq.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,r){const o=t.filter((e=>e.key===n)),i=t.filter((e=>e.key!==n)),a=cq.findBarsFromBarLabelsInGroupedByDim(e,o,r),s=cq.findBarsFromGroupLabelsInGroupedByDim(e,i,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=cq.isBarMatchingLabel;return cq.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=cq.isBarMatchingLabel;return cq.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const r=cq.isBarMatchingLabelOnProp;return cq.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>cq.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:r,groupProp:o,stackProp:i}){const{meta:a}=t.layoutService,s=cq.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?cq.findBarsFromLabelsInStackedByDim(s,e,i):a.isStackedByMeasure?cq.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?cq.findBarsFromLabelsInGroupedByDim(s,e,r,o):cq.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:r}=t.layoutService;if(r.isStacked){const o=cq.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return r.isStackedByDimension?cq.findStackTotalBarsFromLabelsInStackedByDim(o,e):cq.findStackTotalBarsFromLabelsInStackedByMeasure(o,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:o,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:f}=t.layoutService;if(e.length){let p=cq.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:r,barAxisKey:o,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(p=p.filter(d)),cq.isSingleBarMode(f,p))return[p[0]];if(p.length){let f=cq.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,i,a],stackTotalBarKey:r,barAxisKey:o,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l});d&&(f=f.filter(d));const m=cq.calculateTotalBounds({opts:t,labels:e,bars:f,barKey:n,barAxisKey:o,groupProp:s,majorScale:c,majorInnerScale:u}),h=cq.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:r}),g={key:n,bounds:m,childrenNodes:p,data:p.map((e=>e.data)),stackTotalBarNodes:h};return[g]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:o,groupAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let f=cq.filterNodesOnKeys(e,[o,i]),p=f&&f.length?[f[0]]:[];const m=cq.filterNodesOnLabels({labels:p,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(m&&m.length)return m;const{meta:h}=t.layoutService;if(h.isStackedByMeasure){f=cq.filterNodesOnKeys(e,[a,s]),p=f&&f.length?[f[0]]:[];const i=e=>cq.filterNodesForOob(e,n,a),m=cq.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:i});if(m&&m.length)return m[0].stackTotalBarNodes=void 0,m}if(h.isStackedByDimension){f=cq.filterNodesOnKeys(e,[a,s]),p=f&&f.length?[f[0]]:[];const i=e=>cq.filterNodesForOob(e,n,a),m=cq.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:i});if(m&&m.length)return m[0].stackTotalBarNodes=void 0,m}const g=cq.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function uq(e,t={},n){let r=[];const o=Ie({key:KT.COMPONENT.BASE_TOOLTIP,rtl:n});return ue(!0,o,{scale:KT.SCALE.MAIN.COLOR,settings:{filter:e=>cq.filterNodes({nodes:e,opts:t,barKey:KT.COMPONENT.BAR,stackTotalBarKey:KT.COMPONENT.STACK_TOTAL_BAR,barAxisKey:KT.COMPONENT.BAR_AXIS,groupAxisKey:KT.COMPONENT.GROUP_AXIS,barOobMaxKey:KT.COMPONENT.BAR_OOB_MAX,barOobMinKey:KT.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(r=e.node.childrenNodes?e.node.childrenNodes:[e.node],cq.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e;const{app:o,properties:i,customTooltipModel:a}=t;o&&(null===(e=o.isInModalSelection)||void 0===e||!e.call(o))&&a.useCustomTooltip&&a.embed&&ak.show({app:o,properties:i,selectedNodes:r,customTooltipModel:a,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const dq={extractData:(e,t)=>[Fe.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter((e=>e.data&&e.key===t));return n.length?[n[0]]:[]}};function fq(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const r=Ie({key:KT.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return ue(!0,r,{scale:KT.SCALE.MAIN.COLOR,settings:{filter:e=>dq.filterNodes(e,KT.COMPONENT.LEGEND_COLOR_CAT),extract:e=>dq.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function pq(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function mq({layout:e},t,n){const r=function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(pq))return"OnlyNanData";let n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){const t=e.qHyperCube.qDimensionInfo[1];n=DE.getDimensionSize(t)>xe.maxNumberOfLines}return!!n&&"LimitedData"}(e,t),{fontFamily:o}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:o}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:pe[e].alignment},settings:{label:o.get(`Object.Disclaimer.${e}`),isRTL:i},style:r}}(r,t,{rtl:n},{fontFamily:o})}function hq(e,{fill:t}){return{[KT.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[KT.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const gq=1,yq=3;function vq(e){return e.getLayoutValue("gridLine.auto")}function bq(e){return!vq(e)&&e.getLayoutValue("gridLine.spacing")===gq}function xq(e){return!vq(e)&&e.getLayoutValue("gridLine.spacing")===yq}const Sq=e=>({enabled:e.animations.enabled,trackBy:ss.lines.trackBy,compensateForLayoutChanges:ss.lines.compensateForLayoutChanges}),Mq=(e,{themeService:t,layoutService:n,dockService:r,viewModel:o})=>{if(!vq(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:i}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:LE.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!bq(n)||((e,t)=>t%2==0),stroke:i.line.major.color},minorTicks:{show:xq(n),stroke:i.line.minor.color},animations:Sq(o)};return a["horizontal"===r.meta.major.orientation?"y":"x"]=KT.SCALE.MAIN.MINOR,a};function Cq(e,t){const n=[Mq(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:r})=>{const o=n.get("minorMinMax");if(o.min>0||o.max<0)return!1;const i=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:KT.SCALE.MAIN.MINOR,line:{stroke:i.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:KT.SCALE.MAIN.MINOR,lines:a,animations:Sq(r)}})(t)),n}const wq="areaPan",kq=e=>({type:"Pan",key:"panorama",options:{event:wq,pointers:1,threshold:10,enable(t,n){return this.started===wq||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===KT.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started=wq;const n=e.viewState.get("zoom");this[wq]={min:n.min,max:n.max,size:e.chart.component(KT.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:o,size:i}=this[wq],a=-t.deltaX/i;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(o+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function Tq(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:o}=e,{rtl:i}=t,a=kg.event.onZoom({viewCache:n,viewState:r,chart:o},{threshold:100,rtl:i,targetKey:KT.COMPONENT.BAR}),s={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===KT.COMPONENT.BAR))},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function Eq({chart:e},t,n){const r=e.component(KT.COMPONENT.BASE_TOOLTIP);var o;r&&r.show&&(r.emit("hide"),null!=n&&null!==(o=n.customTooltipModel)&&void 0!==o&&o.useCustomTooltip&&t&&t({},r,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const i=e.component(KT.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&i.emit("hide");const a=e.component(KT.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function qq(e,t){const{viewCache:n,viewState:r,chart:o,trendLineModel:i,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?kg.event.onZoom({viewCache:n,viewState:r,chart:o},{rtl:s,threshold:50,targetKey:KT.COMPONENT.BAR}):void 0,c=PT({majorInnerScale:KT.SCALE.MAIN.MAJOR_INNER,tooltip:KT.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:KT.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:o,viewState:r,trendLineModel:i,layoutService:a,rtl:s}),u=[KT.COMPONENT.BAR,KT.COMPONENT.BAR_AXIS,KT.COMPONENT.GROUP_AXIS,KT.COMPONENT.BAR_OOB_MAX,KT.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,f=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const o={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(o).filter((e=>e.key===KT.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(o,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===KT.COMPONENT.LEGEND_COLOR_CAT)),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault(),Eq(e,f,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(KT.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some((e=>u.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const o=d.getNodes(t,this.chart);f(t,r,{nodes:o,opts:e,customTooltipModel:n})}else r.emit("show",t)}else r.emit("hide");const o=this.chart.component(KT.COMPONENT.LEGEND_CAT_TOOLTIP);o&&o.show&&(n.some((e=>e.key===KT.COMPONENT.LEGEND_COLOR_CAT))?o.emit("show",t):o.emit("hide"))}},mouseup(t){2===t.button&&Eq(this,f,e)},mouseleave(){Eq(this,f,e)}}}}const Lq=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...Ug({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[kq(e,t.rtl),Tq(e,t)]]});function Oq(e,t){const n=[Lq(e,t),qq(e,t),Ug({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&n.push(e.discrete.interactions.native),n}const Nq=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:ss.bars.compensateForLayoutChanges});const Dq=(e,t,{collectionKey:n})=>{if(!Dg({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:r,viewModel:o},{collectionKey:i}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:i},settings:{box:ue(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:ue(!0,{},e.settings.major,{scale:t.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:Nq(o)}}(e,t,{collectionKey:n});const{mode:r,scales:o}=t.reducedDataModel;let i;return r.isGroupedByDimension&&!r.isReduced?i=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(i=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:o.major,fn:i},minor:{scale:o.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:Nq(t.viewModel)}},{measureText:Aq}=t.renderer("svg")();function Iq(e,t,n){const r=function(e){const t=ue(!0,{},e);return delete t.data,t}(t.minor),o=function(e,t,{majorScaleInvert:n,maxPxStep:r,align:o,getProp:i}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map(((e,t)=>({field:e,value:t}))):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:o};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=ue(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=ue(!0,{},t,{min:()=>i("continuousMin"),max:()=>i("continuousMax")})),a}(e,t.major,n);return{reducedMinor:r,reducedMajor:o}}const Rq=125,Pq={NARROW:50,MEDIUM:100,WIDE:200};function zq(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return Pq.NARROW;case 1:return Pq.MEDIUM;case 2:return Pq.WIDE;default:return t*Rq}}(t);return Math.max(1,Math.round(e/n))}const jq=10;function Fq(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function _q(e,t,n){return 0===t||0===e||t===n.length-1}function Bq(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function Hq(e,t,n,r,o){e.domain([t,n]),e.nice(jq);const[i,a]=e.domain();let s=e.ticks(jq);const l=function(e){return e.length%2==0}(s),c=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}(s),u=c?_q:Fq;s=s.filter(u),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=o?o.formatter(KT.FORMATTER.MINOR):void 0;return Bq(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:i,roundedMax:a,ticks:s}}function $q(e,t,n,r,o,i,a,s){const l=i.formatter(KT.FORMATTER.MINOR),c=s.getStyles(),u="horizontal"===a.meta.major.orientation?"height":"width",d=e=>Aq({text:e,fontSize:c.axis.label.name.fontSize,fontFamily:c.axis.label.name.fontFamily})[u];let[f,p]=e.domain(),m=e.ticks(r);function h(){const e=m.map(l);return!Bq(e)&&function(e){const t=o/m.length;return Math.max(...e.map(d))<=t}(e)}for(let o=r-1;o>0&&!h();o--)e.domain([t,n]),e.nice(o),[f,p]=e.domain(),m=e.ticks(o);return{roundedMin:f,roundedMax:p,ticks:m}}const Vq=(e,t)=>e.value-t.value,Wq=e=>({value:e,isMinor:!1}),Uq=e=>({value:e,isMinor:!0});function Kq(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e))).length<=r}function Gq({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:o}){const{explicitMin:i,explicitMax:a,hasExplicitMin:s,hasExplicitMax:l}=t.get("minorMinMax"),{min:c,max:d}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),f=u((()=>{const u=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(KT.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=zq(u,r),p=function(e,t,n){const r=$r().domain([e,t]);return r.nice(n),r}(c,d,f);let m,h,g=[];"SPARK"===n.meta.chart.mode?({roundedMin:m,roundedMax:h}=function(e,t){return{roundedMin:e,roundedMax:t}}(c,d)):(({roundedMin:m,roundedMax:h,ticks:g}=$q(p,c,d,f,u,e,n,o)),Kq(g,i,a)&&({roundedMin:m,roundedMax:h,ticks:g}=Hq(p,c,d,s||l,e)));const y=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const o=e[r],i=(e[r+1]-o)/(t+1);for(let e=1;e<=t;e++)n.push(o+i*e)}return n}(g,1);g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.unshift(t),n.filter((e=>e>=t))):n}(s,i,g),g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.push(t),n.filter((e=>e<=t))):n}(l,a,g);const v=function(e,t){return[...e.map(Wq),...t.map(Uq)].sort(Vq)}(g,y);return{roundedMin:m,roundedMax:h,ticks:v}}),(()=>t.get("isPreRender")));return{values:()=>f().ticks,min:()=>s?i:f().roundedMin,max:()=>l?a:f().roundedMax}}function Yq(e,{picasso:t,discrete:n,layoutService:r,dockService:o,viewModel:i,viewCache:a,reducedDataModel:s,colorService:l,themeService:c,viewState:u,chart:d},{localeInfo:f,rtl:p}){const{meta:m}=r,{fields:h}=i,g=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,o.meta.chart.size["horizontal"===o.meta.major.orientation?"height":"width"]/4)},y=!("none"===r.getLayoutValue("measureAxis.show"))?(v=o.meta.minor.orientation,b=o.meta.minor.dock,"vertical"===v?"near"===b||"left"===b?0:1:"near"===b||"bottom"===b?1:0):.5;var v,b;const x={},S="vertical"===o.meta.minor.orientation&&p,M=l.getMain().getScales(),C=l.getMini().getScales();if(Object.assign(x,M,{reducedFill:C.reducedFill}),x[KT.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,layoutService:o,themeService:i},{rtl:a}){const s=Gq({chart:e,dockService:n,viewCache:r,layoutService:o,themeService:i}),l={invert:"vertical"===n.meta.minor.orientation||a,ticks:{values:s.values},minorTicks:{count:1},min:s.min,max:s.max};return o.meta.isStacked||(l.data={source:"qHyperCube",fields:t.minor}),l}({chart:d,viewModel:i,dockService:o,viewCache:a,layoutService:r,themeService:c},{rtl:p}),m.isGroupedByDimension)[KT.SCALE.MAIN.MAJOR_INNER,KT.SCALE.MAIN.MAJOR].forEach(((e,t)=>{x[e]={invert:S,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...i.selectionDimensionProp(t),group:m.isGroupedByDimension?{field:h.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:g,align:y}})),i.isDimensionLocked(0)||(x[KT.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(m.isGroupedByMeasure)x[KT.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:S,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:g,align:y};else if(m.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:o,picasso:i,viewState:a,localeInfo:s,themeService:l}=e,c=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),u=i.formatter("q-time"),d=l.getStyles(),f=e=>Aq({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});o.set("qTimeAxisCache",[]);const p={get:(e,t=0)=>{const n=o.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{o.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(o.get("continuousMax")-o.get("continuousMin")),i=c().map((e=>e.qName));return[e,Number.parseFloat(r).toFixed(12),...i].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:p},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:p}}}({picasso:t,localeInfo:f,viewState:u,viewModel:i,viewCache:a,themeService:c,layoutService:r},p);x[KT.SCALE.MAIN.MAJOR_INNER]=e,x[KT.SCALE.MAIN.MAJOR]=n}else m.isContinuous?x[KT.SCALE.MAIN.MAJOR]={type:"linear",invert:S,data:{extract:{key:"qHyperCube",field:h.majorNumeric}},ticks:{forceBounds:!0,count:u.get("zoom").min===u.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>u.get("zoom").min,max:()=>u.get("zoom").max}:x[KT.SCALE.MAIN.MAJOR]={invert:S,data:{extract:m.isDimensionless?h.minor.map(((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n}))):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:m.isDimensionless?"band":void 0,maxPxStep:g,align:y};const{reducedMinor:w,reducedMajor:k}=Iq(s,{major:x[KT.SCALE.MAIN.MAJOR],minor:x[KT.SCALE.MAIN.MINOR]},{majorScaleInvert:S,maxPxStep:g,align:y,getProp:a.get});return m.isDiscrete&&(x[KT.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,m.isGroupedByDimension&&(x[KT.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),x[s.scales.major]=k,x[s.scales.minor]=w,x}function Xq(e,t,n){const{layoutService:r,colorService:o}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[kE(e,t)],components:[]}}({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?KT.COMPONENT.STACK_TOTAL_BAR:KT.COMPONENT.BAR,KT.COMPONENT.BAR_AXIS,KT.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",KT.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return KT.COMPONENT.BAR===t[0].key?[{...r,data:["selectionDimension"]}]:[KT.COMPONENT.BAR_AXIS,KT.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension","axisSelectionDimension"]}]:[r]}},{...e,isLocked:n=>n.some((e=>e.key===KT.COMPONENT.LEGEND_COLOR_CAT))?o.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function Jq(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=ME(n);return{interactions:[wE(n,t)],components:[r]}}({key:"lasso",componentTargetKey:KT.COMPONENT.BAR,components:[t?{key:KT.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:KT.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function Zq(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:o,dock:i}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"inside"},target:{components:o,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[EE(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:KT.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",KT.COMPONENT.BAR_AXIS,KT.COMPONENT.BAR],fillTargets:["group-axis",KT.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function Qq(e,t,n){const{selectionService:r}=e,{isUnsupportedFeature:o}=t,i=void 0===n,a=r.getIsSingleSelect(n),s=Xq(e,i,a);if(i||a)return{components:[...s.components],gestures:[...s.interactions]};const l=Jq(e),c=function(e,t){return e.layoutService.meta.isStacked||null!=t&&t("rangeSelections")?{components:[],interactions:[]}:qE({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",KT.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:KT.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,o),u=function(e){return e.layoutService.meta.isContinuous?qE({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",KT.COMPONENT.BAR]:["continuous-axis",KT.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?KT.SCALE.MAIN.MAJOR_INNER:KT.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:r}){const o=e.layoutService.meta.isTime?r.formatter():e.chart.formatter(KT.FORMATTER.MINOR),i=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||i?"":"<"}${o(t)}`}},e):{components:[],interactions:[]}}(e),d=Zq(e);return{components:[...s.components,...l.components,...c.components,...d.components,...u.components],gestures:[...l.interactions,...s.interactions,...c.interactions,...d.interactions,...u.interactions]}}function eL({layoutService:e,viewModel:t,dockService:n}){var r;const{meta:o}=e;if(!o.isStackedByDimension||o.isContinuous)return!1;const{fields:i}=t,a=e.getLayoutValue("components",null),s=a?a.filter((e=>"bar"===e.key))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>{return t=e.qSubNodes,Number(t.map((e=>e.qMaxPos)).reduce(((e,t)=>e+t),0).toFixed(13));var t}},end:{value:e=>Number(e.qMaxPos.toFixed(13))}}},{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>{return t=e.qSubNodes,Number(t.map((e=>e.qMinNeg)).reduce(((e,t)=>e+t),0).toFixed(13));var t}},end:{value:e=>Number(e.qMinNeg.toFixed(13))}}}]},settings:{major:{scale:KT.SCALE.MAIN.MAJOR},minor:{scale:KT.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:null!=s&&null!==(r=s.style)&&void 0!==r&&r.width&&s.style.width>0?s.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:ss.shadowBars.trackBy,compensateForLayoutChanges:ss.bars.compensateForLayoutChanges}}}const tL={min:"Min",max:"Max"};function nL(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?VE(e,t)||WE(e,t):n===UE.MAX?VE(e,t):WE(e,t)}(Number(r.toFixed(13)),e,t)}function rL(e,{barComponent:t,type:n,isStacked:r}){var o,i,a;const{viewCache:s,layoutService:l,dockService:c}=e,u=s.get("minorMinMax"),d=n===UE.MAX;if(function(e,t){return!e[`hasOther${tL[t]}`]}(u,n)){if(function(e,t){return!e[`hasExplicit${tL[t]}`]}(u,n))return!1;if(nL(u,n,d))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e[`hasExplicit${tL[t]}`]&&r(e[`explicit${tL[t]}`])}(u,n,d))return!1;let f="end";r&&(f=d?"sumOfPositives":"sumOfNegatives");const p=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale(KT.SCALE.MAIN.MINOR)[n]())),m=d?e=>e.datum[f].value>p():e=>e.datum[f].value<p(),h=KT.COMPONENT.BAR,g=e.layoutService.getLayoutValue("components",[]),y=g?g.filter((e=>e.key===h))[0]:null;return{type:"box-sliced-hat",key:`sliced-hat-${n}`,layout:{dock:d?c.meta.minor.end:c.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:ue({},t.settings.box,{fill:l.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:m,width:FE({layoutService:e.layoutService,discrete:e.discrete,componentKey:h}),strokeWidth:null!=y&&null!==(o=y.style)&&void 0!==o&&o.strokeWidth?PE.BAR.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:PE.BAR.STROKE.WIDTH.NONE,stroke:null!==(i=null==y||null===(a=y.style)||void 0===a||null===(a=a.strokeColor)||void 0===a?void 0:a.color)&&void 0!==i?i:PE.BAR.STROKE.COLOR})}}}function oL(e,t){var n;let r;return r=e.isContinuous?1:.7,!e.isContinuous&&null!=t&&null!==(n=t.style)&&void 0!==n&&n.width&&t.style.width>0?t.style.width:r}function iL(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:o}=e.viewModel,i=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[i]?0:e[i];function s(t){const n=e.ds.field(t).raw(),r=e.ds.field(t).formatter(),o=Me.shouldUseFormat(n);return{field:t,reduceLabel:"none",value:a,label:e=>o?(e=>"NaN"===e[i]?"-":r(e[i]))(e):e.qText}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;const c={key:t,data:{extract:o.minor.map(((t,i)=>{const a=e.colorService.getMain().getDatumProps(i),c=e.colorService.getMini().getDatumProps(i),u=a[Object.keys(a)[0]],d=null==u?void 0:u.field,f=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,p={field:r.isDimensionless?t:o.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:s(t),null:(m=t,{field:m,reduceLabel:"none",reduce:"first",value:l}),segment:r.isStacked?s(t):void 0,group:r.isGroupedByDimension?{field:o.majorGroup}:void 0,stack:r.isStacked?{field:o.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:i,timeStart:r.isContinuous?{field:o.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:o.majorNumeric}:void 0,fillTooltip:f,...a,...c,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${i}`},customTooltipAttrExps:0!==r.dimensionCount?fk.getNode(e.layoutService.getLayout(),r):void 0}};var m;return r.isDimensionless&&(p.value=i),void 0!==n&&(p.source=n),Me.deleteUndefinedProperties(p.props),p}))}};return r.isStacked&&(c.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),c}function aL({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:o}=t;if(!r.isStacked)return!1;let i;return i=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},null:{fields:t.minor.map((e=>({field:e}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,o):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>Number(e.qMaxPos.toFixed(13))},sumOfNegatives:{value:e=>Number(e.qMinNeg.toFixed(13))},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every((e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue))}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t>0?e+t:e),0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t<0?e+t:e),0)},timeStart:n,timeEnd:n}}}(r,o),{key:n,data:{extract:i}}}const sL="main-collection",lL="stack-total-collection";const cL="mini-collection",uL="mini-stack-collection",dL="mini-continuous-collection",fL="miniCube",pL=(e,t)=>{const n=(e=>{const t=[iL(e,{collectionKey:sL})];return e.layoutService.meta.isStacked&&t.push(aL(e,{collectionKey:lL})),t})(t),r=((e,t)=>{const n=[];return Dg({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(iL(t,{collectionKey:dL},fL)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:o}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const i={end:{field:e,reduceLabel:"none"},...o.isStackedByMeasure&&!o.isReduced?n.getMain().getDatumProps(t):{}};return o.isContinuous&&(i.timeStart={field:r.major,value:e=>e.qNum},i.timeEnd=i.timeStart),{source:"miniCube",field:r.major,props:i}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:uL})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:o}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const i=o.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:r.majorGroup},measureIndex:t,...i},s={source:"miniCube",field:o.isDimensionless?e:r.major,props:a};return o.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:cL}))),n})(0,t);return n.concat(r)};function mL(e,t,n,r){const o=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}};o.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return o}function hL({layout:e,component:t},n,r){if(!aq(e,n))return!1;const{layoutService:o,chart:i,dockService:a,viewModel:s,themeService:l,styleService:c}=n,{meta:u}=o,d=!iq(e,n),f=l.getStyles(),p=c.label.getStyle(),m=p.useContrastColor;function h(e){const t=i.formatter(KT.FORMATTER.MINOR);return t?t(e):e}const g={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":h(e.data.sumOfPositives.value)},simplifiedPlacements:mL("outside",d,m,u.isContinuous),style:f.label.value},y={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":h(e.data.sumOfNegatives.value)},simplifiedPlacements:mL("opposite",d,m,u.isContinuous),style:f.label.value},v=[eq(ue(n,g)),eq(ue(n,y))];return{key:"stack-total-labels",type:"labels",renderer:Ss(n.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>oq(e.data.sumOfPositives.value,a.meta.minor.orientation,r),labels:v,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily,linkData:ss.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:ss.labels.trackBy,compensateForLayoutChanges:ss.labels.compensateForLayoutChanges}}}function gL(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function yL({layout:e,type:t},n){const{layoutService:r,viewCache:o,themeService:i,styleService:a}=n,{meta:s}=r,{isStacked:l}=s;if(!l&&!iq(e,n)||l&&!aq(e,n))return!1;const c=o.get("minorMinMax");if(!c.hasExplicitMinMax||t===UE.MAX&&0===c.max||t===UE.MIN&&0===c.min)return!1;if(!GE(t===UE.MAX?c.implicitMax:c.implicitMin,c,t))return!1;const u=i.getStyles(),d=a.label.getStyle();let f=e=>e.data.end.label;s.isStacked&&(f=t===UE.MAX?function(e){if(GE(e.data.sumOfNegatives.value,c,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(KT.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(GE(e.data.sumOfPositives.value,c,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(KT.FORMATTER.MINOR);return r?r(t):t}return""});const p={label:f,simplifiedPlacements:gL("outside",true,s.isContinuous),styles:u},m={label:f,simplifiedPlacements:gL("opposite",true,s.isContinuous),styles:u},h=[eq(ue(n,p)),eq(ue(n,m))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y=[{component:`${KT.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:h,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:ss.labels.linkData}}}];return{key:`bar-oob-labels-${t}`,type:"labels",renderer:Ss(n.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:y},animations:{enabled:n.viewModel.animations.enabled,trackBy:ss.labels.trackBy,compensateForLayoutChanges:ss.labels.compensateForLayoutChanges}}}function vL(e){return"all"===e||"title"===e}function bL(e,t,n){if(!vL(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:r,properties:o}=t,i={hyperCube:e.qHyperCube,hyperCubeDef:o&&o.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=r&&null!==(e=r.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA"),isEnabled:t.flags.isEnabled},a=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleDimensions&&(i.padding="0",i.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:LE[`${t.dockService.meta.major.orientation}DimensionAxisTitle`].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:i,style:a}}function xL(e,t,n){if(!vL(e.measureAxis.show))return!1;const{layoutService:r,actions:i}=t,a=t.properties,s=r.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",l={hyperCube:r.getHyperCube(),hyperCubeDef:o(a,s),isDimension:!1,disabled:()=>!i.interact.enabled(),model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections,supportConditional:t.flags.isEnabled("IM_1579_HIDE_DIM_MEA"),isEnabled:t.flags.isEnabled},c=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleMeasures&&(l.padding="0",l.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:l,style:c}}function SL({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:o,dockService:i,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:o.getMain().getPaletteColor},f=a.getStyles(),p=s.animations.enabled;return[ps({refLineModel:n,layoutService:r,colorModel:d,dockService:i,animationsEnabled:p,chart:l,scale:KT.SCALE.MAIN.MINOR,axis:"horizontal"===i.meta.major.orientation?"y":"x",key:KT.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:LE.refLines.minimumLayoutMode}),ps({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,dockService:i,animationsEnabled:p,chart:l,scale:KT.SCALE.MAIN.MAJOR,axis:"horizontal"===i.meta.major.orientation?"x":"y",rtl:t,key:KT.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:KT.COMPONENT.BAR,minimumLayoutMode:LE.refLines.minimumLayoutMode}),...ys({refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:p,dock:i.meta.minor.opposite,scale:KT.SCALE.MAIN.MINOR,style:f,formatter:KT.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:KT.COMPONENT.MEASURE_REF_LINE_LABEL}),...ys({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:p,dock:i.meta.major.opposite,scale:KT.SCALE.MAIN.MAJOR,style:f,theme:c,localeInfo:u,rtl:t,key:KT.COMPONENT.DIMENSION_REF_LINE_LABEL})]}const ML=(e,t,n)=>{var r;const{layoutService:o,dockService:i,colorService:a,chart:s,actions:l,discrete:c,continuousDataModel:u,reducedDataModel:d,viewModel:f,viewState:p,viewCache:m,themeService:h,refLineModel:g,pluginService:y,rtl:v,logicalSize:b,trendLineModel:x}=t,{localeInfo:S}=n,M=mq({layout:e},t,v);if(M&&"center"===M.layout.dock)return{components:[M]};const C=Yq(e,t,{localeInfo:S,rtl:v}),w=!(null!=l&&null!==(r=l.interact)&&void 0!==r&&r.enabled()),k=a.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:p,chart:s,styleReference:"object.barChart",styleOverrides:{title:t.styleService.legend.title.getStyle(),label:t.styleService.legend.label.getStyle()},rtl:v,settings:{item:{shape:{size:10}}}},{actions:l,navigationDisabled:w}),T=k.components[0];if(T){const{dock:e}=T.layout;if(C.fillRange&&(["right","left"].includes(e)||v)&&(C.fillRange.invert=!0),"legend-seq"===T.type&&void 0!==f.selectionDimensionIdx&&C.fillRange&&C.fillRange.min<C.fillRange.max){const e=qE({eventName:"legendRange",key:"legendRangeBrush",targets:[T.key],fillTargets:[T.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:T.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{l.select.emit("end","legendRange")}},t);k.components.push(...e.components),k.interactions.unshift(...e.interactions)}}else C.fillRange&&v&&(C.fillRange.invert=!0);const E=((e,{componentKey:t,collectionKey:n})=>{var r,o,i;const{meta:a}=e.layoutService;let s,l;a.isGroupedByDimension?s=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:a.isGroupedByMeasure&&(s=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let c=2;a.isContinuous?(l={start:"timeStart",end:"timeEnd"},c=BE(e,t)):a.isStacked&&(l="stack");const u=a.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,d=e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},f=e.layoutService.getLayoutValue("components",null),p=f?f.filter((e=>e.key===t))[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:a.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:a.isContinuous||u?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:KT.SCALE.MAIN.MAJOR,fn:s,ref:l},minor:{scale:KT.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:FE({layoutService:e.layoutService,discrete:e.discrete,componentKey:t}),minWidthPx:c,fill:e.colorService.getMain().getColor(),opacity:e=>d(e)?0:void 0,minHeightPx:function(e){return a.isStacked?.1:d(e)?.01:.3},strokeWidth:null!=p&&null!==(r=p.style)&&void 0!==r&&r.strokeWidth?PE.BAR.STROKE.WIDTH[p.style.strokeWidth.toUpperCase()]:PE.BAR.STROKE.WIDTH.NONE,stroke:null!==(o=null==p||null===(i=p.style)||void 0===i||null===(i=i.strokeColor)||void 0===i?void 0:i.color)&&void 0!==o?o:PE.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:e.viewModel.animations.enabled,isMainComponent:!0,trackBy:ss.bars.trackBy,compensateForLayoutChanges:ss.bars.compensateForLayoutChanges}}})(t,{componentKey:KT.COMPONENT.BAR,collectionKey:KT.COLLECTION.MAIN}),q=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let o=2;r.isContinuous&&(o=BE(e,t));const i=e.layoutService.getLayoutValue("components",null),a=i?i.filter((e=>e.key===t))[0]:null,s={key:t,type:"box",data:{collection:n},settings:{major:{scale:KT.SCALE.MAIN.MAJOR},minor:{scale:KT.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:oL(r,a),minWidthPx:o,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:.3}}}}]}};return r.isContinuous&&(s.settings.major.ref={start:"timeStart",end:"timeEnd"}),s})(t,{componentKey:KT.COMPONENT.STACK_TOTAL_BAR,collectionKey:KT.COLLECTION.STACK_TOTAL}),L=Qq(t,n,f.selectionDimensionIdx),{isStacked:O}=o.meta;let N;N=d.mode.isContinuous?KT.COLLECTION.MINI_CONTINUOUS:O?KT.COLLECTION.MINI_STACK:KT.COLLECTION.MINI;const D=O?q:E,A=Cq(0,t),I=[...A,rL(t,{barComponent:D,type:"max",isStacked:O}),rL(t,{barComponent:D,type:"min",isStacked:O}),XE(t,{barComponent:D,type:"max",isStacked:O}),XE(t,{barComponent:D,type:"min",isStacked:O}),ZE(t,{chart:s,barComponent:D,type:"max",scales:C,collectionKey:O?KT.COLLECTION.STACK_TOTAL:KT.COLLECTION.MAIN}),ZE(t,{chart:s,barComponent:D,type:"min",scales:C,collectionKey:O?KT.COLLECTION.STACK_TOTAL:KT.COLLECTION.MAIN}),...RE(e,t,v,!!A[0]),E,q,eL({layoutService:o,viewModel:f,layout:e,dockService:i}),bL(e,t,v),xL(e,t,v),...SL({environment:n,rtl:v,refLineModel:g,layoutService:o,colorService:a,dockService:i,themeService:h,viewModel:f,chart:s}),oa({viewState:p,viewCache:m,layoutService:o,dockService:i,rtl:v}),Dq(E,t,{collectionKey:N}),Ag({layoutService:o,dockService:i,discrete:c,continuousDataModel:u,viewState:p,viewCache:m,themeService:h,rtl:v,deviceType:n.deviceType}),...qT({majorScale:KT.SCALE.MAIN.MAJOR,minorScale:KT.SCALE.MAIN.MINOR,tooltipOverlay:KT.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:o,trendLineModel:x,dockService:i,animationsEnabled:f.animations.enabled}),...k.components,lq({layout:e,component:KT.COMPONENT.BAR,minorScale:C.minor},t,v),hL({layout:e,component:KT.COMPONENT.STACK_TOTAL_BAR},t,v),yL({layout:e,component:"bar-oob-max",type:"max"},t),yL({layout:e,component:"bar-oob-min",type:"min"},t),...L.components,uq(0,{...t,coloring:a.getMain().getSettings()},v),fq(0,{...t,coloring:a.getMain().getSettings()},v),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&M,IT({tooltip:KT.COMPONENT.TREND_LINES_TOOLTIP,formatter:KT.FORMATTER.MINOR,majorScale:KT.SCALE.MAIN.MAJOR},t,{rtl:v})].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(I);const R=[...k.interactions,...L.gestures].sort(((e,t)=>(t.prio||0)-(e.prio||0)));return{interactions:Oq(t,{rtl:v,hammer:{gestures:R}}),scales:C,palettes:a.getMain().getPalettes(),components:y.extendComponents(I),strategy:ye(0,{logicalSize:b,minCenterRatio:0}),formatters:hq(t,C),collections:pL(0,t)}};const CL=({environment:e,services:t,chart:n,viewState:r,bootstrapped:o})=>{U((i=>{var a;if(!e||!t||!o)return;const{flags:s}=e,{layoutService:l,dockService:c,colorService:u,discrete:d,continuousDataModel:f,reducedDataModel:p}=t,{width:m,height:h}=c.meta.chart.size;if(i.snapshotData=i.snapshotData||{},i.snapshotData.content={size:{w:m,h:h}},l.meta.isSnapshot)return Promise.resolve();if(i.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:Ee(n,KT.COMPONENT.LEGEND_COLOR_CAT)},null!=s&&null!==(a=s.isEnabled)&&void 0!==a&&a.call(s,"IM_1579_HIDE_DIM_MEA")){const{properties:e}=o,t=null==e?void 0:e.qHyperCubeDef.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv}));t&&(i.tooltip.auto=!0)}return l.meta.isDiscrete?(d.command.setSnapshotData(i),p.setSnapshotData(i)):f.setSnapshotData(i),u.getMain().getSnapshotData().then((e=>{i.snapshotData.content.chartData={...i.snapshotData.content.chartData,...e}})).catch((()=>{}))})),K((()=>({getViewState(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:Ee(n,KT.COMPONENT.LEGEND_COLOR_CAT)}}})),[r,n])},wL=({properties:e,layout:t,isStacked:n,isContinuous:r,model:o,layoutService:i})=>{var a,s;const l=t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),c=t.qHyperCube.qMeasureInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})),u=ue(!0,{},e);return((e,t,n)=>{const{color:{mode:r}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===r&&t.length>1?n.color.mode="byMultiple":"byExpression"===r&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&(n.color.mode="primary"))})(l,c,e),l.length>1&&n&&!r&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),l.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),null===(a=o.colorSupport)||void 0===a||null===(s=a.colorByUpdater)||void 0===s||s.call(a,e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:r}=e.color||{};if("byExpression"===r){var o;if("colorByExpression"===(null===(o=t.getLayout().qHyperCube.qMeasureInfo)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.qAttrExprInfo)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.id))return;const{current:r,target:i}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:r,target:o}=n.reduce(((e,n,r)=>{var o;return"colorByExpression"===(null===(o=n.qAttributeExpressions[0])||void 0===o?void 0:o.id)&&(e.current=r),void 0!==e.target||t.includes(r)||(e.target=r),e}),{current:void 0,target:void 0});return{current:r,target:o}}({properties:e,filtered:n.measures});if(void 0===r)return;const a=e.qHyperCubeDef.qMeasures[r].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[r].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:i}),JSON.stringify(u)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)};function kL(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk})).length,r=t.layout.qHyperCube.qDimensionInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk})).length,o=e.dimensionAxis.maxVisibleItems;o<1?e.dimensionAxis.maxVisibleItems=10:o>1e4/(r+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(o,Math.floor(1e4/(r+n))))}}const TL=.7,EL=.9,qL=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],LL=(e,t)=>{var n,r,o;const i=null===(n=t.qHyperCube)||void 0===n||null===(n=n.qMeasureInfo)||void 0===n?void 0:n.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk})).length,a=null===(r=t.qHyperCube)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r?void 0:r.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk})).length,s="grouped"===(null===(o=e.barGrouping)||void 0===o?void 0:o.grouping)&&a>0&&i+a>2;return Te.continuous(t)?1:s?EL:TL},OL=(e,t,n)=>{const r=`${e}.fontFamily`,o=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:o,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function NL(e=!1,t,n,r){return e?function(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(qL).map((e=>qL[e])),schemaIgnore:!0,defaultValue:qL[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!Te.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>LL(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(Eg.OPTIONS).map((e=>Eg.OPTIONS[e])),schemaIgnore:!0,defaultValue:Eg.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}(n):function(e,t,n){const r=y({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]},flags:t});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==t?void 0:t.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:Object.keys(qL).map((e=>qL[e])),defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",show:(e,t)=>!Te.continuous(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:r}=n,{barGrouping:o,qHyperCubeDef:i}=r,a=i.qMeasures.length,s=i.qDimensions.length,l="grouped"===o.grouping&&s>0&&a+s>2;return Te.continuous(r)?1:l?EL:TL},schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:OL("axis.title",r,e)}}}:void 0,axisLabelSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:OL("axis.label.name",r,e)}}}:void 0,labelSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...OL("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0,legendTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{legendTitleSection:{component:"items",ref:"components",key:"legend",items:OL("legend.title",r,e)}}}:void 0,legendLabelSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{legendLabelSection:{component:"items",ref:"components",key:"legend",items:OL("legend.label",r,e)}}}:void 0}}}(t,n,r)}const DL={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues:(e,t)=>({key:"bar",style:{width:LL(e,t.layout),strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}),items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},width:{show:(e,t,n)=>!Te.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:TL}}}}},AL=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk},IL=(e,t)=>e.qHyperCube[t].filter((e=>AL(e))),RL=e=>({get:(t,n,r)=>Te.continuous(r.layout)?e:t(n.type),set(e,t,n){const r=Oe(n.type,n);t(n.type,e,r)}}),PL=e=>{if(!e)return!1;const t=ue(!0,{},e);return t.qHyperCube.qMeasureInfo=IL(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=IL(e,"qDimensionInfo"),t&&!Te.continuous(t)&&Te.stacked(t)},zL=({translator:e,flags:t,anything:n})=>{var r,o,i;const a=null==n||null===(r=n.sense)||void 0===r||null===(o=r.isUnsupportedFeature)||void 0===o?void 0:o.call(r,"continuousData"),s={items:{labels:{items:{header:{show:(e,t,n)=>IL(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!PL(t.layout)&&IL(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>PL(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showSegmentLabels,set(e,t,n,r,o){o.dataPoint.showSegmentLabels=e,o.dataPoint.showLabels=o.dataPoint.showSegmentLabels||o.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>PL(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showTotalLabels,set(e,t,n,r,o){o.dataPoint.showTotalLabels=e,o.dataPoint.showLabels=o.dataPoint.showSegmentLabels||o.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>IL(n.layout,"qDimensionInfo").length&&IL(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,o){o.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>IL(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxis.show||"none"===r.measureAxis.show,set(e,t,n,r,o){o.measureAxis.show=e?"labels":"all"}}}}}}},l=null==n||null===(i=n.sense)||void 0===i?void 0:i.theme,c={uses:"settings",items:{simpleStyling:NL(!0,l,t,e),simpleLabels:s,general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_BARCHART")?NL(!1,l,t,e):DL,grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){const n=IL(t.layout,"qMeasureInfo").length,r=IL(t.layout,"qDimensionInfo").length;return r>0&&n+r>2},change(e,t){IL(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>Te.continuous(n.layout),convertFunctions:RL("stacked")},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>Te.continuous(n.layout),convertFunctions:RL("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(Eg.OPTIONS).map((e=>Eg.OPTIONS[e])),defaultValue:Eg.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!Te.continuous(n.layout)}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(PL(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&PL(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&PL(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{attributeExpression:Ms}},legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,r)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!Te.continuous(r.layout),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const r=IL(n.layout,"qMeasureInfo").length,o=IL(n.layout,"qDimensionInfo").length,i=e.dimensionAxis.maxVisibleItems;return i<0||i>1e4/(o+r)},globalChange:kL,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null},show:!a}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=t&&t.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(c.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),c},jL={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){Ft(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:r,qInterColumnSortOrder:o}=e.qHyperCubeDef,{qCardinal:i}=t.layout.qHyperCube.qDimensionInfo[0],a=o.length,s=[...Array(a).keys()];1===n.length&&r.length>=1&&i>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},FL={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"}}},_L=({translator:e,flags:t,anything:n})=>{var r,o;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,r){var o,i;if(null!=n&&null!==(o=n.sense)&&void 0!==o&&null!==(i=o.isUnsupportedFeature)&&void 0!==i&&i.call(o,"includeZeroValues"))return!1;const a=((e,t)=>{var n,r;const o=null===(n=t.layout)||void 0===n||null===(n=n.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.findIndex((e=>AL(e)));return(null===(r=t.properties)||void 0===r||null===(r=r.qHyperCubeDef)||void 0===r||null===(r=r.qDimensions)||void 0===r?void 0:r[o])===e})(e,t),s=Te.continuous(r.layout);return!(a&&s)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0,show:()=>t.isEnabled("IM_1579_HIDE_DIM_MEA")},trendLines:null!=n&&null!==(r=n.sense)&&void 0!==r&&null!==(o=r.isUnsupportedFeature)&&void 0!==o&&o.call(r,"trendlines")?void 0:FT({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function BL({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:_L({translator:e,flags:t,anything:n}),sorting:jL,addons:FL,settings:zL({translator:e,flags:t,anything:n})}}}const HL=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==bk};function $L(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const r=n.qHyperCube.qMeasureInfo.length,o=n.qHyperCube.qDimensionInfo.filter((e=>HL(e))).length;return 1===r&&2===o&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){const n=t.qHyperCube.qMeasureInfo.filter((e=>HL(e))).length,r=t.qHyperCube.qDimensionInfo.filter((e=>HL(e))).length;return n+r>2&&!Te.continuous(t)&&!((null==(o=t)||null===(i=o.qHyperCube)||void 0===i||null===(i=i.qDimensionInfo)||void 0===i?void 0:i.filter((e=>HL(e))).length)>1&&(null==o||null===(a=o.qHyperCube)||void 0===a?void 0:a.isHCEnabled));var o,i,a},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!Te.continuous(t)}}},color:{uses:"color"}}}}function VL(e){const t={},n=o(e,"components"),r=o(e,"dimensionAxis.axisDisplayMode"),i=o(e,"dimensionAxis.maxVisibleItems"),a=n?n.filter((e=>"bar"===e.key))[0]:void 0,s=o(e,"tooltip");if(a&&a.style&&Object.keys(a.style).forEach((e=>{t[`chart_style_${e}`]=a.style[e]})),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),s){t.chart_tooltip_custom=!s.auto;const e=o(s,"chart.object.refId");!s.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const WL=e=>!!(e&&e.qHyperCube.qSize.qcy>0),UL={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function KL(){const e=[];return Object.keys(UL).forEach((t=>{e.push(UL[t])})),e}function GL(e){const{flags:t}=e;return{definition:BL(e),softDefinition:$L(),support:{snapshot:WL,export:WL,exportData:!0,sharing:WL,viewData:!0,effects:!0,modifiers:KL()},importProperties:(n,r,o,i)=>{const a={layout:{templateId:r.templateId}};o.mapProperties(a);const s={defaultDimension:o.getDefaultDimensionProperties(),defaultMeasure:o.getDefaultMeasureProperties()},l=Y.axisChart.importProperties({exportFormat:n,initialProperties:r,dataDefinition:qk(e),defaultPropertyValues:s,hypercubePath:i,extension:o}),c=l.qProperty;return c.qHyperCubeDef.qDimensions.length>1&&"stacked"===c.barGrouping.grouping&&(c.qHyperCubeDef.qMode="K",c.qHyperCubeDef.qAlwaysFullyExpanded=!0),t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(Y.conditionalShow.unquarantine(c),Y.conditionalShow.unquarantineAlternative(c)),l},exportProperties:(e,n,r)=>{t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(Y.conditionalShow.quarantine(e.qProperty),Y.conditionalShow.quarantineAlternative(e.qProperty));return Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:n,viewDataMode:r})},migrate:{properties:e=>(e.qExtendsId||(function(e){var t;e.qHyperCubeDef.qDimensions.forEach(Ft),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(t=t.qHyperCubeDef)&&void 0!==t&&t.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(Ft)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:o}=e;if(t||!1!==o)return;const{continuousAuto:i}=n;(i||!i&&r)&&(e.scrollbar=Eg.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:VL}}}}}));