@nebula.js/sn-pivot-table 7.68.0 → 7.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-pivot-table v7.68.0
2
+ * @nebula.js/sn-pivot-table v7.70.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -87,4 +87,4 @@ function Vr(e,t){let n;return n=t?Dr(e).withConfig({displayName:t.label,shouldFo
87
87
  }
88
88
  `),sl.rippleVisible,hl,550,({theme:e})=>e.transitions.easing.easeInOut,sl.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,sl.child,sl.childLeaving,ml,550,({theme:e})=>e.transitions.easing.easeInOut,sl.childPulsate,gl,({theme:e})=>e.transitions.easing.easeInOut),yl=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a}=n,s=qe(n,ll),[l,c]=o.useState([]),u=o.useRef(0),d=o.useRef(null);o.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=o.useRef(!1),f=ia(),h=o.useRef(null),m=o.useRef(null),g=o.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c(e=>[...e,fi.jsx(vl,{classes:{ripple:wi(i.ripple,sl.ripple),rippleVisible:wi(i.rippleVisible,sl.rippleVisible),ripplePulsate:wi(i.ripplePulsate,sl.ripplePulsate),child:wi(i.child,sl.child),childLeaving:wi(i.childLeaving,sl.childLeaving),childPulsate:wi(i.childPulsate,sl.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,d.current=a},[i]),b=o.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,()=>{h.current&&(h.current(),h.current=null)})):g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},[r,g,f]),v=o.useCallback(()=>{b({},{pulsate:!0})},[b]),y=o.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,()=>{y(e,t)});h.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[f]);return o.useImperativeHandle(t,()=>({pulsate:v,start:b,stop:y}),[v,b,y]),fi.jsx(bl,Te({className:wi(sl.root,i.root,a),ref:m},s,{children:fi.jsx(el,{component:null,exit:!0,children:l})}))});function xl(e){return Ii("MuiButtonBase",e)}const Sl=Di("MuiButtonBase",["root","disabled","focusVisible"]),wl=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Cl=As("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Sl.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),El=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:f="a",onBlur:h,onClick:m,onContextMenu:g,onDragLeave:b,onFocus:v,onFocusVisible:y,onKeyDown:x,onKeyUp:S,onMouseDown:w,onMouseLeave:C,onMouseUp:E,onTouchEnd:I,onTouchMove:D,onTouchStart:M,tabIndex:A=0,TouchRippleProps:L,touchRippleRef:R,type:P}=n,T=qe(n,wl),q=o.useRef(null),k=o.useRef(null),O=ta(k,R),{isFocusVisibleRef:N,onFocus:_,onBlur:j,ref:F}=ha(),[z,W]=o.useState(!1);c&&z&&W(!1),o.useImperativeHandle(r,()=>({focusVisible:()=>{W(!0),q.current.focus()}}),[]);const[$,H]=o.useState(!1);o.useEffect(()=>{H(!0)},[]);const B=$&&!u&&!c;function V(e,t,n=d){return ea(r=>{t&&t(r);return!n&&k.current&&k.current[e](r),!0})}o.useEffect(()=>{z&&p&&!u&&$&&k.current.pulsate()},[u,p,z,$]);const G=V("start",w),U=V("stop",g),Y=V("stop",b),K=V("stop",E),X=V("stop",e=>{z&&e.preventDefault(),C&&C(e)}),J=V("start",M),Z=V("stop",I),Q=V("stop",D),ee=V("stop",e=>{j(),!1===N.current&&W(!1),h&&h(e)},!1),te=ea(e=>{q.current||(q.current=e.currentTarget),_(e),!0===N.current&&(W(!0),y&&y(e)),v&&v(e)}),ne=()=>{const e=q.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=o.useRef(!1),oe=ea(e=>{p&&!re.current&&z&&k.current&&" "===e.key&&(re.current=!0,k.current.stop(e,()=>{k.current.start(e)})),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))}),ie=ea(e=>{p&&" "===e.key&&k.current&&z&&!e.defaultPrevented&&(re.current=!1,k.current.stop(e,()=>{k.current.pulsate(e)})),S&&S(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)});let ae=l;"button"===ae&&(T.href||T.to)&&(ae=f);const se={};"button"===ae?(se.type=void 0===P?"button":P,se.disabled=c):(T.href||T.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=ta(t,F,q),ce=Te({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:A,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=ga({root:["root",t&&"disabled",n&&"focusVisible"]},xl,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return fi.jsxs(Cl,Te({as:ae,className:wi(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:G,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:A,type:P},se,T,{children:[a,B?fi.jsx(yl,Te({ref:O,center:i},L)):null]}))});function Il(e){return Ii("MuiTypography",e)}Di("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Dl=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Ml=As("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${so(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>Te({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Al={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ll={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Rl=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiTypography"}),r=(e=>Ll[e]||e)(n.color),o=bi(Te({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Al}=o,f=qe(o,Dl),h=Te({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Al[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return ga({root:["root",i,"inherit"!==e.align&&`align${so(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Il,a)})(h);return fi.jsx(Ml,Te({as:m,ref:t,ownerState:h,className:wi(g.root,a)},f))});const Pl=o.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[a,s]=o.useState(null),l=ta(o.isValidElement(n)?wa(n):null,t);if(zi(()=>{i||s(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),zi(()=>{if(a&&!i)return Ki(t,a),()=>{Ki(t,null)}},[t,a,i]),i){if(o.isValidElement(n)){const e={ref:l};return o.cloneElement(n,e)}return fi.jsx(o.Fragment,{children:n})}return fi.jsx(o.Fragment,{children:a?I.createPortal(n,a):a})}),Tl=["onChange","maxRows","minRows","style","value"];function ql(e){return parseInt(e,10)||0}const kl={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Ol(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Nl=o.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:s}=e,l=qe(e,Tl),{current:c}=o.useRef(null!=s),u=o.useRef(null),d=ta(t,u),p=o.useRef(null),f=o.useRef(null),h=o.useCallback(()=>{const t=u.current,n=f.current;if(!t||!n)return;const o=Yi(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=ql(o.paddingBottom)+ql(o.paddingTop),l=ql(o.borderBottomWidth)+ql(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-c)<=1}},[r,i,e.placeholder]),m=ea(()=>{const e=u.current,t=h();if(!e||!t||Ol(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=o.useCallback(()=>{const e=u.current,t=h();if(!e||!t||Ol(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),b=o.useRef(-1);zi(()=>{const e=Gi(g),t=null==u?void 0:u.current;if(!t)return;const n=Yi(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(b.current),g(),b.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(b.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),zi(()=>{g()});return fi.jsxs(o.Fragment,{children:[fi.jsx("textarea",Te({value:s,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:i,style:a},l)),fi.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:Te({},kl,a,{paddingTop:0,paddingBottom:0})})]})});function _l({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const jl=o.createContext(void 0);function Fl(){return o.useContext(jl)}function zl(e){return fi.jsx(mi,Te({},e,{defaultTheme:ds,themeId:Pe}))}function Wl(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function $l(e,t=!1){return e&&(Wl(e.value)&&""!==e.value||t&&Wl(e.defaultValue)&&""!==e.defaultValue)}function Hl(e){return Ii("MuiInputBase",e)}const Bl=Di("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Vl=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Gl=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${so(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Ul=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Yl=As("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Gl})(({theme:e,ownerState:t})=>Te({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Bl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&Te({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Kl=As("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Ul})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=Te({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return Te({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Bl.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Bl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})}),Xl=fi.jsx(zl,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Jl=o.forwardRef(function(e,t){var n;const r=Ts({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,fullWidth:m=!1,id:g,inputComponent:b="input",inputProps:v={},inputRef:y,maxRows:x,minRows:S,multiline:w=!1,name:C,onBlur:E,onChange:I,onClick:D,onFocus:M,onKeyDown:A,onKeyUp:L,placeholder:R,readOnly:P,renderSuffix:T,rows:q,slotProps:k={},slots:O={},startAdornment:N,type:_="text",value:j}=r,F=qe(r,Vl),z=null!=v.value?v.value:j,{current:W}=o.useRef(null!=z),$=o.useRef(),H=o.useCallback(e=>{},[]),B=ta($,y,v.ref,H),[V,G]=o.useState(!1),U=Fl(),Y=_l({props:r,muiFormControl:U,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Y.focused=U?U.focused:V,o.useEffect(()=>{!U&&p&&V&&(G(!1),E&&E())},[U,p,V,E]);const K=U&&U.onFilled,X=U&&U.onEmpty,J=o.useCallback(e=>{$l(e)?K&&K():X&&X()},[K,X]);zi(()=>{W&&J({value:z})},[z,J,W]);o.useEffect(()=>{J($.current)},[]);let Z=b,Q=v;w&&"input"===Z&&(Q=Te(q?{type:void 0,minRows:q,maxRows:q}:{type:void 0,maxRows:x,minRows:S},Q),Z=Nl);o.useEffect(()=>{U&&U.setAdornedStart(Boolean(N))},[U,N]);const ee=Te({},r,{color:Y.color||"primary",disabled:Y.disabled,endAdornment:h,error:Y.error,focused:Y.focused,formControl:U,fullWidth:m,hiddenLabel:Y.hiddenLabel,multiline:w,size:Y.size,startAdornment:N,type:_}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return ga({root:["root",`color${so(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${so(p)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Hl,t)})(ee),ne=O.root||c.Root||Yl,re=k.root||u.root||{},oe=O.input||c.Input||Kl;return Q=Te({},Q,null!=(n=k.input)?n:u.input),fi.jsxs(o.Fragment,{children:[!f&&Xl,fi.jsxs(ne,Te({},re,!ba(ne)&&{ownerState:Te({},ee,re.ownerState)},{ref:t,onClick:e=>{$.current&&e.currentTarget===e.target&&$.current.focus(),D&&D(e)}},F,{className:wi(te.root,re.className,l,P&&"MuiInputBase-readOnly"),children:[N,fi.jsx(jl.Provider,{value:null,children:fi.jsx(oe,Te({ownerState:ee,"aria-invalid":Y.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:Y.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?$.current:{value:"x"})},name:C,placeholder:R,readOnly:P,required:Y.required,rows:q,value:z,onKeyDown:A,onKeyUp:L,type:_},Q,!ba(oe)&&{as:Z,ownerState:Te({},ee,Q.ownerState)},{ref:B,className:wi(te.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),v.onBlur&&v.onBlur(e),U&&U.onBlur?U.onBlur(e):G(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||$.current;if(null==t)throw new Error(Le(1));J({value:t.value})}v.onChange&&v.onChange(e,...t),I&&I(e,...t)},onFocus:e=>{Y.disabled?e.stopPropagation():(M&&M(e),v.onFocus&&v.onFocus(e),U&&U.onFocus?U.onFocus(e):G(!0))}}))}),h,T?T(Te({},Y,{startAdornment:N})):null]}))]})});function Zl(e){return Ii("MuiInput",e)}const Ql=Te({},Bl,Di("MuiInput",["root","underline","input"]));function ec(e){return Ii("MuiOutlinedInput",e)}const tc=Te({},Bl,Di("MuiOutlinedInput",["root","notchedOutline","input"]));function nc(e){return Ii("MuiFilledInput",e)}const rc=Te({},Bl,Di("MuiFilledInput",["root","underline","input"]));var oc=_s(fi.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const ic=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ac={entering:{opacity:1},entered:{opacity:1}},sc=o.forwardRef(function(e,t){const n=ps(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:b=r,TransitionComponent:v=Us}=e,y=qe(e,ic),x=o.useRef(null),S=ta(x,wa(s),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},C=w(p),E=w((e,t)=>{tl(e);const r=nl({style:g,timeout:b,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),I=w(d),D=w(m),M=w(e=>{const t=nl({style:g,timeout:b,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),A=w(h);return fi.jsx(v,Te({appear:a,in:c,nodeRef:x,onEnter:E,onEntered:I,onEntering:C,onExit:M,onExited:A,onExiting:D,addEndListener:e=>{i&&i(x.current,e)},timeout:b},y,{children:(e,t)=>o.cloneElement(s,Te({style:Te({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},ac[e],g,s.props.style),ref:S},t))}))});function lc(e){return Ii("MuiBackdrop",e)}Di("MuiBackdrop",["root","invisible"]);const cc=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],uc=As("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>Te({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),dc=o.forwardRef(function(e,t){var n,r,o;const i=Ts({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=sc,transitionDuration:g}=i,b=qe(i,cc),v=Te({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return ga({root:["root",n&&"invisible"]},lc,t)})(v),x=null!=(n=f.root)?n:u.root;return fi.jsx(m,Te({in:p,timeout:g},b,{children:fi.jsx(uc,Te({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:wi(y.root,s,null==x?void 0:x.className),ownerState:Te({},v,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}),pc=Di("MuiBox",["root"]),fc=us(),hc=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=Vr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(ti);return o.forwardRef(function(e,o){const s=li(n),l=bi(e),{className:c,component:u="div"}=l,d=qe(l,Ci);return fi.jsx(a,Te({as:u,ref:o,className:wi(c,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:Pe,defaultTheme:fc,defaultClassName:pc.root,generateClassName:xi.generate});function mc(e){return Ii("MuiButton",e)}const gc=Di("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),bc=o.createContext({}),vc=o.createContext(void 0),yc=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],xc=e=>Te({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Sc=As(El,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${so(n.color)}`],t[`size${so(n.size)}`],t[`${n.variant}Size${so(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return Te({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":Te({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":Te({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${gc.focusVisible}`]:Te({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${gc.disabled}`]:Te({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ba.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${gc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${gc.disabled}`]:{boxShadow:"none"}}),wc=As("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${so(n.size)}`]]}})(({ownerState:e})=>Te({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},xc(e))),Cc=As("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${so(n.size)}`]]}})(({ownerState:e})=>Te({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},xc(e))),Ec=o.forwardRef(function(e,t){const n=o.useContext(bc),r=o.useContext(vc),i=Ts({props:Fi(n,e),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:f,focusVisibleClassName:h,fullWidth:m=!1,size:g="medium",startIcon:b,type:v,variant:y="text"}=i,x=qe(i,yc),S=Te({},i,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:m,size:g,type:v,variant:y}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return Te({},a,ga({root:["root",i,`${i}${so(t)}`,`size${so(o)}`,`${i}Size${so(o)}`,`color${so(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${so(o)}`],endIcon:["icon","endIcon",`iconSize${so(o)}`]},mc,a))})(S),C=b&&fi.jsx(wc,{className:w.startIcon,ownerState:S,children:b}),E=f&&fi.jsx(Cc,{className:w.endIcon,ownerState:S,children:f}),I=r||"";return fi.jsxs(Sc,Te({ownerState:S,className:wi(n.className,w.root,c,I),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:wi(w.focusVisible,h),ref:t,type:v},x,{classes:w,children:[C,a,E]}))});function Ic(e){return Ii("PrivateSwitchBase",e)}Di("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Dc=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Mc=As(El,{name:"MuiSwitchBase"})(({ownerState:e})=>Te({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),Ac=As("input",{name:"MuiSwitchBase",shouldForwardProp:Ms})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Lc=o.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:h,onBlur:m,onChange:g,onFocus:b,readOnly:v,required:y=!1,tabIndex:x,type:S,value:w}=e,C=qe(e,Dc),[E,I]=Qi({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),D=Fl();let M=s;D&&void 0===M&&(M=D.disabled);const A="checkbox"===S||"radio"===S,L=Te({},e,{checked:E,disabled:M,disableFocusRipple:l,edge:c}),R=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return ga({root:["root",n&&"checked",r&&"disabled",o&&`edge${so(o)}`],input:["input"]},Ic,t)})(L);return fi.jsxs(Mc,Te({component:"span",className:wi(R.root,i),centerRipple:!0,focusRipple:!l,disabled:M,tabIndex:null,role:void 0,onFocus:e=>{b&&b(e),D&&D.onFocus&&D.onFocus(e)},onBlur:e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},ownerState:L,ref:t},C,{children:[fi.jsx(Ac,Te({autoFocus:n,checked:r,defaultChecked:a,className:R.input,disabled:M,id:A?d:void 0,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;I(t),g&&g(e,t)},readOnly:v,ref:f,required:y,ownerState:L,tabIndex:x,type:S},"checkbox"===S&&void 0===w?{}:{value:w},p)),E?o:u]}))});var Rc=_s(fi.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Pc=_s(fi.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Tc=_s(fi.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function qc(e){return Ii("MuiCheckbox",e)}const kc=Di("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Oc=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Nc=As(Lc,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${so(n.size)}`],"default"!==n.color&&t[`color${so(n.color)}`]]}})(({theme:e,ownerState:t})=>Te({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${kc.checked}, &.${kc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${kc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),_c=fi.jsx(Pc,{}),jc=fi.jsx(Rc,{}),Fc=fi.jsx(Tc,{}),zc=o.forwardRef(function(e,t){var n,r;const i=Ts({props:e,name:"MuiCheckbox"}),{checkedIcon:a=_c,color:s="primary",icon:l=jc,indeterminate:c=!1,indeterminateIcon:u=Fc,inputProps:d,size:p="medium",className:f}=i,h=qe(i,Oc),m=c?u:l,g=c?u:a,b=Te({},i,{color:s,indeterminate:c,size:p}),v=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e;return Te({},t,ga({root:["root",n&&"indeterminate",`color${so(r)}`,`size${so(o)}`]},qc,t))})(b);return fi.jsx(Nc,Te({type:"checkbox",inputProps:Te({"data-indeterminate":c},d),icon:o.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:p}),checkedIcon:o.cloneElement(g,{fontSize:null!=(r=g.props.fontSize)?r:p}),ownerState:b,ref:t,className:wi(v.root,f)},h,{classes:v}))});function Wc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function $c(e){return parseInt(Yi(e).getComputedStyle(e).paddingRight,10)||0}function Hc(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Wc(e,o)})}function Bc(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Vc(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Ui(e);return t.body===e?Yi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=ma(Ui(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${$c(r)+e}px`;const t=Ui(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${$c(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Ui(r).body;else{const t=r.parentElement,n=Yi(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Gc=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Uc(e){const t=[],n=[];return Array.from(e.querySelectorAll(Gc)).forEach((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Yc(){return!0}function Kc(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Uc,isEnabled:s=Yc,open:l}=e,c=o.useRef(!1),u=o.useRef(null),d=o.useRef(null),p=o.useRef(null),f=o.useRef(null),h=o.useRef(!1),m=o.useRef(null),g=ta(wa(t),m),b=o.useRef(null);o.useEffect(()=>{l&&m.current&&(h.current=!n)},[n,l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Ui(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Ui(m.current),t=t=>{b.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var o,i;const e=Boolean((null==(o=b.current)?void 0:o.shiftKey)&&"Tab"===(null==(i=b.current)?void 0:i.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,s,l,a]);const v=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return fi.jsxs(o.Fragment,{children:[fi.jsx("div",{tabIndex:l?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),fi.jsx("div",{tabIndex:l?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})}const Xc=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Wc(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Hc(t,e.mount,e.modalRef,r,!0);const o=Bc(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Vc(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&Wc(e.modalRef,t),Hc(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&Wc(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Jc(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Xc,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=e,f=o.useRef({}),h=o.useRef(null),m=o.useRef(null),g=ta(m,p),[b,v]=o.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const S=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),w=()=>{i.mount(S(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},C=ea(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Ui(h.current).body;i.add(S(),e),m.current&&w()}),E=o.useCallback(()=>i.isTopModal(S()),[i]),I=ea(e=>{h.current=e,e&&(d&&E()?w():m.current&&Wc(m.current,x))}),D=o.useCallback(()=>{i.remove(S(),x)},[x,i]);o.useEffect(()=>()=>{D()},[D]),o.useEffect(()=>{d?C():y&&a||D()},[d,D,y,a,C]);const M=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&E()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},A=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=va(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=Te({},n,t);return Te({role:"presentation"},r,{onKeyDown:M(r),ref:g})},getBackdropProps:(e={})=>Te({"aria-hidden":!0},e,{onClick:A(e),open:d}),getTransitionProps:()=>({onEnter:Vi(()=>{v(!1),s&&s()},null==c?void 0:c.props.onEnter),onExited:Vi(()=>{v(!0),l&&l(),a&&D()},null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:I,isTopModal:E,exited:b,hasTransition:y}}function Zc(e){return Ii("MuiModal",e)}Di("MuiModal",["root","hidden","backdrop"]);const Qc=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],eu=As("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>Te({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),tu=As(dc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),nu=o.forwardRef(function(e,t){var n,r,i,a,s,l;const c=Ts({name:"MuiModal",props:e}),{BackdropComponent:u=tu,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:g,components:b={},componentsProps:v={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:S=!1,disablePortal:w=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:D=!1,onBackdropClick:M,open:A,slotProps:L,slots:R}=c,P=qe(c,Qc),T=Te({},c,{closeAfterTransition:f,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:S,disablePortal:w,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:I,keepMounted:D}),{getRootProps:q,getBackdropProps:k,getTransitionProps:O,portalRef:N,isTopModal:_,exited:j,hasTransition:F}=Jc(Te({},T,{rootRef:t})),z=Te({},T,{exited:j}),W=(e=>{const{open:t,exited:n,classes:r}=e;return ga({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Zc,r)})(z),$={};if(void 0===h.props.tabIndex&&($.tabIndex="-1"),F){const{onEnter:e,onExited:t}=O();$.onEnter=e,$.onExited=t}const H=null!=(n=null!=(r=null==R?void 0:R.root)?r:b.Root)?n:eu,B=null!=(i=null!=(a=null==R?void 0:R.backdrop)?a:b.Backdrop)?i:u,V=null!=(s=null==L?void 0:L.root)?s:v.root,G=null!=(l=null==L?void 0:L.backdrop)?l:v.backdrop,U=Sa({elementType:H,externalSlotProps:V,externalForwardedProps:P,getSlotProps:q,additionalProps:{ref:t,as:g},ownerState:z,className:wi(p,null==V?void 0:V.className,null==W?void 0:W.root,!z.open&&z.exited&&(null==W?void 0:W.hidden))}),Y=Sa({elementType:B,externalSlotProps:G,additionalProps:d,getSlotProps:e=>k(Te({},e,{onClick:t=>{M&&M(t),null!=e&&e.onClick&&e.onClick(t)}})),className:wi(null==G?void 0:G.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:z});return D||A||F&&!j?fi.jsx(Pl,{ref:N,container:m,disablePortal:w,children:fi.jsxs(H,Te({},U,{children:[!I&&u?fi.jsx(B,Te({},Y)):null,fi.jsx(Kc,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:_,open:A,children:o.cloneElement(h,$)})]}))}):null});function ru(e){return Ii("MuiDivider",e)}const ou=Di("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),iu=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],au=As("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>Te({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Ba.alpha(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>Te({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>Te({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>Te({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>Te({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),su=As("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>Te({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),lu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=qe(n,iu),h=Te({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return ga({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},ru,r)})(h);return fi.jsx(au,Te({as:a,className:wi(m.root,i),role:u,ref:t,ownerState:h},f,{children:o?fi.jsx(su,{className:m.wrapper,ownerState:h,children:o}):null}))});lu.muiSkipListHighlight=!0;const cu=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],uu=As(Yl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Gl(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Te({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${rc.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${rc.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${rc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${rc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${rc.disabled}, .${rc.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${rc.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&Te({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))}),du=As(Kl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Ul})(({theme:e,ownerState:t})=>Te({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),pu=o.forwardRef(function(e,t){var n,r,o,i;const a=Ts({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:f={},type:h="text"}=a,m=qe(a,cu),g=Te({},a,{fullWidth:c,inputComponent:u,multiline:d,type:h}),b=(e=>{const{classes:t,disableUnderline:n}=e;return Te({},t,ga({root:["root",!n&&"underline"],input:["input"]},nc,t))})(a),v={root:{ownerState:g},input:{ownerState:g}},y=(null!=p?p:l)?Jr(v,null!=p?p:l):v,x=null!=(n=null!=(r=f.root)?r:s.Root)?n:uu,S=null!=(o=null!=(i=f.input)?i:s.Input)?o:du;return fi.jsx(Jl,Te({slots:{root:x,input:S},componentsProps:y,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:h},m,{classes:b}))});pu.muiName="Input";const fu=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function hu(e){return`scale(${e}, ${e**2})`}const mu={entering:{opacity:1,transform:hu(1)},entered:{opacity:1,transform:"none"}},gu="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),bu=o.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=Us}=e,b=qe(e,fu),v=ia(),y=o.useRef(),x=ps(),S=o.useRef(null),w=ta(S,wa(i),t),C=e=>t=>{if(e){const n=S.current;void 0===t?e(n):e(n,t)}},E=C(u),I=C((e,t)=>{tl(e);const{duration:n,delay:r,easing:o}=nl({style:h,timeout:m,easing:a},{mode:"enter"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=n,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:r}),x.transitions.create("transform",{duration:gu?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)}),D=C(c),M=C(f),A=C(e=>{const{duration:t,delay:n,easing:r}=nl({style:h,timeout:m,easing:a},{mode:"exit"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:gu?o:.666*o,delay:gu?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=hu(.75),d&&d(e)}),L=C(p);return fi.jsx(g,Te({appear:r,in:s,nodeRef:S,onEnter:I,onEntered:D,onEntering:E,onExit:A,onExited:L,onExiting:M,addEndListener:e=>{"auto"===m&&v.start(y.current||0,e),n&&n(S.current,e)},timeout:"auto"===m?null:m},b,{children:(e,t)=>o.cloneElement(i,Te({style:Te({opacity:0,transform:hu(.75),visibility:"exited"!==e||s?void 0:"hidden"},mu[e],h,i.props.style),ref:w},t))}))});bu.muiSupportAuto=!0;const vu=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],yu=As(Yl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Gl(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),Te({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ql.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ql.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ql.disabled}, .${Ql.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Ql.disabled}:before`]:{borderBottomStyle:"dotted"}})}),xu=As(Kl,{name:"MuiInput",slot:"Input",overridesResolver:Ul})({}),Su=o.forwardRef(function(e,t){var n,r,o,i;const a=Ts({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:m="text"}=a,g=qe(a,vu),b=(e=>{const{classes:t,disableUnderline:n}=e;return Te({},t,ga({root:["root",!n&&"underline"],input:["input"]},Zl,t))})(a),v={root:{ownerState:{disableUnderline:s}}},y=(null!=f?f:c)?Jr(null!=f?f:c,v):v,x=null!=(n=null!=(r=h.root)?r:l.Root)?n:yu,S=null!=(o=null!=(i=h.input)?i:l.Input)?o:xu;return fi.jsx(Jl,Te({slots:{root:x,input:S},slotProps:y,fullWidth:u,inputComponent:d,multiline:p,ref:t,type:m},g,{classes:b}))});function wu(e){return Ii("MuiInputAdornment",e)}Su.muiName="Input";const Cu=Di("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Eu;const Iu=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Du=As("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${so(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>Te({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Cu.positionStart}&:not(.${Cu.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),Mu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u}=n,d=qe(n,Iu),p=Fl()||{};let f=u;u&&p.variant,p&&!f&&(f=p.variant);const h=Te({},n,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:s,position:c,variant:f}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return ga({root:["root",n&&"disablePointerEvents",o&&`position${so(o)}`,a,r&&"hiddenLabel",i&&`size${so(i)}`]},wu,t)})(h);return fi.jsx(jl.Provider,{value:null,children:fi.jsx(Du,Te({as:a,ownerState:h,className:wi(m.root,i),ref:t},d,{children:"string"!=typeof r||l?fi.jsxs(o.Fragment,{children:["start"===c?Eu||(Eu=fi.jsx("span",{className:"notranslate",children:"​"})):null,r]}):fi.jsx(Rl,{color:"text.secondary",children:r})}))})});function Au(e){return Ii("MuiLink",e)}const Lu=Di("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Ru={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Pu=({theme:e,ownerState:t})=>{const n=(e=>Ru[e]||e)(t.color),r=co(e,`palette.${n}`,!1)||t.color,o=co(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Ba.alpha(r,.4)},Tu=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],qu=As(Rl,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${so(n.underline)}`],"button"===n.component&&t.button]}})(({theme:e,ownerState:t})=>Te({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&Te({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:Pu({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Lu.focusVisible}`]:{outline:"auto"}})),ku=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=n,f=qe(n,Tu),{isFocusVisibleRef:h,onBlur:m,onFocus:g,ref:b}=ha(),[v,y]=o.useState(!1),x=ta(t,b),S=Te({},n,{color:i,component:a,focusVisible:v,underline:u,variant:d}),w=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e;return ga({root:["root",`underline${so(o)}`,"button"===n&&"button",r&&"focusVisible"]},Au,t)})(S);return fi.jsx(qu,Te({color:i,className:wi(w.root,r),classes:c,component:a,onBlur:e=>{m(),!1===h.current&&y(!1),s&&s(e)},onFocus:e=>{g(e),!0===h.current&&y(!0),l&&l(e)},ref:x,ownerState:S,variant:d,sx:[...Object.keys(Ru).includes(i)?[]:[{color:i}],...Array.isArray(p)?p:[p]]},f))}),Ou=o.createContext({});function Nu(e){return Ii("MuiList",e)}Di("MuiList",["root","padding","dense","subheader"]);const _u=["children","className","component","dense","disablePadding","subheader"],ju=As("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>Te({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Fu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiList"}),{children:r,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=n,u=qe(n,_u),d=o.useMemo(()=>({dense:s}),[s]),p=Te({},n,{component:a,dense:s,disablePadding:l}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return ga({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Nu,t)})(p);return fi.jsx(Ou.Provider,{value:d,children:fi.jsxs(ju,Te({as:a,className:wi(f.root,i),ref:t,ownerState:p},u,{children:[c,r]}))})});function zu(e){return Ii("MuiListItem",e)}const Wu=Di("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),$u=Di("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Hu(e){return Ii("MuiListItemSecondaryAction",e)}Di("MuiListItemSecondaryAction",["root","disableGutters"]);const Bu=["className"],Vu=As("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>Te({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Gu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,i=qe(n,Bu),a=Te({},n,{disableGutters:o.useContext(Ou).disableGutters}),s=(e=>{const{disableGutters:t,classes:n}=e;return ga({root:["root",t&&"disableGutters"]},Hu,n)})(a);return fi.jsx(Vu,Te({className:wi(s.root,r),ownerState:a,ref:t},i))});Gu.muiName="ListItemSecondaryAction";const Uu=["className"],Yu=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Ku=As("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>Te({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Te({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${$u.root}`]:{paddingRight:48}},{[`&.${Wu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Wu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Wu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Wu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Xu=As("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Ju=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:i=!1,button:a=!1,children:s,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:f}={},dense:h=!1,disabled:m=!1,disableGutters:g=!1,disablePadding:b=!1,divider:v=!1,focusVisibleClassName:y,secondaryAction:x,selected:S=!1,slotProps:w={},slots:C={}}=n,E=qe(n.ContainerProps,Uu),I=qe(n,Yu),D=o.useContext(Ou),M=o.useMemo(()=>({dense:h||D.dense||!1,alignItems:r,disableGutters:g}),[r,D.dense,h,g]),A=o.useRef(null);zi(()=>{i&&A.current&&A.current.focus()},[i]);const L=o.Children.toArray(s),R=L.length&&(P=L[L.length-1],T=["ListItemSecondaryAction"],o.isValidElement(P)&&-1!==T.indexOf(null!=(q=P.type.muiName)?q:null==(k=P.type)||null==(k=k._payload)||null==(k=k.value)?void 0:k.muiName));var P,T,q,k;const O=Te({},n,{alignItems:r,autoFocus:i,button:a,dense:M.dense,disabled:m,disableGutters:g,disablePadding:b,divider:v,hasSecondaryAction:R,selected:S}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return ga({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},zu,r)})(O),_=ta(A,t),j=C.root||u.Root||Ku,F=w.root||d.root||{},z=Te({className:wi(N.root,F.className,l),disabled:m},I);let W=c||"li";return a&&(z.component=c||"div",z.focusVisibleClassName=wi(Wu.focusVisible,y),W=El),R?(W=z.component||c?W:"div","li"===p&&("li"===W?W="div":"li"===z.component&&(z.component="div")),fi.jsx(Ou.Provider,{value:M,children:fi.jsxs(Xu,Te({as:p,className:wi(N.container,f),ref:_,ownerState:O},E,{children:[fi.jsx(j,Te({},F,!ba(j)&&{as:W,ownerState:Te({},O,F.ownerState)},z,{children:L})),L.pop()]}))})):fi.jsx(Ou.Provider,{value:M,children:fi.jsxs(j,Te({},F,{as:W,ref:_},!ba(j)&&{ownerState:Te({},O,F.ownerState)},z,{children:[L,x&&fi.jsx(Gu,{children:x})]}))})});function Zu(e){return Ii("MuiListItemIcon",e)}const Qu=Di("MuiListItemIcon",["root","alignItemsFlexStart"]),ed=["className"],td=As("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>Te({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),nd=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=qe(n,ed),a=Te({},n,{alignItems:o.useContext(Ou).alignItems}),s=(e=>{const{alignItems:t,classes:n}=e;return ga({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Zu,n)})(a);return fi.jsx(td,Te({className:wi(s.root,r),ownerState:a,ref:t},i))}),rd=Di("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),od=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function id(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ad(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function sd(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function ld(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&sd(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const cd=o.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=qe(e,od),f=o.useRef(null),h=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});zi(()=>{r&&f.current.focus()},[r]),o.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${ma(Ui(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=ta(f,t);let g=-1;o.Children.forEach(a,(e,t)=>{o.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))});const b=o.Children.map(a,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),o.cloneElement(e,t)}return e});return fi.jsx(Fu,Te({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=f.current,n=e.key,r=Ui(t).activeElement;if("ArrowDown"===n)e.preventDefault(),ld(t,r,c,l,id);else if("ArrowUp"===n)e.preventDefault(),ld(t,r,c,l,ad);else if("Home"===n)e.preventDefault(),ld(t,null,c,l,id);else if("End"===n)e.preventDefault(),ld(t,null,c,l,ad);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&sd(r,o);o.previousKeyMatched&&(s||ld(t,r,!1,l,id,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},p,{children:b}))});function ud(e){return Ii("MuiPopover",e)}Di("MuiPopover",["root","paper"]);const dd=["onEntering"],pd=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],fd=["slotProps"];function hd(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function md(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function gd(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function bd(e){return"function"==typeof e?e():e}const vd=As(nu,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yd=As(al,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),xd=o.forwardRef(function(e,t){var n,r,i;const a=Ts({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:m=8,marginThreshold:g=16,open:b,PaperProps:v={},slots:y,slotProps:x,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w=bu,transitionDuration:C="auto",TransitionProps:{onEntering:E}={},disableScrollLock:I=!1}=a,D=qe(a.TransitionProps,dd),M=qe(a,pd),A=null!=(n=null==x?void 0:x.paper)?n:v,L=o.useRef(),R=ta(L,A.ref),P=Te({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:A,transformOrigin:S,TransitionComponent:w,transitionDuration:C,TransitionProps:D}),T=(e=>{const{classes:t}=e;return ga({root:["root"],paper:["paper"]},ud,t)})(P),q=o.useCallback(()=>{if("anchorPosition"===d)return u;const e=bd(l),t=(e&&1===e.nodeType?e:Ui(L.current).body).getBoundingClientRect();return{top:t.top+hd(t,c.vertical),left:t.left+md(t,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),k=o.useCallback(e=>({vertical:hd(e,S.vertical),horizontal:md(e,S.horizontal)}),[S.horizontal,S.vertical]),O=o.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=k(t);if("none"===d)return{top:null,left:null,transformOrigin:gd(n)};const r=q();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=Yi(bd(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:gd(n)}},[l,d,q,k,g]),[N,_]=o.useState(b),j=o.useCallback(()=>{const e=L.current;if(!e)return;const t=O(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,_(!0)},[O]);o.useEffect(()=>(I&&window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)),[l,I,j]);o.useEffect(()=>{b&&j()}),o.useImperativeHandle(s,()=>b?{updatePosition:()=>{j()}}:null,[b,j]),o.useEffect(()=>{if(!b)return;const e=Gi(()=>{j()}),t=Yi(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[l,b,j]);let F=C;"auto"!==C||w.muiSupportAuto||(F=void 0);const z=h||(l?Ui(bd(l)).body:void 0),W=null!=(r=null==y?void 0:y.root)?r:vd,$=null!=(i=null==y?void 0:y.paper)?i:yd,H=Sa({elementType:$,externalSlotProps:Te({},A,{style:N?A.style:Te({},A.style,{opacity:0})}),additionalProps:{elevation:m,ref:R},ownerState:P,className:wi(T.paper,null==A?void 0:A.className)}),B=Sa({elementType:W,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:M,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:z,open:b},ownerState:P,className:wi(T.root,f)}),{slotProps:V}=B,G=qe(B,fd);return fi.jsx(W,Te({},G,!ba(W)&&{slotProps:V,disableScrollLock:I},{children:fi.jsx(w,Te({appear:!0,in:b,onEntering:(e,t)=>{E&&E(e,t),j()},onExited:()=>{_(!1)},timeout:F},D,{children:fi.jsx($,Te({},H,{children:p}))}))}))});function Sd(e){return Ii("MuiMenu",e)}Di("MuiMenu",["root","paper","list"]);const wd=["onEntering"],Cd=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Ed={vertical:"top",horizontal:"right"},Id={vertical:"top",horizontal:"left"},Dd=As(xd,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Md=As(yd,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ad=As(cd,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Ld=o.forwardRef(function(e,t){var n,r;const i=Ts({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:b="selectedMenu",slots:v={},slotProps:y={}}=i,x=qe(i.TransitionProps,wd),S=qe(i,Cd),w=(()=>{const e=o.useContext(Aa);return null!=e&&e})(),C=Te({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:x,variant:b}),E=(e=>{const{classes:t}=e;return ga({root:["root"],paper:["paper"],list:["list"]},Sd,t)})(C),I=a&&!c&&p,D=o.useRef(null);let M=-1;o.Children.map(s,(e,t)=>{o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===b&&e.props.selected||-1===M)&&(M=t))});const A=null!=(n=v.paper)?n:Md,L=null!=(r=y.paper)?r:f,R=Sa({elementType:v.root,externalSlotProps:y.root,ownerState:C,className:[E.root,l]}),P=Sa({elementType:A,externalSlotProps:L,ownerState:C,className:E.paper});return fi.jsx(Dd,Te({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?Ed:Id,slots:{paper:A,root:v.root},slotProps:{root:R,paper:P},open:p,ref:t,transitionDuration:m,TransitionProps:Te({onEntering:(e,t)=>{D.current&&D.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:C},S,{classes:h,children:fi.jsx(Ad,Te({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:D,autoFocus:a&&(-1===M||c),autoFocusItem:I,variant:b},u,{className:wi(E.list,u.className),children:s}))}))});function Rd(e){return Ii("MuiMenuItem",e)}const Pd=Di("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Td=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],qd=As(El,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>Te({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Pd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Pd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Pd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Pd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ou.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ou.inset}`]:{marginLeft:52},[`& .${rd.root}`]:{marginTop:0,marginBottom:0},[`& .${rd.inset}`]:{paddingLeft:36},[`& .${Qu.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&Te({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Qu.root} svg`]:{fontSize:"1.25rem"}}))),kd=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=n,f=qe(n,Td),h=o.useContext(Ou),m=o.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),g=o.useRef(null);zi(()=>{r&&g.current&&g.current.focus()},[r]);const b=Te({},n,{dense:m.dense,divider:s,disableGutters:l}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return Te({},a,ga({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Rd,a))})(n),y=ta(g,t);let x;return n.disabled||(x=void 0!==d?d:-1),fi.jsx(Ou.Provider,{value:m,children:fi.jsx(qd,Te({ref:y,role:u,tabIndex:x,component:i,focusVisibleClassName:wi(v.focusVisible,c),className:wi(v.root,p)},f,{ownerState:b,classes:v}))})});function Od(e){return Ii("MuiNativeSelect",e)}const Nd=Di("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),_d=["className","disabled","error","IconComponent","inputRef","variant"],jd=({ownerState:e,theme:t})=>Te({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Te({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Nd.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),Fd=As("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ms,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Nd.multiple}`]:t.multiple}]}})(jd),zd=({ownerState:e,theme:t})=>Te({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Nd.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),Wd=As("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${so(n.variant)}`],n.open&&t.iconOpen]}})(zd),$d=o.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=e,c=qe(e,_d),u=Te({},e,{disabled:r,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return ga({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${so(n)}`,i&&"iconOpen",r&&"disabled"]},Od,t)})(u);return fi.jsxs(o.Fragment,{children:[fi.jsx(Fd,Te({ownerState:u,className:wi(d.select,n),disabled:r,ref:s||t},c)),e.multiple?null:fi.jsx(Wd,{as:a,ownerState:u,className:d.icon})]})});var Hd;const Bd=["children","classes","className","label","notched"],Vd=As("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ms})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Gd=As("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ms})(({ownerState:e,theme:t})=>Te({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&Te({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));const Ud=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Yd=As(Yl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Gl})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Te({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${tc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${tc.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${tc.focused} .${tc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${tc.error} .${tc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${tc.disabled} .${tc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&Te({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),Kd=As(function(e){const{className:t,label:n,notched:r}=e,o=qe(e,Bd),i=null!=n&&""!==n,a=Te({},e,{notched:r,withLabel:i});return fi.jsx(Vd,Te({"aria-hidden":!0,className:t,ownerState:a},o,{children:fi.jsx(Gd,{ownerState:a,children:i?fi.jsx("span",{children:n}):Hd||(Hd=fi.jsx("span",{className:"notranslate",children:"​"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Xd=As(Kl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Ul})(({theme:e,ownerState:t})=>Te({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),Jd=o.forwardRef(function(e,t){var n,r,i,a,s;const l=Ts({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:f=!1,notched:h,slots:m={},type:g="text"}=l,b=qe(l,Ud),v=(e=>{const{classes:t}=e;return Te({},t,ga({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ec,t))})(l),y=Fl(),x=_l({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=Te({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:u,hiddenLabel:x.hiddenLabel,multiline:f,size:x.size,type:g}),w=null!=(n=null!=(r=m.root)?r:c.Root)?n:Yd,C=null!=(i=null!=(a=m.input)?a:c.Input)?i:Xd;return fi.jsx(Jl,Te({slots:{root:w,input:C},renderSuffix:e=>fi.jsx(Kd,{ownerState:S,className:v.notchedOutline,label:null!=p&&""!==p&&x.required?s||(s=fi.jsxs(o.Fragment,{children:[p," ","*"]})):p,notched:void 0!==h?h:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:t,type:g},b,{classes:Te({},v,{notchedOutline:null})}))});function Zd(e){return Ii("MuiSelect",e)}Jd.muiName="Input";const Qd=Di("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var ep;const tp=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],np=As("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Qd.select}`]:t.select},{[`&.${Qd.select}`]:t[n.variant]},{[`&.${Qd.error}`]:t.error},{[`&.${Qd.multiple}`]:t.multiple}]}})(jd,{[`&.${Qd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),rp=As("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${so(n.variant)}`],n.open&&t.iconOpen]}})(zd),op=As("input",{shouldForwardProp:e=>Ds(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ip(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function ap(e){return null==e||"string"==typeof e&&!e.trim()}const sp=o.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:f,error:h=!1,IconComponent:m,inputRef:g,labelId:b,MenuProps:v={},multiple:y,name:x,onBlur:S,onChange:w,onClose:C,onFocus:E,onOpen:I,open:D,readOnly:M,renderValue:A,SelectDisplayProps:L={},tabIndex:R,value:P,variant:T="standard"}=e,q=qe(e,tp),[k,O]=Qi({controlled:P,default:d,name:"Select"}),[N,_]=Qi({controlled:D,default:u,name:"Select"}),j=o.useRef(null),F=o.useRef(null),[z,W]=o.useState(null),{current:$}=o.useRef(null!=D),[H,B]=o.useState(),V=ta(t,g),G=o.useCallback(e=>{F.current=e,e&&W(e)},[]),U=null==z?void 0:z.parentNode;o.useImperativeHandle(V,()=>({focus:()=>{F.current.focus()},node:j.current,value:k}),[k]),o.useEffect(()=>{u&&N&&z&&!$&&(B(s?null:U.clientWidth),F.current.focus())},[z,s]),o.useEffect(()=>{a&&F.current.focus()},[a]),o.useEffect(()=>{if(!b)return;const e=Ui(F.current).getElementById(b);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[b]);const Y=(e,t)=>{e?I&&I(t):C&&C(t),$||(B(s?null:U.clientWidth),_(e))},K=o.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(k)?k.slice():[];const t=k.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),k!==n&&(O(n),w)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:x}}),w(o,e)}y||Y(!1,t)}},J=null!==z&&N;let Z,Q;delete q["aria-invalid"];const ee=[];let te=!1;($l({value:k})||f)&&(A?Z=A(k):te=!0);const ne=K.map(e=>{if(!o.isValidElement(e))return null;let t;if(y){if(!Array.isArray(k))throw new Error(Le(2));t=k.some(t=>ip(t,e.props.value)),t&&te&&ee.push(e.props.children)}else t=ip(k,e.props.value),t&&te&&(Q=e.props.children);return o.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});te&&(Z=y?0===ee.length?null:ee.reduce((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e),[]):Q);let re,oe=H;!s&&$&&z&&(oe=U.clientWidth),re=void 0!==R?R:p?null:0;const ie=L.id||(x?`mui-component-select-${x}`:void 0),ae=Te({},e,{variant:T,value:k,open:J,error:h}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return ga({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${so(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Zd,t)})(ae),le=Te({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ce=Zi();return fi.jsxs(o.Fragment,{children:[fi.jsx(np,Te({ref:G,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[b,ie].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:p||M?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),Y(!0,e))},onBlur:e=>{!J&&S&&(Object.defineProperty(e,"target",{writable:!0,value:{value:k,name:x}}),S(e))},onFocus:E},L,{ownerState:ae,className:wi(L.className,se.select,c),id:ie,children:ap(Z)?ep||(ep=fi.jsx("span",{className:"notranslate",children:"​"})):Z})),fi.jsx(op,Te({"aria-invalid":h,value:Array.isArray(k)?k.join(","):k,name:x,ref:j,"aria-hidden":!0,onChange:e=>{const t=K.find(t=>t.props.value===e.target.value);void 0!==t&&(O(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:p,className:se.nativeInput,autoFocus:a,ownerState:ae},q)),fi.jsx(rp,{as:m,className:se.icon,ownerState:ae}),fi.jsx(Ld,Te({id:`menu-${x||""}`,anchorEl:U,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:Te({"aria-labelledby":b,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ce},v.MenuListProps),slotProps:Te({},v.slotProps,{paper:Te({},le,{style:Te({minWidth:oe},null!=le?le.style:null)})}),children:ne}))]})}),lp=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],cp=["root"],up={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ms(e)&&"variant"!==e,slot:"Root"},dp=As(Su,up)(""),pp=As(Jd,up)(""),fp=As(pu,up)(""),hp=o.forwardRef(function(e,t){const n=Ts({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=oc,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:b=!1,native:v=!1,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:C,variant:E="outlined"}=n,I=qe(n,lp),D=v?$d:sp,M=_l({props:n,muiFormControl:Fl(),states:["variant","error"]}),A=M.variant||E,L=Te({},n,{variant:A,classes:a}),R=(e=>{const{classes:t}=e;return t})(L),P=qe(R,cp),T=p||{standard:fi.jsx(dp,{ownerState:L}),outlined:fi.jsx(pp,{label:h,ownerState:L}),filled:fi.jsx(fp,{ownerState:L})}[A],q=ta(t,wa(T));return fi.jsx(o.Fragment,{children:o.cloneElement(T,Te({inputComponent:D,inputProps:Te({children:i,error:M.error,IconComponent:u,variant:A,type:void 0,multiple:b},v?{id:d}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:g,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:Te({id:d},C)},f,{classes:f?Jr(P,f.classes):P},p?p.props.inputProps:{})},(b&&v||c)&&"outlined"===A?{notched:!0}:{},{ref:q,className:wi(T.props.className,s,R.root)},!p&&{variant:A},I))})});hp.muiName="Select";const mp={GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF"},gp={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",...mp,GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},bp=12,vp=14,yp=16,xp=24,Sp=3,wp=300,Cp=400,Ep=600,Ip=700,Dp={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};function Mp(e){return fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:fi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function Ap({fontSize:e="medium",children:t=null,className:n=""}={}){return fi.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function Lp(e={}){return fi.jsx(Ap,{...e,children:fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[fi.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),fi.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function Rp(e={}){return fi.jsx(Ap,{fontSize:"medium",...e,children:fi.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[fi.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),fi.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function Pp(e){return fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:fi.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function Tp(e={}){return fi.jsx(Ap,{...e,children:fi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:fi.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[fi.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),fi.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function qp(e={}){return fi.jsx(Ap,{fontSize:"medium",...e,children:fi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:fi.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:fi.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function kp({className:e}){return fi.jsx(Ap,{fontSize:"small",className:e,children:fi.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:fi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:fi.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:fi.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[fi.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),fi.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function Op(e={}){return fi.jsx(Ap,{...e,children:fi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:fi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:fi.jsx("rect",{stroke:gp.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}var Np=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:gp.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:gp.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:fi.jsx(Mp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${gp.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:gp.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${gp.MISC_FOCUS_BORDER}`,borderRadius:Sp,backgroundColor:gp.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${gp.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:gp.WHITE,color:gp.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:Sp},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${gp.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:gp.GREYSCALE_0_15,backgroundColor:gp.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:gp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${gp.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:gp.GREEN_PALE},"&:active":{backgroundColor:gp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:gp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(gp.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:gp.BLUE_PALE},"&:active":{backgroundColor:gp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:gp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(gp.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:Sp,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:gp.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${gp.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:gp.GREYSCALE_0_42,backgroundColor:gp.GREYSCALE_100_60,"&:active":{backgroundColor:gp.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:gp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${gp.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:gp.PURPLE,"&.Mui-focusVisible":{borderColor:gp.PURPLE,boxShadow:`0 0 0 3px ${Bi(gp.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:gp.GREEN,"&.Mui-focusVisible":{borderColor:gp.GREEN,boxShadow:`0 0 0 3px ${Bi(gp.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:gp.BLUE,"&.Mui-focusVisible":{borderColor:gp.BLUE,boxShadow:`0 0 0 3px ${Bi(gp.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:gp.ORANGE,"&.Mui-focusVisible":{borderColor:gp.ORANGE,boxShadow:`0 0 0 3px ${Bi(gp.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:gp.RED,"&.Mui-focusVisible":{borderColor:gp.RED,boxShadow:`0 0 0 3px ${Bi(gp.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:gp.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:gp.PURPLE_PALE},"&:active":{backgroundColor:gp.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:gp.PURPLE_PALE,boxShadow:`0 0 0 3px ${Bi(gp.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:gp.GREEN_PALE},"&:active":{backgroundColor:gp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:gp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(gp.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:gp.BLUE_PALE},"&:active":{backgroundColor:gp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:gp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(gp.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:gp.ORANGE_PALE},"&:active":{backgroundColor:gp.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:gp.ORANGE_PALE,boxShadow:`0 0 0 3px ${Bi(gp.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:gp.RED_PALE},"&:active":{backgroundColor:gp.RED_DARK},"&.Mui-focusVisible":{borderColor:gp.RED_PALE,boxShadow:`0 0 0 3px ${Bi(gp.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:gp.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:gp.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:Sp,boxShadow:`inset 0 0 0 2px ${gp.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:fi.jsx(Pp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:bp,borderRadius:Sp,color:gp.TEXT_PRIMARY,backgroundColor:gp.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:gp.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${gp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:gp.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:gp.GREYSCALE_0_05,color:gp.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:gp.GREEN,borderColor:gp.GREEN},"&.MuiChip-outlinedInfo":{color:gp.BLUE,borderColor:gp.BLUE},"&.MuiChip-outlinedWarning":{color:gp.ORANGE,borderColor:gp.ORANGE},"&.MuiChip-outlinedError":{color:gp.RED,borderColor:gp.RED}},outlined:{border:`solid 1px ${gp.GREYSCALE_0_15}`,backgroundColor:gp.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:Sp,boxShadow:"none",backgroundColor:gp.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:gp.GREEN,borderColor:gp.GREEN},outlinedSecondary:{color:gp.BLUE,borderColor:gp.BLUE},label:{fontFamily:Dp.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:fi.jsx(Pp,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:fi.jsx(Mp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:Sp},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:Sp,fontSize:vp,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:gp.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${gp.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:gp.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:gp.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:gp.GREYSCALE_0_05}}},popupIndicator:{borderRadius:Sp,border:`solid 1px ${gp.GREYSCALE_0_15}`,color:gp.GREYSCALE_0_60,marginRight:0,width:xp,height:xp},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${gp.GREYSCALE_0_15}`},clearIndicator:{borderRadius:Sp,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:gp.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:vp}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:bp,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:gp.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:gp.GREYSCALE_25,fontSize:bp,fontFamily:Dp.FONT_FAMILY,fontWeight:Ep,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:gp.TEXT_PRIMARY},"&.Mui-error":{color:gp.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:gp.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Cp,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:gp.TEXT_SECONDARY,content:"'(required)'",fontWeight:Cp,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:vp,lineHeight:"16px",backgroundColor:gp.WHITE,borderRadius:Sp,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${gp.GREYSCALE_0_05}`,borderColor:gp.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${gp.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${gp.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${gp.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${gp.RED}`,boxShadow:`0px 0px 0px 1px ${gp.RED}, inset 0 2px 0 0 ${gp.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${gp.GREYSCALE_0_10}`,borderColor:gp.GREYSCALE_0_10,backgroundColor:gp.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:gp.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:gp.GREYSCALE_0_15,borderRadius:Sp,boxShadow:`inset 0 2px 0 0 ${gp.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>fi.jsx(Mp,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:gp.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:gp.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:gp.GREYSCALE_0_03},"&:active":{backgroundColor:gp.GREYSCALE_0_10},"&:focus":{backgroundColor:gp.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${gp.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${gp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:gp.GREYSCALE_0_30,"&:hover":{backgroundColor:gp.GREYSCALE_0_0,borderColor:gp.GREYSCALE_0_15},"& ~svg":{color:gp.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${gp.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:Sp}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:gp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${gp.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:gp.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:vp,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:bp,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:bp,fontWeight:Ep,color:gp.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Ep}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${gp.GREYSCALE_0_15}, 0px 0px 0px 1px ${gp.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:fi.jsx(qp,{}),checkedIcon:fi.jsx(Rp,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:gp.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${gp.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:gp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(gp.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:gp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(gp.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:gp.GREYSCALE_0_20}},"&.Mui-disabled":{fill:gp.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:fi.jsx(Op,{}),checkedIcon:fi.jsx(Lp,{}),indeterminateIcon:fi.jsx(Tp,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:Sp,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:gp.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:gp.GREYSCALE_0_55,color:gp.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:gp.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:gp.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:gp.GREYSCALE_0_55,"&:hover":{color:gp.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:gp.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:gp.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:vp,color:gp.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Ep},secondary:{fontSize:bp,color:gp.GREYSCALE_45,fontWeight:Cp,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:vp,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:vp,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:gp.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:bp,borderBottom:`solid 1px ${gp.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:vp,color:gp.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:gp.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:gp.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:gp.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:gp.RED}}},"&.Mui-focusVisible":{backgroundColor:gp.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:gp.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:gp.GREEN,height:"24px","&.Mui-disabled":{color:gp.GREYSCALE_0_15}},rail:{backgroundColor:gp.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${gp.GREYSCALE_0_05}`,borderRadius:Sp,boxShadow:`inset 0px 0px 0px 1px ${gp.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${gp.GREYSCALE_0_05}`,borderRadius:Sp},thumb:{height:"16px",width:"16px",borderRadius:Sp,backgroundColor:gp.WHITE,boxShadow:`0px 1px 2px 0px ${gp.GREYSCALE_0_15}, 0px 0px 0px 1px ${gp.GREYSCALE_0_05}`,"&:hover":{borderRadius:Sp,boxShadow:`0 2px 4px 0 ${gp.GREYSCALE_0_30}, 0 0 0 1px ${gp.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${gp.GREYSCALE_0_15}, 0 0 0 1px ${gp.GREYSCALE_0_06}, 0 0 0 2px ${gp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${gp.GREYSCALE_0_15}, 0 0 0 1px ${gp.GREYSCALE_0_06}, 0 0 0 2px ${gp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:gp.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:gp.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:gp.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:gp.GREYSCALE_0_15},markLabel:{color:gp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:gp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:gp.WHITE,color:gp.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:gp.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:gp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(gp.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:gp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(gp.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:gp.GREYSCALE_0_15,borderRadius:Sp},thumb:{height:"16px",width:"16px",borderRadius:Sp,backgroundColor:gp.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:vp,fontWeight:Ep,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${gp.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${gp.MISC_FOCUS_BORDER}`,backgroundColor:gp.GREYSCALE_0_03,borderRadius:Sp},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:gp.GREYSCALE_25,"&.Mui-selected":{color:gp.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:vp,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:Sp,"&:hover":{backgroundColor:gp.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${gp.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${gp.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:Sp,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:gp.GREYSCALE_0_05},"&:hover":{backgroundColor:gp.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${gp.GREYSCALE_85}`,borderRight:`1px solid ${gp.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Ep,backgroundColor:gp.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:gp.GREYSCALE_98,borderBottom:`1px solid ${gp.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${gp.GREYSCALE_85}`,borderTop:`1px solid ${gp.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:gp.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:gp.GREYSCALE_0_05,"&:hover":{backgroundColor:gp.GREYSCALE_0_03}},"&&:hover":{backgroundColor:gp.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>fi.jsx(kp,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${gp.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:vp,borderRadius:Sp,padding:"7px 16px",border:`1px solid ${gp.GREYSCALE_0_15}`,backgroundColor:gp.GREYSCALE_100_60,color:gp.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:gp.GREYSCALE_0_10,border:`1px solid ${gp.GREYSCALE_0_30}`},"&:hover":{backgroundColor:gp.GREYSCALE_0_03,border:`1px solid ${gp.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:gp.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${gp.MISC_FOCUS_BORDER}`,border:`1px solid ${gp.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:gp.GREYSCALE_25,backgroundColor:gp.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:gp.GREYSCALE_0_10,border:`1px solid ${gp.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:bp,height:24,width:24,padding:7},sizeLarge:{fontSize:yp,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:vp,borderRadius:Sp}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:gp.GREYSCALE_20},tooltip:{backgroundColor:gp.GREYSCALE_20,fontSize:bp,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}});const _p=e=>({mode:"light",primary:{ultraLight:gp.GREEN_ULTRA_LIGHT,light:gp.GREEN_PALE,main:gp.GREEN,dark:gp.GREEN_DARK,extraDark:gp.GREEN_EXTRA_DARK,contrastText:gp.WHITE},secondary:{ultraLight:gp.BLUE_ULTRA_LIGHT,light:gp.BLUE_PALE,main:gp.BLUE,dark:gp.BLUE_DARK,extraDark:gp.BLUE_EXTRA_DARK,contrastText:gp.WHITE},error:{ultraLight:gp.RED_ULTRA_LIGHT,light:gp.RED_PALE,main:gp.RED,dark:gp.RED_DARK,extraDark:gp.RED_EXTRA_DARK,contrastText:gp.WHITE},warning:{ultraLight:gp.ORANGE_ULTRA_LIGHT,light:gp.ORANGE_PALE,main:gp.ORANGE,dark:gp.ORANGE_DARK,extraDark:gp.ORANGE_EXTRA_DARK,contrastText:gp.WHITE},success:{ultraLight:gp.GREEN_ULTRA_LIGHT,light:gp.GREEN_PALE,main:gp.GREEN,dark:gp.GREEN_DARK,extraDark:gp.GREEN_EXTRA_DARK,contrastText:gp.WHITE},info:{ultraLight:gp.BLUE_ULTRA_LIGHT,light:gp.BLUE_PALE,main:gp.BLUE,dark:gp.BLUE_DARK,extraDark:gp.BLUE_EXTRA_DARK,contrastText:gp.WHITE},text:{primary:gp.TEXT_PRIMARY,secondary:gp.TEXT_SECONDARY,disabled:gp.GREYSCALE_0_30},action:{hover:gp.GREYSCALE_0_03,hoverOpacity:.03,selected:gp.GREYSCALE_0_05,selectedOpacity:.05,focus:gp.MISC_FOCUS_BORDER},amethyst:{ultraLight:gp.WHITE,main:gp.PURPLE,light:gp.PURPLE_PALE,dark:gp.PURPLE_DARK,extraDark:gp.GREYSCALE_0_0,contrastText:gp.WHITE},background:{paper:gp.WHITE,default:gp.GREYSCALE_95},divider:gp.GREYSCALE_0_15}),jp=(e="light")=>us({components:Np(),palette:_p(),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:vp,fontWeightLight:wp,fontWeightRegular:Cp,fontWeightMedium:Ep,fontWeightBold:Ip,htmlFontSize:vp,fontFamily:Dp.FONT_FAMILY,button:{fontWeight:Ep,fontSize:vp,textTransform:"none"},body1:{fontSize:yp,lineHeight:"24px"},body2:{fontSize:vp,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:xp,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:yp,fontWeight:Ep,lineHeight:"16px"},h6:{fontSize:vp,fontWeight:Ep,lineHeight:"16px"},caption:{color:gp.TEXT_SECONDARY},subtitle1:{fontSize:vp,color:gp.TEXT_SECONDARY},subtitle2:{fontSize:bp,color:gp.TEXT_SECONDARY}},shape:{borderRadius:Sp}});function Fp(e){return"init"in e}function zp(e){return"function"==typeof e.write}function Wp(e){return"v"in e||"e"in e}function $p(e){if("e"in e)throw e.e;if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function Hp(e){return"function"==typeof(null==e?void 0:e.then)}function Bp(e){if(!(e instanceof Error))return!1;const t=e.name,n=e.message.toLowerCase();return("RangeError"===t||"InternalError"===t)&&(n.includes("call stack")||n.includes("too much recursion")||n.includes("stack overflow"))}function Vp(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function Gp(e,t,n){const r=n.get(e),o=null==r?void 0:r.t,i=t.p;if(!(null==o?void 0:o.size))return i;if(!i.size)return o;const a=new Set(o);for(const e of i)a.add(e);return a}const Up=()=>{const e={},t=new WeakMap,n=n=>{var r,o;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(o=t.get(n))||o.forEach(e=>e())};return n.add=(n,r)=>{const o=n||e;let i=t.get(o);return i||(i=new Set,t.set(o,i)),i.add(r),()=>{i.delete(r),i.size||t.delete(o)}},n};const Yp=(e,t,n,...r)=>n.read(...r),Kp=(e,t,n,...r)=>n.write(...r),Xp=(e,t,n)=>n.INTERNAL_onInit(t),Jp=(e,t,n,r)=>{var o;return null==(o=n.onMount)?void 0:o.call(n,r)},Zp=(e,t,n)=>{var r;const o=e[0];let i=o.get(n);if(!i){const a=e[6],s=e[9];i={d:new Map,p:new Set,n:0},o.set(n,i),null==(r=a.i)||r.call(a,n),function(e){return!!e.INTERNAL_onInit}(n)&&s(e,t,n)}return i},Qp=(e,t)=>{var n;const r=e[1],o=e[3],i=e[4],a=e[5],s=e[6],l=e[13];if(!(s.f||o.size||i.size||a.size))return;const c=[],u=e=>{try{e()}catch(e){c.push(e)}};do{s.f&&u(s.f);const c=new Set;for(const e of o){const t=null==(n=r.get(e))?void 0:n.l;if(t)for(const e of t)c.add(e)}o.clear();for(const e of a)c.add(e);a.clear();for(const e of i)c.add(e);i.clear();for(const e of c)u(e);o.size&&l(e,t)}while(o.size||a.size||i.size);if(c.length)throw new AggregateError(c)},ef=(e,n)=>{const r=e[1],o=e[2],i=e[3],a=e[11],s=e[14],l=e[17];if(!i.size)return;const c=[],u=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of i)f.push(t),h.push(a(e,n,t));for(;f.length;){const i=f.length-1,s=f[i],l=h[i];if(p.has(s))f.pop(),h.pop();else if(d.has(s)){if(o.get(s)===l.n)c.push(s),u.push(l);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&o.has(s))throw new Error("[Bug] invalidated atom exists");p.add(s),f.pop(),h.pop()}else{d.add(s);for(const t of Gp(s,l,r))d.has(t)||(f.push(t),h.push(a(e,n,t)))}}for(let t=c.length-1;t>=0;--t){const r=c[t],a=u[t];let d=!1;for(const e of a.d.keys())if(e!==r&&i.has(e)){d=!0;break}d&&(o.set(r,a.n),s(e,n,r),l(e,n,r)),o.delete(r)}},tf=new WeakSet,nf=(e,n,r)=>{var o,i;const a=e[1],s=e[2],l=e[3],c=e[6],u=e[7],d=e[11],p=e[12],f=e[13],h=e[14],m=e[16],g=e[17],b=e[20],v=e[26],y=e[28],x=d(e,n,r),S=y[0];if(Wp(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,o]of x.d)if(h(e,n,r).n!==o){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(r)){const t=!l.size;g(e,n,r),t&&(f(e,n),p(e,n))}},D=t=>{var o;if(t===r){const r=d(e,n,t);if(!Wp(r)){if(!Fp(t))throw new Error("no atom init");b(e,n,t,t.init)}return $p(r)}const i=h(e,n,t);try{return $p(i)}finally{C.delete(t),x.d.set(t,i.n),Hp(x.v)&&Vp(r,x.v,i),a.has(r)&&(null==(o=a.get(t))||o.t.add(r)),w||I()}};let M,A;const L={get signal(){return M||(M=new AbortController),M.signal},get setSelf(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),"production"===(t.meta.env?t.meta.env.MODE:void 0)||zp(r)||console.warn("setSelf function cannot be used with read-only atom"),!A&&zp(r)&&(A=(...o)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,r,o)}finally{f(e,n),p(e,n)}}),A}},R=x.n,P=s.get(r)===R;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&tf.delete(n);const i=u(e,n,r,D,L);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&tf.has(n)&&console.warn("Detected store mutation during atom read. This is not supported."),b(e,n,r,i),Hp(i)){v(e,n,i,()=>null==M?void 0:M.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(o=c.r)||o.call(c,r),x.m=S,x}catch(e){if(Bp(e))throw e;return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==R&&P&&(s.set(r,x.n),l.add(r),null==(i=c.c)||i.call(c,r))}},rf=(e,t,n)=>{const r=e[1],o=e[2],i=e[11],a=[n];for(;a.length;){const n=a.pop(),s=i(e,t,n);for(const l of Gp(n,s,r)){const n=i(e,t,l);o.get(l)!==n.n&&(o.set(l,n.n),a.push(l))}}},of=(e,n,r,o)=>{const i=e[3],a=e[6],s=e[8],l=e[11],c=e[12],u=e[13],d=e[14],p=e[15],f=e[16],h=e[17],m=e[20],g=e[28];let b=!0;const v=t=>$p(d(e,n,t)),y=(o,...s)=>{var d;const v=l(e,n,o);try{if(o===r){if(!Fp(o))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&tf.add(n);const r=v.n,l=s[0];return m(e,n,o,l),h(e,n,o),void(r!==v.n&&(++g[0],i.add(o),p(e,n,o),null==(d=a.c)||d.call(a,o)))}return f(e,n,o,s)}finally{b||(u(e,n),c(e,n))}};try{return s(e,n,r,v,y,...o)}finally{b=!1}},af=(e,t,n)=>{var r;const o=e[1],i=e[3],a=e[6],s=e[11],l=e[15],c=e[18],u=e[19],d=s(e,t,n),p=o.get(n);if(p&&d.d.size>0){for(const[o,u]of d.d)if(!p.d.has(o)){const d=s(e,t,o);c(e,t,o).t.add(n),p.d.add(o),u!==d.n&&(i.add(o),l(e,t,o),null==(r=a.c)||r.call(a,o))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const o=u(e,t,r);null==o||o.t.delete(n)}}},sf=(e,t,n)=>{var r;const o=e[1],i=e[4],a=e[6],s=e[10],l=e[11],c=e[12],u=e[13],d=e[14],p=e[16],f=e[18],h=l(e,t,n);let m=o.get(n);if(!m){d(e,t,n);for(const r of h.d.keys()){f(e,t,r).t.add(n)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},o.set(n,m),zp(n)&&function(e){return!!e.onMount}(n)){const r=()=>{let r=!0;const o=(...o)=>{try{return p(e,t,n,o)}finally{r||(u(e,t),c(e,t))}};try{const i=s(e,t,n,o);i&&(m.u=()=>{r=!0;try{i()}finally{r=!1}})}finally{r=!1}};i.add(r)}null==(r=a.m)||r.call(a,n)}return m},lf=(e,t,n)=>{var r,o;const i=e[1],a=e[5],s=e[6],l=e[11],c=e[19],u=l(e,t,n);let d=i.get(n);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(r=i.get(e))?void 0:r.d.has(n)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,i.delete(n);for(const r of u.d.keys()){const o=c(e,t,r);null==o||o.t.delete(n)}null==(o=s.u)||o.call(s,n)},cf=(e,t,n,r)=>{const o=e[11],i=e[27],a=o(e,t,n),s="v"in a,l=a.v;if(Hp(r))for(const i of a.d.keys())Vp(n,r,o(e,t,i));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,Hp(l)&&i(e,t,l))},uf=(e,t,n)=>$p((0,e[14])(e,t,n)),df=(e,t,n,...r)=>{const o=e[3],i=e[12],a=e[13],s=e[16],l=o.size;try{return s(e,t,n,r)}finally{o.size!==l&&(a(e,t),i(e,t))}},pf=(e,t,n,r)=>{const o=e[12],i=e[13],a=e[18],s=e[19],l=a(e,t,n).l;return l.add(r),i(e,t),o(e,t),()=>{l.delete(r),s(e,t,n),i(e,t),o(e,t)}},ff=(e,t,n,r)=>{const o=e[25];let i=o.get(n);if(!i){i=new Set,o.set(n,i);const e=()=>o.delete(n);n.then(e,e)}i.add(r)},hf=(e,t,n)=>{const r=e[25].get(n);null==r||r.forEach(e=>e())},mf=new WeakMap;function gf(e){const n=mf.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");const r=n[24];return r?r(n,e):n}function bf(...e){const t={get:e=>r(n,t,e),set:(e,...r)=>o(n,t,e,...r),sub:(e,r)=>i(n,t,e,r)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Yp,Kp,Xp,Jp,Zp,Qp,ef,nf,rf,of,af,sf,lf,cf,uf,df,pf,void 0,new WeakMap,ff,hf,[0]].map((t,n)=>e[n]||t);mf.set(t,Object.freeze(n));const r=n[21],o=n[22],i=n[23];return t}var vf=Object.freeze({__proto__:null,INTERNAL_addPendingPromiseToDependency:Vp,INTERNAL_buildStoreRev3:bf,INTERNAL_getBuildingBlocksRev3:gf,INTERNAL_getMountedOrPendingDependents:Gp,INTERNAL_hasInitialValue:Fp,INTERNAL_initializeStoreHooksRev3:function(e){return e.i||(e.i=Up()),e.r||(e.r=Up()),e.c||(e.c=Up()),e.m||(e.m=Up()),e.u||(e.u=Up()),e.f||(e.f=(()=>{const e=new Set,t=()=>e.forEach(e=>e());return t.add=t=>(e.add(t),()=>e.delete(t)),t})()),e},INTERNAL_isActuallyWritableAtom:zp,INTERNAL_isAtomStateInitialized:Wp,INTERNAL_isPromiseLike:Hp,INTERNAL_returnAtomValue:$p,INTERNAL_shouldThrowSynchronously:Bp});let yf,xf=0;function Sf(e,n){const r="atom"+ ++xf,o={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?o.read=e:(o.init=e,o.read=wf,o.write=Cf),n&&(o.write=n),o}function wf(e){return e(this)}function Cf(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Ef(){return bf()}const If=c(void 0);function Df(e){const n=h(If);return(null==e?void 0:e.store)||n||(yf||(yf=Ef(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=yf),globalThis.__JOTAI_DEFAULT_STORE__!==yf&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),yf)}function Mf({children:e,store:t}){const n=l(null);return t?r(If.Provider,{value:t},e):(null===n.current&&(n.current=Ef()),r(If.Provider,{value:n.current},e))}const Af=e=>"function"==typeof(null==e?void 0:e.then),Lf=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Rf=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Lf(e),e)}),Pf=new WeakMap,Tf=(e,t,n)=>{const r=gf(e),o=r[26];let i=Pf.get(t);return i||(i=new Promise((a,s)=>{let l=t;const c=e=>t=>{l===e&&a(t)},u=e=>t=>{l===e&&s(t)},d=()=>{try{const t=n();Af(t)?(Pf.set(t,i),l=t,t.then(c(t),u(t)),o(r,e,t,d)):a(t)}catch(e){s(e)}};t.then(c(t),u(t)),o(r,e,t,d)}),Pf.set(t,i)),i};function qf(e,t){const{delay:r,unstable_promiseStatus:o=!n.use}={},i=Df(t),[[a,s,l],c]=u(t=>{const n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]);let f=a;if(s===i&&l===e||(c(),f=i.get(e)),d(()=>{const t=i.sub(e,()=>{if(o)try{const t=i.get(e);Af(t)&&Lf(Tf(i,t,()=>i.get(e)))}catch(e){}if("number"==typeof r)return console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n atom: Atom<Value>,\n options: { delay: number },\n): Value {\n const { delay } = options\n const store = useStore(options)\n const [value, setValue] = useState(() => store.get(atom))\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n setTimeout(() => setValue(store.get(atom)), delay)\n })\n return unsub\n }, [store, atom, delay])\n return value\n}\n"),void setTimeout(c,r);c()});return c(),t},[i,e,r,o]),p(f),Af(f)){const t=Tf(i,f,()=>i.get(e));return o&&Lf(t),Rf(t)}return f}function kf(e,n){const r=Df(n);return f((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function Of(e,t){return[qf(e,t),kf(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let o,i;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}o=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let o;try{o=JSON.parse(e||"",null==n?void 0:n.reviver)}catch(e){o=r}t(o)})))}();const Nf=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),_f=new WeakMap,jf=()=>{};const Ff=new WeakMap;function zf(e,t){const n=Df(t),r=Wf(n);for(const[o,...i]of e)r.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(o),n.set(o,...i))}const Wf=e=>{let t=Ff.get(e);return t||(t=new WeakSet,Ff.set(e,t)),t};function $f(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}const Hf="INTERNAL_getBuildingBlocksRev",Bf=Number(Object.keys(vf).find(e=>e.startsWith(Hf))?.slice(29));if(Number.isNaN(Bf))throw new Error("jotai-compat: unsupported jotai internals revision");const Vf=vf,Gf=`INTERNAL_getBuildingBlocksRev${Bf}`,Uf=Vf[`INTERNAL_initializeStoreHooksRev${Bf}`],Yf=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(Bf>=4)for(const[e,t]of Yf)if(Vf[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const Kf={};Yf.forEach(([e,t],n)=>{Kf[`INTERNAL_KEY_${e}`]=Bf>=4?t:n});const{INTERNAL_KEY_mountedMap:Xf,INTERNAL_KEY_changedAtoms:Jf,INTERNAL_KEY_storeHooks:Zf,INTERNAL_KEY_ensureAtomState:Qf,INTERNAL_KEY_flushCallbacks:eh,INTERNAL_KEY_recomputeInvalidatedAtoms:th,INTERNAL_KEY_readAtomState:nh,INTERNAL_KEY_invalidateDependents:rh,INTERNAL_KEY_writeAtomState:oh,INTERNAL_KEY_mountDependencies:ih,INTERNAL_KEY_setAtomStateValueOrPromise:ah}=Kf,sh=Vf[Gf],lh=new WeakMap;function ch(e){const t=Sf(()=>[]),n=Sf(function(e){const[r,o,i]=e(t);i.has(n)&&(r.forEach(e),++o.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=(e=>{const t=sh(e);let n=lh.get(t);return n||(n=Array.isArray(t)?[]:{},Yf.forEach(([e,r],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[o],enumerable:!0};Object.defineProperty(n,o,i),Object.defineProperty(n,r,i)}),lh.set(t,n)),n})(e),o=r[Xf],i=r[Jf],a=Uf(r[Zf]),s=r[Qf],l=r[eh],c=r[th],u=r[nh],d=r[rh],p=r[oh],f=r[ih],h=r[ah],m=new Set;let g,b=0,v=!1,y=!1,x=!1;function S(){if(b)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===n){const t=s(r,e,i);if(!Wp(t)){if(!Fp(i))throw new Error("no atom init");h(r,e,i,i.init)}return $p(t)}const a=u(r,e,i);try{return $p(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(n),t?m.add(i):o.has(i)&&(f(r,e,n),c(r,e),l(r,e))}};w.peek=e.get;const E=(o,...u)=>{const m=s(r,e,o);try{if(++b,o===n){if(!Fp(o))throw new Error("atom not writable");const t=m.n,n=u[0];return h(r,e,o,n),f(r,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(r,e,o)))}return p(r,e,o,u)}finally{t||(c(r,e),l(r,e)),--b}};E.recurse=(t,...o)=>{if(x){if($f())throw new Error("set.recurse is not allowed in cleanup")}else try{return v=!0,f(r,e,n),E(t,...o)}finally{c(r,e),v=!1,y&&(y=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!b)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),c(r,e)}}const w=function(e,t){let n=uh.get(e);n||(n=new Set,uh.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(n,function(){i.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){v?y=!0:w.add(S)})},$f()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const uh=new WeakMap;const dh=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionToAlternative(n):await t.moveMeasureToAlternative(n))},ph=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionFromAlternative(n):await t.moveMeasureFromAlternative(n))},fh=e=>{const{type:t,handler:n,model:r,fieldTypeById:o,handlerQueue:i}=e;void 0!==n&&void 0!==r&&i&&i.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await ph(o,n,t);for(const t of e.localUnchecked)await dh(o,n,t);break;case"checked":await ph(o,n,e.cId);break;case"unchecked":await dh(o,n,e.cId)}})},hh=Sf(),mh=Sf(),gh=Sf(),bh=Sf(e=>t=>e(gh)?.getBooleanFlag(t,!1)??!1),vh=Sf(e=>e(gh)?.logInfo??(()=>{})),yh=Sf(e=>e(gh)?.translate??(e=>e)),xh=Sf(""),Sh=Sf(e=>{const t=e(xh).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),wh=Sf(e=>e(gh)?.getBooleanFlag??(()=>!1)),Ch=e=>"string"==typeof e,Eh=e=>"number"==typeof e,Ih=e=>"boolean"==typeof e,Dh=e=>e instanceof Error,Mh=e=>e instanceof Set,Ah=e=>e instanceof Map,Lh=e=>{if(e instanceof Error)return e.message;if(null===e)return"null";if(void 0===e)return"undefined";if(Ch(e))return e;if(Mh(e))try{return JSON.stringify([...e])}catch{return"Failed to serialize Set"}if(Ah(e))try{return JSON.stringify(Object.fromEntries(e))}catch{return"Failed to serialize Map"}try{return JSON.stringify(e)}catch{return"Failed to serialize value"}},Rh=e=>{if(null!=e){if(Ch(e))return e;if(Dh(e))return Lh(e);if(Eh(e)||Ih(e))return String(e);if(Array.isArray(e)||Mh(e)||Ah(e))return Lh(e);if("object"==typeof(t=e)&&null!==t&&!Array.isArray(t)){const t={};return Object.entries(e).forEach(([e,n])=>{Ch(n)||Eh(n)||Ih(n)?t[e]=n:t[e]=Lh(n)}),t}var t;return Lh(e)}},Ph=(e,t={})=>{const{tag:n}=t,r=({msg:t,payload:r})=>{const o=((e,t)=>{const n=[];return Ch(t)&&t.length>0?n.push(t):Array.isArray(t)&&n.push(...t.filter(e=>"string"==typeof e&&e.length>0)),n.length>0?`${n.map(e=>`[${e}]`).join("")} ${e}`:e})(t,n);return(e=>{if(!Dh(e))return!1;switch(e.message){case"Session suspended":case"Socket closed":return!0;default:return!1}})(r)||e.anything?.logInfo?.(o,Rh(r)),o};return{warn:({msg:e,payload:t})=>{r({msg:e,payload:t})},error:({msg:e,payload:t})=>{r({msg:e,payload:t})}}},Th=Sf({}),qh=Sf(e=>{const t=e(Th);return e=>t.flags.isEnabled(e)}),kh=Sf(e=>{const t=e(Th);return Ph(t,{tag:"sn-pivot-table"})}),Oh=e=>7005!==e.qError?.qErrorCode,Nh=new WeakMap,_h={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},jh=function(e,n=jf){return((e,t,n)=>{const r=Nf(()=>new WeakMap,_f,t);return Nf(e,r,n)})(()=>{const r=new WeakMap,o=new WeakMap,i=Sf(0),a=Sf([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(i.debugPrivate=!0,a.debugPrivate=!0);const s=Sf(t=>{let l;t(i);try{l=t(s)}catch(e){}const c=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(c))return{v:c};if(c!==(null==l?void 0:l.p)&&c.then(e=>{o.set(c,e);const[n]=t(a);n()},e=>{r.set(c,e);const[n]=t(a);n()}),r.has(c)){if(l&&"e"in l&&l.p===c)return l;const e=r.get(c);return l&&"v"in l?{p:c,e:e,v:l.v}:{p:c,e:e}}return o.has(c)?{p:c,v:o.get(c)}:l&&"v"in l?{p:c,f:n(l.v),v:l.v}:{p:c,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),Sf(e=>{const t=e(s);if("e"in t)throw t.e;return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(Sf(async e=>{const t=e(hh),n=e(vh),r=Ph({anything:{logInfo:n}},{tag:"sn-pivot-table"});if(t){if(Nh.has(t))return Nh.get(t);try{const e=await t.app.createSessionObject(_h);return Nh.set(t,e),e}catch(e){return void r.error({msg:"Error creating alternative layout model",payload:e})}}})),Fh=Sf(null),zh=e=>e.qDef?.cId,Wh=(e=[])=>new Set(e.map(zh).filter(e=>void 0!==e)),$h=({effectiveActive:e,effectiveExcluded:t,currentKnown:n})=>{const r=Wh(n),o=Wh([...e,...t]),i=new Set,a=n.filter(e=>{const t=zh(e);return!(!t||o.has(t)||i.has(t))&&(i.add(t),!0)}),s=t.flatMap((e,t)=>{const n=zh(e);return void 0===n||r.has(n)?[]:[t]});return{kept:t.filter((e,t)=>!s.includes(t)),missing:a,removedIndexes:s}},Hh=(e,{removedIds:t,added:n})=>{if(!e)return e;const r=(e,t)=>[...e,...t.filter(t=>!e.includes(t))],o=o=>{const i=e[o];return i&&r(i.filter(e=>-1===e||!t.has(e)),n[o])},i=e.measures&&r(e.measures.filter(e=>!t.has(e)),n.measures);return{...e,rows:o("rows"),columns:o("columns"),measures:i}},Bh=(e,t)=>{if(!("qHyperCubeDef"in t))return e;const n=e.qHyperCubeDef,r=t.qHyperCubeDef,o=n.qLayoutExclude?.qHyperCubeDef,i=r.qLayoutExclude?.qHyperCubeDef,a=o?.qDimensions??[],s=$h({effectiveActive:n?.qDimensions??[],effectiveExcluded:a,currentKnown:[...r?.qDimensions??[],...i?.qDimensions??[]]}),l=$h({effectiveActive:n?.qMeasures??[],effectiveExcluded:o?.qMeasures??[],currentKnown:[...r?.qMeasures??[],...i?.qMeasures??[]]});if(![s,l].some(({missing:e,removedIndexes:t})=>e.length>0||t.length>0))return e;const c=n.excludedNoOfLeftDims,u=void 0===c||-1===c?a.length:c,d=s.removedIndexes.filter(e=>e<u).length,p=u-d,f=s.missing.filter(e=>"rows"===((e,t)=>{const n=(e.qDimensions??[]).findIndex(e=>zh(e)===t);if(-1!==n){const{qNoOfLeftDims:t,qInterColumnSortOrder:r}=e;return void 0===t||-1===t||r.indexOf(n)<t?"rows":"columns"}const r=(e.qLayoutExclude?.qHyperCubeDef?.qDimensions??[]).findIndex(e=>zh(e)===t),{excludedNoOfLeftDims:o}=e;return void 0===o||-1===o||r<o?"rows":"columns"})(r,zh(e)??"")),h=s.missing.filter(e=>!f.includes(e)),m=[...s.kept.slice(0,p),...f,...s.kept.slice(p),...h],g=-1===c&&0===h.length?-1:p+f.length,b=new Set([...s.removedIndexes.map(e=>zh(a[e])??""),...l.removedIndexes.map(e=>zh(o?.qMeasures?.[e]??{})??"")]);return{...e,qHyperCubeDef:{...n,excludedNoOfLeftDims:g,rankedList:Hh(n.rankedList,{removedIds:b,added:{rows:[...Wh(f)],columns:[...Wh(h)],measures:[...Wh(l.missing)]}}),qLayoutExclude:{...n.qLayoutExclude,qHyperCubeDef:{...o,qDimensions:m,qMeasures:[...l.kept,...l.missing]}}}}},Vh=Sf(),Gh=ch((e,t)=>{const n=e(hh),r=e(jh),o=e(kh),i=e(bh),a=e(mh);let s=0,l=!1;if(!n||!r)return;const c=async()=>{s++;try{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=structuredClone(await n.getEffectiveProperties()),s=i("VNA-760-show-added-columns-exploration")?Bh(o,await n.getProperties()):o;await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const l=await r.getLayout();s!==o&&a?.setProperties(structuredClone(s)),t(Vh,{layout:structuredClone(e),properties:s,altLayout:structuredClone(l)}),t(Fh,null)}catch(e){o.error({msg:"Failed to synchronize exploration layout",payload:e})}finally{s--,0===s&&l&&(l=!1,u())}},u=async()=>{if(s>0)return void(l=!0);const e=await r.getLayout();t(Vh,t=>({...t,altLayout:structuredClone(e)}))};return c(),n.Invalidated.bind(c),r.Invalidated.bind(u),()=>{n.Invalidated.unbind(c),r.Invalidated.unbind(u)}}),Uh=Sf(e=>e(Vh)?.layout),Yh=Sf(e=>e(Vh)?.altLayout),Kh=Sf(e=>e(Vh)?.properties),Xh=Sf(e=>{const t=e(Vh)?.layout;return t?.qHyperCube.qDimensionInfo.filter(Oh)??[]}),Jh=Sf(e=>{const t=e(Vh)?.layout;return t?.qHyperCube.qMeasureInfo.filter(Oh)??[]}),Zh=(e,t)=>{e?.forEach(e=>{7005===e.qError?.qErrorCode&&t.add(e.cId)})},Qh=Sf(e=>{const t=e(Vh),n=new Set;return Zh(t?.layout?.qHyperCube.qDimensionInfo,n),Zh(t?.altLayout?.qHyperCube.qDimensionInfo,n),n}),em=Sf(e=>{const t=e(Vh),n=new Set;return Zh(t?.layout?.qHyperCube.qMeasureInfo,n),Zh(t?.altLayout?.qHyperCube.qMeasureInfo,n),n}),tm=Sf(e=>{const t=e(Kh),n=new Map;return t?(t.qHyperCubeDef.qDimensions.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qMeasures.forEach(e=>{n.set(e.qDef.cId,"measure")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions?.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures?.forEach(e=>{n.set(e.qDef.cId,"measure")}),n):n});class nm{#e=[];#t=!1;#n=!1;#r;#o;#i;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;var n;await(n=e,new Promise(e=>{setTimeout(e,n)})),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const rm=Sf(null),om=ch((e,t)=>{const n=e(hh),r=e(mh),o=new nm({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(rm,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return n?.Invalidated?.bind(i),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{o.abort(),n?.Invalidated?.unbind(i),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),im=Sf(e=>{const t=[...e(Xh),...e(Jh)].map(e=>e.cId);return new Set(t)}),am=Sf(new Set),sm=Sf(new Set),lm=Sf(e=>{const t=e(am),n=e(sm);return e(im).difference(n).union(t)}),cm=ch((e,t)=>{e(im),t(am,new Set),t(sm,new Set)}),um=Sf(e=>e(lm),(e,t,n)=>{if("string"!=typeof n)return;const r=e(lm).has(n),o=new Set(e(sm)),i=new Set(e(am));r?(o.add(n),i.delete(n)):(i.add(n),o.delete(n)),t(sm,o),t(am,i),fh({type:r?"unchecked":"checked",cId:n,handler:e(mh),model:e(hh),fieldTypeById:e(tm),handlerQueue:e(rm)})}),dm=({props:e,children:t})=>(zf([[hh,e.args.model],[gh,e.args.apis],[mh,e.args.handler]]),qf(cm),qf(Gh),qf(om),t);function pm(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function fm(e){return"write"in e}const hm="INTERNAL_getBuildingBlocksRev";var mm;const gm=Number(null==(mm=Object.keys(vf).find(e=>e.startsWith(hm)))?void 0:mm.slice(29));if(Number.isNaN(gm))throw new Error("jotai-compat: unsupported jotai internals revision");const bm=vf,vm=`INTERNAL_getBuildingBlocksRev${gm}`,ym=bm[`INTERNAL_buildStoreRev${gm}`];const xm=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(gm>=4)for(const[e,t]of xm)if(bm[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const Sm={};xm.forEach(([e,t],n)=>{Sm[e]=gm>=4?t:n});const{atomStateMap:wm,mountedMap:Cm,invalidatedAtoms:Em,changedAtoms:Im,mountCallbacks:Dm,unmountCallbacks:Mm,storeHooks:Am,atomRead:Lm,atomWrite:Rm,atomOnInit:Pm,atomOnMount:Tm,ensureAtomState:qm,flushCallbacks:km,recomputeInvalidatedAtoms:Om,readAtomState:Nm,invalidateDependents:_m,writeAtomState:jm,mountDependencies:Fm,mountAtom:zm,unmountAtom:Wm,setAtomStateValueOrPromise:$m,storeGet:Hm,storeSet:Bm,storeSub:Vm,enhanceBuildingBlocks:Gm,abortHandlersMap:Um,registerAbortHandler:Ym,abortPromise:Km,storeEpochHolder:Xm}=Sm,Jm=bm[vm],Zm=new WeakMap,Qm=new WeakMap,eg={},{read:tg,write:ng}=Sf(null);function rg(e,t,n){const[r,o,i,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=o.get(t);return r||(r=[sg(e,t,n),n],o.set(t,r)),r}const l=n??eg;let c=i.get(l);c||(c=new WeakMap,i.set(l,c));let u=c.get(t);if(!u){const[r,o]=a?rg(a,t,n):[t];u=[t.read===tg?r:sg(e,t,o),o],c.set(t,u)}return u}function og(e){for(const t of e[5])t()}function ig(e,t,n,r,o){if(n.read===tg&&fm(n)&&fm(t)&&n.write!==ng&&e!==r){const{write:i}=n;return t.write=ag(e,n.write.bind(n),r,o),()=>{t.write=i}}}function ag(e,t,n,r=n){return function(o,i,...a){return t(function(t){const[r]=rg(e,t,n);return o(r)},function(t,...o){const[a]=rg(e,t,n),s=ig(e,a,t,n,r);try{return i(a,...o)}finally{null==s||s()}},...a)}}function sg(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,r);return i.read!==tg&&(i.read=function(e,t,n){return function(r,o){return t(function(t){const[o]=rg(e,t,n);return r(o)},o)}}(e,t.read.bind(t),n)),fm(i)&&fm(t)&&i.write!==ng&&(i.write=ag(e,t.write.bind(t),n)),i}function lg({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const o=new WeakSet(e),i=Qm.get(n),a=(null==i?void 0:i[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],c=s[5],u=function(e){const t=e[3],n=cg((e=>{const t=Jm(e);let n=Zm.get(t);return n||(n=Array.isArray(t)?[]:{},xm.forEach(([e,r],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[o],enumerable:!0};Object.defineProperty(n,o,i),Object.defineProperty(n,r,i)}),Zm.set(t,n)),n})(t)),r=n,o=r[Sm.storeGet],i=r[Sm.storeSet],a=r[Sm.storeSub],s={};let l,c;return r[Sm.storeGet]=m(o),r[Sm.storeSet]=f,r[Sm.storeSub]=m(a),n[Sm.enhanceBuildingBlocks]=function(e){return l??(l=g(e[Sm.atomStateMap],u)),c??(c=Object.assign(cg(e),{...e,[Sm.atomStateMap]:l,[Sm.mountedMap]:g(e[Sm.mountedMap],d),[Sm.invalidatedAtoms]:g(e[Sm.invalidatedAtoms]),[Sm.changedAtoms]:b(e[Sm.changedAtoms]),[Sm.mountCallbacks]:e[Sm.mountCallbacks],[Sm.unmountCallbacks]:e[Sm.unmountCallbacks],[Sm.storeHooks]:y(e[Sm.storeHooks]),[Sm.atomRead]:m(e[Sm.atomRead]),[Sm.atomWrite]:m(e[Sm.atomWrite]),[Sm.atomOnInit]:m(e[Sm.atomOnInit]),[Sm.atomOnMount]:m(e[Sm.atomOnMount]),[Sm.ensureAtomState]:p(l,e[Sm.ensureAtomState]),[Sm.flushCallbacks]:(t,...r)=>e[Sm.flushCallbacks](n,...r),[Sm.recomputeInvalidatedAtoms]:(t,...r)=>e[Sm.recomputeInvalidatedAtoms](n,...r),[Sm.readAtomState]:m(e[Sm.readAtomState]),[Sm.invalidateDependents]:m(e[Sm.invalidateDependents]),[Sm.writeAtomState]:m(e[Sm.writeAtomState]),[Sm.mountDependencies]:m(e[Sm.mountDependencies]),[Sm.mountAtom]:m(e[Sm.mountAtom]),[Sm.unmountAtom]:m(e[Sm.unmountAtom]),[$m]:m(e[$m]),[Sm.storeGet]:m(e[Sm.storeGet]),[Sm.storeSet]:m(e[Sm.storeSet]),[Sm.storeSub]:m(e[Sm.storeSub]),[Sm.enhanceBuildingBlocks]:()=>e})),c},function(e){if(gm<4){const t=e?Object.values(e):[];return ym(...t)}const t=Array.isArray(e)?Object.fromEntries(xm.map(([t,n],r)=>[n,e[r]])):e;return ym(t)}(n);function u(t){const n=new WeakMap;return function(r){let o=n.get(r);if(o)return o;const i=t(r);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,n)=>"d"===n?a??(a=g(i.d,function(t){return n=>t(rg(e,n)[0])})):"p"===n?s??(s=b(i.p)):Reflect.get(i,n)}),n.set(r,o),o}}function d(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const o=e(n);return o?(r={...o,d:b(o.d),t:b(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(n,r),r):void 0}}function p(e,t){const n=m(t);return function(t,r,o){const i=e.get(o);if(i)return i;const a=n(t,r,o);return e.set(o,a),e.get(o)}}function f(t,n,r,...o){const[a,s]=rg(e,r),l=ig(e,a,r,s,e);try{return i(t,n,a,...o)}finally{null==l||l()}}function h(t,n){return function(r,...o){const[i]=rg(e,r);return(n?n(t):t)(i,...o)}}function m(t){return function(r,o,i,...a){const[s]=rg(e,i);return t(n,o,s,...a)}}function g(e,t){const n={get:h(e.get.bind(e),t),set:h(e.set.bind(e)),has:h(e.has.bind(e)),delete:h(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function b(t){return{get size(){return t.size},add:h(t.add.bind(t)),has:h(t.has.bind(t)),delete:h(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(h(e)),*[Symbol.iterator](){for(const n of t)yield rg(e,n)[0]}}}function v(t){if(!t)return;const n=h(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[o]=rg(e,n);return t.add(o,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(n){delete s[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=u,Object.assign(u,{name:r}),Qm.set(u,s);for(const t of new Set(e))l.set(t,[sg(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[sg(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[sg(s,t,s),s])});c.add(t)}return u}function cg(e){return Array.isArray(e)?[...e]:{...e}}const ug=function(e,t){return function(n){const{atoms:o=[],atomFamilies:i=[],children:a,scope:s,name:l}=n,c=t(),u=Array.from(o,e=>Array.isArray(e)?e[0]:e);function p(){return[s??lg({atoms:u,atomFamilies:i,parentStore:c,name:l}),function(e){return c!==e.parentStore||!pm(u,e.atoms)||!pm(i,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:u,atomFamilies:i,parentStore:c,providedScope:s})){const e=Qm.get(f);e&&og(e),g(p)}return zf(Array.from(o).filter(Array.isArray),{store:f}),d(()=>{const e=Qm.get(f);return()=>{e&&og(e)}},[f]),r(e,{store:f,children:a})}}(Mf,Df);var dg=Object.defineProperty,pg=Object.defineProperties,fg=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,mg=Object.prototype.hasOwnProperty,gg=Object.prototype.propertyIsEnumerable,bg=(e,t,n)=>t in e?dg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vg=(e,t)=>{for(var n in t||(t={}))mg.call(t,n)&&bg(e,n,t[n]);if(hg)for(var n of hg(t))gg.call(t,n)&&bg(e,n,t[n]);return e},yg=(e,t)=>pg(e,fg(t));function xg(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function Sg(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function wg(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Cg(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(wg(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&wg(i)){const r=null==i.initialGroup?void 0:Sg(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:Sg(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return yg(vg({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return yg(vg({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=Sg(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&wg(i)){const t=null==i.group?void 0:Sg(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return yg(vg({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return yg(vg({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return yg(vg({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[u][p];return yg(vg({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,xg)}function Eg(e,t){let n=null;const r=new Map,o=new Set;function i(o){let s;if(void 0===t)s=r.get(o);else for(const[e,n]of r)if(t(e,o)){s=n;break}if(void 0!==s){if(!n?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,o]]of r)n(o,e)&&(r.delete(e),a("REMOVE",e,t))},i}const Ig=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,Dg=Sf(),Mg=Sf(e=>e(Dg)?.numberOfSections??0),Ag=Sf(e=>e(Dg)?.numberOfItemsInSection??[]),Lg=Sf(e=>e(Dg)?.keyExtractor??Ig),Rg=Sf(e=>e(Dg)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),Pg=Sf(e=>e(Dg)?.onDragEnd),Tg=Sf(e=>e(Dg)?.onDragOver),qg=Sf(e=>e(Dg)?.itemRenderer),kg=Sf(e=>e(Dg)?.headerRenderer),Og=Sf(e=>e(Dg)?.dragOverlayRenderer),Ng=Sf(e=>e(Dg)?.onClick),_g=Sf(e=>{const t=e(Mg),n=e(Ag),r=e(Lg),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return o}),jg=Sf(null),Fg=Sf(e=>e(jg),(e,t,n)=>{if(null===n)return void t(jg,null);const r=e(jg);t(jg,{...r,...n})}),zg=Eg(e=>Sf(null,(t,n,r)=>{let o;"over"===e?o=t(Tg):"end"===e&&(o=t(Pg),n(Fg,null));const{source:i,target:a}=r.operation;if("start"===e)return void n(Fg,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void n(Fg,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=Cg(t(_g),r)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(Fg)?.startIndex;n(Fg,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(Fg)?.startSection??i.data.sectionKey,event:r})})),Wg=[Dg,Mg,Ag,Lg,Rg,Pg,qg,kg,Ng,Fg],$g=[zg],Hg=({props:e,children:t})=>{const n=kf(Dg);return g(()=>{n(e)},[e,n]),t};var Bg=Symbol.for("preact-signals");function Vg(){if(Jg>1)Jg--;else{var e,t=!1;for(!function(){var e=tb;for(tb=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var n=t.t;void 0!==n;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}}();void 0!==Xg;){var n=Xg;for(Xg=void 0,Zg++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&ab(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Zg=0,Jg--,t)throw e}}function Gg(e){if(Jg>0)return e();eb=++Qg,Jg++;try{return e()}finally{Vg()}}var Ug,Yg=void 0;function Kg(e){var t=Yg,n=Ug;Yg=void 0,Ug=void 0;try{return e()}finally{Yg=t,Ug=n}}var Xg=void 0,Jg=0,Zg=0,Qg=0,eb=0,tb=void 0,nb=0;function rb(e){if(void 0!==Yg){var t=e.n;if(void 0===t||t.t!==Yg)return t={i:0,S:e,p:Yg.s,n:void 0,t:Yg,e:void 0,x:void 0,r:t},void 0!==Yg.s&&(Yg.s.n=t),Yg.s=t,e.n=t,32&Yg.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=Yg.s,t.n=void 0,Yg.s.n=t,Yg.s=t),t}}function ob(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function ib(e,t){return new ob(e,t)}function ab(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function sb(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function lb(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function cb(e,t){ob.call(this,void 0,t),this.x=e,this.s=void 0,this.g=nb-1,this.f=4}function ub(e,t){return new cb(e,t)}function db(e){var t=e.m;if(e.m=void 0,"function"==typeof t){Jg++;var n=Yg;Yg=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,pb(e),t}finally{Yg=n,Vg()}}}function pb(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,db(e)}function fb(e){if(Yg!==this)throw new Error("Out-of-order effect");lb(this),Yg=e,this.f&=-2,8&this.f&&pb(this),Vg()}function hb(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,Ug&&Ug.push(this)}function mb(e,t){var n=new hb(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}ob.prototype.brand=Bg,ob.prototype.h=function(){return!0},ob.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:Kg(function(){var e;null==(e=t.W)||e.call(t)}))},ob.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&Kg(function(){var e;null==(e=t.Z)||e.call(t)}))}},ob.prototype.subscribe=function(e){var t=this;return mb(function(){var n=t.value;Kg(function(){return e(n)})},{name:"sub"})},ob.prototype.valueOf=function(){return this.value},ob.prototype.toString=function(){return this.value+""},ob.prototype.toJSON=function(){return this.value},ob.prototype.peek=function(){var e=this;return Kg(function(){return e.value})},Object.defineProperty(ob.prototype,"value",{get:function(){var e=rb(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Zg>100)throw new Error("Cycle detected");!function(e){0!==Jg&&0===Zg&&e.l!==eb&&(e.l=eb,tb={S:e,v:e.v,i:e.i,o:tb})}(this),this.v=e,this.i++,nb++,Jg++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Vg()}}}}),cb.prototype=new ob,cb.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===nb)return!0;if(this.g=nb,this.f|=1,this.i>0&&!ab(this))return this.f&=-2,!0;var e=Yg;try{sb(this),Yg=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Yg=e,lb(this),this.f&=-2,!0},cb.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}ob.prototype.S.call(this,e)},cb.prototype.U=function(e){if(void 0!==this.t&&(ob.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},cb.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(cb.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=rb(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),hb.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},hb.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,db(this),sb(this),Jg++;var e=Yg;return Yg=this,fb.bind(this,e)},hb.prototype.N=function(){2&this.f||(this.f|=2,this.u=Xg,Xg=this)},hb.prototype.d=function(){this.f|=8,1&this.f||pb(this)},hb.prototype.dispose=function(){this.d()};var gb,bb,vb,yb,xb,Sb,wb,Cb,Eb,Ib,Db,Mb,Ab,Lb,Rb,Pb,Tb,qb,kb,Ob,Nb=Object.create,_b=Object.defineProperty,jb=Object.defineProperties,Fb=Object.getOwnPropertyDescriptor,zb=Object.getOwnPropertyDescriptors,Wb=Object.getOwnPropertySymbols,$b=Object.prototype.hasOwnProperty,Hb=Object.prototype.propertyIsEnumerable,Bb=e=>{throw TypeError(e)},Vb=(e,t,n)=>t in e?_b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gb=(e,t)=>_b(e,"name",{value:t,configurable:!0}),Ub=["class","method","getter","setter","accessor","field","value","get","set"],Yb=e=>void 0!==e&&"function"!=typeof e?Bb("Function expected"):e,Kb=(e,t,n,r,o)=>({kind:Ub[e],name:t,metadata:r,addInitializer:e=>n._?Bb("Already initialized"):o.push(Yb(e||null))}),Xb=(e,t)=>{return Vb(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Jb=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Zb=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Ub[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Fb(d<4?o:{get[n](){return tv(this,i)},set[n](e){return rv(this,i,e)}},n));d?f&&d<4&&Gb(i,(d>2?"set ":d>1?"get ":"")+n):Gb(o,n);for(var y=r.length-1;y>=0;y--)c=Kb(d,n,l={},e[3],b),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>ev(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?tv:ov)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>rv(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,c),l._=1,4^d||void 0===s?Yb(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?Bb("Object expected"):(Yb(a=s.get)&&(v.get=a),Yb(a=s.set)&&(v.set=a),Yb(a=s.init)&&g.unshift(a));return d||Xb(e,o),v&&_b(o,n,v),f?4^d?i:v:o},Qb=(e,t,n)=>t.has(e)||Bb("Cannot "+n),ev=(e,t)=>Object(t)!==t?Bb('Cannot use the "in" operator on this value'):e.has(t),tv=(e,t,n)=>(Qb(e,t,"read from private field"),n?n.call(e):t.get(e)),nv=(e,t,n)=>t.has(e)?Bb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),rv=(e,t,n,r)=>(Qb(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ov=(e,t,n)=>(Qb(e,t,"access private method"),n);function iv(e,t){if(t){let n;return ub(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return ub(e)}function av(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!av(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return!n.some(n=>!av(e[n],t[n]))}return!1}function sv({get:e},t){return{init:e=>ib(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function lv(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=iv(e.bind(this)),n.set(this,t)),t.value}}function cv(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>jb(e,zb(t)))(((e,t)=>{for(var n in t||(t={}))$b.call(t,n)&&Vb(e,n,t[n]);if(Wb)for(var n of Wb(t))Hb.call(t,n)&&Vb(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function uv(...e){const t=e.map(e=>mb(e));return()=>t.forEach(e=>e())}Sb=[sv],xb=[sv],yb=[sv],vb=[cv()],bb=[cv()],gb=[cv()];var dv,pv=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Jb(wb,5,this),nv(this,Mb),nv(this,Cb,Jb(wb,8,this)),Jb(wb,11,this),nv(this,Ab,Jb(wb,12,this)),Jb(wb,15,this),nv(this,Tb,Jb(wb,16,this)),Jb(wb,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return tv(this,Mb,kb)}get initial(){return tv(this,Mb,Ib)}get previous(){return tv(this,Mb,Rb)}set current(e){const t=Kg(()=>tv(this,Mb,kb));e&&t&&this.equals(t,e)||Gg(()=>{tv(this,Mb,Ib)||rv(this,Mb,e,Db),rv(this,Mb,t,Pb),rv(this,Mb,e,Ob)})}reset(e=this.defaultValue){Gg(()=>{rv(this,Mb,void 0,Pb),rv(this,Mb,e,Db),rv(this,Mb,e,Ob)})}};function fv(e){return Kg(()=>{const t={};for(const n in e)t[n]=e[n];return t})}wb=[,,,Nb(null)],Cb=new WeakMap,Mb=new WeakSet,Ab=new WeakMap,Tb=new WeakMap,Eb=Zb(wb,20,"#initial",Sb,Mb,Cb),Ib=Eb.get,Db=Eb.set,Lb=Zb(wb,20,"#previous",xb,Mb,Ab),Rb=Lb.get,Pb=Lb.set,qb=Zb(wb,20,"#current",yb,Mb,Tb),kb=qb.get,Ob=qb.set,Zb(wb,2,"current",vb,pv),Zb(wb,2,"initial",bb,pv),Zb(wb,2,"previous",gb,pv),Xb(wb,pv);dv=new WeakMap;var hv,mv,gv,bv,vv,yv=Object.create,xv=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,wv=Object.getOwnPropertySymbols,Cv=Object.prototype.hasOwnProperty,Ev=Object.prototype.propertyIsEnumerable,Iv=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Dv=e=>{throw TypeError(e)},Mv=Math.pow,Av=(e,t,n)=>t in e?xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lv=["class","method","getter","setter","accessor","field","value","get","set"],Rv=e=>void 0!==e&&"function"!=typeof e?Dv("Function expected"):e,Pv=(e,t,n,r,o)=>({kind:Lv[e],name:t,metadata:r,addInitializer:e=>n._?Dv("Already initialized"):o.push(Rv(e||null))}),Tv=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=Lv[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,Sv(o,n)),h=r.length-1;h>=0;h--)(l=Pv(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,Rv(a)&&(f[d]=a);return f&&xv(o,n,f),o},qv=(e,t,n)=>t.has(e)||Dv("Cannot "+n),kv=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},Ov=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,r+n,i,a);return l.scale=((e,t)=>{for(var n in t||(t={}))Cv.call(t,n)&&Av(e,n,t[n]);if(wv)for(var n of wv(t))Ev.call(t,n)&&Av(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:o,bottom:i}=this;return{width:e,height:t,left:n,top:r,right:o,bottom:i}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new kv((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:o,height:i}=this;return n===t.left&&r===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:o}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new e(n,t,r,o)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==r?o:"end"==r?o+i:o+i/2};return kv.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var Nv,_v=class extends(gv=pv,mv=[lv],hv=[lv],gv){constructor(e){var t,n,r;super(kv.from(e),(e,t)=>kv.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(vv,5,this),t=this,r=0,(n=bv).has(t)?Dv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return kv.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=kv.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(qv(a=this,s=bv,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);Gg(()=>{((e,t,n)=>{qv(e,t,"write to private field"),t.set(e,n)})(this,bv,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(kv.from(e)),this.velocity={x:0,y:0}}};function jv({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return"number"==typeof n?Math.sqrt(Mv(r,2)+Mv(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n&&o>n.y}vv=(e=>{var t;return[,,,yv(null!=(t=null==e?void 0:e[Iv("metadata")])?t:null)]})(gv),bv=new WeakMap,Tv(vv,2,"delta",mv,_v),Tv(vv,2,"direction",hv,_v),Nv=vv,Av(_v,Iv("metadata"),Nv[3]);var Fv,zv,Wv,$v,Hv=(e=>(e.Horizontal="x",e.Vertical="y",e))(Hv||{}),Bv=Object.values(Hv),Vv=Object.create,Gv=Object.defineProperty,Uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Kv=Object.getOwnPropertyDescriptors,Xv=Object.getOwnPropertySymbols,Jv=Object.prototype.hasOwnProperty,Zv=Object.prototype.propertyIsEnumerable,Qv=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ey=e=>{throw TypeError(e)},ty=(e,t,n)=>t in e?Gv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ny=(e,t)=>{for(var n in t||(t={}))Jv.call(t,n)&&ty(e,n,t[n]);if(Xv)for(var n of Xv(t))Zv.call(t,n)&&ty(e,n,t[n]);return e},ry=(e,t)=>Uv(e,Kv(t)),oy=(e,t)=>Gv(e,"name",{value:t,configurable:!0}),iy=(e,t)=>{var n={};for(var r in e)Jv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Xv)for(var r of Xv(e))t.indexOf(r)<0&&Zv.call(e,r)&&(n[r]=e[r]);return n},ay=e=>{var t;return[,,,Vv(null!=(t=null==e?void 0:e[Qv("metadata")])?t:null)]},sy=["class","method","getter","setter","accessor","field","value","get","set"],ly=e=>void 0!==e&&"function"!=typeof e?ey("Function expected"):e,cy=(e,t,n,r,o)=>({kind:sy[e],name:t,metadata:r,addInitializer:e=>n._?ey("Already initialized"):o.push(ly(e||null))}),uy=(e,t)=>ty(t,Qv("metadata"),e[3]),dy=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},py=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=sy[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Yv(d<4?o:{get[n](){return my(this,i)},set[n](e){return by(this,i,e)}},n));d?f&&d<4&&oy(i,(d>2?"set ":d>1?"get ":"")+n):oy(o,n);for(var y=r.length-1;y>=0;y--)c=cy(d,n,l={},e[3],b),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>hy(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?my:vy)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>by(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,c),l._=1,4^d||void 0===s?ly(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?ey("Object expected"):(ly(a=s.get)&&(v.get=a),ly(a=s.set)&&(v.set=a),ly(a=s.init)&&g.unshift(a));return d||uy(e,o),v&&Gv(o,n,v),f?4^d?i:v:o},fy=(e,t,n)=>t.has(e)||ey("Cannot "+n),hy=(e,t)=>Object(t)!==t?ey('Cannot use the "in" operator on this value'):e.has(t),my=(e,t,n)=>(fy(e,t,"read from private field"),n?n.call(e):t.get(e)),gy=(e,t,n)=>t.has(e)?ey("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),by=(e,t,n,r)=>(fy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),vy=(e,t,n)=>(fy(e,t,"access private method"),n);function yy(e,t){return{plugin:e,options:t}}function xy(e){return t=>yy(e,t)}function Sy(e){return"function"==typeof e?{plugin:e,options:void 0}:e}Fv=[sv];var wy=class{constructor(e,t){this.manager=e,this.options=t,gy(this,Wv,dy(zv,8,this,!1)),dy(zv,11,this),gy(this,$v,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return Kg(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=mb(e.bind(this));return my(this,$v).add(t),t}destroy(){my(this,$v).forEach(e=>e())}static configure(e){return yy(this,e)}};zv=ay(null),Wv=new WeakMap,$v=new WeakMap,py(zv,4,"disabled",Fv,wy,Wv),uy(zv,wy);var Cy,Ey=class extends wy{},Iy=class{constructor(e){this.manager=e,this.instances=new Map,gy(this,Cy,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(Sy).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of my(this,Cy))if(!n.includes(e)){if(e.prototype instanceof Ey)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);by(this,Cy,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function Dy(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}Cy=new WeakMap;var My,Ay,Ly,Ry,Py,Ty,qy,ky,Oy,Ny,_y,jy,Fy=[],zy=class extends wy{constructor(e){super(e),gy(this,My),gy(this,Ay),this.computeCollisions=this.computeCollisions.bind(this),by(this,Ay,ib(Fy)),this.destroy=uv(()=>{const e=this.computeCollisions(),t=Kg(()=>this.manager.dragOperation.position.current);if(e!==Fy){const e=my(this,My);if(by(this,My,t),e&&t.x==e.x&&t.y==e.y)return}else by(this,My,void 0);my(this,Ay).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){Kg(()=>{e?my(this,Ay).value=this.computeCollisions():by(this,My,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:i,status:a}=r;if(!a.initialized||!i)return Fy;const s=[],l=[];for(const i of null!=e?e:n.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const n=Kg(()=>e({droppable:i,dragOperation:r}));n&&(null!=i.collisionPriority&&(n.priority=i.collisionPriority),s.push(n))}return 0===l.length?Fy:(s.sort(Dy),s)}get collisions(){return my(this,Ay).value}};My=new WeakMap,Ay=new WeakMap,Py=[sv],Ry=[sv],Ly=[sv];var Wy=class e{constructor(e,t){gy(this,Oy,dy(ky,8,this)),dy(ky,11,this),gy(this,Ny),gy(this,_y,dy(ky,12,this)),dy(ky,15,this),gy(this,jy,dy(ky,16,this)),dy(ky,19,this);const{effects:n,id:r,data:o={},disabled:i=!1,register:a=!0}=e;let s=r;by(this,Ny,ib(r)),this.manager=t,this.data=o,this.disabled=i,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=my(this,Ny).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:my(this,Ny).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return vy(t=e,Ty,qy).call(t)})),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};ky=ay(null),Ty=new WeakSet,qy=function(){const e=Wy.pendingIdChanges;Wy.pendingIdChanges=null,e&&Gg(()=>{for(const[t,n]of e)my(t,Ny).value=n})},Oy=new WeakMap,Ny=new WeakMap,_y=new WeakMap,jy=new WeakMap,py(ky,4,"manager",Py,Wy,Oy),py(ky,4,"data",Ry,Wy,_y),py(ky,4,"disabled",Ly,Wy,jy),gy(Wy,Ty),uy(ky,Wy),Wy.pendingIdChanges=null;var $y,Hy,By,Vy,Gy,Uy,Yy,Ky,Xy,Jy,Zy,Qy,ex,tx,nx,rx,ox,ix,ax,sx,lx,cx,ux,dx,px=Wy,fx=class{constructor(){this.map=ib(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const i=new Map(n);for(const[r,o]of n)if(o===t&&r!==e){i.delete(r);break}i.set(e,t),this.map.value=i;const a=uv(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},hx=class extends(Yy=px,Uy=[sv],Gy=[sv],Vy=[sv],By=[lv],Hy=[lv],$y=[lv],Yy){constructor(e,t){var n=e,{modifiers:r,type:o,sensors:i,plugins:a,effects:s}=n,l=iy(n,["modifiers","type","sensors","plugins","effects"]);super(ry(ny({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=Sy(n);e.registry.plugins.register(t)}}]}}),t),dy(Ky,5,this),gy(this,Xy,dy(Ky,8,this)),dy(Ky,11,this),gy(this,Jy,dy(Ky,12,this)),dy(Ky,15,this),gy(this,Zy,dy(Ky,16,this,this.isDragSource?"dragging":"idle")),dy(Ky,19,this),this.type=o,this.sensors=i,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=Sy(t);if(n.plugin===e)return n.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};Ky=ay(Yy),Xy=new WeakMap,Jy=new WeakMap,Zy=new WeakMap,py(Ky,4,"type",Uy,hx,Xy),py(Ky,4,"modifiers",Gy,hx,Jy),py(Ky,4,"status",Vy,hx,Zy),py(Ky,2,"isDropping",By,hx),py(Ky,2,"isDragging",Hy,hx),py(Ky,2,"isDragSource",$y,hx),uy(Ky,hx);var mx=class extends(ix=px,ox=[sv],rx=[sv],nx=[sv],tx=[sv],ex=[sv],Qy=[lv],ix){constructor(e,t){var n=e,{accept:r,collisionDetector:o,collisionPriority:i,type:a}=n;super(iy(n,["accept","collisionDetector","collisionPriority","type"]),t),dy(ax,5,this),gy(this,sx,dy(ax,8,this)),dy(ax,11,this),gy(this,lx,dy(ax,12,this)),dy(ax,15,this),gy(this,cx,dy(ax,16,this)),dy(ax,19,this),gy(this,ux,dy(ax,20,this)),dy(ax,23,this),gy(this,dx,dy(ax,24,this)),dy(ax,27,this),this.accept=r,this.collisionDetector=o,this.collisionPriority=i,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};ax=ay(ix),sx=new WeakMap,lx=new WeakMap,cx=new WeakMap,ux=new WeakMap,dx=new WeakMap,py(ax,4,"accept",ox,mx,sx),py(ax,4,"type",rx,mx,lx),py(ax,4,"collisionDetector",nx,mx,cx),py(ax,4,"collisionPriority",tx,mx,ux),py(ax,4,"shape",ex,mx,dx),py(ax,2,"isDropTarget",Qy,mx),uy(ax,mx);var gx=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},bx=class extends gx{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function vx(e,t=!0){let n=!1;return ry(ny({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var yx,xx,Sx,wx,Cx,Ex,Ix,Dx,Mx,Ax,Lx=class extends Ey{constructor(e){super(e);let t=[];this.destroy=uv(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:o}=n;if(n.isDisabled())return;if(px.pendingIdChanges)return;const i=vx({collisions:o});if(r.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;Kg(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},Rx=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(Rx||{}),Px=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(Px||{});Dx=[sv],Ix=[lv],Ex=[lv],Cx=[lv],wx=[lv],Sx=[lv],xx=[lv],yx=[lv];var Tx=class{constructor(){dy(Mx,5,this),gy(this,Ax,dy(Mx,8,this,"idle")),dy(Mx,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializationPending(){return"initialization-pending"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};Mx=ay(null),Ax=new WeakMap,py(Mx,4,"value",Dx,Tx,Ax),py(Mx,2,"current",Ix,Tx),py(Mx,2,"idle",Ex,Tx),py(Mx,2,"initializationPending",Cx,Tx),py(Mx,2,"initializing",wx,Tx),py(Mx,2,"initialized",Sx,Tx),py(Mx,2,"dragging",xx,Tx),py(Mx,2,"dropped",yx,Tx),uy(Mx,Tx);var qx,kx=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return Kg(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=vx({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return Kg(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:o}=e;Gg(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(o)});const i=vx({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&Gg(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return Kg(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:i}=r;if(!o.dragging||!i||i.signal.aborted)return;const a=vx({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};r.position.current=l})})}stop(e={}){return Kg(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=Kg(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=mb(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),i?i.then(a).catch(()=>r.reset()):a()})}},Ox=class extends wy{constructor(e,t){super(e,t),this.manager=e,this.options=t}},Nx=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},_x=class{constructor(e){this.options=e,gy(this,qx)}set controller(e){by(this,qx,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=my(this,qx))||t.activate(e)}};qx=new WeakMap;var jx,Fx,zx,Wx,$x,Hx,Bx,Vx,Gx,Ux,Yx,Kx,Xx,Jx,Zx,Qx,eS,tS,nS,rS=class extends wy{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},oS=class{constructor(e){this.draggables=new fx,this.droppables=new fx,this.plugins=new Iy(e),this.sensors=new Iy(e),this.modifiers=new Iy(e)}register(e,t){if(e instanceof hx)return this.draggables.register(e.id,e);if(e instanceof mx)return this.droppables.register(e.id,e);if(e.prototype instanceof rS)return this.modifiers.register(e,t);if(e.prototype instanceof Ox)return this.sensors.register(e,t);if(e.prototype instanceof wy)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof px)return e instanceof hx?this.draggables.unregister(e.id,e):e instanceof mx?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof rS)return this.modifiers.unregister(e);if(e.prototype instanceof Ox)return this.sensors.unregister(e);if(e.prototype instanceof wy)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};Gx=[lv],Vx=[sv],Bx=[sv],Hx=[sv],$x=[sv],Wx=[sv],zx=[lv],Fx=[lv],jx=[lv];var iS=class{constructor(e){dy(Xx,5,this),gy(this,Ux),gy(this,Yx),gy(this,Kx,new pv(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new Tx,gy(this,Jx,dy(Xx,8,this,!1)),dy(Xx,11,this),gy(this,Zx,dy(Xx,12,this,null)),dy(Xx,15,this),gy(this,Qx,dy(Xx,16,this,null)),dy(Xx,19,this),gy(this,eS,dy(Xx,20,this,null)),dy(Xx,23,this),gy(this,tS,dy(Xx,24,this,[])),dy(Xx,27,this),this.position=new _v({x:0,y:0}),gy(this,nS,{x:0,y:0}),by(this,Ux,e)}get shape(){const{current:e,initial:t,previous:n}=my(this,Kx);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?my(this,Kx).current=e:my(this,Kx).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=my(this,Ux).registry.draggables.get(t);return n&&by(this,Yx,n),null!=(e=null!=n?n:my(this,Yx))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=my(this,Ux).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(ry(ny({},this.snapshot()),{transform:n}));return by(this,nS,n),n}snapshot(){return Kg(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:my(this,nS),shape:this.shape?fv(this.shape):null,position:fv(this.position),status:fv(this.status),canceled:this.canceled}))}reset(){Gg(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,my(this,Kx).reset(),this.position.reset({x:0,y:0}),by(this,nS,{x:0,y:0}),this.modifiers=[]})}};Xx=ay(null),Ux=new WeakMap,Yx=new WeakMap,Kx=new WeakMap,Jx=new WeakMap,Zx=new WeakMap,Qx=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap,py(Xx,2,"shape",Gx,iS),py(Xx,4,"canceled",Vx,iS,Jx),py(Xx,4,"activatorEvent",Bx,iS,Zx),py(Xx,4,"sourceIdentifier",Hx,iS,Qx),py(Xx,4,"targetIdentifier",$x,iS,eS),py(Xx,4,"modifiers",Wx,iS,tS),py(Xx,2,"source",zx,iS),py(Xx,2,"target",Fx,iS),py(Xx,2,"transform",jx,iS),uy(Xx,iS);var aS={get rendering(){return Promise.resolve()}};function sS(e,t){return"function"==typeof e?e(t):null!=e?e:t}var lS=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=sS(n.plugins,[]),o=sS(n.sensors,[]),i=sS(n.modifiers,[]),a=null!=(t=n.renderer)?t:aS,s=new bx(this),l=new oS(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new kx(this),this.dragOperation=new iS(this),this.collisionObserver=new zy(this),this.plugins=[Lx,...r],this.modifiers=i,this.sensors=o;const{destroy:c}=this,u=uv(()=>{var e,t,n;const r=Kg(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of r)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=Sy(e);return new t(this,n)}))?n:o});this.destroy=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},cS=e=>{throw TypeError(e)},uS=(e,t,n)=>t.has(e)||cS("Cannot "+n),dS=(e,t,n)=>(uS(e,t,"read from private field"),t.get(e)),pS=(e,t,n)=>t.has(e)?cS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),fS=(e,t,n,r)=>(uS(e,t,"write to private field"),t.set(e,n),n),hS=(e,t,n)=>(uS(e,t,"access private method"),n);function mS(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function gS(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,o=(mS(n)?n.getKeyframes():[]).filter(t);o.length>0&&(r=[o[o.length-1],e])}return r}function bS(e){const{width:t,height:n,top:r,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:i,right:a}}function vS(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function yS(e){return"nodeType"in e}function xS(e){var t,n,r;return e?vS(e)?e:yS(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function SS(e){const{Document:t}=xS(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function wS(e){return!(!e||vS(e))&&(e instanceof xS(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function CS(e){return e instanceof xS(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function ES(e){return e?vS(e)?e.document:yS(e)?SS(e)?e:wS(e)||CS(e)?e.ownerDocument:document:document:document}function IS(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===o}function DS(e,t=e.getBoundingClientRect(),n=0){var r,o,i,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!IS(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),i=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=u.visualViewport,f=null!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i:0,m=null!=(a=null==p?void 0:p.width)?a:u.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:u.innerHeight,b=n*g,v=n*m;return l={top:Math.max(l.top,f-b),right:Math.min(l.right,h+m+v),bottom:Math.min(l.bottom,f+g+b),left:Math.max(l.left,h-v),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function MS(e){return{x:e.clientX,y:e.clientY}}var AS="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function LS(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...LS(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...LS(o.document,t))}}catch(e){}return n}function RS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function PS(){var e,t;const n=RS()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function TS(e){return!(!e||!yS(e))&&e instanceof xS(e).ShadowRoot}function qS(e){if(e&&yS(e)){let t=e.getRootNode();if(TS(t))return t;if(t instanceof Document)return t}return ES(e)}function kS(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function OS(e){return"value"in e}function NS(e){return"CANVAS"===e.tagName}function _S(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:o,top:i}=r.getBoundingClientRect();return _S(e,{x:t-o,y:n-i})}}return r}var jS=new WeakMap;var FS=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:i}=t,a=[e,t];e.addEventListener(n,r,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o),i.delete(e)}}}};function zS(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function WS(e,t){const n=()=>performance.now();let r,o;return function(...i){const a=this;o?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,i),o=n()},t-(n()-o))):(e.apply(a,i),o=n())}}var $S,HS="undefined"!=typeof ResizeObserver?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},BS=class extends HS{constructor(e){super(t=>{dS(this,$S)?e(t,this):fS(this,$S,!0)}),pS(this,$S,!1)}};$S=new WeakMap;var VS,GS,US,YS,KS,XS,JS,ZS,QS,ew,tw,nw=Array.from({length:100},(e,t)=>t/100),rw=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,pS(this,QS),this.disconnect=()=>{var e,t,n;fS(this,JS,!0),null==(e=dS(this,US))||e.disconnect(),null==(t=dS(this,YS))||t.disconnect(),dS(this,KS).disconnect(),null==(n=dS(this,XS))||n.remove()},pS(this,VS,!0),pS(this,GS),pS(this,US),pS(this,YS),pS(this,KS),pS(this,XS),pS(this,JS,!1),pS(this,ZS,WS(()=>{var e,t,n;const{element:r}=this;if(null==(e=dS(this,YS))||e.disconnect(),dS(this,JS)||!dS(this,VS)||!r.isConnected)return;const o=null!=(t=r.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(n=o.defaultView)?n:window,s=r.getBoundingClientRect(),l=DS(r,s),{top:c,left:u,bottom:d,right:p}=l,f=-Math.floor(c),h=-Math.floor(u),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,fS(this,YS,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:Ov.intersectionRatio(n,DS(r)))&&dS(this,ZS).call(this)},{threshold:nw,rootMargin:m,root:o})),dS(this,YS).observe(r),hS(this,QS,ew).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),fS(this,VS,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=DS(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const o=e.ownerDocument;(null==n?void 0:n.debug)&&(fS(this,XS,document.createElement("div")),dS(this,XS).style.background="rgba(0,0,0,0.15)",dS(this,XS).style.position="fixed",dS(this,XS).style.pointerEvents="none",o.body.appendChild(dS(this,XS))),fS(this,KS,new IntersectionObserver(t=>{var n,r;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,c=dS(this,VS);fS(this,VS,a),(s||l)&&(c&&!a?(null==(n=dS(this,YS))||n.disconnect(),this.callback(null),null==(r=dS(this,US))||r.disconnect(),fS(this,US,void 0),dS(this,XS)&&(dS(this,XS).style.visibility="hidden")):dS(this,ZS).call(this),a&&!dS(this,US)&&(fS(this,US,new BS(dS(this,ZS))),dS(this,US).observe(e)))},{threshold:nw,root:o})),dS(this,VS)&&!n.skipInitial&&this.callback(this.boundingClientRect),dS(this,KS).observe(e)}};VS=new WeakMap,GS=new WeakMap,US=new WeakMap,YS=new WeakMap,KS=new WeakMap,XS=new WeakMap,JS=new WeakMap,ZS=new WeakMap,QS=new WeakSet,ew=function(){dS(this,JS)||(hS(this,QS,tw).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,dS(this,GS))||(this.callback(this.boundingClientRect),fS(this,GS,this.boundingClientRect)))},tw=function(){if(dS(this,XS)){const{top:e,left:t,width:n,height:r}=DS(this.element);dS(this,XS).style.overflow="hidden",dS(this,XS).style.visibility="visible",dS(this,XS).style.top=`${Math.floor(e)}px`,dS(this,XS).style.left=`${Math.floor(t)}px`,dS(this,XS).style.width=`${Math.floor(n)}px`,dS(this,XS).style.height=`${Math.floor(r)}px`}};var ow,iw,aw,sw,lw=new WeakMap,cw=new WeakMap;function uw(e,t){let n=lw.get(e);if(!n){const t=new rw(e,t=>{const n=lw.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),lw.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(lw.delete(e),n.disconnect())}}var dw=class{constructor(e,t,n){this.callback=t,pS(this,ow),pS(this,iw,!1),pS(this,aw),pS(this,sw,WS(e=>{if(!dS(this,iw)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of dS(this,aw))if(e.target.contains(t)){this.callback(dS(this,ow).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=zS(e);for(;n;)t.add(n),n=zS(n);return t}(e),o=function(e,t){const n=new Set;for(const r of e){const e=uw(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),i=function(e,t){var n;const r=e.ownerDocument;if(!cw.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),cw.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(n=cw.get(r))?n:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),cw.delete(r))}):()=>{}}(e,dS(this,sw));fS(this,aw,r),fS(this,ow,new rw(e,t,n)),this.disconnect=()=>{dS(this,iw)||(fS(this,iw,!0),o(),i(),dS(this,ow).disconnect())}}};function pw(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function fw(e){try{pw(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function hw(e){return!(!AS||!e)&&e===ES(e).scrollingElement}function mw(e){var t,n;const r=xS(e),o=hw(e)?function(e){var t,n,r,o;const{documentElement:i}=ES(e),a=xS(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:i.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):bS(e),i=r.visualViewport,a=hw(e)?{height:null!=(t=null==i?void 0:i.height)?t:r.innerHeight,width:null!=(n=null==i?void 0:i.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function gw(e,t,n=mw(e)){const{isTop:r,isBottom:o,isLeft:i,isRight:a,position:s}=n,{x:l,y:c}=null!=t?t:{x:0,y:0},u=!r&&s.current.y+c>0,d=!o&&s.current.y+c<s.max.y,p=!i&&s.current.x+l>0,f=!a&&s.current.x+l<s.max.x;return{top:u,bottom:d,left:p,right:f,x:p||f,y:u||d}}ow=new WeakMap,iw=new WeakMap,aw=new WeakMap,sw=new WeakMap;var bw=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},vw=new bw(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),yw=new bw(e=>setTimeout(e,50)),xw=new Map,Sw=xw.clear.bind(xw);function ww(e,t=!1){if(!t)return Cw(e);let n=xw.get(e);return n||(n=Cw(e),xw.set(e,n),yw.schedule(Sw),n)}function Cw(e){return xS(e).getComputedStyle(e)}var Ew={excludeElement:!0,escapeShadowDOM:!0};function Iw(e,t=Ew){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=n&&i.size>=n)return i;if(!a)return i;if(SS(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&TS(a))return t(a.host);if(!wS(a))return CS(a)?t(a.parentElement):i;if(i.has(a))return i;const s=ww(a,!0);if(r&&a===e||function(e,t=ww(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&i.add(a),function(e,t=ww(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function Dw(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=zS(e);for(;r;){if(r===t)return n;const e=bS(r),{x:o,y:i}=Mw(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*o,n.scaleY=n.scaleY*i,r=zS(r)}return n}function Mw(e,t=bS(e)){const n=Math.round(t.width),r=Math.round(t.height);if(wS(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=ww(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function Aw(e){if(!e||"none"===e)return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function Lw(e){var t,n,r,o,i,a,s,l,c;const{scale:u,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=Aw(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,b=null!=(n=null==f?void 0:f.y)?n:1,v=null!=(r=null==h?void 0:h.x)?r:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:v+x,y:y+S,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*w,scaleY:b*C}}var Rw=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(Rw||{}),Pw={x:.2,y:.2},Tw={x:10,y:10};function qw(e,t,n,r=25,o=Pw,i=Tw,a=mw(e)){const{x:s,y:l}=t,{rect:c,isTop:u,isBottom:d,isLeft:p,isRight:f}=a,h=Dw(e),m=Lw(ww(e,!0)),g=null!==m&&(null==m?void 0:m.scaleX)<0,b=null!==m&&(null==m?void 0:m.scaleY)<0,v=new Ov(c.left*h.scaleX+h.x,c.top*h.scaleY+h.y,c.width*h.scaleX,c.height*h.scaleY),y={x:0,y:0},x={x:0,y:0},S=v.height*o.y,w=v.width*o.x;return S>0&&(!u||b&&!d)&&l<=v.top+S&&1!==(null==n?void 0:n.y)&&s>=v.left-i.x&&s<=v.right+i.x?(y.y=b?1:-1,x.y=r*Math.abs((v.top+S-l)/S)):S>0&&(!d||b&&!u)&&l>=v.bottom-S&&-1!==(null==n?void 0:n.y)&&s>=v.left-i.x&&s<=v.right+i.x&&(y.y=b?-1:1,x.y=r*Math.abs((v.bottom-S-l)/S)),w>0&&(!f||g&&!p)&&s>=v.right-w&&-1!==(null==n?void 0:n.x)&&l>=v.top-i.y&&l<=v.bottom+i.y?(y.x=g?-1:1,x.x=r*Math.abs((v.right-w-s)/w)):w>0&&(!p||g&&!f)&&s<=v.left+w&&1!==(null==n?void 0:n.x)&&l>=v.top-i.y&&l<=v.bottom+i.y&&(y.x=g?1:-1,x.x=r*Math.abs((v.left+w-s)/w)),{direction:y,speed:x}}function kw(e,{block:t="nearest",inline:n="nearest"}={}){if(!wS(e))return;const r=Iw(e),o=[];for(const i of r){if(!wS(i))continue;const{top:r,left:a}=Nw(e,i);let s=r,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<i.scrollTop;n!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-i.clientHeight)}if("none"!==n){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===n?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function Ow(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!wS(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function Nw(e,t){const n=Ow(e),r=Ow(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function _w({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function jw(e,t=ww(e).translate,n=!0){if(n){const t=gS(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=Aw(e);if(t)return t}}}if(t){const e=Aw(t);if(e)return e}return{x:0,y:0,z:0}}var Fw=new bw(e=>setTimeout(e,0)),zw=new Map,Ww=zw.clear.bind(zw);function $w(e,t){const n=function(e){const t=e.ownerDocument;let n=zw.get(t);if(n)return n;n=t.getAnimations(),zw.set(t,n),Fw.schedule(Ww);const r=n.filter(t=>mS(t.effect)&&t.effect.target===e);return zw.set(e,r),n}(e).filter(e=>{var n,r;if(mS(e.effect)){const{target:o}=e.effect;if(null==(r=o&&(null==(n=t.isValidTarget)?void 0:n.call(t,o)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var Hw=class extends Ov{constructor(e,t={}){var n,r,o,i;const{frameTransform:a=Dw(e),ignoreTransforms:s,getBoundingClientRect:l=bS}=t,c=$w(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||RS())&&t.contains(e)}),u=l(e);let d,{top:p,left:f,width:h,height:m}=u;const g=ww(e),b=Lw(g),v={x:null!=(n=null==b?void 0:b.scaleX)?n:1,y:null!=(r=null==b?void 0:b.scaleY)?r:1},y=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,o,i,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=mS(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:c}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof c&&c&&(i=c,a=!0)}return a?Lw({transform:null!=r?r:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==c||c(),b&&(d=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-r)*parseFloat(n),l=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=o?e.height/o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,b,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-r)*parseFloat(n),l=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=o?e.height*o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,v.x=y.scaleX,v.y=y.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function Bw(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var Vw=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(Bw(n))for(const[r,o]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(Bw(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(Bw(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function Gw(e){return!!e&&(e instanceof xS(e).Element||yS(e)&&e.nodeType===Node.ELEMENT_NODE)}function Uw(e){if(!e)return!1;const{KeyboardEvent:t}=xS(e.target);return e instanceof t}var Yw={};function Kw(e){const t=null==Yw[e]?0:Yw[e]+1;return Yw[e]=t,`${e}-${t}`}var Xw=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/kv.distance(t.shape.center,n),type:Px.PointerIntersection,priority:Rx.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=kv.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:Px.ShapeIntersection,priority:Rx.Normal}}return null})(e)},Jw=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const i=r?Ov.from(r.current.boundingRectangle).corners:void 0,a=Ov.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+kv.distance(kv.from(t),null!=(r=null==i?void 0:i[n])?r:o.current)},0),s=a/4;return{id:n.id,value:1/s,type:Px.Collision,priority:Rx.Normal}},Zw=Object.create,Qw=Object.defineProperty,eC=Object.defineProperties,tC=Object.getOwnPropertyDescriptor,nC=Object.getOwnPropertyDescriptors,rC=Object.getOwnPropertySymbols,oC=Object.prototype.hasOwnProperty,iC=Object.prototype.propertyIsEnumerable,aC=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),sC=e=>{throw TypeError(e)},lC=(e,t,n)=>t in e?Qw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cC=(e,t)=>{for(var n in t||(t={}))oC.call(t,n)&&lC(e,n,t[n]);if(rC)for(var n of rC(t))iC.call(t,n)&&lC(e,n,t[n]);return e},uC=(e,t)=>eC(e,nC(t)),dC=(e,t)=>Qw(e,"name",{value:t,configurable:!0}),pC=(e,t)=>{var n={};for(var r in e)oC.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&rC)for(var r of rC(e))t.indexOf(r)<0&&iC.call(e,r)&&(n[r]=e[r]);return n},fC=e=>{var t;return[,,,Zw(null!=(t=null==e?void 0:e[aC("metadata")])?t:null)]},hC=["class","method","getter","setter","accessor","field","value","get","set"],mC=e=>void 0!==e&&"function"!=typeof e?sC("Function expected"):e,gC=(e,t,n,r,o)=>({kind:hC[e],name:t,metadata:r,addInitializer:e=>n._?sC("Already initialized"):o.push(mC(e||null))}),bC=(e,t)=>lC(t,aC("metadata"),e[3]),vC=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},yC=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=hC[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&tC(d<4?o:{get[n](){return wC(this,i)},set[n](e){return EC(this,i,e)}},n));d?f&&d<4&&dC(i,(d>2?"set ":d>1?"get ":"")+n):dC(o,n);for(var y=r.length-1;y>=0;y--)c=gC(d,n,l={},e[3],b),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>SC(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?wC:IC)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>EC(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,c),l._=1,4^d||void 0===s?mC(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?sC("Object expected"):(mC(a=s.get)&&(v.get=a),mC(a=s.set)&&(v.set=a),mC(a=s.init)&&g.unshift(a));return d||bC(e,o),v&&Qw(o,n,v),f?4^d?i:v:o},xC=(e,t,n)=>t.has(e)||sC("Cannot "+n),SC=(e,t)=>Object(t)!==t?sC('Cannot use the "in" operator on this value'):e.has(t),wC=(e,t,n)=>(xC(e,t,"read from private field"),n?n.call(e):t.get(e)),CC=(e,t,n)=>t.has(e)?sC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),EC=(e,t,n,r)=>(xC(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),IC=(e,t,n)=>(xC(e,t,"access private method"),n),DC="button",MC="draggable",AC="dnd-kit-description",LC="dnd-kit-announcement",RC={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},PC={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function TC(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function qC(e){var t;return"button"===(null!=(t=e.getAttribute("role"))?t:"button")}var kC=["dragover","dragmove"];var OC,NC,_C,jC,FC,zC,WC,$C,HC,BC,VC,GC,UC,YC,KC,XC,JC=new Map;function ZC(e){return TS(e)?e.host.isConnected:null!=e.defaultView}var QC=class extends(zC=Ey,FC=[sv],jC=[sv],_C=[lv],NC=[lv],OC=[lv],zC){constructor(e,t){super(e,t),vC(WC,5,this),CC(this,GC),CC(this,$C,vC(WC,8,this,new Map)),vC(WC,11,this),CC(this,HC,vC(WC,12,this,new Set)),vC(WC,15,this),CC(this,BC,new Set),CC(this,VC,new Map),this.registerEffect(IC(this,GC,UC))}register(e,t){return Kg(()=>{var n;const r=new Map(this.registeredRules);r.set(e,null!=(n=null==t?void 0:t.retain)&&n),this.registeredRules=r}),()=>{Kg(()=>{const t=new Map(this.registeredRules);t.delete(e),this.registeredRules=t})}}addRoot(e){return Kg(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{Kg(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return qS(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return qS(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}destroy(){for(const e of wC(this,VC).values())for(const t of e.values())t();wC(this,VC).clear(),wC(this,BC).clear(),super.destroy()}};WC=fC(zC),$C=new WeakMap,HC=new WeakMap,BC=new WeakMap,VC=new WeakMap,GC=new WeakSet,UC=function(){const{roots:e,registeredRules:t}=this;for(const t of e)wC(this,BC).add(t);const n=new Map;for(const r of wC(this,BC)){const o=e.has(r);if(o||ZC(r))for(const[e,i]of t){if(!o&&!i)continue;let t=n.get(r);t||(t=new Set,n.set(r,t)),t.add(e)}else wC(this,BC).delete(r)}for(const[e,t]of wC(this,VC)){const r=n.get(e);for(const[e,n]of t)(null==r?void 0:r.has(e))||(n(),t.delete(e));0===t.size&&wC(this,VC).delete(e)}for(const[e,t]of n){let n=wC(this,VC).get(e);n||(n=new Map,wC(this,VC).set(e,n));for(const r of t)n.has(r)||n.set(r,IC(this,GC,YC).call(this,e,r))}},YC=function(e,t){let n=JC.get(e);n||(n=new Map,JC.set(e,n));let r=n.get(t);if(!r){const o=SS(e)?IC(this,GC,KC).call(this,e,n,t):IC(this,GC,XC).call(this,e,n,t);if(!o)return()=>{};r=o,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,0===r.refCount&&r.cleanup())}},KC=function(e,t,n){var r;const o=e.createElement("style"),{nonce:i}=null!=(r=this.options)?r:{};i&&o.setAttribute("nonce",i),o.textContent=n,e.head.prepend(o);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(n),0===t.size&&JC.delete(e)}}},XC=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=r?r:{};if(!o)return null;const i=new o;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var r;if(TS(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&JC.delete(e)}}},yC(WC,4,"registeredRules",FC,QC,$C),yC(WC,4,"additionalRoots",jC,QC,HC),yC(WC,2,"sourceRoot",_C,QC),yC(WC,2,"targetRoot",NC,QC),yC(WC,2,"roots",OC,QC),bC(WC,QC),QC.configure=xy(QC);var eE=QC,tE="data-dnd-",nE=`${tE}dropping`,rE="--dnd-",oE=`${tE}dragging`,iE=`${tE}placeholder`,aE=[oE,iE,"popover","aria-pressed","aria-grabbing"],sE=["view-transition-name"],lE=`\n :is(:root,:host) [${oE}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${rE}top, 0px) !important;\n left: var(${rE}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${rE}width, auto);\n max-width: var(${rE}width, auto);\n height: var(${rE}height, auto);\n max-height: var(${rE}height, auto);\n transform: var(${rE}transform, none) !important;\n transition: var(${rE}transition) !important;\n }\n\n :is(:root,:host) [${iE}] {\n transition: none;\n }\n\n :is(:root,:host) [${iE}='hidden'] {\n visibility: hidden;\n }\n\n [${oE}] * {\n pointer-events: none !important;\n }\n\n [${oE}]:not([${nE}]) {\n translate: var(${rE}translate) !important;\n }\n\n [${oE}][style*='${rE}scale'] {\n scale: var(${rE}scale) !important;\n transform-origin: var(${rE}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${oE}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${oE}]::backdrop, [${tE}overlay]:not([${oE}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function cE(e,t="hidden"){return Kg(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${tE}${Kw("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(OS(e)&&OS(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),NS(e)&&NS(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,o]of e){if(!r.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(o),!i)continue;const a=r.element;r.proxy=i,i.removeAttribute(o),jS.set(a,i),n.push(()=>{jS.delete(a),r.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(iE,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function uE(e,t){return e===t||zS(e)===zS(t)}function dE(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&Gw(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>fw(t))}function pE(e){return"TR"===e.tagName}var fE,hE,mE,gE,bE,vE,yE,xE=250,SE="ease";var wE=class extends(hE=wy,fE=[sv],hE){constructor(e,t){super(e,t),CC(this,bE),CC(this,gE,vC(mE,8,this)),vC(mE,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(eE),r=null==n?void 0:n.register(lE,{retain:!0});if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(IC(this,bE,vE).bind(this,n)),this.registerEffect(IC(this,bE,yE))}};mE=fC(hE),gE=new WeakMap,bE=new WeakSet,vE=function(e){const{overlay:t}=this;if(!t||!e)return;const n=qS(t);return n?e.addRoot(n):void 0},yE=function(){var e,t,n,r,o,i,a;const{state:s,manager:l,options:c}=this,{dragOperation:u}=l,{position:d,source:p,status:f}=u;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(wE),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==c?void 0:c.feedback)?t:"default",b="function"==typeof g?g(p,l):g;if(!h||"none"===b||!f.initialized||f.initializing)return;const{initial:v}=s,y=null!=(n=this.overlay)?n:h,x=Dw(y),S=Dw(h),w=!uE(h,y),C=new Hw(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,I=S.scaleY/x.scaleY;let{width:D,height:M,top:A,left:L}=C;w&&(D/=E,M/=I);const R=new Vw(y),P=ww(h),{transition:T,translate:q,boxSizing:k,paddingBlockStart:O,paddingBlockEnd:N,paddingInlineStart:_,paddingInlineEnd:j,borderInlineStartWidth:F,borderInlineEndWidth:z,borderBlockStartWidth:W,borderBlockEndWidth:$}=P,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),B=Lw(P),V=P.transform,G="clone"===b,U="content-box"===k,Y=U?parseInt(_)+parseInt(j)+parseInt(F)+parseInt(z):0,K=U?parseInt(O)+parseInt(N)+parseInt(W)+parseInt($):0,X="move"===b||this.overlay?null:cE(p,G?"clone":"hidden"),J=Kg(()=>Uw(l.dragOperation.activatorEvent));if(!v.translate)if(this.overlay&&B)v.translate={x:B.x,y:B.y};else if("none"!==q){const e=Aw(q);e&&(v.translate=e)}if(!v.transformOrigin){const e=Kg(()=>d.current),t=L+(null!=(r=null==B?void 0:B.x)?r:0),n=A+(null!=(o=null==B?void 0:B.y)?o:0);v.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(D*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(M*x.scaleY)}}const{transformOrigin:Z}=v,Q=A*x.scaleY+x.y,ee=L*x.scaleX+x.x;if(!v.coordinates&&(v.coordinates={x:ee,y:Q},1!==E||1!==I)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;v.coordinates.x+=(D*e-D)*n,v.coordinates.y+=(M*t-M)*r}v.dimensions||(v.dimensions={width:D,height:M}),v.frameTransform||(v.frameTransform=x);const te=v.coordinates.x-ee,ne=v.coordinates.y-Q,re=(v.dimensions.width*v.frameTransform.scaleX-D*x.scaleX)*Z.x,oe=(v.dimensions.height*v.frameTransform.scaleY-M*x.scaleY)*Z.y,ie={x:te/x.scaleX+re,y:ne/x.scaleY+oe},ae=L+ie.x,se=A+ie.y;y.setAttribute(oE,"true");const le=Kg(()=>u.transform),ce=null!=(i=v.translate)?i:{x:0,y:0},ue=le.x*x.scaleX+ce.x,de=le.y*x.scaleY+ce.y,pe=PS();if(R.set({width:D-Y,height:M-K,top:se+pe.y,left:ae+pe.x,translate:`${ue}px ${de}px 0`,transform:this.overlay?"none":V,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${I}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},rE),X&&(h.insertAdjacentElement("afterend",X),null==c?void 0:c.rootElement)){("function"==typeof c.rootElement?c.rootElement(p):c.rootElement).appendChild(h)}let fe,he,me;pw(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),fw(y),y.addEventListener("beforetoggle",dE));const ge=(be={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:D,height:M,top:A,left:L,widthOffset:Y,heightOffset:K,delta:ie,styles:R,dragOperation:u,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new Hw(be.placeholder,{frameTransform:be.frameTransform,ignoreTransforms:!0}),o=null!=(e=be.transformOrigin)?e:{x:1,y:1},i=(be.width-r.width)*o.x+be.delta.x,a=(be.height-r.height)*o.y+be.delta.y,s=PS();if(be.styles.set({width:r.width-be.widthOffset,height:r.height-be.heightOffset,top:be.top+a+s.y,left:be.left+i+s.x},rE),null==(t=be.getElementMutationObserver())||t.takeRecords(),pE(be.element)&&pE(be.placeholder)){const e=Array.from(be.element.cells),t=Array.from(be.placeholder.cells);be.getSavedCellWidths()||be.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=be.getTranslate())?n:{x:0,y:0},c=be.left+i+s.x+l.x,u=be.top+a+s.y+l.y,d=r.width-be.widthOffset,p=r.height-be.heightOffset,f=be.frameTransform;be.dragOperation.shape=new Ov(c*f.scaleX+f.x,u*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var be;const ve=new Hw(y);Kg(()=>u.shape=ve);const ye=xS(y),xe=e=>{this.manager.actions.stop({event:e})},Se=kS(ye);J&&ye.addEventListener("resize",xe),"idle"===Kg(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let o=!1;for(const n of r){if(n.target!==e){o=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||aE.includes(r))continue;const i=e.getAttribute(r);if("style"===r){if(Bw(e)&&Bw(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(sE.includes(e)||e.startsWith(rE))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==i?t.setAttribute(r,i):t.removeAttribute(r)}o&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,G),he=function(e,t,n){const r=new MutationObserver(r=>{for(const o of r)if(0!==o.addedNodes.length)for(const r of Array.from(o.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void fw(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void fw(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),fw(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,y));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;wS(n)&&n.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),pw(y)&&(y.removeEventListener("beforetoggle",dE),y.removeAttribute("popover")),y.removeAttribute(oE),R.reset();const e=()=>{var e;if(me&&pE(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=u.status.dragging;X&&(!n&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Ie=null==c?void 0:c.dropAnimation,De=this,Me=uv(()=>{var e,t,n;const{transform:r,status:o}=u;if((r.x||r.y||s.current.translate)&&o.dragging){const o=null!=(e=v.translate)?e:{x:0,y:0},i={x:r.x/x.scaleX+o.x,y:r.y/x.scaleY+o.y},a=s.current.translate,l=Kg(()=>u.modifiers),d=Kg(()=>{var e;return null==(e=u.shape)?void 0:e.current}),p=null==c?void 0:c.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(R.set({transition:H?`${H}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},rE),null==fe||fe.takeRecords(),d&&d!==ve&&a&&!l.length){const e=kv.delta(i,a);u.shape=Ov.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else u.shape=new Hw(y);s.current.translate=i}},function(){if(u.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==De.dropAnimation?De.dropAnimation:Ie;let t=s.current.translate;const n=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,o;const{animation:i}=e;if("function"==typeof i){const t=i({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=xE,easing:s=SE}=null!=i?i:{};fw(e.feedbackElement);const[,l]=null!=(t=gS(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:uE(e.feedbackElement,c)?null:void 0},d=new Hw(e.feedbackElement,u),p=null!=(r=Aw(ww(e.feedbackElement).translate))?r:e.translate,f=new Hw(c,u),h=Ov.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,b=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},v=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},rE),e.feedbackElement.setAttribute(nE,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),_w({element:e.feedbackElement,keyframes:uC(cC(cC({},b),v),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:kS(xS(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(nE),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:n,transition:T,alignment:p.alignment,styles:R,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Me()}},yC(mE,4,"overlay",fE,wE,gE),bC(mE,wE),wE.configure=xy(wE);var CE,EE,IE,DE,ME,AE,LE,RE=wE,PE=!0;IE=[sv],DE=Rw.Forward,CE=[sv],EE=Rw.Reverse;var TE=class{constructor(){CC(this,AE,vC(ME,8,this,PE)),vC(ME,11,this),CC(this,LE,vC(ME,12,this,PE)),vC(ME,15,this)}isLocked(e){return e!==Rw.Idle&&(null==e?this[Rw.Forward]===PE&&this[Rw.Reverse]===PE:this[e]===PE)}unlock(e){e!==Rw.Idle&&(this[e]=false)}};ME=fC(null),AE=new WeakMap,LE=new WeakMap,yC(ME,4,DE,IE,TE,AE),yC(ME,4,EE,CE,TE,LE),bC(ME,TE);var qE,kE,OE,NE,_E,jE,FE=[Rw.Forward,Rw.Reverse],zE=class{constructor(){this.x=new TE,this.y=new TE}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},WE=class extends wy{constructor(e){super(e);const t=ib(new zE);let n=null;this.signal=t,mb(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new zE);const{delta:o}=e.dragOperation.position;if(n){const e={x:$E(o.x,n.x),y:$E(o.y,n.y)},r=t.peek();Gg(()=>{for(const t of Bv)for(const n of FE)e[t]===n&&r[t].unlock(n);t.value=r})}n=o})}get current(){return this.signal.peek()}};function $E(e,t){return Math.sign(e-t)}var HE=class extends(kE=Ey,qE=[sv],kE){constructor(e){super(e),CC(this,NE,vC(OE,8,this,!1)),vC(OE,11,this),CC(this,_E),CC(this,jE,()=>{if(!wC(this,_E))return;const{element:e,by:t}=wC(this,_E);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return EC(this,_E,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:BE(o.x),y:BE(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=mw(e),l=gw(e,o,r);if(l.x||l.y){const{speed:l,direction:c}=qw(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold,void 0,r);if(s)for(const e of Bv)s[e].isLocked(c[e])&&(l[e]=0,c[e]=0);if(c.x||c.y){const{x:t,y:r}=null!=o?o:c,i=t*l.x,a=r*l.y;if(i||a){const t=null==(n=wC(this,_E))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!i||t.y&&!a)continue}return EC(this,_E,{element:e,by:{x:i,y:a}}),vw.schedule(wC(this,jE)),!0}}}}}return EC(this,_E,void 0),!1};let t=null,n=null;const r=iv(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const o=_S(qS(null==r?void 0:r.element),n.current);return o&&(t=o),null!=o?o:t}),o=iv(()=>{const t=r.value,{documentElement:o}=ES(t);if(!t||t===o){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=Iw(r,{excludeElement:!1});return n=e,e}}if(t){const e=Iw(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},av);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new WE(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&Uw(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function BE(e){return e>0?Rw.Forward:e<0?Rw.Reverse:Rw.Idle}OE=fC(kE),NE=new WeakMap,_E=new WeakMap,jE=new WeakMap,yC(OE,4,"autoScrolling",qE,HE,NE),bC(OE,HE);var VE=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),GE=class extends wy{constructor(e,t){super(e,t);const n=e.registry.plugins.get(HE);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=mb(()=>{var t,r,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>VE.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};GE.configure=xy(GE);var UE,YE=GE,KE={capture:!0,passive:!0},XE=class extends Ey{constructor(e){super(e),CC(this,UE),this.handleScroll=()=>{null==wC(this,UE)&&EC(this,UE,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),EC(this,UE,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=mb(()=>{var e,n,r;if(t.status.dragging){const o=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return o.addEventListener("scroll",this.handleScroll,KE),()=>{o.removeEventListener("scroll",this.handleScroll,KE)}}})}};UE=new WeakMap;function JE(){var e;null==(e=document.getSelection())||e.removeAllRanges()}function ZE(e,t){const n=eI(e.key);return t.some(e=>eI(e)===n)}var QE=new Set(["alt","altgraph","backspace","capslock","control","delete","end","enter","escape","home","insert","meta","pagedown","pageup","pause","printscreen","shift","space","tab","arrowdown","arrowleft","arrowright","arrowup","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]);function eI(e){if(" "===e||"Spacebar"===e)return"space";if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(1===e.length)return e.toLowerCase();const t=e.toLowerCase();return QE.has(t)?t:e}var tI,nI=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),rI=class extends Ox{constructor(e,t){super(e),this.manager=e,this.options=t,CC(this,tI,[]),this.listeners=new FS,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!Gw(e.target))return;if(t.disabled)return;const{keyboardCodes:r=nI.keyboardCodes,preventActivation:o=nI.preventActivation}=null!=n?n:{};ZE(e,r.start)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=mb(()=>{var n;const r=null!=(n=e.handle)?n:e.element,o=n=>{Uw(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),kw(r);const{center:o}=new Hw(r);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=ES(r),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];wC(this,tI).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=nI.keyboardCodes}=null!=n?n:{};if(ZE(e,[...r.end,...r.cancel])){e.preventDefault();const t=ZE(e,r.cancel);return void this.handleEnd(e,t)}ZE(e,r.up)?this.handleMove("up",e):ZE(e,r.down)&&this.handleMove("down",e),ZE(e,r.left)?this.handleMove("left",e):ZE(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:nI.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(YE);!1===(null==e?void 0:e.disabled)&&(e.disable(),wC(this,tI).push(()=>{e.enable()}))}cleanup(){wC(this,tI).forEach(e=>e()),EC(this,tI,[])}destroy(){this.cleanup(),this.listeners.clear()}};tI=new WeakMap,rI.configure=xy(rI),rI.defaults=nI;var oI,iI,aI,sI=rI;oI=new WeakMap;iI=new WeakMap,aI=new WeakMap;var lI=class{};lI.Delay=class extends _x{constructor(){super(...arguments),CC(this,iI),CC(this,aI)}onEvent(e){switch(e.type){case"pointerdown":EC(this,aI,MS(e)),EC(this,iI,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!wC(this,aI))return;const{x:t,y:n}=MS(e);jv({x:t-wC(this,aI).x,y:n-wC(this,aI).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){wC(this,iI)&&(clearTimeout(wC(this,iI)),EC(this,aI,void 0),EC(this,iI,void 0))}},lI.Distance=class extends _x{constructor(){super(...arguments),CC(this,oI)}onEvent(e){switch(e.type){case"pointerdown":EC(this,oI,MS(e));break;case"pointermove":if(!wC(this,oI))return;const{x:t,y:n}=MS(e),r={x:t-wC(this,oI).x,y:n-wC(this,oI).y},{tolerance:o}=this.options;if(o&&jv(r,o))return void this.abort();jv(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){EC(this,oI,void 0)}};var cI,uI=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if("mouse"!==r||!Gw(o)||t.handle!==o&&!(null==(n=t.handle)?void 0:n.contains(o)))return"touch"===r?[new lI.Delay({value:250,tolerance:5})]:function(e){if(!Gw(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(o)&&!e.defaultPrevented?[new lI.Delay({value:200,tolerance:0})]:[new lI.Delay({value:200,tolerance:10}),new lI.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;if(r===t.element)return!1;if(r===t.handle)return!1;if(!Gw(r))return!1;if(null==(n=t.handle)?void 0:n.contains(r))return!1;const o=r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),dI=class extends Ox{constructor(e,t){super(e),this.manager=e,this.options=t,CC(this,cI,new Set),this.listeners=new FS,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=uI.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=mb(()=>{var n;const r=new AbortController,{signal:o}=r,i=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=xS(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(gI(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!Gw(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=uI.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:o}=e,i=wS(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=Dw(t.element),{x:s,y:l}=MS(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new Nx(c,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=LS(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:i?this.handleCancel:fI,options:{capture:!0}}]);wC(this,cI).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;!1===(null==(n=this.controller)?void 0:n.activated)&&(null==(r=this.controller)||r.onEvent(e));const{status:o}=this.manager.dragOperation;if(o.initializing||o.dragging){const n=MS(e),r=Dw(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,o.dragging&&vw.schedule(this.handleMove)}}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized,r=ES(e.target),o=r.defaultView;if(!n&&o){const e=e=>{e.target===r.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};o.addEventListener("click",e,!0),o.setTimeout(()=>{o.removeEventListener("click",e,!0)},0)}this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;const o=n.actions.start({coordinates:r,event:t,source:e});if(o.signal.aborted)return this.cleanup();t.preventDefault();const i=ES(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const a=Gw(t.target)?[t.target,i]:i,s=this.listeners.bind(a,[{type:"touchmove",listener:fI,options:{passive:!1}},{type:"click",listener:fI},{type:"contextmenu",listener:fI},{type:"keydown",listener:this.handleKeyDown}]);wC(this,cI).add(s),n.renderer.rendering.then(()=>{!o.signal.aborted&&n.dragOperation.status.dragging&&vw.schedule(this.handleMove)})}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},wC(this,cI).forEach(e=>e()),wC(this,cI).clear()}destroy(){this.cleanup(),this.listeners.clear()}};cI=new WeakMap,dI.configure=xy(dI),dI.defaults=uI;var pI=dI;function fI(e){e.preventDefault()}function hI(){}var mI=new WeakSet;function gI(e){e&&!mI.has(e)&&(e.addEventListener("touchmove",hI,{capture:!1,passive:!1}),mI.add(e))}var bI,vI,yI,xI,SI,wI,CI,EI,II,DI,MI,AI,LI,RI,PI,TI,qI={modifiers:[],plugins:[class extends wy{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=AC,announcement:o=LC}={},announcements:i=PC,screenReaderInstructions:a=RC,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:Kw(r),c=n?`${o}-${n}`:Kw(o);let u,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>vw.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),b=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const o=p;if(!o)return;const i=null==t?void 0:t(n,r);i&&o.nodeValue!==i&&(f=i,kC.includes(e)?g():(m(),g.cancel()))})),v=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||y.add(v),TC(n)&&!RS()||n.hasAttribute("tabindex")||y.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||y.add(()=>n.setAttribute("role",DC)),n.hasAttribute("aria-roledescription")||y.add(()=>n.setAttribute("aria-roledescription",MC)),n.hasAttribute("aria-describedby")||y.add(()=>n.setAttribute("aria-describedby",l));const e=qC(n)?["aria-pressed","aria-grabbed"]:["aria-grabbed"];for(const r of e){const e=String(t.isDragging);n.getAttribute(r)!==e&&y.add(()=>n.setAttribute(r,e))}const r=String(t.disabled);n.getAttribute("aria-disabled")!==r&&y.add(()=>n.setAttribute("aria-disabled",r))}}y.size>0&&vw.schedule(x)}),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),b.forEach(e=>e())}}},YE,class extends wy{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(eE),o=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},RE,class extends wy{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(eE),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=mb(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return JE(),document.addEventListener("selectionchange",JE,{capture:!0}),()=>{document.removeEventListener("selectionchange",JE,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[pI,sI]},kI=class extends lS{constructor(e={}){const t=sS(e.plugins,qI.plugins),n=sS(e.sensors,qI.sensors),r=sS(e.modifiers,qI.modifiers);super(uC(cC({},e),{plugins:[XE,HE,eE,...t],sensors:n,modifiers:r}))}},OI=class extends(yI=hx,vI=[sv],bI=[sv],yI){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:i}=n,a=pC(n,["element","effects","handle"]);super(cC({effects:()=>[...o(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(Sy))?t:[...n.sensors]).map(e=>{const t=e instanceof Ox?e:n.registry.register(e.plugin),r=e instanceof Ox?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),CC(this,SI,vC(xI,8,this)),vC(xI,11,this),CC(this,wI,vC(xI,12,this)),vC(xI,15,this),this.element=r,this.handle=i}};xI=fC(yI),SI=new WeakMap,wI=new WeakMap,yC(xI,4,"handle",vI,OI,SI),yC(xI,4,"element",bI,OI,wI),bC(xI,OI);var NI=class extends(II=mx,EI=[sv],CI=[sv],II){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,i=pC(n,["element","effects"]);const{collisionDetector:a=Xw}=i,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new Hw(n),o=Kg(()=>this.shape);return r&&(null==o?void 0:o.equals(r))?o:(this.shape=r,r)},l=ib(!1);super(uC(cC({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new dw(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),CC(this,PI),CC(this,MI,vC(DI,8,this)),vC(DI,11,this),CC(this,TI,vC(DI,12,this)),vC(DI,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){EC(this,PI,e,RI)}get element(){var e;return null!=(e=this.proxy)?e:wC(this,PI,LI)}};function _I(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}DI=fC(II),MI=new WeakMap,PI=new WeakSet,TI=new WeakMap,AI=yC(DI,20,"#element",EI,PI,MI),LI=AI.get,RI=AI.set,yC(DI,4,"proxy",CI,NI,TI),bC(DI,NI);var jI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function FI(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function zI(e,t=[],n=!1){const r=l(e);return r.current=e,function(e,t=!1){const n=l(e.peek()),r=l(!1),o=FI();return jI(()=>mb(()=>{const i=n.current,a=e.value;if(i!==a){if(n.current=a,!r.current)return;t?D(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}(b(()=>iv(()=>r.current()),t),n)}function WI(e){const t=l(e);return jI(()=>{t.current=e},[e]),t}function $I(e,t){const n=FI(),r=WI(t),o=b(()=>{const t=new Map;return{tracked:t,propertyCount:ib(0),active:!1,proxy:e?new Proxy(e,{get(e,n){const r=e[n];return t.has(n)||t.set(n,r),r}}):e}},[e]);return jI(()=>{o.propertyCount.value=o.tracked.size}),jI(()=>{if(!e)return;const{tracked:t,propertyCount:i}=o;o.active=!0;const a=mb(()=>{i.value;let a=!1,s=!1;for(const[n,o]of t){const i=e[n];Object.is(o,i)||(a=!0,t.set(n,i),s=!0===Kg(()=>{var e;return null==(e=r.current)?void 0:e.call(r,n,o,i)})||s)}a&&(s?queueMicrotask(()=>{o.active&&D(n)}):n())});return()=>{o.active=!1,a()}},[e,o,n,r]),o.proxy}function HI(e,t){e()}function BI(e,t,n=d,r=Object.is){const o=l(e);n(()=>{const n=o.current;r(e,n)||(o.current=e,t(e,n))},[t,e])}function VI(e,t){const n=l(_I(e));jI(()=>{const r=_I(e);r!==n.current&&(n.current=r,t(r))})}var GI=Object.defineProperty,UI=Object.defineProperties,YI=Object.getOwnPropertyDescriptors,KI=Object.getOwnPropertySymbols,XI=Object.prototype.hasOwnProperty,JI=Object.prototype.propertyIsEnumerable,ZI=(e,t,n)=>t in e?GI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QI=new kI,eD=c(QI),tD=y(x(({children:e},t)=>{const[n,r]=m(0),o=l(null),i=l(null),a=b(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return jI(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,n]),w(t,()=>a),null})),nD=[void 0,av];function rD(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:c}=t,u=((e,t)=>{var n={};for(var r in e)XI.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&KI)for(var r of KI(e))t.indexOf(r)<0&&JI.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=u,g=sS(f,qI.plugins),b=sS(m,qI.sensors),y=sS(h,qI.modifiers),x=WI(o),S=WI(i),w=WI(s),C=WI(a),E=WI(c),I=WI(r),D=function(e){const t=l(null);t.current||(t.current=e());return v(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new kI(u)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),BI(g,()=>D&&(D.plugins=g),...nD),BI(b,()=>D&&(D.sensors=b),...nD),BI(y,()=>D&&(D.modifiers=y),...nD),fi.jsxs(eD.Provider,{value:D,children:[fi.jsx(tD,{ref:p,children:n}),n]})}function oD(){return h(eD)}function iD(e){var t;const n=null!=(t=oD())?t:void 0,[r]=m(()=>e(n));return r.manager!==n&&(r.manager=n),jI(r.register,[n,r]),r}function aD({children:e,className:t,dropAnimation:n,style:o,tag:i,disabled:a}){var s;const c=l(null),u=oD(),p=null!=(s=zI(()=>null==u?void 0:u.dragOperation.source,[u]).value)?s:null,f="function"==typeof a?a(p):a;d(()=>{if(!c.current||!u||f)return;const e=u.plugins.find(e=>e instanceof RE);return e?(e.overlay=c.current,()=>{e.overlay=void 0}):void 0},[u,f]),d(()=>{if(!u)return;const e=u.plugins.find(e=>e instanceof RE);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[u,n]);const h=b(()=>{if(!u)return null;const e=new Proxy(u.registry,{get:(e,t)=>"register"===t||"unregister"===t?sD:e[t]});return new Proxy(u,{get:(t,n)=>"registry"===n?e:t[n]})},[u]);return fi.jsx(eD.Provider,{value:h,children:r(i||"div",{ref:c,className:t,style:o,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return fi.jsx(lD,{source:p,children:e});return e}())})}function sD(){return()=>{}}function lD({children:e,source:t}){return e($I(t))}var cD,uD,dD,pD,fD,hD=Object.create,mD=Object.defineProperty,gD=Object.getOwnPropertyDescriptor,bD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),vD=e=>{throw TypeError(e)},yD=["class","method","getter","setter","accessor","field","value","get","set"],xD=e=>void 0!==e&&"function"!=typeof e?vD("Function expected"):e,SD=(e,t,n,r,o)=>({kind:yD[e],name:t,metadata:r,addInitializer:e=>n._?vD("Already initialized"):o.push(xD(e||null))}),wD=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=yD[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,gD(o,n)),h=r.length-1;h>=0;h--)(l=SD(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,xD(a)&&(f[d]=a);return f&&mD(o,n,f),o},CD=(e,t,n)=>t.has(e)||vD("Cannot "+n),ED=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},ID=class extends(dD=pv,uD=[lv],cD=[lv],dD){constructor(e){var t,n,r;super(ED.from(e),(e,t)=>ED.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(fD,5,this),t=this,r=0,(n=pD).has(t)?vD("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return ED.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=ED.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(CD(a=this,s=pD,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);Gg(()=>{((e,t,n)=>{CD(e,t,"write to private field"),t.set(e,n)})(this,pD,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(ED.from(e)),this.velocity={x:0,y:0}}};fD=(e=>{var t;return[,,,hD(null!=(t=null==e?void 0:e[bD("metadata")])?t:null)]})(dD),pD=new WeakMap,wD(fD,2,"delta",uD,ID),wD(fD,2,"direction",cD,ID),((e,t)=>{return n=t,r=bD("metadata"),o=e[3],r in n?mD(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var n,r,o})(fD,ID);var DD=(e=>(e.Horizontal="x",e.Vertical="y",e))(DD||{});Object.values(DD);var MD=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/ED.distance(t.shape.center,n),type:Px.PointerIntersection,priority:Rx.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=ED.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:Px.ShapeIntersection,priority:Rx.Normal}}return null})(e)};function AD(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:i,accept:a,type:s}=e,l=iD(t=>new NI(((e,t)=>UI(e,YI(t)))(((e,t)=>{for(var n in t||(t={}))XI.call(t,n)&&ZI(e,n,t[n]);if(KI)for(var n of KI(t))JI.call(t,n)&&ZI(e,n,t[n]);return e})({},e),{register:!1,element:_I(o)}),t)),c=$I(l);return BI(i,()=>l.id=i),VI(o,e=>l.element=e),BI(a,()=>l.accept=a,void 0,av),BI(t,()=>l.collisionDetector=null!=t?t:MD),BI(n,()=>n&&(l.data=n)),BI(r,()=>l.disabled=!0===r),BI(s,()=>l.type=s),{droppable:c,get isDropTarget(){return c.isDropTarget},ref:f(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const LD=e=>Array.from({length:e},(e,t)=>t),RD=({id:e,sectionIndex:t,itemIndex:n})=>fi.jsx("span",{children:`${e}-${t}-${n}`}),PD=y(()=>{const e=qf(Og)??RD,{startSectionIndex:t,startIndex:n,id:r}=qf(Fg)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:fi.jsx(aD,{dropAnimation:null,children:fi.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:fi.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),TD=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=qf(Fg),o=r?.toSectionIndex===e&&r.toIndex===t;return fi.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},qD=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,kD=y(({sectionIndex:e})=>{const t=qf(Ag)[e],n=qf(Lg),r=qf(Rg),o=null!==qf(Fg),i=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=AD({id:a,type:"section",accept:"item",collisionPriority:Rx.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:fi.jsxs(hc,{ref:s,sx:{margin:"4px",outline:qD(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[fi.jsx(hc,{sx:{position:"relative",top:"4px"},children:fi.jsx(TD,{sectionIndex:e,itemIndex:0,isDragging:!1})}),fi.jsxs(hc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[fi.jsx(Rl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:i.title}),fi.jsx(Rl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),OD=y(({id:e,sectionIndex:t})=>{const n=qf(kg);return void 0===n?null:r(n,{id:e,sectionIndex:t})});var ND=Object.defineProperty,_D=Object.defineProperties,jD=Object.getOwnPropertyDescriptors,FD=Object.getOwnPropertySymbols,zD=Object.prototype.hasOwnProperty,WD=Object.prototype.propertyIsEnumerable,$D=(e,t,n)=>t in e?ND(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HD=(e,t)=>{for(var n in t||(t={}))zD.call(t,n)&&$D(e,n,t[n]);if(FD)for(var n of FD(t))WD.call(t,n)&&$D(e,n,t[n]);return e},BD=(e,t)=>_D(e,jD(t)),VD=class extends rS{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return BD(HD({},e),{[t]:n})}};VD.configure=xy(VD);var GD=VD,UD=GD.configure({axis:"x",value:0});GD.configure({axis:"y",value:0});var YD=class extends rS{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,o="number"==typeof n?n:n.y;return BD(HD({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/o)*o})}};YD.configure=xy(YD);var KD=Object.create,XD=Object.defineProperty,JD=Object.defineProperties,ZD=Object.getOwnPropertyDescriptor,QD=Object.getOwnPropertyDescriptors,eM=Object.getOwnPropertySymbols,tM=Object.prototype.hasOwnProperty,nM=Object.prototype.propertyIsEnumerable,rM=e=>{throw TypeError(e)},oM=(e,t,n)=>t in e?XD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iM=(e,t)=>{for(var n in t||(t={}))tM.call(t,n)&&oM(e,n,t[n]);if(eM)for(var n of eM(t))nM.call(t,n)&&oM(e,n,t[n]);return e},aM=(e,t)=>JD(e,QD(t)),sM=["class","method","getter","setter","accessor","field","value","get","set"],lM=e=>void 0!==e&&"function"!=typeof e?rM("Function expected"):e,cM=(e,t,n,r,o)=>({kind:sM[e],name:t,metadata:r,addInitializer:e=>n._?rM("Already initialized"):o.push(lM(e||null))}),uM=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},dM=(e,t,n,r,o,i)=>{for(var a,s,l,c,u,d=7&t,p=e.length+1,f=sM[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,ZD({get[n](){return fM(this,i)},set[n](e){return mM(this,i,e)}},n)),b=r.length-1;b>=0;b--)(c=cM(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[b])({get:g.get,set:g.set},c),l._=1,void 0===s?lM(s)&&(g[f]=s):"object"!=typeof s||null===s?rM("Object expected"):(lM(a=s.get)&&(g.get=a),lM(a=s.set)&&(g.set=a),lM(a=s.init)&&h.unshift(a));return g&&XD(o,n,g),o},pM=(e,t,n)=>t.has(e)||rM("Cannot "+n),fM=(e,t,n)=>(pM(e,t,"read from private field"),t.get(e)),hM=(e,t,n)=>t.has(e)?rM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),mM=(e,t,n,r)=>(pM(e,t,"write to private field"),t.set(e,n),n);function gM(e){return e instanceof ZM||e instanceof JM}var bM=class extends wy{constructor(e){super(e);const t=mb(()=>{const{dragOperation:t}=e;if(Uw(t.activatorEvent)&&gM(t.source)&&t.status.initialized){const t=e.registry.plugins.get(HE);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!Uw(e.nativeEvent))return;if(!gM(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],p=[];Gg(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&gM(e)||!e.element)continue;let n=e.shape;const r=new Hw(e.element,{getBoundingClientRect:e=>DS(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,Jw);Gg(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:b}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=n;if(!e||!gM(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||b!==s,u=c?l:null==t?void 0:t.element;if(!u)return;kw(u);const d=new Hw(u);if(!d)return;const p=Ov.delta(d,Ov.from(i.current.boundingRectangle),e.alignment);r.move({by:p}),c?r.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{n(),t()}}};var vM=Object.defineProperty,yM=Object.defineProperties,xM=Object.getOwnPropertyDescriptors,SM=Object.getOwnPropertySymbols,wM=Object.prototype.hasOwnProperty,CM=Object.prototype.propertyIsEnumerable,EM=(e,t,n)=>t in e?vM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IM=(e,t)=>{for(var n in t||(t={}))wM.call(t,n)&&EM(e,n,t[n]);if(SM)for(var n of SM(t))CM.call(t,n)&&EM(e,n,t[n]);return e},DM=(e,t)=>yM(e,xM(t));function MM(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function AM(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function LM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function RM(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(LM(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&LM(i)){const r=null==i.initialGroup?void 0:AM(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:AM(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return DM(IM({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return DM(IM({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=AM(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&LM(i)){const t=null==i.group?void 0:AM(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return DM(IM({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return DM(IM({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return DM(IM({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[u][p];return DM(IM({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,MM)}function PM(e){const t=new Map;for(const[,n]of e)for(const e of n)t.set(e.id,e.index);return t}function TM(e,t,n){var r;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(r=n.get(o))?void 0:r.has(t)))return!0}return!1}var qM="__default__";function kM(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function OM(e,t){return e.index-t.index}function NM(e,t){return e.initialIndex-t.initialIndex}function _M(e,t=OM){return Array.from(e).sort(t)}var jM=[bM,class extends wy{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof ZM){const{sortable:e}=n,{group:r}=e;let o=t.get(r);o||(o=new Set,t.set(r,o)),o.add(e)}return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:o,target:i}=r;if(!gM(o)||!gM(i))return;if(o.sortable===i.sortable)return;const a=t(),s=PM(a),l=o.sortable.group===i.sortable.group,c=a.get(o.sortable.group),u=l?c:a.get(i.sortable.group);c&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,d;const p=t();if(TM(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=_M(c),g=l?m:_M(u),b=null!=(r=o.sortable.group)?r:qM,v=null!=(d=i.sortable.group)?d:qM,y={[b]:m,[v]:g},x=RM(y,e);if(y===x)return;const S=x[v].indexOf(o.sortable),w=x[v].indexOf(i.sortable);n.collisionObserver.disable(),kM(f,S,h,w),Gg(()=>{for(const[e,t]of x[b].entries())t.index=e;if(!l)for(const[e,t]of x[v].entries())t.group=i.sortable.group,t.index=e}),n.actions.setDropTarget(o.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:o}=r;gM(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),r=PM(e),i=e.get(o.sortable.initialGroup);i&&n.renderer.rendering.then(()=>{const n=t();if(TM(r,e,n))return;const a=_M(i),s=_M(i,NM),l=o.sortable.element,c=a[s.indexOf(o.sortable)],u=null==c?void 0:c.element;c&&u&&l&&(kM(l,c.index,u,o.index),Gg(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],FM={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function zM(e){var t,n;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(n=null==e?void 0:e.droppable)&&n}}var WM,$M,HM,BM,VM,GM,UM,YM,KM=new class{constructor(){nv(this,dv,new WeakMap)}get(e,t){var n;return e?null==(n=tv(this,dv).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return tv(this,dv).has(e)||tv(this,dv).set(e,new Map),null==(r=tv(this,dv).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=tv(this,dv).get(e))?void 0:t.clear():void 0}};$M=[sv],WM=[sv];var XM=class{constructor(e,t){hM(this,BM,uM(HM,8,this)),uM(HM,11,this),hM(this,VM),hM(this,GM),hM(this,UM,uM(HM,12,this)),uM(HM,15,this),hM(this,YM),this.register=()=>(Gg(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{Gg(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{Gg(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:c=FM,plugins:u}=n,d=((e,t)=>{var n={};for(var r in e)tM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&eM)for(var r of eM(e))t.indexOf(r)<0&&nM.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=sS(u,jM),f=zM(o);this.droppable=new ZM(aM(iM({},d),{disabled:f.droppable}),t,this),this.draggable=new JM(aM(iM({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializationPending)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&KM.clear(this.manager),(null==r?void 0:r.dragging)&&KM.set(this.manager,this.id,Kg(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=fM(this,GM),o=fM(this,VM);e===r&&t===o||(mM(this,GM,e),mM(this,VM,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(RE))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:l,sensors:s}),t,this),mM(this,YM,d.element),this.manager=t,this.index=a,mM(this,GM,a),this.group=i,mM(this,VM,i),this.type=l,this.transition=c}get initialIndex(){var e,t;return null!=(t=null==(e=KM.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=KM.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){Kg(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=n.boundingRectangle.left-o.boundingRectangle.left,a=n.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=ww(r),l=jw(r,s,!1),c=jw(r,s);if(i||a){const n=kS(xS(r))?aM(iM({},t),{duration:0}):t;_w({element:r,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){Gg(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){Gg(()=>{const t=fM(this,YM),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),mM(this,YM,e)})}get element(){var e,t;const n=fM(this,YM);if(n)return null!=(t=null!=(e=jS.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=sS(e,jM)}set disabled(e){const t=zM(e);Gg(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){Gg(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:Xw}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){Gg(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};HM=[,,,KD(null)],BM=new WeakMap,VM=new WeakMap,GM=new WeakMap,UM=new WeakMap,YM=new WeakMap,dM(HM,4,"index",$M,XM,BM),dM(HM,4,"group",WM,XM,UM),((e,t)=>{return oM(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(HM,XM);var JM=class extends OI{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},ZM=class extends NI{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},QM=Object.defineProperty,eA=Object.defineProperties,tA=Object.getOwnPropertyDescriptors,nA=Object.getOwnPropertySymbols,rA=Object.prototype.hasOwnProperty,oA=Object.prototype.propertyIsEnumerable,iA=(e,t,n)=>t in e?QM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function aA(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:i,element:a,handle:s,index:l,group:c,disabled:u,modifiers:d,sensors:p,target:h,type:m,plugins:g}=e,b=function(e){return null===e?null:iM(iM({},FM),e)}(e.transition),v=iD(t=>new XM(((e,t)=>eA(e,tA(t)))(((e,t)=>{for(var n in t||(t={}))rA.call(t,n)&&iA(e,n,t[n]);if(nA)for(var n of nA(t))oA.call(t,n)&&iA(e,n,t[n]);return e})({},e),{transition:b,register:!1,handle:_I(s),element:_I(a),target:_I(h)}),t)),y=$I(v,sA);return BI(o,()=>v.id=o),jI(()=>{Gg(()=>{v.group=c,v.index=l})},[v,c,l]),BI(m,()=>v.type=m),BI(t,()=>v.accept=t,void 0,av),BI(i,()=>i&&(v.data=i)),BI(l,()=>{var e;(null==(e=v.manager)?void 0:e.dragOperation.status.idle)&&(null==b?void 0:b.idle)&&v.refreshShape()},HI),VI(s,e=>v.handle=e),VI(a,e=>v.element=e),VI(h,e=>v.target=e),BI(u,()=>v.disabled=null!=u&&u,void 0,av),BI(p,()=>v.sensors=p,void 0,av),BI(n,()=>v.collisionDetector=n),BI(r,()=>v.collisionPriority=r),BI(g,()=>v.plugins=g,void 0,av),BI(b,()=>v.transition=b,void 0,av),BI(d,()=>v.modifiers=d,void 0,av),BI(e.alignment,()=>v.alignment=e.alignment),{sortable:y,get isDragging(){return y.isDragging},get isDropping(){return y.isDropping},get isDragSource(){return y.isDragSource},get isDropTarget(){return y.isDropTarget},handleRef:f(e=>{v.handle=null!=e?e:void 0},[v]),ref:f(e=>{var t,n;(e||!(null==(t=v.element)?void 0:t.isConnected)||(null==(n=v.manager)?void 0:n.dragOperation.status.idle))&&(v.element=null!=e?e:void 0)},[v]),sourceRef:f(e=>{var t,n;(e||!(null==(t=v.source)?void 0:t.isConnected)||(null==(n=v.manager)?void 0:n.dragOperation.status.idle))&&(v.source=null!=e?e:void 0)},[v]),targetRef:f(e=>{var t,n;(e||!(null==(t=v.target)?void 0:t.isConnected)||(null==(n=v.manager)?void 0:n.dragOperation.status.idle))&&(v.target=null!=e?e:void 0)},[v])}}function sA(e,t,n){return!("isDragSource"!==e||n||!t)}const lA=({id:e,itemIndex:t,sectionIndex:n})=>fi.jsx("div",{children:`${n}:${t} - ${e}`}),cA=y(({id:e,itemIndex:t,sectionIndex:n})=>{const r=qf(Ng),o=qf(qg),i=qf(Ag).at(n)??0,a=qf(Lg)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:c}=aA({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[UD],plugins:[bM],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),u=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=o??lA;return fi.jsx(Ju,{className:"section-item-container","data-testid":"section-item",onClick:u,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:fi.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[fi.jsx(TD,{isDragging:l,itemIndex:t,sectionIndex:n}),fi.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:c}),t===i-1&&fi.jsx(TD,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})}),uA=y(({sectionIndex:e})=>{const t=qf(Lg),n=qf(Ag).at(e)??0,r=t({sectionIndex:e});return fi.jsxs(hc,{className:"exploration-list",style:{overflow:"auto"},children:[fi.jsx(lu,{}),fi.jsx(OD,{id:r,sectionIndex:e}),fi.jsx(lu,{}),fi.jsx(kD,{sectionIndex:e}),fi.jsx(Fu,{sx:{padding:"2px 8px"},children:LD(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return fi.jsx(cA,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),dA=[pI.configure({activationConstraints:[new lI.Distance({value:5})]}),sI],pA=y(()=>{const e=qf(Mg),t=qf(Lg),n=kf(zg("start")),r=kf(zg("over")),o=kf(zg("end"));return fi.jsxs(rD,{sensors:dA,onDragEnd:e=>{o(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[fi.jsx(hc,{style:{display:"flex",flexDirection:"column"},children:LD(e).map(e=>fi.jsx(uA,{sectionIndex:e},t({sectionIndex:e})))}),fi.jsx(PD,{})]})}),fA=y(e=>fi.jsx(ug,{atoms:Wg,atomFamilies:$g,children:fi.jsx(Hg,{props:e,children:fi.jsx(pA,{})})})),hA="12px",mA="nebula-table-utils-head-menu-button",gA="sn-copy-cell";let bA=function(e){return e.Enter="Enter",e.Space=" ",e.Esc="Escape",e.Tab="Tab",e.Shift="Shift",e.Left="ArrowLeft",e.Right="ArrowRight",e.Up="ArrowUp",e.Down="ArrowDown",e.C="c",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.F2="F2",e}({});const vA="nebula-table-utils-column-adjuster";let yA=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),xA=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const SA={darker:.15,brighter:.3,opacity:.03},wA={darker:.3,brighter:.5,opacity:.05};let CA=function(e){return e.Cyclic="C",e}({});const EA=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&(e.push(r),n.delete(t)),e},[])},IA=(e,t,n)=>{if(0===n.size)return t;let r=0,o=0;for(;r<e.length&&o<t;){const t=e[r];"string"==typeof t&&n.has(t)||o++,r++}return r},DA=Eg(e=>Sf(t=>{const n=t(Kh),r=t(Fh)?.[e];if(r)return r;const o=n?.qHyperCubeDef.rankedList?.[e];if(void 0===o){const n=t(mh);return n?.createRankedList(e)}return o})),MA=Eg(e=>Sf(t=>{const n=t(wh),r=t(mh),o=t(Uh),i=t(Fh)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:o?.qHyperCube.rankedList?.[e];return i||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),AA=e=>"string"==typeof e.id,LA=e=>Sf(t=>{const n=t(e),r=t(um);if(!n||0===n.length)return"disabled";const o=n.filter(AA);if(0===o.length)return"disabled";const i=o.filter(e=>r.has(e.id)).length;return 0===i?"none":i===o.length?"all":"some"}),RA=e=>Sf(null,(t,n,r)=>{const o=t(e),i=o?.filter(AA);i&&0!==i.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:o}=e,i=r(um),a=new Set,s=new Set;if(t.forEach(e=>{const t=i.has(e.id);t&&!n&&s.add(e.id),!t&&n&&a.add(e.id)}),0===a.size&&0===s.size)return;const l=new Set(r(am)),c=new Set(r(sm));a.forEach(e=>l.add(e)),a.forEach(e=>c.delete(e)),s.forEach(e=>c.add(e)),s.forEach(e=>l.delete(e)),o(am,l),o(sm,c),fh({type:"apply",localChecked:a,localUnchecked:s,handler:r(mh),model:r(hh),fieldTypeById:r(tm),handlerQueue:r(rm)})})({items:i,shouldCheckAll:r,get:t,set:n})}),PA=Sf(e=>{const t=e(Yh);return t?.qHyperCube.qDimensionInfo.filter(Oh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),TA=Sf(e=>{const t=e(Uh),n=e(yh),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:o}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:o??""}});return r}),qA=Sf(e=>{const t=e(yh),n=e(PA),r=e(Sh),o=e(wh)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),i=e(o?DA("columns"):MA("columns")),a=e(o?DA("rows"):MA("rows")),s=e(TA);if(void 0===n||void 0===i||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:EA(l,a)},{id:"columns",title:t("Common.Columns"),items:EA(l,i)}]}),kA=Eg(e=>Sf(t=>t(qA).at(e))),OA=Eg(({sectionIndex:e,itemIndex:t})=>Sf(n=>n(kA(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),NA=Eg(e=>Sf(t=>t(kA(e))?.title)),_A=Sf(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(kA(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),jA=Sf(e=>e(qA).map(e=>e.items.length)),FA=Eg(e=>LA(Sf(t=>t(kA(e))?.items))),zA=Eg(e=>RA(Sf(t=>t(kA(e))?.items))),WA=Sf(null,(e,t,{event:n,id:r,toIndex:o,toSection:i,startSection:a})=>{const s=e(mh),l=e(hh),c=e(rm),u=e(DA("rows")),d=e(DA("columns")),p=e(Qh),f=i;if(void 0===s||void 0===l||void 0===u||void 0===d||null===c)return;if(n.operation.canceled)return void t(Fh,null);if("section"===n.operation.target?.type&&a===i)return void t(Fh,null);const h=Cg({rows:u,columns:d},n);t(Fh,h);const m=("rows"===f?u:d).filter(e=>e!==r),g=IA(m,o,p);c.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:g,toSection:f}):await s.moveDimension({cId:r,toIndex:g,toSection:f})})}),$A={noItems:{row:"ChartExploration.PivotTable.RowSectionEmpty.Title",column:"ChartExploration.PivotTable.ColumnSectionEmpty.Title",measure:"ChartExploration.PivotTable.MeasureSectionEmpty.Title"},noSearchFound:{row:"ChartExploration.PivotTable.NoRowsFound.Title",column:"ChartExploration.PivotTable.NoColumnsFound.Title",measure:"ChartExploration.PivotTable.NoMeasuresFound.Title"}},HA="ChartExploration.PivotTable.DimensionSectionEmpty.Message",BA="ChartExploration.PivotTable.MeasureSectionEmpty.Message",VA="#177fe6",GA=(e,t,n,r)=>{if("measure"===t)return e(r?$A.noSearchFound.measure:$A.noItems.measure);const o=r?$A.noSearchFound:$A.noItems;return e(n?o.row:o.column)},UA=(e,t,n)=>n?"":e("measure"===t?BA:HA),YA=Eg(e=>Sf(t=>{const n=t(yh),r=t(xh).length>0;return t=>({title:GA(n,e,0===t,r),message:UA(n,e,r)})})),KA=YA("measure"),XA=YA("dimensions"),JA=({children:e})=>fi.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),ZA=e=>{const t=qf(OA(e));return fi.jsx(JA,{children:t})},QA=Sf(e=>{const t=e(Yh);return t?.qHyperCube.qMeasureInfo.filter(Oh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),eL=Sf(e=>{const t=e(wh)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(Uh),r=e(QA),o=e(Sh),i=e(t?DA("measures"):MA("measures"));if(void 0===n||void 0===r||void 0===i)return[];const a=n.qHyperCube.qMeasureInfo.filter(Oh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(o);return EA(s,i)}),tL=Eg(e=>Sf(t=>t(eL).at(e)?.title??"")),nL=Sf(e=>({itemIndex:t})=>{const n=e(eL);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),rL=Sf(e=>[e(eL).length]),oL=LA(eL),iL=RA(eL),aL=Sf(null,(e,t,{id:n,toIndex:r,event:o})=>{const i=e(mh),a=e(hh),s=e(rm),l=e(DA("measures")),c=e(em);if(void 0===i||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=Cg({measures:l},o);t(Fh,u);const d=l.filter(e=>e!==n),p=IA(d,r,c);s.add(async()=>{await i.moveMeasure({cId:n,toIndex:p})})}),sL={...mp},lL=jp().palette,cL={TEXT:lL.text.primary,DISABLED:lL.text.disabled,HOVER:lL.action.hover,WHITE:sL.GREYSCALE_100,BORDER_MEDIUM:sL.GREYSCALE_85,DARK_MODE_TEXT:sL.GREYSCALE_95,DARK_MODE_BORDER:sL.GREYSCALE_95,DARK_MODE_DISABLED:sL.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:lL.primary.main,LINK:lL.info.main,ERROR:lL.error.main};function uL(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function dL(e){if("object"==typeof e&&uL(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const pL={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},fL="qcm-color";function hL(...e){const t={type:fL,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===fL)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(uL(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e<0?e=0:e>360&&(e=360),t<0?t=0:t>1&&(t=1),a<0?a=0:a>1&&(a=1);const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e<0?e=0:e>360&&(e=360),t<0?t=0:t>1&&(t=1),a<0?a=0:a>1&&(a=1);const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e<0?e=0:e>360&&(e=360),t<0?t=0:t>1&&(t=1),a<0?a=0:a>1&&(a=1);const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in pL}(e)){const t=pL[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function mL(e){let t,n,r;if(uL(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?dL(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function gL(e){let t,n,r=0;const o="string"==typeof e?hL(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function bL(e){let t,n,r=0;const o="string"==typeof e?hL(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function vL(e){if(uL(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?dL(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function yL(e,t){return uL(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:yL(hL(e))}function xL(e){return uL(e)?1===e.a?vL(e):yL(e):xL(hL(e))}const SL=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function wL(e){return.2126*SL(e.r)+.7152*SL(e.g)+.0722*SL(e.b)}function CL(...e){const t=hL(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=gL(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=hL(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=hL(...e);return t.invalid||wL(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=vL(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=yL(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=xL(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=mL(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?hL(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=gL(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=bL(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=bL(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>CL(o(18*e)),getDarkenedColor:(e=1)=>CL(o(18*-e))}}function EL(e,t){if(!e||!t)return;const n=wL(e),r=wL(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const IL="#FFFFFF";const DL=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function ML(){return DL}var AL,LL,RL=function(){if(LL)return AL;LL=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return AL=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},AL}();function PL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function TL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qL(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(RL);var kL=.7,OL=1/kL,NL="\\s*([+-]?\\d+)\\s*",_L="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",FL=/^#([0-9a-f]{3,8})$/,zL=new RegExp(`^rgb\\(${NL},${NL},${NL}\\)$`),WL=new RegExp(`^rgb\\(${jL},${jL},${jL}\\)$`),$L=new RegExp(`^rgba\\(${NL},${NL},${NL},${_L}\\)$`),HL=new RegExp(`^rgba\\(${jL},${jL},${jL},${_L}\\)$`),BL=new RegExp(`^hsl\\(${_L},${jL},${jL}\\)$`),VL=new RegExp(`^hsla\\(${_L},${jL},${jL},${_L}\\)$`),GL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function UL(){return this.rgb().formatHex()}function YL(){return this.rgb().formatRgb()}function KL(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=FL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XL(t):3===n?new eR(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?JL(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?JL(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=zL.exec(e))?new eR(t[1],t[2],t[3],1):(t=WL.exec(e))?new eR(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$L.exec(e))?JL(t[1],t[2],t[3],t[4]):(t=HL.exec(e))?JL(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=BL.exec(e))?aR(t[1],t[2]/100,t[3]/100,1):(t=VL.exec(e))?aR(t[1],t[2]/100,t[3]/100,t[4]):GL.hasOwnProperty(e)?XL(GL[e]):"transparent"===e?new eR(NaN,NaN,NaN,0):null}function XL(e){return new eR(e>>16&255,e>>8&255,255&e,1)}function JL(e,t,n,r){return r<=0&&(e=t=n=NaN),new eR(e,t,n,r)}function ZL(e){return e instanceof qL||(e=KL(e)),e?new eR((e=e.rgb()).r,e.g,e.b,e.opacity):new eR}function QL(e,t,n,r){return 1===arguments.length?ZL(e):new eR(e,t,n,null==r?1:r)}function eR(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function tR(){return`#${iR(this.r)}${iR(this.g)}${iR(this.b)}`}function nR(){const e=rR(this.opacity);return`${1===e?"rgb(":"rgba("}${oR(this.r)}, ${oR(this.g)}, ${oR(this.b)}${1===e?")":`, ${e})`}`}function rR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oR(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function iR(e){return((e=oR(e))<16?"0":"")+e.toString(16)}function aR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lR(e,t,n,r)}function sR(e){if(e instanceof lR)return new lR(e.h,e.s,e.l,e.opacity);if(e instanceof qL||(e=KL(e)),!e)return new lR;if(e instanceof lR)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new lR(a,s,l,e.opacity)}function lR(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function cR(e){return(e=(e||0)%360)<0?e+360:e}function uR(e){return Math.max(0,Math.min(1,e||0))}function dR(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}PL(qL,KL,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:UL,formatHex:UL,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return sR(this).formatHsl()},formatRgb:YL,toString:YL}),PL(eR,QL,TL(qL,{brighter(e){return e=null==e?OL:Math.pow(OL,e),new eR(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?kL:Math.pow(kL,e),new eR(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new eR(oR(this.r),oR(this.g),oR(this.b),rR(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tR,formatHex:tR,formatHex8:function(){return`#${iR(this.r)}${iR(this.g)}${iR(this.b)}${iR(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:nR,toString:nR})),PL(lR,function(e,t,n,r){return 1===arguments.length?sR(e):new lR(e,t,n,null==r?1:r)},TL(qL,{brighter(e){return e=null==e?OL:Math.pow(OL,e),new lR(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?kL:Math.pow(kL,e),new lR(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new eR(dR(e>=240?e-240:e+120,o,r),dR(e,o,r),dR(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new lR(cR(this.h),uR(this.s),uR(this.l),rR(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=rR(this.opacity);return`${1===e?"hsl(":"hsla("}${cR(this.h)}, ${100*uR(this.s)}%, ${100*uR(this.l)}%${1===e?")":`, ${e})`}`}}));const pR=Math.PI/180,fR=180/Math.PI,hR=.96422,mR=.82521,gR=4/29,bR=6/29,vR=3*bR*bR,yR=bR*bR*bR;function xR(e){if(e instanceof SR)return new SR(e.l,e.a,e.b,e.opacity);if(e instanceof DR)return MR(e);e instanceof eR||(e=ZL(e));var t,n,r=IR(e.r),o=IR(e.g),i=IR(e.b),a=wR((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=wR((.4360747*r+.3850649*o+.1430804*i)/hR),n=wR((.0139322*r+.0971045*o+.7141733*i)/mR)),new SR(116*a-16,500*(t-a),200*(a-n),e.opacity)}function SR(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function wR(e){return e>yR?Math.pow(e,1/3):e/vR+gR}function CR(e){return e>bR?e*e*e:vR*(e-gR)}function ER(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function IR(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function DR(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function MR(e){if(isNaN(e.h))return new SR(e.l,0,0,e.opacity);var t=e.h*pR;return new SR(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}PL(SR,function(e,t,n,r){return 1===arguments.length?xR(e):new SR(e,t,n,null==r?1:r)},TL(qL,{brighter(e){return new SR(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new SR(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new eR(ER(3.1338561*(t=hR*CR(t))-1.6168667*(e=1*CR(e))-.4906146*(n=mR*CR(n))),ER(-.9787684*t+1.9161415*e+.033454*n),ER(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),PL(DR,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof DR)return new DR(e.h,e.c,e.l,e.opacity);if(e instanceof SR||(e=xR(e)),0===e.a&&0===e.b)return new DR(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*fR;return new DR(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new DR(e,t,n,null==r?1:r)},TL(qL,{brighter(e){return new DR(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new DR(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return MR(this).rgb()}}));var AR=e=>()=>e;function LR(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):AR(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?LR:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):AR(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=QL(e)).r,(t=QL(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=LR(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var RR="center",PR="bottom";[{key:"NoDataExist",alignment:RR,condition:({layoutService:e})=>{if(!e)return!1;const{x:t,y:n}=e.meta.size;return t*n===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:RR,condition:({layoutService:e})=>!!e&&e.getHyperCubeValue("qMeasureInfo").every(e=>"NaN"===e.qMin&&"NaN"===e.qMax)},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:RR,condition:({layoutService:e})=>{if(!e)return!1;const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:RR},{key:"DataRangeIncludingZero",alignment:PR},{key:"LimitedData",alignment:PR},{key:"NegativeOrZeroValues",alignment:PR}].reduce((e,t)=>(e[t.key]=t,e),{});const TR=["__proto__","constructor"];function qR(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];if(TR.some(e=>r.includes(e)))return;let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===i[t]&&(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n?i[o]=n:delete i[o]}function kR(e,t=e=>e){const n=function(){let e={};return{get:t=>e[t],set:(t,n)=>(e[t]=n,n),has:t=>t in e,remove(t){delete e[t]},empty(){e={}}}}();return r=>{const o=t(r);return n.has(o)?n.get(o):n.set(o,e(r))}}function OR(e,t=50){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function NR(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function _R(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=FR)):void 0===t&&(t=jR);for(var n,r,o,i,a,s=new $R(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new $R(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(WR)}function jR(e){return e.children}function FR(e){return Array.isArray(e)?e[1]:null}function zR(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function WR(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function $R(e){this.data=e,this.depth=this.height=0,this.parent=null}var HR;$R.prototype=_R.prototype={constructor:$R,count:function(){return this.eachAfter(NR)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return _R(this).eachBefore(zR)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},HR=function(e){
89
89
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
90
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-b+1)%l)&&y<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},HR({exports:{}});const BR=(e,t=cL.TEXT,n=cL.WHITE)=>{const r=CL(e??""),o=CL(t),i=CL(n);return r.isInvalid()?t:function(e,t,n){const r=EL(e,t),o=EL(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},VR=e=>{const t=e.getStyle("","","dataColors.selected")||cL.SELECTED,n=function(e,t){const n=CL(IL),r=CL(e),o=CL(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=EL(n,r),a=EL(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?IL:"#000000"}(t,cL.TEXT);return{background:t,color:n}},GR=(e,t)=>{const n=CL(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},UR=(e,t,n)=>{const r=t?e.getColorPickerColor(t):"none";return"none"===r?n:r},YR=e=>{const t=CL(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},KR=e=>{e.stopPropagation(),e.preventDefault()},XR=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},JR=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,ZR=e=>{const{currentTarget:t}=e,n=JR(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},QR=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===bA.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},eP=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},tP=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===bA.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&XR(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&XR(e)}},nP=(e,t)=>{const{key:n}=e;switch(n){case bA.Tab:e.shiftKey?((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return;const o=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],i=o?.getElementsByClassName("exploration-item-focus").length??0;if(i>0){const t=o?.getElementsByClassName("exploration-draggable-icon")[i-1];t&&(KR(e),XR(t))}})(e,t):(KR(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];if(!o){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&XR(e))}XR(o)})(e,t));break;case bA.Down:if(eP(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a+1<o?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],i&&XR(i)})(e,t);break;case bA.Up:if(eP(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[o-1],i&&XR(i)})(e,t);break;case bA.Enter:case bA.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},rP=({children:e})=>fi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),oP=({children:e,sectionIndex:t})=>{const r=qf(void 0!==t?FA(t):oL),o=kf(void 0!==t?zA(t):iL),i=n.useRef(null),a={ref:i,toggleAllCheckboxes:o,checkState:r,sectionIndex:t};return fi.jsxs(hc,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{nP(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}},children:[fi.jsx(zc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{o(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),fi.jsx(rP,{children:e})]})},iP=({sectionIndex:e})=>{const t=qf(NA(e));return fi.jsx(oP,{sectionIndex:e,children:t})},aP=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),sP=As("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),lP=As(aP)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}})),cP=e=>{const t=e.key===bA.Down?(e=>{const{currentTarget:t,key:n}=e,r=JR(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=QR(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):ZR(e);t&&XR(t)},uP=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&XR(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void XR(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},dP=(e,t)=>{const{key:n}=e;switch(n){case bA.Tab:if(e.shiftKey)KR(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&XR(e))}const n=ZR(e);n&&XR(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void XR(t);const r=ZR(e);r&&XR(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return XR(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&XR(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&XR(n),!0}const o=QR(n,r);if(!o)return!1;XR(o)}return!0})(e,t);n?KR(e):e.stopPropagation()}break;case bA.Down:case bA.Up:if(eP(e))break;KR(e),cP(e);break;case bA.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}KR(e),uP(e,t);break;case bA.Space:KR(e),uP(e,t)}},pP=({children:e})=>fi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),fP=({title:e,dragHandleRef:t,...r})=>{const[o,i]=Of(um),a=qf(yh),s=n.useRef(null),l=n.useRef(null),c=n.useRef(null),u={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),fi.jsxs(hc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(r.id)},onKeyDown:e=>{dP(e,u)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}},children:[fi.jsxs(hc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{dP(e,u)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}},children:[fi.jsx(zc,{checked:-1!==r.id&&o.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),fi.jsx(pP,{children:e})]}),fi.jsx(lP,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{dP(e,u)}})]})},hP=e=>{const t=qf(OA(e))??"";return fi.jsx(fP,{title:t,...e})},mP=()=>{const e=qf(_A),t=qf(jA),n=qf(XA),r=kf(WA);return fi.jsx(fA,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:ZA,headerRenderer:iP,itemRenderer:hP})},gP=({itemIndex:e})=>{const t=qf(tL(e));return fi.jsx(JA,{children:t})},bP=()=>{const e=qf(yh);return fi.jsx(oP,{children:e("Common.Values")})},vP=e=>{const{itemIndex:t}=e,n=qf(tL(t));return fi.jsx(fP,{title:n,...e})},yP=()=>{const e=qf(nL),t=qf(rL),n=qf(KA),r=kf(aL);return fi.jsx(hc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:fi.jsx(fA,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:gP,headerRenderer:bP,itemRenderer:vP})})},xP=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),SP=()=>{const[e,t]=Of(xh),r=qf(yh),o=n.useRef(null),[i]=qf(rL),[a=0,s=0]=qf(jA),l=f(e=>{t(e.target.value)},[t]),c=0===e.length||0===a&&0===s&&0===i?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return fi.jsxs(hc,{ref:o,onKeyDown:e=>{tP(e,o)},style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[fi.jsx(sP,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:c}),fi.jsx(Jd,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:fi.jsx(Mu,{position:"start",children:fi.jsx(xP,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},wP=e=>{const t=jp();return fi.jsx(Rs,{theme:t,children:fi.jsx(Mf,{children:fi.jsx(dm,{props:e,children:fi.jsxs(hc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[fi.jsx(SP,{}),fi.jsx(mP,{}),fi.jsx(yP,{})]})})})})},CP=()=>({component:wP,classification:{tags:["exploration"],exclusive:!0}});var EP=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(EP||{}),IP=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(IP||{}),DP=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(DP||{}),MP=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(MP||{});const AP=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,LP=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case DP.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case EP.BEGINNING_OF_WORD:t="*^",n="*";break;case EP.ENDS_WITH:t="*";break;case EP.STARTS_WITH:n="*";break;case EP.MATCHES_EXACTLY:break;case EP.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case DP.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===IP.GENERAL,r=t?.modifier?.type===MP.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${AP(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${AP(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${AP(t.firstValue?.field)})`):(i=`${AP(e.field)}`,a=`${t.firstValue?.aggregator}(total ${AP(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let c="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${AP(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${AP(t.secondValue?.field)})`,a=` and ${i}`),c=`${a}${o[1]}${e}`}return`"${l}${c}"`})(e);break;case DP.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case DP.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},RP=[];for(let e=0;e<256;++e)RP.push((e+256).toString(16).slice(1));const PP=new Uint8Array(16);function TP(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(PP);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(RP[e[t+0]]+RP[e[t+1]]+RP[e[t+2]]+RP[e[t+3]]+"-"+RP[e[t+4]]+RP[e[t+5]]+"-"+RP[e[t+6]]+RP[e[t+7]]+"-"+RP[e[t+8]]+RP[e[t+9]]+"-"+RP[e[t+10]]+RP[e[t+11]]+RP[e[t+12]]+RP[e[t+13]]+RP[e[t+14]]+RP[e[t+15]]).toLowerCase()}(t)}(e)}const qP=()=>crypto?.randomUUID?.()??TP(),kP=1e3,OP=1e3,NP=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),o=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const i=[...o].sort((e,t)=>e-t);for(let e=0;e<i.length;e++)if(i[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},_P=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},jP=e=>{if(!e)return;NP(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const o=n[r],i=n.indexOf(r),a=n[i];_P(n,r,i),_P(e,r,i),_P(t,t.indexOf(o),t.indexOf(a))}})(t,n)},FP=M;class zP extends FP{#c;#u;#d;constructor(e,t){super(e),this.path=e.path,this.#c=t.translator,this.#u=t.flags.isEnabled,this.#d=Ph(t,{tag:["sn-pivot-table","PivotHyperCubeHandler"]})}async#p(e,t,n,r,o=!1){if(!e||this.#f(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=qP()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,o=!1)=>{const i=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return o||await e.autoSortDimension(t),jP(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:o,qNoOfLeftDims:i}=e,a=t.length,s=o.indexOf(-1),l=-1!==s,c=void 0!==r?r+(i||0):void 0;if(l&&void 0!==c&&s>=c?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,o,s):o.push(a),void 0===r)t.push(n);else if(void 0!==c){const e=l&&c>s?c-1:c;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const o=e.qNoOfLeftDims,{qInterColumnSortOrder:i}=e,a=t.length,s=i.indexOf(-1),l=-1!==s&&o>0&&s<o;if(i.push(a),l)void 0===r?t.splice(o-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),i.splice(s,1),i.splice(s+1,0,-1));else{const e=r??o;t.splice(e,0,n),-1!==s&&(i.splice(s,1),i.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n,o);return this.#h({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#p(e,t,n,r)}async addDimensions(e,t,n){const r=[];for(const o of e){const e=await this.addDimension(o,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#f(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let o=n;return o=void 0===o?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+o:Math.min(o,this.hcProperties.excludedNoOfLeftDims),r.splice(o,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#h({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const o=this.createFieldDimension(e,t,n);return this.addDimension(o,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=qP());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),o=this.getAlternativeDimensions();if(r.length>=kP)return Promise.resolve();const i="number"==typeof t?t:o.length;return o.splice(i,0,e),this.#h({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#m({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),o=this.properties.qHyperCubeDef.qNoOfLeftDims,i=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof i&&"number"==typeof o&&i+1<=o&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),jP(this.hcProperties),this.#m({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#f(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#g(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,o=n.splice(r,0,e);return this.#b({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),o}async addMeasure(e,t,n,r){if(this.#g(e))return;if(e.qDef.cId||(e.qDef.cId=qP()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const o=this.getMeasures();if(o.length<this.maxMeasures()){const t=1===o.length;return void 0!==n&&n>=0?o.splice(n,0,e):o.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#b({cId:e.qDef.cId,addLast:void 0===n}),e))}return o.length<OP?(this.getAlternativeMeasures().push(e),this.#b({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),o=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=qP()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===o.indexOf(-1)&&o.push(-1)}this.#b({cId:e.qDef.cId})}else n.length<OP&&(t=r.length,r.splice(t,0,e),this.#b({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#m({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,o,i;if("number"==typeof e&&e<n.length){r=2===n.length,o=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(i=t.indexOf(-1),t.splice(i,1),this.hcProperties.qNoOfLeftDims&&i+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(o=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(o)return this.#m({cId:o.qDef.cId,section:"measures"}),o}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#g(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#v("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#v("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#x(e){return[...this.#y(e)]}#S(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#w(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#C(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#v(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#E())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#E(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#I(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#E())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#D(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#v(e),o=this.getDimensions(),i=r.map(e=>-1===e?-1:o[e]);switch(e){case"rows":return i.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return i.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return this.#d.warn({msg:"Corrupt ranked list detected: duplicate ids",payload:{duplicates:r,section:e,chartId:n}}),!0}const r=this.#D(e);if(t.length!==r.length)return this.#d.warn({msg:"Corrupt ranked list detected: length mismatch",payload:{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}}),!0;const o=r.filter(e=>!t.includes(e));if(o.length>0)return this.#d.warn({msg:"Corrupt ranked list detected: missing ids",payload:{missingIds:o,section:e,chartId:n}}),!0;const i=this.#D(e,!1),a=t.filter(e=>i.includes(e)),s=i.filter((e,t)=>e!==a[t]);return s.length>0&&(this.#d.warn({msg:"Corrupt ranked list detected: main field order mismatch",payload:{section:e,chartId:n,orderMismatchIds:s}}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#M({section:e});case"measures":return this.#A();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#M({section:e}){const t=this.getDimensions(),n=this.#v(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),o=n.map(e=>-1===e?-1:t[e].qDef.cId);return o.push(...r.map(e=>e.qDef.cId)),this.#S(e,o)}#A(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#u("SUPPORT-9810-MISSING-MEASURES")&&!this.#u("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#S("measures",e)}#L({section:e,cId:t,fields:n,addLast:r}){const o=this.#y(e),i=n.findIndex(e=>e.qDef.cId===t),a=n[i+1]?.qDef.cId,s=n[i-1]?.qDef.cId;if(r)o.push(t);else if(i>=0)if(a){const e=o.indexOf(a);o.splice(e,0,t)}else if(s){const e=o.indexOf(s);o.splice(e+1,0,t)}else o.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#h({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#M({section:e});let o;return o="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#L({section:e,cId:t,fields:o,addLast:r})}#b({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#A();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#R(),this.#L({section:"measures",cId:e,fields:r,addLast:n})}#R(){const e=this.#y("rows"),t=this.#y("columns");this.#I("rows")&&!e.includes(-1)?e.push(-1):this.#I("columns")&&!t.includes(-1)&&t.push(-1)}#P(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#m({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#P())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t);if(void 0===o)return;const i=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===i);this.addAlternativeMeasures(o,-1===a?void 0:a),this.#S("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t,!0);if(void 0===o)return;const i=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>i.includes(e)),s=i.findIndex(e=>e===a);await this.addMeasure(o,!1,-1===s?void 0:s,!0),this.#S("measures",n)}async moveDimensionToAlternative(e){const t=this.#w(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!1,i);if(void 0===a)return;const s=r.slice(o+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,i,l)&&this.#S(t,r)}async moveDimensionFromAlternative(e){const t=this.#w(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!0,i);if(void 0===a)return;const s=this.#D(t,!1),l=r.slice(o+1).find(e=>s.includes(e));let c=s.findIndex(e=>e===l);c=-1===c?void 0:c;void 0!==await this.#p(a,i,c,!1,!0)&&this.#S(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#w(-1);if(null===n)return void this.#d.error({msg:"Cannot move pseudo dimension, unable to find it in any section",payload:{toIndex:e,toSection:t}});const r="columns"===t,o=n===t,i=this.#x(t);if(o){const e=i.indexOf(-1);i.splice(e,1)}else{const o=this.#y(n),i=o.indexOf(-1);if(-1===i)return void this.#d.error({msg:"Couldn't delete pseudo dimension from current section",payload:{toIndex:e,toSection:t,fromSection:n}});o.splice(i,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-i.slice(0,e).filter(e=>this.#C(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),i.splice(e,0,-1),this.#S(t,i)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#w(e),o=this.#C(e);if(null===r)return void this.#d.error({msg:"Cannot move dimension, unable to find it in any section",payload:{cId:e}});const i=(o?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===i)return void this.#d.error({msg:"Couldn't find dimension to move",payload:{cId:e,toIndex:t,toSection:n}});const a=this.#x(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&this.#d.warn({msg:"[moveDimension] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:l}});const c=l-a.slice(0,l).filter(e=>this.#C(e)!==o).length,u="columns"===n,d="columns"===r,p=await this.removeDimension(i,o,d);if(void 0===p)return;void 0!==await this.#p(p,u,c,o,!0)&&(a.splice(l,0,e),this.#S(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#C(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void this.#d.error({msg:"Cannot move measure, unable to find it in any section",payload:{cId:e}});const o=this.#x("measures"),i=o.indexOf(e);-1!==i&&o.splice(i,1);const a=Math.max(0,Math.min(t,o.length));a!==t&&this.#d.warn({msg:"[moveMeasure] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:a}});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-o.slice(0,a).filter(e=>this.#C(e)!==n).length;void 0!==await this.addMeasure(s,n,l,!0)&&(o.splice(a,0,e),this.#S("measures",o))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return!1}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:qP(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=LP(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#T(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=LP(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#T(e);return n}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var WP,$P={exports:{}};var HP=(WP||(WP=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>Pe});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},i=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(u(r[0],o),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],o),p=u(r[1],o),f=h(0),m=h(1),g=v(d,f),b=v(p,m);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});o&&t!==o.qDef.qLabel&&(r=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(i,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},M=Array.isArray;function A(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function L(e){return void 0===e}function R(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function P(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=L(e[n||t])?i:e[t],e=e[n||t]}}),e}function T(e,t){var n=!0;if(A(e)&&A(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){T(e[r],t[r])||(n=!1)}),n);if(M(e)&&M(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(o){var i=function(e){return e?I({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);T(i,a)||R(t,o)||(L(a)?r.push({op:"add",path:s,value:i}):A(i)&&A(a)?r=r.concat(D.generate(a,i,s)):M(i)&&M(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&L(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(T(t,o))return r;if(!L(t[0])&&L(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(D.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))}),Object.keys(e).forEach(function(o){L(t[o])&&!R(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,o=P(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(M(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(M(a)&&M(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(A(a)&&A(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!R(n,e)&&delete n[e]}),I(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var u=P(e,t.from);M(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(M(o)?o.splice(+i,1):delete o[i])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const q=D,k=function(e,n,r){if(!e)return Promise.resolve();var o=q.generate(n,r);return t()(!0,n,r),o&&o.length?(o=o.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function N(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function _(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,u,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:o})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=N(t,e);return i&&!i.disabled}};return n}};var z="movingAverage";function W(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var b=t;if(w.needDimension({modifier:r,properties:o,layout:a})){var v=w.getDimComp(u,1),y=w.getDimComp(u,0),x=w.getAggrComp(b,v,y);b=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return b},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=W(t,e);return i&&!i.disabled}};return n}};var V="timeSeriesDecomposition";function G(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function U(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var o=r.steps;r.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;var i=G(t,e);return i&&!i.disabled}};return n}};var X="difference";function J(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),p="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:o})){var f=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return n}};var te="normalization";function ne(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach(function(t){void 0===e[t]&&(e[t]=ie[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,i),i}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=ne(t,e);return i&&!i.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,me)?me:he},getLibraryId:function(e){return i(e,me)||i(e,he)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var be="qDef.qDef",ve="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Me={initBase:function(e,t){(t||Me.isValid(e))&&(n(e,ve,i(e,be)),n(e,xe,i(e,ye)),n(e,Ce,i(e,Se)),n(e,Ee,i(e,we)))},restoreBase:function(e){Me.isValid(e)&&(n(e,be,i(e,ve)),n(e,ye,i(e,xe)),n(e,Se,i(e,Ce)),n(e,we,i(e,Ee)),i(e,Ie)&&i(e,De)&&n(e,Ie,i(e,De)),delete e.qDef.base)},isValid:function(e){var t=i(e,ve),n=i(e,xe);return void 0!==t||void 0!==n}};const Ae=Me;function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}var Re={accumulation:F,movingAverage:B,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Pe={modifiers:Re,apply:qe,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:Ne,getActiveModifier:_e,initBase:Ae.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Re[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Re[e]&&Re[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Ze({modifiers:t,properties:n,layout:r}))}),o&&!i},ifEnableTotalsFunction:je};var Te={};function qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;Te[n.id]=Te[n.id]||{isFirstTime:!0};var c=Te[n.id].isFirstTime;if(Te[n.id].isFirstTime=!1,r&&"object"===Le(r))return ke({model:n,properties:r});var u=n?n.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=Te[n.id].lastReloadTime;if(Te[n.id].lastReloadTime=i(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:u,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var o=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:o,model:n}).then(function(o){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Le(e)&&!e.disabled){if(n++,"object"!==Le(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Re[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),ke({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Le(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,o=Qe(r);return et({model:n,libraryIds:o}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Oe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function ke(e){var n=e.model,r=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},o):o),$e(o);var p=Qe(o);return et({model:n,libraryIds:p,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Oe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:o,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then(function(o){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Ae.isValid(n)||Ae.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Le(e)&&!e.disabled){if(s++,"object"!==Le(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Re[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Re[r.type].generateExpression({expression:s,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Re[r.type].updateModifier&&Re[r.type].updateModifier(r,o.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Re[r.type].generateExpression({expression:a,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:o,dimensionAndFieldList:e}),He(n)):Oe(n)})})})}({measures:a,properties:o,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:o,model:n}):Promise.resolve(!1)})})}function Oe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Le(e)&&!e.disabled&&!Re[e.type]})}(e)?Ae.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Re[r.type]&&!r.disabled)return r}}function je(e){var t=_e(e);return!t||Re[t.type].enableTotalsFunction(e)}function Fe(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=_e(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Ae.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Le(t)&&(t.disabled||!Re[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function Ve(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Ve(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Le(e)||e.disabled||!Re[e.type])&&(void 0===o[e.type]&&(o[e.type]=Re[e.type].isApplicable({properties:n,layout:r})),o[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then(function(e){o.dimensionList=e});r.push(i);var a=t.app.getFieldList().then(function(e){o.fieldList=e});return r.push(a),Promise.all(r).then(function(){return o})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),i.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):k(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return o}):Promise.resolve(o)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Le(e)&&!e.disabled&&Re[e.type]&&Re[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],o=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var i=Ve(t);i&&n.push(i),o=o||Ze({modifiers:r,properties:e})}}),i(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=i(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=i(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach(function(e){o[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:i}),Object.keys(r).forEach(function(e){o[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return qe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Te[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),o=Math.floor(n/62);return o>0?t(o)+r:r}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(r,{default:()=>$e});const i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},b=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},y=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.getValue(e,t);if(!i.isAtomicValue(s))try{if((o=(o=(r=JSON.stringify(s)).match(/:\{/g))?o.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var l=i.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const L=function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},R=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},P=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},T=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},q=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},k=function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},O=function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=E(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,o.dimensions.length,D),l=I(a.min,o.dimensions.length,0);return{maxDimensions:I(i.max,s,D),minDimensions:I(i.min,l,0),maxMeasures:s,minMeasures:l}},_=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]}),null===(o=w()(!0,{},n,o)).components&&(o.components=[]),o},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return M(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return A(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function B(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){i.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const V={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:o,qHyperCubeDef:l}),m({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,b({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:o,properties:a}),r||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters",!0),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:c}),b=i.getValue(r,c||"").qHyperCubeDef,v=i.getValue(g,c||"").qHyperCubeDef,y=N({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,w=y.maxMeasures,C=y.minMeasures,E=l.defaultDimension,I=void 0===E?T():E,D=l.defaultMeasure,M=void 0===D?q():D;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:v}),k({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:I}),O({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:v,defaultMeasure:M}),W({newProperties:g,dataDefinition:a,hypercubePath:c}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),_({exportFormat:t,newHyperCubeDef:v}),R("qMaxStackedCells",b,v),R("qNoOfLeftDims",b,v),P("qInitialDataFetch",b,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),P("qMode",b,v,"S"),P("qReductionMode",b,v,"N"),P("qSortbyYValue",b,v),P("qIndentMode",b,v),P("qShowTotalsAbove",b,v),L(g,t,r),m.qProperty=g;var A=i.getValue(u||{},"support.modifiers");return H({measures:v.qMeasures,modifierTypes:A}),p&&B(m.qProperty,"storedFilters"),"S"===v.qMode&&h&&B(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var o=u(e,r,n),i=u(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(U(a,t,r,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(r,o);var l=r[r.length-1];if(l){var c=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),u=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":o=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),i&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var o=t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(ne(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&ie.useMasterNumberFormat(i.formatting)}i.auto=!1,i.mode=a}function se(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=oe("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},de=function(e,t){var n,r=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(n={auto:o,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:o,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=oe("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},he=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n},be={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=V.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=V.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),h=i.getValue(d,"color.mode",""),m=i.getValue(d,"color.auto",""),g=ce(d,p),b=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:b,properties:d})&&he(d):me(d),b&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),u}};var ve=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):B(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(r)&&t[o].type[r]++,t[o].type.total++}}),t}(a);l.length?(i&&(t=l.filter(function(e){return e.type[i]>0}).sort(function(e,t){return t.type[i]-e.type[i]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=be.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=be.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return ye({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=Ce(n,r,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(n,r,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Me="conditionalColoring",Ae="measures",Le="qDef.conditionalColoring";const Re={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Me,arrayName:Ae,itemPath:Le})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Le,arrayName:Ae,quarantineName:Me})}};var Pe="qHyperCubeDef.qMeasures",Te="measures",qe="qHyperCubeDef.qDimensions",ke="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:Te,itemPath:Fe}),Ee({properties:e,arrayPath:qe,quarantineName:ze,arrayName:ke,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:Te,itemPath:Fe}),Ie({properties:e,arrayPath:qe,quarantineName:ze,arrayName:ke,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:V,colorChart:be,axisChart:we,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Re,conditionalShow:We}})(),r.default})()}($P)),$P.exports),BP=Pr(HP);const VP="qHyperCubeDef.qMeasures",GP="measures",UP="qHyperCubeDef.qDimensions",YP="dimensions",KP="qDef.representation",XP="tableRepresentation",JP="qDef.conditionalColoring",ZP="conditionalColoring",QP="qMiniChartDef",eT="miniChartDef",tT=e=>{BP.unquarantineArrayProp({properties:e,arrayPath:UP,itemPath:KP,arrayName:YP,quarantineName:XP}),BP.unquarantineArrayProp({properties:e,arrayPath:VP,itemPath:KP,arrayName:GP,quarantineName:XP}),BP.unquarantineArrayProp({properties:e,arrayPath:VP,itemPath:JP,arrayName:GP,quarantineName:ZP}),BP.unquarantineArrayProp({properties:e,arrayPath:VP,itemPath:QP,arrayName:GP,quarantineName:eT})},nT=e=>{BP.quarantineArrayProp({properties:e,arrayPath:UP,itemPath:KP,arrayName:YP,quarantineName:XP}),BP.quarantineArrayProp({properties:e,arrayPath:VP,itemPath:KP,arrayName:GP,quarantineName:XP}),BP.quarantineArrayProp({properties:e,arrayPath:VP,itemPath:JP,arrayName:GP,quarantineName:ZP}),BP.quarantineArrayProp({properties:e,arrayPath:VP,itemPath:QP,arrayName:GP,quarantineName:eT})};function rT(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(o)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const oT="qHyperCubeDef.qDimensions",iT="dimensions",aT="qOtherTotalSpec.qTotalMode",sT="totalMode",lT={quarantine(e){BP.quarantineArrayProp({properties:e,arrayPath:oT,quarantineName:sT,arrayName:iT,itemPath:aT})},unquarantine(e){BP.unquarantineArrayProp({properties:e,arrayPath:oT,quarantineName:sT,arrayName:iT,itemPath:aT})}};function cT(e){const t=rT(e);return(e,n,r,o)=>{const i=BP.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&qR(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude?.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],qR(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude?.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),f=a+p;if(f>c.length)for(let e=c.length;e<f;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const h=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&qR(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(BP.unquarantineProperty(i.qProperty,"noOfLeftDims"),BP.unquarantineProperty(i.qProperty,"excludedNoOfLeftDims "))}return BP.unquarantineProperty(i.qProperty,"rankedList"),BP.conditionalShow.unquarantine(i.qProperty),lT.unquarantine(i.qProperty),tT(i.qProperty),BP.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function uT(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=BP.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;qR(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),BP.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims,BP.quarantineProperty(i.properties,"qHyperCubeDef.rankedList","rankedList"),delete i.properties.qHyperCubeDef.rankedList;const u=i.properties.qLayoutExclude?.quarantine?.interColSortOrder;u&&(c=u,qR(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),qR(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude?.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return BP.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),BP.quarantineProperty(i.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),BP.conditionalShow.quarantine(i.properties),lT.quarantine(i.properties),nT(i.properties),i}const dT=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(o)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),pT=["rows","columns","measures"],fT=e=>"string"==typeof e&&e.length>0,hT=e=>{const t=e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"),n=e.flags.isEnabled("qcb-35151-fix-duplicate-columns-pivot"),r=e.flags.isEnabled("SUPPORT-11928-CORRUPT-SORT-ORDER"),o=Ph(e,{tag:"sn-pivot-table"});return{properties(i){if(!(e=>"qHyperCubeDef"in e&&"sn-pivot-table"===(({visualization:e,qInfo:t})=>e??t?.qType)(e))(i))return i;if(n&&((e,t)=>{const{qHyperCubeDef:n}=e,r=n.qLayoutExclude?.qHyperCubeDef,o=new Set;let i=0,a=0;[...n.qDimensions,...n.qMeasures,...r?.qDimensions??[],...r?.qMeasures??[]].forEach(e=>{const t=e.qDef?.cId;if(!fT(t)||o.has(t)){fT(t)?i++:a++;const n=qP();return e.qDef={...e.qDef,cId:n},void o.add(n)}o.add(t)}),i>0&&t.error({msg:"migrate: duplicate field cId issues detected",payload:{duplicateCount:i}}),a>0&&t.error({msg:"migrate: missing field cId issues detected",payload:{missingCount:a}})})(i,o),r&&((e,t)=>{const{qHyperCubeDef:n}=e,r=new Set(n.qDimensions.map((e,t)=>t));n.qMeasures.length>1&&r.add(-1);const o=new Set(r),i=n.qInterColumnSortOrder,a=Array.isArray(i)?i.filter(e=>o.delete(e)):[],s=[];if(Array.isArray(i)){i.length!==r.size&&s.push(`Incorrect length: expected ${r.size}, received ${i.length}`);const e=i.filter((e,t)=>t in i);e.length!==i.length&&s.push("Sparse array"),new Set(e).size!==e.length&&s.push("Duplicate indexes"),e.some(e=>!r.has(e))&&s.push("Unexpected indexes")}else s.push("Sort order is not an array");o.size>0&&s.push(`Missing indexes: ${[...o].join(", ")}`),s.length>0&&(n.qInterColumnSortOrder=[...a,...o],t.error({msg:"migrate: corrupt sort order detected",payload:{reason:s.join("; ")}}))})(i,o),t){const t=new zP({},e);t.setProperties(i),pT.forEach(e=>{t.isRankedListCorrupt(e)&&t.createRankedList(e)})}const a=i.components?.find(e=>"theme"===e.key);return a?.nullValues&&!a.dimensionNullValues&&(a.dimensionNullValues={...a.nullValues}),i}}},mT={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let gT=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.Bar="bar",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),bT=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const vT=e=>{switch(e?.type){case"url":return gT.Link;case"image":return gT.Image;case"indicator":return gT.Indicator;case"miniChart":return gT.MiniChart;case"bar":return gT.Bar;default:return gT.Text}},yT=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),xT=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>vT(e.qDef.representation)===gT.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},ST=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:yT({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>vT(e.qDef.representation)===gT.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>vT(e.qDef.representation)===gT.Link&&e.qDef.representation?.urlPosition===bT.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>vT(e.qDef.representation)===gT.Link&&e.qDef.representation?.urlPosition===bT.Attribute},...xT(n)}},wT=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[gT.Image],i=!r?.("qMiniChartDef")&&t[gT.MiniChart],a=!r?.("tableIndicators")&&t[gT.Indicator],s=!!t[gT.Bar],l=o&&t[gT.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&l)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),s&&n.push({value:"bar",translation:"SNTable.Bar.Representation"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>vT(e.qDef.representation)===gT.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}},CT=(e,t,n)=>({type:"string",component:"expression",expressionType:"measure",ref:"qAttributeExpressions",schemaIgnore:!0,translation:t,defaultValue:"",tid:`${e}ByExpression`,show:n,convertFunctions:{get:(t,n,r,o)=>o.qAttributeExpressions?.find(t=>t.id===e)?.qExpression??"",set:(t,n,r,o,i)=>{const a=i.qAttributeExpressions??[],s=a.findIndex(t=>t.id===e);s>=0?t?a[s].qExpression=t:a.splice(s,1):t&&a.push({id:e,qExpression:t,qAttribute:!0}),i.qAttributeExpressions=a}}}),ET=(e,t)=>e?.qDef?.representation?.[t],IT=e=>vT(e?.qDef?.representation)===gT.Bar,DT=[{value:"solid",translation:"SNTable.Bar.SingleColor"},{value:"expression",translation:"SNTable.Bar.ByExpression"}],MT=(e,t,n)=>({component:"expression",ref:"qExpression",expressionType:"measure",translation:t,defaultValue:"",id:e,tid:n,show:!1}),AT=e=>{if(!e[gT.Bar])return{};const t=e=>IT(e)&&"manual"===ET(e,"barRangeMode");return{barColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barColorMode",translation:"SNTable.Bar.BarColor",defaultValue:"solid",show:IT,tid:"barColorMode",options:DT},barColor:{ref:"qDef.representation.barColor",type:"object",component:"color-picker",translation:"SNTable.Bar.BarColor",defaultValue:{index:6,color:null},show:e=>IT(e)&&"expression"!==ET(e,"barColorMode"),tid:"barColor",dualOutput:!0},barColorExpression:CT("barColor","SNTable.Bar.ColorExpression",e=>IT(e)&&"expression"===ET(e,"barColorMode")),barLabelColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barLabelColorMode",translation:"SNTable.Bar.LabelColor",defaultValue:"solid",show:IT,tid:"barLabelColorMode",options:DT},barLabelColor:{ref:"qDef.representation.barLabelColor",type:"object",component:"color-picker",translation:"SNTable.Bar.LabelColor",show:e=>IT(e)&&"expression"!==ET(e,"barLabelColorMode"),tid:"barLabelColor",dualOutput:!0},barLabelColorExpression:CT("barLabelColor","SNTable.Bar.LabelColorExpression",e=>IT(e)&&"expression"===ET(e,"barLabelColorMode")),barWidthExpression:CT("barWidth","SNTable.Bar.WidthExpression",IT),barOffsetExpression:CT("barOffset","SNTable.Bar.OffsetExpression",IT),barLabelExpression:CT("barLabel","SNTable.Bar.LabelExpression",IT),barRangeMode:{type:"string",component:"dropdown",ref:"qDef.representation.barRangeMode",translation:"SNTable.Bar.Range",defaultValue:"auto",show:IT,tid:"barRangeMode",options:[{value:"auto",translation:"Common.Auto"},{value:"manual",translation:"Common.Custom"}]},barRangeMin:{type:"number",ref:"qDef.representation.barRangeMin",translation:"SNTable.Bar.RangeMin",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:t,tid:"barRangeMin"},barRangeMax:{type:"number",ref:"qDef.representation.barRangeMax",translation:"SNTable.Bar.RangeMax",expressionType:"ValueExpression",expression:"optional",defaultValue:100,show:t,tid:"barRangeMax"},barEnd:{type:"string",component:"dropdown",ref:"qDef.representation.barEnd",translation:"SNTable.Bar.End",defaultValue:"none",show:IT,tid:"barEnd",options:[{value:"none",translation:"SNTable.Bar.End.None"},{value:"circle",translation:"SNTable.Bar.End.Circle"},{value:"box",translation:"SNTable.Bar.End.Square"}]}}};let LT=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),RT=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.TextStyleExpression="textStyleExpression",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),PT=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),TT=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const qT="image",kT=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},OT=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:xA.Auto,translation:"Common.Auto"},{value:xA.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:xA.Pixels,translation:"Object.Table.Column.Pixels"},{value:xA.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:xA.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PixelsDefault,show:e=>e.qDef.columnWidth?.type===xA.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PercentageDefault,show:e=>e.qDef.columnWidth?.type===xA.Percentage}}),NT=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==qT},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==qT)}}},_T="TOTAL_OFF",jT=(e=!1,t=[])=>({component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:RT.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:RT.CellForegroundColor},...e?[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:RT.TextStyleExpression,tid:"tableTextStyleByExpression"}]:[],{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.ImageUrl,tid:"ImageUrlByExpression",show:!1},...t]}),FT=e=>{const{translator:t,anything:n,flags:r}=e,o=r.isEnabled("VNA-977-TABLE-BARS"),i=r.isEnabled("TLV_2605_PIVOT_TEXT_STYLING"),a=e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),s=jT(i),l=jT(i,o?[MT("barColor","SNTable.Bar.ColorExpression","barColorByExpression"),MT("barLabelColor","SNTable.Bar.LabelColorExpression","barLabelColorByExpression"),MT("barWidth","SNTable.Bar.WidthExpression","barWidthByExpression"),MT("barOffset","SNTable.Bar.OffsetExpression","barOffsetByExpression"),MT("barLabel","SNTable.Bar.LabelExpression","barLabelByExpression")]:[]);return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:_T,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:_T,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&kT},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==_T&&kT(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",grouped:a,items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...a?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:s}},alignmentAndRepresentationAndResize:{type:"items",items:{...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...ST(e),...OT()}}}:{cellColoring:s,...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...ST(e),...OT()}}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",grouped:a,items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...e.flags.isEnabled("VNA-965-PIVOT-MEASURE-GROUPS")?{measureGroups:{type:"items",items:{headerText:{component:"text",translation:"Visualizations.Descriptions.Group",style:"sHeader"},groupName:{ref:"qDef.groupName",translation:"Object.Table.Measure.GroupName",type:"string",component:"string",expression:"optional",defaultValue:"",change:e=>{const t=e.qDef.groupName,n="string"==typeof t?t:t?.qStringExpression.qExpr;n?.trim()||delete e.qDef.groupName}},groupNameText:{component:"text",translation:"Object.Table.Measure.GroupNameText",style:"hint"}}}}:{},...a?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:l}},alignmentAndRepresentationAndResize:{type:"items",items:{...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...wT(e,{[gT.Image]:!0,[gT.Indicator]:!0,[gT.Bar]:o}),...AT({[gT.Bar]:o}),...OT()}}}:{cellColoring:l,...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...wT(e,{[gT.Image]:!0,[gT.Indicator]:!0,[gT.Bar]:o}),...AT({[gT.Bar]:o}),...OT()}}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}},zT=e=>FT(e),WT=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),$T=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},HT=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>$T(e,!0))],s=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...ML().filter(e=>!i.includes(e)).map(e=>$T(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),BT=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],VT=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>$T(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...BT.filter(e=>!i.includes(e)).map(e=>$T(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),GT=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:HT({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:VT({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:WT(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:WT(`${e}.background`,"properties.background",(t,n)=>{const r=n?cL.WHITE:cL.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),UT=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),YT=e=>UT("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),KT=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?YT(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:WT(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:WT(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),XT=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),JT="12px",ZT="Source Sans Pro, sans-serif",QT="600",eq=15e3,tq=4/3;let nq=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),rq=function(e){return e.Solid="solid",e.None="none",e}({});const oq={display:"flex",justifyContent:"center",alignItems:"center"},iq={borderStyle:"solid"},aq={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},sq={lineHeight:tq,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},lq=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),cq=(e,t)=>e>0?`${e}px ${rq.Solid} ${t}`:rq.None,uq=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?cq(i,n):rq.None,borderBottom:cq(a,n),borderLeft:"rtl"===r?cq(i,n):rq.None,borderTop:rq.None}},dq=(e,t,n,r,o,i,a)=>{const s=uq(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=cq(2,o)),n||(s.borderLeft="rtl"!==i?cq(1,o):"none",s.borderRight="rtl"===i?cq(1,o):"none")),s},pq=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=cq(1,n)),t&&(r.borderRight=cq(1,n)),r},fq=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},hq=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:GT({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:fq}),dimensionValueSection:GT({section:"dimensionValues",translator:e,flags:t,getThemeValue:fq}),measureValueSection:GT({section:"measureValues",translator:e,flags:t,getThemeValue:fq}),measureLabelSection:KT({section:"measureLabels",getThemeValue:fq}),totalValuesSection:KT({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:fq}),dimensionNullSection:KT({section:"dimensionNullValues",translation:"properties.table.dimensionNullValues",fallbackBackground:nq.NullValueBackground,getThemeValue:fq,isNullValueText:!0}),nullValues:KT({section:"nullValues",translation:"properties.table.measureNullValues",fallbackBackground:nq.NullValueBackground,getThemeValue:fq,isNullValueText:!0}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:XT("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:XT("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:WT("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??nq.DividerLight),divider:WT("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??nq.DividerDark),background:WT("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??nq.Transparent)}}}}}}]}),mq=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[hq(e,t),{type:"items",items:{alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:xA.Auto,translation:"Common.Auto"},{value:xA.Pixels,translation:"Object.Table.Column.Pixels"},{value:xA.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:xA.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===xA.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===xA.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}}),gq="auto",bq={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:gq,translation:"Object.Table.SortingInSearch",options:[{value:gq,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function vq(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:zT(e),sorting:bq,addons:mT,settings:mq(t,n)}}}function yq(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:!0,sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:vq(e),importProperties:cT(e),exportProperties:uT,exploration:CP(),data:dT(e),migrate:hT(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new zP(t,e):void 0}}const xq=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function Sq(e,t){return A(()=>e,t)}const wq={},Cq=e=>{const t=A(()=>({current:wq}),[]);return t.current=t.current===wq?e:t.current,t},Eq=e=>!!e&&0===CL(e).a,Iq="#grid",Dq=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},Mq=(e,t,n,r,o)=>{const i=Dq(".qv-object .qv-inner-object",n),a=Dq(".qv-panel-sheet",n),s=Dq(Iq,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return YR(n);if("none"===r)return"transparent";if(void 0===r)return;const i=CL(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=Eq(d),f=!Eq(h=p?s:d)&&BR(h,cL.TEXT,cL.DARK_MODE_TEXT)===vL(cL.DARK_MODE_TEXT);var h;const m=((e,t,n,r=cL.WHITE)=>e&&!Eq(e)?e:Eq(t)?n&&!Eq(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},Aq=(e,t,n,r)=>{const o=q(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=P([]);return T(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(Iq),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return A(()=>({...o,background:Mq(e,o,t,n,r)}),[o.name(),t,n,r,e,i])};function Lq(e,t){const n=A(()=>({isLoading:!0}),t),[r,o]=R(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,o]}const Rq=3,Pq=/\n/g;function Tq(e,t,n){let r=0,o=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function qq({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=Rq,allowLineBreaks:a=!0}=o??{},{estimateWidth:s,measureText:l,estimateLineCount:c}=b(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o)=>{const{maxNbrLinesOfText:i=Rq,allowLineBreaks:a=!0}=o??{};return()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const s=o.measureText.bind(o),l=kR(e=>{if(void 0===e)return 0;if(a){const t=e.split(Pq).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(Pq," ");return s(t).width}),c=e=>+l(e).toFixed(2),u=kR(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(Pq):[e];let o=0;for(const e of r){let n=e;do{o+=1,n=Tq(n,t,c)}while(null!==n&&o<i);if(o>=i)break}return o},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:u}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:i,allowLineBreaks:a})(),[n,r,e,t,i,a]);return{estimateWidth:s,measureText:l,estimateLineCount:c}}var kq,Oq={};var Nq=function(){if(kq)return Oq;kq=1;var e=E;return Oq.createRoot=e.createRoot,Oq.hydrateRoot=e.hydrateRoot,Oq}();const _q="Source Sans Pro, sans-serif";function jq(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var Fq={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const zq=({translator:e})=>(b(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Fq).forEach(t=>{e.add(Fq[t])})}}(e)},[e]),e),Wq=Sf({});Wq.debugLabel="appAtom";const $q=Sf({});$q.debugLabel="downloadServiceAtom";const Hq=Sf({});Hq.debugLabel="effectivePropertiesServiceAtom";const Bq=Sf({});Bq.debugLabel="embedAtom";const Vq=Sf({});Vq.debugLabel="interactionsAtom";const Gq=Sf({});Gq.debugLabel="keyboardAtom";const Uq=Sf({});Uq.debugLabel="layoutServiceAtom";const Yq=["D","T","TS","IV"],Kq=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Xq=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Jq=["January","February","March","April","May","June","July","August","September","October","November","December"],Zq=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Qq={D:"YYYY-MM-DD",T:"hh:mm:ss",TS:"YYYY-MM-DD hh:mm:ss"},ek=864e5,tk=2**32,nk=e=>{let t=Math.floor(e),n=Math.round((e-t)*ek);n>=ek&&(t+=1,n=0);const r=t-25569,o=r+719468,i=Math.floor(o/146097),a=o-146097*i,s=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),l=a-(365*s+Math.floor(s/4)-Math.floor(s/100)),c=Math.floor((5*l+2)/153),u=c<10?c+2:c-10;return{year:s+400*i+(u<=1?1:0),month:u,date:l-Math.floor((153*c+2)/5)+1,day:(r%7+7+3)%7,h:Math.floor(n/36e5),m:Math.floor(n%36e5/6e4),s:Math.floor(n%6e4/1e3),f:n%1e3}},rk=(e,t)=>String(e).padStart(t,"0"),ok=e=>{const[,t]=e.toString().split(".");return t?Number(`0.${t}`):0},ik=/Y+|y+|M+|W+|w+|D+|d+|h+|H+|m+|s+|S+|f+|F+|t{1,2}|T{1,2}/g,ak=(e,t,n)=>{if(Number.isNaN(e)||!Number.isFinite(e))return String(e);let r,o=(n||("IV"===t?Qq.T:Qq[t])).replace(/\[.+]|\[|]/g,"");"IV"===t?(e<0&&(e=-e,o=`-${o}`),r=((e,t)=>{const n=Math.floor(e);let r=24*ok(e),o=60*ok(r),i=60*ok(o);const a=Math.round(1e3*ok(i));r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),/D+/i.test(t)||(r+=24*n),/h+/i.test(t)||(o+=60*r),/m+/i.test(t)||(i+=60*o);let s=0,l="";if(/w+|t+/i.test(t)){const t=nk(e);s=t.day,l=t.h>=12?"pm":"am"}return{year:0,month:0,day:s,date:n%tk,h:r%tk,m:o%tk,s:i%tk,f:a,t:l}})(e,o)):r=((e,t)=>{const n=nk(e);let r=n.h;return t&&(r%=12,r=r||12),{year:n.year,month:n.month,day:n.day,date:n.date,h:r,m:n.m,s:n.s,f:n.f,t:n.h>=12?"pm":"am"}})(e,/t+/i.test(o));const i=(e=>[[/^(Y+|y+)$/,{Y:`${Number(`${e.year}`.slice(-2))}`,YY:rk(`${e.year}`.slice(-2),2),YYY:rk(`${e.year}`.slice(-3),3),def:t=>rk(`${e.year}`,t.length)}],[/^M+$/,{M:e.month+1,MM:rk(e.month+1,2),MMM:Zq[e.month],def:Jq[e.month]}],[/^(W+|w+)$/,{W:e.day,WW:rk(e.day,2),WWW:Xq[e.day],def:Kq[e.day]}],[/^(D+|d+)$/,{def:t=>rk(e.date,t.length)}],[/^(h+|H+)$/,{h:e.h,def:t=>rk(e.h,t.length)}],[/^m+$/,{m:e.m,def:t=>rk(e.m,t.length)}],[/^(s+|S+)$/,{s:e.s,def:t=>rk(e.s,t.length)}],[/^(f+|F+)$/,{def:t=>{const n=`${e.f}`;return n.length>t.length?n.slice(0,t.length):n.padEnd(t.length,"0")}}],[/^(t{1,2}|T{1,2})$/,{def:t=>(t[0].toUpperCase()===t[0]?e.t.toUpperCase():e.t).slice(0,t.length)}]])(r);return o.replace(ik,e=>((e,t)=>{const n=t.find(([t])=>t.test(e))?.[1];if(!n)return"";const r=Object.keys(n).find(t=>"def"!==t&&(t===e||t.toLowerCase()===e)),o=void 0===r?n.def:n[r];return String("function"==typeof o?o(e):o)})(e,i))},sk=/[#0]/,lk={prefix:"",suffix:""},ck=e=>{const t=e.search(sk);if(-1===t)return lk;let n=t;for(let t=e.length-1;t>n;t--)if(sk.test(e[t])){n=t;break}return{prefix:e.slice(0,t),suffix:e.slice(n+1)}},uk=/\B(?=(\d{3})+(?!\d))/g,dk={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y",[-3]:"m",[-6]:"μ",[-9]:"n",[-12]:"p",[-15]:"f",[-18]:"a",[-21]:"z",[-24]:"y"},pk=e=>Number(e.toPrecision(15)),fk=(e,t,n=!1)=>{if(Number.isNaN(e))return String(e);const{qFmt:r,qType:o,qDec:i=".",qThou:a=","}=t??{};if((e=>Yq.includes(e))(o))return ak(e,o,r);if(!r)return String(e);const[s,l]=r.split(";"),{suffix:c}=ck(s),u=c.startsWith("A"),d=(u?c.slice(1):c).endsWith("%"),{value:p,siPrefix:f}=((e,t,n)=>{let r=t?pk(100*e):e,o="";if(n&&0!==r&&Number.isFinite(r)){let e=Number(r.toExponential().split("e")[1]);e-=e%3,e in dk&&(o=dk[e],r=pk(r/10**e))}return{value:r,siPrefix:o}})(e,d,u),h=p<0,m=h&&l?l:s,{prefix:g,suffix:b}=ck(m),v=u&&b.startsWith("A")?b.slice(1):b,{decimals:y,useThousands:x}=((e,t,n)=>{const r=e.indexOf(".");let o=0;return-1!==r?o=(e.slice(r+1).match(/[#0]/g)??[]).length:n&&(o=String(Math.abs(t)).split(".")[1]?.length??0),{decimals:Math.min(o,100),useThousands:e.includes(",")}})(m,p,n||"U"===o),[S,w]=Math.abs(p).toFixed(y).split("."),C=x?S.replace(uk,a):S;return`${h&&!l?"-":""}${g}${w?`${C}${i}${w}`:C}${f}${v}`},hk=e=>"number"==typeof e&&!Number.isNaN(+e),mk=e=>hk(e.qNum),gk=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,bk=(e,t)=>t.qAttrExps?.qValues?.[e],vk=e=>{const t=Number(e?.qNum);return void 0!==e?.qNum&&Number.isFinite(t)?t:void 0},yk=e=>{const t=e?.qText?.trim();return t&&"ARGB(0,0,0,0)"!==t.toUpperCase()?YR(t)??void 0:void 0},xk="/qHyperCubeDef",Sk=-1,wk="PSEUDO-DIM",Ck=e=>({x:Math.min(e.qHyperCube.qSize.qcx,eq),y:Math.min(e.qHyperCube.qSize.qcy,e.snapshotData?.content?.rowsPerPage??15e3)}),Ek=e=>Boolean(e.qHyperCube.qIndentMode),Ik=e=>e.qHyperCube.qMeasureInfo.filter(e=>7005!==e.qError?.qErrorCode),Dk=e=>e.qHyperCube.qEffectiveInterColumnSortOrder.slice(0,e.qHyperCube.qNoOfLeftDims),Mk=e=>Dk(e).includes(Sk),Ak=e=>{const{qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}=e.qHyperCube,r=new Map(t.map(e=>[n[e]??Sk,e]));return e=>r.get(e)??-1},Lk=e=>!!e.snapshotData,Rk=e=>!!e.qHyperCube.qLastExpandedPos,Pk=e=>t=>t===Sk?void 0:e.qHyperCube.qDimensionInfo.at(t),Tk=Sf({});Tk.debugLabel="layoutAtom";const qk=Sf(e=>Lk(e(Tk)));qk.debugLabel="isSnapshotAtom";const kk=Sf(e=>Ck(e(Tk)));kk.debugLabel="sizeAtom";const Ok=Sf(e=>{const t=e(kk);return t.x>0&&t.y>0});Ok.debugLabel="hasDataAtom";const Nk=Sf(e=>Ek(e(Tk)));Nk.debugLabel="isIndentModeEnabledAtom";const _k=Sf(e=>Rk(e(Tk)));_k.debugLabel="triggeredByExpandOrCollapseAtom";const jk=Sf(e=>!e(qk)&&e(kk).x<e(Tk).qHyperCube.qSize.qcx);jk.debugLabel="hasLimitedDataAtom";const Fk=Sf(e=>"inherit"===e(Tk).search?.sorting);Fk.debugLabel="searchSortFromDimensionAtom";const zk=Sf(e=>Pk(e(Tk)));zk.debugLabel="getDimensionInfoAtom";const Wk=Sf(e=>Ik(e(Tk)));Wk.debugLabel="visibleMeasureInfoAtom";const $k=Sf(e=>Mk(e(Tk)));$k.debugLabel="hasPseudoDimOnLeftAtom";const Hk=Sf(e=>e(Tk).nullValueRepresentation?.text??"-");Hk.debugLabel="nullValueTextAtom";const Bk=Sf(e=>e(Tk).nullValueRepresentation?.dimensionText??"-");Bk.debugLabel="dimensionNullValueTextAtom";const Vk=Sf(e=>Dk(e(Tk)));Vk.debugLabel="leftDimensionInfoIndexesAtom";const Gk=Sf(e=>Ak(e(Tk)));Gk.debugLabel="getDimensionInfoIndexAtom";const Uk=Sf(e=>{const{qMeasureInfo:t}=e(Tk).qHyperCube,n=e($k),r=e(Wk);return(e,o=!1)=>{if(n)return 0;const i=e%r.length;return o?i:t.findIndex(e=>e===r[i])}});Uk.debugLabel="getMeasureInfoIndexFromCellIndexAtom";const Yk=Sf(e=>{const t=e(Hk);return"string"==typeof(n=t)&&n.length>0&&!Number.isNaN(+n)?e(Wk).map(e=>fk(gk(t),e.qNumFormat,e.qIsAutoFormat)):[];var n});Yk.debugLabel="formattedNullValueTextByMeasureIndexAtom";const Kk=Sf(e=>{const t=e(qh)("VNA-977-TABLE-BARS");return e(Wk).map(e=>t&&vT(e.representation)===gT.Bar?(({qMin:e,qMax:t,qAttrExprInfo:n})=>{if("number"!=typeof e||"number"!=typeof t||!Number.isFinite(e)||!Number.isFinite(t))return;const r=n.find(({id:e})=>"barOffset"===e),o=Number.isFinite(r?.qMin)?r?.qMin:0,i=Number.isFinite(r?.qMax)?r?.qMax:0;return{qMin:Math.min(o,o+e),qMax:Math.max(i,i+t),hasNegativeValues:e<0,hasPositiveValues:t>=0}})(e):void 0)});Kk.debugLabel="barMinMaxByMeasureIndexAtom";const Xk=Sf({});Xk.debugLabel="modelAtom";const Jk=Sf({direction:void 0});Jk.debugLabel="optionsAtom";const Zk=Sf(e=>e(Jk).direction);Zk.debugLabel="directionAtom";const Qk=Sf({});Qk.debugLabel="pageInfoAtom";const eO=Sf(void 0);eO.debugLabel="updatePageInfoAtom";const tO=Sf([]);tO.debugLabel="qPivotDataPagesAtom";const nO=Sf({});nO.debugLabel="rectAtom";const rO=Sf({});rO.debugLabel="styleServiceAtom";const oO=Sf({});oO.debugLabel="themeAtom";const iO=Sf({});iO.debugLabel="translatorAtom";const aO=Sf({});aO.debugLabel="viewServiceAtom";const sO=Sf(null,(e,t,n)=>{t(Wq,n.app),t(Tk,n.layout),t(Xk,n.model),t(Bq,n.embed),t(oO,n.theme),t(Gq,n.keyboard),t(iO,n.translator),t(Vq,n.interactions),t(Th,n.env),t(Jk,n.options),t(nO,n.rect),t(Qk,n.pageInfo),t(eO,()=>n.updatePageInfo),t(tO,n.qPivotDataPages),t(aO,n.viewService),t(Uq,n.layoutService),t($q,n.downloadService),t(rO,n.styleService),t(Hq,n.effectivePropertiesService)});sO.debugLabel="hydrateRenderStateAtom";const lO={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},cO={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},uO=As("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...lO},"&::-moz-range-track":{...lO},"&::-ms-track":{...lO},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...cO},"&::-moz-range-thumb":{...cO},"&::-ms-thumb":{...cO},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),dO=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=zq({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,b=()=>g?h.current.columnWidth-m:"100%",v={left:"rtl"!==p?b():void 0,right:"rtl"===p?b():void 0},y=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};jq(()=>{g&&y()},[e]);const x=e=>{const t=Math.max(e,yA.PixelsMin);h.current.columnWidth=t,i(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:xA.Pixels,pixels:h.current.columnWidth};a(e)}c?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{KR(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{KR(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===bA.Left||e.key===bA.Right){KR(e);const t=5,n=e.key===bA.Left?t:-t,r="rtl"===p?n:-n;c?.(!0),x(h.current.columnWidth+r)}else e.key===bA.Space||e.key===bA.Enter?(KR(e),s(e),c?.(!1),S()):e.key===bA.Esc&&(KR(e),s(e),c?.(!1),x(h.current.initWidth))}:void 0,M=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return fi.jsx(uO,{style:v,hoverColor:o,isLastColumn:n,className:vA,"data-testid":vA,onMouseDown:e=>{KR(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),c?.(!0),y(e.clientX)},onDoubleClick:()=>{a({type:xA.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(KR(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),c?.(!0),y(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{y()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":yA.PixelsMin,"aria-valuemax":yA.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},pO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),fO=As(hc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),hO=As(pO,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),mO=As(Ld)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),gO=As(lu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),bO=As(kd)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),vO=As(kd,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),yO=As("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),xO=As("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),SO=As(Rl)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),wO=As(nd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),CO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),EO=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?EO(t):t:e.parentElement?.children?.[0]},IO=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?IO(t):t},DO=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===bA.Down||t===bA.Up){const n=e=>t===bA.Down?EO(e):IO(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},MO=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let AO={};const LO=({autoFocus:e,id:t,onClick:r,itemTitle:o,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:c,direction:u,isPagination:d})=>{const[p,h]=m(!1),g=n.useRef(null),b=f(e=>{e.stopPropagation(),h(!1)},[h]);return fi.jsxs(fi.Fragment,{children:[fi.jsxs(vO,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),AO={}),s?.length&&(h(!0),AO[o]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:DO,children:[c?fi.jsx(yO,{direction:u,isPagination:d}):null,fi.jsxs(xO,{children:[fi.jsx(wO,{direction:u,isPagination:d,children:fi.jsx(i,{})}),fi.jsx(SO,{variant:"body2",children:o})]}),s?.length?fi.jsx(CO,{}):null]},t),s?.length?fi.jsx(qO,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:b,menuGroups:MO(s,AO),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:d}):null]})},RO=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&fi.jsx(bO,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>fi.jsx(LO,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),PO=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[RO({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?fi.jsx(gO,{"data-testid":"group-divider",variant:"middle"}):void 0]),TO={appear:0,enter:0,exit:0},qO=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?fi.jsx(mO,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:TO,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:PO({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,kO=(e,t)=>e.some(e=>t[e]>0),OO={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},NO=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(OO);return jq(()=>{e||(s(OO),i(null))},[e]),d(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:kO(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:kO(["qSelected"],e),canSelectPossible:kO(["qOption"],e),canSelectAlternative:kO(["qAlternative"],e),canSelectExcluded:kO(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},_O=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),jO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),FO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),zO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),WO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),$O=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),HO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),BO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),VO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),GO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),UO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),YO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),KO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),XO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let JO=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const ZO="/qListObjectDef",QO=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[JO.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:_O,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:zO,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:BO,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:WO,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[JO.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:VO,enabled:!0}]}]),!e.isLocked&&n[JO.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:XO,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(ZO))},icon:GO,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(ZO))},icon:KO,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(ZO))},icon:UO,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(ZO))},icon:YO,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(ZO))},icon:jO,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:HO,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:$O,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[JO.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:FO,enabled:!0}]}]),f},eN=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:c,searchRelatedArgs:u,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:b,isAccessibleHeader:v,iconSize:y=hA})=>{const x=l(null),S=zq({translator:o}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:M}=NO({open:e,headerData:r,app:I,qStateName:d?.qStateName}),A=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),L=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]))({qLibraryId:w,fieldId:C,searchRelatedArgs:u,selectionRelatedArgs:d,direction:g}),R=f(e=>{e.stopPropagation(),t(!1)},[t]),P=f(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?fi.jsxs(fO,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===v?P:void 0,ref:x,isAccessibleHeader:v,children:[s?fi.jsx(hO,{height:y,className:mA,"data-testid":mA,isInteractionsActive:i.active??!1,children:fi.jsx(pO,{})}):null,fi.jsx(qO,{open:e,anchorEl:!1===v?x.current:n.current,onClose:R,menuGroups:QO({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:L,interactions:i,fieldInstance:D,selectionActionsEnabledStatus:M,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:A,expandOrCollapseArgs:h}),direction:g,isPagination:b})]}):null},tN=e=>e.isDark?{background:e.color,borderColor:cL.DARK_MODE_BORDER,color:cL.DARK_MODE_TEXT,disabledColor:cL.DARK_MODE_DISABLED,iconColor:cL.DARK_MODE_TEXT}:{background:e.color,borderColor:cL.BORDER_MEDIUM,color:cL.TEXT,disabledColor:cL.DISABLED},nN=As(hc,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),rN=As(hp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),oN=As(Ec,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),iN=As(Rl)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),aN=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=b(()=>tN(r.background),[r]);if(!n.active)return null;const a=o?fi.jsx(nN,{footerStyle:i,children:e}):null;return t?E.createPortal(e,t):a},sN=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),lN=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),cN=c({}),uN=()=>h(cN),dN=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const v=(e=>!e.enabled||e.active)(u)?0:-1,y=b(()=>tN(p.background),[p]),x=o?o.getBoundingClientRect().width:h.width,S=zq({translator:d}),w=b(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:v,width:x,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,c,u,S,p,f,h,m,y,v,x,g]);return fi.jsx(cN.Provider,{value:w,children:e})},pN=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let fN=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),hN=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const mN=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=uN(),c=0===t.page,u=pN({type:fN.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||hN.FirstPage)?null:fi.jsx(oN,{...u,disabled:!r.active,children:"rtl"===e?fi.jsx(lN,{height:hA}):fi.jsx(sN,{height:hA})})},gN=(e,t,n=!1)=>{n&&e.key===bA.Tab&&!e.shiftKey&&(KR(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},bN=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=uN(),p=t.page>=r-1,f=pN({type:fN.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{gN(e,n,o)}:void 0;return i<=(s?.lastPage||hN.LastPage)?null:fi.jsx(oN,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?fi.jsx(sN,{height:hA}):fi.jsx(lN,{height:hA})})},vN=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),yN=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=uN(),d=t.page>=r-1,p=pN({type:fN.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),f=!(i>hN.FirstPage&&i>hN.LastPage)&&n.enabled?e=>{gN(e,n,o)}:void 0;return fi.jsx(oN,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?fi.jsx(vN,{height:hA}):fi.jsx(CO,{height:hA})})},xN=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=uN(),s=0===t.page,l=pN({type:fN.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return fi.jsx(oN,{...l,disabled:!n.active,children:"rtl"===e?fi.jsx(CO,{height:hA}):fi.jsx(vN,{height:hA})})},SN=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=uN(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||hN.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return fi.jsx(iN,{variant:"caption",dir:"ltr",children:s})},wN=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=uN(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return fi.jsxs(fi.Fragment,{children:[fi.jsxs(iN,{variant:"caption",id:p,children:[u,":"]}),fi.jsx(rN,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},CN=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=uN();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||hN.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=fi.jsx(fi.Fragment,{children:e.rowsPerPageOptions.map(e=>fi.jsx("option",{value:e,children:e},e))});return fi.jsx(wN,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},EN=1e3,IN="…",DN=({totalPages:e,page:t})=>{const n=Math.min(e,EN),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-EN):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return fi.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(fi.jsx("option",{value:IN,disabled:!0,children:IN},"startMoreOptions")),o<e-1&&a.push(fi.jsx("option",{value:IN,disabled:!0,children:IN},"endMoreOptions")),fi.jsx(fi.Fragment,{children:a})},MN=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=uN(),{page:i}=e;if(t<=(o?.selectPage||hN.SelectPage))return null;const a=fi.jsx(DN,{totalPages:n,page:i});return fi.jsx(wN,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var AN=y(e=>fi.jsxs(dN,{...e,children:[fi.jsx(CN,{}),fi.jsx(MN,{}),fi.jsx(SN,{}),fi.jsx(mN,{}),fi.jsx(xN,{}),fi.jsx(yN,{}),fi.jsx(bN,{})]}));const LN=e=>fi.jsx(aN,{...e,children:fi.jsx(AN,{...e})}),RN=Sf(null),PN=Sf(null),TN=Sf({minRow:0,maxRow:0,minCol:0,maxCol:0}),qN=Sf({HEADER:null,TOP:null,LEFT:null,DATA:null,WRAPPER:null}),kN=Sf(null),ON=Sf(e=>({focusCoord:e(RN),shouldRefocus:e(PN),pivotSectionBounds:e(TN),pivotSection:e(qN),pivotCoord:e(kN)})),NN=Sf(null,(e,t,n)=>{t(RN,n)});Sf(null,(e,t,n)=>{t(TN,e=>({...e,...n}))});const _N=Sf(null,(e,t,n)=>{t(qN,e=>({...e,...n}))}),jN=e=>e===Sk?wk:(({cId:e})=>e??qP())(e),FN=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===Sk?n.columnWidthLocation=LT.Measures:n.isLeftDimension?n.columnWidthLocation=LT.Dimension:t.at(-1)===Sk?n.columnWidthLocation=LT.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=LT.Pivot))},zN=e=>{if(!e)return;const{background:t,foreground:n}=e,r=CL(t??""),o=CL(n??""),i=r.isInvalid()?void 0:r.getRGBA(),a=i?GR(i,SA):void 0,s=i?GR(i,wA):void 0;return o.isInvalid()&&void 0!==i?{background:i,color:BR(i),headerMenuHoverBackground:a,headerMenuActiveBackground:s}:{background:i,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:a,headerMenuActiveBackground:s}},WN=(e,t,n,r,o)=>{const i=jN(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===Sk?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:LT.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===CA.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:LT.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName,headerColor:o?.("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?zN(n.headerColor):void 0}},$N=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})=>{let i=r;var a;n.length>0&&(i=(a=r).at(-1)===Sk?a.slice(0,-1):a);const s=i.length+(n.length?1:0),l=Math.max(1,n.length),c=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(s,l);return n.forEach((n,r,i)=>{const a=r===i.length-1;c[s-1][r]=WN(e,t,n,a,o)}),i.forEach((n,r,i)=>{const a=r===i.length-1;c[r][l-1]=WN(e,t,n,a,o)}),c},HN=(e,t,n,r,o,i=!1)=>{const a=((e,t,n,r,o)=>{let i;return i=0===n.length||n.includes(Sk)?$N({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n,isEnabled:o}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))($N({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})),e.isIndentModeEnabled&&i.length&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{FN({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):FN({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r,o);i&&a.unshift(Array.from({length:a[0]?.length??1},()=>null));return{data:a,size:{x:a[0]?.length??0,y:a.length}}},BN=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,VN=5e6,GN=5e5;const UN={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:YN(e),value:YN(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function YN(e){try{return decodeURIComponent(e)}catch{return e}}function KN(e){if(!(this instanceof KN))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>UN.fromSearchString(t.search)}})}function XN(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}KN.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},KN.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=XN(t.key),t.value?n+=`=${XN(t.value)}`:n+=t.useEqualSign?"=":"";return n};var JN=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},ZN=class{decode(e){let t="";const n=new JN(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const QN=e=>e>=0&&e<=1114111,e_=e=>e.match(/[\s]/);var t_=class extends ZN{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!e_(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return QN(a)?String.fromCharCode(a):"�"}},n_=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},r_=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return n_.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return n_.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||n_.newInstanceIfNeeded(e,t,this._value)}},o_=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new r_);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const i_=(()=>{const e=[],t=[],n=new o_;let r,o,i;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var a_=class extends ZN{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,i_.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=i_.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&QN(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&QN(r)?String.fromCharCode(r):null}},s_=class extends ZN{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),QN(i))?String.fromCharCode(i):(e.reset(),null)}};let l_;"undefined"!=typeof document&&(l_=document.createElement("div"));const c_=Array.prototype.indexOf,u_=[",",".","_"," "],d_=[",",".","-","_"," "],p_={width:["%"],height:["%"]},f_={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},h_={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":f_.image,"background-color":f_.color,"border-color":f_.color,"border-image":f_.image,color:f_.color,icon:f_.image,"list-style-image":f_.image,"outline-color":f_.color},m_={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function g_(e,t,n){let r;if(t){if(c_)return c_.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function b_(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return l_.appendChild(n),t=l_.innerHTML,l_.removeChild(n),t}function v_(e,t,n){let r,o,i,a,s,l,c,u,d;for(e=x_(e).toLowerCase(),t=x_(t),i=0;i<m_.attr_name.length;i++)if(e.match(m_.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<m_.attr_val.length;i++)if(t.toLowerCase().match(m_.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=p_[e],r||(r=d_),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&g_(c,r)<0?(d=u.toString(16),o+=`&#x${d};`):o+=c;return n||(o+='"'),o}function y_(e,t,n){let r,o,i,a,s,l,c,u,d,p;if(e=x_(e).toLowerCase(),t=x_(t),g_(e,m_.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<m_.css_val.length;r++)if(t.toLowerCase().indexOf(m_.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=h_[e],o||(o=f_.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&g_(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=c;return i}function x_(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new a_,new s_,new t_];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const S_=[];for(let e=0;e<255;e++)S_[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const w_={html:e=>b_(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=y_(t,n[t],!0),i+=y_(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=v_(e,t[e],!0),o+=v_(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function C_(e,t){throw new Error(t)}var E_={canonicalize:x_,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?w_.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&C_(this,"Invalid parameter type"),w_.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&C_(this,"Invalid parameter type"),w_.attr(e)):void C_(this,"Invalid parameter type")},encodeForAttr:v_,encodeForAttr2:function(e){return v_("nonsens",e,!0)},encodeForCSS:y_,encodeForHref:function(e){x_(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new KN(e),n=KN.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+KN.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=u_),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),g_(o,t)>=0||null==S_[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:b_,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=x_(t).toLowerCase():C_(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=GN,maxByteSizeImage:r=VN}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=BN.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const I_=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},D_=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!E_.isSafeDataURL(t))?{type:gT.Text,url:void 0,text:e,labelStructure:o}:{type:gT.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:I_(r,a),labelStructure:o,imageBox:i},M_=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:gT.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:gT.MiniChart,text:r,miniChart:a}},A_=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===bT.Attribute?void 0:n?.urlLabel},L_=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:gT.Link,url:E_.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:gT.Text,url:void 0,text:t,labelStructure:e}}},R_=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,measureMinMax:a,labelStructure:s,getText:l=e=>e.qText,direction:c,enabledFeatures:u})=>{const d=vT(t),p=l(e);return d===gT.Image&&u[gT.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=bk(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),D_({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return D_({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=bk(n.imageLabel??-1,e)?.qText??r;return D_({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:gT.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,p,c,s):d===gT.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===bT.Attribute){const i=A_(n.url??-1,e,t);return L_({labelStructure:r,text:o||i||"",url:i})}if(i===bT.Dimension){const i=A_(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),L_({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:gT.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,s,p):d===gT.Indicator&&u[gT.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:gT.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,p):d===gT.MiniChart&&u[gT.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?M_(e,t,i,p):d===gT.Bar&&u[gT.Bar]?((e,t,n,r,o)=>{const i={type:gT.Text,text:o},a=vk(e);if(!t||void 0===a)return i;const s=t=>{const r=n[t];return void 0===r||r<0?void 0:bk(r,e)},{barRangeMode:l,barColorMode:c,barLabelColorMode:u}=t,d="manual"===l,p=e=>d&&"number"==typeof e&&Number.isFinite(e)?e:void 0,f={value:a,columnMin:p(t.barRangeMin)??r?.qMin??0,columnMax:p(t.barRangeMax)??r?.qMax??0,isManualRange:d,hasNegativeValues:r?.hasNegativeValues,hasPositiveValues:r?.hasPositiveValues,offsetValue:vk(s("barOffset"))??0,thicknessPx:vk(s("barWidth")),label:s("barLabel")?.qText??o,fallbackLabel:o,color:"expression"===c?yk(s("barColor")):void 0,colorPalette:t.barColor,labelColor:"expression"===u?yk(s("barLabelColor")):void 0,labelColorPalette:t.barLabelColor,barEnd:t.barEnd??"none"};return{type:gT.Bar,text:o,bar:f}})(e,t,n,a,p):{type:gT.Text,url:void 0,text:p,labelStructure:s}},P_=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?YR(o):null,a=r?YR(r):null,s=((e,t)=>e||!t?null:BR(t))(a,i);return{color:s??a,background:i}},T_=/<[biust]>/g,q_=(e,t)=>((e,{boldFontWeight:t,combineDecorations:n=!1,allowIndentation:r=!1})=>{const o=e?.toLowerCase().match(T_),i={},a=new Set;let s=0;return o?.forEach(e=>{switch(e){case"<t>":r&&(s++,i.textIndent=`${s}em`);break;case"<b>":i.fontWeight=t;break;case"<i>":i.fontStyle="italic";break;case"<u>":a.add("underline"),i.textDecoration="underline";break;case"<s>":a.add("line-through"),i.textDecoration="line-through"}}),n&&a.size>0&&(i.textDecoration=["underline","line-through"].filter(e=>a.has(e)).join(" ")),Object.keys(i).length>0?i:void 0})(t.qAttrExps?.qValues?.[e?.textStyleExpression??-1]?.qText,{boldFontWeight:QT,combineDecorations:!0}),k_=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:k_(e,t),e),O_=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:eq-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,k_(s,e))},N_=({node:e,parent:t,root:n,x:r,y:o,pageY:i,getDimensionInfoIndex:a,visibleMeasureInfo:s,dimensionInfo:l,attrExprInfoIndex:c,isLeftColumn:u=!0,isIndentModeEnabled:d=!1,pseudoDimMeasureIndex:p,indentLevel:f,labelStructure:h,env:m,pageInfo:g,direction:b="ltr"})=>{const v=(!d||!u)&&"P"===e.qType,y=((e,t)=>{if(e!==Sk){if(t){const t=vT(e.representation);return t===gT.Link||t===gT.Image?e.representation:{type:gT.Text}}return e.representation}})(l,d),x=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===gT.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:d,labelStructure:h,representationType:vT(y),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),S=R_({cell:{...e,qText:x},representationProperties:y,attrExprInfoIndex:c,env:m,labelStructure:h,direction:b,enabledFeatures:{[gT.Image]:!0,[gT.Indicator]:!0}}),w={id:qP(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:u?i:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:O_(e,o,i,r,u,g),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof l||!l.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:v,expressionColor:P_(c,e),expressionTextStyle:m.flags.isEnabled("TLV_2605_PIVOT_TEXT_STYLING")?q_(c,e):void 0,selectionCellType:u?"L":"T",dimensionInfoIndex:a(l),canBeResized:0===e.qSubNodes.length&&!u,visibleMeasureInfoIndex:p??(v?e.qElemNo:t?.visibleMeasureInfoIndex),representation:S,...void 0!==f&&{indentLevel:f},headerColor:v&&m.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")&&void 0!==e.qElemNo?zN(s[e.qElemNo]?.headerColor):void 0};return t&&(t.children[w.mainAxisPageCoord-t.mainAxisPageCoord]=w),w},__=({grid:e,qLeft:t,qArea:n,pageInfo:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s,isIndentModeEnabled:l,leftDimensionInfoIndexes:c,hasPseudoDimOnLeft:u,visibleMeasureInfo:d,dimensionNullValueText:p,getDimensionInfoIndex:f})=>{if(!t.length)return e;let h=0;return function t(m,g,b,v=0,y=-1){e[v]||(e[v]={}),l&&y++;const x=c.indexOf(Sk);b.forEach((c,b)=>{const S={originalValue:c.qText??"",maskedValue:"",delimeter:"-",suffix:""};h+=0===b?0:1;const w=n.qTop-r.page*r.rowsPerPage,C=Math.max(0,w+h-c.qUp),E=n.qTop+h-c.qUp;let I;if(l){if(u&&y<=x)if(S.originalValue=c.qText??"",S.maskedValue=c.qText??"","N"===c.qType||"U"===c.qType||"T"===c.qType)"U"===c.qType&&(S.originalValue=p),y<x&&(S.suffix=d[0].qFallbackTitle??"");else if("P"===c.qType){S.originalValue=(g||m)?.representation.labelStructure?.originalValue??"",S.maskedValue=(g||m)?.representation.labelStructure?.originalValue??"",S.suffix=c.qText??"";const e=c.qSubNodes;I=c.qElemNo,c={...(g||m)?.ref,...c.qText?{qText:c.qText}:{},qSubNodes:e},y=(g||m)?.indentLevel??0}"U"===c.qType&&(S.originalValue=p)}let D=v;l&&(D=x>=1&&y>=x?y+1:y,0===y&&0===x&&0===c.qSubNodes.length&&(D=0));const M=e.at(v)?.[C],A=l&&void 0===M?.ref.qText||!M?N_({node:c,parent:g,root:m,x:D,y:E,pageY:C,getDimensionInfoIndex:f,visibleMeasureInfo:d,dimensionInfo:o[D],attrExprInfoIndex:i[D],isLeftColumn:!0,...l&&{isIndentModeEnabled:l,indentLevel:y},env:a,pageInfo:r,labelStructure:S,direction:s,pseudoDimMeasureIndex:I}):e[v][C];if(e[v][C]=A,c.qSubNodes.length){const e=l?0:v+1;t(m||A,A,c.qSubNodes,e,y)}})}(null,null,t,0,-1),e},j_=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},F_=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},z_=({prevData:e,nextDataPage:t,...n})=>{const{qLeft:r,qArea:o}=t;if(!r.length)return e;const i=__({...n,grid:e.grid,qLeft:r,qArea:o});j_(i,n.pageInfo.rowsOnCurrentPage);const a=F_(i,n);return{...e,grid:i,columnCount:i.length,totalDividerIndex:a}},W_=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach((t,n)=>{t.forEach((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:qP(),ref:t,isNull:l}})}),o},$_=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?W_({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},H_=(e,t)=>e?.background===t?.background&&e?.color===t?.color,B_=e=>{const t=e?.trim()??"";return"Error: Invalid or Empty Expression."===t?"":t},V_=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,b=e[h][g]??N_({node:f,parent:p,root:a,x:g,y:h,pageY:h,getDimensionInfoIndex:r.getDimensionInfoIndex,visibleMeasureInfo:r.visibleMeasureInfo,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[h][g]=b,f.qSubNodes.length&&t(a||b,b,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},G_=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=V_(e.grid,c,u,n,r,o,i,a,s,l);j_(d,n.size.x);const p=F_(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},U_=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),Y_=(e,t)=>{const n=qf(Th),r=qf(qh),o=qf(Zk),i=qf(Uq),a=qf(Wk),s=qf(Nk),l=qf(Vk),c=qf($k),u=qf(Hk),d=qf(Bk),p=qf(Gk),h=qf(Uk),g=qf(kk),v=qf(Hq),y=qf(tO),x=qf(Qk),[S,w]=m(null),C=((e,t,n)=>b(()=>({left:e.map(U_),top:t.map(U_),measures:n.map(U_)}),[n,e,t]))(e,t,a),E=b(()=>r("VNA-965-PIVOT-MEASURE-GROUPS")?(({size:e,visibleMeasureInfo:t,getMeasureInfoIndexFromCellIndex:n,visibleTopDimensionInfo:r,isHeaderColorEnabled:o})=>{if(1!==r.length||r[0]!==Sk)return[];const i=[];for(let r=0;r<e.x;r+=1){const e=t.at(n(r,!0)),a=B_(e?.groupName),s=i.at(-1),l=o?zN(e?.headerColor):void 0;a&&s&&s.label===a&&s.start+s.span===r?(H_(s.headerColor,l)||(s.headerColor=void 0),s.span+=1):i.push({start:r,span:1,label:a,headerColor:l})}return i.some(e=>e.label)?i:[]})({size:g,visibleMeasureInfo:a,getMeasureInfoIndexFromCellIndex:h,visibleTopDimensionInfo:t,isHeaderColorEnabled:r("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")}):[],[r,g,a,h,t]),I=b(()=>HN(i,v,t,e,r,E.length>0),[i,v,t,e,r,E.length]),D=I.size.y-(E.length>0?1:0),M=f(()=>y.slice(1).reduce((e,t)=>$_({prevData:e,dataPage:t,pageInfo:x}),((e,t)=>{const{qData:n,qArea:r}=e;return W_({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(y[0],x)),[y,x]),A=f(()=>y.slice(1).reduce((e,r)=>G_({prevData:e,nextDataPage:r,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:C.top,headerRows:D,env:n,pageInfo:x,direction:o}),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=V_([],c,l,t,n,r,o,i,a,s);j_(u,t.size.x);const d=F_(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(y[0],i,t,C.top,D,n,x,o)),[y,i,t,C.top,D,n,x,o]),L=f(()=>y.slice(1).reduce((t,r)=>z_({prevData:t,nextDataPage:r,pageInfo:x,isIndentModeEnabled:s,leftDimensionInfoIndexes:l,hasPseudoDimOnLeft:c,visibleMeasureInfo:a,nullValueText:u,dimensionNullValueText:d,getDimensionInfoIndex:p,visibleLeftDimensionInfo:e,attrExprInfoIndexes:C.left,env:n,direction:o}),(({dataPage:e,size:t,...n})=>{const{qArea:r,qLeft:o}=e,i=__({...n,grid:[],qLeft:o,qArea:r});j_(i,n.pageInfo.rowsOnCurrentPage);const a=F_(i,n);return{grid:i,columnCount:i.length,layoutSize:t,totalDividerIndex:a}})({dataPage:y[0],size:g,pageInfo:x,isIndentModeEnabled:s,leftDimensionInfoIndexes:l,hasPseudoDimOnLeft:c,visibleMeasureInfo:a,nullValueText:u,dimensionNullValueText:d,getDimensionInfoIndex:p,visibleLeftDimensionInfo:e,attrExprInfoIndexes:C.left,env:n,direction:o})),[y,x,e,C,n,o,a,s,l,c,u,d,p,g]),[R,P]=m(()=>M()),[T,q]=m(()=>A()),[k,O]=m(()=>L());jq(()=>{P(M())},[M]),jq(()=>{q(A())},[A]),jq(()=>{O(L())},[L]),jq(()=>{S&&S.forEach(r=>{P(e=>$_({prevData:e,dataPage:r,pageInfo:x})),q(e=>G_({prevData:e,nextDataPage:r,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:C.top,headerRows:D,env:n,pageInfo:x,direction:o})),O(t=>z_({prevData:t,nextDataPage:r,pageInfo:x,isIndentModeEnabled:s,leftDimensionInfoIndexes:l,hasPseudoDimOnLeft:c,visibleMeasureInfo:a,nullValueText:u,dimensionNullValueText:d,getDimensionInfoIndex:p,visibleLeftDimensionInfo:e,attrExprInfoIndexes:C.left,env:n,direction:o}))})},[S]);const N=f(e=>{w(e)},[]);return{headersData:I,measureData:R,topDimensionData:T,leftDimensionData:k,measureGroups:E,attrExprInfoIndexes:C,nextPageHandler:N}},K_=Math.sqrt(1e4),X_=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/yA.PixelsMin)}),J_=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/K_),r=Math.ceil(e.qHeight/K_);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*K_,qTop:e.qTop+n*K_,qWidth:Math.min(K_,e.qWidth-o*K_),qHeight:Math.min(K_,e.qHeight-n*K_)});return t};function Z_({nextPageHandler:e}){const t=qf(Xk),n=qf(kh),r=qf(Qk),o=qf(Uq),i=qf(Uk),a=qf(Tk),s=(e=>{const t=l(e);return t.current=e,t})(r.page),c=t,u=f(async(e,t)=>{try{await(c?.collapseLeft(xk,e,t,!1))}catch(e){n.error({msg:"Failed to collapse left",payload:e})}},[c,n]),d=f(async(e,t)=>{try{await(c?.collapseTop(xk,e,t,!1))}catch(e){n.error({msg:"Failed to collapse top",payload:e})}},[c,n]),p=f(async(e,t)=>{try{await(c?.expandLeft(xk,e,t,!1))}catch(e){n.error({msg:"Failed to expand left",payload:e})}},[c,n]),h=f(async(e,t)=>{try{await(c?.expandTop(xk,e,t,!1))}catch(e){n.error({msg:"Failed to expand top",payload:e})}},[c,n]),m=f(async t=>{if(c?.getHyperCubePivotData&&0!==t.length)try{const n=await c.getHyperCubePivotData(xk,t.reduce((e,t)=>[...e,...J_(t)],[]));s.current===r.page&&e(n)}catch(e){n.error({msg:"Failed to fetch pivot pages",payload:e})}},[c,e,r,s,n]),g=f((e,{dimensionInfoIndex:r,isLeftColumn:o,x:s=0,columnWidthLocation:l})=>{const{qMeasureInfo:c,qDimensionInfo:u,topHeadersColumnWidth:d}=a.qHyperCube;let p=[];switch(l){case LT.Dimension:p=[{qPath:`${xk}/qDimensions/${r}/qDef/columnWidth`,oldValue:u[r].columnWidth}];break;case LT.Measures:if(o)p=c.map((e,t)=>({qPath:`${xk}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=i(s);p=[{qPath:`${xk}/qMeasures/${e}/qDef/columnWidth`,oldValue:c[e].columnWidth}]}break;case LT.Pivot:p=[{qPath:`${xk}/topHeadersColumnWidth`,oldValue:d}]}const f=p.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(f,!0).catch(e=>{n.error({msg:"Failed to apply column width",payload:e})})},[t,a,i,n]),v=f(async e=>{try{await(c?.applyPatches([{qPath:`${xk}/indentModeColumnWidth`,qOp:a.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...o.indentModeColumnWidth,...e})}],!0))}catch(e){n.error({msg:"Failed to apply indent mode column width",payload:e})}},[c,a,o,n]);return b(()=>({collapseLeft:u,collapseTop:d,expandLeft:p,expandTop:h,applyColumnWidth:g,applyIndentModeColumnWidth:v,fetchPages:m}),[u,d,p,h,g,v,m])}const Q_=(e,t,n)=>(r,o)=>{if("P"===r)return Sk;const i=t[n+o];return e[i]},ej=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},tj=c({}),nj=()=>h(tj),rj=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}=qf(Tk),r=qf(tO);return b(()=>{const o=ej(r[0]?.qLeft??[]),i=ej(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(Q_(n,t,0)),visibleTopDimensionInfo:i.map(Q_(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,measureGroups:s,attrExprInfoIndexes:l,nextPageHandler:c}=Y_(t,n),u=Z_({nextPageHandler:c}),d=b(()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o,measureGroups:s},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:l,dataModel:u}),[t,n,r,o,i,a,s,l,u]);return fi.jsx(tj.Provider,{value:d,children:e})},oj=(e,t)=>{const n=Math.min(Math.max(e.rowIdx,t.minRow),t.maxRow),r=Math.min(Math.max(e.colIdx,t.minCol),t.maxCol);return{...e,rowIdx:n,colIdx:r}},ij=e=>(e=>[bA.Left,bA.Right,bA.Up,bA.Down].includes(e))(e)||[bA.Home,bA.End,bA.PageUp,bA.PageDown].includes(e),aj=()=>{const e=qf(qh)("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE"),{gridSectionsData:t}=nj(),n=qf(kN),r=qf(ON),o=kf(NN),i=qf(PN);return{handleKeyDown:a=>{if(!e)return;if(!(e=>ij(e.key)&&!(e=>e.shiftKey&&(e=>e.ctrlKey||e.metaKey)(e))(e))(a))return;a.preventDefault();const s=r.focusCoord,l={HEADER:{colCount:t.headersData.size.x,rowCount:t.headersData.size.y},TOP:{colCount:t.topDimensionData.layoutSize.x,rowCount:t.topDimensionData.rowCount},LEFT:{colCount:t.leftDimensionData.columnCount,rowCount:t.leftDimensionData.layoutSize.y},DATA:{colCount:t.topDimensionData.layoutSize.x,rowCount:t.leftDimensionData.layoutSize.y}},c=s?((e,t,n)=>{const r=e?.section??"HEADER",o={minRow:0,maxRow:n[r].rowCount-1,minCol:0,maxCol:n[r].colCount-1};switch(t){case bA.Down:if(e.rowIdx<o.maxRow)return{...e,rowIdx:e.rowIdx+1};if("TOP"===e.section)return{...e,rowIdx:0,section:"DATA"};if("HEADER"===e.section){const t={minRow:0,maxRow:n.LEFT.rowCount-1,minCol:0,maxCol:n.LEFT.colCount-1};return oj({...e,rowIdx:0,section:"LEFT"},t)}return e;case bA.Up:return e.rowIdx>o.minRow?{...e,rowIdx:e.rowIdx-1}:"DATA"===e.section?{...e,rowIdx:n.TOP.rowCount-1,section:"TOP"}:"LEFT"===e.section?{...e,rowIdx:n.HEADER.rowCount-1,section:"HEADER"}:e;case bA.Right:return e.colIdx<o.maxCol?{...e,colIdx:e.colIdx+1}:"LEFT"===e.section?{...e,colIdx:0,section:"DATA"}:"HEADER"===e.section?{...e,colIdx:0,section:"TOP"}:e;case bA.Left:return e.colIdx>o.minCol?{...e,colIdx:e.colIdx-1}:"DATA"===e.section?{...e,colIdx:n.LEFT.colCount-1,section:"LEFT"}:"TOP"===e.section?{...e,colIdx:n.HEADER.colCount-1,rowIdx:0,section:"HEADER"}:e;case bA.Home:return{...e,colIdx:0};case bA.End:return{...e,colIdx:n[e.section].colCount-1};case bA.PageDown:{const t={...e,rowIdx:e.rowIdx+10};return oj(t,o)}case bA.PageUp:{const t={...e,rowIdx:e.rowIdx-10};return oj(t,o)}default:return e}})(s,a.key,l):{section:"HEADER",rowIdx:0,colIdx:0};if(!n)return;n(c);const u=r.pivotSection.WRAPPER;u&&((e,t,n,r)=>{const o=t=>{r&&!r()||e()||t>0&&requestAnimationFrame(()=>{o(t-1)})};requestAnimationFrame(()=>{o(t)})})(()=>{const e=(t=c,u.querySelector(`[data-pivot-section="${t.section}"][data-row-idx="${t.rowIdx}"][data-col-idx="${t.colIdx}"]`));var t;if(!e)return!1;const n=r.pivotSection[c.section];if(!n)return!1;const i=((e,t)=>{if(!e||!t)return!1;const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right})(e,n);var a;return i&&(o(c),(a=e)&&(a.focus(),(e=>{e?.setAttribute("tabIndex","0")})(a))),i},5,0,()=>!i?.current)}}},sj=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const e=qf(oO),t=qf(iO),n=qf(jk),r=qf(Ok),o=e.getStyle("","","fontFamily")??ZT;return r?n?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:o,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:o,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:fi.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:fi.jsx("span",{style:{...sq,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},lj=20,cj=18,uj=.75,dj=e=>-1!==e&&e?.representation?.type===gT.Image,pj=({isLeftColumn:e,isIndentModeEnabled:t,representation:n})=>Boolean(e)&&t&&n.type===gT.Image,fj=e=>void 0===e?QT:e,hj=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},mj=e=>hj(e,yA.PixelsDefault),gj=(e,t)=>hj(e,yA.PercentageDefault)*t/100,bj=(e,t,n)=>{switch(t?.type){case xA.Pixels:return mj(t.pixels);case xA.Percentage:return gj(t.percentage,e);case xA.FitToContent:case xA.Auto:default:return n}},vj=({headers:e,qNoOfLeftDims:t,qDimensionInfo:n,isIndentModeEnabled:r,effectivePropertiesService:o,estimateWidthForDimensionValue:i,shouldConsiderCombinatedLength:a,measureTextForHeader:s,longestMeasureValuePossible:l})=>e.reduce((e,c,u)=>{const{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=c,m=n.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===wk)return e+0;const b=pj({isLeftColumn:h,isIndentModeEnabled:r,representation:m?.representation||{type:gT.Text}})?g.width+8+4:i(f),v=!o.qAlwaysFullyExpanded&&p<t-1?21:0;let y=0;if(a&&s&&l){y=s("- ")+l}return Math.max(e,24*u+cj+v+b+y)},0),yj=(e,t,n)=>e.reduce((e,r)=>{const o=(n?0:1)*cj;return Math.max(e,o+t(r.qFallbackTitle??""))},0),xj=(e,t,n,r)=>{const o=100*e/t,i=r*uj*(o/100),a=o/100*+n;return Math.min(a,i)},Sj=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),wj=(e,t)=>e.some(e=>e>=t*uj),Cj=({qNoOfLeftDims:e,qDimensionInfo:t,isIndentModeEnabled:n,visibleMeasureInfo:r,hasPseudoDimOnLeft:o,indentModeColumnWidth:i,effectivePropertiesService:a,headersData:s,columnWidths:l,tableWidth:c,widthOverride:u,measureTextForHeader:d,estimateWidthForDimensionValue:p,measureTextWidthForMeasuresCombinedWithDimensions:f,translator:h})=>{let m;const g=c*uj,b=s.data[s.data.length-1][0];if(!Array.isArray(b))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const v=Math.min(g,l.at(-1)),y=Math.min(g,vj({headers:b,qNoOfLeftDims:e,qDimensionInfo:t,isIndentModeEnabled:n,effectivePropertiesService:a,estimateWidthForDimensionValue:p})),x=Math.min(g,yj(r,d));let S;const w=b.findIndex(e=>e.id===wk),C=(({indentModeColumnWidth:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e;return o===xA.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+cj+16:24})({indentModeColumnWidth:i,measureTextForHeader:d,translator:h,headersData:s});if(o)if(0===w){const e=Math.max(v,y,x);m=[Math.max(C,e-v),v]}else{const o=Math.min(g,yj(r,f,!0));S=Math.min(g,vj({headers:b.slice(0,w),qNoOfLeftDims:e,qDimensionInfo:t,isIndentModeEnabled:n,effectivePropertiesService:a,estimateWidthForDimensionValue:p,shouldConsiderCombinatedLength:!0,measureTextForHeader:d,longestMeasureValuePossible:o}));const i=Math.max(v,y,S);m=[Math.max(C,i-v),v]}else m=[Math.max(C,y-v),v];const E=Math.min(g,m.reduce((e,t)=>e+t,0));u&&u<=g&&(i.type=xA.Pixels,i.pixels=u);return[xA.Pixels,xA.Percentage].includes(i.type)||wj(m,c)?((e,t,n,r)=>{let o=e[0],i=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:c}=t,u=hj(l,yA.PixelsDefault),d=hj(c,yA.PercentageDefault),p=wj(e,n);let f;s===xA.Auto&&p&&(o>i?o-=i:i-=o),s===xA.Pixels&&u&&(o=xj(e[0],a,u,n),i=xj(e[1],a,u,n)),s===xA.Percentage&&d&&(o=Sj(e[0],a,d,n),i=Sj(e[1],a,d,n)),i<=r&&(f=o-5,f>0&&(o-=f,i+=f)),f=i-r,f>0&&(o+=f,i-=f);const h=[o,i],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(m,i,c,v):{leftGridWidth:E,leftGridColumnWidths:m,leftGridFullWidth:E}};function Ej({tableWidth:e}){const t=e*uj,n=qf(rO),{indentModeColumnWidth:r}=qf(Uq),o=qf(Wk),i=qf($k),a=qf(zk),s=qf(Tk),l=qf(Nk),c=qf(Hq),u=qf(iO),{gridSectionsData:{headersData:d}}=nj(),{measureText:p}=qq(n.header,{allowLineBreaks:!1}),{estimateWidth:h,measureText:g}=qq({...n.dimensionValues,fontWeight:fj(n.dimensionValues.fontWeight)}),{measureText:b}=qq({...n.dimensionValues,...n.measureLabels}),v=f((n,f)=>{const{qNoOfLeftDims:m,qDimensionInfo:v,topHeadersColumnWidth:y}=s.qHyperCube,x=(t=0)=>o.reduce((n,{qFallbackTitle:r,columnWidth:o})=>{const i=b(r)+cj,a=Math.max(i,t);return Math.max(n,l?a:bj(e,o,a))},0),S=e=>d.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===wk)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?lj:0;return cj+p(t)+lj+r})(r);return Math.max(o,t)},0);let w=0,C=d.data.at(-1);l&&d.size.x>1&&C&&C[0]&&(C=C[0]);const E=C.map((o,s)=>{let u;if(l&&1!==d.size.x||!n||void 0===f||f!==o.colIdx){let t,n;if(o.columnWidthLocation===LT.Pivot?t=l?void 0:y:o.columnWidthLocation===LT.Dimension&&({columnWidth:t}=o),o.isLeftDimension)if(o.id===wk)n=x();else{const e=S(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:r,dimensionInfoIndex:o}=e,i=a(o);if(dj(i))return yA.PixelsDefault;const s=!c.qAlwaysFullyExpanded&&r&&t<m-1?21:0;return cj+h(n)+s})(o,s);n=Math.max(e,t),l&&!i&&s+1===m&&o.columnWidthLocation===LT.Dimension&&d.size.x>1&&(n=e)}else n=S(s),o.columnWidthLocation===LT.Measures&&(n=x(n));l&&1===d.size.x&&(t=r),u=l&&!i&&d.size.x>1?n:bj(e,t,n)}else u=l?Math.min(t,n):n;return w+=u,u});return l&&d.size.x>1?Cj({qNoOfLeftDims:m,qDimensionInfo:v,isIndentModeEnabled:l,visibleMeasureInfo:o,hasPseudoDimOnLeft:i,indentModeColumnWidth:r,effectivePropertiesService:c,headersData:d,columnWidths:E,tableWidth:e,widthOverride:n,measureTextForHeader:p,estimateWidthForDimensionValue:h,measureTextWidthForMeasuresCombinedWithDimensions:g,translator:u}):{leftGridWidth:Math.min(t,w),leftGridColumnWidths:E,leftGridFullWidth:w}},[e,d,l,s,o,i,r,a,t,p,b,h,g,u,c]),[y,x]=m(v);jq(()=>{x(v())},[v]);const S=f((e,t)=>{x(v(e,t))},[v]);return{...y,overrideLeftGridWidth:S}}function Ij({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const r=qf(rO),o=qf(Uk),i=qf(Wk),{visibleDimensionsInfo:{visibleTopDimensionInfo:a}}=nj(),{qHyperCube:{qNoOfLeftDims:s,qEffectiveInterColumnSortOrder:l}}=qf(Tk),c=qf(kk),{estimateWidth:u,measureText:d}=qq(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=qq({...r.dimensionValues,fontWeight:fj(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=a.at(-1),g=m===Sk,v=l.length-s>a.length?21:0,y=b(()=>{const e=g?i:[m],t=c.x/e.length,n=[],r=[];let o=h;const a=(e,r)=>{n[e]=Math.min(yA.PixelsMax,Math.max(yA.PixelsMin,r)),o-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:s},qApprMaxGlyphCount:l,qFallbackTitle:c}=e;switch(n){case xA.Pixels:a(t,mj(o));break;case xA.Percentage:a(t,gj(s,h));break;case xA.FitToContent:a(t,((e,t,n)=>n?yA.PixelsDefault:cj+(g?Math.max(u(e),d(t)):Math.max(Math.max(...i.map(e=>u(e.qApprMaxGlyphCount))),p(e)+v)))(l,c??"",dj(e)));break;case xA.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,i=o/e;r.forEach(e=>{n[e]=Math.max(yA.AutoMinPivot,i)})}return n},[g,i,m,c.x,h,u,d,p,v]),x=b(()=>{if(g){return i.reduce((e,t,n)=>e+y[n],0)/i.length}return y[0]},[g,y,i]),S=c.x*x,w=Math.max(0,h-S),C=Math.max(0,t-w),E=parseFloat((C/c.x).toFixed(12)),I=f(e=>(g&&void 0!==e?y[o(e,!0)]:x)-E,[g,y,o,x,E]);return{rightGridFullWidth:S,rightGridWidth:Math.min(S,h),getRightGridColumnWidth:I}}const Dj=`scrollable-container--${PT.TopGrid}`,Mj=`scrollable-container--${PT.LeftGrid}`,Aj=`scrollable-container--${PT.DataGrid}`,Lj=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},Rj=(e,t)=>e>t?TT.Forward:e<t?TT.Backward:TT.None,Pj=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const s=qf(Zk);d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),u.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[i,o,a,e,t,n,r,s])},Tj=Sf(!1),qj=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,kj=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:o,data:i,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,o]=m({width:0,height:0}),[i,a]=m({width:0,height:0}),[s,c]=m({width:0,height:0}),[u,p]=m(!1),h=qf(Tj),g=l(h),b=l(h);g.current=h;const v=f(()=>{p(e=>!e&&e);const r=Lj(e.current),i=Lj(t.current),s=Lj(n.current);o(e=>qj(e,r)?r:e),a(e=>qj(e,i)?i:e),c(e=>qj(e,s)?s:e)},[e,t,n]);d(()=>{const r=new ResizeObserver(()=>{g.current||v()});return[e.current,t.current,n.current].filter(e=>Boolean(e)).forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[v,e,t,n]),d(()=>{const e=b.current;if(b.current=h,e&&!h){const e=setTimeout(v,0);return()=>{clearTimeout(e)}}},[h,v]);const y=f(()=>{p(!0)},[]);return{top:r,left:u?{...i,height:0}:i,data:u?{...s,height:0}:s,resetHorizontalScrollbarHeight:y}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,i.width),horizontalScrollbarHeight:Math.max(o.height,i.height)},resetHorizontalScrollbarHeight:a}},Oj=()=>{const e=qf(Vq),t=l(null),n=l(null),r=l(null),o=l(null),i=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u},resetHorizontalScrollbarHeight:p}=kj({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const s=qf(Qk),l=qf($q),c=qf(aO),u=qf(Tk),d=qf(_k),p=qf(qk),h=f(()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)},[e,t,n,r]);g(()=>{h()},[s.page,h]),g(()=>{d||h()},[u,d,h]),g(()=>{if(d){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach(e=>{e?.scrollTo(t)}),o.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[u,d,r,a,i,o]),g(()=>{(l.isDownloadedAsPDForImage||p)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)},[c,l,p,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:b}}=(()=>{const e=l(TT.None),t=l(TT.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=f(r=>{if(r instanceof WheelEvent&&(e.current=Rj(r.deltaY,0),t.current=Rj(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=Rj(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=Rj(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),v=(()=>{const e=qf(aO);return f(t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===Mj&&(e.leftGridScrollLeft=r.scrollLeft),o===Aj&&(e.scrollLeft=r.scrollLeft),o===Dj&&(e.topGridScrollTop=r.scrollTop),o!==Mj&&o!==Aj||(e.scrollTop=r.scrollTop)},[e])})(),y=f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current}),[t,n,r,o]),x={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},getWrapperElements:y,updateViewService:v,trackScrollDirection:h,interactions:e};(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{d(()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{e.ctrlKey||(e.preventDefault(),o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t))},f=r=>{r.ctrlKey||(r.preventDefault(),c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(c.scrollLeft)}),l.scrollTop=c.scrollTop,t.current?.forEach(e=>{e?.scrollTo(c.scrollTop)}),i(r))};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",f),a.scroll||setTimeout(()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)},0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)}},[i,o,a,e,t,n,r])})(x),Pj(x);const S=f(e=>{switch(e.section){case"TOP":i.current[0]?.scrollToItem(e.rowIdx);break;case"LEFT":a.current[0]?.scrollToItem(e.rowIdx);break;case"DATA":s.current?.scrollToItem({rowIndex:e.rowIdx,columnIndex:e.colIdx})}},[]);return{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:b},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u,resetHorizontalScrollbarHeight:p},scrollToCoordCallBack:S}},Nj=()=>{const e=qf(jk),t=qf(nO),n=qf(Qk);return b(()=>{let{height:r}=t;return e&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},_j=({children:e,style:t})=>fi.jsx("div",{"data-testid":"fullSize",style:t,children:e}),jj=({children:e,style:t})=>{const n=qf(Zk);return fi.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},Fj=e=>e&&`scrollable-container--${e}`,zj=({children:e,style:t,origin:n},r)=>{const o=qf(Vq).scroll?t:{overflow:"hidden"};return fi.jsx("div",{"data-testid":"scrollable","data-key":Fj(n),style:o,ref:r,children:e})};var Wj=n.forwardRef(zj);const $j=({children:e,style:t})=>{const n=qf(Zk);return fi.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var Hj=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Bj(e,t){return e===t||!(!Hj(e)||!Hj(t))}function Vj(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Bj(e[n],t[n]))return!1;return!0}function Gj(e,t){var n;void 0===t&&(t=Vj);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var Uj="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Yj(e){cancelAnimationFrame(e.id)}function Kj(e,t){var n=Uj();var r={id:requestAnimationFrame(function o(){Uj()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var Xj=-1;function Jj(e){if(void 0===e&&(e=!1),-1===Xj||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Xj=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Xj}var Zj=null;function Qj(e){if(void 0===e&&(e=!1),null===Zj||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Zj="positive-descending":(t.scrollLeft=1,Zj=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Zj}return Zj}var eF=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function tF(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,Ks(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Ks(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Gj(function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=Gj(function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),f=e+":"+t;if(u.hasOwnProperty(f))o=u[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;u[f]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=Gj(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(Qj()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Yj(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Kj(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}Fs(t,e),t.getDerivedStateFromProps=function(e,t){return nF(e,t),b(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=Jj();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=s(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?b:0,x=v>d?b:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(Qj()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Yj(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?eF:f,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,v=e.style,y=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],M=I[1],A=[];if(o>0&&b)for(var L=D;L<=M;L++)for(var R=C;R<=E;R++)A.push(r(t,{columnIndex:R,data:p,isScrolling:y?S:void 0,key:h({columnIndex:R,data:p,rowIndex:L}),rowIndex:L,style:this._getItemStyle(L,R)}));var P=s(this.props,this._instanceProps),T=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Te({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},r(u||d||"div",{children:A,ref:c,style:{height:P,pointerEvents:S?"none":void 0,width:T}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,v=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(b,v,g,x,y)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=o(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=h(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var nF=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},rF=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},oF=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},iF=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},aF=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?sF(e,t,n,i,0,r):lF(e,t,n,Math.max(0,i),r)},sF=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=iF(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},lF=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&iF(e,t,r,n).offset<o;)r+=a,a*=2;return sF(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},cF=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=iF(e,t,n,i),c="column"===e?oF(t,i):rF(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},uF=tF({getColumnOffset:function(e,t,n){return iF("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return aF("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=iF("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=iF("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:rF,getEstimatedTotalWidth:oF,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return cF("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return cF("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return iF("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return aF("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=iF("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=iF("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),dF=function(e,t){return e};function pF(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Ks(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ks(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Gj(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=Gj(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Gj(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(Qj()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Yj(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Kj(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}Fs(t,e),t.getDerivedStateFromProps=function(e,t){return fF(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?Jj():0:l.scrollHeight>l.clientHeight?Jj():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(Qj()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Yj(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?dF:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var M=E;M<=I;M++)D.push(r(t,{data:d,key:f(M,d),index:M,isScrolling:v?x:void 0,style:this._getItemStyle(M)}));var A=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Te({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},b)},r(l||c||"div",{children:D,ref:s,style:{height:S?"100%":A,pointerEvents:x?"none":void 0,width:S?A:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var fF=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},hF=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},mF=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=hF(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},gF=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&hF(e,n,t).offset<r;)n+=i,i*=2;return mF(e,t,Math.min(n,o-1),Math.floor(n/2),r)},bF=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},vF=pF({getItemOffset:function(e,t,n){return hF(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:bF,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=hF(e,t,o),p=bF(e,o),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?mF(e,t,o,0,n):gF(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=hF(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=hF(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function yF(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var xF=["style"],SF=["style"];function wF(e,t){var n=e.style,r=qe(e,xF),o=t.style,i=qe(t,SF);return!yF(n,o)&&!yF(r,i)}const CF=10,EF=(e,t)=>e.current===TT.Backward?t:0,IF=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},DF=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,MF=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(IF(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&DF(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},AF=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===TT.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return MF({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},LF=({pageInfo:e,measureData:t,scrollDirection:n,size:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.x,l=EF(n,CF),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+CF,s-c),pageTop:o,qHeight:a}})(r,o,n),c=MF({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...AF({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.x})]:c},RF=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},PF=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,TF=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(RF(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&PF(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},qF=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=EF(n,CF),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+CF,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=TF({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===TT.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=TF({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},kF=(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],f=[];i.current!==TT.None&&(p=qF({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==TT.None&&(f=LF({pageInfo:r,measureData:n,scrollDirection:a,size:t,viewService:o})),i.current===TT.None&&a.current===TT.None&&(p=TF({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},OF=function(e,t=50){let n,r,o,i=0;return function(...a){n=this,r=a;const s=Date.now()-i,l=()=>{i=Date.now(),o=0,e.apply(n,r)};o||(s>=t?l():o=setTimeout(l,t-s))}}(kF,100),NF=OR(kF,75),_F=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),jF=()=>{const e=qf(qh)("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE"),t=kf(NN);return{handleClick:(n,r,o)=>{e&&t({section:n,rowIdx:r,colIdx:o})}}},FF=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const s=qf(Zk),{grid:{border:l,divider:c}}=qf(rO);return fi.jsx("div",{style:{...e,...aq,...uq(n,r,l,s,o),...pq({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},zF=({verticalAlign:e,width:t,isLeftColumn:n})=>{const r=qf(Nk);return{display:"flex",flexDirection:"row",width:t,maxWidth:"100%",maxHeight:"100%",...!(n&&r)&&{alignItems:e,alignSelf:e,overflow:"hidden"}}},WF=({children:e,...t})=>fi.jsx("div",{"data-key":"cell-container",style:zF(t),children:e}),$F=({children:e,right:t,...n})=>fi.jsx("div",{"data-key":"sticky-cell-container",style:{...zF(n),position:"sticky",left:4,top:0,bottom:0,right:t},children:e}),HF=e=>{const{type:t,imageSize:n,bar:r}=e;return t===gT.Bar&&r?"100%":t!==gT.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},BF="min(50px, 20%)",VF=({bar:e,height:t})=>{const{value:n,offsetValue:r,columnMin:o,columnMax:i,isManualRange:a,thicknessPx:s,barEnd:l}=e,c=a?o:Math.min(o,0);let u=a?i:Math.max(i,0);u>c||(u=c+1);const d=r,p=r+n,f=n>=0,h=Math.min(d,p),m=Math.max(d,p),g=Math.round(((e,t,n)=>Math.max(t,Math.min(n,e)))(s??("none"===l?1*t:4),2,Math.max(2,t-2))),b=Math.min(((e,t)=>"circle"===e?2*t:"box"===e?t+4:0)(l,g),t),v=Math.min(d,p)<c,y=Math.max(d,p)>u,x="none"===l?25:10+("none"===l?0:b/2+2);return{rangeMin:c,rangeMax:u,hasRoomAtMin:e.hasNegativeValues??(a||c<0||!f),hasRoomAtMax:e.hasPositiveValues??(a||i>=0||f),low:h,high:m,valueEnd:f?m:h,growsTowardsHigh:f,overflowMin:v,overflowMax:y,hasBar:m>h&&m>c&&h<u,thicknessPx:g,capSize:b,hasZeroAxis:c<=0&&u>=0,oobSizePx:x}},GF=As("div")({position:"relative",width:"100%",overflow:"hidden"}),UF=As("div")({position:"absolute"}),YF=As("span")({position:"absolute",top:0,height:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),KF=As("svg")({position:"absolute",display:"block"}),XF=({shape:e,pointsRight:t,width:n,height:r})=>{if("slice"===e)return`M0 0L${n-8} ${r}L0 ${r}ZM8 0L${n} ${r}L${n} 0Z`;const o=n/2,i=o*Math.sin(Math.PI/3),a=t?o/2:1.5*o;return`M${a} ${o-i}L${t?n:0} ${o}L${a} ${o+i}Z`},JF=({height:e,theme:t,bar:n,direction:r,fontFamily:o,fontSize:i,textDecoration:a})=>{const s=(({bar:e,height:t,isRtl:n})=>{const r=VF({bar:e,height:t}),{rangeMin:o,rangeMax:i,low:a,high:s,overflowMin:l,overflowMax:c,thicknessPx:u,capSize:d,oobSizePx:p}=r,f=r.hasRoomAtMin?BF:"0px",h=r.hasRoomAtMax?BF:"0px",m=f,g=`calc(100% - ${h})`,b=e=>{const t=(Math.min(Math.max(e,o),i)-o)/(i-o);return`calc(${f} + ${t} * (100% - ${f} - ${h}))`},v="none"===e.barEnd,y=v?25:10,x=c?`max(${g} - ${p}px, ${l?m:b(a)})`:b(s),S=l?`min(${m} + ${p}px, ${c?g:b(s)})`:b(a),w=r.growsTowardsHigh?x:S,C=e=>Math.floor((t-e)/2),E=C(u),I=d>0?d/2+4:4,D=e=>{const t=v?u:10;return{key:e,shape:v?"slice":"triangle",pointsRight:"max"===e!==n,width:y,height:t,style:{..."min"===e?{insetInlineStart:f}:{insetInlineEnd:h},top:C(t),width:y,height:t}}};return{zeroAxis:r.hasZeroAxis?{insetInlineStart:`calc(${b(0)} - 0.5px)`,top:0,width:1,height:"100%"}:void 0,bar:r.hasBar?{insetInlineStart:S,width:`max(1px, ${x} - ${S})`,top:E,height:u}:void 0,cap:r.hasBar&&d>0?{insetInlineStart:`calc(${w} - ${d/2}px)`,top:C(d),width:d,height:d,borderRadius:"circle"===e.barEnd?"50%":void 0}:void 0,label:e.label?r.growsTowardsHigh?{insetInlineStart:c?`calc(${g} + 4px)`:l?`max(${x} + ${I}px, ${m} + ${y+4}px)`:`calc(${x} + ${I}px)`,insetInlineEnd:"4px",textAlign:"start"}:{insetInlineStart:"4px",insetInlineEnd:`calc(100% - ${l?`calc(${m} - 4px)`:c?`min(${S} - ${I}px, ${g} - ${y+4}px)`:`calc(${S} - ${I}px)`})`,textAlign:"end"}:void 0,markers:[l?D("min"):void 0,c?D("max"):void 0].filter(e=>void 0!==e)}})({bar:n,height:e,isRtl:"rtl"===r}),l=n.color??UR(t,n.colorPalette,t.getDataColorSpecials().primary),c=n.labelColor??UR(t,n.labelColorPalette,"inherit");return fi.jsxs(GF,{"data-testid":"bar-container",role:"img","aria-label":n.label||n.fallbackLabel,title:n.label||n.fallbackLabel,dir:r,style:{height:e},children:[s.zeroAxis?fi.jsx(UF,{"data-testid":"bar-zero-axis",style:{...s.zeroAxis,backgroundColor:"#d0d0d0"}}):null,s.bar?fi.jsx(UF,{"data-testid":"bar",style:{...s.bar,backgroundColor:l}}):null,s.cap?fi.jsx(UF,{"data-testid":"bar-end-cap",style:{...s.cap,backgroundColor:l}}):null,s.label?fi.jsx(YF,{"data-testid":"bar-label",style:{...s.label,fontFamily:o,fontSize:i??"14px",textDecoration:a,lineHeight:`${e}px`,color:c},children:n.label}):null,s.markers.map(e=>fi.jsx(KF,{"data-testid":`bar-oob-${e.key}`,width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:e.style,children:fi.jsx("path",{d:XF(e),fill:l})},e.key))]})},ZF=e=>{e.stopPropagation()},QF=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:ZF,color:cL.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),ez=({href:e,text:t,interactions:n,color:r})=>fi.jsx(ku,{...QF({href:e,text:t,interactions:n,color:r}),children:t}),tz=Y();tz.use(U),tz.renderer.prio(["canvas"]);const nz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),rz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),oz=x((e,t)=>fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fi.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),fi.jsx("use",{fillRule:"evenodd"})]})),iz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),az=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),sz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),lz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M2 7.5h12v1H2z"})})),cz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),uz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),dz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),pz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),fz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),hz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),mz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),gz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),bz={m:fz,"ï":dz,R:x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:hz,T:mz,U:gz,P:uz,Q:sz,"è":x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":iz,"©":oz,"23F4":az,2013:pz,"&":cz,add:nz,"minus-2":lz,dot:rz},vz=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&bz[t];return o&&fi.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:fi.jsx(o,{style:{height:e}})})},yz=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),xz=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},Sz=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return CL(e.localPaletteColors[t].color??"").blend(CL(s.color??""),s.t)},wz=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:yz(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:xz(r,t,n)}))),r},Cz=(e,t,n,r)=>{const o=wz(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=Sz(e,a,t);break}r=i}return n})(o,t);return a},Ez=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!hk(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!hk(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},Iz=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=Ez(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!hk(t))return 0;let a=n&&hk(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},Dz=e=>"flex-start"===e?"flex-end":"flex-start",Mz=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=Iz(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return xz(o,n.limitPaletteColorIndex,r);const a=yz(n.limitRange,t);return Cz(o,a,n.limitRange,r)})(o,t,i,r),{paletteColors:s}=o.segments,l=i?.limitPaletteColorIndex||0,c=s[l]?.icon??"dot",{indicator:u}=e;let d=u?.position||"right";return"rtl"===n&&(d="right"===d?"left":"right"),{color:a,iconKey:c,position:d}},Az=({representation:e,cellValue:t,textStyle:n})=>{const r=qf(oO),o=qf(Zk),{text:i,indicator:a}=e,{showTextValues:s,applySegmentColors:l}=a??{},c=Mz(e,t,o,r),u={fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,textDecoration:n.textDecoration},d=parseInt(String(u.fontSize||JT),10),{iconKey:p,color:f,position:h}=c||{},m={display:"flex",paddingTop:2};return s?fi.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:l?f:n?.color},children:["left"===h&&vz({size:d,iconKey:p,color:f,pvStyle:m}),fi.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:n?.direction,...u},children:i}),"right"===h&&vz({size:d,iconKey:p,color:f,pvStyle:m})]}):(m.paddingTop=5,vz({size:d,iconKey:p,color:f,pvStyle:m}))},Lz=e=>!!e.target?.getAttribute("class")?.includes(vA),Rz=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},Pz=e=>null!==e.target?.closest("[data-prevent-selection]"),Tz=e=>"A"===e.target?.tagName,qz=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const kz=c({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),Oz=()=>h(kz),Nz=({children:e,selections:t})=>{const n=function(e){const t=qf(eO),n=qf(kh),r=e.isActive(),[o,i]=u(Rz,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const a=f(async()=>{if(!o.activeSelection)return;var t,r;1===o.activeSelection.clientSelectedCells.size&&(t=o.engineSelectedCells,(r=o.activeSelection).clientSelectedCells.forEach((e,n)=>{t?.has(n)&&(r.clientSelectedCells.delete(n),t.delete(n))}));const a=new Map([...o.engineSelectedCells??new Map,...o.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:a}}),await e.select({method:"selectPivotCells",params:[xk,Array.from(a,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){n.error({msg:"Failed to select pivot cells",payload:e}),i({type:"mouseup",payload:{engineSelectedCells:o.engineSelectedCells}})}},[o,e,n]);d(()=>{if(o.activeSelection)return document.addEventListener("mouseup",a),()=>{document.removeEventListener("mouseup",a)}},[a,o.activeSelection]);const s=f((e,t)=>n=>{const r=t(e);Lz(n)||Pz(n)||Tz(n)||!(e=>1===e.buttons)(n)||!r||i(qz({startIndex:e,getCellFromIndex:t,cell:r}))},[]),l=f(t=>async()=>{o.activeSelection&&(e.isActive()||await e.begin([xk]),i({type:"mouseover",payload:{index:t}}))},[o.activeSelection,e]),c=f((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);Lz(n)||Pz(n)||Tz(n)||!r||(i(qz({startIndex:e,getCellFromIndex:t,cell:r})),a())},[a]),p=f(e=>!(!o.engineSelectedCells?.size&&!o.activeSelection?.clientSelectedCells.size||!o.selectedField||e.selectionCellType===o.selectedField.selectionCellType&&("L"===e.selectionCellType?o.selectedField.index===e.x:o.selectedField.index===e.y)),[o.activeSelection?.clientSelectedCells.size,o.engineSelectedCells?.size,o.selectedField]),h=f(e=>!p(e)&&(o.engineSelectedCells?.has(e.ref.qElemNo)||!!o.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[p,o.activeSelection?.clientSelectedCells,o.engineSelectedCells]);return b(()=>({isSelected:h,isActive:r,isLocked:p,createMouseDownHandler:s,createMouseOverHandler:l,createPointerUpHandler:c}),[h,r,p,s,l,c])}(t);return fi.jsx(kz.Provider,{value:n,children:e})},_z=e=>"fill"===e.representation.imageSize,jz=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&_z(e)&&t&&(n="center"),e.representation.type!==gT.Image||_z(e)?n:e.representation.resolvedImagePosition?.vertical};function Fz(e,t){return t?e?[...new Set(`${e} ${t}`.split(/\s+/).filter(e=>e&&"none"!==e))].join(" "):t:e}var zz=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(zz||{});const Wz={brighter:.5,darker:.3,opacity:.03},$z=(e,{cell:t,styleService:n})=>{if(e===zz.Background||e===zz.Color){const n=t.expressionColor[e];if(n)return n}if(t.isNull)return n.dimensionNull[e];if(e===zz.FontWeight||e===zz.FontStyle){const n=t.expressionTextStyle?.[e];if(n)return n}return t.isPseudoDimension?e===zz.Background&&t.headerColor?.background?t.headerColor.background:e===zz.Color&&t.headerColor?.color?t.headerColor.color:n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},Hz=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=$z(zz.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?$z(zz.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${GR(i=o,Wz)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},Bz=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:$z(zz.Color,{cell:e,styleService:t}),Vz=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=$z(zz.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?QT:o},Gz=({cell:e,styleService:t})=>$z(zz.FontStyle,{cell:e,styleService:t}),Uz=({cell:e,styleService:t})=>{const n=$z(zz.TextDecoration,{cell:e,styleService:t});return e.isNull?n:Fz(n,e.expressionTextStyle?.textDecoration)},Yz=e=>e?"pointer":"default",Kz=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},Xz=(e,t)=>{if(!e.isLeftColumn||e.representation.type===gT.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},Jz=({cell:e,isLeftColumn:t,isCellSelected:n,isSticky:r=!0})=>{const o=qf(rO),i=qf(Nk),a=qf(Vq),{isActive:s}=Oz(),{dataModel:l}=nj();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const c=!a.active||s||!l,u=Bz({cell:e,styleService:o,isCellSelected:n}),d=s?.4:1,p=e.ref.qCanExpand?HO:$O;let f;f=e.ref.qCanExpand?t?l.expandLeft:l.expandTop:t?l.collapseLeft:l.collapseTop;const h=pj({isLeftColumn:t,isIndentModeEnabled:i,representation:e.representation});return fi.jsx(p,{opacity:d,color:u,"data-prevent-selection":!c||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:c?"default":"pointer",...r&&{position:"sticky",top:0},...Xz(e,o),...h&&{alignSelf:jz(e)}},onClick:c?void 0:Kz({cell:e,expandOrCollapse:f})})},Zz=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},Qz=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},eW=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},tW=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,isIndentModeEnabled:i,isMeasureCell:a})=>{const s=pj({isLeftColumn:r,isIndentModeEnabled:i,representation:e}),l=t?21:0,c=e.imageBox?.width??24;let u=`calc(100% - ${l}px)`,d=o.headerCellHeight;r&&s&&(u=c),(a||r)&&(d=o.contentCellHeight);let p=d;switch(r&&void 0!==n&&!i&&(p=d*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:u,maxHeight:p,...s?{width:u}:{}};case"fitWidth":return{width:u,maxHeight:p};case"fitHeight":return{height:p,maxWidth:u,...s?{width:u}:{}};case"fill":return{height:p,width:u};default:return{width:u,height:d}}},nW=e=>{if("alwaysFit"===e)return"contain"},rW=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),oW=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:Qz(e,n,r),height:Zz(e),objectFit:nW(e),objectPosition:eW(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),iW=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const e=qf($q),t=l(null),{promise:n,resolve:r}=b(()=>xq(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:f(()=>{r()},[r]),imageRef:t}})(),i=qf(Nk),{url:a,text:s,imageSize:c,resolvedImagePosition:u}=e,{overflow:p,...h}=t;return fi.jsx("img",{src:a,alt:s,style:{...oW({imageSize:c,resolvedImagePosition:u,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...h},onLoad:o,ref:r})},aW=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const s=qf(rO),l=qf(Nk),{resolvedImagePosition:c}=e;return fi.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...tW({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,isIndentModeEnabled:l,isLeftColumn:o,isMeasureCell:a})},children:fi.jsx(iW,{representation:e,textStyle:t,isMeasureCell:!0})})},sW=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},lW=(e,t,n)=>{let{textAlign:r}=t(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:r}=n.at(e.visibleMeasureInfoIndex)??{}),r?.auto||void 0===r?"left":r.align},cW={display:"flex",flexDirection:"row",alignItems:"center"},uW={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},dW=(e,t,n,r,o)=>t?{...uW,...o?e.measureValues:e.nullValues}:n?{...cW,color:e.totalValues.color,background:r??e.totalValues.background}:{...cW,color:e.measureValues.color,background:r??e.measureValues.background},pW=(e,t,n,r,o,i,a)=>{const{fontFamily:s,fontSize:l}=e.measureValues,c={...sq,...!n&&lq(e.grid.lineClamp),...t&&{color:t},fontFamily:s,fontSize:l,direction:n?"ltr":i};if(o){const t=n?e.measureValues:e.nullValues,{fontWeight:r,fontStyle:o,textDecoration:a}=t;return{...c,fontWeight:r,fontStyle:o,textDecoration:a,direction:n?"ltr":i}}if(r){const{fontWeight:t,fontStyle:r,textDecoration:o}=e.totalValues;return{...c,fontWeight:t,fontStyle:r,direction:n?"ltr":i,...a,textDecoration:Fz(o,a?.textDecoration)}}const{fontWeight:u,fontStyle:d,textDecoration:p}=e.measureValues;return{...c,fontWeight:void 0===u?QT:u,fontStyle:d,...a,textDecoration:Fz(p,a?.textDecoration)}},fW=As("div",{shouldForwardProp:e=>!["foregroundColor","fontWeight","fontStyle","textDecoration"].includes(e)})(({foregroundColor:e,fontWeight:t,fontStyle:n,textDecoration:r})=>({boxSizing:"border-box",width:"100%",paddingInline:8,paddingBlock:4,fontWeight:t,fontStyle:n,textDecoration:r,...e&&{color:e}})),hW=({cell:e,representation:t,color:n,expressionTextStyle:r,isTotalValueCell:o,cellHorizontalAlignment:i,isNumeric:a,displayText:s})=>{const l=qf(Zk),c=qf(oO),u=qf(rO),d=qf(Nk),p=t.type===gT.Image,f=t.type===gT.Indicator,h=pW(u,n,a,o,e.isNull,l,r);if(!d&&p&&!e.isNull||d&&p&&!e.isNull)return fi.jsx(aW,{isMeasureCell:!0,textStyle:h,representation:t,imageContainerHorizontalAlignment:i});if(t.type===gT.Bar&&t.bar&&!e.isNull){const{fontWeight:e,fontStyle:r,textDecoration:o}=h;return fi.jsx(fW,{"data-testid":"bar-cell-padding",foregroundColor:n,fontWeight:e,fontStyle:r,textDecoration:o,children:fi.jsx(JF,{height:Math.max(u.contentCellHeight-8-1,0),bar:t.bar,theme:c,direction:l,fontFamily:u.measureValues.fontFamily,fontSize:u.measureValues.fontSize})})}const m=gk(e.isNull?t.text:e.ref.qNum);return f&&hk(m)?fi.jsx(Az,{representation:{...t,text:s},cellValue:m,textStyle:h}):fi.jsx("span",{style:{padding:4,...h},children:s})},mW=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,gW="flex-start",bW=(e,t)=>e.isNull?gW:t.type===gT.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:gW,vW=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const o=qf(Th),i=qf(qh),a=qf(Qk),s=qf(Zk),l=qf(rO),c=qf(Kk),u=qf(Yk),d=qf(Hk),p=qf($k),h=qf(Wk),m=qf(kk),{attrExprInfoIndexes:g,gridSectionsData:{measureData:v,leftDimensionData:y,topDimensionData:x},visibleDimensionsInfo:{visibleTopDimensionInfo:S}}=nj(),w=(()=>{const e=qf(Nk),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=nj(),i=r.length,a=o.length;return f((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal),[n,t,i,a,e])})(),C=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=nj(),n=t.length;return f(t=>{const r=e.grid.at(n-1)?.[t];return _F(r,e.totalDividerIndex)},[e,n])})(),E=(()=>{const e=qf(Nk),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=nj(),r=n.length;return f(n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return _F(i,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:I}=r,D=x.grid.at(S.length-1),M=y.grid.at(-1),{background:A}=l.measureValues,L=v[t]?.[e],R=t===a.rowsOnCurrentPage-1,P=e===m.x-1,{handleClick:T}=jF(),q=p?mW(M,t):mW(D,e),k=L?g.measures[q]:void 0,O=i("TLV_2605_PIVOT_TEXT_STYLING"),N=b(()=>O&&L?q_(k,L.ref):void 0,[L,O,k]);if(!L)return fi.jsx(FF,{style:{...n,background:A},isLastRow:R,isLastColumn:P,showLastBorder:I,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const _=h[q],j=i("VNA-977-TABLE-BARS"),F=R_({cell:L.ref,representationProperties:_.representation,attrExprInfoIndex:g.measures[q],env:o,direction:s,conditionalColoring:_.conditionalColoring,measureMinMax:j?c[q]:void 0,enabledFeatures:{[gT.Image]:!0,[gT.Indicator]:!0,[gT.Bar]:j}}),z=!L.isNull&&w(e,t),W=L.isNull?d:F.text,$=L.isNull?""!==W&&void 0!==W&&!Number.isNaN(+W):mk(L.ref),H=L.isNull&&$?u[q]??W:W,B=P_(g.measures[q],L.ref),V=l.grid.lineClamp>1?$F:WF,G=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==gT.Image?sW(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(L,_,F,$,s),U={...dW(l,L.isNull,z,B.background,$),...uq(R,P,l.grid.border,s,I),...pq({bottomDivider:E(t),rightDivider:C(e),borderColor:l.grid.divider}),...aq,padding:"0px 4px",display:"flex",justifyContent:G};return fi.jsx("div",{className:gA,title:H,style:{...U,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,"data-pivot-section":"DATA","data-row-idx":t,"data-col-idx":e,tabIndex:-1,onClick:()=>{T("DATA",t,e)},children:fi.jsx(V,{width:HF(F),verticalAlign:bW(L,F),children:fi.jsx(hW,{cell:L,representation:F,isTotalValueCell:z,color:B.color,expressionTextStyle:N,cellHorizontalAlignment:G,isNumeric:$,displayText:H})})})};var yW=n.memo(vW,wF);const xW=(e,t)=>t.list[e]?.id??e.toString(),SW=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,wW=e=>({...iq,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),CW=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const l=qf(Qk),c=qf(Zk),u=qf(kk),{grid:{divider:d},contentCellHeight:p}=qf(rO),{dataModel:h,gridSectionsData:{measureData:m}}=nj(),b={...wW(c),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},v=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const n=qf(Qk),r=qf($q),o=qf(aO),i=qf(kk),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=nj(),u=s.columnCount,d=l.rowCount;return f(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=p,o.gridWidth=l-s+1,o.gridHeight=f-p+1;const h=o.gridWidth+u+(t.current===TT.None?0:CF),m=o.gridHeight+d+(e.current===TT.None?0:CF);let g=OF;m*h>1500&&(g=NF),g(a,i,c,n,o,e,t,r)},[o,i,a,c,e,t,n,u,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return jq(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,c]),0===u.x?null:fi.jsx(uF,{"data-section-id":"DATA_GRID",ref:e,style:b,columnCount:u.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:m},onItemsRendered:v,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:SW,direction:c,children:yW})};var EW=y(CW);const IW=x((e,t)=>fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fi.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),fi.jsx("use",{fillRule:"evenodd"})]})),DW=e=>{const[t,n]=Of(Tj);return jq(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},MW=()=>{const[e,t]=m(!1),{dataModel:n}=nj(),r=qf(Vq),{isAdjustingWidth:o,setIsAdjustingWidth:i}=DW([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||Lz(e)||o||t(!0)},isAdjustingWidth:o,setIsAdjustingWidth:i}};function AW(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===nq.Transparent?cL.WHITE:r,i=CL(e.grid.border),a=CL(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return CL(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const LW=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const s=qf(Zk),l=qf(Vq),c=qf(iO),{isActive:u}=Oz(),{dataModel:d}=nj(),p=qf(rO),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const h=AW(p,e);return fi.jsx(dO,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*uj,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},RW=As(hc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}})),PW=As("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),TW=As("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...oq,justifyContent:e??oq.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),qW=As("div")(()=>({...oq})),kW=As("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o})),OW=As(Ld)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),NW=As(kd,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),_W=As("span")({textOverflow:"ellipsis",overflow:"hidden"}),jW=As("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:lj,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),FW=As("span",{shouldForwardProp:e=>!["padding","alignSelf","isSticky"].includes(e)})(({padding:e,alignSelf:t,isSticky:n})=>({padding:e,alignSelf:t,...n&&{position:"sticky",top:0}}));let zW=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const WW=(e,t)=>({qExcludeList:t===zW.Expand,qPos:{qDimName:e,qElemNo:[]}}),$W=`${xk}/qExpansionState`,HW=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r,logToSentry:o})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:WW(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n,logToSentry:r})=>{const{index:o,expansionData:i}=t;try{let t,n=$W,r="Add";void 0===o?t=JSON.stringify([i]):-1===o?(n=`${$W}/-`,t=JSON.stringify(i)):(n=`${$W}/${o}`,r="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:r,qValue:t}],!0)}catch(e){r.error({msg:n,payload:e})}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`,logToSentry:o})},BW=({model:e,effectivePropertiesService:t,cell:n,logToSentry:r})=>{if(void 0===n.qEffectiveDimensionName)return;const o={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName,logToSentry:r};return{expandCallback:HW({...o,action:zW.Expand}),collapseCallback:HW({...o,action:zW.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},VW={[JO.Sorting]:!0,[JO.Selections]:!0,[JO.Searching]:!0},GW=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=l(null),f=qf(rO),h=qf(Fk),m=qf(zk),g=qf(Tk),b=qf(Hq),v=qf(Wq),y=qf(Vq),x=qf(Bq),S=qf(iO),w=qf(Xk),C=qf(kh),{fontSize:E,fontFamily:I,fontStyle:D,fontWeight:M,textDecoration:A,color:L,background:R,hoverBackground:P,activeBackground:T}=f.header,q=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:O}=a,{open:N,setOpen:_,handleOpenMenu:j,setIsAdjustingWidth:F}=MW(),z=qf(Zk),{handleClick:W}=jF(),$={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},H={embed:x,listboxRef:p,sortCriteria:h&&e.isDim?b.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},B={app:v,qStateName:g.qStateName},{labelTextAlign:V}=m(e.dimensionInfoIndex)??{},G=sW(V,"flex-start",z);return fi.jsxs(RW,{className:gA,title:e.label,interactions:y,background:N?e.headerColor?.headerMenuActiveBackground??T:e.headerColor?.background??R,hoverBackground:e.headerColor?.headerMenuHoverBackground??P,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...aq,...dq(e,o,n,r,f.grid.border,z),color:e.headerColor?.color??L},"data-testid":"title-cell",onClick:t=>{j(t),W("HEADER",0,e.colIdx)},"data-pivot-section":"HEADER","data-col-idx":e.colIdx,"data-row-idx":0,tabIndex:-1,children:[fi.jsxs(TW,{children:[k?fi.jsx(qW,{children:fi.jsx(IW,{height:12})}):null,fi.jsx(kW,{fontFamily:I,fontSize:E,fontStyle:D,fontWeight:M,textDecoration:A,justifyContent:G,children:fi.jsx("span",{style:{...sq,...lq(f.grid.columnLineClamp)},children:e.label})})]}),e.isDim?fi.jsxs(fi.Fragment,{children:[fi.jsx(eN,{headerData:e,translator:S,anchorRef:q,open:N,setOpen:_,interactions:y,menuAvailabilityFlags:VW,sortRelatedArgs:$,searchRelatedArgs:H,selectionRelatedArgs:B,expandOrCollapseArgs:BW({model:w,effectivePropertiesService:b,cell:e,logToSentry:C}),shouldShowMenuIcon:O,model:w&&"setActiveField"in w?w:void 0,direction:z,isAccessibleHeader:!0}),fi.jsx(PW,{ref:p,direction:z}),fi.jsx(PW,{ref:q,direction:z})]}):null,fi.jsx(LW,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:F,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},UW=({rowSpan:e,columnSpan:t})=>{const n=qf(rO),r=qf(Zk);return e>0&&t>0?fi.jsx("div",{style:{...iq,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},YW=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),KW=x((e,t)=>fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fi.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),fi.jsx("use",{fillRule:"evenodd"})]})),XW=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const r=qf(Zk),o=qf(rO),i=qf(Vq),a=qf(iO),{isActive:s}=Oz(),{dataModel:l}=nj(),{setIsAdjustingWidth:c}=DW([l]);if(!(!!i.active&&!s))return null;const u=AW(o,{isLeftColumn:!0});return fi.jsx(dO,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*uj))},confirmWidthCallback:r=>{if(r.type===xA.FitToContent)return void l.applyIndentModeColumnWidth({type:xA.Auto});const o=Math.min(r.pixels??t,e*uj);n(o),l.applyIndentModeColumnWidth({type:xA.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},JW=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),ZW=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),o=qf(Wq),i=qf(Vq),a=qf(Bq),s=qf(iO),c=qf(Xk),u=qf(kh),d=qf(Tk),p=qf(Hq),{open:f,setOpen:h,handleOpenMenu:m}=MW();return fi.jsxs(NW,{onClick:m,isActive:f,children:[fi.jsx(_W,{children:e.label}),fi.jsxs(jW,{className:"indent-mode-dropdown-more",visible:f,children:[fi.jsx(JW,{}),e.isDim?fi.jsxs(fi.Fragment,{children:[fi.jsx(eN,{headerData:e,translator:s,anchorRef:n,open:f,setOpen:h,interactions:i,menuAvailabilityFlags:VW,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:d.qStateName},expandOrCollapseArgs:BW({model:c,effectivePropertiesService:p,cell:e,logToSentry:u}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),fi.jsx(PW,{ref:r}),fi.jsx(PW,{ref:n})]}):null]})]})},QW=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===wk,i=e+1<n.length&&n[e+1]?.id===wk;return!(r&&o&&i)&&(t?.id!==wk&&e<n.length-1)},e$=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const i=qf(rO),a=qf(Vq),s=qf(iO),{dataModel:c,gridSectionsData:{headersData:u}}=nj(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=i,{color:g,background:b,hoverBackground:v,activeBackground:y,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=i.header,{isAdjustingWidth:I}=DW([c]),D=e=>{e.stopPropagation()},M={height:h,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return fi.jsxs(RW,{isDimension:!0,background:d?y:b,interactions:a,hoverBackground:v,style:{...M,...aq,color:g},onClick:e=>{!a.active||Lz(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[fi.jsxs(TW,{justifyContent:"flex-start",children:[fi.jsx(kW,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:fi.jsx("span",{style:sq,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?fi.jsx(KW,{}):fi.jsx(YW,{}),fi.jsx(PW,{ref:f})]}),fi.jsx(OW,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==wk&&fi.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:fi.jsx(ZW,{cell:n,changeSortOrder:t})}),QW({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&fi.jsx(gO,{"data-testid":"group-divider",variant:"middle"})])}),fi.jsx(XW,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},t$=({isIndentModeEnabled:e,headersData:t,topRowIndex:n})=>e&&t.size.x>1&&n+1===t.size.y,n$={display:"grid",width:"fit-content"},r$=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const l=qf(Nk),{gridSectionsData:{headersData:c,measureGroups:u}}=nj(),d=u.length>0,p=c.size.x-(d?0:1);return fi.jsxs("div",{"data-testid":"HEADER_GRID",style:{...n$,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:c.data.map(()=>`${r}px`).join(" "),height:a},children:[c.size.y>1&&fi.jsx(UW,{columnSpan:p,rowSpan:c.size.y-1}),c.data.map((a,u)=>{let d=[];if(t$({isIndentModeEnabled:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(fi.jsx(e$,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),f=l&&1===c.size.x;t.push(fi.jsx(GW,{style:{width:n[d],height:r,gridColumn:l&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var o$=y(r$);const i$=(e,t,n,r,o)=>{const i=qf(Tk);g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,i,o])},a$=(e,t)=>{jq(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},s$=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},l$=({cell:e,isLeftColumn:t,isIndentModeEnabled:n,visibleMeasureInfo:r,getDimensionInfo:o,direction:i,shouldSkipAlignment:a})=>{if(a)return;const s=e.representation,l=pj({isLeftColumn:t,isIndentModeEnabled:n,representation:s}),c=t?"flex-start":"center",u=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===gT.Image)return l&&u&&"center"!==u&&"rtl"===i?Dz(u):u??c;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:t}=r[e.visibleMeasureInfoIndex]??{};return sW(t,c,i)}const{textAlign:d}=o(e.dimensionInfoIndex)??{};return sW(d,c,i)},c$=()=>{},u$=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const d=qf(rO),p=qf(zk),f=qf(Wk),h=qf(Nk),m=qf(kk),g=qf(Vq),b=qf(Zk),{isLocked:v,createMouseDownHandler:y,createMouseOverHandler:x,createPointerUpHandler:S}=Oz(),{showLastBorder:w}=r,C=v(n)||n.isLockedByDimension,E=!(C||!g.active||!g.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),I=E?y(u,e=>s$(e,r)):void 0,D=E?x(u):void 0,M=E?S(u,e=>s$(e,r)):void 0,A=pj({isLeftColumn:s,isIndentModeEnabled:h,representation:n.representation}),{handleClick:L}=jF();return fi.jsx("div",{className:gA,title:g.passive?n.representation.text:void 0,style:{...t,...uq(i,a,d.grid.border,b,w),...pq({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...aq,padding:"rtl"===b?"0px 0px 0px 4px":"0px 4px",cursor:Yz(E),background:Hz({styleService:d,isCellSelected:l,cell:n,isCellLocked:C}),zIndex:s?void 0:m.x-n.x,justifyContent:l$({cell:n,isLeftColumn:s,isIndentModeEnabled:h,visibleMeasureInfo:f,getDimensionInfo:p,direction:b,shouldSkipAlignment:A}),display:"flex",...h&&s&&{["rtl"===b?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:lW(n,p,f)},"aria-hidden":"true",onMouseDown:I,onMouseOver:D,onPointerUp:M,onKeyUp:c$,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,"data-pivot-section":s?"LEFT":"TOP","data-row-idx":n.y,"data-col-idx":n.x,onClick:()=>{L(s?"LEFT":"TOP",n.y,n.x)},children:e})},d$=(e,t)=>e&&"center"!==e&&"rtl"===t?Dz(e):e,p$=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r,isSticky:o=!0})=>{const{imageBox:i}=t,{grid:{lineClamp:a}}=qf(rO),s=qf(Zk);return fi.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[fi.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:jz(e),alignItems:d$(r,s),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:fi.jsx(iW,{representation:t,textStyle:n})}),fi.jsx(FW,{padding:4/(a<=2?2:1),alignSelf:jz(e,!0),isSticky:o,children:!!t.labelStructure&&rW(t.labelStructure)})]})},f$=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,h$=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>fi.jsxs("span",{children:[fi.jsx(ku,{...QF({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&f$(n)]}),m$=({children:e,textStyle:t,shouldEnableStickyText:n})=>fi.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),g$=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,b$=({cell:e,isCellSelected:t,isLeftColumn:n,isSticky:r=!0})=>{const o=qf(Zk),{isActive:i}=Oz(),a=qf(Bk),s=qf(zk),l=qf(Wk),c=qf(Nk),u=qf(rO),d=qf(Vq),p=r&&n&&c;let f;if(f=e.isNull?a:n?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(e.isNull)return"-";if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text,e.isEmpty)return null;const h=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:o})=>({...sq,...lq(g$({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:o})),color:Bz({cell:e,styleService:t,isCellSelected:n}),fontWeight:Vz({cell:e,styleService:t}),fontStyle:Gz({cell:e,styleService:t}),textDecoration:Uz({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:u,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:c});if(e.representation.type===gT.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=n&&t&&t.suffix?p$:aW;return fi.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:h,isLeftColumn:n,isSticky:r,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:l$({cell:e,isLeftColumn:n,isIndentModeEnabled:c,visibleMeasureInfo:l,getDimensionInfo:s,direction:o})})}if(e.representation.type===gT.Link&&!i&&!e.isTotal&&!e.isNull){const t=n&&e.representation.labelStructure?h$:ez;f=fi.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:d,color:e.expressionColor.color})}return fi.jsx(m$,{shouldEnableStickyText:p,textStyle:{...h,...e.representation.type===gT.Image&&e.isNull?{alignSelf:jz(e)}:{}},children:f})},v$=({index:e,style:t,data:n})=>{const r=qf(rO),o=qf(Nk),{isSelected:i}=Oz(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=DW([n]),f=s$(e,n),h=a?e===l-1:c,m=a?c:e===l-1,g=_F(f,u,o);if(void 0===f){const{background:n}=r.dimensionValues;return fi.jsx(FF,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const b=i(f),v="number"==typeof t.height&&t.height<=r.contentCellHeight,y=!a||!v||r.grid.lineClamp>1,x={verticalAlign:jz(f),width:HF(f.representation),isLeftColumn:a},S=fi.jsxs(fi.Fragment,{children:[fi.jsx(Jz,{isLeftColumn:a,isCellSelected:b,cell:f,isSticky:y}),fi.jsx(b$,{isLeftColumn:a,isCellSelected:b,cell:f,isSticky:y})]});return fi.jsxs(u$,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:b,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[y?fi.jsx($F,{...x,right:f.isLeftColumn?void 0:4,children:S}):fi.jsx(WF,{...x,children:S}),fi.jsx(LW,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?LT.Measures:LT.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var y$=n.memo(v$,wF);const x$=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},S$=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},w$=(e,t)=>n=>{e.current&&(e.current[t]=n)},C$={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...iq},E$={overflow:"hidden",willChange:"auto",flexShrink:0},I$=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const i=qf(Qk),a=qf(Zk),s=qf(Nk),{contentCellHeight:l,grid:{divider:c}}=qf(rO),{qSize:u}=qf(Tk).qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=nj();a$(e,d),i$(e,t,n,l);const f=i.rowsOnCurrentPage*l,h={...C$,borderColor:c,width:r.reduce((e,t)=>e+t,0)};return fi.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,c)=>{const h=c===d.columnCount-1,m=jN(p[c]),{itemCount:g,estimatedItemSize:b,listValues:v}=S$(t,f,i.rowsOnCurrentPage,h),y=s?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,v,l,h,u.qcy);return fi.jsx(vF,{ref:w$(e,c),style:{...E$,flexGrow:h?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:y,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:o,listValues:v,totalDividerIndex:d.totalDividerIndex},itemKey:xW,estimatedItemSize:b,children:y$},m)})})};var D$=y(I$);const M$=({index:e,style:t,data:n})=>{const r=qf(rO),o=qf(Zk),{groups:i,showLastBorder:a}=n,s=i[e],l=e===i.length-1,{background:c,color:u,fontWeight:d,fontStyle:p,textDecoration:f}=r.measureLabels;return fi.jsx("div",{className:gA,"data-testid":"measure-group-header",style:{...t,...uq(!1,l,r.grid.border,o,a),...aq,padding:"rtl"===o?"0px 0px 0px 4px":"0px 4px",background:s.headerColor?.background??c,zIndex:i.length-s.start,display:"flex",justifyContent:"center"},title:s.label,"aria-hidden":"true","data-x":s.start,children:fi.jsx($F,{verticalAlign:"center",width:"fit-content",right:4,children:fi.jsx("span",{style:{...sq,...lq(r.grid.columnLineClamp),color:s.headerColor?.color??u,fontWeight:d,fontStyle:p,textDecoration:f,fontFamily:r.dimensionValues.fontFamily,fontSize:r.dimensionValues.fontSize,border:"4px solid transparent",boxSizing:"border-box"},children:s.label})})})};var A$=n.memo(M$,wF);const L$={overflow:"hidden",willChange:"auto"},R$=e=>({...iq,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),P$=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const a=qf(Zk),s=qf(zk),l=qf(Nk),c=qf(kk),{grid:{divider:u},headerCellHeight:d}=qf(rO),{gridSectionsData:{headersData:p,topDimensionData:f,measureGroups:h}}=nj(),m={...R$(a),borderColor:u,height:r};a$(e,f),i$(e,n,r,d,i);const g=c.x*i(),b=h.map(({start:e,span:t})=>{let n=0;for(let r=0;r<t;r+=1)n+=i(e+r);return n});return 0===f.rowCount?fi.jsx("div",{style:{width:n,height:r,...R$(a)}}):fi.jsxs("div",{style:m,"data-section-id":"TOP_GRID",children:[h.length>0?fi.jsx(vF,{ref:w$(e,f.rowCount),style:L$,height:t(),width:n,itemCount:h.length,itemSize:e=>b[e],layout:"horizontal",itemData:{groups:h,direction:a,showLastBorder:o},itemKey:e=>h[e].start,estimatedItemSize:b.reduce((e,t)=>e+t,0)/h.length,direction:a,children:A$},"measure-groups"):null,f.grid.map((r,u)=>{const d=u===f.rowCount-1,{itemCount:m,estimatedItemSize:b,listValues:v}=S$(r,g,c.x,d),y=(({isIndentModeEnabled:e,getDimensionInfo:t,headersData:n,topRowIndex:r})=>{const o=n.data.at(r);if(void 0===o)return;const i=n.size.x-1,a=t$({isIndentModeEnabled:e,headersData:n,topRowIndex:r})?0:i,s=o.at(a),l=Array.isArray(s)?s.at(i):s;return l?t(l.dimensionInfoIndex):void 0})({isIndentModeEnabled:l,getDimensionInfo:s,headersData:p,topRowIndex:u+(h.length>0?1:0)}),x=y?jN(y):`empty ${u}`;return fi.jsx(vF,{ref:w$(e,u),style:L$,height:t(),width:n,itemCount:m,itemSize:x$({list:r,listValues:v,isLastRow:d,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:d,itemCount:m,showLastBorder:o,listValues:v,totalDividerIndex:f.totalDividerIndex},itemKey:xW,estimatedItemSize:b,direction:a,children:y$},x)})]})};var T$=y(P$);const q$=()=>fi.jsx(k$,{}),k$=()=>{const{headerCellHeight:e,contentCellHeight:t}=qf(rO),n=Nj(),r=(()=>{const e=qf(Xk),t=qf(kh),n=f(async(n,r)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:o,dimensionInfoIndex:i,sortDirection:a}=n,s=[];if(r===a)return!1;s.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!o).toString()});try{return await e.applyPatches(s,!0),!0}catch(e){return t.error({msg:"Error while applying patch",payload:e}),!1}},[e,t]);return n})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:u},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:b},scrollToCoordCallBack:v}=Oj(),{leftGridWidth:y,leftGridFullWidth:x,leftGridColumnWidths:S,rightGridFullWidth:w,showLastRightBorder:C,getRightGridColumnWidth:E,getHeaderCellsIconsVisibilityStatus:I,overrideLeftGridWidth:D}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const r=qf(Nk),o=qf(rO),{gridSectionsData:{headersData:i}}=nj(),{measureText:a}=qq(o.header,{allowLineBreaks:!1}),s=Ej({tableWidth:e}),l=Ij({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=Math.min(s.leftGridFullWidth,e-l.rightGridWidth-1),u=c+l.rightGridFullWidth+1<e,p=f((e,t,n="")=>{let o=e;r&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+cj;return t&&d+lj<=l&&(u=!0,d+=lj),d+lj<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}},[s.leftGridColumnWidths,a,r,i.size.x]);return d(()=>{const e=c===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,c,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,leftGridWidth:c,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:p}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:b}),{gridScaffoldDimensions:M,headerGridDims:A,topGridDims:L,leftGridDims:R,dataGridDims:P,metadata:{everyThingFitsInTableRectHeight:T,scrollbarsVisibilityStatus:q}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=Nj(),l=qf(Qk),{gridSectionsData:{headersData:c,topDimensionData:u}}=nj(),d=Math.min(s.height*uj,Math.max(s.height*uj-25,s.height-t-a)),p=l.rowsOnCurrentPage*t,f=Math.max(c.size.y,u.rowCount,1),h=e*f,m=e*f,g=n,b=s.width-g,v=Math.min(d,h,m),{availableHeight:y,everyThingFitsInTableRectHeight:x,everyThingFitsInTableRectWidth:S}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+p+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(v,g,b),w=y-d,C=Math.max(w,y-v),E=Math.min(C,p),I=Math.min(C,p),D=h+1+p,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:A,hasDataGridOverflowX:L}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:g,rightSectionWidth:b},Y_AXIS:{topSectionHeight:v,bottomSectionHeight:C}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:m,bottomSectionFullHeight:D-m}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${g}px ${b}px`,gridTemplateRows:`${v}px ${C}px`},headerGridDims:{width:-1,height:v},topGridDims:{fullSizeWrapper:{width:o-i+(L?i:0),height:m},stickyWrapper:{width:b-1-i,height:-1},self:{width:Math.min(o,b-(S?1:0)-i),height:m}},leftGridDims:{fullSizeWrapper:{width:g,height:D-m+(!A&&L?a:0)},stickyWrapper:{width:g,height:C-1-a},self:{width:g,height:Math.max(t,E-(x?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(L?i:0),height:D-m+(!L&&A?a:0)},stickyWrapper:{width:b-1-i,height:C-1-a},self:{width:Math.min(o,b-(S?1:0)-i),height:Math.max(t,I-(x?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:x,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:y,leftGridOriginalWidth:x,rightGridOriginalWidth:w},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),k=f(()=>e,[e]),O=f(()=>t,[t]),N=qf(qh),_=kf(_N),j=kf(kN),F=N("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>F?(_({HEADER:o.current,TOP:i.current,LEFT:a.current,DATA:s.current}),j(()=>v),()=>{_({HEADER:null,TOP:null,LEFT:null,DATA:null}),j(()=>null)}):()=>{},[F,_,o,i,a,s,j,v]),(()=>{const e=qf($q);d(()=>{e.notifyIsDoneRendering()})})(),fi.jsxs(jj,{style:M,children:[fi.jsx("div",{style:{overflow:"hidden"},ref:o,children:fi.jsx(o$,{tableWidth:n.width,leftGridWidth:y,columnWidths:S,getHeaderCellsIconsVisibilityStatus:I,rowHight:e,height:A.height,changeSortOrder:r,overrideLeftGridWidth:D})}),fi.jsx(Wj,{style:q.topGrid,origin:PT.TopGrid,ref:i,children:fi.jsx(_j,{style:L.fullSizeWrapper,children:fi.jsx($j,{style:L.stickyWrapper,children:fi.jsx(T$,{topGridRef:l,rowHightCallback:k,...L.self,showLastBorder:{right:C,bottom:!1},getRightGridColumnWidth:E})})})}),fi.jsx(Wj,{style:q.leftGrid,origin:PT.LeftGrid,ref:a,children:fi.jsx(_j,{style:R.fullSizeWrapper,children:fi.jsx($j,{style:R.stickyWrapper,children:fi.jsx(D$,{leftGridRef:c,...R.self,columnWidths:S,showLastBorder:{right:!1,bottom:T}})})})}),fi.jsx(Wj,{style:q.dataGrid,origin:PT.DataGrid,ref:s,children:fi.jsx(_j,{style:P.fullSizeWrapper,children:fi.jsx($j,{style:P.stickyWrapper,children:fi.jsx(EW,{dataGridRef:u,rowHightCallback:O,...P.self,showLastBorder:{right:C,bottom:T},getRightGridColumnWidth:E,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},O$=As("div")({"& .sn-copy-cell:focus-visible":{outline:"none",boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"}}),N$=()=>{const e=qf(Gq),t=qf(oO),n=qf(Vq),r=qf(iO),o=qf(qh),i=qf(Qk),a=qf(eO),s=qf(nO),c=qf(Ok),u=qf(Tk),{handleKeyDown:p}=aj(),f=l(null),h=kf(_N),m=o("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>m?(h({WRAPPER:f.current}),()=>{h({WRAPPER:null})}):()=>{},[m,h]),fi.jsxs(O$,{ref:f,onKeyDown:m?p:void 0,children:[c?fi.jsx(q$,{}):null,fi.jsx(sj,{}),fi.jsx(LN,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{a({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:s,layout:u})]})};const _$=(e,t,r)=>{const o=function(e){const t=jp();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),us({...t,direction:e})}(r.get(Zk));e.render(fi.jsx(n.StrictMode,{children:fi.jsx(Mf,{store:r,children:fi.jsx(Rs,{theme:o,children:fi.jsx(Nz,{selections:t,children:fi.jsx(rj,{children:fi.jsx(N$,{})})})})})}))};var j$=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(j$||{}),F$=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(F$||{}),z$=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(z$||{}),W$=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(W$||{});const $$=e=>e?`${parseInt(e,10)}px`:void 0,H$=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?nq.Transparent:n}},B$=(e,t)=>+(parseInt(e,10)*tq*t+8).toFixed(2),V$=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?QT:"normal",G$=e=>e?.some(e=>"italic"===e)?"italic":"normal",U$=e=>e?.some(e=>"underline"===e)?"underline":"none",Y$=document.createElement("textarea");function K$(e){Y$.value=e,document.body.appendChild(Y$),Y$.select(),Y$.setSelectionRange(0,Y$.value.length),document.execCommand("copy"),document.body.removeChild(Y$)}Y$.style.position="absolute",Y$.style.left="-9999px",Y$.setAttribute("readonly","");function X$(e){O?.((t,n)=>{const r=n.target,o=r?.closest(`.${gA}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{K$(t)}):K$(t))})(o)}}),e?.forEach(e=>{e(t,n,o)})})}const J$=({model:e,layout:t,effectivePropertiesService:n,translator:r,env:o})=>{const i=A(()=>Ph(o,{tag:"sn-pivot-table"}),[o]);return Sq((o,a,s)=>{if(!e||n.qAlwaysFullyExpanded)return;const l=e,c=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:d}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(s,Pk(t));c.addItem(((e,t)=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(xk,0,0,!0),await e.expandLeft(xk,0,0,!0)}catch(e){t.error({msg:"Failed to expand all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:HW({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:zW.Expand,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i})),c.addItem(((e,t)=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(xk,0,0,!0),await e.collapseLeft(xk,0,0,!0)}catch(e){t.error({msg:"Failed to collapse all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:HW({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:zW.Collapse,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i}))},[e,t,n,i])},Z$=e=>A(()=>(({layout:e})=>{const t=Dk(e);return{getDimensionInfoIndex:Ak(e),size:Ck(e),hasPseudoDimOnLeft:Mk(e),isLeftDimension:e=>t.some(t=>t===e),visibleMeasureInfo:Ik(e),isIndentModeEnabled:Ek(e),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:xA.Auto,pixels:yA.PixelsDefault,percentage:yA.PercentageDefault}}})({layout:e}),[e]),Q$=({model:e,layout:t,viewService:n,pageInfo:r,rect:o})=>{const i=Lk(t),a=Rk(t),s=(e=>{const t=Cq(e);return t.current=e,t})(X_(o));return Lq(async()=>{const{qHyperCube:o}=t,{maxNumberOfVisibleRows:l,maxNumberOfVisibleColumns:c}=s.current;if(i)return t.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(a,n,l,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(t,r,l,c))){const o=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(eq,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(a,n,t.qHyperCube.qSize,r,l,c);return o?e.getHyperCubePivotData(xk,J_(o)):[]}return o.qPivotDataPages},[t,i,e,n,r.page,r.rowsPerPage,s,a])},eH=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),tH=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:eH({rowsPerPage:n,totalRowCount:e,page:t})}),nH=(e,t)=>{const{qSize:n}=e.qHyperCube,r=Ck(e),o=t.isDownloadedAsPDForImage||Lk(e),i=(e=>e.snapshotData?.content?.rowsPerPage)(e),[a,s]=P(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:Lk(e)?e.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:n.qcy>r.y&&!o,...tH(n.qcy,a,i)}}),l=n.qcy;T(()=>{s(e=>({...e,...tH(l,e.page,i),shouldShowPagination:l>r.y&&!o}))},[l,r.y,s,o,i]),T(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=eH({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]);return{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:eH({...a,...e})})}}},rH=15,oH=({layout:e,viewService:t,rect:n,model:r,pageInfo:o})=>{const{freeResize:i}=L();return N(async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-rH,0),c=Math.max(s+o-rH,s,0),u=eq-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=X_(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=J_(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(xk,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object={...i.snapshotData.object,size:{...i.snapshotData.object?.size,w:n.width,h:n.height}}}return i}),_(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)}),[t]),e.snapshotData?.content&&!i?{left:n.left,top:n.top,width:e.snapshotData.object.size.w,height:e.snapshotData.object.size.h}:n};var iH={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const aH=()=>{const e=j(),t=e.language();return A(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(iH).forEach(t=>{e.add(iH[t])})}(e)},[e]),{translator:e,language:t}},sH=e=>{const t=A(()=>Ef(),[]);t.set(Th,e);const n=F(),r=(e=>{const t=A(()=>Nq.createRoot(e),[e]);return T(()=>()=>{t.unmount()},[t]),t})(n),o=z(),i=W(),a=$(),s=H(),l=B(),c=(()=>{const{viewState:e}=L(),t=Cq(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=A(()=>xq(),[]),i=Sq(e=>{t.current.add(e)},[t]),a=Sq(OR(async()=>{await Promise.all(t.current),t.current.clear(),o()},1e3),[o,t]);return R(async()=>{await r},[r]),A(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i}),[a,n,e,i])})(),u=((e,t)=>{const[n]=Lq(async()=>{if(void 0===e||t.snapshotData||!("getEffectiveProperties"in e))return;const n=await e.getEffectiveProperties();return structuredClone(n)},[e,t]);return A(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(i,o),d=Z$(o),p=(e=>{const t=k();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(Lk(o)),f=V(),h=Aq(o,n),{translator:m,language:g}=aH(),{pageInfo:b,updatePageInfo:v}=nH(o,c),y=((e,t,n)=>A(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(b,o,c),x=oH({rect:G(),layout:o,viewService:y,model:i,pageInfo:b}),[S,w]=Q$({model:i,layout:o,viewService:y,pageInfo:b,rect:x}),C=A(()=>((e,t)=>{const n=t.components?.find(e=>"theme"===e.key),r=n?.header,o=n?.dimensionValues,i=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,c=n?.dimensionNullValues??l,u=n?.grid,d=(t,n,r)=>e.getStyle(t,n,r),p=+(u?.[j$.LineClamp]??d(F$.Grid,z$.Grid,W$.LineClamp)??1),f=+(u?.[j$.ColumnLineClamp]??d(F$.Grid,z$.Grid,W$.ColumnLineClamp)??1),h=H$(e,r?.[j$.Background])??d(F$.Dimension,z$.LabelName,W$.BackgroundColor)??nq.Transparent,m={header:{fontSize:$$(r?.[j$.FontSize])??d(F$.Dimension,z$.LabelName,W$.FontSize)??JT,fontFamily:r?.[j$.FontFamily]??d(F$.Dimension,z$.LabelName,W$.FontFamily)??ZT,fontWeight:V$(r?.[j$.FontStyle],QT),fontStyle:G$(r?.[j$.FontStyle]),textDecoration:U$(r?.[j$.FontStyle]),color:H$(e,r?.[j$.FontColor])??d(F$.Dimension,z$.LabelName,W$.FontColor)??cL.TEXT,background:h,hoverBackground:GR(h,SA),activeBackground:GR(h,wA)},dimensionValues:{fontSize:$$(o?.[j$.FontSize])??d(F$.Dimension,z$.LabelValue,W$.FontSize)??JT,fontFamily:o?.[j$.FontFamily]??d(F$.Dimension,z$.LabelValue,W$.FontFamily)??ZT,fontWeight:V$(o?.[j$.FontStyle],void 0),fontStyle:G$(o?.[j$.FontStyle]),textDecoration:U$(o?.[j$.FontStyle]),color:H$(e,o?.[j$.FontColor])??d(F$.Dimension,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,o?.[j$.Background])??d(F$.Dimension,z$.LabelValue,W$.BackgroundColor)??nq.Transparent},measureValues:{fontSize:$$(i?.[j$.FontSize])??d(F$.Measure,z$.LabelValue,W$.FontSize)??JT,fontFamily:i?.[j$.FontFamily]??d(F$.Measure,z$.LabelValue,W$.FontFamily)??ZT,fontWeight:V$(i?.[j$.FontStyle],"normal"),fontStyle:G$(i?.[j$.FontStyle]),textDecoration:U$(i?.[j$.FontStyle]),color:H$(e,i?.[j$.FontColor])??d(F$.Measure,z$.LabelValue,W$.FontColor)??nq.FontSecondary,background:H$(e,i?.[j$.Background])??d(F$.Measure,z$.LabelValue,W$.BackgroundColor)??nq.Transparent},measureLabels:{fontWeight:V$(a?.[j$.FontStyle],"normal"),fontStyle:G$(a?.[j$.FontStyle]),textDecoration:U$(a?.[j$.FontStyle]),color:H$(e,a?.[j$.FontColor])??d(F$.Measure,z$.LabelName,W$.FontColor)??nq.FontSecondary,background:H$(e,a?.[j$.Background])??d(F$.Measure,z$.LabelName,W$.BackgroundColor)??nq.Transparent},totalValues:{fontWeight:V$(s?.[j$.FontStyle],QT),fontStyle:G$(s?.[j$.FontStyle]),textDecoration:U$(s?.[j$.FontStyle]),color:H$(e,s?.[j$.FontColor])??d(F$.Total,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,s?.[j$.Background])??d(F$.Total,z$.LabelValue,W$.BackgroundColor)??nq.Transparent},dimensionNull:{fontWeight:V$(c?.[j$.FontStyle],"normal"),fontStyle:G$(c?.[j$.FontStyle]),textDecoration:U$(c?.[j$.FontStyle]),color:H$(e,c?.[j$.FontColor])??d(F$.Null,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,c?.[j$.Background])??d(F$.Null,z$.LabelValue,W$.BackgroundColor)??nq.NullValueBackground},nullValues:{fontWeight:V$(l?.[j$.FontStyle],"normal"),fontStyle:G$(l?.[j$.FontStyle]),textDecoration:U$(l?.[j$.FontStyle]),color:H$(e,l?.[j$.FontColor])??d(F$.Null,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,l?.[j$.Background])??d(F$.Null,z$.LabelValue,W$.BackgroundColor)??nq.NullValueBackground},grid:{columnLineClamp:f,lineClamp:p,border:H$(e,u?.[j$.Border])??d(F$.Grid,z$.Grid,W$.BorderColor)??nq.DividerLight,divider:H$(e,u?.[j$.Divider])??d(F$.Grid,z$.Divider,W$.BorderColor)??nq.DividerDark,background:H$(e,u?.[j$.Background])??d(F$.Grid,z$.Grid,W$.BackgroundColor)??nq.Transparent},selectedColors:VR(e)};return m.headerCellHeight=Math.max(B$(m.header.fontSize,f),B$(m.dimensionValues.fontSize,f),32),m.contentCellHeight=Math.max(B$(m.measureValues.fontSize,p),B$(m.dimensionValues.fontSize,p),24),m.dimensionValueTextHeight=B$(m.dimensionValues.fontSize,1),m})(h,o),[h,o]),E=((e,t,n)=>{const[,r,o]=Lq(async()=>{const t=ML(),n=e.getStyle("","","fontFamily"),r=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),i=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...i,n,r,o,_q].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(h,o,e),I=L();X$([J$({model:i,layout:o,effectivePropertiesService:u,translator:m,env:e})]),T(()=>{!w&&i&&!!S&&E&&(t.set(sO,{rect:x,pageInfo:b,qPivotDataPages:S,updatePageInfo:v,options:I,app:a,layout:o,model:i,embed:s,theme:h,keyboard:l,translator:m,interactions:p,env:e,viewService:y,layoutService:d,downloadService:c,styleService:C,effectivePropertiesService:u}),_$(r,f,t))},[o,i,a,x,p,f,y,d,c,w,S,C,r,E,m,g,b,v,u,s,l,h,e,I,t])},lH={version:"7.68.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},cH=()=>({...lH,qHyperCubeDef:{...lH.qHyperCubeDef,qIndentMode:!1}})}}});
90
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-b+1)%l)&&y<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},HR({exports:{}});const BR=(e,t=cL.TEXT,n=cL.WHITE)=>{const r=CL(e??""),o=CL(t),i=CL(n);return r.isInvalid()?t:function(e,t,n){const r=EL(e,t),o=EL(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},VR=e=>{const t=e.getStyle("","","dataColors.selected")||cL.SELECTED,n=function(e,t){const n=CL(IL),r=CL(e),o=CL(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=EL(n,r),a=EL(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?IL:"#000000"}(t,cL.TEXT);return{background:t,color:n}},GR=(e,t)=>{const n=CL(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},UR=(e,t,n)=>{const r=t?e.getColorPickerColor(t):"none";return"none"===r?n:r},YR=e=>{const t=CL(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},KR=e=>{e.stopPropagation(),e.preventDefault()},XR=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},JR=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,ZR=e=>{const{currentTarget:t}=e,n=JR(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},QR=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===bA.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},eP=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},tP=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===bA.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&XR(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&XR(e)}},nP=(e,t)=>{const{key:n}=e;switch(n){case bA.Tab:e.shiftKey?((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return;const o=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],i=o?.getElementsByClassName("exploration-item-focus").length??0;if(i>0){const t=o?.getElementsByClassName("exploration-draggable-icon")[i-1];t&&(KR(e),XR(t))}})(e,t):(KR(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];if(!o){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&XR(e))}XR(o)})(e,t));break;case bA.Down:if(eP(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a+1<o?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],i&&XR(i)})(e,t);break;case bA.Up:if(eP(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[o-1],i&&XR(i)})(e,t);break;case bA.Enter:case bA.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},rP=({children:e})=>fi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),oP=({children:e,sectionIndex:t})=>{const r=qf(void 0!==t?FA(t):oL),o=kf(void 0!==t?zA(t):iL),i=n.useRef(null),a={ref:i,toggleAllCheckboxes:o,checkState:r,sectionIndex:t};return fi.jsxs(hc,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{nP(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}},children:[fi.jsx(zc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{o(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),fi.jsx(rP,{children:e})]})},iP=({sectionIndex:e})=>{const t=qf(NA(e));return fi.jsx(oP,{sectionIndex:e,children:t})},aP=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),sP=As("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),lP=As(aP)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}})),cP=e=>{const t=e.key===bA.Down?(e=>{const{currentTarget:t,key:n}=e,r=JR(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=QR(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):ZR(e);t&&XR(t)},uP=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&XR(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void XR(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},dP=(e,t)=>{const{key:n}=e;switch(n){case bA.Tab:if(e.shiftKey)KR(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&XR(e))}const n=ZR(e);n&&XR(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void XR(t);const r=ZR(e);r&&XR(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return XR(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&XR(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&XR(n),!0}const o=QR(n,r);if(!o)return!1;XR(o)}return!0})(e,t);n?KR(e):e.stopPropagation()}break;case bA.Down:case bA.Up:if(eP(e))break;KR(e),cP(e);break;case bA.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}KR(e),uP(e,t);break;case bA.Space:KR(e),uP(e,t)}},pP=({children:e})=>fi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),fP=({title:e,dragHandleRef:t,...r})=>{const[o,i]=Of(um),a=qf(yh),s=n.useRef(null),l=n.useRef(null),c=n.useRef(null),u={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),fi.jsxs(hc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(r.id)},onKeyDown:e=>{dP(e,u)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}},children:[fi.jsxs(hc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{dP(e,u)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${VA} inset`}},children:[fi.jsx(zc,{checked:-1!==r.id&&o.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),fi.jsx(pP,{children:e})]}),fi.jsx(lP,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{dP(e,u)}})]})},hP=e=>{const t=qf(OA(e))??"";return fi.jsx(fP,{title:t,...e})},mP=()=>{const e=qf(_A),t=qf(jA),n=qf(XA),r=kf(WA);return fi.jsx(fA,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:ZA,headerRenderer:iP,itemRenderer:hP})},gP=({itemIndex:e})=>{const t=qf(tL(e));return fi.jsx(JA,{children:t})},bP=()=>{const e=qf(yh);return fi.jsx(oP,{children:e("Common.Values")})},vP=e=>{const{itemIndex:t}=e,n=qf(tL(t));return fi.jsx(fP,{title:n,...e})},yP=()=>{const e=qf(nL),t=qf(rL),n=qf(KA),r=kf(aL);return fi.jsx(hc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:fi.jsx(fA,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:gP,headerRenderer:bP,itemRenderer:vP})})},xP=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),SP=()=>{const[e,t]=Of(xh),r=qf(yh),o=n.useRef(null),[i]=qf(rL),[a=0,s=0]=qf(jA),l=f(e=>{t(e.target.value)},[t]),c=0===e.length||0===a&&0===s&&0===i?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return fi.jsxs(hc,{ref:o,onKeyDown:e=>{tP(e,o)},style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[fi.jsx(sP,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:c}),fi.jsx(Jd,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:fi.jsx(Mu,{position:"start",children:fi.jsx(xP,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},wP=e=>{const t=jp();return fi.jsx(Rs,{theme:t,children:fi.jsx(Mf,{children:fi.jsx(dm,{props:e,children:fi.jsxs(hc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[fi.jsx(SP,{}),fi.jsx(mP,{}),fi.jsx(yP,{})]})})})})},CP=()=>({component:wP,classification:{tags:["exploration"],exclusive:!0}});var EP=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(EP||{}),IP=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(IP||{}),DP=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(DP||{}),MP=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(MP||{});const AP=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,LP=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case DP.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case EP.BEGINNING_OF_WORD:t="*^",n="*";break;case EP.ENDS_WITH:t="*";break;case EP.STARTS_WITH:n="*";break;case EP.MATCHES_EXACTLY:break;case EP.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case DP.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===IP.GENERAL,r=t?.modifier?.type===MP.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${AP(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${AP(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${AP(t.firstValue?.field)})`):(i=`${AP(e.field)}`,a=`${t.firstValue?.aggregator}(total ${AP(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let c="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${AP(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${AP(t.secondValue?.field)})`,a=` and ${i}`),c=`${a}${o[1]}${e}`}return`"${l}${c}"`})(e);break;case DP.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case DP.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},RP=[];for(let e=0;e<256;++e)RP.push((e+256).toString(16).slice(1));const PP=new Uint8Array(16);function TP(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(PP);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(RP[e[t+0]]+RP[e[t+1]]+RP[e[t+2]]+RP[e[t+3]]+"-"+RP[e[t+4]]+RP[e[t+5]]+"-"+RP[e[t+6]]+RP[e[t+7]]+"-"+RP[e[t+8]]+RP[e[t+9]]+"-"+RP[e[t+10]]+RP[e[t+11]]+RP[e[t+12]]+RP[e[t+13]]+RP[e[t+14]]+RP[e[t+15]]).toLowerCase()}(t)}(e)}const qP=()=>crypto?.randomUUID?.()??TP(),kP=1e3,OP=1e3,NP=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),o=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const i=[...o].sort((e,t)=>e-t);for(let e=0;e<i.length;e++)if(i[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},_P=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},jP=e=>{if(!e)return;NP(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const o=n[r],i=n.indexOf(r),a=n[i];_P(n,r,i),_P(e,r,i),_P(t,t.indexOf(o),t.indexOf(a))}})(t,n)},FP=M;class zP extends FP{#c;#u;#d;constructor(e,t){super(e),this.path=e.path,this.#c=t.translator,this.#u=t.flags.isEnabled,this.#d=Ph(t,{tag:["sn-pivot-table","PivotHyperCubeHandler"]})}async#p(e,t,n,r,o=!1){if(!e||this.#f(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=qP()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,o=!1)=>{const i=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return o||await e.autoSortDimension(t),jP(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:o,qNoOfLeftDims:i}=e,a=t.length,s=o.indexOf(-1),l=-1!==s,c=void 0!==r?r+(i||0):void 0;if(l&&void 0!==c&&s>=c?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,o,s):o.push(a),void 0===r)t.push(n);else if(void 0!==c){const e=l&&c>s?c-1:c;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const o=e.qNoOfLeftDims,{qInterColumnSortOrder:i}=e,a=t.length,s=i.indexOf(-1),l=-1!==s&&o>0&&s<o;if(i.push(a),l)void 0===r?t.splice(o-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),i.splice(s,1),i.splice(s+1,0,-1));else{const e=r??o;t.splice(e,0,n),-1!==s&&(i.splice(s,1),i.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n,o);return this.#h({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#p(e,t,n,r)}async addDimensions(e,t,n){const r=[];for(const o of e){const e=await this.addDimension(o,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#f(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let o=n;return o=void 0===o?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+o:Math.min(o,this.hcProperties.excludedNoOfLeftDims),r.splice(o,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#h({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const o=this.createFieldDimension(e,t,n);return this.addDimension(o,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=qP());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),o=this.getAlternativeDimensions();if(r.length>=kP)return Promise.resolve();const i="number"==typeof t?t:o.length;return o.splice(i,0,e),this.#h({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#m({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),o=this.properties.qHyperCubeDef.qNoOfLeftDims,i=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof i&&"number"==typeof o&&i+1<=o&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),jP(this.hcProperties),this.#m({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#f(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#g(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,o=n.splice(r,0,e);return this.#b({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),o}async addMeasure(e,t,n,r){if(this.#g(e))return;if(e.qDef.cId||(e.qDef.cId=qP()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const o=this.getMeasures();if(o.length<this.maxMeasures()){const t=1===o.length;return void 0!==n&&n>=0?o.splice(n,0,e):o.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#b({cId:e.qDef.cId,addLast:void 0===n}),e))}return o.length<OP?(this.getAlternativeMeasures().push(e),this.#b({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),o=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=qP()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===o.indexOf(-1)&&o.push(-1)}this.#b({cId:e.qDef.cId})}else n.length<OP&&(t=r.length,r.splice(t,0,e),this.#b({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#m({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,o,i;if("number"==typeof e&&e<n.length){r=2===n.length,o=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(i=t.indexOf(-1),t.splice(i,1),this.hcProperties.qNoOfLeftDims&&i+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(o=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(o)return this.#m({cId:o.qDef.cId,section:"measures"}),o}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#g(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#v("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#v("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#x(e){return[...this.#y(e)]}#S(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#w(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#C(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#v(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#E())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#E(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#I(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#E())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#D(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#v(e),o=this.getDimensions(),i=r.map(e=>-1===e?-1:o[e]);switch(e){case"rows":return i.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return i.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return this.#d.warn({msg:"Corrupt ranked list detected: duplicate ids",payload:{duplicates:r,section:e,chartId:n}}),!0}const r=this.#D(e);if(t.length!==r.length)return this.#d.warn({msg:"Corrupt ranked list detected: length mismatch",payload:{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}}),!0;const o=r.filter(e=>!t.includes(e));if(o.length>0)return this.#d.warn({msg:"Corrupt ranked list detected: missing ids",payload:{missingIds:o,section:e,chartId:n}}),!0;const i=this.#D(e,!1),a=t.filter(e=>i.includes(e)),s=i.filter((e,t)=>e!==a[t]);return s.length>0&&(this.#d.warn({msg:"Corrupt ranked list detected: main field order mismatch",payload:{section:e,chartId:n,orderMismatchIds:s}}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#M({section:e});case"measures":return this.#A();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#M({section:e}){const t=this.getDimensions(),n=this.#v(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),o=n.map(e=>-1===e?-1:t[e].qDef.cId);return o.push(...r.map(e=>e.qDef.cId)),this.#S(e,o)}#A(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#u("SUPPORT-9810-MISSING-MEASURES")&&!this.#u("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#S("measures",e)}#L({section:e,cId:t,fields:n,addLast:r}){const o=this.#y(e),i=n.findIndex(e=>e.qDef.cId===t),a=n[i+1]?.qDef.cId,s=n[i-1]?.qDef.cId;if(r)o.push(t);else if(i>=0)if(a){const e=o.indexOf(a);o.splice(e,0,t)}else if(s){const e=o.indexOf(s);o.splice(e+1,0,t)}else o.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#h({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#M({section:e});let o;return o="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#L({section:e,cId:t,fields:o,addLast:r})}#b({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#A();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#R(),this.#L({section:"measures",cId:e,fields:r,addLast:n})}#R(){const e=this.#y("rows"),t=this.#y("columns");this.#I("rows")&&!e.includes(-1)?e.push(-1):this.#I("columns")&&!t.includes(-1)&&t.push(-1)}#P(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#m({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#P())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t);if(void 0===o)return;const i=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===i);this.addAlternativeMeasures(o,-1===a?void 0:a),this.#S("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t,!0);if(void 0===o)return;const i=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>i.includes(e)),s=i.findIndex(e=>e===a);await this.addMeasure(o,!1,-1===s?void 0:s,!0),this.#S("measures",n)}async moveDimensionToAlternative(e){const t=this.#w(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!1,i);if(void 0===a)return;const s=r.slice(o+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,i,l)&&this.#S(t,r)}async moveDimensionFromAlternative(e){const t=this.#w(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!0,i);if(void 0===a)return;const s=this.#D(t,!1),l=r.slice(o+1).find(e=>s.includes(e));let c=s.findIndex(e=>e===l);c=-1===c?void 0:c;void 0!==await this.#p(a,i,c,!1,!0)&&this.#S(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#w(-1);if(null===n)return void this.#d.error({msg:"Cannot move pseudo dimension, unable to find it in any section",payload:{toIndex:e,toSection:t}});const r="columns"===t,o=n===t,i=this.#x(t);if(o){const e=i.indexOf(-1);i.splice(e,1)}else{const o=this.#y(n),i=o.indexOf(-1);if(-1===i)return void this.#d.error({msg:"Couldn't delete pseudo dimension from current section",payload:{toIndex:e,toSection:t,fromSection:n}});o.splice(i,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-i.slice(0,e).filter(e=>this.#C(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),i.splice(e,0,-1),this.#S(t,i)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#w(e),o=this.#C(e);if(null===r)return void this.#d.error({msg:"Cannot move dimension, unable to find it in any section",payload:{cId:e}});const i=(o?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===i)return void this.#d.error({msg:"Couldn't find dimension to move",payload:{cId:e,toIndex:t,toSection:n}});const a=this.#x(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&this.#d.warn({msg:"[moveDimension] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:l}});const c=l-a.slice(0,l).filter(e=>this.#C(e)!==o).length,u="columns"===n,d="columns"===r,p=await this.removeDimension(i,o,d);if(void 0===p)return;void 0!==await this.#p(p,u,c,o,!0)&&(a.splice(l,0,e),this.#S(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#C(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void this.#d.error({msg:"Cannot move measure, unable to find it in any section",payload:{cId:e}});const o=this.#x("measures"),i=o.indexOf(e);-1!==i&&o.splice(i,1);const a=Math.max(0,Math.min(t,o.length));a!==t&&this.#d.warn({msg:"[moveMeasure] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:a}});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-o.slice(0,a).filter(e=>this.#C(e)!==n).length;void 0!==await this.addMeasure(s,n,l,!0)&&(o.splice(a,0,e),this.#S("measures",o))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return!1}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:qP(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=LP(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#T(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=LP(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#T(e);return n}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var WP,$P={exports:{}};var HP=(WP||(WP=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>Pe});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},i=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(u(r[0],o),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],o),p=u(r[1],o),f=h(0),m=h(1),g=v(d,f),b=v(p,m);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});o&&t!==o.qDef.qLabel&&(r=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(i,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},M=Array.isArray;function A(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function L(e){return void 0===e}function R(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function P(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=L(e[n||t])?i:e[t],e=e[n||t]}}),e}function T(e,t){var n=!0;if(A(e)&&A(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){T(e[r],t[r])||(n=!1)}),n);if(M(e)&&M(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(o){var i=function(e){return e?I({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);T(i,a)||R(t,o)||(L(a)?r.push({op:"add",path:s,value:i}):A(i)&&A(a)?r=r.concat(D.generate(a,i,s)):M(i)&&M(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&L(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(T(t,o))return r;if(!L(t[0])&&L(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(D.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))}),Object.keys(e).forEach(function(o){L(t[o])&&!R(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,o=P(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(M(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(M(a)&&M(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(A(a)&&A(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!R(n,e)&&delete n[e]}),I(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var u=P(e,t.from);M(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(M(o)?o.splice(+i,1):delete o[i])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const q=D,k=function(e,n,r){if(!e)return Promise.resolve();var o=q.generate(n,r);return t()(!0,n,r),o&&o.length?(o=o.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function N(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function _(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,u,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:o})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=N(t,e);return i&&!i.disabled}};return n}};var z="movingAverage";function W(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var b=t;if(w.needDimension({modifier:r,properties:o,layout:a})){var v=w.getDimComp(u,1),y=w.getDimComp(u,0),x=w.getAggrComp(b,v,y);b=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return b},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=W(t,e);return i&&!i.disabled}};return n}};var V="timeSeriesDecomposition";function G(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function U(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var o=r.steps;r.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;var i=G(t,e);return i&&!i.disabled}};return n}};var X="difference";function J(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),p="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:o})){var f=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return n}};var te="normalization";function ne(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach(function(t){void 0===e[t]&&(e[t]=ie[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,i),i}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=ne(t,e);return i&&!i.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,me)?me:he},getLibraryId:function(e){return i(e,me)||i(e,he)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var be="qDef.qDef",ve="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Me={initBase:function(e,t){(t||Me.isValid(e))&&(n(e,ve,i(e,be)),n(e,xe,i(e,ye)),n(e,Ce,i(e,Se)),n(e,Ee,i(e,we)))},restoreBase:function(e){Me.isValid(e)&&(n(e,be,i(e,ve)),n(e,ye,i(e,xe)),n(e,Se,i(e,Ce)),n(e,we,i(e,Ee)),i(e,Ie)&&i(e,De)&&n(e,Ie,i(e,De)),delete e.qDef.base)},isValid:function(e){var t=i(e,ve),n=i(e,xe);return void 0!==t||void 0!==n}};const Ae=Me;function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}var Re={accumulation:F,movingAverage:B,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Pe={modifiers:Re,apply:qe,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:Ne,getActiveModifier:_e,initBase:Ae.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Re[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Re[e]&&Re[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Ze({modifiers:t,properties:n,layout:r}))}),o&&!i},ifEnableTotalsFunction:je};var Te={};function qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;Te[n.id]=Te[n.id]||{isFirstTime:!0};var c=Te[n.id].isFirstTime;if(Te[n.id].isFirstTime=!1,r&&"object"===Le(r))return ke({model:n,properties:r});var u=n?n.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=Te[n.id].lastReloadTime;if(Te[n.id].lastReloadTime=i(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:u,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var o=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:o,model:n}).then(function(o){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Le(e)&&!e.disabled){if(n++,"object"!==Le(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Re[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),ke({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Le(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,o=Qe(r);return et({model:n,libraryIds:o}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Oe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function ke(e){var n=e.model,r=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},o):o),$e(o);var p=Qe(o);return et({model:n,libraryIds:p,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Oe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:o,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then(function(o){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Ae.isValid(n)||Ae.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Le(e)&&!e.disabled){if(s++,"object"!==Le(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Re[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Re[r.type].generateExpression({expression:s,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Re[r.type].updateModifier&&Re[r.type].updateModifier(r,o.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Re[r.type].generateExpression({expression:a,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:o,dimensionAndFieldList:e}),He(n)):Oe(n)})})})}({measures:a,properties:o,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:o,model:n}):Promise.resolve(!1)})})}function Oe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Le(e)&&!e.disabled&&!Re[e.type]})}(e)?Ae.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Re[r.type]&&!r.disabled)return r}}function je(e){var t=_e(e);return!t||Re[t.type].enableTotalsFunction(e)}function Fe(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=_e(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Ae.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Le(t)&&(t.disabled||!Re[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function Ve(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Ve(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Le(e)||e.disabled||!Re[e.type])&&(void 0===o[e.type]&&(o[e.type]=Re[e.type].isApplicable({properties:n,layout:r})),o[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then(function(e){o.dimensionList=e});r.push(i);var a=t.app.getFieldList().then(function(e){o.fieldList=e});return r.push(a),Promise.all(r).then(function(){return o})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),i.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):k(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return o}):Promise.resolve(o)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Le(e)&&!e.disabled&&Re[e.type]&&Re[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],o=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var i=Ve(t);i&&n.push(i),o=o||Ze({modifiers:r,properties:e})}}),i(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=i(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=i(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach(function(e){o[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:i}),Object.keys(r).forEach(function(e){o[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return qe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Te[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),o=Math.floor(n/62);return o>0?t(o)+r:r}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(r,{default:()=>$e});const i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},b=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},y=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.getValue(e,t);if(!i.isAtomicValue(s))try{if((o=(o=(r=JSON.stringify(s)).match(/:\{/g))?o.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var l=i.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const L=function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},R=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},P=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},T=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},q=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},k=function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},O=function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=E(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,o.dimensions.length,D),l=I(a.min,o.dimensions.length,0);return{maxDimensions:I(i.max,s,D),minDimensions:I(i.min,l,0),maxMeasures:s,minMeasures:l}},_=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]}),null===(o=w()(!0,{},n,o)).components&&(o.components=[]),o},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return M(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return A(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function B(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){i.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const V={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:o,qHyperCubeDef:l}),m({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,b({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:o,properties:a}),r||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters",!0),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:c}),b=i.getValue(r,c||"").qHyperCubeDef,v=i.getValue(g,c||"").qHyperCubeDef,y=N({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,w=y.maxMeasures,C=y.minMeasures,E=l.defaultDimension,I=void 0===E?T():E,D=l.defaultMeasure,M=void 0===D?q():D;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:v}),k({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:I}),O({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:v,defaultMeasure:M}),W({newProperties:g,dataDefinition:a,hypercubePath:c}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),_({exportFormat:t,newHyperCubeDef:v}),R("qMaxStackedCells",b,v),R("qNoOfLeftDims",b,v),P("qInitialDataFetch",b,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),P("qMode",b,v,"S"),P("qReductionMode",b,v,"N"),P("qSortbyYValue",b,v),P("qIndentMode",b,v),P("qShowTotalsAbove",b,v),L(g,t,r),m.qProperty=g;var A=i.getValue(u||{},"support.modifiers");return H({measures:v.qMeasures,modifierTypes:A}),p&&B(m.qProperty,"storedFilters"),"S"===v.qMode&&h&&B(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var o=u(e,r,n),i=u(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(U(a,t,r,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(r,o);var l=r[r.length-1];if(l){var c=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),u=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":o=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),i&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var o=t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(ne(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&ie.useMasterNumberFormat(i.formatting)}i.auto=!1,i.mode=a}function se(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=oe("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},de=function(e,t){var n,r=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(n={auto:o,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:o,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=oe("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},he=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n},be={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=V.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=V.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),h=i.getValue(d,"color.mode",""),m=i.getValue(d,"color.auto",""),g=ce(d,p),b=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:b,properties:d})&&he(d):me(d),b&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),u}};var ve=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):B(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(r)&&t[o].type[r]++,t[o].type.total++}}),t}(a);l.length?(i&&(t=l.filter(function(e){return e.type[i]>0}).sort(function(e,t){return t.type[i]-e.type[i]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=be.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=be.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return ye({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=Ce(n,r,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(n,r,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Me="conditionalColoring",Ae="measures",Le="qDef.conditionalColoring";const Re={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Me,arrayName:Ae,itemPath:Le})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Le,arrayName:Ae,quarantineName:Me})}};var Pe="qHyperCubeDef.qMeasures",Te="measures",qe="qHyperCubeDef.qDimensions",ke="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:Te,itemPath:Fe}),Ee({properties:e,arrayPath:qe,quarantineName:ze,arrayName:ke,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:Te,itemPath:Fe}),Ie({properties:e,arrayPath:qe,quarantineName:ze,arrayName:ke,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:V,colorChart:be,axisChart:we,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Re,conditionalShow:We}})(),r.default})()}($P)),$P.exports),BP=Pr(HP);const VP="qHyperCubeDef.qMeasures",GP="measures",UP="qHyperCubeDef.qDimensions",YP="dimensions",KP="qDef.representation",XP="tableRepresentation",JP="qDef.conditionalColoring",ZP="conditionalColoring",QP="qMiniChartDef",eT="miniChartDef",tT=e=>{BP.unquarantineArrayProp({properties:e,arrayPath:UP,itemPath:KP,arrayName:YP,quarantineName:XP}),BP.unquarantineArrayProp({properties:e,arrayPath:VP,itemPath:KP,arrayName:GP,quarantineName:XP}),BP.unquarantineArrayProp({properties:e,arrayPath:VP,itemPath:JP,arrayName:GP,quarantineName:ZP}),BP.unquarantineArrayProp({properties:e,arrayPath:VP,itemPath:QP,arrayName:GP,quarantineName:eT})},nT=e=>{BP.quarantineArrayProp({properties:e,arrayPath:UP,itemPath:KP,arrayName:YP,quarantineName:XP}),BP.quarantineArrayProp({properties:e,arrayPath:VP,itemPath:KP,arrayName:GP,quarantineName:XP}),BP.quarantineArrayProp({properties:e,arrayPath:VP,itemPath:JP,arrayName:GP,quarantineName:ZP}),BP.quarantineArrayProp({properties:e,arrayPath:VP,itemPath:QP,arrayName:GP,quarantineName:eT})};function rT(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(o)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const oT="qHyperCubeDef.qDimensions",iT="dimensions",aT="qOtherTotalSpec.qTotalMode",sT="totalMode",lT={quarantine(e){BP.quarantineArrayProp({properties:e,arrayPath:oT,quarantineName:sT,arrayName:iT,itemPath:aT})},unquarantine(e){BP.unquarantineArrayProp({properties:e,arrayPath:oT,quarantineName:sT,arrayName:iT,itemPath:aT})}};function cT(e){const t=rT(e);return(e,n,r,o)=>{const i=BP.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&qR(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude?.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],qR(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude?.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),f=a+p;if(f>c.length)for(let e=c.length;e<f;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const h=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&qR(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(BP.unquarantineProperty(i.qProperty,"noOfLeftDims"),BP.unquarantineProperty(i.qProperty,"excludedNoOfLeftDims "))}return BP.unquarantineProperty(i.qProperty,"rankedList"),BP.conditionalShow.unquarantine(i.qProperty),lT.unquarantine(i.qProperty),tT(i.qProperty),BP.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function uT(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=BP.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;qR(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),BP.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims,BP.quarantineProperty(i.properties,"qHyperCubeDef.rankedList","rankedList"),delete i.properties.qHyperCubeDef.rankedList;const u=i.properties.qLayoutExclude?.quarantine?.interColSortOrder;u&&(c=u,qR(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),qR(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude?.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return BP.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),BP.quarantineProperty(i.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),BP.conditionalShow.quarantine(i.properties),lT.quarantine(i.properties),nT(i.properties),i}const dT=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(o)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),pT=["rows","columns","measures"],fT=e=>"string"==typeof e&&e.length>0,hT=e=>{const t=e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"),n=e.flags.isEnabled("qcb-35151-fix-duplicate-columns-pivot"),r=e.flags.isEnabled("SUPPORT-11928-CORRUPT-SORT-ORDER"),o=Ph(e,{tag:"sn-pivot-table"});return{properties(i){if(!(e=>"qHyperCubeDef"in e&&"sn-pivot-table"===(({visualization:e,qInfo:t})=>e??t?.qType)(e))(i))return i;if(n&&((e,t)=>{const{qHyperCubeDef:n}=e,r=n.qLayoutExclude?.qHyperCubeDef,o=new Set;let i=0,a=0;[...n.qDimensions,...n.qMeasures,...r?.qDimensions??[],...r?.qMeasures??[]].forEach(e=>{const t=e.qDef?.cId;if(!fT(t)||o.has(t)){fT(t)?i++:a++;const n=qP();return e.qDef={...e.qDef,cId:n},void o.add(n)}o.add(t)}),i>0&&t.error({msg:"migrate: duplicate field cId issues detected",payload:{duplicateCount:i}}),a>0&&t.error({msg:"migrate: missing field cId issues detected",payload:{missingCount:a}})})(i,o),r&&((e,t)=>{const{qHyperCubeDef:n}=e,r=new Set(n.qDimensions.map((e,t)=>t));n.qMeasures.length>1&&r.add(-1);const o=new Set(r),i=n.qInterColumnSortOrder,a=Array.isArray(i)?i.filter(e=>o.delete(e)):[],s=[];if(Array.isArray(i)){i.length!==r.size&&s.push(`Incorrect length: expected ${r.size}, received ${i.length}`);const e=i.filter((e,t)=>t in i);e.length!==i.length&&s.push("Sparse array"),new Set(e).size!==e.length&&s.push("Duplicate indexes"),e.some(e=>!r.has(e))&&s.push("Unexpected indexes")}else s.push("Sort order is not an array");o.size>0&&s.push(`Missing indexes: ${[...o].join(", ")}`),s.length>0&&(n.qInterColumnSortOrder=[...a,...o],t.error({msg:"migrate: corrupt sort order detected",payload:{reason:s.join("; ")}}))})(i,o),t){const t=new zP({},e);t.setProperties(i),pT.forEach(e=>{t.isRankedListCorrupt(e)&&t.createRankedList(e)})}const a=i.components?.find(e=>"theme"===e.key);return a?.nullValues&&!a.dimensionNullValues&&(a.dimensionNullValues={...a.nullValues}),i}}},mT={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let gT=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.Bar="bar",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),bT=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const vT=e=>{switch(e?.type){case"url":return gT.Link;case"image":return gT.Image;case"indicator":return gT.Indicator;case"miniChart":return gT.MiniChart;case"bar":return gT.Bar;default:return gT.Text}},yT=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),xT=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>vT(e.qDef.representation)===gT.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},ST=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:yT({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>vT(e.qDef.representation)===gT.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>vT(e.qDef.representation)===gT.Link&&e.qDef.representation?.urlPosition===bT.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>vT(e.qDef.representation)===gT.Link&&e.qDef.representation?.urlPosition===bT.Attribute},...xT(n)}},wT=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[gT.Image],i=!r?.("qMiniChartDef")&&t[gT.MiniChart],a=!r?.("tableIndicators")&&t[gT.Indicator],s=!!t[gT.Bar],l=o&&t[gT.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&l)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),s&&n.push({value:"bar",translation:"SNTable.Bar.Representation"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>vT(e.qDef.representation)===gT.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}},CT=(e,t,n)=>({type:"string",component:"expression",expressionType:"measure",ref:"qAttributeExpressions",schemaIgnore:!0,translation:t,defaultValue:"",tid:`${e}ByExpression`,show:n,convertFunctions:{get:(t,n,r,o)=>o.qAttributeExpressions?.find(t=>t.id===e)?.qExpression??"",set:(t,n,r,o,i)=>{const a=i.qAttributeExpressions??[],s=a.findIndex(t=>t.id===e);s>=0?t?a[s].qExpression=t:a.splice(s,1):t&&a.push({id:e,qExpression:t,qAttribute:!0}),i.qAttributeExpressions=a}}}),ET=(e,t)=>e?.qDef?.representation?.[t],IT=e=>vT(e?.qDef?.representation)===gT.Bar,DT=[{value:"solid",translation:"SNTable.Bar.SingleColor"},{value:"expression",translation:"SNTable.Bar.ByExpression"}],MT=(e,t,n)=>({component:"expression",ref:"qExpression",expressionType:"measure",translation:t,defaultValue:"",id:e,tid:n,show:!1}),AT=e=>{if(!e[gT.Bar])return{};const t=e=>IT(e)&&"manual"===ET(e,"barRangeMode");return{barColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barColorMode",translation:"SNTable.Bar.BarColor",defaultValue:"solid",show:IT,tid:"barColorMode",options:DT},barColor:{ref:"qDef.representation.barColor",type:"object",component:"color-picker",translation:"SNTable.Bar.BarColor",defaultValue:{index:6,color:null},show:e=>IT(e)&&"expression"!==ET(e,"barColorMode"),tid:"barColor",dualOutput:!0},barColorExpression:CT("barColor","SNTable.Bar.ColorExpression",e=>IT(e)&&"expression"===ET(e,"barColorMode")),barLabelColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barLabelColorMode",translation:"SNTable.Bar.LabelColor",defaultValue:"solid",show:IT,tid:"barLabelColorMode",options:DT},barLabelColor:{ref:"qDef.representation.barLabelColor",type:"object",component:"color-picker",translation:"SNTable.Bar.LabelColor",show:e=>IT(e)&&"expression"!==ET(e,"barLabelColorMode"),tid:"barLabelColor",dualOutput:!0},barLabelColorExpression:CT("barLabelColor","SNTable.Bar.LabelColorExpression",e=>IT(e)&&"expression"===ET(e,"barLabelColorMode")),barWidthExpression:CT("barWidth","SNTable.Bar.WidthExpression",IT),barOffsetExpression:CT("barOffset","SNTable.Bar.OffsetExpression",IT),barLabelExpression:CT("barLabel","SNTable.Bar.LabelExpression",IT),barRangeMode:{type:"string",component:"dropdown",ref:"qDef.representation.barRangeMode",translation:"SNTable.Bar.Range",defaultValue:"auto",show:IT,tid:"barRangeMode",options:[{value:"auto",translation:"Common.Auto"},{value:"manual",translation:"Common.Custom"}]},barRangeMin:{type:"number",ref:"qDef.representation.barRangeMin",translation:"SNTable.Bar.RangeMin",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:t,tid:"barRangeMin"},barRangeMax:{type:"number",ref:"qDef.representation.barRangeMax",translation:"SNTable.Bar.RangeMax",expressionType:"ValueExpression",expression:"optional",defaultValue:100,show:t,tid:"barRangeMax"},barEnd:{type:"string",component:"dropdown",ref:"qDef.representation.barEnd",translation:"SNTable.Bar.End",defaultValue:"none",show:IT,tid:"barEnd",options:[{value:"none",translation:"SNTable.Bar.End.None"},{value:"circle",translation:"SNTable.Bar.End.Circle"},{value:"box",translation:"SNTable.Bar.End.Square"}]}}};let LT=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),RT=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.TextStyleExpression="textStyleExpression",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),PT=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),TT=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const qT="image",kT=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},OT=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:xA.Auto,translation:"Common.Auto"},{value:xA.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:xA.Pixels,translation:"Object.Table.Column.Pixels"},{value:xA.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:xA.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PixelsDefault,show:e=>e.qDef.columnWidth?.type===xA.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PercentageDefault,show:e=>e.qDef.columnWidth?.type===xA.Percentage}}),NT=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==qT},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==qT)}}},_T="TOTAL_OFF",jT=(e=!1,t=[])=>({component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:RT.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:RT.CellForegroundColor},...e?[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:RT.TextStyleExpression,tid:"tableTextStyleByExpression"}]:[],{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:RT.ImageUrl,tid:"ImageUrlByExpression",show:!1},...t]}),FT=e=>{const{translator:t,anything:n,flags:r}=e,o=r.isEnabled("VNA-977-TABLE-BARS"),i=r.isEnabled("TLV_2605_PIVOT_TEXT_STYLING"),a=e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),s=jT(i),l=jT(i,o?[MT("barColor","SNTable.Bar.ColorExpression","barColorByExpression"),MT("barLabelColor","SNTable.Bar.LabelColorExpression","barLabelColorByExpression"),MT("barWidth","SNTable.Bar.WidthExpression","barWidthByExpression"),MT("barOffset","SNTable.Bar.OffsetExpression","barOffsetByExpression"),MT("barLabel","SNTable.Bar.LabelExpression","barLabelByExpression")]:[]);return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:_T,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:_T,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&kT},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==_T&&kT(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",grouped:a,items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...a?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:s}},alignmentAndRepresentationAndResize:{type:"items",items:{...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...ST(e),...OT()}}}:{cellColoring:s,...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...ST(e),...OT()}}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",grouped:a,items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...e.flags.isEnabled("VNA-965-PIVOT-MEASURE-GROUPS")?{measureGroups:{type:"items",items:{headerText:{component:"text",translation:"Visualizations.Descriptions.Group",style:"sHeader"},groupName:{ref:"qDef.groupName",translation:"Object.Table.Measure.GroupName",type:"string",component:"string",expression:"optional",defaultValue:"",change:e=>{const t=e.qDef.groupName,n="string"==typeof t?t:t?.qStringExpression.qExpr;n?.trim()||delete e.qDef.groupName}},groupNameText:{component:"text",translation:"Object.Table.Measure.GroupNameText",style:"hint"}}}}:{},...a?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:l}},alignmentAndRepresentationAndResize:{type:"items",items:{...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...wT(e,{[gT.Image]:!0,[gT.Indicator]:!0,[gT.Bar]:o}),...AT({[gT.Bar]:o}),...OT()}}}:{cellColoring:l,...NT({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...NT({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...wT(e,{[gT.Image]:!0,[gT.Indicator]:!0,[gT.Bar]:o}),...AT({[gT.Bar]:o}),...OT()}}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}},zT=e=>FT(e),WT=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),$T=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},HT=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>$T(e,!0))],s=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...ML().filter(e=>!i.includes(e)).map(e=>$T(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),BT=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],VT=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>$T(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...BT.filter(e=>!i.includes(e)).map(e=>$T(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),GT=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:HT({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:VT({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:WT(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:WT(`${e}.background`,"properties.background",(t,n)=>{const r=n?cL.WHITE:cL.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),UT=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),YT=e=>UT("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),KT=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?YT(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:WT(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:WT(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),XT=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),JT="12px",ZT="Source Sans Pro, sans-serif",QT="600",eq=15e3,tq=4/3;let nq=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),rq=function(e){return e.Solid="solid",e.None="none",e}({});const oq={display:"flex",justifyContent:"center",alignItems:"center"},iq={borderStyle:"solid"},aq={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},sq={lineHeight:tq,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},lq=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),cq=(e,t)=>e>0?`${e}px ${rq.Solid} ${t}`:rq.None,uq=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?cq(i,n):rq.None,borderBottom:cq(a,n),borderLeft:"rtl"===r?cq(i,n):rq.None,borderTop:rq.None}},dq=(e,t,n,r,o,i,a)=>{const s=uq(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=cq(2,o)),n||(s.borderLeft="rtl"!==i?cq(1,o):"none",s.borderRight="rtl"===i?cq(1,o):"none")),s},pq=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=cq(1,n)),t&&(r.borderRight=cq(1,n)),r},fq=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},hq=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:GT({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:fq}),dimensionValueSection:GT({section:"dimensionValues",translator:e,flags:t,getThemeValue:fq}),measureValueSection:GT({section:"measureValues",translator:e,flags:t,getThemeValue:fq}),measureLabelSection:KT({section:"measureLabels",getThemeValue:fq}),totalValuesSection:KT({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:fq}),dimensionNullSection:KT({section:"dimensionNullValues",translation:"properties.table.dimensionNullValues",fallbackBackground:nq.NullValueBackground,getThemeValue:fq,isNullValueText:!0}),nullValues:KT({section:"nullValues",translation:"properties.table.measureNullValues",fallbackBackground:nq.NullValueBackground,getThemeValue:fq,isNullValueText:!0}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:XT("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:XT("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:WT("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??nq.DividerLight),divider:WT("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??nq.DividerDark),background:WT("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??nq.Transparent)}}}}}}]}),mq=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[hq(e,t),{type:"items",items:{alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:xA.Auto,translation:"Common.Auto"},{value:xA.Pixels,translation:"Object.Table.Column.Pixels"},{value:xA.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:xA.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===xA.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:yA.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===xA.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}}),gq="auto",bq={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:gq,translation:"Object.Table.SortingInSearch",options:[{value:gq,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function vq(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:zT(e),sorting:bq,addons:mT,settings:mq(t,n)}}}function yq(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:!0,sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:vq(e),importProperties:cT(e),exportProperties:uT,exploration:CP(),data:dT(e),migrate:hT(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new zP(t,e):void 0}}const xq=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function Sq(e,t){return A(()=>e,t)}const wq={},Cq=e=>{const t=A(()=>({current:wq}),[]);return t.current=t.current===wq?e:t.current,t},Eq=e=>!!e&&0===CL(e).a,Iq="#grid",Dq=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},Mq=(e,t,n,r,o)=>{const i=Dq(".qv-object .qv-inner-object",n),a=Dq(".qv-panel-sheet",n),s=Dq(Iq,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return YR(n);if("none"===r)return"transparent";if(void 0===r)return;const i=CL(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=Eq(d),f=!Eq(h=p?s:d)&&BR(h,cL.TEXT,cL.DARK_MODE_TEXT)===vL(cL.DARK_MODE_TEXT);var h;const m=((e,t,n,r=cL.WHITE)=>e&&!Eq(e)?e:Eq(t)?n&&!Eq(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},Aq=(e,t,n,r)=>{const o=q(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=P([]);return T(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(Iq),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return A(()=>({...o,background:Mq(e,o,t,n,r)}),[o.name(),t,n,r,e,i])};function Lq(e,t){const n=A(()=>({isLoading:!0}),t),[r,o]=R(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,o]}const Rq=3,Pq=/\n/g;function Tq(e,t,n){let r=0,o=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function qq({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=Rq,allowLineBreaks:a=!0}=o??{},{estimateWidth:s,measureText:l,estimateLineCount:c}=b(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o)=>{const{maxNbrLinesOfText:i=Rq,allowLineBreaks:a=!0}=o??{};return()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const s=o.measureText.bind(o),l=kR(e=>{if(void 0===e)return 0;if(a){const t=e.split(Pq).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(Pq," ");return s(t).width}),c=e=>+l(e).toFixed(2),u=kR(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(Pq):[e];let o=0;for(const e of r){let n=e;do{o+=1,n=Tq(n,t,c)}while(null!==n&&o<i);if(o>=i)break}return o},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:u}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:i,allowLineBreaks:a})(),[n,r,e,t,i,a]);return{estimateWidth:s,measureText:l,estimateLineCount:c}}var kq,Oq={};var Nq=function(){if(kq)return Oq;kq=1;var e=E;return Oq.createRoot=e.createRoot,Oq.hydrateRoot=e.hydrateRoot,Oq}();const _q="Source Sans Pro, sans-serif";function jq(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var Fq={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const zq=({translator:e})=>(b(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Fq).forEach(t=>{e.add(Fq[t])})}}(e)},[e]),e),Wq=Sf({});Wq.debugLabel="appAtom";const $q=Sf({});$q.debugLabel="downloadServiceAtom";const Hq=Sf({});Hq.debugLabel="effectivePropertiesServiceAtom";const Bq=Sf({});Bq.debugLabel="embedAtom";const Vq=Sf({});Vq.debugLabel="interactionsAtom";const Gq=Sf({});Gq.debugLabel="keyboardAtom";const Uq=Sf({});Uq.debugLabel="layoutServiceAtom";const Yq=["D","T","TS","IV"],Kq=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Xq=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Jq=["January","February","March","April","May","June","July","August","September","October","November","December"],Zq=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Qq={D:"YYYY-MM-DD",T:"hh:mm:ss",TS:"YYYY-MM-DD hh:mm:ss"},ek=864e5,tk=2**32,nk=e=>{let t=Math.floor(e),n=Math.round((e-t)*ek);n>=ek&&(t+=1,n=0);const r=t-25569,o=r+719468,i=Math.floor(o/146097),a=o-146097*i,s=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),l=a-(365*s+Math.floor(s/4)-Math.floor(s/100)),c=Math.floor((5*l+2)/153),u=c<10?c+2:c-10;return{year:s+400*i+(u<=1?1:0),month:u,date:l-Math.floor((153*c+2)/5)+1,day:(r%7+7+3)%7,h:Math.floor(n/36e5),m:Math.floor(n%36e5/6e4),s:Math.floor(n%6e4/1e3),f:n%1e3}},rk=(e,t)=>String(e).padStart(t,"0"),ok=e=>{const[,t]=e.toString().split(".");return t?Number(`0.${t}`):0},ik=/Y+|y+|M+|W+|w+|D+|d+|h+|H+|m+|s+|S+|f+|F+|t{1,2}|T{1,2}/g,ak=(e,t,n)=>{if(Number.isNaN(e)||!Number.isFinite(e))return String(e);let r,o=(n||("IV"===t?Qq.T:Qq[t])).replace(/\[.+]|\[|]/g,"");"IV"===t?(e<0&&(e=-e,o=`-${o}`),r=((e,t)=>{const n=Math.floor(e);let r=24*ok(e),o=60*ok(r),i=60*ok(o);const a=Math.round(1e3*ok(i));r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),/D+/i.test(t)||(r+=24*n),/h+/i.test(t)||(o+=60*r),/m+/i.test(t)||(i+=60*o);let s=0,l="";if(/w+|t+/i.test(t)){const t=nk(e);s=t.day,l=t.h>=12?"pm":"am"}return{year:0,month:0,day:s,date:n%tk,h:r%tk,m:o%tk,s:i%tk,f:a,t:l}})(e,o)):r=((e,t)=>{const n=nk(e);let r=n.h;return t&&(r%=12,r=r||12),{year:n.year,month:n.month,day:n.day,date:n.date,h:r,m:n.m,s:n.s,f:n.f,t:n.h>=12?"pm":"am"}})(e,/t+/i.test(o));const i=(e=>[[/^(Y+|y+)$/,{Y:`${Number(`${e.year}`.slice(-2))}`,YY:rk(`${e.year}`.slice(-2),2),YYY:rk(`${e.year}`.slice(-3),3),def:t=>rk(`${e.year}`,t.length)}],[/^M+$/,{M:e.month+1,MM:rk(e.month+1,2),MMM:Zq[e.month],def:Jq[e.month]}],[/^(W+|w+)$/,{W:e.day,WW:rk(e.day,2),WWW:Xq[e.day],def:Kq[e.day]}],[/^(D+|d+)$/,{def:t=>rk(e.date,t.length)}],[/^(h+|H+)$/,{h:e.h,def:t=>rk(e.h,t.length)}],[/^m+$/,{m:e.m,def:t=>rk(e.m,t.length)}],[/^(s+|S+)$/,{s:e.s,def:t=>rk(e.s,t.length)}],[/^(f+|F+)$/,{def:t=>{const n=`${e.f}`;return n.length>t.length?n.slice(0,t.length):n.padEnd(t.length,"0")}}],[/^(t{1,2}|T{1,2})$/,{def:t=>(t[0].toUpperCase()===t[0]?e.t.toUpperCase():e.t).slice(0,t.length)}]])(r);return o.replace(ik,e=>((e,t)=>{const n=t.find(([t])=>t.test(e))?.[1];if(!n)return"";const r=Object.keys(n).find(t=>"def"!==t&&(t===e||t.toLowerCase()===e)),o=void 0===r?n.def:n[r];return String("function"==typeof o?o(e):o)})(e,i))},sk=/[#0]/,lk={prefix:"",suffix:""},ck=e=>{const t=e.search(sk);if(-1===t)return lk;let n=t;for(let t=e.length-1;t>n;t--)if(sk.test(e[t])){n=t;break}return{prefix:e.slice(0,t),suffix:e.slice(n+1)}},uk=/\B(?=(\d{3})+(?!\d))/g,dk={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y",[-3]:"m",[-6]:"μ",[-9]:"n",[-12]:"p",[-15]:"f",[-18]:"a",[-21]:"z",[-24]:"y"},pk=e=>Number(e.toPrecision(15)),fk=(e,t,n=!1)=>{if(Number.isNaN(e))return String(e);const{qFmt:r,qType:o,qDec:i=".",qThou:a=","}=t??{};if((e=>Yq.includes(e))(o))return ak(e,o,r);if(!r)return String(e);const[s,l]=r.split(";"),{suffix:c}=ck(s),u=c.startsWith("A"),d=(u?c.slice(1):c).endsWith("%"),{value:p,siPrefix:f}=((e,t,n)=>{let r=t?pk(100*e):e,o="";if(n&&0!==r&&Number.isFinite(r)){let e=Number(r.toExponential().split("e")[1]);e-=e%3,e in dk&&(o=dk[e],r=pk(r/10**e))}return{value:r,siPrefix:o}})(e,d,u),h=p<0,m=h&&l?l:s,{prefix:g,suffix:b}=ck(m),v=u&&b.startsWith("A")?b.slice(1):b,{decimals:y,useThousands:x}=((e,t,n)=>{const r=e.indexOf(".");let o=0;return-1!==r?o=(e.slice(r+1).match(/[#0]/g)??[]).length:n&&(o=String(Math.abs(t)).split(".")[1]?.length??0),{decimals:Math.min(o,100),useThousands:e.includes(",")}})(m,p,n||"U"===o),[S,w]=Math.abs(p).toFixed(y).split("."),C=x?S.replace(uk,a):S;return`${h&&!l?"-":""}${g}${w?`${C}${i}${w}`:C}${f}${v}`},hk=e=>"number"==typeof e&&!Number.isNaN(+e),mk=e=>hk(e.qNum),gk=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,bk=(e,t)=>t.qAttrExps?.qValues?.[e],vk=e=>{const t=Number(e?.qNum);return void 0!==e?.qNum&&Number.isFinite(t)?t:void 0},yk=e=>{const t=e?.qText?.trim();return t&&"ARGB(0,0,0,0)"!==t.toUpperCase()?YR(t)??void 0:void 0},xk="/qHyperCubeDef",Sk=-1,wk="PSEUDO-DIM",Ck=e=>({x:Math.min(e.qHyperCube.qSize.qcx,eq),y:Math.min(e.qHyperCube.qSize.qcy,e.snapshotData?.content?.rowsPerPage??15e3)}),Ek=e=>Boolean(e.qHyperCube.qIndentMode),Ik=e=>e.qHyperCube.qMeasureInfo.filter(e=>7005!==e.qError?.qErrorCode),Dk=e=>e.qHyperCube.qEffectiveInterColumnSortOrder.slice(0,e.qHyperCube.qNoOfLeftDims),Mk=e=>Dk(e).includes(Sk),Ak=e=>{const{qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}=e.qHyperCube,r=new Map(t.map(e=>[n[e]??Sk,e]));return e=>r.get(e)??-1},Lk=e=>!!e.snapshotData,Rk=e=>!!e.qHyperCube.qLastExpandedPos,Pk=e=>t=>t===Sk?void 0:e.qHyperCube.qDimensionInfo.at(t),Tk=Sf({});Tk.debugLabel="layoutAtom";const qk=Sf(e=>Lk(e(Tk)));qk.debugLabel="isSnapshotAtom";const kk=Sf(e=>Ck(e(Tk)));kk.debugLabel="sizeAtom";const Ok=Sf(e=>{const t=e(kk);return t.x>0&&t.y>0});Ok.debugLabel="hasDataAtom";const Nk=Sf(e=>Ek(e(Tk)));Nk.debugLabel="isIndentModeEnabledAtom";const _k=Sf(e=>Rk(e(Tk)));_k.debugLabel="triggeredByExpandOrCollapseAtom";const jk=Sf(e=>!e(qk)&&e(kk).x<e(Tk).qHyperCube.qSize.qcx);jk.debugLabel="hasLimitedDataAtom";const Fk=Sf(e=>"inherit"===e(Tk).search?.sorting);Fk.debugLabel="searchSortFromDimensionAtom";const zk=Sf(e=>Pk(e(Tk)));zk.debugLabel="getDimensionInfoAtom";const Wk=Sf(e=>Ik(e(Tk)));Wk.debugLabel="visibleMeasureInfoAtom";const $k=Sf(e=>Mk(e(Tk)));$k.debugLabel="hasPseudoDimOnLeftAtom";const Hk=Sf(e=>e(Tk).nullValueRepresentation?.text??"-");Hk.debugLabel="nullValueTextAtom";const Bk=Sf(e=>e(Tk).nullValueRepresentation?.dimensionText??"-");Bk.debugLabel="dimensionNullValueTextAtom";const Vk=Sf(e=>Dk(e(Tk)));Vk.debugLabel="leftDimensionInfoIndexesAtom";const Gk=Sf(e=>Ak(e(Tk)));Gk.debugLabel="getDimensionInfoIndexAtom";const Uk=Sf(e=>{const{qMeasureInfo:t}=e(Tk).qHyperCube,n=e($k),r=e(Wk);return(e,o=!1)=>{if(n)return 0;const i=e%r.length;return o?i:t.findIndex(e=>e===r[i])}});Uk.debugLabel="getMeasureInfoIndexFromCellIndexAtom";const Yk=Sf(e=>{const t=e(Hk);return"string"==typeof(n=t)&&n.length>0&&!Number.isNaN(+n)?e(Wk).map(e=>fk(gk(t),e.qNumFormat,e.qIsAutoFormat)):[];var n});Yk.debugLabel="formattedNullValueTextByMeasureIndexAtom";const Kk=Sf(e=>{const t=e(qh)("VNA-977-TABLE-BARS");return e(Wk).map(e=>t&&vT(e.representation)===gT.Bar?(({qMin:e,qMax:t,qAttrExprInfo:n})=>{if("number"!=typeof e||"number"!=typeof t||!Number.isFinite(e)||!Number.isFinite(t))return;const r=n.find(({id:e})=>"barOffset"===e),o=Number.isFinite(r?.qMin)?r?.qMin:0,i=Number.isFinite(r?.qMax)?r?.qMax:0;return{qMin:Math.min(o,o+e),qMax:Math.max(i,i+t),hasNegativeValues:e<0,hasPositiveValues:t>=0}})(e):void 0)});Kk.debugLabel="barMinMaxByMeasureIndexAtom";const Xk=Sf({});Xk.debugLabel="modelAtom";const Jk=Sf({direction:void 0});Jk.debugLabel="optionsAtom";const Zk=Sf(e=>e(Jk).direction);Zk.debugLabel="directionAtom";const Qk=Sf({});Qk.debugLabel="pageInfoAtom";const eO=Sf(void 0);eO.debugLabel="updatePageInfoAtom";const tO=Sf([]);tO.debugLabel="qPivotDataPagesAtom";const nO=Sf({});nO.debugLabel="rectAtom";const rO=Sf({});rO.debugLabel="styleServiceAtom";const oO=Sf({});oO.debugLabel="themeAtom";const iO=Sf({});iO.debugLabel="translatorAtom";const aO=Sf({});aO.debugLabel="viewServiceAtom";const sO=Sf(null,(e,t,n)=>{t(Wq,n.app),t(Tk,n.layout),t(Xk,n.model),t(Bq,n.embed),t(oO,n.theme),t(Gq,n.keyboard),t(iO,n.translator),t(Vq,n.interactions),t(Th,n.env),t(Jk,n.options),t(nO,n.rect),t(Qk,n.pageInfo),t(eO,()=>n.updatePageInfo),t(tO,n.qPivotDataPages),t(aO,n.viewService),t(Uq,n.layoutService),t($q,n.downloadService),t(rO,n.styleService),t(Hq,n.effectivePropertiesService)});sO.debugLabel="hydrateRenderStateAtom";const lO={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},cO={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},uO=As("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...lO},"&::-moz-range-track":{...lO},"&::-ms-track":{...lO},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...cO},"&::-moz-range-thumb":{...cO},"&::-ms-thumb":{...cO},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),dO=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=zq({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,b=()=>g?h.current.columnWidth-m:"100%",v={left:"rtl"!==p?b():void 0,right:"rtl"===p?b():void 0},y=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};jq(()=>{g&&y()},[e]);const x=e=>{const t=Math.max(e,yA.PixelsMin);h.current.columnWidth=t,i(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:xA.Pixels,pixels:h.current.columnWidth};a(e)}c?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{KR(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{KR(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===bA.Left||e.key===bA.Right){KR(e);const t=5,n=e.key===bA.Left?t:-t,r="rtl"===p?n:-n;c?.(!0),x(h.current.columnWidth+r)}else e.key===bA.Space||e.key===bA.Enter?(KR(e),s(e),c?.(!1),S()):e.key===bA.Esc&&(KR(e),s(e),c?.(!1),x(h.current.initWidth))}:void 0,M=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return fi.jsx(uO,{style:v,hoverColor:o,isLastColumn:n,className:vA,"data-testid":vA,onMouseDown:e=>{KR(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),c?.(!0),y(e.clientX)},onDoubleClick:()=>{a({type:xA.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(KR(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),c?.(!0),y(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{y()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":yA.PixelsMin,"aria-valuemax":yA.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},pO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),fO=As(hc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),hO=As(pO,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),mO=As(Ld)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),gO=As(lu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),bO=As(kd)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),vO=As(kd,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),yO=As("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),xO=As("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),SO=As(Rl)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),wO=As(nd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),CO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),EO=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?EO(t):t:e.parentElement?.children?.[0]},IO=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?IO(t):t},DO=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===bA.Down||t===bA.Up){const n=e=>t===bA.Down?EO(e):IO(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},MO=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let AO={};const LO=({autoFocus:e,id:t,onClick:r,itemTitle:o,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:c,direction:u,isPagination:d})=>{const[p,h]=m(!1),g=n.useRef(null),b=f(e=>{e.stopPropagation(),h(!1)},[h]);return fi.jsxs(fi.Fragment,{children:[fi.jsxs(vO,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),AO={}),s?.length&&(h(!0),AO[o]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:DO,children:[c?fi.jsx(yO,{direction:u,isPagination:d}):null,fi.jsxs(xO,{children:[fi.jsx(wO,{direction:u,isPagination:d,children:fi.jsx(i,{})}),fi.jsx(SO,{variant:"body2",children:o})]}),s?.length?fi.jsx(CO,{}):null]},t),s?.length?fi.jsx(qO,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:b,menuGroups:MO(s,AO),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:d}):null]})},RO=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&fi.jsx(bO,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>fi.jsx(LO,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),PO=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[RO({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?fi.jsx(gO,{"data-testid":"group-divider",variant:"middle"}):void 0]),TO={appear:0,enter:0,exit:0},qO=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?fi.jsx(mO,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:TO,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:PO({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,kO=(e,t)=>e.some(e=>t[e]>0),OO={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},NO=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(OO);return jq(()=>{e||(s(OO),i(null))},[e]),d(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:kO(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:kO(["qSelected"],e),canSelectPossible:kO(["qOption"],e),canSelectAlternative:kO(["qAlternative"],e),canSelectExcluded:kO(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},_O=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),jO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),FO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),zO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),WO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),$O=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),HO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),BO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),VO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),GO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),UO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),YO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),KO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),XO=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let JO=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const ZO="/qListObjectDef",QO=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[JO.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:_O,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:zO,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:BO,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:WO,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[JO.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:VO,enabled:!0}]}]),!e.isLocked&&n[JO.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:XO,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(ZO))},icon:GO,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(ZO))},icon:KO,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(ZO))},icon:UO,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(ZO))},icon:YO,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(ZO))},icon:jO,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:HO,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:$O,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[JO.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:FO,enabled:!0}]}]),f},eN=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:c,searchRelatedArgs:u,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:b,isAccessibleHeader:v,iconSize:y=hA})=>{const x=l(null),S=zq({translator:o}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:M}=NO({open:e,headerData:r,app:I,qStateName:d?.qStateName}),A=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),L=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]))({qLibraryId:w,fieldId:C,searchRelatedArgs:u,selectionRelatedArgs:d,direction:g}),R=f(e=>{e.stopPropagation(),t(!1)},[t]),P=f(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?fi.jsxs(fO,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===v?P:void 0,ref:x,isAccessibleHeader:v,children:[s?fi.jsx(hO,{height:y,className:mA,"data-testid":mA,isInteractionsActive:i.active??!1,children:fi.jsx(pO,{})}):null,fi.jsx(qO,{open:e,anchorEl:!1===v?x.current:n.current,onClose:R,menuGroups:QO({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:L,interactions:i,fieldInstance:D,selectionActionsEnabledStatus:M,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:A,expandOrCollapseArgs:h}),direction:g,isPagination:b})]}):null},tN=e=>e.isDark?{background:e.color,borderColor:cL.DARK_MODE_BORDER,color:cL.DARK_MODE_TEXT,disabledColor:cL.DARK_MODE_DISABLED,iconColor:cL.DARK_MODE_TEXT}:{background:e.color,borderColor:cL.BORDER_MEDIUM,color:cL.TEXT,disabledColor:cL.DISABLED},nN=As(hc,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),rN=As(hp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),oN=As(Ec,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),iN=As(Rl)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),aN=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=b(()=>tN(r.background),[r]);if(!n.active)return null;const a=o?fi.jsx(nN,{footerStyle:i,children:e}):null;return t?E.createPortal(e,t):a},sN=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),lN=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),cN=c({}),uN=()=>h(cN),dN=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const v=(e=>!e.enabled||e.active)(u)?0:-1,y=b(()=>tN(p.background),[p]),x=o?o.getBoundingClientRect().width:h.width,S=zq({translator:d}),w=b(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:v,width:x,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,c,u,S,p,f,h,m,y,v,x,g]);return fi.jsx(cN.Provider,{value:w,children:e})},pN=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let fN=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),hN=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const mN=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=uN(),c=0===t.page,u=pN({type:fN.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||hN.FirstPage)?null:fi.jsx(oN,{...u,disabled:!r.active,children:"rtl"===e?fi.jsx(lN,{height:hA}):fi.jsx(sN,{height:hA})})},gN=(e,t,n=!1)=>{n&&e.key===bA.Tab&&!e.shiftKey&&(KR(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},bN=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=uN(),p=t.page>=r-1,f=pN({type:fN.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{gN(e,n,o)}:void 0;return i<=(s?.lastPage||hN.LastPage)?null:fi.jsx(oN,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?fi.jsx(sN,{height:hA}):fi.jsx(lN,{height:hA})})},vN=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),yN=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=uN(),d=t.page>=r-1,p=pN({type:fN.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),f=!(i>hN.FirstPage&&i>hN.LastPage)&&n.enabled?e=>{gN(e,n,o)}:void 0;return fi.jsx(oN,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?fi.jsx(vN,{height:hA}):fi.jsx(CO,{height:hA})})},xN=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=uN(),s=0===t.page,l=pN({type:fN.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return fi.jsx(oN,{...l,disabled:!n.active,children:"rtl"===e?fi.jsx(CO,{height:hA}):fi.jsx(vN,{height:hA})})},SN=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=uN(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||hN.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return fi.jsx(iN,{variant:"caption",dir:"ltr",children:s})},wN=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=uN(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return fi.jsxs(fi.Fragment,{children:[fi.jsxs(iN,{variant:"caption",id:p,children:[u,":"]}),fi.jsx(rN,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},CN=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=uN();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||hN.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=fi.jsx(fi.Fragment,{children:e.rowsPerPageOptions.map(e=>fi.jsx("option",{value:e,children:e},e))});return fi.jsx(wN,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},EN=1e3,IN="…",DN=({totalPages:e,page:t})=>{const n=Math.min(e,EN),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-EN):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return fi.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(fi.jsx("option",{value:IN,disabled:!0,children:IN},"startMoreOptions")),o<e-1&&a.push(fi.jsx("option",{value:IN,disabled:!0,children:IN},"endMoreOptions")),fi.jsx(fi.Fragment,{children:a})},MN=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=uN(),{page:i}=e;if(t<=(o?.selectPage||hN.SelectPage))return null;const a=fi.jsx(DN,{totalPages:n,page:i});return fi.jsx(wN,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var AN=y(e=>fi.jsxs(dN,{...e,children:[fi.jsx(CN,{}),fi.jsx(MN,{}),fi.jsx(SN,{}),fi.jsx(mN,{}),fi.jsx(xN,{}),fi.jsx(yN,{}),fi.jsx(bN,{})]}));const LN=e=>fi.jsx(aN,{...e,children:fi.jsx(AN,{...e})}),RN=Sf(null),PN=Sf(null),TN=Sf({minRow:0,maxRow:0,minCol:0,maxCol:0}),qN=Sf({HEADER:null,TOP:null,LEFT:null,DATA:null,WRAPPER:null}),kN=Sf(null),ON=Sf(e=>({focusCoord:e(RN),shouldRefocus:e(PN),pivotSectionBounds:e(TN),pivotSection:e(qN),pivotCoord:e(kN)})),NN=Sf(null,(e,t,n)=>{t(RN,n)});Sf(null,(e,t,n)=>{t(TN,e=>({...e,...n}))});const _N=Sf(null,(e,t,n)=>{t(qN,e=>({...e,...n}))}),jN=e=>e===Sk?wk:(({cId:e})=>e??qP())(e),FN=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===Sk?n.columnWidthLocation=LT.Measures:n.isLeftDimension?n.columnWidthLocation=LT.Dimension:t.at(-1)===Sk?n.columnWidthLocation=LT.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=LT.Pivot))},zN=e=>{if(!e)return;const{background:t,foreground:n}=e,r=CL(t??""),o=CL(n??""),i=r.isInvalid()?void 0:r.getRGBA(),a=i?GR(i,SA):void 0,s=i?GR(i,wA):void 0;return o.isInvalid()&&void 0!==i?{background:i,color:BR(i),headerMenuHoverBackground:a,headerMenuActiveBackground:s}:{background:i,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:a,headerMenuActiveBackground:s}},WN=(e,t,n,r,o)=>{const i=jN(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===Sk?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:LT.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===CA.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:LT.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName,headerColor:o?.("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?zN(n.headerColor):void 0}},$N=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})=>{let i=r;var a;n.length>0&&(i=(a=r).at(-1)===Sk?a.slice(0,-1):a);const s=i.length+(n.length?1:0),l=Math.max(1,n.length),c=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(s,l);return n.forEach((n,r,i)=>{const a=r===i.length-1;c[s-1][r]=WN(e,t,n,a,o)}),i.forEach((n,r,i)=>{const a=r===i.length-1;c[r][l-1]=WN(e,t,n,a,o)}),c},HN=(e,t,n,r,o,i=!1)=>{const a=((e,t,n,r,o)=>{let i;return i=0===n.length||n.includes(Sk)?$N({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n,isEnabled:o}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))($N({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})),e.isIndentModeEnabled&&i.length&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{FN({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):FN({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r,o);i&&a.unshift(Array.from({length:a[0]?.length??1},()=>null));return{data:a,size:{x:a[0]?.length??0,y:a.length}}},BN=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,VN=5e6,GN=5e5;const UN={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:YN(e),value:YN(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function YN(e){try{return decodeURIComponent(e)}catch{return e}}function KN(e){if(!(this instanceof KN))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>UN.fromSearchString(t.search)}})}function XN(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}KN.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},KN.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=XN(t.key),t.value?n+=`=${XN(t.value)}`:n+=t.useEqualSign?"=":"";return n};var JN=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},ZN=class{decode(e){let t="";const n=new JN(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const QN=e=>e>=0&&e<=1114111,e_=e=>e.match(/[\s]/);var t_=class extends ZN{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!e_(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return QN(a)?String.fromCharCode(a):"�"}},n_=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},r_=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return n_.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return n_.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||n_.newInstanceIfNeeded(e,t,this._value)}},o_=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new r_);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const i_=(()=>{const e=[],t=[],n=new o_;let r,o,i;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var a_=class extends ZN{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,i_.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=i_.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&QN(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&QN(r)?String.fromCharCode(r):null}},s_=class extends ZN{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),QN(i))?String.fromCharCode(i):(e.reset(),null)}};let l_;"undefined"!=typeof document&&(l_=document.createElement("div"));const c_=Array.prototype.indexOf,u_=[",",".","_"," "],d_=[",",".","-","_"," "],p_={width:["%"],height:["%"]},f_={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},h_={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":f_.image,"background-color":f_.color,"border-color":f_.color,"border-image":f_.image,color:f_.color,icon:f_.image,"list-style-image":f_.image,"outline-color":f_.color},m_={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function g_(e,t,n){let r;if(t){if(c_)return c_.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function b_(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return l_.appendChild(n),t=l_.innerHTML,l_.removeChild(n),t}function v_(e,t,n){let r,o,i,a,s,l,c,u,d;for(e=x_(e).toLowerCase(),t=x_(t),i=0;i<m_.attr_name.length;i++)if(e.match(m_.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<m_.attr_val.length;i++)if(t.toLowerCase().match(m_.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=p_[e],r||(r=d_),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&g_(c,r)<0?(d=u.toString(16),o+=`&#x${d};`):o+=c;return n||(o+='"'),o}function y_(e,t,n){let r,o,i,a,s,l,c,u,d,p;if(e=x_(e).toLowerCase(),t=x_(t),g_(e,m_.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<m_.css_val.length;r++)if(t.toLowerCase().indexOf(m_.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=h_[e],o||(o=f_.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&g_(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=c;return i}function x_(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new a_,new s_,new t_];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const S_=[];for(let e=0;e<255;e++)S_[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const w_={html:e=>b_(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=y_(t,n[t],!0),i+=y_(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=v_(e,t[e],!0),o+=v_(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function C_(e,t){throw new Error(t)}var E_={canonicalize:x_,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?w_.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&C_(this,"Invalid parameter type"),w_.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&C_(this,"Invalid parameter type"),w_.attr(e)):void C_(this,"Invalid parameter type")},encodeForAttr:v_,encodeForAttr2:function(e){return v_("nonsens",e,!0)},encodeForCSS:y_,encodeForHref:function(e){x_(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new KN(e),n=KN.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+KN.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=u_),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),g_(o,t)>=0||null==S_[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:b_,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=x_(t).toLowerCase():C_(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=GN,maxByteSizeImage:r=VN}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=BN.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const I_=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},D_=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!E_.isSafeDataURL(t))?{type:gT.Text,url:void 0,text:e,labelStructure:o}:{type:gT.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:I_(r,a),labelStructure:o,imageBox:i},M_=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:gT.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:gT.MiniChart,text:r,miniChart:a}},A_=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===bT.Attribute?void 0:n?.urlLabel},L_=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:gT.Link,url:E_.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:gT.Text,url:void 0,text:t,labelStructure:e}}},R_=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,measureMinMax:a,labelStructure:s,getText:l=e=>e.qText,direction:c,enabledFeatures:u})=>{const d=vT(t),p=l(e);return d===gT.Image&&u[gT.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=bk(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),D_({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return D_({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=bk(n.imageLabel??-1,e)?.qText??r;return D_({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:gT.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,p,c,s):d===gT.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===bT.Attribute){const i=A_(n.url??-1,e,t);return L_({labelStructure:r,text:o||i||"",url:i})}if(i===bT.Dimension){const i=A_(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),L_({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:gT.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,s,p):d===gT.Indicator&&u[gT.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:gT.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,p):d===gT.MiniChart&&u[gT.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?M_(e,t,i,p):d===gT.Bar&&u[gT.Bar]?((e,t,n,r,o)=>{const i={type:gT.Text,text:o},a=vk(e);if(!t||void 0===a)return i;const s=t=>{const r=n[t];return void 0===r||r<0?void 0:bk(r,e)},{barRangeMode:l,barColorMode:c,barLabelColorMode:u}=t,d="manual"===l,p=e=>d&&"number"==typeof e&&Number.isFinite(e)?e:void 0,f={value:a,columnMin:p(t.barRangeMin)??r?.qMin??0,columnMax:p(t.barRangeMax)??r?.qMax??0,isManualRange:d,hasNegativeValues:r?.hasNegativeValues,hasPositiveValues:r?.hasPositiveValues,offsetValue:vk(s("barOffset"))??0,thicknessPx:vk(s("barWidth")),label:s("barLabel")?.qText??o,fallbackLabel:o,color:"expression"===c?yk(s("barColor")):void 0,colorPalette:t.barColor,labelColor:"expression"===u?yk(s("barLabelColor")):void 0,labelColorPalette:t.barLabelColor,barEnd:t.barEnd??"none"};return{type:gT.Bar,text:o,bar:f}})(e,t,n,a,p):{type:gT.Text,url:void 0,text:p,labelStructure:s}},P_=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?YR(o):null,a=r?YR(r):null,s=((e,t)=>e||!t?null:BR(t))(a,i);return{color:s??a,background:i}},T_=/<[biust]>/g,q_=(e,t)=>((e,{boldFontWeight:t,combineDecorations:n=!1,allowIndentation:r=!1})=>{const o=e?.toLowerCase().match(T_),i={},a=new Set;let s=0;return o?.forEach(e=>{switch(e){case"<t>":r&&(s++,i.textIndent=`${s}em`);break;case"<b>":i.fontWeight=t;break;case"<i>":i.fontStyle="italic";break;case"<u>":a.add("underline"),i.textDecoration="underline";break;case"<s>":a.add("line-through"),i.textDecoration="line-through"}}),n&&a.size>0&&(i.textDecoration=["underline","line-through"].filter(e=>a.has(e)).join(" ")),Object.keys(i).length>0?i:void 0})(t.qAttrExps?.qValues?.[e?.textStyleExpression??-1]?.qText,{boldFontWeight:QT,combineDecorations:!0}),k_=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:k_(e,t),e),O_=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:eq-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,k_(s,e))},N_=({node:e,parent:t,root:n,x:r,y:o,pageY:i,getDimensionInfoIndex:a,visibleMeasureInfo:s,dimensionInfo:l,attrExprInfoIndex:c,isLeftColumn:u=!0,isIndentModeEnabled:d=!1,pseudoDimMeasureIndex:p,indentLevel:f,labelStructure:h,env:m,pageInfo:g,direction:b="ltr"})=>{const v=(!d||!u)&&"P"===e.qType,y=((e,t)=>{if(e!==Sk){if(t){const t=vT(e.representation);return t===gT.Link||t===gT.Image?e.representation:{type:gT.Text}}return e.representation}})(l,d),x=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===gT.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:d,labelStructure:h,representationType:vT(y),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),S=R_({cell:{...e,qText:x},representationProperties:y,attrExprInfoIndex:c,env:m,labelStructure:h,direction:b,enabledFeatures:{[gT.Image]:!0,[gT.Indicator]:!0}}),w={id:qP(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:u?i:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:O_(e,o,i,r,u,g),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof l||!l.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:v,expressionColor:P_(c,e),expressionTextStyle:m.flags.isEnabled("TLV_2605_PIVOT_TEXT_STYLING")?q_(c,e):void 0,selectionCellType:u?"L":"T",dimensionInfoIndex:a(l),canBeResized:0===e.qSubNodes.length&&!u,visibleMeasureInfoIndex:p??(v?e.qElemNo:t?.visibleMeasureInfoIndex),representation:S,...void 0!==f&&{indentLevel:f},headerColor:v&&m.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")&&void 0!==e.qElemNo?zN(s[e.qElemNo]?.headerColor):void 0};return t&&(t.children[w.mainAxisPageCoord-t.mainAxisPageCoord]=w),w},__=({grid:e,qLeft:t,qArea:n,pageInfo:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s,isIndentModeEnabled:l,leftDimensionInfoIndexes:c,hasPseudoDimOnLeft:u,visibleMeasureInfo:d,dimensionNullValueText:p,getDimensionInfoIndex:f})=>{if(!t.length)return e;let h=0;return function t(m,g,b,v=0,y=-1){e[v]||(e[v]={}),l&&y++;const x=c.indexOf(Sk);b.forEach((c,b)=>{const S={originalValue:c.qText??"",maskedValue:"",delimeter:"-",suffix:""};h+=0===b?0:1;const w=n.qTop-r.page*r.rowsPerPage,C=Math.max(0,w+h-c.qUp),E=n.qTop+h-c.qUp;let I;if(l){if(u&&y<=x)if(S.originalValue=c.qText??"",S.maskedValue=c.qText??"","N"===c.qType||"U"===c.qType||"T"===c.qType)"U"===c.qType&&(S.originalValue=p),y<x&&(S.suffix=d[0].qFallbackTitle??"");else if("P"===c.qType){S.originalValue=(g||m)?.representation.labelStructure?.originalValue??"",S.maskedValue=(g||m)?.representation.labelStructure?.originalValue??"",S.suffix=c.qText??"";const e=c.qSubNodes;I=c.qElemNo,c={...(g||m)?.ref,...c.qText?{qText:c.qText}:{},qSubNodes:e},y=(g||m)?.indentLevel??0}"U"===c.qType&&(S.originalValue=p)}let D=v;l&&(D=x>=1&&y>=x?y+1:y,0===y&&0===x&&0===c.qSubNodes.length&&(D=0));const M=e.at(v)?.[C],A=l&&void 0===M?.ref.qText||!M?N_({node:c,parent:g,root:m,x:D,y:E,pageY:C,getDimensionInfoIndex:f,visibleMeasureInfo:d,dimensionInfo:o[D],attrExprInfoIndex:i[D],isLeftColumn:!0,...l&&{isIndentModeEnabled:l,indentLevel:y},env:a,pageInfo:r,labelStructure:S,direction:s,pseudoDimMeasureIndex:I}):e[v][C];if(e[v][C]=A,c.qSubNodes.length){const e=l?0:v+1;t(m||A,A,c.qSubNodes,e,y)}})}(null,null,t,0,-1),e},j_=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},F_=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},z_=({prevData:e,nextDataPage:t,...n})=>{const{qLeft:r,qArea:o}=t;if(!r.length)return e;const i=__({...n,grid:e.grid,qLeft:r,qArea:o});j_(i,n.pageInfo.rowsOnCurrentPage);const a=F_(i,n);return{...e,grid:i,columnCount:i.length,totalDividerIndex:a}},W_=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach((t,n)=>{t.forEach((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:qP(),ref:t,isNull:l}})}),o},$_=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?W_({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},H_=(e,t)=>e?.background===t?.background&&e?.color===t?.color,B_=e=>{const t=e?.trim()??"";return t.startsWith("Error: ")?"":t},V_=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,b=e[h][g]??N_({node:f,parent:p,root:a,x:g,y:h,pageY:h,getDimensionInfoIndex:r.getDimensionInfoIndex,visibleMeasureInfo:r.visibleMeasureInfo,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[h][g]=b,f.qSubNodes.length&&t(a||b,b,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},G_=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=V_(e.grid,c,u,n,r,o,i,a,s,l);j_(d,n.size.x);const p=F_(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},U_=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),Y_=(e,t)=>{const n=qf(Th),r=qf(qh),o=qf(Zk),i=qf(Uq),a=qf(Wk),s=qf(Nk),l=qf(Vk),c=qf($k),u=qf(Hk),d=qf(Bk),p=qf(Gk),h=qf(Uk),g=qf(kk),v=qf(Hq),y=qf(tO),x=qf(Qk),[S,w]=m(null),C=((e,t,n)=>b(()=>({left:e.map(U_),top:t.map(U_),measures:n.map(U_)}),[n,e,t]))(e,t,a),E=b(()=>r("VNA-965-PIVOT-MEASURE-GROUPS")?(({size:e,visibleMeasureInfo:t,getMeasureInfoIndexFromCellIndex:n,visibleTopDimensionInfo:r,isHeaderColorEnabled:o})=>{if(1!==r.length||r[0]!==Sk)return[];const i=[];for(let r=0;r<e.x;r+=1){const e=t.at(n(r,!0)),a=B_(e?.groupName),s=i.at(-1),l=o?zN(e?.headerColor):void 0;a&&s&&s.label===a&&s.start+s.span===r?(H_(s.headerColor,l)||(s.headerColor=void 0),s.span+=1):i.push({start:r,span:1,label:a,headerColor:l})}return i.some(e=>e.label)?i:[]})({size:g,visibleMeasureInfo:a,getMeasureInfoIndexFromCellIndex:h,visibleTopDimensionInfo:t,isHeaderColorEnabled:r("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")}):[],[r,g,a,h,t]),I=b(()=>HN(i,v,t,e,r,E.length>0),[i,v,t,e,r,E.length]),D=I.size.y-(E.length>0?1:0),M=f(()=>y.slice(1).reduce((e,t)=>$_({prevData:e,dataPage:t,pageInfo:x}),((e,t)=>{const{qData:n,qArea:r}=e;return W_({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(y[0],x)),[y,x]),A=f(()=>y.slice(1).reduce((e,r)=>G_({prevData:e,nextDataPage:r,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:C.top,headerRows:D,env:n,pageInfo:x,direction:o}),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=V_([],c,l,t,n,r,o,i,a,s);j_(u,t.size.x);const d=F_(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(y[0],i,t,C.top,D,n,x,o)),[y,i,t,C.top,D,n,x,o]),L=f(()=>y.slice(1).reduce((t,r)=>z_({prevData:t,nextDataPage:r,pageInfo:x,isIndentModeEnabled:s,leftDimensionInfoIndexes:l,hasPseudoDimOnLeft:c,visibleMeasureInfo:a,nullValueText:u,dimensionNullValueText:d,getDimensionInfoIndex:p,visibleLeftDimensionInfo:e,attrExprInfoIndexes:C.left,env:n,direction:o}),(({dataPage:e,size:t,...n})=>{const{qArea:r,qLeft:o}=e,i=__({...n,grid:[],qLeft:o,qArea:r});j_(i,n.pageInfo.rowsOnCurrentPage);const a=F_(i,n);return{grid:i,columnCount:i.length,layoutSize:t,totalDividerIndex:a}})({dataPage:y[0],size:g,pageInfo:x,isIndentModeEnabled:s,leftDimensionInfoIndexes:l,hasPseudoDimOnLeft:c,visibleMeasureInfo:a,nullValueText:u,dimensionNullValueText:d,getDimensionInfoIndex:p,visibleLeftDimensionInfo:e,attrExprInfoIndexes:C.left,env:n,direction:o})),[y,x,e,C,n,o,a,s,l,c,u,d,p,g]),[R,P]=m(()=>M()),[T,q]=m(()=>A()),[k,O]=m(()=>L());jq(()=>{P(M())},[M]),jq(()=>{q(A())},[A]),jq(()=>{O(L())},[L]),jq(()=>{S&&S.forEach(r=>{P(e=>$_({prevData:e,dataPage:r,pageInfo:x})),q(e=>G_({prevData:e,nextDataPage:r,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:C.top,headerRows:D,env:n,pageInfo:x,direction:o})),O(t=>z_({prevData:t,nextDataPage:r,pageInfo:x,isIndentModeEnabled:s,leftDimensionInfoIndexes:l,hasPseudoDimOnLeft:c,visibleMeasureInfo:a,nullValueText:u,dimensionNullValueText:d,getDimensionInfoIndex:p,visibleLeftDimensionInfo:e,attrExprInfoIndexes:C.left,env:n,direction:o}))})},[S]);const N=f(e=>{w(e)},[]);return{headersData:I,measureData:R,topDimensionData:T,leftDimensionData:k,measureGroups:E,attrExprInfoIndexes:C,nextPageHandler:N}},K_=Math.sqrt(1e4),X_=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/yA.PixelsMin)}),J_=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/K_),r=Math.ceil(e.qHeight/K_);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*K_,qTop:e.qTop+n*K_,qWidth:Math.min(K_,e.qWidth-o*K_),qHeight:Math.min(K_,e.qHeight-n*K_)});return t};function Z_({nextPageHandler:e}){const t=qf(Xk),n=qf(kh),r=qf(Qk),o=qf(Uq),i=qf(Uk),a=qf(Tk),s=(e=>{const t=l(e);return t.current=e,t})(r.page),c=t,u=f(async(e,t)=>{try{await(c?.collapseLeft(xk,e,t,!1))}catch(e){n.error({msg:"Failed to collapse left",payload:e})}},[c,n]),d=f(async(e,t)=>{try{await(c?.collapseTop(xk,e,t,!1))}catch(e){n.error({msg:"Failed to collapse top",payload:e})}},[c,n]),p=f(async(e,t)=>{try{await(c?.expandLeft(xk,e,t,!1))}catch(e){n.error({msg:"Failed to expand left",payload:e})}},[c,n]),h=f(async(e,t)=>{try{await(c?.expandTop(xk,e,t,!1))}catch(e){n.error({msg:"Failed to expand top",payload:e})}},[c,n]),m=f(async t=>{if(c?.getHyperCubePivotData&&0!==t.length)try{const n=await c.getHyperCubePivotData(xk,t.reduce((e,t)=>[...e,...J_(t)],[]));s.current===r.page&&e(n)}catch(e){n.error({msg:"Failed to fetch pivot pages",payload:e})}},[c,e,r,s,n]),g=f((e,{dimensionInfoIndex:r,isLeftColumn:o,x:s=0,columnWidthLocation:l})=>{const{qMeasureInfo:c,qDimensionInfo:u,topHeadersColumnWidth:d}=a.qHyperCube;let p=[];switch(l){case LT.Dimension:p=[{qPath:`${xk}/qDimensions/${r}/qDef/columnWidth`,oldValue:u[r].columnWidth}];break;case LT.Measures:if(o)p=c.map((e,t)=>({qPath:`${xk}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=i(s);p=[{qPath:`${xk}/qMeasures/${e}/qDef/columnWidth`,oldValue:c[e].columnWidth}]}break;case LT.Pivot:p=[{qPath:`${xk}/topHeadersColumnWidth`,oldValue:d}]}const f=p.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(f,!0).catch(e=>{n.error({msg:"Failed to apply column width",payload:e})})},[t,a,i,n]),v=f(async e=>{try{await(c?.applyPatches([{qPath:`${xk}/indentModeColumnWidth`,qOp:a.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...o.indentModeColumnWidth,...e})}],!0))}catch(e){n.error({msg:"Failed to apply indent mode column width",payload:e})}},[c,a,o,n]);return b(()=>({collapseLeft:u,collapseTop:d,expandLeft:p,expandTop:h,applyColumnWidth:g,applyIndentModeColumnWidth:v,fetchPages:m}),[u,d,p,h,g,v,m])}const Q_=(e,t,n)=>(r,o)=>{if("P"===r)return Sk;const i=t[n+o];return e[i]},ej=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},tj=c({}),nj=()=>h(tj),rj=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}=qf(Tk),r=qf(tO);return b(()=>{const o=ej(r[0]?.qLeft??[]),i=ej(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(Q_(n,t,0)),visibleTopDimensionInfo:i.map(Q_(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,measureGroups:s,attrExprInfoIndexes:l,nextPageHandler:c}=Y_(t,n),u=Z_({nextPageHandler:c}),d=b(()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o,measureGroups:s},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:l,dataModel:u}),[t,n,r,o,i,a,s,l,u]);return fi.jsx(tj.Provider,{value:d,children:e})},oj=(e,t)=>{const n=Math.min(Math.max(e.rowIdx,t.minRow),t.maxRow),r=Math.min(Math.max(e.colIdx,t.minCol),t.maxCol);return{...e,rowIdx:n,colIdx:r}},ij=e=>(e=>[bA.Left,bA.Right,bA.Up,bA.Down].includes(e))(e)||[bA.Home,bA.End,bA.PageUp,bA.PageDown].includes(e),aj=()=>{const e=qf(qh)("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE"),{gridSectionsData:t}=nj(),n=qf(kN),r=qf(ON),o=kf(NN),i=qf(PN);return{handleKeyDown:a=>{if(!e)return;if(!(e=>ij(e.key)&&!(e=>e.shiftKey&&(e=>e.ctrlKey||e.metaKey)(e))(e))(a))return;a.preventDefault();const s=r.focusCoord,l={HEADER:{colCount:t.headersData.size.x,rowCount:t.headersData.size.y},TOP:{colCount:t.topDimensionData.layoutSize.x,rowCount:t.topDimensionData.rowCount},LEFT:{colCount:t.leftDimensionData.columnCount,rowCount:t.leftDimensionData.layoutSize.y},DATA:{colCount:t.topDimensionData.layoutSize.x,rowCount:t.leftDimensionData.layoutSize.y}},c=s?((e,t,n)=>{const r=e?.section??"HEADER",o={minRow:0,maxRow:n[r].rowCount-1,minCol:0,maxCol:n[r].colCount-1};switch(t){case bA.Down:if(e.rowIdx<o.maxRow)return{...e,rowIdx:e.rowIdx+1};if("TOP"===e.section)return{...e,rowIdx:0,section:"DATA"};if("HEADER"===e.section){const t={minRow:0,maxRow:n.LEFT.rowCount-1,minCol:0,maxCol:n.LEFT.colCount-1};return oj({...e,rowIdx:0,section:"LEFT"},t)}return e;case bA.Up:return e.rowIdx>o.minRow?{...e,rowIdx:e.rowIdx-1}:"DATA"===e.section?{...e,rowIdx:n.TOP.rowCount-1,section:"TOP"}:"LEFT"===e.section?{...e,rowIdx:n.HEADER.rowCount-1,section:"HEADER"}:e;case bA.Right:return e.colIdx<o.maxCol?{...e,colIdx:e.colIdx+1}:"LEFT"===e.section?{...e,colIdx:0,section:"DATA"}:"HEADER"===e.section?{...e,colIdx:0,section:"TOP"}:e;case bA.Left:return e.colIdx>o.minCol?{...e,colIdx:e.colIdx-1}:"DATA"===e.section?{...e,colIdx:n.LEFT.colCount-1,section:"LEFT"}:"TOP"===e.section?{...e,colIdx:n.HEADER.colCount-1,rowIdx:0,section:"HEADER"}:e;case bA.Home:return{...e,colIdx:0};case bA.End:return{...e,colIdx:n[e.section].colCount-1};case bA.PageDown:{const t={...e,rowIdx:e.rowIdx+10};return oj(t,o)}case bA.PageUp:{const t={...e,rowIdx:e.rowIdx-10};return oj(t,o)}default:return e}})(s,a.key,l):{section:"HEADER",rowIdx:0,colIdx:0};if(!n)return;n(c);const u=r.pivotSection.WRAPPER;u&&((e,t,n,r)=>{const o=t=>{r&&!r()||e()||t>0&&requestAnimationFrame(()=>{o(t-1)})};requestAnimationFrame(()=>{o(t)})})(()=>{const e=(t=c,u.querySelector(`[data-pivot-section="${t.section}"][data-row-idx="${t.rowIdx}"][data-col-idx="${t.colIdx}"]`));var t;if(!e)return!1;const n=r.pivotSection[c.section];if(!n)return!1;const i=((e,t)=>{if(!e||!t)return!1;const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right})(e,n);var a;return i&&(o(c),(a=e)&&(a.focus(),(e=>{e?.setAttribute("tabIndex","0")})(a))),i},5,0,()=>!i?.current)}}},sj=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const e=qf(oO),t=qf(iO),n=qf(jk),r=qf(Ok),o=e.getStyle("","","fontFamily")??ZT;return r?n?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:o,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:o,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:fi.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:fi.jsx("span",{style:{...sq,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},lj=20,cj=18,uj=.75,dj=e=>-1!==e&&e?.representation?.type===gT.Image,pj=({isLeftColumn:e,isIndentModeEnabled:t,representation:n})=>Boolean(e)&&t&&n.type===gT.Image,fj=e=>void 0===e?QT:e,hj=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},mj=e=>hj(e,yA.PixelsDefault),gj=(e,t)=>hj(e,yA.PercentageDefault)*t/100,bj=(e,t,n)=>{switch(t?.type){case xA.Pixels:return mj(t.pixels);case xA.Percentage:return gj(t.percentage,e);case xA.FitToContent:case xA.Auto:default:return n}},vj=({headers:e,qNoOfLeftDims:t,qDimensionInfo:n,isIndentModeEnabled:r,effectivePropertiesService:o,estimateWidthForDimensionValue:i,shouldConsiderCombinatedLength:a,measureTextForHeader:s,longestMeasureValuePossible:l})=>e.reduce((e,c,u)=>{const{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=c,m=n.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===wk)return e+0;const b=pj({isLeftColumn:h,isIndentModeEnabled:r,representation:m?.representation||{type:gT.Text}})?g.width+8+4:i(f),v=!o.qAlwaysFullyExpanded&&p<t-1?21:0;let y=0;if(a&&s&&l){y=s("- ")+l}return Math.max(e,24*u+cj+v+b+y)},0),yj=(e,t,n)=>e.reduce((e,r)=>{const o=(n?0:1)*cj;return Math.max(e,o+t(r.qFallbackTitle??""))},0),xj=(e,t,n,r)=>{const o=100*e/t,i=r*uj*(o/100),a=o/100*+n;return Math.min(a,i)},Sj=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),wj=(e,t)=>e.some(e=>e>=t*uj),Cj=({qNoOfLeftDims:e,qDimensionInfo:t,isIndentModeEnabled:n,visibleMeasureInfo:r,hasPseudoDimOnLeft:o,indentModeColumnWidth:i,effectivePropertiesService:a,headersData:s,columnWidths:l,tableWidth:c,widthOverride:u,measureTextForHeader:d,estimateWidthForDimensionValue:p,measureTextWidthForMeasuresCombinedWithDimensions:f,translator:h})=>{let m;const g=c*uj,b=s.data[s.data.length-1][0];if(!Array.isArray(b))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const v=Math.min(g,l.at(-1)),y=Math.min(g,vj({headers:b,qNoOfLeftDims:e,qDimensionInfo:t,isIndentModeEnabled:n,effectivePropertiesService:a,estimateWidthForDimensionValue:p})),x=Math.min(g,yj(r,d));let S;const w=b.findIndex(e=>e.id===wk),C=(({indentModeColumnWidth:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e;return o===xA.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+cj+16:24})({indentModeColumnWidth:i,measureTextForHeader:d,translator:h,headersData:s});if(o)if(0===w){const e=Math.max(v,y,x);m=[Math.max(C,e-v),v]}else{const o=Math.min(g,yj(r,f,!0));S=Math.min(g,vj({headers:b.slice(0,w),qNoOfLeftDims:e,qDimensionInfo:t,isIndentModeEnabled:n,effectivePropertiesService:a,estimateWidthForDimensionValue:p,shouldConsiderCombinatedLength:!0,measureTextForHeader:d,longestMeasureValuePossible:o}));const i=Math.max(v,y,S);m=[Math.max(C,i-v),v]}else m=[Math.max(C,y-v),v];const E=Math.min(g,m.reduce((e,t)=>e+t,0));u&&u<=g&&(i.type=xA.Pixels,i.pixels=u);return[xA.Pixels,xA.Percentage].includes(i.type)||wj(m,c)?((e,t,n,r)=>{let o=e[0],i=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:c}=t,u=hj(l,yA.PixelsDefault),d=hj(c,yA.PercentageDefault),p=wj(e,n);let f;s===xA.Auto&&p&&(o>i?o-=i:i-=o),s===xA.Pixels&&u&&(o=xj(e[0],a,u,n),i=xj(e[1],a,u,n)),s===xA.Percentage&&d&&(o=Sj(e[0],a,d,n),i=Sj(e[1],a,d,n)),i<=r&&(f=o-5,f>0&&(o-=f,i+=f)),f=i-r,f>0&&(o+=f,i-=f);const h=[o,i],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(m,i,c,v):{leftGridWidth:E,leftGridColumnWidths:m,leftGridFullWidth:E}};function Ej({tableWidth:e}){const t=e*uj,n=qf(rO),{indentModeColumnWidth:r}=qf(Uq),o=qf(Wk),i=qf($k),a=qf(zk),s=qf(Tk),l=qf(Nk),c=qf(Hq),u=qf(iO),{gridSectionsData:{headersData:d}}=nj(),{measureText:p}=qq(n.header,{allowLineBreaks:!1}),{estimateWidth:h,measureText:g}=qq({...n.dimensionValues,fontWeight:fj(n.dimensionValues.fontWeight)}),{measureText:b}=qq({...n.dimensionValues,...n.measureLabels}),v=f((n,f)=>{const{qNoOfLeftDims:m,qDimensionInfo:v,topHeadersColumnWidth:y}=s.qHyperCube,x=(t=0)=>o.reduce((n,{qFallbackTitle:r,columnWidth:o})=>{const i=b(r)+cj,a=Math.max(i,t);return Math.max(n,l?a:bj(e,o,a))},0),S=e=>d.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===wk)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?lj:0;return cj+p(t)+lj+r})(r);return Math.max(o,t)},0);let w=0,C=d.data.at(-1);l&&d.size.x>1&&C&&C[0]&&(C=C[0]);const E=C.map((o,s)=>{let u;if(l&&1!==d.size.x||!n||void 0===f||f!==o.colIdx){let t,n;if(o.columnWidthLocation===LT.Pivot?t=l?void 0:y:o.columnWidthLocation===LT.Dimension&&({columnWidth:t}=o),o.isLeftDimension)if(o.id===wk)n=x();else{const e=S(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:r,dimensionInfoIndex:o}=e,i=a(o);if(dj(i))return yA.PixelsDefault;const s=!c.qAlwaysFullyExpanded&&r&&t<m-1?21:0;return cj+h(n)+s})(o,s);n=Math.max(e,t),l&&!i&&s+1===m&&o.columnWidthLocation===LT.Dimension&&d.size.x>1&&(n=e)}else n=S(s),o.columnWidthLocation===LT.Measures&&(n=x(n));l&&1===d.size.x&&(t=r),u=l&&!i&&d.size.x>1?n:bj(e,t,n)}else u=l?Math.min(t,n):n;return w+=u,u});return l&&d.size.x>1?Cj({qNoOfLeftDims:m,qDimensionInfo:v,isIndentModeEnabled:l,visibleMeasureInfo:o,hasPseudoDimOnLeft:i,indentModeColumnWidth:r,effectivePropertiesService:c,headersData:d,columnWidths:E,tableWidth:e,widthOverride:n,measureTextForHeader:p,estimateWidthForDimensionValue:h,measureTextWidthForMeasuresCombinedWithDimensions:g,translator:u}):{leftGridWidth:Math.min(t,w),leftGridColumnWidths:E,leftGridFullWidth:w}},[e,d,l,s,o,i,r,a,t,p,b,h,g,u,c]),[y,x]=m(v);jq(()=>{x(v())},[v]);const S=f((e,t)=>{x(v(e,t))},[v]);return{...y,overrideLeftGridWidth:S}}function Ij({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const r=qf(rO),o=qf(Uk),i=qf(Wk),{visibleDimensionsInfo:{visibleTopDimensionInfo:a}}=nj(),{qHyperCube:{qNoOfLeftDims:s,qEffectiveInterColumnSortOrder:l}}=qf(Tk),c=qf(kk),{estimateWidth:u,measureText:d}=qq(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=qq({...r.dimensionValues,fontWeight:fj(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=a.at(-1),g=m===Sk,v=l.length-s>a.length?21:0,y=b(()=>{const e=g?i:[m],t=c.x/e.length,n=[],r=[];let o=h;const a=(e,r)=>{n[e]=Math.min(yA.PixelsMax,Math.max(yA.PixelsMin,r)),o-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:s},qApprMaxGlyphCount:l,qFallbackTitle:c}=e;switch(n){case xA.Pixels:a(t,mj(o));break;case xA.Percentage:a(t,gj(s,h));break;case xA.FitToContent:a(t,((e,t,n)=>n?yA.PixelsDefault:cj+(g?Math.max(u(e),d(t)):Math.max(Math.max(...i.map(e=>u(e.qApprMaxGlyphCount))),p(e)+v)))(l,c??"",dj(e)));break;case xA.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,i=o/e;r.forEach(e=>{n[e]=Math.max(yA.AutoMinPivot,i)})}return n},[g,i,m,c.x,h,u,d,p,v]),x=b(()=>{if(g){return i.reduce((e,t,n)=>e+y[n],0)/i.length}return y[0]},[g,y,i]),S=c.x*x,w=Math.max(0,h-S),C=Math.max(0,t-w),E=parseFloat((C/c.x).toFixed(12)),I=f(e=>(g&&void 0!==e?y[o(e,!0)]:x)-E,[g,y,o,x,E]);return{rightGridFullWidth:S,rightGridWidth:Math.min(S,h),getRightGridColumnWidth:I}}const Dj=`scrollable-container--${PT.TopGrid}`,Mj=`scrollable-container--${PT.LeftGrid}`,Aj=`scrollable-container--${PT.DataGrid}`,Lj=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},Rj=(e,t)=>e>t?TT.Forward:e<t?TT.Backward:TT.None,Pj=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const s=qf(Zk);d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),u.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[i,o,a,e,t,n,r,s])},Tj=Sf(!1),qj=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,kj=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:o,data:i,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,o]=m({width:0,height:0}),[i,a]=m({width:0,height:0}),[s,c]=m({width:0,height:0}),[u,p]=m(!1),h=qf(Tj),g=l(h),b=l(h);g.current=h;const v=f(()=>{p(e=>!e&&e);const r=Lj(e.current),i=Lj(t.current),s=Lj(n.current);o(e=>qj(e,r)?r:e),a(e=>qj(e,i)?i:e),c(e=>qj(e,s)?s:e)},[e,t,n]);d(()=>{const r=new ResizeObserver(()=>{g.current||v()});return[e.current,t.current,n.current].filter(e=>Boolean(e)).forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[v,e,t,n]),d(()=>{const e=b.current;if(b.current=h,e&&!h){const e=setTimeout(v,0);return()=>{clearTimeout(e)}}},[h,v]);const y=f(()=>{p(!0)},[]);return{top:r,left:u?{...i,height:0}:i,data:u?{...s,height:0}:s,resetHorizontalScrollbarHeight:y}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,i.width),horizontalScrollbarHeight:Math.max(o.height,i.height)},resetHorizontalScrollbarHeight:a}},Oj=()=>{const e=qf(Vq),t=l(null),n=l(null),r=l(null),o=l(null),i=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u},resetHorizontalScrollbarHeight:p}=kj({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const s=qf(Qk),l=qf($q),c=qf(aO),u=qf(Tk),d=qf(_k),p=qf(qk),h=f(()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)},[e,t,n,r]);g(()=>{h()},[s.page,h]),g(()=>{d||h()},[u,d,h]),g(()=>{if(d){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach(e=>{e?.scrollTo(t)}),o.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[u,d,r,a,i,o]),g(()=>{(l.isDownloadedAsPDForImage||p)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)},[c,l,p,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:b}}=(()=>{const e=l(TT.None),t=l(TT.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=f(r=>{if(r instanceof WheelEvent&&(e.current=Rj(r.deltaY,0),t.current=Rj(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=Rj(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=Rj(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),v=(()=>{const e=qf(aO);return f(t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===Mj&&(e.leftGridScrollLeft=r.scrollLeft),o===Aj&&(e.scrollLeft=r.scrollLeft),o===Dj&&(e.topGridScrollTop=r.scrollTop),o!==Mj&&o!==Aj||(e.scrollTop=r.scrollTop)},[e])})(),y=f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current}),[t,n,r,o]),x={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},getWrapperElements:y,updateViewService:v,trackScrollDirection:h,interactions:e};(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{d(()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{e.ctrlKey||(e.preventDefault(),o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t))},f=r=>{r.ctrlKey||(r.preventDefault(),c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(c.scrollLeft)}),l.scrollTop=c.scrollTop,t.current?.forEach(e=>{e?.scrollTo(c.scrollTop)}),i(r))};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",f),a.scroll||setTimeout(()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)},0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)}},[i,o,a,e,t,n,r])})(x),Pj(x);const S=f(e=>{switch(e.section){case"TOP":i.current[0]?.scrollToItem(e.rowIdx);break;case"LEFT":a.current[0]?.scrollToItem(e.rowIdx);break;case"DATA":s.current?.scrollToItem({rowIndex:e.rowIdx,columnIndex:e.colIdx})}},[]);return{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:b},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u,resetHorizontalScrollbarHeight:p},scrollToCoordCallBack:S}},Nj=()=>{const e=qf(jk),t=qf(nO),n=qf(Qk);return b(()=>{let{height:r}=t;return e&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},_j=({children:e,style:t})=>fi.jsx("div",{"data-testid":"fullSize",style:t,children:e}),jj=({children:e,style:t})=>{const n=qf(Zk);return fi.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},Fj=e=>e&&`scrollable-container--${e}`,zj=({children:e,style:t,origin:n},r)=>{const o=qf(Vq).scroll?t:{overflow:"hidden"};return fi.jsx("div",{"data-testid":"scrollable","data-key":Fj(n),style:o,ref:r,children:e})};var Wj=n.forwardRef(zj);const $j=({children:e,style:t})=>{const n=qf(Zk);return fi.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var Hj=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Bj(e,t){return e===t||!(!Hj(e)||!Hj(t))}function Vj(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Bj(e[n],t[n]))return!1;return!0}function Gj(e,t){var n;void 0===t&&(t=Vj);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var Uj="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Yj(e){cancelAnimationFrame(e.id)}function Kj(e,t){var n=Uj();var r={id:requestAnimationFrame(function o(){Uj()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var Xj=-1;function Jj(e){if(void 0===e&&(e=!1),-1===Xj||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Xj=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Xj}var Zj=null;function Qj(e){if(void 0===e&&(e=!1),null===Zj||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Zj="positive-descending":(t.scrollLeft=1,Zj=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Zj}return Zj}var eF=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function tF(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,Ks(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Ks(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Gj(function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=Gj(function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),f=e+":"+t;if(u.hasOwnProperty(f))o=u[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;u[f]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=Gj(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(Qj()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Yj(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Kj(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}Fs(t,e),t.getDerivedStateFromProps=function(e,t){return nF(e,t),b(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=Jj();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=s(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?b:0,x=v>d?b:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(Qj()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Yj(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?eF:f,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,v=e.style,y=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],M=I[1],A=[];if(o>0&&b)for(var L=D;L<=M;L++)for(var R=C;R<=E;R++)A.push(r(t,{columnIndex:R,data:p,isScrolling:y?S:void 0,key:h({columnIndex:R,data:p,rowIndex:L}),rowIndex:L,style:this._getItemStyle(L,R)}));var P=s(this.props,this._instanceProps),T=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Te({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},r(u||d||"div",{children:A,ref:c,style:{height:P,pointerEvents:S?"none":void 0,width:T}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,v=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(b,v,g,x,y)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=o(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=h(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var nF=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},rF=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},oF=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},iF=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},aF=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?sF(e,t,n,i,0,r):lF(e,t,n,Math.max(0,i),r)},sF=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=iF(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},lF=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&iF(e,t,r,n).offset<o;)r+=a,a*=2;return sF(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},cF=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=iF(e,t,n,i),c="column"===e?oF(t,i):rF(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},uF=tF({getColumnOffset:function(e,t,n){return iF("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return aF("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=iF("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=iF("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:rF,getEstimatedTotalWidth:oF,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return cF("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return cF("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return iF("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return aF("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=iF("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=iF("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),dF=function(e,t){return e};function pF(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Ks(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ks(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Gj(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=Gj(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Gj(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(Qj()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Yj(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Kj(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}Fs(t,e),t.getDerivedStateFromProps=function(e,t){return fF(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?Jj():0:l.scrollHeight>l.clientHeight?Jj():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(Qj()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Yj(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?dF:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var M=E;M<=I;M++)D.push(r(t,{data:d,key:f(M,d),index:M,isScrolling:v?x:void 0,style:this._getItemStyle(M)}));var A=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Te({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},b)},r(l||c||"div",{children:D,ref:s,style:{height:S?"100%":A,pointerEvents:x?"none":void 0,width:S?A:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var fF=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},hF=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},mF=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=hF(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},gF=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&hF(e,n,t).offset<r;)n+=i,i*=2;return mF(e,t,Math.min(n,o-1),Math.floor(n/2),r)},bF=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},vF=pF({getItemOffset:function(e,t,n){return hF(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:bF,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=hF(e,t,o),p=bF(e,o),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?mF(e,t,o,0,n):gF(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=hF(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=hF(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function yF(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var xF=["style"],SF=["style"];function wF(e,t){var n=e.style,r=qe(e,xF),o=t.style,i=qe(t,SF);return!yF(n,o)&&!yF(r,i)}const CF=10,EF=(e,t)=>e.current===TT.Backward?t:0,IF=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},DF=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,MF=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(IF(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&DF(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},AF=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===TT.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return MF({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},LF=({pageInfo:e,measureData:t,scrollDirection:n,size:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.x,l=EF(n,CF),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+CF,s-c),pageTop:o,qHeight:a}})(r,o,n),c=MF({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...AF({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.x})]:c},RF=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},PF=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,TF=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(RF(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&PF(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},qF=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=EF(n,CF),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+CF,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=TF({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===TT.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=TF({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},kF=(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],f=[];i.current!==TT.None&&(p=qF({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==TT.None&&(f=LF({pageInfo:r,measureData:n,scrollDirection:a,size:t,viewService:o})),i.current===TT.None&&a.current===TT.None&&(p=TF({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},OF=function(e,t=50){let n,r,o,i=0;return function(...a){n=this,r=a;const s=Date.now()-i,l=()=>{i=Date.now(),o=0,e.apply(n,r)};o||(s>=t?l():o=setTimeout(l,t-s))}}(kF,100),NF=OR(kF,75),_F=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),jF=()=>{const e=qf(qh)("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE"),t=kf(NN);return{handleClick:(n,r,o)=>{e&&t({section:n,rowIdx:r,colIdx:o})}}},FF=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const s=qf(Zk),{grid:{border:l,divider:c}}=qf(rO);return fi.jsx("div",{style:{...e,...aq,...uq(n,r,l,s,o),...pq({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},zF=({verticalAlign:e,width:t,isLeftColumn:n})=>{const r=qf(Nk);return{display:"flex",flexDirection:"row",width:t,maxWidth:"100%",maxHeight:"100%",...!(n&&r)&&{alignItems:e,alignSelf:e,overflow:"hidden"}}},WF=({children:e,...t})=>fi.jsx("div",{"data-key":"cell-container",style:zF(t),children:e}),$F=({children:e,right:t,...n})=>fi.jsx("div",{"data-key":"sticky-cell-container",style:{...zF(n),position:"sticky",left:4,top:0,bottom:0,right:t},children:e}),HF=e=>{const{type:t,imageSize:n,bar:r}=e;return t===gT.Bar&&r?"100%":t!==gT.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},BF="min(50px, 20%)",VF=({bar:e,height:t})=>{const{value:n,offsetValue:r,columnMin:o,columnMax:i,isManualRange:a,thicknessPx:s,barEnd:l}=e,c=a?o:Math.min(o,0);let u=a?i:Math.max(i,0);u>c||(u=c+1);const d=r,p=r+n,f=n>=0,h=Math.min(d,p),m=Math.max(d,p),g=Math.round(((e,t,n)=>Math.max(t,Math.min(n,e)))(s??("none"===l?1*t:4),2,Math.max(2,t-2))),b=Math.min(((e,t)=>"circle"===e?2*t:"box"===e?t+4:0)(l,g),t),v=Math.min(d,p)<c,y=Math.max(d,p)>u,x="none"===l?25:10+("none"===l?0:b/2+2);return{rangeMin:c,rangeMax:u,hasRoomAtMin:e.hasNegativeValues??(a||c<0||!f),hasRoomAtMax:e.hasPositiveValues??(a||i>=0||f),low:h,high:m,valueEnd:f?m:h,growsTowardsHigh:f,overflowMin:v,overflowMax:y,hasBar:m>h&&m>c&&h<u,thicknessPx:g,capSize:b,hasZeroAxis:c<=0&&u>=0,oobSizePx:x}},GF=As("div")({position:"relative",width:"100%",overflow:"hidden"}),UF=As("div")({position:"absolute"}),YF=As("span")({position:"absolute",top:0,height:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),KF=As("svg")({position:"absolute",display:"block"}),XF=({shape:e,pointsRight:t,width:n,height:r})=>{if("slice"===e)return`M0 0L${n-8} ${r}L0 ${r}ZM8 0L${n} ${r}L${n} 0Z`;const o=n/2,i=o*Math.sin(Math.PI/3),a=t?o/2:1.5*o;return`M${a} ${o-i}L${t?n:0} ${o}L${a} ${o+i}Z`},JF=({height:e,theme:t,bar:n,direction:r,fontFamily:o,fontSize:i,textDecoration:a})=>{const s=(({bar:e,height:t,isRtl:n})=>{const r=VF({bar:e,height:t}),{rangeMin:o,rangeMax:i,low:a,high:s,overflowMin:l,overflowMax:c,thicknessPx:u,capSize:d,oobSizePx:p}=r,f=r.hasRoomAtMin?BF:"0px",h=r.hasRoomAtMax?BF:"0px",m=f,g=`calc(100% - ${h})`,b=e=>{const t=(Math.min(Math.max(e,o),i)-o)/(i-o);return`calc(${f} + ${t} * (100% - ${f} - ${h}))`},v="none"===e.barEnd,y=v?25:10,x=c?`max(${g} - ${p}px, ${l?m:b(a)})`:b(s),S=l?`min(${m} + ${p}px, ${c?g:b(s)})`:b(a),w=r.growsTowardsHigh?x:S,C=e=>Math.floor((t-e)/2),E=C(u),I=d>0?d/2+4:4,D=e=>{const t=v?u:10;return{key:e,shape:v?"slice":"triangle",pointsRight:"max"===e!==n,width:y,height:t,style:{..."min"===e?{insetInlineStart:f}:{insetInlineEnd:h},top:C(t),width:y,height:t}}};return{zeroAxis:r.hasZeroAxis?{insetInlineStart:`calc(${b(0)} - 0.5px)`,top:0,width:1,height:"100%"}:void 0,bar:r.hasBar?{insetInlineStart:S,width:`max(1px, ${x} - ${S})`,top:E,height:u}:void 0,cap:r.hasBar&&d>0?{insetInlineStart:`calc(${w} - ${d/2}px)`,top:C(d),width:d,height:d,borderRadius:"circle"===e.barEnd?"50%":void 0}:void 0,label:e.label?r.growsTowardsHigh?{insetInlineStart:c?`calc(${g} + 4px)`:l?`max(${x} + ${I}px, ${m} + ${y+4}px)`:`calc(${x} + ${I}px)`,insetInlineEnd:"4px",textAlign:"start"}:{insetInlineStart:"4px",insetInlineEnd:`calc(100% - ${l?`calc(${m} - 4px)`:c?`min(${S} - ${I}px, ${g} - ${y+4}px)`:`calc(${S} - ${I}px)`})`,textAlign:"end"}:void 0,markers:[l?D("min"):void 0,c?D("max"):void 0].filter(e=>void 0!==e)}})({bar:n,height:e,isRtl:"rtl"===r}),l=n.color??UR(t,n.colorPalette,t.getDataColorSpecials().primary),c=n.labelColor??UR(t,n.labelColorPalette,"inherit");return fi.jsxs(GF,{"data-testid":"bar-container",role:"img","aria-label":n.label||n.fallbackLabel,title:n.label||n.fallbackLabel,dir:r,style:{height:e},children:[s.zeroAxis?fi.jsx(UF,{"data-testid":"bar-zero-axis",style:{...s.zeroAxis,backgroundColor:"#d0d0d0"}}):null,s.bar?fi.jsx(UF,{"data-testid":"bar",style:{...s.bar,backgroundColor:l}}):null,s.cap?fi.jsx(UF,{"data-testid":"bar-end-cap",style:{...s.cap,backgroundColor:l}}):null,s.label?fi.jsx(YF,{"data-testid":"bar-label",style:{...s.label,fontFamily:o,fontSize:i??"14px",textDecoration:a,lineHeight:`${e}px`,color:c},children:n.label}):null,s.markers.map(e=>fi.jsx(KF,{"data-testid":`bar-oob-${e.key}`,width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:e.style,children:fi.jsx("path",{d:XF(e),fill:l})},e.key))]})},ZF=e=>{e.stopPropagation()},QF=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:ZF,color:cL.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),ez=({href:e,text:t,interactions:n,color:r})=>fi.jsx(ku,{...QF({href:e,text:t,interactions:n,color:r}),children:t}),tz=Y();tz.use(U),tz.renderer.prio(["canvas"]);const nz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),rz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),oz=x((e,t)=>fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fi.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),fi.jsx("use",{fillRule:"evenodd"})]})),iz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),az=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),sz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),lz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M2 7.5h12v1H2z"})})),cz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),uz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),dz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),pz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),fz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),hz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),mz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),gz=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),bz={m:fz,"ï":dz,R:x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:hz,T:mz,U:gz,P:uz,Q:sz,"è":x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":iz,"©":oz,"23F4":az,2013:pz,"&":cz,add:nz,"minus-2":lz,dot:rz},vz=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&bz[t];return o&&fi.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:fi.jsx(o,{style:{height:e}})})},yz=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),xz=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},Sz=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return CL(e.localPaletteColors[t].color??"").blend(CL(s.color??""),s.t)},wz=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:yz(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:xz(r,t,n)}))),r},Cz=(e,t,n,r)=>{const o=wz(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=Sz(e,a,t);break}r=i}return n})(o,t);return a},Ez=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!hk(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!hk(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},Iz=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=Ez(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!hk(t))return 0;let a=n&&hk(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},Dz=e=>"flex-start"===e?"flex-end":"flex-start",Mz=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=Iz(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return xz(o,n.limitPaletteColorIndex,r);const a=yz(n.limitRange,t);return Cz(o,a,n.limitRange,r)})(o,t,i,r),{paletteColors:s}=o.segments,l=i?.limitPaletteColorIndex||0,c=s[l]?.icon??"dot",{indicator:u}=e;let d=u?.position||"right";return"rtl"===n&&(d="right"===d?"left":"right"),{color:a,iconKey:c,position:d}},Az=({representation:e,cellValue:t,textStyle:n})=>{const r=qf(oO),o=qf(Zk),{text:i,indicator:a}=e,{showTextValues:s,applySegmentColors:l}=a??{},c=Mz(e,t,o,r),u={fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,textDecoration:n.textDecoration},d=parseInt(String(u.fontSize||JT),10),{iconKey:p,color:f,position:h}=c||{},m={display:"flex",paddingTop:2};return s?fi.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:l?f:n?.color},children:["left"===h&&vz({size:d,iconKey:p,color:f,pvStyle:m}),fi.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:n?.direction,...u},children:i}),"right"===h&&vz({size:d,iconKey:p,color:f,pvStyle:m})]}):(m.paddingTop=5,vz({size:d,iconKey:p,color:f,pvStyle:m}))},Lz=e=>!!e.target?.getAttribute("class")?.includes(vA),Rz=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},Pz=e=>null!==e.target?.closest("[data-prevent-selection]"),Tz=e=>"A"===e.target?.tagName,qz=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const kz=c({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),Oz=()=>h(kz),Nz=({children:e,selections:t})=>{const n=function(e){const t=qf(eO),n=qf(kh),r=e.isActive(),[o,i]=u(Rz,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const a=f(async()=>{if(!o.activeSelection)return;var t,r;1===o.activeSelection.clientSelectedCells.size&&(t=o.engineSelectedCells,(r=o.activeSelection).clientSelectedCells.forEach((e,n)=>{t?.has(n)&&(r.clientSelectedCells.delete(n),t.delete(n))}));const a=new Map([...o.engineSelectedCells??new Map,...o.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:a}}),await e.select({method:"selectPivotCells",params:[xk,Array.from(a,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){n.error({msg:"Failed to select pivot cells",payload:e}),i({type:"mouseup",payload:{engineSelectedCells:o.engineSelectedCells}})}},[o,e,n]);d(()=>{if(o.activeSelection)return document.addEventListener("mouseup",a),()=>{document.removeEventListener("mouseup",a)}},[a,o.activeSelection]);const s=f((e,t)=>n=>{const r=t(e);Lz(n)||Pz(n)||Tz(n)||!(e=>1===e.buttons)(n)||!r||i(qz({startIndex:e,getCellFromIndex:t,cell:r}))},[]),l=f(t=>async()=>{o.activeSelection&&(e.isActive()||await e.begin([xk]),i({type:"mouseover",payload:{index:t}}))},[o.activeSelection,e]),c=f((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);Lz(n)||Pz(n)||Tz(n)||!r||(i(qz({startIndex:e,getCellFromIndex:t,cell:r})),a())},[a]),p=f(e=>!(!o.engineSelectedCells?.size&&!o.activeSelection?.clientSelectedCells.size||!o.selectedField||e.selectionCellType===o.selectedField.selectionCellType&&("L"===e.selectionCellType?o.selectedField.index===e.x:o.selectedField.index===e.y)),[o.activeSelection?.clientSelectedCells.size,o.engineSelectedCells?.size,o.selectedField]),h=f(e=>!p(e)&&(o.engineSelectedCells?.has(e.ref.qElemNo)||!!o.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[p,o.activeSelection?.clientSelectedCells,o.engineSelectedCells]);return b(()=>({isSelected:h,isActive:r,isLocked:p,createMouseDownHandler:s,createMouseOverHandler:l,createPointerUpHandler:c}),[h,r,p,s,l,c])}(t);return fi.jsx(kz.Provider,{value:n,children:e})},_z=e=>"fill"===e.representation.imageSize,jz=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&_z(e)&&t&&(n="center"),e.representation.type!==gT.Image||_z(e)?n:e.representation.resolvedImagePosition?.vertical};function Fz(e,t){return t?e?[...new Set(`${e} ${t}`.split(/\s+/).filter(e=>e&&"none"!==e))].join(" "):t:e}var zz=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(zz||{});const Wz={brighter:.5,darker:.3,opacity:.03},$z=(e,{cell:t,styleService:n})=>{if(e===zz.Background||e===zz.Color){const n=t.expressionColor[e];if(n)return n}if(t.isNull)return n.dimensionNull[e];if(e===zz.FontWeight||e===zz.FontStyle){const n=t.expressionTextStyle?.[e];if(n)return n}return t.isPseudoDimension?e===zz.Background&&t.headerColor?.background?t.headerColor.background:e===zz.Color&&t.headerColor?.color?t.headerColor.color:n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},Hz=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=$z(zz.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?$z(zz.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${GR(i=o,Wz)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},Bz=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:$z(zz.Color,{cell:e,styleService:t}),Vz=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=$z(zz.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?QT:o},Gz=({cell:e,styleService:t})=>$z(zz.FontStyle,{cell:e,styleService:t}),Uz=({cell:e,styleService:t})=>{const n=$z(zz.TextDecoration,{cell:e,styleService:t});return e.isNull?n:Fz(n,e.expressionTextStyle?.textDecoration)},Yz=e=>e?"pointer":"default",Kz=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},Xz=(e,t)=>{if(!e.isLeftColumn||e.representation.type===gT.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},Jz=({cell:e,isLeftColumn:t,isCellSelected:n,isSticky:r=!0})=>{const o=qf(rO),i=qf(Nk),a=qf(Vq),{isActive:s}=Oz(),{dataModel:l}=nj();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const c=!a.active||s||!l,u=Bz({cell:e,styleService:o,isCellSelected:n}),d=s?.4:1,p=e.ref.qCanExpand?HO:$O;let f;f=e.ref.qCanExpand?t?l.expandLeft:l.expandTop:t?l.collapseLeft:l.collapseTop;const h=pj({isLeftColumn:t,isIndentModeEnabled:i,representation:e.representation});return fi.jsx(p,{opacity:d,color:u,"data-prevent-selection":!c||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:c?"default":"pointer",...r&&{position:"sticky",top:0},...Xz(e,o),...h&&{alignSelf:jz(e)}},onClick:c?void 0:Kz({cell:e,expandOrCollapse:f})})},Zz=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},Qz=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},eW=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},tW=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,isIndentModeEnabled:i,isMeasureCell:a})=>{const s=pj({isLeftColumn:r,isIndentModeEnabled:i,representation:e}),l=t?21:0,c=e.imageBox?.width??24;let u=`calc(100% - ${l}px)`,d=o.headerCellHeight;r&&s&&(u=c),(a||r)&&(d=o.contentCellHeight);let p=d;switch(r&&void 0!==n&&!i&&(p=d*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:u,maxHeight:p,...s?{width:u}:{}};case"fitWidth":return{width:u,maxHeight:p};case"fitHeight":return{height:p,maxWidth:u,...s?{width:u}:{}};case"fill":return{height:p,width:u};default:return{width:u,height:d}}},nW=e=>{if("alwaysFit"===e)return"contain"},rW=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),oW=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:Qz(e,n,r),height:Zz(e),objectFit:nW(e),objectPosition:eW(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),iW=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const e=qf($q),t=l(null),{promise:n,resolve:r}=b(()=>xq(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:f(()=>{r()},[r]),imageRef:t}})(),i=qf(Nk),{url:a,text:s,imageSize:c,resolvedImagePosition:u}=e,{overflow:p,...h}=t;return fi.jsx("img",{src:a,alt:s,style:{...oW({imageSize:c,resolvedImagePosition:u,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...h},onLoad:o,ref:r})},aW=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const s=qf(rO),l=qf(Nk),{resolvedImagePosition:c}=e;return fi.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...tW({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,isIndentModeEnabled:l,isLeftColumn:o,isMeasureCell:a})},children:fi.jsx(iW,{representation:e,textStyle:t,isMeasureCell:!0})})},sW=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},lW=(e,t,n)=>{let{textAlign:r}=t(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:r}=n.at(e.visibleMeasureInfoIndex)??{}),r?.auto||void 0===r?"left":r.align},cW={display:"flex",flexDirection:"row",alignItems:"center"},uW={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},dW=(e,t,n,r,o)=>t?{...uW,...o?e.measureValues:e.nullValues}:n?{...cW,color:e.totalValues.color,background:r??e.totalValues.background}:{...cW,color:e.measureValues.color,background:r??e.measureValues.background},pW=(e,t,n,r,o,i,a)=>{const{fontFamily:s,fontSize:l}=e.measureValues,c={...sq,...!n&&lq(e.grid.lineClamp),...t&&{color:t},fontFamily:s,fontSize:l,direction:n?"ltr":i};if(o){const t=n?e.measureValues:e.nullValues,{fontWeight:r,fontStyle:o,textDecoration:a}=t;return{...c,fontWeight:r,fontStyle:o,textDecoration:a,direction:n?"ltr":i}}if(r){const{fontWeight:t,fontStyle:r,textDecoration:o}=e.totalValues;return{...c,fontWeight:t,fontStyle:r,direction:n?"ltr":i,...a,textDecoration:Fz(o,a?.textDecoration)}}const{fontWeight:u,fontStyle:d,textDecoration:p}=e.measureValues;return{...c,fontWeight:void 0===u?QT:u,fontStyle:d,...a,textDecoration:Fz(p,a?.textDecoration)}},fW=As("div",{shouldForwardProp:e=>!["foregroundColor","fontWeight","fontStyle","textDecoration"].includes(e)})(({foregroundColor:e,fontWeight:t,fontStyle:n,textDecoration:r})=>({boxSizing:"border-box",width:"100%",paddingInline:8,paddingBlock:4,fontWeight:t,fontStyle:n,textDecoration:r,...e&&{color:e}})),hW=({cell:e,representation:t,color:n,expressionTextStyle:r,isTotalValueCell:o,cellHorizontalAlignment:i,isNumeric:a,displayText:s})=>{const l=qf(Zk),c=qf(oO),u=qf(rO),d=qf(Nk),p=t.type===gT.Image,f=t.type===gT.Indicator,h=pW(u,n,a,o,e.isNull,l,r);if(!d&&p&&!e.isNull||d&&p&&!e.isNull)return fi.jsx(aW,{isMeasureCell:!0,textStyle:h,representation:t,imageContainerHorizontalAlignment:i});if(t.type===gT.Bar&&t.bar&&!e.isNull){const{fontWeight:e,fontStyle:r,textDecoration:o}=h;return fi.jsx(fW,{"data-testid":"bar-cell-padding",foregroundColor:n,fontWeight:e,fontStyle:r,textDecoration:o,children:fi.jsx(JF,{height:Math.max(u.contentCellHeight-8-1,0),bar:t.bar,theme:c,direction:l,fontFamily:u.measureValues.fontFamily,fontSize:u.measureValues.fontSize})})}const m=gk(e.isNull?t.text:e.ref.qNum);return f&&hk(m)?fi.jsx(Az,{representation:{...t,text:s},cellValue:m,textStyle:h}):fi.jsx("span",{style:{padding:4,...h},children:s})},mW=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,gW="flex-start",bW=(e,t)=>e.isNull?gW:t.type===gT.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:gW,vW=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const o=qf(Th),i=qf(qh),a=qf(Qk),s=qf(Zk),l=qf(rO),c=qf(Kk),u=qf(Yk),d=qf(Hk),p=qf($k),h=qf(Wk),m=qf(kk),{attrExprInfoIndexes:g,gridSectionsData:{measureData:v,leftDimensionData:y,topDimensionData:x},visibleDimensionsInfo:{visibleTopDimensionInfo:S}}=nj(),w=(()=>{const e=qf(Nk),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=nj(),i=r.length,a=o.length;return f((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal),[n,t,i,a,e])})(),C=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=nj(),n=t.length;return f(t=>{const r=e.grid.at(n-1)?.[t];return _F(r,e.totalDividerIndex)},[e,n])})(),E=(()=>{const e=qf(Nk),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=nj(),r=n.length;return f(n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return _F(i,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:I}=r,D=x.grid.at(S.length-1),M=y.grid.at(-1),{background:A}=l.measureValues,L=v[t]?.[e],R=t===a.rowsOnCurrentPage-1,P=e===m.x-1,{handleClick:T}=jF(),q=p?mW(M,t):mW(D,e),k=L?g.measures[q]:void 0,O=i("TLV_2605_PIVOT_TEXT_STYLING"),N=b(()=>O&&L?q_(k,L.ref):void 0,[L,O,k]);if(!L)return fi.jsx(FF,{style:{...n,background:A},isLastRow:R,isLastColumn:P,showLastBorder:I,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const _=h[q],j=i("VNA-977-TABLE-BARS"),F=R_({cell:L.ref,representationProperties:_.representation,attrExprInfoIndex:g.measures[q],env:o,direction:s,conditionalColoring:_.conditionalColoring,measureMinMax:j?c[q]:void 0,enabledFeatures:{[gT.Image]:!0,[gT.Indicator]:!0,[gT.Bar]:j}}),z=!L.isNull&&w(e,t),W=L.isNull?d:F.text,$=L.isNull?""!==W&&void 0!==W&&!Number.isNaN(+W):mk(L.ref),H=L.isNull&&$?u[q]??W:W,B=P_(g.measures[q],L.ref),V=l.grid.lineClamp>1?$F:WF,G=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==gT.Image?sW(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(L,_,F,$,s),U={...dW(l,L.isNull,z,B.background,$),...uq(R,P,l.grid.border,s,I),...pq({bottomDivider:E(t),rightDivider:C(e),borderColor:l.grid.divider}),...aq,padding:"0px 4px",display:"flex",justifyContent:G};return fi.jsx("div",{className:gA,title:H,style:{...U,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,"data-pivot-section":"DATA","data-row-idx":t,"data-col-idx":e,tabIndex:-1,onClick:()=>{T("DATA",t,e)},children:fi.jsx(V,{width:HF(F),verticalAlign:bW(L,F),children:fi.jsx(hW,{cell:L,representation:F,isTotalValueCell:z,color:B.color,expressionTextStyle:N,cellHorizontalAlignment:G,isNumeric:$,displayText:H})})})};var yW=n.memo(vW,wF);const xW=(e,t)=>t.list[e]?.id??e.toString(),SW=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,wW=e=>({...iq,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),CW=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const l=qf(Qk),c=qf(Zk),u=qf(kk),{grid:{divider:d},contentCellHeight:p}=qf(rO),{dataModel:h,gridSectionsData:{measureData:m}}=nj(),b={...wW(c),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},v=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const n=qf(Qk),r=qf($q),o=qf(aO),i=qf(kk),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=nj(),u=s.columnCount,d=l.rowCount;return f(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=p,o.gridWidth=l-s+1,o.gridHeight=f-p+1;const h=o.gridWidth+u+(t.current===TT.None?0:CF),m=o.gridHeight+d+(e.current===TT.None?0:CF);let g=OF;m*h>1500&&(g=NF),g(a,i,c,n,o,e,t,r)},[o,i,a,c,e,t,n,u,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return jq(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,c]),0===u.x?null:fi.jsx(uF,{"data-section-id":"DATA_GRID",ref:e,style:b,columnCount:u.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:m},onItemsRendered:v,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:SW,direction:c,children:yW})};var EW=y(CW);const IW=x((e,t)=>fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fi.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),fi.jsx("use",{fillRule:"evenodd"})]})),DW=e=>{const[t,n]=Of(Tj);return jq(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},MW=()=>{const[e,t]=m(!1),{dataModel:n}=nj(),r=qf(Vq),{isAdjustingWidth:o,setIsAdjustingWidth:i}=DW([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||Lz(e)||o||t(!0)},isAdjustingWidth:o,setIsAdjustingWidth:i}};function AW(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===nq.Transparent?cL.WHITE:r,i=CL(e.grid.border),a=CL(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return CL(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const LW=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const s=qf(Zk),l=qf(Vq),c=qf(iO),{isActive:u}=Oz(),{dataModel:d}=nj(),p=qf(rO),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const h=AW(p,e);return fi.jsx(dO,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*uj,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},RW=As(hc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}})),PW=As("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),TW=As("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...oq,justifyContent:e??oq.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),qW=As("div")(()=>({...oq})),kW=As("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o})),OW=As(Ld)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),NW=As(kd,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),_W=As("span")({textOverflow:"ellipsis",overflow:"hidden"}),jW=As("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:lj,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),FW=As("span",{shouldForwardProp:e=>!["padding","alignSelf","isSticky"].includes(e)})(({padding:e,alignSelf:t,isSticky:n})=>({padding:e,alignSelf:t,...n&&{position:"sticky",top:0}}));let zW=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const WW=(e,t)=>({qExcludeList:t===zW.Expand,qPos:{qDimName:e,qElemNo:[]}}),$W=`${xk}/qExpansionState`,HW=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r,logToSentry:o})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:WW(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n,logToSentry:r})=>{const{index:o,expansionData:i}=t;try{let t,n=$W,r="Add";void 0===o?t=JSON.stringify([i]):-1===o?(n=`${$W}/-`,t=JSON.stringify(i)):(n=`${$W}/${o}`,r="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:r,qValue:t}],!0)}catch(e){r.error({msg:n,payload:e})}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`,logToSentry:o})},BW=({model:e,effectivePropertiesService:t,cell:n,logToSentry:r})=>{if(void 0===n.qEffectiveDimensionName)return;const o={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName,logToSentry:r};return{expandCallback:HW({...o,action:zW.Expand}),collapseCallback:HW({...o,action:zW.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},VW={[JO.Sorting]:!0,[JO.Selections]:!0,[JO.Searching]:!0},GW=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=l(null),f=qf(rO),h=qf(Fk),m=qf(zk),g=qf(Tk),b=qf(Hq),v=qf(Wq),y=qf(Vq),x=qf(Bq),S=qf(iO),w=qf(Xk),C=qf(kh),{fontSize:E,fontFamily:I,fontStyle:D,fontWeight:M,textDecoration:A,color:L,background:R,hoverBackground:P,activeBackground:T}=f.header,q=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:O}=a,{open:N,setOpen:_,handleOpenMenu:j,setIsAdjustingWidth:F}=MW(),z=qf(Zk),{handleClick:W}=jF(),$={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},H={embed:x,listboxRef:p,sortCriteria:h&&e.isDim?b.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},B={app:v,qStateName:g.qStateName},{labelTextAlign:V}=m(e.dimensionInfoIndex)??{},G=sW(V,"flex-start",z);return fi.jsxs(RW,{className:gA,title:e.label,interactions:y,background:N?e.headerColor?.headerMenuActiveBackground??T:e.headerColor?.background??R,hoverBackground:e.headerColor?.headerMenuHoverBackground??P,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...aq,...dq(e,o,n,r,f.grid.border,z),color:e.headerColor?.color??L},"data-testid":"title-cell",onClick:t=>{j(t),W("HEADER",0,e.colIdx)},"data-pivot-section":"HEADER","data-col-idx":e.colIdx,"data-row-idx":0,tabIndex:-1,children:[fi.jsxs(TW,{children:[k?fi.jsx(qW,{children:fi.jsx(IW,{height:12})}):null,fi.jsx(kW,{fontFamily:I,fontSize:E,fontStyle:D,fontWeight:M,textDecoration:A,justifyContent:G,children:fi.jsx("span",{style:{...sq,...lq(f.grid.columnLineClamp)},children:e.label})})]}),e.isDim?fi.jsxs(fi.Fragment,{children:[fi.jsx(eN,{headerData:e,translator:S,anchorRef:q,open:N,setOpen:_,interactions:y,menuAvailabilityFlags:VW,sortRelatedArgs:$,searchRelatedArgs:H,selectionRelatedArgs:B,expandOrCollapseArgs:BW({model:w,effectivePropertiesService:b,cell:e,logToSentry:C}),shouldShowMenuIcon:O,model:w&&"setActiveField"in w?w:void 0,direction:z,isAccessibleHeader:!0}),fi.jsx(PW,{ref:p,direction:z}),fi.jsx(PW,{ref:q,direction:z})]}):null,fi.jsx(LW,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:F,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},UW=({rowSpan:e,columnSpan:t})=>{const n=qf(rO),r=qf(Zk);return e>0&&t>0?fi.jsx("div",{style:{...iq,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},YW=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),KW=x((e,t)=>fi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fi.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),fi.jsx("use",{fillRule:"evenodd"})]})),XW=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const r=qf(Zk),o=qf(rO),i=qf(Vq),a=qf(iO),{isActive:s}=Oz(),{dataModel:l}=nj(),{setIsAdjustingWidth:c}=DW([l]);if(!(!!i.active&&!s))return null;const u=AW(o,{isLeftColumn:!0});return fi.jsx(dO,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*uj))},confirmWidthCallback:r=>{if(r.type===xA.FitToContent)return void l.applyIndentModeColumnWidth({type:xA.Auto});const o=Math.min(r.pixels??t,e*uj);n(o),l.applyIndentModeColumnWidth({type:xA.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},JW=x((e,t)=>fi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fi.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),ZW=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),o=qf(Wq),i=qf(Vq),a=qf(Bq),s=qf(iO),c=qf(Xk),u=qf(kh),d=qf(Tk),p=qf(Hq),{open:f,setOpen:h,handleOpenMenu:m}=MW();return fi.jsxs(NW,{onClick:m,isActive:f,children:[fi.jsx(_W,{children:e.label}),fi.jsxs(jW,{className:"indent-mode-dropdown-more",visible:f,children:[fi.jsx(JW,{}),e.isDim?fi.jsxs(fi.Fragment,{children:[fi.jsx(eN,{headerData:e,translator:s,anchorRef:n,open:f,setOpen:h,interactions:i,menuAvailabilityFlags:VW,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:d.qStateName},expandOrCollapseArgs:BW({model:c,effectivePropertiesService:p,cell:e,logToSentry:u}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),fi.jsx(PW,{ref:r}),fi.jsx(PW,{ref:n})]}):null]})]})},QW=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===wk,i=e+1<n.length&&n[e+1]?.id===wk;return!(r&&o&&i)&&(t?.id!==wk&&e<n.length-1)},e$=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const i=qf(rO),a=qf(Vq),s=qf(iO),{dataModel:c,gridSectionsData:{headersData:u}}=nj(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=i,{color:g,background:b,hoverBackground:v,activeBackground:y,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=i.header,{isAdjustingWidth:I}=DW([c]),D=e=>{e.stopPropagation()},M={height:h,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return fi.jsxs(RW,{isDimension:!0,background:d?y:b,interactions:a,hoverBackground:v,style:{...M,...aq,color:g},onClick:e=>{!a.active||Lz(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[fi.jsxs(TW,{justifyContent:"flex-start",children:[fi.jsx(kW,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:fi.jsx("span",{style:sq,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?fi.jsx(KW,{}):fi.jsx(YW,{}),fi.jsx(PW,{ref:f})]}),fi.jsx(OW,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==wk&&fi.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:fi.jsx(ZW,{cell:n,changeSortOrder:t})}),QW({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&fi.jsx(gO,{"data-testid":"group-divider",variant:"middle"})])}),fi.jsx(XW,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},t$=({isIndentModeEnabled:e,headersData:t,topRowIndex:n})=>e&&t.size.x>1&&n+1===t.size.y,n$={display:"grid",width:"fit-content"},r$=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const l=qf(Nk),{gridSectionsData:{headersData:c,measureGroups:u}}=nj(),d=u.length>0,p=c.size.x-(d?0:1);return fi.jsxs("div",{"data-testid":"HEADER_GRID",style:{...n$,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:c.data.map(()=>`${r}px`).join(" "),height:a},children:[c.size.y>1&&fi.jsx(UW,{columnSpan:p,rowSpan:c.size.y-1}),c.data.map((a,u)=>{let d=[];if(t$({isIndentModeEnabled:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(fi.jsx(e$,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),f=l&&1===c.size.x;t.push(fi.jsx(GW,{style:{width:n[d],height:r,gridColumn:l&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var o$=y(r$);const i$=(e,t,n,r,o)=>{const i=qf(Tk);g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,i,o])},a$=(e,t)=>{jq(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},s$=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},l$=({cell:e,isLeftColumn:t,isIndentModeEnabled:n,visibleMeasureInfo:r,getDimensionInfo:o,direction:i,shouldSkipAlignment:a})=>{if(a)return;const s=e.representation,l=pj({isLeftColumn:t,isIndentModeEnabled:n,representation:s}),c=t?"flex-start":"center",u=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===gT.Image)return l&&u&&"center"!==u&&"rtl"===i?Dz(u):u??c;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:t}=r[e.visibleMeasureInfoIndex]??{};return sW(t,c,i)}const{textAlign:d}=o(e.dimensionInfoIndex)??{};return sW(d,c,i)},c$=()=>{},u$=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const d=qf(rO),p=qf(zk),f=qf(Wk),h=qf(Nk),m=qf(kk),g=qf(Vq),b=qf(Zk),{isLocked:v,createMouseDownHandler:y,createMouseOverHandler:x,createPointerUpHandler:S}=Oz(),{showLastBorder:w}=r,C=v(n)||n.isLockedByDimension,E=!(C||!g.active||!g.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),I=E?y(u,e=>s$(e,r)):void 0,D=E?x(u):void 0,M=E?S(u,e=>s$(e,r)):void 0,A=pj({isLeftColumn:s,isIndentModeEnabled:h,representation:n.representation}),{handleClick:L}=jF();return fi.jsx("div",{className:gA,title:g.passive?n.representation.text:void 0,style:{...t,...uq(i,a,d.grid.border,b,w),...pq({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...aq,padding:"rtl"===b?"0px 0px 0px 4px":"0px 4px",cursor:Yz(E),background:Hz({styleService:d,isCellSelected:l,cell:n,isCellLocked:C}),zIndex:s?void 0:m.x-n.x,justifyContent:l$({cell:n,isLeftColumn:s,isIndentModeEnabled:h,visibleMeasureInfo:f,getDimensionInfo:p,direction:b,shouldSkipAlignment:A}),display:"flex",...h&&s&&{["rtl"===b?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:lW(n,p,f)},"aria-hidden":"true",onMouseDown:I,onMouseOver:D,onPointerUp:M,onKeyUp:c$,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,"data-pivot-section":s?"LEFT":"TOP","data-row-idx":n.y,"data-col-idx":n.x,onClick:()=>{L(s?"LEFT":"TOP",n.y,n.x)},children:e})},d$=(e,t)=>e&&"center"!==e&&"rtl"===t?Dz(e):e,p$=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r,isSticky:o=!0})=>{const{imageBox:i}=t,{grid:{lineClamp:a}}=qf(rO),s=qf(Zk);return fi.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[fi.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:jz(e),alignItems:d$(r,s),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:fi.jsx(iW,{representation:t,textStyle:n})}),fi.jsx(FW,{padding:4/(a<=2?2:1),alignSelf:jz(e,!0),isSticky:o,children:!!t.labelStructure&&rW(t.labelStructure)})]})},f$=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,h$=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>fi.jsxs("span",{children:[fi.jsx(ku,{...QF({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&f$(n)]}),m$=({children:e,textStyle:t,shouldEnableStickyText:n})=>fi.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),g$=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,b$=({cell:e,isCellSelected:t,isLeftColumn:n,isSticky:r=!0})=>{const o=qf(Zk),{isActive:i}=Oz(),a=qf(Bk),s=qf(zk),l=qf(Wk),c=qf(Nk),u=qf(rO),d=qf(Vq),p=r&&n&&c;let f;if(f=e.isNull?a:n?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(e.isNull)return"-";if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text,e.isEmpty)return null;const h=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:o})=>({...sq,...lq(g$({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:o})),color:Bz({cell:e,styleService:t,isCellSelected:n}),fontWeight:Vz({cell:e,styleService:t}),fontStyle:Gz({cell:e,styleService:t}),textDecoration:Uz({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:u,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:c});if(e.representation.type===gT.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=n&&t&&t.suffix?p$:aW;return fi.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:h,isLeftColumn:n,isSticky:r,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:l$({cell:e,isLeftColumn:n,isIndentModeEnabled:c,visibleMeasureInfo:l,getDimensionInfo:s,direction:o})})}if(e.representation.type===gT.Link&&!i&&!e.isTotal&&!e.isNull){const t=n&&e.representation.labelStructure?h$:ez;f=fi.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:d,color:e.expressionColor.color})}return fi.jsx(m$,{shouldEnableStickyText:p,textStyle:{...h,...e.representation.type===gT.Image&&e.isNull?{alignSelf:jz(e)}:{}},children:f})},v$=({index:e,style:t,data:n})=>{const r=qf(rO),o=qf(Nk),{isSelected:i}=Oz(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=DW([n]),f=s$(e,n),h=a?e===l-1:c,m=a?c:e===l-1,g=_F(f,u,o);if(void 0===f){const{background:n}=r.dimensionValues;return fi.jsx(FF,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const b=i(f),v="number"==typeof t.height&&t.height<=r.contentCellHeight,y=!a||!v||r.grid.lineClamp>1,x={verticalAlign:jz(f),width:HF(f.representation),isLeftColumn:a},S=fi.jsxs(fi.Fragment,{children:[fi.jsx(Jz,{isLeftColumn:a,isCellSelected:b,cell:f,isSticky:y}),fi.jsx(b$,{isLeftColumn:a,isCellSelected:b,cell:f,isSticky:y})]});return fi.jsxs(u$,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:b,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[y?fi.jsx($F,{...x,right:f.isLeftColumn?void 0:4,children:S}):fi.jsx(WF,{...x,children:S}),fi.jsx(LW,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?LT.Measures:LT.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var y$=n.memo(v$,wF);const x$=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},S$=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},w$=(e,t)=>n=>{e.current&&(e.current[t]=n)},C$={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...iq},E$={overflow:"hidden",willChange:"auto",flexShrink:0},I$=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const i=qf(Qk),a=qf(Zk),s=qf(Nk),{contentCellHeight:l,grid:{divider:c}}=qf(rO),{qSize:u}=qf(Tk).qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=nj();a$(e,d),i$(e,t,n,l);const f=i.rowsOnCurrentPage*l,h={...C$,borderColor:c,width:r.reduce((e,t)=>e+t,0)};return fi.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,c)=>{const h=c===d.columnCount-1,m=jN(p[c]),{itemCount:g,estimatedItemSize:b,listValues:v}=S$(t,f,i.rowsOnCurrentPage,h),y=s?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,v,l,h,u.qcy);return fi.jsx(vF,{ref:w$(e,c),style:{...E$,flexGrow:h?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:y,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:o,listValues:v,totalDividerIndex:d.totalDividerIndex},itemKey:xW,estimatedItemSize:b,children:y$},m)})})};var D$=y(I$);const M$=({index:e,style:t,data:n})=>{const r=qf(rO),o=qf(Zk),{groups:i,showLastBorder:a}=n,s=i[e],l=e===i.length-1,{background:c,color:u,fontWeight:d,fontStyle:p,textDecoration:f}=r.measureLabels;return fi.jsx("div",{className:gA,"data-testid":"measure-group-header",style:{...t,...uq(!1,l,r.grid.border,o,a),...aq,padding:"rtl"===o?"0px 0px 0px 4px":"0px 4px",background:s.headerColor?.background??c,zIndex:i.length-s.start,display:"flex",justifyContent:"center"},title:s.label,"aria-hidden":"true","data-x":s.start,children:fi.jsx($F,{verticalAlign:"center",width:"fit-content",right:4,children:fi.jsx("span",{style:{...sq,...lq(r.grid.columnLineClamp),color:s.headerColor?.color??u,fontWeight:d,fontStyle:p,textDecoration:f,fontFamily:r.dimensionValues.fontFamily,fontSize:r.dimensionValues.fontSize,border:"4px solid transparent",boxSizing:"border-box"},children:s.label})})})};var A$=n.memo(M$,wF);const L$={overflow:"hidden",willChange:"auto"},R$=e=>({...iq,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),P$=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const a=qf(Zk),s=qf(zk),l=qf(Nk),c=qf(kk),{grid:{divider:u},headerCellHeight:d}=qf(rO),{gridSectionsData:{headersData:p,topDimensionData:f,measureGroups:h}}=nj(),m={...R$(a),borderColor:u,height:r};a$(e,f),i$(e,n,r,d,i);const g=c.x*i(),b=h.map(({start:e,span:t})=>{let n=0;for(let r=0;r<t;r+=1)n+=i(e+r);return n});return 0===f.rowCount?fi.jsx("div",{style:{width:n,height:r,...R$(a)}}):fi.jsxs("div",{style:m,"data-section-id":"TOP_GRID",children:[h.length>0?fi.jsx(vF,{ref:w$(e,f.rowCount),style:L$,height:t(),width:n,itemCount:h.length,itemSize:e=>b[e],layout:"horizontal",itemData:{groups:h,direction:a,showLastBorder:o},itemKey:e=>h[e].start,estimatedItemSize:b.reduce((e,t)=>e+t,0)/h.length,direction:a,children:A$},"measure-groups"):null,f.grid.map((r,u)=>{const d=u===f.rowCount-1,{itemCount:m,estimatedItemSize:b,listValues:v}=S$(r,g,c.x,d),y=(({isIndentModeEnabled:e,getDimensionInfo:t,headersData:n,topRowIndex:r})=>{const o=n.data.at(r);if(void 0===o)return;const i=n.size.x-1,a=t$({isIndentModeEnabled:e,headersData:n,topRowIndex:r})?0:i,s=o.at(a),l=Array.isArray(s)?s.at(i):s;return l?t(l.dimensionInfoIndex):void 0})({isIndentModeEnabled:l,getDimensionInfo:s,headersData:p,topRowIndex:u+(h.length>0?1:0)}),x=y?jN(y):`empty ${u}`;return fi.jsx(vF,{ref:w$(e,u),style:L$,height:t(),width:n,itemCount:m,itemSize:x$({list:r,listValues:v,isLastRow:d,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:d,itemCount:m,showLastBorder:o,listValues:v,totalDividerIndex:f.totalDividerIndex},itemKey:xW,estimatedItemSize:b,direction:a,children:y$},x)})]})};var T$=y(P$);const q$=()=>fi.jsx(k$,{}),k$=()=>{const{headerCellHeight:e,contentCellHeight:t}=qf(rO),n=Nj(),r=(()=>{const e=qf(Xk),t=qf(kh),n=f(async(n,r)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:o,dimensionInfoIndex:i,sortDirection:a}=n,s=[];if(r===a)return!1;s.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!o).toString()});try{return await e.applyPatches(s,!0),!0}catch(e){return t.error({msg:"Error while applying patch",payload:e}),!1}},[e,t]);return n})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:u},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:b},scrollToCoordCallBack:v}=Oj(),{leftGridWidth:y,leftGridFullWidth:x,leftGridColumnWidths:S,rightGridFullWidth:w,showLastRightBorder:C,getRightGridColumnWidth:E,getHeaderCellsIconsVisibilityStatus:I,overrideLeftGridWidth:D}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const r=qf(Nk),o=qf(rO),{gridSectionsData:{headersData:i}}=nj(),{measureText:a}=qq(o.header,{allowLineBreaks:!1}),s=Ej({tableWidth:e}),l=Ij({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=Math.min(s.leftGridFullWidth,e-l.rightGridWidth-1),u=c+l.rightGridFullWidth+1<e,p=f((e,t,n="")=>{let o=e;r&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+cj;return t&&d+lj<=l&&(u=!0,d+=lj),d+lj<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}},[s.leftGridColumnWidths,a,r,i.size.x]);return d(()=>{const e=c===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,c,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,leftGridWidth:c,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:p}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:b}),{gridScaffoldDimensions:M,headerGridDims:A,topGridDims:L,leftGridDims:R,dataGridDims:P,metadata:{everyThingFitsInTableRectHeight:T,scrollbarsVisibilityStatus:q}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=Nj(),l=qf(Qk),{gridSectionsData:{headersData:c,topDimensionData:u}}=nj(),d=Math.min(s.height*uj,Math.max(s.height*uj-25,s.height-t-a)),p=l.rowsOnCurrentPage*t,f=Math.max(c.size.y,u.rowCount,1),h=e*f,m=e*f,g=n,b=s.width-g,v=Math.min(d,h,m),{availableHeight:y,everyThingFitsInTableRectHeight:x,everyThingFitsInTableRectWidth:S}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+p+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(v,g,b),w=y-d,C=Math.max(w,y-v),E=Math.min(C,p),I=Math.min(C,p),D=h+1+p,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:A,hasDataGridOverflowX:L}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:g,rightSectionWidth:b},Y_AXIS:{topSectionHeight:v,bottomSectionHeight:C}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:m,bottomSectionFullHeight:D-m}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${g}px ${b}px`,gridTemplateRows:`${v}px ${C}px`},headerGridDims:{width:-1,height:v},topGridDims:{fullSizeWrapper:{width:o-i+(L?i:0),height:m},stickyWrapper:{width:b-1-i,height:-1},self:{width:Math.min(o,b-(S?1:0)-i),height:m}},leftGridDims:{fullSizeWrapper:{width:g,height:D-m+(!A&&L?a:0)},stickyWrapper:{width:g,height:C-1-a},self:{width:g,height:Math.max(t,E-(x?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(L?i:0),height:D-m+(!L&&A?a:0)},stickyWrapper:{width:b-1-i,height:C-1-a},self:{width:Math.min(o,b-(S?1:0)-i),height:Math.max(t,I-(x?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:x,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:y,leftGridOriginalWidth:x,rightGridOriginalWidth:w},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),k=f(()=>e,[e]),O=f(()=>t,[t]),N=qf(qh),_=kf(_N),j=kf(kN),F=N("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>F?(_({HEADER:o.current,TOP:i.current,LEFT:a.current,DATA:s.current}),j(()=>v),()=>{_({HEADER:null,TOP:null,LEFT:null,DATA:null}),j(()=>null)}):()=>{},[F,_,o,i,a,s,j,v]),(()=>{const e=qf($q);d(()=>{e.notifyIsDoneRendering()})})(),fi.jsxs(jj,{style:M,children:[fi.jsx("div",{style:{overflow:"hidden"},ref:o,children:fi.jsx(o$,{tableWidth:n.width,leftGridWidth:y,columnWidths:S,getHeaderCellsIconsVisibilityStatus:I,rowHight:e,height:A.height,changeSortOrder:r,overrideLeftGridWidth:D})}),fi.jsx(Wj,{style:q.topGrid,origin:PT.TopGrid,ref:i,children:fi.jsx(_j,{style:L.fullSizeWrapper,children:fi.jsx($j,{style:L.stickyWrapper,children:fi.jsx(T$,{topGridRef:l,rowHightCallback:k,...L.self,showLastBorder:{right:C,bottom:!1},getRightGridColumnWidth:E})})})}),fi.jsx(Wj,{style:q.leftGrid,origin:PT.LeftGrid,ref:a,children:fi.jsx(_j,{style:R.fullSizeWrapper,children:fi.jsx($j,{style:R.stickyWrapper,children:fi.jsx(D$,{leftGridRef:c,...R.self,columnWidths:S,showLastBorder:{right:!1,bottom:T}})})})}),fi.jsx(Wj,{style:q.dataGrid,origin:PT.DataGrid,ref:s,children:fi.jsx(_j,{style:P.fullSizeWrapper,children:fi.jsx($j,{style:P.stickyWrapper,children:fi.jsx(EW,{dataGridRef:u,rowHightCallback:O,...P.self,showLastBorder:{right:C,bottom:T},getRightGridColumnWidth:E,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},O$=As("div")({"& .sn-copy-cell:focus-visible":{outline:"none",boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"}}),N$=()=>{const e=qf(Gq),t=qf(oO),n=qf(Vq),r=qf(iO),o=qf(qh),i=qf(Qk),a=qf(eO),s=qf(nO),c=qf(Ok),u=qf(Tk),{handleKeyDown:p}=aj(),f=l(null),h=kf(_N),m=o("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>m?(h({WRAPPER:f.current}),()=>{h({WRAPPER:null})}):()=>{},[m,h]),fi.jsxs(O$,{ref:f,onKeyDown:m?p:void 0,children:[c?fi.jsx(q$,{}):null,fi.jsx(sj,{}),fi.jsx(LN,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{a({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:s,layout:u})]})};const _$=(e,t,r)=>{const o=function(e){const t=jp();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),us({...t,direction:e})}(r.get(Zk));e.render(fi.jsx(n.StrictMode,{children:fi.jsx(Mf,{store:r,children:fi.jsx(Rs,{theme:o,children:fi.jsx(Nz,{selections:t,children:fi.jsx(rj,{children:fi.jsx(N$,{})})})})})}))};var j$=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(j$||{}),F$=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(F$||{}),z$=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(z$||{}),W$=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(W$||{});const $$=e=>e?`${parseInt(e,10)}px`:void 0,H$=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?nq.Transparent:n}},B$=(e,t)=>+(parseInt(e,10)*tq*t+8).toFixed(2),V$=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?QT:"normal",G$=e=>e?.some(e=>"italic"===e)?"italic":"normal",U$=e=>e?.some(e=>"underline"===e)?"underline":"none",Y$=document.createElement("textarea");function K$(e){Y$.value=e,document.body.appendChild(Y$),Y$.select(),Y$.setSelectionRange(0,Y$.value.length),document.execCommand("copy"),document.body.removeChild(Y$)}Y$.style.position="absolute",Y$.style.left="-9999px",Y$.setAttribute("readonly","");function X$(e){O?.((t,n)=>{const r=n.target,o=r?.closest(`.${gA}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{K$(t)}):K$(t))})(o)}}),e?.forEach(e=>{e(t,n,o)})})}const J$=({model:e,layout:t,effectivePropertiesService:n,translator:r,env:o})=>{const i=A(()=>Ph(o,{tag:"sn-pivot-table"}),[o]);return Sq((o,a,s)=>{if(!e||n.qAlwaysFullyExpanded)return;const l=e,c=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:d}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(s,Pk(t));c.addItem(((e,t)=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(xk,0,0,!0),await e.expandLeft(xk,0,0,!0)}catch(e){t.error({msg:"Failed to expand all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:HW({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:zW.Expand,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i})),c.addItem(((e,t)=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(xk,0,0,!0),await e.collapseLeft(xk,0,0,!0)}catch(e){t.error({msg:"Failed to collapse all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:HW({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:zW.Collapse,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i}))},[e,t,n,i])},Z$=e=>A(()=>(({layout:e})=>{const t=Dk(e);return{getDimensionInfoIndex:Ak(e),size:Ck(e),hasPseudoDimOnLeft:Mk(e),isLeftDimension:e=>t.some(t=>t===e),visibleMeasureInfo:Ik(e),isIndentModeEnabled:Ek(e),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:xA.Auto,pixels:yA.PixelsDefault,percentage:yA.PercentageDefault}}})({layout:e}),[e]),Q$=({model:e,layout:t,viewService:n,pageInfo:r,rect:o})=>{const i=Lk(t),a=Rk(t),s=(e=>{const t=Cq(e);return t.current=e,t})(X_(o));return Lq(async()=>{const{qHyperCube:o}=t,{maxNumberOfVisibleRows:l,maxNumberOfVisibleColumns:c}=s.current;if(i)return t.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(a,n,l,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(t,r,l,c))){const o=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(eq,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(a,n,t.qHyperCube.qSize,r,l,c);return o?e.getHyperCubePivotData(xk,J_(o)):[]}return o.qPivotDataPages},[t,i,e,n,r.page,r.rowsPerPage,s,a])},eH=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),tH=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:eH({rowsPerPage:n,totalRowCount:e,page:t})}),nH=(e,t)=>{const{qSize:n}=e.qHyperCube,r=Ck(e),o=t.isDownloadedAsPDForImage||Lk(e),i=(e=>e.snapshotData?.content?.rowsPerPage)(e),[a,s]=P(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:Lk(e)?e.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:n.qcy>r.y&&!o,...tH(n.qcy,a,i)}}),l=n.qcy;T(()=>{s(e=>({...e,...tH(l,e.page,i),shouldShowPagination:l>r.y&&!o}))},[l,r.y,s,o,i]),T(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=eH({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]);return{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:eH({...a,...e})})}}},rH=15,oH=({layout:e,viewService:t,rect:n,model:r,pageInfo:o})=>{const{freeResize:i}=L();return N(async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-rH,0),c=Math.max(s+o-rH,s,0),u=eq-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=X_(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=J_(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(xk,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object={...i.snapshotData.object,size:{...i.snapshotData.object?.size,w:n.width,h:n.height}}}return i}),_(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)}),[t]),e.snapshotData?.content&&!i?{left:n.left,top:n.top,width:e.snapshotData.object.size.w,height:e.snapshotData.object.size.h}:n};var iH={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const aH=()=>{const e=j(),t=e.language();return A(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(iH).forEach(t=>{e.add(iH[t])})}(e)},[e]),{translator:e,language:t}},sH=e=>{const t=A(()=>Ef(),[]);t.set(Th,e);const n=F(),r=(e=>{const t=A(()=>Nq.createRoot(e),[e]);return T(()=>()=>{t.unmount()},[t]),t})(n),o=z(),i=W(),a=$(),s=H(),l=B(),c=(()=>{const{viewState:e}=L(),t=Cq(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=A(()=>xq(),[]),i=Sq(e=>{t.current.add(e)},[t]),a=Sq(OR(async()=>{await Promise.all(t.current),t.current.clear(),o()},1e3),[o,t]);return R(async()=>{await r},[r]),A(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i}),[a,n,e,i])})(),u=((e,t)=>{const[n]=Lq(async()=>{if(void 0===e||t.snapshotData||!("getEffectiveProperties"in e))return;const n=await e.getEffectiveProperties();return structuredClone(n)},[e,t]);return A(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(i,o),d=Z$(o),p=(e=>{const t=k();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(Lk(o)),f=V(),h=Aq(o,n),{translator:m,language:g}=aH(),{pageInfo:b,updatePageInfo:v}=nH(o,c),y=((e,t,n)=>A(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(b,o,c),x=oH({rect:G(),layout:o,viewService:y,model:i,pageInfo:b}),[S,w]=Q$({model:i,layout:o,viewService:y,pageInfo:b,rect:x}),C=A(()=>((e,t)=>{const n=t.components?.find(e=>"theme"===e.key),r=n?.header,o=n?.dimensionValues,i=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,c=n?.dimensionNullValues??l,u=n?.grid,d=(t,n,r)=>e.getStyle(t,n,r),p=+(u?.[j$.LineClamp]??d(F$.Grid,z$.Grid,W$.LineClamp)??1),f=+(u?.[j$.ColumnLineClamp]??d(F$.Grid,z$.Grid,W$.ColumnLineClamp)??1),h=H$(e,r?.[j$.Background])??d(F$.Dimension,z$.LabelName,W$.BackgroundColor)??nq.Transparent,m={header:{fontSize:$$(r?.[j$.FontSize])??d(F$.Dimension,z$.LabelName,W$.FontSize)??JT,fontFamily:r?.[j$.FontFamily]??d(F$.Dimension,z$.LabelName,W$.FontFamily)??ZT,fontWeight:V$(r?.[j$.FontStyle],QT),fontStyle:G$(r?.[j$.FontStyle]),textDecoration:U$(r?.[j$.FontStyle]),color:H$(e,r?.[j$.FontColor])??d(F$.Dimension,z$.LabelName,W$.FontColor)??cL.TEXT,background:h,hoverBackground:GR(h,SA),activeBackground:GR(h,wA)},dimensionValues:{fontSize:$$(o?.[j$.FontSize])??d(F$.Dimension,z$.LabelValue,W$.FontSize)??JT,fontFamily:o?.[j$.FontFamily]??d(F$.Dimension,z$.LabelValue,W$.FontFamily)??ZT,fontWeight:V$(o?.[j$.FontStyle],void 0),fontStyle:G$(o?.[j$.FontStyle]),textDecoration:U$(o?.[j$.FontStyle]),color:H$(e,o?.[j$.FontColor])??d(F$.Dimension,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,o?.[j$.Background])??d(F$.Dimension,z$.LabelValue,W$.BackgroundColor)??nq.Transparent},measureValues:{fontSize:$$(i?.[j$.FontSize])??d(F$.Measure,z$.LabelValue,W$.FontSize)??JT,fontFamily:i?.[j$.FontFamily]??d(F$.Measure,z$.LabelValue,W$.FontFamily)??ZT,fontWeight:V$(i?.[j$.FontStyle],"normal"),fontStyle:G$(i?.[j$.FontStyle]),textDecoration:U$(i?.[j$.FontStyle]),color:H$(e,i?.[j$.FontColor])??d(F$.Measure,z$.LabelValue,W$.FontColor)??nq.FontSecondary,background:H$(e,i?.[j$.Background])??d(F$.Measure,z$.LabelValue,W$.BackgroundColor)??nq.Transparent},measureLabels:{fontWeight:V$(a?.[j$.FontStyle],"normal"),fontStyle:G$(a?.[j$.FontStyle]),textDecoration:U$(a?.[j$.FontStyle]),color:H$(e,a?.[j$.FontColor])??d(F$.Measure,z$.LabelName,W$.FontColor)??nq.FontSecondary,background:H$(e,a?.[j$.Background])??d(F$.Measure,z$.LabelName,W$.BackgroundColor)??nq.Transparent},totalValues:{fontWeight:V$(s?.[j$.FontStyle],QT),fontStyle:G$(s?.[j$.FontStyle]),textDecoration:U$(s?.[j$.FontStyle]),color:H$(e,s?.[j$.FontColor])??d(F$.Total,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,s?.[j$.Background])??d(F$.Total,z$.LabelValue,W$.BackgroundColor)??nq.Transparent},dimensionNull:{fontWeight:V$(c?.[j$.FontStyle],"normal"),fontStyle:G$(c?.[j$.FontStyle]),textDecoration:U$(c?.[j$.FontStyle]),color:H$(e,c?.[j$.FontColor])??d(F$.Null,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,c?.[j$.Background])??d(F$.Null,z$.LabelValue,W$.BackgroundColor)??nq.NullValueBackground},nullValues:{fontWeight:V$(l?.[j$.FontStyle],"normal"),fontStyle:G$(l?.[j$.FontStyle]),textDecoration:U$(l?.[j$.FontStyle]),color:H$(e,l?.[j$.FontColor])??d(F$.Null,z$.LabelValue,W$.FontColor)??cL.TEXT,background:H$(e,l?.[j$.Background])??d(F$.Null,z$.LabelValue,W$.BackgroundColor)??nq.NullValueBackground},grid:{columnLineClamp:f,lineClamp:p,border:H$(e,u?.[j$.Border])??d(F$.Grid,z$.Grid,W$.BorderColor)??nq.DividerLight,divider:H$(e,u?.[j$.Divider])??d(F$.Grid,z$.Divider,W$.BorderColor)??nq.DividerDark,background:H$(e,u?.[j$.Background])??d(F$.Grid,z$.Grid,W$.BackgroundColor)??nq.Transparent},selectedColors:VR(e)};return m.headerCellHeight=Math.max(B$(m.header.fontSize,f),B$(m.dimensionValues.fontSize,f),32),m.contentCellHeight=Math.max(B$(m.measureValues.fontSize,p),B$(m.dimensionValues.fontSize,p),24),m.dimensionValueTextHeight=B$(m.dimensionValues.fontSize,1),m})(h,o),[h,o]),E=((e,t,n)=>{const[,r,o]=Lq(async()=>{const t=ML(),n=e.getStyle("","","fontFamily"),r=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),i=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...i,n,r,o,_q].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(h,o,e),I=L();X$([J$({model:i,layout:o,effectivePropertiesService:u,translator:m,env:e})]),T(()=>{!w&&i&&!!S&&E&&(t.set(sO,{rect:x,pageInfo:b,qPivotDataPages:S,updatePageInfo:v,options:I,app:a,layout:o,model:i,embed:s,theme:h,keyboard:l,translator:m,interactions:p,env:e,viewService:y,layoutService:d,downloadService:c,styleService:C,effectivePropertiesService:u}),_$(r,f,t))},[o,i,a,x,p,f,y,d,c,w,S,C,r,E,m,g,b,v,u,s,l,h,e,I,t])},lH={version:"7.70.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},cH=()=>({...lH,qHyperCubeDef:{...lH.qHyperCubeDef,qIndentMode:!1}})}}});