@nebula.js/sn-tabbed-container 2.8.0 → 2.9.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.
- package/api-specification/spec.json +1 -1
- package/core/esm/index.js +2 -2
- package/dist/sn-tabbed-container.js +2 -2
- package/dist/sn-tabbed-container.systemjs.js +2 -2
- package/package.json +4 -4
- package/sn-tabbed-container-ext/dist/sn-tabbed-container.js +2 -2
- package/sn-tabbed-container-ext/sn-tabbed-container.qext +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-tabbed-container v2.
|
|
2
|
+
* @nebula.js/sn-tabbed-container v2.9.0
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -86,4 +86,4 @@ System.register(["@nebula.js/stardust","react","react-dom"],function(e){"use str
|
|
|
86
86
|
}
|
|
87
87
|
`),ks.rippleVisible,Ms,550,({theme:e})=>e.transitions.easing.easeInOut,ks.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ks.child,ks.childLeaving,js,550,({theme:e})=>e.transitions.easing.easeInOut,ks.childPulsate,Ns,({theme:e})=>e.transitions.easing.easeInOut),Ds=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=H(n,As),[s,l]=y.useState([]),c=y.useRef(0),d=y.useRef(null);y.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const u=y.useRef(!1),p=To(),h=y.useRef(null),f=y.useRef(null),m=y.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;l(e=>[...e,xn.jsx(zs,{classes:{ripple:qr(o.ripple,ks.ripple),rippleVisible:qr(o.rippleVisible,ks.rippleVisible),ripplePulsate:qr(o.ripplePulsate,ks.ripplePulsate),child:qr(o.child,ks.child),childLeaving:qr(o.childLeaving,ks.childLeaving),childPulsate:qr(o.childPulsate,ks.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)]),c.current+=1,d.current=a},[o]),b=y.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)&&u.current)return void(u.current=!1);"touchstart"===(null==e?void 0:e.type)&&(u.current=!0);const s=a?null:f.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,d,b;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),d=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),d=Math.round(n-l.top)}if(i)b=Math.sqrt((2*l.width**2+l.height**2)/3),b%2==0&&(b+=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)-d),d)+2;b=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:o,rippleX:c,rippleY:d,rippleSize:b,cb:n})},p.start(80,()=>{h.current&&(h.current(),h.current=null)})):m({pulsate:o,rippleX:c,rippleY:d,rippleSize:b,cb:n})},[r,m,p]),g=y.useCallback(()=>{b({},{pulsate:!0})},[b]),v=y.useCallback((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void p.start(0,()=>{v(e,t)});h.current=null,l(e=>e.length>0?e.slice(1):e),d.current=t},[p]);return y.useImperativeHandle(t,()=>({pulsate:g,start:b,stop:v}),[g,b,v]),xn.jsx($s,G({className:qr(ks.root,o.root,i),ref:f},a,{children:xn.jsx(xs,{component:null,exit:!0,children:s})}))});function Bs(e){return Zr("MuiButtonBase",e)}const Fs=Jr("MuiButtonBase",["root","disabled","focusVisible"]),Gs=["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"],Hs=za("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"},[`&.${Fs.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Us=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:u=!1,LinkComponent:p="a",onBlur:h,onClick:f,onContextMenu:m,onDragLeave:b,onFocus:g,onFocusVisible:v,onKeyDown:x,onKeyUp:E,onMouseDown:C,onMouseLeave:S,onMouseUp:w,onTouchEnd:R,onTouchMove:_,onTouchStart:k,tabIndex:A=0,TouchRippleProps:I,touchRippleRef:L,type:T}=n,O=H(n,Gs),P=y.useRef(null),M=y.useRef(null),j=ko(M,L),{isFocusVisibleRef:N,onFocus:$,onBlur:z,ref:D}=Bo(),[B,F]=y.useState(!1);l&&B&&F(!1),y.useImperativeHandle(r,()=>({focusVisible:()=>{F(!0),P.current.focus()}}),[]);const[U,W]=y.useState(!1);y.useEffect(()=>{W(!0)},[]);const Y=U&&!c&&!l;function V(e,t,n=d){return _o(r=>{t&&t(r);return!n&&M.current&&M.current[e](r),!0})}y.useEffect(()=>{B&&u&&!c&&U&&M.current.pulsate()},[c,u,B,U]);const q=V("start",C),K=V("stop",m),X=V("stop",b),Z=V("stop",w),J=V("stop",e=>{B&&e.preventDefault(),S&&S(e)}),Q=V("start",k),ee=V("stop",R),te=V("stop",_),ne=V("stop",e=>{z(e),!1===N.current&&F(!1),h&&h(e)},!1),re=_o(e=>{P.current||(P.current=e.currentTarget),$(e),!0===N.current&&(F(!0),v&&v(e)),g&&g(e)}),oe=()=>{const e=P.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ie=y.useRef(!1),ae=_o(e=>{u&&!ie.current&&B&&M.current&&" "===e.key&&(ie.current=!0,M.current.stop(e,()=>{M.current.start(e)})),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!l&&(e.preventDefault(),f&&f(e))}),se=_o(e=>{u&&" "===e.key&&M.current&&B&&!e.defaultPrevented&&(ie.current=!1,M.current.stop(e,()=>{M.current.pulsate(e)})),E&&E(e),f&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&f(e)});let le=s;"button"===le&&(O.href||O.to)&&(le=p);const ce={};"button"===le?(ce.type=void 0===T?"button":T,ce.disabled=l):(O.href||O.to||(ce.role="button"),l&&(ce["aria-disabled"]=l));const de=ko(t,D,P),ue=G({},n,{centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:d,focusRipple:u,tabIndex:A,focusVisible:B}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Wo({root:["root",t&&"disabled",n&&"focusVisible"]},Bs,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return xn.jsxs(Hs,G({as:le,className:qr(pe.root,a),ownerState:ue,onBlur:ne,onClick:f,onContextMenu:K,onFocus:re,onKeyDown:ae,onKeyUp:se,onMouseDown:q,onMouseLeave:J,onMouseUp:Z,onDragLeave:X,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:de,tabIndex:l?-1:A,type:T},ce,O,{children:[i,Y?xn.jsx(Ds,G({ref:j,center:o},I)):null]}))});function Ws(e){return Zr("MuiTypography",e)}Jr("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Ys=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Vs=za("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${Dn(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>G({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})),qs={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ks={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Xs=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiTypography"}),r=(e=>Ks[e]||e)(n.color),o=Hr(G({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:d=!1,variant:u="body1",variantMapping:p=qs}=o,h=H(o,Ys),f=G({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:d,variant:u,variantMapping:p}),m=s||(d?"p":p[u]||qs[u])||"span",b=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Wo({root:["root",i,"inherit"!==e.align&&`align${Dn(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Ws,a)})(f);return xn.jsx(Vs,G({as:m,ref:t,ownerState:f,className:qr(b.root,a)},h))});const Zs=y.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=y.useState(null),s=ko(y.isValidElement(n)?Zo(n):null,t);if(ho(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),ho(()=>{if(i&&!o)return Co(t,i),()=>{Co(t,null)}},[t,i,o]),o){if(y.isValidElement(n)){const e={ref:s};return y.cloneElement(n,e)}return xn.jsx(y.Fragment,{children:n})}return xn.jsx(y.Fragment,{children:i?O.createPortal(n,i):i})}),Js=["onChange","maxRows","minRows","style","value"];function Qs(e){return parseInt(e,10)||0}const el={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function tl(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const nl=y.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a}=e,s=H(e,Js),{current:l}=y.useRef(null!=a),c=y.useRef(null),d=ko(t,c),u=y.useRef(null),p=y.useRef(null),h=y.useCallback(()=>{const t=c.current,n=p.current;if(!t||!n)return;const i=Eo(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,s=Qs(i.paddingBottom)+Qs(i.paddingTop),l=Qs(i.borderBottomWidth)+Qs(i.borderTopWidth),d=n.scrollHeight;n.value="x";const u=n.scrollHeight;let h=d;o&&(h=Math.max(Number(o)*u,h)),r&&(h=Math.min(Number(r)*u,h)),h=Math.max(h,u);return{outerHeightStyle:h+("border-box"===a?s+l:0),overflowing:Math.abs(h-d)<=1}},[r,o,e.placeholder]),f=_o(()=>{const e=c.current,t=h();if(!e||!t||tl(t))return!1;const n=t.outerHeightStyle;return null!=u.current&&u.current!==n}),m=y.useCallback(()=>{const e=c.current,t=h();if(!e||!t||tl(t))return;const n=t.outerHeightStyle;u.current!==n&&(u.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),b=y.useRef(-1);ho(()=>{const e=yo(m),t=null==c?void 0:c.current;if(!t)return;const n=Eo(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{f()&&(r.unobserve(t),cancelAnimationFrame(b.current),m(),b.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(b.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,m,f]),ho(()=>{m()});return xn.jsxs(y.Fragment,{children:[xn.jsx("textarea",G({value:a,onChange:e=>{l||m(),n&&n(e)},ref:d,rows:o,style:i},s)),xn.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:G({},el,i,{paddingTop:0,paddingBottom:0})})]})});const rl=y.createContext(void 0);function ol(){return y.useContext(rl)}function il(e){return xn.jsx(Fr,G({},e,{defaultTheme:Ca,themeId:F}))}function al(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function sl(e){return Zr("MuiInputBase",e)}const ll=Jr("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),cl=["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"],dl=za("div",{name:"MuiInputBase",slot:"Root",overridesResolver:(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${Dn(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]}})(({theme:e,ownerState:t})=>G({},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",[`&.${ll.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&G({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),ul=za("input",{name:"MuiInputBase",slot:"Input",overridesResolver:(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]}})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=G({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 G({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] + .${ll.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},[`&.${ll.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"})}),pl=xn.jsx(il,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),hl=y.forwardRef(function(e,t){var n;const r=Qa({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,components:l={},componentsProps:c={},defaultValue:d,disabled:u,disableInjectingGlobalStyles:p,endAdornment:h,fullWidth:f=!1,id:m,inputComponent:b="input",inputProps:g={},inputRef:v,maxRows:x,minRows:E,multiline:C=!1,name:S,onBlur:w,onChange:R,onClick:_,onFocus:k,onKeyDown:A,onKeyUp:I,placeholder:L,readOnly:T,renderSuffix:O,rows:P,slotProps:M={},slots:j={},startAdornment:N,type:$="text",value:z}=r,B=H(r,cl),F=null!=g.value?g.value:z,{current:U}=y.useRef(null!=F),W=y.useRef(),Y=y.useCallback(e=>{},[]),V=ko(W,v,g.ref,Y),[q,K]=y.useState(!1),X=ol(),Z=function({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),{})}({props:r,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Z.focused=X?X.focused:q,y.useEffect(()=>{!X&&u&&q&&(K(!1),w&&w())},[X,u,q,w]);const J=X&&X.onFilled,Q=X&&X.onEmpty,ee=y.useCallback(e=>{!function(e,t=!1){return e&&(al(e.value)&&""!==e.value||t&&al(e.defaultValue)&&""!==e.defaultValue)}(e)?Q&&Q():J&&J()},[J,Q]);ho(()=>{U&&ee({value:F})},[F,ee,U]);y.useEffect(()=>{ee(W.current)},[]);let te=b,ne=g;C&&"input"===te&&(ne=G(P?{type:void 0,minRows:P,maxRows:P}:{type:void 0,maxRows:x,minRows:E},ne),te=nl);y.useEffect(()=>{X&&X.setAdornedStart(Boolean(N))},[X,N]);const re=G({},r,{color:Z.color||"primary",disabled:Z.disabled,endAdornment:h,error:Z.error,focused:Z.focused,formControl:X,fullWidth:f,hiddenLabel:Z.hiddenLabel,multiline:C,size:Z.size,startAdornment:N,type:$}),oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:d,readOnly:u,size:p,startAdornment:h,type:f}=e;return Wo({root:["root",`color${Dn(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Dn(p)}`,d&&"multiline",h&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",u&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",u&&"readOnly"]},sl,t)})(re),ie=j.root||l.Root||dl,ae=M.root||c.root||{},se=j.input||l.Input||ul;return ne=G({},ne,null!=(n=M.input)?n:c.input),xn.jsxs(y.Fragment,{children:[!p&&pl,xn.jsxs(ie,G({},ae,!Yo(ie)&&{ownerState:G({},re,ae.ownerState)},{ref:t,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),_&&_(e)}},B,{className:qr(oe.root,ae.className,s,T&&"MuiInputBase-readOnly"),children:[N,xn.jsx(rl.Provider,{value:null,children:xn.jsx(se,G({ownerState:re,"aria-invalid":Z.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:Z.disabled,id:m,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:S,placeholder:L,readOnly:T,required:Z.required,rows:P,value:F,onKeyDown:A,onKeyUp:I,type:$},ne,!Yo(se)&&{as:te,ownerState:G({},re,ne.ownerState)},{ref:V,className:qr(oe.input,ne.className,T&&"MuiInputBase-readOnly"),onBlur:e=>{w&&w(e),g.onBlur&&g.onBlur(e),X&&X.onBlur?X.onBlur(e):K(!1)},onChange:(e,...t)=>{if(!U){const t=e.target||W.current;if(null==t)throw new Error(D(1));ee({value:t.value})}g.onChange&&g.onChange(e,...t),R&&R(e,...t)},onFocus:e=>{Z.disabled?e.stopPropagation():(k&&k(e),g.onFocus&&g.onFocus(e),X&&X.onFocus?X.onFocus(e):K(!0))}}))}),h,O?O(G({},Z,{startAdornment:N})):null]}))]})}),fl=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ml={entering:{opacity:1},entered:{opacity:1}},bl=y.forwardRef(function(e,t){const n=Sa(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:l,onEnter:c,onEntered:d,onEntering:u,onExit:p,onExited:h,onExiting:f,style:m,timeout:b=r,TransitionComponent:g=fs}=e,v=H(e,fl),x=y.useRef(null),E=ko(x,Zo(a),t),C=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=C(u),w=C((e,t)=>{Es(e);const r=Cs({style:m,timeout:b,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),R=C(d),_=C(f),k=C(e=>{const t=Cs({style:m,timeout:b,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)}),A=C(h);return xn.jsx(g,G({appear:i,in:l,nodeRef:x,onEnter:w,onEntered:R,onEntering:S,onExit:k,onExited:A,onExiting:_,addEndListener:e=>{o&&o(x.current,e)},timeout:b},v,{children:(e,t)=>y.cloneElement(a,G({style:G({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},ml[e],m,a.props.style),ref:E},t))}))});function gl(e){return Zr("MuiBackdrop",e)}Jr("MuiBackdrop",["root","invisible"]);const vl=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],yl=za("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>G({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"})),xl=y.forwardRef(function(e,t){var n,r,o;const i=Qa({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:d={},invisible:u=!1,open:p,slotProps:h={},slots:f={},TransitionComponent:m=bl,transitionDuration:b}=i,g=H(i,vl),v=G({},i,{component:l,invisible:u}),y=(e=>{const{classes:t,invisible:n}=e;return Wo({root:["root",n&&"invisible"]},gl,t)})(v),x=null!=(n=h.root)?n:d.root;return xn.jsx(m,G({in:p,timeout:b},g,{children:xn.jsx(yl,G({"aria-hidden":!0},x,{as:null!=(r=null!=(o=f.root)?o:c.Root)?r:l,className:qr(y.root,s,null==x?void 0:x.className),ownerState:G({},v,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}),El=Jr("MuiBox",["root"]),Cl=Ea(),Sl=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Sn("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Or);return y.forwardRef(function(e,a){const s=Dr(n),l=Hr(e),{className:c,component:d="div"}=l,u=H(l,Kr);return xn.jsx(i,G({as:d,ref:a,className:qr(c,o?o(r):r),theme:t&&s[t]||s},u))})}({themeId:F,defaultTheme:Cl,defaultClassName:El.root,generateClassName:Yr.generate});function wl(e){return Zr("MuiButton",e)}const Rl=Jr("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"]),_l=y.createContext({}),kl=y.createContext(void 0),Al=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Il=e=>G({},"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}}),Ll=za(Us,{shouldForwardProp:e=>$a(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Dn(n.color)}`],t[`size${Dn(n.size)}`],t[`${n.variant}Size${Dn(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 G({},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":G({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ei.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})`:Ei.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})`:Ei.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":G({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Rl.focusVisible}`]:G({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Rl.disabled}`]:G({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 ${Ei.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"},[`&.${Rl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Rl.disabled}`]:{boxShadow:"none"}}),Tl=za("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Dn(n.size)}`]]}})(({ownerState:e})=>G({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Il(e))),Ol=za("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Dn(n.size)}`]]}})(({ownerState:e})=>G({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Il(e))),Pl=y.forwardRef(function(e,t){const n=y.useContext(_l),r=y.useContext(kl),o=Qa({props:po(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:u=!1,endIcon:p,focusVisibleClassName:h,fullWidth:f=!1,size:m="medium",startIcon:b,type:g,variant:v="text"}=o,x=H(o,Al),E=G({},o,{color:a,component:s,disabled:c,disableElevation:d,disableFocusRipple:u,fullWidth:f,size:m,type:g,variant:v}),C=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return G({},a,Wo({root:["root",i,`${i}${Dn(t)}`,`size${Dn(o)}`,`${i}Size${Dn(o)}`,`color${Dn(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Dn(o)}`],endIcon:["icon","endIcon",`iconSize${Dn(o)}`]},wl,a))})(E),S=b&&xn.jsx(Tl,{className:C.startIcon,ownerState:E,children:b}),w=p&&xn.jsx(Ol,{className:C.endIcon,ownerState:E,children:p}),R=r||"";return xn.jsxs(Ll,G({ownerState:E,className:qr(n.className,C.root,l,R),component:s,disabled:c,focusRipple:!u,focusVisibleClassName:qr(C.focusVisible,h),ref:t,type:g},x,{classes:C,children:[S,i,w]}))});function Ml(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function jl(e){return parseInt(Eo(e).getComputedStyle(e).paddingRight,10)||0}function Nl(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&&Ml(e,o)})}function $l(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function zl(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=xo(e);return t.body===e?Eo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Fo(xo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${jl(r)+e}px`;const t=xo(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${jl(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=xo(r).body;else{const t=r.parentElement,n=Eo(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 Dl=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Bl(e){const t=[],n=[];return Array.from(e.querySelectorAll(Dl)).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 Fl(){return!0}function Gl(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Bl,isEnabled:a=Fl,open:s}=e,l=y.useRef(!1),c=y.useRef(null),d=y.useRef(null),u=y.useRef(null),p=y.useRef(null),h=y.useRef(!1),f=y.useRef(null),m=ko(Zo(t),f),b=y.useRef(null);y.useEffect(()=>{s&&f.current&&(h.current=!n)},[n,s]),y.useEffect(()=>{if(!s||!f.current)return;const e=xo(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),h.current&&f.current.focus()),()=>{o||(u.current&&u.current.focus&&(l.current=!0,u.current.focus()),u.current=null)}},[s]),y.useEffect(()=>{if(!s||!f.current)return;const e=xo(f.current),t=t=>{b.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(l.current=!0,d.current&&d.current.focus())},n=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=i(f.current)),n.length>0){var o,s;const e=Boolean((null==(o=b.current)?void 0:o.shiftKey)&&"Tab"===(null==(s=b.current)?void 0:s.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,o,a,s,i]);const g=e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0};return xn.jsxs(y.Fragment,{children:[xn.jsx("div",{tabIndex:s?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),y.cloneElement(t,{ref:m,onFocus:e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),xn.jsx("div",{tabIndex:s?0:-1,onFocus:g,ref:d,"data-testid":"sentinelEnd"})]})}const Hl=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&&Ml(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);Nl(t,e.mount,e.modalRef,r,!0);const o=$l(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=$l(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=zl(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=$l(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&&Ml(e.modalRef,t),Nl(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&&Ml(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Ul(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Hl,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:d,rootRef:u}=e,p=y.useRef({}),h=y.useRef(null),f=y.useRef(null),m=ko(f,u),[b,g]=y.useState(!d),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const E=()=>(p.current.modalRef=f.current,p.current.mount=h.current,p.current),C=()=>{o.mount(E(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},S=_o(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||xo(h.current).body;o.add(E(),e),f.current&&C()}),w=y.useCallback(()=>o.isTopModal(E()),[o]),R=_o(e=>{h.current=e,e&&(d&&w()?C():f.current&&Ml(f.current,x))}),_=y.useCallback(()=>{o.remove(E(),x)},[x,o]);y.useEffect(()=>()=>{_()},[_]),y.useEffect(()=>{d?S():v&&i||_()},[d,_,v,i,S]);const k=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&w()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},A=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Vo(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=G({},n,t);return G({role:"presentation"},r,{onKeyDown:k(r),ref:m})},getBackdropProps:(e={})=>G({"aria-hidden":!0},e,{onClick:A(e),open:d}),getTransitionProps:()=>({onEnter:vo(()=>{g(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:vo(()=>{g(!0),s&&s(),i&&_()},null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:R,isTopModal:w,exited:b,hasTransition:v}}function Wl(e){return Zr("MuiModal",e)}Jr("MuiModal",["root","hidden","backdrop"]);const Yl=["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"],Vl=za("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})=>G({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),ql=za(xl,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Kl=y.forwardRef(function(e,t){var n,r,o,i,a,s;const l=Qa({name:"MuiModal",props:e}),{BackdropComponent:c=ql,BackdropProps:d,className:u,closeAfterTransition:p=!1,children:h,container:f,component:m,components:b={},componentsProps:g={},disableAutoFocus:v=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:E=!1,disablePortal:C=!1,disableRestoreFocus:S=!1,disableScrollLock:w=!1,hideBackdrop:R=!1,keepMounted:_=!1,onBackdropClick:k,open:A,slotProps:I,slots:L}=l,T=H(l,Yl),O=G({},l,{closeAfterTransition:p,disableAutoFocus:v,disableEnforceFocus:x,disableEscapeKeyDown:E,disablePortal:C,disableRestoreFocus:S,disableScrollLock:w,hideBackdrop:R,keepMounted:_}),{getRootProps:P,getBackdropProps:M,getTransitionProps:j,portalRef:N,isTopModal:$,exited:z,hasTransition:D}=Ul(G({},O,{rootRef:t})),B=G({},O,{exited:z}),F=(e=>{const{open:t,exited:n,classes:r}=e;return Wo({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Wl,r)})(B),U={};if(void 0===h.props.tabIndex&&(U.tabIndex="-1"),D){const{onEnter:e,onExited:t}=j();U.onEnter=e,U.onExited=t}const W=null!=(n=null!=(r=null==L?void 0:L.root)?r:b.Root)?n:Vl,Y=null!=(o=null!=(i=null==L?void 0:L.backdrop)?i:b.Backdrop)?o:c,V=null!=(a=null==I?void 0:I.root)?a:g.root,q=null!=(s=null==I?void 0:I.backdrop)?s:g.backdrop,K=Xo({elementType:W,externalSlotProps:V,externalForwardedProps:T,getSlotProps:P,additionalProps:{ref:t,as:m},ownerState:B,className:qr(u,null==V?void 0:V.className,null==F?void 0:F.root,!B.open&&B.exited&&(null==F?void 0:F.hidden))}),X=Xo({elementType:Y,externalSlotProps:q,additionalProps:d,getSlotProps:e=>M(G({},e,{onClick:t=>{k&&k(t),null!=e&&e.onClick&&e.onClick(t)}})),className:qr(null==q?void 0:q.className,null==d?void 0:d.className,null==F?void 0:F.backdrop),ownerState:B});return _||A||D&&!z?xn.jsx(Zs,{ref:N,container:f,disablePortal:C,children:xn.jsxs(W,G({},K,{children:[!R&&c?xn.jsx(Y,G({},X)):null,xn.jsx(Gl,{disableEnforceFocus:x,disableAutoFocus:v,disableRestoreFocus:S,isEnabled:$,open:A,children:y.cloneElement(h,U)})]}))}):null});function Xl(e){return Zr("MuiDivider",e)}const Zl=Jr("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Jl=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Ql=za("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})=>G({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)`:Ei.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})=>G({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>G({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>G({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>G({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),ec=za("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>G({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)`})),tc=y.forwardRef(function(e,t){const n=Qa({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:d=("hr"!==a?"separator":void 0),textAlign:u="center",variant:p="fullWidth"}=n,h=H(n,Jl),f=G({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:d,textAlign:u,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Wo({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"]},Xl,r)})(f);return xn.jsx(Ql,G({as:a,className:qr(m.root,i),role:d,ref:t,ownerState:f},h,{children:o?xn.jsx(ec,{className:m.wrapper,ownerState:f,children:o}):null}))});tc.muiSkipListHighlight=!0;const nc=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function rc(e){return`scale(${e}, ${e**2})`}const oc={entering:{opacity:1,transform:rc(1)},entered:{opacity:1,transform:"none"}},ic="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),ac=y.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:d,onExited:u,onExiting:p,style:h,timeout:f="auto",TransitionComponent:m=fs}=e,b=H(e,nc),g=To(),v=y.useRef(),x=Sa(),E=y.useRef(null),C=ko(E,Zo(o),t),S=e=>t=>{if(e){const n=E.current;void 0===t?e(n):e(n,t)}},w=S(c),R=S((e,t)=>{Es(e);const{duration:n,delay:r,easing:o}=Cs({style:h,timeout:f,easing:i},{mode:"enter"});let a;"auto"===f?(a=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[x.transitions.create("opacity",{duration:a,delay:r}),x.transitions.create("transform",{duration:ic?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),_=S(l),k=S(p),A=S(e=>{const{duration:t,delay:n,easing:r}=Cs({style:h,timeout:f,easing:i},{mode:"exit"});let o;"auto"===f?(o=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:ic?o:.666*o,delay:ic?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=rc(.75),d&&d(e)}),I=S(u);return xn.jsx(m,G({appear:r,in:a,nodeRef:E,onEnter:R,onEntered:_,onEntering:w,onExit:A,onExited:I,onExiting:k,addEndListener:e=>{"auto"===f&&g.start(v.current||0,e),n&&n(E.current,e)},timeout:"auto"===f?null:f},b,{children:(e,t)=>y.cloneElement(o,G({style:G({opacity:0,transform:rc(.75),visibility:"exited"!==e||a?void 0:"hidden"},oc[e],h,o.props.style),ref:C},t))}))});function sc(e){return Zr("MuiInputAdornment",e)}ac.muiSupportAuto=!0;const lc=Jr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var cc;const dc=["children","className","component","disablePointerEvents","disableTypography","position","variant"],uc=za("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Dn(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>G({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${lc.positionStart}&:not(.${lc.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),pc=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c}=n,d=H(n,dc),u=ol()||{};let p=c;c&&u.variant,u&&!p&&(p=u.variant);const h=G({},n,{hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:a,position:l,variant:p}),f=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Wo({root:["root",n&&"disablePointerEvents",o&&`position${Dn(o)}`,a,r&&"hiddenLabel",i&&`size${Dn(i)}`]},sc,t)})(h);return xn.jsx(rl.Provider,{value:null,children:xn.jsx(uc,G({as:i,ownerState:h,className:qr(f.root,o),ref:t},d,{children:"string"!=typeof r||s?xn.jsxs(y.Fragment,{children:["start"===l?cc||(cc=xn.jsx("span",{className:"notranslate",children:""})):null,r]}):xn.jsx(Xs,{color:"text.secondary",children:r})}))})}),hc=y.createContext({});function fc(e){return Zr("MuiList",e)}Jr("MuiList",["root","padding","dense","subheader"]);const mc=["children","className","component","dense","disablePadding","subheader"],bc=za("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})=>G({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),gc=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=H(n,mc),d=y.useMemo(()=>({dense:a}),[a]),u=G({},n,{component:i,dense:a,disablePadding:s}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Wo({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},fc,t)})(u);return xn.jsx(hc.Provider,{value:d,children:xn.jsxs(bc,G({as:i,className:qr(p.root,o),ref:t,ownerState:u},c,{children:[l,r]}))})});function vc(e){return Zr("MuiListItem",e)}const yc=Jr("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function xc(e){return Zr("MuiListItemButton",e)}const Ec=Jr("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Cc=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Sc=za(Us,{shouldForwardProp:e=>$a(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>G({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ec.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ec.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ec.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ei.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})`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Ec.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ec.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),wc=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:o=!1,component:i="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:d,selected:u=!1,className:p}=n,h=H(n,Cc),f=y.useContext(hc),m=y.useMemo(()=>({dense:s||f.dense||!1,alignItems:r,disableGutters:l}),[r,f.dense,s,l]),b=y.useRef(null);ho(()=>{o&&b.current&&b.current.focus()},[o]);const g=G({},n,{alignItems:r,dense:m.dense,disableGutters:l,divider:c,selected:u}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e;return G({},n,Wo({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},xc,n))})(g),x=ko(b,t);return xn.jsx(hc.Provider,{value:m,children:xn.jsx(Sc,G({ref:x,href:h.href||h.to,component:(h.href||h.to)&&"div"===i?"button":i,focusVisibleClassName:qr(v.focusVisible,d),ownerState:g,className:qr(v.root,p)},h,{classes:v,children:a}))})});function Rc(e){return Zr("MuiListItemSecondaryAction",e)}Jr("MuiListItemSecondaryAction",["root","disableGutters"]);const _c=["className"],kc=za("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>G({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Ac=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=H(n,_c),i=G({},n,{disableGutters:y.useContext(hc).disableGutters}),a=(e=>{const{disableGutters:t,classes:n}=e;return Wo({root:["root",t&&"disableGutters"]},Rc,n)})(i);return xn.jsx(kc,G({className:qr(a.root,r),ownerState:i,ref:t},o))});Ac.muiName="ListItemSecondaryAction";const Ic=["className"],Lc=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Tc=za("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})=>G({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&G({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Ec.root}`]:{paddingRight:48}},{[`&.${yc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${yc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${yc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${yc.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"}},[`&.${yc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ei.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})`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Oc=za("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Pc=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:i=!1,children:a,className:s,component:l,components:c={},componentsProps:d={},ContainerComponent:u="li",ContainerProps:{className:p}={},dense:h=!1,disabled:f=!1,disableGutters:m=!1,disablePadding:b=!1,divider:g=!1,focusVisibleClassName:v,secondaryAction:x,selected:E=!1,slotProps:C={},slots:S={}}=n,w=H(n.ContainerProps,Ic),R=H(n,Lc),_=y.useContext(hc),k=y.useMemo(()=>({dense:h||_.dense||!1,alignItems:r,disableGutters:m}),[r,_.dense,h,m]),A=y.useRef(null);ho(()=>{o&&A.current&&A.current.focus()},[o]);const I=y.Children.toArray(a),L=I.length&&(T=I[I.length-1],O=["ListItemSecondaryAction"],y.isValidElement(T)&&-1!==O.indexOf(null!=(P=T.type.muiName)?P:null==(M=T.type)||null==(M=M._payload)||null==(M=M.value)?void 0:M.muiName));var T,O,P,M;const j=G({},n,{alignItems:r,autoFocus:o,button:i,dense:k.dense,disabled:f,disableGutters:m,disablePadding:b,divider:g,hasSecondaryAction:L,selected:E}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:d}=e;return Wo({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]},vc,r)})(j),$=ko(A,t),z=S.root||c.Root||Tc,D=C.root||d.root||{},B=G({className:qr(N.root,D.className,s),disabled:f},R);let F=l||"li";return i&&(B.component=l||"div",B.focusVisibleClassName=qr(yc.focusVisible,v),F=Us),L?(F=B.component||l?F:"div","li"===u&&("li"===F?F="div":"li"===B.component&&(B.component="div")),xn.jsx(hc.Provider,{value:k,children:xn.jsxs(Oc,G({as:u,className:qr(N.container,p),ref:$,ownerState:j},w,{children:[xn.jsx(z,G({},D,!Yo(z)&&{as:F,ownerState:G({},j,D.ownerState)},B,{children:I})),I.pop()]}))})):xn.jsx(hc.Provider,{value:k,children:xn.jsxs(z,G({},D,{as:F,ref:$},!Yo(z)&&{ownerState:G({},j,D.ownerState)},B,{children:[I,x&&xn.jsx(Ac,{children:x})]}))})});function Mc(e){return Zr("MuiListItemIcon",e)}const jc=Jr("MuiListItemIcon",["root","alignItemsFlexStart"]),Nc=["className"],$c=za("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})=>G({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),zc=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=H(n,Nc),i=G({},n,{alignItems:y.useContext(hc).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return Wo({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Mc,n)})(i);return xn.jsx($c,G({className:qr(a.root,r),ownerState:i,ref:t},o))}),Dc=Jr("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Bc=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Fc(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Gc(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Hc(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 Uc(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")&&Hc(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Wc=y.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:c,variant:d="selectedMenu"}=e,u=H(e,Bc),p=y.useRef(null),h=y.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ho(()=>{r&&p.current.focus()},[r]),y.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${Fo(xo(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}}),[]);const f=ko(p,t);let m=-1;y.Children.forEach(i,(e,t)=>{y.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1))):m===t&&(m+=1,m>=i.length&&(m=-1))});const b=y.Children.map(i,(e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),y.cloneElement(e,t)}return e});return xn.jsx(gc,G({role:"menu",ref:f,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=xo(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Uc(t,r,l,s,Fc);else if("ArrowUp"===n)e.preventDefault(),Uc(t,r,l,s,Gc);else if("Home"===n)e.preventDefault(),Uc(t,null,l,s,Fc);else if("End"===n)e.preventDefault(),Uc(t,null,l,s,Gc);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 l=r&&!o.repeating&&Hc(r,o);o.previousKeyMatched&&(l||Uc(t,r,!1,s,Fc,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},u,{children:b}))});function Yc(e){return Zr("MuiPopover",e)}Jr("MuiPopover",["root","paper"]);const Vc=["onEntering"],qc=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Kc=["slotProps"];function Xc(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Zc(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Jc(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function Qc(e){return"function"==typeof e?e():e}const ed=za(Kl,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),td=za(_s,{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}),nd=y.forwardRef(function(e,t){var n,r,o;const i=Qa({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:u,className:p,container:h,elevation:f=8,marginThreshold:m=16,open:b,PaperProps:g={},slots:v,slotProps:x,transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:C=ac,transitionDuration:S="auto",TransitionProps:{onEntering:w}={},disableScrollLock:R=!1}=i,_=H(i.TransitionProps,Vc),k=H(i,qc),A=null!=(n=null==x?void 0:x.paper)?n:g,I=y.useRef(),L=ko(I,A.ref),T=G({},i,{anchorOrigin:l,anchorReference:d,elevation:f,marginThreshold:m,externalPaperSlotProps:A,transformOrigin:E,TransitionComponent:C,transitionDuration:S,TransitionProps:_}),O=(e=>{const{classes:t}=e;return Wo({root:["root"],paper:["paper"]},Yc,t)})(T),P=y.useCallback(()=>{if("anchorPosition"===d)return c;const e=Qc(s),t=(e&&1===e.nodeType?e:xo(I.current).body).getBoundingClientRect();return{top:t.top+Xc(t,l.vertical),left:t.left+Zc(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,d]),M=y.useCallback(e=>({vertical:Xc(e,E.vertical),horizontal:Zc(e,E.horizontal)}),[E.horizontal,E.vertical]),j=y.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=M(t);if("none"===d)return{top:null,left:null,transformOrigin:Jc(n)};const r=P();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,l=i+t.width,c=Eo(Qc(s)),u=c.innerHeight-m,p=c.innerWidth-m;if(null!==m&&o<m){const e=o-m;o-=e,n.vertical+=e}else if(null!==m&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==m&&i<m){const e=i-m;i-=e,n.horizontal+=e}else if(l>p){const e=l-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:Jc(n)}},[s,d,P,M,m]),[N,$]=y.useState(b),z=y.useCallback(()=>{const e=I.current;if(!e)return;const t=j(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,$(!0)},[j]);y.useEffect(()=>(R&&window.addEventListener("scroll",z),()=>window.removeEventListener("scroll",z)),[s,R,z]);y.useEffect(()=>{b&&z()}),y.useImperativeHandle(a,()=>b?{updatePosition:()=>{z()}}:null,[b,z]),y.useEffect(()=>{if(!b)return;const e=yo(()=>{z()}),t=Eo(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,b,z]);let D=S;"auto"!==S||C.muiSupportAuto||(D=void 0);const B=h||(s?xo(Qc(s)).body:void 0),F=null!=(r=null==v?void 0:v.root)?r:ed,U=null!=(o=null==v?void 0:v.paper)?o:td,W=Xo({elementType:U,externalSlotProps:G({},A,{style:N?A.style:G({},A.style,{opacity:0})}),additionalProps:{elevation:f,ref:L},ownerState:T,className:qr(O.paper,null==A?void 0:A.className)}),Y=Xo({elementType:F,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:k,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:B,open:b},ownerState:T,className:qr(O.root,p)}),{slotProps:V}=Y,q=H(Y,Kc);return xn.jsx(F,G({},q,!Yo(F)&&{slotProps:V,disableScrollLock:R},{children:xn.jsx(C,G({appear:!0,in:b,onEntering:(e,t)=>{w&&w(e,t),z()},onExited:()=>{$(!1)},timeout:D},_,{children:xn.jsx(U,G({},W,{children:u}))}))}))});function rd(e){return Zr("MuiMenu",e)}Jr("MuiMenu",["root","paper","list"]);const od=["onEntering"],id=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],ad={vertical:"top",horizontal:"right"},sd={vertical:"top",horizontal:"left"},ld=za(nd,{shouldForwardProp:e=>$a(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),cd=za(td,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),dd=za(Wc,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ud=y.forwardRef(function(e,t){var n,r;const o=Qa({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:d,open:u,PaperProps:p={},PopoverClasses:h,transitionDuration:f="auto",TransitionProps:{onEntering:m}={},variant:b="selectedMenu",slots:g={},slotProps:v={}}=o,x=H(o.TransitionProps,od),E=H(o,id),C=ii(),S=G({},o,{autoFocus:i,disableAutoFocusItem:l,MenuListProps:c,onEntering:m,PaperProps:p,transitionDuration:f,TransitionProps:x,variant:b}),w=(e=>{const{classes:t}=e;return Wo({root:["root"],paper:["paper"],list:["list"]},rd,t)})(S),R=i&&!l&&u,_=y.useRef(null);let k=-1;y.Children.map(a,(e,t)=>{y.isValidElement(e)&&(e.props.disabled||("selectedMenu"===b&&e.props.selected||-1===k)&&(k=t))});const A=null!=(n=g.paper)?n:cd,I=null!=(r=v.paper)?r:p,L=Xo({elementType:g.root,externalSlotProps:v.root,ownerState:S,className:[w.root,s]}),T=Xo({elementType:A,externalSlotProps:I,ownerState:S,className:w.paper});return xn.jsx(ld,G({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?ad:sd,slots:{paper:A,root:g.root},slotProps:{root:L,paper:T},open:u,ref:t,transitionDuration:f,TransitionProps:G({onEntering:(e,t)=>{_.current&&_.current.adjustStyleForScrollbar(e,{direction:C?"rtl":"ltr"}),m&&m(e,t)}},x),ownerState:S},E,{classes:h,children:xn.jsx(dd,G({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:_,autoFocus:i&&(-1===k||l),autoFocusItem:R,variant:b},c,{className:qr(w.list,c.className),children:a}))}))});function pd(e){return Zr("MuiMenuItem",e)}const hd=Jr("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),fd=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],md=za(Us,{shouldForwardProp:e=>$a(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})=>G({},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"}},[`&.${hd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${hd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${hd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ei.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})`:Ei.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${hd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${hd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Zl.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Zl.inset}`]:{marginLeft:52},[`& .${Dc.root}`]:{marginTop:0,marginBottom:0},[`& .${Dc.inset}`]:{paddingLeft:36},[`& .${jc.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&G({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${jc.root} svg`]:{fontSize:"1.25rem"}}))),bd=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:d,className:u}=n,p=H(n,fd),h=y.useContext(hc),f=y.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),m=y.useRef(null);ho(()=>{r&&m.current&&m.current.focus()},[r]);const b=G({},n,{dense:f.dense,divider:a,disableGutters:s}),g=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return G({},a,Wo({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},pd,a))})(n),v=ko(m,t);let x;return n.disabled||(x=void 0!==d?d:-1),xn.jsx(hc.Provider,{value:f,children:xn.jsx(md,G({ref:v,role:c,tabIndex:x,component:o,focusVisibleClassName:qr(g.focusVisible,l),className:qr(g.root,u)},p,{ownerState:b,classes:g}))})});function gd(e){return Zr("MuiTab",e)}const vd=Jr("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),yd=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],xd=za(Us,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Dn(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${vd.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>G({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${vd.iconWrapper}`]:G({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${vd.selected}`]:{opacity:1},[`&.${vd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${vd.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${vd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${vd.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${vd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),Ed=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:i=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:c,label:d,onChange:u,onClick:p,onFocus:h,selected:f,selectionFollowsFocus:m,textColor:b="inherit",value:g,wrapped:v=!1}=n,x=H(n,yd),E=G({},n,{disabled:o,disableFocusRipple:i,selected:f,icon:!!s,iconPosition:l,label:!!d,fullWidth:a,textColor:b,wrapped:v}),C=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e;return Wo({root:["root",i&&a&&"labelIcon",`textColor${Dn(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]},gd,t)})(E),S=s&&d&&y.isValidElement(s)?y.cloneElement(s,{className:qr(C.iconWrapper,s.props.className)}):s;return xn.jsxs(xd,G({focusRipple:!i,className:qr(C.root,r),ref:t,role:"tab","aria-selected":f,disabled:o,onClick:e=>{!f&&u&&u(e,g),p&&p(e)},onFocus:e=>{m&&!f&&u&&u(e,g),h&&h(e)},ownerState:E,tabIndex:f?0:-1},x,{children:["top"===l||"start"===l?xn.jsxs(y.Fragment,{children:[S,d]}):xn.jsxs(y.Fragment,{children:[d,S]}),c]}))});var Cd=os(xn.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Sd=os(xn.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function wd(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Rd=["onChange"],_d={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function kd(e){return Zr("MuiTabScrollButton",e)}const Ad=Jr("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Id=["className","slots","slotProps","direction","orientation","disabled"],Ld=za(Us,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>G({width:40,flexShrink:0,opacity:.8,[`&.${Ad.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Td=y.forwardRef(function(e,t){var n,r;const o=Qa({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:s={},direction:l}=o,c=H(o,Id),d=G({isRtl:ii()},o),u=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Wo({root:["root",n,r&&"disabled"]},kd,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Cd,h=null!=(r=a.EndScrollButtonIcon)?r:Sd,f=Xo({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=Xo({elementType:h,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return xn.jsx(Ld,G({component:"div",className:qr(u.root,i),ref:t,role:null,ownerState:d,tabIndex:null},c,{children:"left"===l?xn.jsx(p,G({},f)):xn.jsx(h,G({},m))}))});function Od(e){return Zr("MuiTabs",e)}const Pd=Jr("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Md=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],jd=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Nd=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,$d=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},zd=za("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Pd.scrollButtons}`]:t.scrollButtons},{[`& .${Pd.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>G({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Pd.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Dd=za("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>G({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Bd=za("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>G({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Fd=za("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>G({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Gd=za(function(e){const{onChange:t}=e,n=H(e,Rd),r=y.useRef(),o=y.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return ho(()=>{const e=yo(()=>{const e=r.current;i(),e!==r.current&&t(r.current)}),n=Eo(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),y.useEffect(()=>{i(),t(r.current)},[t]),xn.jsx("div",G({style:_d},n,{ref:o}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Hd={},Ud=y.forwardRef(function(e,t){const n=Qa({props:e,name:"MuiTabs"}),r=Sa(),o=ii(),{"aria-label":i,"aria-labelledby":a,action:s,centered:l=!1,children:c,className:d,component:u="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:f,orientation:m="horizontal",ScrollButtonComponent:b=Td,scrollButtons:g="auto",selectionFollowsFocus:v,slots:x={},slotProps:E={},TabIndicatorProps:C={},TabScrollButtonProps:S={},textColor:w="primary",value:R,variant:_="standard",visibleScrollbar:k=!1}=n,A=H(n,Md),I="scrollable"===_,L="vertical"===m,T=L?"scrollTop":"scrollLeft",O=L?"top":"left",P=L?"bottom":"right",M=L?"clientHeight":"clientWidth",j=L?"height":"width",N=G({},n,{component:u,allowScrollButtonsMobile:p,indicatorColor:h,orientation:m,vertical:L,scrollButtons:g,textColor:w,variant:_,visibleScrollbar:k,fixed:!I,hideScrollbar:I&&!k,scrollableX:I&&!L,scrollableY:I&&L,centered:l&&!I,scrollButtonsHideMobile:!p}),$=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Wo({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Od,l)})(N),z=Xo({elementType:x.StartScrollButtonIcon,externalSlotProps:E.startScrollButtonIcon,ownerState:N}),D=Xo({elementType:x.EndScrollButtonIcon,externalSlotProps:E.endScrollButtonIcon,ownerState:N}),[B,F]=y.useState(!1),[U,W]=y.useState(Hd),[Y,V]=y.useState(!1),[q,K]=y.useState(!1),[X,Z]=y.useState(!1),[J,Q]=y.useState({overflow:"hidden",scrollbarWidth:0}),ee=new Map,te=y.useRef(null),ne=y.useRef(null),re=()=>{const e=te.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Uo(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==R){const e=ne.current.children;if(e.length>0){const t=e[ee.get(R)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},oe=_o(()=>{const{tabsMeta:e,tabMeta:t}=re();let n,r=0;if(L)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[j]:t?t[j]:0};if(isNaN(U[n])||isNaN(U[j]))W(i);else{const e=Math.abs(U[n]-i[n]),t=Math.abs(U[j]-i[j]);(e>=1||t>=1)&&W(i)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=wd,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const d=()=>{c=!0},u=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const d=Math.min(1,(r-s)/a);t[e]=i(d)*(n-l)+l,d>=1?requestAnimationFrame(()=>{o(null)}):requestAnimationFrame(u)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(u)}(T,te.current,e,{duration:r.transitions.duration.standard}):te.current[T]=e},ae=e=>{let t=te.current[T];L?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Ho()?-1:1),ie(t)},se=()=>{const e=te.current[M];let t=0;const n=Array.from(ne.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[M]>e){0===r&&(t=e);break}t+=o[M]}return t},le=()=>{ae(-1*se())},ce=()=>{ae(se())},de=y.useCallback(e=>{Q({overflow:null,scrollbarWidth:e})},[]),ue=_o(e=>{const{tabsMeta:t,tabMeta:n}=re();if(n&&t)if(n[O]<t[O]){const r=t[T]+(n[O]-t[O]);ie(r,{animation:e})}else if(n[P]>t[P]){const r=t[T]+(n[P]-t[P]);ie(r,{animation:e})}}),pe=_o(()=>{I&&!1!==g&&Z(!X)});y.useEffect(()=>{const e=yo(()=>{te.current&&oe()});let t;const n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{var n;null==(n=t)||n.unobserve(e)}),e.addedNodes.forEach(e=>{var n;null==(n=t)||n.observe(e)})}),e(),pe()},r=Eo(te.current);let o;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ne.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(o=new MutationObserver(n),o.observe(ne.current,{childList:!0})),()=>{var n,i;e.clear(),r.removeEventListener("resize",e),null==(n=o)||n.disconnect(),null==(i=t)||i.disconnect()}},[oe,pe]),y.useEffect(()=>{const e=Array.from(ne.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&I&&!1!==g){const n=e[0],r=e[t-1],o={root:te.current,threshold:.99},i=new IntersectionObserver(e=>{V(!e[0].isIntersecting)},o);i.observe(n);const a=new IntersectionObserver(e=>{K(!e[0].isIntersecting)},o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}},[I,g,X,null==c?void 0:c.length]),y.useEffect(()=>{F(!0)},[]),y.useEffect(()=>{oe()}),y.useEffect(()=>{ue(Hd!==U)},[ue,U]),y.useImperativeHandle(s,()=>({updateIndicator:oe,updateScrollButtons:pe}),[oe,pe]);const he=xn.jsx(Fd,G({},C,{className:qr($.indicator,C.className),ownerState:N,style:G({},U,C.style)}));let fe=0;const me=y.Children.map(c,e=>{if(!y.isValidElement(e))return null;const t=void 0===e.props.value?fe:e.props.value;ee.set(t,fe);const n=t===R;return fe+=1,y.cloneElement(e,G({fullWidth:"fullWidth"===_,indicator:n&&!B&&he,selected:n,selectionFollowsFocus:v,onChange:f,textColor:w,value:t},1!==fe||!1!==R||e.props.tabIndex?{}:{tabIndex:0}))}),be=(()=>{const e={};e.scrollbarSizeListener=I?xn.jsx(Gd,{onChange:de,className:qr($.scrollableX,$.hideScrollbar)}):null;const t=I&&("auto"===g&&(Y||q)||!0===g);return e.scrollButtonStart=t?xn.jsx(b,G({slots:{StartScrollButtonIcon:x.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:z},orientation:m,direction:o?"right":"left",onClick:le,disabled:!Y},S,{className:qr($.scrollButtons,S.className)})):null,e.scrollButtonEnd=t?xn.jsx(b,G({slots:{EndScrollButtonIcon:x.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:D},orientation:m,direction:o?"left":"right",onClick:ce,disabled:!q},S,{className:qr($.scrollButtons,S.className)})):null,e})();return xn.jsxs(zd,G({className:qr($.root,d),ownerState:N,ref:t,as:u},A,{children:[be.scrollButtonStart,be.scrollbarSizeListener,xn.jsxs(Dd,{className:$.scroller,ownerState:N,style:{overflow:J.overflow,[L?"margin"+(o?"Left":"Right"):"marginBottom"]:k?void 0:-J.scrollbarWidth},ref:te,children:[xn.jsx(Bd,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:$.flexContainer,ownerState:N,onKeyDown:e=>{const t=ne.current,n=xo(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),$d(t,n,Nd);break;case i:e.preventDefault(),$d(t,n,jd);break;case"Home":e.preventDefault(),$d(t,null,jd);break;case"End":e.preventDefault(),$d(t,null,Nd)}},ref:ne,role:"tablist",children:me}),B&&he]}),be.scrollButtonEnd]}))});function Wd(e){return xn.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:xn.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function Yd({fontSize:e="medium",children:t=null,className:n=""}={}){return xn.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 Vd(e={}){return xn.jsx(Yd,{...e,children:xn.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[xn.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),xn.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 qd(e={}){return xn.jsx(Yd,{fontSize:"medium",...e,children:xn.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[xn.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),xn.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 Kd(e){return xn.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:xn.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 Xd(e={}){return xn.jsx(Yd,{...e,children:xn.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:xn.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[xn.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),xn.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function Zd(e={}){return xn.jsx(Yd,{fontSize:"medium",...e,children:xn.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:xn.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:xn.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function Jd({className:e}){return xn.jsx(Yd,{fontSize:"small",className:e,children:xn.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:xn.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:xn.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:xn.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[xn.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"}),xn.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 Qd(e={}){return xn.jsx(Yd,{...e,children:xn.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:xn.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:xn.jsx("rect",{stroke:Ga.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}var eu=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:Ga.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:Ga.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:xn.jsx(Wd,{"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 ${Ga.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:Ga.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`,borderRadius:Va,backgroundColor:Ga.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 ${Ga.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:Ga.WHITE,color:Ga.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:Va},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:Ga.GREYSCALE_0_15,backgroundColor:Ga.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:Ga.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${Ga.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:Ga.GREEN_PALE},"&:active":{backgroundColor:Ga.GREEN_DARK},"&.Mui-focusVisible":{borderColor:Ga.GREEN_PALE,boxShadow:`0 0 0 3px ${go(Ga.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:Ga.BLUE_PALE},"&:active":{backgroundColor:Ga.BLUE_DARK},"&.Mui-focusVisible":{borderColor:Ga.BLUE_PALE,boxShadow:`0 0 0 3px ${go(Ga.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:Va,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:Ga.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:Ga.GREYSCALE_0_42,backgroundColor:Ga.GREYSCALE_100_60,"&:active":{backgroundColor:Ga.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:Ga.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${Ga.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:Ga.PURPLE,"&.Mui-focusVisible":{borderColor:Ga.PURPLE,boxShadow:`0 0 0 3px ${go(Ga.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:Ga.GREEN,"&.Mui-focusVisible":{borderColor:Ga.GREEN,boxShadow:`0 0 0 3px ${go(Ga.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:Ga.BLUE,"&.Mui-focusVisible":{borderColor:Ga.BLUE,boxShadow:`0 0 0 3px ${go(Ga.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:Ga.ORANGE,"&.Mui-focusVisible":{borderColor:Ga.ORANGE,boxShadow:`0 0 0 3px ${go(Ga.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:Ga.RED,"&.Mui-focusVisible":{borderColor:Ga.RED,boxShadow:`0 0 0 3px ${go(Ga.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:Ga.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:Ga.PURPLE_PALE},"&:active":{backgroundColor:Ga.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:Ga.PURPLE_PALE,boxShadow:`0 0 0 3px ${go(Ga.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:Ga.GREEN_PALE},"&:active":{backgroundColor:Ga.GREEN_DARK},"&.Mui-focusVisible":{borderColor:Ga.GREEN_PALE,boxShadow:`0 0 0 3px ${go(Ga.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:Ga.BLUE_PALE},"&:active":{backgroundColor:Ga.BLUE_DARK},"&.Mui-focusVisible":{borderColor:Ga.BLUE_PALE,boxShadow:`0 0 0 3px ${go(Ga.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:Ga.ORANGE_PALE},"&:active":{backgroundColor:Ga.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:Ga.ORANGE_PALE,boxShadow:`0 0 0 3px ${go(Ga.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:Ga.RED_PALE},"&:active":{backgroundColor:Ga.RED_DARK},"&.Mui-focusVisible":{borderColor:Ga.RED_PALE,boxShadow:`0 0 0 3px ${go(Ga.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:Ga.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:Ga.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:Va,boxShadow:`inset 0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:xn.jsx(Kd,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:Ha,borderRadius:Va,color:Ga.TEXT_PRIMARY,backgroundColor:Ga.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:Ga.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${Ga.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:Ga.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:Ga.GREYSCALE_0_05,color:Ga.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:Ga.GREEN,borderColor:Ga.GREEN},"&.MuiChip-outlinedInfo":{color:Ga.BLUE,borderColor:Ga.BLUE},"&.MuiChip-outlinedWarning":{color:Ga.ORANGE,borderColor:Ga.ORANGE},"&.MuiChip-outlinedError":{color:Ga.RED,borderColor:Ga.RED}},outlined:{border:`solid 1px ${Ga.GREYSCALE_0_15}`,backgroundColor:Ga.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:Va,boxShadow:"none",backgroundColor:Ga.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:Ga.GREEN,borderColor:Ga.GREEN},outlinedSecondary:{color:Ga.BLUE,borderColor:Ga.BLUE},label:{fontFamily:Ja.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:xn.jsx(Kd,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:xn.jsx(Wd,{"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:Va},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:Va,fontSize:Ua,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:Ga.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${Ga.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:Ga.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:Ga.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:Ga.GREYSCALE_0_05}}},popupIndicator:{borderRadius:Va,border:`solid 1px ${Ga.GREYSCALE_0_15}`,color:Ga.GREYSCALE_0_60,marginRight:0,width:Ya,height:Ya},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${Ga.GREYSCALE_0_15}`},clearIndicator:{borderRadius:Va,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:Ga.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:Ua}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:Ha,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:Ga.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:Ga.GREYSCALE_25,fontSize:Ha,fontFamily:Ja.FONT_FAMILY,fontWeight:Xa,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:Ga.TEXT_PRIMARY},"&.Mui-error":{color:Ga.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:Ga.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Ka,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:Ga.TEXT_SECONDARY,content:"'(required)'",fontWeight:Ka,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:Ua,lineHeight:"16px",backgroundColor:Ga.WHITE,borderRadius:Va,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ga.GREYSCALE_0_05}`,borderColor:Ga.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ga.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${Ga.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${Ga.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ga.RED}`,boxShadow:`0px 0px 0px 1px ${Ga.RED}, inset 0 2px 0 0 ${Ga.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ga.GREYSCALE_0_10}`,borderColor:Ga.GREYSCALE_0_10,backgroundColor:Ga.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:Ga.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:Ga.GREYSCALE_0_15,borderRadius:Va,boxShadow:`inset 0 2px 0 0 ${Ga.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>xn.jsx(Wd,{...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:Ga.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:Ga.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:Ga.GREYSCALE_0_03},"&:active":{backgroundColor:Ga.GREYSCALE_0_10},"&:focus":{backgroundColor:Ga.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${Ga.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${Ga.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:Ga.GREYSCALE_0_30,"&:hover":{backgroundColor:Ga.GREYSCALE_0_0,borderColor:Ga.GREYSCALE_0_15},"& ~svg":{color:Ga.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${Ga.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:Va}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:Ga.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:Ga.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:Ua,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:Ha,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:Ha,fontWeight:Xa,color:Ga.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Xa}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${Ga.GREYSCALE_0_15}, 0px 0px 0px 1px ${Ga.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:xn.jsx(Zd,{}),checkedIcon:xn.jsx(qd,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:Ga.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:Ga.GREEN_PALE,boxShadow:`0 0 0 3px ${go(Ga.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:Ga.BLUE_PALE,boxShadow:`0 0 0 3px ${go(Ga.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:Ga.GREYSCALE_0_20}},"&.Mui-disabled":{fill:Ga.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:xn.jsx(Qd,{}),checkedIcon:xn.jsx(Vd,{}),indeterminateIcon:xn.jsx(Xd,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:Va,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:Ga.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:Ga.GREYSCALE_0_55,color:Ga.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:Ga.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:Ga.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:Ga.GREYSCALE_0_55,"&:hover":{color:Ga.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:Ga.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:Ga.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:Ua,color:Ga.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Xa},secondary:{fontSize:Ha,color:Ga.GREYSCALE_45,fontWeight:Ka,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:Ua,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:Ua,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:Ga.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:Ha,borderBottom:`solid 1px ${Ga.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:Ua,color:Ga.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:Ga.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:Ga.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:Ga.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:Ga.RED}}},"&.Mui-focusVisible":{backgroundColor:Ga.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:Ga.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:Ga.GREEN,height:"24px","&.Mui-disabled":{color:Ga.GREYSCALE_0_15}},rail:{backgroundColor:Ga.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${Ga.GREYSCALE_0_05}`,borderRadius:Va,boxShadow:`inset 0px 0px 0px 1px ${Ga.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${Ga.GREYSCALE_0_05}`,borderRadius:Va},thumb:{height:"16px",width:"16px",borderRadius:Va,backgroundColor:Ga.WHITE,boxShadow:`0px 1px 2px 0px ${Ga.GREYSCALE_0_15}, 0px 0px 0px 1px ${Ga.GREYSCALE_0_05}`,"&:hover":{borderRadius:Va,boxShadow:`0 2px 4px 0 ${Ga.GREYSCALE_0_30}, 0 0 0 1px ${Ga.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${Ga.GREYSCALE_0_15}, 0 0 0 1px ${Ga.GREYSCALE_0_06}, 0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${Ga.GREYSCALE_0_15}, 0 0 0 1px ${Ga.GREYSCALE_0_06}, 0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:Ga.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:Ga.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:Ga.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:Ga.GREYSCALE_0_15},markLabel:{color:Ga.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:Ga.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:Ga.WHITE,color:Ga.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:Ga.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:Ga.GREEN_PALE,boxShadow:`0 0 0 3px ${go(Ga.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:Ga.BLUE_PALE,boxShadow:`0 0 0 3px ${go(Ga.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:Ga.GREYSCALE_0_15,borderRadius:Va},thumb:{height:"16px",width:"16px",borderRadius:Va,backgroundColor:Ga.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:Ua,fontWeight:Xa,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${Ga.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${Ga.MISC_FOCUS_BORDER}`,backgroundColor:Ga.GREYSCALE_0_03,borderRadius:Va},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:Ga.GREYSCALE_25,"&.Mui-selected":{color:Ga.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:Ua,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:Va,"&:hover":{backgroundColor:Ga.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 ${Ga.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${Ga.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:Va,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:Ga.GREYSCALE_0_05},"&:hover":{backgroundColor:Ga.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${Ga.GREYSCALE_85}`,borderRight:`1px solid ${Ga.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Xa,backgroundColor:Ga.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:Ga.GREYSCALE_98,borderBottom:`1px solid ${Ga.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${Ga.GREYSCALE_85}`,borderTop:`1px solid ${Ga.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:Ga.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:Ga.GREYSCALE_0_05,"&:hover":{backgroundColor:Ga.GREYSCALE_0_03}},"&&:hover":{backgroundColor:Ga.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>xn.jsx(Jd,{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 ${Ga.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:Ua,borderRadius:Va,padding:"7px 16px",border:`1px solid ${Ga.GREYSCALE_0_15}`,backgroundColor:Ga.GREYSCALE_100_60,color:Ga.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:Ga.GREYSCALE_0_10,border:`1px solid ${Ga.GREYSCALE_0_30}`},"&:hover":{backgroundColor:Ga.GREYSCALE_0_03,border:`1px solid ${Ga.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:Ga.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${Ga.MISC_FOCUS_BORDER}`,border:`1px solid ${Ga.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:Ga.GREYSCALE_25,backgroundColor:Ga.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:Ga.GREYSCALE_0_10,border:`1px solid ${Ga.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:Ha,height:24,width:24,padding:7},sizeLarge:{fontSize:Wa,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:Ua,borderRadius:Va}}},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:Ga.GREYSCALE_20},tooltip:{backgroundColor:Ga.GREYSCALE_20,fontSize:Ha,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}});const tu=e=>({mode:"light",primary:{ultraLight:Ga.GREEN_ULTRA_LIGHT,light:Ga.GREEN_PALE,main:Ga.GREEN,dark:Ga.GREEN_DARK,extraDark:Ga.GREEN_EXTRA_DARK,contrastText:Ga.WHITE},secondary:{ultraLight:Ga.BLUE_ULTRA_LIGHT,light:Ga.BLUE_PALE,main:Ga.BLUE,dark:Ga.BLUE_DARK,extraDark:Ga.BLUE_EXTRA_DARK,contrastText:Ga.WHITE},error:{ultraLight:Ga.RED_ULTRA_LIGHT,light:Ga.RED_PALE,main:Ga.RED,dark:Ga.RED_DARK,extraDark:Ga.RED_EXTRA_DARK,contrastText:Ga.WHITE},warning:{ultraLight:Ga.ORANGE_ULTRA_LIGHT,light:Ga.ORANGE_PALE,main:Ga.ORANGE,dark:Ga.ORANGE_DARK,extraDark:Ga.ORANGE_EXTRA_DARK,contrastText:Ga.WHITE},success:{ultraLight:Ga.GREEN_ULTRA_LIGHT,light:Ga.GREEN_PALE,main:Ga.GREEN,dark:Ga.GREEN_DARK,extraDark:Ga.GREEN_EXTRA_DARK,contrastText:Ga.WHITE},info:{ultraLight:Ga.BLUE_ULTRA_LIGHT,light:Ga.BLUE_PALE,main:Ga.BLUE,dark:Ga.BLUE_DARK,extraDark:Ga.BLUE_EXTRA_DARK,contrastText:Ga.WHITE},text:{primary:Ga.TEXT_PRIMARY,secondary:Ga.TEXT_SECONDARY,disabled:Ga.GREYSCALE_0_30},action:{hover:Ga.GREYSCALE_0_03,hoverOpacity:.03,selected:Ga.GREYSCALE_0_05,selectedOpacity:.05,focus:Ga.MISC_FOCUS_BORDER},amethyst:{ultraLight:Ga.WHITE,main:Ga.PURPLE,light:Ga.PURPLE_PALE,dark:Ga.PURPLE_DARK,extraDark:Ga.GREYSCALE_0_0,contrastText:Ga.WHITE},background:{paper:Ga.WHITE,default:Ga.GREYSCALE_95},divider:Ga.GREYSCALE_0_15});function nu(e){return Ea({components:eu(),palette:tu(),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:Ua,fontWeightLight:qa,fontWeightRegular:Ka,fontWeightMedium:Xa,fontWeightBold:Za,htmlFontSize:Ua,fontFamily:Ja.FONT_FAMILY,button:{fontWeight:Xa,fontSize:Ua,textTransform:"none"},body1:{fontSize:Wa,lineHeight:"24px"},body2:{fontSize:Ua,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:Ya,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:Wa,fontWeight:Xa,lineHeight:"16px"},h6:{fontSize:Ua,fontWeight:Xa,lineHeight:"16px"},caption:{color:Ga.TEXT_SECONDARY},subtitle1:{fontSize:Ua,color:Ga.TEXT_SECONDARY},subtitle2:{fontSize:Ha,color:Ga.TEXT_SECONDARY}},shape:{borderRadius:Va},direction:e})}class ru{translator;muiTheme;containers={};constructor({translator:e}){this.translator=e}sync=({element:e,sharedContainerUtilities:t,translator:n,containerId:r,dataHandler:o,renderHelper:i,chartList:a})=>{this.translator=n,this.containers[r]={element:e,sharedContainerUtilities:t,dataHandler:o,renderHelper:i,chartList:a}};setMuiTheme=e=>{this.muiTheme=nu(e)};destroy=e=>{delete this.containers[e]}}const ou=["container","sn-layout-container","sn-tabbed-container","listbox","qlik-tabbed-container","qlik-show-hide-container","qlik-trellis-container","qlik-on-demand-reporting","sn-analysis-autochart"];class iu{embed;translator;charts={};constructor(e,t){this.embed=e,this.translator=t}getCharts=()=>(this.charts=(this.embed?.getRegisteredTypes()??[]).reduce((e,t)=>{if(!ou.includes(t.id)&&!1!==t.libraryInfo?.isLibraryItem&&!t.libraryInfo?.deprecated){const n=t;n.libraryInfo?.translationKey&&(n.libraryInfo.translation=this.translator.get(n.libraryInfo.translationKey)),e[t.id||t.type]=n}return e},{}),this.charts);getChart=e=>(this.charts[e]||this.getCharts(),this.charts[e])}var au,su={};var lu=function(){if(au)return su;au=1;var e=T;return su.createRoot=e.createRoot,su.hydrateRoot=e.hydrateRoot,su}();const cu=x((e,t)=>xn.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:xn.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"})})),du="rgb(89, 89, 89)",uu=mn(Sl)({display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}),pu=mn(Sl)({display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}),hu=mn(gc,{shouldForwardProp:e=>"width"!==e})(({width:e})=>({"&.MuiList-root":{paddingTop:0,paddingBottom:0,width:e||250,maxHeight:250,overflow:"auto"}})),fu=mn(Xs)({color:du,fontSize:"12px",fontFamily:"inherit",lineHeight:"24px",margin:"0px"}),mu=mn(zc)({"&.MuiListItemIcon-root":{minWidth:32,color:du,marginRight:"0px"}}),bu=mn(tc)({"&.MuiDivider-root":{borderBottom:"3px solid #595959"}}),gu=mn(Pl)({"&.MuiButton-contained":{backgroundColor:du,color:"rgb(255, 255, 255)"},"&.MuiButton-outlined":{backgroundColor:"rgb(255, 255, 255)",borderColor:du,color:du,border:"1px solid rgb(179, 179, 179)","&:hover":{backgroundColor:"rgb(255, 255, 255)",border:`1px solid ${du}`}}}),vu=mn(rs)({width:"1em",height:"1em",paddingBottom:"8px"}),yu=mn(rs)({width:"16px",height:"16px"}),xu=({name:e,items:t,onSelect:n})=>xn.jsxs(xn.Fragment,{children:[xn.jsx(Pc,{dense:!0,children:xn.jsx(fu,{noWrap:!0,fontWeight:"bold",children:e})},e),xn.jsx(bu,{}),t.map(e=>xn.jsx(Pc,{divider:!0,disablePadding:!0,disableGutters:!0,children:xn.jsxs(wc,{sx:{minHeight:"32px",height:"auto"},onClick:()=>{n(e)},disableRipple:!0,dense:!0,children:[e.iconPath?xn.jsx(mu,{children:e.IconDefinition?xn.jsx(e.IconDefinition,{}):xn.jsx(yu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:e.iconPath})})}):null,xn.jsx(fu,{noWrap:!0,title:e.translation||e.name,children:e.translation||e.name})]})},e.qExtendsId??e.name))]}),Eu=({categories:e,anchorEl:t,onClose:n,onSelect:r,width:o})=>{const[i,a]=_(""),s=!!t;return xn.jsxs(nd,{open:s,anchorEl:t,onClose:()=>{a(""),n()},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},sx:{marginTop:"5px"},children:[xn.jsx(hl,{fullWidth:!0,onChange:e=>{a(e.target.value)},startAdornment:xn.jsx(pc,{position:"start",children:xn.jsx(cu,{})})}),xn.jsx(bu,{}),xn.jsx(hu,{width:o,children:e.map(e=>{const t=e.items.filter(e=>{const t=e.translation||e.name;return t?.toLocaleLowerCase().indexOf(i.toLocaleLowerCase())>-1});return t.length>0&&xn.jsx(xu,{name:e.name,items:t,onSelect:r},e.name)})})]})},Cu=({anchorEl:e,onClose:t,dataHandler:n,translator:r,sharedContainerUtilities:o,width:i})=>{const[a,s]=_([]),[l,c]=_({});k(()=>{if(e&&n){(async()=>{const e=await n.getMasterVizList();s(e),c(n.getCharts())})().catch(()=>{})}},[e,n]);const d=[],u=[],p=new Map,h=Object.values(l);if(0===h.length&&0===a.length)return null;h.forEach(e=>{if(!e.libraryInfo||!e.libraryInfo.isThirdParty&&e.libraryInfo.visible)d.push(e);else if(e.libraryInfo.visible)if(e.libraryInfo.bundle?.name){const t=e.libraryInfo.bundle.name,n=p.get(t);n?n.push(e):p.set(t,[e])}else u.push(e)});const f=e=>e.map(e=>({iconPath:e.libraryInfo?.iconPath,IconDefinition:e.libraryInfo?.IconDefinition,name:e.id,translation:e.libraryInfo?.translation||e.libraryInfo?.name||e.id||"",type:e.id})).toSorted((e,t)=>(e.translation||e.name).localeCompare(t.translation||t.name)),m=[{name:r.get("LayoutContainer.Object.MasterItems"),items:a.map(e=>({qExtendsId:e.qExtendsId,iconPath:l[e.visualization]?.libraryInfo?.iconPath,IconDefinition:l[e.visualization]?.libraryInfo?.IconDefinition,name:e.name,type:e.visualization})).toSorted((e,t)=>e.name.localeCompare(t.name))},{name:r.get("LayoutContainer.Object.Charts"),items:d.map(e=>({iconPath:e.libraryInfo?.iconPath||"",IconDefinition:e.libraryInfo?.IconDefinition,name:e.libraryInfo?.name||e.id,type:e.libraryInfo?.template||e.id,translation:e.libraryInfo?.translation||e.id||""})).toSorted((e,t)=>e.translation.localeCompare(t.translation))},{name:r.get("LayoutContainer.Object.CustomObjects"),items:f(u)}];for(const[e,t]of p)m.push({name:e,items:f(t)});return xn.jsx(Eu,{categories:m,anchorEl:e,onSelect:e=>{if(!n)return;const{qExtendsId:r}=e;(r?n.addMasterObjectAsChild({initProps:{qExtendsId:r,qInfo:{qType:"undefined"}}}):n.addVizAsChild({type:e.type,objectInitProps:{label:e.translation}})).then(e=>{e?.id&&o?.setSelected([e.id])}).catch(e=>{console.warn(e)}).finally(()=>{t()})},onClose:t,width:i})},Su=e=>{const t=Ru(e);return e.objects?.map(e=>{const{childRefId:n}=e;if(!n)return e;const r=t[n];return r?{...e,id:r}:e})??[]},wu=(e,t)=>e?.qChildList?.qItems?.find(e=>e?.qData?.childRefId===t),Ru=e=>e?.qChildList?.qItems?.reduce((e,t)=>{const n=t?.qData?.childRefId;return e[n]=t?.qInfo?.qId,e},{});var _u=wu,ku=e=>{const t={...e};return t.objects=Su(t),t},Au=e=>e?.qChildList?.qItems?.reduce((e,t)=>{const n=t?.qInfo?.qId;return e[n]=t.qData?.childRefId,e},{}),Iu=e=>e.objects.reduce((e,t)=>(e[t.childRefId]=t,e),{}),Lu=(e,t)=>{if(!e)return t;const n=wu(e,t);return n?.qInfo?.qId};class Tu{layout;app;activeId="";data;properties=void 0;constructor({app:e,data:t}){this.app=e,this.data=t}get activeContainer(){return this.data.containers[this.activeId]}setSelectedChild=e=>{this.activeContainer?.sharedContainerUtilities?.setSelected(e)};addChild=({initProps:e,objectInitProps:t,children:n})=>{if(!this.activeContainer)return;const{dataHandler:r}=this.activeContainer;if(e?.qExtendsId){const{qExtendsId:o,qInfo:i}=e;return r?.addMasterObjectAsChild({initProps:{qExtendsId:o,qInfo:i},objectInitProps:t,children:n})}return r?.addVizAsChild({type:e?.visualization,initProps:e,objectInitProps:t,children:n})};deleteChild=async e=>{if(!this.activeContainer)return;const{dataHandler:t}=this.activeContainer;await(t?.deleteChildren([e]))};duplicateChild=async e=>{const{childRefId:t,...n}=e,r=this.getEngineId(t);if(!r)return;const o=await(this.app?.getObject(r));if(o&&this.activeContainer){const{sharedContainerUtilities:e}=this.activeContainer,t=await o.getFullPropertyTree(),r=t.qProperty,i=t.qChildren,a=await this.addChild({initProps:r,children:i,objectInitProps:n});a&&e?.setSelected([a.id])}};openAddChildPopover=e=>{if(this.activeContainer&&this.activeContainer.dataHandler&&this.data.muiTheme){const t=((e,t)=>{const n=e.getElementsByClassName(t);let r;return 0===n.length?(r=document.createElement("div"),r.className=t,e.appendChild(r)):r=n[0],lu.createRoot(r)})(this.activeContainer.element,"add-child-popover"),n=()=>{t.unmount()};t?.render(xn.jsx(Ba,{theme:this.data.muiTheme,children:xn.jsx(Cu,{translator:this.data.translator,anchorEl:e,dataHandler:this.activeContainer.dataHandler,onClose:n,width:220,sharedContainerUtilities:this.activeContainer.sharedContainerUtilities})}))}};getObject(e){const t=this.getEngineId(e);if(t)return this.activeContainer?.renderHelper.objectMap.get(t)}getChartIcon(e){const t=this.getEngineId(e);if(!t)return;const n=this.activeContainer?.renderHelper.getChildLayout(t),r=n?.qData.visualization;return r?this.activeContainer?.chartList?.getChart(r)?.libraryInfo?.icon:void 0}setModel=e=>{this.activeId=e.id};setLayout=e=>{this.layout=e};getLayout=()=>this.layout;getEngineId=e=>Lu(this.layout,e);setProperties=e=>{this.properties=e};canAddDimension=()=>!1;canAddMeasure=()=>!1;canColorBy=()=>!1;getDimensions=()=>[];getMeasures=()=>[];minDimensions=()=>0;minMeasures=()=>0;maxDimensions=()=>0;maxMeasures=()=>0}const Ou="object",Pu=["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"];const Mu=e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}});function ju({theme:e,translator:t,id:n,path:r}){const o=()=>e.getStyle(n,r,"fontFamily");return{getDefaultValue:()=>o(),getOptions:()=>function({theme:e,translator:t,defaultValue:n}){const r=[],o=e.getStyle("","","fontFamilies");return Array.isArray(o)&&o.length?r.push(...new Set([n,...o.map(e=>e.split(",").map(e=>e.trim()).map(e=>e.replace(/\s+/g," ").trim()).filter(Boolean).join(", "))])):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFonts"),metaText:t.get("properties.theme"),groupHeader:!0},...r.map(e=>Mu(e)),{value:"DefaultHeader",label:t.get("properties.allFonts"),metaText:t.get("properties.default"),groupHeader:!0},...Pu.map(e=>Mu(e))]}({theme:e,translator:t,defaultValue:o()})}}var Nu=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"];const $u=e=>({value:e,label:e,groupHeader:!1,disabled:!1});function zu({theme:e,translator:t,id:n,path:r}){const o=()=>e.getStyle(n,r,"fontSize");return{getDefaultValue:()=>o(),getOptions:()=>function({theme:e,translator:t,defaultValue:n}){const r=[],o=e.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?r.push(...new Set([n,...o])):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0},...r.map(e=>$u(e)),{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0},...Nu.map(e=>$u(e))]}({theme:e,translator:t,defaultValue:o()})}}function Du({theme:e,translator:t,id:n,path:r}){return{fontFamily:ju({theme:e,translator:t,id:n,path:r}),fontSize:zu({theme:e,translator:t,id:n,path:r})}}const Bu=["__proto__","constructor"],Fu=e=>{if(Bu.some(t=>e.includes(t)))throw new Error("font-resolver: Forbidden property.")};var Gu,Hu,Uu,Wu=function(){if(Hu)return Gu;Hu=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 Gu=function e(){var t,n,r,l,c,d,u=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},p=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=s(u,n),u!==(l=s(t,n))&&(f&&l&&(i(l)||(c=o(l)))?(c?(c=!1,d=r&&o(r)?r:[]):d=r&&i(r)?r:{},a(u,{name:n,newValue:e(f,d,l)})):void 0!==l&&a(u,{name:n,newValue:l}));return u},Gu}();function Yu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Vu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qu(){}(Uu=Wu)&&Uu.__esModule&&Object.prototype.hasOwnProperty.call(Uu,"default")&&Uu.default;var Ku=.7,Xu=1/Ku,Zu="\\s*([+-]?\\d+)\\s*",Ju="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ep=/^#([0-9a-f]{3,8})$/,tp=new RegExp(`^rgb\\(${Zu},${Zu},${Zu}\\)$`),np=new RegExp(`^rgb\\(${Qu},${Qu},${Qu}\\)$`),rp=new RegExp(`^rgba\\(${Zu},${Zu},${Zu},${Ju}\\)$`),op=new RegExp(`^rgba\\(${Qu},${Qu},${Qu},${Ju}\\)$`),ip=new RegExp(`^hsl\\(${Ju},${Qu},${Qu}\\)$`),ap=new RegExp(`^hsla\\(${Ju},${Qu},${Qu},${Ju}\\)$`),sp={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 lp(){return this.rgb().formatHex()}function cp(){return this.rgb().formatRgb()}function dp(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ep.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?up(t):3===n?new mp(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?pp(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?pp(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=tp.exec(e))?new mp(t[1],t[2],t[3],1):(t=np.exec(e))?new mp(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=rp.exec(e))?pp(t[1],t[2],t[3],t[4]):(t=op.exec(e))?pp(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ip.exec(e))?Ep(t[1],t[2]/100,t[3]/100,1):(t=ap.exec(e))?Ep(t[1],t[2]/100,t[3]/100,t[4]):sp.hasOwnProperty(e)?up(sp[e]):"transparent"===e?new mp(NaN,NaN,NaN,0):null}function up(e){return new mp(e>>16&255,e>>8&255,255&e,1)}function pp(e,t,n,r){return r<=0&&(e=t=n=NaN),new mp(e,t,n,r)}function hp(e){return e instanceof qu||(e=dp(e)),e?new mp((e=e.rgb()).r,e.g,e.b,e.opacity):new mp}function fp(e,t,n,r){return 1===arguments.length?hp(e):new mp(e,t,n,null==r?1:r)}function mp(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bp(){return`#${xp(this.r)}${xp(this.g)}${xp(this.b)}`}function gp(){const e=vp(this.opacity);return`${1===e?"rgb(":"rgba("}${yp(this.r)}, ${yp(this.g)}, ${yp(this.b)}${1===e?")":`, ${e})`}`}function vp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xp(e){return((e=yp(e))<16?"0":"")+e.toString(16)}function Ep(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Sp(e,t,n,r)}function Cp(e){if(e instanceof Sp)return new Sp(e.h,e.s,e.l,e.opacity);if(e instanceof qu||(e=dp(e)),!e)return new Sp;if(e instanceof Sp)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 Sp(a,s,l,e.opacity)}function Sp(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function wp(e){return(e=(e||0)%360)<0?e+360:e}function Rp(e){return Math.max(0,Math.min(1,e||0))}function _p(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Yu(qu,dp,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lp,formatHex:lp,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Cp(this).formatHsl()},formatRgb:cp,toString:cp}),Yu(mp,fp,Vu(qu,{brighter(e){return e=null==e?Xu:Math.pow(Xu,e),new mp(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ku:Math.pow(Ku,e),new mp(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mp(yp(this.r),yp(this.g),yp(this.b),vp(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:bp,formatHex:bp,formatHex8:function(){return`#${xp(this.r)}${xp(this.g)}${xp(this.b)}${xp(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gp,toString:gp})),Yu(Sp,function(e,t,n,r){return 1===arguments.length?Cp(e):new Sp(e,t,n,null==r?1:r)},Vu(qu,{brighter(e){return e=null==e?Xu:Math.pow(Xu,e),new Sp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ku:Math.pow(Ku,e),new Sp(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 mp(_p(e>=240?e-240:e+120,o,r),_p(e,o,r),_p(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Sp(wp(this.h),Rp(this.s),Rp(this.l),vp(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=vp(this.opacity);return`${1===e?"hsl(":"hsla("}${wp(this.h)}, ${100*Rp(this.s)}%, ${100*Rp(this.l)}%${1===e?")":`, ${e})`}`}}));const kp=Math.PI/180,Ap=180/Math.PI,Ip=.96422,Lp=.82521,Tp=4/29,Op=6/29,Pp=3*Op*Op,Mp=Op*Op*Op;function jp(e){if(e instanceof Np)return new Np(e.l,e.a,e.b,e.opacity);if(e instanceof Fp)return Gp(e);e instanceof mp||(e=hp(e));var t,n,r=Bp(e.r),o=Bp(e.g),i=Bp(e.b),a=$p((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=$p((.4360747*r+.3850649*o+.1430804*i)/Ip),n=$p((.0139322*r+.0971045*o+.7141733*i)/Lp)),new Np(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Np(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function $p(e){return e>Mp?Math.pow(e,1/3):e/Pp+Tp}function zp(e){return e>Op?e*e*e:Pp*(e-Tp)}function Dp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Bp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fp(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Gp(e){if(isNaN(e.h))return new Np(e.l,0,0,e.opacity);var t=e.h*kp;return new Np(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Yu(Np,function(e,t,n,r){return 1===arguments.length?jp(e):new Np(e,t,n,null==r?1:r)},Vu(qu,{brighter(e){return new Np(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Np(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 mp(Dp(3.1338561*(t=Ip*zp(t))-1.6168667*(e=1*zp(e))-.4906146*(n=Lp*zp(n))),Dp(-.9787684*t+1.9161415*e+.033454*n),Dp(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Yu(Fp,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Fp)return new Fp(e.h,e.c,e.l,e.opacity);if(e instanceof Np||(e=jp(e)),0===e.a&&0===e.b)return new Fp(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ap;return new Fp(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Fp(e,t,n,null==r?1:r)},Vu(qu,{brighter(e){return new Fp(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Fp(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Gp(this).rgb()}}));var Hp=e=>()=>e;function Up(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Hp(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?Up: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):Hp(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=fp(e)).r,(t=fp(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Up(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 Wp="center",Yp="bottom";function Vp(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===o[t])return n;o=o[t]}return o}[{key:"NoDataExist",alignment:Wp,condition:({layoutService:e})=>{if(!e)return!1;const{x:t,y:n}=e.meta.size;return t*n===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Wp,condition:({layoutService:e})=>!!e&&e.getHyperCubeValue("qMeasureInfo").every(e=>"NaN"===e.qMin&&"NaN"===e.qMax)},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Wp,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:Wp},{key:"DataRangeIncludingZero",alignment:Yp},{key:"LimitedData",alignment:Yp},{key:"NegativeOrZeroValues",alignment:Yp}].reduce((e,t)=>(e[t.key]=t,e),{});const qp=["__proto__","constructor"];function Kp(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];if(qp.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 Xp(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 Zp(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Qp)):void 0===t&&(t=Jp);for(var n,r,o,i,a,s=new nh(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 nh(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(th)}function Jp(e){return e.children}function Qp(e){return Array.isArray(e)?e[1]:null}function eh(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function th(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function nh(e){this.data=e,this.depth=this.height=0,this.parent=null}var rh;nh.prototype=Zp.prototype={constructor:nh,count:function(){return this.eachAfter(Xp)},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 Zp(this).eachBefore(eh)},[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)}},rh=function(e){
|
|
88
88
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
89
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,d,u,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),b=m.search(/[0-9\-\+#]/),g=p-b,v=e.substring(g,g+1),y=g+("."===v||","===v?1:0),x=b>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(h,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)),d=e[0].split(i),e[0]=d.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=d[1]&&d[d.length-1].length){for(m="",g=(u=t[0]).length%l,p=u.length,y=0;y<p;y++)m+=u.charAt(y),!((y-g+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),f+(n?"-":"")+r+x}},rh({exports:{}});const oh="'Source Sans Pro', 'Arial', 'sans-serif'",ih="#333333",ah="#595959",sh="#737373",lh="#cccccc",ch="#e6e6e6";function dh(e){const t={};return[...e,["","","color"],["object","","fontFamily"],["object","axis.label.name","color",ah],["object","axis.label.name","fontFamily",oh],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",lh],["object","axis.line.minor","color",ch],["object","axis.title","color"],["object","axis.title","fontFamily",oh],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",ch],["object","grid.line.major","color",lh],["object","grid.line.minor","color",ch],["object","label.value","color",ah],["object","label.value","fontFamily",oh],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",ah],[!1,"label.value","lightColor",ch],["object","outOfRange","color","#999"],["object","legend.title","color",ih],["object","legend.title","fontFamily",oh],["object","legend.title","fontSize","15px"],["object","legend.label","color",ah],["object","legend.label","fontFamily",oh],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",ih],["object","referenceLine.label.name","fontFamily",oh],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",ch],["object","referenceLine.outOfBounds","fontFamily",oh],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",sh,e=>"transparent"===e?sh:e]].reduce((e,n)=>{const r=`${n[0]}-${n[1]}-${n[2]}}`;return t[r]||(t[r]=!0,e.push(n)),e},[]).sort((e,t)=>(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0))}const uh="object",ph=e=>e;function hh({theme:e,id:t,transform:n,extend:r,matrix:o}){const i={},a=n.reduce((e,t)=>{const[n,r]=t;return e[n]=r,e},{});return o.forEach(n=>{const[r,o,s,l,c=e=>e]=n,d=function({theme:e,base:t,path:n,attribute:r,defaultValue:o}){if(!e||!1===t)return o;const i=e.getStyle(t,n,r);return void 0===i?o:i}({theme:e,base:r===uh&&t?`${uh}.${t}`:r,path:o,attribute:s,defaultValue:l}),u=(a[`${o}.${s}`]||ph)(c(d));Kp(i,[o,s].filter(Boolean).join("."),u)}),r.forEach(e=>{const[t,n]=e;Kp(i,t,n)}),i}const fh={qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",containerChildId:"/containerChildId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}};function mh(e){if(!e.objects)return{};const t=Iu(e);return{container_id:e.qInfo.qId,objects:e.qChildList.qItems.map(n=>({chart_type:n.qData.visualization,chart_id:n.qInfo.qId,chart_isMaster:!!n.qData.qExtendsId,tab_isVisible:0!==t[n.qData.childRefId]?.condition,tab_isActive:n.qData.childRefId===e.cachedTabId}))}}const bh=({ref:e,theme:t,change:n})=>({component:"inline-wrapper",items:{bgColorDropdown:{ref:`${e}.useColorExpression`,width:9,component:"dropdown",change(t){(Vp(t,`${e}.color`)||Vp(t,`${e}.colorExpression`))&&(Kp(t,`${e}.color`,void 0),Kp(t,`${e}.colorExpression`,void 0)),n?.(t)},options:[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],defaultValue:!1,placeholder:"properties.colorMode.primary"},bgColorPicker:{component:"color-picker",ref:`${e}.color`,width:3,show:t=>!Vp(t,`${e}.useColorExpression`),disableNone:!1,defaultValue:()=>({color:t?.getStyle("object.tabbedContainer",e,"color")??"none"}),showAlpha:!0,change:e=>{n?.(e)}},bgColorExpression:{component:"input-field-expression",ref:`${e}.colorExpression`,show:t=>Vp(t,`${e}.useColorExpression`)}}}),gh=({theme:e})=>({bgColorAllWrapper:bh({ref:"background.unselected"}),selectedTab:{translation:"properties.chartType.selected",component:"text"},bgColorSelectedWrapper:bh({ref:"background.selected"}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:bh({ref:"background.hover",theme:e,change:e=>{Kp(e,"indicator.hover.color",Vp(e,"background.hover.color")),Kp(e,"indicator.hover.useColorExpression",Vp(e,"background.hover.useColorExpression"))}})},show:(e,t)=>"left"===t.layout.orientation}}),vh=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontSize`;return{fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.size`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),show:e=>!1!==e.icon?.show},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")}),show:e=>!1!==e.icon?.show}}},position:{type:"string",ref:"icon.position",component:"dropdown",options:[{value:"start",translation:"properties.dock.start"},{value:"top",translation:"properties.dock.top"},{value:"end",translation:"properties.dock.end"},{value:"bottom",translation:"properties.dock.bottom"}],defaultValue:(e,{layout:t})=>"left"===t.orientation?"top":"start",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"icon.show",component:"switch",defaultValue:!0,show:e=>"tab"===e.key}}},yh=({theme:e})=>({colorWrapper:bh({ref:"indicator.selected",theme:e}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:bh({ref:"indicator.hover",theme:e,change:e=>{Kp(e,"background.hover.color",Vp(e,"indicator.hover.color")),Kp(e,"background.hover.useColorExpression",Vp(e,"indicator.hover.useColorExpression"))}})},show:(e,t)=>"left"!==t.layout.orientation}}),xh=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontFamily`,o=`${e.theme}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e.ref}.fontFamily`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),change:(e,t,n)=>{const r=e.label?.fontFamily,o=(e=>{const t=[];return e.objects.forEach(e=>{const n=e.components?.find(e=>"tab"===e.key),r=n?.label?.fontFamily;r&&-1===t.indexOf(r)&&t.push(r)}),t})(n);r&&-1===o.indexOf(r)&&o.push(r),n.fontsUsed=o}},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.fontSize`,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")})}}},alignment:{component:"text-align-buttons",ref:"label.alignment",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"label.show",component:"switch",defaultValue:!0}}},Eh=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"Object.Container.Props.Label",component:"panel-section",items:{label:{component:"items",ref:e,key:t,items:xh({paths:{ref:"label",theme:"label.value"},fontResolver:n,theme:r})}}}),Ch=({ref:e,key:t})=>({translation:"Visualizations.Descriptions.Width",component:"panel-section",items:{width:{component:"items",ref:e,key:t,items:{unit:{type:"string",ref:"width.unit",component:"dropdown",options:[{value:"%",translation:"Object.Table.Column.Percentage"},{value:"px",translation:"Object.Table.Column.Pixels"}],defaultValue:"%",change:e=>{if(void 0!==e.width?.value&&"%"===e.width?.unit)for(let t=0;t<e.width.value.length;t++)e.width.value[t]>100?e.width.value[t]=100:e.width.value[t]<5&&(e.width.value[t]=5)}},valuePixel:{translation:"properties.axis.minMax",component:"slider",ref:"width.value",range:!0,step:1,min:0,max:800,show:e=>"px"===e.width?.unit,defaultValue:[0,360]},valuePercentage:{translation:"properties.axis.minMax",component:"slider",type:"array",ref:"width.value",range:!0,step:1,min:5,max:100,show:e=>!e.width?.unit||"px"!==e.width?.unit,defaultValue:[5,20]}}}}}),Sh=({theme:e,ref:t,key:n})=>({translation:"Object.TabbedContainer.Indicator",component:"panel-section",items:{indicator:{component:"items",ref:t,key:n,items:yh({theme:e})}}}),wh=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"properties.icon",component:"panel-section",items:{icon:{component:"items",ref:e,key:t,items:vh({paths:{ref:"icon",theme:"icon.value"},fontResolver:n,theme:r})}},show:(e,{layout:t})=>t.showIcons}),Rh=({theme:e,ref:t,key:n})=>({translation:"Object.OrgChart.BackgroundColor",component:"panel-section",items:{background:{component:"items",ref:t,key:n,items:"tab"===n?{bgColorWrapper:bh({ref:"background"})}:gh({theme:e})}}}),_h=({fontResolver:e,theme:t})=>{const n="components",r="tab";return{component:"styling-panel",chartTitle:"Object.Container",tabTitle:"scripteditor.dataconnectors.delimiter.tab",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:n,items:{label:Eh({ref:n,key:r,fontResolver:e,theme:t}),width:{...Ch({ref:n,key:r}),show:(e,{layout:t})=>"left"!==t.orientation},icon:wh({ref:n,key:r,fontResolver:e,theme:t}),background:Rh({ref:n,key:r,theme:t})}}},kh={ref:"label",type:"string",translation:"Object.Container.Props.Label",defaultValue:"",expression:"optional"},Ah={ref:"condition",translation:"Object.Container.Props.ShowCondition",component:"expression",defaultValue:{qValueExpression:{qExpr:""}},expressionType:"ValueExpression",expression:"always"},Ih=(e,t)=>"object"==typeof e.label?t.objects.find(t=>t.childRefId===e.childRefId)?.label||e.label.qValueExpression.qExpr:e.label,Lh=e=>({component:"button",translation:"Object.Container.Props.EditProperties",disabled:(e,t)=>{const n=t.getLayout(),r=_u(n,e.childRefId)?.qMeta;return!r?.privileges?.includes("update")||!n.permissions?.update},action(t,n,{app:r}){const{sense:o}=e.env.anything,i=n.getEngineId(t.childRefId);i&&(o.propertyPanel.show({id:i,app:r,parent:"current",headerLabel:Ih(t,n.getLayout())}),n.setSelectedChild([i]))}}),Th=e=>{const{sense:t}=e.env.anything;return{label:kh,condition:Ah,styling:_h({fontResolver:e.fontResolver,theme:t?.theme}),editProperties:Lh(e)}},Oh={translation:"Object.Container.Props.Chart",component:"text",show:e=>e.objects?e.objects.length<=1:e.children.length<=1},Ph={translation:"Common.Charts",component:"text",show:e=>e.objects?e.objects.length>1:e.children.length>1},Mh=e=>({type:"array",ref:"objects",itemTitleRef:e=>e.label,allowAdd:!0,customAdd:!0,allowMove:!0,allowRemove:!0,customRemove:!0,addTranslation:"Object.Container.Props.Add",cId:"childRefId",grouped:!0,add(e,t,n){const r=document.querySelector(".pp-toplist-add-button");null!==r&&n.openAddChildPopover(r)},remove(e,t,n){n.deleteChild(e.childRefId).catch(()=>{})},items:Th(e)}),jh=e=>({type:"items",translation:"Object.Container.Props.Content",items:{chartLabel:Oh,chartsLabel:Ph,chartList:Mh(e)}}),Nh={type:"boolean",translation:"Object.Container.Props.ShowTabs",ref:"showTabs",defaultValue:!0,component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},$h={type:"boolean",translation:"Object.Container.Props.UseDropdown",label:"Menu",ref:"useDropdown",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},zh={type:"boolean",translation:"Object.Container.Props.UseScrollButtons",ref:"useScrollButton",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!0,show:e=>e.showTabs},Dh={type:"boolean",translation:"Object.Container.Props.ShowIcons",ref:"showIcons",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},Bh={type:"string",translation:"Object.Container.Props.DefaultTab",ref:"defaultTabId",component:"dropdown",defaultValue:void 0,options(e,t){const n=t.getLayout();return n?n.objects.map(e=>({translation:e.label,value:e.childRefId})):[]},change(e,t){const n=Lu(t.getLayout(),e.defaultTabId);n&&t.setSelectedChild([n])},show:e=>e.objects.length>0},Fh={type:"string",translation:"properties.orientation",ref:"orientation",component:"dropdown",options:[{value:"top",translation:"properties.orientation.horizontal"},{value:"left",translation:"properties.orientation.vertical"}],defaultValue:"top",show:e=>e.showTabs},Gh=({fontResolver:e,theme:t})=>{const n="components",r="tabs";return{component:"styling-panel",chartTitle:"Object.TabContainer",tabTitle:"Object.Container.Props.ShowTabs",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{label:Eh({ref:n,key:r,fontResolver:e,theme:t}),width:Ch({ref:n,key:r}),indicator:Sh({ref:n,key:r,theme:t}),icon:wh({ref:n,key:r,fontResolver:e,theme:t}),background:Rh({ref:n,key:r,theme:t})}}},Hh={items:{details:{show:e=>!0===e.showDetails}}},Uh=e=>{const{sense:t}=e.env.anything;return{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:Gh({fontResolver:e.fontResolver,theme:t?.theme}),container:{type:"items",items:{showTabs:Nh,useDropdown:$h,useScrollButton:zh,showIcons:Dh,orientation:Fh,defaultTabId:Bh}}}}},Wh=e=>({uses:"settings",items:{general:Hh,presentation:Uh(e)}}),Yh=e=>({type:"items",component:"accordion",items:{content:jh(e),settings:Wh(e)}}),Vh=e=>{const{sense:t}=e.env.anything,n=function({theme:e,translator:t,config:n={}}){const{id:r,paths:o}=function({config:e={}}){const{id:t,paths:n}=e;return{id:void 0===t?Ou:`${Ou}.${t}`,paths:Array.isArray(n)?n:[]}}({config:n}),i={};o.forEach(n=>{const o=n.split(".");Fu(o);let a=i;for(let i=0;i<o.length;i++){const s=o[i];i===o.length-1?a[s]=Du({theme:e,translator:t,id:r,path:n}):void 0===a[s]&&(a[s]={}),a=a[s]}});const a=e=>{const t=e.split(".");Fu(t);let n=i;for(let r=0;r<t.length;r++){const o=t[r];if(void 0===n[o])throw new Error(`font-resolver: Path '${e}' could not be resolved.`);n=n[o]}return n};return i.getDefaultValue=e=>a(e).getDefaultValue(),i.getOptions=e=>a(e).getOptions(),i}({theme:t?.theme,translator:e.env.translator,flags:e.env.flags,config:{id:"tabbedContainer",paths:["label.value","icon.value"]}}),r=function(e){return{async getDropOptions(e,t,n){const{item:r}=t,o=e.getCreatePropertyHandler();if(o.setModel(e.model),"state"===t.item.type){const r=await e.model.getProperties();return o.setProperties(r),o.setLayout(e.model?.layout),this.getDropStateOptions(t,o,e.model,n)}if("visualization"===r.type)return t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"addvisualization",select(){o.addChild({initProps:{qExtendsId:r.id,qInfo:{qType:"undefined"}}})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),void n();const i=await t.item.getDropOption(t.item);"newObject"===i?.id&&t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"createvisualization",select(){o.addChild({initProps:{...i.args.init,visualization:i.args.template},children:i.args.children?.map(e=>({qProperty:e}))})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),n()},async addChild(t,n){const{model:r}=this,o=new Tu({app:r.app,data:e.propertyHandlerData});return o.setModel(r),{childModel:await o.addChild({initProps:t,children:n}),handler:o}},canReceive(e){if(this.model.layout.qExtendsId)return!1;if("libraryitem"===e.type){const{item:t}=e;if("template"===t.type&&ou.includes(t.template))return!1;if("visualization"===t.type&&ou.includes(t.visualization))return!1}return"gridcell"!==e.type||!ou.includes(e.cell.model.layout.visualization)}}}(e);return{definition:Yh({...e,fontResolver:n}),support:{snapshot:!1,export:!0,sharing:!1,exportData:!1,viewData:!1},hidePatchPanel:()=>!0,getCreatePropertyHandler:t=>new Tu({app:t,data:e.propertyHandlerData}),...r,addChild:async function(e,t){const{childModel:n,handler:o}=await r.addChild.apply(this,[e,t]);n&&o.setSelectedChild([n.id])},migrate:{properties:(e,t)=>((async(e,t)=>{if(!e.objects){const{objects:n,defaultTabId:r,components:o,orientation:i,showDetails:a}=await t.getEffectiveProperties(),s=await t.getFullPropertyTree();if(!s.qProperty.objects&&n){const l=[];s.qChildren.forEach(e=>{const n=e.qProperty;if(n.qInfo.qId){const r=async r=>{const o=await t.getChild(r),i=await o.getEffectiveProperties();return{...e,qProperty:{...n,childRefId:i.childRefId}}};l.push(r(n.qInfo.qId))}});const c=await Promise.all(l),d={...e,objects:n,defaultTabId:r??"",components:o,qChildListDef:fh,orientation:i,showDetails:a};t.clearSoftPatches(),await t.setFullPropertyTree({...s,qProperty:d,qChildren:c})}}})(e,t),e)},exportProperties:null,importProperties:(e,t)=>{const n={...e.properties};return"masterobject"!==e.properties.qInfo.qType&&(n.qInfo.qType=t.qInfo.qType),n.visualization=t.visualization,{qProperty:n,qChildren:e.qChildren}},extendMetrics:mh}},qh=({propertyHandlerData:e,element:r,sharedContainerUtilities:o,translator:i,containerId:a,dataHandler:s,renderHelper:l,chartList:c})=>{const d=t();a&&e.sync({containerId:a,element:r,sharedContainerUtilities:o,translator:i,dataHandler:s,renderHelper:l,chartList:c}),n(()=>{e.setMuiTheme(d.direction)},[d.direction,e]),n(()=>()=>{a&&e.destroy(a)},[a,e,d.direction])},Kh=e=>e.reduce((e,{id:t,data:n})=>(n&&(e[t]=n),e),{}),Xh=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;t.push(o.getViewState().then(e=>({id:n,data:e})).catch(()=>e))}const n=await Promise.all(t);return{viewStates:Kh(n)}},Zh=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;t.push(o.getSnapshotLayout().then(e=>({id:n,data:e})).catch(()=>e))}const n=await Promise.all(t);return Kh(n)},Jh=(e,t)=>(r(async n=>{const r=n,{snapshotData:o}=r;if(o){const n=ku(r),i=t(e.objectMap,n),[a,s]=await Promise.all([Zh(i.objectMap),Xh(i.objectMap)]);o.objectsData={layouts:a},r.objects=i.objects,o.viewState=s}return n}),{getViewState:()=>Xh(e.objectMap)});let Qh=function(e){return e.COPY="ctrl+c",e.CUT="ctrl+x",e.OPEN_CONTEXT_MENU="shift+F10",e.ESCAPE="Escape",e.SPACE=" ",e.ENTER="Enter",e.BACKSPACE="Backspace",e.DELETE="Delete",e}({}),ef=function(e){return e.KEY_DOWN="keydown",e.FOCUS_OUT="focusout",e}({}),tf=function(e){return e.TAB_MENU="tab-menu",e.TAB_MENU_ITEM="tab-menu-item",e.ACTIVE_TAB="active-tab-button",e.TAB_WRAPPER="tab-wrapper",e.TAB="tab-button",e.TAB_EXTRA_PRIO="MuiTab-root",e.TAB_LABEL="tab-label",e.TABS_ICON="tab-icon",e.ACTIVE_TAB_PANEL="active-tab-panel",e.TAB_INDICATOR="MuiTabs-indicator",e}({});const nf=`& .${tf.TAB}.${tf.TAB_EXTRA_PRIO}, .${tf.TAB}.${tf.ACTIVE_TAB}`,rf=`& .${tf.TAB}.${tf.TAB_EXTRA_PRIO}:hover`,of=`& .${tf.TAB_LABEL}`,af=`& .${tf.TABS_ICON} svg`,sf=`& .${tf.TAB_WRAPPER}`,lf=`& .${tf.TAB_INDICATOR}`,cf=e=>e.getElementsByClassName(tf.ACTIVE_TAB)?.[0],df=e=>e.getElementsByClassName(tf.ACTIVE_TAB_PANEL)?.[0],uf=({element:e,setAccessibility:t,accessibility:r,renderHelper:s,interactions:l,env:c,models:d})=>{const{modifiedLayout:{showTabs:u,objects:p,orientation:h},translator:f}=d;n(()=>{(()=>{const t="top"===h?f.get("TabContainer.Navigation.Horizontal"):f.get("TabContainer.Navigation.Vertical"),n=((e,t)=>e.map(e=>e.label||t.get("TabContainer.Object.Untitled")).join(", "))(p,f);e.setAttribute("aria-label",f.get("TabContainer.Object.Description",[n,u?t:""]))})()},[e,u,p,f,h]);const m=c.flags.isEnabled("VIZ-7_NEW_SHEET"),b=o(),g=i(()=>()=>{t(!1),b.enabled&&b.blur?.(!0)},[b,t]),v=i(()=>t=>{switch(t.shiftKey?`shift+${t.key}`:t.key){case Qh.ESCAPE:t.stopPropagation(),b.blur?.(!0);break;case Qh.ENTER:case Qh.SPACE:{t.stopPropagation();const n=t.target;n?.classList.contains(tf.ACTIVE_TAB)&&df(e)?.focus();break}}},[e,b]),y=i(()=>t=>{const n=t.shiftKey?`shift+${t.key}`:t.key,r=s.objectMap.values().next().value,o=s.objectApis.values().next().value;switch(n){case Qh.ESCAPE:{const n=cf(e);m?(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():n?.focus()})({event:t,objectApi:o,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():n?.focus()})({event:t,objectApi:r,activeTab:n});break}case Qh.ENTER:case Qh.SPACE:{const n=df(e);m?(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():t.toggleFocus?.(!0)})({event:t,objectApi:o,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():t.viewDataToggled&&"function"==typeof t.dataViewObject?.focus?t.dataViewObject.focus():"function"==typeof t.focus&&t.focus()})({event:t,objectApi:r,activeTab:n});break}case Qh.OPEN_CONTEXT_MENU:t.stopPropagation(),r?.viewDataToggled||e!==document.activeElement&&(g(),e.focus())}},[e,g,m,s]),x=i(()=>e=>{const t=e.target;t?.classList.contains(tf.ACTIVE_TAB_PANEL)?y(e):v(e)},[v,y]);n(()=>(r&&e.addEventListener(ef.KEY_DOWN,x),()=>{e.removeEventListener(ef.KEY_DOWN,x)}),[e,r,x]);const[E,C]=a(!1);n(()=>{E&&(C(!1),window.setTimeout(()=>((e=>e.getElementsByClassName(tf.TAB_MENU)?.[0])(e)??cf(e))?.focus(),0))},[e,E]),n(()=>{t(!1)},[l.edit,t]),n(()=>{const n=t=>{const n=t.relatedTarget;e?.contains(n)||n?.classList.contains(tf.TAB_MENU_ITEM)||g?.()};return b.enabled&&b.active&&!l.edit&&(t(!0),C(!0),e.addEventListener(ef.FOCUS_OUT,n)),()=>{e.removeEventListener(ef.FOCUS_OUT,n)}},[b])},pf=e=>{const[t]=a(e);return[t,function(e){Object.assign(t,e)}]},hf=({isContainerActive:e,activeTabId:t,modifiedLayout:r,renderHelper:o,activeCharts:a,sharedContainerUtilities:s})=>{const l={modifiedLayout:r,activeTabId:t,renderHelper:o,isContainerActive:e},[c,d]=pf(l);d(l);const u=i(()=>()=>{const e=Au(c.modifiedLayout);for(const[t,n]of c.renderHelper.objectMap.entries()){const r=c.isContainerActive&&c.activeTabId===e[t];"setIsActive"in n&&n.setIsActive(r)}},[c]);n(()=>{c.isContainerActive&&u()},[o.objectMap,u,c]),n(()=>{u()},[e,u]),(({activeCharts:e,onSetActiveCharts:t,canSetActiveChart:r=!0})=>{const[o,i]=pf({onSetActiveCharts:t});i({onSetActiveCharts:t}),n(()=>{if(!r)return;const t=e=>{o.onSetActiveCharts(e)};e.on("setActiveCharts",t);const n=e.getActiveCharts();return n.length>0&&t(n),()=>e.removeListener("setActiveCharts",t)},[e,o,r])})({activeCharts:a,onSetActiveCharts:e=>{if(0===e.length)return;const t=c.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t&&t!==c.activeTabId&&s.setSelected(e)}})},ff={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};const mf={qInfo:{qId:"MasterObjectList",qType:"MasterObjectList"},qAppObjectListDef:{qType:"masterobject",qData:{name:"/qMetaDef/title",labelExpression:"/labelExpression",visualization:"/visualization",tags:"/qMetaDef/tags"}}};class bf{sessionObject;constructor(e){this.getOrCreateSessionObject(e).catch(()=>{})}getOrCreateSessionObject=async e=>{const t=mf.qInfo.qId;this.sessionObject=await e.getObject(t).catch(()=>e.createSessionObject(mf))};getMasterVisualizations=async()=>{try{if(!this.sessionObject)return[];const e=await this.sessionObject.getLayout();return("qAppObjectList"in e?e.qAppObjectList.qItems:e).map(e=>({...e.qData,qExtendsId:e.qInfo.qId})).filter(e=>!ou.includes(e.visualization))}catch{return[]}}}let gf=function(e){return e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN",e}({});class vf{model;embed;app;undoRedoModel;chartList;masterVizList;mutex;constructor({embed:e,model:t,app:n,translator:r,mutex:o}){this.model=t,this.embed=e,this.app=n;const i=n;i&&i.getUndoInfoObject&&i.getUndoInfoObject().then(e=>{this.undoRedoModel=e}).catch(()=>{}),n&&(this.masterVizList=new bf(n)),e&&r&&(this.chartList=new iu(e,r)),this.mutex=o}rememberAsGroup=async e=>{let t;this.undoRedoModel&&(t=await this.undoRedoModel.startGroup());const n=await e();return t&&this.undoRedoModel&&await this.undoRedoModel.endGroup(t),n};generateProperties=async(e,t)=>await this.embed.generateProperties({type:e,properties:t});async addChild(e,t,n){if(this.model&&!ou.includes(e.visualization))try{await this.mutex.lock();const{model:r}=this,o=async()=>{e.childRefId=ff.id();const o=await r.createChild(e);if(o){const t=await r.getProperties();t.objects.unshift({childRefId:e.childRefId,...n,condition:{qValueExpression:{qExpr:""}}}),await r.setProperties(t)}return t&&o&&await Promise.all(t.map(({qProperty:e})=>o.createChild(e))),o};return await this.rememberAsGroup(o)}catch{return}finally{this.mutex.unlock()}}addVizAsChild=async({type:e,initProps:t,objectInitProps:n,children:r})=>{try{const o=await this.generateProperties(e,t);let i=n?.label||t?.title;if(!i){const n=this.getChart(t?.visualization),r=n?.libraryInfo;i=r?.translation||r?.name||e}const a={...n,label:i};return await this.addChild(o,r,a)}catch{return}};addMasterObjectAsChild=async({initProps:e,objectInitProps:t,children:n})=>{try{if(!e||!e.qExtendsId||!this.app)return;const r=await this.app.getObject(e.qExtendsId),o=await r.getProperties(),i=t?.label||o.title||o.qMetaDef.title,a={...e,qInfo:{qType:"childObject"}},s={...t,label:i};return await this.addChild(a,n,s)}catch{return}};deleteChildren=async e=>{const{model:t}=this;if(0===e.length||!t)return!1;try{await this.mutex.lock();const n=await t.getFullPropertyTree(),{qChildren:r,qProperty:o}=n,i=new Set(e);return n.qChildren=r.filter(({qProperty:e})=>{const t=e.childRefId;return!t||!i.has(t)}),n.qProperty.objects=o.objects.filter(e=>!i.has(e.childRefId)),await t.setFullPropertyTree(n),!0}catch{return!1}finally{this.mutex.unlock()}};moveChild=async(e,t)=>{if(this.model)try{await this.mutex.lock();const n=await this.model.getProperties(),{objects:r}=n,o=r.findIndex(e=>e.childRefId===t);let i=!1;switch(e){case gf.TOP:{if(0===o)break;const e=r.splice(o,1)[0];r.unshift(e),i=!0;break}case gf.BOTTOM:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.push(e),i=!0;break}case gf.UP:{if(0===o)break;const e=r.splice(o,1)[0];r.splice(o-1,0,e),i=!0;break}case gf.DOWN:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.splice(o+1,0,e),i=!0;break}}i&&await this.model.setProperties(n)}finally{this.mutex.unlock()}};getCharts=()=>this.chartList?.getCharts()||{};getMasterVizList=()=>this.masterVizList?.getMasterVisualizations()||Promise.resolve([]);getChart=e=>this.chartList?.getChart(e);getChartLabelById=(e,t)=>{const n=e?.qChildList?.qItems.find(e=>e.qInfo.qId===t);if(!n)return"";const{visualization:r,title:o}=n.qData;if(o)return o;const i=this.getChart(r);return i?.libraryInfo?.translation||r}}class yf{locked=!1;tasks=[];id;constructor(e){this.id=e}lock=async()=>this.locked?new Promise(e=>{this.tasks.push(e)}):(this.locked=!0,!0);unlock=()=>{if(this.tasks.length>0){const e=this.tasks.shift();e?.(!0)}else this.locked=!1}}const xf={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},rebeccapurple:{r:102,g:51,b:153},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:255,g:255,b:255,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}},Ef={index:-1,color:"none",alpha:1},Cf=e=>{let t=parseFloat(e[1]),n=parseFloat(e[3]),r=parseFloat(e[5]);return t%=360,n/=100,r/=100,t=Math.max(0,Math.min(t,360)),n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1)),{h:t,s:n,l:r,v:r}},Sf=(e,t,n,r,o=1)=>{let i,a,s,l;switch(n=Math.floor(n)){case 0:l=[e,t,0];break;case 1:l=[t,e,0];break;case 2:l=[0,e,t];break;case 3:l=[0,t,e];break;case 4:l=[t,0,e];break;case 5:l=[e,0,t];break;default:l=[0,0,0]}return i=l[0]+r,a=l[1]+r,s=l[2]+r,i=Math.round(255*i),a=Math.round(255*a),s=Math.round(255*s),`rgba(${i},${a},${s},${o})`},wf=e=>{const{h:t,s:n,l:r}=Cf(e),o=e.length>7?parseFloat(e[7]):1,i=r<=.5?2*r*n:(2-2*r)*n,a=t/60,s=i*(1-Math.abs(a%2-1));return Sf(i,s,a,r-.5*i,o)},Rf={resolveExpression:({colorExpression:e=""})=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(Number(t[1])/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return wf(t);if(t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return wf(t);if(t=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return(e=>{const{h:t,s:n,v:r}=Cf(e),o=r*n,i=t/60,a=o*(1-Math.abs(i%2-1));return Sf(o,a,i,r-o)})(t);if(t=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e),t)return e;if(t=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e),t)return e;const n=e&&xf[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getColor({style:e,defaultColor:t,theme:n}){const r=e?.color||Ef;let o;return o=e?.useColorExpression?Rf.resolveExpression(e):"string"==typeof r?r:n?.getColorPickerColor(r)||"",o&&"none"!==o?o:t}},_f=()=>xn.jsx(vu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:"M15 6V5H5V2H1.5a.5.5 0 0 0-.5.5V6H0V2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4h-1Zm-5-4H6v2h4V2Zm4.5 0H11v2h4V2.5a.5.5 0 0 0-.5-.5Zm1.5 9h-1V8h1v3Zm0 3a1 1 0 0 1-1 1h-1v-1h.6a.4.4 0 0 0 .4-.4V13h1v1Zm-7 1v-1h3v1H9Zm-5 0v-1h3v1H4Zm-3 0a1 1 0 0 1-1-1v-1h1v.6c0 .22.18.4.4.4H2v1H1ZM0 8h1v3H0V8Zm4-.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4ZM5 11h6V8H5v3Z"})}),kf=({libraryInfo:e,style:t,id:n})=>xn.jsx("div",{style:t,"data-testid":"tab-chart-icon",id:n,className:tf.TABS_ICON,children:xn.jsx(e.IconDefinition,{})}),Af=({style:e,id:t})=>xn.jsx("div",{style:e,"data-testid":"tab-hidden-icon",id:t,children:xn.jsx(yu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:"m13.441.795.764.646-1.839 2.174c.568.434 1.076.914 1.522 1.385a13.79 13.79 0 0 1 2.109 3 13.798 13.798 0 0 1-2.108 3c-1.382 1.457-3.345 3-5.89 3-1.34 0-2.52-.428-3.536-1.045l-1.904 2.25-.764-.646L13.441.795ZM11.72 4.379l-1.427 1.686a3 3 0 0 1-3.82 4.516l-1.354 1.6c.86.497 1.819.819 2.88.819 2.121 0 3.834-1.287 5.161-2.685A12.666 12.666 0 0 0 14.857 8a12.691 12.691 0 0 0-1.697-2.315c-.35-.37-.727-.73-1.132-1.063l-.308-.243ZM8 2a6.428 6.428 0 0 1 2.242.412l.305.123-.681.805A5.359 5.359 0 0 0 8 3C5.877 3 4.164 4.287 2.837 5.685A12.664 12.664 0 0 0 1.14 8a12.66 12.66 0 0 0 1.697 2.315l.301.308.311.299-.646.765A14.567 14.567 0 0 1 2.109 11 13.791 13.791 0 0 1 0 8a13.801 13.801 0 0 1 2.109-3C3.49 3.543 5.454 2 8 2Zm1.633 4.845-2.5 2.956a1.999 1.999 0 0 0 2.5-2.956Zm-3.917-.793a3 3 0 0 1 2.692-1.025l.202.035-.809.948A2 2 0 0 0 6 7.967l.003.152-.808.947a3 3 0 0 1 .521-3.014Z"})})}),If=()=>xn.jsx(yu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:"M12 4H6V3h6v1ZM6 8.5h4v-1H6v1Zm9 4.5H6v-1h9v1ZM3 11a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1Zm0-5.5a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1ZM3 2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1Zm0 1H2v1h1V3Z"})}),Lf=za(Td)({width:28,overflow:"hidden"}),Tf=za(Td)({height:28,width:"100%",overflow:"hidden",alignItems:"center","&::before":{visibility:"hidden"}}),Of=(e,t)=>e.find(e=>e.childRefId===t),Pf=(e,t)=>!t.edit&&0===e.condition,Mf=e=>{const{objects:t,defaultTabId:n,cachedTabId:r}=e;return r||(n&&t.some(e=>e.childRefId===n)?n:t[0]?.childRefId||"")};class jf{modifiedLayout;themeStyle;style;objectMap;activeTabId;theme;constructor({modifiedLayout:e,themeService:t}){this.modifiedLayout=e,this.activeTabId=Mf(this.modifiedLayout),this.themeStyle=t.getStyles(),this.theme=t.getTheme(),this.objectMap=Iu(this.modifiedLayout),this.style=this.createStyleClasses()}getTabsWidth=e=>{const t=this.resolveComponentStyle({compPath:"width.value",themePath:"tabWidth.value"});if(void 0===t||2!==t.length||e!==this.modifiedLayout.orientation)return{};const n=this.resolveComponentStyle({compPath:"width.unit",themePath:"tabWidth.unit",defaultValue:"%"});return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getTabWidth=e=>{const t=e?.value,n=e?.unit??"%";if(void 0===t||2!==t.length||"left"===this.modifiedLayout.orientation)return{};return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getColorStyle=(e,t=e)=>{const n=this.resolveComponentStyle({compPath:e,themePath:t});return Rf.getColor({style:n,theme:this.theme})??n};getTabBackgroundStyle=(e,t)=>{let n;if(this.activeTabId===e){const e=this.resolveComponentStyle({compPath:"background.selected",themePath:""});n=Rf.getColor({style:e,theme:this.theme})}return n??Rf.getColor({style:t,theme:this.theme})};createTabClasses=()=>this.modifiedLayout.objects?.reduce((e,t)=>{const n=t?.childRefId,r=t?.components?.find(e=>"tab"===e.key);return e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}`]={textAlign:Vp(r,"label.alignment"),backgroundColor:this.getTabBackgroundStyle(n,r?.background),...this.getTabWidth(r?.width)},e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}:hover`]={..."left"===this.modifiedLayout.orientation&&{backgroundColor:this.getColorStyle("background.hover","background.hover.color")}},e[`#tab-label-${this.modifiedLayout.qInfo.qId}-${n}`]={fontSize:Vp(r,"label.fontSize"),fontFamily:Vp(r,"label.fontFamily"),color:Rf.getColor({style:Vp(r,"label.color"),theme:this.theme})},e[`#tab-icon-${this.modifiedLayout.qInfo.qId}-${n} svg`]={height:Vp(r,"icon.size"),color:Rf.getColor({style:Vp(r,"icon.color"),theme:this.theme})},e},{});createTabsClasses=()=>({[of]:{fontSize:this.resolveComponentStyle({compPath:"label.fontSize",themePath:"label.value.fontSize"}),fontFamily:this.resolveComponentStyle({compPath:"label.fontFamily",themePath:"label.value.fontFamily"}),color:this.resolveComponentStyle({compPath:"label.color.color",themePath:"label.value.color"})},[af]:{height:this.resolveComponentStyle({compPath:"icon.size",themePath:"icon.value.fontSize"}),color:this.getColorStyle("icon.color","icon.value.color")},[nf]:{textAlign:this.resolveComponentStyle({compPath:"label.alignment",themePath:"label.textAlignment"}),...this.getTabsWidth("top")},[rf]:{..."top"===this.modifiedLayout.orientation&&{borderBottomColor:this.getColorStyle("indicator.hover","indicator.hover.color")}},[sf]:{...this.getTabsWidth("left"),backgroundColor:this.getColorStyle("background.unselected","")},[lf]:{backgroundColor:this.getColorStyle("indicator.selected","indicator.selected.color")}});createStyleClasses=()=>({...this.createTabsClasses(),...this.createTabClasses()});getStyleClasses(){return this.style}resolveComponentStyle=({key:e="tabs",compPath:t,themePath:n=t,defaultValue:r})=>{const o=this.modifiedLayout.components?.find(t=>t.key===e);return Vp(o,t)??Vp(this.themeStyle,n)??r};getTabStyle(e){return this.objectMap[e].components?.find(e=>"tab"===e.key)}}const Nf=()=>{const e=s(),n=l(),r=c(),o=d(),b=u(),g=p(),v=t(),y=h(),x=f(),E=function({theme:e,config:t={}}){const{id:n,resolve:r=[],transform:o=[],extend:i=[]}=t,a={theme:e,matrix:dh(r),styles:void 0};return a.styles=hh({theme:e,id:n,transform:o,extend:i,matrix:a.matrix}),{getStyles:()=>a.styles,getTheme:()=>a.theme,setTheme:e=>{a.theme=e,a.styles=hh({theme:e,id:n,transform:o,extend:i,matrix:a.matrix})}}}({theme:m(),config:{id:"tabbedContainer",resolve:[["object.tabbedContainer","indicator.selected","color"],["object.tabbedContainer","indicator.hover","color"],["object.tabbedContainer","background.hover","color"],["object.tabbedContainer","icon.value","color"],["object.tabbedContainer","icon.value","fontSize"]]}}),C=i(()=>new iu(o,g),[o,g]),[S]=a(()=>new yf(b.id)),[w,R]=a(!1),_=i(()=>o&&b&&n?new vf({embed:o,model:b,app:n,translator:g,mutex:S}):void 0,[o,b,n,g,S]),k=i(()=>ku(r),[r]),A=i(()=>new jf({modifiedLayout:k,themeService:E}),[k,E]);return i(()=>({app:n,modifiedLayout:k,embed:o,model:b,emitter:y,interactions:x,dataHandler:_,chartList:C,styleModel:A,mutex:S,options:v,accessibility:w,setAccessibility:R,translator:g,element:e}),[k,o,b,n,y,x,_,C,A,S,v,w,g,e])},$f=({dataHandler:e,modifiedLayout:t,translator:n,sharedContainerUtilities:r,Icon:o})=>{const[i,a]=_(void 0);if(!e||!t)return null;const s=!t.qExtendsId;return xn.jsx(pu,{children:xn.jsxs(uu,{children:[xn.jsx(o,{}),s?xn.jsxs(xn.Fragment,{children:[xn.jsx(gu,{sx:{width:250,height:32,fontFamily:"inherit"},className:"init-button",variant:i?"contained":"outlined",onClick:e=>{a(e.currentTarget)},"aria-label":n.get("LayoutContainer.EmptyList.AddContent"),disableRipple:!0,children:n.get("LayoutContainer.EmptyList.AddContent")}),xn.jsx(Cu,{translator:n,anchorEl:i,dataHandler:e,onClose:()=>{a(void 0)},sharedContainerUtilities:r})]}):xn.jsx(Xs,{variant:"inherit",children:n.get("LayoutContainer.EmptyList.EmptyHint")})]})})};class zf{_rendered=new Set;_objectMap=new Map;_objectApis=new Map;_resolver;_dependencyData;_recreateMap=new Map;constructor(e){this._dependencyData=e}set dependencyData(e){this._dependencyData=e}get rendered(){return this._rendered}get objectMap(){return this._objectMap}get objectApis(){return this._objectApis}get resolver(){return this._resolver}get recreateMap(){return this._recreateMap}createTimerForRendering=()=>{if(!this.resolver){let e;const t=setTimeout(()=>{this._dependencyData.options.onRenderStatusUpdate?.("Layout container rendering timeout reached after 90 seconds. Resolving anyway."),this.doResolve()},9e4),n=new Promise(t=>{e=t});this._resolver={promise:n,resolve:e,timer:t}}return this._resolver};doResolve=()=>{this.resolver&&(clearTimeout(this.resolver?.timer),this.resolver.resolve?.(!0),this._resolver=void 0)};tryToResolve=()=>{const{visibleLayoutObjects:e}=this._dependencyData;if(this.resolver){e.every(e=>this.rendered.has(e.id))&&(this._dependencyData.options.onRenderStatusUpdate?.("All layout container children rendered"),this.doResolve())}};syncObjects(e){const t=new Set,n=new Set([...Array.from(this.objectMap.keys()),...Array.from(this.objectApis.keys()),...this.rendered]),r=new Set(n);let o=!1;return e.forEach(e=>{n.has(e.id)?(this.rendered.has(e.id)&&t.add(e.id),r.delete(e.id)):o=!0}),r.forEach(e=>{const t=this.objectMap.get(e);t&&(this.confirmPotentialSelections(t),t.destroy?.(),this.objectMap.delete(e)),this.objectApis.get(e)?.destroy(),this.objectApis.delete(e)}),this._rendered=t,this.tryToResolve(),o}destroy(){for(const e of this.objectApis.values())e.destroy();this._objectMap=new Map,this._objectApis=new Map}saveObject(e,t){this.objectMap.set(e,t)}saveObjectApi(e,t){this._objectApis.set(e,t)}onRendered(e){this._dependencyData.options.onRenderStatusUpdate?.(`Layout container child rendered: ${this.rendered.size+1}/${this._dependencyData.visibleLayoutObjects.length} ${e}`),this.rendered.add(e),this.tryToResolve()}getChildrenObjects(){const{visibleLayoutObjects:e}=this._dependencyData,t=[];return e.forEach(e=>{const n=this.objectMap.get(e.id);n&&t.push(n)}),t}getChildLayout(e){const{modifiedLayout:t}=this._dependencyData;return t.qChildList.qItems.find(t=>t.qInfo.qId===e)}getObjectOptions(e){const{viewState:t,modifiedLayout:n,options:r}=this._dependencyData,{chartAnimations:o,direction:i,progressiveRendering:a,freeResize:s,navigation:l,useQlikEmbedChildRendering:c,getContextMenuParent:d,onContextMenu:u}=r;return{isReadonly:!1,setController:t=>{this.saveObject(e,t)},onRendered:()=>{this.onRendered(e)},onInitialRender:()=>{this.onRendered(e)},isParentMaster:!!n?.qExtendsId,isSnapshot:!!n.snapshotData,...!!t?.viewStates?.[e]&&{viewState:t?.viewStates[e]},...!!t?.layouts?.[e]&&{layout:t.layouts[e]},direction:i,chartAnimations:o,progressiveRendering:a,freeResize:s,navigation:l,disableThemeBorder:!1,fallbackToClient:r.fallbackToClient,useQlikEmbedChildRendering:c,getContextMenuParent:d,onContextMenu:u}}confirmPotentialSelections(e){e&&"selectionsApi"in e&&e.selectionsApi.active&&e.selectionsApi.confirm()}}const Df=({chartObject:e,embed:t,renderHelper:n,direction:r,interactions:o,env:i})=>{const a=A(null),{id:s}=e;k(()=>{if(s&&a.current){const e=n.getObjectOptions(s)||{};e.disableThemeBorder=!0,t.render({id:s,element:a.current,options:e}).then(e=>{n.saveObjectApi(s,e)}).catch(e=>{const t=n.getChildLayout(s)?.qInfo?.qType;console.error("Could not render chart with id",s,t,e)})}},[s,t,n,r]);const l=I(()=>()=>{if(e?.id&&i.anything){const t=e?.label,{sense:r}=i.anything,o="current",a=n.objectMap.get(e.id);a&&r.propertyPanel.show({model:a.model,parent:o,headerLabel:t,keepCurrentActiveCell:!0})}},[i,e,n]);return k(()=>{const e=a?.current;return e&&o?.edit&&e.addEventListener("dblclick",l),()=>{e?.removeEventListener("dblclick",l)}},[a,l,o]),xn.jsx("div",{ref:a,style:{position:"relative",height:"100%",width:"100%"},"data-testid":`tab-panel-${e.childRefId}`})};let Bf=function(e){return e.TABS_HEIGHT="36px",e}({});const Ff=({charts:e,handleChangeTab:t,activeTabId:n,element:r,translator:o,accessibility:i,disabled:a})=>{const[s,l]=C.useState(null),c=Boolean(s),d=()=>{l(null)},u=L(e=>{e?.focus()},[]);return xn.jsxs(xn.Fragment,{children:[xn.jsx(Pl,{onClick:e=>{l(e.currentTarget)},disabled:a,"aria-haspopup":"menu","data-testid":"chartTabMenuDropdownButton",tabIndex:i?0:-1,"aria-label":o.get("Container.Label.Visualizations"),className:tf.TAB_MENU,sx:{m:"2px"},children:xn.jsx(If,{})}),xn.jsx(ud,{anchorEl:s,open:c,onClose:d,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},MenuListProps:{sx:{py:0}},slotProps:{paper:{sx:{maxHeight:"500px",maxWidth:"500px"}}},children:e.map(e=>xn.jsx(bd,{className:tf.TAB_MENU_ITEM,ref:n===e.childRefId&&c?u:null,onClick:()=>{(e=>{t(e.childRefId),d(),window.setTimeout(()=>{r.getElementsByClassName(tf.ACTIVE_TAB_PANEL)?.[0]?.focus()},0)})(e)},sx:n===e.childRefId?{backgroundColor:"rgba(0, 0, 0, 0.1)"}:{},"aria-label":e.label,title:e.label,children:xn.jsx(Xs,{variant:"inherit",noWrap:!0,children:e.label})},`chartTabMenu-${e.childRefId}`))})]})},Gf=({label:e,id:t})=>xn.jsx(Sl,{className:tf.TAB_LABEL,id:`tab-label-${t}`,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",overflow:"hidden",flexWrap:"wrap"},children:xn.jsx("span",{style:{width:"100%",overflowWrap:"break-word",hyphens:"auto",fontWeight:"bold",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",lineHeight:"normal",overflow:"hidden"},children:e})}),Hf=({libraryInfo:e,chart:t,iconPosition:n,id:r})=>{let o;switch(n){case"bottom":o={marginTop:"6px"};break;case"top":o={marginBottom:"6px"};break;case"end":o={marginInlineStart:"8px"};break;default:o={marginInlineEnd:"8px"}}o.display="flex",o.alignItems="center",o.height="100%",o.flex="1 0 0";return 0===t.condition?xn.jsx(Af,{id:`${tf.TABS_ICON}-${r}`,style:o}):e?xn.jsx(kf,{id:`${tf.TABS_ICON}-${r}`,libraryInfo:e,style:o}):null},Uf=({models:e,activeTabId:t,handleChangeTab:n})=>{const{modifiedLayout:r,chartList:o,interactions:i,accessibility:a}=e,s=o?.getCharts(),l=r.objects.filter(e=>!Pf(e,i)),{orientation:c,tabContainerStyle:d,ScrollButtonComponent:u}=(({orientation:e})=>"left"===e?{orientation:"vertical",tabContainerStyle:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"25%",flexShrink:0},ScrollButtonComponent:Tf}:{orientation:"horizontal",tabContainerStyle:{display:"flex",flexDirection:"row",alignItems:"center"},ScrollButtonComponent:Lf})(r),p=!1===i.active&&!i.edit,[h,f]=_(!1),m=L(e=>{if(e){const t=e.getElementsByClassName("MuiTabs-flexContainer")[0];if(t)return void f("vertical"===c?t.scrollHeight>t.offsetHeight:t.scrollWidth>t.offsetWidth)}f(!1)},[c]);return xn.jsxs(Sl,{className:tf.TAB_WRAPPER,sx:d,ref:e=>{m(e)},children:[r.useDropdown&&h?xn.jsx(Ff,{charts:l,handleChangeTab:n,activeTabId:t,accessibility:a,translator:e.translator,element:e.element,disabled:p}):null,xn.jsx(Ud,{value:t,onChange:(e,t)=>{n(t)},ScrollButtonComponent:u,variant:"scrollable",orientation:c,scrollButtons:!!r.useScrollButton&&"auto",TabScrollButtonProps:{...p&&{disabled:!0}},sx:{height:"100%",width:"100%",minHeight:Bf.TABS_HEIGHT},children:l.map(n=>{const o=_u(r,n.childRefId)?.qData?.visualization,i=o&&s?.[o]?.libraryInfo,l=e.styleModel.getTabStyle(n.childRefId),d=0===n.condition||r.showIcons&&i&&!1!==l?.icon?.show,u="vertical"===c?"top":"start",h=e.styleModel.resolveComponentStyle({compPath:"icon.position",defaultValue:u}),f=e.styleModel.resolveComponentStyle({compPath:"label.show"}),m=n.label&&(l?.label?.show??!1!==f),b=`${r.qInfo.qId}-${n.childRefId}`;return xn.jsx(Ed,{className:`${tf.TAB} ${t===n.childRefId?tf.ACTIVE_TAB:""}`,disabled:p,id:`tab-${b}`,value:n.childRefId,title:n.label,label:m?xn.jsx(Gf,{label:n.label,id:b}):void 0,icon:d?xn.jsx(Hf,{libraryInfo:i,chart:n,iconPosition:h,id:b}):"",iconPosition:h,"data-testid":`container-tab-${n.childRefId}`,sx:{textAlign:"vertical"!==c||r.showIcons?"center":"start",minWidth:"vertical"===c?"100%":void 0,minHeight:Bf.TABS_HEIGHT,padding:"6px 16px","&:hover":{paddingBottom:"4px"},"&.Mui-disabled":{opacity:"inherit"}},"aria-label":n.label,"aria-controls":`tab-panel-${b}`,tabIndex:a&&t===n.childRefId?0:-1},n.childRefId)})})]})},Wf=({models:e,renderHelper:t,activeTabId:n,handleChangeTab:r,env:o})=>{const{modifiedLayout:i,embed:a,interactions:s,options:l,styleModel:c,accessibility:d}=e,u=i.objects,p=s.edit||!!u.find(e=>0!==e.condition),h=i.showTabs&&p,f="left"===i.orientation?"row":"column",m=c.getStyleClasses();return xn.jsxs(Sl,{sx:{display:"flex",flexDirection:f,height:"100%",width:"100%",direction:l.direction,...m},children:[h?xn.jsx(Uf,{models:e,activeTabId:n,handleChangeTab:r}):null,u.map(e=>{const r=`tab-panel-${i.qInfo.qId}-${e.childRefId}`,c=n===e.childRefId&&!Pf(e,s);return xn.jsx(Sl,{role:"tabpanel",id:r,"aria-label":e.label,sx:{flex:"1 1 auto",minHeight:0,width:"100%",padding:"2px",boxSizing:"border-box",direction:"ltr","&:focus-visible":{boxShadow:"inset 0 0 0 2px #0275D9",borderRadius:"3px",zIndex:1200}},...c?{className:tf.ACTIVE_TAB_PANEL,tabIndex:d?0:-1}:{hidden:!0},children:c?xn.jsx(Df,{chartObject:e,renderHelper:t,direction:l.direction,embed:a,interactions:s,env:o}):null},r)})]})};let Yf=function(e){return e.COPY="copy",e.PASTE="paste",e.RESET_COPY_BUFFER="resetCopyBuffer",e}({}),Vf=function(e){return e.COPY="copy",e.PASTE_AND_REPLACE="paste-and-replace",e.PASTE="paste",e.DUPLICATE="duplicate",e.DELETE="delete",e.CUT="cut",e.EDIT_PROPERTIES="edit",e.ZOOM_IN="zoom-in",e.VISUAL_EXPLORATION="visual-exploration",e.MONITOR_IN_HUB="addto",e.REORDER_LAYERS_GROUP="reorder-layers-group",e.BRING_TO_FRONT="bring-to-front",e.BRING_FORWARD="bring-forward",e.SEND_TO_BACK="send-to-back",e.SEND_BACKWARDS="send-backwards",e.CONTAINER_HEADER="container-header",e.CHART_HEADER="chart-header",e.ALERT_GROUP="alertGroup",e.ADD_TO_MASTER_ITEMS="add-to-master-items",e.UNLINK_VISUALIZATION="unlink",e.DEVELOPER="object-developer",e.SHOW_DETAILS="object-info",e.EXPLAIN_KEY_DRIVERS_OLD_ID="explainKeyDrivers",e.EXPLAIN_KEY_DRIVERS="key-driver",e.SUBSCRIBE="subscribe",e.NOTES_GROUP="notesGroup",e.DOWNLOAD="download",e.SHARE_IMAGE="share",e}({});const qf=[Vf.PASTE_AND_REPLACE,Vf.ZOOM_IN,Vf.VISUAL_EXPLORATION],Kf=[Vf.VISUAL_EXPLORATION,Vf.ALERT_GROUP,Vf.SHOW_DETAILS,Vf.EXPLAIN_KEY_DRIVERS,Vf.EXPLAIN_KEY_DRIVERS_OLD_ID],Xf=[Vf.DELETE,Vf.CUT,Vf.ADD_TO_MASTER_ITEMS,Vf.UNLINK_VISUALIZATION],Zf=[Vf.PASTE_AND_REPLACE],Jf=(e,t)=>{const{childRefId:n}=e.model.layout,r=t.objects.find(e=>e.childRefId===n);return{...e,additionalData:{label:r?.label}}},Qf=(e,t,n,r,o)=>{const i=t.getSupportFunction(Vf.COPY);if(!i)return void e.deleteItem(Vf.COPY);const a=()=>{i(Jf(n,r)).catch(()=>{})},s=e.items.find(e=>e.id===Vf.COPY);if(s)s.updateItem({select:a});else if(o){const t=e.items.findIndex(e=>e.id===Vf.CUT),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.copy",tid:Vf.COPY,id:Vf.COPY,icon:"copy",select:a,items:[]},n)}},em=e=>e.interactions.edit&&!e.modifiedLayout.qExtendsId,tm=async(e,t,n,r,o)=>{if(o.flags.isEnabled("GVC_48_CHART_CONTEXT_MENU_ITEM_GENERATION"))return;const i=t.getBuilder("default");if(!i)return;const a=await i();a.addItem({translation:"contextMenu.containerOptionsHeader",tid:Vf.CONTAINER_HEADER,id:Vf.CONTAINER_HEADER,bold:!0,items:[]},0);const s=em(n);a.items.forEach(e=>{(Kf.includes(e.id)||!s&&Zf.includes(e.id))&&a.deleteItem(e.id)}),s&&await(async(e,t,n)=>{const r=t.getSupportFunction(Yf.PASTE),o=await(r?.()?.catch(()=>{}));if(!o||ou.includes(o.template))return void e.deleteItem(Vf.PASTE_AND_REPLACE);const i=()=>{n()},a=e.items.find(e=>e.id===Vf.PASTE_AND_REPLACE||e.id===Vf.PASTE);if(a)a.updateItem({translation:"contextMenu.paste",select:i});else{const t=e.items.findLastIndex(e=>e.id===Vf.COPY||e.id===Vf.DEVELOPER||e.id===Vf.CONTAINER_HEADER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.paste",tid:Vf.PASTE_AND_REPLACE,id:Vf.PASTE_AND_REPLACE,icon:"paste",select:i,items:[]},n)}})(a,t,r),e.updateItem({items:a.items}),1===e.items.length&&e.deleteItem(Vf.CONTAINER_HEADER)},nm=e=>{const t={[Vf.MONITOR_IN_HUB]:!0,[Vf.SUBSCRIBE]:!0,[Vf.NOTES_GROUP]:!0,[Vf.DOWNLOAD]:!0,[Vf.SHARE_IMAGE]:!0};e.items.forEach(n=>{t[n.id]?e.deleteItem(n.id):n.items&&nm(n)})},rm=(e,t,n,r,o,i)=>a=>{const{dataHandler:s,modifiedLayout:l}=r;if(em(r)){n.isInvalid||(((e,t,n,r)=>{const{model:o,modifiedLayout:i}=n,a=e.items.findLastIndex(e=>e.id===Vf.CHART_HEADER||e.id===Vf.REORDER_LAYERS_GROUP),s=a>=0?1+a:void 0;e.addItem({translation:"Object.Container.Props.EditProperties",tid:Vf.EDIT_PROPERTIES,id:Vf.EDIT_PROPERTIES,icon:Vf.EDIT_PROPERTIES,items:[],select:()=>{const{childRefId:e}=t.model.layout,n=i.objects.find(t=>t.childRefId===e),a=n?.label,{sense:s}=r.anything,l=o;s.propertyPanel.show({model:t.model,parent:l,headerLabel:a})}},s)})(a,n,r,o),((e,t,n,r,o,i)=>{const a=r.getSupportFunction(Vf.COPY);if(!a)return void e.deleteItem(Vf.CUT);const s=()=>{o&&a(Jf(n,i)).then(async()=>{await(o?.deleteChildren([t]))}).catch(()=>{})},l=e.items.find(e=>e.id===Vf.CUT);if(l)l.updateItem({select:s});else{const t=e.items.findLastIndex(e=>e.id===Vf.ADD_TO_MASTER_ITEMS||e.id===Vf.UNLINK_VISUALIZATION||e.id===Vf.EDIT_PROPERTIES||e.id===Vf.REORDER_LAYERS_GROUP||e.id===Vf.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.cut",tid:Vf.CUT,id:Vf.CUT,icon:"cut",select:s,items:[]},n)}})(a,t,n,e,s,l),Qf(a,e,n,l,!0),((e,t,n,r,o)=>{const i=t.getSupportFunction(Yf.COPY),a=t.getSupportFunction(Yf.PASTE);if(!i||!a)return void e.deleteItem(Vf.DUPLICATE);const s=()=>{i(Jf(n,r)).then(()=>{o()}).catch(()=>{})},l=e.items.find(e=>e.id===Vf.DUPLICATE);if(l)l.updateItem({select:s});else{const t=e.items.findIndex(e=>e.id===Vf.COPY),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Duplicate",tid:Vf.DUPLICATE,id:Vf.DUPLICATE,icon:Vf.DUPLICATE,items:[],select:s},n)}})(a,e,n,l,i)),((e,t,n)=>{const r=()=>{n&&n.deleteChildren([t]).catch(()=>{})},o=e.items.find(e=>e.id===Vf.DELETE);if(o)o.updateItem({select:r});else{const t=e.items.findLastIndex(e=>e.id===Vf.DUPLICATE||e.id===Vf.ADD_TO_MASTER_ITEMS||e.id===Vf.UNLINK_VISUALIZATION||e.id===Vf.REORDER_LAYERS_GROUP||e.id===Vf.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Delete",tid:Vf.DELETE,id:Vf.DELETE,icon:"bin",items:[],select:r},n)}})(a,t,s)}else Qf(a,e,n,l,!1)},om=(e,t,n,r)=>{g(async(o,i,a)=>{if(!a)return!1;const s=((e,t)=>()=>{if(!e)return;const n=t.getSupportFunction(Yf.PASTE);n&&n().then(async({template:t,init:n,children:r,additionalData:o})=>{const{label:i}=o,a={label:i};n.qExtendsId?await e.addMasterObjectAsChild({initProps:n,children:r,objectInitProps:a}):await e.addVizAsChild({type:t,initProps:n,children:r,objectInitProps:a})}).catch(e=>{e&&t.getSupportFunction(Yf.RESET_COPY_BUFFER)})})(n.dataHandler,a);if(await tm(o,a,n,s,r),nm(o),!(e=>{let t;t="qv-radial-contextmenu"===e.type?e.touches[0]?.target:e.target;return t&&((e,t)=>{let n=e;for(;n;){if(n.classList?.contains(t))return n;n=n.parentNode}return null})(t,tf.ACTIVE_TAB_PANEL)})(i))return!0;const l=n.modifiedLayout.objects.find(t=>t.childRefId===e)?.id;if(!l)return!0;const c=t.objectMap.get(l);if(!c)return!0;const d=rm(a,e,c,n,r,s),u=await(async(e,t,n,r)=>{const o=em(n),i=e.getBuilder("object");if(!i)return;const a=await i(t);return a.addItem({translation:"contextMenu.chartOptionsHeader",tid:Vf.CHART_HEADER,id:Vf.CHART_HEADER,bold:!0,items:[]},0),r(a),a.items.forEach(e=>{(qf.includes(e.id)||!o&&Xf.includes(e.id))&&a.deleteItem(e.id)}),1===a.items.length&&a.deleteItem(Vf.CHART_HEADER),a})(a,c,n,d);return!u||(o.items.length>0&&u.addItem({translation:"contextMenu.subMenuContainerOptions",tid:"tabbed-container-menu",id:"tabbed-container-menu",icon:"tabbed-container",items:[...o.items]},u.items.length),o.updateItem({items:u.items}),!0)})},im=({element:e,models:r,env:o,activeCharts:s})=>{const l=((e,t)=>{const[r,o]=a(void 0);return n(()=>{if(0===e.getElementsByClassName(t).length){const n=document.createElement("div");n.className=t,e.appendChild(n);const r=lu.createRoot(n);o(r)}return()=>{r?.unmount()}},[e,t,r]),r})(e,"init-component"),{options:c,modifiedLayout:d,interactions:u,model:p}=r,{qChildList:h}=d,f=nu(c.direction),m=(e=>{const{viewState:n}=t(),{snapshotData:r}=e;if(r){const{layouts:e}=r.objectsData,t=r.viewState?.viewStates;return{layouts:e,viewStates:t}}if(n){const{viewStates:e}=n;return{viewStates:e}}})(d),g=i(()=>Mf(d),[d]),v={modifiedLayout:d,activeTabId:g,env:o},[y,x]=pf(v);x(v);const E=i(()=>d.objects.filter(e=>g===e.childRefId),[g,d.objects]),{renderHelper:C}=(e=>{const{visibleLayoutObjects:t,options:r}=e,[o]=a(()=>new zf(e)),[,i]=a(r);return o.dependencyData=e,b(async()=>(i(e=>(e!==r&&t.forEach(e=>o.recreateMap.set(e.id,!0)),r)),o.syncObjects(t)?o.createTimerForRendering()?.promise:o.resolver?.promise),[t,r]),n(()=>()=>{o.destroy()},[o]),{renderHelper:o}})({modifiedLayout:d,visibleLayoutObjects:E,viewState:m,options:c});om(g,C,r,o);const[S]=a({current:void 0}),w=i(()=>e=>{(async({model:e,patchList:t})=>{if(e?.applyPatches){const n=await e.getEffectiveProperties(),r=[];t.forEach(e=>{const{newValue:t,propertyName:o}=e,i=void 0!==n[o]?"Replace":"Add";t?r.push({qPath:`/${o}`,qOp:i,qValue:JSON.stringify(t)}):"Replace"===i&&r.push({qPath:`/${o}`,qOp:"Remove"})}),r.length>0&&await e.applyPatches(r,!0)}})({model:p,patchList:[{newValue:e,propertyName:"cachedTabId"}]}).then(()=>{const t=y.modifiedLayout.objects.find(t=>t.childRefId===e)?.id;s.updateActiveCharts(t?[t]:[])})},[s,p,y.modifiedLayout.objects]),R=i(()=>({setSelected:e=>{const t=y.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t?w(t):S.current=e[0]}}),[w,y,S]);n(()=>{const e=(({chartObjects:e,activeTabId:t})=>!Of(e,t)&&e.length>0?e[0]?.childRefId:t)({chartObjects:y.modifiedLayout.objects,activeTabId:y.activeTabId});if(e!==y.activeTabId)w(e);else if(S.current){const e=y.modifiedLayout.objects.find(e=>e.id===S.current)?.childRefId;e&&w(e)}S.current=void 0},[d?.objects.length,y,S,w]),n(()=>{const e=(({chartObjects:e,activeTabId:t,interactions:n})=>{const r=Of(e,t);if(!r||Pf(r,n)){const n=e.find(e=>0!==e.condition);return n?.childRefId||t}return t})({chartObjects:y.modifiedLayout.objects,activeTabId:y.activeTabId,interactions:u});e!==y.activeTabId&&w(e)},[u,d?.objects,y,w]);const _=0===h.qItems.length&&u.edit;return n(()=>{l?.render(xn.jsxs(Ba,{theme:f,children:[_?xn.jsx($f,{Icon:_f,dataHandler:r.dataHandler,modifiedLayout:r.modifiedLayout,translator:r.translator,sharedContainerUtilities:R}):null,!_&&xn.jsx(Wf,{models:r,renderHelper:C,activeTabId:g,handleChangeTab:w,env:o})]}))},[l,r,f,_,C,g,R,w,o]),{renderHelper:C,sharedContainerUtilities:R,activeTabId:g}};var am={targets:[]};const sm={showTitles:!0,title:"",subtitle:"",footnote:"",disableNavMenu:!0,showDetails:!1,objects:[],qChildListDef:{qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}},showTabs:!0,useScrollButton:!0,useDropdown:!1,showIcons:!1,components:[],defaultTabId:"",orientation:"top",fontsUsed:[]};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".init-component {\n height: 100%;\n overflow: hidden;\n}\n");const lm=e=>e.map(e=>{if("canReceive"in e){const t=e=>"libraryitem"===e.type&&("field"===e.item.type||"measure"===e.item.type||"dimension"===e.item.type);return{...e,canReceive:n=>t(n)&&e.canReceive(n)}}return e}),cm=(e,t)=>{let n=!0;const r=t.objects.reduce((t,r)=>{const o=r.id;if(0!==r.condition){const i=e.get(o);return i&&(e=>e.supportExport())(i)&&(n=!1,t.objectMap.set(o,i)),t.objects.push(r),t}return t},{objects:[],objectMap:new Map});return n?{objects:[],objectMap:new Map}:r}}}});
|
|
89
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,d,u,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),b=m.search(/[0-9\-\+#]/),g=p-b,v=e.substring(g,g+1),y=g+("."===v||","===v?1:0),x=b>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(h,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)),d=e[0].split(i),e[0]=d.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=d[1]&&d[d.length-1].length){for(m="",g=(u=t[0]).length%l,p=u.length,y=0;y<p;y++)m+=u.charAt(y),!((y-g+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),f+(n?"-":"")+r+x}},rh({exports:{}});const oh="'Source Sans Pro', 'Arial', 'sans-serif'",ih="#333333",ah="#595959",sh="#737373",lh="#cccccc",ch="#e6e6e6";function dh(e){const t={};return[...e,["","","color"],["object","","fontFamily"],["object","axis.label.name","color",ah],["object","axis.label.name","fontFamily",oh],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",lh],["object","axis.line.minor","color",ch],["object","axis.title","color"],["object","axis.title","fontFamily",oh],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",ch],["object","grid.line.major","color",lh],["object","grid.line.minor","color",ch],["object","label.value","color",ah],["object","label.value","fontFamily",oh],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",ah],[!1,"label.value","lightColor",ch],["object","outOfRange","color","#999"],["object","legend.title","color",ih],["object","legend.title","fontFamily",oh],["object","legend.title","fontSize","15px"],["object","legend.label","color",ah],["object","legend.label","fontFamily",oh],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",ih],["object","referenceLine.label.name","fontFamily",oh],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",ch],["object","referenceLine.outOfBounds","fontFamily",oh],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",sh,e=>"transparent"===e?sh:e]].reduce((e,n)=>{const r=`${n[0]}-${n[1]}-${n[2]}}`;return t[r]||(t[r]=!0,e.push(n)),e},[]).sort((e,t)=>(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0))}const uh="object",ph=e=>e;function hh({theme:e,id:t,transform:n,extend:r,matrix:o}){const i={},a=n.reduce((e,t)=>{const[n,r]=t;return e[n]=r,e},{});return o.forEach(n=>{const[r,o,s,l,c=e=>e]=n,d=function({theme:e,base:t,path:n,attribute:r,defaultValue:o}){if(!e||!1===t)return o;const i=e.getStyle(t,n,r);return void 0===i?o:i}({theme:e,base:r===uh&&t?`${uh}.${t}`:r,path:o,attribute:s,defaultValue:l}),u=(a[`${o}.${s}`]||ph)(c(d));Kp(i,[o,s].filter(Boolean).join("."),u)}),r.forEach(e=>{const[t,n]=e;Kp(i,t,n)}),i}const fh={qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",containerChildId:"/containerChildId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}};function mh(e){if(!e.objects)return{};const t=Iu(e);return{container_id:e.qInfo.qId,objects:e.qChildList.qItems.map(n=>({chart_type:n.qData.visualization,chart_id:n.qInfo.qId,chart_isMaster:!!n.qData.qExtendsId,tab_isVisible:0!==t[n.qData.childRefId]?.condition,tab_isActive:n.qData.childRefId===e.cachedTabId}))}}const bh=({ref:e,theme:t,change:n})=>({component:"inline-wrapper",items:{bgColorDropdown:{ref:`${e}.useColorExpression`,width:9,component:"dropdown",change(t){(Vp(t,`${e}.color`)||Vp(t,`${e}.colorExpression`))&&(Kp(t,`${e}.color`,void 0),Kp(t,`${e}.colorExpression`,void 0)),n?.(t)},options:[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],defaultValue:!1,placeholder:"properties.colorMode.primary"},bgColorPicker:{component:"color-picker",ref:`${e}.color`,width:3,show:t=>!Vp(t,`${e}.useColorExpression`),disableNone:!1,defaultValue:()=>({color:t?.getStyle("object.tabbedContainer",e,"color")??"none"}),showAlpha:!0,change:e=>{n?.(e)}},bgColorExpression:{component:"input-field-expression",ref:`${e}.colorExpression`,show:t=>Vp(t,`${e}.useColorExpression`)}}}),gh=({theme:e})=>({bgColorAllWrapper:bh({ref:"background.unselected"}),selectedTab:{translation:"properties.chartType.selected",component:"text"},bgColorSelectedWrapper:bh({ref:"background.selected"}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:bh({ref:"background.hover",theme:e,change:e=>{Kp(e,"indicator.hover.color",Vp(e,"background.hover.color")),Kp(e,"indicator.hover.useColorExpression",Vp(e,"background.hover.useColorExpression"))}})},show:(e,t)=>"left"===t.layout.orientation}}),vh=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontSize`;return{fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.size`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),show:e=>!1!==e.icon?.show},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")}),show:e=>!1!==e.icon?.show}}},position:{type:"string",ref:"icon.position",component:"dropdown",options:[{value:"start",translation:"properties.dock.start"},{value:"top",translation:"properties.dock.top"},{value:"end",translation:"properties.dock.end"},{value:"bottom",translation:"properties.dock.bottom"}],defaultValue:(e,{layout:t})=>"left"===t.orientation?"top":"start",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"icon.show",component:"switch",defaultValue:!0,show:e=>"tab"===e.key}}},yh=({theme:e})=>({colorWrapper:bh({ref:"indicator.selected",theme:e}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:bh({ref:"indicator.hover",theme:e,change:e=>{Kp(e,"background.hover.color",Vp(e,"indicator.hover.color")),Kp(e,"background.hover.useColorExpression",Vp(e,"indicator.hover.useColorExpression"))}})},show:(e,t)=>"left"!==t.layout.orientation}}),xh=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontFamily`,o=`${e.theme}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e.ref}.fontFamily`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),change:(e,t,n)=>{const r=e.label?.fontFamily,o=(e=>{const t=[];return e.objects.forEach(e=>{const n=e.components?.find(e=>"tab"===e.key),r=n?.label?.fontFamily;r&&-1===t.indexOf(r)&&t.push(r)}),t})(n);r&&-1===o.indexOf(r)&&o.push(r),n.fontsUsed=o}},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.fontSize`,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")})}}},alignment:{component:"text-align-buttons",ref:"label.alignment",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"label.show",component:"switch",defaultValue:!0}}},Eh=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"Object.Container.Props.Label",component:"panel-section",items:{label:{component:"items",ref:e,key:t,items:xh({paths:{ref:"label",theme:"label.value"},fontResolver:n,theme:r})}}}),Ch=({ref:e,key:t})=>({translation:"Visualizations.Descriptions.Width",component:"panel-section",items:{width:{component:"items",ref:e,key:t,items:{unit:{type:"string",ref:"width.unit",component:"dropdown",options:[{value:"%",translation:"Object.Table.Column.Percentage"},{value:"px",translation:"Object.Table.Column.Pixels"}],defaultValue:"%",change:e=>{if(void 0!==e.width?.value&&"%"===e.width?.unit)for(let t=0;t<e.width.value.length;t++)e.width.value[t]>100?e.width.value[t]=100:e.width.value[t]<5&&(e.width.value[t]=5)}},valuePixel:{translation:"properties.axis.minMax",component:"slider",ref:"width.value",range:!0,step:1,min:0,max:800,show:e=>"px"===e.width?.unit,defaultValue:[0,360]},valuePercentage:{translation:"properties.axis.minMax",component:"slider",type:"array",ref:"width.value",range:!0,step:1,min:5,max:100,show:e=>!e.width?.unit||"px"!==e.width?.unit,defaultValue:[5,20]}}}}}),Sh=({theme:e,ref:t,key:n})=>({translation:"Object.TabbedContainer.Indicator",component:"panel-section",items:{indicator:{component:"items",ref:t,key:n,items:yh({theme:e})}}}),wh=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"properties.icon",component:"panel-section",items:{icon:{component:"items",ref:e,key:t,items:vh({paths:{ref:"icon",theme:"icon.value"},fontResolver:n,theme:r})}},show:(e,{layout:t})=>t.showIcons}),Rh=({theme:e,ref:t,key:n})=>({translation:"Object.OrgChart.BackgroundColor",component:"panel-section",items:{background:{component:"items",ref:t,key:n,items:"tab"===n?{bgColorWrapper:bh({ref:"background"})}:gh({theme:e})}}}),_h=({fontResolver:e,theme:t})=>{const n="components",r="tab";return{component:"styling-panel",chartTitle:"Object.Container",tabTitle:"scripteditor.dataconnectors.delimiter.tab",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:n,items:{label:Eh({ref:n,key:r,fontResolver:e,theme:t}),width:{...Ch({ref:n,key:r}),show:(e,{layout:t})=>"left"!==t.orientation},icon:wh({ref:n,key:r,fontResolver:e,theme:t}),background:Rh({ref:n,key:r,theme:t})}}},kh={ref:"label",type:"string",translation:"Object.Container.Props.Label",defaultValue:"",expression:"optional"},Ah={ref:"condition",translation:"Object.Container.Props.ShowCondition",component:"expression",defaultValue:{qValueExpression:{qExpr:""}},expressionType:"ValueExpression",expression:"always"},Ih=(e,t)=>"object"==typeof e.label?t.objects.find(t=>t.childRefId===e.childRefId)?.label||e.label.qValueExpression.qExpr:e.label,Lh=e=>({component:"button",translation:"Object.Container.Props.EditProperties",disabled:(e,t)=>{const n=t.getLayout(),r=_u(n,e.childRefId)?.qMeta;return!r?.privileges?.includes("update")||!n.permissions?.update},action(t,n,{app:r}){const{sense:o}=e.env.anything,i=n.getEngineId(t.childRefId);i&&(o.propertyPanel.show({id:i,app:r,parent:"current",headerLabel:Ih(t,n.getLayout())}),n.setSelectedChild([i]))}}),Th=e=>{const{sense:t}=e.env.anything;return{label:kh,condition:Ah,styling:_h({fontResolver:e.fontResolver,theme:t?.theme}),editProperties:Lh(e)}},Oh={translation:"Object.Container.Props.Chart",component:"text",show:e=>e.objects?e.objects.length<=1:e.children.length<=1},Ph={translation:"Common.Charts",component:"text",show:e=>e.objects?e.objects.length>1:e.children.length>1},Mh=e=>({type:"array",ref:"objects",itemTitleRef:e=>e.label,allowAdd:!0,customAdd:!0,allowMove:!0,allowRemove:!0,customRemove:!0,addTranslation:"Object.Container.Props.Add",cId:"childRefId",grouped:!0,add(e,t,n){const r=document.querySelector(".pp-toplist-add-button");null!==r&&n.openAddChildPopover(r)},remove(e,t,n){n.deleteChild(e.childRefId).catch(()=>{})},items:Th(e)}),jh=e=>({type:"items",translation:"Object.Container.Props.Content",items:{chartLabel:Oh,chartsLabel:Ph,chartList:Mh(e)}}),Nh={type:"boolean",translation:"Object.Container.Props.ShowTabs",ref:"showTabs",defaultValue:!0,component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},$h={type:"boolean",translation:"Object.Container.Props.UseDropdown",label:"Menu",ref:"useDropdown",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},zh={type:"boolean",translation:"Object.Container.Props.UseScrollButtons",ref:"useScrollButton",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!0,show:e=>e.showTabs},Dh={type:"boolean",translation:"Object.Container.Props.ShowIcons",ref:"showIcons",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},Bh={type:"string",translation:"Object.Container.Props.DefaultTab",ref:"defaultTabId",component:"dropdown",defaultValue:void 0,options(e,t){const n=t.getLayout();return n?n.objects.map(e=>({translation:e.label,value:e.childRefId})):[]},change(e,t){const n=Lu(t.getLayout(),e.defaultTabId);n&&t.setSelectedChild([n])},show:e=>e.objects.length>0},Fh={type:"string",translation:"properties.orientation",ref:"orientation",component:"dropdown",options:[{value:"top",translation:"properties.orientation.horizontal"},{value:"left",translation:"properties.orientation.vertical"}],defaultValue:"top",show:e=>e.showTabs},Gh=({fontResolver:e,theme:t})=>{const n="components",r="tabs";return{component:"styling-panel",chartTitle:"Object.TabContainer",tabTitle:"Object.Container.Props.ShowTabs",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{label:Eh({ref:n,key:r,fontResolver:e,theme:t}),width:Ch({ref:n,key:r}),indicator:Sh({ref:n,key:r,theme:t}),icon:wh({ref:n,key:r,fontResolver:e,theme:t}),background:Rh({ref:n,key:r,theme:t})}}},Hh={items:{details:{show:e=>!0===e.showDetails}}},Uh=e=>{const{sense:t}=e.env.anything;return{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:Gh({fontResolver:e.fontResolver,theme:t?.theme}),container:{type:"items",items:{showTabs:Nh,useDropdown:$h,useScrollButton:zh,showIcons:Dh,orientation:Fh,defaultTabId:Bh}}}}},Wh=e=>({uses:"settings",items:{general:Hh,presentation:Uh(e)}}),Yh=e=>({type:"items",component:"accordion",items:{content:jh(e),settings:Wh(e)}}),Vh=e=>{const{sense:t}=e.env.anything,n=function({theme:e,translator:t,config:n={}}){const{id:r,paths:o}=function({config:e={}}){const{id:t,paths:n}=e;return{id:void 0===t?Ou:`${Ou}.${t}`,paths:Array.isArray(n)?n:[]}}({config:n}),i={};o.forEach(n=>{const o=n.split(".");Fu(o);let a=i;for(let i=0;i<o.length;i++){const s=o[i];i===o.length-1?a[s]=Du({theme:e,translator:t,id:r,path:n}):void 0===a[s]&&(a[s]={}),a=a[s]}});const a=e=>{const t=e.split(".");Fu(t);let n=i;for(let r=0;r<t.length;r++){const o=t[r];if(void 0===n[o])throw new Error(`font-resolver: Path '${e}' could not be resolved.`);n=n[o]}return n};return i.getDefaultValue=e=>a(e).getDefaultValue(),i.getOptions=e=>a(e).getOptions(),i}({theme:t?.theme,translator:e.env.translator,flags:e.env.flags,config:{id:"tabbedContainer",paths:["label.value","icon.value"]}}),r=function(e){return{async getDropOptions(e,t,n){const{item:r}=t,o=e.getCreatePropertyHandler();if(o.setModel(e.model),"state"===t.item.type){const r=await e.model.getProperties();return o.setProperties(r),o.setLayout(e.model?.layout),this.getDropStateOptions(t,o,e.model,n)}if("visualization"===r.type)return t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"addvisualization",select(){o.addChild({initProps:{qExtendsId:r.id,qInfo:{qType:"undefined"}}})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),void n();const i=await t.item.getDropOption(t.item);"newObject"===i?.id&&t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"createvisualization",select(){o.addChild({initProps:{...i.args.init,visualization:i.args.template},children:i.args.children?.map(e=>({qProperty:e}))})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),n()},async addChild(t,n){const{model:r}=this,o=new Tu({app:r.app,data:e.propertyHandlerData});return o.setModel(r),{childModel:await o.addChild({initProps:t,children:n}),handler:o}},canReceive(e){if(this.model.layout.qExtendsId)return!1;if("libraryitem"===e.type){const{item:t}=e;if("template"===t.type&&ou.includes(t.template))return!1;if("visualization"===t.type&&ou.includes(t.visualization))return!1}return"gridcell"!==e.type||!ou.includes(e.cell.model.layout.visualization)}}}(e);return{definition:Yh({...e,fontResolver:n}),support:{snapshot:!1,export:!0,sharing:!1,exportData:!1,viewData:!1},hidePatchPanel:()=>!0,getCreatePropertyHandler:t=>new Tu({app:t,data:e.propertyHandlerData}),...r,addChild:async function(e,t){const{childModel:n,handler:o}=await r.addChild.apply(this,[e,t]);n&&o.setSelectedChild([n.id])},migrate:{properties:(e,t)=>((async(e,t)=>{if(!e.objects){const{objects:n,defaultTabId:r,components:o,orientation:i,showDetails:a}=await t.getEffectiveProperties(),s=await t.getFullPropertyTree();if(!s.qProperty.objects&&n){const l=[];s.qChildren.forEach(e=>{const n=e.qProperty;if(n.qInfo.qId){const r=async r=>{const o=await t.getChild(r),i=await o.getEffectiveProperties();return{...e,qProperty:{...n,childRefId:i.childRefId}}};l.push(r(n.qInfo.qId))}});const c=await Promise.all(l),d={...e,objects:n,defaultTabId:r??"",components:o,qChildListDef:fh,orientation:i,showDetails:a};t.clearSoftPatches(),await t.setFullPropertyTree({...s,qProperty:d,qChildren:c})}}})(e,t),e)},exportProperties:null,importProperties:(e,t)=>{const n={...e.properties};return"masterobject"!==e.properties.qInfo.qType&&(n.qInfo.qType=t.qInfo.qType),n.visualization=t.visualization,{qProperty:n,qChildren:e.qChildren}},extendMetrics:mh}},qh=({propertyHandlerData:e,element:r,sharedContainerUtilities:o,translator:i,containerId:a,dataHandler:s,renderHelper:l,chartList:c})=>{const d=t();a&&e.sync({containerId:a,element:r,sharedContainerUtilities:o,translator:i,dataHandler:s,renderHelper:l,chartList:c}),n(()=>{e.setMuiTheme(d.direction)},[d.direction,e]),n(()=>()=>{a&&e.destroy(a)},[a,e,d.direction])},Kh=e=>e.reduce((e,{id:t,data:n})=>(n&&(e[t]=n),e),{}),Xh=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;t.push(o.getViewState().then(e=>({id:n,data:e})).catch(()=>e))}const n=await Promise.all(t);return{viewStates:Kh(n)}},Zh=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;t.push(o.getSnapshotLayout().then(e=>({id:n,data:e})).catch(()=>e))}const n=await Promise.all(t);return Kh(n)},Jh=(e,t)=>(r(async n=>{const r=n,{snapshotData:o}=r;if(o){const n=ku(r),i=t(e.objectMap,n),[a,s]=await Promise.all([Zh(i.objectMap),Xh(i.objectMap)]);o.objectsData={layouts:a},r.objects=i.objects,o.viewState=s}return n}),{getViewState:()=>Xh(e.objectMap)});let Qh=function(e){return e.COPY="ctrl+c",e.CUT="ctrl+x",e.OPEN_CONTEXT_MENU="shift+F10",e.ESCAPE="Escape",e.SPACE=" ",e.ENTER="Enter",e.BACKSPACE="Backspace",e.DELETE="Delete",e}({}),ef=function(e){return e.KEY_DOWN="keydown",e.FOCUS_OUT="focusout",e}({}),tf=function(e){return e.TAB_MENU="tab-menu",e.TAB_MENU_ITEM="tab-menu-item",e.ACTIVE_TAB="active-tab-button",e.TAB_WRAPPER="tab-wrapper",e.TAB="tab-button",e.TAB_EXTRA_PRIO="MuiTab-root",e.TAB_LABEL="tab-label",e.TABS_ICON="tab-icon",e.ACTIVE_TAB_PANEL="active-tab-panel",e.TAB_INDICATOR="MuiTabs-indicator",e}({});const nf=`& .${tf.TAB}.${tf.TAB_EXTRA_PRIO}, .${tf.TAB}.${tf.ACTIVE_TAB}`,rf=`& .${tf.TAB}.${tf.TAB_EXTRA_PRIO}:hover`,of=`& .${tf.TAB_LABEL}`,af=`& .${tf.TABS_ICON} svg`,sf=`& .${tf.TAB_WRAPPER}`,lf=`& .${tf.TAB_INDICATOR}`,cf=e=>e.getElementsByClassName(tf.ACTIVE_TAB)?.[0],df=e=>e.getElementsByClassName(tf.ACTIVE_TAB_PANEL)?.[0],uf=({element:e,setAccessibility:t,accessibility:r,renderHelper:s,interactions:l,env:c,models:d})=>{const{modifiedLayout:{showTabs:u,objects:p,orientation:h},translator:f}=d;n(()=>{(()=>{const t="top"===h?f.get("TabContainer.Navigation.Horizontal"):f.get("TabContainer.Navigation.Vertical"),n=((e,t)=>e.map(e=>e.label||t.get("TabContainer.Object.Untitled")).join(", "))(p,f);e.setAttribute("aria-label",f.get("TabContainer.Object.Description",[n,u?t:""]))})()},[e,u,p,f,h]);const m=c.flags.isEnabled("VIZ-7_NEW_SHEET"),b=o(),g=i(()=>()=>{t(!1),b.enabled&&b.blur?.(!0)},[b,t]),v=i(()=>t=>{switch(t.shiftKey?`shift+${t.key}`:t.key){case Qh.ESCAPE:t.stopPropagation(),b.blur?.(!0);break;case Qh.ENTER:case Qh.SPACE:{t.stopPropagation();const n=t.target;n?.classList.contains(tf.ACTIVE_TAB)&&df(e)?.focus();break}}},[e,b]),y=i(()=>t=>{const n=t.shiftKey?`shift+${t.key}`:t.key,r=s.objectMap.values().next().value,o=s.objectApis.values().next().value;switch(n){case Qh.ESCAPE:{const n=cf(e);m?(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():n?.focus()})({event:t,objectApi:o,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():n?.focus()})({event:t,objectApi:r,activeTab:n});break}case Qh.ENTER:case Qh.SPACE:{const n=df(e);m?(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():t.toggleFocus?.(!0)})({event:t,objectApi:o,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():t.viewDataToggled&&"function"==typeof t.dataViewObject?.focus?t.dataViewObject.focus():"function"==typeof t.focus&&t.focus()})({event:t,objectApi:r,activeTab:n});break}case Qh.OPEN_CONTEXT_MENU:t.stopPropagation(),r?.viewDataToggled||e!==document.activeElement&&(g(),e.focus())}},[e,g,m,s]),x=i(()=>e=>{const t=e.target;t?.classList.contains(tf.ACTIVE_TAB_PANEL)?y(e):v(e)},[v,y]);n(()=>(r&&e.addEventListener(ef.KEY_DOWN,x),()=>{e.removeEventListener(ef.KEY_DOWN,x)}),[e,r,x]);const[E,C]=a(!1);n(()=>{E&&(C(!1),window.setTimeout(()=>((e=>e.getElementsByClassName(tf.TAB_MENU)?.[0])(e)??cf(e))?.focus(),0))},[e,E]),n(()=>{t(!1)},[l.edit,t]),n(()=>{const n=t=>{const n=t.relatedTarget;e?.contains(n)||n?.classList.contains(tf.TAB_MENU_ITEM)||g?.()};return b.enabled&&b.active&&!l.edit&&(t(!0),C(!0),e.addEventListener(ef.FOCUS_OUT,n)),()=>{e.removeEventListener(ef.FOCUS_OUT,n)}},[b])},pf=e=>{const[t]=a(e);return[t,function(e){Object.assign(t,e)}]},hf=({isContainerActive:e,activeTabId:t,modifiedLayout:r,renderHelper:o,activeCharts:a,sharedContainerUtilities:s})=>{const l={modifiedLayout:r,activeTabId:t,renderHelper:o,isContainerActive:e},[c,d]=pf(l);d(l);const u=i(()=>()=>{const e=Au(c.modifiedLayout);for(const[t,n]of c.renderHelper.objectMap.entries()){const r=c.isContainerActive&&c.activeTabId===e[t];"setIsActive"in n&&n.setIsActive(r)}},[c]);n(()=>{c.isContainerActive&&u()},[o.objectMap,u,c]),n(()=>{u()},[e,u]),(({activeCharts:e,onSetActiveCharts:t,canSetActiveChart:r=!0})=>{const[o,i]=pf({onSetActiveCharts:t});i({onSetActiveCharts:t}),n(()=>{if(!r)return;const t=e=>{o.onSetActiveCharts(e)};e.on("setActiveCharts",t);const n=e.getActiveCharts();return n.length>0&&t(n),()=>e.removeListener("setActiveCharts",t)},[e,o,r])})({activeCharts:a,onSetActiveCharts:e=>{if(0===e.length)return;const t=c.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t&&t!==c.activeTabId&&s.setSelected(e)}})},ff={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};const mf={qInfo:{qId:"MasterObjectList",qType:"MasterObjectList"},qAppObjectListDef:{qType:"masterobject",qData:{name:"/qMetaDef/title",labelExpression:"/labelExpression",visualization:"/visualization",tags:"/qMetaDef/tags"}}};class bf{sessionObject;constructor(e){this.getOrCreateSessionObject(e).catch(()=>{})}getOrCreateSessionObject=async e=>{const t=mf.qInfo.qId;this.sessionObject=await e.getObject(t).catch(()=>e.createSessionObject(mf))};getMasterVisualizations=async()=>{try{if(!this.sessionObject)return[];const e=await this.sessionObject.getLayout();return("qAppObjectList"in e?e.qAppObjectList.qItems:e).map(e=>({...e.qData,qExtendsId:e.qInfo.qId})).filter(e=>!ou.includes(e.visualization))}catch{return[]}}}let gf=function(e){return e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN",e}({});class vf{model;embed;app;undoRedoModel;chartList;masterVizList;mutex;constructor({embed:e,model:t,app:n,translator:r,mutex:o}){this.model=t,this.embed=e,this.app=n;const i=n;i&&i.getUndoInfoObject&&i.getUndoInfoObject().then(e=>{this.undoRedoModel=e}).catch(()=>{}),n&&(this.masterVizList=new bf(n)),e&&r&&(this.chartList=new iu(e,r)),this.mutex=o}rememberAsGroup=async e=>{let t;this.undoRedoModel&&(t=await this.undoRedoModel.startGroup());const n=await e();return t&&this.undoRedoModel&&await this.undoRedoModel.endGroup(t),n};generateProperties=async(e,t)=>await this.embed.generateProperties({type:e,properties:t});async addChild(e,t,n){if(this.model&&!ou.includes(e.visualization))try{await this.mutex.lock();const{model:r}=this,o=async()=>{e.childRefId=ff.id();const o=await r.createChild(e);if(o){const t=await r.getProperties();t.objects.unshift({childRefId:e.childRefId,...n,condition:{qValueExpression:{qExpr:""}}}),await r.setProperties(t)}return t&&o&&await Promise.all(t.map(({qProperty:e})=>o.createChild(e))),o};return await this.rememberAsGroup(o)}catch{return}finally{this.mutex.unlock()}}addVizAsChild=async({type:e,initProps:t,objectInitProps:n,children:r})=>{try{const o=await this.generateProperties(e,t);let i=n?.label||t?.title;if(!i){const n=this.getChart(t?.visualization),r=n?.libraryInfo;i=r?.translation||r?.name||e}const a={...n,label:i};return await this.addChild(o,r,a)}catch{return}};addMasterObjectAsChild=async({initProps:e,objectInitProps:t,children:n})=>{try{if(!e||!e.qExtendsId||!this.app)return;const r=await this.app.getObject(e.qExtendsId),o=await r.getProperties(),i=t?.label||o.title||o.qMetaDef.title,a={...e,qInfo:{qType:"childObject"}},s={...t,label:i};return await this.addChild(a,n,s)}catch{return}};deleteChildren=async e=>{const{model:t}=this;if(0===e.length||!t)return!1;try{await this.mutex.lock();const n=await t.getFullPropertyTree(),{qChildren:r,qProperty:o}=n,i=new Set(e);return n.qChildren=r.filter(({qProperty:e})=>{const t=e.childRefId;return!t||!i.has(t)}),n.qProperty.objects=o.objects.filter(e=>!i.has(e.childRefId)),await t.setFullPropertyTree(n),!0}catch{return!1}finally{this.mutex.unlock()}};moveChild=async(e,t)=>{if(this.model)try{await this.mutex.lock();const n=await this.model.getProperties(),{objects:r}=n,o=r.findIndex(e=>e.childRefId===t);let i=!1;switch(e){case gf.TOP:{if(0===o)break;const e=r.splice(o,1)[0];r.unshift(e),i=!0;break}case gf.BOTTOM:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.push(e),i=!0;break}case gf.UP:{if(0===o)break;const e=r.splice(o,1)[0];r.splice(o-1,0,e),i=!0;break}case gf.DOWN:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.splice(o+1,0,e),i=!0;break}}i&&await this.model.setProperties(n)}finally{this.mutex.unlock()}};getCharts=()=>this.chartList?.getCharts()||{};getMasterVizList=()=>this.masterVizList?.getMasterVisualizations()||Promise.resolve([]);getChart=e=>this.chartList?.getChart(e);getChartLabelById=(e,t)=>{const n=e?.qChildList?.qItems.find(e=>e.qInfo.qId===t);if(!n)return"";const{visualization:r,title:o}=n.qData;if(o)return o;const i=this.getChart(r);return i?.libraryInfo?.translation||r}}class yf{locked=!1;tasks=[];id;constructor(e){this.id=e}lock=async()=>this.locked?new Promise(e=>{this.tasks.push(e)}):(this.locked=!0,!0);unlock=()=>{if(this.tasks.length>0){const e=this.tasks.shift();e?.(!0)}else this.locked=!1}}const xf={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},rebeccapurple:{r:102,g:51,b:153},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:255,g:255,b:255,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}},Ef={index:-1,color:"none",alpha:1},Cf=e=>{let t=parseFloat(e[1]),n=parseFloat(e[3]),r=parseFloat(e[5]);return t%=360,n/=100,r/=100,t=Math.max(0,Math.min(t,360)),n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1)),{h:t,s:n,l:r,v:r}},Sf=(e,t,n,r,o=1)=>{let i,a,s,l;switch(n=Math.floor(n)){case 0:l=[e,t,0];break;case 1:l=[t,e,0];break;case 2:l=[0,e,t];break;case 3:l=[0,t,e];break;case 4:l=[t,0,e];break;case 5:l=[e,0,t];break;default:l=[0,0,0]}return i=l[0]+r,a=l[1]+r,s=l[2]+r,i=Math.round(255*i),a=Math.round(255*a),s=Math.round(255*s),`rgba(${i},${a},${s},${o})`},wf=e=>{const{h:t,s:n,l:r}=Cf(e),o=e.length>7?parseFloat(e[7]):1,i=r<=.5?2*r*n:(2-2*r)*n,a=t/60,s=i*(1-Math.abs(a%2-1));return Sf(i,s,a,r-.5*i,o)},Rf={resolveExpression:({colorExpression:e=""})=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(Number(t[1])/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return wf(t);if(t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return wf(t);if(t=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return(e=>{const{h:t,s:n,v:r}=Cf(e),o=r*n,i=t/60,a=o*(1-Math.abs(i%2-1));return Sf(o,a,i,r-o)})(t);if(t=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e),t)return e;if(t=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e),t)return e;const n=e&&xf[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getColor({style:e,defaultColor:t,theme:n}){const r=e?.color||Ef;let o;return o=e?.useColorExpression?Rf.resolveExpression(e):"string"==typeof r?r:n?.getColorPickerColor(r)||"",o&&"none"!==o?o:t}},_f=()=>xn.jsx(vu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:"M15 6V5H5V2H1.5a.5.5 0 0 0-.5.5V6H0V2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4h-1Zm-5-4H6v2h4V2Zm4.5 0H11v2h4V2.5a.5.5 0 0 0-.5-.5Zm1.5 9h-1V8h1v3Zm0 3a1 1 0 0 1-1 1h-1v-1h.6a.4.4 0 0 0 .4-.4V13h1v1Zm-7 1v-1h3v1H9Zm-5 0v-1h3v1H4Zm-3 0a1 1 0 0 1-1-1v-1h1v.6c0 .22.18.4.4.4H2v1H1ZM0 8h1v3H0V8Zm4-.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4ZM5 11h6V8H5v3Z"})}),kf=({libraryInfo:e,style:t,id:n})=>xn.jsx("div",{style:t,"data-testid":"tab-chart-icon",id:n,className:tf.TABS_ICON,children:xn.jsx(e.IconDefinition,{})}),Af=({style:e,id:t})=>xn.jsx("div",{style:e,"data-testid":"tab-hidden-icon",id:t,children:xn.jsx(yu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:"m13.441.795.764.646-1.839 2.174c.568.434 1.076.914 1.522 1.385a13.79 13.79 0 0 1 2.109 3 13.798 13.798 0 0 1-2.108 3c-1.382 1.457-3.345 3-5.89 3-1.34 0-2.52-.428-3.536-1.045l-1.904 2.25-.764-.646L13.441.795ZM11.72 4.379l-1.427 1.686a3 3 0 0 1-3.82 4.516l-1.354 1.6c.86.497 1.819.819 2.88.819 2.121 0 3.834-1.287 5.161-2.685A12.666 12.666 0 0 0 14.857 8a12.691 12.691 0 0 0-1.697-2.315c-.35-.37-.727-.73-1.132-1.063l-.308-.243ZM8 2a6.428 6.428 0 0 1 2.242.412l.305.123-.681.805A5.359 5.359 0 0 0 8 3C5.877 3 4.164 4.287 2.837 5.685A12.664 12.664 0 0 0 1.14 8a12.66 12.66 0 0 0 1.697 2.315l.301.308.311.299-.646.765A14.567 14.567 0 0 1 2.109 11 13.791 13.791 0 0 1 0 8a13.801 13.801 0 0 1 2.109-3C3.49 3.543 5.454 2 8 2Zm1.633 4.845-2.5 2.956a1.999 1.999 0 0 0 2.5-2.956Zm-3.917-.793a3 3 0 0 1 2.692-1.025l.202.035-.809.948A2 2 0 0 0 6 7.967l.003.152-.808.947a3 3 0 0 1 .521-3.014Z"})})}),If=()=>xn.jsx(yu,{viewBox:"0 0 16 16",children:xn.jsx("path",{d:"M12 4H6V3h6v1ZM6 8.5h4v-1H6v1Zm9 4.5H6v-1h9v1ZM3 11a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1Zm0-5.5a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1ZM3 2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1Zm0 1H2v1h1V3Z"})}),Lf=za(Td)({width:28,overflow:"hidden"}),Tf=za(Td)({height:28,width:"100%",overflow:"hidden",alignItems:"center","&::before":{visibility:"hidden"}}),Of=(e,t)=>e.find(e=>e.childRefId===t),Pf=(e,t)=>!t.edit&&0===e.condition,Mf=e=>{const{objects:t,defaultTabId:n,cachedTabId:r}=e;return r||(n&&t.some(e=>e.childRefId===n)?n:t[0]?.childRefId||"")};class jf{modifiedLayout;themeStyle;style;objectMap;activeTabId;theme;constructor({modifiedLayout:e,themeService:t}){this.modifiedLayout=e,this.activeTabId=Mf(this.modifiedLayout),this.themeStyle=t.getStyles(),this.theme=t.getTheme(),this.objectMap=Iu(this.modifiedLayout),this.style=this.createStyleClasses()}getTabsWidth=e=>{const t=this.resolveComponentStyle({compPath:"width.value",themePath:"tabWidth.value"});if(void 0===t||2!==t.length||e!==this.modifiedLayout.orientation)return{};const n=this.resolveComponentStyle({compPath:"width.unit",themePath:"tabWidth.unit",defaultValue:"%"});return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getTabWidth=e=>{const t=e?.value,n=e?.unit??"%";if(void 0===t||2!==t.length||"left"===this.modifiedLayout.orientation)return{};return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getColorStyle=(e,t=e)=>{const n=this.resolveComponentStyle({compPath:e,themePath:t});return Rf.getColor({style:n,theme:this.theme})??n};getTabBackgroundStyle=(e,t)=>{let n;if(this.activeTabId===e){const e=this.resolveComponentStyle({compPath:"background.selected",themePath:""});n=Rf.getColor({style:e,theme:this.theme})}return n??Rf.getColor({style:t,theme:this.theme})};createTabClasses=()=>this.modifiedLayout.objects?.reduce((e,t)=>{const n=t?.childRefId,r=t?.components?.find(e=>"tab"===e.key);return e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}`]={textAlign:Vp(r,"label.alignment"),backgroundColor:this.getTabBackgroundStyle(n,r?.background),...this.getTabWidth(r?.width)},e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}:hover`]={..."left"===this.modifiedLayout.orientation&&{backgroundColor:this.getColorStyle("background.hover","background.hover.color")}},e[`#tab-label-${this.modifiedLayout.qInfo.qId}-${n}`]={fontSize:Vp(r,"label.fontSize"),fontFamily:Vp(r,"label.fontFamily"),color:Rf.getColor({style:Vp(r,"label.color"),theme:this.theme})},e[`#tab-icon-${this.modifiedLayout.qInfo.qId}-${n} svg`]={height:Vp(r,"icon.size"),color:Rf.getColor({style:Vp(r,"icon.color"),theme:this.theme})},e},{});createTabsClasses=()=>({[of]:{fontSize:this.resolveComponentStyle({compPath:"label.fontSize",themePath:"label.value.fontSize"}),fontFamily:this.resolveComponentStyle({compPath:"label.fontFamily",themePath:"label.value.fontFamily"}),color:this.resolveComponentStyle({compPath:"label.color.color",themePath:"label.value.color"})},[af]:{height:this.resolveComponentStyle({compPath:"icon.size",themePath:"icon.value.fontSize"}),color:this.getColorStyle("icon.color","icon.value.color")},[nf]:{textAlign:this.resolveComponentStyle({compPath:"label.alignment",themePath:"label.textAlignment"}),...this.getTabsWidth("top")},[rf]:{..."top"===this.modifiedLayout.orientation&&{borderBottomColor:this.getColorStyle("indicator.hover","indicator.hover.color")}},[sf]:{...this.getTabsWidth("left"),backgroundColor:this.getColorStyle("background.unselected","")},[lf]:{backgroundColor:this.getColorStyle("indicator.selected","indicator.selected.color")}});createStyleClasses=()=>({...this.createTabsClasses(),...this.createTabClasses()});getStyleClasses(){return this.style}resolveComponentStyle=({key:e="tabs",compPath:t,themePath:n=t,defaultValue:r})=>{const o=this.modifiedLayout.components?.find(t=>t.key===e);return Vp(o,t)??Vp(this.themeStyle,n)??r};getTabStyle(e){return this.objectMap[e].components?.find(e=>"tab"===e.key)}}const Nf=()=>{const e=s(),n=l(),r=c(),o=d(),b=u(),g=p(),v=t(),y=h(),x=f(),E=function({theme:e,config:t={}}){const{id:n,resolve:r=[],transform:o=[],extend:i=[]}=t,a={theme:e,matrix:dh(r),styles:void 0};return a.styles=hh({theme:e,id:n,transform:o,extend:i,matrix:a.matrix}),{getStyles:()=>a.styles,getTheme:()=>a.theme,setTheme:e=>{a.theme=e,a.styles=hh({theme:e,id:n,transform:o,extend:i,matrix:a.matrix})}}}({theme:m(),config:{id:"tabbedContainer",resolve:[["object.tabbedContainer","indicator.selected","color"],["object.tabbedContainer","indicator.hover","color"],["object.tabbedContainer","background.hover","color"],["object.tabbedContainer","icon.value","color"],["object.tabbedContainer","icon.value","fontSize"]]}}),C=i(()=>new iu(o,g),[o,g]),[S]=a(()=>new yf(b.id)),[w,R]=a(!1),_=i(()=>o&&b&&n?new vf({embed:o,model:b,app:n,translator:g,mutex:S}):void 0,[o,b,n,g,S]),k=i(()=>ku(r),[r]),A=i(()=>new jf({modifiedLayout:k,themeService:E}),[k,E]);return i(()=>({app:n,modifiedLayout:k,embed:o,model:b,emitter:y,interactions:x,dataHandler:_,chartList:C,styleModel:A,mutex:S,options:v,accessibility:w,setAccessibility:R,translator:g,element:e}),[k,o,b,n,y,x,_,C,A,S,v,w,g,e])},$f=({dataHandler:e,modifiedLayout:t,translator:n,sharedContainerUtilities:r,Icon:o})=>{const[i,a]=_(void 0);if(!e||!t)return null;const s=!t.qExtendsId;return xn.jsx(pu,{children:xn.jsxs(uu,{children:[xn.jsx(o,{}),s?xn.jsxs(xn.Fragment,{children:[xn.jsx(gu,{sx:{width:250,height:32,fontFamily:"inherit"},className:"init-button",variant:i?"contained":"outlined",onClick:e=>{a(e.currentTarget)},"aria-label":n.get("LayoutContainer.EmptyList.AddContent"),disableRipple:!0,children:n.get("LayoutContainer.EmptyList.AddContent")}),xn.jsx(Cu,{translator:n,anchorEl:i,dataHandler:e,onClose:()=>{a(void 0)},sharedContainerUtilities:r})]}):xn.jsx(Xs,{variant:"inherit",children:n.get("LayoutContainer.EmptyList.EmptyHint")})]})})};class zf{_rendered=new Set;_objectMap=new Map;_objectApis=new Map;_resolver;_dependencyData;_recreateMap=new Map;constructor(e){this._dependencyData=e}set dependencyData(e){this._dependencyData=e}get rendered(){return this._rendered}get objectMap(){return this._objectMap}get objectApis(){return this._objectApis}get resolver(){return this._resolver}get recreateMap(){return this._recreateMap}createTimerForRendering=()=>{if(!this.resolver){let e;const t=setTimeout(()=>{this._dependencyData.options.onRenderStatusUpdate?.("Layout container rendering timeout reached after 90 seconds. Resolving anyway."),this.doResolve()},9e4),n=new Promise(t=>{e=t});this._resolver={promise:n,resolve:e,timer:t}}return this._resolver};doResolve=()=>{this.resolver&&(clearTimeout(this.resolver?.timer),this.resolver.resolve?.(!0),this._resolver=void 0)};tryToResolve=()=>{const{visibleLayoutObjects:e}=this._dependencyData;if(this.resolver){e.every(e=>this.rendered.has(e.id))&&(this._dependencyData.options.onRenderStatusUpdate?.("All layout container children rendered"),this.doResolve())}};syncObjects(e){const t=new Set,n=new Set([...Array.from(this.objectMap.keys()),...Array.from(this.objectApis.keys()),...this.rendered]),r=new Set(n);let o=!1;return e.forEach(e=>{n.has(e.id)?(this.rendered.has(e.id)&&t.add(e.id),r.delete(e.id)):o=!0}),r.forEach(e=>{const t=this.objectMap.get(e);t&&(this.confirmPotentialSelections(t),t.destroy?.(),this.objectMap.delete(e)),this.objectApis.get(e)?.destroy(),this.objectApis.delete(e)}),this._rendered=t,this.tryToResolve(),o}destroy(){for(const e of this.objectApis.values())e.destroy();this._objectMap=new Map,this._objectApis=new Map}saveObject(e,t){this.objectMap.set(e,t)}saveObjectApi(e,t){this._objectApis.set(e,t)}onRendered(e){this._dependencyData.options.onRenderStatusUpdate?.(`Layout container child rendered: ${this.rendered.size+1}/${this._dependencyData.visibleLayoutObjects.length} ${e}`),this.rendered.add(e),this.tryToResolve()}getChildrenObjects(){const{visibleLayoutObjects:e}=this._dependencyData,t=[];return e.forEach(e=>{const n=this.objectMap.get(e.id);n&&t.push(n)}),t}getChildLayout(e){const{modifiedLayout:t}=this._dependencyData;return t.qChildList.qItems.find(t=>t.qInfo.qId===e)}getObjectOptions(e){const{viewState:t,modifiedLayout:n,options:r}=this._dependencyData,{chartAnimations:o,direction:i,progressiveRendering:a,freeResize:s,navigation:l,useQlikEmbedChildRendering:c,getContextMenuParent:d,onContextMenu:u,context:p}=r;return{isReadonly:!1,setController:t=>{this.saveObject(e,t)},onRendered:()=>{this.onRendered(e)},onInitialRender:()=>{this.onRendered(e)},isParentMaster:!!n?.qExtendsId,isSnapshot:!!n.snapshotData,...!!t?.viewStates?.[e]&&{viewState:t?.viewStates[e]},...!!t?.layouts?.[e]&&{layout:t.layouts[e]},direction:i,chartAnimations:o,progressiveRendering:a,freeResize:s,navigation:l,disableThemeBorder:!1,fallbackToClient:r.fallbackToClient,useQlikEmbedChildRendering:c,getContextMenuParent:d,onContextMenu:u,context:p}}confirmPotentialSelections(e){e&&"selectionsApi"in e&&e.selectionsApi.active&&e.selectionsApi.confirm()}}const Df=({chartObject:e,embed:t,renderHelper:n,direction:r,interactions:o,env:i})=>{const a=A(null),{id:s}=e;k(()=>{if(s&&a.current){const e=n.getObjectOptions(s)||{};e.disableThemeBorder=!0,t.render({id:s,element:a.current,options:e}).then(e=>{n.saveObjectApi(s,e)}).catch(e=>{const t=n.getChildLayout(s)?.qInfo?.qType;console.error("Could not render chart with id",s,t,e)})}},[s,t,n,r]);const l=I(()=>()=>{if(e?.id&&i.anything){const t=e?.label,{sense:r}=i.anything,o="current",a=n.objectMap.get(e.id);a&&r.propertyPanel.show({model:a.model,parent:o,headerLabel:t,keepCurrentActiveCell:!0})}},[i,e,n]);return k(()=>{const e=a?.current;return e&&o?.edit&&e.addEventListener("dblclick",l),()=>{e?.removeEventListener("dblclick",l)}},[a,l,o]),xn.jsx("div",{ref:a,style:{position:"relative",height:"100%",width:"100%"},"data-testid":`tab-panel-${e.childRefId}`})};let Bf=function(e){return e.TABS_HEIGHT="36px",e}({});const Ff=({charts:e,handleChangeTab:t,activeTabId:n,element:r,translator:o,accessibility:i,disabled:a})=>{const[s,l]=C.useState(null),c=Boolean(s),d=()=>{l(null)},u=L(e=>{e?.focus()},[]);return xn.jsxs(xn.Fragment,{children:[xn.jsx(Pl,{onClick:e=>{l(e.currentTarget)},disabled:a,"aria-haspopup":"menu","data-testid":"chartTabMenuDropdownButton",tabIndex:i?0:-1,"aria-label":o.get("Container.Label.Visualizations"),className:tf.TAB_MENU,sx:{m:"2px"},children:xn.jsx(If,{})}),xn.jsx(ud,{anchorEl:s,open:c,onClose:d,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},MenuListProps:{sx:{py:0}},slotProps:{paper:{sx:{maxHeight:"500px",maxWidth:"500px"}}},children:e.map(e=>xn.jsx(bd,{className:tf.TAB_MENU_ITEM,ref:n===e.childRefId&&c?u:null,onClick:()=>{(e=>{t(e.childRefId),d(),window.setTimeout(()=>{r.getElementsByClassName(tf.ACTIVE_TAB_PANEL)?.[0]?.focus()},0)})(e)},sx:n===e.childRefId?{backgroundColor:"rgba(0, 0, 0, 0.1)"}:{},"aria-label":e.label,title:e.label,children:xn.jsx(Xs,{variant:"inherit",noWrap:!0,children:e.label})},`chartTabMenu-${e.childRefId}`))})]})},Gf=({label:e,id:t})=>xn.jsx(Sl,{className:tf.TAB_LABEL,id:`tab-label-${t}`,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",overflow:"hidden",flexWrap:"wrap"},children:xn.jsx("span",{style:{width:"100%",overflowWrap:"break-word",hyphens:"auto",fontWeight:"bold",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",lineHeight:"normal",overflow:"hidden"},children:e})}),Hf=({libraryInfo:e,chart:t,iconPosition:n,id:r})=>{let o;switch(n){case"bottom":o={marginTop:"6px"};break;case"top":o={marginBottom:"6px"};break;case"end":o={marginInlineStart:"8px"};break;default:o={marginInlineEnd:"8px"}}o.display="flex",o.alignItems="center",o.height="100%",o.flex="1 0 0";return 0===t.condition?xn.jsx(Af,{id:`${tf.TABS_ICON}-${r}`,style:o}):e?xn.jsx(kf,{id:`${tf.TABS_ICON}-${r}`,libraryInfo:e,style:o}):null},Uf=({models:e,activeTabId:t,handleChangeTab:n})=>{const{modifiedLayout:r,chartList:o,interactions:i,accessibility:a}=e,s=o?.getCharts(),l=r.objects.filter(e=>!Pf(e,i)),{orientation:c,tabContainerStyle:d,ScrollButtonComponent:u}=(({orientation:e})=>"left"===e?{orientation:"vertical",tabContainerStyle:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"25%",flexShrink:0},ScrollButtonComponent:Tf}:{orientation:"horizontal",tabContainerStyle:{display:"flex",flexDirection:"row",alignItems:"center"},ScrollButtonComponent:Lf})(r),p=!1===i.active&&!i.edit,[h,f]=_(!1),m=L(e=>{if(e){const t=e.getElementsByClassName("MuiTabs-flexContainer")[0];if(t)return void f("vertical"===c?t.scrollHeight>t.offsetHeight:t.scrollWidth>t.offsetWidth)}f(!1)},[c]);return xn.jsxs(Sl,{className:tf.TAB_WRAPPER,sx:d,ref:e=>{m(e)},children:[r.useDropdown&&h?xn.jsx(Ff,{charts:l,handleChangeTab:n,activeTabId:t,accessibility:a,translator:e.translator,element:e.element,disabled:p}):null,xn.jsx(Ud,{value:t,onChange:(e,t)=>{n(t)},ScrollButtonComponent:u,variant:"scrollable",orientation:c,scrollButtons:!!r.useScrollButton&&"auto",TabScrollButtonProps:{...p&&{disabled:!0}},sx:{height:"100%",width:"100%",minHeight:Bf.TABS_HEIGHT},children:l.map(n=>{const o=_u(r,n.childRefId)?.qData?.visualization,i=o&&s?.[o]?.libraryInfo,l=e.styleModel.getTabStyle(n.childRefId),d=0===n.condition||r.showIcons&&i&&!1!==l?.icon?.show,u="vertical"===c?"top":"start",h=e.styleModel.resolveComponentStyle({compPath:"icon.position",defaultValue:u}),f=e.styleModel.resolveComponentStyle({compPath:"label.show"}),m=n.label&&(l?.label?.show??!1!==f),b=`${r.qInfo.qId}-${n.childRefId}`;return xn.jsx(Ed,{className:`${tf.TAB} ${t===n.childRefId?tf.ACTIVE_TAB:""}`,disabled:p,id:`tab-${b}`,value:n.childRefId,title:n.label,label:m?xn.jsx(Gf,{label:n.label,id:b}):void 0,icon:d?xn.jsx(Hf,{libraryInfo:i,chart:n,iconPosition:h,id:b}):"",iconPosition:h,"data-testid":`container-tab-${n.childRefId}`,sx:{textAlign:"vertical"!==c||r.showIcons?"center":"start",minWidth:"vertical"===c?"100%":void 0,minHeight:Bf.TABS_HEIGHT,padding:"6px 16px","&:hover":{paddingBottom:"4px"},"&.Mui-disabled":{opacity:"inherit"}},"aria-label":n.label,"aria-controls":`tab-panel-${b}`,tabIndex:a&&t===n.childRefId?0:-1},n.childRefId)})})]})},Wf=({models:e,renderHelper:t,activeTabId:n,handleChangeTab:r,env:o})=>{const{modifiedLayout:i,embed:a,interactions:s,options:l,styleModel:c,accessibility:d}=e,u=i.objects,p=s.edit||!!u.find(e=>0!==e.condition),h=i.showTabs&&p,f="left"===i.orientation?"row":"column",m=c.getStyleClasses();return xn.jsxs(Sl,{sx:{display:"flex",flexDirection:f,height:"100%",width:"100%",direction:l.direction,...m},children:[h?xn.jsx(Uf,{models:e,activeTabId:n,handleChangeTab:r}):null,u.map(e=>{const r=`tab-panel-${i.qInfo.qId}-${e.childRefId}`,c=n===e.childRefId&&!Pf(e,s);return xn.jsx(Sl,{role:"tabpanel",id:r,"aria-label":e.label,sx:{flex:"1 1 auto",minHeight:0,width:"100%",padding:"2px",boxSizing:"border-box",direction:"ltr","&:focus-visible":{boxShadow:"inset 0 0 0 2px #0275D9",borderRadius:"3px",zIndex:1200}},...c?{className:tf.ACTIVE_TAB_PANEL,tabIndex:d?0:-1}:{hidden:!0},children:c?xn.jsx(Df,{chartObject:e,renderHelper:t,direction:l.direction,embed:a,interactions:s,env:o}):null},r)})]})};let Yf=function(e){return e.COPY="copy",e.PASTE="paste",e.RESET_COPY_BUFFER="resetCopyBuffer",e}({}),Vf=function(e){return e.COPY="copy",e.PASTE_AND_REPLACE="paste-and-replace",e.PASTE="paste",e.DUPLICATE="duplicate",e.DELETE="delete",e.CUT="cut",e.EDIT_PROPERTIES="edit",e.ZOOM_IN="zoom-in",e.VISUAL_EXPLORATION="visual-exploration",e.MONITOR_IN_HUB="addto",e.REORDER_LAYERS_GROUP="reorder-layers-group",e.BRING_TO_FRONT="bring-to-front",e.BRING_FORWARD="bring-forward",e.SEND_TO_BACK="send-to-back",e.SEND_BACKWARDS="send-backwards",e.CONTAINER_HEADER="container-header",e.CHART_HEADER="chart-header",e.ALERT_GROUP="alertGroup",e.ADD_TO_MASTER_ITEMS="add-to-master-items",e.UNLINK_VISUALIZATION="unlink",e.DEVELOPER="object-developer",e.SHOW_DETAILS="object-info",e.EXPLAIN_KEY_DRIVERS_OLD_ID="explainKeyDrivers",e.EXPLAIN_KEY_DRIVERS="key-driver",e.SUBSCRIBE="subscribe",e.NOTES_GROUP="notesGroup",e.DOWNLOAD="download",e.SHARE_IMAGE="share",e}({});const qf=[Vf.PASTE_AND_REPLACE,Vf.ZOOM_IN,Vf.VISUAL_EXPLORATION],Kf=[Vf.VISUAL_EXPLORATION,Vf.ALERT_GROUP,Vf.SHOW_DETAILS,Vf.EXPLAIN_KEY_DRIVERS,Vf.EXPLAIN_KEY_DRIVERS_OLD_ID],Xf=[Vf.DELETE,Vf.CUT,Vf.ADD_TO_MASTER_ITEMS,Vf.UNLINK_VISUALIZATION],Zf=[Vf.PASTE_AND_REPLACE],Jf=(e,t)=>{const{childRefId:n}=e.model.layout,r=t.objects.find(e=>e.childRefId===n);return{...e,additionalData:{label:r?.label}}},Qf=(e,t,n,r,o)=>{const i=t.getSupportFunction(Vf.COPY);if(!i)return void e.deleteItem(Vf.COPY);const a=()=>{i(Jf(n,r)).catch(()=>{})},s=e.items.find(e=>e.id===Vf.COPY);if(s)s.updateItem({select:a});else if(o){const t=e.items.findIndex(e=>e.id===Vf.CUT),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.copy",tid:Vf.COPY,id:Vf.COPY,icon:"copy",select:a,items:[]},n)}},em=e=>e.interactions.edit&&!e.modifiedLayout.qExtendsId,tm=async(e,t,n,r,o)=>{if(o.flags.isEnabled("GVC_48_CHART_CONTEXT_MENU_ITEM_GENERATION"))return;const i=t.getBuilder("default");if(!i)return;const a=await i();a.addItem({translation:"contextMenu.containerOptionsHeader",tid:Vf.CONTAINER_HEADER,id:Vf.CONTAINER_HEADER,bold:!0,items:[]},0);const s=em(n);a.items.forEach(e=>{(Kf.includes(e.id)||!s&&Zf.includes(e.id))&&a.deleteItem(e.id)}),s&&await(async(e,t,n)=>{const r=t.getSupportFunction(Yf.PASTE),o=await(r?.()?.catch(()=>{}));if(!o||ou.includes(o.template))return void e.deleteItem(Vf.PASTE_AND_REPLACE);const i=()=>{n()},a=e.items.find(e=>e.id===Vf.PASTE_AND_REPLACE||e.id===Vf.PASTE);if(a)a.updateItem({translation:"contextMenu.paste",select:i});else{const t=e.items.findLastIndex(e=>e.id===Vf.COPY||e.id===Vf.DEVELOPER||e.id===Vf.CONTAINER_HEADER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.paste",tid:Vf.PASTE_AND_REPLACE,id:Vf.PASTE_AND_REPLACE,icon:"paste",select:i,items:[]},n)}})(a,t,r),e.updateItem({items:a.items}),1===e.items.length&&e.deleteItem(Vf.CONTAINER_HEADER)},nm=e=>{const t={[Vf.MONITOR_IN_HUB]:!0,[Vf.SUBSCRIBE]:!0,[Vf.NOTES_GROUP]:!0,[Vf.DOWNLOAD]:!0,[Vf.SHARE_IMAGE]:!0};e.items.forEach(n=>{t[n.id]?e.deleteItem(n.id):n.items&&nm(n)})},rm=(e,t,n,r,o,i)=>a=>{const{dataHandler:s,modifiedLayout:l}=r;if(em(r)){n.isInvalid||(((e,t,n,r)=>{const{model:o,modifiedLayout:i}=n,a=e.items.findLastIndex(e=>e.id===Vf.CHART_HEADER||e.id===Vf.REORDER_LAYERS_GROUP),s=a>=0?1+a:void 0;e.addItem({translation:"Object.Container.Props.EditProperties",tid:Vf.EDIT_PROPERTIES,id:Vf.EDIT_PROPERTIES,icon:Vf.EDIT_PROPERTIES,items:[],select:()=>{const{childRefId:e}=t.model.layout,n=i.objects.find(t=>t.childRefId===e),a=n?.label,{sense:s}=r.anything,l=o;s.propertyPanel.show({model:t.model,parent:l,headerLabel:a})}},s)})(a,n,r,o),((e,t,n,r,o,i)=>{const a=r.getSupportFunction(Vf.COPY);if(!a)return void e.deleteItem(Vf.CUT);const s=()=>{o&&a(Jf(n,i)).then(async()=>{await(o?.deleteChildren([t]))}).catch(()=>{})},l=e.items.find(e=>e.id===Vf.CUT);if(l)l.updateItem({select:s});else{const t=e.items.findLastIndex(e=>e.id===Vf.ADD_TO_MASTER_ITEMS||e.id===Vf.UNLINK_VISUALIZATION||e.id===Vf.EDIT_PROPERTIES||e.id===Vf.REORDER_LAYERS_GROUP||e.id===Vf.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.cut",tid:Vf.CUT,id:Vf.CUT,icon:"cut",select:s,items:[]},n)}})(a,t,n,e,s,l),Qf(a,e,n,l,!0),((e,t,n,r,o)=>{const i=t.getSupportFunction(Yf.COPY),a=t.getSupportFunction(Yf.PASTE);if(!i||!a)return void e.deleteItem(Vf.DUPLICATE);const s=()=>{i(Jf(n,r)).then(()=>{o()}).catch(()=>{})},l=e.items.find(e=>e.id===Vf.DUPLICATE);if(l)l.updateItem({select:s});else{const t=e.items.findIndex(e=>e.id===Vf.COPY),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Duplicate",tid:Vf.DUPLICATE,id:Vf.DUPLICATE,icon:Vf.DUPLICATE,items:[],select:s},n)}})(a,e,n,l,i)),((e,t,n)=>{const r=()=>{n&&n.deleteChildren([t]).catch(()=>{})},o=e.items.find(e=>e.id===Vf.DELETE);if(o)o.updateItem({select:r});else{const t=e.items.findLastIndex(e=>e.id===Vf.DUPLICATE||e.id===Vf.ADD_TO_MASTER_ITEMS||e.id===Vf.UNLINK_VISUALIZATION||e.id===Vf.REORDER_LAYERS_GROUP||e.id===Vf.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Delete",tid:Vf.DELETE,id:Vf.DELETE,icon:"bin",items:[],select:r},n)}})(a,t,s)}else Qf(a,e,n,l,!1)},om=(e,t,n,r)=>{g(async(o,i,a)=>{if(!a)return!1;const s=((e,t)=>()=>{if(!e)return;const n=t.getSupportFunction(Yf.PASTE);n&&n().then(async({template:t,init:n,children:r,additionalData:o})=>{const{label:i}=o,a={label:i};n.qExtendsId?await e.addMasterObjectAsChild({initProps:n,children:r,objectInitProps:a}):await e.addVizAsChild({type:t,initProps:n,children:r,objectInitProps:a})}).catch(e=>{e&&t.getSupportFunction(Yf.RESET_COPY_BUFFER)})})(n.dataHandler,a);if(await tm(o,a,n,s,r),nm(o),!(e=>{let t;t="qv-radial-contextmenu"===e.type?e.touches[0]?.target:e.target;return t&&((e,t)=>{let n=e;for(;n;){if(n.classList?.contains(t))return n;n=n.parentNode}return null})(t,tf.ACTIVE_TAB_PANEL)})(i))return!0;const l=n.modifiedLayout.objects.find(t=>t.childRefId===e)?.id;if(!l)return!0;const c=t.objectMap.get(l);if(!c)return!0;const d=rm(a,e,c,n,r,s),u=await(async(e,t,n,r)=>{const o=em(n),i=e.getBuilder("object");if(!i)return;const a=await i(t);return a.addItem({translation:"contextMenu.chartOptionsHeader",tid:Vf.CHART_HEADER,id:Vf.CHART_HEADER,bold:!0,items:[]},0),r(a),a.items.forEach(e=>{(qf.includes(e.id)||!o&&Xf.includes(e.id))&&a.deleteItem(e.id)}),1===a.items.length&&a.deleteItem(Vf.CHART_HEADER),a})(a,c,n,d);return!u||(o.items.length>0&&u.addItem({translation:"contextMenu.subMenuContainerOptions",tid:"tabbed-container-menu",id:"tabbed-container-menu",icon:"tabbed-container",items:[...o.items]},u.items.length),o.updateItem({items:u.items}),!0)})},im=({element:e,models:r,env:o,activeCharts:s})=>{const l=((e,t)=>{const[r,o]=a(void 0);return n(()=>{if(0===e.getElementsByClassName(t).length){const n=document.createElement("div");n.className=t,e.appendChild(n);const r=lu.createRoot(n);o(r)}return()=>{r?.unmount()}},[e,t,r]),r})(e,"init-component"),{options:c,modifiedLayout:d,interactions:u,model:p}=r,{qChildList:h}=d,f=nu(c.direction),m=(e=>{const{viewState:n}=t(),{snapshotData:r}=e;if(r){const{layouts:e}=r.objectsData,t=r.viewState?.viewStates;return{layouts:e,viewStates:t}}if(n){const{viewStates:e}=n;return{viewStates:e}}})(d),g=i(()=>Mf(d),[d]),v={modifiedLayout:d,activeTabId:g,env:o},[y,x]=pf(v);x(v);const E=i(()=>d.objects.filter(e=>g===e.childRefId),[g,d.objects]),{renderHelper:C}=(e=>{const{visibleLayoutObjects:t,options:r}=e,[o]=a(()=>new zf(e)),[,i]=a(r);return o.dependencyData=e,b(async()=>(i(e=>(e!==r&&t.forEach(e=>o.recreateMap.set(e.id,!0)),r)),o.syncObjects(t)?o.createTimerForRendering()?.promise:o.resolver?.promise),[t,r]),n(()=>()=>{o.destroy()},[o]),{renderHelper:o}})({modifiedLayout:d,visibleLayoutObjects:E,viewState:m,options:c});om(g,C,r,o);const[S]=a({current:void 0}),w=i(()=>e=>{(async({model:e,patchList:t})=>{if(e?.applyPatches){const n=await e.getEffectiveProperties(),r=[];t.forEach(e=>{const{newValue:t,propertyName:o}=e,i=void 0!==n[o]?"Replace":"Add";t?r.push({qPath:`/${o}`,qOp:i,qValue:JSON.stringify(t)}):"Replace"===i&&r.push({qPath:`/${o}`,qOp:"Remove"})}),r.length>0&&await e.applyPatches(r,!0)}})({model:p,patchList:[{newValue:e,propertyName:"cachedTabId"}]}).then(()=>{const t=y.modifiedLayout.objects.find(t=>t.childRefId===e)?.id;s.updateActiveCharts(t?[t]:[])})},[s,p,y.modifiedLayout.objects]),R=i(()=>({setSelected:e=>{const t=y.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t?w(t):S.current=e[0]}}),[w,y,S]);n(()=>{const e=(({chartObjects:e,activeTabId:t})=>!Of(e,t)&&e.length>0?e[0]?.childRefId:t)({chartObjects:y.modifiedLayout.objects,activeTabId:y.activeTabId});if(e!==y.activeTabId)w(e);else if(S.current){const e=y.modifiedLayout.objects.find(e=>e.id===S.current)?.childRefId;e&&w(e)}S.current=void 0},[d?.objects.length,y,S,w]),n(()=>{const e=(({chartObjects:e,activeTabId:t,interactions:n})=>{const r=Of(e,t);if(!r||Pf(r,n)){const n=e.find(e=>0!==e.condition);return n?.childRefId||t}return t})({chartObjects:y.modifiedLayout.objects,activeTabId:y.activeTabId,interactions:u});e!==y.activeTabId&&w(e)},[u,d?.objects,y,w]);const _=0===h.qItems.length&&u.edit;return n(()=>{l?.render(xn.jsxs(Ba,{theme:f,children:[_?xn.jsx($f,{Icon:_f,dataHandler:r.dataHandler,modifiedLayout:r.modifiedLayout,translator:r.translator,sharedContainerUtilities:R}):null,!_&&xn.jsx(Wf,{models:r,renderHelper:C,activeTabId:g,handleChangeTab:w,env:o})]}))},[l,r,f,_,C,g,R,w,o]),{renderHelper:C,sharedContainerUtilities:R,activeTabId:g}};var am={targets:[]};const sm={showTitles:!0,title:"",subtitle:"",footnote:"",disableNavMenu:!0,showDetails:!1,objects:[],qChildListDef:{qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}},showTabs:!0,useScrollButton:!0,useDropdown:!1,showIcons:!1,components:[],defaultTabId:"",orientation:"top",fontsUsed:[]};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".init-component {\n height: 100%;\n overflow: hidden;\n}\n");const lm=e=>e.map(e=>{if("canReceive"in e){const t=e=>"libraryitem"===e.type&&("field"===e.item.type||"measure"===e.item.type||"dimension"===e.item.type);return{...e,canReceive:n=>t(n)&&e.canReceive(n)}}return e}),cm=(e,t)=>{let n=!0;const r=t.objects.reduce((t,r)=>{const o=r.id;if(0!==r.condition){const i=e.get(o);return i&&(e=>e.supportExport())(i)&&(n=!1,t.objectMap.set(o,i)),t.objects.push(r),t}return t},{objects:[],objectMap:new Map});return n?{objects:[],objectMap:new Map}:r}}}});
|