@nebula.js/sn-bar-chart 1.27.2 → 1.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-bar-chart v1.27.2
2
+ * @nebula.js/sn-bar-chart v1.27.3
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -44,4 +44,4 @@ Object.defineProperty(Fs,"__esModule",{value:!0});var Hs="function"==typeof Symb
44
44
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
45
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46
46
  * SOFTWARE.
47
- */var lv=av&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),sv))}};function cv(e){return e&&"[object Function]"==={}.toString.call(e)}function uv(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function dv(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function pv(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=uv(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+o)?e:pv(dv(e))}function mv(e){return e&&e.referenceNode?e.referenceNode:e}var fv=av&&!(!window.MSInputMethodContext||!document.documentMode),hv=av&&/MSIE 10/.test(navigator.userAgent);function gv(e){return 11===e?fv:10===e?hv:fv||hv}function vv(e){if(!e)return document.documentElement;for(var t=gv(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===uv(n,"position")?vv(n):n:e?e.ownerDocument.documentElement:document.documentElement}function yv(e){return null!==e.parentNode?yv(e.parentNode):e}function bv(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||o.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&vv(a.firstElementChild)!==a?vv(l):l;var c=yv(e);return c.host?bv(c.host,t):bv(e,yv(t).host)}function xv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var r=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||r;return i[n]}return e[n]}function Sv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=xv(t,"top"),r=xv(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function wv(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+o+"Width"],10)}function Cv(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],gv(10)?parseInt(n["offset"+e])+parseInt(o["margin"+("Height"===e?"Top":"Left")])+parseInt(o["margin"+("Height"===e?"Bottom":"Right")]):0)}function Mv(e){var t=e.body,n=e.documentElement,o=gv(10)&&getComputedStyle(n);return{height:Cv("Height",t,n,o),width:Cv("Width",t,n,o)}}var kv=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ev=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),Tv=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Nv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};function Lv(e){return Nv({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Dv(e){var t={};try{if(gv(10)){t=e.getBoundingClientRect();var n=xv(e,"top"),o=xv(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?Mv(e.ownerDocument):{},a=i.width||e.clientWidth||r.width,s=i.height||e.clientHeight||r.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=uv(e);l-=wv(u,"x"),c-=wv(u,"y"),r.width-=l,r.height-=c}return Lv(r)}function qv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=gv(10),r="HTML"===t.nodeName,i=Dv(e),a=Dv(t),s=pv(e),l=uv(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&r&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=Lv({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!o&&r){var p=parseFloat(l.marginTop,10),m=parseFloat(l.marginLeft,10);d.top-=c-p,d.bottom-=c-p,d.left-=u-m,d.right-=u-m,d.marginTop=p,d.marginLeft=m}return(o&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=Sv(d,t)),d}function Ov(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,o=qv(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:xv(n),s=t?0:xv(n,"left"),l={top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:r,height:i};return Lv(l)}function Rv(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===uv(e,"position"))return!0;var n=dv(e);return!!n&&Rv(n)}function Av(e){if(!e||!e.parentElement||gv())return document.documentElement;for(var t=e.parentElement;t&&"none"===uv(t,"transform");)t=t.parentElement;return t||document.documentElement}function Pv(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=r?Av(e):bv(e,mv(t));if("viewport"===o)i=Ov(a,r);else{var s=void 0;"scrollParent"===o?"BODY"===(s=pv(dv(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===o?e.ownerDocument.documentElement:o;var l=qv(s,a,r);if("HTML"!==s.nodeName||Rv(a))i=l;else{var c=Mv(e.ownerDocument),u=c.height,d=c.width;i.top+=l.top-l.marginTop,i.bottom=u+l.top,i.left+=l.left-l.marginLeft,i.right=d+l.left}}var p="number"==typeof(n=n||0);return i.left+=p?n:n.left||0,i.top+=p?n:n.top||0,i.right-=p?n:n.right||0,i.bottom-=p?n:n.bottom||0,i}function Iv(e){return e.width*e.height}function zv(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=Pv(n,o,i,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return Nv({key:e},s[e],{area:Iv(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function Bv(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=o?Av(t):bv(t,mv(n));return qv(n,r,o)}function Fv(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),o=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function Hv(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function jv(e,t,n){n=n.split("-")[0];var o=Fv(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return r[a]=t[a]+t[l]/2-o[l]/2,r[s]=n===s?t[s]-o[c]:t[Hv(s)],r}function Wv(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Vv(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var o=Wv(e,(function(e){return e[t]===n}));return e.indexOf(o)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&cv(n)&&(t.offsets.popper=Lv(t.offsets.popper),t.offsets.reference=Lv(t.offsets.reference),t=n(t,e))})),t}function _v(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Bv(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=zv(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=jv(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Vv(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Uv(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function $v(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==document.body.style[i])return i}return null}function Kv(){return this.state.isDestroyed=!0,Uv(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[$v("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Gv(e){var t=e.ownerDocument;return t?t.defaultView:window}function Yv(e,t,n,o){var r="BODY"===e.nodeName,i=r?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),r||Yv(pv(i.parentNode),t,n,o),o.push(i)}function Xv(e,t,n,o){n.updateBound=o,Gv(e).addEventListener("resize",n.updateBound,{passive:!0});var r=pv(e);return Yv(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function Jv(){this.state.eventsEnabled||(this.state=Xv(this.reference,this.options,this.state,this.scheduleUpdate))}function Zv(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,Gv(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function Qv(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ey(e,t){Object.keys(t).forEach((function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Qv(t[n])&&(o="px"),e.style[n]=t[n]+o}))}var ty=av&&/Firefox/i.test(navigator.userAgent);function ny(e,t,n){var o=Wv(e,(function(e){return e.name===t})),r=!!o&&e.some((function(e){return e.name===n&&e.enabled&&e.order<o.order}));if(!r){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}var oy=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ry=oy.slice(3);function iy(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ry.indexOf(e),o=ry.slice(n+1).concat(ry.slice(0,n));return t?o.reverse():o}var ay="flip",sy="clockwise",ly="counterclockwise";function cy(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(Wv(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return Lv(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,r,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,o){Qv(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))}))})),r}var uy={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:Tv({},l,i[l]),end:Tv({},l,i[l]+i[c]-a[c])};e.offsets.popper=Nv({},a,u[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,o=e.placement,r=e.offsets,i=r.popper,a=r.reference,s=o.split("-")[0],l=void 0;return l=Qv(+n)?[+n,0]:cy(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||vv(e.instance.popper);e.instance.reference===n&&(n=vv(n));var o=$v("transform"),r=e.instance.popper.style,i=r.top,a=r.left,s=r[o];r.top="",r.left="",r[o]="";var l=Pv(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);r.top=i,r.left=a,r[o]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),Tv({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(o=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),Tv({},n,o)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=Nv({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(o[l])&&(e.offsets.popper[l]=i(o[l])-n[c]),n[l]>i(o[s])&&(e.offsets.popper[l]=i(o[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!ny(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",m=l?"bottom":"right",f=Fv(o)[c];s[m]-f<a[d]&&(e.offsets.popper[d]-=a[d]-(s[m]-f)),s[d]+f>a[m]&&(e.offsets.popper[d]+=s[d]+f-a[m]),e.offsets.popper=Lv(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=uv(e.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),b=h-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[c]-f,b),0),e.arrowElement=o,e.offsets.arrow=(Tv(n={},d,Math.round(b)),Tv(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Uv(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Pv(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),o=e.placement.split("-")[0],r=Hv(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ay:a=[o,r];break;case sy:a=iy(o);break;case ly:a=iy(o,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(o!==s||a.length===l+1)return e;o=e.placement.split("-")[0],r=Hv(o);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===o&&d(c.right)>d(u.left)||"right"===o&&d(c.left)<d(u.right)||"top"===o&&d(c.bottom)>d(u.top)||"bottom"===o&&d(c.top)<d(u.bottom),m=d(c.left)<d(n.left),f=d(c.right)>d(n.right),h=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===o&&m||"right"===o&&f||"top"===o&&h||"bottom"===o&&g,y=-1!==["top","bottom"].indexOf(o),b=!!t.flipVariations&&(y&&"start"===i&&m||y&&"end"===i&&f||!y&&"start"===i&&h||!y&&"end"===i&&g),x=!!t.flipVariationsByContent&&(y&&"start"===i&&f||y&&"end"===i&&m||!y&&"start"===i&&g||!y&&"end"===i&&h),S=b||x;(p||v||S)&&(e.flipped=!0,(p||v)&&(o=a[l+1]),S&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=Nv({},e.offsets.popper,jv(e.instance.popper,e.offsets.reference,e.placement)),e=Vv(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(s?r[a?"width":"height"]:0),e.placement=Hv(t),e.offsets.popper=Lv(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!ny(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Wv(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,o=t.y,r=e.offsets.popper,i=Wv(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=vv(e.instance.popper),l=Dv(s),c={position:r.position},u=function(e,t){var n=e.offsets,o=n.popper,r=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(r.width),c=i(o.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?i:a:s,m=t?i:s;return{left:p(l%2==1&&c%2==1&&!d&&t?o.left-1:o.left),top:m(o.top),bottom:m(o.bottom),right:p(o.right)}}(e,window.devicePixelRatio<2||!ty),d="bottom"===n?"top":"bottom",p="right"===o?"left":"right",m=$v("transform"),f=void 0,h=void 0;if(h="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&m)c[m]="translate3d("+f+"px, "+h+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===p?-1:1;c[d]=h*g,c[p]=f*v,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=Nv({},y,e.attributes),e.styles=Nv({},c,e.styles),e.arrowStyles=Nv({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return ey(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&ey(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,o,r){var i=Bv(r,t,e,n.positionFixed),a=zv(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),ey(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},dy=function(){function e(t,n){var o=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};kv(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=lv(this.update.bind(this)),this.options=Nv({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Nv({},e.Defaults.modifiers,r.modifiers)).forEach((function(t){o.options.modifiers[t]=Nv({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Nv({name:e},o.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&cv(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Ev(e,[{key:"update",value:function(){return _v.call(this)}},{key:"destroy",value:function(){return Kv.call(this)}},{key:"enableEventListeners",value:function(){return Jv.call(this)}},{key:"disableEventListeners",value:function(){return Zv.call(this)}}]),e}();function py(e){return"function"==typeof e?e():e}dy.Utils=("undefined"!=typeof window?window:global).PopperUtils,dy.placements=oy,dy.Defaults=uy;var my="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,fy={},hy=r.forwardRef((function(e,t){var n=e.anchorEl,o=e.children,i=e.container,a=e.disablePortal,s=void 0!==a&&a,l=e.keepMounted,c=void 0!==l&&l,u=e.modifiers,d=e.open,p=e.placement,m=void 0===p?"bottom":p,f=e.popperOptions,h=void 0===f?fy:f,g=e.popperRef,v=e.transition,y=void 0!==v&&v,b=Rs(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),x=r.useRef(null),S=Bp(x,t),w=r.useRef(null),C=Bp(w,g),M=r.useRef(C);my((function(){M.current=C}),[C]),r.useImperativeHandle(g,(function(){return w.current}),[]);var k=r.useState(!0),E=k[0],T=k[1],N=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(m),L=r.useState(N),D=L[0],q=L[1],O=r.useCallback((function(){if(x.current&&n&&d){w.current&&(w.current.destroy(),M.current(null));var e=function(e){q(e.placement)};py(n);var t=new dy(py(n),x.current,qs({placement:N},h,{modifiers:qs({},s?{}:{preventOverflow:{boundariesElement:"window"}},{},u,{},h.modifiers),onCreate:Wf(e,h.onCreate),onUpdate:Wf(e,h.onUpdate)}));M.current(t)}}),[n,s,u,d,N,h]),R=r.useCallback((function(e){zp(S,e),O()}),[S,O]),A=function(){w.current&&(w.current.destroy(),M.current(null))};if(r.useEffect((function(){O()}),[O]),r.useEffect((function(){return function(){A()}}),[]),r.useEffect((function(){d||y||A()}),[d,y]),!c&&!d&&(!y||E))return null;var P={placement:D};return y&&(P.TransitionProps={in:d,onEnter:function(){T(!1)},onExited:function(){T(!0),A()}}),r.createElement(jf,{disablePortal:s,container:i},r.createElement("div",qs({ref:R,role:"tooltip"},b,{style:qs({position:"fixed",top:0,left:0},b.style)}),"function"==typeof o?o(P):o))})),gy=Qm(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),vy=Qm(r.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),yy=r.createElement(gy,null);var by=op((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return r.createElement("div",{className:Bd(n.root,t&&n.checked)},yy,r.createElement(vy,{className:n.layer}))})),xy=r.createContext(),Sy=r.createElement(by,{checked:!0}),wy=r.createElement(by,null),Cy=r.forwardRef((function(e,t){var n=e.checked,o=e.classes,i=e.color,a=void 0===i?"secondary":i,s=e.name,l=e.onChange,c=Rs(e,["checked","classes","color","name","onChange"]),u=r.useContext(xy),d=n,p=Wf(l,u&&u.onChange),m=s;return u&&(void 0===d&&(d=u.value===e.value),void 0===m&&(m=u.name)),r.createElement(Sf,qs({color:a,type:"radio",icon:wy,checkedIcon:Sy,classes:{root:Bd(o.root,o["color".concat(rp(a))]),checked:o.checked,disabled:o.disabled},name:m,checked:d,onChange:p,ref:t},c))}));function My(e,t){return"object"===Ps(t)&&null!==t?e===t:String(e)===String(t)}op((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Ts(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Ts(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(Cy),r.forwardRef((function(e,t){var n=e.actions,o=e.children,i=e.name,a=e.value,s=e.onChange,l=Rs(e,["actions","children","name","value","onChange"]),c=r.useRef(null),u=r.useRef(null!=a).current,d=r.useState((function(){return u?null:e.defaultValue})),p=d[0],m=d[1];r.useImperativeHandle(n,(function(){return{focus:function(){var e=c.current.querySelector("input:not(:disabled):checked");e||(e=c.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var f={name:i,onChange:function(e){u||m(e.target.value),s&&s(e,e.target.value)},value:u?a:p},h=Bp(t,c);return r.createElement(Wh,qs({role:"radiogroup",ref:h},l),r.createElement(xy.Provider,{value:f},o))})),r.Component;var ky=r.forwardRef((function(e,t){var n=e.autoFocus,o=e.autoWidth,i=e.children,a=e.classes,s=e.className,l=e.defaultValue,c=e.disabled,u=e.displayEmpty,d=e.labelId,p=e.IconComponent,m=e.inputRef,f=e.MenuProps,h=void 0===f?{}:f,g=e.multiple,v=e.name,y=e.onBlur,b=e.onChange,x=e.onClose,S=e.onFocus,w=e.onOpen,C=e.open,M=e.readOnly,k=e.renderValue;e.required;var E=e.SelectDisplayProps,T=void 0===E?{}:E,N=e.tabIndex;e.type;var L=e.value,D=e.variant,q=void 0===D?"standard":D,O=Rs(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),R=r.useRef(null!=L).current,A=r.useState(l),P=A[0],I=A[1],z=R?L:P,B=r.useRef(null),F=r.useState(null),H=F[0],j=F[1],W=r.useRef(null!=C).current,V=r.useState(),_=V[0],U=V[1],$=r.useState(!1),K=$[0],G=$[1],Y=Bp(t,m);r.useImperativeHandle(Y,(function(){return{focus:function(){H.focus()},node:B.current,value:z}}),[H,z]),r.useEffect((function(){n&&H&&H.focus()}),[n,H]);var X,J,Z=function(e,t){e?w&&w(t):(H.focus(),x&&x(t)),W||(U(o?null:H.clientWidth),G(e))},Q=function(e){return function(t){var n;if(g||Z(!1,t),g){n=Array.isArray(z)?vu(z):[];var o=z.indexOf(e.props.value);-1===o?n.push(e.props.value):n.splice(o,1)}else n=e.props.value;R||I(n),b&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:v}}),b(t,e))}},ee=null!==H&&(W?C:K);delete O["aria-invalid"];var te=[],ne=!1;(qh({value:z})||u)&&(k?X=k(z):ne=!0);var oe=r.Children.map(i,(function(e){if(!r.isValidElement(e))return null;var t;if(g){if(!Array.isArray(z))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=z.some((function(t){return My(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=My(z,e.props.value))&&ne&&(J=e.props.children);return r.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Q(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(X=g?te.join(", "):J);var re,ie=_;!o&&W&&H&&(ie=H.clientWidth),re=void 0!==N?N:c?null:0;var ae=T.id||(v?"mui-component-select-".concat(v):void 0);return r.createElement(r.Fragment,null,r.createElement("div",qs({className:Bd(a.root,a.select,a.selectMenu,a[q],s,c&&a.disabled),ref:j,tabIndex:re,role:"button","aria-expanded":ee?"true":void 0,"aria-labelledby":"".concat(d||""," ").concat(ae||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:c||M?null:function(e){Z(!0,e)},onBlur:function(e){!ee&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:z,name:v}}),y(e))},onFocus:S},T,{id:ae}),function(e){return null==e||"string"==typeof e&&!e.trim()}(X)?r.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):X),r.createElement("input",qs({value:Array.isArray(z)?z.join(","):z,name:v,ref:B,type:"hidden",autoFocus:n},O)),r.createElement(p,{className:Bd(a.icon,a["icon".concat(rp(q))],ee&&a.iconOpen)}),r.createElement(Kg,qs({id:"menu-".concat(v||""),anchorEl:H,open:ee,onClose:function(e){Z(!1,e)}},h,{MenuListProps:qs({"aria-labelledby":d,role:"listbox",disableListWrap:!0},h.MenuListProps),PaperProps:qs({},h.PaperProps,{style:qs({minWidth:ie},null!=h.PaperProps?h.PaperProps.style:null)})}),oe))})),Ey=Qg,Ty=r.createElement(pg,null),Ny=r.createElement(Ih,null),Ly=r.forwardRef((function e(t,n){var o=t.autoWidth,i=void 0!==o&&o,a=t.children,s=t.classes,l=t.displayEmpty,c=void 0!==l&&l,u=t.IconComponent,d=void 0===u?Zg:u,p=t.id,m=t.input,f=t.inputProps,h=t.labelId,g=t.MenuProps,v=t.multiple,y=void 0!==v&&v,b=t.native,x=void 0!==b&&b,S=t.onClose,w=t.onOpen,C=t.open,M=t.renderValue,k=t.SelectDisplayProps,E=t.variant,T=void 0===E?"standard":E,N=t.labelWidth,L=void 0===N?0:N,D=Rs(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),q=x?Jg:ky,O=kh({props:t,muiFormControl:vf(),states:["variant"]}).variant||T,R=m||{standard:Ty,outlined:r.createElement(iv,{labelWidth:L}),filled:Ny}[O];return r.cloneElement(R,qs({inputComponent:q,select:!0,inputProps:qs({children:a,IconComponent:d,variant:O,type:void 0,multiple:y},x?{}:{autoWidth:i,displayEmpty:c,labelId:h,MenuProps:g,onClose:S,onOpen:w,open:C,renderValue:M,SelectDisplayProps:qs({id:p},k)},{},f,{classes:f?hd({baseClasses:s,newClasses:f.classes,Component:e}):s},m?m.props.inputProps:{}),ref:n},D))}));Ly.muiName="Select";var Dy=op(Ey,{name:"MuiSelect"})(Ly);var qy=op((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:qs({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,o=e.className,i=e.open,a=e.value,s=e.valueLabelDisplay;return"off"===s?t:r.cloneElement(t,{className:Bd(t.props.className,(i||"on"===s)&&n.open,n.thumb)},r.createElement("span",{className:Bd(n.offset,o)},r.createElement("span",{className:n.circle},r.createElement("span",{className:n.label},a))))}));function Oy(e,t){return e-t}function Ry(e,t,n){return e<t?t:e>n?n:e}function Ay(e,t){return e.reduce((function(e,n,o){var r=Math.abs(t-n);return null===e||r<e.distance||r===e.distance?{distance:r,index:o}:e}),null).index}function Py(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var o=e.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Iy(e,t,n){return 100*(e-t)/(n-t)}function zy(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var o=e.toString().split(".")[1];return o?o.length:0}(t)))}function By(e){var t=e.values,n=e.source,o=e.newValue,r=e.index;if(t[r]===o)return n;var i=vu(t);return i[r]=o,i}function Fy(e){var t=e.sliderRef,n=e.activeIndex,o=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),o&&o(n)}var Hy={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},jy=[],Wy=function(e){return e},Vy=r.forwardRef((function(e,t){var n=e["aria-label"],o=e["aria-labelledby"],i=e["aria-valuetext"],a=e.classes,s=e.className,l=e.color,c=void 0===l?"primary":l,u=e.component,d=void 0===u?"span":u,p=e.defaultValue,m=e.disabled,f=void 0!==m&&m,h=e.getAriaLabel,g=e.getAriaValueText,v=e.marks,y=void 0===v?jy:v,b=e.max,x=void 0===b?100:b,S=e.min,w=void 0===S?0:S,C=e.name,M=e.onChange,k=e.onChangeCommitted,E=e.onMouseDown,T=e.orientation,N=void 0===T?"horizontal":T,L=e.step,D=void 0===L?1:L,q=e.ThumbComponent,O=void 0===q?"span":q,R=e.track,A=void 0===R?"normal":R,P=e.value,I=e.ValueLabelComponent,z=void 0===I?qy:I,B=e.valueLabelDisplay,F=void 0===B?"off":B,H=e.valueLabelFormat,j=void 0===H?Wy:H,W=Rs(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),V=np(),_=r.useRef(null!=P).current,U=r.useRef(),$=r.useState(-1),K=$[0],G=$[1],Y=r.useState(-1),X=Y[0],J=Y[1],Z=r.useState(p),Q=Z[0],ee=Z[1],te=_?P:Q,ne=Array.isArray(te),oe=r.useRef(),re=ne?vu(te).sort(Oy):[te];re=re.map((function(e){return Ry(e,w,x)}));var ie=!0===y&&null!==D?vu(Array(Math.floor((x-w)/D)+1)).map((function(e,t){return{value:w+D*t}})):y;oe.current={source:te};var ae=im(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=r.useState(-1),de=ue[0],pe=ue[1],me=r.useRef(),fe=Bp(ce,me),he=Bp(t,fe),ge=Kp((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=Kp((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=Kp((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=Kp((function(){J(-1)})),xe=Kp((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),o=re[n],r=(x-w)/10,i=ie.map((function(e){return e.value})),a=i.indexOf(o);switch(e.key){case"Home":t=w;break;case"End":t=x;break;case"PageUp":D&&(t=o+r);break;case"PageDown":D&&(t=o-r);break;case"ArrowRight":case"ArrowUp":t=D?o+D:i[a+1]||i[i.length-1];break;case"ArrowLeft":case"ArrowDown":t=D?o-D:i[a-1]||i[0];break;default:return}if(e.preventDefault(),D&&(t=zy(t,D)),t=Ry(t,w,x),ne){var s=t;t=By({values:re,source:te,newValue:t,index:n}).sort(Oy),Fy({sliderRef:me,activeIndex:t.indexOf(s)})}_||ee(t),pe(n),M&&M(e,t),k&&k(e,t)})),Se=r.useRef(),we=N;"rtl"===V.direction&&"vertical"!==N&&(we+="-reverse");var Ce=r.useCallback((function(e){var t,n,o=e.finger,r=e.move,i=void 0!==r&&r,a=e.values,s=e.source,l=me.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,p=l.left;if(t=0===we.indexOf("vertical")?(d-o.y)/u:(o.x-p)/c,-1!==we.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,w,x),D)n=zy(n,D);else{var m=ie.map((function(e){return e.value}));n=m[Ay(m,n)]}n=Ry(n,w,x);var f=0;if(ne){var h=n;f=(n=By({values:a,source:s,newValue:n,index:f=i?Se.current:Ay(a,n)}).sort(Oy)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[x,w,we,ne,D,ie]),Me=Kp((function(e){var t=Py(e,U);if(t){var n=Ce({finger:t,move:!0,values:re,source:te}),o=n.newValue,r=n.activeIndex;Fy({sliderRef:me,activeIndex:r,setActive:G}),_||ee(o),M&&M(e,o)}})),ke=Kp((function(e){var t=Py(e,U);if(t){var n=Ce({finger:t,values:re,source:te}).newValue;G(-1),"touchend"===e.type&&J(-1),k&&k(e,n),U.current=void 0,document.body.removeEventListener("mousemove",Me),document.body.removeEventListener("mouseup",ke),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Me),document.body.removeEventListener("touchend",ke)}})),Ee=Kp((function(e){0===e.buttons&&ke(e)})),Te=Kp((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(U.current=t.identifier);var n=Py(e,U),o=Ce({finger:n,values:re,source:te}),r=o.newValue,i=o.activeIndex;Fy({sliderRef:me,activeIndex:i,setActive:G}),_||ee(r),M&&M(e,r),document.body.addEventListener("touchmove",Me),document.body.addEventListener("touchend",ke)}));r.useEffect((function(){var e=me.current;return e.addEventListener("touchstart",Te),function(){e.removeEventListener("touchstart",Te),document.body.removeEventListener("mousemove",Me),document.body.removeEventListener("mouseup",ke),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Me),document.body.removeEventListener("touchend",ke)}}),[Ee,ke,Me,Te]);var Ne=Kp((function(e){E&&E(e),e.preventDefault();var t=Py(e,U),n=Ce({finger:t,values:re,source:te}),o=n.newValue,r=n.activeIndex;Fy({sliderRef:me,activeIndex:r,setActive:G}),_||ee(o),M&&M(e,o),document.body.addEventListener("mousemove",Me),document.body.addEventListener("mouseenter",Ee),document.body.addEventListener("mouseup",ke)})),Le=Iy(ne?re[0]:w,w,x),De=Iy(re[re.length-1],w,x)-Le,qe=qs({},Hy[we].offset(Le),{},Hy[we].leap(De));return r.createElement(d,qs({ref:he,className:Bd(a.root,a["color".concat(rp(c))],s,f&&a.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&a.marked,!1===A&&a.trackFalse,{vertical:a.vertical}[N],{inverted:a.trackInverted}[A]),onMouseDown:Ne},W),r.createElement("span",{className:a.rail}),r.createElement("span",{className:a.track,style:qe}),r.createElement("input",{value:re.join(","),name:C,type:"hidden"}),ie.map((function(e){var t,n=Iy(e.value,w,x),o=Hy[we].offset(n);if(!1===A)t=-1!==re.indexOf(e.value);else{var i=ne?e.value>=re[0]&&e.value<=re[re.length-1]:e.value<=re[0];t=i&&"normal"===A||!i&&"inverted"===A}return r.createElement(r.Fragment,{key:e.value},r.createElement("span",{style:o,className:Bd(a.mark,t&&a.markActive)}),r.createElement("span",{"aria-hidden":!0,style:o,className:Bd(a.markLabel,t&&a.markLabelActive)},e.label))})),re.map((function(e,t){var s=Iy(e,w,x),l=Hy[we].offset(s);return r.createElement(z,{key:t,valueLabelFormat:j,valueLabelDisplay:F,className:a.valueLabel,value:"function"==typeof j?j(e,t):j,index:t,open:X===t||K===t||"on"===F,disabled:f},r.createElement(O,{className:Bd(a.thumb,a["thumbColor".concat(rp(c))],K===t&&a.active,f&&a.disabled,de===t&&a.focusVisible),tabIndex:f?null:0,role:"slider",style:l,"data-index":t,"aria-label":h?h(t):n,"aria-labelledby":o,"aria-orientation":N,"aria-valuemax":x,"aria-valuemin":w,"aria-valuenow":e,"aria-valuetext":g?g(e,t):i,onKeyDown:xe,onFocus:ge,onBlur:ve,onMouseOver:ye,onMouseLeave:be}))})))}));op((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Ls(e.palette.primary.main,.62):Ns(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Ts(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Ts(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Ts(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Ts(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:qs({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(Vy);var _y=r.forwardRef((function(e,t){var n=e.action,o=e.classes,i=e.className,a=e.message,s=e.role,l=void 0===s?"alert":s,c=Rs(e,["action","classes","className","message","role"]);return r.createElement(ap,qs({component:Xm,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:l,square:!0,elevation:6,className:Bd(o.root,i),ref:t},c),r.createElement("div",{className:o.message},a),n?r.createElement("div",{className:o.action},n):null)})),Uy=op((function(e){var t="light"===e.palette.type?.8:.98,n=Es(e.palette.background.default,t);return{root:Ds({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(_y),$y=r.forwardRef((function(e,t){var n=e.action,o=e.anchorOrigin,i=(o=void 0===o?{vertical:"bottom",horizontal:"center"}:o).vertical,a=o.horizontal,s=e.autoHideDuration,l=e.children,c=e.classes,u=e.className,d=e.ClickAwayListenerProps,p=e.ContentProps,m=e.disableWindowBlurListener,f=void 0!==m&&m,h=e.message,g=e.onClose,v=e.onEnter,y=e.onEntered,b=e.onEntering,x=e.onExit,S=e.onExited,w=e.onExiting,C=e.onMouseEnter,M=e.onMouseLeave,k=e.open,E=e.resumeHideDuration,T=e.TransitionComponent,N=void 0===T?og:T,L=e.transitionDuration,D=void 0===L?{enter:wl.enteringScreen,exit:wl.leavingScreen}:L,q=e.TransitionProps,O=Rs(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),R=r.useRef(),A=r.useState(!0),P=A[0],I=A[1],z=r.useCallback((function(e){var t=null!=e?e:s;g&&null!=t&&(clearTimeout(R.current),R.current=setTimeout((function(){g&&null!=(null!=e?e:s)&&g(null,"timeout")}),t))}),[s,g]);r.useEffect((function(){return k&&z(),function(){clearTimeout(R.current)}}),[k,z]);var B=function(){clearTimeout(R.current)},F=r.useCallback((function(){if(null!=s){if(null!=E)return void z(E);z(.5*s)}}),[s,E,z]);return r.useEffect((function(){if(!f&&k)return window.addEventListener("focus",F),window.addEventListener("blur",B),function(){window.removeEventListener("focus",F),window.removeEventListener("blur",B)}}),[f,F,k]),!k&&P?null:r.createElement(If,qs({onClickAway:function(e){g&&g(e,"clickaway")}},d),r.createElement("div",qs({className:Bd(c.root,c["anchorOrigin".concat(rp(i)).concat(rp(a))],u),onMouseEnter:function(e){C&&C(e),B()},onMouseLeave:function(e){M&&M(e),F()},ref:t},O),r.createElement(N,qs({appear:!0,in:k,onEnter:Wf((function(){I(!1)}),v),onEntered:y,onEntering:b,onExit:x,onExited:Wf((function(){I(!0)}),S),onExiting:w,timeout:D,direction:"top"===i?"down":"up"},q),l||r.createElement(Uy,qs({message:h,action:n},p)))))}));op((function(e){var t={top:8},n={bottom:8},o={justifyContent:"flex-end"},r={justifyContent:"flex-start"},i={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:qs({},t,Ds({},e.breakpoints.up("sm"),qs({},i,{},c))),anchorOriginBottomCenter:qs({},n,Ds({},e.breakpoints.up("sm"),qs({},a,{},c))),anchorOriginTopRight:qs({},t,{},o,Ds({},e.breakpoints.up("sm"),qs({left:"auto"},i,{},s))),anchorOriginBottomRight:qs({},n,{},o,Ds({},e.breakpoints.up("sm"),qs({left:"auto"},a,{},s))),anchorOriginTopLeft:qs({},t,{},r,Ds({},e.breakpoints.up("sm"),qs({right:"auto"},i,{},l))),anchorOriginBottomLeft:qs({},n,{},r,Ds({},e.breakpoints.up("sm"),qs({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})($y);var Ky=r.forwardRef((function(e,t){var n=e.active,o=void 0!==n&&n,i=e.alternativeLabel,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.connector,p=e.disabled,m=void 0!==p&&p,f=e.index,h=e.last,g=e.orientation,v=Rs(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return r.createElement("div",qs({className:Bd(s.root,s[g],l,i&&s.alternativeLabel,u&&s.completed),ref:t},v),d&&i&&0!==f&&r.cloneElement(d,{orientation:g,alternativeLabel:i,index:f,active:o,completed:u,disabled:m}),r.Children.map(a,(function(e){return r.isValidElement(e)?r.cloneElement(e,qs({active:o,alternativeLabel:i,completed:u,disabled:m,last:h,icon:f+1,orientation:g},e.props)):null})))}));op({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(Ky);var Gy=Qm(r.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),Yy=Qm(r.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),Xy=r.createElement("circle",{cx:"12",cy:"12",r:"12"}),Jy=r.forwardRef((function(e,t){var n=e.completed,o=void 0!==n&&n,i=e.icon,a=e.active,s=void 0!==a&&a,l=e.error,c=void 0!==l&&l,u=e.classes;return"number"==typeof i||"string"==typeof i?c?r.createElement(Yy,{className:Bd(u.root,u.error),ref:t}):o?r.createElement(Gy,{className:Bd(u.root,u.completed),ref:t}):r.createElement(Zm,{className:Bd(u.root,s&&u.active),ref:t},Xy,r.createElement("text",{className:u.text,x:"12",y:"16",textAnchor:"middle"},i)):i})),Zy=op((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(Jy),Qy=r.forwardRef((function(e,t){var n=e.active,o=void 0!==n&&n,i=e.alternativeLabel,a=void 0!==i&&i,s=e.children,l=e.classes,c=e.className,u=e.completed,d=void 0!==u&&u,p=e.disabled,m=void 0!==p&&p,f=e.error,h=void 0!==f&&f,g=e.icon;e.last;var v=e.optional,y=e.orientation,b=void 0===y?"horizontal":y,x=e.StepIconComponent,S=e.StepIconProps,w=Rs(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),C=x;return g&&!C&&(C=Zy),r.createElement("span",qs({className:Bd(l.root,l[b],c,m&&l.disabled,a&&l.alternativeLabel,h&&l.error),ref:t},w),g||C?r.createElement("span",{className:Bd(l.iconContainer,a&&l.alternativeLabel)},r.createElement(C,qs({completed:d,active:o,error:h,icon:g},S))):null,r.createElement("span",{className:l.labelContainer},r.createElement(Xm,{variant:"body2",component:"span",className:Bd(l.label,a&&l.alternativeLabel,d&&l.completed,o&&l.active,h&&l.error),display:"block"},s),v))}));Qy.muiName="StepLabel";var eb=op((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(Qy),tb=r.forwardRef((function(e,t){var n=e.active,o=e.alternativeLabel,i=e.children,a=e.classes,s=e.className,l=e.completed,c=e.disabled,u=e.icon;e.last;var d=e.optional,p=e.orientation,m=Rs(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),f={active:n,alternativeLabel:o,completed:l,disabled:c,icon:u,optional:d,orientation:p},h=zh(i,["StepLabel"])?r.cloneElement(i,f):r.createElement(eb,f,i);return r.createElement(pm,qs({disabled:c,TouchRippleProps:{className:a.touchRipple},className:Bd(a.root,a[p],s),ref:t},m),h)}));op({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(tb);var nb=r.forwardRef((function(e,t){var n=e.active,o=e.alternativeLabel,i=void 0!==o&&o,a=e.classes,s=e.className,l=e.completed,c=e.disabled;e.index;var u=e.orientation,d=void 0===u?"horizontal":u,p=Rs(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return r.createElement("div",qs({className:Bd(a.root,a[d],s,i&&a.alternativeLabel,n&&a.active,l&&a.completed,c&&a.disabled),ref:t},p),r.createElement("span",{className:Bd(a.line,"vertical"===d?a.lineVertical:a.lineHorizontal)}))})),ob=op((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(nb),rb=r.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var o=e.children,i=e.classes,a=e.className;e.completed;var s=e.last;e.optional,e.orientation;var l=e.TransitionComponent,c=void 0===l?Bf:l,u=e.transitionDuration,d=void 0===u?"auto":u,p=e.TransitionProps,m=Rs(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),f=d;return"auto"!==d||c.muiSupportAuto||(f=void 0),r.createElement("div",qs({className:Bd(i.root,a,s&&i.last),ref:t},m),r.createElement(c,qs({in:n,className:i.transition,timeout:f,unmountOnExit:!0},p),o))}));op((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(rb);var ib=r.createElement(ob,null),ab=r.forwardRef((function(e,t){var n=e.activeStep,o=void 0===n?0:n,i=e.alternativeLabel,a=void 0!==i&&i,s=e.children,l=e.classes,c=e.className,u=e.connector,d=void 0===u?ib:u,p=e.nonLinear,m=void 0!==p&&p,f=e.orientation,h=void 0===f?"horizontal":f,g=Rs(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),v=r.isValidElement(d)?r.cloneElement(d,{orientation:h}):null,y=r.Children.toArray(s),b=y.map((function(e,t){var n={alternativeLabel:a,connector:d,last:t+1===y.length,orientation:h},i={index:t,active:!1,completed:!1,disabled:!1};return o===t?i.active=!0:!m&&o>t?i.completed=!0:!m&&o<t&&(i.disabled=!0),[!a&&v&&0!==t&&r.cloneElement(v,qs({key:t},i)),r.cloneElement(e,qs({},n,{},i,{},e.props))]}));return r.createElement(ap,qs({square:!0,elevation:0,className:Bd(l.root,l[h],c,a&&l.alternativeLabel),ref:t},g),b)}));op({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(ab);var sb=r.forwardRef((function(e,t){var n=e.anchor,o=e.classes,i=e.className,a=e.width,s=Rs(e,["anchor","classes","className","width"]);return r.createElement("div",qs({className:Bd(o.root,o["anchor".concat(rp(n))],i),ref:t,style:Ds({},fh(n)?"width":"height",a)},s))})),lb=op((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(sb),cb=null;function ub(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function db(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function pb(e,t){return e?t.clientWidth:t.clientHeight}function mb(e,t,n,o){return Math.min(Math.max(n?t-e:o+t-e,0),o)}var fb="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),hb={enter:wl.enteringScreen,exit:wl.leavingScreen},gb="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;r.forwardRef((function(e,t){var n=e.anchor,o=void 0===n?"left":n,i=e.disableBackdropTransition,a=void 0!==i&&i,s=e.disableDiscovery,c=void 0!==s&&s,u=e.disableSwipeToOpen,d=void 0===u?fb:u,p=e.hideBackdrop,m=e.hysteresis,f=void 0===m?.52:m,h=e.minFlingVelocity,g=void 0===h?450:h,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,b=Rs(v,["BackdropProps"]),x=e.onClose,S=e.onOpen,w=e.open,C=e.PaperProps,M=void 0===C?{}:C,k=e.SwipeAreaProps,E=e.swipeAreaWidth,T=void 0===E?20:E,N=e.transitionDuration,L=void 0===N?hb:N,D=e.variant,q=void 0===D?"temporary":D,O=Rs(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),R=np(),A=r.useState(!1),P=A[0],I=A[1],z=r.useRef({isSwiping:null}),B=r.useRef(),F=r.useRef(),H=r.useRef(),j=r.useRef(!1),W=r.useRef();gb((function(){W.current=null}),[w]);var V=r.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?null:n,i=t.changeTransition,s=void 0===i||i,l=hh(R,o),c=-1!==["right","bottom"].indexOf(l)?1:-1,u=fh(o),d=u?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),m=H.current.style;m.webkitTransform=d,m.transform=d;var f="";if(r&&(f=R.transitions.create("all",Ip({timeout:L},{mode:r}))),s&&(m.webkitTransition=f,m.transition=f),!a&&!p){var h=F.current.style;h.opacity=1-e/pb(u,H.current),s&&(h.webkitTransition=f,h.transition=f)}}),[o,a,p,R,L]),_=Kp((function(e){if(j.current)if(cb=null,j.current=!1,I(!1),z.current.isSwiping){z.current.isSwiping=null;var t,n=hh(R,o),r=fh(o);t=r?ub(n,e.changedTouches):db(n,e.changedTouches);var i=r?z.current.startX:z.current.startY,a=pb(r,H.current),s=mb(t,i,w,a),l=s/a;Math.abs(z.current.velocity)>g&&(W.current=1e3*Math.abs((a-s)/z.current.velocity)),w?z.current.velocity>g||l>f?x():V(0,{mode:"exit"}):z.current.velocity<-g||1-l>f?S():V(pb(r,H.current),{mode:"enter"})}else z.current.isSwiping=null})),U=Kp((function(e){if(H.current&&j.current&&(null==cb||cb===z.current)){var t=hh(R,o),n=fh(o),r=ub(t,e.touches),i=db(t,e.touches);if(w&&H.current.contains(e.target)&&null==cb){var a=function(e){var t=e.domTreeShapes,n=e.start,o=e.current,r=e.anchor,i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=o>=n;"top"!==r&&"left"!==r||(t=!t);var l="left"===r||"right"===r?"x":"y",c=e[i[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var o=window.getComputedStyle(e);"absolute"===o.getPropertyValue("position")||"hidden"===o.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,H.current),start:n?z.current.startX:z.current.startY,current:n?r:i,anchor:o});if(a)return void(cb=a);cb=z.current}if(null==z.current.isSwiping){var s=Math.abs(r-z.current.startX),l=Math.abs(i-z.current.startY);s>l&&e.cancelable&&e.preventDefault();var u=n?s>l&&s>3:l>s&&l>3;if(!0===u||(n?l>3:s>3)){if(z.current.isSwiping=u,!u)return void _(e);z.current.startX=r,z.current.startY=i,c||w||(n?z.current.startX-=T:z.current.startY-=T)}}if(z.current.isSwiping){var d=pb(n,H.current),p=n?z.current.startX:z.current.startY;w&&!z.current.paperHit&&(p=Math.min(p,d));var m=mb(n?r:i,p,w,d);if(w)if(z.current.paperHit)0===m&&(z.current.startX=r,z.current.startY=i);else{if(!(n?r<d:i<d))return;z.current.paperHit=!0,z.current.startX=r,z.current.startY=i}null===z.current.lastTranslate&&(z.current.lastTranslate=m,z.current.lastTime=performance.now()+1);var f=(m-z.current.lastTranslate)/(performance.now()-z.current.lastTime)*1e3;z.current.velocity=.4*z.current.velocity+.6*f,z.current.lastTranslate=m,z.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),V(m)}}})),$=Kp((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!w||F.current.contains(e.target)||H.current.contains(e.target))){var t=hh(R,o),n=fh(o),r=ub(t,e.touches),i=db(t,e.touches);if(!w){if(d||e.target!==B.current)return;if(n){if(r>T)return}else if(i>T)return}e.muiHandled=!0,cb=null,z.current.startX=r,z.current.startY=i,I(!0),!w&&H.current&&V(pb(n,H.current)+(c?20:-T),{changeTransition:!1}),z.current.velocity=0,z.current.lastTime=null,z.current.lastTranslate=null,z.current.paperHit=!1,j.current=!0}}));r.useEffect((function(){if("temporary"===q)return document.body.addEventListener("touchstart",$),document.body.addEventListener("touchmove",U,{passive:!1}),document.body.addEventListener("touchend",_),function(){document.body.removeEventListener("touchstart",$),document.body.removeEventListener("touchmove",U,{passive:!1}),document.body.removeEventListener("touchend",_)}}),[q,$,U,_]),r.useEffect((function(){return function(){cb===z.current&&(cb=null)}}),[]),r.useEffect((function(){w||I(!1)}),[w]);var K=r.useCallback((function(e){F.current=l.findDOMNode(e)}),[]),G=r.useCallback((function(e){H.current=l.findDOMNode(e)}),[]);return r.createElement(r.Fragment,null,r.createElement(yh,qs({open:!("temporary"!==q||!P)||w,variant:q,ModalProps:qs({BackdropProps:qs({},y,{ref:K})},b),PaperProps:qs({},M,{style:qs({pointerEvents:"temporary"!==q||w?"":"none"},M.style),ref:G}),anchor:o,transitionDuration:W.current||L,onClose:x,ref:t},O)),!d&&"temporary"===q&&r.createElement(Yp,null,r.createElement(lb,qs({anchor:o,ref:B,width:T},k))))}));var vb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.color,a=void 0===i?"secondary":i,s=e.edge,l=void 0!==s&&s,c=e.size,u=void 0===c?"medium":c,d=Rs(e,["classes","className","color","edge","size"]),p=r.createElement("span",{className:n.thumb});return r.createElement("span",{className:Bd(n.root,o,{start:n.edgeStart,end:n.edgeEnd}[l],{small:n["size".concat(rp(u))]}[u])},r.createElement(Sf,qs({type:"checkbox",icon:p,checkedIcon:p,classes:{root:Bd(n.switchBase,n["color".concat(rp(a))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},d)),r.createElement("span",{className:n.track}))}));op((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Ts(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Ts(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(vb);var yb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.disabled,a=void 0!==i&&i,s=e.disableFocusRipple,l=void 0!==s&&s,c=e.fullWidth,u=e.icon,d=e.indicator,p=e.label,m=e.onChange,f=e.onClick,h=e.selected,g=e.textColor,v=void 0===g?"inherit":g,y=e.value,b=e.wrapped,x=void 0!==b&&b,S=Rs(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return r.createElement(pm,qs({focusRipple:!l,className:Bd(n.root,n["textColor".concat(rp(v))],o,a&&n.disabled,h&&n.selected,p&&u&&n.labelIcon,c&&n.fullWidth,x&&n.wrapped),ref:t,role:"tab","aria-selected":h,disabled:a,onClick:function(e){m&&m(e,y),f&&f(e)}},S),r.createElement("span",{className:n.wrapper},u,p),d)}));op((function(e){var t;return{root:qs({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Ds(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),Ds(t,"overflow","hidden"),Ds(t,"whiteSpace","normal"),Ds(t,"textAlign","center"),Ds(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(yb);var bb=r.createContext(),xb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"table":i,s=e.padding,l=void 0===s?"default":s,c=e.size,u=void 0===c?"medium":c,d=e.stickyHeader,p=void 0!==d&&d,m=Rs(e,["classes","className","component","padding","size","stickyHeader"]),f=r.useMemo((function(){return{padding:l,size:u,stickyHeader:p}}),[l,u,p]);return r.createElement(bb.Provider,{value:f},r.createElement(a,qs({ref:t,className:Bd(n.root,o,p&&n.stickyHeader)},m)))}));op((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":qs({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(xb);var Sb=r.createContext(),wb={variant:"body"},Cb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"tbody":i,s=Rs(e,["classes","className","component"]);return r.createElement(Sb.Provider,{value:wb},r.createElement(a,qs({className:Bd(n.root,o),ref:t},s)))}));op({root:{display:"table-row-group"}},{name:"MuiTableBody"})(Cb);var Mb=r.forwardRef((function(e,t){var n,o=e.align,i=void 0===o?"inherit":o,a=e.classes,s=e.className,l=e.component,c=e.padding,u=e.scope,d=e.size,p=e.sortDirection,m=e.variant,f=Rs(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),h=r.useContext(bb),g=r.useContext(Sb);n=l||(g&&"head"===g.variant?"th":"td");var v=u;!v&&g&&"head"===g.variant&&(v="col");var y=c||(h&&h.padding?h.padding:"default"),b=d||(h&&h.size?h.size:"medium"),x=m||g&&g.variant,S=null;return p&&(S="asc"===p?"ascending":"descending"),r.createElement(n,qs({ref:t,className:Bd(a.root,a[x],s,"inherit"!==i&&a["align".concat(rp(i))],"default"!==y&&a["padding".concat(rp(y))],"medium"!==b&&a["size".concat(rp(b))],{head:h&&h.stickyHeader&&a.stickyHeader}[x]),"aria-sort":S,scope:v},f))})),kb=op((function(e){return{root:qs({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Ls(Ts(e.palette.divider,1),.88):Ns(Ts(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(Mb),Eb={variant:"footer"},Tb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"tfoot":i,s=Rs(e,["classes","className","component"]);return r.createElement(Sb.Provider,{value:Eb},r.createElement(a,qs({className:Bd(n.root,o),ref:t},s)))}));op({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(Tb);var Nb={variant:"head"},Lb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"thead":i,s=Rs(e,["classes","className","component"]);return r.createElement(Sb.Provider,{value:Nb},r.createElement(a,qs({className:Bd(n.root,o),ref:t},s)))}));op({root:{display:"table-header-group"}},{name:"MuiTableHead"})(Lb);var Db=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"div":i,s=e.disableGutters,l=void 0!==s&&s,c=e.variant,u=void 0===c?"regular":c,d=Rs(e,["classes","className","component","disableGutters","variant"]);return r.createElement(a,qs({className:Bd(n.root,n[u],o,!l&&n.gutters),ref:t},d))})),qb=op((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Ds({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(Db),Ob=Qm(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),Rb=Qm(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),Ab=r.createElement(Rb,null),Pb=r.createElement(Ob,null),Ib=r.createElement(Ob,null),zb=r.createElement(Rb,null),Bb=r.forwardRef((function(e,t){var n=e.backIconButtonProps,o=e.count,i=e.nextIconButtonProps,a=e.onChangePage,s=e.page,l=e.rowsPerPage,c=Rs(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),u=np();return r.createElement("div",qs({ref:t},c),r.createElement(bf,qs({onClick:function(e){a(e,s-1)},disabled:0===s,color:"inherit"},n),"rtl"===u.direction?Ab:Pb),r.createElement(bf,qs({onClick:function(e){a(e,s+1)},disabled:s>=Math.ceil(o/l)-1,color:"inherit"},i),"rtl"===u.direction?Ib:zb))})),Fb=function(e){var t=e.from,n=e.to,o=e.count;return"".concat(t,"-").concat(-1===n?o:n," of ").concat(o)},Hb=[10,25,50,100],jb=r.forwardRef((function(e,t){var n,o=e.ActionsComponent,i=void 0===o?Bb:o,a=e.backIconButtonProps,s=e.classes,l=e.className,c=e.colSpan,u=e.component,d=void 0===u?kb:u,p=e.count,m=e.labelDisplayedRows,f=void 0===m?Fb:m,h=e.labelRowsPerPage,g=void 0===h?"Rows per page:":h,v=e.nextIconButtonProps,y=e.onChangePage,b=e.onChangeRowsPerPage,x=e.page,S=e.rowsPerPage,w=e.rowsPerPageOptions,C=void 0===w?Hb:w,M=e.SelectProps,k=void 0===M?{}:M,E=Rs(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);d!==kb&&"td"!==d||(n=c||1e3);var T=k.native?"option":Yg;return r.createElement(d,qs({className:Bd(s.root,l),colSpan:n,ref:t},E),r.createElement(qb,{className:s.toolbar},r.createElement("div",{className:s.spacer}),C.length>1&&r.createElement(Xm,{color:"inherit",variant:"body2",className:s.caption},g),C.length>1&&r.createElement(Dy,qs({classes:{select:s.select,icon:s.selectIcon},input:r.createElement(Ah,{className:Bd(s.input,s.selectRoot)}),value:S,onChange:b},k),C.map((function(e){return r.createElement(T,{className:s.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),r.createElement(Xm,{color:"inherit",variant:"body2",className:s.caption},f({from:0===p?0:x*S+1,to:Math.min(p,(x+1)*S),count:p,page:x})),r.createElement(i,{className:s.actions,backIconButtonProps:a,count:p,nextIconButtonProps:v,onChangePage:y,page:x,rowsPerPage:S})))}));op((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(jb);var Wb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"tr":i,s=e.hover,l=void 0!==s&&s,c=e.selected,u=void 0!==c&&c,d=Rs(e,["classes","className","component","hover","selected"]),p=r.useContext(Sb);return r.createElement(a,qs({ref:t,className:Bd(n.root,o,p&&{head:n.head,footer:n.footer}[p.variant],l&&n.hover,u&&n.selected)},d))}));op((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(Wb);var Vb=Qm(r.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),_b=r.forwardRef((function(e,t){var n=e.active,o=void 0!==n&&n,i=e.children,a=e.classes,s=e.className,l=e.direction,c=void 0===l?"desc":l,u=e.hideSortIcon,d=void 0!==u&&u,p=e.IconComponent,m=void 0===p?Vb:p,f=Rs(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return r.createElement(pm,qs({className:Bd(a.root,s,o&&a.active),component:"span",disableRipple:!0,ref:t},f),i,d&&!o?null:r.createElement(m,{className:Bd(a.icon,a["iconDirection".concat(rp(c))])}))}));op((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(_b);var Ub,$b=!("undefined"==typeof window||!window.document||!window.document.createElement);function Kb(){if(Ub)return Ub;if(!$b||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Ub="reverse",e.scrollLeft>0?Ub="default":(e.scrollLeft=1,0===e.scrollLeft&&(Ub="negative")),document.body.removeChild(e),Ub}function Gb(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var o=Kb();if("indeterminate"===o)return Number.NaN;switch(o){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function Yb(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var Xb={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Jb(e){var t=e.onChange,n=Rs(e,["onChange"]),o=r.useRef(),i=r.useRef(null),a=function(){o.current=i.current.offsetHeight-i.current.clientHeight};return r.useEffect((function(){var e=ch((function(){var e=o.current;a(),e!==o.current&&t(o.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),r.useEffect((function(){a(),t(o.current)}),[t]),r.createElement("div",qs({style:Xb,ref:i},n))}var Zb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.color,a=e.orientation,s=Rs(e,["classes","className","color","orientation"]);return r.createElement("span",qs({className:Bd(n.root,n["color".concat(rp(i))],o,{vertical:n.vertical}[a]),ref:t},s))})),Qb=op((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(Zb),ex=r.createElement(Ob,{fontSize:"small"}),tx=r.createElement(Rb,{fontSize:"small"}),nx=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.direction,a=e.orientation,s=e.visible,l=Rs(e,["classes","className","direction","orientation","visible"]),c=Bd(n.root,o,{vertical:n.vertical}[a]);return s?r.createElement(pm,qs({component:"div",className:c,ref:t,role:null,tabIndex:null},l),"left"===i?ex:tx):r.createElement("div",{className:c})})),ox=op({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(nx),rx=r.forwardRef((function(e,t){var n=e.action,o=e.centered,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"div":c,d=e.indicatorColor,p=void 0===d?"secondary":d,m=e.onChange,f=e.orientation,h=void 0===f?"horizontal":f,g=e.ScrollButtonComponent,v=void 0===g?ox:g,y=e.scrollButtons,b=void 0===y?"auto":y,x=e.TabIndicatorProps,S=void 0===x?{}:x,w=e.textColor,C=void 0===w?"inherit":w,M=e.value,k=e.variant,E=void 0===k?"standard":k,T=Rs(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=np(),L="scrollable"===E,D="rtl"===N.direction,q="vertical"===h,O=q?"scrollTop":"scrollLeft",R=q?"top":"left",A=q?"bottom":"right",P=q?"clientHeight":"clientWidth",I=q?"height":"width",z=r.useState(!1),B=z[0],F=z[1],H=r.useState({}),j=H[0],W=H[1],V=r.useState({start:!1,end:!1}),_=V[0],U=V[1],$=r.useState({overflow:"hidden",marginBottom:null}),K=$[0],G=$[1],Y=new Map,X=r.useRef(null),J=r.useRef(null),Z=function(){var e,t,n=X.current;if(n){var o=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:Gb(n,N.direction),scrollWidth:n.scrollWidth,top:o.top,bottom:o.bottom,left:o.left,right:o.right}}if(n&&!1!==M){var r=J.current.children;if(r.length>0){var i=r[Y.get(M)];t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Q=Kp((function(){var e,t=Z(),n=t.tabsMeta,o=t.tabMeta,r=0;if(o&&n)if(q)r=o.top-n.top+n.scrollTop;else{var i=D?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;r=o.left-n.left+i}var a=(Ds(e={},R,r),Ds(e,I,o?o[I]:0),e);if(isNaN(j[R])||isNaN(j[I]))W(a);else{var s=Math.abs(j[R]-a[R]),l=Math.abs(j[I]-a[I]);(s>=1||l>=1)&&W(a)}})),ee=function(e){!function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=o.ease,a=void 0===i?Yb:i,s=o.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,p=function(){d=!0},m=function o(i){if(d)r(new Error("Animation cancelled"));else{null===c&&(c=i);var s=Math.min(1,(i-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){r(null)})):requestAnimationFrame(o)}};u===n?r(new Error("Element already at target position")):requestAnimationFrame(m)}(O,X.current,e)},te=function(e){var t=X.current[O];q?t+=e:(t+=e*(D?-1:1),t*=D&&"reverse"===Kb()?-1:1),ee(t)},ne=function(){te(-X.current[P])},oe=function(){te(X.current[P])},re=r.useCallback((function(e){G({overflow:null,marginBottom:-e})}),[]),ie=Kp((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[R]<t[R]){var o=t[O]+(n[R]-t[R]);ee(o)}else if(n[A]>t[A]){var r=t[O]+(n[A]-t[A]);ee(r)}})),ae=Kp((function(){if(L&&"off"!==b){var e,t,n=X.current,o=n.scrollTop,r=n.scrollHeight,i=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(q)e=o>1,t=o<r-i-1;else{var l=Gb(X.current,N.direction);e=D?l<a-s-1:l>1,t=D?l>1:l<a-s-1}e===_.start&&t===_.end||U({start:e,end:t})}}));r.useEffect((function(){var e=ch((function(){Q(),ae()})),t=_f(X.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Q,ae]);var se=r.useCallback(ch((function(){ae()})));r.useEffect((function(){return function(){se.clear()}}),[se]),r.useEffect((function(){F(!0)}),[]),r.useEffect((function(){Q(),ae()})),r.useEffect((function(){ie()}),[ie,j]),r.useImperativeHandle(n,(function(){return{updateIndicator:Q,updateScrollButtons:ae}}),[Q,ae]);var le=r.createElement(Qb,qs({className:s.indicator,orientation:h,color:p},S,{style:qs({},j,{},S.style)})),ce=0,ue=r.Children.map(a,(function(e){if(!r.isValidElement(e))return null;var t=void 0===e.props.value?ce:e.props.value;Y.set(t,ce);var n=t===M;return ce+=1,r.cloneElement(e,{fullWidth:"fullWidth"===E,indicator:n&&!B&&le,selected:n,onChange:m,textColor:C,value:t})})),de=function(){var e={};e.scrollbarSizeListener=L?r.createElement(Jb,{className:s.scrollable,onChange:re}):null;var t=_.start||_.end,n=L&&("auto"===b&&t||"desktop"===b||"on"===b);return e.scrollButtonStart=n?r.createElement(v,{orientation:h,direction:D?"right":"left",onClick:ne,visible:_.start,className:Bd(s.scrollButtons,"on"!==b&&s.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?r.createElement(v,{orientation:h,direction:D?"left":"right",onClick:oe,visible:_.end,className:Bd(s.scrollButtons,"on"!==b&&s.scrollButtonsDesktop)}):null,e}();return r.createElement(u,qs({className:Bd(s.root,l,q&&s.vertical),ref:t},T),de.scrollButtonStart,de.scrollbarSizeListener,r.createElement("div",{className:Bd(s.scroller,L?s.scrollable:s.fixed),style:K,ref:X,onScroll:se},r.createElement("div",{className:Bd(s.flexContainer,q&&s.flexContainerVertical,i&&!L&&s.centered),ref:J,role:"tablist"},ue),B&&le),de.scrollButtonEnd)}));op((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Ds({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(rx);var ix={standard:pg,filled:Ih,outlined:iv},ax=r.forwardRef((function(e,t){var n=e.autoComplete,o=e.autoFocus,i=e.children,a=e.classes,s=e.className,c=e.color,u=void 0===c?"primary":c,d=e.defaultValue,p=e.error,m=e.FormHelperTextProps,f=e.fullWidth,h=e.helperText,g=e.hiddenLabel,v=e.id,y=e.InputLabelProps,b=e.inputProps,x=e.InputProps,S=e.inputRef,w=e.label,C=e.multiline,M=e.name,k=e.onBlur,E=e.onChange,T=e.onFocus,N=e.placeholder,L=e.required,D=void 0!==L&&L,q=e.rows,O=e.rowsMax,R=e.select,A=void 0!==R&&R,P=e.SelectProps,I=e.type,z=e.value,B=e.variant,F=void 0===B?"standard":B,H=Rs(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),j=r.useState(0),W=j[0],V=j[1],_=r.useRef(null);r.useEffect((function(){if("outlined"===F){var e=l.findDOMNode(_.current);V(null!=e?e.offsetWidth:0)}}),[F,D,w]);var U={};"outlined"===F&&(y&&void 0!==y.shrink&&(U.notched=y.shrink),U.labelWidth=W),A&&(P&&P.native||(U.id=void 0),U["aria-describedby"]=void 0);var $=h&&v?"".concat(v,"-helper-text"):void 0,K=w&&v?"".concat(v,"-label"):void 0,G=ix[F],Y=r.createElement(G,qs({"aria-describedby":$,autoComplete:n,autoFocus:o,defaultValue:d,fullWidth:f,multiline:C,name:M,rows:q,rowsMax:O,type:I,value:z,id:v,inputRef:S,onBlur:k,onChange:E,onFocus:T,placeholder:N,inputProps:b},U,x));return r.createElement(Fh,qs({className:Bd(a.root,s),error:p,fullWidth:f,hiddenLabel:g,ref:t,required:D,color:u,variant:F},H),w&&r.createElement(hg,qs({htmlFor:v,ref:_,id:K},y),w),A?r.createElement(Dy,qs({"aria-describedby":$,id:v,labelId:K,value:z,input:Y},P),i):Y,h&&r.createElement(_h,qs({id:$},m),h))}));function sx(e){return Math.round(1e5*e)/1e5}op({root:{}},{name:"MuiTextField"})(ax);var lx=r.forwardRef((function(e,t){var n=e.children,o=e.classes,i=e.disableFocusListener,a=void 0!==i&&i,s=e.disableHoverListener,c=void 0!==s&&s,u=e.disableTouchListener,d=void 0!==u&&u,p=e.enterDelay,m=void 0===p?0:p,f=e.enterTouchDelay,h=void 0===f?700:f,g=e.id,v=e.interactive,y=void 0!==v&&v,b=e.leaveDelay,x=void 0===b?0:b,S=e.leaveTouchDelay,w=void 0===S?1500:S,C=e.onClose,M=e.onOpen,k=e.open,E=e.placement,T=void 0===E?"bottom":E,N=e.PopperProps,L=e.title,D=e.TransitionComponent,q=void 0===D?og:D,O=e.TransitionProps,R=Rs(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),A=np(),P=r.useState(!1),I=P[0],z=P[1],B=r.useState(0)[1],F=r.useState(),H=F[0],j=F[1],W=r.useRef(!1),V=r.useRef(null!=k).current,_=r.useRef(),U=r.useRef(),$=r.useRef(),K=r.useRef(),G=r.useRef();r.useEffect((function(){_.current||(_.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),k&&B((function(e){return!e}))}),[k]),r.useEffect((function(){return function(){clearTimeout(U.current),clearTimeout($.current),clearTimeout(K.current),clearTimeout(G.current)}}),[]);var Y=function(e){V||I||z(!0),M&&M(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),W.current&&"touchstart"!==e.type||(H&&H.removeAttribute("title"),clearTimeout($.current),clearTimeout(K.current),m?(e.persist(),$.current=setTimeout((function(){Y(e)}),m)):Y(e))},J=im(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=r.useState(!1),ne=te[0],oe=te[1],re=function(e){V||z(!1),C&&C(e),clearTimeout(U.current),U.current=setTimeout((function(){W.current=!1}),A.transitions.duration.shortest)},ie=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ne&&(oe(!1),Q())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout($.current),clearTimeout(K.current),e.persist(),K.current=setTimeout((function(){re(e)}),x)},ae=Bp(j,t),se=Bp(ee,ae),le=r.useCallback((function(e){zp(se,l.findDOMNode(e))}),[se]),ce=Bp(n.ref,le),ue=V?k:I;""===L&&(ue=!1);var de=!ue&&!c,pe=qs({"aria-describedby":ue?g||_.current:null,title:de&&"string"==typeof L?L:null},R,{},n.props,{className:Bd(R.className,n.props.className)});d||(pe.onTouchStart=function(e){W.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(K.current),clearTimeout(U.current),clearTimeout(G.current),e.persist(),G.current=setTimeout((function(){X(e)}),h)},pe.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(G.current),clearTimeout(K.current),e.persist(),K.current=setTimeout((function(){re(e)}),w)}),c||(pe.onMouseOver=X,pe.onMouseLeave=ie),a||(pe.onFocus=function(e){H||j(e.currentTarget),Z(e)&&(oe(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},pe.onBlur=ie);var me=y?{onMouseOver:pe.onMouseOver,onMouseLeave:pe.onMouseLeave,onFocus:pe.onFocus,onBlur:pe.onBlur}:{};return r.createElement(r.Fragment,null,r.cloneElement(n,qs({ref:ce},pe)),r.createElement(hy,qs({className:Bd(o.popper,y&&o.popperInteractive),placement:T,anchorEl:H,open:!!H&&ue,id:pe["aria-describedby"],transition:!0},me,N),(function(e){var t=e.placement,n=e.TransitionProps;return r.createElement(q,qs({timeout:A.transitions.duration.shorter},n,O),r.createElement("div",{className:Bd(o.tooltip,o["tooltipPlacement".concat(rp(t.split("-")[0]))],W.current&&o.touch)},L))})))}));op((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:Ts(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(sx(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(sx(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:Ds({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Ds({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Ds({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Ds({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(lx);var cx={entering:{transform:"none"},entered:{transform:"none"}},ux={enter:wl.enteringScreen,exit:wl.leavingScreen};function dx(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function px({d:e,size:t,style:n={},viewBox:o="0 0 16 16"}){const i={fontSize:dx(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return r.createElement("i",{style:i},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:o,fill:"currentColor"},r.createElement("path",{d:e})))}r.forwardRef((function(e,t){var n=e.children,o=e.in,i=e.onEnter,a=e.onExit,s=e.style,l=e.timeout,c=void 0===l?ux:l,u=Rs(e,["children","in","onEnter","onExit","style","timeout"]),d=np(),p=Bp(n.ref,t);return r.createElement(vp,qs({appear:!0,in:o,onEnter:function(e,t){Pp(e);var n=Ip({style:s,timeout:c},{mode:"enter"});e.style.webkitTransition=d.transitions.create("transform",n),e.style.transition=d.transitions.create("transform",n),i&&i(e,t)},onExit:function(e){var t=Ip({style:s,timeout:c},{mode:"exit"});e.style.webkitTransition=d.transitions.create("transform",t),e.style.transition=d.transitions.create("transform",t),a&&a(e)},timeout:c},u),(function(e,t){return r.cloneElement(n,qs({style:qs({transform:"scale(0)",visibility:"exited"!==e||o?void 0:"hidden"},cx[e],{},s,{},n.props.style),ref:p},t))}))}));const mx={d:"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"},fx={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"},hx="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",gx={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"},vx={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"};function yx(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.",e.layout);let o=ia.generate(t,n);o&&o.length&&(o=o.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(o,!0))}))}function bx(e,t,n,o,r,i){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[o].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex((e=>e.qDef.cId===n)),c=oe(!0,{},a),u=c.qHyperCubeDef[o][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],i||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[o][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][l]=u,r&&r({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),yx(e,a,c)}))}const xx=(e,t)=>{const n=[],o=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&o.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(o).then((()=>n))};function Sx({dir:e,dock:t,altList:n,model:o,translator:r,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>xx(i,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title: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)}(e,i,r).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){bx(o,e,t,"qDimensions",a)}}}function wx(e,t,n,o="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(r=e,"H"===r.qGrouping?r.title||"":r.qFallbackTitle||""),drillUp(e){n.drillUp(o,t,e)},id:e.cId};var r}function Cx({altList:e,app:t,dir:n,dock:o,model:r,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:o,getAlternatives:()=>xx(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).map((e=>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 o=e.qDef.qLabelExpression;if(o)return t.evaluate(o);const r=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(r)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){bx(r,e,t,"qMeasures",i,a)}}}function Mx(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const kx={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"}}},Ex=({children:e,...t})=>r.createElement(af,G({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const Tx=El({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 Nx=Ll({productionPrefix:"q9950",disableGlobal:!0,seed:""});var Lx={DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Dx}=Lx;function qx({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Dx}=(null==t?void 0:t.meta)||{},{qHyperCube:o}=e.getLayout();return o.qSize.qcy*o.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Ox}=Lx,Rx=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Ox}=(null==t?void 0:t.meta)||{},{qHyperCube:o}=e.getLayout();return o.qDimensionInfo.length>1&&!qx({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Ax}=Lx,{DEFAULT_NUM_POINTS:Px,DEFAULT_NUM_LINES:Ix}=Lx,{DEFAULT_NUM_POINTS:zx}=Lx,Bx=({layoutService:e,largeDataService:t})=>{if(!qx({layoutService:e,largeDataService:t})){const{maxNumPoints:e=zx}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:o=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:r=Ix,maxNumPoints:i=Px}=(null==t?void 0:t.meta)||{};if(Rx({layoutService:e,largeDataService:t})*o[0]<=i)return o[0];const a=i/Math.max(1,Math.min(r,o[1]));return Math.floor(o[0]<=a?a:a/4)})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Ax}=(null==t?void 0:t.meta)||{},{measureCount:o=1}=(null==e?void 0:e.meta)||{},r=4+2*(o-1);return Math.floor(n/(o*r))})({layoutService:e,largeDataService:t})};function Fx({model:e,layoutService:t,largeDataService:n,definitionPath:o="/qHyperCubeDef"}){return{shouldFetchReduced:()=>qx({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Bx({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Rx({layoutService:t,largeDataService:n}),fetch:(r,i)=>(({start:e,end:t,model:n,layoutService:o,largeDataService:r,definitionPath:i})=>{const a={qStart:e,qEnd:t,qNbrPoints:Bx({layoutService:o,largeDataService:r}),qMaxNbrTicks:300,qMaxNumberLines:Rx({layoutService:o,largeDataService:r})};return n.getHyperCubeContinuousData(i,a,!1)})({start:r,end:i,model:e,layoutService:t,largeDataService:n,definitionPath:o})}}function Hx(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function jx({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 o=n+e,r=o+t;return 1===t&&0===e&&(o=n-.5,r=n+.5),{zoom:{min:o,max:r}}}(n,t.get("continuousMin"))}}}function Wx(){const e=()=>{},t=[],n={};return e.set=(e,o)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1),t.push(e),n[e]=o},e.forEach=e=>{t.forEach(((t,o)=>e(n[t],o)))},e.has=e=>e in n,e}function Vx(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const o=[],r=Wx(),i=Wx();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?r.set(l,s):s[0].qNum>t&&(i.has(l)||i.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&o.push(s)}return r.forEach(((e,t)=>o.splice(t,0,e))),i.forEach((e=>o.push(e))),o}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const o=[];let r,i;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?r=s:s[0].qNum>t&&(i||(i=s)),s[0].qNum>=e&&s[0].qNum<=t&&o.push(s)}return r&&o.unshift(r),i&&o.push(i),o}({start:e,end:t,matrix:n})}function _x(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Ux(e,t,n){const o={qDataPages:(n.qDataPages||[]).map((n=>{const o=Vx(e,t,n.qMatrix),r=_x(n.qArea,o);return{...n,qArea:r,qMatrix:o}}))};return n.qAxisData&&n.qAxisData.qAxis&&(o.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,o)=>((o.qStart>=e&&o.qStart<=t||o.qEnd>=e&&o.qEnd<=t||o.qStart<e&&o.qEnd>t)&&n.push(o),n)),[])})))}}(e,t,n.qAxisData)),o}const $x=2**.5,Kx=1/$x;function Gx(e){return e.qIsOtherCell}function Yx({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Gx)){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(Gx)||t++})),t}(n)}const Xx={command:{processDataPage:()=>{}}};var Jx={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 o=t[e],r=t[e+1];o.data={},r||1===o.end?r?(o.data.start=o.value,o.data.end=r.value,o.end=r.position):(o.data.start=o.value,o.data.end=o.value):(o.data.start=o.value,o.data.end=n,o.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 o=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],o.data.start]},x:0,y:0,width:o.start*this.rect.width,height:this.rect.height})}return n}};function Zx(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Qx(e,t){const{localProps:{size:n},props:{anchor:o}}=t,r=function({props:e,localProps:{size:t},style:n,renderer:o}){const r=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=>o.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,o)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=o;e.start===e.end&&(d=c.width+2*r,1===e.end&&(u-=d));const p={x:u+r,y:r,width:d-2*r,height:t.height-2*r},m=s(l[0]+"…").width,f=Math.max(0,p.width-c.width),h=Math.max(0,p.height-c.height),g=i*f,v=a*h;return{show:p.width>=Math.min(m,c.width),text:l,dx:g,dy:v,rect:p,style:n.label,segment:{x:u+g,width:c.width+2*r},tickValue:e.value}}}}(t),i=function({localProps:{size:e},style:t,scale:n,props:o}){const[r,i]=n.domain(),a=Math.max(0,Math.min(1,o.guideLine.major.justify));return{resolve:(n,o)=>{const s=a*o.width,l=Zx(o.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=r&&n.value<=i,x1:l,y1:0,x2:l,y2:Zx(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const o=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:o,height:t.height}}(e,n,o);return{rect:t,label:r.resolve(e,t),guideLine:i.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const o=e[n-1],r=t[n-1].label;if(o&&o.start===o.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(i=n.segment,a=r.segment,!(i.x<a.x?i.x+i.width>=a.x:a.x+a.width>=i.x))}var i,a}(e,a),a}function eS(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:o=>{const r=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),i=Zx(o.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:Zx(r,n.minorGuideLine.strokeWidth),x2:i,y2:Zx(t.guideLine.minor.size+r,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function tS(e){return e.filter((e=>e.show)).map((e=>oe({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var nS={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)),o=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const o=Zx(1,t.line.strokeWidth);return{show:n.line.show,x1:Zx(0,t.line.strokeWidth),y1:o,x2:Zx(e.width,t.line.strokeWidth),y2:o,style:t.line}}(this),this.state.major=Qx(n,this),this.state.minor=eS(o,this)},render(){return[...tS([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>oe({},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})))),...tS(this.state.major.map((e=>e.guideLine))),...tS(this.state.minor.map((e=>e.guideLine)))];var e}};function oS(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 rS(e){return e.qTags.indexOf("$qualified")>-1}function iS({qAxis:e}){const t=[],n=[];for(let o=0;o<e.length;o++){const r=o+1,i=e[o],a=e[r];oS(i,a)?(rS(a)?(t.push(r),n.push(o)):(t.push(o),n.push(r)),o++):(t.push(o),n.push(o))}return{qualified:t,nonQualified:n}}function aS({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let o,r=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(r=c.index,o=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){i="auto",s=!0;break}if(e&&e.queries.inner(n)){i=e.index;const o=t[l+2];o&&o.queries.minor(n)&&(a=o.index);break}}}if(!Number.isNaN(r)&&Number.isNaN(i)&&"auto"!==i){i=r,r=NaN;const e=t[o+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(r)&&(r="auto",i="auto");return{outer:r,inner:i,minor:a,isDayOrShorter:s}}}}function sS({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:o}){const r=n;return{isDayOrShorter:()=>(r.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,r.isDayOrShorter),count:()=>e.length,maxRange:()=>(r.maxRange=e.length?Math.max(...e.map((e=>Math.abs(o(e.qStart)-o(e.qEnd))))):0,r.maxRange),rangeAndWidth(){const n=o.clamp();return o.clamp(!1),r.rangeAndWidth=e.map((e=>({range:Math.abs(o(e.qStart)-o(e.qEnd)),width:t(""+e.qText).width+16}))),o.clamp(n),r.rangeAndWidth}}}function lS({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>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function cS({qualified:e,nonQualified:t,qAxis:n,measureText:o,reqAutoFitWidth:r,scale:i},{attributesFactory:a=sS,queryFactory:s=lS}={attributesFactory:sS,queryFactory:lS}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:o,scale:i});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:r})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function uS({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:o=0,scale:r},{metaFactory:i=cS,mapper:a=iS,resolver:s=aS}={metaFactory:cS,mapper:iS,resolver:aS}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=i({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:o,scale:r}),p=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const o=n.key({distance:t});if(n.get(o))return n.get(o);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 r=p.resolve(t);return n.set(o,r),r}}}function dS(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const pS=dS(0).getTime();function mS(e){return(e.getTime()-pS)/86400/1e3}var fS=new Date,hS=new Date;function gS(e,t,n,o){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},r.range=function(n,o,i){var a,s=[];if(n=r.ceil(n),i=null==i?1:Math.floor(i),!(n<o&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<o);return s},r.filter=function(n){return gS((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,o){if(e>=e)if(o<0)for(;++o<=0;)for(;t(e,-1),!n(e););else for(;--o>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,o){return fS.setTime(+t),hS.setTime(+o),e(fS),e(hS),Math.floor(n(fS,hS))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(o?function(t){return o(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}var vS=gS((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));vS.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?gS((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):vS:null},vS.range;var yS=1e3,bS=6e4,xS=36e5,SS=864e5,wS=6048e5,CS=gS((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*yS)}),(function(e,t){return(t-e)/yS}),(function(e){return e.getUTCSeconds()}));function MS(e){return gS((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())*bS)/wS}))}CS.range,gS((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*yS)}),(function(e,t){e.setTime(+e+t*bS)}),(function(e,t){return(t-e)/bS}),(function(e){return e.getMinutes()})).range,gS((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*yS-e.getMinutes()*bS)}),(function(e,t){e.setTime(+e+t*xS)}),(function(e,t){return(t-e)/xS}),(function(e){return e.getHours()})).range,gS((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())*bS)/SS}),(function(e){return e.getDate()-1})).range;var kS=MS(0),ES=MS(1),TS=MS(2),NS=MS(3),LS=MS(4),DS=MS(5),qS=MS(6);kS.range,ES.range,TS.range,NS.range,LS.range,DS.range,qS.range,gS((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()})).range;var OS=gS((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()}));OS.every=function(e){return isFinite(e=Math.floor(e))&&e>0?gS((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},OS.range;var RS=gS((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*bS)}),(function(e,t){return(t-e)/bS}),(function(e){return e.getUTCMinutes()}));RS.range;var AS=gS((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*xS)}),(function(e,t){return(t-e)/xS}),(function(e){return e.getUTCHours()}));AS.range;var PS=gS((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/SS}),(function(e){return e.getUTCDate()-1}));function IS(e){return gS((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)/wS}))}PS.range;var zS=IS(0),BS=IS(1),FS=IS(2),HS=IS(3),jS=IS(4),WS=IS(5),VS=IS(6);zS.range,BS.range,FS.range,HS.range,jS.range,WS.range,VS.range;var _S=gS((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()}));_S.range;var US=gS((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()}));US.every=function(e){return isFinite(e=Math.floor(e))&&e>0?gS((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},US.range;const $S=1,KS=2,GS=3,YS=4,XS=5,JS=6;function ZS({timeScale:e,labels:t,distance:n,isDayOrShorter:o,cache:r,timeOnly:i,initialMin:a}){const[s,l]=e.domain(),c=r.key({distance:n});let u;r.get(c,1)?u=r.get(c,1):(u=function(e,t,n,o,r,i){function a(e){return US.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=CS.count(e,t),l=RS.count(e,t),c=AS.count(e,t),u=PS.count(e,t),d=zS.count(e,t),p=_S.count(e,t),m=US.count(e,t),f=n/o.second.width-1,h=n/o.minute.width-1,g=n/o.date.width-1,v=n/o.year.width-1,y={type:"year",desc:"year",count:m,interval:US.every(1),formatter:o.year.formatter,offset:e=>US.offset(e,-1),floor:US.floor};if(s<=f)y.type=$S,y.desc="second",y.count=s,y.interval=CS.every(1),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-1),y.floor=CS.floor;else if(s/2<=f)y.type=$S,y.desc="every other second",y.count=s/2,y.interval=CS.every(2),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-2),y.floor=CS.floor;else if(s/5<=f)y.type=$S,y.desc="every 5 second",y.count=s/5,y.interval=CS.every(5),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-5),y.floor=CS.floor;else if(s/15<=f)y.type=$S,y.desc="every 15 second",y.count=s/15,y.interval=CS.every(15),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-15),y.floor=CS.floor;else if(s/30<=f)y.type=$S,y.desc="every 30 second",y.count=s/30,y.interval=CS.every(30),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-30),y.floor=CS.floor;else if(l<=h)y.type=KS,y.desc="minute",y.count=l,y.interval=RS.every(1),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-1),y.floor=RS.floor;else if(l/2<=h)y.type=KS,y.desc="every 2 minute",y.count=l/2,y.interval=RS.every(2),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-2),y.floor=RS.floor;else if(l/5<=h)y.type=KS,y.desc="every 5 minute",y.count=l/5,y.interval=RS.every(5),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-5),y.floor=RS.floor;else if(l/10<=h)y.type=KS,y.desc="every 10 minute",y.count=l/10,y.interval=RS.every(10),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-10),y.floor=RS.floor;else if(l/15<=h)y.type=KS,y.desc="every 15 minute",y.count=l/15,y.interval=RS.every(15),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-15),y.floor=RS.floor;else if(l/30<=h)y.type=KS,y.desc="every 30 minute",y.count=l/30,y.interval=RS.every(30),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-30),y.floor=RS.floor;else if(c<=h)y.type=GS,y.desc="hour",y.count=c,y.interval=AS.every(1),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-1),y.floor=AS.floor;else if(c/2<=h)y.type=GS,y.desc="every 2 hour",y.count=c/2,y.interval=AS.every(2),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-2),y.floor=AS.floor;else if(c/3<=h)y.type=GS,y.desc="every 3 hour",y.count=c/3,y.interval=AS.every(3),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-3),y.floor=AS.floor;else if(c/6<=h)y.type=GS,y.desc="every 6 hour",y.count=c/6,y.interval=AS.every(6),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-6),y.floor=AS.floor;else if(c/12<=h||r)y.type=GS,y.desc="every 12 hour",y.count=c/12,y.interval=AS.every(12),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-12),y.floor=AS.floor;else if(u<=g)y.type=YS,y.desc="day",y.count=u,y.interval=PS.every(1),y.formatter=o.date.formatter,y.offset=e=>PS.offset(e,-1),y.floor=PS.floor;else if(u/2<=g)y.type=YS,y.desc="every 2 day",y.count=u/2,y.interval=PS.every(2),y.formatter=o.date.formatter,y.offset=e=>PS.offset(e,-2),y.floor=PS.floor;else if(u/3<=g)y.type=YS,y.desc="every 3 day",y.count=u/3,y.interval=PS.every(3),y.formatter=o.date.formatter,y.offset=e=>PS.offset(e,-3),y.floor=PS.floor;else if(d<=g)y.type=YS,y.desc="week",y.count=d,y.interval=zS.every(1),y.formatter=o.date.formatter,y.offset=e=>zS.offset(e,-1),y.floor=PS.floor;else if(d/2<=g)y.type=YS,y.desc="every 2 week",y.count=d/2,y.interval=zS.every(2),y.formatter=o.date.formatter,y.offset=e=>zS.offset(e,-2),y.floor=PS.floor;else if(p<=g)y.type=XS,y.desc="month",y.count=p,y.interval=_S.every(1),y.formatter=o.date.formatter,y.offset=e=>_S.offset(e,-1),y.floor=PS.floor;else if(p/3<=g)y.type=XS,y.desc="quarter",y.count=p/3,y.interval=_S.every(3),y.formatter=o.date.formatter,y.offset=e=>_S.offset(e,-3),y.floor=PS.floor;else if(p/6<=g)y.type=XS,y.desc="half year",y.count=p/6,y.interval=_S.every(6),y.formatter=o.date.formatter,y.offset=e=>_S.offset(e,-6),y.floor=PS.floor;else if(m<=v)y.type=JS,y.desc="year",y.count=m,y.interval=US.every(1),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-1),y.floor=US.floor;else if(m/2<=v)y.type=JS,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-2),y.floor=US.floor;else if(m/5<=v)y.type=JS,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-5),y.floor=US.floor;else if(m/10<=v)y.type=JS,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-10),y.floor=US.floor;else{const e=Math.floor(m/v);y.type=JS,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=o.year.formatter,y.offset=t=>US.offset(t,-e),y.floor=US.floor}return y}(s,l,n,t.all(),o,a),r.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 p=d.map(((e,t,n)=>{const o=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:u.formatter}}));let m=[];if(!i&&u.type<=GS){const n=t.getFormat("date"),o=e.ticks(PS.every(1));o.length&&s.getUTCDate()!==o[0].getUTCDate()&&o.unshift(PS.offset(o[0],-1)),m=(o.length?o:[PS.floor(s)]).map(((e,t,o)=>{const r=o[t+1]?o[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:n.formatter}}))}return{inner:p,outer:m}}const QS=86400,ew=1440,tw={};function nw(e,t,n,o){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:o}}function ow(e,t,n){const{generator:o,anchor:r,clamp:i,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(i);const[l,c]=e.domain(),u=function(){return Kt.apply(Yi(Cr,wr,hr,mr,pr,dr,er,Go,Nr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([dS(l),dS(c)]);u.clamp(i),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof o?o:{type:o};let p;p="d3"===d.type?(e,r)=>ZS({timeScale:u,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:dS(o.initialMin)}):e=>function(e,t,n,o,r,i=!1){if(tw[[t,n,o,o,i]])return tw[[t,n,o,o,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=dS(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=o-n,p=t/(r-o),m=p/1440,f=p/QS,h=366*p,g=3*p*30,v=a.second.width/f,y=a.minute.width/m,b=a.date.width/g,x=a.year.width/h;let S,w,C,M=0,k=0,E=null,T=null,N=null,L=null,D=null,q=null;const O={outer:[],inner:[]};for(v<1?(E=1,k=1/QS):v<2?(E=2,k=1/QS*2):v<5?(E=5,k=1/QS*5):v<10?(E=10,k=1/QS*10):v<30?(E=30,k=1/QS*30):y<1?(T=1,k=1/ew):y<2?(T=2,k=1/ew*2):y<5?(T=5,k=1/ew*5):y<10?(T=10,k=.006944444444444445):y<30?(T=30,k=.020833333333333336):y<60?(N=1,k=1/24):y<120?(N=2,k=2/24):y<360?(N=6,k=.25):y<720?(N=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?(D=1,k=31):b<1?(D=3,k=90):x<1?(q=1,k=366):x<2?(q=2,k=732):x<5?(q=5,k=1826.25):(q=10,k=3652.5),w=Math.floor((d+n%1)/k);M<r;){C=w+1,S=q?nw("year",[l+w*q,0,1],[l+C*q,0,1],a.year.formatter):D?nw("month",[l,c+w*D,1],[l,c+C*D,1],a.date.formatter):L?nw("day",[l,c,u+w*L],[l,c,u+C*L],a.date.formatter):N?nw("hour",[l,c,u,0+w*N],[l,c,u,0+C*N],a.minute.formatter):T?nw("minute",[l,c,u,0,0+w*T],[l,c,u,0,0+C*T],a.minute.formatter):nw("second",[l,c,u,0,0,0+w*E],[l,c,u,0,0,0+C*E],a.second.formatter),M=mS(S.start),O.inner.push(S);const e=Math.floor(M);if(!(i||q||D||L)){const t={type:"day",start:dS(e),end:dS(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)}w++}return O.min=o,O.max=r,tw[[t,n,o,o,i]]=O,O}(n,e,d.min,l,c,"T"===s.qType);const m={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let o;o="start"===r?t.qStart:"end"===r?t.qEnd:(t.qStart+t.qEnd)/2;const i=e.clamp();n&&e.clamp(!1);const a=e(o),s=e(t.qStart),l=e(t.qEnd);return e.clamp(i),{value:o,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)=>p(t,n)[a].map((t=>{let n;return n="start"===r?mS(t.start):"end"===r?mS(t.end):(mS(t.start)+mS(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:mS(t.start),end:mS(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const rw=/t+/i;const iw={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 aw(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 sw="continuousPan";var lw={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:o=Xx,viewCache:r,viewState:i,definitionPath:a},s={}){const{engineFetcherFactory:l=Fx,snapshotFetcherFactory:c=jx,cacheFetcherFactory:u=Hx,cache:d={initial:{},merged:{}}}=s,p=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),m=c({layoutService:t,viewCache:r}),f=u({cache:d}),h=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,o;({initialMin:v,initialMax:y}=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])),r.set("continuousMin",v),r.set("continuousMax",y),r.set("minimiumZoomSpan",(n=v,o=y,Math.max(1e-6,2.3841857910156157e-7*(o-n)))),g=t.meta.isSnapshot?m:p,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=m.getSnapshotData()),i.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:o}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",o),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return g.fetch(v,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=_x(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return o.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Ux(v,y,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 o=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,o=t[t.length-1][0].qNum,r=[],i=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?r.push(e[t]):a.qNum>o&&i.push(e[t])}return[...r,...t,...i]}(e.qMatrix,t.qDataPages[n].qMatrix),r=_x(e.qArea,o);return{...e,qArea:r,qMatrix:o}})),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)),o=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),r=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}=o[a];for(let n=0,o=i.qTicks.length;n<o;n++){const o=i.qTicks[n];o.qStart<e?s.push(o):o.qStart>t&&l.push(o)}r[a].qTicks=[...s,...r[a].qTicks,...l]}}return{qAxis:r}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(o.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Ux(e,t,n))).catch(h),fetchFromCache:(e,t)=>f.fetch(e,t).then((n=>Ux(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return oe({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return oe({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Yx(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=d.merged.qDataPages,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:o}=e;function r(e,n,r){return o[e](n,r).then((e=>(o.updateLayout(e),t(),e)))}const i=c(((e,t)=>r("fetch",e,t)),50);return({min:e,max:t},{min:o,max:a})=>!n.meta.isContinuous||e===o&&t===a?Promise.resolve(null):r("fetchFromCache",e,t).then((n=>(i(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,o=NaN;return(r,i)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),o=e.get("minimiumZoomSpan"),Math.abs(r.max-r.min)<o?i:{min:Math.min(r.max,Math.max(t,r.min)),max:Math.max(r.min,Math.min(n,r.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:o=50,rtl:r=!1,targetKey:i}){const a=e.get("continuousMin"),s=e.get("continuousMax");return u(((e,o)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===i))[0])(e);if(l){const i=function(e,t,n){let{x:o}=e;return o-=t.element.getBoundingClientRect().left,o-=n.rect.x,Math.max(0,Math.min(1,o/n.rect.width))}(e,n,l),c=r?1-i:i,{min:u,max:d}=t.get("zoom"),p=Math.abs(d-u),m=p-(o>0?Kx:$x)*p,f=u+m*c,h=d-m*(1-c),g=f<a?a-f:0,v=h>s?h-s:0;t.set("zoom",{min:Math.max(f-v,a),max:Math.min(h+g,s)})}}),o)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:o,viewCache:r}){return{type:"Pan",key:"continuous:pan",options:{event:sw,pointers:1,threshold:10,enable(o,r){return this.started===sw||!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=sw;const{min:r,max:i}=o.get("zoom");this[sw]={min:r,max:i,size:t.component(e).rect.computedInner.width,span:i-r}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:i,size:a}=this[sw],s=-e.deltaX/a;o.set("zoom",{min:Math.min(n+s*t,r.get("continuousMax")-t),max:Math.max(i+s*t,r.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Jx,timeAxis:nS},picassoScales:{time:function e(t,n={}){const o=function(e,t,n){const o={};return Object.keys(t).forEach((r=>{const i=e[r],a=typeof i;"function"===a?o[r]=i(n):"object"!==a||Array.isArray(i)?o[r]="undefined"===a?t[r]:i:o[r]=oe(!0,{},t[r],i)})),o}(t,iw,n),{qAxis:r}=o,i=_o(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,o=+e.max;return Number.isNaN(n)&&Number.isNaN(o)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),o=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===o&&(n-=.5,o+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+o)?1:o}}(o,r);let c,u,p=[];const m=function(e){return Number.isNaN(+e)?NaN:i(e)};m.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),i=n[o.ticks.level];if(Number.isNaN(+i)||(p=u.transform(r[i].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(r[n.minor].qTicks,{isMinor:!0});p=p.concat(e)}return"auto"===i&&(p=u.generate(e,n.isDayOrShorter)),p},m.invert=e=>i.invert(e),m.domain=e=>Array.isArray(e)?i.domain(e):i.domain(),m.range=e=>Array.isArray(e)?i.range(e):i.range(),m.norm=e=>(aw(a,m),a.instance(e)),m.normInvert=e=>(aw(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(i.clamp(e),i.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),i.range(o.invert?[1,0]:[0,1]),i.domain([s,l]),a.invert=o.invert;const f=function(e){const t={},{measureText:n,fn:o,localeInfo:r}=e.formatter,i={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return r&&rw.test(r.qTimestampFmt)&&(i.minute.pattern+=" tt",i.second.pattern+=" tt"),i.date.pattern=r&&r.qDateFmt?r.qDateFmt:i.date.pattern,Object.keys(i).forEach((e=>{i[e].formatter=o(i[e].pattern),i[e].width=Math.max(i[e].width,n(i[e].formatter(41000.2343433)).width+16)})),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 o=dS(t[0].data.start),r=dS(t[n-1].data.start);return PS.count(o,r)/n>=1?i.date:AS.count(o,r)/n>0?i.minute:RS.count(o,r)/n>0?i.second:i.date},t}(o);return u=ow(i.copy(),o,f),c=uS({qAxis:r,measureText:o.formatter.measureText,reqAutoFitWidth:2*f.getFormat("minute").width,cache:o.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>"qHyperCube/"+o.field,key:()=>o.field,raw:d(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>f.getFormatFromTicks(p).formatter,m}}};const cw={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var uw={OPTIONS:cw,DEFAULT:cw.MINI_CHART};function dw({layoutService:e,discrete:t}){return({h:n,rect:o,orientation:r,minThumbSize:i})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===r,c=o[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 pw({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),o=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-o)/(r-o),(n.max-o)/(r-o)]}(t,n):function(e){return e.get("viewRange")}(t)}const mw=e=>({miniChart:e===uw.OPTIONS.MINI_CHART.value,bar:e===uw.OPTIONS.BAR.value,none:e===uw.OPTIONS.NONE.value});function fw({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return mw(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return mw(uw.DEFAULT.value);const o=e.getLayoutValue("dimensionAxis.continuousAuto"),r=e.getLayoutValue("preferContinuousAxis");return mw(!n&&(o||!o&&r)?uw.OPTIONS.NONE.value:uw.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===uw.OPTIONS.MINI_CHART.value,n.bar=t.value===uw.OPTIONS.BAR.value,n.none=t.value===uw.OPTIONS.NONE.value),n}function hw({layoutService:e,dockService:t,discrete:n,continuousDataModel:o,viewState:r,viewCache:i,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=fw({layoutService:e,override:l});if(d.none)return!1;const{orientation:p}=t.meta.major,m={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?o.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:p,rtl:s,isContinuous:e.meta.isContinuous,range:()=>pw({layoutService:e,viewState:r,viewCache:i})}};d.bar&&(m.settings.style="slim",m.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(m.settings.size.thumb={min:4}));const f=a.getStyles();return f.color&&(m.style={standard:{thumb:{"border-color":f.color,opacity:.4},before:{background:f.color,opacity:.1},after:{background:f.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(m.settings.injections=()=>[dw({layoutService:e,discrete:n})]),m}function gw({componentKey:e,chart:t,viewState:n,viewCache:o,layoutService:r,dockService:i,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),p="horizontal"===i.meta.major.orientation,m=p?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,f=p?d.rect.computedInner.width:d.rect.computedInner.height,h=p&&a?f-m:m,g=Math.max(0,Math.min(h/f,1)),[v,y]=pw({layoutService:r,viewState:n,viewCache:o}),b=g<v,x=g>y,S=!b&&!x;return{pixel:h,relative:g,thumb:S?h-v*f:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function vw({componentKey:e,chart:t,viewState:n,viewCache:o,layoutService:r,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,p]=pw({layoutService:r,viewState:n,viewCache:o});return{size:u,thumbSize:(p-d)*u}}}function yw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=gw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:l}),u=vw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(o,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(i.meta.isContinuous){const e=o.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),i=r.get("continuousMax"),s=n+(i-n)*a.relative;o.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 bw="data-scrollbar-handle";function xw({e:e}){return(e.srcEvent||e).srcElement.getAttribute(bw)||""}const Sw="scrollbarResize";function ww({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:s}){const l=gw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:Sw,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Sw]=this[Sw]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&xw({e:t})&&(this[Sw].panningEvent=t.srcEvent),!!this[Sw].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[Sw]=this[Sw]||{},this[Sw].panningEvent&&t.component(e).emit("dragStart",this[Sw].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[Sw]=this[Sw]||{},!this[Sw].panningEvent)return;const i=o.get("zoom"),a=r.get("continuousMin"),s=r.get("continuousMax"),c=r.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=xw({e:this[Sw].panningEvent});let p="start"===d?Math.min(u,i.max):i.min,m="end"===d?Math.max(u,i.min):i.max;p===m&&(p-="start"===d?c:0,m+="end"===d?c:0),o.set("zoom",{min:p,max:m}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[Sw]=this[Sw]||{},delete this[Sw].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[Sw]=this[Sw]||{},delete this[Sw].panningEvent,t.component(e).emit("dragEnd")}}}}const Cw="scrollbarPan";function Mw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=gw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:l}),u=vw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Cw,threshold:0,enable(o,r){return this[Cw]=this[Cw]||{},!(r&&!this[Cw].isPanning)||!!n.scroll.enabled()&&((!r||r.target===t.element)&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[Cw]=this[Cw]||{},this[Cw].isPanning=!0,t.component(e).emit("lockState"),i.meta.isContinuous){const e=o.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),i=r.get("continuousMax"),s=n+(i-n)*a.relative;s<e.min?o.set("zoom",{min:Math.min(s,i-t),max:Math.max(s+t,n+t)}):s>e.max&&o.set("zoom",{min:Math.min(s-t,i-t),max:Math.max(s,n+t)}),this[Cw].relative=a.relative,this[Cw].zoom=o.get("zoom"),this[Cw].zoom.span=this[Cw].zoom.max-this[Cw].zoom.min,this[Cw].zoom.fullSpan=i-n}else if(a.onThumb)this[Cw].offset=a.thumb;else{const e=u();this[Cw].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Cw]=this[Cw]||{},i.meta.isContinuous){const e=a.relative-this[Cw].relative,{fullSpan:t,span:n,min:i,max:s}=this[Cw].zoom,l=r.get("continuousMin"),c=r.get("continuousMax");o.set("zoom",{min:Math.min(i+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Cw].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[Cw]=this[Cw]||{},this[Cw].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Cw]=this[Cw]||{},this[Cw].isPanning=!1,t.component(e).emit("unlockState")}}}}function kw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){return[yw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}),ww({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:l}),Mw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l})]}function Ew({componentKey:e,chart:t,actions:n,layoutService:o}){const r=(r,i)=>{if(!o.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(r,i)};return{type:"native",events:{mousemove:e=>r("hover",e),mouseleave:()=>r("leave")}}}function Tw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...kw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l})],native:Ew({componentKey:e,chart:t,actions:n,layoutService:i})}}const Nw={background:"rgba(0, 0, 0, 0.1)"},Lw={top:-1,bottom:-1,width:6},Dw={width:2,background:"#595959"};var qw={before:Nw,after:Nw,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Lw,endHandle:Lw,startHandleBorder:Dw,endHandleBorder:Dw};const Ow={background:"rgba(0, 0, 0, 0.1)"},Rw={top:-1,bottom:-1,width:6},Aw={width:2,background:"#595959"};var Pw={before:Ow,after:Ow,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Rw,endHandle:Rw,startHandleBorder:Aw,endHandleBorder:Aw};const Iw={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},zw={pointerEvents:"initial"},Bw={pointerEvents:"none"};const Fw="ew-resize",Hw="default";function jw(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,o=n?e.computedInner.width:e.computedInner.height,r=t.range(),i=n&&t.rtl;return{size:o,start:(i?1-r[1]:r[0])*o,end:(i?1-r[0]:r[1])*o}}function Ww(){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?Fw:Hw}function Vw(e,t,n){const{min:o}=this.settings.settings.size.thumb;if(n-t<o){const r=(o-(n-t))/2,i=Math.max(0,0-(t-r))-Math.max(0,n+r-e);return{size:e,start:t-r+i,end:n+r+i}}return{size:e,start:t,end:n}}function _w(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Uw(){const{size:e,start:t,end:n}=jw.call(this);this.renderer.render(this.elements(this.h,Vw.call(this,e,t,n)))}function $w(){const{state:e,settings:t,style:n}=this,o=t.settings.style;return e.style[o]||(e.style[o]=function({id:e,style:t}){const n="slim"===e?Pw:qw;return{container:{...Iw},before:{...Iw,...n.before,...t.before},after:{...Iw,...n.after,...t.after},thumb:{...Iw,...n.thumb,...t.thumb},startHandle:{...Iw,...zw,...n.startHandle},endHandle:{...Iw,...zw,...n.endHandle},startHandleBorder:{...Iw,...Bw,...n.startHandleBorder},endHandleBorder:{...Iw,...Bw,...n.endHandleBorder}}}({id:t.settings.style,style:n[o]})),e.style[o]}var Kw={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(){Uw.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||!_w.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=xw({e:e});t&&(this.state.hover[t]=!0),Ww.call(this),Uw.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Ww.call(this),Uw.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=xw({e:e});t&&(this.state.drag[t]=!0),Ww.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Ww.call(this),Uw.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:o}=this.settings.settings.size.area,r="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[r]*o))},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:o}=jw.call(this);return this.elements(e,Vw.call(this,t,n,o))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:o}){const{settings:r}=this.settings,i=r.injections().map((t=>t({h:e,rect:this.rect,orientation:r.orientation,minThumbSize:r.size.thumb.min})));return function({h:e,size:t,start:n,end:o,properties:r,startHandleActive:i,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[r.end]:t-n},p={[r.start]:o},m={left:-3},f={left:1},h={right:-3,left:"auto"},g={left:3},v=e("div",{style:{...s.before,...c?p:d},class:"scrollbar--before"}),y=e("div",{style:{...s.after,...c?d:p},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?h:m},class:"scrollbar--start-handle",[bw]:"start"},i?e("div",{style:{...s.startHandleBorder,...c?g:f}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?m:h},class:"scrollbar--end-handle",[bw]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?f:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[r.start]:n,[r.end]:t-o},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[v,x,y,...u])}({h:e,size:t,start:n,end:o,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:$w.call(this),continuous:r.isContinuous,invert:"horizontal"===r.orientation&&r.rtl,injections:i})}};const Gw={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:o,rendHeight:r,flipXY:i,symbol:a}){let s="x",l="y",c=o,u=r,d=t<.5?90:-90;return i&&(s="y",l="x",c=r,u=o,d=t<.5?180:0),a(oe({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Yw({i:e,width:t,height:n,resolved:o,keys:r,flipXY:i,calcKey:a="box"}){let s,l=null,c=null;void 0!==o.major.settings.binStart?(l=o.major.items[e].binStart,c=o.major.items[e].binEnd,s=o.major.settings.binStart.scale):(s=o.major.settings.major.scale,l=s?o.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=oe({},{major:l,majorEnd:c},o.minor.items[e]);r.forEach((t=>{d[t]=o[t].items[e]}));const p=i?n:t,m=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:o,maxMajorWidth:r}){const i=e>=0?1:-1;let a=Math.min(i*e*t,Number.isNaN(Number(o))?r:o/r);return a=Number.isNaN(Number(n))?a:Math.max(n/r,a),a*i}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:p}),f=(u-m)/2,h=f+d.major+m/2;return{item:d,boxCenter:h,boxWidth:m,boxPadding:f,rendWidth:t,rendHeight:n}}function Xw({keys:e,data:t,defaultSettings:n,style:o,settings:r,width:i,height:a,resolver:s}){const l=oe(!0,{},n||{},o||{}),c={major:"horizontal"===r.orientation?a:i,minor:"horizontal"===r.orientation?i:a},u=r.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:oe(!0,{},{binStart:{scale:r.major.scale,ref:r.major.ref.start},binEnd:{scale:r.major.scale,ref:r.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:oe(!0,{},{binStart:{scale:r.major.scale,ref:"binStart"},binEnd:{scale:r.major.scale,ref:"binEnd"}},r.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:r.major}});const p=r.minor||{};let m;const f={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:oe(!0,{},{start:{scale:p.scale,ref:"start"},end:{scale:p.scale,ref:"end"},min:{scale:p.scale,ref:"min"},max:{scale:p.scale,ref:"max"},med:{scale:p.scale,ref:"med"}},p)})};for(let n=0,o=e.length;n<o;n++)m=e[n],f[m]=s.resolve({data:t,defaults:l[m],settings:r[m],scaled:c});return f}const Jw=["oob"];const Zw={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,o="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:a,symbol:s}=this,l=Xw({keys:Jw,data:r,defaultSettings:{oob:Gw.getDefaultSettings()},style:i,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l;return function({width:e,height:t,flipXY:n,resolved:o,keys:r,symbol:i,dockValue:a,_calcItemRenderingOpts:s=Yw}){const l=[],{items:c}=o.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:p,rendWidth:m,rendHeight:f}=s({i:u,width:e,height:t,resolved:o,keys:r,flipXY:n,calcKey:"oob"}),h=c[u].data,g=[];if(d.oob.show){g.push(Gw.createOob({oob:d.oob,dockValue:a,boxCenter:p,rendWidth:m,rendHeight:f,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:o,resolved:l,keys:Jw,symbol:s,dockValue:n})}},Qw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},eC=["hat"];function tC(e,t=!0){let n="";for(let t=0;t<e.length;t++){const o=e[t];n+=0===t?`M${o.x} ${o.y}`:`L${o.x} ${o.y}`,n+=" "}return t&&(n+="Z"),n}function nC({item:e,boxWidth:t,boxPadding:n,rendWidth:o,rendHeight:r,flipXY:i}){let a="x",s="y",l=o,c=r,u=e.hat.alignment||0;i&&(a="y",s="x",l=r,c=o,u=1-u);const d=(n+e.major)*l;let p=[{[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 m=oe({},e.hat,{type:"path",d:tC(p)});p=[{[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[m,oe({},e.hat,{type:"path",d:tC(p)})]}const oC={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:o,style:r,resolver:i}=this,a=Xw({keys:eC,data:o,defaultSettings:Qw,style:r,settings:this.settings.settings,width:e,height:t,resolver:i}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:o,keys:r,_calcItemRenderingOpts:i=Yw}){const a=[],{items:s}=o.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m}=i({i:l,width:e,height:t,resolved:o,keys:r,flipXY:n,calcKey:"hat"}),f=s[l].data,h=[];c.hat.show&&h.push(...nC({item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m,flipXY:n}));const g={type:"container",data:f,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:eC})}};function rC(e,t,n,o){const r=function(t){const n=String(t);return e(n)};return r.ticks=()=>t.map((t=>{const i=r([t.data.value,o?n-1:0]),a=r([t.data.value,o?0:n-1])+e.bandwidth();return{position:(i+a)/2,label:t.label,data:t.data,start:i,end:a}})),r.bandwidth=()=>e.bandwidth(),r.data=()=>e.data(),r.domain=()=>e.domain(),r.pxScale=function(o){const r=e.pxScale(o);return r===e?this:rC(r,t,n)},r}function iC(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},o={}){const r=t(e,n,o),i=r.domain(),a=r.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),r.domain(s),rC(r,a,l,e.invert)}))}const aC={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 sC(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const lC={getImageSize(e,t){let n;function o(){n&&(clearTimeout(n),n=null)}function r(e){const t=e;t.onload=null,t.onerror=null,o()}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},r(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},o()):(e={height:c,width:u},o()),a(e)},s.onerror=()=>{r(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{r(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function cC(e,t,n){let o=e.ref.qStaticContentUrl.qUrl;const r=function(e){var t,n,o,r,i;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(o=n.session)&&void 0!==o&&o.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(i=r.config)&&void 0!==i&&i.url)){var p;if(a=e.session.options||(null===(p=e.enigmaModel)||void 0===p?void 0:p.session.sessionConfig),!a){var m;a=null===(m=e.session)||void 0===m?void 0:m.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);r&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(o,r),o=o.replace(/"/g,'\\"'),o=o.replace(/'/g,"\\'"),o=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(o,r));const{height:i,width:a,imageError:s}=await lC.getImageSize(o,t);return{src:o,size:t,height:i,width:a,imageError:s}}async function uC(e,t,n,o){var r,i,a,s,l,c;const{app:u,flags:d}=t,p=null===(r=e.layout)||void 0===r||null===(i=r.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[m]=p,f=m.size||"small",h=m.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===m.cId){g=e;break}const v=(null===(a=o.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let y;if(-1!==g&&v[g]&&(y=v[g]),"media"===h&&null!==(l=m.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return cC(m,f,u);if("url"===h)return async function(e,t,n,o,r){let i,a=n.ref;if(r&&r.label&&(a=r.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&sC(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:r,imageError:s}=await lC.getImageSize(t,o);i={src:t,size:o,height:n,width:r,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await lC.getImageSize(a,o);i={src:a,size:o,height:e,width:t,imageError:n}}return i}(u,d,m,f,y);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&y&&y.label){return async function(e,t,n,o){let r;const i=o.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(sC(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:o,width:i,imageError:a}=await lC.getImageSize(e,n);r={src:e,size:n,height:o,width:i,imageError:a}}}catch(e){}return r}(u,n[g],f,y)}return[]}const dC={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:o}){const r=t,i=[];for(let t=0;t<r.length;t++)i.push(uC(e,o,n,r[t]));const a=await Promise.all(i);for(let e=0;e<r.length;e++)r[e].data.customTooltipImages=[a[e]];return r},checkIfPromisesExist({customTooltipModel:e}){var t,n;const o=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!o&&o.length>0}},pC={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:o}){let r=t;return r=await dC.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:o}),r},checkIfPromisesExist:({customTooltipModel:e})=>dC.checkIfPromisesExist({customTooltipModel:e})};const mC=(e,t)=>{var n,o,r;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qMeasures,s=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qInterColumnSortOrder,l=t;return{qInfo:{qType:aC.CHART.CHART_PARENT_TYPE,qId:aC.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},fC=e=>{var t,n,o;const r=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(o=n.object)||void 0===o?void 0:o.refId;return{qInfo:{qType:aC.CHART.CHART_CHILD_TYPE},qExtendsId:r}};const hC={createContainer:({ctx:e,layout:t})=>{var n,o;if(!((null===(n=t.qHyperCube)||void 0===n||null===(o=n.qDimensionInfo)||void 0===o?void 0:o.length)<=0))return function(e,t){var n,o,r,i;const a=null!==(n=null===(o=t.tooltip)||void 0===o||null===(r=o.chart)||void 0===r||null===(i=r.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=aC.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:aC.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:o,customTooltipModel:r,rtl:i})=>{var a,s,l;const c=r,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await hC.hide({app:e,customTooltipModel:r});try{await async function({app:e,properties:t,customTooltipModel:n}){const o=n,r=aC.CHART.STATE,i=t.qStateName;o.miniChartToken.alternateState||(o.miniChartToken.alternateState=r,await e.addSessionAlternateState(r,i),o.miniChartToken.alternateState=r)}({app:e,properties:t,customTooltipModel:r});const a=await async function({app:e,properties:t,customTooltipModel:n}){var o;const r=n;null!==(o=r.miniChartToken.sessionObj)&&void 0!==o&&o.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=aC.CHART.STATE,a=mC(t,i),s=await e.createSessionObject(a),l=fC(t);if(s.id!==aC.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);r.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===s.id)return r.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:r});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,p,m,f;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.value]:[],a=void 0!==o?o:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===o&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var v;const t=null==e||null===(v=e.source)||void 0===v?void 0:v.field.split("/"),n=t[t.length-1],o=void 0!==e.value?[e.value]:[];o.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),o,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(aC.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await r.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(m=c.miniChartToken.model)||void 0===m?void 0:m.id,type:null===(f=c.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await hC.hide({app:e,customTooltipModel:r})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(hC.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(aC.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,o=aC.CHART.STATE;await e.removeSessionAlternateState(o),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const o=e;"function"==typeof(null===(t=o.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(o.miniChartToken.vis.destroy(),o.miniChartToken.vis=void 0)}};function gC(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function vC(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:o}=aC.CUSTOM,r={};return r[e]=!0,r[t]=!0,r[n]=!0,r[o]=!0,r}function yC(e){const t=vC();return e.filter((e=>t[e.id]))}const bC={getNodes(e,t){const n=function(e,t){let n=0,o=0;e.center?(n+=e.center.x,o+=e.center.y):(n+=e.clientX,o+=e.clientY);const r=t.element.getBoundingClientRect();return{cx:n-r.left,cy:o-r.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,o=[];const r={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||r[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],o.push(e)}}else{n||(n=[],Object.keys(r).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&r[t][e.key])))})));const t=n.filter((e=>{var t,n;const o=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return o&&o.value===c.value&&o.label===c.label}));t.length>0&&(o=o.concat(t[0]))}})),o},displayTooltip(e,t,{nodes:n,opts:o={},customTooltipModel:r,extractedNodes:i=[],hide:a}){if(r&&!a){const{layout:a,chart:s}=r,{attrExps:l}=bC.getAttrExprData(a);i.length||n.length?pC.handlePromises({customTooltipModel:r,nodes:bC.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:o}).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!=r&&null!==(s=r.miniChartToken)&&void 0!==s&&s.alternateState&&hC.hide({app:o.app,customTooltipModel:r}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>pC.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const o=t,r=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return o[r]||(o[r]=[]),o[r]},getAttrExprData(e){var t;let n=[],o="";const r=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(r.length>0){var i,a,s;const t=r.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],o=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:o}},quarantineCustomTooltipAttrs(e,t={}){var n,o;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(o=n.quarantine)||void 0===o?void 0:o[aC.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let o=n.qLayoutExclude;o||(n.qLayoutExclude={quarantine:{}},o=n.qLayoutExclude),o.quarantine||(o.quarantine={}),o.quarantine[aC.CUSTOM.QUARANTINE]=[],e.forEach((e=>{o.quarantine[aC.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=o}(yC(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const o=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[aC.CUSTOM.QUARANTINE])&&delete o.qLayoutExclude.quarantine[aC.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=gC(e);if(!n)return;const o=void 0!==t?t:n.length-1;if(!n[o])return;const r=this.getAttrExps(e,n[o]);if(0===yC(r).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...r,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[o].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[o].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let o=[];const r=gC(e)||[];[...r,t].forEach((e=>{const t=yC(e.qAttributeExpressions||[]);t.length>0&&(o=t)}));const i=vC(),a=r.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(o));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:Oe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Oe.detectTextDirection(e.src),o=[],r={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){o.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;o.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),r.style["text-align"]="center",r.style["white-space"]="nowrap"}else r.style["background-size"]="contain",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center",r.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",r,o),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function xC(e,t,n,o){var r,i,a;const s=(null===(r=t.qHyperCube)||void 0===r||null===(i=r[n])||void 0===i||null===(a=i[o])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[o]?e.qSubNodes[o].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const r=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,i=void 0===r?"NaN":function(e,t){let n;switch(e.id){case aC.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case aC.CUSTOM.TITLE:case aC.CUSTOM.DESCRIPTION:case aC.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,r);l.push({source:{key:"qHyperCube",field:`${n}/${o}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const SC={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,o="qDimensionInfo";return{field:`${o}/${n}`,value:t=>xC(t,e,o,n)}}};const wC={getCustomAttrExps(e,t,n){var o,r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(o=t.data)||void 0===o||null===(r=o.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,o){const r={[aC.CUSTOM.TITLE]:!0,[aC.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=bC.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===aC.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,r="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);o.customTooltipAttrExpsArr.push({label:t,value:r})}else if(r[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&o.customTooltipInfoAttrExpsArr.push({...e.id===aC.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),o}(n,a.map((t=>Re.getMeasure(e,t))),e,i)}};function CC({nodes:e,layout:t,dataset:n}){return function(e,t,n){const o=[];return e.forEach((e=>{o.push(wC.getCustomAttrExps(n,e,t))})),o}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function MC(e){const t=aC.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:o,qLabelExpression:r,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:o,qLabelExpression:r,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:o,qLabelExpression:r,cId:i}}function kC(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var EC={attrExpr:{migrateProperties(e){var t,n,o,r;const i=oe(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(o=n.qHyperCubeDef)||void 0===o?void 0:o.qMeasures)||[];let s=kC(i);return s=function(e,t){return t.concat(e.map((e=>MC(e))))}(a,s),function(e,t){var n;const o=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;o[o.length-1].qAttributeExpressions=e}(s,i),null===(r=i.tooltip)||void 0===r||delete r.data,i},getPatches(e){var t,n,o,r;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(o=n.qHyperCubeDef)||void 0===o?void 0:o.qMeasures)||[],a=(null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qDimensions.length)-1;return function(e,t,n){let o=e.length;const r=[];return t.forEach((e=>{const t=MC(e),i=JSON.stringify(t);r.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${o}`,qOp:"add",qValue:i}),o++})),r.push({qPath:"/tooltip/data",qOp:"remove"}),r}(kC(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var o,r,i,a,s;const l=(null===(o=t.qHyperCube)||void 0===o?void 0:o.qDimensionInfo)||[],c=(null===(r=t.tooltip)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.qHyperCube)||{},u=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((t=>{if(u){const o=this.migrateProperties(t);e.setProperties(o).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const o=this.getPatches(t);e.applyPatches(o,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}},TC=7005;const NC=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC},LC=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&he(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},DC=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&he(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&he(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},qC=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))},OC=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,o=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===o.length){const o=n[0];return o.qLibraryId?t.getDimension(o.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;DC(e,n)}return o})):t.getField(o.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(DC(e,t),o)))),(()=>o))}return LC(e),Promise.resolve()};function RC(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:o}}=e;t.length>1&&e.color?p(e,"color.persistent",!0):"byDimension"===o&&n.length>1?p(e,"color.mode","byMultiple"):"byExpression"===o&&0===n.length?p(e,"color.mode","primary"):0===t.length&&n.length>0&&(p(e,"color.byMeasureDef",void 0),p(e,"color.byDimDef",void 0),1===n.length&&p(e,"color.mode","primary"))}const AC=(e,t)=>{RC(t),Bt(e),bC.addCallbackCustomTooltip(t)},PC=e=>{RC(e)};function IC({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,o,r){let i;const a=null!=r&&r.layout?r.layout.qHyperCube.qDimensionInfo.filter((e=>NC(e))).length:t.qHyperCubeDef.qDimensions.length;return o.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?OC(t,n.app).then((()=>(AC(e,t),e))):(qC(t),AC(e,t),e)),move(e,t,n){n.layout.qHyperCube.qDimensionInfo.filter((e=>NC(e))).length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),LC(t),RC(t),bC.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;RC(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),bC.removeCallbackCustomTooltip(t,e)},replace(e,t,n,o){bC.replaceCallbackCustomTooltip(o,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?OC(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,PC(t),e))):(qC(t),PC(t),e),move(e,t){LC(t),RC(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;RC(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function zC(e){return{properties:{version:"1.27.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:!1,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...IC(e)}]}}}var BC={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 FC="REJECTED",HC=()=>{},jC=1e4,WC=2,VC=20,_C=200,UC=10;var $C={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)),o=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,r-e.qArea.qTop),s=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,i-e.qArea.qLeft),c=Math.min(i+o-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:r,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 o=n.qTop-UC<=t.qTop,r=n.qLeft+n.qWidth+UC>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+UC>=t.qTop+t.qHeight,a=n.qLeft-UC<=t.qLeft;return o&&t.qTop>0||r&&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 KC={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)),o=Math.max(t.qTop,e.qArea.qTop),r=Math.max(t.qLeft,e.qArea.qLeft),i=Math.max(0,o-e.qArea.qTop),a=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-o-(a-i),l={qArea:{qHeight:a-i,qWidth:e.qArea.qWidth,qTop:o,qLeft:r},qData:[{...e.qData[0],qUp:o,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 o=n.qTop-UC<=t.qTop,r=n.qTop+n.qHeight+UC>=t.qTop+t.qHeight;return o&&t.qTop>0||r&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const o={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&o.args.push(600),o}}};var GC={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 YC="pages";const XC="discretePan";function JC({chart:e,actions:t,componentKey:n,dockService:o,rtl:r,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:XC,pointers:1,threshold:10,enable(o,r){return this.started===XC||!r||!(!t.scroll.enabled()||!i.enabled())&&e.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=XC;const t="horizontal"===o.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===o.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&r?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,i.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function ZC({chart:e,componentKey:t,actions:n,scroller:o}){return function(r){if(!n.scroll.enabled()||!o.enabled())return;const[i]=e.componentsFromPoint({x:r.clientX,y:r.clientY}).filter((e=>e.key===t));if(!i)return;r.preventDefault();const a=Math.abs(r.deltaY)>Math.abs(r.deltaX)?r.deltaY:r.deltaX,s=100*Math.sign(-a);o.scroll(s)}}function QC({chart:e,actions:t,componentKey:n,dockService:o,rtl:r,scroller:i}){return{gestures:[JC({chart:e,actions:t,componentKey:n,dockService:o,rtl:r,scroller:i})],native:{type:"native",events:{wheel:ZC({chart:e,actions:t,componentKey:n,scroller:i})}}}}function eM({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(jC/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const o=Math.min(t,Math.max(_C,n));return{width:e,height:Math.max(VC,Math.min(n*WC,o))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:o,height:r}=t({width:e.qWidth,height:e.qHeight}),i=r?Math.ceil((r-e.qHeight)/2):0,a=o?Math.ceil((o-e.qWidth)/2):0;return{qHeight:r?Math.min(r,n.height):e.qHeight,qWidth:o?Math.min(o,n.width):e.qWidth,qTop:r?Math.max(0,Math.min(e.qTop-i,n.height-r)):e.qTop,qLeft:o?Math.max(0,Math.min(e.qLeft-a,n.width-o)):e.qLeft}}}function tM(e){let t,n;const o=r=>{t=r;const{method:i,args:a}=t.request;e[i](...a).then((e=>{if(t.canceled||n)return t.reject(FC),t=null,void(n&&(o(n),n=null));t.resolve(e[0]),t=null}))},r=e=>new Promise(((r,i)=>{const a={request:e,resolve:r,reject:i,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(FC),n=e})(a):o(a)}));return r.isProcessing=()=>!!t,r.hasQueued=()=>!!n,r.cancel=()=>{r.isProcessing()&&t.cancel(),r.hasQueued()&&(n.reject(FC),n=null)},r}const nM={command:{update:()=>{}}};var oM={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:o}){const{pixel:r}=t,i=e.getDataPages()[0],a=r/o;return[a,n.inView>=n.inTotal?a+1:a+i.qArea.qWidth/n.inView]}};var rM={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:o}){const r=void 0===o?4:o,i=Math.max(0,Math.floor(t)-r/2);return{qTop:i,qHeight:Math.min(e.meta.size.y-i,Math.max(0,Math.ceil(n+r))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:o}){const{pixel:r}=t,i=e.getDataPages()[0],a=o/n.inView,s=(r+i.qArea.qTop*a)/o;return[s,n.inView>=n.inTotal?s+1:s+i.qArea.qHeight/n.inView]}};function iM(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function aM(e,t){const n=[];for(let o=0;o<e.length;o++){const r=t(e[o]);-1===n.indexOf(r)&&n.push(r)}return n.length}function sM(e){return aM(e.qMatrix,(e=>e[0].qElemNumber))-1}var lM={inTotal:function({layoutService:e}){const t=iM(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:o}){const r=iM(e),i=void 0===o?r:o,a=t/(r+1),s=Math.max(0,Math.floor((t-a-i/2)/r));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+i)/r+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:o}){const r=iM(e),i=e.getDataPages()[0],a=o/n.inView,{pixel:s}=t,l=sM(i),c=i.qArea.qHeight*r+l,u=(s+(i.qArea.qTop*r+i.qArea.qTop)*a)/o;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const cM=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function uM(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return cM(e,n);const o=((e,t)=>{const n={successful:!0,count:0};let o=Math.abs(Math.floor(t));const r=[];for(let t=0;t<=o;t++){if(!e[t])return n.successful=!1,n;const i=e[t][0].qElemNumber;-1===r.indexOf(i)&&(r.push(i),o--)}return n.count=r.length-1,n})(t.qMatrix,n);return o.successful?o.count:cM(e,n)},area(t,n,o){if(0!==t.qArea.qTop)return cM(e,n);return aM(t.qMatrix.slice(0,o.qTop+1),(e=>e[0].qElemNumber))-1}}}var dM={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:o}){const r=uM(t).itemOffset(e(),n),i=Math.max(0,Math.floor(n-r));return{qTop:i,qHeight:Math.min(t.meta.size.y-i,Math.max(0,Math.ceil(o+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:o,viewSize:r,upperBound:i}){const a=t.getDataPages()[0],s=r/o.inView,{item:l,pixel:c}=n,u=uM(t).area(e(),l,a.qArea),d=sM(a),p=a.qArea.qHeight+d,m=c===i?(o.inView-p)*s/r:(c+(a.qArea.qTop+u)*s)/r;return[m,o.inView>=o.inTotal?m+1:m+p/o.inView]}};function pM({chart:e,rect:t,dockService:n,itemWidths:o,axisKey:r,renderer:i,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:p,LABELLESS:m}=o[n.meta.chart.mode],f="horizontal"===n.meta.major.orientation,{axisDisplayMode:h="auto",maxVisibleItems:g=10,label:v}=s,y=f?t.width:t.height,b=y/l>=p;switch(h){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?y/m:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:o={},isGrouped:r,itemSize:i,label:a}){if(r||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=o;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:p}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return p>i;const m=(90-d)*(Math.PI/180);return p>Math.cos(m)*i}({chart:e,isHorizontal:f,axisKey:r,renderer:i,isGrouped:a,itemSize:p,label:v})?y/d:l:y/d}}var mM="AVERAGE",fM="LINEAR",hM="POLYNOMIAL2",gM="POLYNOMIAL3",vM="POLYNOMIAL4",yM="EXPONENTIAL",bM="LOG",xM="POWER";function SM({dimValue:e,value:t,qTrendLine:n}){const{qType:o,qCoeff:r}=n,i={x:e,y:r[2]*t**2+r[1]*t+r[0]};switch(o){default:case hM:return i;case gM:return i.y+=r[3]*t**3,i;case vM:return i.y+=r[4]*t**4+r[3]*t**3,i}}var wM={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:SM,polynomial3:SM,polynomial4:SM,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)}}};function CM(e,t){const n=wM[t.qType.toLowerCase()],o=Math.max(1,e/500);let r=1/0,i=-1/0;for(let a=0;a<e;a+=o){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});r=Math.min(e,r),i=Math.max(e,i)}return{min:r,max:i}}function MM(e){return wM[e.qType.toLowerCase()]}var kM={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"},EM={color:"#f93f17",index:9};const{isDark:TM}=zt,NM={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN};var LM={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const DM=({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,qM=(e,{layoutService:t,trendLineModel:n,dockService:o})=>{if(!n.query.hasTrendLines())return[];return[(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:o,dockService:r})=>{const i=DM(o);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:LM,settings:{connect:!0,orientation:r.meta.major.orientation,coordinates:{major:{scale:e,fn:i},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)}}}}})(e,{trendLineModel:n,layoutService:t,dockService:o}),(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:o,dockService:r})=>{const i=DM(o),a="horizontal"===r.meta.major.orientation,s={scale:e,fn:i},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:LM,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:o})]};function OM(e,t){const{getLabel:n,getType:o,getLineDash:r,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":r(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:o(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)}]}}}function RM(e,{h:t,style:n}){return e.map((e=>{const o={style:{direction:"string"==typeof e.content?Oe.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(o.colspan=e.colspan);const r=function(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:Oe.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",o,r)}))}function AM(e,t){return({h:n,data:o,style:r})=>{const i=o[0].title,a=o.filter((e=>e.title===i)),s=[function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:Oe.detectTextDirection(t)},t);return e("tr",{},n)}(n,i)];if(a.slice(0,2).forEach((e=>{s.push(n("tr",{},RM(e.row,{h:n,style:r})))})),o.length>2){const r=o.length-2;s.push(...function(e,t,n,o){const r=t?t.get("Object.ChartTooltip.NMore",o):`+${o} more`,i=Oe.detectTextDirection(r);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},r))]}(n,e,t,r))}return s}}function PM(e,{trendLineModel:t,translator:n},o={}){if(!t.query.hasTrendLines())return!1;const{rtl:r}=o,i=Ne({key:e.tooltip,rtl:r});return oe(!0,i,{settings:{extract:OM(e,t),content:AM(n,r),placement:"pointer",direction:o.rtl?"rtl":"ltr"}})}function IM(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 zM(e,{chart:t,viewState:n,trendLineModel:o,layoutService:r,rtl:i}){const{isContinuous:a}=r.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=IM(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:r}=o.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(o,a)=>{const l=IM(o,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const o=function(e,t,n,o){let r=(e.x-t.rect.computed.x)/t.rect.computed.width;r=o?1-r:r;const{min:i,max:a}=n.get("zoom");return i+(a-i)*r}(l,a,n,i),s=t.scale(e.majorInnerScale),u=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(o);c.forEach((e=>{e.data.dimValue.value=o,e.data.dimValue.label=u,e.data.minor.value=r(e.data.layer.value,o).y}))}return c}}return n=>{const o=t.component(e.tooltip);if(o&&(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,o);return e.length?(o.emit("show",n,{nodes:e}),!0):(o.emit("hide"),!1)}return!1}}const BM=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},FM=e=>{BM(e),e.qMultiDimMode="Sum",e.qXColIx=0};function HM(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:o=!1}=e;return{show:(e,t,{layout:n})=>!xe.dimensionless(n)&&!xe.groupedByDimension(n)&&(o||!xe.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:kM.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(kM.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:kM.ADD_BUTTON,add:FM,globalChange:e=>{const t=d(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),o=(e=>!d(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=o})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:kM.TYPE,options:[{value:mM,translation:kM.TYPES.AVERAGE},{value:fM,translation:kM.TYPES.LINEAR},{value:hM,translation:kM.TYPES.POLYNOMIAL2},{value:gM,translation:kM.TYPES.POLYNOMIAL3},{value:vM,translation:kM.TYPES.POLYNOMIAL4},{value:yM,translation:kM.TYPES.EXPONENTIAL},{value:bM,translation:kM.TYPES.LOG},{value:xM,translation:kM.TYPES.POWER}],defaultValue:mM},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:EM,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:kM.STYLE.DASHED,type:"boolean",defaultValue:!0,change:BM}}}}var jM={};function WM(){WM.init.call(this)}jM.isObject=function(e){return"object"==typeof e&&null!==e},jM.isNumber=function(e){return"number"==typeof e},jM.isUndefined=function(e){return void 0===e},jM.isFunction=function(e){return"function"==typeof e};var VM=WM;WM.EventEmitter=WM,WM.prototype._events=void 0,WM.prototype._maxListeners=void 0,WM.defaultMaxListeners=10,WM.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},WM.prototype.setMaxListeners=function(e){if(!jM.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},WM.prototype.emit=function(e){var t,n,o,r,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],jM.isUndefined(n))return!1;if(jM.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(o=arguments.length,r=new Array(o-1),i=1;i<o;i++)r[i-1]=arguments[i];n.apply(this,r)}else if(jM.isObject(n)){for(o=arguments.length,r=new Array(o-1),i=1;i<o;i++)r[i-1]=arguments[i];for(o=(a=n.slice()).length,i=0;i<o;i++)a[i].apply(this,r)}return!0},WM.prototype.addListener=function(e,t){var n;if(!jM.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,jM.isFunction(t.listener)?t.listener:t),this._events[e]?jM.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,jM.isObject(this._events[e])&&!this._events[e].warned)&&((n=jM.isUndefined(this._maxListeners)?WM.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,jM.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),jM.isFunction(console.trace)&&console.trace()));return this},WM.prototype.on=WM.prototype.addListener,WM.prototype.once=function(e,t){if(!jM.isFunction(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},WM.prototype.removeListener=function(e,t){var n,o,r,i;if(!jM.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,o=-1,n===t||jM.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(jM.isObject(n)){for(i=r;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){o=i;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},WM.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],jM.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},WM.prototype.listeners=function(e){return this._events&&this._events[e]?jM.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},WM.listenerCount=function(e,t){return e._events&&e._events[t]?jM.isFunction(e._events[t])?1:e._events[t].length:0};const _M={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"}}]};var UM={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}},$M={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 KM({layout:e}){const t=me.canBeContinuous(e),n=xe.continuous(e),o=xe.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:me.isTime(n,e),isDimensionless:o,isSimple:xe.simple(e),isGrouped:xe.grouped(e),isGroupedByMeasure:xe.groupedByMeasure(e),isGroupedByDimension:xe.groupedByDimension(e),isStacked:xe.stacked(e),isStackedByDimension:xe.stackedByDimension(e),isStackedByMeasure:xe.stackedByMeasure(e),isSnapshot:xe.snapshot(e)}}const GM={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===$M.COMPONENT.BAR){n=e;const o=d(e,"data.selectionDimension",!1);o&&(t.push(o.label),o.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function YM({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:o,selectionInfo:r}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==r.event&&o({componentName:"continuousRangeBrush",brushName:!1})}function XM({chart:e,actions:t,selections:n}){const o=e.scale($M.SCALE.MAIN.MAJOR);return g({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:o,selectionActions:{clear:YM},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")}}})}function JM({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 ZM({app:e,model:t,translator:n,picasso:o,localeInfo:r,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:f}=c.model().mode,h=u||f||d,g=!u&&(f||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return p.main=v({app:e,model:t,translator:n,picasso:o,layoutService:s,config:{localeInfo:r,auto:JM,key:$M.SCALE.MAIN.COLOR},createConfig:()=>({hc:h?g||s.getHyperCube():c.model().cube,source:h?y:"miniCube",theme:i})}),m.push(p.main.initialize()),u&&(p.mini=v({app:e,model:t,translator:n,picasso:o,layoutService:s,config:{localeInfo:r,auto:JM,key:$M.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 QM(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function ek(e){return e.some(QM)}function tk(e,t){let n=NaN,o=NaN;return e.forEach((e=>{ek(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),o=Number.isNaN(o)?e.qNum:Math.max(e.qNum,o))}))})),{min:n,max:o}}function nk(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const o=e.getLayoutValue("measureAxis.minMax");"min"!==o&&"minMax"!==o||(t=+e.getLayoutValue("measureAxis.min")),"max"!==o&&"minMax"!==o||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function ok(e,t){let n=NaN,o=NaN;return e.forEach((e=>{if(!ek(e)){let r=0,i=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?i+=e.qNum:r+=e.qNum)})),n=Number.isNaN(n)?r:Math.min(r,n),o=Number.isNaN(o)?i:Math.max(i,o)}})),{min:n,max:o}}function rk(e,t){const n={};e.forEach((e=>{if(!ek(e)){const o=e[0].qElemNumber;n[o]=n[o]?n[o]:{min:0,max:0,cId:o},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[o].max+=e.qNum:n[o].min+=e.qNum)}))}}));let o=NaN,r=NaN;return Object.keys(n).forEach((e=>{o=Number.isNaN(o)?n[e].min:Math.min(n[e].min,o),r=Number.isNaN(r)?n[e].max:Math.max(n[e].max,r)})),{min:o,max:r}}function ik(e){return"number"==typeof e&&!Number.isNaN(e)}function ak(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>ik(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>ik(e.qMax))).map((e=>e.qMax)))}}function sk(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function lk(e){return!Number.isNaN(+e.qNum)}function ck(e){return e.qNum}function uk(e){return!Number.isNaN(+e.qNum)}function dk(e){return e.qNum}function pk(e,t){return e.push(...t),e}const{getValueWithOffset:mk,isNumber:fk}=fa;function hk(e,t){return Math.abs(e/t)<5||0===t}function gk({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:o=ok,stackedByDimensionExtractor:r=rk,straightExtractor:i=tk,measureInfoExtractor:a=ak,explicitExtractor:s=nk}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:o,count:r}){let i,a;if(Array.isArray(n)?({min:i,max:a}=this.extractFromStacked(n)):({min:i,max:a}=this.extractFromStraight(e,r)),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(o),c=this.extractExplicit(),u=[0,i,a].filter((e=>fk(e)));let d=Math.min(...u),p=Math.max(...u);d=hk(s,d)?Math.min(d,s):d,p=hk(l,p)?Math.max(p,l):p;const m=[c.explicitMin,c.explicitMax,d,p].filter((e=>fk(e)));return i=Number.isNaN(c.explicitMin)?Math.min(...m):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...m):c.explicitMax,i===a&&(Number.isNaN(c.explicitMin)?i=mk(i,-.2):Number.isNaN(c.explicitMax)&&(a=mk(a,.2))),{min:i,max:a,implicitMin:d,implicitMax:p,otherMin:s,otherMax:l,hasOtherMin:s<i,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:o,isExplicitMax:r}=s(e);return{hasExplicitMinMax:o||r,hasExplicitMin:o,hasExplicitMax:r,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 s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?o(s,n):l.isStackedByDimension?r(s,n):e.getHyperCubeValue("qHasOtherValues")?i(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=sk(d(e,"0.qData.0.qSubNodes",[]),QM,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=d(e,"0.qMatrix",[]).filter(ek).reduce(pk,[]).filter(uk).map(dk);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=sk(d(e,"0.qMatrix",[]),ek,[]).filter(lk).map(ck);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function vk(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:o,getHyperCubeValue:r}=t,i=e=>!e.length&&o.mode.K,a=e=>{const t=r("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=r("qMeasureInfo").length,s=r("qDimensionInfo").length,l=r("qHasOtherValues");if(!o.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(o.isContinuous){const e=o.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const c=o.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(i(e))return a(l);let t=[];return l&&(t=o.mode.K?r("qStackedDataPages",[]):r("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}}(e),n=gk(e);return t.resolve().then((e=>n.extract(e)))}const yk="lasso",bk=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:o},r)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:o,options:{event:yk,enable(e,n){if(this.started===yk||!n)return!0;if(!r.actions.select.enabled()||!r.actions.lasso.enabled()||!r.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!==yk&&(r.actions.select.emit("start",yk),this.chart.component(e).emit("lassoStart",t),this.started=yk)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof r.updateOnMove&&r.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),r.actions.select.emit("end",yk),"function"==typeof r.updateOnEnd&&r.updateOnEnd()}}});const xk=({targets:e,requireFailure:t,recognizeWith:n,components:o,eventName:r="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:r,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:{[r](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let o,r;return e.center?(({x:o}=e.center),({y:r}=e.center)):(o=e.clientX,r=e.clientY),{x:o-n.left,y:r-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"}),p=this.chart.component("tooltip"),m="mouse"!==t.pointerType&&p&&p.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",r,e)),d.length&&o){this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof o?o(t,d):o;this.chart.brushFromShapes(d,{components:e}),i.actions.select.emit("end",r),(({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(p&&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,p,{nodes:n,opts:i,customTooltipModel:e})}else p.emit("show",t,{nodes:d})}else m&&p.emit("hide")}}}};const Sk=({key:e,requireFailure:t,recognizeWith:n,eventName:o="tap"},r)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${o}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!r.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:{[`${o}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const wk=({eventName:e,key:t,fillTargets:n=[],requireFailure:o,recognizeWith:r},i,a)=>({key:"event:"+t,type:"Pan",requireFailure:o,recognizeWith:r,options:{event:e,enable(o,r){if(this.started===e||!r)return!0;if(!i.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((e=>-1!==n.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(r,t)?(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 Ck(e,t){const n=function(e){const{key:t,targets:n,fillTargets:o,targetSelector:r,targetFillSelector:i,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:p}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:p?{bubbleEnd(){p()}}:{},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:o,selector:r,fillSelector:i,fill:"rgba(82,204,82,0.2)"}}}}(e),o=wk(e,t,"range");return{interactions:[e.onEdited?Sk(e,t):null,o].filter(Boolean),components:[n]}}const Mk={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"}}},kk="inner-time-axis",Ek="outer-time-axis";const Tk={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:o}=n[t];return o},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:o=0,qOption:r=0,qSelected:i=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?o+r+i:n}},Nk={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const o=t?0:e.qDimensionInfo.length-1;n=Tk.getMaxGlyphCount(e,o)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?d(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=Nk.getAxisData(e,t),o=!e.qDimensionInfo.length,r=o||t?void 0:e.qDimensionInfo.length-1,i=Nk.getMajorAxisMaxGlyphCount(e,t),a=o?"qFallbackTitle":"qText";return ke.getAdjustedMaxGlyphCount(i,n,r,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=Nk.getAxisData(e),n=Tk.getMaxGlyphCount(e,0);return ke.getAdjustedMaxGlyphCount(n,t,0)}};var Lk=3,Dk=13;function qk(e,t,n,o){const{meta:r}=t.layoutService,i=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);r.isContinuous?i.push(...function(e,t,n,o){const{meta:r}=t.layoutService,{axis:i,grid:a}=t.themeService.getStyles(),{auto:s,spacing:l}=t.layoutService.getLayoutValue("gridLine",{}),c=[],u="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,d=Mk[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode,p={type:"grid-line",x:{},layout:{minimumLayoutMode:Mk.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.lines.trackBy,compensateForLayoutChanges:Qa.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(r.isTime){if(u){const e=n?"end":"start",o=n?1:0,r="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:i.label.name.color,fontSize:i.label.name.fontSize,fontFamily:i.label.name.fontFamily},majorGuideLine:{stroke:i.line.major.color},minorGuideLine:{stroke:i.line.minor.color}},u={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:d},preferredSize:()=>({size:2*parseFloat(i.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:r,justify:o},guideLine:{major:{justify:o},minor:{align:r}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isTime:!0})}};c.push(oe(!0,{},u,{key:kk,scale:$M.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!s&&0===l}},style:oe(!0,{},a,{line:{stroke:i.line.major.color},majorGuideLine:{stroke:i.line.minor.color},minorGuideLine:{stroke:i.line.major.color}})})),c.push(oe(!0,{},u,{key:Ek,scale:$M.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),c.push({type:"axis-overlay",key:"outer-axis-overlay",scale:$M.SCALE.MAIN.MAJOR,layout:{dock:"@outer-time-axis",minimumLayoutMode:d}}),c.push({type:"axis-overlay",key:"inner-axis-overlay",scale:$M.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@inner-time-axis",minimumLayoutMode:d}}),c.push(m)}return c.push(oe(!0,{},p,{key:"inner-time-grid",x:{scale:$M.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),c.push(oe(!0,{},p,{key:"outer-time-grid",x:{scale:$M.SCALE.MAIN.MAJOR}})),c}if(r.isContinuous){const e="continuous-axis";u&&(c.push({type:"axis",key:e,scale:$M.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:d},settings:{labels:{align:0,offset:4,fill:i.label.name.color,fontSize:i.label.name.fontSize,fontFamily:i.label.name.fontFamily},ticks:{show:!0,stroke:i.line.major.color},line:{show:!o},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isContinuous:!0})}}),c.push({type:"axis-overlay",key:"inner-axis-overlay",scale:$M.SCALE.MAIN.MAJOR,layout:{dock:"@"+e,minimumLayoutMode:d}}),c.push(m)),c.push(oe(!0,{},p,{key:"continuous-grid",x:{scale:$M.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return c}(e,t,n,o)):i.push(...function(e,t,n,o){if("none"===e.dimensionAxis.show)return[];const{meta:r}=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,p=t.styleService.axis.label.getStyle(),m={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:Mk[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...p},line:{show:!o,stroke:i.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(oe(!0,{},m,{key:"group-axis",scale:$M.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":m.settings.labels.mode,maxGlyphCount:Nk.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&m.settings.line.show}}}));const f=Nk.getBarAxisMaxGlyphCount(e.qHyperCube,r.isStackedByDimension);return s&&a.push(oe(!0,{},m,{key:$M.COMPONENT.BAR_AXIS,scale:$M.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:f,maxLengthPx:d,tiltThreshold:f>Lk&&f<Dk?1:void 0},line:{show:!(c&&l)&&m.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,o));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&i.push({type:"axis",key:"y-axis",formatter:$M.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:Mk.measureAxis.minimumLayoutMode},scale:$M.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:Qa.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),i}var Ok={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function Rk({layoutService:e,discrete:t,componentKey:n}){var o;const{isContinuous:r,isGrouped:i}=e.meta;if(r)return 1;const a=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(null!=a&&null!==(o=a.style)&&void 0!==o&&o.width){const{style:e}=a;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=Ok.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),o=e.width+n;return o>1?e.width-(o-1):e.width}:e.width}return i?.9:.7}const Ak={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Pk(e,t,n={}){return({data:o})=>{const r=e.chart.component(t).rect;if(!o.items.length||!r)return 2;const{min:i,max:a}=e.viewState.get("zoom");if(n[[i,a]])return n[[i,a]];const s=Ak[ce.getLayoutMode(r.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 Ik(e,t){const{hasExplicitMax:n,explicitMax:o}=t;return!!n&&e>o&&o<=0}function zk(e,t){const{hasExplicitMin:n,explicitMin:o}=t;return!!n&&e<o&&o>=0}function Bk(e,t){const{hasExplicitMax:n,explicitMax:o}=t;return!!n&&e>o&&o>0}function Fk(e,t){const{hasExplicitMin:n,explicitMin:o}=t;return!!n&&e<o&&o<0}const Hk="max",jk="min",Wk={min:"Min",max:"Max"};function Vk(e,t,n){return void 0===n?Ik(e,t)||zk(e,t):n===Hk?Ik(e,t):zk(e,t)}function _k({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e["hasExplicit"+Wk[t]]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===Hk?e.implicitMax:e.implicitMin;return!Vk(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function Uk(e,{barComponent:t,type:n,isStacked:o}){const{viewCache:r,dockService:i,themeService:a}=e,s=r.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===Hk?s.implicitMax:s.implicitMin;if(!Vk(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===Hk?i.meta.minor.end:i.meta.minor.start;let d="end";o&&(d=n===Hk?"sumOfPositives":"sumOfNegatives");const p=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:Ce.getDockValue(u),oob:oe({},t.settings.box,{fill:p.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)&&((!o||0!==e.datum[d].value)&&Vk(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:Qa.barOobs.compensateForLayoutChanges(c)}}}function $k(e){return Math.min(Math.max(0,e),1)}const Kk=(e,{chart:t,type:n,componentKey:o,collectionKey:r})=>{const{layoutService:i,dockService:a,viewCache:s}=e,{isStacked:l}=i.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!_k({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);return{type:"box",key:`${$M.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:r},settings:{orientation:a.meta.minor.orientation,major:{scale:$M.SCALE.MAIN.MAJOR,fn:d},minor:{scale:$M.SCALE.MAIN.MINOR,start(e){var n,o;return $k(t.scale($M.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(o=n.start)||void 0===o?void 0:o.value)||0))},end(e){const o=t.scale($M.SCALE.MAIN.MINOR);let r="end";l&&(r="max"===n?"sumOfPositives":"sumOfNegatives");const i=e.datum[r]?e.datum[r].value:o[n]();return $k(o(i))}},box:{width:Rk({layoutService:e.layoutService,discrete:e.discrete,componentKey:o}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const o=t.scale($M.SCALE.MAIN.MINOR);let r="end";l&&(r="max"===n?"sumOfPositives":"sumOfNegatives");const i=e.datum[r]?e.datum[r].value:o.max();return"max"===n?i>o.max():i<o.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Gk(e){return function(t){return zt.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}function Yk(e){const t="horizontal"===e.dockService.meta.major.orientation;return{placements:e.simplifiedPlacements.map((n=>function(e,t,n){const o=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:Gk(t),overflow:e.overflow,background:e.background,padding:o}}(n,e.style,t))),label:e.label}}function Xk(e,t){if(t){if(function(e,t){return Ik(e,t)}(e,t))return-1;if(function(e,t){return zk(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)}function Jk(e,t,n,o){const r=Xk(e,o);let i="up";return"vertical"===t&&r<0?i="down":"horizontal"===t&&(i=r>=0&&!n||r<0&&n?"right":"left"),i}function Zk(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:o,isContinuous:r}=t.layoutService.meta;return!o||!r&&!!n.showSegmentLabels}function Qk(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:o,isContinuous:r}=t.layoutService.meta;return!!o&&(!!r||!1!==n.showTotalLabels)}function eE(e,t,n,o){const r=[];return void 0!==e&&(r[e]={position:"outside",onBackground:!0,justify:0,overflow:o}),void 0!==t&&(r[t]={position:"inside",onBackground:!1,justify:n}),r}function tE({layout:e,component:t,minorScale:n},o,r){if(!Zk(e,o))return!1;const{viewModel:i,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=o,{meta:d}=l,p=s.get("minorMinMax"),m=u.getStyles();let f;!d.isStacked&&(f=d.isStacked?1:0);const h=0===f?1:0,g=d.isStacked?.5:1,v=i.fields.minor[0],y=void 0===v?void 0:a.field(v).formatter();let b,x=-1;b=d.isStacked?d.isStackedByMeasure||!y?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>x?y(e.data.segment.value):""}:function(e){return e.data.end.label};const S={label:b,simplifiedPlacements:eE(f,h,g,d.isContinuous),style:m.label.value},w=[Yk(oe(o,S))],C={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Jk(e.data.end.value,c.meta.minor.orientation,r,p),labels:w,fontSize:m.label.value.fontSize,fontFamily:m.label.value.fontFamily,linkData:Qa.labels.linkData}}}]},animations:{enabled:o.viewModel.animations.enabled,trackBy:Qa.labels.trackBy,compensateForLayoutChanges:Qa.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&y&&(C.beforeRender=()=>{x=function(e,t,n){const o="vertical"===t.dockService.meta.minor.orientation?"height":"width",r=t.chart.component(e),i=r&&r.rect?r.rect[o]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/i}(t,o,n)}),C}const nE={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 o;return t.isStackedByDimension?o=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(o=n.group?n.group.label:void 0),void 0!==o?`${n.label}, ${o}`:n.label},getMeasure(e,t,n,o,r){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const i=t.data,a=n.isStacked?o.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&&r?r(i.segment.value):i.segment.label}:i.end;var l;return Re.getMeasure(e,s)},getMeasures(e,t,n,o,r){const i=e.resources.dataset;return t.map((e=>nE.getMeasure(i,e,n,o,r))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const o=e.resources.dataset;return CC({nodes:t,layout:n.layoutService.getLayout(),dataset:o})},extractBarTooltipData(e,t,n,o,r){const i={title:nE.getTitle(t,n),color:Re.getColor(e,t,o),measures:nE.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,o,r)};if(nE.useCustomTooltip(o)){var a,s,l,c;const n=nE.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],o);i.customMeasures=n.customTooltipAttrExpsArr,i.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===aC.CUSTOM.TITLE)),i.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===aC.CUSTOM.DESCRIPTION));let r=[];(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])&&(r=e.data.customTooltipImages)})),r.length>0&&(i.customImages=r);const f=o.layoutService.getLayout();var u,d,p,m;if(null!==(a=f.tooltip)&&void 0!==a&&null!==(s=a.chart)&&void 0!==s&&null!==(l=s.object)&&void 0!==l&&l.refId&&o.app&&o.customTooltipModel.embed&&"function"==typeof(null===(c=o.customTooltipModel.model)||void 0===c?void 0:c.getEffectiveProperties))if(null!==(u=(d=o.app).isInModalSelection)&&void 0!==u&&u.call(d)){if((null==f||null===(p=f.qHyperCube)||void 0===p||null===(m=p.qDimensionInfo)||void 0===m?void 0:m.length)>0){hC.destroyVisualization({customTooltipModel:o.customTooltipModel});const e=o.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");i.customLimitation=e}}else{const t=hC.createContainer({ctx:e,layout:f});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)=>({title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:""+nE.getTotalStackTitle(e,t),value:n?n(e):e})))}),extractTooltipData(e,t){const n=t.chart.formatter($M.FORMATTER.MINOR),{meta:o}=t.layoutService,r=e.node.childrenNodes?e.node.childrenNodes:[e.node],i=Math.max(0,r.length-6);r.length=Math.min(r.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>nE.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:r.map((r=>nE.extractBarTooltipData(e,r,o,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:i}},extractBarNodeData(e,t,n,o,r,i,a){let s=!r&&Re.getTitleRow(t,o);const l=Re.hideColorRow(t,n),c=!i&&!l&&Re.getColorRow(e,t,o),u=t.measures.map((r=>!a&&Re.getMeasureRow(r,e,t,o,l&&r.field===n.coloring.field))).filter((e=>!nE.isSameMeasureAndColorRow(e,c,o)));if(nE.useCustomTooltip(n)){const n=r?[]:t.customMeasures.map((n=>Re.getMeasureRow(n,e,t,o,!1))),i=!(!t.customTitle[0]||r)&&Re.getTitleRow(t.customTitle[0],o),a=!(!t.customDescription[0]||r)&&Re.getDescriptionRow(t.customDescription[0],o);s=!nE.shouldIgnoreTitleRowForCtt(i,a,u,n)&&s;const l=[i,a,s,c,...u,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(bC.getFooterRow(t.customLimitation,o)),t.customImages){const n=t.customImages.map((t=>bC.getImageRow(t,e)));l.push(...n)}return l.filter(Boolean)}return[s,c,...u].filter(Boolean)},extractStackTotalBarNodeData:(e,t,n)=>[!!t.measures.length&&Re.getTitleRow(t,n),...t.measures.map((o=>Re.getMeasureRow(o,e,t,n,!1)))].filter(Boolean),useCustomTooltip:e=>d(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,o)=>!1===n[0]&&0===o.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)=>nE.useCustomTooltip(t)&&d(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,o){const{meta:r}=t.layoutService,i=t.layoutService.getLayout(),a=o.length;let s,l,c=[];const u=nE.shouldIgnoreDefaultRows(i,t);for(s=0;s<a;s++){l=o[s];const i=nE.shouldIgnoreTitleRow(r,s),d=u||nE.shouldIgnoreColorRow(r,s),p=u||nE.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(nE.extractBarNodeData(e,l,t,n,i,d,p)),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 o=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{o=o.concat(nE.extractStackTotalBarNodeData(e,n,t))})),o},extractData(e,t,n){const{barTooltipData:o,numInvisibleNodesPhase1:r,stackTotalBarTooltipData:i}=nE.extractTooltipData(e,t),a=nE.extractStackTotalBarsData(e,n,i);a.length&&a.push(Re.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=nE.extractBarsData(e,t,n,o),c=a.concat(s),u=r+l;return u&&c.push(Re.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 ss.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:o,data:r,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,p;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=r.value,d=n===o&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,p=n===o&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=r;u=r[i]?r[i].value:void 0,d=c(n===o&&void 0!==u?[u,e]:e),p=n===o&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const m=(d+p/2)*a[l],f={width:0,height:0};return"horizontal"===s?(f.x=m,f.y=a.height):(f.y=m,f.x=0),f},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:o,barAxisKey:r,majorScale:i,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let c;return c=l.length?nE.calculateBoundsFromBars(l):nE.calculateBoundsFromScale({opts:e,barKey:o,scale:t[0].key===r?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,o)=>e.filter((e=>t.some((t=>n(e,t,o))))),findBarsFromGroupLabelsInGroupedByDim(e,t,n){const o=nE.isBarMatchingLabelOnProp;return nE.findBarsMatchingLabels(e,t,o,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=nE.isBarMatchingLabel;return nE.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,o){const r=t.filter((e=>e.key===n)),i=t.filter((e=>e.key!==n)),a=nE.findBarsFromBarLabelsInGroupedByDim(e,r,o),s=nE.findBarsFromGroupLabelsInGroupedByDim(e,i,o);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=nE.isBarMatchingLabel;return nE.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=nE.isBarMatchingLabel;return nE.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const o=nE.isBarMatchingLabelOnProp;return nE.findBarsMatchingLabels(e,t,o,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>nE.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:o,groupProp:r,stackProp:i}){const{meta:a}=t.layoutService,s=nE.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?nE.findBarsFromLabelsInStackedByDim(s,e,i):a.isStackedByMeasure?nE.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?nE.findBarsFromLabelsInGroupedByDim(s,e,o,r):nE.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:o}=t.layoutService;if(o.isStacked){const r=nE.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return o.isStackedByDimension?nE.findStackTotalBarsFromLabelsInStackedByDim(r,e):nE.findStackTotalBarsFromLabelsInStackedByMeasure(r,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:o,barAxisKey:r,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:p}=t.layoutService;if(e.length){let m=nE.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(m=m.filter(d)),nE.isSingleBarMode(p,m))return[m[0]];if(m.length){let p=nE.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,i,a],stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l});d&&(p=p.filter(d));const f=nE.calculateTotalBounds({opts:t,labels:e,bars:p,barKey:n,barAxisKey:r,groupProp:s,majorScale:c,majorInnerScale:u}),h=nE.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:o});return[{key:n,bounds:f,childrenNodes:m,data:m.map((e=>e.data)),stackTotalBarNodes:h}]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,groupAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let p=nE.filterNodesOnKeys(e,[r,i]),m=p&&p.length?[p[0]]:[];const f=nE.filterNodesOnLabels({labels:m,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(f&&f.length)return f;const{meta:h}=t.layoutService;if(h.isStackedByMeasure){p=nE.filterNodesOnKeys(e,[a,s]),m=p&&p.length?[p[0]]:[];const i=e=>nE.filterNodesForOob(e,n,a),f=nE.filterNodesOnLabels({labels:p,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:i});if(f&&f.length)return f[0].stackTotalBarNodes=void 0,f}if(h.isStackedByDimension){p=nE.filterNodesOnKeys(e,[a,s]),m=p&&p.length?[p[0]]:[];const i=e=>nE.filterNodesForOob(e,n,a),f=nE.filterNodesOnLabels({labels:p,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:i});if(f&&f.length)return f[0].stackTotalBarNodes=void 0,f}const g=nE.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function oE(e,t={},n){let o=[];const r=Ne({key:$M.COMPONENT.BASE_TOOLTIP,rtl:n});return oe(!0,r,{scale:$M.SCALE.MAIN.COLOR,settings:{filter:e=>nE.filterNodes({nodes:e,opts:t,barKey:$M.COMPONENT.BAR,stackTotalBarKey:$M.COMPONENT.STACK_TOTAL_BAR,barAxisKey:$M.COMPONENT.BAR_AXIS,groupAxisKey:$M.COMPONENT.GROUP_AXIS,barOobMaxKey:$M.COMPONENT.BAR_OOB_MAX,barOobMinKey:$M.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(o=e.node.childrenNodes?e.node.childrenNodes:[e.node],nE.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e;const{app:r,properties:i,customTooltipModel:a}=t;r&&(null===(e=r.isInModalSelection)||void 0===e||!e.call(r))&&a.useCustomTooltip&&a.embed&&hC.show({app:r,properties:i,selectedNodes:o,customTooltipModel:a,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const rE={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 iE(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const o=Ne({key:$M.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return oe(!0,o,{scale:$M.SCALE.MAIN.COLOR,settings:{filter:e=>rE.filterNodes(e,$M.COMPONENT.LEGEND_COLOR_CAT),extract:e=>rE.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function aE(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function sE(e,{fill:t}){return{[$M.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[$M.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const lE=1,cE=3;function uE(e){return e.getLayoutValue("gridLine.auto")}function dE(e){return!uE(e)&&e.getLayoutValue("gridLine.spacing")===lE}function pE(e){return!uE(e)&&e.getLayoutValue("gridLine.spacing")===cE}const mE=e=>({enabled:e.animations.enabled,trackBy:Qa.lines.trackBy,compensateForLayoutChanges:Qa.lines.compensateForLayoutChanges}),fE=(e,{themeService:t,layoutService:n,dockService:o,viewModel:r})=>{if(!uE(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:Mk.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!dE(n)||((e,t)=>t%2==0),stroke:i.line.major.color},minorTicks:{show:pE(n),stroke:i.line.minor.color},animations:mE(r)};return a["horizontal"===o.meta.major.orientation?"y":"x"]=$M.SCALE.MAIN.MINOR,a};function hE(e,t){const n=[fE(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:o})=>{const r=n.get("minorMinMax");if(r.min>0||r.max<0)return!1;const i=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:$M.SCALE.MAIN.MINOR,line:{stroke:i.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:$M.SCALE.MAIN.MINOR,lines:a,animations:mE(o)}})(t)),n}const gE="areaPan",vE=e=>({type:"Pan",key:"panorama",options:{event:gE,pointers:1,threshold:10,enable(t,n){return this.started===gE||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===$M.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started=gE;const n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component($M.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:o,max:r,size:i}=this.areaPan,a=-t.deltaX/i;e.viewState.set("zoom",{min:Math.min(o+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(r+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function yE(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:o,chart:r}=e,{rtl:i}=t,a=lw.event.onZoom({viewCache:n,viewState:o,chart:r},{threshold:100,rtl:i,targetKey:$M.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===$M.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 bE({chart:e},t,n){const o=e.component($M.COMPONENT.BASE_TOOLTIP);var r;o&&o.show&&(o.emit("hide"),null!=n&&null!==(r=n.customTooltipModel)&&void 0!==r&&r.useCustomTooltip&&t&&t({},o,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const i=e.component($M.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&i.emit("hide");const a=e.component($M.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function xE(e,t){const{viewCache:n,viewState:o,chart:r,trendLineModel:i,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?lw.event.onZoom({viewCache:n,viewState:o,chart:r},{rtl:s,threshold:50,targetKey:$M.COMPONENT.BAR}):void 0,c=zM({majorInnerScale:$M.SCALE.MAIN.MAJOR_INNER,tooltip:$M.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:$M.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:r,viewState:o,trendLineModel:i,layoutService:a,rtl:s}),u=[$M.COMPONENT.BAR,$M.COMPONENT.BAR_AXIS,$M.COMPONENT.GROUP_AXIS,$M.COMPONENT.BAR_OOB_MAX,$M.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,p=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,o=!1;if(e.actions.scroll.enabled()){const r={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(r).filter((e=>e.key===$M.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(r,Math.sign(-t.deltaY)),o=!0)}!o&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===$M.COMPONENT.LEGEND_COLOR_CAT)),n&&(o=!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))),o&&t.preventDefault(),bE(e,p,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),o=this.chart.component($M.COMPONENT.BASE_TOOLTIP);if(o&&o.show)if(n.some((e=>u.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const r=d.getNodes(t,this.chart);p(t,o,{nodes:r,opts:e,customTooltipModel:n})}else o.emit("show",t)}else o.emit("hide");const r=this.chart.component($M.COMPONENT.LEGEND_CAT_TOOLTIP);r&&r.show&&(n.some((e=>e.key===$M.COMPONENT.LEGEND_COLOR_CAT))?r.emit("show",t):r.emit("hide"))}},mouseup(t){2===t.button&&bE(this,p,e)},mouseleave(){bE(this,p,e)}}}}const SE=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...Tw({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[vE(e,t.rtl),yE(e,t)]]});function wE(e,t){const{actions:n}=e;if(!n.interact.enabled())return[];const o=[SE(e,t),xE(e,t),Tw({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&o.push(e.discrete.interactions.native),o}const CE=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:Qa.bars.compensateForLayoutChanges});const ME=(e,t,{collectionKey:n})=>{if(!fw({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:o,viewModel:r},{collectionKey:i}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>o.getDimensionCardinality()>1,data:{collection:i},settings:{box:oe(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:oe(!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:CE(r)}}(e,t,{collectionKey:n});const{mode:o,scales:r}=t.reducedDataModel;let i;return o.isGroupedByDimension&&!o.isReduced?i=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:o.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:o.isReduced||o.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:r.major,fn:i},minor:{scale:r.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:CE(t.viewModel)}},{measureText:kE}=t.renderer("svg")();const EE=50,TE=100,NE=200;function LE(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function DE(e,t,n){return 0===t||0===e||t===n.length-1}function qE(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}const OE=(e,t)=>e.value-t.value,RE=e=>({value:e,isMinor:!1}),AE=e=>({value:e,isMinor:!0});function PE({layoutService:e,viewModel:t,dockService:n}){var o;const{meta:r}=e;if(!r.isStackedByDimension||r.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:$M.SCALE.MAIN.MAJOR},minor:{scale:$M.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:null!=s&&null!==(o=s.style)&&void 0!==o&&o.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:Qa.shadowBars.trackBy,compensateForLayoutChanges:Qa.bars.compensateForLayoutChanges}}}const IE={min:"Min",max:"Max"};function zE(e,t,n){const o=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?Bk(e,t)||Fk(e,t):n===Hk?Bk(e,t):Fk(e,t)}(Number(o.toFixed(13)),e,t)}function BE(e,{barComponent:t,type:n,isStacked:o}){var r,i,a,s;const{viewCache:l,layoutService:c,dockService:u}=e,d=l.get("minorMinMax"),p=n===Hk;if(function(e,t){return!e["hasOther"+IE[t]]}(d,n)){if(function(e,t){return!e["hasExplicit"+IE[t]]}(d,n))return!1;if(zE(d,n,p))return!1}if(function(e,t,n){const o=n?e=>e<0:e=>e>0;return e["hasExplicit"+IE[t]]&&o(e["explicit"+IE[t]])}(d,n,p))return!1;let m="end";o&&(m=p?"sumOfPositives":"sumOfNegatives");const f=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale($M.SCALE.MAIN.MINOR)[n]())),h=p?e=>e.datum[m].value>f():e=>e.datum[m].value<f(),g=$M.COMPONENT.BAR,v=e.layoutService.getLayoutValue("components",[]),y=v?v.filter((e=>e.key===g))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-"+n,layout:{dock:p?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:oe({},t.settings.box,{fill:c.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:h,width:Rk({layoutService:e.layoutService,discrete:e.discrete,componentKey:g}),strokeWidth:null!=y&&null!==(r=y.style)&&void 0!==r&&r.strokeWidth?Ok.BAR.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:Ok.BAR.STROKE.WIDTH.NONE,stroke:null!==(i=null==y||null===(a=y.style)||void 0===a||null===(s=a.strokeColor)||void 0===s?void 0:s.color)&&void 0!==i?i:Ok.BAR.STROKE.COLOR})}}}function FE(e,t){var n;let o;return o=e.isContinuous?1:.7,!e.isContinuous&&null!=t&&null!==(n=t.style)&&void 0!==n&&n.width&&t.style.width>0?t.style.width:o}function HE(e,{collectionKey:t},n){const{meta:o}=e.layoutService,{fields:r}=e.viewModel,i=o.isStackedByDimension&&!o.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[i]?0:e[i];function s(t){const n=e.ds.field(t).raw(),o=e.ds.field(t).formatter(),r=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:a,label:e=>r?(e=>"NaN"===e[i]?"-":o(e[i]))(e):e.qText}}const l=o.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;const c={key:t,data:{extract:r.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,p=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,m={field:o.isDimensionless?t:r.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:s(t),null:(f=t,{field:f,reduceLabel:"none",reduce:"first",value:l}),segment:o.isStacked?s(t):void 0,group:o.isGroupedByDimension?{field:r.majorGroup}:void 0,stack:o.isStacked?{field:r.majorStack}:void 0,measureIndex:o.isGroupedByDimension||o.isStackedByDimension?void 0:i,timeStart:o.isContinuous?{field:r.majorNumeric}:void 0,timeEnd:o.isContinuous?{field:r.majorNumeric}:void 0,fillTooltip:p,...a,...c,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${i}`},customTooltipAttrExps:0!==o.dimensionCount?SC.getNode(e.layoutService.getLayout(),o):void 0}};var f;return o.isDimensionless&&(m.value=i),void 0!==n&&(m.source=n),ge(m.props),m}))}};return o.isStacked&&(c.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),c}function jE({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:o}=e,{fields:r}=t;if(!o.isStacked)return!1;let i;return i=o.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}(o,r):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}}}(o,r),{key:n,data:{extract:i}}}const WE="main-collection",VE="stack-total-collection";const _E="mini-collection",UE="mini-stack-collection",$E="mini-continuous-collection",KE="miniCube",GE=(e,t)=>{const n=(e=>{const t=[HE(e,{collectionKey:WE})];return e.layoutService.meta.isStacked&&t.push(jE(e,{collectionKey:VE})),t})(t),o=((e,t)=>{const n=[];return fw({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(HE(t,{collectionKey:$E},KE)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:o,mode:r}}=e;return{key:t,data:{extract:o.minor.map(((e,t)=>{const i={end:{field:e,reduceLabel:"none"},...r.isStackedByMeasure&&!r.isReduced?n.getMain().getDatumProps(t):{}};return r.isContinuous&&(i.timeStart={field:o.major,value:e=>e.qNum},i.timeEnd=i.timeStart),{source:"miniCube",field:o.major,props:i}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:UE})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:o,mode:r}}=e;return{key:t,data:{extract:o.minor.map(((e,t)=>{const i=r.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:o.majorGroup},measureIndex:t,...i},s={source:"miniCube",field:r.isDimensionless?e:o.major,props:a};return r.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:_E}))),n})(0,t);return n.concat(o)};function YE(e,t,n){const o=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&o.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),o}function XE({layout:e,component:t},n,o){if(!Qk(e,n))return!1;const{meta:r}=n.layoutService,i=!Zk(e,n),a=n.themeService.getStyles();function s(e){const t=n.chart.formatter($M.FORMATTER.MINOR);return t?t(e):e}const l={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":s(e.data.sumOfPositives.value)},simplifiedPlacements:YE("outside",i,r.isContinuous),style:a.label.value},c={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":s(e.data.sumOfNegatives.value)},simplifiedPlacements:YE("opposite",i,r.isContinuous),style:a.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Jk(e.data.sumOfPositives.value,n.dockService.meta.minor.orientation,o),labels:[Yk(oe(n,l)),Yk(oe(n,c))],fontSize:a.label.value.fontSize,fontFamily:a.label.value.fontFamily,linkData:Qa.labels.linkData}}}]},animations:{enabled:n.viewModel.animations.enabled,trackBy:Qa.labels.trackBy,compensateForLayoutChanges:Qa.labels.compensateForLayoutChanges}}}function JE(e,t,n){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}function ZE({layout:e,type:t},n){const{layoutService:o,viewCache:r,themeService:i}=n,{meta:a}=o,{isStacked:s}=a;if(!s&&!Zk(e,n)||s&&!Qk(e,n))return!1;const l=r.get("minorMinMax");if(!l.hasExplicitMinMax||t===Hk&&0===l.max||t===jk&&0===l.min)return!1;if(!Vk(t===Hk?l.implicitMax:l.implicitMin,l,t))return!1;const c=i.getStyles();let u=e=>e.data.end.label;a.isStacked&&(u=t===Hk?function(e){if(Vk(e.data.sumOfNegatives.value,l,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,o=n.chart.formatter($M.FORMATTER.MINOR);return o?o(t):t}return""}:function(e){if(Vk(e.data.sumOfPositives.value,l,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,o=n.chart.formatter($M.FORMATTER.MINOR);return o?o(t):t}return""});const d={color:"#595959",lightColor:"#E6E6E6",darkColor:"#595959",fontSize:13,fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'},p={label:u,simplifiedPlacements:JE("outside",true,a.isContinuous),style:d},m={label:u,simplifiedPlacements:JE("opposite",true,a.isContinuous),style:d},f=[Yk(oe(n,p)),Yk(oe(n,m))],h="vertical"===n.dockService.meta.minor.orientation?"down":"right",g={component:`${$M.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:h,labels:f,fontSize:c.label.value.fontSize,fontFamily:c.label.value.fontFamily,linkData:Qa.labels.linkData}}};return{key:"bar-oob-labels-"+t,type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[g]},animations:{enabled:n.viewModel.animations.enabled,trackBy:Qa.labels.trackBy,compensateForLayoutChanges:Qa.labels.compensateForLayoutChanges}}}function QE(e){return"all"===e||"title"===e}function eT(e,t,n){if(!QE(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:o,properties:r}=t,i={hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=o&&null!==(e=o.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")},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:Mk[t.dockService.meta.major.orientation+"DimensionAxisTitle"].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:i,style:a}}function tT(e,t,n){if(!QE(e.measureAxis.show))return!1;const{layoutService:o,actions:r}=t,i=t.properties,a=o.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",s={hyperCube:o.getHyperCube(),hyperCubeDef:d(i,a),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")},l=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleMeasures&&(s.padding="0",s.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:s,style:l}}function nT({environment:e,rtl:t,refLineModel:n,layoutService:o,colorService:r,dockService:i,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:r.getMain().getPaletteColor},p=a.getStyles(),m=s.animations.enabled;return[rs({refLineModel:n,layoutService:o,colorModel:d,dockService:i,animationsEnabled:m,chart:l,scale:$M.SCALE.MAIN.MINOR,axis:"horizontal"===i.meta.major.orientation?"y":"x",key:$M.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:Mk.refLines.minimumLayoutMode}),rs({isDimension:!0,refLineModel:n,layoutService:o,colorModel:d,dockService:i,animationsEnabled:m,chart:l,scale:$M.SCALE.MAIN.MAJOR,axis:"horizontal"===i.meta.major.orientation?"x":"y",rtl:t,key:$M.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:$M.COMPONENT.BAR,minimumLayoutMode:Mk.refLines.minimumLayoutMode}),...as({refLineModel:n,layoutService:o,colorModel:d,animationsEnabled:m,dock:i.meta.minor.opposite,scale:$M.SCALE.MAIN.MINOR,style:p,formatter:$M.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:$M.COMPONENT.MEASURE_REF_LINE_LABEL}),...as({isDimension:!0,refLineModel:n,layoutService:o,colorModel:d,animationsEnabled:m,dock:i.meta.major.opposite,scale:$M.SCALE.MAIN.MAJOR,style:p,theme:c,localeInfo:u,rtl:t,key:$M.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function oT(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)!==TC})).length,o=t.layout.qHyperCube.qDimensionInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC})).length,r=e.dimensionAxis.maxVisibleItems;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(o+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(o+n))))}}const rT=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],iT=(e,t)=>{var n,o,r,i,a;const s=null===(n=t.qHyperCube)||void 0===n||null===(o=n.qMeasureInfo)||void 0===o?void 0:o.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC})).length,l=null===(r=t.qHyperCube)||void 0===r||null===(i=r.qDimensionInfo)||void 0===i?void 0:i.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC})).length,c="grouped"===(null===(a=e.barGrouping)||void 0===a?void 0:a.grouping)&&l>0&&s+l>2;return xe.continuous(t)?1:c?.9:.7},aT=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],sT=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],lT=e=>{return{value:e,label:(t=e,t.charAt(0).toUpperCase()+t.slice(1)),groupHeader:!1,disabled:!1};var t},cT=e=>({value:e,label:e,groupHeader:!1,disabled:!1}),uT=(e,t)=>{const n=[e.getStyle("object.barChart",t,"fontFamily")],o=e.getStyle("","","fontFamilies"),r=Array.isArray(o)&&o.length?o.map((e=>e.split(",").map((e=>e.trim())).map((e=>e.replace(/\s+/g," ").trim())).filter(Boolean).join(", "))):n,i=[...new Set([...n,...r])],a=[{value:"Header1",label:"All fonts",metaText:"Default",groupHeader:!0},...aT.map((e=>lT(e)))];return[{value:"header2",label:"Theme fonts",metaText:"Theme",groupHeader:!0},...i.map((e=>lT(e))),...a]},dT=(e,t,n)=>{var o;return(null!==(o=lT(e.getStyle("object.barChart",t,n)))&&void 0!==o?o:e.getStyle("","",n)).value},pT=(e,t)=>{var n;const o=[e.getStyle("object.barChart",t,"fontSize")],r=null!==(n=e.getStyle("","","fontSizes"))&&void 0!==n?n:o,i=[...new Set([...o,...r])],a=[{value:"header1",label:"All font sizes",metaText:"Default",groupHeader:!0},...sT.map((e=>cT(e)))];return[{value:"header2",label:"Theme font sizes",metaText:"Theme",groupHeader:!0},...i.map((e=>cT(e))),...a]},mT=(e,t,n)=>{var o;return(null!==(o=cT(e.getStyle("object.barChart",t,n)))&&void 0!==o?o:e.getStyle("","",n)).value};const fT={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,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(rT).map((e=>rT[e])),schemaIgnore:!0,defaultValue:rT[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)=>!xe.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)=>iT(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(uw.OPTIONS).map((e=>uw.OPTIONS[e])),schemaIgnore:!0,defaultValue:uw.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}}}}}}}}};function hT(e=!1,t,n){return e?fT:function(e,t){return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,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(rT).map((e=>rT[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",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:o}=n,{barGrouping:r,qHyperCubeDef:i}=o,a=i.qMeasures.length,s=i.qDimensions.length,l="grouped"===r.grouping&&s>0&&a+s>2;return xe.continuous(o)?1:l?.9:.7},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:{fontFamilyItem:{component:"dropdown",ref:"axis.title.fontFamily",options:()=>uT(e,"axis.title"),defaultValue:()=>dT(e,"axis.title","fontFamily")},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:"axis.title.fontSize",options:()=>pT(e,"axis.title"),defaultValue:()=>mT(e,"axis.title","fontSize")},fontColorItem:{component:"color-picker",width:!1,ref:"axis.title.color",defaultValue:()=>({color:e.getStyle("object.barChart","axis.title","color")})}}}}}}}:void 0,axisLabelSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.label",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:{fontFamilyItem:{component:"dropdown",ref:"axis.label.name.fontFamily",options:()=>uT(e,"axis.label.name"),defaultValue:()=>dT(e,"axis.label.name","fontFamily")},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:"axis.label.name.fontSize",options:()=>pT(e,"axis.label.name"),defaultValue:()=>mT(e,"axis.label.name","fontSize")},fontColorItem:{component:"color-picker",width:!1,ref:"axis.label.name.color",defaultValue:()=>({color:e.getStyle("object.barChart","axis.label.name","color")})}}}}}}}:void 0}}}(t,n)}const gT={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:iT(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)=>!xe.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},vT=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC},yT=(e,t)=>e.qHyperCube[t].filter((e=>vT(e))),bT=e=>({get:(t,n,o)=>xe.continuous(o.layout)?e:t(n.type),set(e,t,n){const o=Me(n.type,n);t(n.type,e,o)}}),xT=e=>{const t=oe(!0,{},e);return t.qHyperCube.qMeasureInfo=yT(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=yT(e,"qDimensionInfo"),t&&!xe.continuous(t)&&xe.stacked(t)},ST=({translator:e,flags:t,anything:n})=>{var o,r,i;const a=null==n||null===(o=n.sense)||void 0===o||null===(r=o.isUnsupportedFeature)||void 0===r?void 0:r.call(o,"continuousData"),s={items:{labels:{items:{header:{show:(e,t,n)=>yT(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!xT(t.layout)&&yT(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>xT(t.layout),convertFunctions:{get:(e,t,n,o)=>o.dataPoint.showLabels&&o.dataPoint.showSegmentLabels,set(e,t,n,o,r){r.dataPoint.showSegmentLabels=e,r.dataPoint.showLabels=r.dataPoint.showSegmentLabels||r.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>xT(t.layout),convertFunctions:{get:(e,t,n,o)=>o.dataPoint.showLabels&&o.dataPoint.showTotalLabels,set(e,t,n,o,r){r.dataPoint.showTotalLabels=e,r.dataPoint.showLabels=r.dataPoint.showSegmentLabels||r.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>yT(n.layout,"qDimensionInfo").length&&yT(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,o)=>"labels"===o.dimensionAxis.show||"none"===o.dimensionAxis.show,set(e,t,n,o,r){r.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>yT(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,o)=>"labels"===o.measureAxis.show||"none"===o.measureAxis.show,set(e,t,n,o,r){r.measureAxis.show=e?"labels":"all"}}}}}}},l=null==n||null===(i=n.sense)||void 0===i?void 0:i.theme,c={uses:"settings",items:{simpleStyling:hT(!0,l,t),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")?hT(!1,l,t):gT,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=yT(t.layout,"qMeasureInfo").length,o=yT(t.layout,"qDimensionInfo").length;return o>0&&n+o>2},change(e,t){yT(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)=>xe.continuous(n.layout),convertFunctions:bT("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)=>xe.continuous(n.layout),convertFunctions:bT("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(uw.OPTIONS).map((e=>uw.OPTIONS[e])),defaultValue:uw.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)=>!xe.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(xT(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&&xT(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&&xT(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,o)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!xe.continuous(o.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 o=yT(n.layout,"qMeasureInfo").length,r=yT(n.layout,"qDimensionInfo").length,i=e.dimensionAxis.maxVisibleItems;return i<0||i>1e4/(r+o)},globalChange:oT,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},wT={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){Bt(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:o,qInterColumnSortOrder:r}=e.qHyperCubeDef,{qCardinal:i}=t.layout.qHyperCube.qDimensionInfo[0],a=r.length,s=[...Array(a).keys()];1===n.length&&o.length>=1&&i>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},CT={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"}}},MT=({translator:e,flags:t,anything:n})=>{var o,r;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,o){var r,i;if(null!=n&&null!==(r=n.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;const a=((e,t)=>{var n,o,r,i,a,s;const l=null===(n=t.layout)||void 0===n||null===(o=n.qHyperCube)||void 0===o||null===(r=o.qDimensionInfo)||void 0===r?void 0:r.findIndex((e=>vT(e)));return(null===(i=t.properties)||void 0===i||null===(a=i.qHyperCubeDef)||void 0===a||null===(s=a.qDimensions)||void 0===s?void 0:s[l])===e})(e,t),s=xe.continuous(o.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!==(o=n.sense)&&void 0!==o&&null!==(r=o.isUnsupportedFeature)&&void 0!==r&&r.call(o,"trendlines")?void 0:HM({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function kT({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:MT({translator:e,flags:t,anything:n}),sorting:wT,addons:CT,settings:ST({translator:e,flags:t,anything:n})}}}const ET=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC};function TT(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t){const n=t.qHyperCubeDef.qMeasures.length,o=t.qHyperCubeDef.qDimensions.length;return 1===n&&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=>ET(e))).length+t.qHyperCube.qDimensionInfo.filter((e=>ET(e))).length>2&&!xe.continuous(t)&&!((null==(n=t)||null===(o=n.qHyperCube)||void 0===o||null===(r=o.qDimensionInfo)||void 0===r?void 0:r.filter((e=>ET(e))).length)>1&&(null==n||null===(i=n.qHyperCube)||void 0===i?void 0:i.isHCEnabled));var n,o,r,i},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)=>!xe.continuous(t)}}},color:{uses:"color"}}}}function NT(e){const t={},n=d(e,"components"),o=d(e,"dimensionAxis.axisDisplayMode"),r=d(e,"dimensionAxis.maxVisibleItems"),i=n?n.filter((e=>"bar"===e.key))[0]:void 0,a=d(e,"tooltip");if(i&&i.style&&Object.keys(i.style).forEach((e=>{t["chart_style_"+e]=i.style[e]})),r&&(t.chart_dimaxis_maxVisibleItems=r),o&&(t.chart_dimaxis_axisDisplayMode=o),a){t.chart_tooltip_custom=!a.auto;const e=d(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const LT=e=>!!(e&&e.qHyperCube.qSize.qcy>0),DT={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function qT(){const e=[];return Object.keys(DT).forEach((t=>{e.push(DT[t])})),e}function OT(e){const{flags:t}=e;return{definition:kT(e),softDefinition:TT(),support:{snapshot:LT,export:LT,exportData:!0,sharing:LT,viewData:!0,effects:!0,modifiers:qT()},importProperties:(n,o,r,i)=>{const a={layout:{templateId:o.templateId}};r.mapProperties(a);const s={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},l=_.axisChart.importProperties({exportFormat:n,initialProperties:o,dataDefinition:IC(e),defaultPropertyValues:s,hypercubePath:i,extension:r}),c=l.qProperty;return c.qHyperCubeDef.qDimensions.length>1&&"stacked"===c.barGrouping.grouping&&(c.qHyperCubeDef.qMode="K"),t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(_.conditionalShow.unquarantine(c),_.conditionalShow.unquarantineAlternative(c)),l},exportProperties:(e,n,o)=>{t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(_.conditionalShow.quarantine(e.qProperty),_.conditionalShow.quarantineAlternative(e.qProperty));return _.axisChart.exportProperties({propertyTree:e,hyperCubePath:n,viewDataMode:o})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(Bt)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:o,showMiniChartForContinuousAxis:r}=e;if(t||!1!==r)return;const{continuousAuto:i}=n;(i||!i&&o)&&(e.scrollbar=uw.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:NT}}}}}));
47
+ */var lv=av&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),sv))}};function cv(e){return e&&"[object Function]"==={}.toString.call(e)}function uv(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function dv(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function pv(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=uv(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+o)?e:pv(dv(e))}function mv(e){return e&&e.referenceNode?e.referenceNode:e}var fv=av&&!(!window.MSInputMethodContext||!document.documentMode),hv=av&&/MSIE 10/.test(navigator.userAgent);function gv(e){return 11===e?fv:10===e?hv:fv||hv}function vv(e){if(!e)return document.documentElement;for(var t=gv(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===uv(n,"position")?vv(n):n:e?e.ownerDocument.documentElement:document.documentElement}function yv(e){return null!==e.parentNode?yv(e.parentNode):e}function bv(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||o.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&vv(a.firstElementChild)!==a?vv(l):l;var c=yv(e);return c.host?bv(c.host,t):bv(e,yv(t).host)}function xv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var r=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||r;return i[n]}return e[n]}function Sv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=xv(t,"top"),r=xv(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function wv(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+o+"Width"],10)}function Cv(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],gv(10)?parseInt(n["offset"+e])+parseInt(o["margin"+("Height"===e?"Top":"Left")])+parseInt(o["margin"+("Height"===e?"Bottom":"Right")]):0)}function Mv(e){var t=e.body,n=e.documentElement,o=gv(10)&&getComputedStyle(n);return{height:Cv("Height",t,n,o),width:Cv("Width",t,n,o)}}var kv=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ev=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),Tv=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Nv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};function Lv(e){return Nv({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Dv(e){var t={};try{if(gv(10)){t=e.getBoundingClientRect();var n=xv(e,"top"),o=xv(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?Mv(e.ownerDocument):{},a=i.width||e.clientWidth||r.width,s=i.height||e.clientHeight||r.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=uv(e);l-=wv(u,"x"),c-=wv(u,"y"),r.width-=l,r.height-=c}return Lv(r)}function qv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=gv(10),r="HTML"===t.nodeName,i=Dv(e),a=Dv(t),s=pv(e),l=uv(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&r&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=Lv({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!o&&r){var p=parseFloat(l.marginTop,10),m=parseFloat(l.marginLeft,10);d.top-=c-p,d.bottom-=c-p,d.left-=u-m,d.right-=u-m,d.marginTop=p,d.marginLeft=m}return(o&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=Sv(d,t)),d}function Ov(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,o=qv(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:xv(n),s=t?0:xv(n,"left"),l={top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:r,height:i};return Lv(l)}function Rv(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===uv(e,"position"))return!0;var n=dv(e);return!!n&&Rv(n)}function Av(e){if(!e||!e.parentElement||gv())return document.documentElement;for(var t=e.parentElement;t&&"none"===uv(t,"transform");)t=t.parentElement;return t||document.documentElement}function Pv(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=r?Av(e):bv(e,mv(t));if("viewport"===o)i=Ov(a,r);else{var s=void 0;"scrollParent"===o?"BODY"===(s=pv(dv(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===o?e.ownerDocument.documentElement:o;var l=qv(s,a,r);if("HTML"!==s.nodeName||Rv(a))i=l;else{var c=Mv(e.ownerDocument),u=c.height,d=c.width;i.top+=l.top-l.marginTop,i.bottom=u+l.top,i.left+=l.left-l.marginLeft,i.right=d+l.left}}var p="number"==typeof(n=n||0);return i.left+=p?n:n.left||0,i.top+=p?n:n.top||0,i.right-=p?n:n.right||0,i.bottom-=p?n:n.bottom||0,i}function Iv(e){return e.width*e.height}function zv(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=Pv(n,o,i,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return Nv({key:e},s[e],{area:Iv(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function Bv(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=o?Av(t):bv(t,mv(n));return qv(n,r,o)}function Fv(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),o=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function Hv(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function jv(e,t,n){n=n.split("-")[0];var o=Fv(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return r[a]=t[a]+t[l]/2-o[l]/2,r[s]=n===s?t[s]-o[c]:t[Hv(s)],r}function Wv(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Vv(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var o=Wv(e,(function(e){return e[t]===n}));return e.indexOf(o)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&cv(n)&&(t.offsets.popper=Lv(t.offsets.popper),t.offsets.reference=Lv(t.offsets.reference),t=n(t,e))})),t}function _v(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Bv(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=zv(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=jv(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Vv(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Uv(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function $v(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==document.body.style[i])return i}return null}function Kv(){return this.state.isDestroyed=!0,Uv(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[$v("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Gv(e){var t=e.ownerDocument;return t?t.defaultView:window}function Yv(e,t,n,o){var r="BODY"===e.nodeName,i=r?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),r||Yv(pv(i.parentNode),t,n,o),o.push(i)}function Xv(e,t,n,o){n.updateBound=o,Gv(e).addEventListener("resize",n.updateBound,{passive:!0});var r=pv(e);return Yv(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function Jv(){this.state.eventsEnabled||(this.state=Xv(this.reference,this.options,this.state,this.scheduleUpdate))}function Zv(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,Gv(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function Qv(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ey(e,t){Object.keys(t).forEach((function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Qv(t[n])&&(o="px"),e.style[n]=t[n]+o}))}var ty=av&&/Firefox/i.test(navigator.userAgent);function ny(e,t,n){var o=Wv(e,(function(e){return e.name===t})),r=!!o&&e.some((function(e){return e.name===n&&e.enabled&&e.order<o.order}));if(!r){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}var oy=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ry=oy.slice(3);function iy(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ry.indexOf(e),o=ry.slice(n+1).concat(ry.slice(0,n));return t?o.reverse():o}var ay="flip",sy="clockwise",ly="counterclockwise";function cy(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(Wv(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return Lv(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,r,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,o){Qv(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))}))})),r}var uy={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:Tv({},l,i[l]),end:Tv({},l,i[l]+i[c]-a[c])};e.offsets.popper=Nv({},a,u[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,o=e.placement,r=e.offsets,i=r.popper,a=r.reference,s=o.split("-")[0],l=void 0;return l=Qv(+n)?[+n,0]:cy(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||vv(e.instance.popper);e.instance.reference===n&&(n=vv(n));var o=$v("transform"),r=e.instance.popper.style,i=r.top,a=r.left,s=r[o];r.top="",r.left="",r[o]="";var l=Pv(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);r.top=i,r.left=a,r[o]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),Tv({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(o=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),Tv({},n,o)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=Nv({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(o[l])&&(e.offsets.popper[l]=i(o[l])-n[c]),n[l]>i(o[s])&&(e.offsets.popper[l]=i(o[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!ny(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",m=l?"bottom":"right",f=Fv(o)[c];s[m]-f<a[d]&&(e.offsets.popper[d]-=a[d]-(s[m]-f)),s[d]+f>a[m]&&(e.offsets.popper[d]+=s[d]+f-a[m]),e.offsets.popper=Lv(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=uv(e.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),b=h-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[c]-f,b),0),e.arrowElement=o,e.offsets.arrow=(Tv(n={},d,Math.round(b)),Tv(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Uv(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Pv(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),o=e.placement.split("-")[0],r=Hv(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ay:a=[o,r];break;case sy:a=iy(o);break;case ly:a=iy(o,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(o!==s||a.length===l+1)return e;o=e.placement.split("-")[0],r=Hv(o);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===o&&d(c.right)>d(u.left)||"right"===o&&d(c.left)<d(u.right)||"top"===o&&d(c.bottom)>d(u.top)||"bottom"===o&&d(c.top)<d(u.bottom),m=d(c.left)<d(n.left),f=d(c.right)>d(n.right),h=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===o&&m||"right"===o&&f||"top"===o&&h||"bottom"===o&&g,y=-1!==["top","bottom"].indexOf(o),b=!!t.flipVariations&&(y&&"start"===i&&m||y&&"end"===i&&f||!y&&"start"===i&&h||!y&&"end"===i&&g),x=!!t.flipVariationsByContent&&(y&&"start"===i&&f||y&&"end"===i&&m||!y&&"start"===i&&g||!y&&"end"===i&&h),S=b||x;(p||v||S)&&(e.flipped=!0,(p||v)&&(o=a[l+1]),S&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=Nv({},e.offsets.popper,jv(e.instance.popper,e.offsets.reference,e.placement)),e=Vv(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(s?r[a?"width":"height"]:0),e.placement=Hv(t),e.offsets.popper=Lv(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!ny(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Wv(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,o=t.y,r=e.offsets.popper,i=Wv(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=vv(e.instance.popper),l=Dv(s),c={position:r.position},u=function(e,t){var n=e.offsets,o=n.popper,r=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(r.width),c=i(o.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?i:a:s,m=t?i:s;return{left:p(l%2==1&&c%2==1&&!d&&t?o.left-1:o.left),top:m(o.top),bottom:m(o.bottom),right:p(o.right)}}(e,window.devicePixelRatio<2||!ty),d="bottom"===n?"top":"bottom",p="right"===o?"left":"right",m=$v("transform"),f=void 0,h=void 0;if(h="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&m)c[m]="translate3d("+f+"px, "+h+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===p?-1:1;c[d]=h*g,c[p]=f*v,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=Nv({},y,e.attributes),e.styles=Nv({},c,e.styles),e.arrowStyles=Nv({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return ey(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&ey(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,o,r){var i=Bv(r,t,e,n.positionFixed),a=zv(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),ey(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},dy=function(){function e(t,n){var o=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};kv(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=lv(this.update.bind(this)),this.options=Nv({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Nv({},e.Defaults.modifiers,r.modifiers)).forEach((function(t){o.options.modifiers[t]=Nv({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Nv({name:e},o.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&cv(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Ev(e,[{key:"update",value:function(){return _v.call(this)}},{key:"destroy",value:function(){return Kv.call(this)}},{key:"enableEventListeners",value:function(){return Jv.call(this)}},{key:"disableEventListeners",value:function(){return Zv.call(this)}}]),e}();function py(e){return"function"==typeof e?e():e}dy.Utils=("undefined"!=typeof window?window:global).PopperUtils,dy.placements=oy,dy.Defaults=uy;var my="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,fy={},hy=r.forwardRef((function(e,t){var n=e.anchorEl,o=e.children,i=e.container,a=e.disablePortal,s=void 0!==a&&a,l=e.keepMounted,c=void 0!==l&&l,u=e.modifiers,d=e.open,p=e.placement,m=void 0===p?"bottom":p,f=e.popperOptions,h=void 0===f?fy:f,g=e.popperRef,v=e.transition,y=void 0!==v&&v,b=Rs(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),x=r.useRef(null),S=Bp(x,t),w=r.useRef(null),C=Bp(w,g),M=r.useRef(C);my((function(){M.current=C}),[C]),r.useImperativeHandle(g,(function(){return w.current}),[]);var k=r.useState(!0),E=k[0],T=k[1],N=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(m),L=r.useState(N),D=L[0],q=L[1],O=r.useCallback((function(){if(x.current&&n&&d){w.current&&(w.current.destroy(),M.current(null));var e=function(e){q(e.placement)};py(n);var t=new dy(py(n),x.current,qs({placement:N},h,{modifiers:qs({},s?{}:{preventOverflow:{boundariesElement:"window"}},{},u,{},h.modifiers),onCreate:Wf(e,h.onCreate),onUpdate:Wf(e,h.onUpdate)}));M.current(t)}}),[n,s,u,d,N,h]),R=r.useCallback((function(e){zp(S,e),O()}),[S,O]),A=function(){w.current&&(w.current.destroy(),M.current(null))};if(r.useEffect((function(){O()}),[O]),r.useEffect((function(){return function(){A()}}),[]),r.useEffect((function(){d||y||A()}),[d,y]),!c&&!d&&(!y||E))return null;var P={placement:D};return y&&(P.TransitionProps={in:d,onEnter:function(){T(!1)},onExited:function(){T(!0),A()}}),r.createElement(jf,{disablePortal:s,container:i},r.createElement("div",qs({ref:R,role:"tooltip"},b,{style:qs({position:"fixed",top:0,left:0},b.style)}),"function"==typeof o?o(P):o))})),gy=Qm(r.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),vy=Qm(r.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),yy=r.createElement(gy,null);var by=op((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return r.createElement("div",{className:Bd(n.root,t&&n.checked)},yy,r.createElement(vy,{className:n.layer}))})),xy=r.createContext(),Sy=r.createElement(by,{checked:!0}),wy=r.createElement(by,null),Cy=r.forwardRef((function(e,t){var n=e.checked,o=e.classes,i=e.color,a=void 0===i?"secondary":i,s=e.name,l=e.onChange,c=Rs(e,["checked","classes","color","name","onChange"]),u=r.useContext(xy),d=n,p=Wf(l,u&&u.onChange),m=s;return u&&(void 0===d&&(d=u.value===e.value),void 0===m&&(m=u.name)),r.createElement(Sf,qs({color:a,type:"radio",icon:wy,checkedIcon:Sy,classes:{root:Bd(o.root,o["color".concat(rp(a))]),checked:o.checked,disabled:o.disabled},name:m,checked:d,onChange:p,ref:t},c))}));function My(e,t){return"object"===Ps(t)&&null!==t?e===t:String(e)===String(t)}op((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Ts(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Ts(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(Cy),r.forwardRef((function(e,t){var n=e.actions,o=e.children,i=e.name,a=e.value,s=e.onChange,l=Rs(e,["actions","children","name","value","onChange"]),c=r.useRef(null),u=r.useRef(null!=a).current,d=r.useState((function(){return u?null:e.defaultValue})),p=d[0],m=d[1];r.useImperativeHandle(n,(function(){return{focus:function(){var e=c.current.querySelector("input:not(:disabled):checked");e||(e=c.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var f={name:i,onChange:function(e){u||m(e.target.value),s&&s(e,e.target.value)},value:u?a:p},h=Bp(t,c);return r.createElement(Wh,qs({role:"radiogroup",ref:h},l),r.createElement(xy.Provider,{value:f},o))})),r.Component;var ky=r.forwardRef((function(e,t){var n=e.autoFocus,o=e.autoWidth,i=e.children,a=e.classes,s=e.className,l=e.defaultValue,c=e.disabled,u=e.displayEmpty,d=e.labelId,p=e.IconComponent,m=e.inputRef,f=e.MenuProps,h=void 0===f?{}:f,g=e.multiple,v=e.name,y=e.onBlur,b=e.onChange,x=e.onClose,S=e.onFocus,w=e.onOpen,C=e.open,M=e.readOnly,k=e.renderValue;e.required;var E=e.SelectDisplayProps,T=void 0===E?{}:E,N=e.tabIndex;e.type;var L=e.value,D=e.variant,q=void 0===D?"standard":D,O=Rs(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),R=r.useRef(null!=L).current,A=r.useState(l),P=A[0],I=A[1],z=R?L:P,B=r.useRef(null),F=r.useState(null),H=F[0],j=F[1],W=r.useRef(null!=C).current,V=r.useState(),_=V[0],U=V[1],$=r.useState(!1),K=$[0],G=$[1],Y=Bp(t,m);r.useImperativeHandle(Y,(function(){return{focus:function(){H.focus()},node:B.current,value:z}}),[H,z]),r.useEffect((function(){n&&H&&H.focus()}),[n,H]);var X,J,Z=function(e,t){e?w&&w(t):(H.focus(),x&&x(t)),W||(U(o?null:H.clientWidth),G(e))},Q=function(e){return function(t){var n;if(g||Z(!1,t),g){n=Array.isArray(z)?vu(z):[];var o=z.indexOf(e.props.value);-1===o?n.push(e.props.value):n.splice(o,1)}else n=e.props.value;R||I(n),b&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:v}}),b(t,e))}},ee=null!==H&&(W?C:K);delete O["aria-invalid"];var te=[],ne=!1;(qh({value:z})||u)&&(k?X=k(z):ne=!0);var oe=r.Children.map(i,(function(e){if(!r.isValidElement(e))return null;var t;if(g){if(!Array.isArray(z))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=z.some((function(t){return My(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=My(z,e.props.value))&&ne&&(J=e.props.children);return r.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Q(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(X=g?te.join(", "):J);var re,ie=_;!o&&W&&H&&(ie=H.clientWidth),re=void 0!==N?N:c?null:0;var ae=T.id||(v?"mui-component-select-".concat(v):void 0);return r.createElement(r.Fragment,null,r.createElement("div",qs({className:Bd(a.root,a.select,a.selectMenu,a[q],s,c&&a.disabled),ref:j,tabIndex:re,role:"button","aria-expanded":ee?"true":void 0,"aria-labelledby":"".concat(d||""," ").concat(ae||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:c||M?null:function(e){Z(!0,e)},onBlur:function(e){!ee&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:z,name:v}}),y(e))},onFocus:S},T,{id:ae}),function(e){return null==e||"string"==typeof e&&!e.trim()}(X)?r.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):X),r.createElement("input",qs({value:Array.isArray(z)?z.join(","):z,name:v,ref:B,type:"hidden",autoFocus:n},O)),r.createElement(p,{className:Bd(a.icon,a["icon".concat(rp(q))],ee&&a.iconOpen)}),r.createElement(Kg,qs({id:"menu-".concat(v||""),anchorEl:H,open:ee,onClose:function(e){Z(!1,e)}},h,{MenuListProps:qs({"aria-labelledby":d,role:"listbox",disableListWrap:!0},h.MenuListProps),PaperProps:qs({},h.PaperProps,{style:qs({minWidth:ie},null!=h.PaperProps?h.PaperProps.style:null)})}),oe))})),Ey=Qg,Ty=r.createElement(pg,null),Ny=r.createElement(Ih,null),Ly=r.forwardRef((function e(t,n){var o=t.autoWidth,i=void 0!==o&&o,a=t.children,s=t.classes,l=t.displayEmpty,c=void 0!==l&&l,u=t.IconComponent,d=void 0===u?Zg:u,p=t.id,m=t.input,f=t.inputProps,h=t.labelId,g=t.MenuProps,v=t.multiple,y=void 0!==v&&v,b=t.native,x=void 0!==b&&b,S=t.onClose,w=t.onOpen,C=t.open,M=t.renderValue,k=t.SelectDisplayProps,E=t.variant,T=void 0===E?"standard":E,N=t.labelWidth,L=void 0===N?0:N,D=Rs(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),q=x?Jg:ky,O=kh({props:t,muiFormControl:vf(),states:["variant"]}).variant||T,R=m||{standard:Ty,outlined:r.createElement(iv,{labelWidth:L}),filled:Ny}[O];return r.cloneElement(R,qs({inputComponent:q,select:!0,inputProps:qs({children:a,IconComponent:d,variant:O,type:void 0,multiple:y},x?{}:{autoWidth:i,displayEmpty:c,labelId:h,MenuProps:g,onClose:S,onOpen:w,open:C,renderValue:M,SelectDisplayProps:qs({id:p},k)},{},f,{classes:f?hd({baseClasses:s,newClasses:f.classes,Component:e}):s},m?m.props.inputProps:{}),ref:n},D))}));Ly.muiName="Select";var Dy=op(Ey,{name:"MuiSelect"})(Ly);var qy=op((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:qs({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,o=e.className,i=e.open,a=e.value,s=e.valueLabelDisplay;return"off"===s?t:r.cloneElement(t,{className:Bd(t.props.className,(i||"on"===s)&&n.open,n.thumb)},r.createElement("span",{className:Bd(n.offset,o)},r.createElement("span",{className:n.circle},r.createElement("span",{className:n.label},a))))}));function Oy(e,t){return e-t}function Ry(e,t,n){return e<t?t:e>n?n:e}function Ay(e,t){return e.reduce((function(e,n,o){var r=Math.abs(t-n);return null===e||r<e.distance||r===e.distance?{distance:r,index:o}:e}),null).index}function Py(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var o=e.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Iy(e,t,n){return 100*(e-t)/(n-t)}function zy(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var o=e.toString().split(".")[1];return o?o.length:0}(t)))}function By(e){var t=e.values,n=e.source,o=e.newValue,r=e.index;if(t[r]===o)return n;var i=vu(t);return i[r]=o,i}function Fy(e){var t=e.sliderRef,n=e.activeIndex,o=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),o&&o(n)}var Hy={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},jy=[],Wy=function(e){return e},Vy=r.forwardRef((function(e,t){var n=e["aria-label"],o=e["aria-labelledby"],i=e["aria-valuetext"],a=e.classes,s=e.className,l=e.color,c=void 0===l?"primary":l,u=e.component,d=void 0===u?"span":u,p=e.defaultValue,m=e.disabled,f=void 0!==m&&m,h=e.getAriaLabel,g=e.getAriaValueText,v=e.marks,y=void 0===v?jy:v,b=e.max,x=void 0===b?100:b,S=e.min,w=void 0===S?0:S,C=e.name,M=e.onChange,k=e.onChangeCommitted,E=e.onMouseDown,T=e.orientation,N=void 0===T?"horizontal":T,L=e.step,D=void 0===L?1:L,q=e.ThumbComponent,O=void 0===q?"span":q,R=e.track,A=void 0===R?"normal":R,P=e.value,I=e.ValueLabelComponent,z=void 0===I?qy:I,B=e.valueLabelDisplay,F=void 0===B?"off":B,H=e.valueLabelFormat,j=void 0===H?Wy:H,W=Rs(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),V=np(),_=r.useRef(null!=P).current,U=r.useRef(),$=r.useState(-1),K=$[0],G=$[1],Y=r.useState(-1),X=Y[0],J=Y[1],Z=r.useState(p),Q=Z[0],ee=Z[1],te=_?P:Q,ne=Array.isArray(te),oe=r.useRef(),re=ne?vu(te).sort(Oy):[te];re=re.map((function(e){return Ry(e,w,x)}));var ie=!0===y&&null!==D?vu(Array(Math.floor((x-w)/D)+1)).map((function(e,t){return{value:w+D*t}})):y;oe.current={source:te};var ae=im(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=r.useState(-1),de=ue[0],pe=ue[1],me=r.useRef(),fe=Bp(ce,me),he=Bp(t,fe),ge=Kp((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=Kp((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=Kp((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=Kp((function(){J(-1)})),xe=Kp((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),o=re[n],r=(x-w)/10,i=ie.map((function(e){return e.value})),a=i.indexOf(o);switch(e.key){case"Home":t=w;break;case"End":t=x;break;case"PageUp":D&&(t=o+r);break;case"PageDown":D&&(t=o-r);break;case"ArrowRight":case"ArrowUp":t=D?o+D:i[a+1]||i[i.length-1];break;case"ArrowLeft":case"ArrowDown":t=D?o-D:i[a-1]||i[0];break;default:return}if(e.preventDefault(),D&&(t=zy(t,D)),t=Ry(t,w,x),ne){var s=t;t=By({values:re,source:te,newValue:t,index:n}).sort(Oy),Fy({sliderRef:me,activeIndex:t.indexOf(s)})}_||ee(t),pe(n),M&&M(e,t),k&&k(e,t)})),Se=r.useRef(),we=N;"rtl"===V.direction&&"vertical"!==N&&(we+="-reverse");var Ce=r.useCallback((function(e){var t,n,o=e.finger,r=e.move,i=void 0!==r&&r,a=e.values,s=e.source,l=me.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,p=l.left;if(t=0===we.indexOf("vertical")?(d-o.y)/u:(o.x-p)/c,-1!==we.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,w,x),D)n=zy(n,D);else{var m=ie.map((function(e){return e.value}));n=m[Ay(m,n)]}n=Ry(n,w,x);var f=0;if(ne){var h=n;f=(n=By({values:a,source:s,newValue:n,index:f=i?Se.current:Ay(a,n)}).sort(Oy)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[x,w,we,ne,D,ie]),Me=Kp((function(e){var t=Py(e,U);if(t){var n=Ce({finger:t,move:!0,values:re,source:te}),o=n.newValue,r=n.activeIndex;Fy({sliderRef:me,activeIndex:r,setActive:G}),_||ee(o),M&&M(e,o)}})),ke=Kp((function(e){var t=Py(e,U);if(t){var n=Ce({finger:t,values:re,source:te}).newValue;G(-1),"touchend"===e.type&&J(-1),k&&k(e,n),U.current=void 0,document.body.removeEventListener("mousemove",Me),document.body.removeEventListener("mouseup",ke),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Me),document.body.removeEventListener("touchend",ke)}})),Ee=Kp((function(e){0===e.buttons&&ke(e)})),Te=Kp((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(U.current=t.identifier);var n=Py(e,U),o=Ce({finger:n,values:re,source:te}),r=o.newValue,i=o.activeIndex;Fy({sliderRef:me,activeIndex:i,setActive:G}),_||ee(r),M&&M(e,r),document.body.addEventListener("touchmove",Me),document.body.addEventListener("touchend",ke)}));r.useEffect((function(){var e=me.current;return e.addEventListener("touchstart",Te),function(){e.removeEventListener("touchstart",Te),document.body.removeEventListener("mousemove",Me),document.body.removeEventListener("mouseup",ke),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Me),document.body.removeEventListener("touchend",ke)}}),[Ee,ke,Me,Te]);var Ne=Kp((function(e){E&&E(e),e.preventDefault();var t=Py(e,U),n=Ce({finger:t,values:re,source:te}),o=n.newValue,r=n.activeIndex;Fy({sliderRef:me,activeIndex:r,setActive:G}),_||ee(o),M&&M(e,o),document.body.addEventListener("mousemove",Me),document.body.addEventListener("mouseenter",Ee),document.body.addEventListener("mouseup",ke)})),Le=Iy(ne?re[0]:w,w,x),De=Iy(re[re.length-1],w,x)-Le,qe=qs({},Hy[we].offset(Le),{},Hy[we].leap(De));return r.createElement(d,qs({ref:he,className:Bd(a.root,a["color".concat(rp(c))],s,f&&a.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&a.marked,!1===A&&a.trackFalse,{vertical:a.vertical}[N],{inverted:a.trackInverted}[A]),onMouseDown:Ne},W),r.createElement("span",{className:a.rail}),r.createElement("span",{className:a.track,style:qe}),r.createElement("input",{value:re.join(","),name:C,type:"hidden"}),ie.map((function(e){var t,n=Iy(e.value,w,x),o=Hy[we].offset(n);if(!1===A)t=-1!==re.indexOf(e.value);else{var i=ne?e.value>=re[0]&&e.value<=re[re.length-1]:e.value<=re[0];t=i&&"normal"===A||!i&&"inverted"===A}return r.createElement(r.Fragment,{key:e.value},r.createElement("span",{style:o,className:Bd(a.mark,t&&a.markActive)}),r.createElement("span",{"aria-hidden":!0,style:o,className:Bd(a.markLabel,t&&a.markLabelActive)},e.label))})),re.map((function(e,t){var s=Iy(e,w,x),l=Hy[we].offset(s);return r.createElement(z,{key:t,valueLabelFormat:j,valueLabelDisplay:F,className:a.valueLabel,value:"function"==typeof j?j(e,t):j,index:t,open:X===t||K===t||"on"===F,disabled:f},r.createElement(O,{className:Bd(a.thumb,a["thumbColor".concat(rp(c))],K===t&&a.active,f&&a.disabled,de===t&&a.focusVisible),tabIndex:f?null:0,role:"slider",style:l,"data-index":t,"aria-label":h?h(t):n,"aria-labelledby":o,"aria-orientation":N,"aria-valuemax":x,"aria-valuemin":w,"aria-valuenow":e,"aria-valuetext":g?g(e,t):i,onKeyDown:xe,onFocus:ge,onBlur:ve,onMouseOver:ye,onMouseLeave:be}))})))}));op((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Ls(e.palette.primary.main,.62):Ns(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Ts(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Ts(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Ts(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Ts(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:qs({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(Vy);var _y=r.forwardRef((function(e,t){var n=e.action,o=e.classes,i=e.className,a=e.message,s=e.role,l=void 0===s?"alert":s,c=Rs(e,["action","classes","className","message","role"]);return r.createElement(ap,qs({component:Xm,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:l,square:!0,elevation:6,className:Bd(o.root,i),ref:t},c),r.createElement("div",{className:o.message},a),n?r.createElement("div",{className:o.action},n):null)})),Uy=op((function(e){var t="light"===e.palette.type?.8:.98,n=Es(e.palette.background.default,t);return{root:Ds({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(_y),$y=r.forwardRef((function(e,t){var n=e.action,o=e.anchorOrigin,i=(o=void 0===o?{vertical:"bottom",horizontal:"center"}:o).vertical,a=o.horizontal,s=e.autoHideDuration,l=e.children,c=e.classes,u=e.className,d=e.ClickAwayListenerProps,p=e.ContentProps,m=e.disableWindowBlurListener,f=void 0!==m&&m,h=e.message,g=e.onClose,v=e.onEnter,y=e.onEntered,b=e.onEntering,x=e.onExit,S=e.onExited,w=e.onExiting,C=e.onMouseEnter,M=e.onMouseLeave,k=e.open,E=e.resumeHideDuration,T=e.TransitionComponent,N=void 0===T?og:T,L=e.transitionDuration,D=void 0===L?{enter:wl.enteringScreen,exit:wl.leavingScreen}:L,q=e.TransitionProps,O=Rs(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),R=r.useRef(),A=r.useState(!0),P=A[0],I=A[1],z=r.useCallback((function(e){var t=null!=e?e:s;g&&null!=t&&(clearTimeout(R.current),R.current=setTimeout((function(){g&&null!=(null!=e?e:s)&&g(null,"timeout")}),t))}),[s,g]);r.useEffect((function(){return k&&z(),function(){clearTimeout(R.current)}}),[k,z]);var B=function(){clearTimeout(R.current)},F=r.useCallback((function(){if(null!=s){if(null!=E)return void z(E);z(.5*s)}}),[s,E,z]);return r.useEffect((function(){if(!f&&k)return window.addEventListener("focus",F),window.addEventListener("blur",B),function(){window.removeEventListener("focus",F),window.removeEventListener("blur",B)}}),[f,F,k]),!k&&P?null:r.createElement(If,qs({onClickAway:function(e){g&&g(e,"clickaway")}},d),r.createElement("div",qs({className:Bd(c.root,c["anchorOrigin".concat(rp(i)).concat(rp(a))],u),onMouseEnter:function(e){C&&C(e),B()},onMouseLeave:function(e){M&&M(e),F()},ref:t},O),r.createElement(N,qs({appear:!0,in:k,onEnter:Wf((function(){I(!1)}),v),onEntered:y,onEntering:b,onExit:x,onExited:Wf((function(){I(!0)}),S),onExiting:w,timeout:D,direction:"top"===i?"down":"up"},q),l||r.createElement(Uy,qs({message:h,action:n},p)))))}));op((function(e){var t={top:8},n={bottom:8},o={justifyContent:"flex-end"},r={justifyContent:"flex-start"},i={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:qs({},t,Ds({},e.breakpoints.up("sm"),qs({},i,{},c))),anchorOriginBottomCenter:qs({},n,Ds({},e.breakpoints.up("sm"),qs({},a,{},c))),anchorOriginTopRight:qs({},t,{},o,Ds({},e.breakpoints.up("sm"),qs({left:"auto"},i,{},s))),anchorOriginBottomRight:qs({},n,{},o,Ds({},e.breakpoints.up("sm"),qs({left:"auto"},a,{},s))),anchorOriginTopLeft:qs({},t,{},r,Ds({},e.breakpoints.up("sm"),qs({right:"auto"},i,{},l))),anchorOriginBottomLeft:qs({},n,{},r,Ds({},e.breakpoints.up("sm"),qs({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})($y);var Ky=r.forwardRef((function(e,t){var n=e.active,o=void 0!==n&&n,i=e.alternativeLabel,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.connector,p=e.disabled,m=void 0!==p&&p,f=e.index,h=e.last,g=e.orientation,v=Rs(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return r.createElement("div",qs({className:Bd(s.root,s[g],l,i&&s.alternativeLabel,u&&s.completed),ref:t},v),d&&i&&0!==f&&r.cloneElement(d,{orientation:g,alternativeLabel:i,index:f,active:o,completed:u,disabled:m}),r.Children.map(a,(function(e){return r.isValidElement(e)?r.cloneElement(e,qs({active:o,alternativeLabel:i,completed:u,disabled:m,last:h,icon:f+1,orientation:g},e.props)):null})))}));op({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(Ky);var Gy=Qm(r.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),Yy=Qm(r.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),Xy=r.createElement("circle",{cx:"12",cy:"12",r:"12"}),Jy=r.forwardRef((function(e,t){var n=e.completed,o=void 0!==n&&n,i=e.icon,a=e.active,s=void 0!==a&&a,l=e.error,c=void 0!==l&&l,u=e.classes;return"number"==typeof i||"string"==typeof i?c?r.createElement(Yy,{className:Bd(u.root,u.error),ref:t}):o?r.createElement(Gy,{className:Bd(u.root,u.completed),ref:t}):r.createElement(Zm,{className:Bd(u.root,s&&u.active),ref:t},Xy,r.createElement("text",{className:u.text,x:"12",y:"16",textAnchor:"middle"},i)):i})),Zy=op((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(Jy),Qy=r.forwardRef((function(e,t){var n=e.active,o=void 0!==n&&n,i=e.alternativeLabel,a=void 0!==i&&i,s=e.children,l=e.classes,c=e.className,u=e.completed,d=void 0!==u&&u,p=e.disabled,m=void 0!==p&&p,f=e.error,h=void 0!==f&&f,g=e.icon;e.last;var v=e.optional,y=e.orientation,b=void 0===y?"horizontal":y,x=e.StepIconComponent,S=e.StepIconProps,w=Rs(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),C=x;return g&&!C&&(C=Zy),r.createElement("span",qs({className:Bd(l.root,l[b],c,m&&l.disabled,a&&l.alternativeLabel,h&&l.error),ref:t},w),g||C?r.createElement("span",{className:Bd(l.iconContainer,a&&l.alternativeLabel)},r.createElement(C,qs({completed:d,active:o,error:h,icon:g},S))):null,r.createElement("span",{className:l.labelContainer},r.createElement(Xm,{variant:"body2",component:"span",className:Bd(l.label,a&&l.alternativeLabel,d&&l.completed,o&&l.active,h&&l.error),display:"block"},s),v))}));Qy.muiName="StepLabel";var eb=op((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(Qy),tb=r.forwardRef((function(e,t){var n=e.active,o=e.alternativeLabel,i=e.children,a=e.classes,s=e.className,l=e.completed,c=e.disabled,u=e.icon;e.last;var d=e.optional,p=e.orientation,m=Rs(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),f={active:n,alternativeLabel:o,completed:l,disabled:c,icon:u,optional:d,orientation:p},h=zh(i,["StepLabel"])?r.cloneElement(i,f):r.createElement(eb,f,i);return r.createElement(pm,qs({disabled:c,TouchRippleProps:{className:a.touchRipple},className:Bd(a.root,a[p],s),ref:t},m),h)}));op({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(tb);var nb=r.forwardRef((function(e,t){var n=e.active,o=e.alternativeLabel,i=void 0!==o&&o,a=e.classes,s=e.className,l=e.completed,c=e.disabled;e.index;var u=e.orientation,d=void 0===u?"horizontal":u,p=Rs(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return r.createElement("div",qs({className:Bd(a.root,a[d],s,i&&a.alternativeLabel,n&&a.active,l&&a.completed,c&&a.disabled),ref:t},p),r.createElement("span",{className:Bd(a.line,"vertical"===d?a.lineVertical:a.lineHorizontal)}))})),ob=op((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(nb),rb=r.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var o=e.children,i=e.classes,a=e.className;e.completed;var s=e.last;e.optional,e.orientation;var l=e.TransitionComponent,c=void 0===l?Bf:l,u=e.transitionDuration,d=void 0===u?"auto":u,p=e.TransitionProps,m=Rs(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),f=d;return"auto"!==d||c.muiSupportAuto||(f=void 0),r.createElement("div",qs({className:Bd(i.root,a,s&&i.last),ref:t},m),r.createElement(c,qs({in:n,className:i.transition,timeout:f,unmountOnExit:!0},p),o))}));op((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(rb);var ib=r.createElement(ob,null),ab=r.forwardRef((function(e,t){var n=e.activeStep,o=void 0===n?0:n,i=e.alternativeLabel,a=void 0!==i&&i,s=e.children,l=e.classes,c=e.className,u=e.connector,d=void 0===u?ib:u,p=e.nonLinear,m=void 0!==p&&p,f=e.orientation,h=void 0===f?"horizontal":f,g=Rs(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),v=r.isValidElement(d)?r.cloneElement(d,{orientation:h}):null,y=r.Children.toArray(s),b=y.map((function(e,t){var n={alternativeLabel:a,connector:d,last:t+1===y.length,orientation:h},i={index:t,active:!1,completed:!1,disabled:!1};return o===t?i.active=!0:!m&&o>t?i.completed=!0:!m&&o<t&&(i.disabled=!0),[!a&&v&&0!==t&&r.cloneElement(v,qs({key:t},i)),r.cloneElement(e,qs({},n,{},i,{},e.props))]}));return r.createElement(ap,qs({square:!0,elevation:0,className:Bd(l.root,l[h],c,a&&l.alternativeLabel),ref:t},g),b)}));op({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(ab);var sb=r.forwardRef((function(e,t){var n=e.anchor,o=e.classes,i=e.className,a=e.width,s=Rs(e,["anchor","classes","className","width"]);return r.createElement("div",qs({className:Bd(o.root,o["anchor".concat(rp(n))],i),ref:t,style:Ds({},fh(n)?"width":"height",a)},s))})),lb=op((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(sb),cb=null;function ub(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function db(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function pb(e,t){return e?t.clientWidth:t.clientHeight}function mb(e,t,n,o){return Math.min(Math.max(n?t-e:o+t-e,0),o)}var fb="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),hb={enter:wl.enteringScreen,exit:wl.leavingScreen},gb="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;r.forwardRef((function(e,t){var n=e.anchor,o=void 0===n?"left":n,i=e.disableBackdropTransition,a=void 0!==i&&i,s=e.disableDiscovery,c=void 0!==s&&s,u=e.disableSwipeToOpen,d=void 0===u?fb:u,p=e.hideBackdrop,m=e.hysteresis,f=void 0===m?.52:m,h=e.minFlingVelocity,g=void 0===h?450:h,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,b=Rs(v,["BackdropProps"]),x=e.onClose,S=e.onOpen,w=e.open,C=e.PaperProps,M=void 0===C?{}:C,k=e.SwipeAreaProps,E=e.swipeAreaWidth,T=void 0===E?20:E,N=e.transitionDuration,L=void 0===N?hb:N,D=e.variant,q=void 0===D?"temporary":D,O=Rs(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),R=np(),A=r.useState(!1),P=A[0],I=A[1],z=r.useRef({isSwiping:null}),B=r.useRef(),F=r.useRef(),H=r.useRef(),j=r.useRef(!1),W=r.useRef();gb((function(){W.current=null}),[w]);var V=r.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?null:n,i=t.changeTransition,s=void 0===i||i,l=hh(R,o),c=-1!==["right","bottom"].indexOf(l)?1:-1,u=fh(o),d=u?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),m=H.current.style;m.webkitTransform=d,m.transform=d;var f="";if(r&&(f=R.transitions.create("all",Ip({timeout:L},{mode:r}))),s&&(m.webkitTransition=f,m.transition=f),!a&&!p){var h=F.current.style;h.opacity=1-e/pb(u,H.current),s&&(h.webkitTransition=f,h.transition=f)}}),[o,a,p,R,L]),_=Kp((function(e){if(j.current)if(cb=null,j.current=!1,I(!1),z.current.isSwiping){z.current.isSwiping=null;var t,n=hh(R,o),r=fh(o);t=r?ub(n,e.changedTouches):db(n,e.changedTouches);var i=r?z.current.startX:z.current.startY,a=pb(r,H.current),s=mb(t,i,w,a),l=s/a;Math.abs(z.current.velocity)>g&&(W.current=1e3*Math.abs((a-s)/z.current.velocity)),w?z.current.velocity>g||l>f?x():V(0,{mode:"exit"}):z.current.velocity<-g||1-l>f?S():V(pb(r,H.current),{mode:"enter"})}else z.current.isSwiping=null})),U=Kp((function(e){if(H.current&&j.current&&(null==cb||cb===z.current)){var t=hh(R,o),n=fh(o),r=ub(t,e.touches),i=db(t,e.touches);if(w&&H.current.contains(e.target)&&null==cb){var a=function(e){var t=e.domTreeShapes,n=e.start,o=e.current,r=e.anchor,i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=o>=n;"top"!==r&&"left"!==r||(t=!t);var l="left"===r||"right"===r?"x":"y",c=e[i[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var o=window.getComputedStyle(e);"absolute"===o.getPropertyValue("position")||"hidden"===o.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,H.current),start:n?z.current.startX:z.current.startY,current:n?r:i,anchor:o});if(a)return void(cb=a);cb=z.current}if(null==z.current.isSwiping){var s=Math.abs(r-z.current.startX),l=Math.abs(i-z.current.startY);s>l&&e.cancelable&&e.preventDefault();var u=n?s>l&&s>3:l>s&&l>3;if(!0===u||(n?l>3:s>3)){if(z.current.isSwiping=u,!u)return void _(e);z.current.startX=r,z.current.startY=i,c||w||(n?z.current.startX-=T:z.current.startY-=T)}}if(z.current.isSwiping){var d=pb(n,H.current),p=n?z.current.startX:z.current.startY;w&&!z.current.paperHit&&(p=Math.min(p,d));var m=mb(n?r:i,p,w,d);if(w)if(z.current.paperHit)0===m&&(z.current.startX=r,z.current.startY=i);else{if(!(n?r<d:i<d))return;z.current.paperHit=!0,z.current.startX=r,z.current.startY=i}null===z.current.lastTranslate&&(z.current.lastTranslate=m,z.current.lastTime=performance.now()+1);var f=(m-z.current.lastTranslate)/(performance.now()-z.current.lastTime)*1e3;z.current.velocity=.4*z.current.velocity+.6*f,z.current.lastTranslate=m,z.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),V(m)}}})),$=Kp((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!w||F.current.contains(e.target)||H.current.contains(e.target))){var t=hh(R,o),n=fh(o),r=ub(t,e.touches),i=db(t,e.touches);if(!w){if(d||e.target!==B.current)return;if(n){if(r>T)return}else if(i>T)return}e.muiHandled=!0,cb=null,z.current.startX=r,z.current.startY=i,I(!0),!w&&H.current&&V(pb(n,H.current)+(c?20:-T),{changeTransition:!1}),z.current.velocity=0,z.current.lastTime=null,z.current.lastTranslate=null,z.current.paperHit=!1,j.current=!0}}));r.useEffect((function(){if("temporary"===q)return document.body.addEventListener("touchstart",$),document.body.addEventListener("touchmove",U,{passive:!1}),document.body.addEventListener("touchend",_),function(){document.body.removeEventListener("touchstart",$),document.body.removeEventListener("touchmove",U,{passive:!1}),document.body.removeEventListener("touchend",_)}}),[q,$,U,_]),r.useEffect((function(){return function(){cb===z.current&&(cb=null)}}),[]),r.useEffect((function(){w||I(!1)}),[w]);var K=r.useCallback((function(e){F.current=l.findDOMNode(e)}),[]),G=r.useCallback((function(e){H.current=l.findDOMNode(e)}),[]);return r.createElement(r.Fragment,null,r.createElement(yh,qs({open:!("temporary"!==q||!P)||w,variant:q,ModalProps:qs({BackdropProps:qs({},y,{ref:K})},b),PaperProps:qs({},M,{style:qs({pointerEvents:"temporary"!==q||w?"":"none"},M.style),ref:G}),anchor:o,transitionDuration:W.current||L,onClose:x,ref:t},O)),!d&&"temporary"===q&&r.createElement(Yp,null,r.createElement(lb,qs({anchor:o,ref:B,width:T},k))))}));var vb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.color,a=void 0===i?"secondary":i,s=e.edge,l=void 0!==s&&s,c=e.size,u=void 0===c?"medium":c,d=Rs(e,["classes","className","color","edge","size"]),p=r.createElement("span",{className:n.thumb});return r.createElement("span",{className:Bd(n.root,o,{start:n.edgeStart,end:n.edgeEnd}[l],{small:n["size".concat(rp(u))]}[u])},r.createElement(Sf,qs({type:"checkbox",icon:p,checkedIcon:p,classes:{root:Bd(n.switchBase,n["color".concat(rp(a))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},d)),r.createElement("span",{className:n.track}))}));op((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Ts(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Ts(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(vb);var yb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.disabled,a=void 0!==i&&i,s=e.disableFocusRipple,l=void 0!==s&&s,c=e.fullWidth,u=e.icon,d=e.indicator,p=e.label,m=e.onChange,f=e.onClick,h=e.selected,g=e.textColor,v=void 0===g?"inherit":g,y=e.value,b=e.wrapped,x=void 0!==b&&b,S=Rs(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return r.createElement(pm,qs({focusRipple:!l,className:Bd(n.root,n["textColor".concat(rp(v))],o,a&&n.disabled,h&&n.selected,p&&u&&n.labelIcon,c&&n.fullWidth,x&&n.wrapped),ref:t,role:"tab","aria-selected":h,disabled:a,onClick:function(e){m&&m(e,y),f&&f(e)}},S),r.createElement("span",{className:n.wrapper},u,p),d)}));op((function(e){var t;return{root:qs({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Ds(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),Ds(t,"overflow","hidden"),Ds(t,"whiteSpace","normal"),Ds(t,"textAlign","center"),Ds(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(yb);var bb=r.createContext(),xb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"table":i,s=e.padding,l=void 0===s?"default":s,c=e.size,u=void 0===c?"medium":c,d=e.stickyHeader,p=void 0!==d&&d,m=Rs(e,["classes","className","component","padding","size","stickyHeader"]),f=r.useMemo((function(){return{padding:l,size:u,stickyHeader:p}}),[l,u,p]);return r.createElement(bb.Provider,{value:f},r.createElement(a,qs({ref:t,className:Bd(n.root,o,p&&n.stickyHeader)},m)))}));op((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":qs({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(xb);var Sb=r.createContext(),wb={variant:"body"},Cb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"tbody":i,s=Rs(e,["classes","className","component"]);return r.createElement(Sb.Provider,{value:wb},r.createElement(a,qs({className:Bd(n.root,o),ref:t},s)))}));op({root:{display:"table-row-group"}},{name:"MuiTableBody"})(Cb);var Mb=r.forwardRef((function(e,t){var n,o=e.align,i=void 0===o?"inherit":o,a=e.classes,s=e.className,l=e.component,c=e.padding,u=e.scope,d=e.size,p=e.sortDirection,m=e.variant,f=Rs(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),h=r.useContext(bb),g=r.useContext(Sb);n=l||(g&&"head"===g.variant?"th":"td");var v=u;!v&&g&&"head"===g.variant&&(v="col");var y=c||(h&&h.padding?h.padding:"default"),b=d||(h&&h.size?h.size:"medium"),x=m||g&&g.variant,S=null;return p&&(S="asc"===p?"ascending":"descending"),r.createElement(n,qs({ref:t,className:Bd(a.root,a[x],s,"inherit"!==i&&a["align".concat(rp(i))],"default"!==y&&a["padding".concat(rp(y))],"medium"!==b&&a["size".concat(rp(b))],{head:h&&h.stickyHeader&&a.stickyHeader}[x]),"aria-sort":S,scope:v},f))})),kb=op((function(e){return{root:qs({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Ls(Ts(e.palette.divider,1),.88):Ns(Ts(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(Mb),Eb={variant:"footer"},Tb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"tfoot":i,s=Rs(e,["classes","className","component"]);return r.createElement(Sb.Provider,{value:Eb},r.createElement(a,qs({className:Bd(n.root,o),ref:t},s)))}));op({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(Tb);var Nb={variant:"head"},Lb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"thead":i,s=Rs(e,["classes","className","component"]);return r.createElement(Sb.Provider,{value:Nb},r.createElement(a,qs({className:Bd(n.root,o),ref:t},s)))}));op({root:{display:"table-header-group"}},{name:"MuiTableHead"})(Lb);var Db=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"div":i,s=e.disableGutters,l=void 0!==s&&s,c=e.variant,u=void 0===c?"regular":c,d=Rs(e,["classes","className","component","disableGutters","variant"]);return r.createElement(a,qs({className:Bd(n.root,n[u],o,!l&&n.gutters),ref:t},d))})),qb=op((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Ds({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(Db),Ob=Qm(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),Rb=Qm(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),Ab=r.createElement(Rb,null),Pb=r.createElement(Ob,null),Ib=r.createElement(Ob,null),zb=r.createElement(Rb,null),Bb=r.forwardRef((function(e,t){var n=e.backIconButtonProps,o=e.count,i=e.nextIconButtonProps,a=e.onChangePage,s=e.page,l=e.rowsPerPage,c=Rs(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),u=np();return r.createElement("div",qs({ref:t},c),r.createElement(bf,qs({onClick:function(e){a(e,s-1)},disabled:0===s,color:"inherit"},n),"rtl"===u.direction?Ab:Pb),r.createElement(bf,qs({onClick:function(e){a(e,s+1)},disabled:s>=Math.ceil(o/l)-1,color:"inherit"},i),"rtl"===u.direction?Ib:zb))})),Fb=function(e){var t=e.from,n=e.to,o=e.count;return"".concat(t,"-").concat(-1===n?o:n," of ").concat(o)},Hb=[10,25,50,100],jb=r.forwardRef((function(e,t){var n,o=e.ActionsComponent,i=void 0===o?Bb:o,a=e.backIconButtonProps,s=e.classes,l=e.className,c=e.colSpan,u=e.component,d=void 0===u?kb:u,p=e.count,m=e.labelDisplayedRows,f=void 0===m?Fb:m,h=e.labelRowsPerPage,g=void 0===h?"Rows per page:":h,v=e.nextIconButtonProps,y=e.onChangePage,b=e.onChangeRowsPerPage,x=e.page,S=e.rowsPerPage,w=e.rowsPerPageOptions,C=void 0===w?Hb:w,M=e.SelectProps,k=void 0===M?{}:M,E=Rs(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);d!==kb&&"td"!==d||(n=c||1e3);var T=k.native?"option":Yg;return r.createElement(d,qs({className:Bd(s.root,l),colSpan:n,ref:t},E),r.createElement(qb,{className:s.toolbar},r.createElement("div",{className:s.spacer}),C.length>1&&r.createElement(Xm,{color:"inherit",variant:"body2",className:s.caption},g),C.length>1&&r.createElement(Dy,qs({classes:{select:s.select,icon:s.selectIcon},input:r.createElement(Ah,{className:Bd(s.input,s.selectRoot)}),value:S,onChange:b},k),C.map((function(e){return r.createElement(T,{className:s.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),r.createElement(Xm,{color:"inherit",variant:"body2",className:s.caption},f({from:0===p?0:x*S+1,to:Math.min(p,(x+1)*S),count:p,page:x})),r.createElement(i,{className:s.actions,backIconButtonProps:a,count:p,nextIconButtonProps:v,onChangePage:y,page:x,rowsPerPage:S})))}));op((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(jb);var Wb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.component,a=void 0===i?"tr":i,s=e.hover,l=void 0!==s&&s,c=e.selected,u=void 0!==c&&c,d=Rs(e,["classes","className","component","hover","selected"]),p=r.useContext(Sb);return r.createElement(a,qs({ref:t,className:Bd(n.root,o,p&&{head:n.head,footer:n.footer}[p.variant],l&&n.hover,u&&n.selected)},d))}));op((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(Wb);var Vb=Qm(r.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),_b=r.forwardRef((function(e,t){var n=e.active,o=void 0!==n&&n,i=e.children,a=e.classes,s=e.className,l=e.direction,c=void 0===l?"desc":l,u=e.hideSortIcon,d=void 0!==u&&u,p=e.IconComponent,m=void 0===p?Vb:p,f=Rs(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return r.createElement(pm,qs({className:Bd(a.root,s,o&&a.active),component:"span",disableRipple:!0,ref:t},f),i,d&&!o?null:r.createElement(m,{className:Bd(a.icon,a["iconDirection".concat(rp(c))])}))}));op((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(_b);var Ub,$b=!("undefined"==typeof window||!window.document||!window.document.createElement);function Kb(){if(Ub)return Ub;if(!$b||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Ub="reverse",e.scrollLeft>0?Ub="default":(e.scrollLeft=1,0===e.scrollLeft&&(Ub="negative")),document.body.removeChild(e),Ub}function Gb(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var o=Kb();if("indeterminate"===o)return Number.NaN;switch(o){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function Yb(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var Xb={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Jb(e){var t=e.onChange,n=Rs(e,["onChange"]),o=r.useRef(),i=r.useRef(null),a=function(){o.current=i.current.offsetHeight-i.current.clientHeight};return r.useEffect((function(){var e=ch((function(){var e=o.current;a(),e!==o.current&&t(o.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),r.useEffect((function(){a(),t(o.current)}),[t]),r.createElement("div",qs({style:Xb,ref:i},n))}var Zb=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.color,a=e.orientation,s=Rs(e,["classes","className","color","orientation"]);return r.createElement("span",qs({className:Bd(n.root,n["color".concat(rp(i))],o,{vertical:n.vertical}[a]),ref:t},s))})),Qb=op((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(Zb),ex=r.createElement(Ob,{fontSize:"small"}),tx=r.createElement(Rb,{fontSize:"small"}),nx=r.forwardRef((function(e,t){var n=e.classes,o=e.className,i=e.direction,a=e.orientation,s=e.visible,l=Rs(e,["classes","className","direction","orientation","visible"]),c=Bd(n.root,o,{vertical:n.vertical}[a]);return s?r.createElement(pm,qs({component:"div",className:c,ref:t,role:null,tabIndex:null},l),"left"===i?ex:tx):r.createElement("div",{className:c})})),ox=op({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(nx),rx=r.forwardRef((function(e,t){var n=e.action,o=e.centered,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"div":c,d=e.indicatorColor,p=void 0===d?"secondary":d,m=e.onChange,f=e.orientation,h=void 0===f?"horizontal":f,g=e.ScrollButtonComponent,v=void 0===g?ox:g,y=e.scrollButtons,b=void 0===y?"auto":y,x=e.TabIndicatorProps,S=void 0===x?{}:x,w=e.textColor,C=void 0===w?"inherit":w,M=e.value,k=e.variant,E=void 0===k?"standard":k,T=Rs(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=np(),L="scrollable"===E,D="rtl"===N.direction,q="vertical"===h,O=q?"scrollTop":"scrollLeft",R=q?"top":"left",A=q?"bottom":"right",P=q?"clientHeight":"clientWidth",I=q?"height":"width",z=r.useState(!1),B=z[0],F=z[1],H=r.useState({}),j=H[0],W=H[1],V=r.useState({start:!1,end:!1}),_=V[0],U=V[1],$=r.useState({overflow:"hidden",marginBottom:null}),K=$[0],G=$[1],Y=new Map,X=r.useRef(null),J=r.useRef(null),Z=function(){var e,t,n=X.current;if(n){var o=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:Gb(n,N.direction),scrollWidth:n.scrollWidth,top:o.top,bottom:o.bottom,left:o.left,right:o.right}}if(n&&!1!==M){var r=J.current.children;if(r.length>0){var i=r[Y.get(M)];t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Q=Kp((function(){var e,t=Z(),n=t.tabsMeta,o=t.tabMeta,r=0;if(o&&n)if(q)r=o.top-n.top+n.scrollTop;else{var i=D?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;r=o.left-n.left+i}var a=(Ds(e={},R,r),Ds(e,I,o?o[I]:0),e);if(isNaN(j[R])||isNaN(j[I]))W(a);else{var s=Math.abs(j[R]-a[R]),l=Math.abs(j[I]-a[I]);(s>=1||l>=1)&&W(a)}})),ee=function(e){!function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=o.ease,a=void 0===i?Yb:i,s=o.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,p=function(){d=!0},m=function o(i){if(d)r(new Error("Animation cancelled"));else{null===c&&(c=i);var s=Math.min(1,(i-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){r(null)})):requestAnimationFrame(o)}};u===n?r(new Error("Element already at target position")):requestAnimationFrame(m)}(O,X.current,e)},te=function(e){var t=X.current[O];q?t+=e:(t+=e*(D?-1:1),t*=D&&"reverse"===Kb()?-1:1),ee(t)},ne=function(){te(-X.current[P])},oe=function(){te(X.current[P])},re=r.useCallback((function(e){G({overflow:null,marginBottom:-e})}),[]),ie=Kp((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[R]<t[R]){var o=t[O]+(n[R]-t[R]);ee(o)}else if(n[A]>t[A]){var r=t[O]+(n[A]-t[A]);ee(r)}})),ae=Kp((function(){if(L&&"off"!==b){var e,t,n=X.current,o=n.scrollTop,r=n.scrollHeight,i=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(q)e=o>1,t=o<r-i-1;else{var l=Gb(X.current,N.direction);e=D?l<a-s-1:l>1,t=D?l>1:l<a-s-1}e===_.start&&t===_.end||U({start:e,end:t})}}));r.useEffect((function(){var e=ch((function(){Q(),ae()})),t=_f(X.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Q,ae]);var se=r.useCallback(ch((function(){ae()})));r.useEffect((function(){return function(){se.clear()}}),[se]),r.useEffect((function(){F(!0)}),[]),r.useEffect((function(){Q(),ae()})),r.useEffect((function(){ie()}),[ie,j]),r.useImperativeHandle(n,(function(){return{updateIndicator:Q,updateScrollButtons:ae}}),[Q,ae]);var le=r.createElement(Qb,qs({className:s.indicator,orientation:h,color:p},S,{style:qs({},j,{},S.style)})),ce=0,ue=r.Children.map(a,(function(e){if(!r.isValidElement(e))return null;var t=void 0===e.props.value?ce:e.props.value;Y.set(t,ce);var n=t===M;return ce+=1,r.cloneElement(e,{fullWidth:"fullWidth"===E,indicator:n&&!B&&le,selected:n,onChange:m,textColor:C,value:t})})),de=function(){var e={};e.scrollbarSizeListener=L?r.createElement(Jb,{className:s.scrollable,onChange:re}):null;var t=_.start||_.end,n=L&&("auto"===b&&t||"desktop"===b||"on"===b);return e.scrollButtonStart=n?r.createElement(v,{orientation:h,direction:D?"right":"left",onClick:ne,visible:_.start,className:Bd(s.scrollButtons,"on"!==b&&s.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?r.createElement(v,{orientation:h,direction:D?"left":"right",onClick:oe,visible:_.end,className:Bd(s.scrollButtons,"on"!==b&&s.scrollButtonsDesktop)}):null,e}();return r.createElement(u,qs({className:Bd(s.root,l,q&&s.vertical),ref:t},T),de.scrollButtonStart,de.scrollbarSizeListener,r.createElement("div",{className:Bd(s.scroller,L?s.scrollable:s.fixed),style:K,ref:X,onScroll:se},r.createElement("div",{className:Bd(s.flexContainer,q&&s.flexContainerVertical,i&&!L&&s.centered),ref:J,role:"tablist"},ue),B&&le),de.scrollButtonEnd)}));op((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Ds({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(rx);var ix={standard:pg,filled:Ih,outlined:iv},ax=r.forwardRef((function(e,t){var n=e.autoComplete,o=e.autoFocus,i=e.children,a=e.classes,s=e.className,c=e.color,u=void 0===c?"primary":c,d=e.defaultValue,p=e.error,m=e.FormHelperTextProps,f=e.fullWidth,h=e.helperText,g=e.hiddenLabel,v=e.id,y=e.InputLabelProps,b=e.inputProps,x=e.InputProps,S=e.inputRef,w=e.label,C=e.multiline,M=e.name,k=e.onBlur,E=e.onChange,T=e.onFocus,N=e.placeholder,L=e.required,D=void 0!==L&&L,q=e.rows,O=e.rowsMax,R=e.select,A=void 0!==R&&R,P=e.SelectProps,I=e.type,z=e.value,B=e.variant,F=void 0===B?"standard":B,H=Rs(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),j=r.useState(0),W=j[0],V=j[1],_=r.useRef(null);r.useEffect((function(){if("outlined"===F){var e=l.findDOMNode(_.current);V(null!=e?e.offsetWidth:0)}}),[F,D,w]);var U={};"outlined"===F&&(y&&void 0!==y.shrink&&(U.notched=y.shrink),U.labelWidth=W),A&&(P&&P.native||(U.id=void 0),U["aria-describedby"]=void 0);var $=h&&v?"".concat(v,"-helper-text"):void 0,K=w&&v?"".concat(v,"-label"):void 0,G=ix[F],Y=r.createElement(G,qs({"aria-describedby":$,autoComplete:n,autoFocus:o,defaultValue:d,fullWidth:f,multiline:C,name:M,rows:q,rowsMax:O,type:I,value:z,id:v,inputRef:S,onBlur:k,onChange:E,onFocus:T,placeholder:N,inputProps:b},U,x));return r.createElement(Fh,qs({className:Bd(a.root,s),error:p,fullWidth:f,hiddenLabel:g,ref:t,required:D,color:u,variant:F},H),w&&r.createElement(hg,qs({htmlFor:v,ref:_,id:K},y),w),A?r.createElement(Dy,qs({"aria-describedby":$,id:v,labelId:K,value:z,input:Y},P),i):Y,h&&r.createElement(_h,qs({id:$},m),h))}));function sx(e){return Math.round(1e5*e)/1e5}op({root:{}},{name:"MuiTextField"})(ax);var lx=r.forwardRef((function(e,t){var n=e.children,o=e.classes,i=e.disableFocusListener,a=void 0!==i&&i,s=e.disableHoverListener,c=void 0!==s&&s,u=e.disableTouchListener,d=void 0!==u&&u,p=e.enterDelay,m=void 0===p?0:p,f=e.enterTouchDelay,h=void 0===f?700:f,g=e.id,v=e.interactive,y=void 0!==v&&v,b=e.leaveDelay,x=void 0===b?0:b,S=e.leaveTouchDelay,w=void 0===S?1500:S,C=e.onClose,M=e.onOpen,k=e.open,E=e.placement,T=void 0===E?"bottom":E,N=e.PopperProps,L=e.title,D=e.TransitionComponent,q=void 0===D?og:D,O=e.TransitionProps,R=Rs(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),A=np(),P=r.useState(!1),I=P[0],z=P[1],B=r.useState(0)[1],F=r.useState(),H=F[0],j=F[1],W=r.useRef(!1),V=r.useRef(null!=k).current,_=r.useRef(),U=r.useRef(),$=r.useRef(),K=r.useRef(),G=r.useRef();r.useEffect((function(){_.current||(_.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),k&&B((function(e){return!e}))}),[k]),r.useEffect((function(){return function(){clearTimeout(U.current),clearTimeout($.current),clearTimeout(K.current),clearTimeout(G.current)}}),[]);var Y=function(e){V||I||z(!0),M&&M(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),W.current&&"touchstart"!==e.type||(H&&H.removeAttribute("title"),clearTimeout($.current),clearTimeout(K.current),m?(e.persist(),$.current=setTimeout((function(){Y(e)}),m)):Y(e))},J=im(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=r.useState(!1),ne=te[0],oe=te[1],re=function(e){V||z(!1),C&&C(e),clearTimeout(U.current),U.current=setTimeout((function(){W.current=!1}),A.transitions.duration.shortest)},ie=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ne&&(oe(!1),Q())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout($.current),clearTimeout(K.current),e.persist(),K.current=setTimeout((function(){re(e)}),x)},ae=Bp(j,t),se=Bp(ee,ae),le=r.useCallback((function(e){zp(se,l.findDOMNode(e))}),[se]),ce=Bp(n.ref,le),ue=V?k:I;""===L&&(ue=!1);var de=!ue&&!c,pe=qs({"aria-describedby":ue?g||_.current:null,title:de&&"string"==typeof L?L:null},R,{},n.props,{className:Bd(R.className,n.props.className)});d||(pe.onTouchStart=function(e){W.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(K.current),clearTimeout(U.current),clearTimeout(G.current),e.persist(),G.current=setTimeout((function(){X(e)}),h)},pe.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(G.current),clearTimeout(K.current),e.persist(),K.current=setTimeout((function(){re(e)}),w)}),c||(pe.onMouseOver=X,pe.onMouseLeave=ie),a||(pe.onFocus=function(e){H||j(e.currentTarget),Z(e)&&(oe(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},pe.onBlur=ie);var me=y?{onMouseOver:pe.onMouseOver,onMouseLeave:pe.onMouseLeave,onFocus:pe.onFocus,onBlur:pe.onBlur}:{};return r.createElement(r.Fragment,null,r.cloneElement(n,qs({ref:ce},pe)),r.createElement(hy,qs({className:Bd(o.popper,y&&o.popperInteractive),placement:T,anchorEl:H,open:!!H&&ue,id:pe["aria-describedby"],transition:!0},me,N),(function(e){var t=e.placement,n=e.TransitionProps;return r.createElement(q,qs({timeout:A.transitions.duration.shorter},n,O),r.createElement("div",{className:Bd(o.tooltip,o["tooltipPlacement".concat(rp(t.split("-")[0]))],W.current&&o.touch)},L))})))}));op((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:Ts(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(sx(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(sx(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:Ds({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Ds({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Ds({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Ds({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(lx);var cx={entering:{transform:"none"},entered:{transform:"none"}},ux={enter:wl.enteringScreen,exit:wl.leavingScreen};function dx(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function px({d:e,size:t,style:n={},viewBox:o="0 0 16 16"}){const i={fontSize:dx(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return r.createElement("i",{style:i},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:o,fill:"currentColor"},r.createElement("path",{d:e})))}r.forwardRef((function(e,t){var n=e.children,o=e.in,i=e.onEnter,a=e.onExit,s=e.style,l=e.timeout,c=void 0===l?ux:l,u=Rs(e,["children","in","onEnter","onExit","style","timeout"]),d=np(),p=Bp(n.ref,t);return r.createElement(vp,qs({appear:!0,in:o,onEnter:function(e,t){Pp(e);var n=Ip({style:s,timeout:c},{mode:"enter"});e.style.webkitTransition=d.transitions.create("transform",n),e.style.transition=d.transitions.create("transform",n),i&&i(e,t)},onExit:function(e){var t=Ip({style:s,timeout:c},{mode:"exit"});e.style.webkitTransition=d.transitions.create("transform",t),e.style.transition=d.transitions.create("transform",t),a&&a(e)},timeout:c},u),(function(e,t){return r.cloneElement(n,qs({style:qs({transform:"scale(0)",visibility:"exited"!==e||o?void 0:"hidden"},cx[e],{},s,{},n.props.style),ref:p},t))}))}));const mx={d:"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"},fx={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"},hx="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",gx={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"},vx={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"};function yx(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.",e.layout);let o=ia.generate(t,n);o&&o.length&&(o=o.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(o,!0))}))}function bx(e,t,n,o,r,i){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[o].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex((e=>e.qDef.cId===n)),c=oe(!0,{},a),u=c.qHyperCubeDef[o][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],i||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[o][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][l]=u,r&&r({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),yx(e,a,c)}))}const xx=(e,t)=>{const n=[],o=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&o.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(o).then((()=>n))};function Sx({dir:e,dock:t,altList:n,model:o,translator:r,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>xx(i,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title: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)}(e,i,r).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){bx(o,e,t,"qDimensions",a)}}}function wx(e,t,n,o="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(r=e,"H"===r.qGrouping?r.title||"":r.qFallbackTitle||""),drillUp(e){n.drillUp(o,t,e)},id:e.cId};var r}function Cx({altList:e,app:t,dir:n,dock:o,model:r,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:o,getAlternatives:()=>xx(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).map((e=>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 o=e.qDef.qLabelExpression;if(o)return t.evaluate(o);const r=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(r)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){bx(r,e,t,"qMeasures",i,a)}}}function Mx(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const kx={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"}}},Ex=({children:e,...t})=>r.createElement(af,G({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const Tx=El({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 Nx=Ll({productionPrefix:"q3608",disableGlobal:!0,seed:""});var Lx={DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Dx}=Lx;function qx({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Dx}=(null==t?void 0:t.meta)||{},{qHyperCube:o}=e.getLayout();return o.qSize.qcy*o.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Ox}=Lx,Rx=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Ox}=(null==t?void 0:t.meta)||{},{qHyperCube:o}=e.getLayout();return o.qDimensionInfo.length>1&&!qx({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Ax}=Lx,{DEFAULT_NUM_POINTS:Px,DEFAULT_NUM_LINES:Ix}=Lx,{DEFAULT_NUM_POINTS:zx}=Lx,Bx=({layoutService:e,largeDataService:t})=>{if(!qx({layoutService:e,largeDataService:t})){const{maxNumPoints:e=zx}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:o=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:r=Ix,maxNumPoints:i=Px}=(null==t?void 0:t.meta)||{};if(Rx({layoutService:e,largeDataService:t})*o[0]<=i)return o[0];const a=i/Math.max(1,Math.min(r,o[1]));return Math.floor(o[0]<=a?a:a/4)})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Ax}=(null==t?void 0:t.meta)||{},{measureCount:o=1}=(null==e?void 0:e.meta)||{},r=4+2*(o-1);return Math.floor(n/(o*r))})({layoutService:e,largeDataService:t})};function Fx({model:e,layoutService:t,largeDataService:n,definitionPath:o="/qHyperCubeDef"}){return{shouldFetchReduced:()=>qx({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Bx({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Rx({layoutService:t,largeDataService:n}),fetch:(r,i)=>(({start:e,end:t,model:n,layoutService:o,largeDataService:r,definitionPath:i})=>{const a={qStart:e,qEnd:t,qNbrPoints:Bx({layoutService:o,largeDataService:r}),qMaxNbrTicks:300,qMaxNumberLines:Rx({layoutService:o,largeDataService:r})};return n.getHyperCubeContinuousData(i,a,!1)})({start:r,end:i,model:e,layoutService:t,largeDataService:n,definitionPath:o})}}function Hx(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function jx({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 o=n+e,r=o+t;return 1===t&&0===e&&(o=n-.5,r=n+.5),{zoom:{min:o,max:r}}}(n,t.get("continuousMin"))}}}function Wx(){const e=()=>{},t=[],n={};return e.set=(e,o)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1),t.push(e),n[e]=o},e.forEach=e=>{t.forEach(((t,o)=>e(n[t],o)))},e.has=e=>e in n,e}function Vx(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const o=[],r=Wx(),i=Wx();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?r.set(l,s):s[0].qNum>t&&(i.has(l)||i.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&o.push(s)}return r.forEach(((e,t)=>o.splice(t,0,e))),i.forEach((e=>o.push(e))),o}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const o=[];let r,i;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?r=s:s[0].qNum>t&&(i||(i=s)),s[0].qNum>=e&&s[0].qNum<=t&&o.push(s)}return r&&o.unshift(r),i&&o.push(i),o}({start:e,end:t,matrix:n})}function _x(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Ux(e,t,n){const o={qDataPages:(n.qDataPages||[]).map((n=>{const o=Vx(e,t,n.qMatrix),r=_x(n.qArea,o);return{...n,qArea:r,qMatrix:o}}))};return n.qAxisData&&n.qAxisData.qAxis&&(o.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,o)=>((o.qStart>=e&&o.qStart<=t||o.qEnd>=e&&o.qEnd<=t||o.qStart<e&&o.qEnd>t)&&n.push(o),n)),[])})))}}(e,t,n.qAxisData)),o}const $x=2**.5,Kx=1/$x;function Gx(e){return e.qIsOtherCell}function Yx({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Gx)){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(Gx)||t++})),t}(n)}const Xx={command:{processDataPage:()=>{}}};var Jx={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 o=t[e],r=t[e+1];o.data={},r||1===o.end?r?(o.data.start=o.value,o.data.end=r.value,o.end=r.position):(o.data.start=o.value,o.data.end=o.value):(o.data.start=o.value,o.data.end=n,o.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 o=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],o.data.start]},x:0,y:0,width:o.start*this.rect.width,height:this.rect.height})}return n}};function Zx(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Qx(e,t){const{localProps:{size:n},props:{anchor:o}}=t,r=function({props:e,localProps:{size:t},style:n,renderer:o}){const r=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=>o.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,o)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=o;e.start===e.end&&(d=c.width+2*r,1===e.end&&(u-=d));const p={x:u+r,y:r,width:d-2*r,height:t.height-2*r},m=s(l[0]+"…").width,f=Math.max(0,p.width-c.width),h=Math.max(0,p.height-c.height),g=i*f,v=a*h;return{show:p.width>=Math.min(m,c.width),text:l,dx:g,dy:v,rect:p,style:n.label,segment:{x:u+g,width:c.width+2*r},tickValue:e.value}}}}(t),i=function({localProps:{size:e},style:t,scale:n,props:o}){const[r,i]=n.domain(),a=Math.max(0,Math.min(1,o.guideLine.major.justify));return{resolve:(n,o)=>{const s=a*o.width,l=Zx(o.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=r&&n.value<=i,x1:l,y1:0,x2:l,y2:Zx(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const o=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:o,height:t.height}}(e,n,o);return{rect:t,label:r.resolve(e,t),guideLine:i.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const o=e[n-1],r=t[n-1].label;if(o&&o.start===o.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(i=n.segment,a=r.segment,!(i.x<a.x?i.x+i.width>=a.x:a.x+a.width>=i.x))}var i,a}(e,a),a}function eS(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:o=>{const r=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),i=Zx(o.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:Zx(r,n.minorGuideLine.strokeWidth),x2:i,y2:Zx(t.guideLine.minor.size+r,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function tS(e){return e.filter((e=>e.show)).map((e=>oe({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var nS={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)),o=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const o=Zx(1,t.line.strokeWidth);return{show:n.line.show,x1:Zx(0,t.line.strokeWidth),y1:o,x2:Zx(e.width,t.line.strokeWidth),y2:o,style:t.line}}(this),this.state.major=Qx(n,this),this.state.minor=eS(o,this)},render(){return[...tS([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>oe({},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})))),...tS(this.state.major.map((e=>e.guideLine))),...tS(this.state.minor.map((e=>e.guideLine)))];var e}};function oS(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 rS(e){return e.qTags.indexOf("$qualified")>-1}function iS({qAxis:e}){const t=[],n=[];for(let o=0;o<e.length;o++){const r=o+1,i=e[o],a=e[r];oS(i,a)?(rS(a)?(t.push(r),n.push(o)):(t.push(o),n.push(r)),o++):(t.push(o),n.push(o))}return{qualified:t,nonQualified:n}}function aS({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let o,r=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(r=c.index,o=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){i="auto",s=!0;break}if(e&&e.queries.inner(n)){i=e.index;const o=t[l+2];o&&o.queries.minor(n)&&(a=o.index);break}}}if(!Number.isNaN(r)&&Number.isNaN(i)&&"auto"!==i){i=r,r=NaN;const e=t[o+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(r)&&(r="auto",i="auto");return{outer:r,inner:i,minor:a,isDayOrShorter:s}}}}function sS({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:o}){const r=n;return{isDayOrShorter:()=>(r.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,r.isDayOrShorter),count:()=>e.length,maxRange:()=>(r.maxRange=e.length?Math.max(...e.map((e=>Math.abs(o(e.qStart)-o(e.qEnd))))):0,r.maxRange),rangeAndWidth(){const n=o.clamp();return o.clamp(!1),r.rangeAndWidth=e.map((e=>({range:Math.abs(o(e.qStart)-o(e.qEnd)),width:t(""+e.qText).width+16}))),o.clamp(n),r.rangeAndWidth}}}function lS({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>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function cS({qualified:e,nonQualified:t,qAxis:n,measureText:o,reqAutoFitWidth:r,scale:i},{attributesFactory:a=sS,queryFactory:s=lS}={attributesFactory:sS,queryFactory:lS}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:o,scale:i});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:r})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function uS({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:o=0,scale:r},{metaFactory:i=cS,mapper:a=iS,resolver:s=aS}={metaFactory:cS,mapper:iS,resolver:aS}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=i({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:o,scale:r}),p=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const o=n.key({distance:t});if(n.get(o))return n.get(o);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 r=p.resolve(t);return n.set(o,r),r}}}function dS(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const pS=dS(0).getTime();function mS(e){return(e.getTime()-pS)/86400/1e3}var fS=new Date,hS=new Date;function gS(e,t,n,o){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},r.range=function(n,o,i){var a,s=[];if(n=r.ceil(n),i=null==i?1:Math.floor(i),!(n<o&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<o);return s},r.filter=function(n){return gS((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,o){if(e>=e)if(o<0)for(;++o<=0;)for(;t(e,-1),!n(e););else for(;--o>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,o){return fS.setTime(+t),hS.setTime(+o),e(fS),e(hS),Math.floor(n(fS,hS))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(o?function(t){return o(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}var vS=gS((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));vS.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?gS((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):vS:null},vS.range;var yS=1e3,bS=6e4,xS=36e5,SS=864e5,wS=6048e5,CS=gS((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*yS)}),(function(e,t){return(t-e)/yS}),(function(e){return e.getUTCSeconds()}));function MS(e){return gS((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())*bS)/wS}))}CS.range,gS((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*yS)}),(function(e,t){e.setTime(+e+t*bS)}),(function(e,t){return(t-e)/bS}),(function(e){return e.getMinutes()})).range,gS((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*yS-e.getMinutes()*bS)}),(function(e,t){e.setTime(+e+t*xS)}),(function(e,t){return(t-e)/xS}),(function(e){return e.getHours()})).range,gS((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())*bS)/SS}),(function(e){return e.getDate()-1})).range;var kS=MS(0),ES=MS(1),TS=MS(2),NS=MS(3),LS=MS(4),DS=MS(5),qS=MS(6);kS.range,ES.range,TS.range,NS.range,LS.range,DS.range,qS.range,gS((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()})).range;var OS=gS((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()}));OS.every=function(e){return isFinite(e=Math.floor(e))&&e>0?gS((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},OS.range;var RS=gS((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*bS)}),(function(e,t){return(t-e)/bS}),(function(e){return e.getUTCMinutes()}));RS.range;var AS=gS((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*xS)}),(function(e,t){return(t-e)/xS}),(function(e){return e.getUTCHours()}));AS.range;var PS=gS((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/SS}),(function(e){return e.getUTCDate()-1}));function IS(e){return gS((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)/wS}))}PS.range;var zS=IS(0),BS=IS(1),FS=IS(2),HS=IS(3),jS=IS(4),WS=IS(5),VS=IS(6);zS.range,BS.range,FS.range,HS.range,jS.range,WS.range,VS.range;var _S=gS((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()}));_S.range;var US=gS((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()}));US.every=function(e){return isFinite(e=Math.floor(e))&&e>0?gS((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},US.range;const $S=1,KS=2,GS=3,YS=4,XS=5,JS=6;function ZS({timeScale:e,labels:t,distance:n,isDayOrShorter:o,cache:r,timeOnly:i,initialMin:a}){const[s,l]=e.domain(),c=r.key({distance:n});let u;r.get(c,1)?u=r.get(c,1):(u=function(e,t,n,o,r,i){function a(e){return US.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=CS.count(e,t),l=RS.count(e,t),c=AS.count(e,t),u=PS.count(e,t),d=zS.count(e,t),p=_S.count(e,t),m=US.count(e,t),f=n/o.second.width-1,h=n/o.minute.width-1,g=n/o.date.width-1,v=n/o.year.width-1,y={type:"year",desc:"year",count:m,interval:US.every(1),formatter:o.year.formatter,offset:e=>US.offset(e,-1),floor:US.floor};if(s<=f)y.type=$S,y.desc="second",y.count=s,y.interval=CS.every(1),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-1),y.floor=CS.floor;else if(s/2<=f)y.type=$S,y.desc="every other second",y.count=s/2,y.interval=CS.every(2),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-2),y.floor=CS.floor;else if(s/5<=f)y.type=$S,y.desc="every 5 second",y.count=s/5,y.interval=CS.every(5),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-5),y.floor=CS.floor;else if(s/15<=f)y.type=$S,y.desc="every 15 second",y.count=s/15,y.interval=CS.every(15),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-15),y.floor=CS.floor;else if(s/30<=f)y.type=$S,y.desc="every 30 second",y.count=s/30,y.interval=CS.every(30),y.formatter=o.second.formatter,y.offset=e=>CS.offset(e,-30),y.floor=CS.floor;else if(l<=h)y.type=KS,y.desc="minute",y.count=l,y.interval=RS.every(1),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-1),y.floor=RS.floor;else if(l/2<=h)y.type=KS,y.desc="every 2 minute",y.count=l/2,y.interval=RS.every(2),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-2),y.floor=RS.floor;else if(l/5<=h)y.type=KS,y.desc="every 5 minute",y.count=l/5,y.interval=RS.every(5),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-5),y.floor=RS.floor;else if(l/10<=h)y.type=KS,y.desc="every 10 minute",y.count=l/10,y.interval=RS.every(10),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-10),y.floor=RS.floor;else if(l/15<=h)y.type=KS,y.desc="every 15 minute",y.count=l/15,y.interval=RS.every(15),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-15),y.floor=RS.floor;else if(l/30<=h)y.type=KS,y.desc="every 30 minute",y.count=l/30,y.interval=RS.every(30),y.formatter=o.minute.formatter,y.offset=e=>RS.offset(e,-30),y.floor=RS.floor;else if(c<=h)y.type=GS,y.desc="hour",y.count=c,y.interval=AS.every(1),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-1),y.floor=AS.floor;else if(c/2<=h)y.type=GS,y.desc="every 2 hour",y.count=c/2,y.interval=AS.every(2),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-2),y.floor=AS.floor;else if(c/3<=h)y.type=GS,y.desc="every 3 hour",y.count=c/3,y.interval=AS.every(3),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-3),y.floor=AS.floor;else if(c/6<=h)y.type=GS,y.desc="every 6 hour",y.count=c/6,y.interval=AS.every(6),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-6),y.floor=AS.floor;else if(c/12<=h||r)y.type=GS,y.desc="every 12 hour",y.count=c/12,y.interval=AS.every(12),y.formatter=o.minute.formatter,y.offset=e=>AS.offset(e,-12),y.floor=AS.floor;else if(u<=g)y.type=YS,y.desc="day",y.count=u,y.interval=PS.every(1),y.formatter=o.date.formatter,y.offset=e=>PS.offset(e,-1),y.floor=PS.floor;else if(u/2<=g)y.type=YS,y.desc="every 2 day",y.count=u/2,y.interval=PS.every(2),y.formatter=o.date.formatter,y.offset=e=>PS.offset(e,-2),y.floor=PS.floor;else if(u/3<=g)y.type=YS,y.desc="every 3 day",y.count=u/3,y.interval=PS.every(3),y.formatter=o.date.formatter,y.offset=e=>PS.offset(e,-3),y.floor=PS.floor;else if(d<=g)y.type=YS,y.desc="week",y.count=d,y.interval=zS.every(1),y.formatter=o.date.formatter,y.offset=e=>zS.offset(e,-1),y.floor=PS.floor;else if(d/2<=g)y.type=YS,y.desc="every 2 week",y.count=d/2,y.interval=zS.every(2),y.formatter=o.date.formatter,y.offset=e=>zS.offset(e,-2),y.floor=PS.floor;else if(p<=g)y.type=XS,y.desc="month",y.count=p,y.interval=_S.every(1),y.formatter=o.date.formatter,y.offset=e=>_S.offset(e,-1),y.floor=PS.floor;else if(p/3<=g)y.type=XS,y.desc="quarter",y.count=p/3,y.interval=_S.every(3),y.formatter=o.date.formatter,y.offset=e=>_S.offset(e,-3),y.floor=PS.floor;else if(p/6<=g)y.type=XS,y.desc="half year",y.count=p/6,y.interval=_S.every(6),y.formatter=o.date.formatter,y.offset=e=>_S.offset(e,-6),y.floor=PS.floor;else if(m<=v)y.type=JS,y.desc="year",y.count=m,y.interval=US.every(1),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-1),y.floor=US.floor;else if(m/2<=v)y.type=JS,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-2),y.floor=US.floor;else if(m/5<=v)y.type=JS,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-5),y.floor=US.floor;else if(m/10<=v)y.type=JS,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=o.year.formatter,y.offset=e=>US.offset(e,-10),y.floor=US.floor;else{const e=Math.floor(m/v);y.type=JS,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=o.year.formatter,y.offset=t=>US.offset(t,-e),y.floor=US.floor}return y}(s,l,n,t.all(),o,a),r.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 p=d.map(((e,t,n)=>{const o=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:u.formatter}}));let m=[];if(!i&&u.type<=GS){const n=t.getFormat("date"),o=e.ticks(PS.every(1));o.length&&s.getUTCDate()!==o[0].getUTCDate()&&o.unshift(PS.offset(o[0],-1)),m=(o.length?o:[PS.floor(s)]).map(((e,t,o)=>{const r=o[t+1]?o[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:n.formatter}}))}return{inner:p,outer:m}}const QS=86400,ew=1440,tw={};function nw(e,t,n,o){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:o}}function ow(e,t,n){const{generator:o,anchor:r,clamp:i,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(i);const[l,c]=e.domain(),u=function(){return Kt.apply(Yi(Cr,wr,hr,mr,pr,dr,er,Go,Nr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([dS(l),dS(c)]);u.clamp(i),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof o?o:{type:o};let p;p="d3"===d.type?(e,r)=>ZS({timeScale:u,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:dS(o.initialMin)}):e=>function(e,t,n,o,r,i=!1){if(tw[[t,n,o,o,i]])return tw[[t,n,o,o,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=dS(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=o-n,p=t/(r-o),m=p/1440,f=p/QS,h=366*p,g=3*p*30,v=a.second.width/f,y=a.minute.width/m,b=a.date.width/g,x=a.year.width/h;let S,w,C,M=0,k=0,E=null,T=null,N=null,L=null,D=null,q=null;const O={outer:[],inner:[]};for(v<1?(E=1,k=1/QS):v<2?(E=2,k=1/QS*2):v<5?(E=5,k=1/QS*5):v<10?(E=10,k=1/QS*10):v<30?(E=30,k=1/QS*30):y<1?(T=1,k=1/ew):y<2?(T=2,k=1/ew*2):y<5?(T=5,k=1/ew*5):y<10?(T=10,k=.006944444444444445):y<30?(T=30,k=.020833333333333336):y<60?(N=1,k=1/24):y<120?(N=2,k=2/24):y<360?(N=6,k=.25):y<720?(N=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?(D=1,k=31):b<1?(D=3,k=90):x<1?(q=1,k=366):x<2?(q=2,k=732):x<5?(q=5,k=1826.25):(q=10,k=3652.5),w=Math.floor((d+n%1)/k);M<r;){C=w+1,S=q?nw("year",[l+w*q,0,1],[l+C*q,0,1],a.year.formatter):D?nw("month",[l,c+w*D,1],[l,c+C*D,1],a.date.formatter):L?nw("day",[l,c,u+w*L],[l,c,u+C*L],a.date.formatter):N?nw("hour",[l,c,u,0+w*N],[l,c,u,0+C*N],a.minute.formatter):T?nw("minute",[l,c,u,0,0+w*T],[l,c,u,0,0+C*T],a.minute.formatter):nw("second",[l,c,u,0,0,0+w*E],[l,c,u,0,0,0+C*E],a.second.formatter),M=mS(S.start),O.inner.push(S);const e=Math.floor(M);if(!(i||q||D||L)){const t={type:"day",start:dS(e),end:dS(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)}w++}return O.min=o,O.max=r,tw[[t,n,o,o,i]]=O,O}(n,e,d.min,l,c,"T"===s.qType);const m={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let o;o="start"===r?t.qStart:"end"===r?t.qEnd:(t.qStart+t.qEnd)/2;const i=e.clamp();n&&e.clamp(!1);const a=e(o),s=e(t.qStart),l=e(t.qEnd);return e.clamp(i),{value:o,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)=>p(t,n)[a].map((t=>{let n;return n="start"===r?mS(t.start):"end"===r?mS(t.end):(mS(t.start)+mS(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:mS(t.start),end:mS(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const rw=/t+/i;const iw={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 aw(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 sw="continuousPan";var lw={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:o=Xx,viewCache:r,viewState:i,definitionPath:a},s={}){const{engineFetcherFactory:l=Fx,snapshotFetcherFactory:c=jx,cacheFetcherFactory:u=Hx,cache:d={initial:{},merged:{}}}=s,p=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),m=c({layoutService:t,viewCache:r}),f=u({cache:d}),h=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,o;({initialMin:v,initialMax:y}=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])),r.set("continuousMin",v),r.set("continuousMax",y),r.set("minimiumZoomSpan",(n=v,o=y,Math.max(1e-6,2.3841857910156157e-7*(o-n)))),g=t.meta.isSnapshot?m:p,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=m.getSnapshotData()),i.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:o}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",o),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return g.fetch(v,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=_x(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return o.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Ux(v,y,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 o=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,o=t[t.length-1][0].qNum,r=[],i=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?r.push(e[t]):a.qNum>o&&i.push(e[t])}return[...r,...t,...i]}(e.qMatrix,t.qDataPages[n].qMatrix),r=_x(e.qArea,o);return{...e,qArea:r,qMatrix:o}})),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)),o=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),r=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}=o[a];for(let n=0,o=i.qTicks.length;n<o;n++){const o=i.qTicks[n];o.qStart<e?s.push(o):o.qStart>t&&l.push(o)}r[a].qTicks=[...s,...r[a].qTicks,...l]}}return{qAxis:r}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(o.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Ux(e,t,n))).catch(h),fetchFromCache:(e,t)=>f.fetch(e,t).then((n=>Ux(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return oe({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return oe({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Yx(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=d.merged.qDataPages,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:o}=e;function r(e,n,r){return o[e](n,r).then((e=>(o.updateLayout(e),t(),e)))}const i=c(((e,t)=>r("fetch",e,t)),50);return({min:e,max:t},{min:o,max:a})=>!n.meta.isContinuous||e===o&&t===a?Promise.resolve(null):r("fetchFromCache",e,t).then((n=>(i(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,o=NaN;return(r,i)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),o=e.get("minimiumZoomSpan"),Math.abs(r.max-r.min)<o?i:{min:Math.min(r.max,Math.max(t,r.min)),max:Math.max(r.min,Math.min(n,r.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:o=50,rtl:r=!1,targetKey:i}){const a=e.get("continuousMin"),s=e.get("continuousMax");return u(((e,o)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===i))[0])(e);if(l){const i=function(e,t,n){let{x:o}=e;return o-=t.element.getBoundingClientRect().left,o-=n.rect.x,Math.max(0,Math.min(1,o/n.rect.width))}(e,n,l),c=r?1-i:i,{min:u,max:d}=t.get("zoom"),p=Math.abs(d-u),m=p-(o>0?Kx:$x)*p,f=u+m*c,h=d-m*(1-c),g=f<a?a-f:0,v=h>s?h-s:0;t.set("zoom",{min:Math.max(f-v,a),max:Math.min(h+g,s)})}}),o)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:o,viewCache:r}){return{type:"Pan",key:"continuous:pan",options:{event:sw,pointers:1,threshold:10,enable(o,r){return this.started===sw||!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=sw;const{min:r,max:i}=o.get("zoom");this[sw]={min:r,max:i,size:t.component(e).rect.computedInner.width,span:i-r}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:i,size:a}=this[sw],s=-e.deltaX/a;o.set("zoom",{min:Math.min(n+s*t,r.get("continuousMax")-t),max:Math.max(i+s*t,r.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Jx,timeAxis:nS},picassoScales:{time:function e(t,n={}){const o=function(e,t,n){const o={};return Object.keys(t).forEach((r=>{const i=e[r],a=typeof i;"function"===a?o[r]=i(n):"object"!==a||Array.isArray(i)?o[r]="undefined"===a?t[r]:i:o[r]=oe(!0,{},t[r],i)})),o}(t,iw,n),{qAxis:r}=o,i=_o(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,o=+e.max;return Number.isNaN(n)&&Number.isNaN(o)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),o=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===o&&(n-=.5,o+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+o)?1:o}}(o,r);let c,u,p=[];const m=function(e){return Number.isNaN(+e)?NaN:i(e)};m.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),i=n[o.ticks.level];if(Number.isNaN(+i)||(p=u.transform(r[i].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(r[n.minor].qTicks,{isMinor:!0});p=p.concat(e)}return"auto"===i&&(p=u.generate(e,n.isDayOrShorter)),p},m.invert=e=>i.invert(e),m.domain=e=>Array.isArray(e)?i.domain(e):i.domain(),m.range=e=>Array.isArray(e)?i.range(e):i.range(),m.norm=e=>(aw(a,m),a.instance(e)),m.normInvert=e=>(aw(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(i.clamp(e),i.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),i.range(o.invert?[1,0]:[0,1]),i.domain([s,l]),a.invert=o.invert;const f=function(e){const t={},{measureText:n,fn:o,localeInfo:r}=e.formatter,i={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return r&&rw.test(r.qTimestampFmt)&&(i.minute.pattern+=" tt",i.second.pattern+=" tt"),i.date.pattern=r&&r.qDateFmt?r.qDateFmt:i.date.pattern,Object.keys(i).forEach((e=>{i[e].formatter=o(i[e].pattern),i[e].width=Math.max(i[e].width,n(i[e].formatter(41000.2343433)).width+16)})),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 o=dS(t[0].data.start),r=dS(t[n-1].data.start);return PS.count(o,r)/n>=1?i.date:AS.count(o,r)/n>0?i.minute:RS.count(o,r)/n>0?i.second:i.date},t}(o);return u=ow(i.copy(),o,f),c=uS({qAxis:r,measureText:o.formatter.measureText,reqAutoFitWidth:2*f.getFormat("minute").width,cache:o.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>"qHyperCube/"+o.field,key:()=>o.field,raw:d(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>f.getFormatFromTicks(p).formatter,m}}};const cw={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var uw={OPTIONS:cw,DEFAULT:cw.MINI_CHART};function dw({layoutService:e,discrete:t}){return({h:n,rect:o,orientation:r,minThumbSize:i})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===r,c=o[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 pw({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),o=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-o)/(r-o),(n.max-o)/(r-o)]}(t,n):function(e){return e.get("viewRange")}(t)}const mw=e=>({miniChart:e===uw.OPTIONS.MINI_CHART.value,bar:e===uw.OPTIONS.BAR.value,none:e===uw.OPTIONS.NONE.value});function fw({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return mw(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return mw(uw.DEFAULT.value);const o=e.getLayoutValue("dimensionAxis.continuousAuto"),r=e.getLayoutValue("preferContinuousAxis");return mw(!n&&(o||!o&&r)?uw.OPTIONS.NONE.value:uw.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===uw.OPTIONS.MINI_CHART.value,n.bar=t.value===uw.OPTIONS.BAR.value,n.none=t.value===uw.OPTIONS.NONE.value),n}function hw({layoutService:e,dockService:t,discrete:n,continuousDataModel:o,viewState:r,viewCache:i,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=fw({layoutService:e,override:l});if(d.none)return!1;const{orientation:p}=t.meta.major,m={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?o.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:p,rtl:s,isContinuous:e.meta.isContinuous,range:()=>pw({layoutService:e,viewState:r,viewCache:i})}};d.bar&&(m.settings.style="slim",m.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(m.settings.size.thumb={min:4}));const f=a.getStyles();return f.color&&(m.style={standard:{thumb:{"border-color":f.color,opacity:.4},before:{background:f.color,opacity:.1},after:{background:f.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(m.settings.injections=()=>[dw({layoutService:e,discrete:n})]),m}function gw({componentKey:e,chart:t,viewState:n,viewCache:o,layoutService:r,dockService:i,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),p="horizontal"===i.meta.major.orientation,m=p?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,f=p?d.rect.computedInner.width:d.rect.computedInner.height,h=p&&a?f-m:m,g=Math.max(0,Math.min(h/f,1)),[v,y]=pw({layoutService:r,viewState:n,viewCache:o}),b=g<v,x=g>y,S=!b&&!x;return{pixel:h,relative:g,thumb:S?h-v*f:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function vw({componentKey:e,chart:t,viewState:n,viewCache:o,layoutService:r,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,p]=pw({layoutService:r,viewState:n,viewCache:o});return{size:u,thumbSize:(p-d)*u}}}function yw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=gw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:l}),u=vw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(o,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(i.meta.isContinuous){const e=o.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),i=r.get("continuousMax"),s=n+(i-n)*a.relative;o.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 bw="data-scrollbar-handle";function xw({e:e}){return(e.srcEvent||e).srcElement.getAttribute(bw)||""}const Sw="scrollbarResize";function ww({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:s}){const l=gw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:Sw,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Sw]=this[Sw]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&xw({e:t})&&(this[Sw].panningEvent=t.srcEvent),!!this[Sw].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[Sw]=this[Sw]||{},this[Sw].panningEvent&&t.component(e).emit("dragStart",this[Sw].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[Sw]=this[Sw]||{},!this[Sw].panningEvent)return;const i=o.get("zoom"),a=r.get("continuousMin"),s=r.get("continuousMax"),c=r.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=xw({e:this[Sw].panningEvent});let p="start"===d?Math.min(u,i.max):i.min,m="end"===d?Math.max(u,i.min):i.max;p===m&&(p-="start"===d?c:0,m+="end"===d?c:0),o.set("zoom",{min:p,max:m}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[Sw]=this[Sw]||{},delete this[Sw].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[Sw]=this[Sw]||{},delete this[Sw].panningEvent,t.component(e).emit("dragEnd")}}}}const Cw="scrollbarPan";function Mw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=gw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:l}),u=vw({componentKey:e,chart:t,viewState:o,viewCache:r,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Cw,threshold:0,enable(o,r){return this[Cw]=this[Cw]||{},!(r&&!this[Cw].isPanning)||!!n.scroll.enabled()&&((!r||r.target===t.element)&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[Cw]=this[Cw]||{},this[Cw].isPanning=!0,t.component(e).emit("lockState"),i.meta.isContinuous){const e=o.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),i=r.get("continuousMax"),s=n+(i-n)*a.relative;s<e.min?o.set("zoom",{min:Math.min(s,i-t),max:Math.max(s+t,n+t)}):s>e.max&&o.set("zoom",{min:Math.min(s-t,i-t),max:Math.max(s,n+t)}),this[Cw].relative=a.relative,this[Cw].zoom=o.get("zoom"),this[Cw].zoom.span=this[Cw].zoom.max-this[Cw].zoom.min,this[Cw].zoom.fullSpan=i-n}else if(a.onThumb)this[Cw].offset=a.thumb;else{const e=u();this[Cw].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Cw]=this[Cw]||{},i.meta.isContinuous){const e=a.relative-this[Cw].relative,{fullSpan:t,span:n,min:i,max:s}=this[Cw].zoom,l=r.get("continuousMin"),c=r.get("continuousMax");o.set("zoom",{min:Math.min(i+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Cw].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[Cw]=this[Cw]||{},this[Cw].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Cw]=this[Cw]||{},this[Cw].isPanning=!1,t.component(e).emit("unlockState")}}}}function kw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){return[yw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}),ww({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,rtl:l}),Mw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l})]}function Ew({componentKey:e,chart:t,actions:n,layoutService:o}){const r=(r,i)=>{if(!o.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(r,i)};return{type:"native",events:{mousemove:e=>r("hover",e),mouseleave:()=>r("leave")}}}function Tw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...kw({componentKey:e,chart:t,actions:n,viewState:o,viewCache:r,layoutService:i,dockService:a,discrete:s,rtl:l})],native:Ew({componentKey:e,chart:t,actions:n,layoutService:i})}}const Nw={background:"rgba(0, 0, 0, 0.1)"},Lw={top:-1,bottom:-1,width:6},Dw={width:2,background:"#595959"};var qw={before:Nw,after:Nw,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Lw,endHandle:Lw,startHandleBorder:Dw,endHandleBorder:Dw};const Ow={background:"rgba(0, 0, 0, 0.1)"},Rw={top:-1,bottom:-1,width:6},Aw={width:2,background:"#595959"};var Pw={before:Ow,after:Ow,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Rw,endHandle:Rw,startHandleBorder:Aw,endHandleBorder:Aw};const Iw={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},zw={pointerEvents:"initial"},Bw={pointerEvents:"none"};const Fw="ew-resize",Hw="default";function jw(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,o=n?e.computedInner.width:e.computedInner.height,r=t.range(),i=n&&t.rtl;return{size:o,start:(i?1-r[1]:r[0])*o,end:(i?1-r[0]:r[1])*o}}function Ww(){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?Fw:Hw}function Vw(e,t,n){const{min:o}=this.settings.settings.size.thumb;if(n-t<o){const r=(o-(n-t))/2,i=Math.max(0,0-(t-r))-Math.max(0,n+r-e);return{size:e,start:t-r+i,end:n+r+i}}return{size:e,start:t,end:n}}function _w(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Uw(){const{size:e,start:t,end:n}=jw.call(this);this.renderer.render(this.elements(this.h,Vw.call(this,e,t,n)))}function $w(){const{state:e,settings:t,style:n}=this,o=t.settings.style;return e.style[o]||(e.style[o]=function({id:e,style:t}){const n="slim"===e?Pw:qw;return{container:{...Iw},before:{...Iw,...n.before,...t.before},after:{...Iw,...n.after,...t.after},thumb:{...Iw,...n.thumb,...t.thumb},startHandle:{...Iw,...zw,...n.startHandle},endHandle:{...Iw,...zw,...n.endHandle},startHandleBorder:{...Iw,...Bw,...n.startHandleBorder},endHandleBorder:{...Iw,...Bw,...n.endHandleBorder}}}({id:t.settings.style,style:n[o]})),e.style[o]}var Kw={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(){Uw.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||!_w.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=xw({e:e});t&&(this.state.hover[t]=!0),Ww.call(this),Uw.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Ww.call(this),Uw.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=xw({e:e});t&&(this.state.drag[t]=!0),Ww.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Ww.call(this),Uw.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:o}=this.settings.settings.size.area,r="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[r]*o))},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:o}=jw.call(this);return this.elements(e,Vw.call(this,t,n,o))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:o}){const{settings:r}=this.settings,i=r.injections().map((t=>t({h:e,rect:this.rect,orientation:r.orientation,minThumbSize:r.size.thumb.min})));return function({h:e,size:t,start:n,end:o,properties:r,startHandleActive:i,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[r.end]:t-n},p={[r.start]:o},m={left:-3},f={left:1},h={right:-3,left:"auto"},g={left:3},v=e("div",{style:{...s.before,...c?p:d},class:"scrollbar--before"}),y=e("div",{style:{...s.after,...c?d:p},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?h:m},class:"scrollbar--start-handle",[bw]:"start"},i?e("div",{style:{...s.startHandleBorder,...c?g:f}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?m:h},class:"scrollbar--end-handle",[bw]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?f:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[r.start]:n,[r.end]:t-o},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[v,x,y,...u])}({h:e,size:t,start:n,end:o,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:$w.call(this),continuous:r.isContinuous,invert:"horizontal"===r.orientation&&r.rtl,injections:i})}};const Gw={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:o,rendHeight:r,flipXY:i,symbol:a}){let s="x",l="y",c=o,u=r,d=t<.5?90:-90;return i&&(s="y",l="x",c=r,u=o,d=t<.5?180:0),a(oe({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Yw({i:e,width:t,height:n,resolved:o,keys:r,flipXY:i,calcKey:a="box"}){let s,l=null,c=null;void 0!==o.major.settings.binStart?(l=o.major.items[e].binStart,c=o.major.items[e].binEnd,s=o.major.settings.binStart.scale):(s=o.major.settings.major.scale,l=s?o.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=oe({},{major:l,majorEnd:c},o.minor.items[e]);r.forEach((t=>{d[t]=o[t].items[e]}));const p=i?n:t,m=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:o,maxMajorWidth:r}){const i=e>=0?1:-1;let a=Math.min(i*e*t,Number.isNaN(Number(o))?r:o/r);return a=Number.isNaN(Number(n))?a:Math.max(n/r,a),a*i}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:p}),f=(u-m)/2,h=f+d.major+m/2;return{item:d,boxCenter:h,boxWidth:m,boxPadding:f,rendWidth:t,rendHeight:n}}function Xw({keys:e,data:t,defaultSettings:n,style:o,settings:r,width:i,height:a,resolver:s}){const l=oe(!0,{},n||{},o||{}),c={major:"horizontal"===r.orientation?a:i,minor:"horizontal"===r.orientation?i:a},u=r.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:oe(!0,{},{binStart:{scale:r.major.scale,ref:r.major.ref.start},binEnd:{scale:r.major.scale,ref:r.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:oe(!0,{},{binStart:{scale:r.major.scale,ref:"binStart"},binEnd:{scale:r.major.scale,ref:"binEnd"}},r.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:r.major}});const p=r.minor||{};let m;const f={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:oe(!0,{},{start:{scale:p.scale,ref:"start"},end:{scale:p.scale,ref:"end"},min:{scale:p.scale,ref:"min"},max:{scale:p.scale,ref:"max"},med:{scale:p.scale,ref:"med"}},p)})};for(let n=0,o=e.length;n<o;n++)m=e[n],f[m]=s.resolve({data:t,defaults:l[m],settings:r[m],scaled:c});return f}const Jw=["oob"];const Zw={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,o="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:a,symbol:s}=this,l=Xw({keys:Jw,data:r,defaultSettings:{oob:Gw.getDefaultSettings()},style:i,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l;return function({width:e,height:t,flipXY:n,resolved:o,keys:r,symbol:i,dockValue:a,_calcItemRenderingOpts:s=Yw}){const l=[],{items:c}=o.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:p,rendWidth:m,rendHeight:f}=s({i:u,width:e,height:t,resolved:o,keys:r,flipXY:n,calcKey:"oob"}),h=c[u].data,g=[];if(d.oob.show){g.push(Gw.createOob({oob:d.oob,dockValue:a,boxCenter:p,rendWidth:m,rendHeight:f,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:o,resolved:l,keys:Jw,symbol:s,dockValue:n})}},Qw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},eC=["hat"];function tC(e,t=!0){let n="";for(let t=0;t<e.length;t++){const o=e[t];n+=0===t?`M${o.x} ${o.y}`:`L${o.x} ${o.y}`,n+=" "}return t&&(n+="Z"),n}function nC({item:e,boxWidth:t,boxPadding:n,rendWidth:o,rendHeight:r,flipXY:i}){let a="x",s="y",l=o,c=r,u=e.hat.alignment||0;i&&(a="y",s="x",l=r,c=o,u=1-u);const d=(n+e.major)*l;let p=[{[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 m=oe({},e.hat,{type:"path",d:tC(p)});p=[{[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[m,oe({},e.hat,{type:"path",d:tC(p)})]}const oC={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:o,style:r,resolver:i}=this,a=Xw({keys:eC,data:o,defaultSettings:Qw,style:r,settings:this.settings.settings,width:e,height:t,resolver:i}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:o,keys:r,_calcItemRenderingOpts:i=Yw}){const a=[],{items:s}=o.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m}=i({i:l,width:e,height:t,resolved:o,keys:r,flipXY:n,calcKey:"hat"}),f=s[l].data,h=[];c.hat.show&&h.push(...nC({item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m,flipXY:n}));const g={type:"container",data:f,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:eC})}};function rC(e,t,n,o){const r=function(t){const n=String(t);return e(n)};return r.ticks=()=>t.map((t=>{const i=r([t.data.value,o?n-1:0]),a=r([t.data.value,o?0:n-1])+e.bandwidth();return{position:(i+a)/2,label:t.label,data:t.data,start:i,end:a}})),r.bandwidth=()=>e.bandwidth(),r.data=()=>e.data(),r.domain=()=>e.domain(),r.pxScale=function(o){const r=e.pxScale(o);return r===e?this:rC(r,t,n)},r}function iC(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},o={}){const r=t(e,n,o),i=r.domain(),a=r.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),r.domain(s),rC(r,a,l,e.invert)}))}const aC={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 sC(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const lC={getImageSize(e,t){let n;function o(){n&&(clearTimeout(n),n=null)}function r(e){const t=e;t.onload=null,t.onerror=null,o()}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},r(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},o()):(e={height:c,width:u},o()),a(e)},s.onerror=()=>{r(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{r(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function cC(e,t,n){let o=e.ref.qStaticContentUrl.qUrl;const r=function(e){var t,n,o,r,i;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(o=n.session)&&void 0!==o&&o.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(i=r.config)&&void 0!==i&&i.url)){var p;if(a=e.session.options||(null===(p=e.enigmaModel)||void 0===p?void 0:p.session.sessionConfig),!a){var m;a=null===(m=e.session)||void 0===m?void 0:m.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);r&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(o,r),o=o.replace(/"/g,'\\"'),o=o.replace(/'/g,"\\'"),o=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(o,r));const{height:i,width:a,imageError:s}=await lC.getImageSize(o,t);return{src:o,size:t,height:i,width:a,imageError:s}}async function uC(e,t,n,o){var r,i,a,s,l,c;const{app:u,flags:d}=t,p=null===(r=e.layout)||void 0===r||null===(i=r.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[m]=p,f=m.size||"small",h=m.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===m.cId){g=e;break}const v=(null===(a=o.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let y;if(-1!==g&&v[g]&&(y=v[g]),"media"===h&&null!==(l=m.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return cC(m,f,u);if("url"===h)return async function(e,t,n,o,r){let i,a=n.ref;if(r&&r.label&&(a=r.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&sC(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:r,imageError:s}=await lC.getImageSize(t,o);i={src:t,size:o,height:n,width:r,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await lC.getImageSize(a,o);i={src:a,size:o,height:e,width:t,imageError:n}}return i}(u,d,m,f,y);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&y&&y.label){return async function(e,t,n,o){let r;const i=o.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(sC(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:o,width:i,imageError:a}=await lC.getImageSize(e,n);r={src:e,size:n,height:o,width:i,imageError:a}}}catch(e){}return r}(u,n[g],f,y)}return[]}const dC={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:o}){const r=t,i=[];for(let t=0;t<r.length;t++)i.push(uC(e,o,n,r[t]));const a=await Promise.all(i);for(let e=0;e<r.length;e++)r[e].data.customTooltipImages=[a[e]];return r},checkIfPromisesExist({customTooltipModel:e}){var t,n;const o=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!o&&o.length>0}},pC={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:o}){let r=t;return r=await dC.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:o}),r},checkIfPromisesExist:({customTooltipModel:e})=>dC.checkIfPromisesExist({customTooltipModel:e})};const mC=(e,t)=>{var n,o,r;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qMeasures,s=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qInterColumnSortOrder,l=t;return{qInfo:{qType:aC.CHART.CHART_PARENT_TYPE,qId:aC.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},fC=e=>{var t,n,o;const r=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(o=n.object)||void 0===o?void 0:o.refId;return{qInfo:{qType:aC.CHART.CHART_CHILD_TYPE},qExtendsId:r}};const hC={createContainer:({ctx:e,layout:t})=>{var n,o;if(!((null===(n=t.qHyperCube)||void 0===n||null===(o=n.qDimensionInfo)||void 0===o?void 0:o.length)<=0))return function(e,t){var n,o,r,i;const a=null!==(n=null===(o=t.tooltip)||void 0===o||null===(r=o.chart)||void 0===r||null===(i=r.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=aC.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:aC.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:o,customTooltipModel:r,rtl:i})=>{var a,s,l;const c=r,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await hC.hide({app:e,customTooltipModel:r});try{await async function({app:e,properties:t,customTooltipModel:n}){const o=n,r=aC.CHART.STATE,i=t.qStateName;o.miniChartToken.alternateState||(o.miniChartToken.alternateState=r,await e.addSessionAlternateState(r,i),o.miniChartToken.alternateState=r)}({app:e,properties:t,customTooltipModel:r});const a=await async function({app:e,properties:t,customTooltipModel:n}){var o;const r=n;null!==(o=r.miniChartToken.sessionObj)&&void 0!==o&&o.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=aC.CHART.STATE,a=mC(t,i),s=await e.createSessionObject(a),l=fC(t);if(s.id!==aC.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);r.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===s.id)return r.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:r});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,p,m,f;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.value]:[],a=void 0!==o?o:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===o&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var v;const t=null==e||null===(v=e.source)||void 0===v?void 0:v.field.split("/"),n=t[t.length-1],o=void 0!==e.value?[e.value]:[];o.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),o,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(aC.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await r.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(m=c.miniChartToken.model)||void 0===m?void 0:m.id,type:null===(f=c.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await hC.hide({app:e,customTooltipModel:r})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(hC.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(aC.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,o=aC.CHART.STATE;await e.removeSessionAlternateState(o),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const o=e;"function"==typeof(null===(t=o.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(o.miniChartToken.vis.destroy(),o.miniChartToken.vis=void 0)}};function gC(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function vC(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:o}=aC.CUSTOM,r={};return r[e]=!0,r[t]=!0,r[n]=!0,r[o]=!0,r}function yC(e){const t=vC();return e.filter((e=>t[e.id]))}const bC={getNodes(e,t){const n=function(e,t){let n=0,o=0;e.center?(n+=e.center.x,o+=e.center.y):(n+=e.clientX,o+=e.clientY);const r=t.element.getBoundingClientRect();return{cx:n-r.left,cy:o-r.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,o=[];const r={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||r[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],o.push(e)}}else{n||(n=[],Object.keys(r).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&r[t][e.key])))})));const t=n.filter((e=>{var t,n;const o=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return o&&o.value===c.value&&o.label===c.label}));t.length>0&&(o=o.concat(t[0]))}})),o},displayTooltip(e,t,{nodes:n,opts:o={},customTooltipModel:r,extractedNodes:i=[],hide:a}){if(r&&!a){const{layout:a,chart:s}=r,{attrExps:l}=bC.getAttrExprData(a);i.length||n.length?pC.handlePromises({customTooltipModel:r,nodes:bC.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:o}).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!=r&&null!==(s=r.miniChartToken)&&void 0!==s&&s.alternateState&&hC.hide({app:o.app,customTooltipModel:r}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>pC.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const o=t,r=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return o[r]||(o[r]=[]),o[r]},getAttrExprData(e){var t;let n=[],o="";const r=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(r.length>0){var i,a,s;const t=r.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],o=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:o}},quarantineCustomTooltipAttrs(e,t={}){var n,o;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(o=n.quarantine)||void 0===o?void 0:o[aC.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let o=n.qLayoutExclude;o||(n.qLayoutExclude={quarantine:{}},o=n.qLayoutExclude),o.quarantine||(o.quarantine={}),o.quarantine[aC.CUSTOM.QUARANTINE]=[],e.forEach((e=>{o.quarantine[aC.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=o}(yC(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const o=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[aC.CUSTOM.QUARANTINE])&&delete o.qLayoutExclude.quarantine[aC.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=gC(e);if(!n)return;const o=void 0!==t?t:n.length-1;if(!n[o])return;const r=this.getAttrExps(e,n[o]);if(0===yC(r).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...r,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[o].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[o].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let o=[];const r=gC(e)||[];[...r,t].forEach((e=>{const t=yC(e.qAttributeExpressions||[]);t.length>0&&(o=t)}));const i=vC(),a=r.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(o));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:Oe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Oe.detectTextDirection(e.src),o=[],r={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){o.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;o.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),r.style["text-align"]="center",r.style["white-space"]="nowrap"}else r.style["background-size"]="contain",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center",r.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",r,o),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function xC(e,t,n,o){var r,i,a;const s=(null===(r=t.qHyperCube)||void 0===r||null===(i=r[n])||void 0===i||null===(a=i[o])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[o]?e.qSubNodes[o].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const r=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,i=void 0===r?"NaN":function(e,t){let n;switch(e.id){case aC.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case aC.CUSTOM.TITLE:case aC.CUSTOM.DESCRIPTION:case aC.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,r);l.push({source:{key:"qHyperCube",field:`${n}/${o}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const SC={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,o="qDimensionInfo";return{field:`${o}/${n}`,value:t=>xC(t,e,o,n)}}};const wC={getCustomAttrExps(e,t,n){var o,r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(o=t.data)||void 0===o||null===(r=o.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,o){const r={[aC.CUSTOM.TITLE]:!0,[aC.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=bC.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===aC.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,r="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);o.customTooltipAttrExpsArr.push({label:t,value:r})}else if(r[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&o.customTooltipInfoAttrExpsArr.push({...e.id===aC.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),o}(n,a.map((t=>Re.getMeasure(e,t))),e,i)}};function CC({nodes:e,layout:t,dataset:n}){return function(e,t,n){const o=[];return e.forEach((e=>{o.push(wC.getCustomAttrExps(n,e,t))})),o}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function MC(e){const t=aC.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:o,qLabelExpression:r,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:o,qLabelExpression:r,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:o,qLabelExpression:r,cId:i}}function kC(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var EC={attrExpr:{migrateProperties(e){var t,n,o,r;const i=oe(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(o=n.qHyperCubeDef)||void 0===o?void 0:o.qMeasures)||[];let s=kC(i);return s=function(e,t){return t.concat(e.map((e=>MC(e))))}(a,s),function(e,t){var n;const o=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;o[o.length-1].qAttributeExpressions=e}(s,i),null===(r=i.tooltip)||void 0===r||delete r.data,i},getPatches(e){var t,n,o,r;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(o=n.qHyperCubeDef)||void 0===o?void 0:o.qMeasures)||[],a=(null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qDimensions.length)-1;return function(e,t,n){let o=e.length;const r=[];return t.forEach((e=>{const t=MC(e),i=JSON.stringify(t);r.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${o}`,qOp:"add",qValue:i}),o++})),r.push({qPath:"/tooltip/data",qOp:"remove"}),r}(kC(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var o,r,i,a,s;const l=(null===(o=t.qHyperCube)||void 0===o?void 0:o.qDimensionInfo)||[],c=(null===(r=t.tooltip)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.qHyperCube)||{},u=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((t=>{if(u){const o=this.migrateProperties(t);e.setProperties(o).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const o=this.getPatches(t);e.applyPatches(o,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}},TC=7005;const NC=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC},LC=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&he(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},DC=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&he(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&he(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},qC=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))},OC=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,o=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===o.length){const o=n[0];return o.qLibraryId?t.getDimension(o.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;DC(e,n)}return o})):t.getField(o.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(DC(e,t),o)))),(()=>o))}return LC(e),Promise.resolve()};function RC(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:o}}=e;t.length>1&&e.color?p(e,"color.persistent",!0):"byDimension"===o&&n.length>1?p(e,"color.mode","byMultiple"):"byExpression"===o&&0===n.length?p(e,"color.mode","primary"):0===t.length&&n.length>0&&(p(e,"color.byMeasureDef",void 0),p(e,"color.byDimDef",void 0),1===n.length&&p(e,"color.mode","primary"))}const AC=(e,t)=>{RC(t),Bt(e),bC.addCallbackCustomTooltip(t)},PC=e=>{RC(e)};function IC({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,o,r){let i;const a=null!=r&&r.layout?r.layout.qHyperCube.qDimensionInfo.filter((e=>NC(e))).length:t.qHyperCubeDef.qDimensions.length;return o.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?OC(t,n.app).then((()=>(AC(e,t),e))):(qC(t),AC(e,t),e)),move(e,t,n){n.layout.qHyperCube.qDimensionInfo.filter((e=>NC(e))).length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),LC(t),RC(t),bC.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;RC(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),bC.removeCallbackCustomTooltip(t,e)},replace(e,t,n,o){bC.replaceCallbackCustomTooltip(o,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?OC(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,PC(t),e))):(qC(t),PC(t),e),move(e,t){LC(t),RC(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;RC(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function zC(e){return{properties:{version:"1.27.3",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:!1,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...IC(e)}]}}}var BC={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 FC="REJECTED",HC=()=>{},jC=1e4,WC=2,VC=20,_C=200,UC=10;var $C={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)),o=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,r-e.qArea.qTop),s=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,i-e.qArea.qLeft),c=Math.min(i+o-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:r,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 o=n.qTop-UC<=t.qTop,r=n.qLeft+n.qWidth+UC>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+UC>=t.qTop+t.qHeight,a=n.qLeft-UC<=t.qLeft;return o&&t.qTop>0||r&&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 KC={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)),o=Math.max(t.qTop,e.qArea.qTop),r=Math.max(t.qLeft,e.qArea.qLeft),i=Math.max(0,o-e.qArea.qTop),a=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-o-(a-i),l={qArea:{qHeight:a-i,qWidth:e.qArea.qWidth,qTop:o,qLeft:r},qData:[{...e.qData[0],qUp:o,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 o=n.qTop-UC<=t.qTop,r=n.qTop+n.qHeight+UC>=t.qTop+t.qHeight;return o&&t.qTop>0||r&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const o={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&o.args.push(600),o}}};var GC={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 YC="pages";const XC="discretePan";function JC({chart:e,actions:t,componentKey:n,dockService:o,rtl:r,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:XC,pointers:1,threshold:10,enable(o,r){return this.started===XC||!r||!(!t.scroll.enabled()||!i.enabled())&&e.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=XC;const t="horizontal"===o.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===o.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&r?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,i.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function ZC({chart:e,componentKey:t,actions:n,scroller:o}){return function(r){if(!n.scroll.enabled()||!o.enabled())return;const[i]=e.componentsFromPoint({x:r.clientX,y:r.clientY}).filter((e=>e.key===t));if(!i)return;r.preventDefault();const a=Math.abs(r.deltaY)>Math.abs(r.deltaX)?r.deltaY:r.deltaX,s=100*Math.sign(-a);o.scroll(s)}}function QC({chart:e,actions:t,componentKey:n,dockService:o,rtl:r,scroller:i}){return{gestures:[JC({chart:e,actions:t,componentKey:n,dockService:o,rtl:r,scroller:i})],native:{type:"native",events:{wheel:ZC({chart:e,actions:t,componentKey:n,scroller:i})}}}}function eM({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(jC/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const o=Math.min(t,Math.max(_C,n));return{width:e,height:Math.max(VC,Math.min(n*WC,o))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:o,height:r}=t({width:e.qWidth,height:e.qHeight}),i=r?Math.ceil((r-e.qHeight)/2):0,a=o?Math.ceil((o-e.qWidth)/2):0;return{qHeight:r?Math.min(r,n.height):e.qHeight,qWidth:o?Math.min(o,n.width):e.qWidth,qTop:r?Math.max(0,Math.min(e.qTop-i,n.height-r)):e.qTop,qLeft:o?Math.max(0,Math.min(e.qLeft-a,n.width-o)):e.qLeft}}}function tM(e){let t,n;const o=r=>{t=r;const{method:i,args:a}=t.request;e[i](...a).then((e=>{if(t.canceled||n)return t.reject(FC),t=null,void(n&&(o(n),n=null));t.resolve(e[0]),t=null}))},r=e=>new Promise(((r,i)=>{const a={request:e,resolve:r,reject:i,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(FC),n=e})(a):o(a)}));return r.isProcessing=()=>!!t,r.hasQueued=()=>!!n,r.cancel=()=>{r.isProcessing()&&t.cancel(),r.hasQueued()&&(n.reject(FC),n=null)},r}const nM={command:{update:()=>{}}};var oM={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:o}){const{pixel:r}=t,i=e.getDataPages()[0],a=r/o;return[a,n.inView>=n.inTotal?a+1:a+i.qArea.qWidth/n.inView]}};var rM={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:o}){const r=void 0===o?4:o,i=Math.max(0,Math.floor(t)-r/2);return{qTop:i,qHeight:Math.min(e.meta.size.y-i,Math.max(0,Math.ceil(n+r))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:o}){const{pixel:r}=t,i=e.getDataPages()[0],a=o/n.inView,s=(r+i.qArea.qTop*a)/o;return[s,n.inView>=n.inTotal?s+1:s+i.qArea.qHeight/n.inView]}};function iM(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function aM(e,t){const n=[];for(let o=0;o<e.length;o++){const r=t(e[o]);-1===n.indexOf(r)&&n.push(r)}return n.length}function sM(e){return aM(e.qMatrix,(e=>e[0].qElemNumber))-1}var lM={inTotal:function({layoutService:e}){const t=iM(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:o}){const r=iM(e),i=void 0===o?r:o,a=t/(r+1),s=Math.max(0,Math.floor((t-a-i/2)/r));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+i)/r+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:o}){const r=iM(e),i=e.getDataPages()[0],a=o/n.inView,{pixel:s}=t,l=sM(i),c=i.qArea.qHeight*r+l,u=(s+(i.qArea.qTop*r+i.qArea.qTop)*a)/o;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const cM=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function uM(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return cM(e,n);const o=((e,t)=>{const n={successful:!0,count:0};let o=Math.abs(Math.floor(t));const r=[];for(let t=0;t<=o;t++){if(!e[t])return n.successful=!1,n;const i=e[t][0].qElemNumber;-1===r.indexOf(i)&&(r.push(i),o--)}return n.count=r.length-1,n})(t.qMatrix,n);return o.successful?o.count:cM(e,n)},area(t,n,o){if(0!==t.qArea.qTop)return cM(e,n);return aM(t.qMatrix.slice(0,o.qTop+1),(e=>e[0].qElemNumber))-1}}}var dM={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:o}){const r=uM(t).itemOffset(e(),n),i=Math.max(0,Math.floor(n-r));return{qTop:i,qHeight:Math.min(t.meta.size.y-i,Math.max(0,Math.ceil(o+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:o,viewSize:r,upperBound:i}){const a=t.getDataPages()[0],s=r/o.inView,{item:l,pixel:c}=n,u=uM(t).area(e(),l,a.qArea),d=sM(a),p=a.qArea.qHeight+d,m=c===i?(o.inView-p)*s/r:(c+(a.qArea.qTop+u)*s)/r;return[m,o.inView>=o.inTotal?m+1:m+p/o.inView]}};function pM({chart:e,rect:t,dockService:n,itemWidths:o,axisKey:r,renderer:i,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:p,LABELLESS:m}=o[n.meta.chart.mode],f="horizontal"===n.meta.major.orientation,{axisDisplayMode:h="auto",maxVisibleItems:g=10,label:v}=s,y=f?t.width:t.height,b=y/l>=p;switch(h){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?y/m:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:o={},isGrouped:r,itemSize:i,label:a}){if(r||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=o;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:p}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return p>i;const m=(90-d)*(Math.PI/180);return p>Math.cos(m)*i}({chart:e,isHorizontal:f,axisKey:r,renderer:i,isGrouped:a,itemSize:p,label:v})?y/d:l:y/d}}var mM="AVERAGE",fM="LINEAR",hM="POLYNOMIAL2",gM="POLYNOMIAL3",vM="POLYNOMIAL4",yM="EXPONENTIAL",bM="LOG",xM="POWER";function SM({dimValue:e,value:t,qTrendLine:n}){const{qType:o,qCoeff:r}=n,i={x:e,y:r[2]*t**2+r[1]*t+r[0]};switch(o){default:case hM:return i;case gM:return i.y+=r[3]*t**3,i;case vM:return i.y+=r[4]*t**4+r[3]*t**3,i}}var wM={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:SM,polynomial3:SM,polynomial4:SM,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)}}};function CM(e,t){const n=wM[t.qType.toLowerCase()],o=Math.max(1,e/500);let r=1/0,i=-1/0;for(let a=0;a<e;a+=o){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});r=Math.min(e,r),i=Math.max(e,i)}return{min:r,max:i}}function MM(e){return wM[e.qType.toLowerCase()]}var kM={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"},EM={color:"#f93f17",index:9};const{isDark:TM}=zt,NM={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN};var LM={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const DM=({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,qM=(e,{layoutService:t,trendLineModel:n,dockService:o})=>{if(!n.query.hasTrendLines())return[];return[(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:o,dockService:r})=>{const i=DM(o);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:LM,settings:{connect:!0,orientation:r.meta.major.orientation,coordinates:{major:{scale:e,fn:i},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)}}}}})(e,{trendLineModel:n,layoutService:t,dockService:o}),(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:o,dockService:r})=>{const i=DM(o),a="horizontal"===r.meta.major.orientation,s={scale:e,fn:i},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:LM,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:o})]};function OM(e,t){const{getLabel:n,getType:o,getLineDash:r,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":r(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:o(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)}]}}}function RM(e,{h:t,style:n}){return e.map((e=>{const o={style:{direction:"string"==typeof e.content?Oe.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(o.colspan=e.colspan);const r=function(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:Oe.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",o,r)}))}function AM(e,t){return({h:n,data:o,style:r})=>{const i=o[0].title,a=o.filter((e=>e.title===i)),s=[function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:Oe.detectTextDirection(t)},t);return e("tr",{},n)}(n,i)];if(a.slice(0,2).forEach((e=>{s.push(n("tr",{},RM(e.row,{h:n,style:r})))})),o.length>2){const r=o.length-2;s.push(...function(e,t,n,o){const r=t?t.get("Object.ChartTooltip.NMore",o):`+${o} more`,i=Oe.detectTextDirection(r);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},r))]}(n,e,t,r))}return s}}function PM(e,{trendLineModel:t,translator:n},o={}){if(!t.query.hasTrendLines())return!1;const{rtl:r}=o,i=Ne({key:e.tooltip,rtl:r});return oe(!0,i,{settings:{extract:OM(e,t),content:AM(n,r),placement:"pointer",direction:o.rtl?"rtl":"ltr"}})}function IM(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 zM(e,{chart:t,viewState:n,trendLineModel:o,layoutService:r,rtl:i}){const{isContinuous:a}=r.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=IM(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:r}=o.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(o,a)=>{const l=IM(o,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const o=function(e,t,n,o){let r=(e.x-t.rect.computed.x)/t.rect.computed.width;r=o?1-r:r;const{min:i,max:a}=n.get("zoom");return i+(a-i)*r}(l,a,n,i),s=t.scale(e.majorInnerScale),u=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(o);c.forEach((e=>{e.data.dimValue.value=o,e.data.dimValue.label=u,e.data.minor.value=r(e.data.layer.value,o).y}))}return c}}return n=>{const o=t.component(e.tooltip);if(o&&(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,o);return e.length?(o.emit("show",n,{nodes:e}),!0):(o.emit("hide"),!1)}return!1}}const BM=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},FM=e=>{BM(e),e.qMultiDimMode="Sum",e.qXColIx=0};function HM(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:o=!1}=e;return{show:(e,t,{layout:n})=>!xe.dimensionless(n)&&!xe.groupedByDimension(n)&&(o||!xe.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:kM.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(kM.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:kM.ADD_BUTTON,add:FM,globalChange:e=>{const t=d(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),o=(e=>!d(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=o})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:kM.TYPE,options:[{value:mM,translation:kM.TYPES.AVERAGE},{value:fM,translation:kM.TYPES.LINEAR},{value:hM,translation:kM.TYPES.POLYNOMIAL2},{value:gM,translation:kM.TYPES.POLYNOMIAL3},{value:vM,translation:kM.TYPES.POLYNOMIAL4},{value:yM,translation:kM.TYPES.EXPONENTIAL},{value:bM,translation:kM.TYPES.LOG},{value:xM,translation:kM.TYPES.POWER}],defaultValue:mM},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:EM,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:kM.STYLE.DASHED,type:"boolean",defaultValue:!0,change:BM}}}}var jM={};function WM(){WM.init.call(this)}jM.isObject=function(e){return"object"==typeof e&&null!==e},jM.isNumber=function(e){return"number"==typeof e},jM.isUndefined=function(e){return void 0===e},jM.isFunction=function(e){return"function"==typeof e};var VM=WM;WM.EventEmitter=WM,WM.prototype._events=void 0,WM.prototype._maxListeners=void 0,WM.defaultMaxListeners=10,WM.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},WM.prototype.setMaxListeners=function(e){if(!jM.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},WM.prototype.emit=function(e){var t,n,o,r,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],jM.isUndefined(n))return!1;if(jM.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(o=arguments.length,r=new Array(o-1),i=1;i<o;i++)r[i-1]=arguments[i];n.apply(this,r)}else if(jM.isObject(n)){for(o=arguments.length,r=new Array(o-1),i=1;i<o;i++)r[i-1]=arguments[i];for(o=(a=n.slice()).length,i=0;i<o;i++)a[i].apply(this,r)}return!0},WM.prototype.addListener=function(e,t){var n;if(!jM.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,jM.isFunction(t.listener)?t.listener:t),this._events[e]?jM.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,jM.isObject(this._events[e])&&!this._events[e].warned)&&((n=jM.isUndefined(this._maxListeners)?WM.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,jM.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),jM.isFunction(console.trace)&&console.trace()));return this},WM.prototype.on=WM.prototype.addListener,WM.prototype.once=function(e,t){if(!jM.isFunction(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},WM.prototype.removeListener=function(e,t){var n,o,r,i;if(!jM.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,o=-1,n===t||jM.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(jM.isObject(n)){for(i=r;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){o=i;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},WM.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],jM.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},WM.prototype.listeners=function(e){return this._events&&this._events[e]?jM.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},WM.listenerCount=function(e,t){return e._events&&e._events[t]?jM.isFunction(e._events[t])?1:e._events[t].length:0};const _M={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"}}]};var UM={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}},$M={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 KM({layout:e}){const t=me.canBeContinuous(e),n=xe.continuous(e),o=xe.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:me.isTime(n,e),isDimensionless:o,isSimple:xe.simple(e),isGrouped:xe.grouped(e),isGroupedByMeasure:xe.groupedByMeasure(e),isGroupedByDimension:xe.groupedByDimension(e),isStacked:xe.stacked(e),isStackedByDimension:xe.stackedByDimension(e),isStackedByMeasure:xe.stackedByMeasure(e),isSnapshot:xe.snapshot(e)}}const GM={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===$M.COMPONENT.BAR){n=e;const o=d(e,"data.selectionDimension",!1);o&&(t.push(o.label),o.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function YM({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:o,selectionInfo:r}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==r.event&&o({componentName:"continuousRangeBrush",brushName:!1})}function XM({chart:e,actions:t,selections:n}){const o=e.scale($M.SCALE.MAIN.MAJOR);return g({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:o,selectionActions:{clear:YM},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")}}})}function JM({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 ZM({app:e,model:t,translator:n,picasso:o,localeInfo:r,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:f}=c.model().mode,h=u||f||d,g=!u&&(f||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return p.main=v({app:e,model:t,translator:n,picasso:o,layoutService:s,config:{localeInfo:r,auto:JM,key:$M.SCALE.MAIN.COLOR},createConfig:()=>({hc:h?g||s.getHyperCube():c.model().cube,source:h?y:"miniCube",theme:i})}),m.push(p.main.initialize()),u&&(p.mini=v({app:e,model:t,translator:n,picasso:o,layoutService:s,config:{localeInfo:r,auto:JM,key:$M.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 QM(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function ek(e){return e.some(QM)}function tk(e,t){let n=NaN,o=NaN;return e.forEach((e=>{ek(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),o=Number.isNaN(o)?e.qNum:Math.max(e.qNum,o))}))})),{min:n,max:o}}function nk(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const o=e.getLayoutValue("measureAxis.minMax");"min"!==o&&"minMax"!==o||(t=+e.getLayoutValue("measureAxis.min")),"max"!==o&&"minMax"!==o||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function ok(e,t){let n=NaN,o=NaN;return e.forEach((e=>{if(!ek(e)){let r=0,i=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?i+=e.qNum:r+=e.qNum)})),n=Number.isNaN(n)?r:Math.min(r,n),o=Number.isNaN(o)?i:Math.max(i,o)}})),{min:n,max:o}}function rk(e,t){const n={};e.forEach((e=>{if(!ek(e)){const o=e[0].qElemNumber;n[o]=n[o]?n[o]:{min:0,max:0,cId:o},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[o].max+=e.qNum:n[o].min+=e.qNum)}))}}));let o=NaN,r=NaN;return Object.keys(n).forEach((e=>{o=Number.isNaN(o)?n[e].min:Math.min(n[e].min,o),r=Number.isNaN(r)?n[e].max:Math.max(n[e].max,r)})),{min:o,max:r}}function ik(e){return"number"==typeof e&&!Number.isNaN(e)}function ak(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>ik(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>ik(e.qMax))).map((e=>e.qMax)))}}function sk(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function lk(e){return!Number.isNaN(+e.qNum)}function ck(e){return e.qNum}function uk(e){return!Number.isNaN(+e.qNum)}function dk(e){return e.qNum}function pk(e,t){return e.push(...t),e}const{getValueWithOffset:mk,isNumber:fk}=fa;function hk(e,t){return Math.abs(e/t)<5||0===t}function gk({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:o=ok,stackedByDimensionExtractor:r=rk,straightExtractor:i=tk,measureInfoExtractor:a=ak,explicitExtractor:s=nk}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:o,count:r}){let i,a;if(Array.isArray(n)?({min:i,max:a}=this.extractFromStacked(n)):({min:i,max:a}=this.extractFromStraight(e,r)),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(o),c=this.extractExplicit(),u=[0,i,a].filter((e=>fk(e)));let d=Math.min(...u),p=Math.max(...u);d=hk(s,d)?Math.min(d,s):d,p=hk(l,p)?Math.max(p,l):p;const m=[c.explicitMin,c.explicitMax,d,p].filter((e=>fk(e)));return i=Number.isNaN(c.explicitMin)?Math.min(...m):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...m):c.explicitMax,i===a&&(Number.isNaN(c.explicitMin)?i=mk(i,-.2):Number.isNaN(c.explicitMax)&&(a=mk(a,.2))),{min:i,max:a,implicitMin:d,implicitMax:p,otherMin:s,otherMax:l,hasOtherMin:s<i,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:o,isExplicitMax:r}=s(e);return{hasExplicitMinMax:o||r,hasExplicitMin:o,hasExplicitMax:r,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 s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?o(s,n):l.isStackedByDimension?r(s,n):e.getHyperCubeValue("qHasOtherValues")?i(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=sk(d(e,"0.qData.0.qSubNodes",[]),QM,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=d(e,"0.qMatrix",[]).filter(ek).reduce(pk,[]).filter(uk).map(dk);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=sk(d(e,"0.qMatrix",[]),ek,[]).filter(lk).map(ck);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function vk(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:o,getHyperCubeValue:r}=t,i=e=>!e.length&&o.mode.K,a=e=>{const t=r("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=r("qMeasureInfo").length,s=r("qDimensionInfo").length,l=r("qHasOtherValues");if(!o.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(o.isContinuous){const e=o.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const c=o.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(i(e))return a(l);let t=[];return l&&(t=o.mode.K?r("qStackedDataPages",[]):r("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}}(e),n=gk(e);return t.resolve().then((e=>n.extract(e)))}const yk="lasso",bk=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:o},r)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:o,options:{event:yk,enable(e,n){if(this.started===yk||!n)return!0;if(!r.actions.select.enabled()||!r.actions.lasso.enabled()||!r.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!==yk&&(r.actions.select.emit("start",yk),this.chart.component(e).emit("lassoStart",t),this.started=yk)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof r.updateOnMove&&r.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),r.actions.select.emit("end",yk),"function"==typeof r.updateOnEnd&&r.updateOnEnd()}}});const xk=({targets:e,requireFailure:t,recognizeWith:n,components:o,eventName:r="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:r,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:{[r](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let o,r;return e.center?(({x:o}=e.center),({y:r}=e.center)):(o=e.clientX,r=e.clientY),{x:o-n.left,y:r-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"}),p=this.chart.component("tooltip"),m="mouse"!==t.pointerType&&p&&p.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",r,e)),d.length&&o){this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof o?o(t,d):o;this.chart.brushFromShapes(d,{components:e}),i.actions.select.emit("end",r),(({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(p&&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,p,{nodes:n,opts:i,customTooltipModel:e})}else p.emit("show",t,{nodes:d})}else m&&p.emit("hide")}}}};const Sk=({key:e,requireFailure:t,recognizeWith:n,eventName:o="tap"},r)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${o}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!r.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:{[`${o}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const wk=({eventName:e,key:t,fillTargets:n=[],requireFailure:o,recognizeWith:r},i,a)=>({key:"event:"+t,type:"Pan",requireFailure:o,recognizeWith:r,options:{event:e,enable(o,r){if(this.started===e||!r)return!0;if(!i.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((e=>-1!==n.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(r,t)?(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 Ck(e,t){const n=function(e){const{key:t,targets:n,fillTargets:o,targetSelector:r,targetFillSelector:i,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:p}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:p?{bubbleEnd(){p()}}:{},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:o,selector:r,fillSelector:i,fill:"rgba(82,204,82,0.2)"}}}}(e),o=wk(e,t,"range");return{interactions:[e.onEdited?Sk(e,t):null,o].filter(Boolean),components:[n]}}const Mk={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"}}},kk="inner-time-axis",Ek="outer-time-axis";const Tk={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:o}=n[t];return o},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:o=0,qOption:r=0,qSelected:i=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?o+r+i:n}},Nk={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const o=t?0:e.qDimensionInfo.length-1;n=Tk.getMaxGlyphCount(e,o)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?d(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=Nk.getAxisData(e,t),o=!e.qDimensionInfo.length,r=o||t?void 0:e.qDimensionInfo.length-1,i=Nk.getMajorAxisMaxGlyphCount(e,t),a=o?"qFallbackTitle":"qText";return ke.getAdjustedMaxGlyphCount(i,n,r,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=Nk.getAxisData(e),n=Tk.getMaxGlyphCount(e,0);return ke.getAdjustedMaxGlyphCount(n,t,0)}};var Lk=3,Dk=13;function qk(e,t,n,o){const{meta:r}=t.layoutService,i=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);r.isContinuous?i.push(...function(e,t,n,o){const{meta:r}=t.layoutService,{axis:i,grid:a}=t.themeService.getStyles(),{auto:s,spacing:l}=t.layoutService.getLayoutValue("gridLine",{}),c=[],u="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,d=Mk[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode,p={type:"grid-line",x:{},layout:{minimumLayoutMode:Mk.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.lines.trackBy,compensateForLayoutChanges:Qa.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(r.isTime){if(u){const e=n?"end":"start",o=n?1:0,r="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:i.label.name.color,fontSize:i.label.name.fontSize,fontFamily:i.label.name.fontFamily},majorGuideLine:{stroke:i.line.major.color},minorGuideLine:{stroke:i.line.minor.color}},u={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:d},preferredSize:()=>({size:2*parseFloat(i.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:r,justify:o},guideLine:{major:{justify:o},minor:{align:r}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isTime:!0})}};c.push(oe(!0,{},u,{key:kk,scale:$M.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!s&&0===l}},style:oe(!0,{},a,{line:{stroke:i.line.major.color},majorGuideLine:{stroke:i.line.minor.color},minorGuideLine:{stroke:i.line.major.color}})})),c.push(oe(!0,{},u,{key:Ek,scale:$M.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),c.push({type:"axis-overlay",key:"outer-axis-overlay",scale:$M.SCALE.MAIN.MAJOR,layout:{dock:"@outer-time-axis",minimumLayoutMode:d}}),c.push({type:"axis-overlay",key:"inner-axis-overlay",scale:$M.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@inner-time-axis",minimumLayoutMode:d}}),c.push(m)}return c.push(oe(!0,{},p,{key:"inner-time-grid",x:{scale:$M.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),c.push(oe(!0,{},p,{key:"outer-time-grid",x:{scale:$M.SCALE.MAIN.MAJOR}})),c}if(r.isContinuous){const e="continuous-axis";u&&(c.push({type:"axis",key:e,scale:$M.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:d},settings:{labels:{align:0,offset:4,fill:i.label.name.color,fontSize:i.label.name.fontSize,fontFamily:i.label.name.fontFamily},ticks:{show:!0,stroke:i.line.major.color},line:{show:!o},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isContinuous:!0})}}),c.push({type:"axis-overlay",key:"inner-axis-overlay",scale:$M.SCALE.MAIN.MAJOR,layout:{dock:"@"+e,minimumLayoutMode:d}}),c.push(m)),c.push(oe(!0,{},p,{key:"continuous-grid",x:{scale:$M.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return c}(e,t,n,o)):i.push(...function(e,t,n,o){if("none"===e.dimensionAxis.show)return[];const{meta:r}=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,p=t.styleService.axis.label.getStyle(),m={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:Mk[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...p},line:{show:!o,stroke:i.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:Qa.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(oe(!0,{},m,{key:"group-axis",scale:$M.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":m.settings.labels.mode,maxGlyphCount:Nk.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&m.settings.line.show}}}));const f=Nk.getBarAxisMaxGlyphCount(e.qHyperCube,r.isStackedByDimension);return s&&a.push(oe(!0,{},m,{key:$M.COMPONENT.BAR_AXIS,scale:$M.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:f,maxLengthPx:d,tiltThreshold:f>Lk&&f<Dk?1:void 0},line:{show:!(c&&l)&&m.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,o));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&i.push({type:"axis",key:"y-axis",formatter:$M.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:Mk.measureAxis.minimumLayoutMode},scale:$M.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:Qa.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Qa.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),i}var Ok={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function Rk({layoutService:e,discrete:t,componentKey:n}){var o;const{isContinuous:r,isGrouped:i}=e.meta;if(r)return 1;const a=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(null!=a&&null!==(o=a.style)&&void 0!==o&&o.width){const{style:e}=a;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=Ok.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),o=e.width+n;return o>1?e.width-(o-1):e.width}:e.width}return i?.9:.7}const Ak={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Pk(e,t,n={}){return({data:o})=>{const r=e.chart.component(t).rect;if(!o.items.length||!r)return 2;const{min:i,max:a}=e.viewState.get("zoom");if(n[[i,a]])return n[[i,a]];const s=Ak[ce.getLayoutMode(r.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 Ik(e,t){const{hasExplicitMax:n,explicitMax:o}=t;return!!n&&e>o&&o<=0}function zk(e,t){const{hasExplicitMin:n,explicitMin:o}=t;return!!n&&e<o&&o>=0}function Bk(e,t){const{hasExplicitMax:n,explicitMax:o}=t;return!!n&&e>o&&o>0}function Fk(e,t){const{hasExplicitMin:n,explicitMin:o}=t;return!!n&&e<o&&o<0}const Hk="max",jk="min",Wk={min:"Min",max:"Max"};function Vk(e,t,n){return void 0===n?Ik(e,t)||zk(e,t):n===Hk?Ik(e,t):zk(e,t)}function _k({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e["hasExplicit"+Wk[t]]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===Hk?e.implicitMax:e.implicitMin;return!Vk(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function Uk(e,{barComponent:t,type:n,isStacked:o}){const{viewCache:r,dockService:i,themeService:a}=e,s=r.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===Hk?s.implicitMax:s.implicitMin;if(!Vk(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===Hk?i.meta.minor.end:i.meta.minor.start;let d="end";o&&(d=n===Hk?"sumOfPositives":"sumOfNegatives");const p=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:Ce.getDockValue(u),oob:oe({},t.settings.box,{fill:p.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)&&((!o||0!==e.datum[d].value)&&Vk(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:Qa.barOobs.compensateForLayoutChanges(c)}}}function $k(e){return Math.min(Math.max(0,e),1)}const Kk=(e,{chart:t,type:n,componentKey:o,collectionKey:r})=>{const{layoutService:i,dockService:a,viewCache:s}=e,{isStacked:l}=i.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!_k({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);return{type:"box",key:`${$M.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:r},settings:{orientation:a.meta.minor.orientation,major:{scale:$M.SCALE.MAIN.MAJOR,fn:d},minor:{scale:$M.SCALE.MAIN.MINOR,start(e){var n,o;return $k(t.scale($M.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(o=n.start)||void 0===o?void 0:o.value)||0))},end(e){const o=t.scale($M.SCALE.MAIN.MINOR);let r="end";l&&(r="max"===n?"sumOfPositives":"sumOfNegatives");const i=e.datum[r]?e.datum[r].value:o[n]();return $k(o(i))}},box:{width:Rk({layoutService:e.layoutService,discrete:e.discrete,componentKey:o}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const o=t.scale($M.SCALE.MAIN.MINOR);let r="end";l&&(r="max"===n?"sumOfPositives":"sumOfNegatives");const i=e.datum[r]?e.datum[r].value:o.max();return"max"===n?i>o.max():i<o.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Gk(e){return function(t){return zt.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}function Yk(e){const t="horizontal"===e.dockService.meta.major.orientation;return{placements:e.simplifiedPlacements.map((n=>function(e,t,n){const o=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:Gk(t),overflow:e.overflow,background:e.background,padding:o}}(n,e.style,t))),label:e.label}}function Xk(e,t){if(t){if(function(e,t){return Ik(e,t)}(e,t))return-1;if(function(e,t){return zk(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)}function Jk(e,t,n,o){const r=Xk(e,o);let i="up";return"vertical"===t&&r<0?i="down":"horizontal"===t&&(i=r>=0&&!n||r<0&&n?"right":"left"),i}function Zk(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:o,isContinuous:r}=t.layoutService.meta;return!o||!r&&!!n.showSegmentLabels}function Qk(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:o,isContinuous:r}=t.layoutService.meta;return!!o&&(!!r||!1!==n.showTotalLabels)}function eE(e,t,n,o){const r=[];return void 0!==e&&(r[e]={position:"outside",onBackground:!0,justify:0,overflow:o}),void 0!==t&&(r[t]={position:"inside",onBackground:!1,justify:n}),r}function tE({layout:e,component:t,minorScale:n},o,r){if(!Zk(e,o))return!1;const{viewModel:i,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=o,{meta:d}=l,p=s.get("minorMinMax"),m=u.getStyles();let f;!d.isStacked&&(f=d.isStacked?1:0);const h=0===f?1:0,g=d.isStacked?.5:1,v=i.fields.minor[0],y=void 0===v?void 0:a.field(v).formatter();let b,x=-1;b=d.isStacked?d.isStackedByMeasure||!y?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>x?y(e.data.segment.value):""}:function(e){return e.data.end.label};const S={label:b,simplifiedPlacements:eE(f,h,g,d.isContinuous),style:m.label.value},w=[Yk(oe(o,S))],C={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Jk(e.data.end.value,c.meta.minor.orientation,r,p),labels:w,fontSize:m.label.value.fontSize,fontFamily:m.label.value.fontFamily,linkData:Qa.labels.linkData}}}]},animations:{enabled:o.viewModel.animations.enabled,trackBy:Qa.labels.trackBy,compensateForLayoutChanges:Qa.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&y&&(C.beforeRender=()=>{x=function(e,t,n){const o="vertical"===t.dockService.meta.minor.orientation?"height":"width",r=t.chart.component(e),i=r&&r.rect?r.rect[o]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/i}(t,o,n)}),C}const nE={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 o;return t.isStackedByDimension?o=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(o=n.group?n.group.label:void 0),void 0!==o?`${n.label}, ${o}`:n.label},getMeasure(e,t,n,o,r){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const i=t.data,a=n.isStacked?o.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&&r?r(i.segment.value):i.segment.label}:i.end;var l;return Re.getMeasure(e,s)},getMeasures(e,t,n,o,r){const i=e.resources.dataset;return t.map((e=>nE.getMeasure(i,e,n,o,r))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const o=e.resources.dataset;return CC({nodes:t,layout:n.layoutService.getLayout(),dataset:o})},extractBarTooltipData(e,t,n,o,r){const i={title:nE.getTitle(t,n),color:Re.getColor(e,t,o),measures:nE.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,o,r)};if(nE.useCustomTooltip(o)){var a,s,l,c;const n=nE.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],o);i.customMeasures=n.customTooltipAttrExpsArr,i.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===aC.CUSTOM.TITLE)),i.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===aC.CUSTOM.DESCRIPTION));let r=[];(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])&&(r=e.data.customTooltipImages)})),r.length>0&&(i.customImages=r);const f=o.layoutService.getLayout();var u,d,p,m;if(null!==(a=f.tooltip)&&void 0!==a&&null!==(s=a.chart)&&void 0!==s&&null!==(l=s.object)&&void 0!==l&&l.refId&&o.app&&o.customTooltipModel.embed&&"function"==typeof(null===(c=o.customTooltipModel.model)||void 0===c?void 0:c.getEffectiveProperties))if(null!==(u=(d=o.app).isInModalSelection)&&void 0!==u&&u.call(d)){if((null==f||null===(p=f.qHyperCube)||void 0===p||null===(m=p.qDimensionInfo)||void 0===m?void 0:m.length)>0){hC.destroyVisualization({customTooltipModel:o.customTooltipModel});const e=o.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");i.customLimitation=e}}else{const t=hC.createContainer({ctx:e,layout:f});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)=>({title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:""+nE.getTotalStackTitle(e,t),value:n?n(e):e})))}),extractTooltipData(e,t){const n=t.chart.formatter($M.FORMATTER.MINOR),{meta:o}=t.layoutService,r=e.node.childrenNodes?e.node.childrenNodes:[e.node],i=Math.max(0,r.length-6);r.length=Math.min(r.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>nE.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:r.map((r=>nE.extractBarTooltipData(e,r,o,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:i}},extractBarNodeData(e,t,n,o,r,i,a){let s=!r&&Re.getTitleRow(t,o);const l=Re.hideColorRow(t,n),c=!i&&!l&&Re.getColorRow(e,t,o),u=t.measures.map((r=>!a&&Re.getMeasureRow(r,e,t,o,l&&r.field===n.coloring.field))).filter((e=>!nE.isSameMeasureAndColorRow(e,c,o)));if(nE.useCustomTooltip(n)){const n=r?[]:t.customMeasures.map((n=>Re.getMeasureRow(n,e,t,o,!1))),i=!(!t.customTitle[0]||r)&&Re.getTitleRow(t.customTitle[0],o),a=!(!t.customDescription[0]||r)&&Re.getDescriptionRow(t.customDescription[0],o);s=!nE.shouldIgnoreTitleRowForCtt(i,a,u,n)&&s;const l=[i,a,s,c,...u,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(bC.getFooterRow(t.customLimitation,o)),t.customImages){const n=t.customImages.map((t=>bC.getImageRow(t,e)));l.push(...n)}return l.filter(Boolean)}return[s,c,...u].filter(Boolean)},extractStackTotalBarNodeData:(e,t,n)=>[!!t.measures.length&&Re.getTitleRow(t,n),...t.measures.map((o=>Re.getMeasureRow(o,e,t,n,!1)))].filter(Boolean),useCustomTooltip:e=>d(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,o)=>!1===n[0]&&0===o.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)=>nE.useCustomTooltip(t)&&d(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,o){const{meta:r}=t.layoutService,i=t.layoutService.getLayout(),a=o.length;let s,l,c=[];const u=nE.shouldIgnoreDefaultRows(i,t);for(s=0;s<a;s++){l=o[s];const i=nE.shouldIgnoreTitleRow(r,s),d=u||nE.shouldIgnoreColorRow(r,s),p=u||nE.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(nE.extractBarNodeData(e,l,t,n,i,d,p)),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 o=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{o=o.concat(nE.extractStackTotalBarNodeData(e,n,t))})),o},extractData(e,t,n){const{barTooltipData:o,numInvisibleNodesPhase1:r,stackTotalBarTooltipData:i}=nE.extractTooltipData(e,t),a=nE.extractStackTotalBarsData(e,n,i);a.length&&a.push(Re.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=nE.extractBarsData(e,t,n,o),c=a.concat(s),u=r+l;return u&&c.push(Re.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 ss.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:o,data:r,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,p;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=r.value,d=n===o&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,p=n===o&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=r;u=r[i]?r[i].value:void 0,d=c(n===o&&void 0!==u?[u,e]:e),p=n===o&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const m=(d+p/2)*a[l],f={width:0,height:0};return"horizontal"===s?(f.x=m,f.y=a.height):(f.y=m,f.x=0),f},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:o,barAxisKey:r,majorScale:i,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let c;return c=l.length?nE.calculateBoundsFromBars(l):nE.calculateBoundsFromScale({opts:e,barKey:o,scale:t[0].key===r?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,o)=>e.filter((e=>t.some((t=>n(e,t,o))))),findBarsFromGroupLabelsInGroupedByDim(e,t,n){const o=nE.isBarMatchingLabelOnProp;return nE.findBarsMatchingLabels(e,t,o,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=nE.isBarMatchingLabel;return nE.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,o){const r=t.filter((e=>e.key===n)),i=t.filter((e=>e.key!==n)),a=nE.findBarsFromBarLabelsInGroupedByDim(e,r,o),s=nE.findBarsFromGroupLabelsInGroupedByDim(e,i,o);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=nE.isBarMatchingLabel;return nE.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=nE.isBarMatchingLabel;return nE.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const o=nE.isBarMatchingLabelOnProp;return nE.findBarsMatchingLabels(e,t,o,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>nE.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:o,groupProp:r,stackProp:i}){const{meta:a}=t.layoutService,s=nE.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?nE.findBarsFromLabelsInStackedByDim(s,e,i):a.isStackedByMeasure?nE.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?nE.findBarsFromLabelsInGroupedByDim(s,e,o,r):nE.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:o}=t.layoutService;if(o.isStacked){const r=nE.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return o.isStackedByDimension?nE.findStackTotalBarsFromLabelsInStackedByDim(r,e):nE.findStackTotalBarsFromLabelsInStackedByMeasure(r,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:o,barAxisKey:r,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:p}=t.layoutService;if(e.length){let m=nE.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(m=m.filter(d)),nE.isSingleBarMode(p,m))return[m[0]];if(m.length){let p=nE.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,i,a],stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:i,barOobMinKey:a,groupProp:s,stackProp:l});d&&(p=p.filter(d));const f=nE.calculateTotalBounds({opts:t,labels:e,bars:p,barKey:n,barAxisKey:r,groupProp:s,majorScale:c,majorInnerScale:u}),h=nE.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:o});return[{key:n,bounds:f,childrenNodes:m,data:m.map((e=>e.data)),stackTotalBarNodes:h}]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,groupAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let p=nE.filterNodesOnKeys(e,[r,i]),m=p&&p.length?[p[0]]:[];const f=nE.filterNodesOnLabels({labels:m,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(f&&f.length)return f;const{meta:h}=t.layoutService;if(h.isStackedByMeasure){p=nE.filterNodesOnKeys(e,[a,s]),m=p&&p.length?[p[0]]:[];const i=e=>nE.filterNodesForOob(e,n,a),f=nE.filterNodesOnLabels({labels:p,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:i});if(f&&f.length)return f[0].stackTotalBarNodes=void 0,f}if(h.isStackedByDimension){p=nE.filterNodesOnKeys(e,[a,s]),m=p&&p.length?[p[0]]:[];const i=e=>nE.filterNodesForOob(e,n,a),f=nE.filterNodesOnLabels({labels:p,opts:t,barKey:n,stackTotalBarKey:o,barAxisKey:r,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:i});if(f&&f.length)return f[0].stackTotalBarNodes=void 0,f}const g=nE.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function oE(e,t={},n){let o=[];const r=Ne({key:$M.COMPONENT.BASE_TOOLTIP,rtl:n});return oe(!0,r,{scale:$M.SCALE.MAIN.COLOR,settings:{filter:e=>nE.filterNodes({nodes:e,opts:t,barKey:$M.COMPONENT.BAR,stackTotalBarKey:$M.COMPONENT.STACK_TOTAL_BAR,barAxisKey:$M.COMPONENT.BAR_AXIS,groupAxisKey:$M.COMPONENT.GROUP_AXIS,barOobMaxKey:$M.COMPONENT.BAR_OOB_MAX,barOobMinKey:$M.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(o=e.node.childrenNodes?e.node.childrenNodes:[e.node],nE.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e;const{app:r,properties:i,customTooltipModel:a}=t;r&&(null===(e=r.isInModalSelection)||void 0===e||!e.call(r))&&a.useCustomTooltip&&a.embed&&hC.show({app:r,properties:i,selectedNodes:o,customTooltipModel:a,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const rE={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 iE(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const o=Ne({key:$M.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return oe(!0,o,{scale:$M.SCALE.MAIN.COLOR,settings:{filter:e=>rE.filterNodes(e,$M.COMPONENT.LEGEND_COLOR_CAT),extract:e=>rE.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function aE(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function sE(e,{fill:t}){return{[$M.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[$M.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const lE=1,cE=3;function uE(e){return e.getLayoutValue("gridLine.auto")}function dE(e){return!uE(e)&&e.getLayoutValue("gridLine.spacing")===lE}function pE(e){return!uE(e)&&e.getLayoutValue("gridLine.spacing")===cE}const mE=e=>({enabled:e.animations.enabled,trackBy:Qa.lines.trackBy,compensateForLayoutChanges:Qa.lines.compensateForLayoutChanges}),fE=(e,{themeService:t,layoutService:n,dockService:o,viewModel:r})=>{if(!uE(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:Mk.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!dE(n)||((e,t)=>t%2==0),stroke:i.line.major.color},minorTicks:{show:pE(n),stroke:i.line.minor.color},animations:mE(r)};return a["horizontal"===o.meta.major.orientation?"y":"x"]=$M.SCALE.MAIN.MINOR,a};function hE(e,t){const n=[fE(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:o})=>{const r=n.get("minorMinMax");if(r.min>0||r.max<0)return!1;const i=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:$M.SCALE.MAIN.MINOR,line:{stroke:i.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:$M.SCALE.MAIN.MINOR,lines:a,animations:mE(o)}})(t)),n}const gE="areaPan",vE=e=>({type:"Pan",key:"panorama",options:{event:gE,pointers:1,threshold:10,enable(t,n){return this.started===gE||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===$M.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started=gE;const n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component($M.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:o,max:r,size:i}=this.areaPan,a=-t.deltaX/i;e.viewState.set("zoom",{min:Math.min(o+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(r+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function yE(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:o,chart:r}=e,{rtl:i}=t,a=lw.event.onZoom({viewCache:n,viewState:o,chart:r},{threshold:100,rtl:i,targetKey:$M.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===$M.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 bE({chart:e},t,n){const o=e.component($M.COMPONENT.BASE_TOOLTIP);var r;o&&o.show&&(o.emit("hide"),null!=n&&null!==(r=n.customTooltipModel)&&void 0!==r&&r.useCustomTooltip&&t&&t({},o,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const i=e.component($M.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&i.emit("hide");const a=e.component($M.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function xE(e,t){const{viewCache:n,viewState:o,chart:r,trendLineModel:i,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?lw.event.onZoom({viewCache:n,viewState:o,chart:r},{rtl:s,threshold:50,targetKey:$M.COMPONENT.BAR}):void 0,c=zM({majorInnerScale:$M.SCALE.MAIN.MAJOR_INNER,tooltip:$M.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:$M.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:r,viewState:o,trendLineModel:i,layoutService:a,rtl:s}),u=[$M.COMPONENT.BAR,$M.COMPONENT.BAR_AXIS,$M.COMPONENT.GROUP_AXIS,$M.COMPONENT.BAR_OOB_MAX,$M.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,p=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,o=!1;if(e.actions.scroll.enabled()){const r={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(r).filter((e=>e.key===$M.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(r,Math.sign(-t.deltaY)),o=!0)}!o&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===$M.COMPONENT.LEGEND_COLOR_CAT)),n&&(o=!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))),o&&t.preventDefault(),bE(e,p,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),o=this.chart.component($M.COMPONENT.BASE_TOOLTIP);if(o&&o.show)if(n.some((e=>u.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const r=d.getNodes(t,this.chart);p(t,o,{nodes:r,opts:e,customTooltipModel:n})}else o.emit("show",t)}else o.emit("hide");const r=this.chart.component($M.COMPONENT.LEGEND_CAT_TOOLTIP);r&&r.show&&(n.some((e=>e.key===$M.COMPONENT.LEGEND_COLOR_CAT))?r.emit("show",t):r.emit("hide"))}},mouseup(t){2===t.button&&bE(this,p,e)},mouseleave(){bE(this,p,e)}}}}const SE=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...Tw({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[vE(e,t.rtl),yE(e,t)]]});function wE(e,t){const{actions:n}=e;if(!n.interact.enabled())return[];const o=[SE(e,t),xE(e,t),Tw({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&o.push(e.discrete.interactions.native),o}const CE=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:Qa.bars.compensateForLayoutChanges});const ME=(e,t,{collectionKey:n})=>{if(!fw({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:o,viewModel:r},{collectionKey:i}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>o.getDimensionCardinality()>1,data:{collection:i},settings:{box:oe(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:oe(!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:CE(r)}}(e,t,{collectionKey:n});const{mode:o,scales:r}=t.reducedDataModel;let i;return o.isGroupedByDimension&&!o.isReduced?i=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:o.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:o.isReduced||o.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:r.major,fn:i},minor:{scale:r.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:CE(t.viewModel)}},{measureText:kE}=t.renderer("svg")();const EE=50,TE=100,NE=200;function LE(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function DE(e,t,n){return 0===t||0===e||t===n.length-1}function qE(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}const OE=(e,t)=>e.value-t.value,RE=e=>({value:e,isMinor:!1}),AE=e=>({value:e,isMinor:!0});function PE({layoutService:e,viewModel:t,dockService:n}){var o;const{meta:r}=e;if(!r.isStackedByDimension||r.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:$M.SCALE.MAIN.MAJOR},minor:{scale:$M.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:null!=s&&null!==(o=s.style)&&void 0!==o&&o.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:Qa.shadowBars.trackBy,compensateForLayoutChanges:Qa.bars.compensateForLayoutChanges}}}const IE={min:"Min",max:"Max"};function zE(e,t,n){const o=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?Bk(e,t)||Fk(e,t):n===Hk?Bk(e,t):Fk(e,t)}(Number(o.toFixed(13)),e,t)}function BE(e,{barComponent:t,type:n,isStacked:o}){var r,i,a,s;const{viewCache:l,layoutService:c,dockService:u}=e,d=l.get("minorMinMax"),p=n===Hk;if(function(e,t){return!e["hasOther"+IE[t]]}(d,n)){if(function(e,t){return!e["hasExplicit"+IE[t]]}(d,n))return!1;if(zE(d,n,p))return!1}if(function(e,t,n){const o=n?e=>e<0:e=>e>0;return e["hasExplicit"+IE[t]]&&o(e["explicit"+IE[t]])}(d,n,p))return!1;let m="end";o&&(m=p?"sumOfPositives":"sumOfNegatives");const f=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale($M.SCALE.MAIN.MINOR)[n]())),h=p?e=>e.datum[m].value>f():e=>e.datum[m].value<f(),g=$M.COMPONENT.BAR,v=e.layoutService.getLayoutValue("components",[]),y=v?v.filter((e=>e.key===g))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-"+n,layout:{dock:p?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:oe({},t.settings.box,{fill:c.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:h,width:Rk({layoutService:e.layoutService,discrete:e.discrete,componentKey:g}),strokeWidth:null!=y&&null!==(r=y.style)&&void 0!==r&&r.strokeWidth?Ok.BAR.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:Ok.BAR.STROKE.WIDTH.NONE,stroke:null!==(i=null==y||null===(a=y.style)||void 0===a||null===(s=a.strokeColor)||void 0===s?void 0:s.color)&&void 0!==i?i:Ok.BAR.STROKE.COLOR})}}}function FE(e,t){var n;let o;return o=e.isContinuous?1:.7,!e.isContinuous&&null!=t&&null!==(n=t.style)&&void 0!==n&&n.width&&t.style.width>0?t.style.width:o}function HE(e,{collectionKey:t},n){const{meta:o}=e.layoutService,{fields:r}=e.viewModel,i=o.isStackedByDimension&&!o.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[i]?0:e[i];function s(t){const n=e.ds.field(t).raw(),o=e.ds.field(t).formatter(),r=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:a,label:e=>r?(e=>"NaN"===e[i]?"-":o(e[i]))(e):e.qText}}const l=o.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;const c={key:t,data:{extract:r.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,p=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,m={field:o.isDimensionless?t:r.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:s(t),null:(f=t,{field:f,reduceLabel:"none",reduce:"first",value:l}),segment:o.isStacked?s(t):void 0,group:o.isGroupedByDimension?{field:r.majorGroup}:void 0,stack:o.isStacked?{field:r.majorStack}:void 0,measureIndex:o.isGroupedByDimension||o.isStackedByDimension?void 0:i,timeStart:o.isContinuous?{field:r.majorNumeric}:void 0,timeEnd:o.isContinuous?{field:r.majorNumeric}:void 0,fillTooltip:p,...a,...c,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${i}`},customTooltipAttrExps:0!==o.dimensionCount?SC.getNode(e.layoutService.getLayout(),o):void 0}};var f;return o.isDimensionless&&(m.value=i),void 0!==n&&(m.source=n),ge(m.props),m}))}};return o.isStacked&&(c.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),c}function jE({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:o}=e,{fields:r}=t;if(!o.isStacked)return!1;let i;return i=o.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}(o,r):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}}}(o,r),{key:n,data:{extract:i}}}const WE="main-collection",VE="stack-total-collection";const _E="mini-collection",UE="mini-stack-collection",$E="mini-continuous-collection",KE="miniCube",GE=(e,t)=>{const n=(e=>{const t=[HE(e,{collectionKey:WE})];return e.layoutService.meta.isStacked&&t.push(jE(e,{collectionKey:VE})),t})(t),o=((e,t)=>{const n=[];return fw({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(HE(t,{collectionKey:$E},KE)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:o,mode:r}}=e;return{key:t,data:{extract:o.minor.map(((e,t)=>{const i={end:{field:e,reduceLabel:"none"},...r.isStackedByMeasure&&!r.isReduced?n.getMain().getDatumProps(t):{}};return r.isContinuous&&(i.timeStart={field:o.major,value:e=>e.qNum},i.timeEnd=i.timeStart),{source:"miniCube",field:o.major,props:i}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:UE})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:o,mode:r}}=e;return{key:t,data:{extract:o.minor.map(((e,t)=>{const i=r.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:o.majorGroup},measureIndex:t,...i},s={source:"miniCube",field:r.isDimensionless?e:o.major,props:a};return r.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:_E}))),n})(0,t);return n.concat(o)};function YE(e,t,n){const o=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&o.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),o}function XE({layout:e,component:t},n,o){if(!Qk(e,n))return!1;const{meta:r}=n.layoutService,i=!Zk(e,n),a=n.themeService.getStyles();function s(e){const t=n.chart.formatter($M.FORMATTER.MINOR);return t?t(e):e}const l={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":s(e.data.sumOfPositives.value)},simplifiedPlacements:YE("outside",i,r.isContinuous),style:a.label.value},c={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":s(e.data.sumOfNegatives.value)},simplifiedPlacements:YE("opposite",i,r.isContinuous),style:a.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Jk(e.data.sumOfPositives.value,n.dockService.meta.minor.orientation,o),labels:[Yk(oe(n,l)),Yk(oe(n,c))],fontSize:a.label.value.fontSize,fontFamily:a.label.value.fontFamily,linkData:Qa.labels.linkData}}}]},animations:{enabled:n.viewModel.animations.enabled,trackBy:Qa.labels.trackBy,compensateForLayoutChanges:Qa.labels.compensateForLayoutChanges}}}function JE(e,t,n){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}function ZE({layout:e,type:t},n){const{layoutService:o,viewCache:r,themeService:i}=n,{meta:a}=o,{isStacked:s}=a;if(!s&&!Zk(e,n)||s&&!Qk(e,n))return!1;const l=r.get("minorMinMax");if(!l.hasExplicitMinMax||t===Hk&&0===l.max||t===jk&&0===l.min)return!1;if(!Vk(t===Hk?l.implicitMax:l.implicitMin,l,t))return!1;const c=i.getStyles();let u=e=>e.data.end.label;a.isStacked&&(u=t===Hk?function(e){if(Vk(e.data.sumOfNegatives.value,l,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,o=n.chart.formatter($M.FORMATTER.MINOR);return o?o(t):t}return""}:function(e){if(Vk(e.data.sumOfPositives.value,l,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,o=n.chart.formatter($M.FORMATTER.MINOR);return o?o(t):t}return""});const d={color:"#595959",lightColor:"#E6E6E6",darkColor:"#595959",fontSize:13,fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'},p={label:u,simplifiedPlacements:JE("outside",true,a.isContinuous),style:d},m={label:u,simplifiedPlacements:JE("opposite",true,a.isContinuous),style:d},f=[Yk(oe(n,p)),Yk(oe(n,m))],h="vertical"===n.dockService.meta.minor.orientation?"down":"right",g={component:`${$M.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:h,labels:f,fontSize:c.label.value.fontSize,fontFamily:c.label.value.fontFamily,linkData:Qa.labels.linkData}}};return{key:"bar-oob-labels-"+t,type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[g]},animations:{enabled:n.viewModel.animations.enabled,trackBy:Qa.labels.trackBy,compensateForLayoutChanges:Qa.labels.compensateForLayoutChanges}}}function QE(e){return"all"===e||"title"===e}function eT(e,t,n){if(!QE(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:o,properties:r}=t,i={hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=o&&null!==(e=o.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")},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:Mk[t.dockService.meta.major.orientation+"DimensionAxisTitle"].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:i,style:a}}function tT(e,t,n){if(!QE(e.measureAxis.show))return!1;const{layoutService:o,actions:r}=t,i=t.properties,a=o.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",s={hyperCube:o.getHyperCube(),hyperCubeDef:d(i,a),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")},l=t.styleService.axis.title.getStyle();return t.layoutService.meta.hasMultipleMeasures&&(s.padding="0",s.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:s,style:l}}function nT({environment:e,rtl:t,refLineModel:n,layoutService:o,colorService:r,dockService:i,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:r.getMain().getPaletteColor},p=a.getStyles(),m=s.animations.enabled;return[rs({refLineModel:n,layoutService:o,colorModel:d,dockService:i,animationsEnabled:m,chart:l,scale:$M.SCALE.MAIN.MINOR,axis:"horizontal"===i.meta.major.orientation?"y":"x",key:$M.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:Mk.refLines.minimumLayoutMode}),rs({isDimension:!0,refLineModel:n,layoutService:o,colorModel:d,dockService:i,animationsEnabled:m,chart:l,scale:$M.SCALE.MAIN.MAJOR,axis:"horizontal"===i.meta.major.orientation?"x":"y",rtl:t,key:$M.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:$M.COMPONENT.BAR,minimumLayoutMode:Mk.refLines.minimumLayoutMode}),...as({refLineModel:n,layoutService:o,colorModel:d,animationsEnabled:m,dock:i.meta.minor.opposite,scale:$M.SCALE.MAIN.MINOR,style:p,formatter:$M.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:$M.COMPONENT.MEASURE_REF_LINE_LABEL}),...as({isDimension:!0,refLineModel:n,layoutService:o,colorModel:d,animationsEnabled:m,dock:i.meta.major.opposite,scale:$M.SCALE.MAIN.MAJOR,style:p,theme:c,localeInfo:u,rtl:t,key:$M.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function oT(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)!==TC})).length,o=t.layout.qHyperCube.qDimensionInfo.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC})).length,r=e.dimensionAxis.maxVisibleItems;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(o+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(o+n))))}}const rT=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],iT=(e,t)=>{var n,o,r,i,a;const s=null===(n=t.qHyperCube)||void 0===n||null===(o=n.qMeasureInfo)||void 0===o?void 0:o.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC})).length,l=null===(r=t.qHyperCube)||void 0===r||null===(i=r.qDimensionInfo)||void 0===i?void 0:i.filter((e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC})).length,c="grouped"===(null===(a=e.barGrouping)||void 0===a?void 0:a.grouping)&&l>0&&s+l>2;return xe.continuous(t)?1:c?.9:.7},aT=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],sT=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],lT=e=>{return{value:e,label:(t=e,t.charAt(0).toUpperCase()+t.slice(1)),groupHeader:!1,disabled:!1};var t},cT=e=>({value:e,label:e,groupHeader:!1,disabled:!1}),uT=(e,t)=>{const n=[e.getStyle("object.barChart",t,"fontFamily")],o=e.getStyle("","","fontFamilies"),r=Array.isArray(o)&&o.length?o.map((e=>e.split(",").map((e=>e.trim())).map((e=>e.replace(/\s+/g," ").trim())).filter(Boolean).join(", "))):n,i=[...new Set([...n,...r])],a=[{value:"Header1",label:"All fonts",metaText:"Default",groupHeader:!0},...aT.map((e=>lT(e)))];return[{value:"header2",label:"Theme fonts",metaText:"Theme",groupHeader:!0},...i.map((e=>lT(e))),...a]},dT=(e,t,n)=>{var o;return(null!==(o=lT(e.getStyle("object.barChart",t,n)))&&void 0!==o?o:e.getStyle("","",n)).value},pT=(e,t)=>{var n;const o=[e.getStyle("object.barChart",t,"fontSize")],r=null!==(n=e.getStyle("","","fontSizes"))&&void 0!==n?n:o,i=[...new Set([...o,...r])],a=[{value:"header1",label:"All font sizes",metaText:"Default",groupHeader:!0},...sT.map((e=>cT(e)))];return[{value:"header2",label:"Theme font sizes",metaText:"Theme",groupHeader:!0},...i.map((e=>cT(e))),...a]},mT=(e,t,n)=>{var o;return(null!==(o=cT(e.getStyle("object.barChart",t,n)))&&void 0!==o?o:e.getStyle("","",n)).value};const fT={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,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(rT).map((e=>rT[e])),schemaIgnore:!0,defaultValue:rT[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)=>!xe.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)=>iT(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(uw.OPTIONS).map((e=>uw.OPTIONS[e])),schemaIgnore:!0,defaultValue:uw.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}}}}}}}}};function hT(e=!1,t,n){return e?fT:function(e,t){return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,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(rT).map((e=>rT[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)=>!xe.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:o}=n,{barGrouping:r,qHyperCubeDef:i}=o,a=i.qMeasures.length,s=i.qDimensions.length,l="grouped"===r.grouping&&s>0&&a+s>2;return xe.continuous(o)?1:l?.9:.7},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:{fontFamilyItem:{component:"dropdown",ref:"axis.title.fontFamily",options:()=>uT(e,"axis.title"),defaultValue:()=>dT(e,"axis.title","fontFamily")},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:"axis.title.fontSize",options:()=>pT(e,"axis.title"),defaultValue:()=>mT(e,"axis.title","fontSize")},fontColorItem:{component:"color-picker",width:!1,ref:"axis.title.color",defaultValue:()=>({color:e.getStyle("object.barChart","axis.title","color")})}}}}}}}:void 0,axisLabelSection:null!=t&&t.isEnabled("CLIENT_IM_747")?{translation:"properties.axis.label",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:{fontFamilyItem:{component:"dropdown",ref:"axis.label.name.fontFamily",options:()=>uT(e,"axis.label.name"),defaultValue:()=>dT(e,"axis.label.name","fontFamily")},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:"axis.label.name.fontSize",options:()=>pT(e,"axis.label.name"),defaultValue:()=>mT(e,"axis.label.name","fontSize")},fontColorItem:{component:"color-picker",width:!1,ref:"axis.label.name.color",defaultValue:()=>({color:e.getStyle("object.barChart","axis.label.name","color")})}}}}}}}:void 0}}}(t,n)}const gT={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:iT(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)=>!xe.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},vT=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC},yT=(e,t)=>e.qHyperCube[t].filter((e=>vT(e))),bT=e=>({get:(t,n,o)=>xe.continuous(o.layout)?e:t(n.type),set(e,t,n){const o=Me(n.type,n);t(n.type,e,o)}}),xT=e=>{const t=oe(!0,{},e);return t.qHyperCube.qMeasureInfo=yT(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=yT(e,"qDimensionInfo"),t&&!xe.continuous(t)&&xe.stacked(t)},ST=({translator:e,flags:t,anything:n})=>{var o,r,i;const a=null==n||null===(o=n.sense)||void 0===o||null===(r=o.isUnsupportedFeature)||void 0===r?void 0:r.call(o,"continuousData"),s={items:{labels:{items:{header:{show:(e,t,n)=>yT(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!xT(t.layout)&&yT(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>xT(t.layout),convertFunctions:{get:(e,t,n,o)=>o.dataPoint.showLabels&&o.dataPoint.showSegmentLabels,set(e,t,n,o,r){r.dataPoint.showSegmentLabels=e,r.dataPoint.showLabels=r.dataPoint.showSegmentLabels||r.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>xT(t.layout),convertFunctions:{get:(e,t,n,o)=>o.dataPoint.showLabels&&o.dataPoint.showTotalLabels,set(e,t,n,o,r){r.dataPoint.showTotalLabels=e,r.dataPoint.showLabels=r.dataPoint.showSegmentLabels||r.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>yT(n.layout,"qDimensionInfo").length&&yT(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,o)=>"labels"===o.dimensionAxis.show||"none"===o.dimensionAxis.show,set(e,t,n,o,r){r.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>yT(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,o)=>"labels"===o.measureAxis.show||"none"===o.measureAxis.show,set(e,t,n,o,r){r.measureAxis.show=e?"labels":"all"}}}}}}},l=null==n||null===(i=n.sense)||void 0===i?void 0:i.theme,c={uses:"settings",items:{simpleStyling:hT(!0,l,t),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")?hT(!1,l,t):gT,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=yT(t.layout,"qMeasureInfo").length,o=yT(t.layout,"qDimensionInfo").length;return o>0&&n+o>2},change(e,t){yT(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)=>xe.continuous(n.layout),convertFunctions:bT("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)=>xe.continuous(n.layout),convertFunctions:bT("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(uw.OPTIONS).map((e=>uw.OPTIONS[e])),defaultValue:uw.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)=>!xe.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(xT(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&&xT(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&&xT(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,o)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!xe.continuous(o.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 o=yT(n.layout,"qMeasureInfo").length,r=yT(n.layout,"qDimensionInfo").length,i=e.dimensionAxis.maxVisibleItems;return i<0||i>1e4/(r+o)},globalChange:oT,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},wT={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){Bt(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:o,qInterColumnSortOrder:r}=e.qHyperCubeDef,{qCardinal:i}=t.layout.qHyperCube.qDimensionInfo[0],a=r.length,s=[...Array(a).keys()];1===n.length&&o.length>=1&&i>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},CT={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"}}},MT=({translator:e,flags:t,anything:n})=>{var o,r;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,o){var r,i;if(null!=n&&null!==(r=n.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;const a=((e,t)=>{var n,o,r,i,a,s;const l=null===(n=t.layout)||void 0===n||null===(o=n.qHyperCube)||void 0===o||null===(r=o.qDimensionInfo)||void 0===r?void 0:r.findIndex((e=>vT(e)));return(null===(i=t.properties)||void 0===i||null===(a=i.qHyperCubeDef)||void 0===a||null===(s=a.qDimensions)||void 0===s?void 0:s[l])===e})(e,t),s=xe.continuous(o.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!==(o=n.sense)&&void 0!==o&&null!==(r=o.isUnsupportedFeature)&&void 0!==r&&r.call(o,"trendlines")?void 0:HM({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function kT({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:MT({translator:e,flags:t,anything:n}),sorting:wT,addons:CT,settings:ST({translator:e,flags:t,anything:n})}}}const ET=e=>{var t;return(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)!==TC};function TT(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t){const n=t.qHyperCubeDef.qMeasures.length,o=t.qHyperCubeDef.qDimensions.length;return 1===n&&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=>ET(e))).length+t.qHyperCube.qDimensionInfo.filter((e=>ET(e))).length>2&&!xe.continuous(t)&&!((null==(n=t)||null===(o=n.qHyperCube)||void 0===o||null===(r=o.qDimensionInfo)||void 0===r?void 0:r.filter((e=>ET(e))).length)>1&&(null==n||null===(i=n.qHyperCube)||void 0===i?void 0:i.isHCEnabled));var n,o,r,i},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)=>!xe.continuous(t)}}},color:{uses:"color"}}}}function NT(e){const t={},n=d(e,"components"),o=d(e,"dimensionAxis.axisDisplayMode"),r=d(e,"dimensionAxis.maxVisibleItems"),i=n?n.filter((e=>"bar"===e.key))[0]:void 0,a=d(e,"tooltip");if(i&&i.style&&Object.keys(i.style).forEach((e=>{t["chart_style_"+e]=i.style[e]})),r&&(t.chart_dimaxis_maxVisibleItems=r),o&&(t.chart_dimaxis_axisDisplayMode=o),a){t.chart_tooltip_custom=!a.auto;const e=d(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const LT=e=>!!(e&&e.qHyperCube.qSize.qcy>0),DT={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function qT(){const e=[];return Object.keys(DT).forEach((t=>{e.push(DT[t])})),e}function OT(e){const{flags:t}=e;return{definition:kT(e),softDefinition:TT(),support:{snapshot:LT,export:LT,exportData:!0,sharing:LT,viewData:!0,effects:!0,modifiers:qT()},importProperties:(n,o,r,i)=>{const a={layout:{templateId:o.templateId}};r.mapProperties(a);const s={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},l=_.axisChart.importProperties({exportFormat:n,initialProperties:o,dataDefinition:IC(e),defaultPropertyValues:s,hypercubePath:i,extension:r}),c=l.qProperty;return c.qHyperCubeDef.qDimensions.length>1&&"stacked"===c.barGrouping.grouping&&(c.qHyperCubeDef.qMode="K"),t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(_.conditionalShow.unquarantine(c),_.conditionalShow.unquarantineAlternative(c)),l},exportProperties:(e,n,o)=>{t.isEnabled("IM_1579_HIDE_DIM_MEA")&&(_.conditionalShow.quarantine(e.qProperty),_.conditionalShow.quarantineAlternative(e.qProperty));return _.axisChart.exportProperties({propertyTree:e,hyperCubePath:n,viewDataMode:o})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(Bt)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:o,showMiniChartForContinuousAxis:r}=e;if(t||!1!==r)return;const{continuousAuto:i}=n;(i||!i&&o)&&(e.scrollbar=uw.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:NT}}}}}));